diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index b0151af8a1e..604a5bbabdd 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.30" +const goModuleVersion = "1.14.2" diff --git a/internal/protocoltest/awsrestjson/api_client.go b/internal/protocoltest/awsrestjson/api_client.go index e9987bf2370..638d2e6c369 100644 --- a/internal/protocoltest/awsrestjson/api_client.go +++ b/internal/protocoltest/awsrestjson/api_client.go @@ -456,6 +456,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -517,6 +541,33 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go index 2e29c864b5f..f3aaf49b748 100644 --- a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go +++ b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go @@ -139,6 +139,9 @@ func (c *Client) addOperationAllQueryStringTypesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllQueryStringTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString.go b/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString.go index 28f840be460..7971cdfecd6 100644 --- a/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString.go +++ b/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString.go @@ -101,6 +101,9 @@ func (c *Client) addOperationConstantAndVariableQueryStringMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConstantAndVariableQueryString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_ConstantQueryString.go b/internal/protocoltest/awsrestjson/api_op_ConstantQueryString.go index 427c0ac3911..d47522c4562 100644 --- a/internal/protocoltest/awsrestjson/api_op_ConstantQueryString.go +++ b/internal/protocoltest/awsrestjson/api_op_ConstantQueryString.go @@ -102,6 +102,9 @@ func (c *Client) addOperationConstantQueryStringMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConstantQueryStringValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets.go b/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets.go index 5e6ad7bbfb8..b3b9dd176a0 100644 --- a/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets.go +++ b/internal/protocoltest/awsrestjson/api_op_DatetimeOffsets.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDatetimeOffsetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDatetimeOffsets(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentType.go b/internal/protocoltest/awsrestjson/api_op_DocumentType.go index 365efa8c555..3ba5a5eda06 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentType.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentType.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDocumentTypeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDocumentType(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsMapValue.go b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsMapValue.go index 5efeb2f3683..587c9dc32cd 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsMapValue.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsMapValue.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDocumentTypeAsMapValueMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDocumentTypeAsMapValue(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload.go b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload.go index a7578f0f70c..46f88eda658 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDocumentTypeAsPayloadMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDocumentTypeAsPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput.go b/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput.go index ebb53309901..0ae6f78e6de 100644 --- a/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput.go +++ b/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationEmptyInputAndEmptyOutputMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyInputAndEmptyOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_EndpointOperation.go b/internal/protocoltest/awsrestjson/api_op_EndpointOperation.go index ff4e589ff66..e30beeab172 100644 --- a/internal/protocoltest/awsrestjson/api_op_EndpointOperation.go +++ b/internal/protocoltest/awsrestjson/api_op_EndpointOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEndpointOperationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation.go b/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation.go index cd7f0c8ec75..e1f4fc36ae7 100644 --- a/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation.go +++ b/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelOperationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go index 1d1e464e909..1f19edfbe41 100644 --- a/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go +++ b/internal/protocoltest/awsrestjson/api_op_FractionalSeconds.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFractionalSeconds(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors.go b/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors.go index c7026ba2b76..8185f1a36f7 100644 --- a/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go b/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go index 5ba00224115..20e6f2c696a 100644 --- a/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go +++ b/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go b/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go index c449702d7fa..c2855b6ceb0 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go @@ -99,6 +99,9 @@ func (c *Client) addOperationHttpChecksumRequiredMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload.go b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload.go index 6d2a96a6707..9fc3167f4a8 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload.go @@ -99,6 +99,9 @@ func (c *Client) addOperationHttpEnumPayloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpEnumPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits.go index a53578fc69f..f83b24f24f3 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits.go @@ -106,6 +106,9 @@ func (c *Client) addOperationHttpPayloadTraitsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadTraits(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType.go index 03ad8e3b277..cfc974ee600 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType.go @@ -108,6 +108,9 @@ func (c *Client) addOperationHttpPayloadTraitsWithMediaTypeMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadTraitsWithMediaType(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure.go index ba4f4a6900a..075793ffa86 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure.go @@ -103,6 +103,9 @@ func (c *Client) addOperationHttpPayloadWithStructureMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithStructure(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion.go index 7dcdbc447c6..6ad62ea12ae 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithUnion.go @@ -100,6 +100,9 @@ func (c *Client) addOperationHttpPayloadWithUnionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithUnion(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders.go b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders.go index 0067192512a..e9186cfa32e 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders.go @@ -104,6 +104,9 @@ func (c *Client) addOperationHttpPrefixHeadersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPrefixHeaders(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse.go b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse.go index d193e537e86..cec305297f3 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersInResponse.go @@ -99,6 +99,9 @@ func (c *Client) addOperationHttpPrefixHeadersInResponseMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPrefixHeadersInResponse(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels.go index 51310aa8ce9..80daec6de1f 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels.go @@ -101,6 +101,9 @@ func (c *Client) addOperationHttpRequestWithFloatLabelsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithFloatLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath.go index e41a55f9865..af7c3131a9f 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath.go @@ -101,6 +101,9 @@ func (c *Client) addOperationHttpRequestWithGreedyLabelInPathMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithGreedyLabelInPathValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels.go index f2eae729987..a1c471b6781 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels.go @@ -127,6 +127,9 @@ func (c *Client) addOperationHttpRequestWithLabelsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat.go index e4540d3fdcb..2afbb65a027 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat.go @@ -119,6 +119,9 @@ func (c *Client) addOperationHttpRequestWithLabelsAndTimestampFormatMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithLabelsAndTimestampFormatValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithRegexLiteral.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithRegexLiteral.go index e8d3c7baacc..7c633557138 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithRegexLiteral.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithRegexLiteral.go @@ -98,6 +98,9 @@ func (c *Client) addOperationHttpRequestWithRegexLiteralMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithRegexLiteralValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpResponseCode.go b/internal/protocoltest/awsrestjson/api_op_HttpResponseCode.go index 9180b42a4b9..fe03d612f28 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpResponseCode.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpResponseCode.go @@ -96,6 +96,9 @@ func (c *Client) addOperationHttpResponseCodeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpResponseCode(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload.go b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload.go index 131c6734ab2..5981a384f73 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload.go @@ -98,6 +98,9 @@ func (c *Client) addOperationHttpStringPayloadMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpStringPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse.go b/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse.go index 93d7598d690..c5a1ebf2b1a 100644 --- a/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse.go +++ b/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse.go @@ -99,6 +99,9 @@ func (c *Client) addOperationIgnoreQueryParamsInResponseMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIgnoreQueryParamsInResponse(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders.go b/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders.go index 91a0120f17e..ca3842fb346 100644 --- a/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders.go +++ b/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders.go @@ -170,6 +170,9 @@ func (c *Client) addOperationInputAndOutputWithHeadersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInputAndOutputWithHeaders(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonBlobs.go b/internal/protocoltest/awsrestjson/api_op_JsonBlobs.go index e161a93f36d..32685bcdbaa 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonBlobs.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonBlobs.go @@ -99,6 +99,9 @@ func (c *Client) addOperationJsonBlobsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonEnums.go b/internal/protocoltest/awsrestjson/api_op_JsonEnums.go index 9bb46918196..9ae1a82278e 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonEnums.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonEnums.go @@ -120,6 +120,9 @@ func (c *Client) addOperationJsonEnumsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonIntEnums.go b/internal/protocoltest/awsrestjson/api_op_JsonIntEnums.go index e2fabd2451f..9e3411935f9 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonIntEnums.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonIntEnums.go @@ -121,6 +121,9 @@ func (c *Client) addOperationJsonIntEnumsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonIntEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonLists.go b/internal/protocoltest/awsrestjson/api_op_JsonLists.go index f4f72e37612..06848ab7826 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonLists.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonLists.go @@ -141,6 +141,9 @@ func (c *Client) addOperationJsonListsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonMaps.go b/internal/protocoltest/awsrestjson/api_op_JsonMaps.go index 34a0b83ad93..6144db804fe 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonMaps.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonMaps.go @@ -116,6 +116,9 @@ func (c *Client) addOperationJsonMapsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonTimestamps.go b/internal/protocoltest/awsrestjson/api_op_JsonTimestamps.go index 8755e0a1c20..d333e0fe12d 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonTimestamps.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonTimestamps.go @@ -125,6 +125,9 @@ func (c *Client) addOperationJsonTimestampsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonTimestamps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_JsonUnions.go b/internal/protocoltest/awsrestjson/api_op_JsonUnions.go index a38e8cb6321..8def495598c 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonUnions.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonUnions.go @@ -106,6 +106,9 @@ func (c *Client) addOperationJsonUnionsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonUnions(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go index 58013712bf9..7612c28d47e 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedAcceptWithBodyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedAcceptWithBody(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go index 8b86581cc76..cce6b579828 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedAcceptWithGenericStringMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedAcceptWithGenericString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go index c342bb02a63..fc3d87fe0c8 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go @@ -98,6 +98,9 @@ func (c *Client) addOperationMalformedAcceptWithPayloadMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedAcceptWithPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go b/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go index 2375727e017..87e780848d7 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedBlobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedBlob(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go b/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go index c0c61a5801a..98d1e96d347 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedBooleanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedBooleanValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedByte.go b/internal/protocoltest/awsrestjson/api_op_MalformedByte.go index d506678223b..1d13b357ba3 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedByte.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedByte.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedByteMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedByteValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go index 2aa058e7648..2b265a6e441 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedContentTypeWithBodyMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithBody(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go index 8f5e25986e8..e6f7ee6efea 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedContentTypeWithGenericStringMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithGenericString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go index c45db59fad5..957a9093cc5 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go @@ -98,6 +98,9 @@ func (c *Client) addOperationMalformedContentTypeWithPayloadMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go index 9ce1b4aa4e1..4c15f35a4bc 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go @@ -94,6 +94,9 @@ func (c *Client) addOperationMalformedContentTypeWithoutBodyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithoutBody(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go b/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go index 7a133e86ffd..6f401d00f7d 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedDoubleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedDoubleValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go b/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go index 5ca5097c06c..5c3c09f6dea 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedFloatMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedFloatValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go b/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go index fec677daa91..ae70842ca34 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedIntegerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedIntegerValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedList.go b/internal/protocoltest/awsrestjson/api_op_MalformedList.go index 5bfffd1f9da..0fe65afab7b 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedList.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedList.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedListMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedList(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedLong.go b/internal/protocoltest/awsrestjson/api_op_MalformedLong.go index 58552a969b9..aef8a33e2fa 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedLong.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedLong.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedLongMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedLongValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedMap.go b/internal/protocoltest/awsrestjson/api_op_MalformedMap.go index 829fe3c9513..2bbf8de3f91 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedMap.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedMap.go @@ -96,6 +96,9 @@ func (c *Client) addOperationMalformedMapMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedMap(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go index e14603695a1..02ee0b41919 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go @@ -98,6 +98,9 @@ func (c *Client) addOperationMalformedRequestBodyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedRequestBody(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedShort.go b/internal/protocoltest/awsrestjson/api_op_MalformedShort.go index 8d54abcfab3..9063d770675 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedShort.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedShort.go @@ -104,6 +104,9 @@ func (c *Client) addOperationMalformedShortMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedShortValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedString.go b/internal/protocoltest/awsrestjson/api_op_MalformedString.go index 2ab7a473322..11f903fc6bb 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedString.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedString.go @@ -98,6 +98,9 @@ func (c *Client) addOperationMalformedStringMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go index d8234acb619..4e35d579835 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampBodyDateTimeMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampBodyDateTimeValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go index f8b678ba7d7..d59d57531c6 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampBodyDefaultMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampBodyDefaultValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go index a1d77b388b1..6b733757169 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampBodyHttpDateMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampBodyHttpDateValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go index bd0c8484df0..799108a5822 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampHeaderDateTimeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampHeaderDateTimeValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go index 6145916dad8..dcba25ea47f 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampHeaderDefaultMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampHeaderDefaultValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go index 75b32085327..dee2cea62cb 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampHeaderEpochMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampHeaderEpochValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go index 1cdf3f7e459..2fb1c8cf846 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampPathDefaultMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampPathDefaultValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go index ca280701ce6..4a899ddaa9d 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampPathEpochMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampPathEpochValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go index 1abea020308..88952551992 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampPathHttpDateMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampPathHttpDateValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go index de4d502ce17..bb78ec93f26 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampQueryDefaultMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampQueryDefaultValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go index 4df3c6cf7cd..cc9bd33354a 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampQueryEpochMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampQueryEpochValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go index 16789d9c8c5..9ae26ab4ac7 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go @@ -99,6 +99,9 @@ func (c *Client) addOperationMalformedTimestampQueryHttpDateMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMalformedTimestampQueryHttpDateValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go b/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go index cd092438ac7..c52b8a8acf3 100644 --- a/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go +++ b/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go @@ -97,6 +97,9 @@ func (c *Client) addOperationMalformedUnionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedUnion(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader.go b/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader.go index 672ef9aebfa..7d56445df7f 100644 --- a/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader.go +++ b/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader.go @@ -103,6 +103,9 @@ func (c *Client) addOperationMediaTypeHeaderMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMediaTypeHeader(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput.go b/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput.go index 980fb4b6442..94ea092ab05 100644 --- a/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput.go +++ b/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput.go @@ -97,6 +97,9 @@ func (c *Client) addOperationNoInputAndNoOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndNoOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput.go b/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput.go index a0374dc9ca7..c4943733642 100644 --- a/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput.go +++ b/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput.go @@ -97,6 +97,9 @@ func (c *Client) addOperationNoInputAndOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient.go b/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient.go index 8616fc96126..1c896f2e4b4 100644 --- a/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient.go +++ b/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient.go @@ -107,6 +107,9 @@ func (c *Client) addOperationNullAndEmptyHeadersClientMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNullAndEmptyHeadersClient(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersServer.go b/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersServer.go index a3974ed2540..776a7381873 100644 --- a/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersServer.go +++ b/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersServer.go @@ -107,6 +107,9 @@ func (c *Client) addOperationNullAndEmptyHeadersServerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNullAndEmptyHeadersServer(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString.go b/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString.go index e911dd7c015..a158ce21108 100644 --- a/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString.go +++ b/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString.go @@ -99,6 +99,9 @@ func (c *Client) addOperationOmitsNullSerializesEmptyStringMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOmitsNullSerializesEmptyString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go b/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go index f7bddc66569..dc27080019e 100644 --- a/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go +++ b/internal/protocoltest/awsrestjson/api_op_OmitsSerializingEmptyLists.go @@ -112,6 +112,9 @@ func (c *Client) addOperationOmitsSerializingEmptyListsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOmitsSerializingEmptyLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_PostPlayerAction.go b/internal/protocoltest/awsrestjson/api_op_PostPlayerAction.go index 4362904d996..a8d3f3029ca 100644 --- a/internal/protocoltest/awsrestjson/api_op_PostPlayerAction.go +++ b/internal/protocoltest/awsrestjson/api_op_PostPlayerAction.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPostPlayerActionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPostPlayerAction(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName.go b/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName.go index 0220b16ae77..49b16161b4b 100644 --- a/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName.go +++ b/internal/protocoltest/awsrestjson/api_op_PostUnionWithJsonName.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPostUnionWithJsonNameMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPostUnionWithJsonName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go b/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go index eeafb794646..594bf69cd35 100644 --- a/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go +++ b/internal/protocoltest/awsrestjson/api_op_PutWithContentEncoding.go @@ -99,6 +99,12 @@ func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutWithContentEncodingRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill.go b/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill.go index 9dcfdcaa06b..40f3eeae699 100644 --- a/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill.go +++ b/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill.go @@ -97,6 +97,9 @@ func (c *Client) addOperationQueryIdempotencyTokenAutoFillMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opQueryIdempotencyTokenAutoFillMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap.go b/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap.go index 7b37fbf8371..fc1a18eb269 100644 --- a/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap.go +++ b/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap.go @@ -98,6 +98,9 @@ func (c *Client) addOperationQueryParamsAsStringListMapMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryParamsAsStringListMap(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_QueryPrecedence.go b/internal/protocoltest/awsrestjson/api_op_QueryPrecedence.go index 968fa6e8845..13407f6b3a4 100644 --- a/internal/protocoltest/awsrestjson/api_op_QueryPrecedence.go +++ b/internal/protocoltest/awsrestjson/api_op_QueryPrecedence.go @@ -98,6 +98,9 @@ func (c *Client) addOperationQueryPrecedenceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryPrecedence(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_RecursiveShapes.go b/internal/protocoltest/awsrestjson/api_op_RecursiveShapes.go index 62f78f52b2f..44cac798af4 100644 --- a/internal/protocoltest/awsrestjson/api_op_RecursiveShapes.go +++ b/internal/protocoltest/awsrestjson/api_op_RecursiveShapes.go @@ -100,6 +100,9 @@ func (c *Client) addOperationRecursiveShapesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRecursiveShapes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties.go b/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties.go index aaa1a9e3ea5..9abf9669f41 100644 --- a/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties.go +++ b/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties.go @@ -134,6 +134,9 @@ func (c *Client) addOperationSimpleScalarPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_SparseJsonLists.go b/internal/protocoltest/awsrestjson/api_op_SparseJsonLists.go index e21b99c7821..1cfc80e8ad0 100644 --- a/internal/protocoltest/awsrestjson/api_op_SparseJsonLists.go +++ b/internal/protocoltest/awsrestjson/api_op_SparseJsonLists.go @@ -98,6 +98,9 @@ func (c *Client) addOperationSparseJsonListsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSparseJsonLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_SparseJsonMaps.go b/internal/protocoltest/awsrestjson/api_op_SparseJsonMaps.go index 5a78e877360..86d22d2205f 100644 --- a/internal/protocoltest/awsrestjson/api_op_SparseJsonMaps.go +++ b/internal/protocoltest/awsrestjson/api_op_SparseJsonMaps.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSparseJsonMapsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSparseJsonMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraits.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraits.go index 1bde245fe38..1aab0f9b0cc 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraits.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraits.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStreamingTraitsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStreamingTraits(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength.go index 5ddd59727b1..908e739f0f8 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStreamingTraitsRequireLengthMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStreamingTraitsRequireLength(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType.go index 1894a36becb..da47c6be32b 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStreamingTraitsWithMediaTypeMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStreamingTraitsWithMediaType(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go b/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go index 84fe0b75bb1..563b1a01c34 100644 --- a/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go +++ b/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTestBodyStructureMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestBodyStructure(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_TestNoPayload.go b/internal/protocoltest/awsrestjson/api_op_TestNoPayload.go index c8764aadbdd..57a2f4b8fc5 100644 --- a/internal/protocoltest/awsrestjson/api_op_TestNoPayload.go +++ b/internal/protocoltest/awsrestjson/api_op_TestNoPayload.go @@ -103,6 +103,9 @@ func (c *Client) addOperationTestNoPayloadMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestNoPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go b/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go index bb7be0f243f..b3699e9c4fa 100644 --- a/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go +++ b/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTestPayloadBlobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestPayloadBlob(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go b/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go index dcd47f81afc..0c4f541a4a1 100644 --- a/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go +++ b/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTestPayloadStructureMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestPayloadStructure(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders.go b/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders.go index 31b9e4698e0..52debdd184a 100644 --- a/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders.go +++ b/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTimestampFormatHeadersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTimestampFormatHeaders(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput.go b/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput.go index 7902ffffd4a..9fca7bbb64b 100644 --- a/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput.go +++ b/internal/protocoltest/awsrestjson/api_op_UnitInputAndOutput.go @@ -95,6 +95,9 @@ func (c *Client) addOperationUnitInputAndOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnitInputAndOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_client.go b/internal/protocoltest/ec2query/api_client.go index ae5ec57080e..df31ecdf205 100644 --- a/internal/protocoltest/ec2query/api_client.go +++ b/internal/protocoltest/ec2query/api_client.go @@ -456,6 +456,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -517,6 +541,33 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/internal/protocoltest/ec2query/api_op_DatetimeOffsets.go b/internal/protocoltest/ec2query/api_op_DatetimeOffsets.go index e714ed9147b..783d371263f 100644 --- a/internal/protocoltest/ec2query/api_op_DatetimeOffsets.go +++ b/internal/protocoltest/ec2query/api_op_DatetimeOffsets.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDatetimeOffsetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDatetimeOffsets(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput.go b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput.go index 5b65b63ad31..12475fcc17e 100644 --- a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput.go +++ b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationEmptyInputAndEmptyOutputMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyInputAndEmptyOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_EndpointOperation.go b/internal/protocoltest/ec2query/api_op_EndpointOperation.go index 458ab3a14f5..d1a2ce57238 100644 --- a/internal/protocoltest/ec2query/api_op_EndpointOperation.go +++ b/internal/protocoltest/ec2query/api_op_EndpointOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEndpointOperationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation.go b/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation.go index 67f6c963611..7a74b335541 100644 --- a/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation.go +++ b/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelOperationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_FractionalSeconds.go b/internal/protocoltest/ec2query/api_op_FractionalSeconds.go index 0f3737ed2f8..ea2cb455acf 100644 --- a/internal/protocoltest/ec2query/api_op_FractionalSeconds.go +++ b/internal/protocoltest/ec2query/api_op_FractionalSeconds.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFractionalSeconds(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_GreetingWithErrors.go b/internal/protocoltest/ec2query/api_op_GreetingWithErrors.go index 0eb4a01e14e..25503916f94 100644 --- a/internal/protocoltest/ec2query/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/ec2query/api_op_GreetingWithErrors.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go b/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go index 63fa1e59142..d65a8ae4509 100644 --- a/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go +++ b/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName.go b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName.go index 7df45157e34..2d649c77978 100644 --- a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName.go +++ b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName.go @@ -99,6 +99,9 @@ func (c *Client) addOperationIgnoresWrappingXmlNameMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIgnoresWrappingXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_NestedStructures.go b/internal/protocoltest/ec2query/api_op_NestedStructures.go index 0d11ca16d29..daf0582d6ac 100644 --- a/internal/protocoltest/ec2query/api_op_NestedStructures.go +++ b/internal/protocoltest/ec2query/api_op_NestedStructures.go @@ -98,6 +98,9 @@ func (c *Client) addOperationNestedStructuresMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNestedStructures(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_NoInputAndOutput.go b/internal/protocoltest/ec2query/api_op_NoInputAndOutput.go index 3f3b6a9c975..0d718134ceb 100644 --- a/internal/protocoltest/ec2query/api_op_NoInputAndOutput.go +++ b/internal/protocoltest/ec2query/api_op_NoInputAndOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationNoInputAndOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go b/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go index 922bbbc5c10..425500dbc09 100644 --- a/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go +++ b/internal/protocoltest/ec2query/api_op_PutWithContentEncoding.go @@ -99,6 +99,12 @@ func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutWithContentEncodingRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill.go b/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill.go index 3e570691e02..a5bebc79815 100644 --- a/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill.go +++ b/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill.go @@ -97,6 +97,9 @@ func (c *Client) addOperationQueryIdempotencyTokenAutoFillMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opQueryIdempotencyTokenAutoFillMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_QueryLists.go b/internal/protocoltest/ec2query/api_op_QueryLists.go index 8cf0a3730a5..aa9cefc2464 100644 --- a/internal/protocoltest/ec2query/api_op_QueryLists.go +++ b/internal/protocoltest/ec2query/api_op_QueryLists.go @@ -106,6 +106,9 @@ func (c *Client) addOperationQueryListsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_QueryTimestamps.go b/internal/protocoltest/ec2query/api_op_QueryTimestamps.go index 760c69e1d12..26de96abf41 100644 --- a/internal/protocoltest/ec2query/api_op_QueryTimestamps.go +++ b/internal/protocoltest/ec2query/api_op_QueryTimestamps.go @@ -107,6 +107,9 @@ func (c *Client) addOperationQueryTimestampsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryTimestamps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes.go b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes.go index 727c7f2e076..c7a202e3de6 100644 --- a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes.go +++ b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes.go @@ -98,6 +98,9 @@ func (c *Client) addOperationRecursiveXmlShapesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRecursiveXmlShapes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_SimpleInputParams.go b/internal/protocoltest/ec2query/api_op_SimpleInputParams.go index c0764bb6874..558094bf894 100644 --- a/internal/protocoltest/ec2query/api_op_SimpleInputParams.go +++ b/internal/protocoltest/ec2query/api_op_SimpleInputParams.go @@ -118,6 +118,9 @@ func (c *Client) addOperationSimpleInputParamsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleInputParams(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties.go b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties.go index 158d66fe6a7..88ee106ba29 100644 --- a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties.go +++ b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSimpleScalarXmlPropertiesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarXmlProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlBlobs.go b/internal/protocoltest/ec2query/api_op_XmlBlobs.go index beefb5b4b7a..e642d3c5e4a 100644 --- a/internal/protocoltest/ec2query/api_op_XmlBlobs.go +++ b/internal/protocoltest/ec2query/api_op_XmlBlobs.go @@ -97,6 +97,9 @@ func (c *Client) addOperationXmlBlobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs.go b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs.go index 40495a88e00..0ee7ed6461f 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs.go @@ -96,6 +96,9 @@ func (c *Client) addOperationXmlEmptyBlobsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyLists.go b/internal/protocoltest/ec2query/api_op_XmlEmptyLists.go index 023c22fd150..01a281e9fe8 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyLists.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyLists.go @@ -125,6 +125,9 @@ func (c *Client) addOperationXmlEmptyListsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlEnums.go b/internal/protocoltest/ec2query/api_op_XmlEnums.go index 0776875d8f4..2241b9b6fb2 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEnums.go +++ b/internal/protocoltest/ec2query/api_op_XmlEnums.go @@ -108,6 +108,9 @@ func (c *Client) addOperationXmlEnumsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlIntEnums.go b/internal/protocoltest/ec2query/api_op_XmlIntEnums.go index 48799c6c92d..b677dd08ca6 100644 --- a/internal/protocoltest/ec2query/api_op_XmlIntEnums.go +++ b/internal/protocoltest/ec2query/api_op_XmlIntEnums.go @@ -109,6 +109,9 @@ func (c *Client) addOperationXmlIntEnumsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlIntEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlLists.go b/internal/protocoltest/ec2query/api_op_XmlLists.go index ff68dd7ca77..ebb1f7ca86a 100644 --- a/internal/protocoltest/ec2query/api_op_XmlLists.go +++ b/internal/protocoltest/ec2query/api_op_XmlLists.go @@ -136,6 +136,9 @@ func (c *Client) addOperationXmlListsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlNamespaces.go b/internal/protocoltest/ec2query/api_op_XmlNamespaces.go index 1a36c7b4167..e6d9a8506bf 100644 --- a/internal/protocoltest/ec2query/api_op_XmlNamespaces.go +++ b/internal/protocoltest/ec2query/api_op_XmlNamespaces.go @@ -97,6 +97,9 @@ func (c *Client) addOperationXmlNamespacesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlNamespaces(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/ec2query/api_op_XmlTimestamps.go b/internal/protocoltest/ec2query/api_op_XmlTimestamps.go index e7f7f291d05..2663aa7c445 100644 --- a/internal/protocoltest/ec2query/api_op_XmlTimestamps.go +++ b/internal/protocoltest/ec2query/api_op_XmlTimestamps.go @@ -111,6 +111,9 @@ func (c *Client) addOperationXmlTimestampsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlTimestamps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_client.go b/internal/protocoltest/jsonrpc/api_client.go index 8305e2e0726..92c8f4815f6 100644 --- a/internal/protocoltest/jsonrpc/api_client.go +++ b/internal/protocoltest/jsonrpc/api_client.go @@ -452,6 +452,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -506,6 +530,33 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets.go b/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets.go index d161fb82cfb..595447adf42 100644 --- a/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets.go +++ b/internal/protocoltest/jsonrpc/api_op_DatetimeOffsets.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDatetimeOffsetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDatetimeOffsets(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_EmptyOperation.go b/internal/protocoltest/jsonrpc/api_op_EmptyOperation.go index 4e4674ef24a..cde88cb91e4 100644 --- a/internal/protocoltest/jsonrpc/api_op_EmptyOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_EmptyOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEmptyOperationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_EndpointOperation.go b/internal/protocoltest/jsonrpc/api_op_EndpointOperation.go index 261a547485b..b3c718c528c 100644 --- a/internal/protocoltest/jsonrpc/api_op_EndpointOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_EndpointOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEndpointOperationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation.go b/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation.go index c8fe1c0ceed..6ee39a7b7d5 100644 --- a/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelOperationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go index 8eb423f6e89..f84f0ab9a21 100644 --- a/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go +++ b/internal/protocoltest/jsonrpc/api_op_FractionalSeconds.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFractionalSeconds(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors.go b/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors.go index b1a7b83a928..8464c836db3 100644 --- a/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go b/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go index be3dbecaf78..6fffa3f254a 100644 --- a/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_JsonEnums.go b/internal/protocoltest/jsonrpc/api_op_JsonEnums.go index e6f4fef7383..20740b63eb9 100644 --- a/internal/protocoltest/jsonrpc/api_op_JsonEnums.go +++ b/internal/protocoltest/jsonrpc/api_op_JsonEnums.go @@ -120,6 +120,9 @@ func (c *Client) addOperationJsonEnumsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_JsonUnions.go b/internal/protocoltest/jsonrpc/api_op_JsonUnions.go index 017c6e573bb..9911081e065 100644 --- a/internal/protocoltest/jsonrpc/api_op_JsonUnions.go +++ b/internal/protocoltest/jsonrpc/api_op_JsonUnions.go @@ -106,6 +106,9 @@ func (c *Client) addOperationJsonUnionsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonUnions(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation.go b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation.go index eaf1f2b42df..5ffc7e596a1 100644 --- a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation.go @@ -202,6 +202,9 @@ func (c *Client) addOperationKitchenSinkOperationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opKitchenSinkOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_NullOperation.go b/internal/protocoltest/jsonrpc/api_op_NullOperation.go index 264a6d8d044..f8a819a045f 100644 --- a/internal/protocoltest/jsonrpc/api_op_NullOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_NullOperation.go @@ -98,6 +98,9 @@ func (c *Client) addOperationNullOperationMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNullOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput.go b/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput.go index e7df8067ba6..895a51a518f 100644 --- a/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput.go +++ b/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationOperationWithOptionalInputOutputMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOperationWithOptionalInputOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments.go b/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments.go index f50def5f9a9..6ab9b27c793 100644 --- a/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments.go +++ b/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments.go @@ -100,6 +100,9 @@ func (c *Client) addOperationPutAndGetInlineDocumentsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAndGetInlineDocuments(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go b/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go index 5d67275f48b..7b0238fb8e9 100644 --- a/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go +++ b/internal/protocoltest/jsonrpc/api_op_PutWithContentEncoding.go @@ -99,6 +99,12 @@ func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutWithContentEncodingRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties.go b/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties.go index 7c2b6cb7dc8..397aa0f65e2 100644 --- a/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties.go +++ b/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties.go @@ -102,6 +102,9 @@ func (c *Client) addOperationSimpleScalarPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc/api_op_SparseNullsOperation.go b/internal/protocoltest/jsonrpc/api_op_SparseNullsOperation.go index 25c5497227d..297e38f6e43 100644 --- a/internal/protocoltest/jsonrpc/api_op_SparseNullsOperation.go +++ b/internal/protocoltest/jsonrpc/api_op_SparseNullsOperation.go @@ -102,6 +102,9 @@ func (c *Client) addOperationSparseNullsOperationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSparseNullsOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_client.go b/internal/protocoltest/jsonrpc10/api_client.go index 0d691d4d112..bfe46347394 100644 --- a/internal/protocoltest/jsonrpc10/api_client.go +++ b/internal/protocoltest/jsonrpc10/api_client.go @@ -452,6 +452,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -506,6 +530,33 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput.go b/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput.go index 5ba8176e16e..3c74ae81d71 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput.go +++ b/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationEmptyInputAndEmptyOutputMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyInputAndEmptyOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_EndpointOperation.go b/internal/protocoltest/jsonrpc10/api_op_EndpointOperation.go index 2abc661cb79..c919e20e4d7 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EndpointOperation.go +++ b/internal/protocoltest/jsonrpc10/api_op_EndpointOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEndpointOperationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation.go b/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation.go index cb5917bf104..05c2855da5c 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation.go +++ b/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelOperationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors.go b/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors.go index cd12c2053c5..c5c046ab6f5 100644 --- a/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go b/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go index 26c94c840a2..74fc9b43770 100644 --- a/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go +++ b/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_JsonUnions.go b/internal/protocoltest/jsonrpc10/api_op_JsonUnions.go index 9347c3c7cd7..b21f460ed1e 100644 --- a/internal/protocoltest/jsonrpc10/api_op_JsonUnions.go +++ b/internal/protocoltest/jsonrpc10/api_op_JsonUnions.go @@ -104,6 +104,9 @@ func (c *Client) addOperationJsonUnionsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opJsonUnions(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput.go b/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput.go index e6c2c748a09..8bddf37c89a 100644 --- a/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput.go +++ b/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput.go @@ -97,6 +97,9 @@ func (c *Client) addOperationNoInputAndNoOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndNoOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput.go b/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput.go index fb552c6f690..12946ca4e5e 100644 --- a/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput.go +++ b/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput.go @@ -97,6 +97,9 @@ func (c *Client) addOperationNoInputAndOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults.go b/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults.go index af269a51897..bb21e837ba2 100644 --- a/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults.go +++ b/internal/protocoltest/jsonrpc10/api_op_OperationWithDefaults.go @@ -161,6 +161,9 @@ func (c *Client) addOperationOperationWithDefaultsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOperationWithDefaults(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure.go b/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure.go index ae81ad88d28..08c68369429 100644 --- a/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure.go +++ b/internal/protocoltest/jsonrpc10/api_op_OperationWithNestedStructure.go @@ -107,6 +107,9 @@ func (c *Client) addOperationOperationWithNestedStructureMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpOperationWithNestedStructureValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers.go b/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers.go index c8a896fedcf..696a0674376 100644 --- a/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers.go +++ b/internal/protocoltest/jsonrpc10/api_op_OperationWithRequiredMembers.go @@ -132,6 +132,9 @@ func (c *Client) addOperationOperationWithRequiredMembersMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOperationWithRequiredMembers(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go b/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go index 84e7f868276..f419857df09 100644 --- a/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go +++ b/internal/protocoltest/jsonrpc10/api_op_PutWithContentEncoding.go @@ -99,6 +99,12 @@ func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutWithContentEncodingRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties.go b/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties.go index 8c4ed22f488..deb7d237795 100644 --- a/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties.go +++ b/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties.go @@ -102,6 +102,9 @@ func (c *Client) addOperationSimpleScalarPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_client.go b/internal/protocoltest/query/api_client.go index 62d8122e815..678abf1b21b 100644 --- a/internal/protocoltest/query/api_client.go +++ b/internal/protocoltest/query/api_client.go @@ -456,6 +456,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -517,6 +541,33 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/internal/protocoltest/query/api_op_DatetimeOffsets.go b/internal/protocoltest/query/api_op_DatetimeOffsets.go index 989737b6155..f917fcd0f4f 100644 --- a/internal/protocoltest/query/api_op_DatetimeOffsets.go +++ b/internal/protocoltest/query/api_op_DatetimeOffsets.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDatetimeOffsetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDatetimeOffsets(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput.go b/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput.go index b23fae8c4fb..4c6e6019961 100644 --- a/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput.go +++ b/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationEmptyInputAndEmptyOutputMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyInputAndEmptyOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_EndpointOperation.go b/internal/protocoltest/query/api_op_EndpointOperation.go index 7022cb0f0a6..c76d15b4b3f 100644 --- a/internal/protocoltest/query/api_op_EndpointOperation.go +++ b/internal/protocoltest/query/api_op_EndpointOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEndpointOperationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation.go b/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation.go index cf81dcee0bb..5ca49c4f32a 100644 --- a/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation.go +++ b/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelOperationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMap.go b/internal/protocoltest/query/api_op_FlattenedXmlMap.go index 62f9304eb1e..9f62a1c6804 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMap.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMap.go @@ -98,6 +98,9 @@ func (c *Client) addOperationFlattenedXmlMapMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFlattenedXmlMap(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName.go b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName.go index 607e12bb814..0f1260c057d 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFlattenedXmlMapWithXmlNameMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFlattenedXmlMapWithXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace.go b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace.go index 05d46a12413..2bd3cbd609c 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFlattenedXmlMapWithXmlNamespaceMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFlattenedXmlMapWithXmlNamespace(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_FractionalSeconds.go b/internal/protocoltest/query/api_op_FractionalSeconds.go index 293194eb6db..833c12d91c0 100644 --- a/internal/protocoltest/query/api_op_FractionalSeconds.go +++ b/internal/protocoltest/query/api_op_FractionalSeconds.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFractionalSeconds(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_GreetingWithErrors.go b/internal/protocoltest/query/api_op_GreetingWithErrors.go index 2c048c0ca91..761977446bc 100644 --- a/internal/protocoltest/query/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/query/api_op_GreetingWithErrors.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_HostWithPathOperation.go b/internal/protocoltest/query/api_op_HostWithPathOperation.go index ed86ce487fc..ef36e654e5e 100644 --- a/internal/protocoltest/query/api_op_HostWithPathOperation.go +++ b/internal/protocoltest/query/api_op_HostWithPathOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_IgnoresWrappingXmlName.go b/internal/protocoltest/query/api_op_IgnoresWrappingXmlName.go index c655ed5476a..974f9e0e934 100644 --- a/internal/protocoltest/query/api_op_IgnoresWrappingXmlName.go +++ b/internal/protocoltest/query/api_op_IgnoresWrappingXmlName.go @@ -100,6 +100,9 @@ func (c *Client) addOperationIgnoresWrappingXmlNameMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIgnoresWrappingXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_NestedStructures.go b/internal/protocoltest/query/api_op_NestedStructures.go index 9e4ad131502..2ae71fb3974 100644 --- a/internal/protocoltest/query/api_op_NestedStructures.go +++ b/internal/protocoltest/query/api_op_NestedStructures.go @@ -98,6 +98,9 @@ func (c *Client) addOperationNestedStructuresMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNestedStructures(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_NoInputAndNoOutput.go b/internal/protocoltest/query/api_op_NoInputAndNoOutput.go index 4386cbfc553..3fba5220838 100644 --- a/internal/protocoltest/query/api_op_NoInputAndNoOutput.go +++ b/internal/protocoltest/query/api_op_NoInputAndNoOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationNoInputAndNoOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndNoOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_NoInputAndOutput.go b/internal/protocoltest/query/api_op_NoInputAndOutput.go index 09a9d5e52f7..e7b44128b41 100644 --- a/internal/protocoltest/query/api_op_NoInputAndOutput.go +++ b/internal/protocoltest/query/api_op_NoInputAndOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationNoInputAndOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_PutWithContentEncoding.go b/internal/protocoltest/query/api_op_PutWithContentEncoding.go index c5d99c9603d..bfa13631dae 100644 --- a/internal/protocoltest/query/api_op_PutWithContentEncoding.go +++ b/internal/protocoltest/query/api_op_PutWithContentEncoding.go @@ -99,6 +99,12 @@ func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutWithContentEncodingRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill.go b/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill.go index 7d8b68a8377..ec9ed8047bf 100644 --- a/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill.go +++ b/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill.go @@ -97,6 +97,9 @@ func (c *Client) addOperationQueryIdempotencyTokenAutoFillMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opQueryIdempotencyTokenAutoFillMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_QueryLists.go b/internal/protocoltest/query/api_op_QueryLists.go index 9353cd506e3..bbf55992abb 100644 --- a/internal/protocoltest/query/api_op_QueryLists.go +++ b/internal/protocoltest/query/api_op_QueryLists.go @@ -108,6 +108,9 @@ func (c *Client) addOperationQueryListsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_QueryMaps.go b/internal/protocoltest/query/api_op_QueryMaps.go index 45ea533ca42..7fd50b29a06 100644 --- a/internal/protocoltest/query/api_op_QueryMaps.go +++ b/internal/protocoltest/query/api_op_QueryMaps.go @@ -112,6 +112,9 @@ func (c *Client) addOperationQueryMapsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_QueryTimestamps.go b/internal/protocoltest/query/api_op_QueryTimestamps.go index 9f588bbe3bd..cb4fa30be3d 100644 --- a/internal/protocoltest/query/api_op_QueryTimestamps.go +++ b/internal/protocoltest/query/api_op_QueryTimestamps.go @@ -107,6 +107,9 @@ func (c *Client) addOperationQueryTimestampsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryTimestamps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_RecursiveXmlShapes.go b/internal/protocoltest/query/api_op_RecursiveXmlShapes.go index 2b960f43970..33e8f8f5dc9 100644 --- a/internal/protocoltest/query/api_op_RecursiveXmlShapes.go +++ b/internal/protocoltest/query/api_op_RecursiveXmlShapes.go @@ -98,6 +98,9 @@ func (c *Client) addOperationRecursiveXmlShapesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRecursiveXmlShapes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_SimpleInputParams.go b/internal/protocoltest/query/api_op_SimpleInputParams.go index faad2341edc..1a5222c61dc 100644 --- a/internal/protocoltest/query/api_op_SimpleInputParams.go +++ b/internal/protocoltest/query/api_op_SimpleInputParams.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSimpleInputParamsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleInputParams(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_SimpleScalarXmlProperties.go b/internal/protocoltest/query/api_op_SimpleScalarXmlProperties.go index 37a7f5c75f0..8cb85d2c7c7 100644 --- a/internal/protocoltest/query/api_op_SimpleScalarXmlProperties.go +++ b/internal/protocoltest/query/api_op_SimpleScalarXmlProperties.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSimpleScalarXmlPropertiesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarXmlProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlBlobs.go b/internal/protocoltest/query/api_op_XmlBlobs.go index e23019855b7..152a1782c77 100644 --- a/internal/protocoltest/query/api_op_XmlBlobs.go +++ b/internal/protocoltest/query/api_op_XmlBlobs.go @@ -97,6 +97,9 @@ func (c *Client) addOperationXmlBlobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlEmptyBlobs.go b/internal/protocoltest/query/api_op_XmlEmptyBlobs.go index 79cafcabefb..0b1259d1799 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyBlobs.go +++ b/internal/protocoltest/query/api_op_XmlEmptyBlobs.go @@ -96,6 +96,9 @@ func (c *Client) addOperationXmlEmptyBlobsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlEmptyLists.go b/internal/protocoltest/query/api_op_XmlEmptyLists.go index 1a607082dd3..d8125c1cccc 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyLists.go +++ b/internal/protocoltest/query/api_op_XmlEmptyLists.go @@ -125,6 +125,9 @@ func (c *Client) addOperationXmlEmptyListsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlEmptyMaps.go b/internal/protocoltest/query/api_op_XmlEmptyMaps.go index 2313cfe1962..4e632a0aa41 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyMaps.go +++ b/internal/protocoltest/query/api_op_XmlEmptyMaps.go @@ -97,6 +97,9 @@ func (c *Client) addOperationXmlEmptyMapsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlEnums.go b/internal/protocoltest/query/api_op_XmlEnums.go index 693c1f65d5b..0d45d0f4d09 100644 --- a/internal/protocoltest/query/api_op_XmlEnums.go +++ b/internal/protocoltest/query/api_op_XmlEnums.go @@ -108,6 +108,9 @@ func (c *Client) addOperationXmlEnumsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlIntEnums.go b/internal/protocoltest/query/api_op_XmlIntEnums.go index 3c9267bcb36..ea6e969eab6 100644 --- a/internal/protocoltest/query/api_op_XmlIntEnums.go +++ b/internal/protocoltest/query/api_op_XmlIntEnums.go @@ -108,6 +108,9 @@ func (c *Client) addOperationXmlIntEnumsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlIntEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlLists.go b/internal/protocoltest/query/api_op_XmlLists.go index 2265c342172..1cb1b429730 100644 --- a/internal/protocoltest/query/api_op_XmlLists.go +++ b/internal/protocoltest/query/api_op_XmlLists.go @@ -135,6 +135,9 @@ func (c *Client) addOperationXmlListsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlMaps.go b/internal/protocoltest/query/api_op_XmlMaps.go index abfce8c806e..4007d4336a8 100644 --- a/internal/protocoltest/query/api_op_XmlMaps.go +++ b/internal/protocoltest/query/api_op_XmlMaps.go @@ -98,6 +98,9 @@ func (c *Client) addOperationXmlMapsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlMapsXmlName.go b/internal/protocoltest/query/api_op_XmlMapsXmlName.go index e7aaa27e11f..1dff2daeb61 100644 --- a/internal/protocoltest/query/api_op_XmlMapsXmlName.go +++ b/internal/protocoltest/query/api_op_XmlMapsXmlName.go @@ -97,6 +97,9 @@ func (c *Client) addOperationXmlMapsXmlNameMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlMapsXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlNamespaces.go b/internal/protocoltest/query/api_op_XmlNamespaces.go index 469795783b1..2c53b50a879 100644 --- a/internal/protocoltest/query/api_op_XmlNamespaces.go +++ b/internal/protocoltest/query/api_op_XmlNamespaces.go @@ -97,6 +97,9 @@ func (c *Client) addOperationXmlNamespacesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlNamespaces(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/query/api_op_XmlTimestamps.go b/internal/protocoltest/query/api_op_XmlTimestamps.go index 5e06fd495c6..54a5e0acc62 100644 --- a/internal/protocoltest/query/api_op_XmlTimestamps.go +++ b/internal/protocoltest/query/api_op_XmlTimestamps.go @@ -111,6 +111,9 @@ func (c *Client) addOperationXmlTimestampsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlTimestamps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_client.go b/internal/protocoltest/restxml/api_client.go index a26818ea362..7ae801e51e4 100644 --- a/internal/protocoltest/restxml/api_client.go +++ b/internal/protocoltest/restxml/api_client.go @@ -456,6 +456,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -517,6 +541,33 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/internal/protocoltest/restxml/api_op_AllQueryStringTypes.go b/internal/protocoltest/restxml/api_op_AllQueryStringTypes.go index 7727b9af112..960c7e69cb3 100644 --- a/internal/protocoltest/restxml/api_op_AllQueryStringTypes.go +++ b/internal/protocoltest/restxml/api_op_AllQueryStringTypes.go @@ -139,6 +139,9 @@ func (c *Client) addOperationAllQueryStringTypesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllQueryStringTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_BodyWithXmlName.go b/internal/protocoltest/restxml/api_op_BodyWithXmlName.go index 330e6da7407..1561b3ba289 100644 --- a/internal/protocoltest/restxml/api_op_BodyWithXmlName.go +++ b/internal/protocoltest/restxml/api_op_BodyWithXmlName.go @@ -101,6 +101,9 @@ func (c *Client) addOperationBodyWithXmlNameMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBodyWithXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString.go b/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString.go index f3235c755c5..b741a6d20c3 100644 --- a/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString.go +++ b/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString.go @@ -101,6 +101,9 @@ func (c *Client) addOperationConstantAndVariableQueryStringMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConstantAndVariableQueryString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_ConstantQueryString.go b/internal/protocoltest/restxml/api_op_ConstantQueryString.go index fc6c39a0376..4d5e828f331 100644 --- a/internal/protocoltest/restxml/api_op_ConstantQueryString.go +++ b/internal/protocoltest/restxml/api_op_ConstantQueryString.go @@ -102,6 +102,9 @@ func (c *Client) addOperationConstantQueryStringMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConstantQueryStringValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_DatetimeOffsets.go b/internal/protocoltest/restxml/api_op_DatetimeOffsets.go index e0affe879be..51f251946ff 100644 --- a/internal/protocoltest/restxml/api_op_DatetimeOffsets.go +++ b/internal/protocoltest/restxml/api_op_DatetimeOffsets.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDatetimeOffsetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDatetimeOffsets(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput.go b/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput.go index 5975e1d53bb..710b4913ed1 100644 --- a/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput.go +++ b/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput.go @@ -98,6 +98,9 @@ func (c *Client) addOperationEmptyInputAndEmptyOutputMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyInputAndEmptyOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_EndpointOperation.go b/internal/protocoltest/restxml/api_op_EndpointOperation.go index 59baf1b4212..c524a5912ce 100644 --- a/internal/protocoltest/restxml/api_op_EndpointOperation.go +++ b/internal/protocoltest/restxml/api_op_EndpointOperation.go @@ -94,6 +94,9 @@ func (c *Client) addOperationEndpointOperationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation.go b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation.go index eab52310dcb..72b7a62d387 100644 --- a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation.go +++ b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelHeaderOperationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelHeaderOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation.go b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation.go index 2e8df21ca25..7fa082d80ad 100644 --- a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation.go +++ b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation.go @@ -100,6 +100,9 @@ func (c *Client) addOperationEndpointWithHostLabelOperationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEndpointWithHostLabelOperationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMap.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMap.go index 6cd8c58c8f7..efc59fde032 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMap.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMap.go @@ -100,6 +100,9 @@ func (c *Client) addOperationFlattenedXmlMapMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFlattenedXmlMap(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName.go index 483ba8f6c39..894675fc8b5 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName.go @@ -99,6 +99,9 @@ func (c *Client) addOperationFlattenedXmlMapWithXmlNameMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFlattenedXmlMapWithXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace.go index 7af54cfe1a3..d68425edef2 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFlattenedXmlMapWithXmlNamespaceMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFlattenedXmlMapWithXmlNamespace(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_FractionalSeconds.go b/internal/protocoltest/restxml/api_op_FractionalSeconds.go index c5e7649cefd..e812df93e46 100644 --- a/internal/protocoltest/restxml/api_op_FractionalSeconds.go +++ b/internal/protocoltest/restxml/api_op_FractionalSeconds.go @@ -97,6 +97,9 @@ func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFractionalSeconds(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_GreetingWithErrors.go b/internal/protocoltest/restxml/api_op_GreetingWithErrors.go index 4d0c12b7c11..6622549c94d 100644 --- a/internal/protocoltest/restxml/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/restxml/api_op_GreetingWithErrors.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpEnumPayload.go b/internal/protocoltest/restxml/api_op_HttpEnumPayload.go index 2457d7b6046..fac87c53573 100644 --- a/internal/protocoltest/restxml/api_op_HttpEnumPayload.go +++ b/internal/protocoltest/restxml/api_op_HttpEnumPayload.go @@ -99,6 +99,9 @@ func (c *Client) addOperationHttpEnumPayloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpEnumPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadTraits.go b/internal/protocoltest/restxml/api_op_HttpPayloadTraits.go index c2e6b58be82..128f7166724 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadTraits.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadTraits.go @@ -106,6 +106,9 @@ func (c *Client) addOperationHttpPayloadTraitsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadTraits(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType.go b/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType.go index c7adc7f784b..07b72f0d36d 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType.go @@ -108,6 +108,9 @@ func (c *Client) addOperationHttpPayloadTraitsWithMediaTypeMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadTraitsWithMediaType(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName.go index e2452139177..09de74ff87a 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName.go @@ -101,6 +101,9 @@ func (c *Client) addOperationHttpPayloadWithMemberXmlNameMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithMemberXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure.go index 0341791fc74..3b71259b80d 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure.go @@ -103,6 +103,9 @@ func (c *Client) addOperationHttpPayloadWithStructureMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithStructure(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion.go index 67ea61ec9dd..26b990dcf1c 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithUnion.go @@ -100,6 +100,9 @@ func (c *Client) addOperationHttpPayloadWithUnionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithUnion(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName.go index 616d02d9211..87cf692e889 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName.go @@ -101,6 +101,9 @@ func (c *Client) addOperationHttpPayloadWithXmlNameMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace.go index 715a3c6bcbe..d34f66a2f47 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace.go @@ -100,6 +100,9 @@ func (c *Client) addOperationHttpPayloadWithXmlNamespaceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithXmlNamespace(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix.go index e450632db57..b3017fedfe9 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix.go @@ -100,6 +100,9 @@ func (c *Client) addOperationHttpPayloadWithXmlNamespaceAndPrefixMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPayloadWithXmlNamespaceAndPrefix(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpPrefixHeaders.go b/internal/protocoltest/restxml/api_op_HttpPrefixHeaders.go index 408baab33be..4a2f72a0db0 100644 --- a/internal/protocoltest/restxml/api_op_HttpPrefixHeaders.go +++ b/internal/protocoltest/restxml/api_op_HttpPrefixHeaders.go @@ -104,6 +104,9 @@ func (c *Client) addOperationHttpPrefixHeadersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpPrefixHeaders(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels.go b/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels.go index e4ee87989ad..e1955a41965 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels.go @@ -101,6 +101,9 @@ func (c *Client) addOperationHttpRequestWithFloatLabelsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithFloatLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath.go b/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath.go index 9a0b836f79e..8a0b3a3206c 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath.go @@ -101,6 +101,9 @@ func (c *Client) addOperationHttpRequestWithGreedyLabelInPathMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithGreedyLabelInPathValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithLabels.go b/internal/protocoltest/restxml/api_op_HttpRequestWithLabels.go index 626d143cf5e..cd8547a14be 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithLabels.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithLabels.go @@ -127,6 +127,9 @@ func (c *Client) addOperationHttpRequestWithLabelsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat.go b/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat.go index d6ec7d2cb2b..99804dd4ee7 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat.go @@ -119,6 +119,9 @@ func (c *Client) addOperationHttpRequestWithLabelsAndTimestampFormatMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpHttpRequestWithLabelsAndTimestampFormatValidationMiddleware(stack); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpResponseCode.go b/internal/protocoltest/restxml/api_op_HttpResponseCode.go index 5bde319da25..513ba607cde 100644 --- a/internal/protocoltest/restxml/api_op_HttpResponseCode.go +++ b/internal/protocoltest/restxml/api_op_HttpResponseCode.go @@ -96,6 +96,9 @@ func (c *Client) addOperationHttpResponseCodeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpResponseCode(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_HttpStringPayload.go b/internal/protocoltest/restxml/api_op_HttpStringPayload.go index 52646a00e02..f37c85b53ad 100644 --- a/internal/protocoltest/restxml/api_op_HttpStringPayload.go +++ b/internal/protocoltest/restxml/api_op_HttpStringPayload.go @@ -98,6 +98,9 @@ func (c *Client) addOperationHttpStringPayloadMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpStringPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse.go b/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse.go index b8b37fc4bce..94178e8a308 100644 --- a/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse.go +++ b/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse.go @@ -99,6 +99,9 @@ func (c *Client) addOperationIgnoreQueryParamsInResponseMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIgnoreQueryParamsInResponse(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders.go b/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders.go index 6d0da90f278..50ead3e5fa2 100644 --- a/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders.go +++ b/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders.go @@ -162,6 +162,9 @@ func (c *Client) addOperationInputAndOutputWithHeadersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInputAndOutputWithHeaders(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_NestedXmlMaps.go b/internal/protocoltest/restxml/api_op_NestedXmlMaps.go index 485e087c98e..8af0a357c7b 100644 --- a/internal/protocoltest/restxml/api_op_NestedXmlMaps.go +++ b/internal/protocoltest/restxml/api_op_NestedXmlMaps.go @@ -103,6 +103,9 @@ func (c *Client) addOperationNestedXmlMapsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNestedXmlMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_NoInputAndNoOutput.go b/internal/protocoltest/restxml/api_op_NoInputAndNoOutput.go index 7ceb5ac9c70..94a69df484e 100644 --- a/internal/protocoltest/restxml/api_op_NoInputAndNoOutput.go +++ b/internal/protocoltest/restxml/api_op_NoInputAndNoOutput.go @@ -97,6 +97,9 @@ func (c *Client) addOperationNoInputAndNoOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndNoOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_NoInputAndOutput.go b/internal/protocoltest/restxml/api_op_NoInputAndOutput.go index 29d43d09661..772b8fa761c 100644 --- a/internal/protocoltest/restxml/api_op_NoInputAndOutput.go +++ b/internal/protocoltest/restxml/api_op_NoInputAndOutput.go @@ -97,6 +97,9 @@ func (c *Client) addOperationNoInputAndOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputAndOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient.go b/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient.go index 39ad490114f..1e357adf5a3 100644 --- a/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient.go +++ b/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient.go @@ -107,6 +107,9 @@ func (c *Client) addOperationNullAndEmptyHeadersClientMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNullAndEmptyHeadersClient(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersServer.go b/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersServer.go index f58a8f698d3..2447e2df0a2 100644 --- a/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersServer.go +++ b/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersServer.go @@ -107,6 +107,9 @@ func (c *Client) addOperationNullAndEmptyHeadersServerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNullAndEmptyHeadersServer(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString.go b/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString.go index d017f13246e..587f58411d1 100644 --- a/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString.go +++ b/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString.go @@ -99,6 +99,9 @@ func (c *Client) addOperationOmitsNullSerializesEmptyStringMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOmitsNullSerializesEmptyString(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go b/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go index fc432a776db..5eb9086a025 100644 --- a/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go +++ b/internal/protocoltest/restxml/api_op_PutWithContentEncoding.go @@ -99,6 +99,12 @@ func (c *Client) addOperationPutWithContentEncodingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutWithContentEncodingRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill.go b/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill.go index 968f0e9faca..56f298717a9 100644 --- a/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill.go +++ b/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill.go @@ -97,6 +97,9 @@ func (c *Client) addOperationQueryIdempotencyTokenAutoFillMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opQueryIdempotencyTokenAutoFillMiddleware(stack, options); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap.go b/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap.go index ee03fa05746..93e79e579c8 100644 --- a/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap.go +++ b/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap.go @@ -98,6 +98,9 @@ func (c *Client) addOperationQueryParamsAsStringListMapMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryParamsAsStringListMap(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_QueryPrecedence.go b/internal/protocoltest/restxml/api_op_QueryPrecedence.go index 49c65034478..a292edbff6d 100644 --- a/internal/protocoltest/restxml/api_op_QueryPrecedence.go +++ b/internal/protocoltest/restxml/api_op_QueryPrecedence.go @@ -98,6 +98,9 @@ func (c *Client) addOperationQueryPrecedenceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryPrecedence(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_RecursiveShapes.go b/internal/protocoltest/restxml/api_op_RecursiveShapes.go index d15a4fb0d3c..d9bae592b7b 100644 --- a/internal/protocoltest/restxml/api_op_RecursiveShapes.go +++ b/internal/protocoltest/restxml/api_op_RecursiveShapes.go @@ -100,6 +100,9 @@ func (c *Client) addOperationRecursiveShapesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRecursiveShapes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_SimpleScalarProperties.go b/internal/protocoltest/restxml/api_op_SimpleScalarProperties.go index 3c03bd7c9c8..043ebcb6c0f 100644 --- a/internal/protocoltest/restxml/api_op_SimpleScalarProperties.go +++ b/internal/protocoltest/restxml/api_op_SimpleScalarProperties.go @@ -134,6 +134,9 @@ func (c *Client) addOperationSimpleScalarPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_TimestampFormatHeaders.go b/internal/protocoltest/restxml/api_op_TimestampFormatHeaders.go index dc82633074a..aeb95cdbd01 100644 --- a/internal/protocoltest/restxml/api_op_TimestampFormatHeaders.go +++ b/internal/protocoltest/restxml/api_op_TimestampFormatHeaders.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTimestampFormatHeadersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTimestampFormatHeaders(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlAttributes.go b/internal/protocoltest/restxml/api_op_XmlAttributes.go index 5d422d896f4..fc54b2e5b9d 100644 --- a/internal/protocoltest/restxml/api_op_XmlAttributes.go +++ b/internal/protocoltest/restxml/api_op_XmlAttributes.go @@ -103,6 +103,9 @@ func (c *Client) addOperationXmlAttributesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload.go b/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload.go index c9f1f4fa352..1a9a5955aed 100644 --- a/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload.go +++ b/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload.go @@ -100,6 +100,9 @@ func (c *Client) addOperationXmlAttributesOnPayloadMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlAttributesOnPayload(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlBlobs.go b/internal/protocoltest/restxml/api_op_XmlBlobs.go index 3966cea4559..8a3abe8edf7 100644 --- a/internal/protocoltest/restxml/api_op_XmlBlobs.go +++ b/internal/protocoltest/restxml/api_op_XmlBlobs.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlBlobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyBlobs.go b/internal/protocoltest/restxml/api_op_XmlEmptyBlobs.go index b3d940b3c9e..10e4e1639f9 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyBlobs.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyBlobs.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlEmptyBlobsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyBlobs(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyLists.go b/internal/protocoltest/restxml/api_op_XmlEmptyLists.go index 006bb7f81e4..d5cf2f8c533 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyLists.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyLists.go @@ -158,6 +158,9 @@ func (c *Client) addOperationXmlEmptyListsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyMaps.go b/internal/protocoltest/restxml/api_op_XmlEmptyMaps.go index f41be792629..64eed2641ab 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyMaps.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyMaps.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlEmptyMapsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyStrings.go b/internal/protocoltest/restxml/api_op_XmlEmptyStrings.go index 5b2c942965b..a80ec8beb72 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyStrings.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyStrings.go @@ -98,6 +98,9 @@ func (c *Client) addOperationXmlEmptyStringsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEmptyStrings(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlEnums.go b/internal/protocoltest/restxml/api_op_XmlEnums.go index ffe9a21831e..e9923ba2a98 100644 --- a/internal/protocoltest/restxml/api_op_XmlEnums.go +++ b/internal/protocoltest/restxml/api_op_XmlEnums.go @@ -120,6 +120,9 @@ func (c *Client) addOperationXmlEnumsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlIntEnums.go b/internal/protocoltest/restxml/api_op_XmlIntEnums.go index 9a98dbcf87d..808830cb7c0 100644 --- a/internal/protocoltest/restxml/api_op_XmlIntEnums.go +++ b/internal/protocoltest/restxml/api_op_XmlIntEnums.go @@ -120,6 +120,9 @@ func (c *Client) addOperationXmlIntEnumsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlIntEnums(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlLists.go b/internal/protocoltest/restxml/api_op_XmlLists.go index 55594e4b9bc..c75fabe8c4f 100644 --- a/internal/protocoltest/restxml/api_op_XmlLists.go +++ b/internal/protocoltest/restxml/api_op_XmlLists.go @@ -170,6 +170,9 @@ func (c *Client) addOperationXmlListsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace.go b/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace.go index eff66662efe..acd5250d763 100644 --- a/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace.go +++ b/internal/protocoltest/restxml/api_op_XmlMapWithXmlNamespace.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlMapWithXmlNamespaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlMapWithXmlNamespace(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlMaps.go b/internal/protocoltest/restxml/api_op_XmlMaps.go index 3a9c34273c6..05e18523be1 100644 --- a/internal/protocoltest/restxml/api_op_XmlMaps.go +++ b/internal/protocoltest/restxml/api_op_XmlMaps.go @@ -100,6 +100,9 @@ func (c *Client) addOperationXmlMapsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlMapsXmlName.go b/internal/protocoltest/restxml/api_op_XmlMapsXmlName.go index e47dbaaac0d..d7fbd19dac5 100644 --- a/internal/protocoltest/restxml/api_op_XmlMapsXmlName.go +++ b/internal/protocoltest/restxml/api_op_XmlMapsXmlName.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlMapsXmlNameMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlMapsXmlName(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlNamespaces.go b/internal/protocoltest/restxml/api_op_XmlNamespaces.go index ab8a960fb6b..d0a1616c04a 100644 --- a/internal/protocoltest/restxml/api_op_XmlNamespaces.go +++ b/internal/protocoltest/restxml/api_op_XmlNamespaces.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlNamespacesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlNamespaces(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlTimestamps.go b/internal/protocoltest/restxml/api_op_XmlTimestamps.go index 6463b609ebe..d3a955152e4 100644 --- a/internal/protocoltest/restxml/api_op_XmlTimestamps.go +++ b/internal/protocoltest/restxml/api_op_XmlTimestamps.go @@ -125,6 +125,9 @@ func (c *Client) addOperationXmlTimestampsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlTimestamps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxml/api_op_XmlUnions.go b/internal/protocoltest/restxml/api_op_XmlUnions.go index aa003f84a0c..fc998b45f58 100644 --- a/internal/protocoltest/restxml/api_op_XmlUnions.go +++ b/internal/protocoltest/restxml/api_op_XmlUnions.go @@ -99,6 +99,9 @@ func (c *Client) addOperationXmlUnionsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opXmlUnions(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/restxmlwithnamespace/api_client.go b/internal/protocoltest/restxmlwithnamespace/api_client.go index 57d2c127ee7..f075c16a9d4 100644 --- a/internal/protocoltest/restxmlwithnamespace/api_client.go +++ b/internal/protocoltest/restxmlwithnamespace/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -504,6 +528,21 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties.go b/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties.go index 94c0a90bef4..54ac00f67c8 100644 --- a/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties.go +++ b/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties.go @@ -139,6 +139,9 @@ func (c *Client) addOperationSimpleScalarPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_client.go b/internal/protocoltest/smithyrpcv2cbor/api_client.go index 13e76adf7bf..ddeffab8162 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_client.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_client.go @@ -402,6 +402,30 @@ func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -456,6 +480,21 @@ func initializeTimeOffsetResolver(c *Client) { c.timeOffset = new(atomic.Int64) } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_EmptyInputOutput.go b/internal/protocoltest/smithyrpcv2cbor/api_op_EmptyInputOutput.go index 13be2e1e67f..3a04b161b9a 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_EmptyInputOutput.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_EmptyInputOutput.go @@ -91,6 +91,9 @@ func (c *Client) addOperationEmptyInputOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEmptyInputOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_Float16.go b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16.go new file mode 100644 index 00000000000..3afcbdb675d --- /dev/null +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package smithyrpcv2cbor + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) Float16(ctx context.Context, params *Float16Input, optFns ...func(*Options)) (*Float16Output, error) { + if params == nil { + params = &Float16Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "Float16", params, optFns, c.addOperationFloat16Middlewares) + if err != nil { + return nil, err + } + + out := result.(*Float16Output) + out.ResultMetadata = metadata + return out, nil +} + +type Float16Input struct { + noSmithyDocumentSerde +} + +type Float16Output struct { + Value *float64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationFloat16Middlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&smithyRpcv2cbor_serializeOpFloat16{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&smithyRpcv2cbor_deserializeOpFloat16{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Float16"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFloat16(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opFloat16(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Float16", + } +} diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_Float16_test.go b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16_test.go new file mode 100644 index 00000000000..034137cb622 --- /dev/null +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16_test.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package smithyrpcv2cbor + +import ( + "bytes" + "context" + "encoding/base64" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytesting "github.com/aws/smithy-go/testing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io/ioutil" + "math" + "net/http" + "testing" +) + +func TestClient_Float16_smithyRpcv2cborDeserialize(t *testing.T) { + cases := map[string]struct { + StatusCode int + Header http.Header + BodyMediaType string + Body []byte + ExpectResult *Float16Output + }{ + // Ensures that clients can correctly parse float16 +Inf. + "RpcV2CborFloat16Inf": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfl8AA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.Inf(1)), + }, + }, + // Ensures that clients can correctly parse float16 -Inf. + "RpcV2CborFloat16NegInf": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfn8AA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.Inf(-1)), + }, + }, + // Ensures that clients can correctly parse float16 NaN with high LSB. + "RpcV2CborFloat16LSBNaN": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfl8AQ==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.NaN()), + }, + }, + // Ensures that clients can correctly parse float16 NaN with high MSB. + "RpcV2CborFloat16MSBNaN": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfl+AA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.NaN()), + }, + }, + // Ensures that clients can correctly parse a subnormal float16. + "RpcV2CborFloat16Subnormal": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1ZfkAUA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(4.76837158203125e-6), + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + serverURL := "http://localhost:8888/" + client := New(Options{ + HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { + headers := http.Header{} + for k, vs := range c.Header { + for _, v := range vs { + headers.Add(k, v) + } + } + if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 { + headers.Set("Content-Type", c.BodyMediaType) + } + response := &http.Response{ + StatusCode: c.StatusCode, + Header: headers, + Request: r, + } + if len(c.Body) != 0 { + response.ContentLength = int64(len(c.Body)) + response.Body = ioutil.NopCloser(bytes.NewReader(c.Body)) + } else { + + response.Body = http.NoBody + } + return response, nil + }), + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + Region: "us-west-2", + }) + var params Float16Input + result, err := client.Float16(context.Background(), ¶ms) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { + t.Errorf("expect c.ExpectResult value match:\n%v", err) + } + }) + } +} diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_FractionalSeconds.go b/internal/protocoltest/smithyrpcv2cbor/api_op_FractionalSeconds.go index 4abf6b78388..f19a0e7fe2c 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_FractionalSeconds.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_FractionalSeconds.go @@ -94,6 +94,9 @@ func (c *Client) addOperationFractionalSecondsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFractionalSeconds(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_GreetingWithErrors.go b/internal/protocoltest/smithyrpcv2cbor/api_op_GreetingWithErrors.go index 917e4b11a9d..353c35f64bd 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_GreetingWithErrors.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_GreetingWithErrors.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGreetingWithErrorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGreetingWithErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_NoInputOutput.go b/internal/protocoltest/smithyrpcv2cbor/api_op_NoInputOutput.go index 2be29a13b95..08799a25d5a 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_NoInputOutput.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_NoInputOutput.go @@ -91,6 +91,9 @@ func (c *Client) addOperationNoInputOutputMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opNoInputOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults.go b/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults.go index 1ca952da579..17e302dfcaa 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults.go @@ -147,6 +147,9 @@ func (c *Client) addOperationOperationWithDefaultsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOperationWithDefaults(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_OptionalInputOutput.go b/internal/protocoltest/smithyrpcv2cbor/api_op_OptionalInputOutput.go index 2f7311bbf29..d26fdccd6e3 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_OptionalInputOutput.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_OptionalInputOutput.go @@ -95,6 +95,9 @@ func (c *Client) addOperationOptionalInputOutputMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOptionalInputOutput(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_RecursiveShapes.go b/internal/protocoltest/smithyrpcv2cbor/api_op_RecursiveShapes.go index aac413dca5a..6b685470d69 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_RecursiveShapes.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_RecursiveShapes.go @@ -96,6 +96,9 @@ func (c *Client) addOperationRecursiveShapesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRecursiveShapes(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps.go b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps.go index 2f398326170..492cfcf2223 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRpcV2CborDenseMapsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRpcV2CborDenseMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborLists.go b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborLists.go index c0b7d370de6..012b9eba290 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborLists.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborLists.go @@ -142,6 +142,9 @@ func (c *Client) addOperationRpcV2CborListsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRpcV2CborLists(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborSparseMaps.go b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborSparseMaps.go index 12e53827489..c1939aca997 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborSparseMaps.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborSparseMaps.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRpcV2CborSparseMapsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRpcV2CborSparseMaps(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties.go b/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties.go index 6173b85b763..8de522114ec 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties.go @@ -131,6 +131,9 @@ func (c *Client) addOperationSimpleScalarPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSimpleScalarProperties(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_SparseNullsOperation.go b/internal/protocoltest/smithyrpcv2cbor/api_op_SparseNullsOperation.go index 4615f4f4a49..10dbe127f31 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_SparseNullsOperation.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_SparseNullsOperation.go @@ -99,6 +99,9 @@ func (c *Client) addOperationSparseNullsOperationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSparseNullsOperation(options.Region), middleware.Before); err != nil { return err } diff --git a/internal/protocoltest/smithyrpcv2cbor/deserializers.go b/internal/protocoltest/smithyrpcv2cbor/deserializers.go index c65c9ce65b5..ed5eac107d3 100644 --- a/internal/protocoltest/smithyrpcv2cbor/deserializers.go +++ b/internal/protocoltest/smithyrpcv2cbor/deserializers.go @@ -69,6 +69,65 @@ func (m *smithyRpcv2cbor_deserializeOpEmptyInputOutput) HandleDeserialize(ctx co return out, metadata, nil } +type smithyRpcv2cbor_deserializeOpFloat16 struct { +} + +func (*smithyRpcv2cbor_deserializeOpFloat16) ID() string { + return "OperationDeserializer" +} + +func (m *smithyRpcv2cbor_deserializeOpFloat16) 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 + } + + resp, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse) + } + + if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf( + "unexpected smithy-protocol response header '%s' (HTTP status: %s)", + resp.Header.Get("smithy-protocol"), + resp.Status, + ), + } + } + + if resp.StatusCode != 200 { + return out, metadata, rpc2_deserializeOpErrorFloat16(resp) + } + + payload, err := io.ReadAll(resp.Body) + if err != nil { + return out, metadata, err + } + + if len(payload) == 0 { + out.Result = &Float16Output{} + return out, metadata, nil + } + + cv, err := smithycbor.Decode(payload) + if err != nil { + return out, metadata, err + } + + output, err := deserializeCBOR_Float16Output(cv) + if err != nil { + return out, metadata, err + } + + out.Result = output + + return out, metadata, nil +} + type smithyRpcv2cbor_deserializeOpFractionalSeconds struct { } @@ -836,6 +895,28 @@ func deserializeCBOR_ValidationExceptionFieldList(v smithycbor.Value) ([]types.V return dl, nil } +func deserializeCBOR_Float16Output(v smithycbor.Value) (*Float16Output, error) { + av, ok := v.(smithycbor.Map) + if !ok { + return nil, fmt.Errorf("unexpected value type %T", v) + } + ds := &Float16Output{} + for key, sv := range av { + _, _ = key, sv + if key == "value" { + if _, ok := sv.(*smithycbor.Nil); ok { + continue + } + dv, err := deserializeCBOR_Float64(sv) + if err != nil { + return nil, err + } + ds.Value = ptr.Float64(dv) + } + } + return ds, nil +} + func deserializeCBOR_FractionalSecondsOutput(v smithycbor.Value) (*FractionalSecondsOutput, error) { av, ok := v.(smithycbor.Map) if !ok { @@ -2242,6 +2323,33 @@ func rpc2_deserializeOpErrorEmptyInputOutput(resp *smithyhttp.Response) error { } } +func rpc2_deserializeOpErrorFloat16(resp *smithyhttp.Response) error { + payload, err := io.ReadAll(resp.Body) + if err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)} + } + + typ, msg, v, err := getProtocolErrorInfo(payload) + if err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)} + } + + if len(typ) == 0 { + typ = "UnknownError" + } + if len(msg) == 0 { + msg = "UnknownError" + } + + _ = v + switch string(typ) { + + default: + + return &smithy.GenericAPIError{Code: typ, Message: msg} + } +} + func rpc2_deserializeOpErrorFractionalSeconds(resp *smithyhttp.Response) error { payload, err := io.ReadAll(resp.Body) if err != nil { diff --git a/internal/protocoltest/smithyrpcv2cbor/generated.json b/internal/protocoltest/smithyrpcv2cbor/generated.json index 8d3aa7281c9..d6ea27cf2fb 100644 --- a/internal/protocoltest/smithyrpcv2cbor/generated.json +++ b/internal/protocoltest/smithyrpcv2cbor/generated.json @@ -10,6 +10,8 @@ "api_client_test.go", "api_op_EmptyInputOutput.go", "api_op_EmptyInputOutput_test.go", + "api_op_Float16.go", + "api_op_Float16_test.go", "api_op_FractionalSeconds.go", "api_op_FractionalSeconds_test.go", "api_op_GreetingWithErrors.go", diff --git a/internal/protocoltest/smithyrpcv2cbor/serializers.go b/internal/protocoltest/smithyrpcv2cbor/serializers.go index 9838a283191..045e4ba39ca 100644 --- a/internal/protocoltest/smithyrpcv2cbor/serializers.go +++ b/internal/protocoltest/smithyrpcv2cbor/serializers.go @@ -58,6 +58,36 @@ func (m *smithyRpcv2cbor_serializeOpEmptyInputOutput) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type smithyRpcv2cbor_serializeOpFloat16 struct { +} + +func (*smithyRpcv2cbor_serializeOpFloat16) ID() string { + return "OperationSerializer" +} + +func (m *smithyRpcv2cbor_serializeOpFloat16) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*Float16Input) + if !ok { + return out, metadata, fmt.Errorf("unexpected input type %T", in.Parameters) + } + _ = input + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + req.Method = http.MethodPost + req.URL.Path = "/service/RpcV2Protocol/operation/Float16" + req.Header.Set("smithy-protocol", "rpc-v2-cbor") + + req.Header.Set("Accept", "application/cbor") + + return next.HandleSerialize(ctx, in) +} + type smithyRpcv2cbor_serializeOpFractionalSeconds struct { } @@ -552,6 +582,12 @@ func serializeCBOR_EmptyInputOutputInput(v *EmptyInputOutputInput) (smithycbor.V return vm, nil } +func serializeCBOR_Float16Input(v *Float16Input) (smithycbor.Value, error) { + vm := smithycbor.Map{} + + return vm, nil +} + func serializeCBOR_FractionalSecondsInput(v *FractionalSecondsInput) (smithycbor.Value, error) { vm := smithycbor.Map{} diff --git a/internal/protocoltest/smithyrpcv2cbor/snapshot/api_op_Float16.go.snap b/internal/protocoltest/smithyrpcv2cbor/snapshot/api_op_Float16.go.snap new file mode 100644 index 00000000000..0a4737d6f27 --- /dev/null +++ b/internal/protocoltest/smithyrpcv2cbor/snapshot/api_op_Float16.go.snap @@ -0,0 +1,34 @@ +Float16 + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go b/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go index 1a1b47bfe57..b9b25ec2973 100644 --- a/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go +++ b/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go @@ -74,6 +74,18 @@ func TestCheckSnapshot_EmptyInputOutput(t *testing.T) { } } +func TestCheckSnapshot_Float16(t *testing.T) { + svc := New(Options{}) + _, err := svc.Float16(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "Float16") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_FractionalSeconds(t *testing.T) { svc := New(Options{}) _, err := svc.FractionalSeconds(context.Background(), nil, func(o *Options) { @@ -217,6 +229,18 @@ func TestUpdateSnapshot_EmptyInputOutput(t *testing.T) { } } +func TestUpdateSnapshot_Float16(t *testing.T) { + svc := New(Options{}) + _, err := svc.Float16(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "Float16") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_FractionalSeconds(t *testing.T) { svc := New(Options{}) _, err := svc.FractionalSeconds(context.Background(), nil, func(o *Options) { diff --git a/service/accessanalyzer/api_client.go b/service/accessanalyzer/api_client.go index a4f771d94a8..898dd046771 100644 --- a/service/accessanalyzer/api_client.go +++ b/service/accessanalyzer/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/accessanalyzer/api_op_ApplyArchiveRule.go b/service/accessanalyzer/api_op_ApplyArchiveRule.go index a69524fde3b..aaec0ba0fdd 100644 --- a/service/accessanalyzer/api_op_ApplyArchiveRule.go +++ b/service/accessanalyzer/api_op_ApplyArchiveRule.go @@ -111,6 +111,9 @@ func (c *Client) addOperationApplyArchiveRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opApplyArchiveRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CancelPolicyGeneration.go b/service/accessanalyzer/api_op_CancelPolicyGeneration.go index cc6901728a2..b529a6c76ad 100644 --- a/service/accessanalyzer/api_op_CancelPolicyGeneration.go +++ b/service/accessanalyzer/api_op_CancelPolicyGeneration.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCancelPolicyGenerationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelPolicyGenerationValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CheckAccessNotGranted.go b/service/accessanalyzer/api_op_CheckAccessNotGranted.go index e4eade0d6ba..da170738cd7 100644 --- a/service/accessanalyzer/api_op_CheckAccessNotGranted.go +++ b/service/accessanalyzer/api_op_CheckAccessNotGranted.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCheckAccessNotGrantedMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckAccessNotGrantedValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CheckNoNewAccess.go b/service/accessanalyzer/api_op_CheckNoNewAccess.go index 411b3150f38..b7e03305922 100644 --- a/service/accessanalyzer/api_op_CheckNoNewAccess.go +++ b/service/accessanalyzer/api_op_CheckNoNewAccess.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCheckNoNewAccessMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckNoNewAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CheckNoPublicAccess.go b/service/accessanalyzer/api_op_CheckNoPublicAccess.go index 2f973dd2aed..017742a06f8 100644 --- a/service/accessanalyzer/api_op_CheckNoPublicAccess.go +++ b/service/accessanalyzer/api_op_CheckNoPublicAccess.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCheckNoPublicAccessMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckNoPublicAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CreateAccessPreview.go b/service/accessanalyzer/api_op_CreateAccessPreview.go index c618f7de58b..3cce1b2da77 100644 --- a/service/accessanalyzer/api_op_CreateAccessPreview.go +++ b/service/accessanalyzer/api_op_CreateAccessPreview.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateAccessPreviewMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessPreviewMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CreateAnalyzer.go b/service/accessanalyzer/api_op_CreateAnalyzer.go index 672dd99e7e0..0691af295ec 100644 --- a/service/accessanalyzer/api_op_CreateAnalyzer.go +++ b/service/accessanalyzer/api_op_CreateAnalyzer.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateAnalyzerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAnalyzerMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_CreateArchiveRule.go b/service/accessanalyzer/api_op_CreateArchiveRule.go index e5cd2914eb6..71b62c37a0d 100644 --- a/service/accessanalyzer/api_op_CreateArchiveRule.go +++ b/service/accessanalyzer/api_op_CreateArchiveRule.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateArchiveRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateArchiveRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_DeleteAnalyzer.go b/service/accessanalyzer/api_op_DeleteAnalyzer.go index 68bababa8d3..f567c92ba2c 100644 --- a/service/accessanalyzer/api_op_DeleteAnalyzer.go +++ b/service/accessanalyzer/api_op_DeleteAnalyzer.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAnalyzerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAnalyzerMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_DeleteArchiveRule.go b/service/accessanalyzer/api_op_DeleteArchiveRule.go index 4058f7e3530..81bd94198ff 100644 --- a/service/accessanalyzer/api_op_DeleteArchiveRule.go +++ b/service/accessanalyzer/api_op_DeleteArchiveRule.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteArchiveRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteArchiveRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GenerateFindingRecommendation.go b/service/accessanalyzer/api_op_GenerateFindingRecommendation.go index 1a5d91fd320..7db60b82f81 100644 --- a/service/accessanalyzer/api_op_GenerateFindingRecommendation.go +++ b/service/accessanalyzer/api_op_GenerateFindingRecommendation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGenerateFindingRecommendationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateFindingRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GetAccessPreview.go b/service/accessanalyzer/api_op_GetAccessPreview.go index 9227eee99aa..71a79ee293d 100644 --- a/service/accessanalyzer/api_op_GetAccessPreview.go +++ b/service/accessanalyzer/api_op_GetAccessPreview.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetAccessPreviewMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessPreviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GetAnalyzedResource.go b/service/accessanalyzer/api_op_GetAnalyzedResource.go index f5d0f16d9ff..983a6bd17bb 100644 --- a/service/accessanalyzer/api_op_GetAnalyzedResource.go +++ b/service/accessanalyzer/api_op_GetAnalyzedResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetAnalyzedResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAnalyzedResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GetAnalyzer.go b/service/accessanalyzer/api_op_GetAnalyzer.go index 9ae1e3be1b7..1ea87b40f2f 100644 --- a/service/accessanalyzer/api_op_GetAnalyzer.go +++ b/service/accessanalyzer/api_op_GetAnalyzer.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetAnalyzerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAnalyzerValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GetArchiveRule.go b/service/accessanalyzer/api_op_GetArchiveRule.go index edf522902bb..85fcfc83f69 100644 --- a/service/accessanalyzer/api_op_GetArchiveRule.go +++ b/service/accessanalyzer/api_op_GetArchiveRule.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetArchiveRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GetFinding.go b/service/accessanalyzer/api_op_GetFinding.go index 558d3b87a8f..ff7abd29ddb 100644 --- a/service/accessanalyzer/api_op_GetFinding.go +++ b/service/accessanalyzer/api_op_GetFinding.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetFindingMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_GetFindingRecommendation.go b/service/accessanalyzer/api_op_GetFindingRecommendation.go index ea5ef00a541..d1621522940 100644 --- a/service/accessanalyzer/api_op_GetFindingRecommendation.go +++ b/service/accessanalyzer/api_op_GetFindingRecommendation.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetFindingRecommendationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingRecommendationValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationGetFindingRecommendationMiddlewares(stack *middlewa return nil } -// GetFindingRecommendationAPIClient is a client that implements the -// GetFindingRecommendation operation. -type GetFindingRecommendationAPIClient interface { - GetFindingRecommendation(context.Context, *GetFindingRecommendationInput, ...func(*Options)) (*GetFindingRecommendationOutput, error) -} - -var _ GetFindingRecommendationAPIClient = (*Client)(nil) - // GetFindingRecommendationPaginatorOptions is the paginator options for // GetFindingRecommendation type GetFindingRecommendationPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *GetFindingRecommendationPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFindingRecommendation(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *GetFindingRecommendationPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetFindingRecommendationAPIClient is a client that implements the +// GetFindingRecommendation operation. +type GetFindingRecommendationAPIClient interface { + GetFindingRecommendation(context.Context, *GetFindingRecommendationInput, ...func(*Options)) (*GetFindingRecommendationOutput, error) +} + +var _ GetFindingRecommendationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFindingRecommendation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_GetFindingV2.go b/service/accessanalyzer/api_op_GetFindingV2.go index 0952a3a9b08..7096219ad8d 100644 --- a/service/accessanalyzer/api_op_GetFindingV2.go +++ b/service/accessanalyzer/api_op_GetFindingV2.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetFindingV2Middlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingV2ValidationMiddleware(stack); err != nil { return err } @@ -200,13 +203,6 @@ func (c *Client) addOperationGetFindingV2Middlewares(stack *middleware.Stack, op return nil } -// GetFindingV2APIClient is a client that implements the GetFindingV2 operation. -type GetFindingV2APIClient interface { - GetFindingV2(context.Context, *GetFindingV2Input, ...func(*Options)) (*GetFindingV2Output, error) -} - -var _ GetFindingV2APIClient = (*Client)(nil) - // GetFindingV2PaginatorOptions is the paginator options for GetFindingV2 type GetFindingV2PaginatorOptions struct { // The maximum number of results to return in the response. @@ -270,6 +266,9 @@ func (p *GetFindingV2Paginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFindingV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -289,6 +288,13 @@ func (p *GetFindingV2Paginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetFindingV2APIClient is a client that implements the GetFindingV2 operation. +type GetFindingV2APIClient interface { + GetFindingV2(context.Context, *GetFindingV2Input, ...func(*Options)) (*GetFindingV2Output, error) +} + +var _ GetFindingV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFindingV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_GetGeneratedPolicy.go b/service/accessanalyzer/api_op_GetGeneratedPolicy.go index 7ea59d30421..2ec80333809 100644 --- a/service/accessanalyzer/api_op_GetGeneratedPolicy.go +++ b/service/accessanalyzer/api_op_GetGeneratedPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetGeneratedPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGeneratedPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_ListAccessPreviewFindings.go b/service/accessanalyzer/api_op_ListAccessPreviewFindings.go index 1e5ca186c80..bba119c2c97 100644 --- a/service/accessanalyzer/api_op_ListAccessPreviewFindings.go +++ b/service/accessanalyzer/api_op_ListAccessPreviewFindings.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListAccessPreviewFindingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessPreviewFindingsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListAccessPreviewFindingsMiddlewares(stack *middlew return nil } -// ListAccessPreviewFindingsAPIClient is a client that implements the -// ListAccessPreviewFindings operation. -type ListAccessPreviewFindingsAPIClient interface { - ListAccessPreviewFindings(context.Context, *ListAccessPreviewFindingsInput, ...func(*Options)) (*ListAccessPreviewFindingsOutput, error) -} - -var _ ListAccessPreviewFindingsAPIClient = (*Client)(nil) - // ListAccessPreviewFindingsPaginatorOptions is the paginator options for // ListAccessPreviewFindings type ListAccessPreviewFindingsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAccessPreviewFindingsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPreviewFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAccessPreviewFindingsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAccessPreviewFindingsAPIClient is a client that implements the +// ListAccessPreviewFindings operation. +type ListAccessPreviewFindingsAPIClient interface { + ListAccessPreviewFindings(context.Context, *ListAccessPreviewFindingsInput, ...func(*Options)) (*ListAccessPreviewFindingsOutput, error) +} + +var _ ListAccessPreviewFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPreviewFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListAccessPreviews.go b/service/accessanalyzer/api_op_ListAccessPreviews.go index 0e95ef5c148..e480d55eb35 100644 --- a/service/accessanalyzer/api_op_ListAccessPreviews.go +++ b/service/accessanalyzer/api_op_ListAccessPreviews.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAccessPreviewsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessPreviewsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAccessPreviewsMiddlewares(stack *middleware.Sta return nil } -// ListAccessPreviewsAPIClient is a client that implements the ListAccessPreviews -// operation. -type ListAccessPreviewsAPIClient interface { - ListAccessPreviews(context.Context, *ListAccessPreviewsInput, ...func(*Options)) (*ListAccessPreviewsOutput, error) -} - -var _ ListAccessPreviewsAPIClient = (*Client)(nil) - // ListAccessPreviewsPaginatorOptions is the paginator options for // ListAccessPreviews type ListAccessPreviewsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAccessPreviewsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPreviews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAccessPreviewsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAccessPreviewsAPIClient is a client that implements the ListAccessPreviews +// operation. +type ListAccessPreviewsAPIClient interface { + ListAccessPreviews(context.Context, *ListAccessPreviewsInput, ...func(*Options)) (*ListAccessPreviewsOutput, error) +} + +var _ ListAccessPreviewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPreviews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListAnalyzedResources.go b/service/accessanalyzer/api_op_ListAnalyzedResources.go index c1388abc972..c3df8508ade 100644 --- a/service/accessanalyzer/api_op_ListAnalyzedResources.go +++ b/service/accessanalyzer/api_op_ListAnalyzedResources.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAnalyzedResourcesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnalyzedResourcesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListAnalyzedResourcesMiddlewares(stack *middleware. return nil } -// ListAnalyzedResourcesAPIClient is a client that implements the -// ListAnalyzedResources operation. -type ListAnalyzedResourcesAPIClient interface { - ListAnalyzedResources(context.Context, *ListAnalyzedResourcesInput, ...func(*Options)) (*ListAnalyzedResourcesOutput, error) -} - -var _ ListAnalyzedResourcesAPIClient = (*Client)(nil) - // ListAnalyzedResourcesPaginatorOptions is the paginator options for // ListAnalyzedResources type ListAnalyzedResourcesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListAnalyzedResourcesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnalyzedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListAnalyzedResourcesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAnalyzedResourcesAPIClient is a client that implements the +// ListAnalyzedResources operation. +type ListAnalyzedResourcesAPIClient interface { + ListAnalyzedResources(context.Context, *ListAnalyzedResourcesInput, ...func(*Options)) (*ListAnalyzedResourcesOutput, error) +} + +var _ ListAnalyzedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnalyzedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListAnalyzers.go b/service/accessanalyzer/api_op_ListAnalyzers.go index 81baf603703..1097c566b22 100644 --- a/service/accessanalyzer/api_op_ListAnalyzers.go +++ b/service/accessanalyzer/api_op_ListAnalyzers.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAnalyzersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnalyzers(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListAnalyzersMiddlewares(stack *middleware.Stack, o return nil } -// ListAnalyzersAPIClient is a client that implements the ListAnalyzers operation. -type ListAnalyzersAPIClient interface { - ListAnalyzers(context.Context, *ListAnalyzersInput, ...func(*Options)) (*ListAnalyzersOutput, error) -} - -var _ ListAnalyzersAPIClient = (*Client)(nil) - // ListAnalyzersPaginatorOptions is the paginator options for ListAnalyzers type ListAnalyzersPaginatorOptions struct { // The maximum number of results to return in the response. @@ -208,6 +204,9 @@ func (p *ListAnalyzersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnalyzers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListAnalyzersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListAnalyzersAPIClient is a client that implements the ListAnalyzers operation. +type ListAnalyzersAPIClient interface { + ListAnalyzers(context.Context, *ListAnalyzersInput, ...func(*Options)) (*ListAnalyzersOutput, error) +} + +var _ ListAnalyzersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnalyzers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListArchiveRules.go b/service/accessanalyzer/api_op_ListArchiveRules.go index d3b1fa7bb85..41831e1fa34 100644 --- a/service/accessanalyzer/api_op_ListArchiveRules.go +++ b/service/accessanalyzer/api_op_ListArchiveRules.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListArchiveRulesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListArchiveRulesValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListArchiveRulesMiddlewares(stack *middleware.Stack return nil } -// ListArchiveRulesAPIClient is a client that implements the ListArchiveRules -// operation. -type ListArchiveRulesAPIClient interface { - ListArchiveRules(context.Context, *ListArchiveRulesInput, ...func(*Options)) (*ListArchiveRulesOutput, error) -} - -var _ ListArchiveRulesAPIClient = (*Client)(nil) - // ListArchiveRulesPaginatorOptions is the paginator options for ListArchiveRules type ListArchiveRulesPaginatorOptions struct { // The maximum number of results to return in the request. @@ -214,6 +209,9 @@ func (p *ListArchiveRulesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListArchiveRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListArchiveRulesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListArchiveRulesAPIClient is a client that implements the ListArchiveRules +// operation. +type ListArchiveRulesAPIClient interface { + ListArchiveRules(context.Context, *ListArchiveRulesInput, ...func(*Options)) (*ListArchiveRulesOutput, error) +} + +var _ ListArchiveRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListArchiveRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListFindings.go b/service/accessanalyzer/api_op_ListFindings.go index 2c38ba2386b..2696a301e3c 100644 --- a/service/accessanalyzer/api_op_ListFindings.go +++ b/service/accessanalyzer/api_op_ListFindings.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsValidationMiddleware(stack); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op return nil } -// ListFindingsAPIClient is a client that implements the ListFindings operation. -type ListFindingsAPIClient interface { - ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) -} - -var _ ListFindingsAPIClient = (*Client)(nil) - // ListFindingsPaginatorOptions is the paginator options for ListFindings type ListFindingsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -230,6 +226,9 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListFindingsAPIClient is a client that implements the ListFindings operation. +type ListFindingsAPIClient interface { + ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) +} + +var _ ListFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListFindingsV2.go b/service/accessanalyzer/api_op_ListFindingsV2.go index 8f451f01e1c..31af950aa95 100644 --- a/service/accessanalyzer/api_op_ListFindingsV2.go +++ b/service/accessanalyzer/api_op_ListFindingsV2.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListFindingsV2Middlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsV2ValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListFindingsV2Middlewares(stack *middleware.Stack, return nil } -// ListFindingsV2APIClient is a client that implements the ListFindingsV2 -// operation. -type ListFindingsV2APIClient interface { - ListFindingsV2(context.Context, *ListFindingsV2Input, ...func(*Options)) (*ListFindingsV2Output, error) -} - -var _ ListFindingsV2APIClient = (*Client)(nil) - // ListFindingsV2PaginatorOptions is the paginator options for ListFindingsV2 type ListFindingsV2PaginatorOptions struct { // The maximum number of results to return in the response. @@ -229,6 +224,9 @@ func (p *ListFindingsV2Paginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindingsV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListFindingsV2Paginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListFindingsV2APIClient is a client that implements the ListFindingsV2 +// operation. +type ListFindingsV2APIClient interface { + ListFindingsV2(context.Context, *ListFindingsV2Input, ...func(*Options)) (*ListFindingsV2Output, error) +} + +var _ ListFindingsV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindingsV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListPolicyGenerations.go b/service/accessanalyzer/api_op_ListPolicyGenerations.go index 325bdce4839..ed58e012a51 100644 --- a/service/accessanalyzer/api_op_ListPolicyGenerations.go +++ b/service/accessanalyzer/api_op_ListPolicyGenerations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListPolicyGenerationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyGenerations(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListPolicyGenerationsMiddlewares(stack *middleware. return nil } -// ListPolicyGenerationsAPIClient is a client that implements the -// ListPolicyGenerations operation. -type ListPolicyGenerationsAPIClient interface { - ListPolicyGenerations(context.Context, *ListPolicyGenerationsInput, ...func(*Options)) (*ListPolicyGenerationsOutput, error) -} - -var _ ListPolicyGenerationsAPIClient = (*Client)(nil) - // ListPolicyGenerationsPaginatorOptions is the paginator options for // ListPolicyGenerations type ListPolicyGenerationsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListPolicyGenerationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyGenerations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListPolicyGenerationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPolicyGenerationsAPIClient is a client that implements the +// ListPolicyGenerations operation. +type ListPolicyGenerationsAPIClient interface { + ListPolicyGenerations(context.Context, *ListPolicyGenerationsInput, ...func(*Options)) (*ListPolicyGenerationsOutput, error) +} + +var _ ListPolicyGenerationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyGenerations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/accessanalyzer/api_op_ListTagsForResource.go b/service/accessanalyzer/api_op_ListTagsForResource.go index 87d3624b069..88f6b88476b 100644 --- a/service/accessanalyzer/api_op_ListTagsForResource.go +++ b/service/accessanalyzer/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_StartPolicyGeneration.go b/service/accessanalyzer/api_op_StartPolicyGeneration.go index fbc23960056..29750ccefa0 100644 --- a/service/accessanalyzer/api_op_StartPolicyGeneration.go +++ b/service/accessanalyzer/api_op_StartPolicyGeneration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationStartPolicyGenerationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartPolicyGenerationMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_StartResourceScan.go b/service/accessanalyzer/api_op_StartResourceScan.go index 46b9d6c4259..d85f2f1936e 100644 --- a/service/accessanalyzer/api_op_StartResourceScan.go +++ b/service/accessanalyzer/api_op_StartResourceScan.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartResourceScanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartResourceScanValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_TagResource.go b/service/accessanalyzer/api_op_TagResource.go index 2f502965933..1ead1c49938 100644 --- a/service/accessanalyzer/api_op_TagResource.go +++ b/service/accessanalyzer/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_UntagResource.go b/service/accessanalyzer/api_op_UntagResource.go index 90dd78354fa..38c6cab7c79 100644 --- a/service/accessanalyzer/api_op_UntagResource.go +++ b/service/accessanalyzer/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/accessanalyzer/api_op_UpdateArchiveRule.go b/service/accessanalyzer/api_op_UpdateArchiveRule.go index 8c51f98f550..7885700bf05 100644 --- a/service/accessanalyzer/api_op_UpdateArchiveRule.go +++ b/service/accessanalyzer/api_op_UpdateArchiveRule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateArchiveRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateArchiveRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_UpdateFindings.go b/service/accessanalyzer/api_op_UpdateFindings.go index a6a54304b90..147ded810db 100644 --- a/service/accessanalyzer/api_op_UpdateFindings.go +++ b/service/accessanalyzer/api_op_UpdateFindings.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateFindingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFindingsMiddleware(stack, options); err != nil { return err } diff --git a/service/accessanalyzer/api_op_ValidatePolicy.go b/service/accessanalyzer/api_op_ValidatePolicy.go index 9da615f323d..7b0ff6c8daf 100644 --- a/service/accessanalyzer/api_op_ValidatePolicy.go +++ b/service/accessanalyzer/api_op_ValidatePolicy.go @@ -151,6 +151,9 @@ func (c *Client) addOperationValidatePolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidatePolicyValidationMiddleware(stack); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationValidatePolicyMiddlewares(stack *middleware.Stack, return nil } -// ValidatePolicyAPIClient is a client that implements the ValidatePolicy -// operation. -type ValidatePolicyAPIClient interface { - ValidatePolicy(context.Context, *ValidatePolicyInput, ...func(*Options)) (*ValidatePolicyOutput, error) -} - -var _ ValidatePolicyAPIClient = (*Client)(nil) - // ValidatePolicyPaginatorOptions is the paginator options for ValidatePolicy type ValidatePolicyPaginatorOptions struct { // The maximum number of results to return in the response. @@ -246,6 +241,9 @@ func (p *ValidatePolicyPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ValidatePolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ValidatePolicyPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ValidatePolicyAPIClient is a client that implements the ValidatePolicy +// operation. +type ValidatePolicyAPIClient interface { + ValidatePolicy(context.Context, *ValidatePolicyInput, ...func(*Options)) (*ValidatePolicyOutput, error) +} + +var _ ValidatePolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opValidatePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/account/api_client.go b/service/account/api_client.go index b3e3e44e5f0..cb2ef5ef656 100644 --- a/service/account/api_client.go +++ b/service/account/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/account/api_op_AcceptPrimaryEmailUpdate.go b/service/account/api_op_AcceptPrimaryEmailUpdate.go index d1d6fba8f9b..91cd45d8cb5 100644 --- a/service/account/api_op_AcceptPrimaryEmailUpdate.go +++ b/service/account/api_op_AcceptPrimaryEmailUpdate.go @@ -134,6 +134,9 @@ func (c *Client) addOperationAcceptPrimaryEmailUpdateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptPrimaryEmailUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_DeleteAlternateContact.go b/service/account/api_op_DeleteAlternateContact.go index e42a130c1ba..600cd0a1ecc 100644 --- a/service/account/api_op_DeleteAlternateContact.go +++ b/service/account/api_op_DeleteAlternateContact.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDeleteAlternateContactMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAlternateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_DisableRegion.go b/service/account/api_op_DisableRegion.go index 6c22af4f54c..756b4c150a3 100644 --- a/service/account/api_op_DisableRegion.go +++ b/service/account/api_op_DisableRegion.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDisableRegionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableRegionValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_EnableRegion.go b/service/account/api_op_EnableRegion.go index b91b9d1209a..c7bdc029d5c 100644 --- a/service/account/api_op_EnableRegion.go +++ b/service/account/api_op_EnableRegion.go @@ -128,6 +128,9 @@ func (c *Client) addOperationEnableRegionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableRegionValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_GetAlternateContact.go b/service/account/api_op_GetAlternateContact.go index 0ed372e00ad..a95cf1bed0e 100644 --- a/service/account/api_op_GetAlternateContact.go +++ b/service/account/api_op_GetAlternateContact.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetAlternateContactMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAlternateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_GetContactInformation.go b/service/account/api_op_GetContactInformation.go index dc3117e7359..c492b326de7 100644 --- a/service/account/api_op_GetContactInformation.go +++ b/service/account/api_op_GetContactInformation.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetContactInformationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContactInformation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/account/api_op_GetPrimaryEmail.go b/service/account/api_op_GetPrimaryEmail.go index 8f4195a9852..90eb1410c0c 100644 --- a/service/account/api_op_GetPrimaryEmail.go +++ b/service/account/api_op_GetPrimaryEmail.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetPrimaryEmailMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPrimaryEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_GetRegionOptStatus.go b/service/account/api_op_GetRegionOptStatus.go index 766e3070428..2cb41946ec3 100644 --- a/service/account/api_op_GetRegionOptStatus.go +++ b/service/account/api_op_GetRegionOptStatus.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetRegionOptStatusMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegionOptStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_ListRegions.go b/service/account/api_op_ListRegions.go index 9cd9b5988ce..468f96cf894 100644 --- a/service/account/api_op_ListRegions.go +++ b/service/account/api_op_ListRegions.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListRegionsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegions(options.Region), middleware.Before); err != nil { return err } @@ -176,13 +179,6 @@ func (c *Client) addOperationListRegionsMiddlewares(stack *middleware.Stack, opt return nil } -// ListRegionsAPIClient is a client that implements the ListRegions operation. -type ListRegionsAPIClient interface { - ListRegions(context.Context, *ListRegionsInput, ...func(*Options)) (*ListRegionsOutput, error) -} - -var _ ListRegionsAPIClient = (*Client)(nil) - // ListRegionsPaginatorOptions is the paginator options for ListRegions type ListRegionsPaginatorOptions struct { // The total number of items to return in the command’s output. If the total @@ -254,6 +250,9 @@ func (p *ListRegionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRegions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +272,13 @@ func (p *ListRegionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListRegionsAPIClient is a client that implements the ListRegions operation. +type ListRegionsAPIClient interface { + ListRegions(context.Context, *ListRegionsInput, ...func(*Options)) (*ListRegionsOutput, error) +} + +var _ ListRegionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRegions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/account/api_op_PutAlternateContact.go b/service/account/api_op_PutAlternateContact.go index 093f15a8ec1..d1a5646fcd2 100644 --- a/service/account/api_op_PutAlternateContact.go +++ b/service/account/api_op_PutAlternateContact.go @@ -158,6 +158,9 @@ func (c *Client) addOperationPutAlternateContactMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAlternateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_PutContactInformation.go b/service/account/api_op_PutContactInformation.go index 5386ca7f51d..bd57d8d8de2 100644 --- a/service/account/api_op_PutContactInformation.go +++ b/service/account/api_op_PutContactInformation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutContactInformationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutContactInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/account/api_op_StartPrimaryEmailUpdate.go b/service/account/api_op_StartPrimaryEmailUpdate.go index 2f918afa85a..b9ace2f2714 100644 --- a/service/account/api_op_StartPrimaryEmailUpdate.go +++ b/service/account/api_op_StartPrimaryEmailUpdate.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartPrimaryEmailUpdateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartPrimaryEmailUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_client.go b/service/acm/api_client.go index 4a32cdfd870..ff10b21e585 100644 --- a/service/acm/api_client.go +++ b/service/acm/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/acm/api_op_AddTagsToCertificate.go b/service/acm/api_op_AddTagsToCertificate.go index f913ca76648..9b316c6561e 100644 --- a/service/acm/api_op_AddTagsToCertificate.go +++ b/service/acm/api_op_AddTagsToCertificate.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAddTagsToCertificateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_DeleteCertificate.go b/service/acm/api_op_DeleteCertificate.go index 7616050a103..6f4e90ae219 100644 --- a/service/acm/api_op_DeleteCertificate.go +++ b/service/acm/api_op_DeleteCertificate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_DescribeCertificate.go b/service/acm/api_op_DescribeCertificate.go index 4d49b3b69f5..98710bf03c5 100644 --- a/service/acm/api_op_DescribeCertificate.go +++ b/service/acm/api_op_DescribeCertificate.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeCertificateMiddlewares(stack *middleware.St return nil } -// DescribeCertificateAPIClient is a client that implements the -// DescribeCertificate operation. -type DescribeCertificateAPIClient interface { - DescribeCertificate(context.Context, *DescribeCertificateInput, ...func(*Options)) (*DescribeCertificateOutput, error) -} - -var _ DescribeCertificateAPIClient = (*Client)(nil) - // CertificateValidatedWaiterOptions are waiter options for // CertificateValidatedWaiter type CertificateValidatedWaiterOptions struct { @@ -271,7 +266,13 @@ func (w *CertificateValidatedWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeCertificate(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -392,6 +393,14 @@ func certificateValidatedStateRetryable(ctx context.Context, input *DescribeCert return true, nil } +// DescribeCertificateAPIClient is a client that implements the +// DescribeCertificate operation. +type DescribeCertificateAPIClient interface { + DescribeCertificate(context.Context, *DescribeCertificateInput, ...func(*Options)) (*DescribeCertificateOutput, error) +} + +var _ DescribeCertificateAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCertificate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acm/api_op_ExportCertificate.go b/service/acm/api_op_ExportCertificate.go index 12d2752eabc..7cc4126df88 100644 --- a/service/acm/api_op_ExportCertificate.go +++ b/service/acm/api_op_ExportCertificate.go @@ -139,6 +139,9 @@ func (c *Client) addOperationExportCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_GetAccountConfiguration.go b/service/acm/api_op_GetAccountConfiguration.go index b3d51c6a957..fe79d6dcf7e 100644 --- a/service/acm/api_op_GetAccountConfiguration.go +++ b/service/acm/api_op_GetAccountConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetAccountConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/acm/api_op_GetCertificate.go b/service/acm/api_op_GetCertificate.go index 6bd73bd2974..2542c974e26 100644 --- a/service/acm/api_op_GetCertificate.go +++ b/service/acm/api_op_GetCertificate.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetCertificateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_ImportCertificate.go b/service/acm/api_op_ImportCertificate.go index 9801baf4678..abd7035f63f 100644 --- a/service/acm/api_op_ImportCertificate.go +++ b/service/acm/api_op_ImportCertificate.go @@ -183,6 +183,9 @@ func (c *Client) addOperationImportCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_ListCertificates.go b/service/acm/api_op_ListCertificates.go index c90d4e18984..df0bef96d23 100644 --- a/service/acm/api_op_ListCertificates.go +++ b/service/acm/api_op_ListCertificates.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCertificates(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack return nil } -// ListCertificatesAPIClient is a client that implements the ListCertificates -// operation. -type ListCertificatesAPIClient interface { - ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) -} - -var _ ListCertificatesAPIClient = (*Client)(nil) - // ListCertificatesPaginatorOptions is the paginator options for ListCertificates type ListCertificatesPaginatorOptions struct { // Use this parameter when paginating results to specify the maximum number of @@ -228,6 +223,9 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCertificatesAPIClient is a client that implements the ListCertificates +// operation. +type ListCertificatesAPIClient interface { + ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) +} + +var _ ListCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acm/api_op_ListTagsForCertificate.go b/service/acm/api_op_ListTagsForCertificate.go index 9471b2110dc..9de4f164747 100644 --- a/service/acm/api_op_ListTagsForCertificate.go +++ b/service/acm/api_op_ListTagsForCertificate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTagsForCertificateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_PutAccountConfiguration.go b/service/acm/api_op_PutAccountConfiguration.go index aea26cdae04..828b214a4d6 100644 --- a/service/acm/api_op_PutAccountConfiguration.go +++ b/service/acm/api_op_PutAccountConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutAccountConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_RemoveTagsFromCertificate.go b/service/acm/api_op_RemoveTagsFromCertificate.go index 84f8e5d8cd8..36ddffe70b4 100644 --- a/service/acm/api_op_RemoveTagsFromCertificate.go +++ b/service/acm/api_op_RemoveTagsFromCertificate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRemoveTagsFromCertificateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_RenewCertificate.go b/service/acm/api_op_RenewCertificate.go index b71a9701d6a..2d6876d5d06 100644 --- a/service/acm/api_op_RenewCertificate.go +++ b/service/acm/api_op_RenewCertificate.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRenewCertificateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRenewCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_RequestCertificate.go b/service/acm/api_op_RequestCertificate.go index 5acbcff4eb4..11abc970831 100644 --- a/service/acm/api_op_RequestCertificate.go +++ b/service/acm/api_op_RequestCertificate.go @@ -222,6 +222,9 @@ func (c *Client) addOperationRequestCertificateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_ResendValidationEmail.go b/service/acm/api_op_ResendValidationEmail.go index 5329c8d73fc..68e45e25954 100644 --- a/service/acm/api_op_ResendValidationEmail.go +++ b/service/acm/api_op_ResendValidationEmail.go @@ -143,6 +143,9 @@ func (c *Client) addOperationResendValidationEmailMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResendValidationEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/acm/api_op_UpdateCertificateOptions.go b/service/acm/api_op_UpdateCertificateOptions.go index 6c32825f89a..531439a95e4 100644 --- a/service/acm/api_op_UpdateCertificateOptions.go +++ b/service/acm/api_op_UpdateCertificateOptions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateCertificateOptionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCertificateOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_client.go b/service/acmpca/api_client.go index 0e6010b512d..eb9ba667270 100644 --- a/service/acmpca/api_client.go +++ b/service/acmpca/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/acmpca/api_op_CreateCertificateAuthority.go b/service/acmpca/api_op_CreateCertificateAuthority.go index 654ac85e9b4..22a66e49370 100644 --- a/service/acmpca/api_op_CreateCertificateAuthority.go +++ b/service/acmpca/api_op_CreateCertificateAuthority.go @@ -207,6 +207,9 @@ func (c *Client) addOperationCreateCertificateAuthorityMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_CreateCertificateAuthorityAuditReport.go b/service/acmpca/api_op_CreateCertificateAuthorityAuditReport.go index dd19a61f240..880e5368ade 100644 --- a/service/acmpca/api_op_CreateCertificateAuthorityAuditReport.go +++ b/service/acmpca/api_op_CreateCertificateAuthorityAuditReport.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateCertificateAuthorityAuditReportMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCertificateAuthorityAuditReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_CreatePermission.go b/service/acmpca/api_op_CreatePermission.go index 86d84853033..c221df5d83b 100644 --- a/service/acmpca/api_op_CreatePermission.go +++ b/service/acmpca/api_op_CreatePermission.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreatePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_DeleteCertificateAuthority.go b/service/acmpca/api_op_DeleteCertificateAuthority.go index 36d328f8c62..cdc498b8e01 100644 --- a/service/acmpca/api_op_DeleteCertificateAuthority.go +++ b/service/acmpca/api_op_DeleteCertificateAuthority.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteCertificateAuthorityMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_DeletePermission.go b/service/acmpca/api_op_DeletePermission.go index 4c54601703a..71c703f8b6f 100644 --- a/service/acmpca/api_op_DeletePermission.go +++ b/service/acmpca/api_op_DeletePermission.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeletePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_DeletePolicy.go b/service/acmpca/api_op_DeletePolicy.go index 3f128c0790c..23fe905c9db 100644 --- a/service/acmpca/api_op_DeletePolicy.go +++ b/service/acmpca/api_op_DeletePolicy.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_DescribeCertificateAuthority.go b/service/acmpca/api_op_DescribeCertificateAuthority.go index 5b3ce7b3276..0653eae8da0 100644 --- a/service/acmpca/api_op_DescribeCertificateAuthority.go +++ b/service/acmpca/api_op_DescribeCertificateAuthority.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeCertificateAuthorityMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go b/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go index ca8be2d8fda..c40290eeee5 100644 --- a/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go +++ b/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeCertificateAuthorityAuditReportMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateAuthorityAuditReportValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeCertificateAuthorityAuditReportMiddlewares( return nil } -// DescribeCertificateAuthorityAuditReportAPIClient is a client that implements -// the DescribeCertificateAuthorityAuditReport operation. -type DescribeCertificateAuthorityAuditReportAPIClient interface { - DescribeCertificateAuthorityAuditReport(context.Context, *DescribeCertificateAuthorityAuditReportInput, ...func(*Options)) (*DescribeCertificateAuthorityAuditReportOutput, error) -} - -var _ DescribeCertificateAuthorityAuditReportAPIClient = (*Client)(nil) - // AuditReportCreatedWaiterOptions are waiter options for AuditReportCreatedWaiter type AuditReportCreatedWaiterOptions struct { @@ -284,7 +279,13 @@ func (w *AuditReportCreatedWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeCertificateAuthorityAuditReport(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -371,6 +372,14 @@ func auditReportCreatedStateRetryable(ctx context.Context, input *DescribeCertif return true, nil } +// DescribeCertificateAuthorityAuditReportAPIClient is a client that implements +// the DescribeCertificateAuthorityAuditReport operation. +type DescribeCertificateAuthorityAuditReportAPIClient interface { + DescribeCertificateAuthorityAuditReport(context.Context, *DescribeCertificateAuthorityAuditReportInput, ...func(*Options)) (*DescribeCertificateAuthorityAuditReportOutput, error) +} + +var _ DescribeCertificateAuthorityAuditReportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCertificateAuthorityAuditReport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acmpca/api_op_GetCertificate.go b/service/acmpca/api_op_GetCertificate.go index 55e15a4446b..ce446f0001d 100644 --- a/service/acmpca/api_op_GetCertificate.go +++ b/service/acmpca/api_op_GetCertificate.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetCertificateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCertificateValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationGetCertificateMiddlewares(stack *middleware.Stack, return nil } -// GetCertificateAPIClient is a client that implements the GetCertificate -// operation. -type GetCertificateAPIClient interface { - GetCertificate(context.Context, *GetCertificateInput, ...func(*Options)) (*GetCertificateOutput, error) -} - -var _ GetCertificateAPIClient = (*Client)(nil) - // CertificateIssuedWaiterOptions are waiter options for CertificateIssuedWaiter type CertificateIssuedWaiterOptions struct { @@ -285,7 +280,13 @@ func (w *CertificateIssuedWaiter) WaitForOutput(ctx context.Context, params *Get } out, err := w.client.GetCertificate(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -349,6 +350,14 @@ func certificateIssuedStateRetryable(ctx context.Context, input *GetCertificateI return true, nil } +// GetCertificateAPIClient is a client that implements the GetCertificate +// operation. +type GetCertificateAPIClient interface { + GetCertificate(context.Context, *GetCertificateInput, ...func(*Options)) (*GetCertificateOutput, error) +} + +var _ GetCertificateAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCertificate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acmpca/api_op_GetCertificateAuthorityCertificate.go b/service/acmpca/api_op_GetCertificateAuthorityCertificate.go index 9b74f0604d8..d3fa9b013f5 100644 --- a/service/acmpca/api_op_GetCertificateAuthorityCertificate.go +++ b/service/acmpca/api_op_GetCertificateAuthorityCertificate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetCertificateAuthorityCertificateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCertificateAuthorityCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_GetCertificateAuthorityCsr.go b/service/acmpca/api_op_GetCertificateAuthorityCsr.go index bda936fb8ae..cdf36225608 100644 --- a/service/acmpca/api_op_GetCertificateAuthorityCsr.go +++ b/service/acmpca/api_op_GetCertificateAuthorityCsr.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetCertificateAuthorityCsrMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCertificateAuthorityCsrValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetCertificateAuthorityCsrMiddlewares(stack *middle return nil } -// GetCertificateAuthorityCsrAPIClient is a client that implements the -// GetCertificateAuthorityCsr operation. -type GetCertificateAuthorityCsrAPIClient interface { - GetCertificateAuthorityCsr(context.Context, *GetCertificateAuthorityCsrInput, ...func(*Options)) (*GetCertificateAuthorityCsrOutput, error) -} - -var _ GetCertificateAuthorityCsrAPIClient = (*Client)(nil) - // CertificateAuthorityCSRCreatedWaiterOptions are waiter options for // CertificateAuthorityCSRCreatedWaiter type CertificateAuthorityCSRCreatedWaiterOptions struct { @@ -276,7 +271,13 @@ func (w *CertificateAuthorityCSRCreatedWaiter) WaitForOutput(ctx context.Context } out, err := w.client.GetCertificateAuthorityCsr(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -340,6 +341,14 @@ func certificateAuthorityCSRCreatedStateRetryable(ctx context.Context, input *Ge return true, nil } +// GetCertificateAuthorityCsrAPIClient is a client that implements the +// GetCertificateAuthorityCsr operation. +type GetCertificateAuthorityCsrAPIClient interface { + GetCertificateAuthorityCsr(context.Context, *GetCertificateAuthorityCsrInput, ...func(*Options)) (*GetCertificateAuthorityCsrOutput, error) +} + +var _ GetCertificateAuthorityCsrAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCertificateAuthorityCsr(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acmpca/api_op_GetPolicy.go b/service/acmpca/api_op_GetPolicy.go index c7abb9e11ce..9ee41bf46b9 100644 --- a/service/acmpca/api_op_GetPolicy.go +++ b/service/acmpca/api_op_GetPolicy.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go b/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go index 0ae64ebf685..41e2ce5f5b7 100644 --- a/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go +++ b/service/acmpca/api_op_ImportCertificateAuthorityCertificate.go @@ -217,6 +217,9 @@ func (c *Client) addOperationImportCertificateAuthorityCertificateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportCertificateAuthorityCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_IssueCertificate.go b/service/acmpca/api_op_IssueCertificate.go index 7ff185ffe5f..3dec36a9814 100644 --- a/service/acmpca/api_op_IssueCertificate.go +++ b/service/acmpca/api_op_IssueCertificate.go @@ -229,6 +229,9 @@ func (c *Client) addOperationIssueCertificateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIssueCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_ListCertificateAuthorities.go b/service/acmpca/api_op_ListCertificateAuthorities.go index 6fdb326708e..9ac11facbb4 100644 --- a/service/acmpca/api_op_ListCertificateAuthorities.go +++ b/service/acmpca/api_op_ListCertificateAuthorities.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListCertificateAuthoritiesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCertificateAuthorities(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListCertificateAuthoritiesMiddlewares(stack *middle return nil } -// ListCertificateAuthoritiesAPIClient is a client that implements the -// ListCertificateAuthorities operation. -type ListCertificateAuthoritiesAPIClient interface { - ListCertificateAuthorities(context.Context, *ListCertificateAuthoritiesInput, ...func(*Options)) (*ListCertificateAuthoritiesOutput, error) -} - -var _ ListCertificateAuthoritiesAPIClient = (*Client)(nil) - // ListCertificateAuthoritiesPaginatorOptions is the paginator options for // ListCertificateAuthorities type ListCertificateAuthoritiesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListCertificateAuthoritiesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCertificateAuthorities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListCertificateAuthoritiesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListCertificateAuthoritiesAPIClient is a client that implements the +// ListCertificateAuthorities operation. +type ListCertificateAuthoritiesAPIClient interface { + ListCertificateAuthorities(context.Context, *ListCertificateAuthoritiesInput, ...func(*Options)) (*ListCertificateAuthoritiesOutput, error) +} + +var _ ListCertificateAuthoritiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCertificateAuthorities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acmpca/api_op_ListPermissions.go b/service/acmpca/api_op_ListPermissions.go index 118c6a27564..c8d8bd5ef66 100644 --- a/service/acmpca/api_op_ListPermissions.go +++ b/service/acmpca/api_op_ListPermissions.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionsValidationMiddleware(stack); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, return nil } -// ListPermissionsAPIClient is a client that implements the ListPermissions -// operation. -type ListPermissionsAPIClient interface { - ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) -} - -var _ ListPermissionsAPIClient = (*Client)(nil) - // ListPermissionsPaginatorOptions is the paginator options for ListPermissions type ListPermissionsPaginatorOptions struct { // When paginating results, use this parameter to specify the maximum number of @@ -249,6 +244,9 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListPermissionsAPIClient is a client that implements the ListPermissions +// operation. +type ListPermissionsAPIClient interface { + ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) +} + +var _ ListPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acmpca/api_op_ListTags.go b/service/acmpca/api_op_ListTags.go index 68043e676cc..c5427047993 100644 --- a/service/acmpca/api_op_ListTags.go +++ b/service/acmpca/api_op_ListTags.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option return nil } -// ListTagsAPIClient is a client that implements the ListTags operation. -type ListTagsAPIClient interface { - ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) -} - -var _ ListTagsAPIClient = (*Client)(nil) - // ListTagsPaginatorOptions is the paginator options for ListTags type ListTagsPaginatorOptions struct { // Use this parameter when paginating results to specify the maximum number of @@ -229,6 +225,9 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListTagsAPIClient is a client that implements the ListTags operation. +type ListTagsAPIClient interface { + ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) +} + +var _ ListTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/acmpca/api_op_PutPolicy.go b/service/acmpca/api_op_PutPolicy.go index 691b6c333a6..fb93e98a506 100644 --- a/service/acmpca/api_op_PutPolicy.go +++ b/service/acmpca/api_op_PutPolicy.go @@ -144,6 +144,9 @@ func (c *Client) addOperationPutPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_RestoreCertificateAuthority.go b/service/acmpca/api_op_RestoreCertificateAuthority.go index fa0f656a07a..e383937e90c 100644 --- a/service/acmpca/api_op_RestoreCertificateAuthority.go +++ b/service/acmpca/api_op_RestoreCertificateAuthority.go @@ -123,6 +123,9 @@ func (c *Client) addOperationRestoreCertificateAuthorityMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_RevokeCertificate.go b/service/acmpca/api_op_RevokeCertificate.go index 907f7fa5b9c..77004ccd2be 100644 --- a/service/acmpca/api_op_RevokeCertificate.go +++ b/service/acmpca/api_op_RevokeCertificate.go @@ -150,6 +150,9 @@ func (c *Client) addOperationRevokeCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_TagCertificateAuthority.go b/service/acmpca/api_op_TagCertificateAuthority.go index a630345cbe0..cb089def665 100644 --- a/service/acmpca/api_op_TagCertificateAuthority.go +++ b/service/acmpca/api_op_TagCertificateAuthority.go @@ -129,6 +129,9 @@ func (c *Client) addOperationTagCertificateAuthorityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_UntagCertificateAuthority.go b/service/acmpca/api_op_UntagCertificateAuthority.go index afca8a9312e..622076659fe 100644 --- a/service/acmpca/api_op_UntagCertificateAuthority.go +++ b/service/acmpca/api_op_UntagCertificateAuthority.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUntagCertificateAuthorityMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/acmpca/api_op_UpdateCertificateAuthority.go b/service/acmpca/api_op_UpdateCertificateAuthority.go index d5aedf895e7..a00da4b74c7 100644 --- a/service/acmpca/api_op_UpdateCertificateAuthority.go +++ b/service/acmpca/api_op_UpdateCertificateAuthority.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateCertificateAuthorityMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_client.go b/service/amp/api_client.go index 32ae36e4f25..7039e376cf7 100644 --- a/service/amp/api_client.go +++ b/service/amp/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/amp/api_op_CreateAlertManagerDefinition.go b/service/amp/api_op_CreateAlertManagerDefinition.go index edb3c6e34c8..a2ae41474fe 100644 --- a/service/amp/api_op_CreateAlertManagerDefinition.go +++ b/service/amp/api_op_CreateAlertManagerDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateAlertManagerDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAlertManagerDefinitionMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_CreateLoggingConfiguration.go b/service/amp/api_op_CreateLoggingConfiguration.go index d047208f9ab..bf437ebc54d 100644 --- a/service/amp/api_op_CreateLoggingConfiguration.go +++ b/service/amp/api_op_CreateLoggingConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLoggingConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_CreateRuleGroupsNamespace.go b/service/amp/api_op_CreateRuleGroupsNamespace.go index c1ad1e3de8b..c2af92ac6f6 100644 --- a/service/amp/api_op_CreateRuleGroupsNamespace.go +++ b/service/amp/api_op_CreateRuleGroupsNamespace.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateRuleGroupsNamespaceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRuleGroupsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_CreateScraper.go b/service/amp/api_op_CreateScraper.go index 4b6541d0c5d..5f4c4487ba0 100644 --- a/service/amp/api_op_CreateScraper.go +++ b/service/amp/api_op_CreateScraper.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateScraperMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateScraperMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_CreateWorkspace.go b/service/amp/api_op_CreateWorkspace.go index 6d5eca31af0..97fc8a74ad5 100644 --- a/service/amp/api_op_CreateWorkspace.go +++ b/service/amp/api_op_CreateWorkspace.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorkspaceMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_DeleteAlertManagerDefinition.go b/service/amp/api_op_DeleteAlertManagerDefinition.go index 40bcc53b546..57859de333d 100644 --- a/service/amp/api_op_DeleteAlertManagerDefinition.go +++ b/service/amp/api_op_DeleteAlertManagerDefinition.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAlertManagerDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAlertManagerDefinitionMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_DeleteLoggingConfiguration.go b/service/amp/api_op_DeleteLoggingConfiguration.go index ec47ba369eb..a793bf4eca3 100644 --- a/service/amp/api_op_DeleteLoggingConfiguration.go +++ b/service/amp/api_op_DeleteLoggingConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteLoggingConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_DeleteRuleGroupsNamespace.go b/service/amp/api_op_DeleteRuleGroupsNamespace.go index 7b52e831d4a..3272600a093 100644 --- a/service/amp/api_op_DeleteRuleGroupsNamespace.go +++ b/service/amp/api_op_DeleteRuleGroupsNamespace.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteRuleGroupsNamespaceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteRuleGroupsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_DeleteScraper.go b/service/amp/api_op_DeleteScraper.go index eb2c38af46c..92dfd8c8e92 100644 --- a/service/amp/api_op_DeleteScraper.go +++ b/service/amp/api_op_DeleteScraper.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteScraperMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteScraperMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_DeleteWorkspace.go b/service/amp/api_op_DeleteWorkspace.go index f34b606c9f3..3bf93c57543 100644 --- a/service/amp/api_op_DeleteWorkspace.go +++ b/service/amp/api_op_DeleteWorkspace.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteWorkspaceMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_DescribeAlertManagerDefinition.go b/service/amp/api_op_DescribeAlertManagerDefinition.go index f7950d02757..7c88f281236 100644 --- a/service/amp/api_op_DescribeAlertManagerDefinition.go +++ b/service/amp/api_op_DescribeAlertManagerDefinition.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeAlertManagerDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlertManagerDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_op_DescribeLoggingConfiguration.go b/service/amp/api_op_DescribeLoggingConfiguration.go index df6c6590141..82a985974d6 100644 --- a/service/amp/api_op_DescribeLoggingConfiguration.go +++ b/service/amp/api_op_DescribeLoggingConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeLoggingConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_op_DescribeRuleGroupsNamespace.go b/service/amp/api_op_DescribeRuleGroupsNamespace.go index a95fb3dbcc0..7114178f600 100644 --- a/service/amp/api_op_DescribeRuleGroupsNamespace.go +++ b/service/amp/api_op_DescribeRuleGroupsNamespace.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeRuleGroupsNamespaceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRuleGroupsNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_op_DescribeScraper.go b/service/amp/api_op_DescribeScraper.go index fcdecc1b9e6..8ade21d8ec7 100644 --- a/service/amp/api_op_DescribeScraper.go +++ b/service/amp/api_op_DescribeScraper.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeScraperMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScraperValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeScraperMiddlewares(stack *middleware.Stack, return nil } -// DescribeScraperAPIClient is a client that implements the DescribeScraper -// operation. -type DescribeScraperAPIClient interface { - DescribeScraper(context.Context, *DescribeScraperInput, ...func(*Options)) (*DescribeScraperOutput, error) -} - -var _ DescribeScraperAPIClient = (*Client)(nil) - // ScraperActiveWaiterOptions are waiter options for ScraperActiveWaiter type ScraperActiveWaiterOptions struct { @@ -262,7 +257,13 @@ func (w *ScraperActiveWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeScraper(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -452,7 +453,13 @@ func (w *ScraperDeletedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeScraper(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -517,6 +524,14 @@ func scraperDeletedStateRetryable(ctx context.Context, input *DescribeScraperInp return true, nil } +// DescribeScraperAPIClient is a client that implements the DescribeScraper +// operation. +type DescribeScraperAPIClient interface { + DescribeScraper(context.Context, *DescribeScraperInput, ...func(*Options)) (*DescribeScraperOutput, error) +} + +var _ DescribeScraperAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScraper(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_DescribeWorkspace.go b/service/amp/api_op_DescribeWorkspace.go index 48c1a544e28..bfedf0f5337 100644 --- a/service/amp/api_op_DescribeWorkspace.go +++ b/service/amp/api_op_DescribeWorkspace.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeWorkspaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeWorkspaceMiddlewares(stack *middleware.Stac return nil } -// DescribeWorkspaceAPIClient is a client that implements the DescribeWorkspace -// operation. -type DescribeWorkspaceAPIClient interface { - DescribeWorkspace(context.Context, *DescribeWorkspaceInput, ...func(*Options)) (*DescribeWorkspaceOutput, error) -} - -var _ DescribeWorkspaceAPIClient = (*Client)(nil) - // WorkspaceActiveWaiterOptions are waiter options for WorkspaceActiveWaiter type WorkspaceActiveWaiterOptions struct { @@ -262,7 +257,13 @@ func (w *WorkspaceActiveWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeWorkspace(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -469,7 +470,13 @@ func (w *WorkspaceDeletedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeWorkspace(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -534,6 +541,14 @@ func workspaceDeletedStateRetryable(ctx context.Context, input *DescribeWorkspac return true, nil } +// DescribeWorkspaceAPIClient is a client that implements the DescribeWorkspace +// operation. +type DescribeWorkspaceAPIClient interface { + DescribeWorkspace(context.Context, *DescribeWorkspaceInput, ...func(*Options)) (*DescribeWorkspaceOutput, error) +} + +var _ DescribeWorkspaceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeWorkspace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_GetDefaultScraperConfiguration.go b/service/amp/api_op_GetDefaultScraperConfiguration.go index 34972a84744..150d562f624 100644 --- a/service/amp/api_op_GetDefaultScraperConfiguration.go +++ b/service/amp/api_op_GetDefaultScraperConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetDefaultScraperConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultScraperConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/amp/api_op_ListRuleGroupsNamespaces.go b/service/amp/api_op_ListRuleGroupsNamespaces.go index 9766b54b3a0..d3f4ebb6448 100644 --- a/service/amp/api_op_ListRuleGroupsNamespaces.go +++ b/service/amp/api_op_ListRuleGroupsNamespaces.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListRuleGroupsNamespacesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRuleGroupsNamespacesValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListRuleGroupsNamespacesMiddlewares(stack *middlewa return nil } -// ListRuleGroupsNamespacesAPIClient is a client that implements the -// ListRuleGroupsNamespaces operation. -type ListRuleGroupsNamespacesAPIClient interface { - ListRuleGroupsNamespaces(context.Context, *ListRuleGroupsNamespacesInput, ...func(*Options)) (*ListRuleGroupsNamespacesOutput, error) -} - -var _ ListRuleGroupsNamespacesAPIClient = (*Client)(nil) - // ListRuleGroupsNamespacesPaginatorOptions is the paginator options for // ListRuleGroupsNamespaces type ListRuleGroupsNamespacesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListRuleGroupsNamespacesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRuleGroupsNamespaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListRuleGroupsNamespacesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListRuleGroupsNamespacesAPIClient is a client that implements the +// ListRuleGroupsNamespaces operation. +type ListRuleGroupsNamespacesAPIClient interface { + ListRuleGroupsNamespaces(context.Context, *ListRuleGroupsNamespacesInput, ...func(*Options)) (*ListRuleGroupsNamespacesOutput, error) +} + +var _ ListRuleGroupsNamespacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRuleGroupsNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_ListScrapers.go b/service/amp/api_op_ListScrapers.go index beab81d4d6f..f677f05d647 100644 --- a/service/amp/api_op_ListScrapers.go +++ b/service/amp/api_op_ListScrapers.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListScrapersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScrapers(options.Region), middleware.Before); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationListScrapersMiddlewares(stack *middleware.Stack, op return nil } -// ListScrapersAPIClient is a client that implements the ListScrapers operation. -type ListScrapersAPIClient interface { - ListScrapers(context.Context, *ListScrapersInput, ...func(*Options)) (*ListScrapersOutput, error) -} - -var _ ListScrapersAPIClient = (*Client)(nil) - // ListScrapersPaginatorOptions is the paginator options for ListScrapers type ListScrapersPaginatorOptions struct { // Optional) The maximum number of scrapers to return in one ListScrapers @@ -234,6 +230,9 @@ func (p *ListScrapersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScrapers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListScrapersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListScrapersAPIClient is a client that implements the ListScrapers operation. +type ListScrapersAPIClient interface { + ListScrapers(context.Context, *ListScrapersInput, ...func(*Options)) (*ListScrapersOutput, error) +} + +var _ ListScrapersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScrapers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_ListTagsForResource.go b/service/amp/api_op_ListTagsForResource.go index 17eea7de876..673056ae8e1 100644 --- a/service/amp/api_op_ListTagsForResource.go +++ b/service/amp/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_op_ListWorkspaces.go b/service/amp/api_op_ListWorkspaces.go index fc7f285020a..ada1f28f093 100644 --- a/service/amp/api_op_ListWorkspaces.go +++ b/service/amp/api_op_ListWorkspaces.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListWorkspacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkspaces(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListWorkspacesMiddlewares(stack *middleware.Stack, return nil } -// ListWorkspacesAPIClient is a client that implements the ListWorkspaces -// operation. -type ListWorkspacesAPIClient interface { - ListWorkspaces(context.Context, *ListWorkspacesInput, ...func(*Options)) (*ListWorkspacesOutput, error) -} - -var _ ListWorkspacesAPIClient = (*Client)(nil) - // ListWorkspacesPaginatorOptions is the paginator options for ListWorkspaces type ListWorkspacesPaginatorOptions struct { // The maximum number of workspaces to return per request. The default is 100. @@ -223,6 +218,9 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkspaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListWorkspacesAPIClient is a client that implements the ListWorkspaces +// operation. +type ListWorkspacesAPIClient interface { + ListWorkspaces(context.Context, *ListWorkspacesInput, ...func(*Options)) (*ListWorkspacesOutput, error) +} + +var _ ListWorkspacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amp/api_op_PutAlertManagerDefinition.go b/service/amp/api_op_PutAlertManagerDefinition.go index 43f3ef185aa..e659ca5338a 100644 --- a/service/amp/api_op_PutAlertManagerDefinition.go +++ b/service/amp/api_op_PutAlertManagerDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutAlertManagerDefinitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutAlertManagerDefinitionMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_PutRuleGroupsNamespace.go b/service/amp/api_op_PutRuleGroupsNamespace.go index 3ebf8f36dd5..32bc9667f80 100644 --- a/service/amp/api_op_PutRuleGroupsNamespace.go +++ b/service/amp/api_op_PutRuleGroupsNamespace.go @@ -150,6 +150,9 @@ func (c *Client) addOperationPutRuleGroupsNamespaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutRuleGroupsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_TagResource.go b/service/amp/api_op_TagResource.go index 8ab56325bd8..69f3969345e 100644 --- a/service/amp/api_op_TagResource.go +++ b/service/amp/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_op_UntagResource.go b/service/amp/api_op_UntagResource.go index 0ce363e68cf..d691f4d112a 100644 --- a/service/amp/api_op_UntagResource.go +++ b/service/amp/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amp/api_op_UpdateLoggingConfiguration.go b/service/amp/api_op_UpdateLoggingConfiguration.go index 5fabc0adf2c..c7d2e32db85 100644 --- a/service/amp/api_op_UpdateLoggingConfiguration.go +++ b/service/amp/api_op_UpdateLoggingConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateLoggingConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/amp/api_op_UpdateWorkspaceAlias.go b/service/amp/api_op_UpdateWorkspaceAlias.go index b022f480de9..5e03684d7b1 100644 --- a/service/amp/api_op_UpdateWorkspaceAlias.go +++ b/service/amp/api_op_UpdateWorkspaceAlias.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateWorkspaceAliasMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateWorkspaceAliasMiddleware(stack, options); err != nil { return err } diff --git a/service/amplify/api_client.go b/service/amplify/api_client.go index 973c4c5da25..f0b423b27d0 100644 --- a/service/amplify/api_client.go +++ b/service/amplify/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/amplify/api_op_CreateApp.go b/service/amplify/api_op_CreateApp.go index 7df593e4e6f..47c79dbb826 100644 --- a/service/amplify/api_op_CreateApp.go +++ b/service/amplify/api_op_CreateApp.go @@ -203,6 +203,9 @@ func (c *Client) addOperationCreateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_CreateBackendEnvironment.go b/service/amplify/api_op_CreateBackendEnvironment.go index d44f747ec29..49e3ec58725 100644 --- a/service/amplify/api_op_CreateBackendEnvironment.go +++ b/service/amplify/api_op_CreateBackendEnvironment.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateBackendEnvironmentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackendEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_CreateBranch.go b/service/amplify/api_op_CreateBranch.go index b891f49a3e5..de24bb756ab 100644 --- a/service/amplify/api_op_CreateBranch.go +++ b/service/amplify/api_op_CreateBranch.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateBranchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_CreateDeployment.go b/service/amplify/api_op_CreateDeployment.go index aebaec896ed..b10744175ac 100644 --- a/service/amplify/api_op_CreateDeployment.go +++ b/service/amplify/api_op_CreateDeployment.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_CreateDomainAssociation.go b/service/amplify/api_op_CreateDomainAssociation.go index 67b85f1fd60..a1535069a88 100644 --- a/service/amplify/api_op_CreateDomainAssociation.go +++ b/service/amplify/api_op_CreateDomainAssociation.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateDomainAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_CreateWebhook.go b/service/amplify/api_op_CreateWebhook.go index e97f035f699..f0659804108 100644 --- a/service/amplify/api_op_CreateWebhook.go +++ b/service/amplify/api_op_CreateWebhook.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_DeleteApp.go b/service/amplify/api_op_DeleteApp.go index 22b6074bac6..d7fcda29887 100644 --- a/service/amplify/api_op_DeleteApp.go +++ b/service/amplify/api_op_DeleteApp.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_DeleteBackendEnvironment.go b/service/amplify/api_op_DeleteBackendEnvironment.go index 27d69d4fa86..6aa0e6c166d 100644 --- a/service/amplify/api_op_DeleteBackendEnvironment.go +++ b/service/amplify/api_op_DeleteBackendEnvironment.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteBackendEnvironmentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackendEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_DeleteBranch.go b/service/amplify/api_op_DeleteBranch.go index 6176d6a507e..83b6c5f3d20 100644 --- a/service/amplify/api_op_DeleteBranch.go +++ b/service/amplify/api_op_DeleteBranch.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteBranchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_DeleteDomainAssociation.go b/service/amplify/api_op_DeleteDomainAssociation.go index 5436c0c2f4b..c53fbb840ea 100644 --- a/service/amplify/api_op_DeleteDomainAssociation.go +++ b/service/amplify/api_op_DeleteDomainAssociation.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteDomainAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_DeleteJob.go b/service/amplify/api_op_DeleteJob.go index ff64786ccfc..6de252c0046 100644 --- a/service/amplify/api_op_DeleteJob.go +++ b/service/amplify/api_op_DeleteJob.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_DeleteWebhook.go b/service/amplify/api_op_DeleteWebhook.go index 15e7b065cc0..4e00d74d946 100644 --- a/service/amplify/api_op_DeleteWebhook.go +++ b/service/amplify/api_op_DeleteWebhook.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GenerateAccessLogs.go b/service/amplify/api_op_GenerateAccessLogs.go index 89fe2638ce7..b66c7a89206 100644 --- a/service/amplify/api_op_GenerateAccessLogs.go +++ b/service/amplify/api_op_GenerateAccessLogs.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGenerateAccessLogsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateAccessLogsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetApp.go b/service/amplify/api_op_GetApp.go index f0d707d2a31..116dac4ed71 100644 --- a/service/amplify/api_op_GetApp.go +++ b/service/amplify/api_op_GetApp.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetAppMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetArtifactUrl.go b/service/amplify/api_op_GetArtifactUrl.go index 8fca1d441ca..d03f907c057 100644 --- a/service/amplify/api_op_GetArtifactUrl.go +++ b/service/amplify/api_op_GetArtifactUrl.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetArtifactUrlMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArtifactUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetBackendEnvironment.go b/service/amplify/api_op_GetBackendEnvironment.go index 9e61edab707..979a8e8255a 100644 --- a/service/amplify/api_op_GetBackendEnvironment.go +++ b/service/amplify/api_op_GetBackendEnvironment.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetBackendEnvironmentMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetBranch.go b/service/amplify/api_op_GetBranch.go index 25d4c4e2ad6..7f83b92f387 100644 --- a/service/amplify/api_op_GetBranch.go +++ b/service/amplify/api_op_GetBranch.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetBranchMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetDomainAssociation.go b/service/amplify/api_op_GetDomainAssociation.go index bf2712bb081..3798a16017c 100644 --- a/service/amplify/api_op_GetDomainAssociation.go +++ b/service/amplify/api_op_GetDomainAssociation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetDomainAssociationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetJob.go b/service/amplify/api_op_GetJob.go index 30919ee3320..0702bd74e8b 100644 --- a/service/amplify/api_op_GetJob.go +++ b/service/amplify/api_op_GetJob.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_GetWebhook.go b/service/amplify/api_op_GetWebhook.go index c047a125a77..6d0bce5bbc9 100644 --- a/service/amplify/api_op_GetWebhook.go +++ b/service/amplify/api_op_GetWebhook.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetWebhookMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_ListApps.go b/service/amplify/api_op_ListApps.go index 7e74d7c0475..140b1544896 100644 --- a/service/amplify/api_op_ListApps.go +++ b/service/amplify/api_op_ListApps.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApps(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option return nil } -// ListAppsAPIClient is a client that implements the ListApps operation. -type ListAppsAPIClient interface { - ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) -} - -var _ ListAppsAPIClient = (*Client)(nil) - // ListAppsPaginatorOptions is the paginator options for ListApps type ListAppsPaginatorOptions struct { // The maximum number of records to list in a single response. @@ -204,6 +200,9 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListAppsAPIClient is a client that implements the ListApps operation. +type ListAppsAPIClient interface { + ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) +} + +var _ ListAppsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplify/api_op_ListArtifacts.go b/service/amplify/api_op_ListArtifacts.go index 70daae44703..6783f59ba8d 100644 --- a/service/amplify/api_op_ListArtifacts.go +++ b/service/amplify/api_op_ListArtifacts.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListArtifactsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListArtifactsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_ListBackendEnvironments.go b/service/amplify/api_op_ListBackendEnvironments.go index 4893aff6abc..1482eee68f4 100644 --- a/service/amplify/api_op_ListBackendEnvironments.go +++ b/service/amplify/api_op_ListBackendEnvironments.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListBackendEnvironmentsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBackendEnvironmentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_ListBranches.go b/service/amplify/api_op_ListBranches.go index 6f5d36a89df..782622bc22c 100644 --- a/service/amplify/api_op_ListBranches.go +++ b/service/amplify/api_op_ListBranches.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListBranchesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBranchesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListBranchesMiddlewares(stack *middleware.Stack, op return nil } -// ListBranchesAPIClient is a client that implements the ListBranches operation. -type ListBranchesAPIClient interface { - ListBranches(context.Context, *ListBranchesInput, ...func(*Options)) (*ListBranchesOutput, error) -} - -var _ ListBranchesAPIClient = (*Client)(nil) - // ListBranchesPaginatorOptions is the paginator options for ListBranches type ListBranchesPaginatorOptions struct { // The maximum number of records to list in a single response. @@ -212,6 +208,9 @@ func (p *ListBranchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBranches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListBranchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListBranchesAPIClient is a client that implements the ListBranches operation. +type ListBranchesAPIClient interface { + ListBranches(context.Context, *ListBranchesInput, ...func(*Options)) (*ListBranchesOutput, error) +} + +var _ ListBranchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBranches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplify/api_op_ListDomainAssociations.go b/service/amplify/api_op_ListDomainAssociations.go index 2351ebf3ebd..ed46d9a3f6d 100644 --- a/service/amplify/api_op_ListDomainAssociations.go +++ b/service/amplify/api_op_ListDomainAssociations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDomainAssociationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainAssociationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListDomainAssociationsMiddlewares(stack *middleware return nil } -// ListDomainAssociationsAPIClient is a client that implements the -// ListDomainAssociations operation. -type ListDomainAssociationsAPIClient interface { - ListDomainAssociations(context.Context, *ListDomainAssociationsInput, ...func(*Options)) (*ListDomainAssociationsOutput, error) -} - -var _ ListDomainAssociationsAPIClient = (*Client)(nil) - // ListDomainAssociationsPaginatorOptions is the paginator options for // ListDomainAssociations type ListDomainAssociationsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListDomainAssociationsPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListDomainAssociationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDomainAssociationsAPIClient is a client that implements the +// ListDomainAssociations operation. +type ListDomainAssociationsAPIClient interface { + ListDomainAssociations(context.Context, *ListDomainAssociationsInput, ...func(*Options)) (*ListDomainAssociationsOutput, error) +} + +var _ ListDomainAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplify/api_op_ListJobs.go b/service/amplify/api_op_ListJobs.go index e43f48af296..768f7cfbf34 100644 --- a/service/amplify/api_op_ListJobs.go +++ b/service/amplify/api_op_ListJobs.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobsValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of records to list in a single response. @@ -217,6 +213,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplify/api_op_ListTagsForResource.go b/service/amplify/api_op_ListTagsForResource.go index 7c92073fd0e..bb34c1ce641 100644 --- a/service/amplify/api_op_ListTagsForResource.go +++ b/service/amplify/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_ListWebhooks.go b/service/amplify/api_op_ListWebhooks.go index 27d1baa1e6c..09fa55ae473 100644 --- a/service/amplify/api_op_ListWebhooks.go +++ b/service/amplify/api_op_ListWebhooks.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListWebhooksMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWebhooksValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_StartDeployment.go b/service/amplify/api_op_StartDeployment.go index d673582ff83..9b37ff21061 100644 --- a/service/amplify/api_op_StartDeployment.go +++ b/service/amplify/api_op_StartDeployment.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartDeploymentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_StartJob.go b/service/amplify/api_op_StartJob.go index 1459e0da586..db9ba279c87 100644 --- a/service/amplify/api_op_StartJob.go +++ b/service/amplify/api_op_StartJob.go @@ -142,6 +142,9 @@ func (c *Client) addOperationStartJobMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_StopJob.go b/service/amplify/api_op_StopJob.go index 11c048829b6..2c8c6546433 100644 --- a/service/amplify/api_op_StopJob.go +++ b/service/amplify/api_op_StopJob.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStopJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_TagResource.go b/service/amplify/api_op_TagResource.go index 06dff78d06c..e52180acf91 100644 --- a/service/amplify/api_op_TagResource.go +++ b/service/amplify/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_UntagResource.go b/service/amplify/api_op_UntagResource.go index 01f03336964..81f7c92ddbf 100644 --- a/service/amplify/api_op_UntagResource.go +++ b/service/amplify/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_UpdateApp.go b/service/amplify/api_op_UpdateApp.go index 3edbd11ee49..f8a46576b4c 100644 --- a/service/amplify/api_op_UpdateApp.go +++ b/service/amplify/api_op_UpdateApp.go @@ -197,6 +197,9 @@ func (c *Client) addOperationUpdateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_UpdateBranch.go b/service/amplify/api_op_UpdateBranch.go index 9fd7c0e8982..eecc3eb01a8 100644 --- a/service/amplify/api_op_UpdateBranch.go +++ b/service/amplify/api_op_UpdateBranch.go @@ -177,6 +177,9 @@ func (c *Client) addOperationUpdateBranchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_UpdateDomainAssociation.go b/service/amplify/api_op_UpdateDomainAssociation.go index 2504405f8fe..2fb5b0591e4 100644 --- a/service/amplify/api_op_UpdateDomainAssociation.go +++ b/service/amplify/api_op_UpdateDomainAssociation.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateDomainAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplify/api_op_UpdateWebhook.go b/service/amplify/api_op_UpdateWebhook.go index eb4803f1c00..51c009dfc11 100644 --- a/service/amplify/api_op_UpdateWebhook.go +++ b/service/amplify/api_op_UpdateWebhook.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_client.go b/service/amplifybackend/api_client.go index 63524e53b04..03a3e18424a 100644 --- a/service/amplifybackend/api_client.go +++ b/service/amplifybackend/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/amplifybackend/api_op_CloneBackend.go b/service/amplifybackend/api_op_CloneBackend.go index 217d998d7f4..fdf203b957b 100644 --- a/service/amplifybackend/api_op_CloneBackend.go +++ b/service/amplifybackend/api_op_CloneBackend.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCloneBackendMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloneBackendValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_CreateBackend.go b/service/amplifybackend/api_op_CreateBackend.go index 72343914862..2924732a75f 100644 --- a/service/amplifybackend/api_op_CreateBackend.go +++ b/service/amplifybackend/api_op_CreateBackend.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateBackendMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackendValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_CreateBackendAPI.go b/service/amplifybackend/api_op_CreateBackendAPI.go index 545c4664caf..df5a8fe065e 100644 --- a/service/amplifybackend/api_op_CreateBackendAPI.go +++ b/service/amplifybackend/api_op_CreateBackendAPI.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateBackendAPIMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackendAPIValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_CreateBackendAuth.go b/service/amplifybackend/api_op_CreateBackendAuth.go index 394e51784b4..55701815dbc 100644 --- a/service/amplifybackend/api_op_CreateBackendAuth.go +++ b/service/amplifybackend/api_op_CreateBackendAuth.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateBackendAuthMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackendAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_CreateBackendConfig.go b/service/amplifybackend/api_op_CreateBackendConfig.go index 22f53738905..d3ededa6a10 100644 --- a/service/amplifybackend/api_op_CreateBackendConfig.go +++ b/service/amplifybackend/api_op_CreateBackendConfig.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateBackendConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackendConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_CreateBackendStorage.go b/service/amplifybackend/api_op_CreateBackendStorage.go index 4b32c7aedcb..f3eca98d1f0 100644 --- a/service/amplifybackend/api_op_CreateBackendStorage.go +++ b/service/amplifybackend/api_op_CreateBackendStorage.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateBackendStorageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackendStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_CreateToken.go b/service/amplifybackend/api_op_CreateToken.go index 10eb32f6855..468aab6b4a8 100644 --- a/service/amplifybackend/api_op_CreateToken.go +++ b/service/amplifybackend/api_op_CreateToken.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_DeleteBackend.go b/service/amplifybackend/api_op_DeleteBackend.go index 2b2caa808a8..047f34fb9a4 100644 --- a/service/amplifybackend/api_op_DeleteBackend.go +++ b/service/amplifybackend/api_op_DeleteBackend.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteBackendMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackendValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_DeleteBackendAPI.go b/service/amplifybackend/api_op_DeleteBackendAPI.go index 49ecf232549..f4d8a6b1e61 100644 --- a/service/amplifybackend/api_op_DeleteBackendAPI.go +++ b/service/amplifybackend/api_op_DeleteBackendAPI.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteBackendAPIMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackendAPIValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_DeleteBackendAuth.go b/service/amplifybackend/api_op_DeleteBackendAuth.go index 166397dbd60..ae058d7503e 100644 --- a/service/amplifybackend/api_op_DeleteBackendAuth.go +++ b/service/amplifybackend/api_op_DeleteBackendAuth.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteBackendAuthMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackendAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_DeleteBackendStorage.go b/service/amplifybackend/api_op_DeleteBackendStorage.go index 78330b9cbcb..1e131b6befa 100644 --- a/service/amplifybackend/api_op_DeleteBackendStorage.go +++ b/service/amplifybackend/api_op_DeleteBackendStorage.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteBackendStorageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackendStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_DeleteToken.go b/service/amplifybackend/api_op_DeleteToken.go index ae23db0cb35..e1c6e67c3ed 100644 --- a/service/amplifybackend/api_op_DeleteToken.go +++ b/service/amplifybackend/api_op_DeleteToken.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteTokenMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GenerateBackendAPIModels.go b/service/amplifybackend/api_op_GenerateBackendAPIModels.go index 72419b2297e..51d9478aec2 100644 --- a/service/amplifybackend/api_op_GenerateBackendAPIModels.go +++ b/service/amplifybackend/api_op_GenerateBackendAPIModels.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGenerateBackendAPIModelsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateBackendAPIModelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetBackend.go b/service/amplifybackend/api_op_GetBackend.go index 8b518d088ab..e7c0aa8f9e6 100644 --- a/service/amplifybackend/api_op_GetBackend.go +++ b/service/amplifybackend/api_op_GetBackend.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetBackendMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetBackendAPI.go b/service/amplifybackend/api_op_GetBackendAPI.go index 95db39b6d75..07d2d343465 100644 --- a/service/amplifybackend/api_op_GetBackendAPI.go +++ b/service/amplifybackend/api_op_GetBackendAPI.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetBackendAPIMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendAPIValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetBackendAPIModels.go b/service/amplifybackend/api_op_GetBackendAPIModels.go index 707a9d10190..16341cd2f18 100644 --- a/service/amplifybackend/api_op_GetBackendAPIModels.go +++ b/service/amplifybackend/api_op_GetBackendAPIModels.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetBackendAPIModelsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendAPIModelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetBackendAuth.go b/service/amplifybackend/api_op_GetBackendAuth.go index e4a6ea115fe..94fceda8e3a 100644 --- a/service/amplifybackend/api_op_GetBackendAuth.go +++ b/service/amplifybackend/api_op_GetBackendAuth.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetBackendAuthMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetBackendJob.go b/service/amplifybackend/api_op_GetBackendJob.go index 788f3d8469e..0c86a7dfb4e 100644 --- a/service/amplifybackend/api_op_GetBackendJob.go +++ b/service/amplifybackend/api_op_GetBackendJob.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetBackendJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetBackendStorage.go b/service/amplifybackend/api_op_GetBackendStorage.go index e1b629b0817..0b52251a4d1 100644 --- a/service/amplifybackend/api_op_GetBackendStorage.go +++ b/service/amplifybackend/api_op_GetBackendStorage.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetBackendStorageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackendStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_GetToken.go b/service/amplifybackend/api_op_GetToken.go index 9513d45606d..d052f9dfd16 100644 --- a/service/amplifybackend/api_op_GetToken.go +++ b/service/amplifybackend/api_op_GetToken.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetTokenMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_ImportBackendAuth.go b/service/amplifybackend/api_op_ImportBackendAuth.go index abd61de85ea..d9232a7201d 100644 --- a/service/amplifybackend/api_op_ImportBackendAuth.go +++ b/service/amplifybackend/api_op_ImportBackendAuth.go @@ -144,6 +144,9 @@ func (c *Client) addOperationImportBackendAuthMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportBackendAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_ImportBackendStorage.go b/service/amplifybackend/api_op_ImportBackendStorage.go index e6a53f48c32..fcd945f3cb4 100644 --- a/service/amplifybackend/api_op_ImportBackendStorage.go +++ b/service/amplifybackend/api_op_ImportBackendStorage.go @@ -129,6 +129,9 @@ func (c *Client) addOperationImportBackendStorageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportBackendStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_ListBackendJobs.go b/service/amplifybackend/api_op_ListBackendJobs.go index 74a859333d1..bfc81d6392f 100644 --- a/service/amplifybackend/api_op_ListBackendJobs.go +++ b/service/amplifybackend/api_op_ListBackendJobs.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListBackendJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBackendJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_ListS3Buckets.go b/service/amplifybackend/api_op_ListS3Buckets.go index 9a38b37345f..fbfda6c97a5 100644 --- a/service/amplifybackend/api_op_ListS3Buckets.go +++ b/service/amplifybackend/api_op_ListS3Buckets.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListS3BucketsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListS3Buckets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/amplifybackend/api_op_RemoveAllBackends.go b/service/amplifybackend/api_op_RemoveAllBackends.go index 093f2bdc224..86cb5d3b751 100644 --- a/service/amplifybackend/api_op_RemoveAllBackends.go +++ b/service/amplifybackend/api_op_RemoveAllBackends.go @@ -121,6 +121,9 @@ func (c *Client) addOperationRemoveAllBackendsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAllBackendsValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_RemoveBackendConfig.go b/service/amplifybackend/api_op_RemoveBackendConfig.go index 51b4cc9615f..abf4832b8a3 100644 --- a/service/amplifybackend/api_op_RemoveBackendConfig.go +++ b/service/amplifybackend/api_op_RemoveBackendConfig.go @@ -105,6 +105,9 @@ func (c *Client) addOperationRemoveBackendConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveBackendConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_UpdateBackendAPI.go b/service/amplifybackend/api_op_UpdateBackendAPI.go index fd19a205fc6..d41eb713816 100644 --- a/service/amplifybackend/api_op_UpdateBackendAPI.go +++ b/service/amplifybackend/api_op_UpdateBackendAPI.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateBackendAPIMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBackendAPIValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_UpdateBackendAuth.go b/service/amplifybackend/api_op_UpdateBackendAuth.go index 6e177eb48f6..90ee2977507 100644 --- a/service/amplifybackend/api_op_UpdateBackendAuth.go +++ b/service/amplifybackend/api_op_UpdateBackendAuth.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateBackendAuthMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBackendAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_UpdateBackendConfig.go b/service/amplifybackend/api_op_UpdateBackendConfig.go index 4aa8141a031..b123b4da5b6 100644 --- a/service/amplifybackend/api_op_UpdateBackendConfig.go +++ b/service/amplifybackend/api_op_UpdateBackendConfig.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateBackendConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBackendConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_UpdateBackendJob.go b/service/amplifybackend/api_op_UpdateBackendJob.go index 39a5d0e1edb..00de15fef0e 100644 --- a/service/amplifybackend/api_op_UpdateBackendJob.go +++ b/service/amplifybackend/api_op_UpdateBackendJob.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateBackendJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBackendJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifybackend/api_op_UpdateBackendStorage.go b/service/amplifybackend/api_op_UpdateBackendStorage.go index 4e2acc024de..00c89254ccd 100644 --- a/service/amplifybackend/api_op_UpdateBackendStorage.go +++ b/service/amplifybackend/api_op_UpdateBackendStorage.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateBackendStorageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBackendStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_client.go b/service/amplifyuibuilder/api_client.go index c3447764474..f895673cdde 100644 --- a/service/amplifyuibuilder/api_client.go +++ b/service/amplifyuibuilder/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/amplifyuibuilder/api_op_CreateComponent.go b/service/amplifyuibuilder/api_op_CreateComponent.go index 1d08be4d3c2..2d7d82f2094 100644 --- a/service/amplifyuibuilder/api_op_CreateComponent.go +++ b/service/amplifyuibuilder/api_op_CreateComponent.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_CreateForm.go b/service/amplifyuibuilder/api_op_CreateForm.go index b283b5878af..3dde1b0733a 100644 --- a/service/amplifyuibuilder/api_op_CreateForm.go +++ b/service/amplifyuibuilder/api_op_CreateForm.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateFormMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFormMiddleware(stack, options); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_CreateTheme.go b/service/amplifyuibuilder/api_op_CreateTheme.go index aac7599d177..bfb2c8fbc07 100644 --- a/service/amplifyuibuilder/api_op_CreateTheme.go +++ b/service/amplifyuibuilder/api_op_CreateTheme.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateThemeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateThemeMiddleware(stack, options); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_DeleteComponent.go b/service/amplifyuibuilder/api_op_DeleteComponent.go index 5bc1915ef8e..b7ec1c2e63f 100644 --- a/service/amplifyuibuilder/api_op_DeleteComponent.go +++ b/service/amplifyuibuilder/api_op_DeleteComponent.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_DeleteForm.go b/service/amplifyuibuilder/api_op_DeleteForm.go index 9a9de2d13ba..d5322e33a60 100644 --- a/service/amplifyuibuilder/api_op_DeleteForm.go +++ b/service/amplifyuibuilder/api_op_DeleteForm.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteFormMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFormValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_DeleteTheme.go b/service/amplifyuibuilder/api_op_DeleteTheme.go index 26f162ab60c..20f8eae3443 100644 --- a/service/amplifyuibuilder/api_op_DeleteTheme.go +++ b/service/amplifyuibuilder/api_op_DeleteTheme.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteThemeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go b/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go index ff8e6e9ca65..2563e672e15 100644 --- a/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go +++ b/service/amplifyuibuilder/api_op_ExchangeCodeForToken.go @@ -126,6 +126,9 @@ func (c *Client) addOperationExchangeCodeForTokenMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExchangeCodeForTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_ExportComponents.go b/service/amplifyuibuilder/api_op_ExportComponents.go index 26a859e18f4..57d30ffb779 100644 --- a/service/amplifyuibuilder/api_op_ExportComponents.go +++ b/service/amplifyuibuilder/api_op_ExportComponents.go @@ -120,6 +120,9 @@ func (c *Client) addOperationExportComponentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportComponentsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationExportComponentsMiddlewares(stack *middleware.Stack return nil } -// ExportComponentsAPIClient is a client that implements the ExportComponents -// operation. -type ExportComponentsAPIClient interface { - ExportComponents(context.Context, *ExportComponentsInput, ...func(*Options)) (*ExportComponentsOutput, error) -} - -var _ ExportComponentsAPIClient = (*Client)(nil) - // ExportComponentsPaginatorOptions is the paginator options for ExportComponents type ExportComponentsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -203,6 +198,9 @@ func (p *ExportComponentsPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ExportComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ExportComponentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ExportComponentsAPIClient is a client that implements the ExportComponents +// operation. +type ExportComponentsAPIClient interface { + ExportComponents(context.Context, *ExportComponentsInput, ...func(*Options)) (*ExportComponentsOutput, error) +} + +var _ ExportComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opExportComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_ExportForms.go b/service/amplifyuibuilder/api_op_ExportForms.go index 14e638b8432..5fd700e826d 100644 --- a/service/amplifyuibuilder/api_op_ExportForms.go +++ b/service/amplifyuibuilder/api_op_ExportForms.go @@ -120,6 +120,9 @@ func (c *Client) addOperationExportFormsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportFormsValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationExportFormsMiddlewares(stack *middleware.Stack, opt return nil } -// ExportFormsAPIClient is a client that implements the ExportForms operation. -type ExportFormsAPIClient interface { - ExportForms(context.Context, *ExportFormsInput, ...func(*Options)) (*ExportFormsOutput, error) -} - -var _ ExportFormsAPIClient = (*Client)(nil) - // ExportFormsPaginatorOptions is the paginator options for ExportForms type ExportFormsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -202,6 +198,9 @@ func (p *ExportFormsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ExportForms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +220,13 @@ func (p *ExportFormsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ExportFormsAPIClient is a client that implements the ExportForms operation. +type ExportFormsAPIClient interface { + ExportForms(context.Context, *ExportFormsInput, ...func(*Options)) (*ExportFormsOutput, error) +} + +var _ ExportFormsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opExportForms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_ExportThemes.go b/service/amplifyuibuilder/api_op_ExportThemes.go index 4b9ca63375e..49b16f362f2 100644 --- a/service/amplifyuibuilder/api_op_ExportThemes.go +++ b/service/amplifyuibuilder/api_op_ExportThemes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationExportThemesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportThemesValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationExportThemesMiddlewares(stack *middleware.Stack, op return nil } -// ExportThemesAPIClient is a client that implements the ExportThemes operation. -type ExportThemesAPIClient interface { - ExportThemes(context.Context, *ExportThemesInput, ...func(*Options)) (*ExportThemesOutput, error) -} - -var _ ExportThemesAPIClient = (*Client)(nil) - // ExportThemesPaginatorOptions is the paginator options for ExportThemes type ExportThemesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -202,6 +198,9 @@ func (p *ExportThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ExportThemes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +220,13 @@ func (p *ExportThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ExportThemesAPIClient is a client that implements the ExportThemes operation. +type ExportThemesAPIClient interface { + ExportThemes(context.Context, *ExportThemesInput, ...func(*Options)) (*ExportThemesOutput, error) +} + +var _ ExportThemesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opExportThemes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_GetCodegenJob.go b/service/amplifyuibuilder/api_op_GetCodegenJob.go index 3d1f6a352fe..387adcd248e 100644 --- a/service/amplifyuibuilder/api_op_GetCodegenJob.go +++ b/service/amplifyuibuilder/api_op_GetCodegenJob.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetCodegenJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCodegenJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_GetComponent.go b/service/amplifyuibuilder/api_op_GetComponent.go index 96e42664ecb..a12c5e461cd 100644 --- a/service/amplifyuibuilder/api_op_GetComponent.go +++ b/service/amplifyuibuilder/api_op_GetComponent.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_GetForm.go b/service/amplifyuibuilder/api_op_GetForm.go index 9a043be3b06..47f42b5af6f 100644 --- a/service/amplifyuibuilder/api_op_GetForm.go +++ b/service/amplifyuibuilder/api_op_GetForm.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetFormMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFormValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_GetMetadata.go b/service/amplifyuibuilder/api_op_GetMetadata.go index b5016b05a00..6050ec5c3b8 100644 --- a/service/amplifyuibuilder/api_op_GetMetadata.go +++ b/service/amplifyuibuilder/api_op_GetMetadata.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetMetadataMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_GetTheme.go b/service/amplifyuibuilder/api_op_GetTheme.go index 911e1f987ee..27e62b134be 100644 --- a/service/amplifyuibuilder/api_op_GetTheme.go +++ b/service/amplifyuibuilder/api_op_GetTheme.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetThemeMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetThemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_ListCodegenJobs.go b/service/amplifyuibuilder/api_op_ListCodegenJobs.go index 403f28a1892..2b743b257d6 100644 --- a/service/amplifyuibuilder/api_op_ListCodegenJobs.go +++ b/service/amplifyuibuilder/api_op_ListCodegenJobs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListCodegenJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCodegenJobsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListCodegenJobsMiddlewares(stack *middleware.Stack, return nil } -// ListCodegenJobsAPIClient is a client that implements the ListCodegenJobs -// operation. -type ListCodegenJobsAPIClient interface { - ListCodegenJobs(context.Context, *ListCodegenJobsInput, ...func(*Options)) (*ListCodegenJobsOutput, error) -} - -var _ ListCodegenJobsAPIClient = (*Client)(nil) - // ListCodegenJobsPaginatorOptions is the paginator options for ListCodegenJobs type ListCodegenJobsPaginatorOptions struct { // The maximum number of jobs to retrieve. @@ -218,6 +213,9 @@ func (p *ListCodegenJobsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCodegenJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListCodegenJobsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListCodegenJobsAPIClient is a client that implements the ListCodegenJobs +// operation. +type ListCodegenJobsAPIClient interface { + ListCodegenJobs(context.Context, *ListCodegenJobsInput, ...func(*Options)) (*ListCodegenJobsOutput, error) +} + +var _ ListCodegenJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCodegenJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_ListComponents.go b/service/amplifyuibuilder/api_op_ListComponents.go index d5f0600a49f..dbfdd046cf6 100644 --- a/service/amplifyuibuilder/api_op_ListComponents.go +++ b/service/amplifyuibuilder/api_op_ListComponents.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComponentsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum number of components to retrieve. @@ -218,6 +213,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_ListForms.go b/service/amplifyuibuilder/api_op_ListForms.go index 3e91e041416..f80eb0da986 100644 --- a/service/amplifyuibuilder/api_op_ListForms.go +++ b/service/amplifyuibuilder/api_op_ListForms.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListFormsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFormsValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListFormsMiddlewares(stack *middleware.Stack, optio return nil } -// ListFormsAPIClient is a client that implements the ListForms operation. -type ListFormsAPIClient interface { - ListForms(context.Context, *ListFormsInput, ...func(*Options)) (*ListFormsOutput, error) -} - -var _ ListFormsAPIClient = (*Client)(nil) - // ListFormsPaginatorOptions is the paginator options for ListForms type ListFormsPaginatorOptions struct { // The maximum number of forms to retrieve. @@ -216,6 +212,9 @@ func (p *ListFormsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListForms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListFormsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListFormsAPIClient is a client that implements the ListForms operation. +type ListFormsAPIClient interface { + ListForms(context.Context, *ListFormsInput, ...func(*Options)) (*ListFormsOutput, error) +} + +var _ ListFormsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListForms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_ListTagsForResource.go b/service/amplifyuibuilder/api_op_ListTagsForResource.go index 7cc5872ecf7..1de57741561 100644 --- a/service/amplifyuibuilder/api_op_ListTagsForResource.go +++ b/service/amplifyuibuilder/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_ListThemes.go b/service/amplifyuibuilder/api_op_ListThemes.go index 19646ac2074..5c1708aa16a 100644 --- a/service/amplifyuibuilder/api_op_ListThemes.go +++ b/service/amplifyuibuilder/api_op_ListThemes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListThemesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThemesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListThemesMiddlewares(stack *middleware.Stack, opti return nil } -// ListThemesAPIClient is a client that implements the ListThemes operation. -type ListThemesAPIClient interface { - ListThemes(context.Context, *ListThemesInput, ...func(*Options)) (*ListThemesOutput, error) -} - -var _ ListThemesAPIClient = (*Client)(nil) - // ListThemesPaginatorOptions is the paginator options for ListThemes type ListThemesPaginatorOptions struct { // The maximum number of theme results to return in the response. @@ -216,6 +212,9 @@ func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThemes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListThemesAPIClient is a client that implements the ListThemes operation. +type ListThemesAPIClient interface { + ListThemes(context.Context, *ListThemesInput, ...func(*Options)) (*ListThemesOutput, error) +} + +var _ ListThemesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThemes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/amplifyuibuilder/api_op_PutMetadataFlag.go b/service/amplifyuibuilder/api_op_PutMetadataFlag.go index 686e7dc145c..4f703e1b886 100644 --- a/service/amplifyuibuilder/api_op_PutMetadataFlag.go +++ b/service/amplifyuibuilder/api_op_PutMetadataFlag.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutMetadataFlagMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMetadataFlagValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_RefreshToken.go b/service/amplifyuibuilder/api_op_RefreshToken.go index bb34c9ea6e5..ccb39868789 100644 --- a/service/amplifyuibuilder/api_op_RefreshToken.go +++ b/service/amplifyuibuilder/api_op_RefreshToken.go @@ -121,6 +121,9 @@ func (c *Client) addOperationRefreshTokenMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRefreshTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_StartCodegenJob.go b/service/amplifyuibuilder/api_op_StartCodegenJob.go index c95a2c8dc08..17bf3981e88 100644 --- a/service/amplifyuibuilder/api_op_StartCodegenJob.go +++ b/service/amplifyuibuilder/api_op_StartCodegenJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStartCodegenJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartCodegenJobMiddleware(stack, options); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_TagResource.go b/service/amplifyuibuilder/api_op_TagResource.go index d76a4782ce9..ab891f704da 100644 --- a/service/amplifyuibuilder/api_op_TagResource.go +++ b/service/amplifyuibuilder/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_UntagResource.go b/service/amplifyuibuilder/api_op_UntagResource.go index ba4fb5a6d85..f027e6b8661 100644 --- a/service/amplifyuibuilder/api_op_UntagResource.go +++ b/service/amplifyuibuilder/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_UpdateComponent.go b/service/amplifyuibuilder/api_op_UpdateComponent.go index 1aef0586799..807142a073c 100644 --- a/service/amplifyuibuilder/api_op_UpdateComponent.go +++ b/service/amplifyuibuilder/api_op_UpdateComponent.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_UpdateForm.go b/service/amplifyuibuilder/api_op_UpdateForm.go index 23e96719af1..dfb8fd6b161 100644 --- a/service/amplifyuibuilder/api_op_UpdateForm.go +++ b/service/amplifyuibuilder/api_op_UpdateForm.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateFormMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFormMiddleware(stack, options); err != nil { return err } diff --git a/service/amplifyuibuilder/api_op_UpdateTheme.go b/service/amplifyuibuilder/api_op_UpdateTheme.go index 24674166158..439608d89c3 100644 --- a/service/amplifyuibuilder/api_op_UpdateTheme.go +++ b/service/amplifyuibuilder/api_op_UpdateTheme.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateThemeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateThemeMiddleware(stack, options); err != nil { return err } diff --git a/service/apigateway/api_client.go b/service/apigateway/api_client.go index 1595b3465c3..18a1994751b 100644 --- a/service/apigateway/api_client.go +++ b/service/apigateway/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/apigateway/api_op_CreateApiKey.go b/service/apigateway/api_op_CreateApiKey.go index cca0d6c0f56..e42bb28c04a 100644 --- a/service/apigateway/api_op_CreateApiKey.go +++ b/service/apigateway/api_op_CreateApiKey.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateApiKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApiKey(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigateway/api_op_CreateAuthorizer.go b/service/apigateway/api_op_CreateAuthorizer.go index f2f42ae77db..0c76ca6b3e1 100644 --- a/service/apigateway/api_op_CreateAuthorizer.go +++ b/service/apigateway/api_op_CreateAuthorizer.go @@ -257,6 +257,9 @@ func (c *Client) addOperationCreateAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateBasePathMapping.go b/service/apigateway/api_op_CreateBasePathMapping.go index 85d4297ae54..aee933d92e0 100644 --- a/service/apigateway/api_op_CreateBasePathMapping.go +++ b/service/apigateway/api_op_CreateBasePathMapping.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateBasePathMappingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBasePathMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateDeployment.go b/service/apigateway/api_op_CreateDeployment.go index 7c5470b9502..81b6f61c1ff 100644 --- a/service/apigateway/api_op_CreateDeployment.go +++ b/service/apigateway/api_op_CreateDeployment.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateDocumentationPart.go b/service/apigateway/api_op_CreateDocumentationPart.go index 8e93f2c6ad2..ab5b287c295 100644 --- a/service/apigateway/api_op_CreateDocumentationPart.go +++ b/service/apigateway/api_op_CreateDocumentationPart.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateDocumentationPartMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDocumentationPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateDocumentationVersion.go b/service/apigateway/api_op_CreateDocumentationVersion.go index 8b47ebe8454..80b9fd31823 100644 --- a/service/apigateway/api_op_CreateDocumentationVersion.go +++ b/service/apigateway/api_op_CreateDocumentationVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateDocumentationVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDocumentationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateDomainName.go b/service/apigateway/api_op_CreateDomainName.go index a2176fe0a31..11701f42249 100644 --- a/service/apigateway/api_op_CreateDomainName.go +++ b/service/apigateway/api_op_CreateDomainName.go @@ -246,6 +246,9 @@ func (c *Client) addOperationCreateDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateModel.go b/service/apigateway/api_op_CreateModel.go index 30bd6de8e52..ba7b0961457 100644 --- a/service/apigateway/api_op_CreateModel.go +++ b/service/apigateway/api_op_CreateModel.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateRequestValidator.go b/service/apigateway/api_op_CreateRequestValidator.go index 26cca1e9742..3cefd3ae0ba 100644 --- a/service/apigateway/api_op_CreateRequestValidator.go +++ b/service/apigateway/api_op_CreateRequestValidator.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateRequestValidatorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRequestValidatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateResource.go b/service/apigateway/api_op_CreateResource.go index b5c58c30ab8..c374b4573e8 100644 --- a/service/apigateway/api_op_CreateResource.go +++ b/service/apigateway/api_op_CreateResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateRestApi.go b/service/apigateway/api_op_CreateRestApi.go index 6731c94497f..669a229d7fc 100644 --- a/service/apigateway/api_op_CreateRestApi.go +++ b/service/apigateway/api_op_CreateRestApi.go @@ -210,6 +210,9 @@ func (c *Client) addOperationCreateRestApiMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRestApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateStage.go b/service/apigateway/api_op_CreateStage.go index 1152baf5e5c..04fbd0c4df3 100644 --- a/service/apigateway/api_op_CreateStage.go +++ b/service/apigateway/api_op_CreateStage.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateUsagePlan.go b/service/apigateway/api_op_CreateUsagePlan.go index a837e8ec6a8..c6f1da56c6e 100644 --- a/service/apigateway/api_op_CreateUsagePlan.go +++ b/service/apigateway/api_op_CreateUsagePlan.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateUsagePlanMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUsagePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateUsagePlanKey.go b/service/apigateway/api_op_CreateUsagePlanKey.go index 30b1b774e08..b1dc25e3ac6 100644 --- a/service/apigateway/api_op_CreateUsagePlanKey.go +++ b/service/apigateway/api_op_CreateUsagePlanKey.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateUsagePlanKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUsagePlanKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_CreateVpcLink.go b/service/apigateway/api_op_CreateVpcLink.go index 2f1983b5139..7d33c2410ea 100644 --- a/service/apigateway/api_op_CreateVpcLink.go +++ b/service/apigateway/api_op_CreateVpcLink.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateVpcLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteApiKey.go b/service/apigateway/api_op_DeleteApiKey.go index 0997b56997a..232484cf6d9 100644 --- a/service/apigateway/api_op_DeleteApiKey.go +++ b/service/apigateway/api_op_DeleteApiKey.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteApiKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteAuthorizer.go b/service/apigateway/api_op_DeleteAuthorizer.go index a844f13473d..30e625f5273 100644 --- a/service/apigateway/api_op_DeleteAuthorizer.go +++ b/service/apigateway/api_op_DeleteAuthorizer.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteBasePathMapping.go b/service/apigateway/api_op_DeleteBasePathMapping.go index fe7fff4dcf9..49c5f90cc00 100644 --- a/service/apigateway/api_op_DeleteBasePathMapping.go +++ b/service/apigateway/api_op_DeleteBasePathMapping.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteBasePathMappingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBasePathMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteClientCertificate.go b/service/apigateway/api_op_DeleteClientCertificate.go index 24838c5aa05..fa80dc52106 100644 --- a/service/apigateway/api_op_DeleteClientCertificate.go +++ b/service/apigateway/api_op_DeleteClientCertificate.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteClientCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClientCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteDeployment.go b/service/apigateway/api_op_DeleteDeployment.go index 68650d86cfe..329b64b85c0 100644 --- a/service/apigateway/api_op_DeleteDeployment.go +++ b/service/apigateway/api_op_DeleteDeployment.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteDocumentationPart.go b/service/apigateway/api_op_DeleteDocumentationPart.go index cecf83c1bb8..a99b3c73f57 100644 --- a/service/apigateway/api_op_DeleteDocumentationPart.go +++ b/service/apigateway/api_op_DeleteDocumentationPart.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDocumentationPartMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDocumentationPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteDocumentationVersion.go b/service/apigateway/api_op_DeleteDocumentationVersion.go index dc0a3c6e8a6..4757d5064ad 100644 --- a/service/apigateway/api_op_DeleteDocumentationVersion.go +++ b/service/apigateway/api_op_DeleteDocumentationVersion.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDocumentationVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDocumentationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteDomainName.go b/service/apigateway/api_op_DeleteDomainName.go index 35fc4811da9..8cd0ca5332c 100644 --- a/service/apigateway/api_op_DeleteDomainName.go +++ b/service/apigateway/api_op_DeleteDomainName.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteGatewayResponse.go b/service/apigateway/api_op_DeleteGatewayResponse.go index 1ffb58a4f2c..21025dcb70b 100644 --- a/service/apigateway/api_op_DeleteGatewayResponse.go +++ b/service/apigateway/api_op_DeleteGatewayResponse.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteGatewayResponseMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGatewayResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteIntegration.go b/service/apigateway/api_op_DeleteIntegration.go index 2de75074977..3c07d2134dd 100644 --- a/service/apigateway/api_op_DeleteIntegration.go +++ b/service/apigateway/api_op_DeleteIntegration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteIntegrationResponse.go b/service/apigateway/api_op_DeleteIntegrationResponse.go index 1c931ee5169..d550df04f40 100644 --- a/service/apigateway/api_op_DeleteIntegrationResponse.go +++ b/service/apigateway/api_op_DeleteIntegrationResponse.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteIntegrationResponseMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteMethod.go b/service/apigateway/api_op_DeleteMethod.go index 88bef7f84fe..e915c673f7a 100644 --- a/service/apigateway/api_op_DeleteMethod.go +++ b/service/apigateway/api_op_DeleteMethod.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteMethodMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteMethodResponse.go b/service/apigateway/api_op_DeleteMethodResponse.go index 60cf4368fed..0e7d26458af 100644 --- a/service/apigateway/api_op_DeleteMethodResponse.go +++ b/service/apigateway/api_op_DeleteMethodResponse.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteMethodResponseMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMethodResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteModel.go b/service/apigateway/api_op_DeleteModel.go index 5f6c3c8a185..ce08539d9b7 100644 --- a/service/apigateway/api_op_DeleteModel.go +++ b/service/apigateway/api_op_DeleteModel.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteRequestValidator.go b/service/apigateway/api_op_DeleteRequestValidator.go index 9fa9337aeee..1462b59aee6 100644 --- a/service/apigateway/api_op_DeleteRequestValidator.go +++ b/service/apigateway/api_op_DeleteRequestValidator.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteRequestValidatorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRequestValidatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteResource.go b/service/apigateway/api_op_DeleteResource.go index c21af017673..70b4c1c5ae1 100644 --- a/service/apigateway/api_op_DeleteResource.go +++ b/service/apigateway/api_op_DeleteResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteRestApi.go b/service/apigateway/api_op_DeleteRestApi.go index 9c608793ce0..12e7370bdff 100644 --- a/service/apigateway/api_op_DeleteRestApi.go +++ b/service/apigateway/api_op_DeleteRestApi.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRestApiMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRestApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteStage.go b/service/apigateway/api_op_DeleteStage.go index 188f4c5754f..92329a70676 100644 --- a/service/apigateway/api_op_DeleteStage.go +++ b/service/apigateway/api_op_DeleteStage.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteUsagePlan.go b/service/apigateway/api_op_DeleteUsagePlan.go index 8230602a17f..8d1ce8107fd 100644 --- a/service/apigateway/api_op_DeleteUsagePlan.go +++ b/service/apigateway/api_op_DeleteUsagePlan.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteUsagePlanMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUsagePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteUsagePlanKey.go b/service/apigateway/api_op_DeleteUsagePlanKey.go index e6320f06b35..819e7addaff 100644 --- a/service/apigateway/api_op_DeleteUsagePlanKey.go +++ b/service/apigateway/api_op_DeleteUsagePlanKey.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteUsagePlanKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUsagePlanKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_DeleteVpcLink.go b/service/apigateway/api_op_DeleteVpcLink.go index 64837ec9285..3f2bb24ae80 100644 --- a/service/apigateway/api_op_DeleteVpcLink.go +++ b/service/apigateway/api_op_DeleteVpcLink.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteVpcLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_FlushStageAuthorizersCache.go b/service/apigateway/api_op_FlushStageAuthorizersCache.go index 02822ab42c6..d0eb253949e 100644 --- a/service/apigateway/api_op_FlushStageAuthorizersCache.go +++ b/service/apigateway/api_op_FlushStageAuthorizersCache.go @@ -107,6 +107,9 @@ func (c *Client) addOperationFlushStageAuthorizersCacheMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFlushStageAuthorizersCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_FlushStageCache.go b/service/apigateway/api_op_FlushStageCache.go index b36a36fffc7..42224551e3f 100644 --- a/service/apigateway/api_op_FlushStageCache.go +++ b/service/apigateway/api_op_FlushStageCache.go @@ -107,6 +107,9 @@ func (c *Client) addOperationFlushStageCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFlushStageCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GenerateClientCertificate.go b/service/apigateway/api_op_GenerateClientCertificate.go index 64b6ccf469d..0cd9db188da 100644 --- a/service/apigateway/api_op_GenerateClientCertificate.go +++ b/service/apigateway/api_op_GenerateClientCertificate.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGenerateClientCertificateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateClientCertificate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigateway/api_op_GetAccount.go b/service/apigateway/api_op_GetAccount.go index c3d26cf67c8..f91be877b8c 100644 --- a/service/apigateway/api_op_GetAccount.go +++ b/service/apigateway/api_op_GetAccount.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAccountMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigateway/api_op_GetApiKey.go b/service/apigateway/api_op_GetApiKey.go index f0d4a4ef70b..c2f7c52ef43 100644 --- a/service/apigateway/api_op_GetApiKey.go +++ b/service/apigateway/api_op_GetApiKey.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetApiKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetApiKeys.go b/service/apigateway/api_op_GetApiKeys.go index 2db66ba1c93..c78df16949f 100644 --- a/service/apigateway/api_op_GetApiKeys.go +++ b/service/apigateway/api_op_GetApiKeys.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetApiKeysMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApiKeys(options.Region), middleware.Before); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationGetApiKeysMiddlewares(stack *middleware.Stack, opti return nil } -// GetApiKeysAPIClient is a client that implements the GetApiKeys operation. -type GetApiKeysAPIClient interface { - GetApiKeys(context.Context, *GetApiKeysInput, ...func(*Options)) (*GetApiKeysOutput, error) -} - -var _ GetApiKeysAPIClient = (*Client)(nil) - // GetApiKeysPaginatorOptions is the paginator options for GetApiKeys type GetApiKeysPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -223,6 +219,9 @@ func (p *GetApiKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetApiKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *GetApiKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// GetApiKeysAPIClient is a client that implements the GetApiKeys operation. +type GetApiKeysAPIClient interface { + GetApiKeys(context.Context, *GetApiKeysInput, ...func(*Options)) (*GetApiKeysOutput, error) +} + +var _ GetApiKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetApiKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetAuthorizer.go b/service/apigateway/api_op_GetAuthorizer.go index cd510316763..4c01d54326b 100644 --- a/service/apigateway/api_op_GetAuthorizer.go +++ b/service/apigateway/api_op_GetAuthorizer.go @@ -186,6 +186,9 @@ func (c *Client) addOperationGetAuthorizerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetAuthorizers.go b/service/apigateway/api_op_GetAuthorizers.go index b4b3cae32c7..e11127d8079 100644 --- a/service/apigateway/api_op_GetAuthorizers.go +++ b/service/apigateway/api_op_GetAuthorizers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetAuthorizersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAuthorizersValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetBasePathMapping.go b/service/apigateway/api_op_GetBasePathMapping.go index 74a1083ac18..ad50f98eb97 100644 --- a/service/apigateway/api_op_GetBasePathMapping.go +++ b/service/apigateway/api_op_GetBasePathMapping.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetBasePathMappingMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBasePathMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetBasePathMappings.go b/service/apigateway/api_op_GetBasePathMappings.go index 4a90746d41f..2ec89861222 100644 --- a/service/apigateway/api_op_GetBasePathMappings.go +++ b/service/apigateway/api_op_GetBasePathMappings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetBasePathMappingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBasePathMappingsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetBasePathMappingsMiddlewares(stack *middleware.St return nil } -// GetBasePathMappingsAPIClient is a client that implements the -// GetBasePathMappings operation. -type GetBasePathMappingsAPIClient interface { - GetBasePathMappings(context.Context, *GetBasePathMappingsInput, ...func(*Options)) (*GetBasePathMappingsOutput, error) -} - -var _ GetBasePathMappingsAPIClient = (*Client)(nil) - // GetBasePathMappingsPaginatorOptions is the paginator options for // GetBasePathMappings type GetBasePathMappingsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetBasePathMappingsPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBasePathMappings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetBasePathMappingsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetBasePathMappingsAPIClient is a client that implements the +// GetBasePathMappings operation. +type GetBasePathMappingsAPIClient interface { + GetBasePathMappings(context.Context, *GetBasePathMappingsInput, ...func(*Options)) (*GetBasePathMappingsOutput, error) +} + +var _ GetBasePathMappingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBasePathMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetClientCertificate.go b/service/apigateway/api_op_GetClientCertificate.go index 62587d87187..b03d4de4507 100644 --- a/service/apigateway/api_op_GetClientCertificate.go +++ b/service/apigateway/api_op_GetClientCertificate.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetClientCertificateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClientCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetClientCertificates.go b/service/apigateway/api_op_GetClientCertificates.go index c865b2988b7..941e4370007 100644 --- a/service/apigateway/api_op_GetClientCertificates.go +++ b/service/apigateway/api_op_GetClientCertificates.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetClientCertificatesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetClientCertificates(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationGetClientCertificatesMiddlewares(stack *middleware. return nil } -// GetClientCertificatesAPIClient is a client that implements the -// GetClientCertificates operation. -type GetClientCertificatesAPIClient interface { - GetClientCertificates(context.Context, *GetClientCertificatesInput, ...func(*Options)) (*GetClientCertificatesOutput, error) -} - -var _ GetClientCertificatesAPIClient = (*Client)(nil) - // GetClientCertificatesPaginatorOptions is the paginator options for // GetClientCertificates type GetClientCertificatesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *GetClientCertificatesPaginator) NextPage(ctx context.Context, optFns .. } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetClientCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *GetClientCertificatesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// GetClientCertificatesAPIClient is a client that implements the +// GetClientCertificates operation. +type GetClientCertificatesAPIClient interface { + GetClientCertificates(context.Context, *GetClientCertificatesInput, ...func(*Options)) (*GetClientCertificatesOutput, error) +} + +var _ GetClientCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetClientCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetDeployment.go b/service/apigateway/api_op_GetDeployment.go index 4040773860d..f1604f12b68 100644 --- a/service/apigateway/api_op_GetDeployment.go +++ b/service/apigateway/api_op_GetDeployment.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetDeployments.go b/service/apigateway/api_op_GetDeployments.go index f00cb912436..34b5db000e4 100644 --- a/service/apigateway/api_op_GetDeployments.go +++ b/service/apigateway/api_op_GetDeployments.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationGetDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// GetDeploymentsAPIClient is a client that implements the GetDeployments -// operation. -type GetDeploymentsAPIClient interface { - GetDeployments(context.Context, *GetDeploymentsInput, ...func(*Options)) (*GetDeploymentsOutput, error) -} - -var _ GetDeploymentsAPIClient = (*Client)(nil) - // GetDeploymentsPaginatorOptions is the paginator options for GetDeployments type GetDeploymentsPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -219,6 +214,9 @@ func (p *GetDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *GetDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetDeploymentsAPIClient is a client that implements the GetDeployments +// operation. +type GetDeploymentsAPIClient interface { + GetDeployments(context.Context, *GetDeploymentsInput, ...func(*Options)) (*GetDeploymentsOutput, error) +} + +var _ GetDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetDocumentationPart.go b/service/apigateway/api_op_GetDocumentationPart.go index fd321e33580..cbc2c3bef24 100644 --- a/service/apigateway/api_op_GetDocumentationPart.go +++ b/service/apigateway/api_op_GetDocumentationPart.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetDocumentationPartMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentationPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetDocumentationParts.go b/service/apigateway/api_op_GetDocumentationParts.go index e3014119106..650f8fdc3bd 100644 --- a/service/apigateway/api_op_GetDocumentationParts.go +++ b/service/apigateway/api_op_GetDocumentationParts.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetDocumentationPartsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentationPartsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetDocumentationVersion.go b/service/apigateway/api_op_GetDocumentationVersion.go index d4b60bd6574..e1662241665 100644 --- a/service/apigateway/api_op_GetDocumentationVersion.go +++ b/service/apigateway/api_op_GetDocumentationVersion.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetDocumentationVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetDocumentationVersions.go b/service/apigateway/api_op_GetDocumentationVersions.go index f5093333041..4a3e649370f 100644 --- a/service/apigateway/api_op_GetDocumentationVersions.go +++ b/service/apigateway/api_op_GetDocumentationVersions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDocumentationVersionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentationVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetDomainName.go b/service/apigateway/api_op_GetDomainName.go index f1d6a79a5dd..a2cda9c5621 100644 --- a/service/apigateway/api_op_GetDomainName.go +++ b/service/apigateway/api_op_GetDomainName.go @@ -188,6 +188,9 @@ func (c *Client) addOperationGetDomainNameMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetDomainNames.go b/service/apigateway/api_op_GetDomainNames.go index 427b8bf0bf9..30b93bb55cd 100644 --- a/service/apigateway/api_op_GetDomainNames.go +++ b/service/apigateway/api_op_GetDomainNames.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetDomainNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomainNames(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationGetDomainNamesMiddlewares(stack *middleware.Stack, return nil } -// GetDomainNamesAPIClient is a client that implements the GetDomainNames -// operation. -type GetDomainNamesAPIClient interface { - GetDomainNames(context.Context, *GetDomainNamesInput, ...func(*Options)) (*GetDomainNamesOutput, error) -} - -var _ GetDomainNamesAPIClient = (*Client)(nil) - // GetDomainNamesPaginatorOptions is the paginator options for GetDomainNames type GetDomainNamesPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -209,6 +204,9 @@ func (p *GetDomainNamesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDomainNames(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *GetDomainNamesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetDomainNamesAPIClient is a client that implements the GetDomainNames +// operation. +type GetDomainNamesAPIClient interface { + GetDomainNames(context.Context, *GetDomainNamesInput, ...func(*Options)) (*GetDomainNamesOutput, error) +} + +var _ GetDomainNamesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDomainNames(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetExport.go b/service/apigateway/api_op_GetExport.go index 0ebe7937d2a..85439a0c4fb 100644 --- a/service/apigateway/api_op_GetExport.go +++ b/service/apigateway/api_op_GetExport.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetExportMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetGatewayResponse.go b/service/apigateway/api_op_GetGatewayResponse.go index fe7a356427c..f904c571c24 100644 --- a/service/apigateway/api_op_GetGatewayResponse.go +++ b/service/apigateway/api_op_GetGatewayResponse.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetGatewayResponseMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGatewayResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetGatewayResponses.go b/service/apigateway/api_op_GetGatewayResponses.go index bc0628b1f94..59c4a191402 100644 --- a/service/apigateway/api_op_GetGatewayResponses.go +++ b/service/apigateway/api_op_GetGatewayResponses.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetGatewayResponsesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGatewayResponsesValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetIntegration.go b/service/apigateway/api_op_GetIntegration.go index 0824c6cf516..84576589550 100644 --- a/service/apigateway/api_op_GetIntegration.go +++ b/service/apigateway/api_op_GetIntegration.go @@ -233,6 +233,9 @@ func (c *Client) addOperationGetIntegrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetIntegrationResponse.go b/service/apigateway/api_op_GetIntegrationResponse.go index 1218ef53ef1..2573b20dbe2 100644 --- a/service/apigateway/api_op_GetIntegrationResponse.go +++ b/service/apigateway/api_op_GetIntegrationResponse.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetIntegrationResponseMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetMethod.go b/service/apigateway/api_op_GetMethod.go index 51a48ceb6d1..f3e2dd58de3 100644 --- a/service/apigateway/api_op_GetMethod.go +++ b/service/apigateway/api_op_GetMethod.go @@ -182,6 +182,9 @@ func (c *Client) addOperationGetMethodMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetMethodResponse.go b/service/apigateway/api_op_GetMethodResponse.go index 1533354167b..13fb3a66020 100644 --- a/service/apigateway/api_op_GetMethodResponse.go +++ b/service/apigateway/api_op_GetMethodResponse.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetMethodResponseMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMethodResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetModel.go b/service/apigateway/api_op_GetModel.go index 266f8df9e2d..60335184751 100644 --- a/service/apigateway/api_op_GetModel.go +++ b/service/apigateway/api_op_GetModel.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetModelMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetModelTemplate.go b/service/apigateway/api_op_GetModelTemplate.go index ab361c1994b..240b30a0fd0 100644 --- a/service/apigateway/api_op_GetModelTemplate.go +++ b/service/apigateway/api_op_GetModelTemplate.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetModelTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetModels.go b/service/apigateway/api_op_GetModels.go index 71ea48b6a07..c8c30067d90 100644 --- a/service/apigateway/api_op_GetModels.go +++ b/service/apigateway/api_op_GetModels.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetModelsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationGetModelsMiddlewares(stack *middleware.Stack, optio return nil } -// GetModelsAPIClient is a client that implements the GetModels operation. -type GetModelsAPIClient interface { - GetModels(context.Context, *GetModelsInput, ...func(*Options)) (*GetModelsOutput, error) -} - -var _ GetModelsAPIClient = (*Client)(nil) - // GetModelsPaginatorOptions is the paginator options for GetModels type GetModelsPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -216,6 +212,9 @@ func (p *GetModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *GetModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// GetModelsAPIClient is a client that implements the GetModels operation. +type GetModelsAPIClient interface { + GetModels(context.Context, *GetModelsInput, ...func(*Options)) (*GetModelsOutput, error) +} + +var _ GetModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetRequestValidator.go b/service/apigateway/api_op_GetRequestValidator.go index 308f7c6c9f4..5a74fcff4d2 100644 --- a/service/apigateway/api_op_GetRequestValidator.go +++ b/service/apigateway/api_op_GetRequestValidator.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetRequestValidatorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRequestValidatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetRequestValidators.go b/service/apigateway/api_op_GetRequestValidators.go index c82576847c1..a1ce9954f30 100644 --- a/service/apigateway/api_op_GetRequestValidators.go +++ b/service/apigateway/api_op_GetRequestValidators.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetRequestValidatorsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRequestValidatorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetResource.go b/service/apigateway/api_op_GetResource.go index 1e42f301baa..99c54fe53e1 100644 --- a/service/apigateway/api_op_GetResource.go +++ b/service/apigateway/api_op_GetResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetResources.go b/service/apigateway/api_op_GetResources.go index 70b3d3ff9a0..41394afad37 100644 --- a/service/apigateway/api_op_GetResources.go +++ b/service/apigateway/api_op_GetResources.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetResourcesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcesValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationGetResourcesMiddlewares(stack *middleware.Stack, op return nil } -// GetResourcesAPIClient is a client that implements the GetResources operation. -type GetResourcesAPIClient interface { - GetResources(context.Context, *GetResourcesInput, ...func(*Options)) (*GetResourcesOutput, error) -} - -var _ GetResourcesAPIClient = (*Client)(nil) - // GetResourcesPaginatorOptions is the paginator options for GetResources type GetResourcesPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -224,6 +220,9 @@ func (p *GetResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *GetResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetResourcesAPIClient is a client that implements the GetResources operation. +type GetResourcesAPIClient interface { + GetResources(context.Context, *GetResourcesInput, ...func(*Options)) (*GetResourcesOutput, error) +} + +var _ GetResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetRestApi.go b/service/apigateway/api_op_GetRestApi.go index 56a0696e786..bf542de6960 100644 --- a/service/apigateway/api_op_GetRestApi.go +++ b/service/apigateway/api_op_GetRestApi.go @@ -164,6 +164,9 @@ func (c *Client) addOperationGetRestApiMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRestApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetRestApis.go b/service/apigateway/api_op_GetRestApis.go index e691db1fc3e..0cdba5c491d 100644 --- a/service/apigateway/api_op_GetRestApis.go +++ b/service/apigateway/api_op_GetRestApis.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetRestApisMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRestApis(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationGetRestApisMiddlewares(stack *middleware.Stack, opt return nil } -// GetRestApisAPIClient is a client that implements the GetRestApis operation. -type GetRestApisAPIClient interface { - GetRestApis(context.Context, *GetRestApisInput, ...func(*Options)) (*GetRestApisOutput, error) -} - -var _ GetRestApisAPIClient = (*Client)(nil) - // GetRestApisPaginatorOptions is the paginator options for GetRestApis type GetRestApisPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -209,6 +205,9 @@ func (p *GetRestApisPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetRestApis(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *GetRestApisPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetRestApisAPIClient is a client that implements the GetRestApis operation. +type GetRestApisAPIClient interface { + GetRestApis(context.Context, *GetRestApisInput, ...func(*Options)) (*GetRestApisOutput, error) +} + +var _ GetRestApisAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRestApis(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetSdk.go b/service/apigateway/api_op_GetSdk.go index 2a7949b9add..3a339ae09ce 100644 --- a/service/apigateway/api_op_GetSdk.go +++ b/service/apigateway/api_op_GetSdk.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetSdkMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSdkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetSdkType.go b/service/apigateway/api_op_GetSdkType.go index 573f9a2daef..13328c3529d 100644 --- a/service/apigateway/api_op_GetSdkType.go +++ b/service/apigateway/api_op_GetSdkType.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetSdkTypeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSdkTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetSdkTypes.go b/service/apigateway/api_op_GetSdkTypes.go index 4dacc36ece8..4fb5fa0fcd8 100644 --- a/service/apigateway/api_op_GetSdkTypes.go +++ b/service/apigateway/api_op_GetSdkTypes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSdkTypesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSdkTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigateway/api_op_GetStage.go b/service/apigateway/api_op_GetStage.go index ec3ea5b22cb..63e1aa74354 100644 --- a/service/apigateway/api_op_GetStage.go +++ b/service/apigateway/api_op_GetStage.go @@ -175,6 +175,9 @@ func (c *Client) addOperationGetStageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetStages.go b/service/apigateway/api_op_GetStages.go index 71cd12ea250..6127fa3c6f0 100644 --- a/service/apigateway/api_op_GetStages.go +++ b/service/apigateway/api_op_GetStages.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetStagesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetTags.go b/service/apigateway/api_op_GetTags.go index 94152b29e34..212cbb3b127 100644 --- a/service/apigateway/api_op_GetTags.go +++ b/service/apigateway/api_op_GetTags.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetUsage.go b/service/apigateway/api_op_GetUsage.go index d96bc6e7d52..b69f1524d3a 100644 --- a/service/apigateway/api_op_GetUsage.go +++ b/service/apigateway/api_op_GetUsage.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetUsageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsageValidationMiddleware(stack); err != nil { return err } @@ -171,13 +174,6 @@ func (c *Client) addOperationGetUsageMiddlewares(stack *middleware.Stack, option return nil } -// GetUsageAPIClient is a client that implements the GetUsage operation. -type GetUsageAPIClient interface { - GetUsage(context.Context, *GetUsageInput, ...func(*Options)) (*GetUsageOutput, error) -} - -var _ GetUsageAPIClient = (*Client)(nil) - // GetUsagePaginatorOptions is the paginator options for GetUsage type GetUsagePaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -242,6 +238,9 @@ func (p *GetUsagePaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUsage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +260,13 @@ func (p *GetUsagePaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// GetUsageAPIClient is a client that implements the GetUsage operation. +type GetUsageAPIClient interface { + GetUsage(context.Context, *GetUsageInput, ...func(*Options)) (*GetUsageOutput, error) +} + +var _ GetUsageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUsage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetUsagePlan.go b/service/apigateway/api_op_GetUsagePlan.go index cc65e2af008..08ca11d30e7 100644 --- a/service/apigateway/api_op_GetUsagePlan.go +++ b/service/apigateway/api_op_GetUsagePlan.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetUsagePlanMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsagePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetUsagePlanKey.go b/service/apigateway/api_op_GetUsagePlanKey.go index 2c60ccf1c05..f2ac051ad93 100644 --- a/service/apigateway/api_op_GetUsagePlanKey.go +++ b/service/apigateway/api_op_GetUsagePlanKey.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetUsagePlanKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsagePlanKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetUsagePlanKeys.go b/service/apigateway/api_op_GetUsagePlanKeys.go index 8b267b044e1..94151b30bfe 100644 --- a/service/apigateway/api_op_GetUsagePlanKeys.go +++ b/service/apigateway/api_op_GetUsagePlanKeys.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetUsagePlanKeysMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsagePlanKeysValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationGetUsagePlanKeysMiddlewares(stack *middleware.Stack return nil } -// GetUsagePlanKeysAPIClient is a client that implements the GetUsagePlanKeys -// operation. -type GetUsagePlanKeysAPIClient interface { - GetUsagePlanKeys(context.Context, *GetUsagePlanKeysInput, ...func(*Options)) (*GetUsagePlanKeysOutput, error) -} - -var _ GetUsagePlanKeysAPIClient = (*Client)(nil) - // GetUsagePlanKeysPaginatorOptions is the paginator options for GetUsagePlanKeys type GetUsagePlanKeysPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -224,6 +219,9 @@ func (p *GetUsagePlanKeysPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUsagePlanKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *GetUsagePlanKeysPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetUsagePlanKeysAPIClient is a client that implements the GetUsagePlanKeys +// operation. +type GetUsagePlanKeysAPIClient interface { + GetUsagePlanKeys(context.Context, *GetUsagePlanKeysInput, ...func(*Options)) (*GetUsagePlanKeysOutput, error) +} + +var _ GetUsagePlanKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUsagePlanKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetUsagePlans.go b/service/apigateway/api_op_GetUsagePlans.go index 393bcca34d8..e73d96094cb 100644 --- a/service/apigateway/api_op_GetUsagePlans.go +++ b/service/apigateway/api_op_GetUsagePlans.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetUsagePlansMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUsagePlans(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationGetUsagePlansMiddlewares(stack *middleware.Stack, o return nil } -// GetUsagePlansAPIClient is a client that implements the GetUsagePlans operation. -type GetUsagePlansAPIClient interface { - GetUsagePlans(context.Context, *GetUsagePlansInput, ...func(*Options)) (*GetUsagePlansOutput, error) -} - -var _ GetUsagePlansAPIClient = (*Client)(nil) - // GetUsagePlansPaginatorOptions is the paginator options for GetUsagePlans type GetUsagePlansPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -211,6 +207,9 @@ func (p *GetUsagePlansPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUsagePlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *GetUsagePlansPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetUsagePlansAPIClient is a client that implements the GetUsagePlans operation. +type GetUsagePlansAPIClient interface { + GetUsagePlans(context.Context, *GetUsagePlansInput, ...func(*Options)) (*GetUsagePlansOutput, error) +} + +var _ GetUsagePlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUsagePlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_GetVpcLink.go b/service/apigateway/api_op_GetVpcLink.go index 426eacd06d4..226f0d071fd 100644 --- a/service/apigateway/api_op_GetVpcLink.go +++ b/service/apigateway/api_op_GetVpcLink.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetVpcLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_GetVpcLinks.go b/service/apigateway/api_op_GetVpcLinks.go index a84b07d4e2a..6c4242a6c86 100644 --- a/service/apigateway/api_op_GetVpcLinks.go +++ b/service/apigateway/api_op_GetVpcLinks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetVpcLinksMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpcLinks(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationGetVpcLinksMiddlewares(stack *middleware.Stack, opt return nil } -// GetVpcLinksAPIClient is a client that implements the GetVpcLinks operation. -type GetVpcLinksAPIClient interface { - GetVpcLinks(context.Context, *GetVpcLinksInput, ...func(*Options)) (*GetVpcLinksOutput, error) -} - -var _ GetVpcLinksAPIClient = (*Client)(nil) - // GetVpcLinksPaginatorOptions is the paginator options for GetVpcLinks type GetVpcLinksPaginatorOptions struct { // The maximum number of returned results per page. The default value is 25 and @@ -208,6 +204,9 @@ func (p *GetVpcLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetVpcLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *GetVpcLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetVpcLinksAPIClient is a client that implements the GetVpcLinks operation. +type GetVpcLinksAPIClient interface { + GetVpcLinks(context.Context, *GetVpcLinksInput, ...func(*Options)) (*GetVpcLinksOutput, error) +} + +var _ GetVpcLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetVpcLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apigateway/api_op_ImportApiKeys.go b/service/apigateway/api_op_ImportApiKeys.go index f58f50222db..be84e7c3621 100644 --- a/service/apigateway/api_op_ImportApiKeys.go +++ b/service/apigateway/api_op_ImportApiKeys.go @@ -123,6 +123,9 @@ func (c *Client) addOperationImportApiKeysMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportApiKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_ImportDocumentationParts.go b/service/apigateway/api_op_ImportDocumentationParts.go index 5141aa96f06..766c13b5e2d 100644 --- a/service/apigateway/api_op_ImportDocumentationParts.go +++ b/service/apigateway/api_op_ImportDocumentationParts.go @@ -127,6 +127,9 @@ func (c *Client) addOperationImportDocumentationPartsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportDocumentationPartsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_ImportRestApi.go b/service/apigateway/api_op_ImportRestApi.go index 9e8f2bc2003..2cb1d23996f 100644 --- a/service/apigateway/api_op_ImportRestApi.go +++ b/service/apigateway/api_op_ImportRestApi.go @@ -187,6 +187,9 @@ func (c *Client) addOperationImportRestApiMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportRestApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_PutGatewayResponse.go b/service/apigateway/api_op_PutGatewayResponse.go index 4cbb95a3394..d654b7016aa 100644 --- a/service/apigateway/api_op_PutGatewayResponse.go +++ b/service/apigateway/api_op_PutGatewayResponse.go @@ -143,6 +143,9 @@ func (c *Client) addOperationPutGatewayResponseMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutGatewayResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_PutIntegration.go b/service/apigateway/api_op_PutIntegration.go index 6ec602758a9..44d8c7ab7f4 100644 --- a/service/apigateway/api_op_PutIntegration.go +++ b/service/apigateway/api_op_PutIntegration.go @@ -322,6 +322,9 @@ func (c *Client) addOperationPutIntegrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_PutIntegrationResponse.go b/service/apigateway/api_op_PutIntegrationResponse.go index 1e82b7b523e..54a60062ce1 100644 --- a/service/apigateway/api_op_PutIntegrationResponse.go +++ b/service/apigateway/api_op_PutIntegrationResponse.go @@ -188,6 +188,9 @@ func (c *Client) addOperationPutIntegrationResponseMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_PutMethod.go b/service/apigateway/api_op_PutMethod.go index ddaa3eb0eef..c3788d76644 100644 --- a/service/apigateway/api_op_PutMethod.go +++ b/service/apigateway/api_op_PutMethod.go @@ -230,6 +230,9 @@ func (c *Client) addOperationPutMethodMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_PutMethodResponse.go b/service/apigateway/api_op_PutMethodResponse.go index 51bdd507fe4..a01debf7a5e 100644 --- a/service/apigateway/api_op_PutMethodResponse.go +++ b/service/apigateway/api_op_PutMethodResponse.go @@ -163,6 +163,9 @@ func (c *Client) addOperationPutMethodResponseMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMethodResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_PutRestApi.go b/service/apigateway/api_op_PutRestApi.go index 1368e1ef936..3a2d957a15b 100644 --- a/service/apigateway/api_op_PutRestApi.go +++ b/service/apigateway/api_op_PutRestApi.go @@ -189,6 +189,9 @@ func (c *Client) addOperationPutRestApiMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRestApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_TagResource.go b/service/apigateway/api_op_TagResource.go index ce81176b3da..685b34000fe 100644 --- a/service/apigateway/api_op_TagResource.go +++ b/service/apigateway/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_TestInvokeAuthorizer.go b/service/apigateway/api_op_TestInvokeAuthorizer.go index c011339e5ca..ad13f753f8a 100644 --- a/service/apigateway/api_op_TestInvokeAuthorizer.go +++ b/service/apigateway/api_op_TestInvokeAuthorizer.go @@ -156,6 +156,9 @@ func (c *Client) addOperationTestInvokeAuthorizerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestInvokeAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_TestInvokeMethod.go b/service/apigateway/api_op_TestInvokeMethod.go index 0a16cb06a11..a82ff0b1452 100644 --- a/service/apigateway/api_op_TestInvokeMethod.go +++ b/service/apigateway/api_op_TestInvokeMethod.go @@ -156,6 +156,9 @@ func (c *Client) addOperationTestInvokeMethodMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestInvokeMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UntagResource.go b/service/apigateway/api_op_UntagResource.go index 6c3bc0c2d84..93c5eed379b 100644 --- a/service/apigateway/api_op_UntagResource.go +++ b/service/apigateway/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateAccount.go b/service/apigateway/api_op_UpdateAccount.go index 46d4cac2eba..8d112ad38d2 100644 --- a/service/apigateway/api_op_UpdateAccount.go +++ b/service/apigateway/api_op_UpdateAccount.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateAccountMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateApiKey.go b/service/apigateway/api_op_UpdateApiKey.go index a2bcdd5ce85..c56ebe1320e 100644 --- a/service/apigateway/api_op_UpdateApiKey.go +++ b/service/apigateway/api_op_UpdateApiKey.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateApiKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateAuthorizer.go b/service/apigateway/api_op_UpdateAuthorizer.go index 37980f28f24..c9eb4142ef5 100644 --- a/service/apigateway/api_op_UpdateAuthorizer.go +++ b/service/apigateway/api_op_UpdateAuthorizer.go @@ -191,6 +191,9 @@ func (c *Client) addOperationUpdateAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateBasePathMapping.go b/service/apigateway/api_op_UpdateBasePathMapping.go index d66eab572f4..320309f3108 100644 --- a/service/apigateway/api_op_UpdateBasePathMapping.go +++ b/service/apigateway/api_op_UpdateBasePathMapping.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateBasePathMappingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBasePathMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateClientCertificate.go b/service/apigateway/api_op_UpdateClientCertificate.go index 5a7fb379d86..77899604862 100644 --- a/service/apigateway/api_op_UpdateClientCertificate.go +++ b/service/apigateway/api_op_UpdateClientCertificate.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateClientCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClientCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateDeployment.go b/service/apigateway/api_op_UpdateDeployment.go index fa7fe07dac3..ed90cb3f7a0 100644 --- a/service/apigateway/api_op_UpdateDeployment.go +++ b/service/apigateway/api_op_UpdateDeployment.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateDocumentationPart.go b/service/apigateway/api_op_UpdateDocumentationPart.go index 8d63b5b0d2e..d915b94bbce 100644 --- a/service/apigateway/api_op_UpdateDocumentationPart.go +++ b/service/apigateway/api_op_UpdateDocumentationPart.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateDocumentationPartMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentationPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateDocumentationVersion.go b/service/apigateway/api_op_UpdateDocumentationVersion.go index f64fc6f60fb..0fd89721333 100644 --- a/service/apigateway/api_op_UpdateDocumentationVersion.go +++ b/service/apigateway/api_op_UpdateDocumentationVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateDocumentationVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateDomainName.go b/service/apigateway/api_op_UpdateDomainName.go index 917f8c3dcb5..f681a595a9a 100644 --- a/service/apigateway/api_op_UpdateDomainName.go +++ b/service/apigateway/api_op_UpdateDomainName.go @@ -192,6 +192,9 @@ func (c *Client) addOperationUpdateDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateGatewayResponse.go b/service/apigateway/api_op_UpdateGatewayResponse.go index cf0f1660a58..435681bdf1f 100644 --- a/service/apigateway/api_op_UpdateGatewayResponse.go +++ b/service/apigateway/api_op_UpdateGatewayResponse.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateGatewayResponseMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGatewayResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateIntegration.go b/service/apigateway/api_op_UpdateIntegration.go index fedd2497c37..f5ffa73c8b3 100644 --- a/service/apigateway/api_op_UpdateIntegration.go +++ b/service/apigateway/api_op_UpdateIntegration.go @@ -238,6 +238,9 @@ func (c *Client) addOperationUpdateIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateIntegrationResponse.go b/service/apigateway/api_op_UpdateIntegrationResponse.go index 499aba9f89e..93053c51f55 100644 --- a/service/apigateway/api_op_UpdateIntegrationResponse.go +++ b/service/apigateway/api_op_UpdateIntegrationResponse.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateIntegrationResponseMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateMethod.go b/service/apigateway/api_op_UpdateMethod.go index 6b351153752..e00fd5a5b2f 100644 --- a/service/apigateway/api_op_UpdateMethod.go +++ b/service/apigateway/api_op_UpdateMethod.go @@ -187,6 +187,9 @@ func (c *Client) addOperationUpdateMethodMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateMethodResponse.go b/service/apigateway/api_op_UpdateMethodResponse.go index 651ba128394..3b98869dfcd 100644 --- a/service/apigateway/api_op_UpdateMethodResponse.go +++ b/service/apigateway/api_op_UpdateMethodResponse.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateMethodResponseMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMethodResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateModel.go b/service/apigateway/api_op_UpdateModel.go index a36b7bc4419..799688477d6 100644 --- a/service/apigateway/api_op_UpdateModel.go +++ b/service/apigateway/api_op_UpdateModel.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateRequestValidator.go b/service/apigateway/api_op_UpdateRequestValidator.go index c04c26917b6..7df211f6945 100644 --- a/service/apigateway/api_op_UpdateRequestValidator.go +++ b/service/apigateway/api_op_UpdateRequestValidator.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateRequestValidatorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRequestValidatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateResource.go b/service/apigateway/api_op_UpdateResource.go index 02cd7c66968..d7cd2b88892 100644 --- a/service/apigateway/api_op_UpdateResource.go +++ b/service/apigateway/api_op_UpdateResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateRestApi.go b/service/apigateway/api_op_UpdateRestApi.go index de48e45b180..5626fcfc73e 100644 --- a/service/apigateway/api_op_UpdateRestApi.go +++ b/service/apigateway/api_op_UpdateRestApi.go @@ -169,6 +169,9 @@ func (c *Client) addOperationUpdateRestApiMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRestApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateStage.go b/service/apigateway/api_op_UpdateStage.go index 5013866a3f5..3f702a70416 100644 --- a/service/apigateway/api_op_UpdateStage.go +++ b/service/apigateway/api_op_UpdateStage.go @@ -180,6 +180,9 @@ func (c *Client) addOperationUpdateStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateUsage.go b/service/apigateway/api_op_UpdateUsage.go index eb71026c758..8e74a76feba 100644 --- a/service/apigateway/api_op_UpdateUsage.go +++ b/service/apigateway/api_op_UpdateUsage.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateUsageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateUsagePlan.go b/service/apigateway/api_op_UpdateUsagePlan.go index a17605736e4..f4c8bf5bffc 100644 --- a/service/apigateway/api_op_UpdateUsagePlan.go +++ b/service/apigateway/api_op_UpdateUsagePlan.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateUsagePlanMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUsagePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigateway/api_op_UpdateVpcLink.go b/service/apigateway/api_op_UpdateVpcLink.go index 538f9ccd33d..42f758e56df 100644 --- a/service/apigateway/api_op_UpdateVpcLink.go +++ b/service/apigateway/api_op_UpdateVpcLink.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateVpcLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewaymanagementapi/api_client.go b/service/apigatewaymanagementapi/api_client.go index fa4d55ec78c..2040bd3224f 100644 --- a/service/apigatewaymanagementapi/api_client.go +++ b/service/apigatewaymanagementapi/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/apigatewaymanagementapi/api_op_DeleteConnection.go b/service/apigatewaymanagementapi/api_op_DeleteConnection.go index fbc937abcdc..e405feabe31 100644 --- a/service/apigatewaymanagementapi/api_op_DeleteConnection.go +++ b/service/apigatewaymanagementapi/api_op_DeleteConnection.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewaymanagementapi/api_op_GetConnection.go b/service/apigatewaymanagementapi/api_op_GetConnection.go index c000803c747..ddde2090c0b 100644 --- a/service/apigatewaymanagementapi/api_op_GetConnection.go +++ b/service/apigatewaymanagementapi/api_op_GetConnection.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetConnectionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewaymanagementapi/api_op_PostToConnection.go b/service/apigatewaymanagementapi/api_op_PostToConnection.go index 7af90a2543d..08deea43ab2 100644 --- a/service/apigatewaymanagementapi/api_op_PostToConnection.go +++ b/service/apigatewaymanagementapi/api_op_PostToConnection.go @@ -106,6 +106,9 @@ func (c *Client) addOperationPostToConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPostToConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_client.go b/service/apigatewayv2/api_client.go index 7bb5f4fb541..feafd247489 100644 --- a/service/apigatewayv2/api_client.go +++ b/service/apigatewayv2/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/apigatewayv2/api_op_CreateApi.go b/service/apigatewayv2/api_op_CreateApi.go index 11b3a26e384..4222e997148 100644 --- a/service/apigatewayv2/api_op_CreateApi.go +++ b/service/apigatewayv2/api_op_CreateApi.go @@ -235,6 +235,9 @@ func (c *Client) addOperationCreateApiMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateApiMapping.go b/service/apigatewayv2/api_op_CreateApiMapping.go index 6ff691b1e93..39f998d5edb 100644 --- a/service/apigatewayv2/api_op_CreateApiMapping.go +++ b/service/apigatewayv2/api_op_CreateApiMapping.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateApiMappingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApiMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateAuthorizer.go b/service/apigatewayv2/api_op_CreateAuthorizer.go index 158995fa3c5..6eae3b831db 100644 --- a/service/apigatewayv2/api_op_CreateAuthorizer.go +++ b/service/apigatewayv2/api_op_CreateAuthorizer.go @@ -270,6 +270,9 @@ func (c *Client) addOperationCreateAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateDeployment.go b/service/apigatewayv2/api_op_CreateDeployment.go index a65d0aa102f..4d127840011 100644 --- a/service/apigatewayv2/api_op_CreateDeployment.go +++ b/service/apigatewayv2/api_op_CreateDeployment.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateDomainName.go b/service/apigatewayv2/api_op_CreateDomainName.go index ec7f6fe4c02..d54e0f433c8 100644 --- a/service/apigatewayv2/api_op_CreateDomainName.go +++ b/service/apigatewayv2/api_op_CreateDomainName.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateIntegration.go b/service/apigatewayv2/api_op_CreateIntegration.go index 2f108e7e3b6..bc8c70ae22b 100644 --- a/service/apigatewayv2/api_op_CreateIntegration.go +++ b/service/apigatewayv2/api_op_CreateIntegration.go @@ -450,6 +450,9 @@ func (c *Client) addOperationCreateIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateIntegrationResponse.go b/service/apigatewayv2/api_op_CreateIntegrationResponse.go index 7a11b931009..118da429fd6 100644 --- a/service/apigatewayv2/api_op_CreateIntegrationResponse.go +++ b/service/apigatewayv2/api_op_CreateIntegrationResponse.go @@ -192,6 +192,9 @@ func (c *Client) addOperationCreateIntegrationResponseMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateModel.go b/service/apigatewayv2/api_op_CreateModel.go index c177577dbd0..4e01e2ad047 100644 --- a/service/apigatewayv2/api_op_CreateModel.go +++ b/service/apigatewayv2/api_op_CreateModel.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateRoute.go b/service/apigatewayv2/api_op_CreateRoute.go index 4d9e4fac2eb..b696602fa43 100644 --- a/service/apigatewayv2/api_op_CreateRoute.go +++ b/service/apigatewayv2/api_op_CreateRoute.go @@ -202,6 +202,9 @@ func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateRouteResponse.go b/service/apigatewayv2/api_op_CreateRouteResponse.go index 99f4b89f030..998904da274 100644 --- a/service/apigatewayv2/api_op_CreateRouteResponse.go +++ b/service/apigatewayv2/api_op_CreateRouteResponse.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateRouteResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRouteResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateStage.go b/service/apigatewayv2/api_op_CreateStage.go index 600ca1b1cd1..b276f5dcac9 100644 --- a/service/apigatewayv2/api_op_CreateStage.go +++ b/service/apigatewayv2/api_op_CreateStage.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreateStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_CreateVpcLink.go b/service/apigatewayv2/api_op_CreateVpcLink.go index 3c63faf289f..2a24ff65413 100644 --- a/service/apigatewayv2/api_op_CreateVpcLink.go +++ b/service/apigatewayv2/api_op_CreateVpcLink.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateVpcLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteAccessLogSettings.go b/service/apigatewayv2/api_op_DeleteAccessLogSettings.go index 4e33daba9d8..15c18936136 100644 --- a/service/apigatewayv2/api_op_DeleteAccessLogSettings.go +++ b/service/apigatewayv2/api_op_DeleteAccessLogSettings.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAccessLogSettingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessLogSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteApi.go b/service/apigatewayv2/api_op_DeleteApi.go index 034c5473977..261dc2028a4 100644 --- a/service/apigatewayv2/api_op_DeleteApi.go +++ b/service/apigatewayv2/api_op_DeleteApi.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApiMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteApiMapping.go b/service/apigatewayv2/api_op_DeleteApiMapping.go index fdb20f2c123..bded831efac 100644 --- a/service/apigatewayv2/api_op_DeleteApiMapping.go +++ b/service/apigatewayv2/api_op_DeleteApiMapping.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteApiMappingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteAuthorizer.go b/service/apigatewayv2/api_op_DeleteAuthorizer.go index 0634249e1cc..157f512146c 100644 --- a/service/apigatewayv2/api_op_DeleteAuthorizer.go +++ b/service/apigatewayv2/api_op_DeleteAuthorizer.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteCorsConfiguration.go b/service/apigatewayv2/api_op_DeleteCorsConfiguration.go index 3dd662a3018..cf03f9b2751 100644 --- a/service/apigatewayv2/api_op_DeleteCorsConfiguration.go +++ b/service/apigatewayv2/api_op_DeleteCorsConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCorsConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCorsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteDeployment.go b/service/apigatewayv2/api_op_DeleteDeployment.go index af3b6374764..9eb51b031a8 100644 --- a/service/apigatewayv2/api_op_DeleteDeployment.go +++ b/service/apigatewayv2/api_op_DeleteDeployment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteDomainName.go b/service/apigatewayv2/api_op_DeleteDomainName.go index d39a1d795ae..3d697bfec58 100644 --- a/service/apigatewayv2/api_op_DeleteDomainName.go +++ b/service/apigatewayv2/api_op_DeleteDomainName.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteIntegration.go b/service/apigatewayv2/api_op_DeleteIntegration.go index e0b9175ebf2..8d0e0afbc30 100644 --- a/service/apigatewayv2/api_op_DeleteIntegration.go +++ b/service/apigatewayv2/api_op_DeleteIntegration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteIntegrationResponse.go b/service/apigatewayv2/api_op_DeleteIntegrationResponse.go index 88e835baa49..a26913b6a21 100644 --- a/service/apigatewayv2/api_op_DeleteIntegrationResponse.go +++ b/service/apigatewayv2/api_op_DeleteIntegrationResponse.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteIntegrationResponseMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteModel.go b/service/apigatewayv2/api_op_DeleteModel.go index 0fd26ca8505..9b205078c13 100644 --- a/service/apigatewayv2/api_op_DeleteModel.go +++ b/service/apigatewayv2/api_op_DeleteModel.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteRoute.go b/service/apigatewayv2/api_op_DeleteRoute.go index 8465e249aa8..a03744f5613 100644 --- a/service/apigatewayv2/api_op_DeleteRoute.go +++ b/service/apigatewayv2/api_op_DeleteRoute.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go b/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go index e95c3292394..6e88be17d0a 100644 --- a/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go +++ b/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteRouteRequestParameterMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteRequestParameterValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteRouteResponse.go b/service/apigatewayv2/api_op_DeleteRouteResponse.go index c23a7b1b915..f43f539fa5e 100644 --- a/service/apigatewayv2/api_op_DeleteRouteResponse.go +++ b/service/apigatewayv2/api_op_DeleteRouteResponse.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteRouteResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteRouteSettings.go b/service/apigatewayv2/api_op_DeleteRouteSettings.go index 1c5a98bdb12..940f25ec380 100644 --- a/service/apigatewayv2/api_op_DeleteRouteSettings.go +++ b/service/apigatewayv2/api_op_DeleteRouteSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteRouteSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteStage.go b/service/apigatewayv2/api_op_DeleteStage.go index c4c5a11f6f2..960436aa57c 100644 --- a/service/apigatewayv2/api_op_DeleteStage.go +++ b/service/apigatewayv2/api_op_DeleteStage.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_DeleteVpcLink.go b/service/apigatewayv2/api_op_DeleteVpcLink.go index d287aed4888..171a0bc4562 100644 --- a/service/apigatewayv2/api_op_DeleteVpcLink.go +++ b/service/apigatewayv2/api_op_DeleteVpcLink.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteVpcLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_ExportApi.go b/service/apigatewayv2/api_op_ExportApi.go index 06a6e305d3a..fcc5bb6ef42 100644 --- a/service/apigatewayv2/api_op_ExportApi.go +++ b/service/apigatewayv2/api_op_ExportApi.go @@ -131,6 +131,9 @@ func (c *Client) addOperationExportApiMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetApi.go b/service/apigatewayv2/api_op_GetApi.go index 0053fe21393..33c990e19b3 100644 --- a/service/apigatewayv2/api_op_GetApi.go +++ b/service/apigatewayv2/api_op_GetApi.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetApiMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetApiMapping.go b/service/apigatewayv2/api_op_GetApiMapping.go index b85357dbc39..31c19035186 100644 --- a/service/apigatewayv2/api_op_GetApiMapping.go +++ b/service/apigatewayv2/api_op_GetApiMapping.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetApiMappingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApiMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetApiMappings.go b/service/apigatewayv2/api_op_GetApiMappings.go index 151b321cb9e..eae3472c395 100644 --- a/service/apigatewayv2/api_op_GetApiMappings.go +++ b/service/apigatewayv2/api_op_GetApiMappings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetApiMappingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApiMappingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetApis.go b/service/apigatewayv2/api_op_GetApis.go index fc31141a9bb..e4693ba666a 100644 --- a/service/apigatewayv2/api_op_GetApis.go +++ b/service/apigatewayv2/api_op_GetApis.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetApisMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApis(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetAuthorizer.go b/service/apigatewayv2/api_op_GetAuthorizer.go index 25a169e868e..b800dc9f089 100644 --- a/service/apigatewayv2/api_op_GetAuthorizer.go +++ b/service/apigatewayv2/api_op_GetAuthorizer.go @@ -189,6 +189,9 @@ func (c *Client) addOperationGetAuthorizerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetAuthorizers.go b/service/apigatewayv2/api_op_GetAuthorizers.go index d7a5063d50a..f60e258eb9c 100644 --- a/service/apigatewayv2/api_op_GetAuthorizers.go +++ b/service/apigatewayv2/api_op_GetAuthorizers.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetAuthorizersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAuthorizersValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetDeployment.go b/service/apigatewayv2/api_op_GetDeployment.go index a68d83f2bbe..df6abc30d19 100644 --- a/service/apigatewayv2/api_op_GetDeployment.go +++ b/service/apigatewayv2/api_op_GetDeployment.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetDeployments.go b/service/apigatewayv2/api_op_GetDeployments.go index d25d87aeeee..3e91af43e98 100644 --- a/service/apigatewayv2/api_op_GetDeployments.go +++ b/service/apigatewayv2/api_op_GetDeployments.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetDomainName.go b/service/apigatewayv2/api_op_GetDomainName.go index ad93d8e347e..af13e782ab9 100644 --- a/service/apigatewayv2/api_op_GetDomainName.go +++ b/service/apigatewayv2/api_op_GetDomainName.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDomainNameMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetDomainNames.go b/service/apigatewayv2/api_op_GetDomainNames.go index 92e6fc2d0d7..5c34851df1d 100644 --- a/service/apigatewayv2/api_op_GetDomainNames.go +++ b/service/apigatewayv2/api_op_GetDomainNames.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDomainNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomainNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetIntegration.go b/service/apigatewayv2/api_op_GetIntegration.go index 4d41d9f2bc3..0482f16e90a 100644 --- a/service/apigatewayv2/api_op_GetIntegration.go +++ b/service/apigatewayv2/api_op_GetIntegration.go @@ -287,6 +287,9 @@ func (c *Client) addOperationGetIntegrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetIntegrationResponse.go b/service/apigatewayv2/api_op_GetIntegrationResponse.go index c3ed26bc19a..2e78465a8cf 100644 --- a/service/apigatewayv2/api_op_GetIntegrationResponse.go +++ b/service/apigatewayv2/api_op_GetIntegrationResponse.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetIntegrationResponseMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetIntegrationResponses.go b/service/apigatewayv2/api_op_GetIntegrationResponses.go index 53940f75495..35be77c712e 100644 --- a/service/apigatewayv2/api_op_GetIntegrationResponses.go +++ b/service/apigatewayv2/api_op_GetIntegrationResponses.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetIntegrationResponsesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationResponsesValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetIntegrations.go b/service/apigatewayv2/api_op_GetIntegrations.go index c1f1da7c975..1a5e4b2c7e2 100644 --- a/service/apigatewayv2/api_op_GetIntegrations.go +++ b/service/apigatewayv2/api_op_GetIntegrations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetIntegrationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetModel.go b/service/apigatewayv2/api_op_GetModel.go index 6f9795459b1..6da95b9ec45 100644 --- a/service/apigatewayv2/api_op_GetModel.go +++ b/service/apigatewayv2/api_op_GetModel.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetModelMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetModelTemplate.go b/service/apigatewayv2/api_op_GetModelTemplate.go index c2c4b9acf99..c529be4311e 100644 --- a/service/apigatewayv2/api_op_GetModelTemplate.go +++ b/service/apigatewayv2/api_op_GetModelTemplate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetModelTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetModels.go b/service/apigatewayv2/api_op_GetModels.go index 195c44a07e0..bc654ab6036 100644 --- a/service/apigatewayv2/api_op_GetModels.go +++ b/service/apigatewayv2/api_op_GetModels.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetModelsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetRoute.go b/service/apigatewayv2/api_op_GetRoute.go index 473c5242df1..a67bdf828d0 100644 --- a/service/apigatewayv2/api_op_GetRoute.go +++ b/service/apigatewayv2/api_op_GetRoute.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetRouteMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetRouteResponse.go b/service/apigatewayv2/api_op_GetRouteResponse.go index a86a445564a..dc3e50b87ee 100644 --- a/service/apigatewayv2/api_op_GetRouteResponse.go +++ b/service/apigatewayv2/api_op_GetRouteResponse.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetRouteResponseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRouteResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetRouteResponses.go b/service/apigatewayv2/api_op_GetRouteResponses.go index f9db7c1fbe3..3773d50cf50 100644 --- a/service/apigatewayv2/api_op_GetRouteResponses.go +++ b/service/apigatewayv2/api_op_GetRouteResponses.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetRouteResponsesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRouteResponsesValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetRoutes.go b/service/apigatewayv2/api_op_GetRoutes.go index 8639d2cee43..082168286ed 100644 --- a/service/apigatewayv2/api_op_GetRoutes.go +++ b/service/apigatewayv2/api_op_GetRoutes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRoutesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoutesValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetStage.go b/service/apigatewayv2/api_op_GetStage.go index 965a0341295..09c9941aa38 100644 --- a/service/apigatewayv2/api_op_GetStage.go +++ b/service/apigatewayv2/api_op_GetStage.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetStageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetStages.go b/service/apigatewayv2/api_op_GetStages.go index 6f318c3e92d..d61b35247ae 100644 --- a/service/apigatewayv2/api_op_GetStages.go +++ b/service/apigatewayv2/api_op_GetStages.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetStagesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetTags.go b/service/apigatewayv2/api_op_GetTags.go index 4404f534a7f..6fed212797b 100644 --- a/service/apigatewayv2/api_op_GetTags.go +++ b/service/apigatewayv2/api_op_GetTags.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetVpcLink.go b/service/apigatewayv2/api_op_GetVpcLink.go index 9a0951bd332..b814aeb9bea 100644 --- a/service/apigatewayv2/api_op_GetVpcLink.go +++ b/service/apigatewayv2/api_op_GetVpcLink.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetVpcLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_GetVpcLinks.go b/service/apigatewayv2/api_op_GetVpcLinks.go index d985724de74..2cc96b30d3a 100644 --- a/service/apigatewayv2/api_op_GetVpcLinks.go +++ b/service/apigatewayv2/api_op_GetVpcLinks.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetVpcLinksMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpcLinks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/apigatewayv2/api_op_ImportApi.go b/service/apigatewayv2/api_op_ImportApi.go index 38534a4ea9c..8ed58425aeb 100644 --- a/service/apigatewayv2/api_op_ImportApi.go +++ b/service/apigatewayv2/api_op_ImportApi.go @@ -180,6 +180,9 @@ func (c *Client) addOperationImportApiMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_ReimportApi.go b/service/apigatewayv2/api_op_ReimportApi.go index ee9895c6ae2..2dc03db283f 100644 --- a/service/apigatewayv2/api_op_ReimportApi.go +++ b/service/apigatewayv2/api_op_ReimportApi.go @@ -185,6 +185,9 @@ func (c *Client) addOperationReimportApiMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReimportApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_ResetAuthorizersCache.go b/service/apigatewayv2/api_op_ResetAuthorizersCache.go index 42cada11039..232f7e813e5 100644 --- a/service/apigatewayv2/api_op_ResetAuthorizersCache.go +++ b/service/apigatewayv2/api_op_ResetAuthorizersCache.go @@ -107,6 +107,9 @@ func (c *Client) addOperationResetAuthorizersCacheMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetAuthorizersCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_TagResource.go b/service/apigatewayv2/api_op_TagResource.go index d10adc0c539..079d0c1a996 100644 --- a/service/apigatewayv2/api_op_TagResource.go +++ b/service/apigatewayv2/api_op_TagResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UntagResource.go b/service/apigatewayv2/api_op_UntagResource.go index 37e7e765957..16f286ea0ed 100644 --- a/service/apigatewayv2/api_op_UntagResource.go +++ b/service/apigatewayv2/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateApi.go b/service/apigatewayv2/api_op_UpdateApi.go index ffcda410a6e..4c4e7ad7d09 100644 --- a/service/apigatewayv2/api_op_UpdateApi.go +++ b/service/apigatewayv2/api_op_UpdateApi.go @@ -228,6 +228,9 @@ func (c *Client) addOperationUpdateApiMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateApiMapping.go b/service/apigatewayv2/api_op_UpdateApiMapping.go index 6c9fc141b1d..5f44eefd611 100644 --- a/service/apigatewayv2/api_op_UpdateApiMapping.go +++ b/service/apigatewayv2/api_op_UpdateApiMapping.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateApiMappingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateAuthorizer.go b/service/apigatewayv2/api_op_UpdateAuthorizer.go index dc2a7a17b49..0149f3766c5 100644 --- a/service/apigatewayv2/api_op_UpdateAuthorizer.go +++ b/service/apigatewayv2/api_op_UpdateAuthorizer.go @@ -269,6 +269,9 @@ func (c *Client) addOperationUpdateAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateDeployment.go b/service/apigatewayv2/api_op_UpdateDeployment.go index d51a555fff4..9836f03ac73 100644 --- a/service/apigatewayv2/api_op_UpdateDeployment.go +++ b/service/apigatewayv2/api_op_UpdateDeployment.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateDomainName.go b/service/apigatewayv2/api_op_UpdateDomainName.go index 3a1e4116af0..66ce6c4ff3a 100644 --- a/service/apigatewayv2/api_op_UpdateDomainName.go +++ b/service/apigatewayv2/api_op_UpdateDomainName.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateIntegration.go b/service/apigatewayv2/api_op_UpdateIntegration.go index 85292a5baa8..64b1952e670 100644 --- a/service/apigatewayv2/api_op_UpdateIntegration.go +++ b/service/apigatewayv2/api_op_UpdateIntegration.go @@ -453,6 +453,9 @@ func (c *Client) addOperationUpdateIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateIntegrationResponse.go b/service/apigatewayv2/api_op_UpdateIntegrationResponse.go index 2b3030ed57d..4891b0d45ce 100644 --- a/service/apigatewayv2/api_op_UpdateIntegrationResponse.go +++ b/service/apigatewayv2/api_op_UpdateIntegrationResponse.go @@ -196,6 +196,9 @@ func (c *Client) addOperationUpdateIntegrationResponseMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIntegrationResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateModel.go b/service/apigatewayv2/api_op_UpdateModel.go index 2fe77a7fd72..385720a2b2d 100644 --- a/service/apigatewayv2/api_op_UpdateModel.go +++ b/service/apigatewayv2/api_op_UpdateModel.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateRoute.go b/service/apigatewayv2/api_op_UpdateRoute.go index dabb68568f1..b16fa1c92af 100644 --- a/service/apigatewayv2/api_op_UpdateRoute.go +++ b/service/apigatewayv2/api_op_UpdateRoute.go @@ -205,6 +205,9 @@ func (c *Client) addOperationUpdateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateRouteResponse.go b/service/apigatewayv2/api_op_UpdateRouteResponse.go index 9f5555d2df8..189fc97862f 100644 --- a/service/apigatewayv2/api_op_UpdateRouteResponse.go +++ b/service/apigatewayv2/api_op_UpdateRouteResponse.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateRouteResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRouteResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateStage.go b/service/apigatewayv2/api_op_UpdateStage.go index c788291f521..5f816aedf37 100644 --- a/service/apigatewayv2/api_op_UpdateStage.go +++ b/service/apigatewayv2/api_op_UpdateStage.go @@ -189,6 +189,9 @@ func (c *Client) addOperationUpdateStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/apigatewayv2/api_op_UpdateVpcLink.go b/service/apigatewayv2/api_op_UpdateVpcLink.go index c4128a95673..833367b3edc 100644 --- a/service/apigatewayv2/api_op_UpdateVpcLink.go +++ b/service/apigatewayv2/api_op_UpdateVpcLink.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateVpcLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVpcLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_client.go b/service/appconfig/api_client.go index 6238d5cd10f..df97b1fa19f 100644 --- a/service/appconfig/api_client.go +++ b/service/appconfig/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/appconfig/api_op_CreateApplication.go b/service/appconfig/api_op_CreateApplication.go index ccfb8812840..8de46ef4e4c 100644 --- a/service/appconfig/api_op_CreateApplication.go +++ b/service/appconfig/api_op_CreateApplication.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_CreateConfigurationProfile.go b/service/appconfig/api_op_CreateConfigurationProfile.go index 64e2b09d330..4360b19967f 100644 --- a/service/appconfig/api_op_CreateConfigurationProfile.go +++ b/service/appconfig/api_op_CreateConfigurationProfile.go @@ -245,6 +245,9 @@ func (c *Client) addOperationCreateConfigurationProfileMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_CreateDeploymentStrategy.go b/service/appconfig/api_op_CreateDeploymentStrategy.go index f6969bc4a20..dcd2901d1f8 100644 --- a/service/appconfig/api_op_CreateDeploymentStrategy.go +++ b/service/appconfig/api_op_CreateDeploymentStrategy.go @@ -192,6 +192,9 @@ func (c *Client) addOperationCreateDeploymentStrategyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentStrategyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_CreateEnvironment.go b/service/appconfig/api_op_CreateEnvironment.go index 795b249a698..180355b53e5 100644 --- a/service/appconfig/api_op_CreateEnvironment.go +++ b/service/appconfig/api_op_CreateEnvironment.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_CreateExtension.go b/service/appconfig/api_op_CreateExtension.go index 9fe267fdbed..aee2ecdd002 100644 --- a/service/appconfig/api_op_CreateExtension.go +++ b/service/appconfig/api_op_CreateExtension.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateExtensionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExtensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_CreateExtensionAssociation.go b/service/appconfig/api_op_CreateExtensionAssociation.go index 2c5b915ad50..520dee0fb7d 100644 --- a/service/appconfig/api_op_CreateExtensionAssociation.go +++ b/service/appconfig/api_op_CreateExtensionAssociation.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateExtensionAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExtensionAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_CreateHostedConfigurationVersion.go b/service/appconfig/api_op_CreateHostedConfigurationVersion.go index fee062d805c..cf599c72dc5 100644 --- a/service/appconfig/api_op_CreateHostedConfigurationVersion.go +++ b/service/appconfig/api_op_CreateHostedConfigurationVersion.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateHostedConfigurationVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHostedConfigurationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteApplication.go b/service/appconfig/api_op_DeleteApplication.go index ea876b4707b..8be3ca65318 100644 --- a/service/appconfig/api_op_DeleteApplication.go +++ b/service/appconfig/api_op_DeleteApplication.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteConfigurationProfile.go b/service/appconfig/api_op_DeleteConfigurationProfile.go index e913e0e4bd0..6f264bdb8ef 100644 --- a/service/appconfig/api_op_DeleteConfigurationProfile.go +++ b/service/appconfig/api_op_DeleteConfigurationProfile.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteConfigurationProfileMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteDeploymentStrategy.go b/service/appconfig/api_op_DeleteDeploymentStrategy.go index dd7a1ff2713..6e8f6dede4b 100644 --- a/service/appconfig/api_op_DeleteDeploymentStrategy.go +++ b/service/appconfig/api_op_DeleteDeploymentStrategy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteDeploymentStrategyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentStrategyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteEnvironment.go b/service/appconfig/api_op_DeleteEnvironment.go index 326971abf8e..18c7a89f837 100644 --- a/service/appconfig/api_op_DeleteEnvironment.go +++ b/service/appconfig/api_op_DeleteEnvironment.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteExtension.go b/service/appconfig/api_op_DeleteExtension.go index bab651654ed..f8c16c6011f 100644 --- a/service/appconfig/api_op_DeleteExtension.go +++ b/service/appconfig/api_op_DeleteExtension.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteExtensionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExtensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteExtensionAssociation.go b/service/appconfig/api_op_DeleteExtensionAssociation.go index 811fec1d140..392ef0d8534 100644 --- a/service/appconfig/api_op_DeleteExtensionAssociation.go +++ b/service/appconfig/api_op_DeleteExtensionAssociation.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteExtensionAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExtensionAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_DeleteHostedConfigurationVersion.go b/service/appconfig/api_op_DeleteHostedConfigurationVersion.go index 966fb13b583..fb1d5cbc9dd 100644 --- a/service/appconfig/api_op_DeleteHostedConfigurationVersion.go +++ b/service/appconfig/api_op_DeleteHostedConfigurationVersion.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteHostedConfigurationVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHostedConfigurationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetApplication.go b/service/appconfig/api_op_GetApplication.go index 5dbc510d2bd..148e2eb9a42 100644 --- a/service/appconfig/api_op_GetApplication.go +++ b/service/appconfig/api_op_GetApplication.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetConfiguration.go b/service/appconfig/api_op_GetConfiguration.go index f6eb3663c5b..f76ffe638e5 100644 --- a/service/appconfig/api_op_GetConfiguration.go +++ b/service/appconfig/api_op_GetConfiguration.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetConfigurationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetConfigurationProfile.go b/service/appconfig/api_op_GetConfigurationProfile.go index 2cf77965764..e7b81fe6e24 100644 --- a/service/appconfig/api_op_GetConfigurationProfile.go +++ b/service/appconfig/api_op_GetConfigurationProfile.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetConfigurationProfileMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetDeployment.go b/service/appconfig/api_op_GetDeployment.go index e858569a84d..e2e8029a62a 100644 --- a/service/appconfig/api_op_GetDeployment.go +++ b/service/appconfig/api_op_GetDeployment.go @@ -189,6 +189,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetDeploymentStrategy.go b/service/appconfig/api_op_GetDeploymentStrategy.go index 195a6f9d92a..449b98ae251 100644 --- a/service/appconfig/api_op_GetDeploymentStrategy.go +++ b/service/appconfig/api_op_GetDeploymentStrategy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetDeploymentStrategyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentStrategyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetEnvironment.go b/service/appconfig/api_op_GetEnvironment.go index e93d62cf87b..0d6530aae0f 100644 --- a/service/appconfig/api_op_GetEnvironment.go +++ b/service/appconfig/api_op_GetEnvironment.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetExtension.go b/service/appconfig/api_op_GetExtension.go index c7b8dbf3b24..642831cbf41 100644 --- a/service/appconfig/api_op_GetExtension.go +++ b/service/appconfig/api_op_GetExtension.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetExtensionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExtensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetExtensionAssociation.go b/service/appconfig/api_op_GetExtensionAssociation.go index a49505a92e7..6f63acdfb87 100644 --- a/service/appconfig/api_op_GetExtensionAssociation.go +++ b/service/appconfig/api_op_GetExtensionAssociation.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetExtensionAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExtensionAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_GetHostedConfigurationVersion.go b/service/appconfig/api_op_GetHostedConfigurationVersion.go index 2844ce33cf9..70717c56c98 100644 --- a/service/appconfig/api_op_GetHostedConfigurationVersion.go +++ b/service/appconfig/api_op_GetHostedConfigurationVersion.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetHostedConfigurationVersionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostedConfigurationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_ListApplications.go b/service/appconfig/api_op_ListApplications.go index 8305b86df9d..25d01d559a8 100644 --- a/service/appconfig/api_op_ListApplications.go +++ b/service/appconfig/api_op_ListApplications.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -209,6 +204,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListConfigurationProfiles.go b/service/appconfig/api_op_ListConfigurationProfiles.go index 2612f5ed659..822acef9d29 100644 --- a/service/appconfig/api_op_ListConfigurationProfiles.go +++ b/service/appconfig/api_op_ListConfigurationProfiles.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListConfigurationProfilesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConfigurationProfilesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListConfigurationProfilesMiddlewares(stack *middlew return nil } -// ListConfigurationProfilesAPIClient is a client that implements the -// ListConfigurationProfiles operation. -type ListConfigurationProfilesAPIClient interface { - ListConfigurationProfiles(context.Context, *ListConfigurationProfilesInput, ...func(*Options)) (*ListConfigurationProfilesOutput, error) -} - -var _ ListConfigurationProfilesAPIClient = (*Client)(nil) - // ListConfigurationProfilesPaginatorOptions is the paginator options for // ListConfigurationProfiles type ListConfigurationProfilesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListConfigurationProfilesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListConfigurationProfilesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListConfigurationProfilesAPIClient is a client that implements the +// ListConfigurationProfiles operation. +type ListConfigurationProfilesAPIClient interface { + ListConfigurationProfiles(context.Context, *ListConfigurationProfilesInput, ...func(*Options)) (*ListConfigurationProfilesOutput, error) +} + +var _ ListConfigurationProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListDeploymentStrategies.go b/service/appconfig/api_op_ListDeploymentStrategies.go index 52848758c40..98784565b27 100644 --- a/service/appconfig/api_op_ListDeploymentStrategies.go +++ b/service/appconfig/api_op_ListDeploymentStrategies.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListDeploymentStrategiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeploymentStrategies(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListDeploymentStrategiesMiddlewares(stack *middlewa return nil } -// ListDeploymentStrategiesAPIClient is a client that implements the -// ListDeploymentStrategies operation. -type ListDeploymentStrategiesAPIClient interface { - ListDeploymentStrategies(context.Context, *ListDeploymentStrategiesInput, ...func(*Options)) (*ListDeploymentStrategiesOutput, error) -} - -var _ ListDeploymentStrategiesAPIClient = (*Client)(nil) - // ListDeploymentStrategiesPaginatorOptions is the paginator options for // ListDeploymentStrategies type ListDeploymentStrategiesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListDeploymentStrategiesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeploymentStrategies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListDeploymentStrategiesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDeploymentStrategiesAPIClient is a client that implements the +// ListDeploymentStrategies operation. +type ListDeploymentStrategiesAPIClient interface { + ListDeploymentStrategies(context.Context, *ListDeploymentStrategiesInput, ...func(*Options)) (*ListDeploymentStrategiesOutput, error) +} + +var _ ListDeploymentStrategiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeploymentStrategies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListDeployments.go b/service/appconfig/api_op_ListDeployments.go index a1b5dea6876..f42c0682723 100644 --- a/service/appconfig/api_op_ListDeployments.go +++ b/service/appconfig/api_op_ListDeployments.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// ListDeploymentsAPIClient is a client that implements the ListDeployments -// operation. -type ListDeploymentsAPIClient interface { - ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) -} - -var _ ListDeploymentsAPIClient = (*Client)(nil) - // ListDeploymentsPaginatorOptions is the paginator options for ListDeployments type ListDeploymentsPaginatorOptions struct { // The maximum number of items that may be returned for this call. If there are @@ -224,6 +219,9 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDeploymentsAPIClient is a client that implements the ListDeployments +// operation. +type ListDeploymentsAPIClient interface { + ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) +} + +var _ ListDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListEnvironments.go b/service/appconfig/api_op_ListEnvironments.go index 87f09581ea4..e3b7b052245 100644 --- a/service/appconfig/api_op_ListEnvironments.go +++ b/service/appconfig/api_op_ListEnvironments.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -213,6 +208,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListExtensionAssociations.go b/service/appconfig/api_op_ListExtensionAssociations.go index 14f4d4ef3b1..a912996922a 100644 --- a/service/appconfig/api_op_ListExtensionAssociations.go +++ b/service/appconfig/api_op_ListExtensionAssociations.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListExtensionAssociationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExtensionAssociations(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListExtensionAssociationsMiddlewares(stack *middlew return nil } -// ListExtensionAssociationsAPIClient is a client that implements the -// ListExtensionAssociations operation. -type ListExtensionAssociationsAPIClient interface { - ListExtensionAssociations(context.Context, *ListExtensionAssociationsInput, ...func(*Options)) (*ListExtensionAssociationsOutput, error) -} - -var _ ListExtensionAssociationsAPIClient = (*Client)(nil) - // ListExtensionAssociationsPaginatorOptions is the paginator options for // ListExtensionAssociations type ListExtensionAssociationsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListExtensionAssociationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExtensionAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListExtensionAssociationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListExtensionAssociationsAPIClient is a client that implements the +// ListExtensionAssociations operation. +type ListExtensionAssociationsAPIClient interface { + ListExtensionAssociations(context.Context, *ListExtensionAssociationsInput, ...func(*Options)) (*ListExtensionAssociationsOutput, error) +} + +var _ ListExtensionAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExtensionAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListExtensions.go b/service/appconfig/api_op_ListExtensions.go index a93429df0b9..6dcd19eb2c9 100644 --- a/service/appconfig/api_op_ListExtensions.go +++ b/service/appconfig/api_op_ListExtensions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListExtensionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExtensions(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListExtensionsMiddlewares(stack *middleware.Stack, return nil } -// ListExtensionsAPIClient is a client that implements the ListExtensions -// operation. -type ListExtensionsAPIClient interface { - ListExtensions(context.Context, *ListExtensionsInput, ...func(*Options)) (*ListExtensionsOutput, error) -} - -var _ ListExtensionsAPIClient = (*Client)(nil) - // ListExtensionsPaginatorOptions is the paginator options for ListExtensions type ListExtensionsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -212,6 +207,9 @@ func (p *ListExtensionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExtensions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListExtensionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExtensionsAPIClient is a client that implements the ListExtensions +// operation. +type ListExtensionsAPIClient interface { + ListExtensions(context.Context, *ListExtensionsInput, ...func(*Options)) (*ListExtensionsOutput, error) +} + +var _ ListExtensionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExtensions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListHostedConfigurationVersions.go b/service/appconfig/api_op_ListHostedConfigurationVersions.go index 75fd4d3bf4e..ba10abec760 100644 --- a/service/appconfig/api_op_ListHostedConfigurationVersions.go +++ b/service/appconfig/api_op_ListHostedConfigurationVersions.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListHostedConfigurationVersionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHostedConfigurationVersionsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListHostedConfigurationVersionsMiddlewares(stack *m return nil } -// ListHostedConfigurationVersionsAPIClient is a client that implements the -// ListHostedConfigurationVersions operation. -type ListHostedConfigurationVersionsAPIClient interface { - ListHostedConfigurationVersions(context.Context, *ListHostedConfigurationVersionsInput, ...func(*Options)) (*ListHostedConfigurationVersionsOutput, error) -} - -var _ ListHostedConfigurationVersionsAPIClient = (*Client)(nil) - // ListHostedConfigurationVersionsPaginatorOptions is the paginator options for // ListHostedConfigurationVersions type ListHostedConfigurationVersionsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListHostedConfigurationVersionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHostedConfigurationVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListHostedConfigurationVersionsPaginator) NextPage(ctx context.Context, return result, nil } +// ListHostedConfigurationVersionsAPIClient is a client that implements the +// ListHostedConfigurationVersions operation. +type ListHostedConfigurationVersionsAPIClient interface { + ListHostedConfigurationVersions(context.Context, *ListHostedConfigurationVersionsInput, ...func(*Options)) (*ListHostedConfigurationVersionsOutput, error) +} + +var _ ListHostedConfigurationVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHostedConfigurationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appconfig/api_op_ListTagsForResource.go b/service/appconfig/api_op_ListTagsForResource.go index b1a5b3d9bb2..3b45ea49f9c 100644 --- a/service/appconfig/api_op_ListTagsForResource.go +++ b/service/appconfig/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_StartDeployment.go b/service/appconfig/api_op_StartDeployment.go index a1a21cd3a9f..77a44d5e83c 100644 --- a/service/appconfig/api_op_StartDeployment.go +++ b/service/appconfig/api_op_StartDeployment.go @@ -217,6 +217,9 @@ func (c *Client) addOperationStartDeploymentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_StopDeployment.go b/service/appconfig/api_op_StopDeployment.go index 176a20442b9..bdec087ec5b 100644 --- a/service/appconfig/api_op_StopDeployment.go +++ b/service/appconfig/api_op_StopDeployment.go @@ -191,6 +191,9 @@ func (c *Client) addOperationStopDeploymentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_TagResource.go b/service/appconfig/api_op_TagResource.go index fb353f63ab0..13a4564b314 100644 --- a/service/appconfig/api_op_TagResource.go +++ b/service/appconfig/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UntagResource.go b/service/appconfig/api_op_UntagResource.go index c4073e70158..5522d9526a9 100644 --- a/service/appconfig/api_op_UntagResource.go +++ b/service/appconfig/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UpdateApplication.go b/service/appconfig/api_op_UpdateApplication.go index 985b448a82a..8fe1705a0a6 100644 --- a/service/appconfig/api_op_UpdateApplication.go +++ b/service/appconfig/api_op_UpdateApplication.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UpdateConfigurationProfile.go b/service/appconfig/api_op_UpdateConfigurationProfile.go index 0dfa360697d..b129834b2e5 100644 --- a/service/appconfig/api_op_UpdateConfigurationProfile.go +++ b/service/appconfig/api_op_UpdateConfigurationProfile.go @@ -173,6 +173,9 @@ func (c *Client) addOperationUpdateConfigurationProfileMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UpdateDeploymentStrategy.go b/service/appconfig/api_op_UpdateDeploymentStrategy.go index 7f7d8b8a3de..e1ea3768c35 100644 --- a/service/appconfig/api_op_UpdateDeploymentStrategy.go +++ b/service/appconfig/api_op_UpdateDeploymentStrategy.go @@ -170,6 +170,9 @@ func (c *Client) addOperationUpdateDeploymentStrategyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeploymentStrategyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UpdateEnvironment.go b/service/appconfig/api_op_UpdateEnvironment.go index 89a936fa270..58bdbbb559a 100644 --- a/service/appconfig/api_op_UpdateEnvironment.go +++ b/service/appconfig/api_op_UpdateEnvironment.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UpdateExtension.go b/service/appconfig/api_op_UpdateExtension.go index e7a0a8950b8..453edd3e710 100644 --- a/service/appconfig/api_op_UpdateExtension.go +++ b/service/appconfig/api_op_UpdateExtension.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateExtensionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExtensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_UpdateExtensionAssociation.go b/service/appconfig/api_op_UpdateExtensionAssociation.go index ddb665b4eb8..f22248d5f89 100644 --- a/service/appconfig/api_op_UpdateExtensionAssociation.go +++ b/service/appconfig/api_op_UpdateExtensionAssociation.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateExtensionAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExtensionAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfig/api_op_ValidateConfiguration.go b/service/appconfig/api_op_ValidateConfiguration.go index d8dcdc1f694..3f4d845b0e9 100644 --- a/service/appconfig/api_op_ValidateConfiguration.go +++ b/service/appconfig/api_op_ValidateConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationValidateConfigurationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfigdata/api_client.go b/service/appconfigdata/api_client.go index a798ca4d135..b29832bac79 100644 --- a/service/appconfigdata/api_client.go +++ b/service/appconfigdata/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/appconfigdata/api_op_GetLatestConfiguration.go b/service/appconfigdata/api_op_GetLatestConfiguration.go index c8d93d9db31..09006cdc130 100644 --- a/service/appconfigdata/api_op_GetLatestConfiguration.go +++ b/service/appconfigdata/api_op_GetLatestConfiguration.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetLatestConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLatestConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appconfigdata/api_op_StartConfigurationSession.go b/service/appconfigdata/api_op_StartConfigurationSession.go index cb4bac26483..dfb83dc2d37 100644 --- a/service/appconfigdata/api_op_StartConfigurationSession.go +++ b/service/appconfigdata/api_op_StartConfigurationSession.go @@ -134,6 +134,9 @@ func (c *Client) addOperationStartConfigurationSessionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartConfigurationSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_client.go b/service/appfabric/api_client.go index aacc896ee20..1da7bab7a7e 100644 --- a/service/appfabric/api_client.go +++ b/service/appfabric/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/appfabric/api_op_BatchGetUserAccessTasks.go b/service/appfabric/api_op_BatchGetUserAccessTasks.go index dd7f76ba59e..999a34aab17 100644 --- a/service/appfabric/api_op_BatchGetUserAccessTasks.go +++ b/service/appfabric/api_op_BatchGetUserAccessTasks.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchGetUserAccessTasksMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetUserAccessTasksValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_ConnectAppAuthorization.go b/service/appfabric/api_op_ConnectAppAuthorization.go index 19b05df182d..fce36fc091f 100644 --- a/service/appfabric/api_op_ConnectAppAuthorization.go +++ b/service/appfabric/api_op_ConnectAppAuthorization.go @@ -122,6 +122,9 @@ func (c *Client) addOperationConnectAppAuthorizationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConnectAppAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_CreateAppAuthorization.go b/service/appfabric/api_op_CreateAppAuthorization.go index 3fd639998a7..c1d4a48279c 100644 --- a/service/appfabric/api_op_CreateAppAuthorization.go +++ b/service/appfabric/api_op_CreateAppAuthorization.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateAppAuthorizationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppAuthorizationMiddleware(stack, options); err != nil { return err } diff --git a/service/appfabric/api_op_CreateAppBundle.go b/service/appfabric/api_op_CreateAppBundle.go index ca010de8c7f..2262da6cbae 100644 --- a/service/appfabric/api_op_CreateAppBundle.go +++ b/service/appfabric/api_op_CreateAppBundle.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateAppBundleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppBundleMiddleware(stack, options); err != nil { return err } diff --git a/service/appfabric/api_op_CreateIngestion.go b/service/appfabric/api_op_CreateIngestion.go index d7828ef4f43..d89dbffc912 100644 --- a/service/appfabric/api_op_CreateIngestion.go +++ b/service/appfabric/api_op_CreateIngestion.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateIngestionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIngestionMiddleware(stack, options); err != nil { return err } diff --git a/service/appfabric/api_op_CreateIngestionDestination.go b/service/appfabric/api_op_CreateIngestionDestination.go index f09f0e5a4f4..7aa040478e1 100644 --- a/service/appfabric/api_op_CreateIngestionDestination.go +++ b/service/appfabric/api_op_CreateIngestionDestination.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateIngestionDestinationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIngestionDestinationMiddleware(stack, options); err != nil { return err } diff --git a/service/appfabric/api_op_DeleteAppAuthorization.go b/service/appfabric/api_op_DeleteAppAuthorization.go index f0afdd7026e..92f9b965743 100644 --- a/service/appfabric/api_op_DeleteAppAuthorization.go +++ b/service/appfabric/api_op_DeleteAppAuthorization.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteAppAuthorizationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_DeleteAppBundle.go b/service/appfabric/api_op_DeleteAppBundle.go index a187a7c3ac0..751a9e5dda5 100644 --- a/service/appfabric/api_op_DeleteAppBundle.go +++ b/service/appfabric/api_op_DeleteAppBundle.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAppBundleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_DeleteIngestion.go b/service/appfabric/api_op_DeleteIngestion.go index bd4d29978ea..0f766263421 100644 --- a/service/appfabric/api_op_DeleteIngestion.go +++ b/service/appfabric/api_op_DeleteIngestion.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteIngestionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_DeleteIngestionDestination.go b/service/appfabric/api_op_DeleteIngestionDestination.go index 5af43dd7e55..240c2c6275c 100644 --- a/service/appfabric/api_op_DeleteIngestionDestination.go +++ b/service/appfabric/api_op_DeleteIngestionDestination.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteIngestionDestinationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIngestionDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_GetAppAuthorization.go b/service/appfabric/api_op_GetAppAuthorization.go index b7ce529823e..544694e42a7 100644 --- a/service/appfabric/api_op_GetAppAuthorization.go +++ b/service/appfabric/api_op_GetAppAuthorization.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetAppAuthorizationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_GetAppBundle.go b/service/appfabric/api_op_GetAppBundle.go index 37788f8feb6..3ec2605ecc0 100644 --- a/service/appfabric/api_op_GetAppBundle.go +++ b/service/appfabric/api_op_GetAppBundle.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetAppBundleMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_GetIngestion.go b/service/appfabric/api_op_GetIngestion.go index 2c3e69d7bd8..5529e32a9f8 100644 --- a/service/appfabric/api_op_GetIngestion.go +++ b/service/appfabric/api_op_GetIngestion.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetIngestionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_GetIngestionDestination.go b/service/appfabric/api_op_GetIngestionDestination.go index 90832e3b550..c33e689074f 100644 --- a/service/appfabric/api_op_GetIngestionDestination.go +++ b/service/appfabric/api_op_GetIngestionDestination.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetIngestionDestinationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIngestionDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_ListAppAuthorizations.go b/service/appfabric/api_op_ListAppAuthorizations.go index fe07f5f1a35..28698a2b54c 100644 --- a/service/appfabric/api_op_ListAppAuthorizations.go +++ b/service/appfabric/api_op_ListAppAuthorizations.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListAppAuthorizationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppAuthorizationsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListAppAuthorizationsMiddlewares(stack *middleware. return nil } -// ListAppAuthorizationsAPIClient is a client that implements the -// ListAppAuthorizations operation. -type ListAppAuthorizationsAPIClient interface { - ListAppAuthorizations(context.Context, *ListAppAuthorizationsInput, ...func(*Options)) (*ListAppAuthorizationsOutput, error) -} - -var _ ListAppAuthorizationsAPIClient = (*Client)(nil) - // ListAppAuthorizationsPaginatorOptions is the paginator options for // ListAppAuthorizations type ListAppAuthorizationsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListAppAuthorizationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppAuthorizations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListAppAuthorizationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAppAuthorizationsAPIClient is a client that implements the +// ListAppAuthorizations operation. +type ListAppAuthorizationsAPIClient interface { + ListAppAuthorizations(context.Context, *ListAppAuthorizationsInput, ...func(*Options)) (*ListAppAuthorizationsOutput, error) +} + +var _ ListAppAuthorizationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appfabric/api_op_ListAppBundles.go b/service/appfabric/api_op_ListAppBundles.go index 96981a2d372..5ccc820acdc 100644 --- a/service/appfabric/api_op_ListAppBundles.go +++ b/service/appfabric/api_op_ListAppBundles.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAppBundlesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppBundles(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListAppBundlesMiddlewares(stack *middleware.Stack, return nil } -// ListAppBundlesAPIClient is a client that implements the ListAppBundles -// operation. -type ListAppBundlesAPIClient interface { - ListAppBundles(context.Context, *ListAppBundlesInput, ...func(*Options)) (*ListAppBundlesOutput, error) -} - -var _ ListAppBundlesAPIClient = (*Client)(nil) - // ListAppBundlesPaginatorOptions is the paginator options for ListAppBundles type ListAppBundlesPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -220,6 +215,9 @@ func (p *ListAppBundlesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppBundles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListAppBundlesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAppBundlesAPIClient is a client that implements the ListAppBundles +// operation. +type ListAppBundlesAPIClient interface { + ListAppBundles(context.Context, *ListAppBundlesInput, ...func(*Options)) (*ListAppBundlesOutput, error) +} + +var _ ListAppBundlesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppBundles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appfabric/api_op_ListIngestionDestinations.go b/service/appfabric/api_op_ListIngestionDestinations.go index 385f1082a28..77eb417efe5 100644 --- a/service/appfabric/api_op_ListIngestionDestinations.go +++ b/service/appfabric/api_op_ListIngestionDestinations.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListIngestionDestinationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIngestionDestinationsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListIngestionDestinationsMiddlewares(stack *middlew return nil } -// ListIngestionDestinationsAPIClient is a client that implements the -// ListIngestionDestinations operation. -type ListIngestionDestinationsAPIClient interface { - ListIngestionDestinations(context.Context, *ListIngestionDestinationsInput, ...func(*Options)) (*ListIngestionDestinationsOutput, error) -} - -var _ ListIngestionDestinationsAPIClient = (*Client)(nil) - // ListIngestionDestinationsPaginatorOptions is the paginator options for // ListIngestionDestinations type ListIngestionDestinationsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListIngestionDestinationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIngestionDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListIngestionDestinationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListIngestionDestinationsAPIClient is a client that implements the +// ListIngestionDestinations operation. +type ListIngestionDestinationsAPIClient interface { + ListIngestionDestinations(context.Context, *ListIngestionDestinationsInput, ...func(*Options)) (*ListIngestionDestinationsOutput, error) +} + +var _ ListIngestionDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIngestionDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appfabric/api_op_ListIngestions.go b/service/appfabric/api_op_ListIngestions.go index d9f55a43531..c8a25fa28b3 100644 --- a/service/appfabric/api_op_ListIngestions.go +++ b/service/appfabric/api_op_ListIngestions.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListIngestionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIngestionsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListIngestionsMiddlewares(stack *middleware.Stack, return nil } -// ListIngestionsAPIClient is a client that implements the ListIngestions -// operation. -type ListIngestionsAPIClient interface { - ListIngestions(context.Context, *ListIngestionsInput, ...func(*Options)) (*ListIngestionsOutput, error) -} - -var _ ListIngestionsAPIClient = (*Client)(nil) - // ListIngestionsPaginatorOptions is the paginator options for ListIngestions type ListIngestionsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -229,6 +224,9 @@ func (p *ListIngestionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIngestions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListIngestionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListIngestionsAPIClient is a client that implements the ListIngestions +// operation. +type ListIngestionsAPIClient interface { + ListIngestions(context.Context, *ListIngestionsInput, ...func(*Options)) (*ListIngestionsOutput, error) +} + +var _ ListIngestionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIngestions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appfabric/api_op_ListTagsForResource.go b/service/appfabric/api_op_ListTagsForResource.go index 1af8535cf93..27fd949452b 100644 --- a/service/appfabric/api_op_ListTagsForResource.go +++ b/service/appfabric/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_StartIngestion.go b/service/appfabric/api_op_StartIngestion.go index 46f45a6674a..3dee18aea47 100644 --- a/service/appfabric/api_op_StartIngestion.go +++ b/service/appfabric/api_op_StartIngestion.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartIngestionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_StartUserAccessTasks.go b/service/appfabric/api_op_StartUserAccessTasks.go index ade5c1ed6e1..d9081a6de76 100644 --- a/service/appfabric/api_op_StartUserAccessTasks.go +++ b/service/appfabric/api_op_StartUserAccessTasks.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartUserAccessTasksMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartUserAccessTasksValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_StopIngestion.go b/service/appfabric/api_op_StopIngestion.go index 471f5c08a50..936d51508f0 100644 --- a/service/appfabric/api_op_StopIngestion.go +++ b/service/appfabric/api_op_StopIngestion.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopIngestionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_TagResource.go b/service/appfabric/api_op_TagResource.go index 17c302f5dda..dd1409396fa 100644 --- a/service/appfabric/api_op_TagResource.go +++ b/service/appfabric/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_UntagResource.go b/service/appfabric/api_op_UntagResource.go index f104bfb4559..f2e89c1705b 100644 --- a/service/appfabric/api_op_UntagResource.go +++ b/service/appfabric/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_UpdateAppAuthorization.go b/service/appfabric/api_op_UpdateAppAuthorization.go index 57d16193416..11183f562ca 100644 --- a/service/appfabric/api_op_UpdateAppAuthorization.go +++ b/service/appfabric/api_op_UpdateAppAuthorization.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateAppAuthorizationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appfabric/api_op_UpdateIngestionDestination.go b/service/appfabric/api_op_UpdateIngestionDestination.go index 38cf18030f1..09133cac03a 100644 --- a/service/appfabric/api_op_UpdateIngestionDestination.go +++ b/service/appfabric/api_op_UpdateIngestionDestination.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateIngestionDestinationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIngestionDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_client.go b/service/appflow/api_client.go index 9b29d4b14df..fab730ea937 100644 --- a/service/appflow/api_client.go +++ b/service/appflow/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/appflow/api_op_CancelFlowExecutions.go b/service/appflow/api_op_CancelFlowExecutions.go index 425432d4d12..388ff41fc74 100644 --- a/service/appflow/api_op_CancelFlowExecutions.go +++ b/service/appflow/api_op_CancelFlowExecutions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCancelFlowExecutionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelFlowExecutionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_CreateConnectorProfile.go b/service/appflow/api_op_CreateConnectorProfile.go index c3ab70c4e26..1fe21aad61b 100644 --- a/service/appflow/api_op_CreateConnectorProfile.go +++ b/service/appflow/api_op_CreateConnectorProfile.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateConnectorProfileMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConnectorProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/appflow/api_op_CreateFlow.go b/service/appflow/api_op_CreateFlow.go index 972547872f7..6ba6a42a730 100644 --- a/service/appflow/api_op_CreateFlow.go +++ b/service/appflow/api_op_CreateFlow.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFlowMiddleware(stack, options); err != nil { return err } diff --git a/service/appflow/api_op_DeleteConnectorProfile.go b/service/appflow/api_op_DeleteConnectorProfile.go index 76e2fa06511..7c3f954ed7b 100644 --- a/service/appflow/api_op_DeleteConnectorProfile.go +++ b/service/appflow/api_op_DeleteConnectorProfile.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteConnectorProfileMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_DeleteFlow.go b/service/appflow/api_op_DeleteFlow.go index 9f66a9d71d0..ee6b9d35fac 100644 --- a/service/appflow/api_op_DeleteFlow.go +++ b/service/appflow/api_op_DeleteFlow.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_DescribeConnector.go b/service/appflow/api_op_DescribeConnector.go index 3483c720884..72d3dcb8294 100644 --- a/service/appflow/api_op_DescribeConnector.go +++ b/service/appflow/api_op_DescribeConnector.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeConnectorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_DescribeConnectorEntity.go b/service/appflow/api_op_DescribeConnectorEntity.go index 1ddbd2ec1f7..9e2ccc3bff9 100644 --- a/service/appflow/api_op_DescribeConnectorEntity.go +++ b/service/appflow/api_op_DescribeConnectorEntity.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeConnectorEntityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectorEntityValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_DescribeConnectorProfiles.go b/service/appflow/api_op_DescribeConnectorProfiles.go index 0ab9295c113..399eb202c9a 100644 --- a/service/appflow/api_op_DescribeConnectorProfiles.go +++ b/service/appflow/api_op_DescribeConnectorProfiles.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeConnectorProfilesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnectorProfiles(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeConnectorProfilesMiddlewares(stack *middlew return nil } -// DescribeConnectorProfilesAPIClient is a client that implements the -// DescribeConnectorProfiles operation. -type DescribeConnectorProfilesAPIClient interface { - DescribeConnectorProfiles(context.Context, *DescribeConnectorProfilesInput, ...func(*Options)) (*DescribeConnectorProfilesOutput, error) -} - -var _ DescribeConnectorProfilesAPIClient = (*Client)(nil) - // DescribeConnectorProfilesPaginatorOptions is the paginator options for // DescribeConnectorProfiles type DescribeConnectorProfilesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeConnectorProfilesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConnectorProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeConnectorProfilesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeConnectorProfilesAPIClient is a client that implements the +// DescribeConnectorProfiles operation. +type DescribeConnectorProfilesAPIClient interface { + DescribeConnectorProfiles(context.Context, *DescribeConnectorProfilesInput, ...func(*Options)) (*DescribeConnectorProfilesOutput, error) +} + +var _ DescribeConnectorProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConnectorProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appflow/api_op_DescribeConnectors.go b/service/appflow/api_op_DescribeConnectors.go index b3b698b6a18..2e47d4f85e1 100644 --- a/service/appflow/api_op_DescribeConnectors.go +++ b/service/appflow/api_op_DescribeConnectors.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeConnectorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnectors(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeConnectorsMiddlewares(stack *middleware.Sta return nil } -// DescribeConnectorsAPIClient is a client that implements the DescribeConnectors -// operation. -type DescribeConnectorsAPIClient interface { - DescribeConnectors(context.Context, *DescribeConnectorsInput, ...func(*Options)) (*DescribeConnectorsOutput, error) -} - -var _ DescribeConnectorsAPIClient = (*Client)(nil) - // DescribeConnectorsPaginatorOptions is the paginator options for // DescribeConnectors type DescribeConnectorsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeConnectorsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeConnectorsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeConnectorsAPIClient is a client that implements the DescribeConnectors +// operation. +type DescribeConnectorsAPIClient interface { + DescribeConnectors(context.Context, *DescribeConnectorsInput, ...func(*Options)) (*DescribeConnectorsOutput, error) +} + +var _ DescribeConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appflow/api_op_DescribeFlow.go b/service/appflow/api_op_DescribeFlow.go index ff825b1bb38..e10b30580f4 100644 --- a/service/appflow/api_op_DescribeFlow.go +++ b/service/appflow/api_op_DescribeFlow.go @@ -181,6 +181,9 @@ func (c *Client) addOperationDescribeFlowMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_DescribeFlowExecutionRecords.go b/service/appflow/api_op_DescribeFlowExecutionRecords.go index 6ca9196b7db..227eacc776e 100644 --- a/service/appflow/api_op_DescribeFlowExecutionRecords.go +++ b/service/appflow/api_op_DescribeFlowExecutionRecords.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeFlowExecutionRecordsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlowExecutionRecordsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeFlowExecutionRecordsMiddlewares(stack *midd return nil } -// DescribeFlowExecutionRecordsAPIClient is a client that implements the -// DescribeFlowExecutionRecords operation. -type DescribeFlowExecutionRecordsAPIClient interface { - DescribeFlowExecutionRecords(context.Context, *DescribeFlowExecutionRecordsInput, ...func(*Options)) (*DescribeFlowExecutionRecordsOutput, error) -} - -var _ DescribeFlowExecutionRecordsAPIClient = (*Client)(nil) - // DescribeFlowExecutionRecordsPaginatorOptions is the paginator options for // DescribeFlowExecutionRecords type DescribeFlowExecutionRecordsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeFlowExecutionRecordsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFlowExecutionRecords(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeFlowExecutionRecordsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeFlowExecutionRecordsAPIClient is a client that implements the +// DescribeFlowExecutionRecords operation. +type DescribeFlowExecutionRecordsAPIClient interface { + DescribeFlowExecutionRecords(context.Context, *DescribeFlowExecutionRecordsInput, ...func(*Options)) (*DescribeFlowExecutionRecordsOutput, error) +} + +var _ DescribeFlowExecutionRecordsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFlowExecutionRecords(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appflow/api_op_ListConnectorEntities.go b/service/appflow/api_op_ListConnectorEntities.go index 69dc237da6f..4a3e295afde 100644 --- a/service/appflow/api_op_ListConnectorEntities.go +++ b/service/appflow/api_op_ListConnectorEntities.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListConnectorEntitiesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectorEntities(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appflow/api_op_ListConnectors.go b/service/appflow/api_op_ListConnectors.go index 46d293c96af..8e2e0432d95 100644 --- a/service/appflow/api_op_ListConnectors.go +++ b/service/appflow/api_op_ListConnectors.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectors(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectorsAPIClient is a client that implements the ListConnectors -// operation. -type ListConnectorsAPIClient interface { - ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) -} - -var _ ListConnectorsAPIClient = (*Client)(nil) - // ListConnectorsPaginatorOptions is the paginator options for ListConnectors type ListConnectorsPaginatorOptions struct { // Specifies the maximum number of items that should be returned in the result @@ -207,6 +202,9 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListConnectorsAPIClient is a client that implements the ListConnectors +// operation. +type ListConnectorsAPIClient interface { + ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) +} + +var _ ListConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appflow/api_op_ListFlows.go b/service/appflow/api_op_ListFlows.go index 63a86494326..7668bdb0a1e 100644 --- a/service/appflow/api_op_ListFlows.go +++ b/service/appflow/api_op_ListFlows.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListFlowsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFlows(options.Region), middleware.Before); err != nil { return err } @@ -132,13 +135,6 @@ func (c *Client) addOperationListFlowsMiddlewares(stack *middleware.Stack, optio return nil } -// ListFlowsAPIClient is a client that implements the ListFlows operation. -type ListFlowsAPIClient interface { - ListFlows(context.Context, *ListFlowsInput, ...func(*Options)) (*ListFlowsOutput, error) -} - -var _ ListFlowsAPIClient = (*Client)(nil) - // ListFlowsPaginatorOptions is the paginator options for ListFlows type ListFlowsPaginatorOptions struct { // Specifies the maximum number of items that should be returned in the result @@ -203,6 +199,9 @@ func (p *ListFlowsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListFlowsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListFlowsAPIClient is a client that implements the ListFlows operation. +type ListFlowsAPIClient interface { + ListFlows(context.Context, *ListFlowsInput, ...func(*Options)) (*ListFlowsOutput, error) +} + +var _ ListFlowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appflow/api_op_ListTagsForResource.go b/service/appflow/api_op_ListTagsForResource.go index c4d2285c72f..ccbdc32fc45 100644 --- a/service/appflow/api_op_ListTagsForResource.go +++ b/service/appflow/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_RegisterConnector.go b/service/appflow/api_op_RegisterConnector.go index b804fc5a4ed..2fbd1de98ee 100644 --- a/service/appflow/api_op_RegisterConnector.go +++ b/service/appflow/api_op_RegisterConnector.go @@ -133,6 +133,9 @@ func (c *Client) addOperationRegisterConnectorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterConnectorMiddleware(stack, options); err != nil { return err } diff --git a/service/appflow/api_op_ResetConnectorMetadataCache.go b/service/appflow/api_op_ResetConnectorMetadataCache.go index 682af714466..b6a49326ec6 100644 --- a/service/appflow/api_op_ResetConnectorMetadataCache.go +++ b/service/appflow/api_op_ResetConnectorMetadataCache.go @@ -159,6 +159,9 @@ func (c *Client) addOperationResetConnectorMetadataCacheMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetConnectorMetadataCache(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appflow/api_op_StartFlow.go b/service/appflow/api_op_StartFlow.go index 70520b66b5b..9ad8b7afa95 100644 --- a/service/appflow/api_op_StartFlow.go +++ b/service/appflow/api_op_StartFlow.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStartFlowMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartFlowMiddleware(stack, options); err != nil { return err } diff --git a/service/appflow/api_op_StopFlow.go b/service/appflow/api_op_StopFlow.go index 31bc713ff78..a427e7e63f8 100644 --- a/service/appflow/api_op_StopFlow.go +++ b/service/appflow/api_op_StopFlow.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStopFlowMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_TagResource.go b/service/appflow/api_op_TagResource.go index 8bc9c1f4cee..e25f89ba755 100644 --- a/service/appflow/api_op_TagResource.go +++ b/service/appflow/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_UnregisterConnector.go b/service/appflow/api_op_UnregisterConnector.go index 101168bb1e3..1257bb1e861 100644 --- a/service/appflow/api_op_UnregisterConnector.go +++ b/service/appflow/api_op_UnregisterConnector.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUnregisterConnectorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnregisterConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_UntagResource.go b/service/appflow/api_op_UntagResource.go index 07f0f962330..2797722c5fc 100644 --- a/service/appflow/api_op_UntagResource.go +++ b/service/appflow/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appflow/api_op_UpdateConnectorProfile.go b/service/appflow/api_op_UpdateConnectorProfile.go index bed1107f948..5aac2abcdb0 100644 --- a/service/appflow/api_op_UpdateConnectorProfile.go +++ b/service/appflow/api_op_UpdateConnectorProfile.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateConnectorProfileMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateConnectorProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/appflow/api_op_UpdateConnectorRegistration.go b/service/appflow/api_op_UpdateConnectorRegistration.go index 9f1e743ecf1..24081d8ae60 100644 --- a/service/appflow/api_op_UpdateConnectorRegistration.go +++ b/service/appflow/api_op_UpdateConnectorRegistration.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateConnectorRegistrationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateConnectorRegistrationMiddleware(stack, options); err != nil { return err } diff --git a/service/appflow/api_op_UpdateFlow.go b/service/appflow/api_op_UpdateFlow.go index 53d5b8fbe2f..8d8a1afb272 100644 --- a/service/appflow/api_op_UpdateFlow.go +++ b/service/appflow/api_op_UpdateFlow.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFlowMiddleware(stack, options); err != nil { return err } diff --git a/service/appintegrations/api_client.go b/service/appintegrations/api_client.go index 59bceb395ab..22d0aeaa5e4 100644 --- a/service/appintegrations/api_client.go +++ b/service/appintegrations/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/appintegrations/api_op_CreateApplication.go b/service/appintegrations/api_op_CreateApplication.go index d8be40439d7..238573c2e39 100644 --- a/service/appintegrations/api_op_CreateApplication.go +++ b/service/appintegrations/api_op_CreateApplication.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/appintegrations/api_op_CreateDataIntegration.go b/service/appintegrations/api_op_CreateDataIntegration.go index de9e261b970..546017cee6d 100644 --- a/service/appintegrations/api_op_CreateDataIntegration.go +++ b/service/appintegrations/api_op_CreateDataIntegration.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCreateDataIntegrationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataIntegrationMiddleware(stack, options); err != nil { return err } diff --git a/service/appintegrations/api_op_CreateEventIntegration.go b/service/appintegrations/api_op_CreateEventIntegration.go index d6d94136aae..0561864237b 100644 --- a/service/appintegrations/api_op_CreateEventIntegration.go +++ b/service/appintegrations/api_op_CreateEventIntegration.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateEventIntegrationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEventIntegrationMiddleware(stack, options); err != nil { return err } diff --git a/service/appintegrations/api_op_DeleteApplication.go b/service/appintegrations/api_op_DeleteApplication.go index bb01a528393..94a9213a92a 100644 --- a/service/appintegrations/api_op_DeleteApplication.go +++ b/service/appintegrations/api_op_DeleteApplication.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_DeleteDataIntegration.go b/service/appintegrations/api_op_DeleteDataIntegration.go index d585b37b1d6..7ad6147b4f8 100644 --- a/service/appintegrations/api_op_DeleteDataIntegration.go +++ b/service/appintegrations/api_op_DeleteDataIntegration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDataIntegrationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_DeleteEventIntegration.go b/service/appintegrations/api_op_DeleteEventIntegration.go index a1d667ae431..e39aca3a267 100644 --- a/service/appintegrations/api_op_DeleteEventIntegration.go +++ b/service/appintegrations/api_op_DeleteEventIntegration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteEventIntegrationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_GetApplication.go b/service/appintegrations/api_op_GetApplication.go index 65885d9f5e9..246d0443236 100644 --- a/service/appintegrations/api_op_GetApplication.go +++ b/service/appintegrations/api_op_GetApplication.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_GetDataIntegration.go b/service/appintegrations/api_op_GetDataIntegration.go index b862edf5f04..9346ca64e14 100644 --- a/service/appintegrations/api_op_GetDataIntegration.go +++ b/service/appintegrations/api_op_GetDataIntegration.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetDataIntegrationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_GetEventIntegration.go b/service/appintegrations/api_op_GetEventIntegration.go index e9b4cc27272..0c27e86193e 100644 --- a/service/appintegrations/api_op_GetEventIntegration.go +++ b/service/appintegrations/api_op_GetEventIntegration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetEventIntegrationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_ListApplicationAssociations.go b/service/appintegrations/api_op_ListApplicationAssociations.go index 212b7e633e1..d90f7360215 100644 --- a/service/appintegrations/api_op_ListApplicationAssociations.go +++ b/service/appintegrations/api_op_ListApplicationAssociations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListApplicationAssociationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAssociationsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListApplicationAssociationsMiddlewares(stack *middl return nil } -// ListApplicationAssociationsAPIClient is a client that implements the -// ListApplicationAssociations operation. -type ListApplicationAssociationsAPIClient interface { - ListApplicationAssociations(context.Context, *ListApplicationAssociationsInput, ...func(*Options)) (*ListApplicationAssociationsOutput, error) -} - -var _ ListApplicationAssociationsAPIClient = (*Client)(nil) - // ListApplicationAssociationsPaginatorOptions is the paginator options for // ListApplicationAssociations type ListApplicationAssociationsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListApplicationAssociationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListApplicationAssociationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListApplicationAssociationsAPIClient is a client that implements the +// ListApplicationAssociations operation. +type ListApplicationAssociationsAPIClient interface { + ListApplicationAssociations(context.Context, *ListApplicationAssociationsInput, ...func(*Options)) (*ListApplicationAssociationsOutput, error) +} + +var _ ListApplicationAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appintegrations/api_op_ListApplications.go b/service/appintegrations/api_op_ListApplications.go index 374fcd03826..b46146527ad 100644 --- a/service/appintegrations/api_op_ListApplications.go +++ b/service/appintegrations/api_op_ListApplications.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of results to return per page. @@ -205,6 +200,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appintegrations/api_op_ListDataIntegrationAssociations.go b/service/appintegrations/api_op_ListDataIntegrationAssociations.go index 55a606861ce..d0b4febb338 100644 --- a/service/appintegrations/api_op_ListDataIntegrationAssociations.go +++ b/service/appintegrations/api_op_ListDataIntegrationAssociations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDataIntegrationAssociationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataIntegrationAssociationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListDataIntegrationAssociationsMiddlewares(stack *m return nil } -// ListDataIntegrationAssociationsAPIClient is a client that implements the -// ListDataIntegrationAssociations operation. -type ListDataIntegrationAssociationsAPIClient interface { - ListDataIntegrationAssociations(context.Context, *ListDataIntegrationAssociationsInput, ...func(*Options)) (*ListDataIntegrationAssociationsOutput, error) -} - -var _ ListDataIntegrationAssociationsAPIClient = (*Client)(nil) - // ListDataIntegrationAssociationsPaginatorOptions is the paginator options for // ListDataIntegrationAssociations type ListDataIntegrationAssociationsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListDataIntegrationAssociationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataIntegrationAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListDataIntegrationAssociationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListDataIntegrationAssociationsAPIClient is a client that implements the +// ListDataIntegrationAssociations operation. +type ListDataIntegrationAssociationsAPIClient interface { + ListDataIntegrationAssociations(context.Context, *ListDataIntegrationAssociationsInput, ...func(*Options)) (*ListDataIntegrationAssociationsOutput, error) +} + +var _ ListDataIntegrationAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataIntegrationAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appintegrations/api_op_ListDataIntegrations.go b/service/appintegrations/api_op_ListDataIntegrations.go index 9c00c244b09..274c1c4d209 100644 --- a/service/appintegrations/api_op_ListDataIntegrations.go +++ b/service/appintegrations/api_op_ListDataIntegrations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDataIntegrationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataIntegrations(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListDataIntegrationsMiddlewares(stack *middleware.S return nil } -// ListDataIntegrationsAPIClient is a client that implements the -// ListDataIntegrations operation. -type ListDataIntegrationsAPIClient interface { - ListDataIntegrations(context.Context, *ListDataIntegrationsInput, ...func(*Options)) (*ListDataIntegrationsOutput, error) -} - -var _ ListDataIntegrationsAPIClient = (*Client)(nil) - // ListDataIntegrationsPaginatorOptions is the paginator options for // ListDataIntegrations type ListDataIntegrationsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListDataIntegrationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataIntegrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListDataIntegrationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDataIntegrationsAPIClient is a client that implements the +// ListDataIntegrations operation. +type ListDataIntegrationsAPIClient interface { + ListDataIntegrations(context.Context, *ListDataIntegrationsInput, ...func(*Options)) (*ListDataIntegrationsOutput, error) +} + +var _ ListDataIntegrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataIntegrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appintegrations/api_op_ListEventIntegrationAssociations.go b/service/appintegrations/api_op_ListEventIntegrationAssociations.go index 0145becd5b8..4d6aaffb7af 100644 --- a/service/appintegrations/api_op_ListEventIntegrationAssociations.go +++ b/service/appintegrations/api_op_ListEventIntegrationAssociations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListEventIntegrationAssociationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventIntegrationAssociationsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListEventIntegrationAssociationsMiddlewares(stack * return nil } -// ListEventIntegrationAssociationsAPIClient is a client that implements the -// ListEventIntegrationAssociations operation. -type ListEventIntegrationAssociationsAPIClient interface { - ListEventIntegrationAssociations(context.Context, *ListEventIntegrationAssociationsInput, ...func(*Options)) (*ListEventIntegrationAssociationsOutput, error) -} - -var _ ListEventIntegrationAssociationsAPIClient = (*Client)(nil) - // ListEventIntegrationAssociationsPaginatorOptions is the paginator options for // ListEventIntegrationAssociations type ListEventIntegrationAssociationsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListEventIntegrationAssociationsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventIntegrationAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEventIntegrationAssociationsPaginator) NextPage(ctx context.Context return result, nil } +// ListEventIntegrationAssociationsAPIClient is a client that implements the +// ListEventIntegrationAssociations operation. +type ListEventIntegrationAssociationsAPIClient interface { + ListEventIntegrationAssociations(context.Context, *ListEventIntegrationAssociationsInput, ...func(*Options)) (*ListEventIntegrationAssociationsOutput, error) +} + +var _ ListEventIntegrationAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventIntegrationAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appintegrations/api_op_ListEventIntegrations.go b/service/appintegrations/api_op_ListEventIntegrations.go index 4edd4f93497..18458678e8b 100644 --- a/service/appintegrations/api_op_ListEventIntegrations.go +++ b/service/appintegrations/api_op_ListEventIntegrations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListEventIntegrationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventIntegrations(options.Region), middleware.Before); err != nil { return err } @@ -132,14 +135,6 @@ func (c *Client) addOperationListEventIntegrationsMiddlewares(stack *middleware. return nil } -// ListEventIntegrationsAPIClient is a client that implements the -// ListEventIntegrations operation. -type ListEventIntegrationsAPIClient interface { - ListEventIntegrations(context.Context, *ListEventIntegrationsInput, ...func(*Options)) (*ListEventIntegrationsOutput, error) -} - -var _ ListEventIntegrationsAPIClient = (*Client)(nil) - // ListEventIntegrationsPaginatorOptions is the paginator options for // ListEventIntegrations type ListEventIntegrationsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListEventIntegrationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventIntegrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListEventIntegrationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListEventIntegrationsAPIClient is a client that implements the +// ListEventIntegrations operation. +type ListEventIntegrationsAPIClient interface { + ListEventIntegrations(context.Context, *ListEventIntegrationsInput, ...func(*Options)) (*ListEventIntegrationsOutput, error) +} + +var _ ListEventIntegrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventIntegrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appintegrations/api_op_ListTagsForResource.go b/service/appintegrations/api_op_ListTagsForResource.go index 02180fd92d2..02ee35070d3 100644 --- a/service/appintegrations/api_op_ListTagsForResource.go +++ b/service/appintegrations/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_TagResource.go b/service/appintegrations/api_op_TagResource.go index 9d6e34185ff..3fd6cb55d4e 100644 --- a/service/appintegrations/api_op_TagResource.go +++ b/service/appintegrations/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_UntagResource.go b/service/appintegrations/api_op_UntagResource.go index 8a68f1f174e..b2ecfe376a3 100644 --- a/service/appintegrations/api_op_UntagResource.go +++ b/service/appintegrations/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_UpdateApplication.go b/service/appintegrations/api_op_UpdateApplication.go index ac4138b7e27..4c54012b116 100644 --- a/service/appintegrations/api_op_UpdateApplication.go +++ b/service/appintegrations/api_op_UpdateApplication.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_UpdateDataIntegration.go b/service/appintegrations/api_op_UpdateDataIntegration.go index 0b68da78a51..373512327a1 100644 --- a/service/appintegrations/api_op_UpdateDataIntegration.go +++ b/service/appintegrations/api_op_UpdateDataIntegration.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateDataIntegrationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appintegrations/api_op_UpdateEventIntegration.go b/service/appintegrations/api_op_UpdateEventIntegration.go index a2f926321f8..e9cf029f20e 100644 --- a/service/appintegrations/api_op_UpdateEventIntegration.go +++ b/service/appintegrations/api_op_UpdateEventIntegration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateEventIntegrationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_client.go b/service/applicationautoscaling/api_client.go index b15831aebfb..e710e5f6b24 100644 --- a/service/applicationautoscaling/api_client.go +++ b/service/applicationautoscaling/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/applicationautoscaling/api_op_DeleteScalingPolicy.go b/service/applicationautoscaling/api_op_DeleteScalingPolicy.go index e3908b7133a..65579460e55 100644 --- a/service/applicationautoscaling/api_op_DeleteScalingPolicy.go +++ b/service/applicationautoscaling/api_op_DeleteScalingPolicy.go @@ -267,6 +267,9 @@ func (c *Client) addOperationDeleteScalingPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_DeleteScheduledAction.go b/service/applicationautoscaling/api_op_DeleteScheduledAction.go index 22e4ae81082..f6e61297757 100644 --- a/service/applicationautoscaling/api_op_DeleteScheduledAction.go +++ b/service/applicationautoscaling/api_op_DeleteScheduledAction.go @@ -262,6 +262,9 @@ func (c *Client) addOperationDeleteScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_DeregisterScalableTarget.go b/service/applicationautoscaling/api_op_DeregisterScalableTarget.go index 5ceea5b1ae4..9f8ebd23113 100644 --- a/service/applicationautoscaling/api_op_DeregisterScalableTarget.go +++ b/service/applicationautoscaling/api_op_DeregisterScalableTarget.go @@ -258,6 +258,9 @@ func (c *Client) addOperationDeregisterScalableTargetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterScalableTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_DescribeScalableTargets.go b/service/applicationautoscaling/api_op_DescribeScalableTargets.go index 8d926f88f2d..6b4c138f00c 100644 --- a/service/applicationautoscaling/api_op_DescribeScalableTargets.go +++ b/service/applicationautoscaling/api_op_DescribeScalableTargets.go @@ -271,6 +271,9 @@ func (c *Client) addOperationDescribeScalableTargetsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScalableTargetsValidationMiddleware(stack); err != nil { return err } @@ -295,14 +298,6 @@ func (c *Client) addOperationDescribeScalableTargetsMiddlewares(stack *middlewar return nil } -// DescribeScalableTargetsAPIClient is a client that implements the -// DescribeScalableTargets operation. -type DescribeScalableTargetsAPIClient interface { - DescribeScalableTargets(context.Context, *DescribeScalableTargetsInput, ...func(*Options)) (*DescribeScalableTargetsOutput, error) -} - -var _ DescribeScalableTargetsAPIClient = (*Client)(nil) - // DescribeScalableTargetsPaginatorOptions is the paginator options for // DescribeScalableTargets type DescribeScalableTargetsPaginatorOptions struct { @@ -374,6 +369,9 @@ func (p *DescribeScalableTargetsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScalableTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -393,6 +391,14 @@ func (p *DescribeScalableTargetsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeScalableTargetsAPIClient is a client that implements the +// DescribeScalableTargets operation. +type DescribeScalableTargetsAPIClient interface { + DescribeScalableTargets(context.Context, *DescribeScalableTargetsInput, ...func(*Options)) (*DescribeScalableTargetsOutput, error) +} + +var _ DescribeScalableTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScalableTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationautoscaling/api_op_DescribeScalingActivities.go b/service/applicationautoscaling/api_op_DescribeScalingActivities.go index 92632ac1c71..5a810f3e7a7 100644 --- a/service/applicationautoscaling/api_op_DescribeScalingActivities.go +++ b/service/applicationautoscaling/api_op_DescribeScalingActivities.go @@ -286,6 +286,9 @@ func (c *Client) addOperationDescribeScalingActivitiesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScalingActivitiesValidationMiddleware(stack); err != nil { return err } @@ -310,14 +313,6 @@ func (c *Client) addOperationDescribeScalingActivitiesMiddlewares(stack *middlew return nil } -// DescribeScalingActivitiesAPIClient is a client that implements the -// DescribeScalingActivities operation. -type DescribeScalingActivitiesAPIClient interface { - DescribeScalingActivities(context.Context, *DescribeScalingActivitiesInput, ...func(*Options)) (*DescribeScalingActivitiesOutput, error) -} - -var _ DescribeScalingActivitiesAPIClient = (*Client)(nil) - // DescribeScalingActivitiesPaginatorOptions is the paginator options for // DescribeScalingActivities type DescribeScalingActivitiesPaginatorOptions struct { @@ -389,6 +384,9 @@ func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScalingActivities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -408,6 +406,14 @@ func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeScalingActivitiesAPIClient is a client that implements the +// DescribeScalingActivities operation. +type DescribeScalingActivitiesAPIClient interface { + DescribeScalingActivities(context.Context, *DescribeScalingActivitiesInput, ...func(*Options)) (*DescribeScalingActivitiesOutput, error) +} + +var _ DescribeScalingActivitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScalingActivities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationautoscaling/api_op_DescribeScalingPolicies.go b/service/applicationautoscaling/api_op_DescribeScalingPolicies.go index cfedcb6e806..6fdde63a194 100644 --- a/service/applicationautoscaling/api_op_DescribeScalingPolicies.go +++ b/service/applicationautoscaling/api_op_DescribeScalingPolicies.go @@ -281,6 +281,9 @@ func (c *Client) addOperationDescribeScalingPoliciesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScalingPoliciesValidationMiddleware(stack); err != nil { return err } @@ -305,14 +308,6 @@ func (c *Client) addOperationDescribeScalingPoliciesMiddlewares(stack *middlewar return nil } -// DescribeScalingPoliciesAPIClient is a client that implements the -// DescribeScalingPolicies operation. -type DescribeScalingPoliciesAPIClient interface { - DescribeScalingPolicies(context.Context, *DescribeScalingPoliciesInput, ...func(*Options)) (*DescribeScalingPoliciesOutput, error) -} - -var _ DescribeScalingPoliciesAPIClient = (*Client)(nil) - // DescribeScalingPoliciesPaginatorOptions is the paginator options for // DescribeScalingPolicies type DescribeScalingPoliciesPaginatorOptions struct { @@ -384,6 +379,9 @@ func (p *DescribeScalingPoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScalingPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -403,6 +401,14 @@ func (p *DescribeScalingPoliciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeScalingPoliciesAPIClient is a client that implements the +// DescribeScalingPolicies operation. +type DescribeScalingPoliciesAPIClient interface { + DescribeScalingPolicies(context.Context, *DescribeScalingPoliciesInput, ...func(*Options)) (*DescribeScalingPoliciesOutput, error) +} + +var _ DescribeScalingPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScalingPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationautoscaling/api_op_DescribeScheduledActions.go b/service/applicationautoscaling/api_op_DescribeScheduledActions.go index 486d99a01c1..8342b518c58 100644 --- a/service/applicationautoscaling/api_op_DescribeScheduledActions.go +++ b/service/applicationautoscaling/api_op_DescribeScheduledActions.go @@ -281,6 +281,9 @@ func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduledActionsValidationMiddleware(stack); err != nil { return err } @@ -305,14 +308,6 @@ func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middlewa return nil } -// DescribeScheduledActionsAPIClient is a client that implements the -// DescribeScheduledActions operation. -type DescribeScheduledActionsAPIClient interface { - DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error) -} - -var _ DescribeScheduledActionsAPIClient = (*Client)(nil) - // DescribeScheduledActionsPaginatorOptions is the paginator options for // DescribeScheduledActions type DescribeScheduledActionsPaginatorOptions struct { @@ -384,6 +379,9 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScheduledActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -403,6 +401,14 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeScheduledActionsAPIClient is a client that implements the +// DescribeScheduledActions operation. +type DescribeScheduledActionsAPIClient interface { + DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error) +} + +var _ DescribeScheduledActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationautoscaling/api_op_ListTagsForResource.go b/service/applicationautoscaling/api_op_ListTagsForResource.go index 2b61b7ddd16..23bc2c2f5ef 100644 --- a/service/applicationautoscaling/api_op_ListTagsForResource.go +++ b/service/applicationautoscaling/api_op_ListTagsForResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_PutScalingPolicy.go b/service/applicationautoscaling/api_op_PutScalingPolicy.go index c7d507e0826..4a9b90be9b6 100644 --- a/service/applicationautoscaling/api_op_PutScalingPolicy.go +++ b/service/applicationautoscaling/api_op_PutScalingPolicy.go @@ -333,6 +333,9 @@ func (c *Client) addOperationPutScalingPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_PutScheduledAction.go b/service/applicationautoscaling/api_op_PutScheduledAction.go index 53acbcb6bb2..2aadd88ef3a 100644 --- a/service/applicationautoscaling/api_op_PutScheduledAction.go +++ b/service/applicationautoscaling/api_op_PutScheduledAction.go @@ -329,6 +329,9 @@ func (c *Client) addOperationPutScheduledActionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_RegisterScalableTarget.go b/service/applicationautoscaling/api_op_RegisterScalableTarget.go index eeadf8d8686..846c6e72a4c 100644 --- a/service/applicationautoscaling/api_op_RegisterScalableTarget.go +++ b/service/applicationautoscaling/api_op_RegisterScalableTarget.go @@ -396,6 +396,9 @@ func (c *Client) addOperationRegisterScalableTargetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterScalableTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_TagResource.go b/service/applicationautoscaling/api_op_TagResource.go index 8fa68e1bafa..ba0a691cf10 100644 --- a/service/applicationautoscaling/api_op_TagResource.go +++ b/service/applicationautoscaling/api_op_TagResource.go @@ -144,6 +144,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationautoscaling/api_op_UntagResource.go b/service/applicationautoscaling/api_op_UntagResource.go index e1e2ff27597..8e58f82ba3f 100644 --- a/service/applicationautoscaling/api_op_UntagResource.go +++ b/service/applicationautoscaling/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationcostprofiler/api_client.go b/service/applicationcostprofiler/api_client.go index 7a16c3162c8..57257a62dee 100644 --- a/service/applicationcostprofiler/api_client.go +++ b/service/applicationcostprofiler/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/applicationcostprofiler/api_op_DeleteReportDefinition.go b/service/applicationcostprofiler/api_op_DeleteReportDefinition.go index 0aa2aed071d..67c0056a1e9 100644 --- a/service/applicationcostprofiler/api_op_DeleteReportDefinition.go +++ b/service/applicationcostprofiler/api_op_DeleteReportDefinition.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteReportDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationcostprofiler/api_op_GetReportDefinition.go b/service/applicationcostprofiler/api_op_GetReportDefinition.go index 2110c6bfc97..25dd55dcac8 100644 --- a/service/applicationcostprofiler/api_op_GetReportDefinition.go +++ b/service/applicationcostprofiler/api_op_GetReportDefinition.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetReportDefinitionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationcostprofiler/api_op_ImportApplicationUsage.go b/service/applicationcostprofiler/api_op_ImportApplicationUsage.go index 72d680f841f..dfcef035d0a 100644 --- a/service/applicationcostprofiler/api_op_ImportApplicationUsage.go +++ b/service/applicationcostprofiler/api_op_ImportApplicationUsage.go @@ -112,6 +112,9 @@ func (c *Client) addOperationImportApplicationUsageMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportApplicationUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationcostprofiler/api_op_ListReportDefinitions.go b/service/applicationcostprofiler/api_op_ListReportDefinitions.go index c31a1746432..95fb04b7f69 100644 --- a/service/applicationcostprofiler/api_op_ListReportDefinitions.go +++ b/service/applicationcostprofiler/api_op_ListReportDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListReportDefinitionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReportDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListReportDefinitionsMiddlewares(stack *middleware. return nil } -// ListReportDefinitionsAPIClient is a client that implements the -// ListReportDefinitions operation. -type ListReportDefinitionsAPIClient interface { - ListReportDefinitions(context.Context, *ListReportDefinitionsInput, ...func(*Options)) (*ListReportDefinitionsOutput, error) -} - -var _ ListReportDefinitionsAPIClient = (*Client)(nil) - // ListReportDefinitionsPaginatorOptions is the paginator options for // ListReportDefinitions type ListReportDefinitionsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListReportDefinitionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReportDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListReportDefinitionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListReportDefinitionsAPIClient is a client that implements the +// ListReportDefinitions operation. +type ListReportDefinitionsAPIClient interface { + ListReportDefinitions(context.Context, *ListReportDefinitionsInput, ...func(*Options)) (*ListReportDefinitionsOutput, error) +} + +var _ ListReportDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReportDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationcostprofiler/api_op_PutReportDefinition.go b/service/applicationcostprofiler/api_op_PutReportDefinition.go index 1192a21e619..3d84cad4647 100644 --- a/service/applicationcostprofiler/api_op_PutReportDefinition.go +++ b/service/applicationcostprofiler/api_op_PutReportDefinition.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPutReportDefinitionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationcostprofiler/api_op_UpdateReportDefinition.go b/service/applicationcostprofiler/api_op_UpdateReportDefinition.go index be63d55a53b..6583c702883 100644 --- a/service/applicationcostprofiler/api_op_UpdateReportDefinition.go +++ b/service/applicationcostprofiler/api_op_UpdateReportDefinition.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateReportDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_client.go b/service/applicationdiscoveryservice/api_client.go index c91c8542482..d4373562a3b 100644 --- a/service/applicationdiscoveryservice/api_client.go +++ b/service/applicationdiscoveryservice/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/applicationdiscoveryservice/api_op_AssociateConfigurationItemsToApplication.go b/service/applicationdiscoveryservice/api_op_AssociateConfigurationItemsToApplication.go index f2a1083a203..42da4728129 100644 --- a/service/applicationdiscoveryservice/api_op_AssociateConfigurationItemsToApplication.go +++ b/service/applicationdiscoveryservice/api_op_AssociateConfigurationItemsToApplication.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateConfigurationItemsToApplicationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateConfigurationItemsToApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_BatchDeleteAgents.go b/service/applicationdiscoveryservice/api_op_BatchDeleteAgents.go index 63ea0a73192..529061230f7 100644 --- a/service/applicationdiscoveryservice/api_op_BatchDeleteAgents.go +++ b/service/applicationdiscoveryservice/api_op_BatchDeleteAgents.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchDeleteAgentsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteAgentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_BatchDeleteImportData.go b/service/applicationdiscoveryservice/api_op_BatchDeleteImportData.go index 8f246781303..3c1afde7b7c 100644 --- a/service/applicationdiscoveryservice/api_op_BatchDeleteImportData.go +++ b/service/applicationdiscoveryservice/api_op_BatchDeleteImportData.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchDeleteImportDataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteImportDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_CreateApplication.go b/service/applicationdiscoveryservice/api_op_CreateApplication.go index 822d530503a..01df17c94d1 100644 --- a/service/applicationdiscoveryservice/api_op_CreateApplication.go +++ b/service/applicationdiscoveryservice/api_op_CreateApplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_CreateTags.go b/service/applicationdiscoveryservice/api_op_CreateTags.go index 60465125b96..66ae9a84dcb 100644 --- a/service/applicationdiscoveryservice/api_op_CreateTags.go +++ b/service/applicationdiscoveryservice/api_op_CreateTags.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_DeleteApplications.go b/service/applicationdiscoveryservice/api_op_DeleteApplications.go index 72fe56c50cd..c42ad0b0341 100644 --- a/service/applicationdiscoveryservice/api_op_DeleteApplications.go +++ b/service/applicationdiscoveryservice/api_op_DeleteApplications.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApplicationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_DeleteTags.go b/service/applicationdiscoveryservice/api_op_DeleteTags.go index ec7ff1745d8..0f90e34578a 100644 --- a/service/applicationdiscoveryservice/api_op_DeleteTags.go +++ b/service/applicationdiscoveryservice/api_op_DeleteTags.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_DescribeAgents.go b/service/applicationdiscoveryservice/api_op_DescribeAgents.go index 85f03a1ac4a..9ac3f096a1f 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeAgents.go +++ b/service/applicationdiscoveryservice/api_op_DescribeAgents.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeAgentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAgentsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeAgentsMiddlewares(stack *middleware.Stack, return nil } -// DescribeAgentsAPIClient is a client that implements the DescribeAgents -// operation. -type DescribeAgentsAPIClient interface { - DescribeAgents(context.Context, *DescribeAgentsInput, ...func(*Options)) (*DescribeAgentsOutput, error) -} - -var _ DescribeAgentsAPIClient = (*Client)(nil) - // DescribeAgentsPaginatorOptions is the paginator options for DescribeAgents type DescribeAgentsPaginatorOptions struct { // The total number of agents/collectors to return in a single page of output. The @@ -226,6 +221,9 @@ func (p *DescribeAgentsPaginator) NextPage(ctx context.Context, optFns ...func(* params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAgents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeAgentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeAgentsAPIClient is a client that implements the DescribeAgents +// operation. +type DescribeAgentsAPIClient interface { + DescribeAgents(context.Context, *DescribeAgentsInput, ...func(*Options)) (*DescribeAgentsOutput, error) +} + +var _ DescribeAgentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAgents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_DescribeBatchDeleteConfigurationTask.go b/service/applicationdiscoveryservice/api_op_DescribeBatchDeleteConfigurationTask.go index d3a6eff6597..8e3c6f6c474 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeBatchDeleteConfigurationTask.go +++ b/service/applicationdiscoveryservice/api_op_DescribeBatchDeleteConfigurationTask.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeBatchDeleteConfigurationTaskMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBatchDeleteConfigurationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_DescribeConfigurations.go b/service/applicationdiscoveryservice/api_op_DescribeConfigurations.go index 202ee003d2b..32a48f8ccf0 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeConfigurations.go +++ b/service/applicationdiscoveryservice/api_op_DescribeConfigurations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeConfigurationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go b/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go index 64ca5837aff..0dea19c4c4c 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go +++ b/service/applicationdiscoveryservice/api_op_DescribeContinuousExports.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeContinuousExportsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeContinuousExports(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeContinuousExportsMiddlewares(stack *middlew return nil } -// DescribeContinuousExportsAPIClient is a client that implements the -// DescribeContinuousExports operation. -type DescribeContinuousExportsAPIClient interface { - DescribeContinuousExports(context.Context, *DescribeContinuousExportsInput, ...func(*Options)) (*DescribeContinuousExportsOutput, error) -} - -var _ DescribeContinuousExportsAPIClient = (*Client)(nil) - // DescribeContinuousExportsPaginatorOptions is the paginator options for // DescribeContinuousExports type DescribeContinuousExportsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *DescribeContinuousExportsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeContinuousExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *DescribeContinuousExportsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeContinuousExportsAPIClient is a client that implements the +// DescribeContinuousExports operation. +type DescribeContinuousExportsAPIClient interface { + DescribeContinuousExports(context.Context, *DescribeContinuousExportsInput, ...func(*Options)) (*DescribeContinuousExportsOutput, error) +} + +var _ DescribeContinuousExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeContinuousExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_DescribeExportConfigurations.go b/service/applicationdiscoveryservice/api_op_DescribeExportConfigurations.go index 977f6de80cd..52a37a198d0 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeExportConfigurations.go +++ b/service/applicationdiscoveryservice/api_op_DescribeExportConfigurations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeExportConfigurationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeExportConfigurationsMiddlewares(stack *midd return nil } -// DescribeExportConfigurationsAPIClient is a client that implements the -// DescribeExportConfigurations operation. -type DescribeExportConfigurationsAPIClient interface { - DescribeExportConfigurations(context.Context, *DescribeExportConfigurationsInput, ...func(*Options)) (*DescribeExportConfigurationsOutput, error) -} - -var _ DescribeExportConfigurationsAPIClient = (*Client)(nil) - // DescribeExportConfigurationsPaginatorOptions is the paginator options for // DescribeExportConfigurations type DescribeExportConfigurationsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeExportConfigurationsPaginator) NextPage(ctx context.Context, op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeExportConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeExportConfigurationsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeExportConfigurationsAPIClient is a client that implements the +// DescribeExportConfigurations operation. +type DescribeExportConfigurationsAPIClient interface { + DescribeExportConfigurations(context.Context, *DescribeExportConfigurationsInput, ...func(*Options)) (*DescribeExportConfigurationsOutput, error) +} + +var _ DescribeExportConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExportConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_DescribeExportTasks.go b/service/applicationdiscoveryservice/api_op_DescribeExportTasks.go index 5ce7489ceae..1dd2bebd795 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeExportTasks.go +++ b/service/applicationdiscoveryservice/api_op_DescribeExportTasks.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExportTasksValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St return nil } -// DescribeExportTasksAPIClient is a client that implements the -// DescribeExportTasks operation. -type DescribeExportTasksAPIClient interface { - DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) -} - -var _ DescribeExportTasksAPIClient = (*Client)(nil) - // DescribeExportTasksPaginatorOptions is the paginator options for // DescribeExportTasks type DescribeExportTasksPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeExportTasksPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeExportTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeExportTasksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeExportTasksAPIClient is a client that implements the +// DescribeExportTasks operation. +type DescribeExportTasksAPIClient interface { + DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) +} + +var _ DescribeExportTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go b/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go index 1cdd6a1f70a..61b5b89a932 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go +++ b/service/applicationdiscoveryservice/api_op_DescribeImportTasks.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeImportTasksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportTasks(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeImportTasksMiddlewares(stack *middleware.St return nil } -// DescribeImportTasksAPIClient is a client that implements the -// DescribeImportTasks operation. -type DescribeImportTasksAPIClient interface { - DescribeImportTasks(context.Context, *DescribeImportTasksInput, ...func(*Options)) (*DescribeImportTasksOutput, error) -} - -var _ DescribeImportTasksAPIClient = (*Client)(nil) - // DescribeImportTasksPaginatorOptions is the paginator options for // DescribeImportTasks type DescribeImportTasksPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeImportTasksPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImportTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeImportTasksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeImportTasksAPIClient is a client that implements the +// DescribeImportTasks operation. +type DescribeImportTasksAPIClient interface { + DescribeImportTasks(context.Context, *DescribeImportTasksInput, ...func(*Options)) (*DescribeImportTasksOutput, error) +} + +var _ DescribeImportTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImportTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_DescribeTags.go b/service/applicationdiscoveryservice/api_op_DescribeTags.go index 4d8adf7f4aa..a66885761c1 100644 --- a/service/applicationdiscoveryservice/api_op_DescribeTags.go +++ b/service/applicationdiscoveryservice/api_op_DescribeTags.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeTagsAPIClient is a client that implements the DescribeTags operation. -type DescribeTagsAPIClient interface { - DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) -} - -var _ DescribeTagsAPIClient = (*Client)(nil) - // DescribeTagsPaginatorOptions is the paginator options for DescribeTags type DescribeTagsPaginatorOptions struct { // The total number of items to return in a single page of output. The maximum @@ -220,6 +216,9 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeTagsAPIClient is a client that implements the DescribeTags operation. +type DescribeTagsAPIClient interface { + DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) +} + +var _ DescribeTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_DisassociateConfigurationItemsFromApplication.go b/service/applicationdiscoveryservice/api_op_DisassociateConfigurationItemsFromApplication.go index 73bbcdae49e..b3ae57eeab8 100644 --- a/service/applicationdiscoveryservice/api_op_DisassociateConfigurationItemsFromApplication.go +++ b/service/applicationdiscoveryservice/api_op_DisassociateConfigurationItemsFromApplication.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateConfigurationItemsFromApplicationMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateConfigurationItemsFromApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_ExportConfigurations.go b/service/applicationdiscoveryservice/api_op_ExportConfigurations.go index 8ea62e8d5b0..007ec672555 100644 --- a/service/applicationdiscoveryservice/api_op_ExportConfigurations.go +++ b/service/applicationdiscoveryservice/api_op_ExportConfigurations.go @@ -108,6 +108,9 @@ func (c *Client) addOperationExportConfigurationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_GetDiscoverySummary.go b/service/applicationdiscoveryservice/api_op_GetDiscoverySummary.go index 0782f99a43e..c3f66f94274 100644 --- a/service/applicationdiscoveryservice/api_op_GetDiscoverySummary.go +++ b/service/applicationdiscoveryservice/api_op_GetDiscoverySummary.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetDiscoverySummaryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDiscoverySummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_ListConfigurations.go b/service/applicationdiscoveryservice/api_op_ListConfigurations.go index dc5d5e4c976..2eb9473342d 100644 --- a/service/applicationdiscoveryservice/api_op_ListConfigurations.go +++ b/service/applicationdiscoveryservice/api_op_ListConfigurations.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListConfigurationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListConfigurationsMiddlewares(stack *middleware.Sta return nil } -// ListConfigurationsAPIClient is a client that implements the ListConfigurations -// operation. -type ListConfigurationsAPIClient interface { - ListConfigurations(context.Context, *ListConfigurationsInput, ...func(*Options)) (*ListConfigurationsOutput, error) -} - -var _ ListConfigurationsAPIClient = (*Client)(nil) - // ListConfigurationsPaginatorOptions is the paginator options for // ListConfigurations type ListConfigurationsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListConfigurationsPaginator) NextPage(ctx context.Context, optFns ...fu params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListConfigurationsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListConfigurationsAPIClient is a client that implements the ListConfigurations +// operation. +type ListConfigurationsAPIClient interface { + ListConfigurations(context.Context, *ListConfigurationsInput, ...func(*Options)) (*ListConfigurationsOutput, error) +} + +var _ ListConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationdiscoveryservice/api_op_ListServerNeighbors.go b/service/applicationdiscoveryservice/api_op_ListServerNeighbors.go index ae42643b8f7..51540ceddbf 100644 --- a/service/applicationdiscoveryservice/api_op_ListServerNeighbors.go +++ b/service/applicationdiscoveryservice/api_op_ListServerNeighbors.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListServerNeighborsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServerNeighborsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StartBatchDeleteConfigurationTask.go b/service/applicationdiscoveryservice/api_op_StartBatchDeleteConfigurationTask.go index d5854a0f306..4c039c10753 100644 --- a/service/applicationdiscoveryservice/api_op_StartBatchDeleteConfigurationTask.go +++ b/service/applicationdiscoveryservice/api_op_StartBatchDeleteConfigurationTask.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartBatchDeleteConfigurationTaskMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBatchDeleteConfigurationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StartContinuousExport.go b/service/applicationdiscoveryservice/api_op_StartContinuousExport.go index cf224ae19a7..624ccfd5c42 100644 --- a/service/applicationdiscoveryservice/api_op_StartContinuousExport.go +++ b/service/applicationdiscoveryservice/api_op_StartContinuousExport.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartContinuousExportMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartContinuousExport(options.Region), middleware.Before); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StartDataCollectionByAgentIds.go b/service/applicationdiscoveryservice/api_op_StartDataCollectionByAgentIds.go index 4d1bea2e5bd..e9dfcbec03d 100644 --- a/service/applicationdiscoveryservice/api_op_StartDataCollectionByAgentIds.go +++ b/service/applicationdiscoveryservice/api_op_StartDataCollectionByAgentIds.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartDataCollectionByAgentIdsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDataCollectionByAgentIdsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StartExportTask.go b/service/applicationdiscoveryservice/api_op_StartExportTask.go index 75c7c8ce0af..face356b8d7 100644 --- a/service/applicationdiscoveryservice/api_op_StartExportTask.go +++ b/service/applicationdiscoveryservice/api_op_StartExportTask.go @@ -154,6 +154,9 @@ func (c *Client) addOperationStartExportTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StartImportTask.go b/service/applicationdiscoveryservice/api_op_StartImportTask.go index 7b3b19401d7..74a3157acbf 100644 --- a/service/applicationdiscoveryservice/api_op_StartImportTask.go +++ b/service/applicationdiscoveryservice/api_op_StartImportTask.go @@ -158,6 +158,9 @@ func (c *Client) addOperationStartImportTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartImportTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StopContinuousExport.go b/service/applicationdiscoveryservice/api_op_StopContinuousExport.go index ece86016649..6399e72aa7d 100644 --- a/service/applicationdiscoveryservice/api_op_StopContinuousExport.go +++ b/service/applicationdiscoveryservice/api_op_StopContinuousExport.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopContinuousExportMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopContinuousExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_StopDataCollectionByAgentIds.go b/service/applicationdiscoveryservice/api_op_StopDataCollectionByAgentIds.go index ef8d2c82680..a57409da1fa 100644 --- a/service/applicationdiscoveryservice/api_op_StopDataCollectionByAgentIds.go +++ b/service/applicationdiscoveryservice/api_op_StopDataCollectionByAgentIds.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopDataCollectionByAgentIdsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDataCollectionByAgentIdsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationdiscoveryservice/api_op_UpdateApplication.go b/service/applicationdiscoveryservice/api_op_UpdateApplication.go index 3de9cfbd22d..2ab387d3b0f 100644 --- a/service/applicationdiscoveryservice/api_op_UpdateApplication.go +++ b/service/applicationdiscoveryservice/api_op_UpdateApplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_client.go b/service/applicationinsights/api_client.go index 4594f5165ca..2cecea0b2de 100644 --- a/service/applicationinsights/api_client.go +++ b/service/applicationinsights/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/applicationinsights/api_op_AddWorkload.go b/service/applicationinsights/api_op_AddWorkload.go index 1893628aafc..2914607015a 100644 --- a/service/applicationinsights/api_op_AddWorkload.go +++ b/service/applicationinsights/api_op_AddWorkload.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAddWorkloadMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_CreateApplication.go b/service/applicationinsights/api_op_CreateApplication.go index 440f34fff5d..3cf5883a9f2 100644 --- a/service/applicationinsights/api_op_CreateApplication.go +++ b/service/applicationinsights/api_op_CreateApplication.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_CreateComponent.go b/service/applicationinsights/api_op_CreateComponent.go index a96a43d196e..0bfc632062f 100644 --- a/service/applicationinsights/api_op_CreateComponent.go +++ b/service/applicationinsights/api_op_CreateComponent.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_CreateLogPattern.go b/service/applicationinsights/api_op_CreateLogPattern.go index 1f9119c82dd..89f1644b8f5 100644 --- a/service/applicationinsights/api_op_CreateLogPattern.go +++ b/service/applicationinsights/api_op_CreateLogPattern.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateLogPatternMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLogPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DeleteApplication.go b/service/applicationinsights/api_op_DeleteApplication.go index 17311b6204c..e82f7541c66 100644 --- a/service/applicationinsights/api_op_DeleteApplication.go +++ b/service/applicationinsights/api_op_DeleteApplication.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DeleteComponent.go b/service/applicationinsights/api_op_DeleteComponent.go index d4648f9cd9d..33d212d0b59 100644 --- a/service/applicationinsights/api_op_DeleteComponent.go +++ b/service/applicationinsights/api_op_DeleteComponent.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DeleteLogPattern.go b/service/applicationinsights/api_op_DeleteLogPattern.go index 0a8fd55a4fa..eafcd0dd31d 100644 --- a/service/applicationinsights/api_op_DeleteLogPattern.go +++ b/service/applicationinsights/api_op_DeleteLogPattern.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteLogPatternMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLogPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeApplication.go b/service/applicationinsights/api_op_DescribeApplication.go index 526fbf3c1a5..e1b0aeb59b9 100644 --- a/service/applicationinsights/api_op_DescribeApplication.go +++ b/service/applicationinsights/api_op_DescribeApplication.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeComponent.go b/service/applicationinsights/api_op_DescribeComponent.go index 04e1f98e586..31a8fe626f9 100644 --- a/service/applicationinsights/api_op_DescribeComponent.go +++ b/service/applicationinsights/api_op_DescribeComponent.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeComponentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeComponentConfiguration.go b/service/applicationinsights/api_op_DescribeComponentConfiguration.go index af646d2208e..7a58414a157 100644 --- a/service/applicationinsights/api_op_DescribeComponentConfiguration.go +++ b/service/applicationinsights/api_op_DescribeComponentConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeComponentConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeComponentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go b/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go index 9f67dca0aa2..4fef8602b25 100644 --- a/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go +++ b/service/applicationinsights/api_op_DescribeComponentConfigurationRecommendation.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeComponentConfigurationRecommendationMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeComponentConfigurationRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeLogPattern.go b/service/applicationinsights/api_op_DescribeLogPattern.go index fba5fbce2d3..3c7bfd07ddd 100644 --- a/service/applicationinsights/api_op_DescribeLogPattern.go +++ b/service/applicationinsights/api_op_DescribeLogPattern.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeLogPatternMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLogPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeObservation.go b/service/applicationinsights/api_op_DescribeObservation.go index c60b818b60b..622d75ac21c 100644 --- a/service/applicationinsights/api_op_DescribeObservation.go +++ b/service/applicationinsights/api_op_DescribeObservation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeObservationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeObservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeProblem.go b/service/applicationinsights/api_op_DescribeProblem.go index 28b2afcaa68..12e00688152 100644 --- a/service/applicationinsights/api_op_DescribeProblem.go +++ b/service/applicationinsights/api_op_DescribeProblem.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeProblemMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProblemValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeProblemObservations.go b/service/applicationinsights/api_op_DescribeProblemObservations.go index c48a67d92c2..e9036c9e78a 100644 --- a/service/applicationinsights/api_op_DescribeProblemObservations.go +++ b/service/applicationinsights/api_op_DescribeProblemObservations.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeProblemObservationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProblemObservationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_DescribeWorkload.go b/service/applicationinsights/api_op_DescribeWorkload.go index 73c89445f8d..ac63df46e9a 100644 --- a/service/applicationinsights/api_op_DescribeWorkload.go +++ b/service/applicationinsights/api_op_DescribeWorkload.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeWorkloadMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_ListApplications.go b/service/applicationinsights/api_op_ListApplications.go index 7071be1be52..1c310b5ffe0 100644 --- a/service/applicationinsights/api_op_ListApplications.go +++ b/service/applicationinsights/api_op_ListApplications.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -208,6 +203,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_ListComponents.go b/service/applicationinsights/api_op_ListComponents.go index 3b9f2836e5b..45c128c14d6 100644 --- a/service/applicationinsights/api_op_ListComponents.go +++ b/service/applicationinsights/api_op_ListComponents.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComponentsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -215,6 +210,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_ListConfigurationHistory.go b/service/applicationinsights/api_op_ListConfigurationHistory.go index 6d4c86b4606..caeed5120bd 100644 --- a/service/applicationinsights/api_op_ListConfigurationHistory.go +++ b/service/applicationinsights/api_op_ListConfigurationHistory.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListConfigurationHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationHistory(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListConfigurationHistoryMiddlewares(stack *middlewa return nil } -// ListConfigurationHistoryAPIClient is a client that implements the -// ListConfigurationHistory operation. -type ListConfigurationHistoryAPIClient interface { - ListConfigurationHistory(context.Context, *ListConfigurationHistoryInput, ...func(*Options)) (*ListConfigurationHistoryOutput, error) -} - -var _ ListConfigurationHistoryAPIClient = (*Client)(nil) - // ListConfigurationHistoryPaginatorOptions is the paginator options for // ListConfigurationHistory type ListConfigurationHistoryPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListConfigurationHistoryPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListConfigurationHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListConfigurationHistoryAPIClient is a client that implements the +// ListConfigurationHistory operation. +type ListConfigurationHistoryAPIClient interface { + ListConfigurationHistory(context.Context, *ListConfigurationHistoryInput, ...func(*Options)) (*ListConfigurationHistoryOutput, error) +} + +var _ ListConfigurationHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_ListLogPatternSets.go b/service/applicationinsights/api_op_ListLogPatternSets.go index fcd8238bde1..778d50f4f2e 100644 --- a/service/applicationinsights/api_op_ListLogPatternSets.go +++ b/service/applicationinsights/api_op_ListLogPatternSets.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListLogPatternSetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLogPatternSetsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListLogPatternSetsMiddlewares(stack *middleware.Sta return nil } -// ListLogPatternSetsAPIClient is a client that implements the ListLogPatternSets -// operation. -type ListLogPatternSetsAPIClient interface { - ListLogPatternSets(context.Context, *ListLogPatternSetsInput, ...func(*Options)) (*ListLogPatternSetsOutput, error) -} - -var _ ListLogPatternSetsAPIClient = (*Client)(nil) - // ListLogPatternSetsPaginatorOptions is the paginator options for // ListLogPatternSets type ListLogPatternSetsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListLogPatternSetsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLogPatternSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListLogPatternSetsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListLogPatternSetsAPIClient is a client that implements the ListLogPatternSets +// operation. +type ListLogPatternSetsAPIClient interface { + ListLogPatternSets(context.Context, *ListLogPatternSetsInput, ...func(*Options)) (*ListLogPatternSetsOutput, error) +} + +var _ ListLogPatternSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLogPatternSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_ListLogPatterns.go b/service/applicationinsights/api_op_ListLogPatterns.go index 728b9972255..0d8ee6a96da 100644 --- a/service/applicationinsights/api_op_ListLogPatterns.go +++ b/service/applicationinsights/api_op_ListLogPatterns.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListLogPatternsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLogPatternsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListLogPatternsMiddlewares(stack *middleware.Stack, return nil } -// ListLogPatternsAPIClient is a client that implements the ListLogPatterns -// operation. -type ListLogPatternsAPIClient interface { - ListLogPatterns(context.Context, *ListLogPatternsInput, ...func(*Options)) (*ListLogPatternsOutput, error) -} - -var _ ListLogPatternsAPIClient = (*Client)(nil) - // ListLogPatternsPaginatorOptions is the paginator options for ListLogPatterns type ListLogPatternsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -225,6 +220,9 @@ func (p *ListLogPatternsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLogPatterns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListLogPatternsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListLogPatternsAPIClient is a client that implements the ListLogPatterns +// operation. +type ListLogPatternsAPIClient interface { + ListLogPatterns(context.Context, *ListLogPatternsInput, ...func(*Options)) (*ListLogPatternsOutput, error) +} + +var _ ListLogPatternsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLogPatterns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_ListProblems.go b/service/applicationinsights/api_op_ListProblems.go index a38e8f80778..993c35d131a 100644 --- a/service/applicationinsights/api_op_ListProblems.go +++ b/service/applicationinsights/api_op_ListProblems.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListProblemsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProblems(options.Region), middleware.Before); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationListProblemsMiddlewares(stack *middleware.Stack, op return nil } -// ListProblemsAPIClient is a client that implements the ListProblems operation. -type ListProblemsAPIClient interface { - ListProblems(context.Context, *ListProblemsInput, ...func(*Options)) (*ListProblemsOutput, error) -} - -var _ ListProblemsAPIClient = (*Client)(nil) - // ListProblemsPaginatorOptions is the paginator options for ListProblems type ListProblemsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -232,6 +228,9 @@ func (p *ListProblemsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProblems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +250,13 @@ func (p *ListProblemsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProblemsAPIClient is a client that implements the ListProblems operation. +type ListProblemsAPIClient interface { + ListProblems(context.Context, *ListProblemsInput, ...func(*Options)) (*ListProblemsOutput, error) +} + +var _ ListProblemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProblems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_ListTagsForResource.go b/service/applicationinsights/api_op_ListTagsForResource.go index 43c481114ea..24067e4f947 100644 --- a/service/applicationinsights/api_op_ListTagsForResource.go +++ b/service/applicationinsights/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_ListWorkloads.go b/service/applicationinsights/api_op_ListWorkloads.go index 05215d56dbc..30c1c722ff7 100644 --- a/service/applicationinsights/api_op_ListWorkloads.go +++ b/service/applicationinsights/api_op_ListWorkloads.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkloadsValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. -type ListWorkloadsAPIClient interface { - ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) -} - -var _ ListWorkloadsAPIClient = (*Client)(nil) - // ListWorkloadsPaginatorOptions is the paginator options for ListWorkloads type ListWorkloadsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -219,6 +215,9 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkloads(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. +type ListWorkloadsAPIClient interface { + ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) +} + +var _ ListWorkloadsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkloads(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationinsights/api_op_RemoveWorkload.go b/service/applicationinsights/api_op_RemoveWorkload.go index 35ea2045850..28714ca9dff 100644 --- a/service/applicationinsights/api_op_RemoveWorkload.go +++ b/service/applicationinsights/api_op_RemoveWorkload.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRemoveWorkloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_TagResource.go b/service/applicationinsights/api_op_TagResource.go index cf88e0206b7..7c9e53d8919 100644 --- a/service/applicationinsights/api_op_TagResource.go +++ b/service/applicationinsights/api_op_TagResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UntagResource.go b/service/applicationinsights/api_op_UntagResource.go index 4e4986dee5d..f5a67467eb0 100644 --- a/service/applicationinsights/api_op_UntagResource.go +++ b/service/applicationinsights/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UpdateApplication.go b/service/applicationinsights/api_op_UpdateApplication.go index 49fc0f271bf..7a8a6ae88bc 100644 --- a/service/applicationinsights/api_op_UpdateApplication.go +++ b/service/applicationinsights/api_op_UpdateApplication.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UpdateComponent.go b/service/applicationinsights/api_op_UpdateComponent.go index 445e5af0c3e..0e4bc160f97 100644 --- a/service/applicationinsights/api_op_UpdateComponent.go +++ b/service/applicationinsights/api_op_UpdateComponent.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UpdateComponentConfiguration.go b/service/applicationinsights/api_op_UpdateComponentConfiguration.go index 33d790cd5e2..25e2588c246 100644 --- a/service/applicationinsights/api_op_UpdateComponentConfiguration.go +++ b/service/applicationinsights/api_op_UpdateComponentConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateComponentConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateComponentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UpdateLogPattern.go b/service/applicationinsights/api_op_UpdateLogPattern.go index 69518ccf1c1..b50b9d2d091 100644 --- a/service/applicationinsights/api_op_UpdateLogPattern.go +++ b/service/applicationinsights/api_op_UpdateLogPattern.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateLogPatternMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLogPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UpdateProblem.go b/service/applicationinsights/api_op_UpdateProblem.go index 8872de538c3..3fe0570ad32 100644 --- a/service/applicationinsights/api_op_UpdateProblem.go +++ b/service/applicationinsights/api_op_UpdateProblem.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateProblemMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProblemValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationinsights/api_op_UpdateWorkload.go b/service/applicationinsights/api_op_UpdateWorkload.go index c951b3f9f32..1e36f9787fc 100644 --- a/service/applicationinsights/api_op_UpdateWorkload.go +++ b/service/applicationinsights/api_op_UpdateWorkload.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateWorkloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_client.go b/service/applicationsignals/api_client.go index cd335d1f939..75394eac09b 100644 --- a/service/applicationsignals/api_client.go +++ b/service/applicationsignals/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/applicationsignals/api_op_BatchGetServiceLevelObjectiveBudgetReport.go b/service/applicationsignals/api_op_BatchGetServiceLevelObjectiveBudgetReport.go index 589aa68d961..ae7f1eb653b 100644 --- a/service/applicationsignals/api_op_BatchGetServiceLevelObjectiveBudgetReport.go +++ b/service/applicationsignals/api_op_BatchGetServiceLevelObjectiveBudgetReport.go @@ -142,6 +142,9 @@ func (c *Client) addOperationBatchGetServiceLevelObjectiveBudgetReportMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetServiceLevelObjectiveBudgetReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_CreateServiceLevelObjective.go b/service/applicationsignals/api_op_CreateServiceLevelObjective.go index 7f90b188801..fb19e8224e2 100644 --- a/service/applicationsignals/api_op_CreateServiceLevelObjective.go +++ b/service/applicationsignals/api_op_CreateServiceLevelObjective.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreateServiceLevelObjectiveMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceLevelObjectiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_DeleteServiceLevelObjective.go b/service/applicationsignals/api_op_DeleteServiceLevelObjective.go index 66386674ec4..e3c4f7af759 100644 --- a/service/applicationsignals/api_op_DeleteServiceLevelObjective.go +++ b/service/applicationsignals/api_op_DeleteServiceLevelObjective.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteServiceLevelObjectiveMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceLevelObjectiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_GetService.go b/service/applicationsignals/api_op_GetService.go index 374f86e38af..74bda004930 100644 --- a/service/applicationsignals/api_op_GetService.go +++ b/service/applicationsignals/api_op_GetService.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_GetServiceLevelObjective.go b/service/applicationsignals/api_op_GetServiceLevelObjective.go index 675a5c26f94..8489a33e8e1 100644 --- a/service/applicationsignals/api_op_GetServiceLevelObjective.go +++ b/service/applicationsignals/api_op_GetServiceLevelObjective.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetServiceLevelObjectiveMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLevelObjectiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_ListServiceDependencies.go b/service/applicationsignals/api_op_ListServiceDependencies.go index 65df5460ac4..b0839d5586d 100644 --- a/service/applicationsignals/api_op_ListServiceDependencies.go +++ b/service/applicationsignals/api_op_ListServiceDependencies.go @@ -170,6 +170,9 @@ func (c *Client) addOperationListServiceDependenciesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceDependenciesValidationMiddleware(stack); err != nil { return err } @@ -194,14 +197,6 @@ func (c *Client) addOperationListServiceDependenciesMiddlewares(stack *middlewar return nil } -// ListServiceDependenciesAPIClient is a client that implements the -// ListServiceDependencies operation. -type ListServiceDependenciesAPIClient interface { - ListServiceDependencies(context.Context, *ListServiceDependenciesInput, ...func(*Options)) (*ListServiceDependenciesOutput, error) -} - -var _ ListServiceDependenciesAPIClient = (*Client)(nil) - // ListServiceDependenciesPaginatorOptions is the paginator options for // ListServiceDependencies type ListServiceDependenciesPaginatorOptions struct { @@ -268,6 +263,9 @@ func (p *ListServiceDependenciesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceDependencies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -287,6 +285,14 @@ func (p *ListServiceDependenciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListServiceDependenciesAPIClient is a client that implements the +// ListServiceDependencies operation. +type ListServiceDependenciesAPIClient interface { + ListServiceDependencies(context.Context, *ListServiceDependenciesInput, ...func(*Options)) (*ListServiceDependenciesOutput, error) +} + +var _ ListServiceDependenciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceDependencies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationsignals/api_op_ListServiceDependents.go b/service/applicationsignals/api_op_ListServiceDependents.go index a5c5c51704e..d6ef9f2d73a 100644 --- a/service/applicationsignals/api_op_ListServiceDependents.go +++ b/service/applicationsignals/api_op_ListServiceDependents.go @@ -169,6 +169,9 @@ func (c *Client) addOperationListServiceDependentsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceDependentsValidationMiddleware(stack); err != nil { return err } @@ -193,14 +196,6 @@ func (c *Client) addOperationListServiceDependentsMiddlewares(stack *middleware. return nil } -// ListServiceDependentsAPIClient is a client that implements the -// ListServiceDependents operation. -type ListServiceDependentsAPIClient interface { - ListServiceDependents(context.Context, *ListServiceDependentsInput, ...func(*Options)) (*ListServiceDependentsOutput, error) -} - -var _ ListServiceDependentsAPIClient = (*Client)(nil) - // ListServiceDependentsPaginatorOptions is the paginator options for // ListServiceDependents type ListServiceDependentsPaginatorOptions struct { @@ -266,6 +261,9 @@ func (p *ListServiceDependentsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceDependents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +283,14 @@ func (p *ListServiceDependentsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListServiceDependentsAPIClient is a client that implements the +// ListServiceDependents operation. +type ListServiceDependentsAPIClient interface { + ListServiceDependents(context.Context, *ListServiceDependentsInput, ...func(*Options)) (*ListServiceDependentsOutput, error) +} + +var _ ListServiceDependentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceDependents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationsignals/api_op_ListServiceLevelObjectives.go b/service/applicationsignals/api_op_ListServiceLevelObjectives.go index 0b66f500b9c..7b8c80e4161 100644 --- a/service/applicationsignals/api_op_ListServiceLevelObjectives.go +++ b/service/applicationsignals/api_op_ListServiceLevelObjectives.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListServiceLevelObjectivesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceLevelObjectives(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListServiceLevelObjectivesMiddlewares(stack *middle return nil } -// ListServiceLevelObjectivesAPIClient is a client that implements the -// ListServiceLevelObjectives operation. -type ListServiceLevelObjectivesAPIClient interface { - ListServiceLevelObjectives(context.Context, *ListServiceLevelObjectivesInput, ...func(*Options)) (*ListServiceLevelObjectivesOutput, error) -} - -var _ ListServiceLevelObjectivesAPIClient = (*Client)(nil) - // ListServiceLevelObjectivesPaginatorOptions is the paginator options for // ListServiceLevelObjectives type ListServiceLevelObjectivesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListServiceLevelObjectivesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceLevelObjectives(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListServiceLevelObjectivesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListServiceLevelObjectivesAPIClient is a client that implements the +// ListServiceLevelObjectives operation. +type ListServiceLevelObjectivesAPIClient interface { + ListServiceLevelObjectives(context.Context, *ListServiceLevelObjectivesInput, ...func(*Options)) (*ListServiceLevelObjectivesOutput, error) +} + +var _ ListServiceLevelObjectivesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceLevelObjectives(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationsignals/api_op_ListServiceOperations.go b/service/applicationsignals/api_op_ListServiceOperations.go index d27f5bfc27e..1a9e9af123e 100644 --- a/service/applicationsignals/api_op_ListServiceOperations.go +++ b/service/applicationsignals/api_op_ListServiceOperations.go @@ -169,6 +169,9 @@ func (c *Client) addOperationListServiceOperationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceOperationsValidationMiddleware(stack); err != nil { return err } @@ -193,14 +196,6 @@ func (c *Client) addOperationListServiceOperationsMiddlewares(stack *middleware. return nil } -// ListServiceOperationsAPIClient is a client that implements the -// ListServiceOperations operation. -type ListServiceOperationsAPIClient interface { - ListServiceOperations(context.Context, *ListServiceOperationsInput, ...func(*Options)) (*ListServiceOperationsOutput, error) -} - -var _ ListServiceOperationsAPIClient = (*Client)(nil) - // ListServiceOperationsPaginatorOptions is the paginator options for // ListServiceOperations type ListServiceOperationsPaginatorOptions struct { @@ -266,6 +261,9 @@ func (p *ListServiceOperationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +283,14 @@ func (p *ListServiceOperationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListServiceOperationsAPIClient is a client that implements the +// ListServiceOperations operation. +type ListServiceOperationsAPIClient interface { + ListServiceOperations(context.Context, *ListServiceOperationsInput, ...func(*Options)) (*ListServiceOperationsOutput, error) +} + +var _ ListServiceOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationsignals/api_op_ListServices.go b/service/applicationsignals/api_op_ListServices.go index 9d74dcea06f..198f1e3fd45 100644 --- a/service/applicationsignals/api_op_ListServices.go +++ b/service/applicationsignals/api_op_ListServices.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicesValidationMiddleware(stack); err != nil { return err } @@ -173,13 +176,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of results to return in one operation. If you omit this @@ -244,6 +240,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +262,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/applicationsignals/api_op_ListTagsForResource.go b/service/applicationsignals/api_op_ListTagsForResource.go index 3e0a615daca..3d856b71ddf 100644 --- a/service/applicationsignals/api_op_ListTagsForResource.go +++ b/service/applicationsignals/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_StartDiscovery.go b/service/applicationsignals/api_op_StartDiscovery.go index 367bdb16c72..04f7126487b 100644 --- a/service/applicationsignals/api_op_StartDiscovery.go +++ b/service/applicationsignals/api_op_StartDiscovery.go @@ -117,6 +117,9 @@ func (c *Client) addOperationStartDiscoveryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDiscovery(options.Region), middleware.Before); err != nil { return err } diff --git a/service/applicationsignals/api_op_TagResource.go b/service/applicationsignals/api_op_TagResource.go index 6ad6dd6168f..4268159a632 100644 --- a/service/applicationsignals/api_op_TagResource.go +++ b/service/applicationsignals/api_op_TagResource.go @@ -132,6 +132,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_UntagResource.go b/service/applicationsignals/api_op_UntagResource.go index d32ad5ace10..776aea371f8 100644 --- a/service/applicationsignals/api_op_UntagResource.go +++ b/service/applicationsignals/api_op_UntagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/applicationsignals/api_op_UpdateServiceLevelObjective.go b/service/applicationsignals/api_op_UpdateServiceLevelObjective.go index 910757b25da..6ff200c8d37 100644 --- a/service/applicationsignals/api_op_UpdateServiceLevelObjective.go +++ b/service/applicationsignals/api_op_UpdateServiceLevelObjective.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateServiceLevelObjectiveMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceLevelObjectiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_client.go b/service/appmesh/api_client.go index aacdac84154..8cf142ba3cc 100644 --- a/service/appmesh/api_client.go +++ b/service/appmesh/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/appmesh/api_op_CreateGatewayRoute.go b/service/appmesh/api_op_CreateGatewayRoute.go index 0e1336716ac..11c0f259619 100644 --- a/service/appmesh/api_op_CreateGatewayRoute.go +++ b/service/appmesh/api_op_CreateGatewayRoute.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateGatewayRouteMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateGatewayRouteMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_CreateMesh.go b/service/appmesh/api_op_CreateMesh.go index 959db0848c5..f760478677e 100644 --- a/service/appmesh/api_op_CreateMesh.go +++ b/service/appmesh/api_op_CreateMesh.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateMeshMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMeshMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_CreateRoute.go b/service/appmesh/api_op_CreateRoute.go index 0e644c42f14..c29a70a5f1f 100644 --- a/service/appmesh/api_op_CreateRoute.go +++ b/service/appmesh/api_op_CreateRoute.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRouteMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_CreateVirtualGateway.go b/service/appmesh/api_op_CreateVirtualGateway.go index 78dd4a2bab8..c72a75ef7ae 100644 --- a/service/appmesh/api_op_CreateVirtualGateway.go +++ b/service/appmesh/api_op_CreateVirtualGateway.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateVirtualGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVirtualGatewayMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_CreateVirtualNode.go b/service/appmesh/api_op_CreateVirtualNode.go index 984dcbd9b22..8579ec9c00c 100644 --- a/service/appmesh/api_op_CreateVirtualNode.go +++ b/service/appmesh/api_op_CreateVirtualNode.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateVirtualNodeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVirtualNodeMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_CreateVirtualRouter.go b/service/appmesh/api_op_CreateVirtualRouter.go index bdb755e0a84..d116a39a254 100644 --- a/service/appmesh/api_op_CreateVirtualRouter.go +++ b/service/appmesh/api_op_CreateVirtualRouter.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateVirtualRouterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVirtualRouterMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_CreateVirtualService.go b/service/appmesh/api_op_CreateVirtualService.go index 35191578418..134b497c4f4 100644 --- a/service/appmesh/api_op_CreateVirtualService.go +++ b/service/appmesh/api_op_CreateVirtualService.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateVirtualServiceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVirtualServiceMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteGatewayRoute.go b/service/appmesh/api_op_DeleteGatewayRoute.go index ae1ce9b0c06..94dbf63cbeb 100644 --- a/service/appmesh/api_op_DeleteGatewayRoute.go +++ b/service/appmesh/api_op_DeleteGatewayRoute.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteGatewayRouteMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteMesh.go b/service/appmesh/api_op_DeleteMesh.go index ac122506eb3..849cb3f665f 100644 --- a/service/appmesh/api_op_DeleteMesh.go +++ b/service/appmesh/api_op_DeleteMesh.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteMeshMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMeshValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteRoute.go b/service/appmesh/api_op_DeleteRoute.go index ee6e6ebf517..dcab926c619 100644 --- a/service/appmesh/api_op_DeleteRoute.go +++ b/service/appmesh/api_op_DeleteRoute.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteVirtualGateway.go b/service/appmesh/api_op_DeleteVirtualGateway.go index 6bb5f23e86c..12b9475272b 100644 --- a/service/appmesh/api_op_DeleteVirtualGateway.go +++ b/service/appmesh/api_op_DeleteVirtualGateway.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteVirtualGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteVirtualNode.go b/service/appmesh/api_op_DeleteVirtualNode.go index 7ec0ffbad3e..9773843e8d1 100644 --- a/service/appmesh/api_op_DeleteVirtualNode.go +++ b/service/appmesh/api_op_DeleteVirtualNode.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteVirtualNodeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteVirtualRouter.go b/service/appmesh/api_op_DeleteVirtualRouter.go index 29bb8c4a6c1..2c787261d84 100644 --- a/service/appmesh/api_op_DeleteVirtualRouter.go +++ b/service/appmesh/api_op_DeleteVirtualRouter.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteVirtualRouterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualRouterValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DeleteVirtualService.go b/service/appmesh/api_op_DeleteVirtualService.go index 371ba44b1fb..37896507a17 100644 --- a/service/appmesh/api_op_DeleteVirtualService.go +++ b/service/appmesh/api_op_DeleteVirtualService.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteVirtualServiceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeGatewayRoute.go b/service/appmesh/api_op_DescribeGatewayRoute.go index 1a3e8123a54..a5c71823277 100644 --- a/service/appmesh/api_op_DescribeGatewayRoute.go +++ b/service/appmesh/api_op_DescribeGatewayRoute.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeGatewayRouteMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeMesh.go b/service/appmesh/api_op_DescribeMesh.go index 911ecf00cc7..c2cf790c6af 100644 --- a/service/appmesh/api_op_DescribeMesh.go +++ b/service/appmesh/api_op_DescribeMesh.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeMeshMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMeshValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeRoute.go b/service/appmesh/api_op_DescribeRoute.go index 2cfd414d917..826029f2be9 100644 --- a/service/appmesh/api_op_DescribeRoute.go +++ b/service/appmesh/api_op_DescribeRoute.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeRouteMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeVirtualGateway.go b/service/appmesh/api_op_DescribeVirtualGateway.go index cb7b4eba0fd..02181faa0f8 100644 --- a/service/appmesh/api_op_DescribeVirtualGateway.go +++ b/service/appmesh/api_op_DescribeVirtualGateway.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeVirtualGatewayMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVirtualGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeVirtualNode.go b/service/appmesh/api_op_DescribeVirtualNode.go index fdf03e59182..452c64cd5a0 100644 --- a/service/appmesh/api_op_DescribeVirtualNode.go +++ b/service/appmesh/api_op_DescribeVirtualNode.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeVirtualNodeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVirtualNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeVirtualRouter.go b/service/appmesh/api_op_DescribeVirtualRouter.go index becde321970..3498917d40e 100644 --- a/service/appmesh/api_op_DescribeVirtualRouter.go +++ b/service/appmesh/api_op_DescribeVirtualRouter.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeVirtualRouterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVirtualRouterValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_DescribeVirtualService.go b/service/appmesh/api_op_DescribeVirtualService.go index 762235d615d..1d5cd76ab9a 100644 --- a/service/appmesh/api_op_DescribeVirtualService.go +++ b/service/appmesh/api_op_DescribeVirtualService.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeVirtualServiceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVirtualServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_ListGatewayRoutes.go b/service/appmesh/api_op_ListGatewayRoutes.go index bb3c4b2bf68..5160b011e51 100644 --- a/service/appmesh/api_op_ListGatewayRoutes.go +++ b/service/appmesh/api_op_ListGatewayRoutes.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListGatewayRoutesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGatewayRoutesValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListGatewayRoutesMiddlewares(stack *middleware.Stac return nil } -// ListGatewayRoutesAPIClient is a client that implements the ListGatewayRoutes -// operation. -type ListGatewayRoutesAPIClient interface { - ListGatewayRoutes(context.Context, *ListGatewayRoutesInput, ...func(*Options)) (*ListGatewayRoutesOutput, error) -} - -var _ ListGatewayRoutesAPIClient = (*Client)(nil) - // ListGatewayRoutesPaginatorOptions is the paginator options for ListGatewayRoutes type ListGatewayRoutesPaginatorOptions struct { // The maximum number of results returned by ListGatewayRoutes in paginated @@ -244,6 +239,9 @@ func (p *ListGatewayRoutesPaginator) NextPage(ctx context.Context, optFns ...fun } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGatewayRoutes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *ListGatewayRoutesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListGatewayRoutesAPIClient is a client that implements the ListGatewayRoutes +// operation. +type ListGatewayRoutesAPIClient interface { + ListGatewayRoutes(context.Context, *ListGatewayRoutesInput, ...func(*Options)) (*ListGatewayRoutesOutput, error) +} + +var _ ListGatewayRoutesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListMeshes.go b/service/appmesh/api_op_ListMeshes.go index 05e9698be57..81721f67f4a 100644 --- a/service/appmesh/api_op_ListMeshes.go +++ b/service/appmesh/api_op_ListMeshes.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListMeshesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMeshes(options.Region), middleware.Before); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListMeshesMiddlewares(stack *middleware.Stack, opti return nil } -// ListMeshesAPIClient is a client that implements the ListMeshes operation. -type ListMeshesAPIClient interface { - ListMeshes(context.Context, *ListMeshesInput, ...func(*Options)) (*ListMeshesOutput, error) -} - -var _ ListMeshesAPIClient = (*Client)(nil) - // ListMeshesPaginatorOptions is the paginator options for ListMeshes type ListMeshesPaginatorOptions struct { // The maximum number of results returned by ListMeshes in paginated output. When @@ -224,6 +220,9 @@ func (p *ListMeshesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMeshes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListMeshesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListMeshesAPIClient is a client that implements the ListMeshes operation. +type ListMeshesAPIClient interface { + ListMeshes(context.Context, *ListMeshesInput, ...func(*Options)) (*ListMeshesOutput, error) +} + +var _ ListMeshesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMeshes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListRoutes.go b/service/appmesh/api_op_ListRoutes.go index 363ea88b016..2b98e4e88c8 100644 --- a/service/appmesh/api_op_ListRoutes.go +++ b/service/appmesh/api_op_ListRoutes.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListRoutesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoutesValidationMiddleware(stack); err != nil { return err } @@ -165,13 +168,6 @@ func (c *Client) addOperationListRoutesMiddlewares(stack *middleware.Stack, opti return nil } -// ListRoutesAPIClient is a client that implements the ListRoutes operation. -type ListRoutesAPIClient interface { - ListRoutes(context.Context, *ListRoutesInput, ...func(*Options)) (*ListRoutesOutput, error) -} - -var _ ListRoutesAPIClient = (*Client)(nil) - // ListRoutesPaginatorOptions is the paginator options for ListRoutes type ListRoutesPaginatorOptions struct { // The maximum number of results returned by ListRoutes in paginated output. When @@ -241,6 +237,9 @@ func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoutes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +259,13 @@ func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListRoutesAPIClient is a client that implements the ListRoutes operation. +type ListRoutesAPIClient interface { + ListRoutes(context.Context, *ListRoutesInput, ...func(*Options)) (*ListRoutesOutput, error) +} + +var _ ListRoutesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListTagsForResource.go b/service/appmesh/api_op_ListTagsForResource.go index 767316208b5..2715be5e011 100644 --- a/service/appmesh/api_op_ListTagsForResource.go +++ b/service/appmesh/api_op_ListTagsForResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListVirtualGateways.go b/service/appmesh/api_op_ListVirtualGateways.go index c53bd5a9f1b..4ffd8595e8e 100644 --- a/service/appmesh/api_op_ListVirtualGateways.go +++ b/service/appmesh/api_op_ListVirtualGateways.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListVirtualGatewaysMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVirtualGatewaysValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListVirtualGatewaysMiddlewares(stack *middleware.St return nil } -// ListVirtualGatewaysAPIClient is a client that implements the -// ListVirtualGateways operation. -type ListVirtualGatewaysAPIClient interface { - ListVirtualGateways(context.Context, *ListVirtualGatewaysInput, ...func(*Options)) (*ListVirtualGatewaysOutput, error) -} - -var _ ListVirtualGatewaysAPIClient = (*Client)(nil) - // ListVirtualGatewaysPaginatorOptions is the paginator options for // ListVirtualGateways type ListVirtualGatewaysPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListVirtualGatewaysPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListVirtualGatewaysPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVirtualGatewaysAPIClient is a client that implements the +// ListVirtualGateways operation. +type ListVirtualGatewaysAPIClient interface { + ListVirtualGateways(context.Context, *ListVirtualGatewaysInput, ...func(*Options)) (*ListVirtualGatewaysOutput, error) +} + +var _ ListVirtualGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListVirtualNodes.go b/service/appmesh/api_op_ListVirtualNodes.go index 251cc88e5df..241d9a1fa7a 100644 --- a/service/appmesh/api_op_ListVirtualNodes.go +++ b/service/appmesh/api_op_ListVirtualNodes.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListVirtualNodesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVirtualNodesValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListVirtualNodesMiddlewares(stack *middleware.Stack return nil } -// ListVirtualNodesAPIClient is a client that implements the ListVirtualNodes -// operation. -type ListVirtualNodesAPIClient interface { - ListVirtualNodes(context.Context, *ListVirtualNodesInput, ...func(*Options)) (*ListVirtualNodesOutput, error) -} - -var _ ListVirtualNodesAPIClient = (*Client)(nil) - // ListVirtualNodesPaginatorOptions is the paginator options for ListVirtualNodes type ListVirtualNodesPaginatorOptions struct { // The maximum number of results returned by ListVirtualNodes in paginated output. @@ -237,6 +232,9 @@ func (p *ListVirtualNodesPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListVirtualNodesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListVirtualNodesAPIClient is a client that implements the ListVirtualNodes +// operation. +type ListVirtualNodesAPIClient interface { + ListVirtualNodes(context.Context, *ListVirtualNodesInput, ...func(*Options)) (*ListVirtualNodesOutput, error) +} + +var _ ListVirtualNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListVirtualRouters.go b/service/appmesh/api_op_ListVirtualRouters.go index 70c075f4ab2..bfe234034c9 100644 --- a/service/appmesh/api_op_ListVirtualRouters.go +++ b/service/appmesh/api_op_ListVirtualRouters.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListVirtualRoutersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVirtualRoutersValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListVirtualRoutersMiddlewares(stack *middleware.Sta return nil } -// ListVirtualRoutersAPIClient is a client that implements the ListVirtualRouters -// operation. -type ListVirtualRoutersAPIClient interface { - ListVirtualRouters(context.Context, *ListVirtualRoutersInput, ...func(*Options)) (*ListVirtualRoutersOutput, error) -} - -var _ ListVirtualRoutersAPIClient = (*Client)(nil) - // ListVirtualRoutersPaginatorOptions is the paginator options for // ListVirtualRouters type ListVirtualRoutersPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListVirtualRoutersPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualRouters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListVirtualRoutersPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListVirtualRoutersAPIClient is a client that implements the ListVirtualRouters +// operation. +type ListVirtualRoutersAPIClient interface { + ListVirtualRouters(context.Context, *ListVirtualRoutersInput, ...func(*Options)) (*ListVirtualRoutersOutput, error) +} + +var _ ListVirtualRoutersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualRouters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_ListVirtualServices.go b/service/appmesh/api_op_ListVirtualServices.go index e8035c52917..85bc46b7b0c 100644 --- a/service/appmesh/api_op_ListVirtualServices.go +++ b/service/appmesh/api_op_ListVirtualServices.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListVirtualServicesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVirtualServicesValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListVirtualServicesMiddlewares(stack *middleware.St return nil } -// ListVirtualServicesAPIClient is a client that implements the -// ListVirtualServices operation. -type ListVirtualServicesAPIClient interface { - ListVirtualServices(context.Context, *ListVirtualServicesInput, ...func(*Options)) (*ListVirtualServicesOutput, error) -} - -var _ ListVirtualServicesAPIClient = (*Client)(nil) - // ListVirtualServicesPaginatorOptions is the paginator options for // ListVirtualServices type ListVirtualServicesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListVirtualServicesPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListVirtualServicesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVirtualServicesAPIClient is a client that implements the +// ListVirtualServices operation. +type ListVirtualServicesAPIClient interface { + ListVirtualServices(context.Context, *ListVirtualServicesInput, ...func(*Options)) (*ListVirtualServicesOutput, error) +} + +var _ ListVirtualServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appmesh/api_op_TagResource.go b/service/appmesh/api_op_TagResource.go index fe671347b1f..2d2389f1b84 100644 --- a/service/appmesh/api_op_TagResource.go +++ b/service/appmesh/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_UntagResource.go b/service/appmesh/api_op_UntagResource.go index e97865d6049..e99c52fe8d3 100644 --- a/service/appmesh/api_op_UntagResource.go +++ b/service/appmesh/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateGatewayRoute.go b/service/appmesh/api_op_UpdateGatewayRoute.go index 820f30df9b1..912b8101d9b 100644 --- a/service/appmesh/api_op_UpdateGatewayRoute.go +++ b/service/appmesh/api_op_UpdateGatewayRoute.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateGatewayRouteMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateGatewayRouteMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateMesh.go b/service/appmesh/api_op_UpdateMesh.go index aa570affe85..f4a17d8d810 100644 --- a/service/appmesh/api_op_UpdateMesh.go +++ b/service/appmesh/api_op_UpdateMesh.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateMeshMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateMeshMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateRoute.go b/service/appmesh/api_op_UpdateRoute.go index 606ca3850fa..fd20f8b0635 100644 --- a/service/appmesh/api_op_UpdateRoute.go +++ b/service/appmesh/api_op_UpdateRoute.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateRouteMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateVirtualGateway.go b/service/appmesh/api_op_UpdateVirtualGateway.go index e0ca37554c3..841cf52c80d 100644 --- a/service/appmesh/api_op_UpdateVirtualGateway.go +++ b/service/appmesh/api_op_UpdateVirtualGateway.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateVirtualGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateVirtualGatewayMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateVirtualNode.go b/service/appmesh/api_op_UpdateVirtualNode.go index 05255631088..e2f8b2fb887 100644 --- a/service/appmesh/api_op_UpdateVirtualNode.go +++ b/service/appmesh/api_op_UpdateVirtualNode.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateVirtualNodeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateVirtualNodeMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateVirtualRouter.go b/service/appmesh/api_op_UpdateVirtualRouter.go index 97cf50006eb..ec259ff1ee5 100644 --- a/service/appmesh/api_op_UpdateVirtualRouter.go +++ b/service/appmesh/api_op_UpdateVirtualRouter.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateVirtualRouterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateVirtualRouterMiddleware(stack, options); err != nil { return err } diff --git a/service/appmesh/api_op_UpdateVirtualService.go b/service/appmesh/api_op_UpdateVirtualService.go index 44a52e85d72..de623d619b9 100644 --- a/service/appmesh/api_op_UpdateVirtualService.go +++ b/service/appmesh/api_op_UpdateVirtualService.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateVirtualServiceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateVirtualServiceMiddleware(stack, options); err != nil { return err } diff --git a/service/apprunner/api_client.go b/service/apprunner/api_client.go index fd879e3c6a4..66c7ebc171d 100644 --- a/service/apprunner/api_client.go +++ b/service/apprunner/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/apprunner/api_op_AssociateCustomDomain.go b/service/apprunner/api_op_AssociateCustomDomain.go index 644f80cdc4e..ca19acc1af9 100644 --- a/service/apprunner/api_op_AssociateCustomDomain.go +++ b/service/apprunner/api_op_AssociateCustomDomain.go @@ -149,6 +149,9 @@ func (c *Client) addOperationAssociateCustomDomainMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateCustomDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_CreateAutoScalingConfiguration.go b/service/apprunner/api_op_CreateAutoScalingConfiguration.go index 667e585c063..d0d2b0ed28c 100644 --- a/service/apprunner/api_op_CreateAutoScalingConfiguration.go +++ b/service/apprunner/api_op_CreateAutoScalingConfiguration.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreateAutoScalingConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAutoScalingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_CreateConnection.go b/service/apprunner/api_op_CreateConnection.go index 6daa65a93bf..99e716f6c15 100644 --- a/service/apprunner/api_op_CreateConnection.go +++ b/service/apprunner/api_op_CreateConnection.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_CreateObservabilityConfiguration.go b/service/apprunner/api_op_CreateObservabilityConfiguration.go index 28d9e586f5b..09b27e088b7 100644 --- a/service/apprunner/api_op_CreateObservabilityConfiguration.go +++ b/service/apprunner/api_op_CreateObservabilityConfiguration.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateObservabilityConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateObservabilityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_CreateService.go b/service/apprunner/api_op_CreateService.go index dea2a7a4121..83840b4dc2c 100644 --- a/service/apprunner/api_op_CreateService.go +++ b/service/apprunner/api_op_CreateService.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_CreateVpcConnector.go b/service/apprunner/api_op_CreateVpcConnector.go index 05babf8d065..e84f15c094d 100644 --- a/service/apprunner/api_op_CreateVpcConnector.go +++ b/service/apprunner/api_op_CreateVpcConnector.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateVpcConnectorMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_CreateVpcIngressConnection.go b/service/apprunner/api_op_CreateVpcIngressConnection.go index 11d556901ff..7eba1464e42 100644 --- a/service/apprunner/api_op_CreateVpcIngressConnection.go +++ b/service/apprunner/api_op_CreateVpcIngressConnection.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateVpcIngressConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcIngressConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DeleteAutoScalingConfiguration.go b/service/apprunner/api_op_DeleteAutoScalingConfiguration.go index 9cfc3fbbd4c..1216b01ef85 100644 --- a/service/apprunner/api_op_DeleteAutoScalingConfiguration.go +++ b/service/apprunner/api_op_DeleteAutoScalingConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteAutoScalingConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAutoScalingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DeleteConnection.go b/service/apprunner/api_op_DeleteConnection.go index 18ba69e01d5..c43180f5074 100644 --- a/service/apprunner/api_op_DeleteConnection.go +++ b/service/apprunner/api_op_DeleteConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DeleteObservabilityConfiguration.go b/service/apprunner/api_op_DeleteObservabilityConfiguration.go index 24170ad3900..a9592ba1a36 100644 --- a/service/apprunner/api_op_DeleteObservabilityConfiguration.go +++ b/service/apprunner/api_op_DeleteObservabilityConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteObservabilityConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteObservabilityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DeleteService.go b/service/apprunner/api_op_DeleteService.go index 425dc0cdae1..917fff95fb8 100644 --- a/service/apprunner/api_op_DeleteService.go +++ b/service/apprunner/api_op_DeleteService.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DeleteVpcConnector.go b/service/apprunner/api_op_DeleteVpcConnector.go index 39797ae86f9..073d24c9035 100644 --- a/service/apprunner/api_op_DeleteVpcConnector.go +++ b/service/apprunner/api_op_DeleteVpcConnector.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteVpcConnectorMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DeleteVpcIngressConnection.go b/service/apprunner/api_op_DeleteVpcIngressConnection.go index e6265b7e41e..564db6c7215 100644 --- a/service/apprunner/api_op_DeleteVpcIngressConnection.go +++ b/service/apprunner/api_op_DeleteVpcIngressConnection.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteVpcIngressConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcIngressConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DescribeAutoScalingConfiguration.go b/service/apprunner/api_op_DescribeAutoScalingConfiguration.go index 81752d2bb22..4ac1d733b81 100644 --- a/service/apprunner/api_op_DescribeAutoScalingConfiguration.go +++ b/service/apprunner/api_op_DescribeAutoScalingConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAutoScalingConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAutoScalingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DescribeCustomDomains.go b/service/apprunner/api_op_DescribeCustomDomains.go index c985fe884ef..bac490e45ff 100644 --- a/service/apprunner/api_op_DescribeCustomDomains.go +++ b/service/apprunner/api_op_DescribeCustomDomains.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeCustomDomainsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomDomainsValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeCustomDomainsMiddlewares(stack *middleware. return nil } -// DescribeCustomDomainsAPIClient is a client that implements the -// DescribeCustomDomains operation. -type DescribeCustomDomainsAPIClient interface { - DescribeCustomDomains(context.Context, *DescribeCustomDomainsInput, ...func(*Options)) (*DescribeCustomDomainsOutput, error) -} - -var _ DescribeCustomDomainsAPIClient = (*Client)(nil) - // DescribeCustomDomainsPaginatorOptions is the paginator options for // DescribeCustomDomains type DescribeCustomDomainsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeCustomDomainsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCustomDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeCustomDomainsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeCustomDomainsAPIClient is a client that implements the +// DescribeCustomDomains operation. +type DescribeCustomDomainsAPIClient interface { + DescribeCustomDomains(context.Context, *DescribeCustomDomainsInput, ...func(*Options)) (*DescribeCustomDomainsOutput, error) +} + +var _ DescribeCustomDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCustomDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_DescribeObservabilityConfiguration.go b/service/apprunner/api_op_DescribeObservabilityConfiguration.go index 3f5ae6a2122..3e44d3505c2 100644 --- a/service/apprunner/api_op_DescribeObservabilityConfiguration.go +++ b/service/apprunner/api_op_DescribeObservabilityConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeObservabilityConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeObservabilityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DescribeService.go b/service/apprunner/api_op_DescribeService.go index c01d835985d..ef9564f24da 100644 --- a/service/apprunner/api_op_DescribeService.go +++ b/service/apprunner/api_op_DescribeService.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeServiceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DescribeVpcConnector.go b/service/apprunner/api_op_DescribeVpcConnector.go index 9327d5a39ec..a384cd23e2a 100644 --- a/service/apprunner/api_op_DescribeVpcConnector.go +++ b/service/apprunner/api_op_DescribeVpcConnector.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeVpcConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DescribeVpcIngressConnection.go b/service/apprunner/api_op_DescribeVpcIngressConnection.go index 73c177f8b7b..a95c7aca2af 100644 --- a/service/apprunner/api_op_DescribeVpcIngressConnection.go +++ b/service/apprunner/api_op_DescribeVpcIngressConnection.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeVpcIngressConnectionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcIngressConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_DisassociateCustomDomain.go b/service/apprunner/api_op_DisassociateCustomDomain.go index d5223e1a05f..721bb123361 100644 --- a/service/apprunner/api_op_DisassociateCustomDomain.go +++ b/service/apprunner/api_op_DisassociateCustomDomain.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDisassociateCustomDomainMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateCustomDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_ListAutoScalingConfigurations.go b/service/apprunner/api_op_ListAutoScalingConfigurations.go index b7e94866e46..8fdfebd1840 100644 --- a/service/apprunner/api_op_ListAutoScalingConfigurations.go +++ b/service/apprunner/api_op_ListAutoScalingConfigurations.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListAutoScalingConfigurationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutoScalingConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListAutoScalingConfigurationsMiddlewares(stack *mid return nil } -// ListAutoScalingConfigurationsAPIClient is a client that implements the -// ListAutoScalingConfigurations operation. -type ListAutoScalingConfigurationsAPIClient interface { - ListAutoScalingConfigurations(context.Context, *ListAutoScalingConfigurationsInput, ...func(*Options)) (*ListAutoScalingConfigurationsOutput, error) -} - -var _ ListAutoScalingConfigurationsAPIClient = (*Client)(nil) - // ListAutoScalingConfigurationsPaginatorOptions is the paginator options for // ListAutoScalingConfigurations type ListAutoScalingConfigurationsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListAutoScalingConfigurationsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAutoScalingConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListAutoScalingConfigurationsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListAutoScalingConfigurationsAPIClient is a client that implements the +// ListAutoScalingConfigurations operation. +type ListAutoScalingConfigurationsAPIClient interface { + ListAutoScalingConfigurations(context.Context, *ListAutoScalingConfigurationsInput, ...func(*Options)) (*ListAutoScalingConfigurationsOutput, error) +} + +var _ ListAutoScalingConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAutoScalingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListConnections.go b/service/apprunner/api_op_ListConnections.go index c0b05656007..6aa26b27fe3 100644 --- a/service/apprunner/api_op_ListConnections.go +++ b/service/apprunner/api_op_ListConnections.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnections(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectionsAPIClient is a client that implements the ListConnections -// operation. -type ListConnectionsAPIClient interface { - ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) -} - -var _ ListConnectionsAPIClient = (*Client)(nil) - // ListConnectionsPaginatorOptions is the paginator options for ListConnections type ListConnectionsPaginatorOptions struct { // The maximum number of results to include in each response (result page). Used @@ -223,6 +218,9 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListConnectionsAPIClient is a client that implements the ListConnections +// operation. +type ListConnectionsAPIClient interface { + ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) +} + +var _ ListConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListObservabilityConfigurations.go b/service/apprunner/api_op_ListObservabilityConfigurations.go index ffd2f1c46d1..e6b17c75bde 100644 --- a/service/apprunner/api_op_ListObservabilityConfigurations.go +++ b/service/apprunner/api_op_ListObservabilityConfigurations.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListObservabilityConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListObservabilityConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListObservabilityConfigurationsMiddlewares(stack *m return nil } -// ListObservabilityConfigurationsAPIClient is a client that implements the -// ListObservabilityConfigurations operation. -type ListObservabilityConfigurationsAPIClient interface { - ListObservabilityConfigurations(context.Context, *ListObservabilityConfigurationsInput, ...func(*Options)) (*ListObservabilityConfigurationsOutput, error) -} - -var _ ListObservabilityConfigurationsAPIClient = (*Client)(nil) - // ListObservabilityConfigurationsPaginatorOptions is the paginator options for // ListObservabilityConfigurations type ListObservabilityConfigurationsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListObservabilityConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObservabilityConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListObservabilityConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListObservabilityConfigurationsAPIClient is a client that implements the +// ListObservabilityConfigurations operation. +type ListObservabilityConfigurationsAPIClient interface { + ListObservabilityConfigurations(context.Context, *ListObservabilityConfigurationsInput, ...func(*Options)) (*ListObservabilityConfigurationsOutput, error) +} + +var _ ListObservabilityConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObservabilityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListOperations.go b/service/apprunner/api_op_ListOperations.go index 755830623b9..d27d5f961ba 100644 --- a/service/apprunner/api_op_ListOperations.go +++ b/service/apprunner/api_op_ListOperations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOperationsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, return nil } -// ListOperationsAPIClient is a client that implements the ListOperations -// operation. -type ListOperationsAPIClient interface { - ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) -} - -var _ ListOperationsAPIClient = (*Client)(nil) - // ListOperationsPaginatorOptions is the paginator options for ListOperations type ListOperationsPaginatorOptions struct { // The maximum number of results to include in each response (result page). It's @@ -228,6 +223,9 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListOperationsAPIClient is a client that implements the ListOperations +// operation. +type ListOperationsAPIClient interface { + ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) +} + +var _ ListOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListServices.go b/service/apprunner/api_op_ListServices.go index 29c74bb6195..ea535e2a0cf 100644 --- a/service/apprunner/api_op_ListServices.go +++ b/service/apprunner/api_op_ListServices.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServices(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of results to include in each response (result page). It's @@ -218,6 +214,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListServicesForAutoScalingConfiguration.go b/service/apprunner/api_op_ListServicesForAutoScalingConfiguration.go index 541bc9c406f..f9f8c8787b8 100644 --- a/service/apprunner/api_op_ListServicesForAutoScalingConfiguration.go +++ b/service/apprunner/api_op_ListServicesForAutoScalingConfiguration.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListServicesForAutoScalingConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicesForAutoScalingConfigurationValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListServicesForAutoScalingConfigurationMiddlewares( return nil } -// ListServicesForAutoScalingConfigurationAPIClient is a client that implements -// the ListServicesForAutoScalingConfiguration operation. -type ListServicesForAutoScalingConfigurationAPIClient interface { - ListServicesForAutoScalingConfiguration(context.Context, *ListServicesForAutoScalingConfigurationInput, ...func(*Options)) (*ListServicesForAutoScalingConfigurationOutput, error) -} - -var _ ListServicesForAutoScalingConfigurationAPIClient = (*Client)(nil) - // ListServicesForAutoScalingConfigurationPaginatorOptions is the paginator // options for ListServicesForAutoScalingConfiguration type ListServicesForAutoScalingConfigurationPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListServicesForAutoScalingConfigurationPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServicesForAutoScalingConfiguration(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListServicesForAutoScalingConfigurationPaginator) NextPage(ctx context. return result, nil } +// ListServicesForAutoScalingConfigurationAPIClient is a client that implements +// the ListServicesForAutoScalingConfiguration operation. +type ListServicesForAutoScalingConfigurationAPIClient interface { + ListServicesForAutoScalingConfiguration(context.Context, *ListServicesForAutoScalingConfigurationInput, ...func(*Options)) (*ListServicesForAutoScalingConfigurationOutput, error) +} + +var _ ListServicesForAutoScalingConfigurationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServicesForAutoScalingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListTagsForResource.go b/service/apprunner/api_op_ListTagsForResource.go index 1442d2934ee..6d47e85e8a5 100644 --- a/service/apprunner/api_op_ListTagsForResource.go +++ b/service/apprunner/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_ListVpcConnectors.go b/service/apprunner/api_op_ListVpcConnectors.go index ddd9b4f7ceb..f4265c99382 100644 --- a/service/apprunner/api_op_ListVpcConnectors.go +++ b/service/apprunner/api_op_ListVpcConnectors.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListVpcConnectorsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVpcConnectors(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListVpcConnectorsMiddlewares(stack *middleware.Stac return nil } -// ListVpcConnectorsAPIClient is a client that implements the ListVpcConnectors -// operation. -type ListVpcConnectorsAPIClient interface { - ListVpcConnectors(context.Context, *ListVpcConnectorsInput, ...func(*Options)) (*ListVpcConnectorsOutput, error) -} - -var _ ListVpcConnectorsAPIClient = (*Client)(nil) - // ListVpcConnectorsPaginatorOptions is the paginator options for ListVpcConnectors type ListVpcConnectorsPaginatorOptions struct { // The maximum number of results to include in each response (result page). It's @@ -218,6 +213,9 @@ func (p *ListVpcConnectorsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVpcConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListVpcConnectorsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListVpcConnectorsAPIClient is a client that implements the ListVpcConnectors +// operation. +type ListVpcConnectorsAPIClient interface { + ListVpcConnectors(context.Context, *ListVpcConnectorsInput, ...func(*Options)) (*ListVpcConnectorsOutput, error) +} + +var _ ListVpcConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVpcConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_ListVpcIngressConnections.go b/service/apprunner/api_op_ListVpcIngressConnections.go index 60552bde978..3fdb6b3c997 100644 --- a/service/apprunner/api_op_ListVpcIngressConnections.go +++ b/service/apprunner/api_op_ListVpcIngressConnections.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListVpcIngressConnectionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVpcIngressConnections(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListVpcIngressConnectionsMiddlewares(stack *middlew return nil } -// ListVpcIngressConnectionsAPIClient is a client that implements the -// ListVpcIngressConnections operation. -type ListVpcIngressConnectionsAPIClient interface { - ListVpcIngressConnections(context.Context, *ListVpcIngressConnectionsInput, ...func(*Options)) (*ListVpcIngressConnectionsOutput, error) -} - -var _ ListVpcIngressConnectionsAPIClient = (*Client)(nil) - // ListVpcIngressConnectionsPaginatorOptions is the paginator options for // ListVpcIngressConnections type ListVpcIngressConnectionsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListVpcIngressConnectionsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVpcIngressConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListVpcIngressConnectionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListVpcIngressConnectionsAPIClient is a client that implements the +// ListVpcIngressConnections operation. +type ListVpcIngressConnectionsAPIClient interface { + ListVpcIngressConnections(context.Context, *ListVpcIngressConnectionsInput, ...func(*Options)) (*ListVpcIngressConnectionsOutput, error) +} + +var _ ListVpcIngressConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVpcIngressConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apprunner/api_op_PauseService.go b/service/apprunner/api_op_PauseService.go index aa0e037b6fb..14cf723ee9c 100644 --- a/service/apprunner/api_op_PauseService.go +++ b/service/apprunner/api_op_PauseService.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPauseServiceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPauseServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_ResumeService.go b/service/apprunner/api_op_ResumeService.go index 0d1f5b07740..4315a2d5446 100644 --- a/service/apprunner/api_op_ResumeService.go +++ b/service/apprunner/api_op_ResumeService.go @@ -117,6 +117,9 @@ func (c *Client) addOperationResumeServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_StartDeployment.go b/service/apprunner/api_op_StartDeployment.go index 416745634f3..607fbb5a254 100644 --- a/service/apprunner/api_op_StartDeployment.go +++ b/service/apprunner/api_op_StartDeployment.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStartDeploymentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_TagResource.go b/service/apprunner/api_op_TagResource.go index 38b04d937c3..2a39e1508b4 100644 --- a/service/apprunner/api_op_TagResource.go +++ b/service/apprunner/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_UntagResource.go b/service/apprunner/api_op_UntagResource.go index 6311e01de63..cae6d69c0e5 100644 --- a/service/apprunner/api_op_UntagResource.go +++ b/service/apprunner/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_UpdateDefaultAutoScalingConfiguration.go b/service/apprunner/api_op_UpdateDefaultAutoScalingConfiguration.go index 00368da0739..ebc85c105ce 100644 --- a/service/apprunner/api_op_UpdateDefaultAutoScalingConfiguration.go +++ b/service/apprunner/api_op_UpdateDefaultAutoScalingConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateDefaultAutoScalingConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDefaultAutoScalingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_UpdateService.go b/service/apprunner/api_op_UpdateService.go index 676ef392e44..2b4778a122e 100644 --- a/service/apprunner/api_op_UpdateService.go +++ b/service/apprunner/api_op_UpdateService.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apprunner/api_op_UpdateVpcIngressConnection.go b/service/apprunner/api_op_UpdateVpcIngressConnection.go index eff6c6700fe..63e5db345e4 100644 --- a/service/apprunner/api_op_UpdateVpcIngressConnection.go +++ b/service/apprunner/api_op_UpdateVpcIngressConnection.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateVpcIngressConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVpcIngressConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_client.go b/service/appstream/api_client.go index ecd45784b84..b18b74ca722 100644 --- a/service/appstream/api_client.go +++ b/service/appstream/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/appstream/api_op_AssociateAppBlockBuilderAppBlock.go b/service/appstream/api_op_AssociateAppBlockBuilderAppBlock.go index 01d886be99c..f5b8fc24706 100644 --- a/service/appstream/api_op_AssociateAppBlockBuilderAppBlock.go +++ b/service/appstream/api_op_AssociateAppBlockBuilderAppBlock.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociateAppBlockBuilderAppBlockMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAppBlockBuilderAppBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_AssociateApplicationFleet.go b/service/appstream/api_op_AssociateApplicationFleet.go index 5de1dd7a14e..abc50e9783f 100644 --- a/service/appstream/api_op_AssociateApplicationFleet.go +++ b/service/appstream/api_op_AssociateApplicationFleet.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssociateApplicationFleetMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateApplicationFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_AssociateApplicationToEntitlement.go b/service/appstream/api_op_AssociateApplicationToEntitlement.go index fda9f243381..b9d743d2640 100644 --- a/service/appstream/api_op_AssociateApplicationToEntitlement.go +++ b/service/appstream/api_op_AssociateApplicationToEntitlement.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociateApplicationToEntitlementMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateApplicationToEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_AssociateFleet.go b/service/appstream/api_op_AssociateFleet.go index 316c47101a7..63ab62f8464 100644 --- a/service/appstream/api_op_AssociateFleet.go +++ b/service/appstream/api_op_AssociateFleet.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateFleetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_BatchAssociateUserStack.go b/service/appstream/api_op_BatchAssociateUserStack.go index 1193183480d..fb78520122a 100644 --- a/service/appstream/api_op_BatchAssociateUserStack.go +++ b/service/appstream/api_op_BatchAssociateUserStack.go @@ -108,6 +108,9 @@ func (c *Client) addOperationBatchAssociateUserStackMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateUserStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_BatchDisassociateUserStack.go b/service/appstream/api_op_BatchDisassociateUserStack.go index b2c07779304..0b8a748de6d 100644 --- a/service/appstream/api_op_BatchDisassociateUserStack.go +++ b/service/appstream/api_op_BatchDisassociateUserStack.go @@ -106,6 +106,9 @@ func (c *Client) addOperationBatchDisassociateUserStackMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateUserStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CopyImage.go b/service/appstream/api_op_CopyImage.go index 9481907d598..a082e684c7b 100644 --- a/service/appstream/api_op_CopyImage.go +++ b/service/appstream/api_op_CopyImage.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCopyImageMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateAppBlock.go b/service/appstream/api_op_CreateAppBlock.go index a1d223c4c2e..56114cbfe66 100644 --- a/service/appstream/api_op_CreateAppBlock.go +++ b/service/appstream/api_op_CreateAppBlock.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateAppBlockMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateAppBlockBuilder.go b/service/appstream/api_op_CreateAppBlockBuilder.go index e1f20ad4401..17afc7525e4 100644 --- a/service/appstream/api_op_CreateAppBlockBuilder.go +++ b/service/appstream/api_op_CreateAppBlockBuilder.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCreateAppBlockBuilderMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppBlockBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateAppBlockBuilderStreamingURL.go b/service/appstream/api_op_CreateAppBlockBuilderStreamingURL.go index 9565b36ee5a..ad089cb29c4 100644 --- a/service/appstream/api_op_CreateAppBlockBuilderStreamingURL.go +++ b/service/appstream/api_op_CreateAppBlockBuilderStreamingURL.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateAppBlockBuilderStreamingURLMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppBlockBuilderStreamingURLValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateApplication.go b/service/appstream/api_op_CreateApplication.go index 5c9548340bc..a644e7a7e81 100644 --- a/service/appstream/api_op_CreateApplication.go +++ b/service/appstream/api_op_CreateApplication.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateDirectoryConfig.go b/service/appstream/api_op_CreateDirectoryConfig.go index 84d00d15066..753f1e7d6df 100644 --- a/service/appstream/api_op_CreateDirectoryConfig.go +++ b/service/appstream/api_op_CreateDirectoryConfig.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateDirectoryConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDirectoryConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateEntitlement.go b/service/appstream/api_op_CreateEntitlement.go index 1083ebfb72c..9b74d1964bd 100644 --- a/service/appstream/api_op_CreateEntitlement.go +++ b/service/appstream/api_op_CreateEntitlement.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateEntitlementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateFleet.go b/service/appstream/api_op_CreateFleet.go index efdf8b888ee..1364ac5e943 100644 --- a/service/appstream/api_op_CreateFleet.go +++ b/service/appstream/api_op_CreateFleet.go @@ -331,6 +331,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateImageBuilder.go b/service/appstream/api_op_CreateImageBuilder.go index 8fbf27555f6..8142c186a09 100644 --- a/service/appstream/api_op_CreateImageBuilder.go +++ b/service/appstream/api_op_CreateImageBuilder.go @@ -241,6 +241,9 @@ func (c *Client) addOperationCreateImageBuilderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateImageBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateImageBuilderStreamingURL.go b/service/appstream/api_op_CreateImageBuilderStreamingURL.go index 5caa9c5dced..b0768564dd4 100644 --- a/service/appstream/api_op_CreateImageBuilderStreamingURL.go +++ b/service/appstream/api_op_CreateImageBuilderStreamingURL.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateImageBuilderStreamingURLMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateImageBuilderStreamingURLValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateStack.go b/service/appstream/api_op_CreateStack.go index 5db60048e37..506f14eb194 100644 --- a/service/appstream/api_op_CreateStack.go +++ b/service/appstream/api_op_CreateStack.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateStreamingURL.go b/service/appstream/api_op_CreateStreamingURL.go index 9b402695745..ab419beb8b6 100644 --- a/service/appstream/api_op_CreateStreamingURL.go +++ b/service/appstream/api_op_CreateStreamingURL.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateStreamingURLMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamingURLValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateUpdatedImage.go b/service/appstream/api_op_CreateUpdatedImage.go index 7f1bb3c6e38..fac4449522b 100644 --- a/service/appstream/api_op_CreateUpdatedImage.go +++ b/service/appstream/api_op_CreateUpdatedImage.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateUpdatedImageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUpdatedImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_CreateUsageReportSubscription.go b/service/appstream/api_op_CreateUsageReportSubscription.go index efca0ff9d73..c90e035387c 100644 --- a/service/appstream/api_op_CreateUsageReportSubscription.go +++ b/service/appstream/api_op_CreateUsageReportSubscription.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateUsageReportSubscriptionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUsageReportSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_CreateUser.go b/service/appstream/api_op_CreateUser.go index afed983e7c3..c46b7ed0549 100644 --- a/service/appstream/api_op_CreateUser.go +++ b/service/appstream/api_op_CreateUser.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteAppBlock.go b/service/appstream/api_op_DeleteAppBlock.go index 8f816d5cbf5..2a795b16406 100644 --- a/service/appstream/api_op_DeleteAppBlock.go +++ b/service/appstream/api_op_DeleteAppBlock.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppBlockMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteAppBlockBuilder.go b/service/appstream/api_op_DeleteAppBlockBuilder.go index 6c4904a071c..449af164926 100644 --- a/service/appstream/api_op_DeleteAppBlockBuilder.go +++ b/service/appstream/api_op_DeleteAppBlockBuilder.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteAppBlockBuilderMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppBlockBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteApplication.go b/service/appstream/api_op_DeleteApplication.go index ab2678d735f..2d2658886e7 100644 --- a/service/appstream/api_op_DeleteApplication.go +++ b/service/appstream/api_op_DeleteApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteDirectoryConfig.go b/service/appstream/api_op_DeleteDirectoryConfig.go index 8731b672800..54b5952db1f 100644 --- a/service/appstream/api_op_DeleteDirectoryConfig.go +++ b/service/appstream/api_op_DeleteDirectoryConfig.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteDirectoryConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDirectoryConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteEntitlement.go b/service/appstream/api_op_DeleteEntitlement.go index 13d2b696285..ffb9cd07729 100644 --- a/service/appstream/api_op_DeleteEntitlement.go +++ b/service/appstream/api_op_DeleteEntitlement.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEntitlementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteFleet.go b/service/appstream/api_op_DeleteFleet.go index f2fa83ae8da..eae893dba1a 100644 --- a/service/appstream/api_op_DeleteFleet.go +++ b/service/appstream/api_op_DeleteFleet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteImage.go b/service/appstream/api_op_DeleteImage.go index 36cb05e9f6a..44f68d39a39 100644 --- a/service/appstream/api_op_DeleteImage.go +++ b/service/appstream/api_op_DeleteImage.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteImageBuilder.go b/service/appstream/api_op_DeleteImageBuilder.go index 2ffbec23f64..26972cdce3c 100644 --- a/service/appstream/api_op_DeleteImageBuilder.go +++ b/service/appstream/api_op_DeleteImageBuilder.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteImageBuilderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImageBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteImagePermissions.go b/service/appstream/api_op_DeleteImagePermissions.go index d4190be6fda..2a6e098bbdf 100644 --- a/service/appstream/api_op_DeleteImagePermissions.go +++ b/service/appstream/api_op_DeleteImagePermissions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteImagePermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImagePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteStack.go b/service/appstream/api_op_DeleteStack.go index fbe67c762bb..c59e2c78d12 100644 --- a/service/appstream/api_op_DeleteStack.go +++ b/service/appstream/api_op_DeleteStack.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DeleteUsageReportSubscription.go b/service/appstream/api_op_DeleteUsageReportSubscription.go index 4834653d793..aa7a5be1f60 100644 --- a/service/appstream/api_op_DeleteUsageReportSubscription.go +++ b/service/appstream/api_op_DeleteUsageReportSubscription.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteUsageReportSubscriptionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUsageReportSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DeleteUser.go b/service/appstream/api_op_DeleteUser.go index 01a17ba7d82..818e572d345 100644 --- a/service/appstream/api_op_DeleteUser.go +++ b/service/appstream/api_op_DeleteUser.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DescribeAppBlockBuilderAppBlockAssociations.go b/service/appstream/api_op_DescribeAppBlockBuilderAppBlockAssociations.go index 763872bed2c..8c74b991e38 100644 --- a/service/appstream/api_op_DescribeAppBlockBuilderAppBlockAssociations.go +++ b/service/appstream/api_op_DescribeAppBlockBuilderAppBlockAssociations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeAppBlockBuilderAppBlockAssociationsMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppBlockBuilderAppBlockAssociations(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeAppBlockBuilderAppBlockAssociationsMiddlewa return nil } -// DescribeAppBlockBuilderAppBlockAssociationsAPIClient is a client that -// implements the DescribeAppBlockBuilderAppBlockAssociations operation. -type DescribeAppBlockBuilderAppBlockAssociationsAPIClient interface { - DescribeAppBlockBuilderAppBlockAssociations(context.Context, *DescribeAppBlockBuilderAppBlockAssociationsInput, ...func(*Options)) (*DescribeAppBlockBuilderAppBlockAssociationsOutput, error) -} - -var _ DescribeAppBlockBuilderAppBlockAssociationsAPIClient = (*Client)(nil) - // DescribeAppBlockBuilderAppBlockAssociationsPaginatorOptions is the paginator // options for DescribeAppBlockBuilderAppBlockAssociations type DescribeAppBlockBuilderAppBlockAssociationsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *DescribeAppBlockBuilderAppBlockAssociationsPaginator) NextPage(ctx cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAppBlockBuilderAppBlockAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *DescribeAppBlockBuilderAppBlockAssociationsPaginator) NextPage(ctx cont return result, nil } +// DescribeAppBlockBuilderAppBlockAssociationsAPIClient is a client that +// implements the DescribeAppBlockBuilderAppBlockAssociations operation. +type DescribeAppBlockBuilderAppBlockAssociationsAPIClient interface { + DescribeAppBlockBuilderAppBlockAssociations(context.Context, *DescribeAppBlockBuilderAppBlockAssociationsInput, ...func(*Options)) (*DescribeAppBlockBuilderAppBlockAssociationsOutput, error) +} + +var _ DescribeAppBlockBuilderAppBlockAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAppBlockBuilderAppBlockAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appstream/api_op_DescribeAppBlockBuilders.go b/service/appstream/api_op_DescribeAppBlockBuilders.go index 84c968c142e..f03387aa5b4 100644 --- a/service/appstream/api_op_DescribeAppBlockBuilders.go +++ b/service/appstream/api_op_DescribeAppBlockBuilders.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAppBlockBuildersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppBlockBuilders(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeAppBlockBuildersMiddlewares(stack *middlewa return nil } -// DescribeAppBlockBuildersAPIClient is a client that implements the -// DescribeAppBlockBuilders operation. -type DescribeAppBlockBuildersAPIClient interface { - DescribeAppBlockBuilders(context.Context, *DescribeAppBlockBuildersInput, ...func(*Options)) (*DescribeAppBlockBuildersOutput, error) -} - -var _ DescribeAppBlockBuildersAPIClient = (*Client)(nil) - // DescribeAppBlockBuildersPaginatorOptions is the paginator options for // DescribeAppBlockBuilders type DescribeAppBlockBuildersPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeAppBlockBuildersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAppBlockBuilders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeAppBlockBuildersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeAppBlockBuildersAPIClient is a client that implements the +// DescribeAppBlockBuilders operation. +type DescribeAppBlockBuildersAPIClient interface { + DescribeAppBlockBuilders(context.Context, *DescribeAppBlockBuildersInput, ...func(*Options)) (*DescribeAppBlockBuildersOutput, error) +} + +var _ DescribeAppBlockBuildersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAppBlockBuilders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appstream/api_op_DescribeAppBlocks.go b/service/appstream/api_op_DescribeAppBlocks.go index 7d8027449e9..d0024c032ab 100644 --- a/service/appstream/api_op_DescribeAppBlocks.go +++ b/service/appstream/api_op_DescribeAppBlocks.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAppBlocksMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppBlocks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeApplicationFleetAssociations.go b/service/appstream/api_op_DescribeApplicationFleetAssociations.go index 8a1882885e2..65ce210376a 100644 --- a/service/appstream/api_op_DescribeApplicationFleetAssociations.go +++ b/service/appstream/api_op_DescribeApplicationFleetAssociations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeApplicationFleetAssociationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationFleetAssociations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeApplications.go b/service/appstream/api_op_DescribeApplications.go index d083e62508a..90c6715ed99 100644 --- a/service/appstream/api_op_DescribeApplications.go +++ b/service/appstream/api_op_DescribeApplications.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeApplicationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeDirectoryConfigs.go b/service/appstream/api_op_DescribeDirectoryConfigs.go index 8b42399ba23..7e1054bd7da 100644 --- a/service/appstream/api_op_DescribeDirectoryConfigs.go +++ b/service/appstream/api_op_DescribeDirectoryConfigs.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeDirectoryConfigsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDirectoryConfigs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeEntitlements.go b/service/appstream/api_op_DescribeEntitlements.go index e87ac07f48e..0cf65ade71b 100644 --- a/service/appstream/api_op_DescribeEntitlements.go +++ b/service/appstream/api_op_DescribeEntitlements.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeEntitlementsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntitlementsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DescribeFleets.go b/service/appstream/api_op_DescribeFleets.go index a68cf06322a..e06dac144b5 100644 --- a/service/appstream/api_op_DescribeFleets.go +++ b/service/appstream/api_op_DescribeFleets.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeFleetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleets(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeFleetsMiddlewares(stack *middleware.Stack, return nil } -// DescribeFleetsAPIClient is a client that implements the DescribeFleets -// operation. -type DescribeFleetsAPIClient interface { - DescribeFleets(context.Context, *DescribeFleetsInput, ...func(*Options)) (*DescribeFleetsOutput, error) -} - -var _ DescribeFleetsAPIClient = (*Client)(nil) - // FleetStartedWaiterOptions are waiter options for FleetStartedWaiter type FleetStartedWaiterOptions struct { @@ -260,7 +255,13 @@ func (w *FleetStartedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeFleets(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -495,7 +496,13 @@ func (w *FleetStoppedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeFleets(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -616,6 +623,14 @@ func fleetStoppedStateRetryable(ctx context.Context, input *DescribeFleetsInput, return true, nil } +// DescribeFleetsAPIClient is a client that implements the DescribeFleets +// operation. +type DescribeFleetsAPIClient interface { + DescribeFleets(context.Context, *DescribeFleetsInput, ...func(*Options)) (*DescribeFleetsOutput, error) +} + +var _ DescribeFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appstream/api_op_DescribeImageBuilders.go b/service/appstream/api_op_DescribeImageBuilders.go index e7b250e2f6c..409e866465c 100644 --- a/service/appstream/api_op_DescribeImageBuilders.go +++ b/service/appstream/api_op_DescribeImageBuilders.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeImageBuildersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImageBuilders(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeImagePermissions.go b/service/appstream/api_op_DescribeImagePermissions.go index a503e7d92bd..ee7e123fbb7 100644 --- a/service/appstream/api_op_DescribeImagePermissions.go +++ b/service/appstream/api_op_DescribeImagePermissions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeImagePermissionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImagePermissionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeImagePermissionsMiddlewares(stack *middlewa return nil } -// DescribeImagePermissionsAPIClient is a client that implements the -// DescribeImagePermissions operation. -type DescribeImagePermissionsAPIClient interface { - DescribeImagePermissions(context.Context, *DescribeImagePermissionsInput, ...func(*Options)) (*DescribeImagePermissionsOutput, error) -} - -var _ DescribeImagePermissionsAPIClient = (*Client)(nil) - // DescribeImagePermissionsPaginatorOptions is the paginator options for // DescribeImagePermissions type DescribeImagePermissionsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeImagePermissionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImagePermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeImagePermissionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeImagePermissionsAPIClient is a client that implements the +// DescribeImagePermissions operation. +type DescribeImagePermissionsAPIClient interface { + DescribeImagePermissions(context.Context, *DescribeImagePermissionsInput, ...func(*Options)) (*DescribeImagePermissionsOutput, error) +} + +var _ DescribeImagePermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImagePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appstream/api_op_DescribeImages.go b/service/appstream/api_op_DescribeImages.go index 70d77db28bb..5002946d93c 100644 --- a/service/appstream/api_op_DescribeImages.go +++ b/service/appstream/api_op_DescribeImages.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImages(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, return nil } -// DescribeImagesAPIClient is a client that implements the DescribeImages -// operation. -type DescribeImagesAPIClient interface { - DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) -} - -var _ DescribeImagesAPIClient = (*Client)(nil) - // DescribeImagesPaginatorOptions is the paginator options for DescribeImages type DescribeImagesPaginatorOptions struct { // The maximum size of each page of results. @@ -215,6 +210,9 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeImagesAPIClient is a client that implements the DescribeImages +// operation. +type DescribeImagesAPIClient interface { + DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) +} + +var _ DescribeImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/appstream/api_op_DescribeSessions.go b/service/appstream/api_op_DescribeSessions.go index 7caa9949d80..1c5590dfa13 100644 --- a/service/appstream/api_op_DescribeSessions.go +++ b/service/appstream/api_op_DescribeSessions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSessionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DescribeStacks.go b/service/appstream/api_op_DescribeStacks.go index 8aa8fd31076..b8f31a5827b 100644 --- a/service/appstream/api_op_DescribeStacks.go +++ b/service/appstream/api_op_DescribeStacks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeStacksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStacks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeUsageReportSubscriptions.go b/service/appstream/api_op_DescribeUsageReportSubscriptions.go index 613dd854263..ed7f6c30a8d 100644 --- a/service/appstream/api_op_DescribeUsageReportSubscriptions.go +++ b/service/appstream/api_op_DescribeUsageReportSubscriptions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeUsageReportSubscriptionsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUsageReportSubscriptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeUserStackAssociations.go b/service/appstream/api_op_DescribeUserStackAssociations.go index 0c535e8c4ba..200f2351fed 100644 --- a/service/appstream/api_op_DescribeUserStackAssociations.go +++ b/service/appstream/api_op_DescribeUserStackAssociations.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeUserStackAssociationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUserStackAssociations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appstream/api_op_DescribeUsers.go b/service/appstream/api_op_DescribeUsers.go index 9e8f0b36847..c1225005a9d 100644 --- a/service/appstream/api_op_DescribeUsers.go +++ b/service/appstream/api_op_DescribeUsers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DisableUser.go b/service/appstream/api_op_DisableUser.go index f560d68719d..8d140627909 100644 --- a/service/appstream/api_op_DisableUser.go +++ b/service/appstream/api_op_DisableUser.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisableUserMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DisassociateAppBlockBuilderAppBlock.go b/service/appstream/api_op_DisassociateAppBlockBuilderAppBlock.go index bf7b73f8086..dfb2e6a3797 100644 --- a/service/appstream/api_op_DisassociateAppBlockBuilderAppBlock.go +++ b/service/appstream/api_op_DisassociateAppBlockBuilderAppBlock.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateAppBlockBuilderAppBlockMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAppBlockBuilderAppBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DisassociateApplicationFleet.go b/service/appstream/api_op_DisassociateApplicationFleet.go index d0adb89bd0f..237b3121c02 100644 --- a/service/appstream/api_op_DisassociateApplicationFleet.go +++ b/service/appstream/api_op_DisassociateApplicationFleet.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateApplicationFleetMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateApplicationFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DisassociateApplicationFromEntitlement.go b/service/appstream/api_op_DisassociateApplicationFromEntitlement.go index 7d9db98622e..708997ff890 100644 --- a/service/appstream/api_op_DisassociateApplicationFromEntitlement.go +++ b/service/appstream/api_op_DisassociateApplicationFromEntitlement.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateApplicationFromEntitlementMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateApplicationFromEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_DisassociateFleet.go b/service/appstream/api_op_DisassociateFleet.go index 69b6dccbcd8..b2a80594b63 100644 --- a/service/appstream/api_op_DisassociateFleet.go +++ b/service/appstream/api_op_DisassociateFleet.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateFleetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_EnableUser.go b/service/appstream/api_op_EnableUser.go index e39dfe5e8dd..82e0690db46 100644 --- a/service/appstream/api_op_EnableUser.go +++ b/service/appstream/api_op_EnableUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationEnableUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_ExpireSession.go b/service/appstream/api_op_ExpireSession.go index 28458c130db..0c15573cc82 100644 --- a/service/appstream/api_op_ExpireSession.go +++ b/service/appstream/api_op_ExpireSession.go @@ -101,6 +101,9 @@ func (c *Client) addOperationExpireSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExpireSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_ListAssociatedFleets.go b/service/appstream/api_op_ListAssociatedFleets.go index 553acd83d3d..cd3e882bcff 100644 --- a/service/appstream/api_op_ListAssociatedFleets.go +++ b/service/appstream/api_op_ListAssociatedFleets.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAssociatedFleetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedFleetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_ListAssociatedStacks.go b/service/appstream/api_op_ListAssociatedStacks.go index 8605c534c03..279008193a5 100644 --- a/service/appstream/api_op_ListAssociatedStacks.go +++ b/service/appstream/api_op_ListAssociatedStacks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAssociatedStacksMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedStacksValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_ListEntitledApplications.go b/service/appstream/api_op_ListEntitledApplications.go index 8f28dcd6d40..e5b67556e92 100644 --- a/service/appstream/api_op_ListEntitledApplications.go +++ b/service/appstream/api_op_ListEntitledApplications.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListEntitledApplicationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEntitledApplicationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_ListTagsForResource.go b/service/appstream/api_op_ListTagsForResource.go index a9d71289854..1bff7459af8 100644 --- a/service/appstream/api_op_ListTagsForResource.go +++ b/service/appstream/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_StartAppBlockBuilder.go b/service/appstream/api_op_StartAppBlockBuilder.go index 38573190f5c..293d652d492 100644 --- a/service/appstream/api_op_StartAppBlockBuilder.go +++ b/service/appstream/api_op_StartAppBlockBuilder.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartAppBlockBuilderMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAppBlockBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_StartFleet.go b/service/appstream/api_op_StartFleet.go index b9b270128f6..7d3f62156c8 100644 --- a/service/appstream/api_op_StartFleet.go +++ b/service/appstream/api_op_StartFleet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStartFleetMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_StartImageBuilder.go b/service/appstream/api_op_StartImageBuilder.go index 6d4c1297c71..e1092538488 100644 --- a/service/appstream/api_op_StartImageBuilder.go +++ b/service/appstream/api_op_StartImageBuilder.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStartImageBuilderMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImageBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_StopAppBlockBuilder.go b/service/appstream/api_op_StopAppBlockBuilder.go index 8d87038d352..e7b927e287d 100644 --- a/service/appstream/api_op_StopAppBlockBuilder.go +++ b/service/appstream/api_op_StopAppBlockBuilder.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopAppBlockBuilderMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAppBlockBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_StopFleet.go b/service/appstream/api_op_StopFleet.go index ee516468034..dc35f30d7db 100644 --- a/service/appstream/api_op_StopFleet.go +++ b/service/appstream/api_op_StopFleet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopFleetMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_StopImageBuilder.go b/service/appstream/api_op_StopImageBuilder.go index 981c821d116..63ff43eb5d4 100644 --- a/service/appstream/api_op_StopImageBuilder.go +++ b/service/appstream/api_op_StopImageBuilder.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopImageBuilderMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopImageBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_TagResource.go b/service/appstream/api_op_TagResource.go index 17c0d263665..df1cb080624 100644 --- a/service/appstream/api_op_TagResource.go +++ b/service/appstream/api_op_TagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UntagResource.go b/service/appstream/api_op_UntagResource.go index ec4a5f36b32..ecea5dfe60e 100644 --- a/service/appstream/api_op_UntagResource.go +++ b/service/appstream/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateAppBlockBuilder.go b/service/appstream/api_op_UpdateAppBlockBuilder.go index aaf28284d8c..5b19a927369 100644 --- a/service/appstream/api_op_UpdateAppBlockBuilder.go +++ b/service/appstream/api_op_UpdateAppBlockBuilder.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdateAppBlockBuilderMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppBlockBuilderValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateApplication.go b/service/appstream/api_op_UpdateApplication.go index 2bf02eb889d..a004e462670 100644 --- a/service/appstream/api_op_UpdateApplication.go +++ b/service/appstream/api_op_UpdateApplication.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateDirectoryConfig.go b/service/appstream/api_op_UpdateDirectoryConfig.go index cb387b31adc..6e2060db30b 100644 --- a/service/appstream/api_op_UpdateDirectoryConfig.go +++ b/service/appstream/api_op_UpdateDirectoryConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateDirectoryConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDirectoryConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateEntitlement.go b/service/appstream/api_op_UpdateEntitlement.go index 4a3fc0af607..252c95fe4c1 100644 --- a/service/appstream/api_op_UpdateEntitlement.go +++ b/service/appstream/api_op_UpdateEntitlement.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateEntitlementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateFleet.go b/service/appstream/api_op_UpdateFleet.go index bbdb1e8a454..4f3b331b017 100644 --- a/service/appstream/api_op_UpdateFleet.go +++ b/service/appstream/api_op_UpdateFleet.go @@ -327,6 +327,9 @@ func (c *Client) addOperationUpdateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateImagePermissions.go b/service/appstream/api_op_UpdateImagePermissions.go index bc5544e24f8..368db743f51 100644 --- a/service/appstream/api_op_UpdateImagePermissions.go +++ b/service/appstream/api_op_UpdateImagePermissions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateImagePermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateImagePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appstream/api_op_UpdateStack.go b/service/appstream/api_op_UpdateStack.go index 1ae9e4d5a4d..cc34562cdac 100644 --- a/service/appstream/api_op_UpdateStack.go +++ b/service/appstream/api_op_UpdateStack.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_client.go b/service/appsync/api_client.go index 1115c3b78c6..d0a0b8ace21 100644 --- a/service/appsync/api_client.go +++ b/service/appsync/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/appsync/api_op_AssociateApi.go b/service/appsync/api_op_AssociateApi.go index fbbd529fe61..3ffe7008a44 100644 --- a/service/appsync/api_op_AssociateApi.go +++ b/service/appsync/api_op_AssociateApi.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociateApiMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_AssociateMergedGraphqlApi.go b/service/appsync/api_op_AssociateMergedGraphqlApi.go index e1ec3d5c983..f7e6343a2ee 100644 --- a/service/appsync/api_op_AssociateMergedGraphqlApi.go +++ b/service/appsync/api_op_AssociateMergedGraphqlApi.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateMergedGraphqlApiMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateMergedGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_AssociateSourceGraphqlApi.go b/service/appsync/api_op_AssociateSourceGraphqlApi.go index 2dfcb768af3..6bc8e7051ca 100644 --- a/service/appsync/api_op_AssociateSourceGraphqlApi.go +++ b/service/appsync/api_op_AssociateSourceGraphqlApi.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateSourceGraphqlApiMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSourceGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateApiCache.go b/service/appsync/api_op_CreateApiCache.go index 4e88ab542ca..e81d7cae2a6 100644 --- a/service/appsync/api_op_CreateApiCache.go +++ b/service/appsync/api_op_CreateApiCache.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateApiCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApiCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateApiKey.go b/service/appsync/api_op_CreateApiKey.go index f6c48fc1247..63f10ceeee4 100644 --- a/service/appsync/api_op_CreateApiKey.go +++ b/service/appsync/api_op_CreateApiKey.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateApiKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateDataSource.go b/service/appsync/api_op_CreateDataSource.go index e02d9456c58..ef84237e79a 100644 --- a/service/appsync/api_op_CreateDataSource.go +++ b/service/appsync/api_op_CreateDataSource.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateDomainName.go b/service/appsync/api_op_CreateDomainName.go index 94d2f5cddae..4f24804fcf1 100644 --- a/service/appsync/api_op_CreateDomainName.go +++ b/service/appsync/api_op_CreateDomainName.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateFunction.go b/service/appsync/api_op_CreateFunction.go index 25817df2944..7062a93d96e 100644 --- a/service/appsync/api_op_CreateFunction.go +++ b/service/appsync/api_op_CreateFunction.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateGraphqlApi.go b/service/appsync/api_op_CreateGraphqlApi.go index 241b0947f5e..c106b75bc8b 100644 --- a/service/appsync/api_op_CreateGraphqlApi.go +++ b/service/appsync/api_op_CreateGraphqlApi.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateGraphqlApiMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateResolver.go b/service/appsync/api_op_CreateResolver.go index 0c6d7c3732a..0c316bbd9c1 100644 --- a/service/appsync/api_op_CreateResolver.go +++ b/service/appsync/api_op_CreateResolver.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateResolverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_CreateType.go b/service/appsync/api_op_CreateType.go index 05f1a4c8f64..6d9c19793da 100644 --- a/service/appsync/api_op_CreateType.go +++ b/service/appsync/api_op_CreateType.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateTypeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteApiCache.go b/service/appsync/api_op_DeleteApiCache.go index 72cb53863f9..f3ede7244dd 100644 --- a/service/appsync/api_op_DeleteApiCache.go +++ b/service/appsync/api_op_DeleteApiCache.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteApiCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteApiKey.go b/service/appsync/api_op_DeleteApiKey.go index 27daa00666c..6987fd53ebe 100644 --- a/service/appsync/api_op_DeleteApiKey.go +++ b/service/appsync/api_op_DeleteApiKey.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteApiKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteDataSource.go b/service/appsync/api_op_DeleteDataSource.go index c38eb53d928..8a1d5ffbcc3 100644 --- a/service/appsync/api_op_DeleteDataSource.go +++ b/service/appsync/api_op_DeleteDataSource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteDomainName.go b/service/appsync/api_op_DeleteDomainName.go index 725bc297419..6854bf4c402 100644 --- a/service/appsync/api_op_DeleteDomainName.go +++ b/service/appsync/api_op_DeleteDomainName.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteFunction.go b/service/appsync/api_op_DeleteFunction.go index 0a58d866638..99d3706adbb 100644 --- a/service/appsync/api_op_DeleteFunction.go +++ b/service/appsync/api_op_DeleteFunction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteGraphqlApi.go b/service/appsync/api_op_DeleteGraphqlApi.go index 85182cd3109..c415c251ea8 100644 --- a/service/appsync/api_op_DeleteGraphqlApi.go +++ b/service/appsync/api_op_DeleteGraphqlApi.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteGraphqlApiMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteResolver.go b/service/appsync/api_op_DeleteResolver.go index da3d03f4da5..d3597bbbb4e 100644 --- a/service/appsync/api_op_DeleteResolver.go +++ b/service/appsync/api_op_DeleteResolver.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteResolverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DeleteType.go b/service/appsync/api_op_DeleteType.go index c4da8027ce2..107252f6f2a 100644 --- a/service/appsync/api_op_DeleteType.go +++ b/service/appsync/api_op_DeleteType.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteTypeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DisassociateApi.go b/service/appsync/api_op_DisassociateApi.go index 0bfb327cf0d..863a61c8f3c 100644 --- a/service/appsync/api_op_DisassociateApi.go +++ b/service/appsync/api_op_DisassociateApi.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateApiMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DisassociateMergedGraphqlApi.go b/service/appsync/api_op_DisassociateMergedGraphqlApi.go index 1fec664888b..ed4dcd19bf9 100644 --- a/service/appsync/api_op_DisassociateMergedGraphqlApi.go +++ b/service/appsync/api_op_DisassociateMergedGraphqlApi.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateMergedGraphqlApiMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMergedGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_DisassociateSourceGraphqlApi.go b/service/appsync/api_op_DisassociateSourceGraphqlApi.go index 56f55dce977..cd9607c9d40 100644 --- a/service/appsync/api_op_DisassociateSourceGraphqlApi.go +++ b/service/appsync/api_op_DisassociateSourceGraphqlApi.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateSourceGraphqlApiMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateSourceGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_EvaluateCode.go b/service/appsync/api_op_EvaluateCode.go index 38c617029ad..e541cc4dfad 100644 --- a/service/appsync/api_op_EvaluateCode.go +++ b/service/appsync/api_op_EvaluateCode.go @@ -136,6 +136,9 @@ func (c *Client) addOperationEvaluateCodeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEvaluateCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_EvaluateMappingTemplate.go b/service/appsync/api_op_EvaluateMappingTemplate.go index 65cead2e248..97e463fe5be 100644 --- a/service/appsync/api_op_EvaluateMappingTemplate.go +++ b/service/appsync/api_op_EvaluateMappingTemplate.go @@ -128,6 +128,9 @@ func (c *Client) addOperationEvaluateMappingTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEvaluateMappingTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_FlushApiCache.go b/service/appsync/api_op_FlushApiCache.go index 52ab410d055..60f4b89f972 100644 --- a/service/appsync/api_op_FlushApiCache.go +++ b/service/appsync/api_op_FlushApiCache.go @@ -103,6 +103,9 @@ func (c *Client) addOperationFlushApiCacheMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFlushApiCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetApiAssociation.go b/service/appsync/api_op_GetApiAssociation.go index 7f7e9ca4103..7b2d626e0b2 100644 --- a/service/appsync/api_op_GetApiAssociation.go +++ b/service/appsync/api_op_GetApiAssociation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetApiAssociationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApiAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetApiCache.go b/service/appsync/api_op_GetApiCache.go index 4316e74f699..a92830ad72f 100644 --- a/service/appsync/api_op_GetApiCache.go +++ b/service/appsync/api_op_GetApiCache.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetApiCacheMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApiCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetDataSource.go b/service/appsync/api_op_GetDataSource.go index 03ac558dc2a..0ee25e34241 100644 --- a/service/appsync/api_op_GetDataSource.go +++ b/service/appsync/api_op_GetDataSource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetDataSourceIntrospection.go b/service/appsync/api_op_GetDataSourceIntrospection.go index 3057b6d0936..ea3efaa4301 100644 --- a/service/appsync/api_op_GetDataSourceIntrospection.go +++ b/service/appsync/api_op_GetDataSourceIntrospection.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetDataSourceIntrospectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceIntrospectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetDomainName.go b/service/appsync/api_op_GetDomainName.go index 19f13dda19b..8da227fb799 100644 --- a/service/appsync/api_op_GetDomainName.go +++ b/service/appsync/api_op_GetDomainName.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDomainNameMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetFunction.go b/service/appsync/api_op_GetFunction.go index 67d9954c6b0..363a3bc34d5 100644 --- a/service/appsync/api_op_GetFunction.go +++ b/service/appsync/api_op_GetFunction.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetGraphqlApi.go b/service/appsync/api_op_GetGraphqlApi.go index e3668b768a3..ad4065ef034 100644 --- a/service/appsync/api_op_GetGraphqlApi.go +++ b/service/appsync/api_op_GetGraphqlApi.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetGraphqlApiMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetGraphqlApiEnvironmentVariables.go b/service/appsync/api_op_GetGraphqlApiEnvironmentVariables.go index 4d42a31ca8c..3b08cc4d216 100644 --- a/service/appsync/api_op_GetGraphqlApiEnvironmentVariables.go +++ b/service/appsync/api_op_GetGraphqlApiEnvironmentVariables.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetGraphqlApiEnvironmentVariablesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGraphqlApiEnvironmentVariablesValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetIntrospectionSchema.go b/service/appsync/api_op_GetIntrospectionSchema.go index 0dff3afdeb5..41dc651c33a 100644 --- a/service/appsync/api_op_GetIntrospectionSchema.go +++ b/service/appsync/api_op_GetIntrospectionSchema.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetIntrospectionSchemaMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntrospectionSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetResolver.go b/service/appsync/api_op_GetResolver.go index 272a160605b..caab80dc3b0 100644 --- a/service/appsync/api_op_GetResolver.go +++ b/service/appsync/api_op_GetResolver.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetResolverMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetSchemaCreationStatus.go b/service/appsync/api_op_GetSchemaCreationStatus.go index 5d938a0385c..cd6507d921f 100644 --- a/service/appsync/api_op_GetSchemaCreationStatus.go +++ b/service/appsync/api_op_GetSchemaCreationStatus.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSchemaCreationStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaCreationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetSourceApiAssociation.go b/service/appsync/api_op_GetSourceApiAssociation.go index 8bb2ba72d0f..204911788da 100644 --- a/service/appsync/api_op_GetSourceApiAssociation.go +++ b/service/appsync/api_op_GetSourceApiAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSourceApiAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSourceApiAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_GetType.go b/service/appsync/api_op_GetType.go index ac1a37bc00b..d3a31d2d80a 100644 --- a/service/appsync/api_op_GetType.go +++ b/service/appsync/api_op_GetType.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetTypeMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListApiKeys.go b/service/appsync/api_op_ListApiKeys.go index 8b570eae2bb..9f7804518de 100644 --- a/service/appsync/api_op_ListApiKeys.go +++ b/service/appsync/api_op_ListApiKeys.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListApiKeysMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApiKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListDataSources.go b/service/appsync/api_op_ListDataSources.go index ad83d50c7d1..b7e32310870 100644 --- a/service/appsync/api_op_ListDataSources.go +++ b/service/appsync/api_op_ListDataSources.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListDomainNames.go b/service/appsync/api_op_ListDomainNames.go index 8740e5db42d..fd9a1db83e3 100644 --- a/service/appsync/api_op_ListDomainNames.go +++ b/service/appsync/api_op_ListDomainNames.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListDomainNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appsync/api_op_ListFunctions.go b/service/appsync/api_op_ListFunctions.go index 57030b626c2..5f103b589d7 100644 --- a/service/appsync/api_op_ListFunctions.go +++ b/service/appsync/api_op_ListFunctions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFunctionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListGraphqlApis.go b/service/appsync/api_op_ListGraphqlApis.go index a6bc024df14..39ef0530872 100644 --- a/service/appsync/api_op_ListGraphqlApis.go +++ b/service/appsync/api_op_ListGraphqlApis.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListGraphqlApisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGraphqlApis(options.Region), middleware.Before); err != nil { return err } diff --git a/service/appsync/api_op_ListResolvers.go b/service/appsync/api_op_ListResolvers.go index 8507ad594c6..2f647aa9f41 100644 --- a/service/appsync/api_op_ListResolvers.go +++ b/service/appsync/api_op_ListResolvers.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListResolversMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResolversValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListResolversByFunction.go b/service/appsync/api_op_ListResolversByFunction.go index d8d37ce08af..e9adaa221c0 100644 --- a/service/appsync/api_op_ListResolversByFunction.go +++ b/service/appsync/api_op_ListResolversByFunction.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListResolversByFunctionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResolversByFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListSourceApiAssociations.go b/service/appsync/api_op_ListSourceApiAssociations.go index b9497fd8406..34d24702f35 100644 --- a/service/appsync/api_op_ListSourceApiAssociations.go +++ b/service/appsync/api_op_ListSourceApiAssociations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListSourceApiAssociationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSourceApiAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListTagsForResource.go b/service/appsync/api_op_ListTagsForResource.go index 097411b577c..1f73478470a 100644 --- a/service/appsync/api_op_ListTagsForResource.go +++ b/service/appsync/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListTypes.go b/service/appsync/api_op_ListTypes.go index 730d46424dd..f925d3dafbd 100644 --- a/service/appsync/api_op_ListTypes.go +++ b/service/appsync/api_op_ListTypes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTypesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTypesValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_ListTypesByAssociation.go b/service/appsync/api_op_ListTypesByAssociation.go index c5a76cce8ad..8c81872ae2c 100644 --- a/service/appsync/api_op_ListTypesByAssociation.go +++ b/service/appsync/api_op_ListTypesByAssociation.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListTypesByAssociationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTypesByAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_PutGraphqlApiEnvironmentVariables.go b/service/appsync/api_op_PutGraphqlApiEnvironmentVariables.go index 9d6c1ced40a..75dfac0c8d4 100644 --- a/service/appsync/api_op_PutGraphqlApiEnvironmentVariables.go +++ b/service/appsync/api_op_PutGraphqlApiEnvironmentVariables.go @@ -168,6 +168,9 @@ func (c *Client) addOperationPutGraphqlApiEnvironmentVariablesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutGraphqlApiEnvironmentVariablesValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_StartDataSourceIntrospection.go b/service/appsync/api_op_StartDataSourceIntrospection.go index 3e2d2b179ae..5a53ca287c4 100644 --- a/service/appsync/api_op_StartDataSourceIntrospection.go +++ b/service/appsync/api_op_StartDataSourceIntrospection.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStartDataSourceIntrospectionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDataSourceIntrospectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_StartSchemaCreation.go b/service/appsync/api_op_StartSchemaCreation.go index fc48ec46712..19ac0fd8ae6 100644 --- a/service/appsync/api_op_StartSchemaCreation.go +++ b/service/appsync/api_op_StartSchemaCreation.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartSchemaCreationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSchemaCreationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_StartSchemaMerge.go b/service/appsync/api_op_StartSchemaMerge.go index c2373a7712e..5577908fd94 100644 --- a/service/appsync/api_op_StartSchemaMerge.go +++ b/service/appsync/api_op_StartSchemaMerge.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartSchemaMergeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSchemaMergeValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_TagResource.go b/service/appsync/api_op_TagResource.go index f1294f28bbf..8084825b849 100644 --- a/service/appsync/api_op_TagResource.go +++ b/service/appsync/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UntagResource.go b/service/appsync/api_op_UntagResource.go index d32dbb1a4e9..5c48ef3d673 100644 --- a/service/appsync/api_op_UntagResource.go +++ b/service/appsync/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateApiCache.go b/service/appsync/api_op_UpdateApiCache.go index 0340d86a325..181ef2ca4bf 100644 --- a/service/appsync/api_op_UpdateApiCache.go +++ b/service/appsync/api_op_UpdateApiCache.go @@ -179,6 +179,9 @@ func (c *Client) addOperationUpdateApiCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateApiKey.go b/service/appsync/api_op_UpdateApiKey.go index ea281d1064b..ebd8e5be196 100644 --- a/service/appsync/api_op_UpdateApiKey.go +++ b/service/appsync/api_op_UpdateApiKey.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateApiKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateDataSource.go b/service/appsync/api_op_UpdateDataSource.go index df385edccdf..2170d5b77f4 100644 --- a/service/appsync/api_op_UpdateDataSource.go +++ b/service/appsync/api_op_UpdateDataSource.go @@ -156,6 +156,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateDomainName.go b/service/appsync/api_op_UpdateDomainName.go index 3debe24682e..d12ab80b387 100644 --- a/service/appsync/api_op_UpdateDomainName.go +++ b/service/appsync/api_op_UpdateDomainName.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateDomainNameMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateFunction.go b/service/appsync/api_op_UpdateFunction.go index 2a294240418..68120787cc9 100644 --- a/service/appsync/api_op_UpdateFunction.go +++ b/service/appsync/api_op_UpdateFunction.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateGraphqlApi.go b/service/appsync/api_op_UpdateGraphqlApi.go index e067fc64137..3b8491dca00 100644 --- a/service/appsync/api_op_UpdateGraphqlApi.go +++ b/service/appsync/api_op_UpdateGraphqlApi.go @@ -175,6 +175,9 @@ func (c *Client) addOperationUpdateGraphqlApiMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGraphqlApiValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateResolver.go b/service/appsync/api_op_UpdateResolver.go index 8d7049436ee..9eb0875e48a 100644 --- a/service/appsync/api_op_UpdateResolver.go +++ b/service/appsync/api_op_UpdateResolver.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateResolverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateSourceApiAssociation.go b/service/appsync/api_op_UpdateSourceApiAssociation.go index 41b80c37fce..934ec18b5f8 100644 --- a/service/appsync/api_op_UpdateSourceApiAssociation.go +++ b/service/appsync/api_op_UpdateSourceApiAssociation.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateSourceApiAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSourceApiAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/appsync/api_op_UpdateType.go b/service/appsync/api_op_UpdateType.go index 78866d92a8e..b720ab080ff 100644 --- a/service/appsync/api_op_UpdateType.go +++ b/service/appsync/api_op_UpdateType.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateTypeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_client.go b/service/apptest/api_client.go index 120e98ce3cd..6f654833a81 100644 --- a/service/apptest/api_client.go +++ b/service/apptest/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/apptest/api_op_CreateTestCase.go b/service/apptest/api_op_CreateTestCase.go index 9147755898a..3d5547b0232 100644 --- a/service/apptest/api_op_CreateTestCase.go +++ b/service/apptest/api_op_CreateTestCase.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateTestCaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTestCaseMiddleware(stack, options); err != nil { return err } diff --git a/service/apptest/api_op_CreateTestConfiguration.go b/service/apptest/api_op_CreateTestConfiguration.go index 614ecbc3b06..bb835b1afc5 100644 --- a/service/apptest/api_op_CreateTestConfiguration.go +++ b/service/apptest/api_op_CreateTestConfiguration.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateTestConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTestConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/apptest/api_op_CreateTestSuite.go b/service/apptest/api_op_CreateTestSuite.go index 4261b2b19d4..b415e102ec5 100644 --- a/service/apptest/api_op_CreateTestSuite.go +++ b/service/apptest/api_op_CreateTestSuite.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateTestSuiteMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTestSuiteMiddleware(stack, options); err != nil { return err } diff --git a/service/apptest/api_op_DeleteTestCase.go b/service/apptest/api_op_DeleteTestCase.go index 88f72ca3388..f4cadd0ab96 100644 --- a/service/apptest/api_op_DeleteTestCase.go +++ b/service/apptest/api_op_DeleteTestCase.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTestCaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTestCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_DeleteTestConfiguration.go b/service/apptest/api_op_DeleteTestConfiguration.go index b5f891bb56d..f8d77699e2c 100644 --- a/service/apptest/api_op_DeleteTestConfiguration.go +++ b/service/apptest/api_op_DeleteTestConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTestConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTestConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_DeleteTestRun.go b/service/apptest/api_op_DeleteTestRun.go index 471106ebcdd..cd44d2d7cff 100644 --- a/service/apptest/api_op_DeleteTestRun.go +++ b/service/apptest/api_op_DeleteTestRun.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTestRunMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTestRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_DeleteTestSuite.go b/service/apptest/api_op_DeleteTestSuite.go index c80d3645849..8fc599c2e88 100644 --- a/service/apptest/api_op_DeleteTestSuite.go +++ b/service/apptest/api_op_DeleteTestSuite.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTestSuiteMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTestSuiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_GetTestCase.go b/service/apptest/api_op_GetTestCase.go index e0f985d818b..36e67f3096b 100644 --- a/service/apptest/api_op_GetTestCase.go +++ b/service/apptest/api_op_GetTestCase.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetTestCaseMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_GetTestConfiguration.go b/service/apptest/api_op_GetTestConfiguration.go index d7e395f2122..a2556d5764d 100644 --- a/service/apptest/api_op_GetTestConfiguration.go +++ b/service/apptest/api_op_GetTestConfiguration.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetTestConfigurationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_GetTestRunStep.go b/service/apptest/api_op_GetTestRunStep.go index 2122371c00c..52798bceedb 100644 --- a/service/apptest/api_op_GetTestRunStep.go +++ b/service/apptest/api_op_GetTestRunStep.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetTestRunStepMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestRunStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_GetTestSuite.go b/service/apptest/api_op_GetTestSuite.go index 42aca00aa5e..37957531a0e 100644 --- a/service/apptest/api_op_GetTestSuite.go +++ b/service/apptest/api_op_GetTestSuite.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetTestSuiteMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestSuiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_ListTagsForResource.go b/service/apptest/api_op_ListTagsForResource.go index 0ff20bf19b4..7f726d84a97 100644 --- a/service/apptest/api_op_ListTagsForResource.go +++ b/service/apptest/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_ListTestCases.go b/service/apptest/api_op_ListTestCases.go index 954d823181d..6815317e3c9 100644 --- a/service/apptest/api_op_ListTestCases.go +++ b/service/apptest/api_op_ListTestCases.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTestCasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTestCases(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListTestCasesMiddlewares(stack *middleware.Stack, o return nil } -// ListTestCasesAPIClient is a client that implements the ListTestCases operation. -type ListTestCasesAPIClient interface { - ListTestCases(context.Context, *ListTestCasesInput, ...func(*Options)) (*ListTestCasesOutput, error) -} - -var _ ListTestCasesAPIClient = (*Client)(nil) - // ListTestCasesPaginatorOptions is the paginator options for ListTestCases type ListTestCasesPaginatorOptions struct { // The maximum results of the test case. @@ -206,6 +202,9 @@ func (p *ListTestCasesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestCases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListTestCasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListTestCasesAPIClient is a client that implements the ListTestCases operation. +type ListTestCasesAPIClient interface { + ListTestCases(context.Context, *ListTestCasesInput, ...func(*Options)) (*ListTestCasesOutput, error) +} + +var _ ListTestCasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestCases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apptest/api_op_ListTestConfigurations.go b/service/apptest/api_op_ListTestConfigurations.go index 63287451430..b47bf15ba6d 100644 --- a/service/apptest/api_op_ListTestConfigurations.go +++ b/service/apptest/api_op_ListTestConfigurations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTestConfigurationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTestConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListTestConfigurationsMiddlewares(stack *middleware return nil } -// ListTestConfigurationsAPIClient is a client that implements the -// ListTestConfigurations operation. -type ListTestConfigurationsAPIClient interface { - ListTestConfigurations(context.Context, *ListTestConfigurationsInput, ...func(*Options)) (*ListTestConfigurationsOutput, error) -} - -var _ ListTestConfigurationsAPIClient = (*Client)(nil) - // ListTestConfigurationsPaginatorOptions is the paginator options for // ListTestConfigurations type ListTestConfigurationsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListTestConfigurationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListTestConfigurationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListTestConfigurationsAPIClient is a client that implements the +// ListTestConfigurations operation. +type ListTestConfigurationsAPIClient interface { + ListTestConfigurations(context.Context, *ListTestConfigurationsInput, ...func(*Options)) (*ListTestConfigurationsOutput, error) +} + +var _ ListTestConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apptest/api_op_ListTestRunSteps.go b/service/apptest/api_op_ListTestRunSteps.go index ad874de4af4..da5a5ad2a80 100644 --- a/service/apptest/api_op_ListTestRunSteps.go +++ b/service/apptest/api_op_ListTestRunSteps.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTestRunStepsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestRunStepsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListTestRunStepsMiddlewares(stack *middleware.Stack return nil } -// ListTestRunStepsAPIClient is a client that implements the ListTestRunSteps -// operation. -type ListTestRunStepsAPIClient interface { - ListTestRunSteps(context.Context, *ListTestRunStepsInput, ...func(*Options)) (*ListTestRunStepsOutput, error) -} - -var _ ListTestRunStepsAPIClient = (*Client)(nil) - // ListTestRunStepsPaginatorOptions is the paginator options for ListTestRunSteps type ListTestRunStepsPaginatorOptions struct { // The maximum number of test run steps to return in one page of results. @@ -218,6 +213,9 @@ func (p *ListTestRunStepsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestRunSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListTestRunStepsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTestRunStepsAPIClient is a client that implements the ListTestRunSteps +// operation. +type ListTestRunStepsAPIClient interface { + ListTestRunSteps(context.Context, *ListTestRunStepsInput, ...func(*Options)) (*ListTestRunStepsOutput, error) +} + +var _ ListTestRunStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestRunSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apptest/api_op_ListTestRunTestCases.go b/service/apptest/api_op_ListTestRunTestCases.go index 7336511c2d9..f63a5c6dbbb 100644 --- a/service/apptest/api_op_ListTestRunTestCases.go +++ b/service/apptest/api_op_ListTestRunTestCases.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTestRunTestCasesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestRunTestCasesValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTestRunTestCasesMiddlewares(stack *middleware.S return nil } -// ListTestRunTestCasesAPIClient is a client that implements the -// ListTestRunTestCases operation. -type ListTestRunTestCasesAPIClient interface { - ListTestRunTestCases(context.Context, *ListTestRunTestCasesInput, ...func(*Options)) (*ListTestRunTestCasesOutput, error) -} - -var _ ListTestRunTestCasesAPIClient = (*Client)(nil) - // ListTestRunTestCasesPaginatorOptions is the paginator options for // ListTestRunTestCases type ListTestRunTestCasesPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListTestRunTestCasesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestRunTestCases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListTestRunTestCasesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTestRunTestCasesAPIClient is a client that implements the +// ListTestRunTestCases operation. +type ListTestRunTestCasesAPIClient interface { + ListTestRunTestCases(context.Context, *ListTestRunTestCasesInput, ...func(*Options)) (*ListTestRunTestCasesOutput, error) +} + +var _ ListTestRunTestCasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestRunTestCases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apptest/api_op_ListTestRuns.go b/service/apptest/api_op_ListTestRuns.go index f9b7999a931..8f92ef8197f 100644 --- a/service/apptest/api_op_ListTestRuns.go +++ b/service/apptest/api_op_ListTestRuns.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListTestRunsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTestRuns(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListTestRunsMiddlewares(stack *middleware.Stack, op return nil } -// ListTestRunsAPIClient is a client that implements the ListTestRuns operation. -type ListTestRunsAPIClient interface { - ListTestRuns(context.Context, *ListTestRunsInput, ...func(*Options)) (*ListTestRunsOutput, error) -} - -var _ ListTestRunsAPIClient = (*Client)(nil) - // ListTestRunsPaginatorOptions is the paginator options for ListTestRuns type ListTestRunsPaginatorOptions struct { // The maximum number of test runs to return in one page of results. @@ -210,6 +206,9 @@ func (p *ListTestRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListTestRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListTestRunsAPIClient is a client that implements the ListTestRuns operation. +type ListTestRunsAPIClient interface { + ListTestRuns(context.Context, *ListTestRunsInput, ...func(*Options)) (*ListTestRunsOutput, error) +} + +var _ ListTestRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apptest/api_op_ListTestSuites.go b/service/apptest/api_op_ListTestSuites.go index 4ebfa9ccb86..376c0021a01 100644 --- a/service/apptest/api_op_ListTestSuites.go +++ b/service/apptest/api_op_ListTestSuites.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTestSuitesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTestSuites(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListTestSuitesMiddlewares(stack *middleware.Stack, return nil } -// ListTestSuitesAPIClient is a client that implements the ListTestSuites -// operation. -type ListTestSuitesAPIClient interface { - ListTestSuites(context.Context, *ListTestSuitesInput, ...func(*Options)) (*ListTestSuitesOutput, error) -} - -var _ ListTestSuitesAPIClient = (*Client)(nil) - // ListTestSuitesPaginatorOptions is the paginator options for ListTestSuites type ListTestSuitesPaginatorOptions struct { // The maximum number of test suites to return in one page of results. @@ -208,6 +203,9 @@ func (p *ListTestSuitesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestSuites(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListTestSuitesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListTestSuitesAPIClient is a client that implements the ListTestSuites +// operation. +type ListTestSuitesAPIClient interface { + ListTestSuites(context.Context, *ListTestSuitesInput, ...func(*Options)) (*ListTestSuitesOutput, error) +} + +var _ ListTestSuitesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestSuites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/apptest/api_op_StartTestRun.go b/service/apptest/api_op_StartTestRun.go index 68abd5704c3..c6d18861d53 100644 --- a/service/apptest/api_op_StartTestRun.go +++ b/service/apptest/api_op_StartTestRun.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStartTestRunMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartTestRunMiddleware(stack, options); err != nil { return err } diff --git a/service/apptest/api_op_TagResource.go b/service/apptest/api_op_TagResource.go index cd9aaf535b0..aa41e9d5093 100644 --- a/service/apptest/api_op_TagResource.go +++ b/service/apptest/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_UntagResource.go b/service/apptest/api_op_UntagResource.go index 685ce01f21b..a223dfdb202 100644 --- a/service/apptest/api_op_UntagResource.go +++ b/service/apptest/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_UpdateTestCase.go b/service/apptest/api_op_UpdateTestCase.go index ed9d3fc53dd..443dc9def15 100644 --- a/service/apptest/api_op_UpdateTestCase.go +++ b/service/apptest/api_op_UpdateTestCase.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateTestCaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTestCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_UpdateTestConfiguration.go b/service/apptest/api_op_UpdateTestConfiguration.go index 8fb25f567d8..0d049542eae 100644 --- a/service/apptest/api_op_UpdateTestConfiguration.go +++ b/service/apptest/api_op_UpdateTestConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateTestConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTestConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/apptest/api_op_UpdateTestSuite.go b/service/apptest/api_op_UpdateTestSuite.go index 4856e0a26ae..7a43f616a8c 100644 --- a/service/apptest/api_op_UpdateTestSuite.go +++ b/service/apptest/api_op_UpdateTestSuite.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateTestSuiteMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTestSuiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_client.go b/service/arczonalshift/api_client.go index 5e8f9b18737..7f7ac32f919 100644 --- a/service/arczonalshift/api_client.go +++ b/service/arczonalshift/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/arczonalshift/api_op_CancelZonalShift.go b/service/arczonalshift/api_op_CancelZonalShift.go index b24ea3bd01c..80cdddd822b 100644 --- a/service/arczonalshift/api_op_CancelZonalShift.go +++ b/service/arczonalshift/api_op_CancelZonalShift.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCancelZonalShiftMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelZonalShiftValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go b/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go index 8f83ef7727a..d23e592b5f4 100644 --- a/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go +++ b/service/arczonalshift/api_op_CreatePracticeRunConfiguration.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreatePracticeRunConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePracticeRunConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go b/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go index 760ff2748a7..1b336b0da1a 100644 --- a/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go +++ b/service/arczonalshift/api_op_DeletePracticeRunConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeletePracticeRunConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePracticeRunConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_GetManagedResource.go b/service/arczonalshift/api_op_GetManagedResource.go index 5105d160a78..e8b4d92ea7b 100644 --- a/service/arczonalshift/api_op_GetManagedResource.go +++ b/service/arczonalshift/api_op_GetManagedResource.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetManagedResourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetManagedResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_ListAutoshifts.go b/service/arczonalshift/api_op_ListAutoshifts.go index ffe02212743..8fcf92a2b4c 100644 --- a/service/arczonalshift/api_op_ListAutoshifts.go +++ b/service/arczonalshift/api_op_ListAutoshifts.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAutoshiftsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutoshifts(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListAutoshiftsMiddlewares(stack *middleware.Stack, return nil } -// ListAutoshiftsAPIClient is a client that implements the ListAutoshifts -// operation. -type ListAutoshiftsAPIClient interface { - ListAutoshifts(context.Context, *ListAutoshiftsInput, ...func(*Options)) (*ListAutoshiftsOutput, error) -} - -var _ ListAutoshiftsAPIClient = (*Client)(nil) - // ListAutoshiftsPaginatorOptions is the paginator options for ListAutoshifts type ListAutoshiftsPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -211,6 +206,9 @@ func (p *ListAutoshiftsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAutoshifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListAutoshiftsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAutoshiftsAPIClient is a client that implements the ListAutoshifts +// operation. +type ListAutoshiftsAPIClient interface { + ListAutoshifts(context.Context, *ListAutoshiftsInput, ...func(*Options)) (*ListAutoshiftsOutput, error) +} + +var _ ListAutoshiftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAutoshifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/arczonalshift/api_op_ListManagedResources.go b/service/arczonalshift/api_op_ListManagedResources.go index b219b109211..ffb014d8661 100644 --- a/service/arczonalshift/api_op_ListManagedResources.go +++ b/service/arczonalshift/api_op_ListManagedResources.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListManagedResourcesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedResources(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListManagedResourcesMiddlewares(stack *middleware.S return nil } -// ListManagedResourcesAPIClient is a client that implements the -// ListManagedResources operation. -type ListManagedResourcesAPIClient interface { - ListManagedResources(context.Context, *ListManagedResourcesInput, ...func(*Options)) (*ListManagedResourcesOutput, error) -} - -var _ ListManagedResourcesAPIClient = (*Client)(nil) - // ListManagedResourcesPaginatorOptions is the paginator options for // ListManagedResources type ListManagedResourcesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListManagedResourcesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListManagedResourcesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListManagedResourcesAPIClient is a client that implements the +// ListManagedResources operation. +type ListManagedResourcesAPIClient interface { + ListManagedResources(context.Context, *ListManagedResourcesInput, ...func(*Options)) (*ListManagedResourcesOutput, error) +} + +var _ ListManagedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/arczonalshift/api_op_ListZonalShifts.go b/service/arczonalshift/api_op_ListZonalShifts.go index a95a8c8738f..bc250eb2c5c 100644 --- a/service/arczonalshift/api_op_ListZonalShifts.go +++ b/service/arczonalshift/api_op_ListZonalShifts.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListZonalShiftsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListZonalShifts(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListZonalShiftsMiddlewares(stack *middleware.Stack, return nil } -// ListZonalShiftsAPIClient is a client that implements the ListZonalShifts -// operation. -type ListZonalShiftsAPIClient interface { - ListZonalShifts(context.Context, *ListZonalShiftsInput, ...func(*Options)) (*ListZonalShiftsOutput, error) -} - -var _ ListZonalShiftsAPIClient = (*Client)(nil) - // ListZonalShiftsPaginatorOptions is the paginator options for ListZonalShifts type ListZonalShiftsPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -232,6 +227,9 @@ func (p *ListZonalShiftsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListZonalShifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListZonalShiftsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListZonalShiftsAPIClient is a client that implements the ListZonalShifts +// operation. +type ListZonalShiftsAPIClient interface { + ListZonalShifts(context.Context, *ListZonalShiftsInput, ...func(*Options)) (*ListZonalShiftsOutput, error) +} + +var _ ListZonalShiftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListZonalShifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/arczonalshift/api_op_StartZonalShift.go b/service/arczonalshift/api_op_StartZonalShift.go index 83248b4a166..27373a6bd62 100644 --- a/service/arczonalshift/api_op_StartZonalShift.go +++ b/service/arczonalshift/api_op_StartZonalShift.go @@ -225,6 +225,9 @@ func (c *Client) addOperationStartZonalShiftMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartZonalShiftValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go b/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go index 90d38bd5026..77827a27a78 100644 --- a/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go +++ b/service/arczonalshift/api_op_UpdatePracticeRunConfiguration.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdatePracticeRunConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePracticeRunConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go b/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go index 924920c6aaa..40d99260d39 100644 --- a/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go +++ b/service/arczonalshift/api_op_UpdateZonalAutoshiftConfiguration.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateZonalAutoshiftConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateZonalAutoshiftConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/arczonalshift/api_op_UpdateZonalShift.go b/service/arczonalshift/api_op_UpdateZonalShift.go index 280ac70a5e0..b7b645aa5db 100644 --- a/service/arczonalshift/api_op_UpdateZonalShift.go +++ b/service/arczonalshift/api_op_UpdateZonalShift.go @@ -192,6 +192,9 @@ func (c *Client) addOperationUpdateZonalShiftMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateZonalShiftValidationMiddleware(stack); err != nil { return err } diff --git a/service/artifact/api_client.go b/service/artifact/api_client.go index 7a282569b99..0a64cab452e 100644 --- a/service/artifact/api_client.go +++ b/service/artifact/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/artifact/api_op_GetAccountSettings.go b/service/artifact/api_op_GetAccountSettings.go index 545d7bd0e04..75ce9469c44 100644 --- a/service/artifact/api_op_GetAccountSettings.go +++ b/service/artifact/api_op_GetAccountSettings.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/artifact/api_op_GetReport.go b/service/artifact/api_op_GetReport.go index 59752e93d38..946a51a4108 100644 --- a/service/artifact/api_op_GetReport.go +++ b/service/artifact/api_op_GetReport.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetReportMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/artifact/api_op_GetReportMetadata.go b/service/artifact/api_op_GetReportMetadata.go index 66493524293..a72cd28769f 100644 --- a/service/artifact/api_op_GetReportMetadata.go +++ b/service/artifact/api_op_GetReportMetadata.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetReportMetadataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReportMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/artifact/api_op_GetTermForReport.go b/service/artifact/api_op_GetTermForReport.go index 10a06e442f3..3b7c32c3884 100644 --- a/service/artifact/api_op_GetTermForReport.go +++ b/service/artifact/api_op_GetTermForReport.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetTermForReportMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTermForReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/artifact/api_op_ListReports.go b/service/artifact/api_op_ListReports.go index 1e49fe5c392..569618cc169 100644 --- a/service/artifact/api_op_ListReports.go +++ b/service/artifact/api_op_ListReports.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListReportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReports(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListReportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListReportsAPIClient is a client that implements the ListReports operation. -type ListReportsAPIClient interface { - ListReports(context.Context, *ListReportsInput, ...func(*Options)) (*ListReportsOutput, error) -} - -var _ ListReportsAPIClient = (*Client)(nil) - // ListReportsPaginatorOptions is the paginator options for ListReports type ListReportsPaginatorOptions struct { // Maximum number of resources to return in the paginated response. @@ -201,6 +197,9 @@ func (p *ListReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListReportsAPIClient is a client that implements the ListReports operation. +type ListReportsAPIClient interface { + ListReports(context.Context, *ListReportsInput, ...func(*Options)) (*ListReportsOutput, error) +} + +var _ ListReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/artifact/api_op_PutAccountSettings.go b/service/artifact/api_op_PutAccountSettings.go index 4ec99640745..f67273b25cf 100644 --- a/service/artifact/api_op_PutAccountSettings.go +++ b/service/artifact/api_op_PutAccountSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationPutAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/athena/api_client.go b/service/athena/api_client.go index 727f20e4e02..13c73cb331b 100644 --- a/service/athena/api_client.go +++ b/service/athena/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/athena/api_op_BatchGetNamedQuery.go b/service/athena/api_op_BatchGetNamedQuery.go index 85378bab8d5..fb2ccbdd5a4 100644 --- a/service/athena/api_op_BatchGetNamedQuery.go +++ b/service/athena/api_op_BatchGetNamedQuery.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchGetNamedQueryMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetNamedQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_BatchGetPreparedStatement.go b/service/athena/api_op_BatchGetPreparedStatement.go index 92739e943b3..c893f1e6a9e 100644 --- a/service/athena/api_op_BatchGetPreparedStatement.go +++ b/service/athena/api_op_BatchGetPreparedStatement.go @@ -119,6 +119,9 @@ func (c *Client) addOperationBatchGetPreparedStatementMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetPreparedStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_BatchGetQueryExecution.go b/service/athena/api_op_BatchGetQueryExecution.go index 24e13d41c76..981ed0c7ced 100644 --- a/service/athena/api_op_BatchGetQueryExecution.go +++ b/service/athena/api_op_BatchGetQueryExecution.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchGetQueryExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetQueryExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CancelCapacityReservation.go b/service/athena/api_op_CancelCapacityReservation.go index 44d8092b10f..bb497ddcf0f 100644 --- a/service/athena/api_op_CancelCapacityReservation.go +++ b/service/athena/api_op_CancelCapacityReservation.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCancelCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CreateCapacityReservation.go b/service/athena/api_op_CreateCapacityReservation.go index b5f9a7223be..e6158f52f75 100644 --- a/service/athena/api_op_CreateCapacityReservation.go +++ b/service/athena/api_op_CreateCapacityReservation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CreateDataCatalog.go b/service/athena/api_op_CreateDataCatalog.go index 92ded12081b..92c3b241226 100644 --- a/service/athena/api_op_CreateDataCatalog.go +++ b/service/athena/api_op_CreateDataCatalog.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateDataCatalogMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CreateNamedQuery.go b/service/athena/api_op_CreateNamedQuery.go index d39e27cde9b..90a83291372 100644 --- a/service/athena/api_op_CreateNamedQuery.go +++ b/service/athena/api_op_CreateNamedQuery.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateNamedQueryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNamedQueryMiddleware(stack, options); err != nil { return err } diff --git a/service/athena/api_op_CreateNotebook.go b/service/athena/api_op_CreateNotebook.go index 557b661cbe5..fcc4abbfc68 100644 --- a/service/athena/api_op_CreateNotebook.go +++ b/service/athena/api_op_CreateNotebook.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateNotebookMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNotebookValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CreatePreparedStatement.go b/service/athena/api_op_CreatePreparedStatement.go index 57a3d1373aa..da56fb95994 100644 --- a/service/athena/api_op_CreatePreparedStatement.go +++ b/service/athena/api_op_CreatePreparedStatement.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreatePreparedStatementMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePreparedStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CreatePresignedNotebookUrl.go b/service/athena/api_op_CreatePresignedNotebookUrl.go index 7a88c0a8f45..5e0c278e561 100644 --- a/service/athena/api_op_CreatePresignedNotebookUrl.go +++ b/service/athena/api_op_CreatePresignedNotebookUrl.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreatePresignedNotebookUrlMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePresignedNotebookUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_CreateWorkGroup.go b/service/athena/api_op_CreateWorkGroup.go index 1942b7a19b4..884fa296bce 100644 --- a/service/athena/api_op_CreateWorkGroup.go +++ b/service/athena/api_op_CreateWorkGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateWorkGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_DeleteCapacityReservation.go b/service/athena/api_op_DeleteCapacityReservation.go index 6bea5ad6760..aed14b23f61 100644 --- a/service/athena/api_op_DeleteCapacityReservation.go +++ b/service/athena/api_op_DeleteCapacityReservation.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_DeleteDataCatalog.go b/service/athena/api_op_DeleteDataCatalog.go index aaf602a35ae..0b93cfe39a5 100644 --- a/service/athena/api_op_DeleteDataCatalog.go +++ b/service/athena/api_op_DeleteDataCatalog.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDataCatalogMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_DeleteNamedQuery.go b/service/athena/api_op_DeleteNamedQuery.go index 7a03090bcf5..ca479985761 100644 --- a/service/athena/api_op_DeleteNamedQuery.go +++ b/service/athena/api_op_DeleteNamedQuery.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteNamedQueryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteNamedQueryMiddleware(stack, options); err != nil { return err } diff --git a/service/athena/api_op_DeleteNotebook.go b/service/athena/api_op_DeleteNotebook.go index 70d56e5140d..eaef44180bf 100644 --- a/service/athena/api_op_DeleteNotebook.go +++ b/service/athena/api_op_DeleteNotebook.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteNotebookMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotebookValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_DeletePreparedStatement.go b/service/athena/api_op_DeletePreparedStatement.go index 3fe0f5e57e8..354578dedca 100644 --- a/service/athena/api_op_DeletePreparedStatement.go +++ b/service/athena/api_op_DeletePreparedStatement.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePreparedStatementMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePreparedStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_DeleteWorkGroup.go b/service/athena/api_op_DeleteWorkGroup.go index 611377b0e18..73da431c6ee 100644 --- a/service/athena/api_op_DeleteWorkGroup.go +++ b/service/athena/api_op_DeleteWorkGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteWorkGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_ExportNotebook.go b/service/athena/api_op_ExportNotebook.go index 93a5dc22afd..4e9aa6010e7 100644 --- a/service/athena/api_op_ExportNotebook.go +++ b/service/athena/api_op_ExportNotebook.go @@ -109,6 +109,9 @@ func (c *Client) addOperationExportNotebookMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportNotebookValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetCalculationExecution.go b/service/athena/api_op_GetCalculationExecution.go index 7aad9e92aae..2941d4f089a 100644 --- a/service/athena/api_op_GetCalculationExecution.go +++ b/service/athena/api_op_GetCalculationExecution.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetCalculationExecutionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCalculationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetCalculationExecutionCode.go b/service/athena/api_op_GetCalculationExecutionCode.go index 410990c8f68..46a4cd16512 100644 --- a/service/athena/api_op_GetCalculationExecutionCode.go +++ b/service/athena/api_op_GetCalculationExecutionCode.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetCalculationExecutionCodeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCalculationExecutionCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetCalculationExecutionStatus.go b/service/athena/api_op_GetCalculationExecutionStatus.go index 81966c92e6e..ef5bea796f2 100644 --- a/service/athena/api_op_GetCalculationExecutionStatus.go +++ b/service/athena/api_op_GetCalculationExecutionStatus.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetCalculationExecutionStatusMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCalculationExecutionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetCapacityAssignmentConfiguration.go b/service/athena/api_op_GetCapacityAssignmentConfiguration.go index c611b3903f6..c1265be573f 100644 --- a/service/athena/api_op_GetCapacityAssignmentConfiguration.go +++ b/service/athena/api_op_GetCapacityAssignmentConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCapacityAssignmentConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCapacityAssignmentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetCapacityReservation.go b/service/athena/api_op_GetCapacityReservation.go index 227614ca593..411a543ca39 100644 --- a/service/athena/api_op_GetCapacityReservation.go +++ b/service/athena/api_op_GetCapacityReservation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetCapacityReservationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetDataCatalog.go b/service/athena/api_op_GetDataCatalog.go index a2fadba70d0..5ec866164f9 100644 --- a/service/athena/api_op_GetDataCatalog.go +++ b/service/athena/api_op_GetDataCatalog.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetDataCatalogMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetDatabase.go b/service/athena/api_op_GetDatabase.go index e30efab9537..b2ddd7bf9c0 100644 --- a/service/athena/api_op_GetDatabase.go +++ b/service/athena/api_op_GetDatabase.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetDatabaseMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetNamedQuery.go b/service/athena/api_op_GetNamedQuery.go index ed7dcd72bcd..76278deca30 100644 --- a/service/athena/api_op_GetNamedQuery.go +++ b/service/athena/api_op_GetNamedQuery.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetNamedQueryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNamedQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetNotebookMetadata.go b/service/athena/api_op_GetNotebookMetadata.go index bce0ef9225b..733daf8ac03 100644 --- a/service/athena/api_op_GetNotebookMetadata.go +++ b/service/athena/api_op_GetNotebookMetadata.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetNotebookMetadataMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNotebookMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetPreparedStatement.go b/service/athena/api_op_GetPreparedStatement.go index 77049c692fb..83802d83f7d 100644 --- a/service/athena/api_op_GetPreparedStatement.go +++ b/service/athena/api_op_GetPreparedStatement.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetPreparedStatementMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPreparedStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetQueryExecution.go b/service/athena/api_op_GetQueryExecution.go index 1197e46217e..778e4447f11 100644 --- a/service/athena/api_op_GetQueryExecution.go +++ b/service/athena/api_op_GetQueryExecution.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetQueryExecutionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetQueryResults.go b/service/athena/api_op_GetQueryResults.go index b9537015c4d..7a235d6f642 100644 --- a/service/athena/api_op_GetQueryResults.go +++ b/service/athena/api_op_GetQueryResults.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryResultsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, return nil } -// GetQueryResultsAPIClient is a client that implements the GetQueryResults -// operation. -type GetQueryResultsAPIClient interface { - GetQueryResults(context.Context, *GetQueryResultsInput, ...func(*Options)) (*GetQueryResultsOutput, error) -} - -var _ GetQueryResultsAPIClient = (*Client)(nil) - // GetQueryResultsPaginatorOptions is the paginator options for GetQueryResults type GetQueryResultsPaginatorOptions struct { // The maximum number of results (rows) to return in this request. @@ -232,6 +227,9 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetQueryResults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetQueryResultsAPIClient is a client that implements the GetQueryResults +// operation. +type GetQueryResultsAPIClient interface { + GetQueryResults(context.Context, *GetQueryResultsInput, ...func(*Options)) (*GetQueryResultsOutput, error) +} + +var _ GetQueryResultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetQueryResults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_GetQueryRuntimeStatistics.go b/service/athena/api_op_GetQueryRuntimeStatistics.go index cd094ba1238..0dde964c2dd 100644 --- a/service/athena/api_op_GetQueryRuntimeStatistics.go +++ b/service/athena/api_op_GetQueryRuntimeStatistics.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetQueryRuntimeStatisticsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryRuntimeStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetSession.go b/service/athena/api_op_GetSession.go index bdc40daff08..f32e406e8c9 100644 --- a/service/athena/api_op_GetSession.go +++ b/service/athena/api_op_GetSession.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetSessionStatus.go b/service/athena/api_op_GetSessionStatus.go index a01bc7b2950..7996b704c06 100644 --- a/service/athena/api_op_GetSessionStatus.go +++ b/service/athena/api_op_GetSessionStatus.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetSessionStatusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetTableMetadata.go b/service/athena/api_op_GetTableMetadata.go index 2d3cdc63e05..07421b0722b 100644 --- a/service/athena/api_op_GetTableMetadata.go +++ b/service/athena/api_op_GetTableMetadata.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetTableMetadataMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_GetWorkGroup.go b/service/athena/api_op_GetWorkGroup.go index 12557f1cf5a..13e62e9890a 100644 --- a/service/athena/api_op_GetWorkGroup.go +++ b/service/athena/api_op_GetWorkGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetWorkGroupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_ImportNotebook.go b/service/athena/api_op_ImportNotebook.go index 88d9d78857d..08d1184446d 100644 --- a/service/athena/api_op_ImportNotebook.go +++ b/service/athena/api_op_ImportNotebook.go @@ -136,6 +136,9 @@ func (c *Client) addOperationImportNotebookMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportNotebookValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_ListApplicationDPUSizes.go b/service/athena/api_op_ListApplicationDPUSizes.go index 7efc911d91c..d4b3ae60abd 100644 --- a/service/athena/api_op_ListApplicationDPUSizes.go +++ b/service/athena/api_op_ListApplicationDPUSizes.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListApplicationDPUSizesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationDPUSizes(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListApplicationDPUSizesMiddlewares(stack *middlewar return nil } -// ListApplicationDPUSizesAPIClient is a client that implements the -// ListApplicationDPUSizes operation. -type ListApplicationDPUSizesAPIClient interface { - ListApplicationDPUSizes(context.Context, *ListApplicationDPUSizesInput, ...func(*Options)) (*ListApplicationDPUSizesOutput, error) -} - -var _ ListApplicationDPUSizesAPIClient = (*Client)(nil) - // ListApplicationDPUSizesPaginatorOptions is the paginator options for // ListApplicationDPUSizes type ListApplicationDPUSizesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListApplicationDPUSizesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationDPUSizes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListApplicationDPUSizesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationDPUSizesAPIClient is a client that implements the +// ListApplicationDPUSizes operation. +type ListApplicationDPUSizesAPIClient interface { + ListApplicationDPUSizes(context.Context, *ListApplicationDPUSizesInput, ...func(*Options)) (*ListApplicationDPUSizesOutput, error) +} + +var _ ListApplicationDPUSizesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationDPUSizes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListCalculationExecutions.go b/service/athena/api_op_ListCalculationExecutions.go index e8364fc768f..42c47b257ca 100644 --- a/service/athena/api_op_ListCalculationExecutions.go +++ b/service/athena/api_op_ListCalculationExecutions.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListCalculationExecutionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCalculationExecutionsValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListCalculationExecutionsMiddlewares(stack *middlew return nil } -// ListCalculationExecutionsAPIClient is a client that implements the -// ListCalculationExecutions operation. -type ListCalculationExecutionsAPIClient interface { - ListCalculationExecutions(context.Context, *ListCalculationExecutionsInput, ...func(*Options)) (*ListCalculationExecutionsOutput, error) -} - -var _ ListCalculationExecutionsAPIClient = (*Client)(nil) - // ListCalculationExecutionsPaginatorOptions is the paginator options for // ListCalculationExecutions type ListCalculationExecutionsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListCalculationExecutionsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCalculationExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListCalculationExecutionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListCalculationExecutionsAPIClient is a client that implements the +// ListCalculationExecutions operation. +type ListCalculationExecutionsAPIClient interface { + ListCalculationExecutions(context.Context, *ListCalculationExecutionsInput, ...func(*Options)) (*ListCalculationExecutionsOutput, error) +} + +var _ ListCalculationExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCalculationExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListCapacityReservations.go b/service/athena/api_op_ListCapacityReservations.go index f9b0efe3aac..c703e721868 100644 --- a/service/athena/api_op_ListCapacityReservations.go +++ b/service/athena/api_op_ListCapacityReservations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListCapacityReservationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCapacityReservations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListCapacityReservationsMiddlewares(stack *middlewa return nil } -// ListCapacityReservationsAPIClient is a client that implements the -// ListCapacityReservations operation. -type ListCapacityReservationsAPIClient interface { - ListCapacityReservations(context.Context, *ListCapacityReservationsInput, ...func(*Options)) (*ListCapacityReservationsOutput, error) -} - -var _ ListCapacityReservationsAPIClient = (*Client)(nil) - // ListCapacityReservationsPaginatorOptions is the paginator options for // ListCapacityReservations type ListCapacityReservationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListCapacityReservationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCapacityReservations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListCapacityReservationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListCapacityReservationsAPIClient is a client that implements the +// ListCapacityReservations operation. +type ListCapacityReservationsAPIClient interface { + ListCapacityReservations(context.Context, *ListCapacityReservationsInput, ...func(*Options)) (*ListCapacityReservationsOutput, error) +} + +var _ ListCapacityReservationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCapacityReservations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListDataCatalogs.go b/service/athena/api_op_ListDataCatalogs.go index 52ec89c19cd..50ee4aa5b2a 100644 --- a/service/athena/api_op_ListDataCatalogs.go +++ b/service/athena/api_op_ListDataCatalogs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDataCatalogsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataCatalogs(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListDataCatalogsMiddlewares(stack *middleware.Stack return nil } -// ListDataCatalogsAPIClient is a client that implements the ListDataCatalogs -// operation. -type ListDataCatalogsAPIClient interface { - ListDataCatalogs(context.Context, *ListDataCatalogsInput, ...func(*Options)) (*ListDataCatalogsOutput, error) -} - -var _ ListDataCatalogsAPIClient = (*Client)(nil) - // ListDataCatalogsPaginatorOptions is the paginator options for ListDataCatalogs type ListDataCatalogsPaginatorOptions struct { // Specifies the maximum number of data catalogs to return. @@ -212,6 +207,9 @@ func (p *ListDataCatalogsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataCatalogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListDataCatalogsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListDataCatalogsAPIClient is a client that implements the ListDataCatalogs +// operation. +type ListDataCatalogsAPIClient interface { + ListDataCatalogs(context.Context, *ListDataCatalogsInput, ...func(*Options)) (*ListDataCatalogsOutput, error) +} + +var _ ListDataCatalogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataCatalogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListDatabases.go b/service/athena/api_op_ListDatabases.go index ff03587fac3..05bf0ae889b 100644 --- a/service/athena/api_op_ListDatabases.go +++ b/service/athena/api_op_ListDatabases.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatabasesValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o return nil } -// ListDatabasesAPIClient is a client that implements the ListDatabases operation. -type ListDatabasesAPIClient interface { - ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) -} - -var _ ListDatabasesAPIClient = (*Client)(nil) - // ListDatabasesPaginatorOptions is the paginator options for ListDatabases type ListDatabasesPaginatorOptions struct { // Specifies the maximum number of results to return. @@ -217,6 +213,9 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDatabasesAPIClient is a client that implements the ListDatabases operation. +type ListDatabasesAPIClient interface { + ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) +} + +var _ ListDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListEngineVersions.go b/service/athena/api_op_ListEngineVersions.go index 349864ac964..dfa6e1e6a6b 100644 --- a/service/athena/api_op_ListEngineVersions.go +++ b/service/athena/api_op_ListEngineVersions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEngineVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngineVersions(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEngineVersionsMiddlewares(stack *middleware.Sta return nil } -// ListEngineVersionsAPIClient is a client that implements the ListEngineVersions -// operation. -type ListEngineVersionsAPIClient interface { - ListEngineVersions(context.Context, *ListEngineVersionsInput, ...func(*Options)) (*ListEngineVersionsOutput, error) -} - -var _ ListEngineVersionsAPIClient = (*Client)(nil) - // ListEngineVersionsPaginatorOptions is the paginator options for // ListEngineVersions type ListEngineVersionsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListEngineVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListEngineVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEngineVersionsAPIClient is a client that implements the ListEngineVersions +// operation. +type ListEngineVersionsAPIClient interface { + ListEngineVersions(context.Context, *ListEngineVersionsInput, ...func(*Options)) (*ListEngineVersionsOutput, error) +} + +var _ ListEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListExecutors.go b/service/athena/api_op_ListExecutors.go index 4d93bb44310..f2c4ab2e427 100644 --- a/service/athena/api_op_ListExecutors.go +++ b/service/athena/api_op_ListExecutors.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListExecutorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExecutorsValidationMiddleware(stack); err != nil { return err } @@ -165,13 +168,6 @@ func (c *Client) addOperationListExecutorsMiddlewares(stack *middleware.Stack, o return nil } -// ListExecutorsAPIClient is a client that implements the ListExecutors operation. -type ListExecutorsAPIClient interface { - ListExecutors(context.Context, *ListExecutorsInput, ...func(*Options)) (*ListExecutorsOutput, error) -} - -var _ ListExecutorsAPIClient = (*Client)(nil) - // ListExecutorsPaginatorOptions is the paginator options for ListExecutors type ListExecutorsPaginatorOptions struct { // The maximum number of executors to return. @@ -235,6 +231,9 @@ func (p *ListExecutorsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExecutors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +253,13 @@ func (p *ListExecutorsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListExecutorsAPIClient is a client that implements the ListExecutors operation. +type ListExecutorsAPIClient interface { + ListExecutors(context.Context, *ListExecutorsInput, ...func(*Options)) (*ListExecutorsOutput, error) +} + +var _ ListExecutorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExecutors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListNamedQueries.go b/service/athena/api_op_ListNamedQueries.go index ef917966e2e..e2892f379d2 100644 --- a/service/athena/api_op_ListNamedQueries.go +++ b/service/athena/api_op_ListNamedQueries.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListNamedQueriesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNamedQueries(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListNamedQueriesMiddlewares(stack *middleware.Stack return nil } -// ListNamedQueriesAPIClient is a client that implements the ListNamedQueries -// operation. -type ListNamedQueriesAPIClient interface { - ListNamedQueries(context.Context, *ListNamedQueriesInput, ...func(*Options)) (*ListNamedQueriesOutput, error) -} - -var _ ListNamedQueriesAPIClient = (*Client)(nil) - // ListNamedQueriesPaginatorOptions is the paginator options for ListNamedQueries type ListNamedQueriesPaginatorOptions struct { // The maximum number of queries to return in this request. @@ -212,6 +207,9 @@ func (p *ListNamedQueriesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNamedQueries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListNamedQueriesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListNamedQueriesAPIClient is a client that implements the ListNamedQueries +// operation. +type ListNamedQueriesAPIClient interface { + ListNamedQueries(context.Context, *ListNamedQueriesInput, ...func(*Options)) (*ListNamedQueriesOutput, error) +} + +var _ ListNamedQueriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNamedQueries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListNotebookMetadata.go b/service/athena/api_op_ListNotebookMetadata.go index a451abcffa4..9359c432459 100644 --- a/service/athena/api_op_ListNotebookMetadata.go +++ b/service/athena/api_op_ListNotebookMetadata.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListNotebookMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNotebookMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_ListNotebookSessions.go b/service/athena/api_op_ListNotebookSessions.go index 321db55598d..b30aff6bcde 100644 --- a/service/athena/api_op_ListNotebookSessions.go +++ b/service/athena/api_op_ListNotebookSessions.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListNotebookSessionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNotebookSessionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_ListPreparedStatements.go b/service/athena/api_op_ListPreparedStatements.go index cff4250ec7f..91d3fb1261f 100644 --- a/service/athena/api_op_ListPreparedStatements.go +++ b/service/athena/api_op_ListPreparedStatements.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPreparedStatementsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPreparedStatementsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPreparedStatementsMiddlewares(stack *middleware return nil } -// ListPreparedStatementsAPIClient is a client that implements the -// ListPreparedStatements operation. -type ListPreparedStatementsAPIClient interface { - ListPreparedStatements(context.Context, *ListPreparedStatementsInput, ...func(*Options)) (*ListPreparedStatementsOutput, error) -} - -var _ ListPreparedStatementsAPIClient = (*Client)(nil) - // ListPreparedStatementsPaginatorOptions is the paginator options for // ListPreparedStatements type ListPreparedStatementsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListPreparedStatementsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPreparedStatements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListPreparedStatementsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListPreparedStatementsAPIClient is a client that implements the +// ListPreparedStatements operation. +type ListPreparedStatementsAPIClient interface { + ListPreparedStatements(context.Context, *ListPreparedStatementsInput, ...func(*Options)) (*ListPreparedStatementsOutput, error) +} + +var _ ListPreparedStatementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPreparedStatements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListQueryExecutions.go b/service/athena/api_op_ListQueryExecutions.go index 83265d5d939..46b7da8d573 100644 --- a/service/athena/api_op_ListQueryExecutions.go +++ b/service/athena/api_op_ListQueryExecutions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListQueryExecutionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueryExecutions(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListQueryExecutionsMiddlewares(stack *middleware.St return nil } -// ListQueryExecutionsAPIClient is a client that implements the -// ListQueryExecutions operation. -type ListQueryExecutionsAPIClient interface { - ListQueryExecutions(context.Context, *ListQueryExecutionsInput, ...func(*Options)) (*ListQueryExecutionsOutput, error) -} - -var _ ListQueryExecutionsAPIClient = (*Client)(nil) - // ListQueryExecutionsPaginatorOptions is the paginator options for // ListQueryExecutions type ListQueryExecutionsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListQueryExecutionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueryExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListQueryExecutionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListQueryExecutionsAPIClient is a client that implements the +// ListQueryExecutions operation. +type ListQueryExecutionsAPIClient interface { + ListQueryExecutions(context.Context, *ListQueryExecutionsInput, ...func(*Options)) (*ListQueryExecutionsOutput, error) +} + +var _ ListQueryExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueryExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListSessions.go b/service/athena/api_op_ListSessions.go index eb9a22d2115..922581d114b 100644 --- a/service/athena/api_op_ListSessions.go +++ b/service/athena/api_op_ListSessions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSessionsValidationMiddleware(stack); err != nil { return err } @@ -165,13 +168,6 @@ func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, op return nil } -// ListSessionsAPIClient is a client that implements the ListSessions operation. -type ListSessionsAPIClient interface { - ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) -} - -var _ ListSessionsAPIClient = (*Client)(nil) - // ListSessionsPaginatorOptions is the paginator options for ListSessions type ListSessionsPaginatorOptions struct { // The maximum number of sessions to return. @@ -235,6 +231,9 @@ func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +253,13 @@ func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSessionsAPIClient is a client that implements the ListSessions operation. +type ListSessionsAPIClient interface { + ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) +} + +var _ ListSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListTableMetadata.go b/service/athena/api_op_ListTableMetadata.go index 71fa116efe6..cf6ed540bcd 100644 --- a/service/athena/api_op_ListTableMetadata.go +++ b/service/athena/api_op_ListTableMetadata.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListTableMetadataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTableMetadataValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListTableMetadataMiddlewares(stack *middleware.Stac return nil } -// ListTableMetadataAPIClient is a client that implements the ListTableMetadata -// operation. -type ListTableMetadataAPIClient interface { - ListTableMetadata(context.Context, *ListTableMetadataInput, ...func(*Options)) (*ListTableMetadataOutput, error) -} - -var _ ListTableMetadataAPIClient = (*Client)(nil) - // ListTableMetadataPaginatorOptions is the paginator options for ListTableMetadata type ListTableMetadataPaginatorOptions struct { // Specifies the maximum number of results to return. @@ -227,6 +222,9 @@ func (p *ListTableMetadataPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTableMetadata(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListTableMetadataPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListTableMetadataAPIClient is a client that implements the ListTableMetadata +// operation. +type ListTableMetadataAPIClient interface { + ListTableMetadata(context.Context, *ListTableMetadataInput, ...func(*Options)) (*ListTableMetadataOutput, error) +} + +var _ ListTableMetadataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTableMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListTagsForResource.go b/service/athena/api_op_ListTagsForResource.go index ee01ac93304..48c66b9f50f 100644 --- a/service/athena/api_op_ListTagsForResource.go +++ b/service/athena/api_op_ListTagsForResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_ListWorkGroups.go b/service/athena/api_op_ListWorkGroups.go index f37170e0c0e..3109536a42a 100644 --- a/service/athena/api_op_ListWorkGroups.go +++ b/service/athena/api_op_ListWorkGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListWorkGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkGroups(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListWorkGroupsMiddlewares(stack *middleware.Stack, return nil } -// ListWorkGroupsAPIClient is a client that implements the ListWorkGroups -// operation. -type ListWorkGroupsAPIClient interface { - ListWorkGroups(context.Context, *ListWorkGroupsInput, ...func(*Options)) (*ListWorkGroupsOutput, error) -} - -var _ ListWorkGroupsAPIClient = (*Client)(nil) - // ListWorkGroupsPaginatorOptions is the paginator options for ListWorkGroups type ListWorkGroupsPaginatorOptions struct { // The maximum number of workgroups to return in this request. @@ -207,6 +202,9 @@ func (p *ListWorkGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListWorkGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListWorkGroupsAPIClient is a client that implements the ListWorkGroups +// operation. +type ListWorkGroupsAPIClient interface { + ListWorkGroups(context.Context, *ListWorkGroupsInput, ...func(*Options)) (*ListWorkGroupsOutput, error) +} + +var _ ListWorkGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/athena/api_op_PutCapacityAssignmentConfiguration.go b/service/athena/api_op_PutCapacityAssignmentConfiguration.go index 924c41e6a41..5e911c68a8b 100644 --- a/service/athena/api_op_PutCapacityAssignmentConfiguration.go +++ b/service/athena/api_op_PutCapacityAssignmentConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutCapacityAssignmentConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutCapacityAssignmentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_StartCalculationExecution.go b/service/athena/api_op_StartCalculationExecution.go index 8f5c010f432..aa980694ce1 100644 --- a/service/athena/api_op_StartCalculationExecution.go +++ b/service/athena/api_op_StartCalculationExecution.go @@ -153,6 +153,9 @@ func (c *Client) addOperationStartCalculationExecutionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCalculationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_StartQueryExecution.go b/service/athena/api_op_StartQueryExecution.go index eff0ce0598d..b4d779fb8c8 100644 --- a/service/athena/api_op_StartQueryExecution.go +++ b/service/athena/api_op_StartQueryExecution.go @@ -146,6 +146,9 @@ func (c *Client) addOperationStartQueryExecutionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartQueryExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/athena/api_op_StartSession.go b/service/athena/api_op_StartSession.go index e2fa3b8aabc..dccc44d9fa7 100644 --- a/service/athena/api_op_StartSession.go +++ b/service/athena/api_op_StartSession.go @@ -157,6 +157,9 @@ func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_StopCalculationExecution.go b/service/athena/api_op_StopCalculationExecution.go index a8c8083d8b5..5e18ff98d07 100644 --- a/service/athena/api_op_StopCalculationExecution.go +++ b/service/athena/api_op_StopCalculationExecution.go @@ -129,6 +129,9 @@ func (c *Client) addOperationStopCalculationExecutionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCalculationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_StopQueryExecution.go b/service/athena/api_op_StopQueryExecution.go index acfb408433b..73173831c2e 100644 --- a/service/athena/api_op_StopQueryExecution.go +++ b/service/athena/api_op_StopQueryExecution.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStopQueryExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStopQueryExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/athena/api_op_TagResource.go b/service/athena/api_op_TagResource.go index 556d787cee0..12afaed6d05 100644 --- a/service/athena/api_op_TagResource.go +++ b/service/athena/api_op_TagResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_TerminateSession.go b/service/athena/api_op_TerminateSession.go index 9fdf8a757d6..4bf509ece36 100644 --- a/service/athena/api_op_TerminateSession.go +++ b/service/athena/api_op_TerminateSession.go @@ -127,6 +127,9 @@ func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UntagResource.go b/service/athena/api_op_UntagResource.go index b3412aff9e1..cfb343a2a6a 100644 --- a/service/athena/api_op_UntagResource.go +++ b/service/athena/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdateCapacityReservation.go b/service/athena/api_op_UpdateCapacityReservation.go index 7f43af16f9d..df340b1d34d 100644 --- a/service/athena/api_op_UpdateCapacityReservation.go +++ b/service/athena/api_op_UpdateCapacityReservation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdateDataCatalog.go b/service/athena/api_op_UpdateDataCatalog.go index 42a755025d3..3cc08c0b05b 100644 --- a/service/athena/api_op_UpdateDataCatalog.go +++ b/service/athena/api_op_UpdateDataCatalog.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateDataCatalogMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdateNamedQuery.go b/service/athena/api_op_UpdateNamedQuery.go index c8dce4c8f83..32485187951 100644 --- a/service/athena/api_op_UpdateNamedQuery.go +++ b/service/athena/api_op_UpdateNamedQuery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateNamedQueryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNamedQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdateNotebook.go b/service/athena/api_op_UpdateNotebook.go index 1d9fc69ca56..8de214c69a9 100644 --- a/service/athena/api_op_UpdateNotebook.go +++ b/service/athena/api_op_UpdateNotebook.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateNotebookMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotebookValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdateNotebookMetadata.go b/service/athena/api_op_UpdateNotebookMetadata.go index 53eddca4d9f..307d362a19a 100644 --- a/service/athena/api_op_UpdateNotebookMetadata.go +++ b/service/athena/api_op_UpdateNotebookMetadata.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateNotebookMetadataMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotebookMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdatePreparedStatement.go b/service/athena/api_op_UpdatePreparedStatement.go index ccd250d96ef..b7891b8ab43 100644 --- a/service/athena/api_op_UpdatePreparedStatement.go +++ b/service/athena/api_op_UpdatePreparedStatement.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdatePreparedStatementMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePreparedStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/athena/api_op_UpdateWorkGroup.go b/service/athena/api_op_UpdateWorkGroup.go index 636a7bd75f3..b82b88e8fb8 100644 --- a/service/athena/api_op_UpdateWorkGroup.go +++ b/service/athena/api_op_UpdateWorkGroup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateWorkGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_client.go b/service/auditmanager/api_client.go index ac0676437e7..c0c784bcaf5 100644 --- a/service/auditmanager/api_client.go +++ b/service/auditmanager/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/auditmanager/api_op_AssociateAssessmentReportEvidenceFolder.go b/service/auditmanager/api_op_AssociateAssessmentReportEvidenceFolder.go index 73ea40dcda6..ef538685bc7 100644 --- a/service/auditmanager/api_op_AssociateAssessmentReportEvidenceFolder.go +++ b/service/auditmanager/api_op_AssociateAssessmentReportEvidenceFolder.go @@ -108,6 +108,9 @@ func (c *Client) addOperationAssociateAssessmentReportEvidenceFolderMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAssessmentReportEvidenceFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_BatchAssociateAssessmentReportEvidence.go b/service/auditmanager/api_op_BatchAssociateAssessmentReportEvidence.go index 9067bda328e..f1d92fa12b6 100644 --- a/service/auditmanager/api_op_BatchAssociateAssessmentReportEvidence.go +++ b/service/auditmanager/api_op_BatchAssociateAssessmentReportEvidence.go @@ -121,6 +121,9 @@ func (c *Client) addOperationBatchAssociateAssessmentReportEvidenceMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateAssessmentReportEvidenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_BatchCreateDelegationByAssessment.go b/service/auditmanager/api_op_BatchCreateDelegationByAssessment.go index 6094162c1b3..28c1f1c64b6 100644 --- a/service/auditmanager/api_op_BatchCreateDelegationByAssessment.go +++ b/service/auditmanager/api_op_BatchCreateDelegationByAssessment.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchCreateDelegationByAssessmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateDelegationByAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_BatchDeleteDelegationByAssessment.go b/service/auditmanager/api_op_BatchDeleteDelegationByAssessment.go index 5b4cfdfe7dc..e61de89c947 100644 --- a/service/auditmanager/api_op_BatchDeleteDelegationByAssessment.go +++ b/service/auditmanager/api_op_BatchDeleteDelegationByAssessment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchDeleteDelegationByAssessmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteDelegationByAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_BatchDisassociateAssessmentReportEvidence.go b/service/auditmanager/api_op_BatchDisassociateAssessmentReportEvidence.go index 7342679aa71..89e3b2483b7 100644 --- a/service/auditmanager/api_op_BatchDisassociateAssessmentReportEvidence.go +++ b/service/auditmanager/api_op_BatchDisassociateAssessmentReportEvidence.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchDisassociateAssessmentReportEvidenceMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateAssessmentReportEvidenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_BatchImportEvidenceToAssessmentControl.go b/service/auditmanager/api_op_BatchImportEvidenceToAssessmentControl.go index f2a2226067f..befc60c66e8 100644 --- a/service/auditmanager/api_op_BatchImportEvidenceToAssessmentControl.go +++ b/service/auditmanager/api_op_BatchImportEvidenceToAssessmentControl.go @@ -142,6 +142,9 @@ func (c *Client) addOperationBatchImportEvidenceToAssessmentControlMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchImportEvidenceToAssessmentControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_CreateAssessment.go b/service/auditmanager/api_op_CreateAssessment.go index 4b4ff4c0504..4b08c45197c 100644 --- a/service/auditmanager/api_op_CreateAssessment.go +++ b/service/auditmanager/api_op_CreateAssessment.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateAssessmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_CreateAssessmentFramework.go b/service/auditmanager/api_op_CreateAssessmentFramework.go index fad400ace79..948e01a9fc4 100644 --- a/service/auditmanager/api_op_CreateAssessmentFramework.go +++ b/service/auditmanager/api_op_CreateAssessmentFramework.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateAssessmentFrameworkMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssessmentFrameworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_CreateAssessmentReport.go b/service/auditmanager/api_op_CreateAssessmentReport.go index 83b54e29358..a504daec026 100644 --- a/service/auditmanager/api_op_CreateAssessmentReport.go +++ b/service/auditmanager/api_op_CreateAssessmentReport.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateAssessmentReportMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssessmentReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_CreateControl.go b/service/auditmanager/api_op_CreateControl.go index ba10fcde91e..7fee2825d0b 100644 --- a/service/auditmanager/api_op_CreateControl.go +++ b/service/auditmanager/api_op_CreateControl.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateControlMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_DeleteAssessment.go b/service/auditmanager/api_op_DeleteAssessment.go index 6096658e8fb..4767baacb9d 100644 --- a/service/auditmanager/api_op_DeleteAssessment.go +++ b/service/auditmanager/api_op_DeleteAssessment.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAssessmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_DeleteAssessmentFramework.go b/service/auditmanager/api_op_DeleteAssessmentFramework.go index 2644a969947..14e669fc2c7 100644 --- a/service/auditmanager/api_op_DeleteAssessmentFramework.go +++ b/service/auditmanager/api_op_DeleteAssessmentFramework.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAssessmentFrameworkMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentFrameworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_DeleteAssessmentFrameworkShare.go b/service/auditmanager/api_op_DeleteAssessmentFrameworkShare.go index acc85615c8f..96372b6d67a 100644 --- a/service/auditmanager/api_op_DeleteAssessmentFrameworkShare.go +++ b/service/auditmanager/api_op_DeleteAssessmentFrameworkShare.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAssessmentFrameworkShareMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentFrameworkShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_DeleteAssessmentReport.go b/service/auditmanager/api_op_DeleteAssessmentReport.go index 82862461657..46c3e474df0 100644 --- a/service/auditmanager/api_op_DeleteAssessmentReport.go +++ b/service/auditmanager/api_op_DeleteAssessmentReport.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteAssessmentReportMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_DeleteControl.go b/service/auditmanager/api_op_DeleteControl.go index b6867968c3d..b6e7bc16d86 100644 --- a/service/auditmanager/api_op_DeleteControl.go +++ b/service/auditmanager/api_op_DeleteControl.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteControlMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_DeregisterAccount.go b/service/auditmanager/api_op_DeregisterAccount.go index 8942885e7a4..5ee230d4aaa 100644 --- a/service/auditmanager/api_op_DeregisterAccount.go +++ b/service/auditmanager/api_op_DeregisterAccount.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeregisterAccountMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_DeregisterOrganizationAdminAccount.go b/service/auditmanager/api_op_DeregisterOrganizationAdminAccount.go index 417baf02f9a..8b27a5bd768 100644 --- a/service/auditmanager/api_op_DeregisterOrganizationAdminAccount.go +++ b/service/auditmanager/api_op_DeregisterOrganizationAdminAccount.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDeregisterOrganizationAdminAccountMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterOrganizationAdminAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_DisassociateAssessmentReportEvidenceFolder.go b/service/auditmanager/api_op_DisassociateAssessmentReportEvidenceFolder.go index 7bdd0c9c24d..903f61774f3 100644 --- a/service/auditmanager/api_op_DisassociateAssessmentReportEvidenceFolder.go +++ b/service/auditmanager/api_op_DisassociateAssessmentReportEvidenceFolder.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisassociateAssessmentReportEvidenceFolderMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAssessmentReportEvidenceFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetAccountStatus.go b/service/auditmanager/api_op_GetAccountStatus.go index c9006d52900..8282163e1b0 100644 --- a/service/auditmanager/api_op_GetAccountStatus.go +++ b/service/auditmanager/api_op_GetAccountStatus.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetAccountStatusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_GetAssessment.go b/service/auditmanager/api_op_GetAssessment.go index 0790be3cf30..aa36ad3fd31 100644 --- a/service/auditmanager/api_op_GetAssessment.go +++ b/service/auditmanager/api_op_GetAssessment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetAssessmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetAssessmentFramework.go b/service/auditmanager/api_op_GetAssessmentFramework.go index 1983f8acae4..f4de3ba0cd6 100644 --- a/service/auditmanager/api_op_GetAssessmentFramework.go +++ b/service/auditmanager/api_op_GetAssessmentFramework.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAssessmentFrameworkMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssessmentFrameworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetAssessmentReportUrl.go b/service/auditmanager/api_op_GetAssessmentReportUrl.go index 009140d1c45..a2e073abc10 100644 --- a/service/auditmanager/api_op_GetAssessmentReportUrl.go +++ b/service/auditmanager/api_op_GetAssessmentReportUrl.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAssessmentReportUrlMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssessmentReportUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetChangeLogs.go b/service/auditmanager/api_op_GetChangeLogs.go index 6dd2f0350a3..b3700779f7f 100644 --- a/service/auditmanager/api_op_GetChangeLogs.go +++ b/service/auditmanager/api_op_GetChangeLogs.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetChangeLogsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChangeLogsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationGetChangeLogsMiddlewares(stack *middleware.Stack, o return nil } -// GetChangeLogsAPIClient is a client that implements the GetChangeLogs operation. -type GetChangeLogsAPIClient interface { - GetChangeLogs(context.Context, *GetChangeLogsInput, ...func(*Options)) (*GetChangeLogsOutput, error) -} - -var _ GetChangeLogsAPIClient = (*Client)(nil) - // GetChangeLogsPaginatorOptions is the paginator options for GetChangeLogs type GetChangeLogsPaginatorOptions struct { // Represents the maximum number of results on a page or for an API request call. @@ -215,6 +211,9 @@ func (p *GetChangeLogsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetChangeLogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *GetChangeLogsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetChangeLogsAPIClient is a client that implements the GetChangeLogs operation. +type GetChangeLogsAPIClient interface { + GetChangeLogs(context.Context, *GetChangeLogsInput, ...func(*Options)) (*GetChangeLogsOutput, error) +} + +var _ GetChangeLogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetChangeLogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_GetControl.go b/service/auditmanager/api_op_GetControl.go index 38276f947a1..2dd95e8c05c 100644 --- a/service/auditmanager/api_op_GetControl.go +++ b/service/auditmanager/api_op_GetControl.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetControlMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetDelegations.go b/service/auditmanager/api_op_GetDelegations.go index 91351b03d8d..1502fa7056a 100644 --- a/service/auditmanager/api_op_GetDelegations.go +++ b/service/auditmanager/api_op_GetDelegations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetDelegationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelegations(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationGetDelegationsMiddlewares(stack *middleware.Stack, return nil } -// GetDelegationsAPIClient is a client that implements the GetDelegations -// operation. -type GetDelegationsAPIClient interface { - GetDelegations(context.Context, *GetDelegationsInput, ...func(*Options)) (*GetDelegationsOutput, error) -} - -var _ GetDelegationsAPIClient = (*Client)(nil) - // GetDelegationsPaginatorOptions is the paginator options for GetDelegations type GetDelegationsPaginatorOptions struct { // Represents the maximum number of results on a page or for an API request call. @@ -202,6 +197,9 @@ func (p *GetDelegationsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDelegations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *GetDelegationsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetDelegationsAPIClient is a client that implements the GetDelegations +// operation. +type GetDelegationsAPIClient interface { + GetDelegations(context.Context, *GetDelegationsInput, ...func(*Options)) (*GetDelegationsOutput, error) +} + +var _ GetDelegationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDelegations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_GetEvidence.go b/service/auditmanager/api_op_GetEvidence.go index 22df28220b9..8a8b1d91c74 100644 --- a/service/auditmanager/api_op_GetEvidence.go +++ b/service/auditmanager/api_op_GetEvidence.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetEvidenceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvidenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go b/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go index 0895fde0a42..d73ab3eee23 100644 --- a/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go +++ b/service/auditmanager/api_op_GetEvidenceByEvidenceFolder.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetEvidenceByEvidenceFolderMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvidenceByEvidenceFolderValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetEvidenceByEvidenceFolderMiddlewares(stack *middl return nil } -// GetEvidenceByEvidenceFolderAPIClient is a client that implements the -// GetEvidenceByEvidenceFolder operation. -type GetEvidenceByEvidenceFolderAPIClient interface { - GetEvidenceByEvidenceFolder(context.Context, *GetEvidenceByEvidenceFolderInput, ...func(*Options)) (*GetEvidenceByEvidenceFolderOutput, error) -} - -var _ GetEvidenceByEvidenceFolderAPIClient = (*Client)(nil) - // GetEvidenceByEvidenceFolderPaginatorOptions is the paginator options for // GetEvidenceByEvidenceFolder type GetEvidenceByEvidenceFolderPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *GetEvidenceByEvidenceFolderPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEvidenceByEvidenceFolder(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *GetEvidenceByEvidenceFolderPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetEvidenceByEvidenceFolderAPIClient is a client that implements the +// GetEvidenceByEvidenceFolder operation. +type GetEvidenceByEvidenceFolderAPIClient interface { + GetEvidenceByEvidenceFolder(context.Context, *GetEvidenceByEvidenceFolderInput, ...func(*Options)) (*GetEvidenceByEvidenceFolderOutput, error) +} + +var _ GetEvidenceByEvidenceFolderAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEvidenceByEvidenceFolder(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_GetEvidenceFileUploadUrl.go b/service/auditmanager/api_op_GetEvidenceFileUploadUrl.go index 7eeb889fbad..167eae9ad85 100644 --- a/service/auditmanager/api_op_GetEvidenceFileUploadUrl.go +++ b/service/auditmanager/api_op_GetEvidenceFileUploadUrl.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetEvidenceFileUploadUrlMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvidenceFileUploadUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetEvidenceFolder.go b/service/auditmanager/api_op_GetEvidenceFolder.go index 6c3baf95853..91cc8e3e626 100644 --- a/service/auditmanager/api_op_GetEvidenceFolder.go +++ b/service/auditmanager/api_op_GetEvidenceFolder.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetEvidenceFolderMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvidenceFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go b/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go index 86dd1a76fae..6c5b6e8303a 100644 --- a/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go +++ b/service/auditmanager/api_op_GetEvidenceFoldersByAssessment.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetEvidenceFoldersByAssessmentMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvidenceFoldersByAssessmentValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationGetEvidenceFoldersByAssessmentMiddlewares(stack *mi return nil } -// GetEvidenceFoldersByAssessmentAPIClient is a client that implements the -// GetEvidenceFoldersByAssessment operation. -type GetEvidenceFoldersByAssessmentAPIClient interface { - GetEvidenceFoldersByAssessment(context.Context, *GetEvidenceFoldersByAssessmentInput, ...func(*Options)) (*GetEvidenceFoldersByAssessmentOutput, error) -} - -var _ GetEvidenceFoldersByAssessmentAPIClient = (*Client)(nil) - // GetEvidenceFoldersByAssessmentPaginatorOptions is the paginator options for // GetEvidenceFoldersByAssessment type GetEvidenceFoldersByAssessmentPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *GetEvidenceFoldersByAssessmentPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEvidenceFoldersByAssessment(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *GetEvidenceFoldersByAssessmentPaginator) NextPage(ctx context.Context, return result, nil } +// GetEvidenceFoldersByAssessmentAPIClient is a client that implements the +// GetEvidenceFoldersByAssessment operation. +type GetEvidenceFoldersByAssessmentAPIClient interface { + GetEvidenceFoldersByAssessment(context.Context, *GetEvidenceFoldersByAssessmentInput, ...func(*Options)) (*GetEvidenceFoldersByAssessmentOutput, error) +} + +var _ GetEvidenceFoldersByAssessmentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEvidenceFoldersByAssessment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go b/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go index 77dac70c808..fb1b9145719 100644 --- a/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go +++ b/service/auditmanager/api_op_GetEvidenceFoldersByAssessmentControl.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetEvidenceFoldersByAssessmentControlMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvidenceFoldersByAssessmentControlValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationGetEvidenceFoldersByAssessmentControlMiddlewares(st return nil } -// GetEvidenceFoldersByAssessmentControlAPIClient is a client that implements the -// GetEvidenceFoldersByAssessmentControl operation. -type GetEvidenceFoldersByAssessmentControlAPIClient interface { - GetEvidenceFoldersByAssessmentControl(context.Context, *GetEvidenceFoldersByAssessmentControlInput, ...func(*Options)) (*GetEvidenceFoldersByAssessmentControlOutput, error) -} - -var _ GetEvidenceFoldersByAssessmentControlAPIClient = (*Client)(nil) - // GetEvidenceFoldersByAssessmentControlPaginatorOptions is the paginator options // for GetEvidenceFoldersByAssessmentControl type GetEvidenceFoldersByAssessmentControlPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetEvidenceFoldersByAssessmentControlPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEvidenceFoldersByAssessmentControl(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetEvidenceFoldersByAssessmentControlPaginator) NextPage(ctx context.Co return result, nil } +// GetEvidenceFoldersByAssessmentControlAPIClient is a client that implements the +// GetEvidenceFoldersByAssessmentControl operation. +type GetEvidenceFoldersByAssessmentControlAPIClient interface { + GetEvidenceFoldersByAssessmentControl(context.Context, *GetEvidenceFoldersByAssessmentControlInput, ...func(*Options)) (*GetEvidenceFoldersByAssessmentControlOutput, error) +} + +var _ GetEvidenceFoldersByAssessmentControlAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEvidenceFoldersByAssessmentControl(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_GetInsights.go b/service/auditmanager/api_op_GetInsights.go index 30e82758f64..c10ac97fe46 100644 --- a/service/auditmanager/api_op_GetInsights.go +++ b/service/auditmanager/api_op_GetInsights.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetInsightsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInsights(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_GetInsightsByAssessment.go b/service/auditmanager/api_op_GetInsightsByAssessment.go index 5e2ed6c3b86..650d66c2a32 100644 --- a/service/auditmanager/api_op_GetInsightsByAssessment.go +++ b/service/auditmanager/api_op_GetInsightsByAssessment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetInsightsByAssessmentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightsByAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_GetOrganizationAdminAccount.go b/service/auditmanager/api_op_GetOrganizationAdminAccount.go index b6083cf5c81..07b92dbac39 100644 --- a/service/auditmanager/api_op_GetOrganizationAdminAccount.go +++ b/service/auditmanager/api_op_GetOrganizationAdminAccount.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetOrganizationAdminAccountMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOrganizationAdminAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_GetServicesInScope.go b/service/auditmanager/api_op_GetServicesInScope.go index d558cdf663e..bfa11d23390 100644 --- a/service/auditmanager/api_op_GetServicesInScope.go +++ b/service/auditmanager/api_op_GetServicesInScope.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetServicesInScopeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServicesInScope(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_GetSettings.go b/service/auditmanager/api_op_GetSettings.go index fc7b3b67ed5..998a11f9fe5 100644 --- a/service/auditmanager/api_op_GetSettings.go +++ b/service/auditmanager/api_op_GetSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetSettingsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go b/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go index 02c4feca9d3..afbe6002d06 100644 --- a/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go +++ b/service/auditmanager/api_op_ListAssessmentControlInsightsByControlDomain.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListAssessmentControlInsightsByControlDomainMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssessmentControlInsightsByControlDomainValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListAssessmentControlInsightsByControlDomainMiddlew return nil } -// ListAssessmentControlInsightsByControlDomainAPIClient is a client that -// implements the ListAssessmentControlInsightsByControlDomain operation. -type ListAssessmentControlInsightsByControlDomainAPIClient interface { - ListAssessmentControlInsightsByControlDomain(context.Context, *ListAssessmentControlInsightsByControlDomainInput, ...func(*Options)) (*ListAssessmentControlInsightsByControlDomainOutput, error) -} - -var _ ListAssessmentControlInsightsByControlDomainAPIClient = (*Client)(nil) - // ListAssessmentControlInsightsByControlDomainPaginatorOptions is the paginator // options for ListAssessmentControlInsightsByControlDomain type ListAssessmentControlInsightsByControlDomainPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListAssessmentControlInsightsByControlDomainPaginator) NextPage(ctx con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentControlInsightsByControlDomain(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListAssessmentControlInsightsByControlDomainPaginator) NextPage(ctx con return result, nil } +// ListAssessmentControlInsightsByControlDomainAPIClient is a client that +// implements the ListAssessmentControlInsightsByControlDomain operation. +type ListAssessmentControlInsightsByControlDomainAPIClient interface { + ListAssessmentControlInsightsByControlDomain(context.Context, *ListAssessmentControlInsightsByControlDomainInput, ...func(*Options)) (*ListAssessmentControlInsightsByControlDomainOutput, error) +} + +var _ ListAssessmentControlInsightsByControlDomainAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentControlInsightsByControlDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go b/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go index 2bd35783be8..08fa77199d6 100644 --- a/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go +++ b/service/auditmanager/api_op_ListAssessmentFrameworkShareRequests.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAssessmentFrameworkShareRequestsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssessmentFrameworkShareRequestsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAssessmentFrameworkShareRequestsMiddlewares(sta return nil } -// ListAssessmentFrameworkShareRequestsAPIClient is a client that implements the -// ListAssessmentFrameworkShareRequests operation. -type ListAssessmentFrameworkShareRequestsAPIClient interface { - ListAssessmentFrameworkShareRequests(context.Context, *ListAssessmentFrameworkShareRequestsInput, ...func(*Options)) (*ListAssessmentFrameworkShareRequestsOutput, error) -} - -var _ ListAssessmentFrameworkShareRequestsAPIClient = (*Client)(nil) - // ListAssessmentFrameworkShareRequestsPaginatorOptions is the paginator options // for ListAssessmentFrameworkShareRequests type ListAssessmentFrameworkShareRequestsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListAssessmentFrameworkShareRequestsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentFrameworkShareRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListAssessmentFrameworkShareRequestsPaginator) NextPage(ctx context.Con return result, nil } +// ListAssessmentFrameworkShareRequestsAPIClient is a client that implements the +// ListAssessmentFrameworkShareRequests operation. +type ListAssessmentFrameworkShareRequestsAPIClient interface { + ListAssessmentFrameworkShareRequests(context.Context, *ListAssessmentFrameworkShareRequestsInput, ...func(*Options)) (*ListAssessmentFrameworkShareRequestsOutput, error) +} + +var _ ListAssessmentFrameworkShareRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentFrameworkShareRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListAssessmentFrameworks.go b/service/auditmanager/api_op_ListAssessmentFrameworks.go index 4c230a883f6..53639446104 100644 --- a/service/auditmanager/api_op_ListAssessmentFrameworks.go +++ b/service/auditmanager/api_op_ListAssessmentFrameworks.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAssessmentFrameworksMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssessmentFrameworksValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAssessmentFrameworksMiddlewares(stack *middlewa return nil } -// ListAssessmentFrameworksAPIClient is a client that implements the -// ListAssessmentFrameworks operation. -type ListAssessmentFrameworksAPIClient interface { - ListAssessmentFrameworks(context.Context, *ListAssessmentFrameworksInput, ...func(*Options)) (*ListAssessmentFrameworksOutput, error) -} - -var _ ListAssessmentFrameworksAPIClient = (*Client)(nil) - // ListAssessmentFrameworksPaginatorOptions is the paginator options for // ListAssessmentFrameworks type ListAssessmentFrameworksPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAssessmentFrameworksPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentFrameworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAssessmentFrameworksPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAssessmentFrameworksAPIClient is a client that implements the +// ListAssessmentFrameworks operation. +type ListAssessmentFrameworksAPIClient interface { + ListAssessmentFrameworks(context.Context, *ListAssessmentFrameworksInput, ...func(*Options)) (*ListAssessmentFrameworksOutput, error) +} + +var _ ListAssessmentFrameworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentFrameworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListAssessmentReports.go b/service/auditmanager/api_op_ListAssessmentReports.go index 72240f54fc5..41bf94c30a1 100644 --- a/service/auditmanager/api_op_ListAssessmentReports.go +++ b/service/auditmanager/api_op_ListAssessmentReports.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListAssessmentReportsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssessmentReports(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListAssessmentReportsMiddlewares(stack *middleware. return nil } -// ListAssessmentReportsAPIClient is a client that implements the -// ListAssessmentReports operation. -type ListAssessmentReportsAPIClient interface { - ListAssessmentReports(context.Context, *ListAssessmentReportsInput, ...func(*Options)) (*ListAssessmentReportsOutput, error) -} - -var _ ListAssessmentReportsAPIClient = (*Client)(nil) - // ListAssessmentReportsPaginatorOptions is the paginator options for // ListAssessmentReports type ListAssessmentReportsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListAssessmentReportsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListAssessmentReportsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAssessmentReportsAPIClient is a client that implements the +// ListAssessmentReports operation. +type ListAssessmentReportsAPIClient interface { + ListAssessmentReports(context.Context, *ListAssessmentReportsInput, ...func(*Options)) (*ListAssessmentReportsOutput, error) +} + +var _ ListAssessmentReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListAssessments.go b/service/auditmanager/api_op_ListAssessments.go index 2e0ec6d1c98..13e748d06d1 100644 --- a/service/auditmanager/api_op_ListAssessments.go +++ b/service/auditmanager/api_op_ListAssessments.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAssessmentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssessments(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListAssessmentsMiddlewares(stack *middleware.Stack, return nil } -// ListAssessmentsAPIClient is a client that implements the ListAssessments -// operation. -type ListAssessmentsAPIClient interface { - ListAssessments(context.Context, *ListAssessmentsInput, ...func(*Options)) (*ListAssessmentsOutput, error) -} - -var _ ListAssessmentsAPIClient = (*Client)(nil) - // ListAssessmentsPaginatorOptions is the paginator options for ListAssessments type ListAssessmentsPaginatorOptions struct { // Represents the maximum number of results on a page or for an API request call. @@ -205,6 +200,9 @@ func (p *ListAssessmentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListAssessmentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListAssessmentsAPIClient is a client that implements the ListAssessments +// operation. +type ListAssessmentsAPIClient interface { + ListAssessments(context.Context, *ListAssessmentsInput, ...func(*Options)) (*ListAssessmentsOutput, error) +} + +var _ ListAssessmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListControlDomainInsights.go b/service/auditmanager/api_op_ListControlDomainInsights.go index 62dff6f717f..27381f00bef 100644 --- a/service/auditmanager/api_op_ListControlDomainInsights.go +++ b/service/auditmanager/api_op_ListControlDomainInsights.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListControlDomainInsightsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListControlDomainInsights(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListControlDomainInsightsMiddlewares(stack *middlew return nil } -// ListControlDomainInsightsAPIClient is a client that implements the -// ListControlDomainInsights operation. -type ListControlDomainInsightsAPIClient interface { - ListControlDomainInsights(context.Context, *ListControlDomainInsightsInput, ...func(*Options)) (*ListControlDomainInsightsOutput, error) -} - -var _ ListControlDomainInsightsAPIClient = (*Client)(nil) - // ListControlDomainInsightsPaginatorOptions is the paginator options for // ListControlDomainInsights type ListControlDomainInsightsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListControlDomainInsightsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListControlDomainInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListControlDomainInsightsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListControlDomainInsightsAPIClient is a client that implements the +// ListControlDomainInsights operation. +type ListControlDomainInsightsAPIClient interface { + ListControlDomainInsights(context.Context, *ListControlDomainInsightsInput, ...func(*Options)) (*ListControlDomainInsightsOutput, error) +} + +var _ ListControlDomainInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListControlDomainInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go b/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go index 8858d3690da..6aba1a06d5c 100644 --- a/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go +++ b/service/auditmanager/api_op_ListControlDomainInsightsByAssessment.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListControlDomainInsightsByAssessmentMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListControlDomainInsightsByAssessmentValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListControlDomainInsightsByAssessmentMiddlewares(st return nil } -// ListControlDomainInsightsByAssessmentAPIClient is a client that implements the -// ListControlDomainInsightsByAssessment operation. -type ListControlDomainInsightsByAssessmentAPIClient interface { - ListControlDomainInsightsByAssessment(context.Context, *ListControlDomainInsightsByAssessmentInput, ...func(*Options)) (*ListControlDomainInsightsByAssessmentOutput, error) -} - -var _ ListControlDomainInsightsByAssessmentAPIClient = (*Client)(nil) - // ListControlDomainInsightsByAssessmentPaginatorOptions is the paginator options // for ListControlDomainInsightsByAssessment type ListControlDomainInsightsByAssessmentPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListControlDomainInsightsByAssessmentPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListControlDomainInsightsByAssessment(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListControlDomainInsightsByAssessmentPaginator) NextPage(ctx context.Co return result, nil } +// ListControlDomainInsightsByAssessmentAPIClient is a client that implements the +// ListControlDomainInsightsByAssessment operation. +type ListControlDomainInsightsByAssessmentAPIClient interface { + ListControlDomainInsightsByAssessment(context.Context, *ListControlDomainInsightsByAssessmentInput, ...func(*Options)) (*ListControlDomainInsightsByAssessmentOutput, error) +} + +var _ ListControlDomainInsightsByAssessmentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListControlDomainInsightsByAssessment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListControlInsightsByControlDomain.go b/service/auditmanager/api_op_ListControlInsightsByControlDomain.go index 209fd574cb0..78d2761e5cc 100644 --- a/service/auditmanager/api_op_ListControlInsightsByControlDomain.go +++ b/service/auditmanager/api_op_ListControlInsightsByControlDomain.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListControlInsightsByControlDomainMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListControlInsightsByControlDomainValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListControlInsightsByControlDomainMiddlewares(stack return nil } -// ListControlInsightsByControlDomainAPIClient is a client that implements the -// ListControlInsightsByControlDomain operation. -type ListControlInsightsByControlDomainAPIClient interface { - ListControlInsightsByControlDomain(context.Context, *ListControlInsightsByControlDomainInput, ...func(*Options)) (*ListControlInsightsByControlDomainOutput, error) -} - -var _ ListControlInsightsByControlDomainAPIClient = (*Client)(nil) - // ListControlInsightsByControlDomainPaginatorOptions is the paginator options for // ListControlInsightsByControlDomain type ListControlInsightsByControlDomainPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListControlInsightsByControlDomainPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListControlInsightsByControlDomain(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListControlInsightsByControlDomainPaginator) NextPage(ctx context.Conte return result, nil } +// ListControlInsightsByControlDomainAPIClient is a client that implements the +// ListControlInsightsByControlDomain operation. +type ListControlInsightsByControlDomainAPIClient interface { + ListControlInsightsByControlDomain(context.Context, *ListControlInsightsByControlDomainInput, ...func(*Options)) (*ListControlInsightsByControlDomainOutput, error) +} + +var _ ListControlInsightsByControlDomainAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListControlInsightsByControlDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListControls.go b/service/auditmanager/api_op_ListControls.go index 392aa94a3ed..5bff98c4c0c 100644 --- a/service/auditmanager/api_op_ListControls.go +++ b/service/auditmanager/api_op_ListControls.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListControlsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListControlsValidationMiddleware(stack); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationListControlsMiddlewares(stack *middleware.Stack, op return nil } -// ListControlsAPIClient is a client that implements the ListControls operation. -type ListControlsAPIClient interface { - ListControls(context.Context, *ListControlsInput, ...func(*Options)) (*ListControlsOutput, error) -} - -var _ ListControlsAPIClient = (*Client)(nil) - // ListControlsPaginatorOptions is the paginator options for ListControls type ListControlsPaginatorOptions struct { // The maximum number of results on a page or for an API request call. @@ -231,6 +227,9 @@ func (p *ListControlsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +249,13 @@ func (p *ListControlsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListControlsAPIClient is a client that implements the ListControls operation. +type ListControlsAPIClient interface { + ListControls(context.Context, *ListControlsInput, ...func(*Options)) (*ListControlsOutput, error) +} + +var _ ListControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListKeywordsForDataSource.go b/service/auditmanager/api_op_ListKeywordsForDataSource.go index 22482e28670..4341f714525 100644 --- a/service/auditmanager/api_op_ListKeywordsForDataSource.go +++ b/service/auditmanager/api_op_ListKeywordsForDataSource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListKeywordsForDataSourceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKeywordsForDataSourceValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListKeywordsForDataSourceMiddlewares(stack *middlew return nil } -// ListKeywordsForDataSourceAPIClient is a client that implements the -// ListKeywordsForDataSource operation. -type ListKeywordsForDataSourceAPIClient interface { - ListKeywordsForDataSource(context.Context, *ListKeywordsForDataSourceInput, ...func(*Options)) (*ListKeywordsForDataSourceOutput, error) -} - -var _ ListKeywordsForDataSourceAPIClient = (*Client)(nil) - // ListKeywordsForDataSourcePaginatorOptions is the paginator options for // ListKeywordsForDataSource type ListKeywordsForDataSourcePaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListKeywordsForDataSourcePaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeywordsForDataSource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListKeywordsForDataSourcePaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListKeywordsForDataSourceAPIClient is a client that implements the +// ListKeywordsForDataSource operation. +type ListKeywordsForDataSourceAPIClient interface { + ListKeywordsForDataSource(context.Context, *ListKeywordsForDataSourceInput, ...func(*Options)) (*ListKeywordsForDataSourceOutput, error) +} + +var _ ListKeywordsForDataSourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeywordsForDataSource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListNotifications.go b/service/auditmanager/api_op_ListNotifications.go index 08b4c97cd74..2d7a1dde8d1 100644 --- a/service/auditmanager/api_op_ListNotifications.go +++ b/service/auditmanager/api_op_ListNotifications.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListNotificationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNotifications(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListNotificationsMiddlewares(stack *middleware.Stac return nil } -// ListNotificationsAPIClient is a client that implements the ListNotifications -// operation. -type ListNotificationsAPIClient interface { - ListNotifications(context.Context, *ListNotificationsInput, ...func(*Options)) (*ListNotificationsOutput, error) -} - -var _ ListNotificationsAPIClient = (*Client)(nil) - // ListNotificationsPaginatorOptions is the paginator options for ListNotifications type ListNotificationsPaginatorOptions struct { // Represents the maximum number of results on a page or for an API request call. @@ -202,6 +197,9 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListNotificationsAPIClient is a client that implements the ListNotifications +// operation. +type ListNotificationsAPIClient interface { + ListNotifications(context.Context, *ListNotificationsInput, ...func(*Options)) (*ListNotificationsOutput, error) +} + +var _ ListNotificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/auditmanager/api_op_ListTagsForResource.go b/service/auditmanager/api_op_ListTagsForResource.go index 9c10609b7fd..2dbe4092ad8 100644 --- a/service/auditmanager/api_op_ListTagsForResource.go +++ b/service/auditmanager/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_RegisterAccount.go b/service/auditmanager/api_op_RegisterAccount.go index 77c8f9192a5..34b7cdd0d95 100644 --- a/service/auditmanager/api_op_RegisterAccount.go +++ b/service/auditmanager/api_op_RegisterAccount.go @@ -107,6 +107,9 @@ func (c *Client) addOperationRegisterAccountMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/auditmanager/api_op_RegisterOrganizationAdminAccount.go b/service/auditmanager/api_op_RegisterOrganizationAdminAccount.go index 62e16e0d1c1..7f880c851f3 100644 --- a/service/auditmanager/api_op_RegisterOrganizationAdminAccount.go +++ b/service/auditmanager/api_op_RegisterOrganizationAdminAccount.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRegisterOrganizationAdminAccountMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_StartAssessmentFrameworkShare.go b/service/auditmanager/api_op_StartAssessmentFrameworkShare.go index 79aae6c2cf9..a33cddb8567 100644 --- a/service/auditmanager/api_op_StartAssessmentFrameworkShare.go +++ b/service/auditmanager/api_op_StartAssessmentFrameworkShare.go @@ -158,6 +158,9 @@ func (c *Client) addOperationStartAssessmentFrameworkShareMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAssessmentFrameworkShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_TagResource.go b/service/auditmanager/api_op_TagResource.go index d5be2872a8a..8b42f0ec555 100644 --- a/service/auditmanager/api_op_TagResource.go +++ b/service/auditmanager/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UntagResource.go b/service/auditmanager/api_op_UntagResource.go index d80be2e679a..7ec7db7812c 100644 --- a/service/auditmanager/api_op_UntagResource.go +++ b/service/auditmanager/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateAssessment.go b/service/auditmanager/api_op_UpdateAssessment.go index b433355272d..37050fa1f18 100644 --- a/service/auditmanager/api_op_UpdateAssessment.go +++ b/service/auditmanager/api_op_UpdateAssessment.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateAssessmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateAssessmentControl.go b/service/auditmanager/api_op_UpdateAssessmentControl.go index 9c9a0344024..1a7e8f6dfbb 100644 --- a/service/auditmanager/api_op_UpdateAssessmentControl.go +++ b/service/auditmanager/api_op_UpdateAssessmentControl.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateAssessmentControlMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateAssessmentControlSetStatus.go b/service/auditmanager/api_op_UpdateAssessmentControlSetStatus.go index e6fc2815490..abdb3303cce 100644 --- a/service/auditmanager/api_op_UpdateAssessmentControlSetStatus.go +++ b/service/auditmanager/api_op_UpdateAssessmentControlSetStatus.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateAssessmentControlSetStatusMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentControlSetStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateAssessmentFramework.go b/service/auditmanager/api_op_UpdateAssessmentFramework.go index 0d92b3ad654..3e3289fa3bc 100644 --- a/service/auditmanager/api_op_UpdateAssessmentFramework.go +++ b/service/auditmanager/api_op_UpdateAssessmentFramework.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateAssessmentFrameworkMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentFrameworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateAssessmentFrameworkShare.go b/service/auditmanager/api_op_UpdateAssessmentFrameworkShare.go index 2213bce0547..a79e8e97d0d 100644 --- a/service/auditmanager/api_op_UpdateAssessmentFrameworkShare.go +++ b/service/auditmanager/api_op_UpdateAssessmentFrameworkShare.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateAssessmentFrameworkShareMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentFrameworkShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateAssessmentStatus.go b/service/auditmanager/api_op_UpdateAssessmentStatus.go index 22945a806b5..95e29577888 100644 --- a/service/auditmanager/api_op_UpdateAssessmentStatus.go +++ b/service/auditmanager/api_op_UpdateAssessmentStatus.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateAssessmentStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateControl.go b/service/auditmanager/api_op_UpdateControl.go index d3d7ab0f8c7..4b181a929d8 100644 --- a/service/auditmanager/api_op_UpdateControl.go +++ b/service/auditmanager/api_op_UpdateControl.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateControlMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_UpdateSettings.go b/service/auditmanager/api_op_UpdateSettings.go index b78518e709e..e85295241d8 100644 --- a/service/auditmanager/api_op_UpdateSettings.go +++ b/service/auditmanager/api_op_UpdateSettings.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateSettingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/auditmanager/api_op_ValidateAssessmentReportIntegrity.go b/service/auditmanager/api_op_ValidateAssessmentReportIntegrity.go index 6e0972b20e7..49044bd968a 100644 --- a/service/auditmanager/api_op_ValidateAssessmentReportIntegrity.go +++ b/service/auditmanager/api_op_ValidateAssessmentReportIntegrity.go @@ -119,6 +119,9 @@ func (c *Client) addOperationValidateAssessmentReportIntegrityMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateAssessmentReportIntegrityValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_client.go b/service/autoscaling/api_client.go index 4f467e4776c..6ee619d2786 100644 --- a/service/autoscaling/api_client.go +++ b/service/autoscaling/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/autoscaling/api_op_AttachInstances.go b/service/autoscaling/api_op_AttachInstances.go index 010bcef40d3..058fea16515 100644 --- a/service/autoscaling/api_op_AttachInstances.go +++ b/service/autoscaling/api_op_AttachInstances.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAttachInstancesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go b/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go index 9fa2fbb1996..cf62e33f1e6 100644 --- a/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go +++ b/service/autoscaling/api_op_AttachLoadBalancerTargetGroups.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAttachLoadBalancerTargetGroupsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachLoadBalancerTargetGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_AttachLoadBalancers.go b/service/autoscaling/api_op_AttachLoadBalancers.go index 8a0f158f7b6..87f6cd1741d 100644 --- a/service/autoscaling/api_op_AttachLoadBalancers.go +++ b/service/autoscaling/api_op_AttachLoadBalancers.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAttachLoadBalancersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachLoadBalancersValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_AttachTrafficSources.go b/service/autoscaling/api_op_AttachTrafficSources.go index bade9a75e00..95c3dfca1b3 100644 --- a/service/autoscaling/api_op_AttachTrafficSources.go +++ b/service/autoscaling/api_op_AttachTrafficSources.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAttachTrafficSourcesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachTrafficSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_BatchDeleteScheduledAction.go b/service/autoscaling/api_op_BatchDeleteScheduledAction.go index a0102596aaf..67b3bf0ac51 100644 --- a/service/autoscaling/api_op_BatchDeleteScheduledAction.go +++ b/service/autoscaling/api_op_BatchDeleteScheduledAction.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchDeleteScheduledActionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go b/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go index 50355c10d97..0cd2bd8fd8c 100644 --- a/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go +++ b/service/autoscaling/api_op_BatchPutScheduledUpdateGroupAction.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchPutScheduledUpdateGroupActionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutScheduledUpdateGroupActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_CancelInstanceRefresh.go b/service/autoscaling/api_op_CancelInstanceRefresh.go index 92ad85878d0..803ecd073ab 100644 --- a/service/autoscaling/api_op_CancelInstanceRefresh.go +++ b/service/autoscaling/api_op_CancelInstanceRefresh.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCancelInstanceRefreshMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelInstanceRefreshValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_CompleteLifecycleAction.go b/service/autoscaling/api_op_CompleteLifecycleAction.go index 8072f695625..95ca26f82eb 100644 --- a/service/autoscaling/api_op_CompleteLifecycleAction.go +++ b/service/autoscaling/api_op_CompleteLifecycleAction.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCompleteLifecycleActionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteLifecycleActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_CreateAutoScalingGroup.go b/service/autoscaling/api_op_CreateAutoScalingGroup.go index 2d170088f9d..ff3e53ec499 100644 --- a/service/autoscaling/api_op_CreateAutoScalingGroup.go +++ b/service/autoscaling/api_op_CreateAutoScalingGroup.go @@ -373,6 +373,9 @@ func (c *Client) addOperationCreateAutoScalingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAutoScalingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_CreateLaunchConfiguration.go b/service/autoscaling/api_op_CreateLaunchConfiguration.go index 662c0b9c041..e89a8f869f1 100644 --- a/service/autoscaling/api_op_CreateLaunchConfiguration.go +++ b/service/autoscaling/api_op_CreateLaunchConfiguration.go @@ -284,6 +284,9 @@ func (c *Client) addOperationCreateLaunchConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLaunchConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_CreateOrUpdateTags.go b/service/autoscaling/api_op_CreateOrUpdateTags.go index ffa95b84740..cdfb2a1b4fb 100644 --- a/service/autoscaling/api_op_CreateOrUpdateTags.go +++ b/service/autoscaling/api_op_CreateOrUpdateTags.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateOrUpdateTagsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOrUpdateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteAutoScalingGroup.go b/service/autoscaling/api_op_DeleteAutoScalingGroup.go index 61248e55ea8..034963cf35a 100644 --- a/service/autoscaling/api_op_DeleteAutoScalingGroup.go +++ b/service/autoscaling/api_op_DeleteAutoScalingGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteAutoScalingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAutoScalingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteLaunchConfiguration.go b/service/autoscaling/api_op_DeleteLaunchConfiguration.go index 7ce063606f9..99c117d06e5 100644 --- a/service/autoscaling/api_op_DeleteLaunchConfiguration.go +++ b/service/autoscaling/api_op_DeleteLaunchConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteLaunchConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLaunchConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteLifecycleHook.go b/service/autoscaling/api_op_DeleteLifecycleHook.go index de17d0e40f7..2a4b10afb4a 100644 --- a/service/autoscaling/api_op_DeleteLifecycleHook.go +++ b/service/autoscaling/api_op_DeleteLifecycleHook.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteLifecycleHookMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLifecycleHookValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteNotificationConfiguration.go b/service/autoscaling/api_op_DeleteNotificationConfiguration.go index fdb0feaa6da..1d6d2502c6a 100644 --- a/service/autoscaling/api_op_DeleteNotificationConfiguration.go +++ b/service/autoscaling/api_op_DeleteNotificationConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteNotificationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotificationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeletePolicy.go b/service/autoscaling/api_op_DeletePolicy.go index c67b78f60e0..d22465bce2f 100644 --- a/service/autoscaling/api_op_DeletePolicy.go +++ b/service/autoscaling/api_op_DeletePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteScheduledAction.go b/service/autoscaling/api_op_DeleteScheduledAction.go index e762269603b..3d9a41807a9 100644 --- a/service/autoscaling/api_op_DeleteScheduledAction.go +++ b/service/autoscaling/api_op_DeleteScheduledAction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteTags.go b/service/autoscaling/api_op_DeleteTags.go index b72214ea593..45f22f9421b 100644 --- a/service/autoscaling/api_op_DeleteTags.go +++ b/service/autoscaling/api_op_DeleteTags.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DeleteWarmPool.go b/service/autoscaling/api_op_DeleteWarmPool.go index 475793dbce9..3d0a8f1e029 100644 --- a/service/autoscaling/api_op_DeleteWarmPool.go +++ b/service/autoscaling/api_op_DeleteWarmPool.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteWarmPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWarmPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeAccountLimits.go b/service/autoscaling/api_op_DescribeAccountLimits.go index da2cac63649..89772177959 100644 --- a/service/autoscaling/api_op_DescribeAccountLimits.go +++ b/service/autoscaling/api_op_DescribeAccountLimits.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeAdjustmentTypes.go b/service/autoscaling/api_op_DescribeAdjustmentTypes.go index 8a512ffffb0..21336af9a88 100644 --- a/service/autoscaling/api_op_DescribeAdjustmentTypes.go +++ b/service/autoscaling/api_op_DescribeAdjustmentTypes.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeAdjustmentTypesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAdjustmentTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeAutoScalingGroups.go b/service/autoscaling/api_op_DescribeAutoScalingGroups.go index 6315ce28f4d..7b032b84447 100644 --- a/service/autoscaling/api_op_DescribeAutoScalingGroups.go +++ b/service/autoscaling/api_op_DescribeAutoScalingGroups.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeAutoScalingGroupsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutoScalingGroups(options.Region), middleware.Before); err != nil { return err } @@ -162,99 +165,6 @@ func (c *Client) addOperationDescribeAutoScalingGroupsMiddlewares(stack *middlew return nil } -// DescribeAutoScalingGroupsAPIClient is a client that implements the -// DescribeAutoScalingGroups operation. -type DescribeAutoScalingGroupsAPIClient interface { - DescribeAutoScalingGroups(context.Context, *DescribeAutoScalingGroupsInput, ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error) -} - -var _ DescribeAutoScalingGroupsAPIClient = (*Client)(nil) - -// DescribeAutoScalingGroupsPaginatorOptions is the paginator options for -// DescribeAutoScalingGroups -type DescribeAutoScalingGroupsPaginatorOptions struct { - // The maximum number of items to return with this call. The default value is 50 - // and the maximum value is 100 . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeAutoScalingGroupsPaginator is a paginator for DescribeAutoScalingGroups -type DescribeAutoScalingGroupsPaginator struct { - options DescribeAutoScalingGroupsPaginatorOptions - client DescribeAutoScalingGroupsAPIClient - params *DescribeAutoScalingGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeAutoScalingGroupsPaginator returns a new -// DescribeAutoScalingGroupsPaginator -func NewDescribeAutoScalingGroupsPaginator(client DescribeAutoScalingGroupsAPIClient, params *DescribeAutoScalingGroupsInput, optFns ...func(*DescribeAutoScalingGroupsPaginatorOptions)) *DescribeAutoScalingGroupsPaginator { - if params == nil { - params = &DescribeAutoScalingGroupsInput{} - } - - options := DescribeAutoScalingGroupsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeAutoScalingGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeAutoScalingGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeAutoScalingGroups page. -func (p *DescribeAutoScalingGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeAutoScalingGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // GroupExistsWaiterOptions are waiter options for GroupExistsWaiter type GroupExistsWaiterOptions struct { @@ -369,7 +279,13 @@ func (w *GroupExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeA } out, err := w.client.DescribeAutoScalingGroups(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -567,7 +483,13 @@ func (w *GroupInServiceWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeAutoScalingGroups(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -765,7 +687,13 @@ func (w *GroupNotExistsWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeAutoScalingGroups(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -848,6 +776,102 @@ func groupNotExistsStateRetryable(ctx context.Context, input *DescribeAutoScalin return true, nil } +// DescribeAutoScalingGroupsPaginatorOptions is the paginator options for +// DescribeAutoScalingGroups +type DescribeAutoScalingGroupsPaginatorOptions struct { + // The maximum number of items to return with this call. The default value is 50 + // and the maximum value is 100 . + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAutoScalingGroupsPaginator is a paginator for DescribeAutoScalingGroups +type DescribeAutoScalingGroupsPaginator struct { + options DescribeAutoScalingGroupsPaginatorOptions + client DescribeAutoScalingGroupsAPIClient + params *DescribeAutoScalingGroupsInput + nextToken *string + firstPage bool +} + +// NewDescribeAutoScalingGroupsPaginator returns a new +// DescribeAutoScalingGroupsPaginator +func NewDescribeAutoScalingGroupsPaginator(client DescribeAutoScalingGroupsAPIClient, params *DescribeAutoScalingGroupsInput, optFns ...func(*DescribeAutoScalingGroupsPaginatorOptions)) *DescribeAutoScalingGroupsPaginator { + if params == nil { + params = &DescribeAutoScalingGroupsInput{} + } + + options := DescribeAutoScalingGroupsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAutoScalingGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAutoScalingGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAutoScalingGroups page. +func (p *DescribeAutoScalingGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAutoScalingGroups(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAutoScalingGroupsAPIClient is a client that implements the +// DescribeAutoScalingGroups operation. +type DescribeAutoScalingGroupsAPIClient interface { + DescribeAutoScalingGroups(context.Context, *DescribeAutoScalingGroupsInput, ...func(*Options)) (*DescribeAutoScalingGroupsOutput, error) +} + +var _ DescribeAutoScalingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAutoScalingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeAutoScalingInstances.go b/service/autoscaling/api_op_DescribeAutoScalingInstances.go index 5b46073f894..5bce5c8743c 100644 --- a/service/autoscaling/api_op_DescribeAutoScalingInstances.go +++ b/service/autoscaling/api_op_DescribeAutoScalingInstances.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeAutoScalingInstancesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutoScalingInstances(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationDescribeAutoScalingInstancesMiddlewares(stack *midd return nil } -// DescribeAutoScalingInstancesAPIClient is a client that implements the -// DescribeAutoScalingInstances operation. -type DescribeAutoScalingInstancesAPIClient interface { - DescribeAutoScalingInstances(context.Context, *DescribeAutoScalingInstancesInput, ...func(*Options)) (*DescribeAutoScalingInstancesOutput, error) -} - -var _ DescribeAutoScalingInstancesAPIClient = (*Client)(nil) - // DescribeAutoScalingInstancesPaginatorOptions is the paginator options for // DescribeAutoScalingInstances type DescribeAutoScalingInstancesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeAutoScalingInstancesPaginator) NextPage(ctx context.Context, op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAutoScalingInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeAutoScalingInstancesPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeAutoScalingInstancesAPIClient is a client that implements the +// DescribeAutoScalingInstances operation. +type DescribeAutoScalingInstancesAPIClient interface { + DescribeAutoScalingInstances(context.Context, *DescribeAutoScalingInstancesInput, ...func(*Options)) (*DescribeAutoScalingInstancesOutput, error) +} + +var _ DescribeAutoScalingInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAutoScalingInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go b/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go index 16548c52a06..61ac6307bdc 100644 --- a/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go +++ b/service/autoscaling/api_op_DescribeAutoScalingNotificationTypes.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDescribeAutoScalingNotificationTypesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAutoScalingNotificationTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeInstanceRefreshes.go b/service/autoscaling/api_op_DescribeInstanceRefreshes.go index 5c2d8f5c4ce..713b6716c3f 100644 --- a/service/autoscaling/api_op_DescribeInstanceRefreshes.go +++ b/service/autoscaling/api_op_DescribeInstanceRefreshes.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeInstanceRefreshesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceRefreshesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeInstanceRefreshesMiddlewares(stack *middlew return nil } -// DescribeInstanceRefreshesAPIClient is a client that implements the -// DescribeInstanceRefreshes operation. -type DescribeInstanceRefreshesAPIClient interface { - DescribeInstanceRefreshes(context.Context, *DescribeInstanceRefreshesInput, ...func(*Options)) (*DescribeInstanceRefreshesOutput, error) -} - -var _ DescribeInstanceRefreshesAPIClient = (*Client)(nil) - // DescribeInstanceRefreshesPaginatorOptions is the paginator options for // DescribeInstanceRefreshes type DescribeInstanceRefreshesPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeInstanceRefreshesPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceRefreshes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeInstanceRefreshesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeInstanceRefreshesAPIClient is a client that implements the +// DescribeInstanceRefreshes operation. +type DescribeInstanceRefreshesAPIClient interface { + DescribeInstanceRefreshes(context.Context, *DescribeInstanceRefreshesInput, ...func(*Options)) (*DescribeInstanceRefreshesOutput, error) +} + +var _ DescribeInstanceRefreshesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceRefreshes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeLaunchConfigurations.go b/service/autoscaling/api_op_DescribeLaunchConfigurations.go index 2ac27811a37..915f206fa87 100644 --- a/service/autoscaling/api_op_DescribeLaunchConfigurations.go +++ b/service/autoscaling/api_op_DescribeLaunchConfigurations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeLaunchConfigurationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeLaunchConfigurationsMiddlewares(stack *midd return nil } -// DescribeLaunchConfigurationsAPIClient is a client that implements the -// DescribeLaunchConfigurations operation. -type DescribeLaunchConfigurationsAPIClient interface { - DescribeLaunchConfigurations(context.Context, *DescribeLaunchConfigurationsInput, ...func(*Options)) (*DescribeLaunchConfigurationsOutput, error) -} - -var _ DescribeLaunchConfigurationsAPIClient = (*Client)(nil) - // DescribeLaunchConfigurationsPaginatorOptions is the paginator options for // DescribeLaunchConfigurations type DescribeLaunchConfigurationsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeLaunchConfigurationsPaginator) NextPage(ctx context.Context, op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLaunchConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeLaunchConfigurationsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeLaunchConfigurationsAPIClient is a client that implements the +// DescribeLaunchConfigurations operation. +type DescribeLaunchConfigurationsAPIClient interface { + DescribeLaunchConfigurations(context.Context, *DescribeLaunchConfigurationsInput, ...func(*Options)) (*DescribeLaunchConfigurationsOutput, error) +} + +var _ DescribeLaunchConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLaunchConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeLifecycleHookTypes.go b/service/autoscaling/api_op_DescribeLifecycleHookTypes.go index c5b13952be6..402ace32310 100644 --- a/service/autoscaling/api_op_DescribeLifecycleHookTypes.go +++ b/service/autoscaling/api_op_DescribeLifecycleHookTypes.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeLifecycleHookTypesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLifecycleHookTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeLifecycleHooks.go b/service/autoscaling/api_op_DescribeLifecycleHooks.go index 4127657c7bd..2062f0fa1d6 100644 --- a/service/autoscaling/api_op_DescribeLifecycleHooks.go +++ b/service/autoscaling/api_op_DescribeLifecycleHooks.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeLifecycleHooksMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLifecycleHooksValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go b/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go index bb8eb6a0ae6..51d322f4829 100644 --- a/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go +++ b/service/autoscaling/api_op_DescribeLoadBalancerTargetGroups.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeLoadBalancerTargetGroupsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoadBalancerTargetGroupsValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationDescribeLoadBalancerTargetGroupsMiddlewares(stack * return nil } -// DescribeLoadBalancerTargetGroupsAPIClient is a client that implements the -// DescribeLoadBalancerTargetGroups operation. -type DescribeLoadBalancerTargetGroupsAPIClient interface { - DescribeLoadBalancerTargetGroups(context.Context, *DescribeLoadBalancerTargetGroupsInput, ...func(*Options)) (*DescribeLoadBalancerTargetGroupsOutput, error) -} - -var _ DescribeLoadBalancerTargetGroupsAPIClient = (*Client)(nil) - // DescribeLoadBalancerTargetGroupsPaginatorOptions is the paginator options for // DescribeLoadBalancerTargetGroups type DescribeLoadBalancerTargetGroupsPaginatorOptions struct { @@ -251,6 +246,9 @@ func (p *DescribeLoadBalancerTargetGroupsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLoadBalancerTargetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *DescribeLoadBalancerTargetGroupsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeLoadBalancerTargetGroupsAPIClient is a client that implements the +// DescribeLoadBalancerTargetGroups operation. +type DescribeLoadBalancerTargetGroupsAPIClient interface { + DescribeLoadBalancerTargetGroups(context.Context, *DescribeLoadBalancerTargetGroupsInput, ...func(*Options)) (*DescribeLoadBalancerTargetGroupsOutput, error) +} + +var _ DescribeLoadBalancerTargetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLoadBalancerTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeLoadBalancers.go b/service/autoscaling/api_op_DescribeLoadBalancers.go index 2ee8c9c4d21..697817ad31f 100644 --- a/service/autoscaling/api_op_DescribeLoadBalancers.go +++ b/service/autoscaling/api_op_DescribeLoadBalancers.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoadBalancersValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. return nil } -// DescribeLoadBalancersAPIClient is a client that implements the -// DescribeLoadBalancers operation. -type DescribeLoadBalancersAPIClient interface { - DescribeLoadBalancers(context.Context, *DescribeLoadBalancersInput, ...func(*Options)) (*DescribeLoadBalancersOutput, error) -} - -var _ DescribeLoadBalancersAPIClient = (*Client)(nil) - // DescribeLoadBalancersPaginatorOptions is the paginator options for // DescribeLoadBalancers type DescribeLoadBalancersPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLoadBalancers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeLoadBalancersAPIClient is a client that implements the +// DescribeLoadBalancers operation. +type DescribeLoadBalancersAPIClient interface { + DescribeLoadBalancers(context.Context, *DescribeLoadBalancersInput, ...func(*Options)) (*DescribeLoadBalancersOutput, error) +} + +var _ DescribeLoadBalancersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLoadBalancers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeMetricCollectionTypes.go b/service/autoscaling/api_op_DescribeMetricCollectionTypes.go index f3351de68ed..a51fc43a580 100644 --- a/service/autoscaling/api_op_DescribeMetricCollectionTypes.go +++ b/service/autoscaling/api_op_DescribeMetricCollectionTypes.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeMetricCollectionTypesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMetricCollectionTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeNotificationConfigurations.go b/service/autoscaling/api_op_DescribeNotificationConfigurations.go index 1d1f1d164e7..9cef344044b 100644 --- a/service/autoscaling/api_op_DescribeNotificationConfigurations.go +++ b/service/autoscaling/api_op_DescribeNotificationConfigurations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeNotificationConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNotificationConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeNotificationConfigurationsMiddlewares(stack return nil } -// DescribeNotificationConfigurationsAPIClient is a client that implements the -// DescribeNotificationConfigurations operation. -type DescribeNotificationConfigurationsAPIClient interface { - DescribeNotificationConfigurations(context.Context, *DescribeNotificationConfigurationsInput, ...func(*Options)) (*DescribeNotificationConfigurationsOutput, error) -} - -var _ DescribeNotificationConfigurationsAPIClient = (*Client)(nil) - // DescribeNotificationConfigurationsPaginatorOptions is the paginator options for // DescribeNotificationConfigurations type DescribeNotificationConfigurationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeNotificationConfigurationsPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNotificationConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeNotificationConfigurationsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeNotificationConfigurationsAPIClient is a client that implements the +// DescribeNotificationConfigurations operation. +type DescribeNotificationConfigurationsAPIClient interface { + DescribeNotificationConfigurations(context.Context, *DescribeNotificationConfigurationsInput, ...func(*Options)) (*DescribeNotificationConfigurationsOutput, error) +} + +var _ DescribeNotificationConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNotificationConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribePolicies.go b/service/autoscaling/api_op_DescribePolicies.go index 5860e908e42..3c0c93dcf51 100644 --- a/service/autoscaling/api_op_DescribePolicies.go +++ b/service/autoscaling/api_op_DescribePolicies.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribePoliciesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePolicies(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribePoliciesMiddlewares(stack *middleware.Stack return nil } -// DescribePoliciesAPIClient is a client that implements the DescribePolicies -// operation. -type DescribePoliciesAPIClient interface { - DescribePolicies(context.Context, *DescribePoliciesInput, ...func(*Options)) (*DescribePoliciesOutput, error) -} - -var _ DescribePoliciesAPIClient = (*Client)(nil) - // DescribePoliciesPaginatorOptions is the paginator options for DescribePolicies type DescribePoliciesPaginatorOptions struct { // The maximum number of items to be returned with each call. The default value is @@ -222,6 +217,9 @@ func (p *DescribePoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribePoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribePoliciesAPIClient is a client that implements the DescribePolicies +// operation. +type DescribePoliciesAPIClient interface { + DescribePolicies(context.Context, *DescribePoliciesInput, ...func(*Options)) (*DescribePoliciesOutput, error) +} + +var _ DescribePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeScalingActivities.go b/service/autoscaling/api_op_DescribeScalingActivities.go index 73b3989fbc1..9bb86894189 100644 --- a/service/autoscaling/api_op_DescribeScalingActivities.go +++ b/service/autoscaling/api_op_DescribeScalingActivities.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeScalingActivitiesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScalingActivities(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationDescribeScalingActivitiesMiddlewares(stack *middlew return nil } -// DescribeScalingActivitiesAPIClient is a client that implements the -// DescribeScalingActivities operation. -type DescribeScalingActivitiesAPIClient interface { - DescribeScalingActivities(context.Context, *DescribeScalingActivitiesInput, ...func(*Options)) (*DescribeScalingActivitiesOutput, error) -} - -var _ DescribeScalingActivitiesAPIClient = (*Client)(nil) - // DescribeScalingActivitiesPaginatorOptions is the paginator options for // DescribeScalingActivities type DescribeScalingActivitiesPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScalingActivities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeScalingActivitiesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeScalingActivitiesAPIClient is a client that implements the +// DescribeScalingActivities operation. +type DescribeScalingActivitiesAPIClient interface { + DescribeScalingActivities(context.Context, *DescribeScalingActivitiesInput, ...func(*Options)) (*DescribeScalingActivitiesOutput, error) +} + +var _ DescribeScalingActivitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScalingActivities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeScalingProcessTypes.go b/service/autoscaling/api_op_DescribeScalingProcessTypes.go index 7722b3ff754..ccdbd7c8570 100644 --- a/service/autoscaling/api_op_DescribeScalingProcessTypes.go +++ b/service/autoscaling/api_op_DescribeScalingProcessTypes.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDescribeScalingProcessTypesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScalingProcessTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeScheduledActions.go b/service/autoscaling/api_op_DescribeScheduledActions.go index e948ec14cf7..e3e6b3d9a6c 100644 --- a/service/autoscaling/api_op_DescribeScheduledActions.go +++ b/service/autoscaling/api_op_DescribeScheduledActions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScheduledActions(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middlewa return nil } -// DescribeScheduledActionsAPIClient is a client that implements the -// DescribeScheduledActions operation. -type DescribeScheduledActionsAPIClient interface { - DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error) -} - -var _ DescribeScheduledActionsAPIClient = (*Client)(nil) - // DescribeScheduledActionsPaginatorOptions is the paginator options for // DescribeScheduledActions type DescribeScheduledActionsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScheduledActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeScheduledActionsAPIClient is a client that implements the +// DescribeScheduledActions operation. +type DescribeScheduledActionsAPIClient interface { + DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error) +} + +var _ DescribeScheduledActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeTags.go b/service/autoscaling/api_op_DescribeTags.go index de9c9003672..e525f866615 100644 --- a/service/autoscaling/api_op_DescribeTags.go +++ b/service/autoscaling/api_op_DescribeTags.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTags(options.Region), middleware.Before); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeTagsAPIClient is a client that implements the DescribeTags operation. -type DescribeTagsAPIClient interface { - DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) -} - -var _ DescribeTagsAPIClient = (*Client)(nil) - // DescribeTagsPaginatorOptions is the paginator options for DescribeTags type DescribeTagsPaginatorOptions struct { // The maximum number of items to return with this call. The default value is 50 @@ -224,6 +220,9 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeTagsAPIClient is a client that implements the DescribeTags operation. +type DescribeTagsAPIClient interface { + DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) +} + +var _ DescribeTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go b/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go index 50179e1d8c6..c33799854d6 100644 --- a/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go +++ b/service/autoscaling/api_op_DescribeTerminationPolicyTypes.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeTerminationPolicyTypesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTerminationPolicyTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscaling/api_op_DescribeTrafficSources.go b/service/autoscaling/api_op_DescribeTrafficSources.go index 71e38159991..e5c3bae313b 100644 --- a/service/autoscaling/api_op_DescribeTrafficSources.go +++ b/service/autoscaling/api_op_DescribeTrafficSources.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeTrafficSourcesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrafficSourcesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeTrafficSourcesMiddlewares(stack *middleware return nil } -// DescribeTrafficSourcesAPIClient is a client that implements the -// DescribeTrafficSources operation. -type DescribeTrafficSourcesAPIClient interface { - DescribeTrafficSources(context.Context, *DescribeTrafficSourcesInput, ...func(*Options)) (*DescribeTrafficSourcesOutput, error) -} - -var _ DescribeTrafficSourcesAPIClient = (*Client)(nil) - // DescribeTrafficSourcesPaginatorOptions is the paginator options for // DescribeTrafficSources type DescribeTrafficSourcesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeTrafficSourcesPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrafficSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeTrafficSourcesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeTrafficSourcesAPIClient is a client that implements the +// DescribeTrafficSources operation. +type DescribeTrafficSourcesAPIClient interface { + DescribeTrafficSources(context.Context, *DescribeTrafficSourcesInput, ...func(*Options)) (*DescribeTrafficSourcesOutput, error) +} + +var _ DescribeTrafficSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrafficSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DescribeWarmPool.go b/service/autoscaling/api_op_DescribeWarmPool.go index f7374d17e12..172c2bc4024 100644 --- a/service/autoscaling/api_op_DescribeWarmPool.go +++ b/service/autoscaling/api_op_DescribeWarmPool.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeWarmPoolMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWarmPoolValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeWarmPoolMiddlewares(stack *middleware.Stack return nil } -// DescribeWarmPoolAPIClient is a client that implements the DescribeWarmPool -// operation. -type DescribeWarmPoolAPIClient interface { - DescribeWarmPool(context.Context, *DescribeWarmPoolInput, ...func(*Options)) (*DescribeWarmPoolOutput, error) -} - -var _ DescribeWarmPoolAPIClient = (*Client)(nil) - // DescribeWarmPoolPaginatorOptions is the paginator options for DescribeWarmPool type DescribeWarmPoolPaginatorOptions struct { // The maximum number of instances to return with this call. The maximum value is @@ -223,6 +218,9 @@ func (p *DescribeWarmPoolPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeWarmPool(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeWarmPoolPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeWarmPoolAPIClient is a client that implements the DescribeWarmPool +// operation. +type DescribeWarmPoolAPIClient interface { + DescribeWarmPool(context.Context, *DescribeWarmPoolInput, ...func(*Options)) (*DescribeWarmPoolOutput, error) +} + +var _ DescribeWarmPoolAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeWarmPool(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/autoscaling/api_op_DetachInstances.go b/service/autoscaling/api_op_DetachInstances.go index 5536e00ec91..35e6845a5fa 100644 --- a/service/autoscaling/api_op_DetachInstances.go +++ b/service/autoscaling/api_op_DetachInstances.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDetachInstancesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go b/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go index 0803c0b2704..0895b06a21e 100644 --- a/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go +++ b/service/autoscaling/api_op_DetachLoadBalancerTargetGroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDetachLoadBalancerTargetGroupsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachLoadBalancerTargetGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DetachLoadBalancers.go b/service/autoscaling/api_op_DetachLoadBalancers.go index d540ce71c37..d7ad3fbb13f 100644 --- a/service/autoscaling/api_op_DetachLoadBalancers.go +++ b/service/autoscaling/api_op_DetachLoadBalancers.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDetachLoadBalancersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachLoadBalancersValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DetachTrafficSources.go b/service/autoscaling/api_op_DetachTrafficSources.go index 91307257984..68b5287abdc 100644 --- a/service/autoscaling/api_op_DetachTrafficSources.go +++ b/service/autoscaling/api_op_DetachTrafficSources.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDetachTrafficSourcesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachTrafficSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_DisableMetricsCollection.go b/service/autoscaling/api_op_DisableMetricsCollection.go index 4c1e15c1bab..abacb7da589 100644 --- a/service/autoscaling/api_op_DisableMetricsCollection.go +++ b/service/autoscaling/api_op_DisableMetricsCollection.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDisableMetricsCollectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableMetricsCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_EnableMetricsCollection.go b/service/autoscaling/api_op_EnableMetricsCollection.go index 56578571300..33e1b79c525 100644 --- a/service/autoscaling/api_op_EnableMetricsCollection.go +++ b/service/autoscaling/api_op_EnableMetricsCollection.go @@ -166,6 +166,9 @@ func (c *Client) addOperationEnableMetricsCollectionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableMetricsCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_EnterStandby.go b/service/autoscaling/api_op_EnterStandby.go index 7c0c073b045..90a766452ad 100644 --- a/service/autoscaling/api_op_EnterStandby.go +++ b/service/autoscaling/api_op_EnterStandby.go @@ -128,6 +128,9 @@ func (c *Client) addOperationEnterStandbyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnterStandbyValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_ExecutePolicy.go b/service/autoscaling/api_op_ExecutePolicy.go index cc63aa979f1..aa072852332 100644 --- a/service/autoscaling/api_op_ExecutePolicy.go +++ b/service/autoscaling/api_op_ExecutePolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationExecutePolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecutePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_ExitStandby.go b/service/autoscaling/api_op_ExitStandby.go index 62c2df06f9c..c4f0b16d9bd 100644 --- a/service/autoscaling/api_op_ExitStandby.go +++ b/service/autoscaling/api_op_ExitStandby.go @@ -116,6 +116,9 @@ func (c *Client) addOperationExitStandbyMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExitStandbyValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_GetPredictiveScalingForecast.go b/service/autoscaling/api_op_GetPredictiveScalingForecast.go index 4b73553da85..9685b14e5db 100644 --- a/service/autoscaling/api_op_GetPredictiveScalingForecast.go +++ b/service/autoscaling/api_op_GetPredictiveScalingForecast.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetPredictiveScalingForecastMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPredictiveScalingForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_PutLifecycleHook.go b/service/autoscaling/api_op_PutLifecycleHook.go index 932bb9fbe7b..3a0d335cb12 100644 --- a/service/autoscaling/api_op_PutLifecycleHook.go +++ b/service/autoscaling/api_op_PutLifecycleHook.go @@ -195,6 +195,9 @@ func (c *Client) addOperationPutLifecycleHookMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLifecycleHookValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_PutNotificationConfiguration.go b/service/autoscaling/api_op_PutNotificationConfiguration.go index 61890b3a037..4c24d4707da 100644 --- a/service/autoscaling/api_op_PutNotificationConfiguration.go +++ b/service/autoscaling/api_op_PutNotificationConfiguration.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutNotificationConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutNotificationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_PutScalingPolicy.go b/service/autoscaling/api_op_PutScalingPolicy.go index a2203b7eb85..7740784ded3 100644 --- a/service/autoscaling/api_op_PutScalingPolicy.go +++ b/service/autoscaling/api_op_PutScalingPolicy.go @@ -265,6 +265,9 @@ func (c *Client) addOperationPutScalingPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go b/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go index cb47cb0bffd..7c0406aa5be 100644 --- a/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go +++ b/service/autoscaling/api_op_PutScheduledUpdateGroupAction.go @@ -170,6 +170,9 @@ func (c *Client) addOperationPutScheduledUpdateGroupActionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutScheduledUpdateGroupActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_PutWarmPool.go b/service/autoscaling/api_op_PutWarmPool.go index 219d5c5fae7..4ac874da90a 100644 --- a/service/autoscaling/api_op_PutWarmPool.go +++ b/service/autoscaling/api_op_PutWarmPool.go @@ -152,6 +152,9 @@ func (c *Client) addOperationPutWarmPoolMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutWarmPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go b/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go index ab7e0407b03..68ff14df8f0 100644 --- a/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go +++ b/service/autoscaling/api_op_RecordLifecycleActionHeartbeat.go @@ -144,6 +144,9 @@ func (c *Client) addOperationRecordLifecycleActionHeartbeatMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRecordLifecycleActionHeartbeatValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_ResumeProcesses.go b/service/autoscaling/api_op_ResumeProcesses.go index 01acf6f2c6a..e449c7646ae 100644 --- a/service/autoscaling/api_op_ResumeProcesses.go +++ b/service/autoscaling/api_op_ResumeProcesses.go @@ -129,6 +129,9 @@ func (c *Client) addOperationResumeProcessesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeProcessesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_RollbackInstanceRefresh.go b/service/autoscaling/api_op_RollbackInstanceRefresh.go index edba01e880e..fef70546b89 100644 --- a/service/autoscaling/api_op_RollbackInstanceRefresh.go +++ b/service/autoscaling/api_op_RollbackInstanceRefresh.go @@ -130,6 +130,9 @@ func (c *Client) addOperationRollbackInstanceRefreshMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRollbackInstanceRefreshValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_SetDesiredCapacity.go b/service/autoscaling/api_op_SetDesiredCapacity.go index 18c3193277e..e0fd2429566 100644 --- a/service/autoscaling/api_op_SetDesiredCapacity.go +++ b/service/autoscaling/api_op_SetDesiredCapacity.go @@ -121,6 +121,9 @@ func (c *Client) addOperationSetDesiredCapacityMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDesiredCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_SetInstanceHealth.go b/service/autoscaling/api_op_SetInstanceHealth.go index 0eef8900f03..82c48b7779f 100644 --- a/service/autoscaling/api_op_SetInstanceHealth.go +++ b/service/autoscaling/api_op_SetInstanceHealth.go @@ -123,6 +123,9 @@ func (c *Client) addOperationSetInstanceHealthMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetInstanceHealthValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_SetInstanceProtection.go b/service/autoscaling/api_op_SetInstanceProtection.go index 6a2e7616d7c..706af059e58 100644 --- a/service/autoscaling/api_op_SetInstanceProtection.go +++ b/service/autoscaling/api_op_SetInstanceProtection.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSetInstanceProtectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetInstanceProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_StartInstanceRefresh.go b/service/autoscaling/api_op_StartInstanceRefresh.go index ecc0b1a1e5d..61f72e69128 100644 --- a/service/autoscaling/api_op_StartInstanceRefresh.go +++ b/service/autoscaling/api_op_StartInstanceRefresh.go @@ -164,6 +164,9 @@ func (c *Client) addOperationStartInstanceRefreshMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInstanceRefreshValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_SuspendProcesses.go b/service/autoscaling/api_op_SuspendProcesses.go index 7b93ce884d7..991f14f8b12 100644 --- a/service/autoscaling/api_op_SuspendProcesses.go +++ b/service/autoscaling/api_op_SuspendProcesses.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSuspendProcessesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSuspendProcessesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go b/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go index 5c1b60395cc..5b88d7064c3 100644 --- a/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go +++ b/service/autoscaling/api_op_TerminateInstanceInAutoScalingGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationTerminateInstanceInAutoScalingGroupMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateInstanceInAutoScalingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscaling/api_op_UpdateAutoScalingGroup.go b/service/autoscaling/api_op_UpdateAutoScalingGroup.go index b6df88d7584..5993d5687b2 100644 --- a/service/autoscaling/api_op_UpdateAutoScalingGroup.go +++ b/service/autoscaling/api_op_UpdateAutoScalingGroup.go @@ -307,6 +307,9 @@ func (c *Client) addOperationUpdateAutoScalingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAutoScalingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscalingplans/api_client.go b/service/autoscalingplans/api_client.go index becfb474570..59b98969c29 100644 --- a/service/autoscalingplans/api_client.go +++ b/service/autoscalingplans/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/autoscalingplans/api_op_CreateScalingPlan.go b/service/autoscalingplans/api_op_CreateScalingPlan.go index 916656dd5c4..0da3824ae44 100644 --- a/service/autoscalingplans/api_op_CreateScalingPlan.go +++ b/service/autoscalingplans/api_op_CreateScalingPlan.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateScalingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScalingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscalingplans/api_op_DeleteScalingPlan.go b/service/autoscalingplans/api_op_DeleteScalingPlan.go index 1bcff808139..2e0297023e0 100644 --- a/service/autoscalingplans/api_op_DeleteScalingPlan.go +++ b/service/autoscalingplans/api_op_DeleteScalingPlan.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteScalingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScalingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscalingplans/api_op_DescribeScalingPlanResources.go b/service/autoscalingplans/api_op_DescribeScalingPlanResources.go index e5c33e81a68..79860db3a57 100644 --- a/service/autoscalingplans/api_op_DescribeScalingPlanResources.go +++ b/service/autoscalingplans/api_op_DescribeScalingPlanResources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeScalingPlanResourcesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScalingPlanResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscalingplans/api_op_DescribeScalingPlans.go b/service/autoscalingplans/api_op_DescribeScalingPlans.go index ef9f69d82ce..753367f3ef4 100644 --- a/service/autoscalingplans/api_op_DescribeScalingPlans.go +++ b/service/autoscalingplans/api_op_DescribeScalingPlans.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeScalingPlansMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScalingPlans(options.Region), middleware.Before); err != nil { return err } diff --git a/service/autoscalingplans/api_op_GetScalingPlanResourceForecastData.go b/service/autoscalingplans/api_op_GetScalingPlanResourceForecastData.go index f921aa0d16f..cd2808a9d94 100644 --- a/service/autoscalingplans/api_op_GetScalingPlanResourceForecastData.go +++ b/service/autoscalingplans/api_op_GetScalingPlanResourceForecastData.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetScalingPlanResourceForecastDataMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetScalingPlanResourceForecastDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/autoscalingplans/api_op_UpdateScalingPlan.go b/service/autoscalingplans/api_op_UpdateScalingPlan.go index dd6f15bcb13..6005990d2d7 100644 --- a/service/autoscalingplans/api_op_UpdateScalingPlan.go +++ b/service/autoscalingplans/api_op_UpdateScalingPlan.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateScalingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScalingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_client.go b/service/b2bi/api_client.go index de377184efb..2db7f07b83c 100644 --- a/service/b2bi/api_client.go +++ b/service/b2bi/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/b2bi/api_op_CreateCapability.go b/service/b2bi/api_op_CreateCapability.go index 8deabdac328..e0c0492dbfd 100644 --- a/service/b2bi/api_op_CreateCapability.go +++ b/service/b2bi/api_op_CreateCapability.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateCapabilityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCapabilityMiddleware(stack, options); err != nil { return err } diff --git a/service/b2bi/api_op_CreatePartnership.go b/service/b2bi/api_op_CreatePartnership.go index 18061592ca4..6567578d062 100644 --- a/service/b2bi/api_op_CreatePartnership.go +++ b/service/b2bi/api_op_CreatePartnership.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreatePartnershipMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePartnershipMiddleware(stack, options); err != nil { return err } diff --git a/service/b2bi/api_op_CreateProfile.go b/service/b2bi/api_op_CreateProfile.go index 848ece970dc..7cbc42dca12 100644 --- a/service/b2bi/api_op_CreateProfile.go +++ b/service/b2bi/api_op_CreateProfile.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/b2bi/api_op_CreateTransformer.go b/service/b2bi/api_op_CreateTransformer.go index 6a91369afff..56de2695abd 100644 --- a/service/b2bi/api_op_CreateTransformer.go +++ b/service/b2bi/api_op_CreateTransformer.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateTransformerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTransformerMiddleware(stack, options); err != nil { return err } diff --git a/service/b2bi/api_op_DeleteCapability.go b/service/b2bi/api_op_DeleteCapability.go index cc347be111d..bb5049acf39 100644 --- a/service/b2bi/api_op_DeleteCapability.go +++ b/service/b2bi/api_op_DeleteCapability.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteCapabilityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCapabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_DeletePartnership.go b/service/b2bi/api_op_DeletePartnership.go index 61c7677dbfa..06c28a8faa8 100644 --- a/service/b2bi/api_op_DeletePartnership.go +++ b/service/b2bi/api_op_DeletePartnership.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeletePartnershipMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePartnershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_DeleteProfile.go b/service/b2bi/api_op_DeleteProfile.go index 42e91731afa..f98185845f3 100644 --- a/service/b2bi/api_op_DeleteProfile.go +++ b/service/b2bi/api_op_DeleteProfile.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_DeleteTransformer.go b/service/b2bi/api_op_DeleteTransformer.go index 24e33482d6c..08ee28e7811 100644 --- a/service/b2bi/api_op_DeleteTransformer.go +++ b/service/b2bi/api_op_DeleteTransformer.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteTransformerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransformerValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_GetCapability.go b/service/b2bi/api_op_GetCapability.go index d86ca32e647..643f839cc88 100644 --- a/service/b2bi/api_op_GetCapability.go +++ b/service/b2bi/api_op_GetCapability.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetCapabilityMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCapabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_GetPartnership.go b/service/b2bi/api_op_GetPartnership.go index ef8bacab293..67ab9949d93 100644 --- a/service/b2bi/api_op_GetPartnership.go +++ b/service/b2bi/api_op_GetPartnership.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetPartnershipMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPartnershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_GetProfile.go b/service/b2bi/api_op_GetProfile.go index 3d421a62c6b..e3675381b24 100644 --- a/service/b2bi/api_op_GetProfile.go +++ b/service/b2bi/api_op_GetProfile.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetProfileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_GetTransformer.go b/service/b2bi/api_op_GetTransformer.go index 3cc61254640..6a13f5d40ee 100644 --- a/service/b2bi/api_op_GetTransformer.go +++ b/service/b2bi/api_op_GetTransformer.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetTransformerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransformerValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_GetTransformerJob.go b/service/b2bi/api_op_GetTransformerJob.go index 52aa99ac5b7..39a31e4bc75 100644 --- a/service/b2bi/api_op_GetTransformerJob.go +++ b/service/b2bi/api_op_GetTransformerJob.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetTransformerJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransformerJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_ListCapabilities.go b/service/b2bi/api_op_ListCapabilities.go index afdb00a9880..0dc50051b2c 100644 --- a/service/b2bi/api_op_ListCapabilities.go +++ b/service/b2bi/api_op_ListCapabilities.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListCapabilitiesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCapabilities(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListCapabilitiesMiddlewares(stack *middleware.Stack return nil } -// ListCapabilitiesAPIClient is a client that implements the ListCapabilities -// operation. -type ListCapabilitiesAPIClient interface { - ListCapabilities(context.Context, *ListCapabilitiesInput, ...func(*Options)) (*ListCapabilitiesOutput, error) -} - -var _ ListCapabilitiesAPIClient = (*Client)(nil) - // ListCapabilitiesPaginatorOptions is the paginator options for ListCapabilities type ListCapabilitiesPaginatorOptions struct { // Specifies the maximum number of capabilities to return. @@ -210,6 +205,9 @@ func (p *ListCapabilitiesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCapabilities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListCapabilitiesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCapabilitiesAPIClient is a client that implements the ListCapabilities +// operation. +type ListCapabilitiesAPIClient interface { + ListCapabilities(context.Context, *ListCapabilitiesInput, ...func(*Options)) (*ListCapabilitiesOutput, error) +} + +var _ ListCapabilitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCapabilities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/b2bi/api_op_ListPartnerships.go b/service/b2bi/api_op_ListPartnerships.go index bd84f228029..51aa5b66186 100644 --- a/service/b2bi/api_op_ListPartnerships.go +++ b/service/b2bi/api_op_ListPartnerships.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListPartnershipsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPartnerships(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListPartnershipsMiddlewares(stack *middleware.Stack return nil } -// ListPartnershipsAPIClient is a client that implements the ListPartnerships -// operation. -type ListPartnershipsAPIClient interface { - ListPartnerships(context.Context, *ListPartnershipsInput, ...func(*Options)) (*ListPartnershipsOutput, error) -} - -var _ ListPartnershipsAPIClient = (*Client)(nil) - // ListPartnershipsPaginatorOptions is the paginator options for ListPartnerships type ListPartnershipsPaginatorOptions struct { // Specifies the maximum number of capabilities to return. @@ -215,6 +210,9 @@ func (p *ListPartnershipsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPartnerships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListPartnershipsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPartnershipsAPIClient is a client that implements the ListPartnerships +// operation. +type ListPartnershipsAPIClient interface { + ListPartnerships(context.Context, *ListPartnershipsInput, ...func(*Options)) (*ListPartnershipsOutput, error) +} + +var _ ListPartnershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPartnerships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/b2bi/api_op_ListProfiles.go b/service/b2bi/api_op_ListProfiles.go index ee3be7cf090..d574f45324b 100644 --- a/service/b2bi/api_op_ListProfiles.go +++ b/service/b2bi/api_op_ListProfiles.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfiles(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op return nil } -// ListProfilesAPIClient is a client that implements the ListProfiles operation. -type ListProfilesAPIClient interface { - ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) -} - -var _ ListProfilesAPIClient = (*Client)(nil) - // ListProfilesPaginatorOptions is the paginator options for ListProfiles type ListProfilesPaginatorOptions struct { // Specifies the maximum number of profiles to return. @@ -209,6 +205,9 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProfilesAPIClient is a client that implements the ListProfiles operation. +type ListProfilesAPIClient interface { + ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) +} + +var _ ListProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/b2bi/api_op_ListTagsForResource.go b/service/b2bi/api_op_ListTagsForResource.go index f3e3712edae..46875d8b24b 100644 --- a/service/b2bi/api_op_ListTagsForResource.go +++ b/service/b2bi/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_ListTransformers.go b/service/b2bi/api_op_ListTransformers.go index 4616a3ddf07..304db249e39 100644 --- a/service/b2bi/api_op_ListTransformers.go +++ b/service/b2bi/api_op_ListTransformers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTransformersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTransformers(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTransformersMiddlewares(stack *middleware.Stack return nil } -// ListTransformersAPIClient is a client that implements the ListTransformers -// operation. -type ListTransformersAPIClient interface { - ListTransformers(context.Context, *ListTransformersInput, ...func(*Options)) (*ListTransformersOutput, error) -} - -var _ ListTransformersAPIClient = (*Client)(nil) - // ListTransformersPaginatorOptions is the paginator options for ListTransformers type ListTransformersPaginatorOptions struct { // Specifies the number of items to return for the API response. @@ -212,6 +207,9 @@ func (p *ListTransformersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTransformers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListTransformersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTransformersAPIClient is a client that implements the ListTransformers +// operation. +type ListTransformersAPIClient interface { + ListTransformers(context.Context, *ListTransformersInput, ...func(*Options)) (*ListTransformersOutput, error) +} + +var _ ListTransformersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTransformers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/b2bi/api_op_StartTransformerJob.go b/service/b2bi/api_op_StartTransformerJob.go index 65574600493..fa2f0c45e8e 100644 --- a/service/b2bi/api_op_StartTransformerJob.go +++ b/service/b2bi/api_op_StartTransformerJob.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartTransformerJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartTransformerJobMiddleware(stack, options); err != nil { return err } diff --git a/service/b2bi/api_op_TagResource.go b/service/b2bi/api_op_TagResource.go index bf499d266df..7619c59cef4 100644 --- a/service/b2bi/api_op_TagResource.go +++ b/service/b2bi/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_TestMapping.go b/service/b2bi/api_op_TestMapping.go index 6964cf69dd5..c46d11f7b69 100644 --- a/service/b2bi/api_op_TestMapping.go +++ b/service/b2bi/api_op_TestMapping.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTestMappingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_TestParsing.go b/service/b2bi/api_op_TestParsing.go index 78dcc2dfa17..979966f0397 100644 --- a/service/b2bi/api_op_TestParsing.go +++ b/service/b2bi/api_op_TestParsing.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTestParsingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestParsingValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_UntagResource.go b/service/b2bi/api_op_UntagResource.go index 394eea53a1f..155004706b3 100644 --- a/service/b2bi/api_op_UntagResource.go +++ b/service/b2bi/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_UpdateCapability.go b/service/b2bi/api_op_UpdateCapability.go index b7bccb7d0eb..0ae1d100098 100644 --- a/service/b2bi/api_op_UpdateCapability.go +++ b/service/b2bi/api_op_UpdateCapability.go @@ -156,6 +156,9 @@ func (c *Client) addOperationUpdateCapabilityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCapabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_UpdatePartnership.go b/service/b2bi/api_op_UpdatePartnership.go index fdb87c6f5ac..557d7982e29 100644 --- a/service/b2bi/api_op_UpdatePartnership.go +++ b/service/b2bi/api_op_UpdatePartnership.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdatePartnershipMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePartnershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_UpdateProfile.go b/service/b2bi/api_op_UpdateProfile.go index bf3a85b7414..bb79e09b98c 100644 --- a/service/b2bi/api_op_UpdateProfile.go +++ b/service/b2bi/api_op_UpdateProfile.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/b2bi/api_op_UpdateTransformer.go b/service/b2bi/api_op_UpdateTransformer.go index 92071141ccd..a0dc6db8b28 100644 --- a/service/b2bi/api_op_UpdateTransformer.go +++ b/service/b2bi/api_op_UpdateTransformer.go @@ -186,6 +186,9 @@ func (c *Client) addOperationUpdateTransformerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTransformerValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_client.go b/service/backup/api_client.go index 7420a353c41..0af19a1326b 100644 --- a/service/backup/api_client.go +++ b/service/backup/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/backup/api_op_CancelLegalHold.go b/service/backup/api_op_CancelLegalHold.go index 345e876dbc4..e1862f2518c 100644 --- a/service/backup/api_op_CancelLegalHold.go +++ b/service/backup/api_op_CancelLegalHold.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCancelLegalHoldMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelLegalHoldValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateBackupPlan.go b/service/backup/api_op_CreateBackupPlan.go index 457a193f495..1da208ca5cb 100644 --- a/service/backup/api_op_CreateBackupPlan.go +++ b/service/backup/api_op_CreateBackupPlan.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateBackupPlanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackupPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateBackupSelection.go b/service/backup/api_op_CreateBackupSelection.go index 0e6fe74e26d..31c88e8fd70 100644 --- a/service/backup/api_op_CreateBackupSelection.go +++ b/service/backup/api_op_CreateBackupSelection.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateBackupSelectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackupSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateBackupVault.go b/service/backup/api_op_CreateBackupVault.go index f98434301b2..25682d9c776 100644 --- a/service/backup/api_op_CreateBackupVault.go +++ b/service/backup/api_op_CreateBackupVault.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateBackupVaultMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackupVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateFramework.go b/service/backup/api_op_CreateFramework.go index c75c6981be9..dd92872ddd6 100644 --- a/service/backup/api_op_CreateFramework.go +++ b/service/backup/api_op_CreateFramework.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateFrameworkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFrameworkMiddleware(stack, options); err != nil { return err } diff --git a/service/backup/api_op_CreateLegalHold.go b/service/backup/api_op_CreateLegalHold.go index f156537e621..ef870be4b0f 100644 --- a/service/backup/api_op_CreateLegalHold.go +++ b/service/backup/api_op_CreateLegalHold.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateLegalHoldMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLegalHoldValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go b/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go index 2a8eca11764..8dda68ca5bc 100644 --- a/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go +++ b/service/backup/api_op_CreateLogicallyAirGappedBackupVault.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateLogicallyAirGappedBackupVaultMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLogicallyAirGappedBackupVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateReportPlan.go b/service/backup/api_op_CreateReportPlan.go index 39c6c1b6d25..47b52a12c7f 100644 --- a/service/backup/api_op_CreateReportPlan.go +++ b/service/backup/api_op_CreateReportPlan.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateReportPlanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateReportPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/backup/api_op_CreateRestoreTestingPlan.go b/service/backup/api_op_CreateRestoreTestingPlan.go index 6447b75f96c..f393d396ce6 100644 --- a/service/backup/api_op_CreateRestoreTestingPlan.go +++ b/service/backup/api_op_CreateRestoreTestingPlan.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateRestoreTestingPlanMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRestoreTestingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_CreateRestoreTestingSelection.go b/service/backup/api_op_CreateRestoreTestingSelection.go index 50ef8a744b3..032fd307061 100644 --- a/service/backup/api_op_CreateRestoreTestingSelection.go +++ b/service/backup/api_op_CreateRestoreTestingSelection.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateRestoreTestingSelectionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRestoreTestingSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteBackupPlan.go b/service/backup/api_op_DeleteBackupPlan.go index 492a84e55da..f666d96b581 100644 --- a/service/backup/api_op_DeleteBackupPlan.go +++ b/service/backup/api_op_DeleteBackupPlan.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteBackupPlanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteBackupSelection.go b/service/backup/api_op_DeleteBackupSelection.go index 5c8d6e5435f..05ec377a207 100644 --- a/service/backup/api_op_DeleteBackupSelection.go +++ b/service/backup/api_op_DeleteBackupSelection.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteBackupSelectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteBackupVault.go b/service/backup/api_op_DeleteBackupVault.go index aba0556e2c4..ba10d71372e 100644 --- a/service/backup/api_op_DeleteBackupVault.go +++ b/service/backup/api_op_DeleteBackupVault.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteBackupVaultMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteBackupVaultAccessPolicy.go b/service/backup/api_op_DeleteBackupVaultAccessPolicy.go index 24aa0c66534..26c539ee237 100644 --- a/service/backup/api_op_DeleteBackupVaultAccessPolicy.go +++ b/service/backup/api_op_DeleteBackupVaultAccessPolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteBackupVaultAccessPolicyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupVaultAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteBackupVaultLockConfiguration.go b/service/backup/api_op_DeleteBackupVaultLockConfiguration.go index bd19a72f9d2..ad9f2cd89d3 100644 --- a/service/backup/api_op_DeleteBackupVaultLockConfiguration.go +++ b/service/backup/api_op_DeleteBackupVaultLockConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteBackupVaultLockConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupVaultLockConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteBackupVaultNotifications.go b/service/backup/api_op_DeleteBackupVaultNotifications.go index 8f3ab4a1236..050aa012f00 100644 --- a/service/backup/api_op_DeleteBackupVaultNotifications.go +++ b/service/backup/api_op_DeleteBackupVaultNotifications.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteBackupVaultNotificationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupVaultNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteFramework.go b/service/backup/api_op_DeleteFramework.go index 63a3775afb8..7ccbe47ea09 100644 --- a/service/backup/api_op_DeleteFramework.go +++ b/service/backup/api_op_DeleteFramework.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFrameworkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFrameworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteRecoveryPoint.go b/service/backup/api_op_DeleteRecoveryPoint.go index dc95ffa3c86..e3913f9a270 100644 --- a/service/backup/api_op_DeleteRecoveryPoint.go +++ b/service/backup/api_op_DeleteRecoveryPoint.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteRecoveryPointMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteReportPlan.go b/service/backup/api_op_DeleteReportPlan.go index c58afeb6a07..1809efbdb32 100644 --- a/service/backup/api_op_DeleteReportPlan.go +++ b/service/backup/api_op_DeleteReportPlan.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteReportPlanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReportPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteRestoreTestingPlan.go b/service/backup/api_op_DeleteRestoreTestingPlan.go index 3f5028a8c4c..0950108b954 100644 --- a/service/backup/api_op_DeleteRestoreTestingPlan.go +++ b/service/backup/api_op_DeleteRestoreTestingPlan.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteRestoreTestingPlanMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRestoreTestingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DeleteRestoreTestingSelection.go b/service/backup/api_op_DeleteRestoreTestingSelection.go index 72bd400f19b..ee7981791c9 100644 --- a/service/backup/api_op_DeleteRestoreTestingSelection.go +++ b/service/backup/api_op_DeleteRestoreTestingSelection.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteRestoreTestingSelectionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRestoreTestingSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeBackupJob.go b/service/backup/api_op_DescribeBackupJob.go index 8f73c6afed4..20a102694fc 100644 --- a/service/backup/api_op_DescribeBackupJob.go +++ b/service/backup/api_op_DescribeBackupJob.go @@ -223,6 +223,9 @@ func (c *Client) addOperationDescribeBackupJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBackupJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeBackupVault.go b/service/backup/api_op_DescribeBackupVault.go index d33ff84c78d..afc62fa773f 100644 --- a/service/backup/api_op_DescribeBackupVault.go +++ b/service/backup/api_op_DescribeBackupVault.go @@ -185,6 +185,9 @@ func (c *Client) addOperationDescribeBackupVaultMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBackupVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeCopyJob.go b/service/backup/api_op_DescribeCopyJob.go index 33eb1ff7202..2eb3e5c2649 100644 --- a/service/backup/api_op_DescribeCopyJob.go +++ b/service/backup/api_op_DescribeCopyJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeCopyJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCopyJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeFramework.go b/service/backup/api_op_DescribeFramework.go index 4f3a94381b5..1df6b8ce951 100644 --- a/service/backup/api_op_DescribeFramework.go +++ b/service/backup/api_op_DescribeFramework.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeFrameworkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFrameworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeGlobalSettings.go b/service/backup/api_op_DescribeGlobalSettings.go index d4a92abe4f6..0c175d6606c 100644 --- a/service/backup/api_op_DescribeGlobalSettings.go +++ b/service/backup/api_op_DescribeGlobalSettings.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeGlobalSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/backup/api_op_DescribeProtectedResource.go b/service/backup/api_op_DescribeProtectedResource.go index ed6b95f5909..5d874e6a103 100644 --- a/service/backup/api_op_DescribeProtectedResource.go +++ b/service/backup/api_op_DescribeProtectedResource.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeProtectedResourceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProtectedResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeRecoveryPoint.go b/service/backup/api_op_DescribeRecoveryPoint.go index 6034ba2c78d..1d3fe47a5d1 100644 --- a/service/backup/api_op_DescribeRecoveryPoint.go +++ b/service/backup/api_op_DescribeRecoveryPoint.go @@ -272,6 +272,9 @@ func (c *Client) addOperationDescribeRecoveryPointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeRegionSettings.go b/service/backup/api_op_DescribeRegionSettings.go index 5a8f6c0d32d..da772711ced 100644 --- a/service/backup/api_op_DescribeRegionSettings.go +++ b/service/backup/api_op_DescribeRegionSettings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeRegionSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRegionSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/backup/api_op_DescribeReportJob.go b/service/backup/api_op_DescribeReportJob.go index a86e2a26ec2..7fb46e86140 100644 --- a/service/backup/api_op_DescribeReportJob.go +++ b/service/backup/api_op_DescribeReportJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeReportJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeReportPlan.go b/service/backup/api_op_DescribeReportPlan.go index 480f7e9cf4a..98fd2c7858b 100644 --- a/service/backup/api_op_DescribeReportPlan.go +++ b/service/backup/api_op_DescribeReportPlan.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeReportPlanMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReportPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DescribeRestoreJob.go b/service/backup/api_op_DescribeRestoreJob.go index 51a2f0746dd..4636e1adc54 100644 --- a/service/backup/api_op_DescribeRestoreJob.go +++ b/service/backup/api_op_DescribeRestoreJob.go @@ -177,6 +177,9 @@ func (c *Client) addOperationDescribeRestoreJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRestoreJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DisassociateRecoveryPoint.go b/service/backup/api_op_DisassociateRecoveryPoint.go index 61a6cd12047..f53c2c1e461 100644 --- a/service/backup/api_op_DisassociateRecoveryPoint.go +++ b/service/backup/api_op_DisassociateRecoveryPoint.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateRecoveryPointMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_DisassociateRecoveryPointFromParent.go b/service/backup/api_op_DisassociateRecoveryPointFromParent.go index cf246638e4c..9be8351c6f3 100644 --- a/service/backup/api_op_DisassociateRecoveryPointFromParent.go +++ b/service/backup/api_op_DisassociateRecoveryPointFromParent.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociateRecoveryPointFromParentMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateRecoveryPointFromParentValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_ExportBackupPlanTemplate.go b/service/backup/api_op_ExportBackupPlanTemplate.go index 1918b4ae675..0cd3f0e6ba0 100644 --- a/service/backup/api_op_ExportBackupPlanTemplate.go +++ b/service/backup/api_op_ExportBackupPlanTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationExportBackupPlanTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportBackupPlanTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetBackupPlan.go b/service/backup/api_op_GetBackupPlan.go index d82c5dd30c4..c0f64660a18 100644 --- a/service/backup/api_op_GetBackupPlan.go +++ b/service/backup/api_op_GetBackupPlan.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetBackupPlanMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackupPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetBackupPlanFromJSON.go b/service/backup/api_op_GetBackupPlanFromJSON.go index 008ed1dd406..d5617a1d595 100644 --- a/service/backup/api_op_GetBackupPlanFromJSON.go +++ b/service/backup/api_op_GetBackupPlanFromJSON.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetBackupPlanFromJSONMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackupPlanFromJSONValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetBackupPlanFromTemplate.go b/service/backup/api_op_GetBackupPlanFromTemplate.go index 16e1813a842..d4a7dfb11bb 100644 --- a/service/backup/api_op_GetBackupPlanFromTemplate.go +++ b/service/backup/api_op_GetBackupPlanFromTemplate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetBackupPlanFromTemplateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackupPlanFromTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetBackupSelection.go b/service/backup/api_op_GetBackupSelection.go index 690cfc52a0c..f866afcd810 100644 --- a/service/backup/api_op_GetBackupSelection.go +++ b/service/backup/api_op_GetBackupSelection.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetBackupSelectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackupSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetBackupVaultAccessPolicy.go b/service/backup/api_op_GetBackupVaultAccessPolicy.go index 9527cabf61d..621c4d32c3b 100644 --- a/service/backup/api_op_GetBackupVaultAccessPolicy.go +++ b/service/backup/api_op_GetBackupVaultAccessPolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetBackupVaultAccessPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackupVaultAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetBackupVaultNotifications.go b/service/backup/api_op_GetBackupVaultNotifications.go index 3e09b8df886..a7c1f5756f5 100644 --- a/service/backup/api_op_GetBackupVaultNotifications.go +++ b/service/backup/api_op_GetBackupVaultNotifications.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetBackupVaultNotificationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBackupVaultNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetLegalHold.go b/service/backup/api_op_GetLegalHold.go index a7625996785..2ba00752fd7 100644 --- a/service/backup/api_op_GetLegalHold.go +++ b/service/backup/api_op_GetLegalHold.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetLegalHoldMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLegalHoldValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetRecoveryPointRestoreMetadata.go b/service/backup/api_op_GetRecoveryPointRestoreMetadata.go index f0857707285..cbbd439d30f 100644 --- a/service/backup/api_op_GetRecoveryPointRestoreMetadata.go +++ b/service/backup/api_op_GetRecoveryPointRestoreMetadata.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetRecoveryPointRestoreMetadataMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecoveryPointRestoreMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetRestoreJobMetadata.go b/service/backup/api_op_GetRestoreJobMetadata.go index 3077974d7af..9bc30af2581 100644 --- a/service/backup/api_op_GetRestoreJobMetadata.go +++ b/service/backup/api_op_GetRestoreJobMetadata.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetRestoreJobMetadataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRestoreJobMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetRestoreTestingInferredMetadata.go b/service/backup/api_op_GetRestoreTestingInferredMetadata.go index cb00492469d..f0cf9a01adc 100644 --- a/service/backup/api_op_GetRestoreTestingInferredMetadata.go +++ b/service/backup/api_op_GetRestoreTestingInferredMetadata.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetRestoreTestingInferredMetadataMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRestoreTestingInferredMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetRestoreTestingPlan.go b/service/backup/api_op_GetRestoreTestingPlan.go index 23d6e72eb55..7619ee3b410 100644 --- a/service/backup/api_op_GetRestoreTestingPlan.go +++ b/service/backup/api_op_GetRestoreTestingPlan.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetRestoreTestingPlanMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRestoreTestingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetRestoreTestingSelection.go b/service/backup/api_op_GetRestoreTestingSelection.go index 30921588549..0956f25fa4b 100644 --- a/service/backup/api_op_GetRestoreTestingSelection.go +++ b/service/backup/api_op_GetRestoreTestingSelection.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetRestoreTestingSelectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRestoreTestingSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_GetSupportedResourceTypes.go b/service/backup/api_op_GetSupportedResourceTypes.go index 5b66359524c..edb272454c0 100644 --- a/service/backup/api_op_GetSupportedResourceTypes.go +++ b/service/backup/api_op_GetSupportedResourceTypes.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSupportedResourceTypesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSupportedResourceTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/backup/api_op_ListBackupJobSummaries.go b/service/backup/api_op_ListBackupJobSummaries.go index 8e2334dff3e..99f7733e329 100644 --- a/service/backup/api_op_ListBackupJobSummaries.go +++ b/service/backup/api_op_ListBackupJobSummaries.go @@ -199,6 +199,9 @@ func (c *Client) addOperationListBackupJobSummariesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackupJobSummaries(options.Region), middleware.Before); err != nil { return err } @@ -220,14 +223,6 @@ func (c *Client) addOperationListBackupJobSummariesMiddlewares(stack *middleware return nil } -// ListBackupJobSummariesAPIClient is a client that implements the -// ListBackupJobSummaries operation. -type ListBackupJobSummariesAPIClient interface { - ListBackupJobSummaries(context.Context, *ListBackupJobSummariesInput, ...func(*Options)) (*ListBackupJobSummariesOutput, error) -} - -var _ ListBackupJobSummariesAPIClient = (*Client)(nil) - // ListBackupJobSummariesPaginatorOptions is the paginator options for // ListBackupJobSummaries type ListBackupJobSummariesPaginatorOptions struct { @@ -294,6 +289,9 @@ func (p *ListBackupJobSummariesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupJobSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -313,6 +311,14 @@ func (p *ListBackupJobSummariesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBackupJobSummariesAPIClient is a client that implements the +// ListBackupJobSummaries operation. +type ListBackupJobSummariesAPIClient interface { + ListBackupJobSummaries(context.Context, *ListBackupJobSummariesInput, ...func(*Options)) (*ListBackupJobSummariesOutput, error) +} + +var _ ListBackupJobSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupJobSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListBackupJobs.go b/service/backup/api_op_ListBackupJobs.go index f29397c70e7..589058bf254 100644 --- a/service/backup/api_op_ListBackupJobs.go +++ b/service/backup/api_op_ListBackupJobs.go @@ -221,6 +221,9 @@ func (c *Client) addOperationListBackupJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackupJobs(options.Region), middleware.Before); err != nil { return err } @@ -242,14 +245,6 @@ func (c *Client) addOperationListBackupJobsMiddlewares(stack *middleware.Stack, return nil } -// ListBackupJobsAPIClient is a client that implements the ListBackupJobs -// operation. -type ListBackupJobsAPIClient interface { - ListBackupJobs(context.Context, *ListBackupJobsInput, ...func(*Options)) (*ListBackupJobsOutput, error) -} - -var _ ListBackupJobsAPIClient = (*Client)(nil) - // ListBackupJobsPaginatorOptions is the paginator options for ListBackupJobs type ListBackupJobsPaginatorOptions struct { // The maximum number of items to be returned. @@ -313,6 +308,9 @@ func (p *ListBackupJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -332,6 +330,14 @@ func (p *ListBackupJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListBackupJobsAPIClient is a client that implements the ListBackupJobs +// operation. +type ListBackupJobsAPIClient interface { + ListBackupJobs(context.Context, *ListBackupJobsInput, ...func(*Options)) (*ListBackupJobsOutput, error) +} + +var _ ListBackupJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListBackupPlanTemplates.go b/service/backup/api_op_ListBackupPlanTemplates.go index c7565ca9514..33f3685f9a1 100644 --- a/service/backup/api_op_ListBackupPlanTemplates.go +++ b/service/backup/api_op_ListBackupPlanTemplates.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListBackupPlanTemplatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackupPlanTemplates(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListBackupPlanTemplatesMiddlewares(stack *middlewar return nil } -// ListBackupPlanTemplatesAPIClient is a client that implements the -// ListBackupPlanTemplates operation. -type ListBackupPlanTemplatesAPIClient interface { - ListBackupPlanTemplates(context.Context, *ListBackupPlanTemplatesInput, ...func(*Options)) (*ListBackupPlanTemplatesOutput, error) -} - -var _ ListBackupPlanTemplatesAPIClient = (*Client)(nil) - // ListBackupPlanTemplatesPaginatorOptions is the paginator options for // ListBackupPlanTemplates type ListBackupPlanTemplatesPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListBackupPlanTemplatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupPlanTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListBackupPlanTemplatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListBackupPlanTemplatesAPIClient is a client that implements the +// ListBackupPlanTemplates operation. +type ListBackupPlanTemplatesAPIClient interface { + ListBackupPlanTemplates(context.Context, *ListBackupPlanTemplatesInput, ...func(*Options)) (*ListBackupPlanTemplatesOutput, error) +} + +var _ ListBackupPlanTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupPlanTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListBackupPlanVersions.go b/service/backup/api_op_ListBackupPlanVersions.go index c04f5cb8261..d5c67645db7 100644 --- a/service/backup/api_op_ListBackupPlanVersions.go +++ b/service/backup/api_op_ListBackupPlanVersions.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListBackupPlanVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBackupPlanVersionsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListBackupPlanVersionsMiddlewares(stack *middleware return nil } -// ListBackupPlanVersionsAPIClient is a client that implements the -// ListBackupPlanVersions operation. -type ListBackupPlanVersionsAPIClient interface { - ListBackupPlanVersions(context.Context, *ListBackupPlanVersionsInput, ...func(*Options)) (*ListBackupPlanVersionsOutput, error) -} - -var _ ListBackupPlanVersionsAPIClient = (*Client)(nil) - // ListBackupPlanVersionsPaginatorOptions is the paginator options for // ListBackupPlanVersions type ListBackupPlanVersionsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListBackupPlanVersionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupPlanVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListBackupPlanVersionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBackupPlanVersionsAPIClient is a client that implements the +// ListBackupPlanVersions operation. +type ListBackupPlanVersionsAPIClient interface { + ListBackupPlanVersions(context.Context, *ListBackupPlanVersionsInput, ...func(*Options)) (*ListBackupPlanVersionsOutput, error) +} + +var _ ListBackupPlanVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupPlanVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListBackupPlans.go b/service/backup/api_op_ListBackupPlans.go index a1b8e7a1deb..79ff8806dad 100644 --- a/service/backup/api_op_ListBackupPlans.go +++ b/service/backup/api_op_ListBackupPlans.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListBackupPlansMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackupPlans(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListBackupPlansMiddlewares(stack *middleware.Stack, return nil } -// ListBackupPlansAPIClient is a client that implements the ListBackupPlans -// operation. -type ListBackupPlansAPIClient interface { - ListBackupPlans(context.Context, *ListBackupPlansInput, ...func(*Options)) (*ListBackupPlansOutput, error) -} - -var _ ListBackupPlansAPIClient = (*Client)(nil) - // ListBackupPlansPaginatorOptions is the paginator options for ListBackupPlans type ListBackupPlansPaginatorOptions struct { // The maximum number of items to be returned. @@ -215,6 +210,9 @@ func (p *ListBackupPlansPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupPlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListBackupPlansPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListBackupPlansAPIClient is a client that implements the ListBackupPlans +// operation. +type ListBackupPlansAPIClient interface { + ListBackupPlans(context.Context, *ListBackupPlansInput, ...func(*Options)) (*ListBackupPlansOutput, error) +} + +var _ ListBackupPlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListBackupSelections.go b/service/backup/api_op_ListBackupSelections.go index 222b3233249..f2adcae129b 100644 --- a/service/backup/api_op_ListBackupSelections.go +++ b/service/backup/api_op_ListBackupSelections.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListBackupSelectionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBackupSelectionsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListBackupSelectionsMiddlewares(stack *middleware.S return nil } -// ListBackupSelectionsAPIClient is a client that implements the -// ListBackupSelections operation. -type ListBackupSelectionsAPIClient interface { - ListBackupSelections(context.Context, *ListBackupSelectionsInput, ...func(*Options)) (*ListBackupSelectionsOutput, error) -} - -var _ ListBackupSelectionsAPIClient = (*Client)(nil) - // ListBackupSelectionsPaginatorOptions is the paginator options for // ListBackupSelections type ListBackupSelectionsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListBackupSelectionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupSelections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListBackupSelectionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListBackupSelectionsAPIClient is a client that implements the +// ListBackupSelections operation. +type ListBackupSelectionsAPIClient interface { + ListBackupSelections(context.Context, *ListBackupSelectionsInput, ...func(*Options)) (*ListBackupSelectionsOutput, error) +} + +var _ ListBackupSelectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupSelections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListBackupVaults.go b/service/backup/api_op_ListBackupVaults.go index c6dd1397f61..80acb1948ad 100644 --- a/service/backup/api_op_ListBackupVaults.go +++ b/service/backup/api_op_ListBackupVaults.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListBackupVaultsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackupVaults(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListBackupVaultsMiddlewares(stack *middleware.Stack return nil } -// ListBackupVaultsAPIClient is a client that implements the ListBackupVaults -// operation. -type ListBackupVaultsAPIClient interface { - ListBackupVaults(context.Context, *ListBackupVaultsInput, ...func(*Options)) (*ListBackupVaultsOutput, error) -} - -var _ ListBackupVaultsAPIClient = (*Client)(nil) - // ListBackupVaultsPaginatorOptions is the paginator options for ListBackupVaults type ListBackupVaultsPaginatorOptions struct { // The maximum number of items to be returned. @@ -218,6 +213,9 @@ func (p *ListBackupVaultsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBackupVaults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListBackupVaultsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListBackupVaultsAPIClient is a client that implements the ListBackupVaults +// operation. +type ListBackupVaultsAPIClient interface { + ListBackupVaults(context.Context, *ListBackupVaultsInput, ...func(*Options)) (*ListBackupVaultsOutput, error) +} + +var _ ListBackupVaultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBackupVaults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListCopyJobSummaries.go b/service/backup/api_op_ListCopyJobSummaries.go index 779258e0df8..54c8685e701 100644 --- a/service/backup/api_op_ListCopyJobSummaries.go +++ b/service/backup/api_op_ListCopyJobSummaries.go @@ -186,6 +186,9 @@ func (c *Client) addOperationListCopyJobSummariesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCopyJobSummaries(options.Region), middleware.Before); err != nil { return err } @@ -207,14 +210,6 @@ func (c *Client) addOperationListCopyJobSummariesMiddlewares(stack *middleware.S return nil } -// ListCopyJobSummariesAPIClient is a client that implements the -// ListCopyJobSummaries operation. -type ListCopyJobSummariesAPIClient interface { - ListCopyJobSummaries(context.Context, *ListCopyJobSummariesInput, ...func(*Options)) (*ListCopyJobSummariesOutput, error) -} - -var _ ListCopyJobSummariesAPIClient = (*Client)(nil) - // ListCopyJobSummariesPaginatorOptions is the paginator options for // ListCopyJobSummaries type ListCopyJobSummariesPaginatorOptions struct { @@ -281,6 +276,9 @@ func (p *ListCopyJobSummariesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCopyJobSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -300,6 +298,14 @@ func (p *ListCopyJobSummariesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListCopyJobSummariesAPIClient is a client that implements the +// ListCopyJobSummaries operation. +type ListCopyJobSummariesAPIClient interface { + ListCopyJobSummaries(context.Context, *ListCopyJobSummariesInput, ...func(*Options)) (*ListCopyJobSummariesOutput, error) +} + +var _ ListCopyJobSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCopyJobSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListCopyJobs.go b/service/backup/api_op_ListCopyJobs.go index 789a964de49..7d5fc7c26c4 100644 --- a/service/backup/api_op_ListCopyJobs.go +++ b/service/backup/api_op_ListCopyJobs.go @@ -202,6 +202,9 @@ func (c *Client) addOperationListCopyJobsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCopyJobs(options.Region), middleware.Before); err != nil { return err } @@ -223,13 +226,6 @@ func (c *Client) addOperationListCopyJobsMiddlewares(stack *middleware.Stack, op return nil } -// ListCopyJobsAPIClient is a client that implements the ListCopyJobs operation. -type ListCopyJobsAPIClient interface { - ListCopyJobs(context.Context, *ListCopyJobsInput, ...func(*Options)) (*ListCopyJobsOutput, error) -} - -var _ ListCopyJobsAPIClient = (*Client)(nil) - // ListCopyJobsPaginatorOptions is the paginator options for ListCopyJobs type ListCopyJobsPaginatorOptions struct { // The maximum number of items to be returned. @@ -293,6 +289,9 @@ func (p *ListCopyJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCopyJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -312,6 +311,13 @@ func (p *ListCopyJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListCopyJobsAPIClient is a client that implements the ListCopyJobs operation. +type ListCopyJobsAPIClient interface { + ListCopyJobs(context.Context, *ListCopyJobsInput, ...func(*Options)) (*ListCopyJobsOutput, error) +} + +var _ ListCopyJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCopyJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListFrameworks.go b/service/backup/api_op_ListFrameworks.go index 585440ce78b..df9dc7b4301 100644 --- a/service/backup/api_op_ListFrameworks.go +++ b/service/backup/api_op_ListFrameworks.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListFrameworksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFrameworks(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListFrameworksMiddlewares(stack *middleware.Stack, return nil } -// ListFrameworksAPIClient is a client that implements the ListFrameworks -// operation. -type ListFrameworksAPIClient interface { - ListFrameworks(context.Context, *ListFrameworksInput, ...func(*Options)) (*ListFrameworksOutput, error) -} - -var _ ListFrameworksAPIClient = (*Client)(nil) - // ListFrameworksPaginatorOptions is the paginator options for ListFrameworks type ListFrameworksPaginatorOptions struct { // The number of desired results from 1 to 1000. Optional. If unspecified, the @@ -209,6 +204,9 @@ func (p *ListFrameworksPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFrameworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListFrameworksPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListFrameworksAPIClient is a client that implements the ListFrameworks +// operation. +type ListFrameworksAPIClient interface { + ListFrameworks(context.Context, *ListFrameworksInput, ...func(*Options)) (*ListFrameworksOutput, error) +} + +var _ ListFrameworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFrameworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListLegalHolds.go b/service/backup/api_op_ListLegalHolds.go index 7d3526d4518..c76bcc360c6 100644 --- a/service/backup/api_op_ListLegalHolds.go +++ b/service/backup/api_op_ListLegalHolds.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListLegalHoldsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLegalHolds(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListLegalHoldsMiddlewares(stack *middleware.Stack, return nil } -// ListLegalHoldsAPIClient is a client that implements the ListLegalHolds -// operation. -type ListLegalHoldsAPIClient interface { - ListLegalHolds(context.Context, *ListLegalHoldsInput, ...func(*Options)) (*ListLegalHoldsOutput, error) -} - -var _ ListLegalHoldsAPIClient = (*Client)(nil) - // ListLegalHoldsPaginatorOptions is the paginator options for ListLegalHolds type ListLegalHoldsPaginatorOptions struct { // The maximum number of resource list items to be returned. @@ -208,6 +203,9 @@ func (p *ListLegalHoldsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLegalHolds(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListLegalHoldsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListLegalHoldsAPIClient is a client that implements the ListLegalHolds +// operation. +type ListLegalHoldsAPIClient interface { + ListLegalHolds(context.Context, *ListLegalHoldsInput, ...func(*Options)) (*ListLegalHoldsOutput, error) +} + +var _ ListLegalHoldsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLegalHolds(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListProtectedResources.go b/service/backup/api_op_ListProtectedResources.go index 4be2d753385..b40411c7757 100644 --- a/service/backup/api_op_ListProtectedResources.go +++ b/service/backup/api_op_ListProtectedResources.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListProtectedResourcesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProtectedResources(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListProtectedResourcesMiddlewares(stack *middleware return nil } -// ListProtectedResourcesAPIClient is a client that implements the -// ListProtectedResources operation. -type ListProtectedResourcesAPIClient interface { - ListProtectedResources(context.Context, *ListProtectedResourcesInput, ...func(*Options)) (*ListProtectedResourcesOutput, error) -} - -var _ ListProtectedResourcesAPIClient = (*Client)(nil) - // ListProtectedResourcesPaginatorOptions is the paginator options for // ListProtectedResources type ListProtectedResourcesPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListProtectedResourcesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProtectedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListProtectedResourcesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListProtectedResourcesAPIClient is a client that implements the +// ListProtectedResources operation. +type ListProtectedResourcesAPIClient interface { + ListProtectedResources(context.Context, *ListProtectedResourcesInput, ...func(*Options)) (*ListProtectedResourcesOutput, error) +} + +var _ ListProtectedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProtectedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListProtectedResourcesByBackupVault.go b/service/backup/api_op_ListProtectedResourcesByBackupVault.go index be729ee304d..a54ad9514b4 100644 --- a/service/backup/api_op_ListProtectedResourcesByBackupVault.go +++ b/service/backup/api_op_ListProtectedResourcesByBackupVault.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListProtectedResourcesByBackupVaultMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProtectedResourcesByBackupVaultValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListProtectedResourcesByBackupVaultMiddlewares(stac return nil } -// ListProtectedResourcesByBackupVaultAPIClient is a client that implements the -// ListProtectedResourcesByBackupVault operation. -type ListProtectedResourcesByBackupVaultAPIClient interface { - ListProtectedResourcesByBackupVault(context.Context, *ListProtectedResourcesByBackupVaultInput, ...func(*Options)) (*ListProtectedResourcesByBackupVaultOutput, error) -} - -var _ ListProtectedResourcesByBackupVaultAPIClient = (*Client)(nil) - // ListProtectedResourcesByBackupVaultPaginatorOptions is the paginator options // for ListProtectedResourcesByBackupVault type ListProtectedResourcesByBackupVaultPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListProtectedResourcesByBackupVaultPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProtectedResourcesByBackupVault(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListProtectedResourcesByBackupVaultPaginator) NextPage(ctx context.Cont return result, nil } +// ListProtectedResourcesByBackupVaultAPIClient is a client that implements the +// ListProtectedResourcesByBackupVault operation. +type ListProtectedResourcesByBackupVaultAPIClient interface { + ListProtectedResourcesByBackupVault(context.Context, *ListProtectedResourcesByBackupVaultInput, ...func(*Options)) (*ListProtectedResourcesByBackupVaultOutput, error) +} + +var _ ListProtectedResourcesByBackupVaultAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProtectedResourcesByBackupVault(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRecoveryPointsByBackupVault.go b/service/backup/api_op_ListRecoveryPointsByBackupVault.go index c41cbaedb56..98996f5893e 100644 --- a/service/backup/api_op_ListRecoveryPointsByBackupVault.go +++ b/service/backup/api_op_ListRecoveryPointsByBackupVault.go @@ -184,6 +184,9 @@ func (c *Client) addOperationListRecoveryPointsByBackupVaultMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecoveryPointsByBackupVaultValidationMiddleware(stack); err != nil { return err } @@ -208,14 +211,6 @@ func (c *Client) addOperationListRecoveryPointsByBackupVaultMiddlewares(stack *m return nil } -// ListRecoveryPointsByBackupVaultAPIClient is a client that implements the -// ListRecoveryPointsByBackupVault operation. -type ListRecoveryPointsByBackupVaultAPIClient interface { - ListRecoveryPointsByBackupVault(context.Context, *ListRecoveryPointsByBackupVaultInput, ...func(*Options)) (*ListRecoveryPointsByBackupVaultOutput, error) -} - -var _ ListRecoveryPointsByBackupVaultAPIClient = (*Client)(nil) - // ListRecoveryPointsByBackupVaultPaginatorOptions is the paginator options for // ListRecoveryPointsByBackupVault type ListRecoveryPointsByBackupVaultPaginatorOptions struct { @@ -282,6 +277,9 @@ func (p *ListRecoveryPointsByBackupVaultPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecoveryPointsByBackupVault(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -301,6 +299,14 @@ func (p *ListRecoveryPointsByBackupVaultPaginator) NextPage(ctx context.Context, return result, nil } +// ListRecoveryPointsByBackupVaultAPIClient is a client that implements the +// ListRecoveryPointsByBackupVault operation. +type ListRecoveryPointsByBackupVaultAPIClient interface { + ListRecoveryPointsByBackupVault(context.Context, *ListRecoveryPointsByBackupVaultInput, ...func(*Options)) (*ListRecoveryPointsByBackupVaultOutput, error) +} + +var _ ListRecoveryPointsByBackupVaultAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecoveryPointsByBackupVault(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRecoveryPointsByLegalHold.go b/service/backup/api_op_ListRecoveryPointsByLegalHold.go index 9e41b615046..1ccd2c24dd9 100644 --- a/service/backup/api_op_ListRecoveryPointsByLegalHold.go +++ b/service/backup/api_op_ListRecoveryPointsByLegalHold.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListRecoveryPointsByLegalHoldMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecoveryPointsByLegalHoldValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListRecoveryPointsByLegalHoldMiddlewares(stack *mid return nil } -// ListRecoveryPointsByLegalHoldAPIClient is a client that implements the -// ListRecoveryPointsByLegalHold operation. -type ListRecoveryPointsByLegalHoldAPIClient interface { - ListRecoveryPointsByLegalHold(context.Context, *ListRecoveryPointsByLegalHoldInput, ...func(*Options)) (*ListRecoveryPointsByLegalHoldOutput, error) -} - -var _ ListRecoveryPointsByLegalHoldAPIClient = (*Client)(nil) - // ListRecoveryPointsByLegalHoldPaginatorOptions is the paginator options for // ListRecoveryPointsByLegalHold type ListRecoveryPointsByLegalHoldPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListRecoveryPointsByLegalHoldPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecoveryPointsByLegalHold(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListRecoveryPointsByLegalHoldPaginator) NextPage(ctx context.Context, o return result, nil } +// ListRecoveryPointsByLegalHoldAPIClient is a client that implements the +// ListRecoveryPointsByLegalHold operation. +type ListRecoveryPointsByLegalHoldAPIClient interface { + ListRecoveryPointsByLegalHold(context.Context, *ListRecoveryPointsByLegalHoldInput, ...func(*Options)) (*ListRecoveryPointsByLegalHoldOutput, error) +} + +var _ ListRecoveryPointsByLegalHoldAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecoveryPointsByLegalHold(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRecoveryPointsByResource.go b/service/backup/api_op_ListRecoveryPointsByResource.go index 7036acfb6c0..064e70a0311 100644 --- a/service/backup/api_op_ListRecoveryPointsByResource.go +++ b/service/backup/api_op_ListRecoveryPointsByResource.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListRecoveryPointsByResourceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecoveryPointsByResourceValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListRecoveryPointsByResourceMiddlewares(stack *midd return nil } -// ListRecoveryPointsByResourceAPIClient is a client that implements the -// ListRecoveryPointsByResource operation. -type ListRecoveryPointsByResourceAPIClient interface { - ListRecoveryPointsByResource(context.Context, *ListRecoveryPointsByResourceInput, ...func(*Options)) (*ListRecoveryPointsByResourceOutput, error) -} - -var _ ListRecoveryPointsByResourceAPIClient = (*Client)(nil) - // ListRecoveryPointsByResourcePaginatorOptions is the paginator options for // ListRecoveryPointsByResource type ListRecoveryPointsByResourcePaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListRecoveryPointsByResourcePaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecoveryPointsByResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListRecoveryPointsByResourcePaginator) NextPage(ctx context.Context, op return result, nil } +// ListRecoveryPointsByResourceAPIClient is a client that implements the +// ListRecoveryPointsByResource operation. +type ListRecoveryPointsByResourceAPIClient interface { + ListRecoveryPointsByResource(context.Context, *ListRecoveryPointsByResourceInput, ...func(*Options)) (*ListRecoveryPointsByResourceOutput, error) +} + +var _ ListRecoveryPointsByResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecoveryPointsByResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListReportJobs.go b/service/backup/api_op_ListReportJobs.go index f1d3142c151..afdc13532c8 100644 --- a/service/backup/api_op_ListReportJobs.go +++ b/service/backup/api_op_ListReportJobs.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListReportJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReportJobs(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListReportJobsMiddlewares(stack *middleware.Stack, return nil } -// ListReportJobsAPIClient is a client that implements the ListReportJobs -// operation. -type ListReportJobsAPIClient interface { - ListReportJobs(context.Context, *ListReportJobsInput, ...func(*Options)) (*ListReportJobsOutput, error) -} - -var _ ListReportJobsAPIClient = (*Client)(nil) - // ListReportJobsPaginatorOptions is the paginator options for ListReportJobs type ListReportJobsPaginatorOptions struct { // The number of desired results from 1 to 1000. Optional. If unspecified, the @@ -225,6 +220,9 @@ func (p *ListReportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListReportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListReportJobsAPIClient is a client that implements the ListReportJobs +// operation. +type ListReportJobsAPIClient interface { + ListReportJobs(context.Context, *ListReportJobsInput, ...func(*Options)) (*ListReportJobsOutput, error) +} + +var _ ListReportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListReportPlans.go b/service/backup/api_op_ListReportPlans.go index ca16382ac3f..2c9d1e935d1 100644 --- a/service/backup/api_op_ListReportPlans.go +++ b/service/backup/api_op_ListReportPlans.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListReportPlansMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReportPlans(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListReportPlansMiddlewares(stack *middleware.Stack, return nil } -// ListReportPlansAPIClient is a client that implements the ListReportPlans -// operation. -type ListReportPlansAPIClient interface { - ListReportPlans(context.Context, *ListReportPlansInput, ...func(*Options)) (*ListReportPlansOutput, error) -} - -var _ ListReportPlansAPIClient = (*Client)(nil) - // ListReportPlansPaginatorOptions is the paginator options for ListReportPlans type ListReportPlansPaginatorOptions struct { // The number of desired results from 1 to 1000. Optional. If unspecified, the @@ -210,6 +205,9 @@ func (p *ListReportPlansPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReportPlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListReportPlansPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListReportPlansAPIClient is a client that implements the ListReportPlans +// operation. +type ListReportPlansAPIClient interface { + ListReportPlans(context.Context, *ListReportPlansInput, ...func(*Options)) (*ListReportPlansOutput, error) +} + +var _ ListReportPlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReportPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRestoreJobSummaries.go b/service/backup/api_op_ListRestoreJobSummaries.go index 6ce47d24aaf..cd1fb874112 100644 --- a/service/backup/api_op_ListRestoreJobSummaries.go +++ b/service/backup/api_op_ListRestoreJobSummaries.go @@ -175,6 +175,9 @@ func (c *Client) addOperationListRestoreJobSummariesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRestoreJobSummaries(options.Region), middleware.Before); err != nil { return err } @@ -196,14 +199,6 @@ func (c *Client) addOperationListRestoreJobSummariesMiddlewares(stack *middlewar return nil } -// ListRestoreJobSummariesAPIClient is a client that implements the -// ListRestoreJobSummaries operation. -type ListRestoreJobSummariesAPIClient interface { - ListRestoreJobSummaries(context.Context, *ListRestoreJobSummariesInput, ...func(*Options)) (*ListRestoreJobSummariesOutput, error) -} - -var _ ListRestoreJobSummariesAPIClient = (*Client)(nil) - // ListRestoreJobSummariesPaginatorOptions is the paginator options for // ListRestoreJobSummaries type ListRestoreJobSummariesPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *ListRestoreJobSummariesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRestoreJobSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *ListRestoreJobSummariesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListRestoreJobSummariesAPIClient is a client that implements the +// ListRestoreJobSummaries operation. +type ListRestoreJobSummariesAPIClient interface { + ListRestoreJobSummaries(context.Context, *ListRestoreJobSummariesInput, ...func(*Options)) (*ListRestoreJobSummariesOutput, error) +} + +var _ ListRestoreJobSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRestoreJobSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRestoreJobs.go b/service/backup/api_op_ListRestoreJobs.go index e4037046f2b..f3122bce4b7 100644 --- a/service/backup/api_op_ListRestoreJobs.go +++ b/service/backup/api_op_ListRestoreJobs.go @@ -179,6 +179,9 @@ func (c *Client) addOperationListRestoreJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRestoreJobs(options.Region), middleware.Before); err != nil { return err } @@ -200,14 +203,6 @@ func (c *Client) addOperationListRestoreJobsMiddlewares(stack *middleware.Stack, return nil } -// ListRestoreJobsAPIClient is a client that implements the ListRestoreJobs -// operation. -type ListRestoreJobsAPIClient interface { - ListRestoreJobs(context.Context, *ListRestoreJobsInput, ...func(*Options)) (*ListRestoreJobsOutput, error) -} - -var _ ListRestoreJobsAPIClient = (*Client)(nil) - // ListRestoreJobsPaginatorOptions is the paginator options for ListRestoreJobs type ListRestoreJobsPaginatorOptions struct { // The maximum number of items to be returned. @@ -271,6 +266,9 @@ func (p *ListRestoreJobsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRestoreJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *ListRestoreJobsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListRestoreJobsAPIClient is a client that implements the ListRestoreJobs +// operation. +type ListRestoreJobsAPIClient interface { + ListRestoreJobs(context.Context, *ListRestoreJobsInput, ...func(*Options)) (*ListRestoreJobsOutput, error) +} + +var _ ListRestoreJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRestoreJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRestoreJobsByProtectedResource.go b/service/backup/api_op_ListRestoreJobsByProtectedResource.go index 6ae94c9218f..a623a57ef7f 100644 --- a/service/backup/api_op_ListRestoreJobsByProtectedResource.go +++ b/service/backup/api_op_ListRestoreJobsByProtectedResource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRestoreJobsByProtectedResourceMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRestoreJobsByProtectedResourceValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListRestoreJobsByProtectedResourceMiddlewares(stack return nil } -// ListRestoreJobsByProtectedResourceAPIClient is a client that implements the -// ListRestoreJobsByProtectedResource operation. -type ListRestoreJobsByProtectedResourceAPIClient interface { - ListRestoreJobsByProtectedResource(context.Context, *ListRestoreJobsByProtectedResourceInput, ...func(*Options)) (*ListRestoreJobsByProtectedResourceOutput, error) -} - -var _ ListRestoreJobsByProtectedResourceAPIClient = (*Client)(nil) - // ListRestoreJobsByProtectedResourcePaginatorOptions is the paginator options for // ListRestoreJobsByProtectedResource type ListRestoreJobsByProtectedResourcePaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListRestoreJobsByProtectedResourcePaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRestoreJobsByProtectedResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListRestoreJobsByProtectedResourcePaginator) NextPage(ctx context.Conte return result, nil } +// ListRestoreJobsByProtectedResourceAPIClient is a client that implements the +// ListRestoreJobsByProtectedResource operation. +type ListRestoreJobsByProtectedResourceAPIClient interface { + ListRestoreJobsByProtectedResource(context.Context, *ListRestoreJobsByProtectedResourceInput, ...func(*Options)) (*ListRestoreJobsByProtectedResourceOutput, error) +} + +var _ ListRestoreJobsByProtectedResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRestoreJobsByProtectedResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRestoreTestingPlans.go b/service/backup/api_op_ListRestoreTestingPlans.go index 4227a7436dc..8c258b904fb 100644 --- a/service/backup/api_op_ListRestoreTestingPlans.go +++ b/service/backup/api_op_ListRestoreTestingPlans.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRestoreTestingPlansMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRestoreTestingPlans(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListRestoreTestingPlansMiddlewares(stack *middlewar return nil } -// ListRestoreTestingPlansAPIClient is a client that implements the -// ListRestoreTestingPlans operation. -type ListRestoreTestingPlansAPIClient interface { - ListRestoreTestingPlans(context.Context, *ListRestoreTestingPlansInput, ...func(*Options)) (*ListRestoreTestingPlansOutput, error) -} - -var _ ListRestoreTestingPlansAPIClient = (*Client)(nil) - // ListRestoreTestingPlansPaginatorOptions is the paginator options for // ListRestoreTestingPlans type ListRestoreTestingPlansPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListRestoreTestingPlansPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRestoreTestingPlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListRestoreTestingPlansPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListRestoreTestingPlansAPIClient is a client that implements the +// ListRestoreTestingPlans operation. +type ListRestoreTestingPlansAPIClient interface { + ListRestoreTestingPlans(context.Context, *ListRestoreTestingPlansInput, ...func(*Options)) (*ListRestoreTestingPlansOutput, error) +} + +var _ ListRestoreTestingPlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRestoreTestingPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListRestoreTestingSelections.go b/service/backup/api_op_ListRestoreTestingSelections.go index 5da09a22624..9676a68b4e7 100644 --- a/service/backup/api_op_ListRestoreTestingSelections.go +++ b/service/backup/api_op_ListRestoreTestingSelections.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListRestoreTestingSelectionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRestoreTestingSelectionsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListRestoreTestingSelectionsMiddlewares(stack *midd return nil } -// ListRestoreTestingSelectionsAPIClient is a client that implements the -// ListRestoreTestingSelections operation. -type ListRestoreTestingSelectionsAPIClient interface { - ListRestoreTestingSelections(context.Context, *ListRestoreTestingSelectionsInput, ...func(*Options)) (*ListRestoreTestingSelectionsOutput, error) -} - -var _ ListRestoreTestingSelectionsAPIClient = (*Client)(nil) - // ListRestoreTestingSelectionsPaginatorOptions is the paginator options for // ListRestoreTestingSelections type ListRestoreTestingSelectionsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListRestoreTestingSelectionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRestoreTestingSelections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListRestoreTestingSelectionsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListRestoreTestingSelectionsAPIClient is a client that implements the +// ListRestoreTestingSelections operation. +type ListRestoreTestingSelectionsAPIClient interface { + ListRestoreTestingSelections(context.Context, *ListRestoreTestingSelectionsInput, ...func(*Options)) (*ListRestoreTestingSelectionsOutput, error) +} + +var _ ListRestoreTestingSelectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRestoreTestingSelections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_ListTags.go b/service/backup/api_op_ListTags.go index 8b8424c6c60..53f714fc1c3 100644 --- a/service/backup/api_op_ListTags.go +++ b/service/backup/api_op_ListTags.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option return nil } -// ListTagsAPIClient is a client that implements the ListTags operation. -type ListTagsAPIClient interface { - ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) -} - -var _ ListTagsAPIClient = (*Client)(nil) - // ListTagsPaginatorOptions is the paginator options for ListTags type ListTagsPaginatorOptions struct { // The maximum number of items to be returned. @@ -224,6 +220,9 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListTagsAPIClient is a client that implements the ListTags operation. +type ListTagsAPIClient interface { + ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) +} + +var _ ListTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backup/api_op_PutBackupVaultAccessPolicy.go b/service/backup/api_op_PutBackupVaultAccessPolicy.go index 56ba825172e..6fc23c05a3f 100644 --- a/service/backup/api_op_PutBackupVaultAccessPolicy.go +++ b/service/backup/api_op_PutBackupVaultAccessPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutBackupVaultAccessPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBackupVaultAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_PutBackupVaultLockConfiguration.go b/service/backup/api_op_PutBackupVaultLockConfiguration.go index 9c9292371ef..21549370133 100644 --- a/service/backup/api_op_PutBackupVaultLockConfiguration.go +++ b/service/backup/api_op_PutBackupVaultLockConfiguration.go @@ -166,6 +166,9 @@ func (c *Client) addOperationPutBackupVaultLockConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBackupVaultLockConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_PutBackupVaultNotifications.go b/service/backup/api_op_PutBackupVaultNotifications.go index f4c7e830908..3ab578baf52 100644 --- a/service/backup/api_op_PutBackupVaultNotifications.go +++ b/service/backup/api_op_PutBackupVaultNotifications.go @@ -135,6 +135,9 @@ func (c *Client) addOperationPutBackupVaultNotificationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBackupVaultNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_PutRestoreValidationResult.go b/service/backup/api_op_PutRestoreValidationResult.go index 10798fc8fdc..43d74c35724 100644 --- a/service/backup/api_op_PutRestoreValidationResult.go +++ b/service/backup/api_op_PutRestoreValidationResult.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutRestoreValidationResultMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRestoreValidationResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_StartBackupJob.go b/service/backup/api_op_StartBackupJob.go index 2b58b871905..f71f2540356 100644 --- a/service/backup/api_op_StartBackupJob.go +++ b/service/backup/api_op_StartBackupJob.go @@ -200,6 +200,9 @@ func (c *Client) addOperationStartBackupJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBackupJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_StartCopyJob.go b/service/backup/api_op_StartCopyJob.go index fe97f3bb43a..a662fab30aa 100644 --- a/service/backup/api_op_StartCopyJob.go +++ b/service/backup/api_op_StartCopyJob.go @@ -163,6 +163,9 @@ func (c *Client) addOperationStartCopyJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCopyJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_StartReportJob.go b/service/backup/api_op_StartReportJob.go index 64759e542ee..c8cf125348b 100644 --- a/service/backup/api_op_StartReportJob.go +++ b/service/backup/api_op_StartReportJob.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStartReportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartReportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/backup/api_op_StartRestoreJob.go b/service/backup/api_op_StartRestoreJob.go index 0419cb2084c..cacd687b7ed 100644 --- a/service/backup/api_op_StartRestoreJob.go +++ b/service/backup/api_op_StartRestoreJob.go @@ -194,6 +194,9 @@ func (c *Client) addOperationStartRestoreJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRestoreJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_StopBackupJob.go b/service/backup/api_op_StopBackupJob.go index a7d95607fe6..3aac5a8f593 100644 --- a/service/backup/api_op_StopBackupJob.go +++ b/service/backup/api_op_StopBackupJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopBackupJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopBackupJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_TagResource.go b/service/backup/api_op_TagResource.go index 0f3a2af681a..e2fb70aead9 100644 --- a/service/backup/api_op_TagResource.go +++ b/service/backup/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_UntagResource.go b/service/backup/api_op_UntagResource.go index e2bbdd3f6a2..3692161c0af 100644 --- a/service/backup/api_op_UntagResource.go +++ b/service/backup/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_UpdateBackupPlan.go b/service/backup/api_op_UpdateBackupPlan.go index 46ec027483b..40efd553f43 100644 --- a/service/backup/api_op_UpdateBackupPlan.go +++ b/service/backup/api_op_UpdateBackupPlan.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateBackupPlanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBackupPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_UpdateFramework.go b/service/backup/api_op_UpdateFramework.go index 01e137a5357..925d210549e 100644 --- a/service/backup/api_op_UpdateFramework.go +++ b/service/backup/api_op_UpdateFramework.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateFrameworkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFrameworkMiddleware(stack, options); err != nil { return err } diff --git a/service/backup/api_op_UpdateGlobalSettings.go b/service/backup/api_op_UpdateGlobalSettings.go index 3f17cd910d7..66e7e835060 100644 --- a/service/backup/api_op_UpdateGlobalSettings.go +++ b/service/backup/api_op_UpdateGlobalSettings.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUpdateGlobalSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/backup/api_op_UpdateRecoveryPointLifecycle.go b/service/backup/api_op_UpdateRecoveryPointLifecycle.go index 6e53a95daef..51c1dfb74f2 100644 --- a/service/backup/api_op_UpdateRecoveryPointLifecycle.go +++ b/service/backup/api_op_UpdateRecoveryPointLifecycle.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateRecoveryPointLifecycleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecoveryPointLifecycleValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_UpdateRegionSettings.go b/service/backup/api_op_UpdateRegionSettings.go index 2fe66374316..0926f38007f 100644 --- a/service/backup/api_op_UpdateRegionSettings.go +++ b/service/backup/api_op_UpdateRegionSettings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateRegionSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRegionSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/backup/api_op_UpdateReportPlan.go b/service/backup/api_op_UpdateReportPlan.go index 8f4aacf9b7e..056d2cb54cb 100644 --- a/service/backup/api_op_UpdateReportPlan.go +++ b/service/backup/api_op_UpdateReportPlan.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateReportPlanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateReportPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/backup/api_op_UpdateRestoreTestingPlan.go b/service/backup/api_op_UpdateRestoreTestingPlan.go index dfd1cfec843..44ef477acdb 100644 --- a/service/backup/api_op_UpdateRestoreTestingPlan.go +++ b/service/backup/api_op_UpdateRestoreTestingPlan.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateRestoreTestingPlanMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRestoreTestingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/backup/api_op_UpdateRestoreTestingSelection.go b/service/backup/api_op_UpdateRestoreTestingSelection.go index a7c179c4044..aea0ab0468a 100644 --- a/service/backup/api_op_UpdateRestoreTestingSelection.go +++ b/service/backup/api_op_UpdateRestoreTestingSelection.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateRestoreTestingSelectionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRestoreTestingSelectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_client.go b/service/backupgateway/api_client.go index 866a89b51d5..57bc3656d79 100644 --- a/service/backupgateway/api_client.go +++ b/service/backupgateway/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/backupgateway/api_op_AssociateGatewayToServer.go b/service/backupgateway/api_op_AssociateGatewayToServer.go index 4a750c65c4b..e671a46841a 100644 --- a/service/backupgateway/api_op_AssociateGatewayToServer.go +++ b/service/backupgateway/api_op_AssociateGatewayToServer.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAssociateGatewayToServerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateGatewayToServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_CreateGateway.go b/service/backupgateway/api_op_CreateGateway.go index 3f8851602dc..7d7529603cf 100644 --- a/service/backupgateway/api_op_CreateGateway.go +++ b/service/backupgateway/api_op_CreateGateway.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_DeleteGateway.go b/service/backupgateway/api_op_DeleteGateway.go index ec05bcf8b44..7c4287b797f 100644 --- a/service/backupgateway/api_op_DeleteGateway.go +++ b/service/backupgateway/api_op_DeleteGateway.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_DeleteHypervisor.go b/service/backupgateway/api_op_DeleteHypervisor.go index d0ac9e0f72b..39457623413 100644 --- a/service/backupgateway/api_op_DeleteHypervisor.go +++ b/service/backupgateway/api_op_DeleteHypervisor.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteHypervisorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHypervisorValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_DisassociateGatewayFromServer.go b/service/backupgateway/api_op_DisassociateGatewayFromServer.go index 2e49bb6e7b8..b870dcdfe74 100644 --- a/service/backupgateway/api_op_DisassociateGatewayFromServer.go +++ b/service/backupgateway/api_op_DisassociateGatewayFromServer.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateGatewayFromServerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateGatewayFromServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_GetBandwidthRateLimitSchedule.go b/service/backupgateway/api_op_GetBandwidthRateLimitSchedule.go index 7c8c5320534..0a96f9ae361 100644 --- a/service/backupgateway/api_op_GetBandwidthRateLimitSchedule.go +++ b/service/backupgateway/api_op_GetBandwidthRateLimitSchedule.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetBandwidthRateLimitScheduleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBandwidthRateLimitScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_GetGateway.go b/service/backupgateway/api_op_GetGateway.go index 1bebeaec1ac..3d0d8694b6f 100644 --- a/service/backupgateway/api_op_GetGateway.go +++ b/service/backupgateway/api_op_GetGateway.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetGatewayMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_GetHypervisor.go b/service/backupgateway/api_op_GetHypervisor.go index 5aa632b18da..223482e8886 100644 --- a/service/backupgateway/api_op_GetHypervisor.go +++ b/service/backupgateway/api_op_GetHypervisor.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetHypervisorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHypervisorValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_GetHypervisorPropertyMappings.go b/service/backupgateway/api_op_GetHypervisorPropertyMappings.go index a9b724a2032..9ac711c6c1c 100644 --- a/service/backupgateway/api_op_GetHypervisorPropertyMappings.go +++ b/service/backupgateway/api_op_GetHypervisorPropertyMappings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetHypervisorPropertyMappingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHypervisorPropertyMappingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_GetVirtualMachine.go b/service/backupgateway/api_op_GetVirtualMachine.go index 1e83c37e97c..8b59b6d0dba 100644 --- a/service/backupgateway/api_op_GetVirtualMachine.go +++ b/service/backupgateway/api_op_GetVirtualMachine.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetVirtualMachineMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVirtualMachineValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_ImportHypervisorConfiguration.go b/service/backupgateway/api_op_ImportHypervisorConfiguration.go index 89917e9839e..ab48b191479 100644 --- a/service/backupgateway/api_op_ImportHypervisorConfiguration.go +++ b/service/backupgateway/api_op_ImportHypervisorConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationImportHypervisorConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportHypervisorConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_ListGateways.go b/service/backupgateway/api_op_ListGateways.go index 1e3cbb4154f..51f4fa8b455 100644 --- a/service/backupgateway/api_op_ListGateways.go +++ b/service/backupgateway/api_op_ListGateways.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGateways(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op return nil } -// ListGatewaysAPIClient is a client that implements the ListGateways operation. -type ListGatewaysAPIClient interface { - ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) -} - -var _ ListGatewaysAPIClient = (*Client)(nil) - // ListGatewaysPaginatorOptions is the paginator options for ListGateways type ListGatewaysPaginatorOptions struct { // The maximum number of gateways to list. @@ -209,6 +205,9 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListGatewaysAPIClient is a client that implements the ListGateways operation. +type ListGatewaysAPIClient interface { + ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) +} + +var _ ListGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backupgateway/api_op_ListHypervisors.go b/service/backupgateway/api_op_ListHypervisors.go index cf706528a25..31f548be1be 100644 --- a/service/backupgateway/api_op_ListHypervisors.go +++ b/service/backupgateway/api_op_ListHypervisors.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListHypervisorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHypervisors(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListHypervisorsMiddlewares(stack *middleware.Stack, return nil } -// ListHypervisorsAPIClient is a client that implements the ListHypervisors -// operation. -type ListHypervisorsAPIClient interface { - ListHypervisors(context.Context, *ListHypervisorsInput, ...func(*Options)) (*ListHypervisorsOutput, error) -} - -var _ ListHypervisorsAPIClient = (*Client)(nil) - // ListHypervisorsPaginatorOptions is the paginator options for ListHypervisors type ListHypervisorsPaginatorOptions struct { // The maximum number of hypervisors to list. @@ -209,6 +204,9 @@ func (p *ListHypervisorsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHypervisors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListHypervisorsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListHypervisorsAPIClient is a client that implements the ListHypervisors +// operation. +type ListHypervisorsAPIClient interface { + ListHypervisors(context.Context, *ListHypervisorsInput, ...func(*Options)) (*ListHypervisorsOutput, error) +} + +var _ ListHypervisorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHypervisors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backupgateway/api_op_ListTagsForResource.go b/service/backupgateway/api_op_ListTagsForResource.go index 41a7e214973..b5a8076a6aa 100644 --- a/service/backupgateway/api_op_ListTagsForResource.go +++ b/service/backupgateway/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_ListVirtualMachines.go b/service/backupgateway/api_op_ListVirtualMachines.go index c8fefa37cc4..23cb9a49d61 100644 --- a/service/backupgateway/api_op_ListVirtualMachines.go +++ b/service/backupgateway/api_op_ListVirtualMachines.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListVirtualMachinesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualMachines(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListVirtualMachinesMiddlewares(stack *middleware.St return nil } -// ListVirtualMachinesAPIClient is a client that implements the -// ListVirtualMachines operation. -type ListVirtualMachinesAPIClient interface { - ListVirtualMachines(context.Context, *ListVirtualMachinesInput, ...func(*Options)) (*ListVirtualMachinesOutput, error) -} - -var _ ListVirtualMachinesAPIClient = (*Client)(nil) - // ListVirtualMachinesPaginatorOptions is the paginator options for // ListVirtualMachines type ListVirtualMachinesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListVirtualMachinesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualMachines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListVirtualMachinesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVirtualMachinesAPIClient is a client that implements the +// ListVirtualMachines operation. +type ListVirtualMachinesAPIClient interface { + ListVirtualMachines(context.Context, *ListVirtualMachinesInput, ...func(*Options)) (*ListVirtualMachinesOutput, error) +} + +var _ ListVirtualMachinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualMachines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/backupgateway/api_op_PutBandwidthRateLimitSchedule.go b/service/backupgateway/api_op_PutBandwidthRateLimitSchedule.go index 0a80fe7309d..073240035a6 100644 --- a/service/backupgateway/api_op_PutBandwidthRateLimitSchedule.go +++ b/service/backupgateway/api_op_PutBandwidthRateLimitSchedule.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPutBandwidthRateLimitScheduleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBandwidthRateLimitScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_PutHypervisorPropertyMappings.go b/service/backupgateway/api_op_PutHypervisorPropertyMappings.go index 5f3c495a8dd..62551abca7c 100644 --- a/service/backupgateway/api_op_PutHypervisorPropertyMappings.go +++ b/service/backupgateway/api_op_PutHypervisorPropertyMappings.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutHypervisorPropertyMappingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutHypervisorPropertyMappingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_PutMaintenanceStartTime.go b/service/backupgateway/api_op_PutMaintenanceStartTime.go index 038f4592bb5..57ca2b666ca 100644 --- a/service/backupgateway/api_op_PutMaintenanceStartTime.go +++ b/service/backupgateway/api_op_PutMaintenanceStartTime.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutMaintenanceStartTimeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMaintenanceStartTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_StartVirtualMachinesMetadataSync.go b/service/backupgateway/api_op_StartVirtualMachinesMetadataSync.go index 38a8bbab370..23e2588860d 100644 --- a/service/backupgateway/api_op_StartVirtualMachinesMetadataSync.go +++ b/service/backupgateway/api_op_StartVirtualMachinesMetadataSync.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStartVirtualMachinesMetadataSyncMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartVirtualMachinesMetadataSyncValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_TagResource.go b/service/backupgateway/api_op_TagResource.go index 6d33aaceb0b..c0f13428bcc 100644 --- a/service/backupgateway/api_op_TagResource.go +++ b/service/backupgateway/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_TestHypervisorConfiguration.go b/service/backupgateway/api_op_TestHypervisorConfiguration.go index fac0166b3fa..4f07d332f0a 100644 --- a/service/backupgateway/api_op_TestHypervisorConfiguration.go +++ b/service/backupgateway/api_op_TestHypervisorConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTestHypervisorConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestHypervisorConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_UntagResource.go b/service/backupgateway/api_op_UntagResource.go index 19859b873fe..e2041e41446 100644 --- a/service/backupgateway/api_op_UntagResource.go +++ b/service/backupgateway/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_UpdateGatewayInformation.go b/service/backupgateway/api_op_UpdateGatewayInformation.go index dc396a6c0ae..66b12933356 100644 --- a/service/backupgateway/api_op_UpdateGatewayInformation.go +++ b/service/backupgateway/api_op_UpdateGatewayInformation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateGatewayInformationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGatewayInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_UpdateGatewaySoftwareNow.go b/service/backupgateway/api_op_UpdateGatewaySoftwareNow.go index 30113327785..3cbd7fd261e 100644 --- a/service/backupgateway/api_op_UpdateGatewaySoftwareNow.go +++ b/service/backupgateway/api_op_UpdateGatewaySoftwareNow.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateGatewaySoftwareNowMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGatewaySoftwareNowValidationMiddleware(stack); err != nil { return err } diff --git a/service/backupgateway/api_op_UpdateHypervisor.go b/service/backupgateway/api_op_UpdateHypervisor.go index 22dd63cdfbd..bc19cf43fc4 100644 --- a/service/backupgateway/api_op_UpdateHypervisor.go +++ b/service/backupgateway/api_op_UpdateHypervisor.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateHypervisorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHypervisorValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_client.go b/service/batch/api_client.go index 3a55073eeba..c86ead4a196 100644 --- a/service/batch/api_client.go +++ b/service/batch/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/batch/api_op_CancelJob.go b/service/batch/api_op_CancelJob.go index 36934bcfef4..ef72787f34d 100644 --- a/service/batch/api_op_CancelJob.go +++ b/service/batch/api_op_CancelJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_CreateComputeEnvironment.go b/service/batch/api_op_CreateComputeEnvironment.go index 2a9e504915e..527d70124fd 100644 --- a/service/batch/api_op_CreateComputeEnvironment.go +++ b/service/batch/api_op_CreateComputeEnvironment.go @@ -287,6 +287,9 @@ func (c *Client) addOperationCreateComputeEnvironmentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateComputeEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_CreateJobQueue.go b/service/batch/api_op_CreateJobQueue.go index d678b01abe4..ae551a64d00 100644 --- a/service/batch/api_op_CreateJobQueue.go +++ b/service/batch/api_op_CreateJobQueue.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateJobQueueMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_CreateSchedulingPolicy.go b/service/batch/api_op_CreateSchedulingPolicy.go index dcb195201ce..8badc1a5711 100644 --- a/service/batch/api_op_CreateSchedulingPolicy.go +++ b/service/batch/api_op_CreateSchedulingPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateSchedulingPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSchedulingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_DeleteComputeEnvironment.go b/service/batch/api_op_DeleteComputeEnvironment.go index 74abdfbbec1..54d3d6463b6 100644 --- a/service/batch/api_op_DeleteComputeEnvironment.go +++ b/service/batch/api_op_DeleteComputeEnvironment.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteComputeEnvironmentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteComputeEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_DeleteJobQueue.go b/service/batch/api_op_DeleteJobQueue.go index ebd8d42cad6..f4f483f6b5e 100644 --- a/service/batch/api_op_DeleteJobQueue.go +++ b/service/batch/api_op_DeleteJobQueue.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteJobQueueMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_DeleteSchedulingPolicy.go b/service/batch/api_op_DeleteSchedulingPolicy.go index cbe6f3e41f6..f449eeb1a5e 100644 --- a/service/batch/api_op_DeleteSchedulingPolicy.go +++ b/service/batch/api_op_DeleteSchedulingPolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSchedulingPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchedulingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_DeregisterJobDefinition.go b/service/batch/api_op_DeregisterJobDefinition.go index 47a44ddfc21..9ca2ee82882 100644 --- a/service/batch/api_op_DeregisterJobDefinition.go +++ b/service/batch/api_op_DeregisterJobDefinition.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeregisterJobDefinitionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_DescribeComputeEnvironments.go b/service/batch/api_op_DescribeComputeEnvironments.go index 5b932bf07bc..d785ac15e1c 100644 --- a/service/batch/api_op_DescribeComputeEnvironments.go +++ b/service/batch/api_op_DescribeComputeEnvironments.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeComputeEnvironmentsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeComputeEnvironments(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeComputeEnvironmentsMiddlewares(stack *middl return nil } -// DescribeComputeEnvironmentsAPIClient is a client that implements the -// DescribeComputeEnvironments operation. -type DescribeComputeEnvironmentsAPIClient interface { - DescribeComputeEnvironments(context.Context, *DescribeComputeEnvironmentsInput, ...func(*Options)) (*DescribeComputeEnvironmentsOutput, error) -} - -var _ DescribeComputeEnvironmentsAPIClient = (*Client)(nil) - // DescribeComputeEnvironmentsPaginatorOptions is the paginator options for // DescribeComputeEnvironments type DescribeComputeEnvironmentsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeComputeEnvironmentsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeComputeEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeComputeEnvironmentsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeComputeEnvironmentsAPIClient is a client that implements the +// DescribeComputeEnvironments operation. +type DescribeComputeEnvironmentsAPIClient interface { + DescribeComputeEnvironments(context.Context, *DescribeComputeEnvironmentsInput, ...func(*Options)) (*DescribeComputeEnvironmentsOutput, error) +} + +var _ DescribeComputeEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeComputeEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/batch/api_op_DescribeJobDefinitions.go b/service/batch/api_op_DescribeJobDefinitions.go index f2e5f71df15..db7ce8faae0 100644 --- a/service/batch/api_op_DescribeJobDefinitions.go +++ b/service/batch/api_op_DescribeJobDefinitions.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeJobDefinitionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJobDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeJobDefinitionsMiddlewares(stack *middleware return nil } -// DescribeJobDefinitionsAPIClient is a client that implements the -// DescribeJobDefinitions operation. -type DescribeJobDefinitionsAPIClient interface { - DescribeJobDefinitions(context.Context, *DescribeJobDefinitionsInput, ...func(*Options)) (*DescribeJobDefinitionsOutput, error) -} - -var _ DescribeJobDefinitionsAPIClient = (*Client)(nil) - // DescribeJobDefinitionsPaginatorOptions is the paginator options for // DescribeJobDefinitions type DescribeJobDefinitionsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeJobDefinitionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeJobDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeJobDefinitionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeJobDefinitionsAPIClient is a client that implements the +// DescribeJobDefinitions operation. +type DescribeJobDefinitionsAPIClient interface { + DescribeJobDefinitions(context.Context, *DescribeJobDefinitionsInput, ...func(*Options)) (*DescribeJobDefinitionsOutput, error) +} + +var _ DescribeJobDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeJobDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/batch/api_op_DescribeJobQueues.go b/service/batch/api_op_DescribeJobQueues.go index 0fc9e9a6b0a..06470fd4cc8 100644 --- a/service/batch/api_op_DescribeJobQueues.go +++ b/service/batch/api_op_DescribeJobQueues.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeJobQueuesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJobQueues(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeJobQueuesMiddlewares(stack *middleware.Stac return nil } -// DescribeJobQueuesAPIClient is a client that implements the DescribeJobQueues -// operation. -type DescribeJobQueuesAPIClient interface { - DescribeJobQueues(context.Context, *DescribeJobQueuesInput, ...func(*Options)) (*DescribeJobQueuesOutput, error) -} - -var _ DescribeJobQueuesAPIClient = (*Client)(nil) - // DescribeJobQueuesPaginatorOptions is the paginator options for DescribeJobQueues type DescribeJobQueuesPaginatorOptions struct { // The maximum number of results returned by DescribeJobQueues in paginated @@ -229,6 +224,9 @@ func (p *DescribeJobQueuesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeJobQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeJobQueuesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeJobQueuesAPIClient is a client that implements the DescribeJobQueues +// operation. +type DescribeJobQueuesAPIClient interface { + DescribeJobQueues(context.Context, *DescribeJobQueuesInput, ...func(*Options)) (*DescribeJobQueuesOutput, error) +} + +var _ DescribeJobQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeJobQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/batch/api_op_DescribeJobs.go b/service/batch/api_op_DescribeJobs.go index 925b7d7e633..22abf9220fb 100644 --- a/service/batch/api_op_DescribeJobs.go +++ b/service/batch/api_op_DescribeJobs.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeJobsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_DescribeSchedulingPolicies.go b/service/batch/api_op_DescribeSchedulingPolicies.go index ae95104af03..1b0f691bdfa 100644 --- a/service/batch/api_op_DescribeSchedulingPolicies.go +++ b/service/batch/api_op_DescribeSchedulingPolicies.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeSchedulingPoliciesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSchedulingPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_GetJobQueueSnapshot.go b/service/batch/api_op_GetJobQueueSnapshot.go index 6ed3b4adafa..fcdc70c4ae0 100644 --- a/service/batch/api_op_GetJobQueueSnapshot.go +++ b/service/batch/api_op_GetJobQueueSnapshot.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetJobQueueSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobQueueSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_ListJobs.go b/service/batch/api_op_ListJobs.go index 561adb3e40a..30974dbc774 100644 --- a/service/batch/api_op_ListJobs.go +++ b/service/batch/api_op_ListJobs.go @@ -202,6 +202,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -223,13 +226,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of results returned by ListJobs in a paginated output. When @@ -308,6 +304,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -327,6 +326,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/batch/api_op_ListSchedulingPolicies.go b/service/batch/api_op_ListSchedulingPolicies.go index 990e977d0cb..8ede0d8894b 100644 --- a/service/batch/api_op_ListSchedulingPolicies.go +++ b/service/batch/api_op_ListSchedulingPolicies.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListSchedulingPoliciesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchedulingPolicies(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListSchedulingPoliciesMiddlewares(stack *middleware return nil } -// ListSchedulingPoliciesAPIClient is a client that implements the -// ListSchedulingPolicies operation. -type ListSchedulingPoliciesAPIClient interface { - ListSchedulingPolicies(context.Context, *ListSchedulingPoliciesInput, ...func(*Options)) (*ListSchedulingPoliciesOutput, error) -} - -var _ ListSchedulingPoliciesAPIClient = (*Client)(nil) - // ListSchedulingPoliciesPaginatorOptions is the paginator options for // ListSchedulingPolicies type ListSchedulingPoliciesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListSchedulingPoliciesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchedulingPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListSchedulingPoliciesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSchedulingPoliciesAPIClient is a client that implements the +// ListSchedulingPolicies operation. +type ListSchedulingPoliciesAPIClient interface { + ListSchedulingPolicies(context.Context, *ListSchedulingPoliciesInput, ...func(*Options)) (*ListSchedulingPoliciesOutput, error) +} + +var _ ListSchedulingPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchedulingPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/batch/api_op_ListTagsForResource.go b/service/batch/api_op_ListTagsForResource.go index 6ea2b295794..81995482308 100644 --- a/service/batch/api_op_ListTagsForResource.go +++ b/service/batch/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_RegisterJobDefinition.go b/service/batch/api_op_RegisterJobDefinition.go index 9e437341672..67f8f2c4db0 100644 --- a/service/batch/api_op_RegisterJobDefinition.go +++ b/service/batch/api_op_RegisterJobDefinition.go @@ -221,6 +221,9 @@ func (c *Client) addOperationRegisterJobDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_SubmitJob.go b/service/batch/api_op_SubmitJob.go index 64d33718f77..836fc5dc387 100644 --- a/service/batch/api_op_SubmitJob.go +++ b/service/batch/api_op_SubmitJob.go @@ -241,6 +241,9 @@ func (c *Client) addOperationSubmitJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_TagResource.go b/service/batch/api_op_TagResource.go index 7009476674d..13d64b58e9b 100644 --- a/service/batch/api_op_TagResource.go +++ b/service/batch/api_op_TagResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_TerminateJob.go b/service/batch/api_op_TerminateJob.go index 21c536de57f..60fee4e876c 100644 --- a/service/batch/api_op_TerminateJob.go +++ b/service/batch/api_op_TerminateJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTerminateJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_UntagResource.go b/service/batch/api_op_UntagResource.go index 4ca4fa6027a..6664e221271 100644 --- a/service/batch/api_op_UntagResource.go +++ b/service/batch/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_UpdateComputeEnvironment.go b/service/batch/api_op_UpdateComputeEnvironment.go index 147ca82687e..cab595b2bfd 100644 --- a/service/batch/api_op_UpdateComputeEnvironment.go +++ b/service/batch/api_op_UpdateComputeEnvironment.go @@ -183,6 +183,9 @@ func (c *Client) addOperationUpdateComputeEnvironmentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateComputeEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_UpdateJobQueue.go b/service/batch/api_op_UpdateJobQueue.go index 84fe9483dad..1b928b5d70e 100644 --- a/service/batch/api_op_UpdateJobQueue.go +++ b/service/batch/api_op_UpdateJobQueue.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateJobQueueMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/batch/api_op_UpdateSchedulingPolicy.go b/service/batch/api_op_UpdateSchedulingPolicy.go index 6067c7f092e..b49272b4b7c 100644 --- a/service/batch/api_op_UpdateSchedulingPolicy.go +++ b/service/batch/api_op_UpdateSchedulingPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateSchedulingPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSchedulingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_client.go b/service/bcmdataexports/api_client.go index c1b0a438464..ac97d29201c 100644 --- a/service/bcmdataexports/api_client.go +++ b/service/bcmdataexports/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/bcmdataexports/api_op_CreateExport.go b/service/bcmdataexports/api_op_CreateExport.go index 82f85d6dc37..8796ba79b04 100644 --- a/service/bcmdataexports/api_op_CreateExport.go +++ b/service/bcmdataexports/api_op_CreateExport.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateExportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_DeleteExport.go b/service/bcmdataexports/api_op_DeleteExport.go index 777ba5d7297..efdae4e68f7 100644 --- a/service/bcmdataexports/api_op_DeleteExport.go +++ b/service/bcmdataexports/api_op_DeleteExport.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteExportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_GetExecution.go b/service/bcmdataexports/api_op_GetExecution.go index 77c3bd6359d..30ab4be592d 100644 --- a/service/bcmdataexports/api_op_GetExecution.go +++ b/service/bcmdataexports/api_op_GetExecution.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetExecutionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_GetExport.go b/service/bcmdataexports/api_op_GetExport.go index 8f9b2a92ba0..3f88a1561ee 100644 --- a/service/bcmdataexports/api_op_GetExport.go +++ b/service/bcmdataexports/api_op_GetExport.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetExportMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_GetTable.go b/service/bcmdataexports/api_op_GetTable.go index 5031d0b0e46..c3fb4d56aed 100644 --- a/service/bcmdataexports/api_op_GetTable.go +++ b/service/bcmdataexports/api_op_GetTable.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetTableMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_ListExecutions.go b/service/bcmdataexports/api_op_ListExecutions.go index 0402e321855..11a272681e6 100644 --- a/service/bcmdataexports/api_op_ListExecutions.go +++ b/service/bcmdataexports/api_op_ListExecutions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExecutionsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, return nil } -// ListExecutionsAPIClient is a client that implements the ListExecutions -// operation. -type ListExecutionsAPIClient interface { - ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) -} - -var _ ListExecutionsAPIClient = (*Client)(nil) - // ListExecutionsPaginatorOptions is the paginator options for ListExecutions type ListExecutionsPaginatorOptions struct { // The maximum number of objects that are returned for the request. @@ -210,6 +205,9 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExecutionsAPIClient is a client that implements the ListExecutions +// operation. +type ListExecutionsAPIClient interface { + ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) +} + +var _ ListExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bcmdataexports/api_op_ListExports.go b/service/bcmdataexports/api_op_ListExports.go index ef1115b160f..a639da64c68 100644 --- a/service/bcmdataexports/api_op_ListExports.go +++ b/service/bcmdataexports/api_op_ListExports.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExports(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListExportsAPIClient is a client that implements the ListExports operation. -type ListExportsAPIClient interface { - ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) -} - -var _ ListExportsAPIClient = (*Client)(nil) - // ListExportsPaginatorOptions is the paginator options for ListExports type ListExportsPaginatorOptions struct { // The maximum number of objects that are returned for the request. @@ -201,6 +197,9 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListExportsAPIClient is a client that implements the ListExports operation. +type ListExportsAPIClient interface { + ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) +} + +var _ ListExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bcmdataexports/api_op_ListTables.go b/service/bcmdataexports/api_op_ListTables.go index ea9a53e1997..b3865b3931c 100644 --- a/service/bcmdataexports/api_op_ListTables.go +++ b/service/bcmdataexports/api_op_ListTables.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTables(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti return nil } -// ListTablesAPIClient is a client that implements the ListTables operation. -type ListTablesAPIClient interface { - ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) -} - -var _ ListTablesAPIClient = (*Client)(nil) - // ListTablesPaginatorOptions is the paginator options for ListTables type ListTablesPaginatorOptions struct { // The maximum number of objects that are returned for the request. @@ -201,6 +197,9 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTablesAPIClient is a client that implements the ListTables operation. +type ListTablesAPIClient interface { + ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) +} + +var _ ListTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bcmdataexports/api_op_ListTagsForResource.go b/service/bcmdataexports/api_op_ListTagsForResource.go index daecbc202a5..53eaf19483b 100644 --- a/service/bcmdataexports/api_op_ListTagsForResource.go +++ b/service/bcmdataexports/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_TagResource.go b/service/bcmdataexports/api_op_TagResource.go index 2b125b3548d..0e321d6426f 100644 --- a/service/bcmdataexports/api_op_TagResource.go +++ b/service/bcmdataexports/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_UntagResource.go b/service/bcmdataexports/api_op_UntagResource.go index 1ae2272595c..73b48e86ee8 100644 --- a/service/bcmdataexports/api_op_UntagResource.go +++ b/service/bcmdataexports/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bcmdataexports/api_op_UpdateExport.go b/service/bcmdataexports/api_op_UpdateExport.go index 106191be831..4012dbf0d4c 100644 --- a/service/bcmdataexports/api_op_UpdateExport.go +++ b/service/bcmdataexports/api_op_UpdateExport.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateExportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_client.go b/service/bedrock/api_client.go index 9b61f5c766e..cc70e0992a2 100644 --- a/service/bedrock/api_client.go +++ b/service/bedrock/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/bedrock/api_op_CreateEvaluationJob.go b/service/bedrock/api_op_CreateEvaluationJob.go index 1eb33d970ee..2e3c2201d40 100644 --- a/service/bedrock/api_op_CreateEvaluationJob.go +++ b/service/bedrock/api_op_CreateEvaluationJob.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateEvaluationJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEvaluationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrock/api_op_CreateGuardrail.go b/service/bedrock/api_op_CreateGuardrail.go index 5f9bb86a7e2..f68a54d0d6e 100644 --- a/service/bedrock/api_op_CreateGuardrail.go +++ b/service/bedrock/api_op_CreateGuardrail.go @@ -199,6 +199,9 @@ func (c *Client) addOperationCreateGuardrailMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateGuardrailMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrock/api_op_CreateGuardrailVersion.go b/service/bedrock/api_op_CreateGuardrailVersion.go index cb3ad849e25..a7aeaed3505 100644 --- a/service/bedrock/api_op_CreateGuardrailVersion.go +++ b/service/bedrock/api_op_CreateGuardrailVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateGuardrailVersionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateGuardrailVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrock/api_op_CreateModelCustomizationJob.go b/service/bedrock/api_op_CreateModelCustomizationJob.go index 16b7ff39225..217b4998019 100644 --- a/service/bedrock/api_op_CreateModelCustomizationJob.go +++ b/service/bedrock/api_op_CreateModelCustomizationJob.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateModelCustomizationJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateModelCustomizationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrock/api_op_CreateProvisionedModelThroughput.go b/service/bedrock/api_op_CreateProvisionedModelThroughput.go index c0919ccdb9e..20d190adfbc 100644 --- a/service/bedrock/api_op_CreateProvisionedModelThroughput.go +++ b/service/bedrock/api_op_CreateProvisionedModelThroughput.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateProvisionedModelThroughputMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProvisionedModelThroughputMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrock/api_op_DeleteCustomModel.go b/service/bedrock/api_op_DeleteCustomModel.go index 022940160ab..a7912376de9 100644 --- a/service/bedrock/api_op_DeleteCustomModel.go +++ b/service/bedrock/api_op_DeleteCustomModel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteCustomModelMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_DeleteGuardrail.go b/service/bedrock/api_op_DeleteGuardrail.go index e134f0d04c3..3d20b8bd8ea 100644 --- a/service/bedrock/api_op_DeleteGuardrail.go +++ b/service/bedrock/api_op_DeleteGuardrail.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteGuardrailMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGuardrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_DeleteModelInvocationLoggingConfiguration.go b/service/bedrock/api_op_DeleteModelInvocationLoggingConfiguration.go index b709a29d622..01ee107ba2e 100644 --- a/service/bedrock/api_op_DeleteModelInvocationLoggingConfiguration.go +++ b/service/bedrock/api_op_DeleteModelInvocationLoggingConfiguration.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteModelInvocationLoggingConfigurationMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteModelInvocationLoggingConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/bedrock/api_op_DeleteProvisionedModelThroughput.go b/service/bedrock/api_op_DeleteProvisionedModelThroughput.go index 1dffe4de62f..a72e5c9e6cc 100644 --- a/service/bedrock/api_op_DeleteProvisionedModelThroughput.go +++ b/service/bedrock/api_op_DeleteProvisionedModelThroughput.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteProvisionedModelThroughputMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProvisionedModelThroughputValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_GetCustomModel.go b/service/bedrock/api_op_GetCustomModel.go index 38006d65582..6ba0399e1a0 100644 --- a/service/bedrock/api_op_GetCustomModel.go +++ b/service/bedrock/api_op_GetCustomModel.go @@ -166,6 +166,9 @@ func (c *Client) addOperationGetCustomModelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_GetEvaluationJob.go b/service/bedrock/api_op_GetEvaluationJob.go index 8eed738dea1..a7d0f4a055a 100644 --- a/service/bedrock/api_op_GetEvaluationJob.go +++ b/service/bedrock/api_op_GetEvaluationJob.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetEvaluationJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvaluationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_GetFoundationModel.go b/service/bedrock/api_op_GetFoundationModel.go index 875d5839515..30d973903b9 100644 --- a/service/bedrock/api_op_GetFoundationModel.go +++ b/service/bedrock/api_op_GetFoundationModel.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetFoundationModelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFoundationModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_GetGuardrail.go b/service/bedrock/api_op_GetGuardrail.go index 97bfd236a01..8f9d45ac6c9 100644 --- a/service/bedrock/api_op_GetGuardrail.go +++ b/service/bedrock/api_op_GetGuardrail.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetGuardrailMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGuardrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_GetModelCustomizationJob.go b/service/bedrock/api_op_GetModelCustomizationJob.go index 13f550cd144..535f5e2cdbc 100644 --- a/service/bedrock/api_op_GetModelCustomizationJob.go +++ b/service/bedrock/api_op_GetModelCustomizationJob.go @@ -196,6 +196,9 @@ func (c *Client) addOperationGetModelCustomizationJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelCustomizationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_GetModelInvocationLoggingConfiguration.go b/service/bedrock/api_op_GetModelInvocationLoggingConfiguration.go index 9e5b978cb83..d98996fe538 100644 --- a/service/bedrock/api_op_GetModelInvocationLoggingConfiguration.go +++ b/service/bedrock/api_op_GetModelInvocationLoggingConfiguration.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetModelInvocationLoggingConfigurationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetModelInvocationLoggingConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/bedrock/api_op_GetProvisionedModelThroughput.go b/service/bedrock/api_op_GetProvisionedModelThroughput.go index 58d43505f2f..41e0e140440 100644 --- a/service/bedrock/api_op_GetProvisionedModelThroughput.go +++ b/service/bedrock/api_op_GetProvisionedModelThroughput.go @@ -173,6 +173,9 @@ func (c *Client) addOperationGetProvisionedModelThroughputMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProvisionedModelThroughputValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_ListCustomModels.go b/service/bedrock/api_op_ListCustomModels.go index 22c04c21b49..c8fceca93b1 100644 --- a/service/bedrock/api_op_ListCustomModels.go +++ b/service/bedrock/api_op_ListCustomModels.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListCustomModelsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomModels(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListCustomModelsMiddlewares(stack *middleware.Stack return nil } -// ListCustomModelsAPIClient is a client that implements the ListCustomModels -// operation. -type ListCustomModelsAPIClient interface { - ListCustomModels(context.Context, *ListCustomModelsInput, ...func(*Options)) (*ListCustomModelsOutput, error) -} - -var _ ListCustomModelsAPIClient = (*Client)(nil) - // ListCustomModelsPaginatorOptions is the paginator options for ListCustomModels type ListCustomModelsPaginatorOptions struct { // Maximum number of results to return in the response. @@ -232,6 +227,9 @@ func (p *ListCustomModelsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListCustomModelsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCustomModelsAPIClient is a client that implements the ListCustomModels +// operation. +type ListCustomModelsAPIClient interface { + ListCustomModels(context.Context, *ListCustomModelsInput, ...func(*Options)) (*ListCustomModelsOutput, error) +} + +var _ ListCustomModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrock/api_op_ListEvaluationJobs.go b/service/bedrock/api_op_ListEvaluationJobs.go index addae3dbcfe..59e160bf8a4 100644 --- a/service/bedrock/api_op_ListEvaluationJobs.go +++ b/service/bedrock/api_op_ListEvaluationJobs.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListEvaluationJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEvaluationJobs(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListEvaluationJobsMiddlewares(stack *middleware.Sta return nil } -// ListEvaluationJobsAPIClient is a client that implements the ListEvaluationJobs -// operation. -type ListEvaluationJobsAPIClient interface { - ListEvaluationJobs(context.Context, *ListEvaluationJobsInput, ...func(*Options)) (*ListEvaluationJobsOutput, error) -} - -var _ ListEvaluationJobsAPIClient = (*Client)(nil) - // ListEvaluationJobsPaginatorOptions is the paginator options for // ListEvaluationJobs type ListEvaluationJobsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListEvaluationJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEvaluationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListEvaluationJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEvaluationJobsAPIClient is a client that implements the ListEvaluationJobs +// operation. +type ListEvaluationJobsAPIClient interface { + ListEvaluationJobs(context.Context, *ListEvaluationJobsInput, ...func(*Options)) (*ListEvaluationJobsOutput, error) +} + +var _ ListEvaluationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEvaluationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrock/api_op_ListFoundationModels.go b/service/bedrock/api_op_ListFoundationModels.go index dbc1beddd5d..a0ac0498a3c 100644 --- a/service/bedrock/api_op_ListFoundationModels.go +++ b/service/bedrock/api_op_ListFoundationModels.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListFoundationModelsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFoundationModels(options.Region), middleware.Before); err != nil { return err } diff --git a/service/bedrock/api_op_ListGuardrails.go b/service/bedrock/api_op_ListGuardrails.go index 8842a7bbbd0..fe130faacd8 100644 --- a/service/bedrock/api_op_ListGuardrails.go +++ b/service/bedrock/api_op_ListGuardrails.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListGuardrailsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGuardrails(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListGuardrailsMiddlewares(stack *middleware.Stack, return nil } -// ListGuardrailsAPIClient is a client that implements the ListGuardrails -// operation. -type ListGuardrailsAPIClient interface { - ListGuardrails(context.Context, *ListGuardrailsInput, ...func(*Options)) (*ListGuardrailsOutput, error) -} - -var _ ListGuardrailsAPIClient = (*Client)(nil) - // ListGuardrailsPaginatorOptions is the paginator options for ListGuardrails type ListGuardrailsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -219,6 +214,9 @@ func (p *ListGuardrailsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGuardrails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListGuardrailsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListGuardrailsAPIClient is a client that implements the ListGuardrails +// operation. +type ListGuardrailsAPIClient interface { + ListGuardrails(context.Context, *ListGuardrailsInput, ...func(*Options)) (*ListGuardrailsOutput, error) +} + +var _ ListGuardrailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGuardrails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrock/api_op_ListModelCustomizationJobs.go b/service/bedrock/api_op_ListModelCustomizationJobs.go index 69b9b8fc2d2..bfe8d4f3894 100644 --- a/service/bedrock/api_op_ListModelCustomizationJobs.go +++ b/service/bedrock/api_op_ListModelCustomizationJobs.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListModelCustomizationJobsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelCustomizationJobs(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListModelCustomizationJobsMiddlewares(stack *middle return nil } -// ListModelCustomizationJobsAPIClient is a client that implements the -// ListModelCustomizationJobs operation. -type ListModelCustomizationJobsAPIClient interface { - ListModelCustomizationJobs(context.Context, *ListModelCustomizationJobsInput, ...func(*Options)) (*ListModelCustomizationJobsOutput, error) -} - -var _ ListModelCustomizationJobsAPIClient = (*Client)(nil) - // ListModelCustomizationJobsPaginatorOptions is the paginator options for // ListModelCustomizationJobs type ListModelCustomizationJobsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListModelCustomizationJobsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelCustomizationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListModelCustomizationJobsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListModelCustomizationJobsAPIClient is a client that implements the +// ListModelCustomizationJobs operation. +type ListModelCustomizationJobsAPIClient interface { + ListModelCustomizationJobs(context.Context, *ListModelCustomizationJobsInput, ...func(*Options)) (*ListModelCustomizationJobsOutput, error) +} + +var _ ListModelCustomizationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelCustomizationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrock/api_op_ListProvisionedModelThroughputs.go b/service/bedrock/api_op_ListProvisionedModelThroughputs.go index 7cea164acfa..4d071c773be 100644 --- a/service/bedrock/api_op_ListProvisionedModelThroughputs.go +++ b/service/bedrock/api_op_ListProvisionedModelThroughputs.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListProvisionedModelThroughputsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProvisionedModelThroughputs(options.Region), middleware.Before); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListProvisionedModelThroughputsMiddlewares(stack *m return nil } -// ListProvisionedModelThroughputsAPIClient is a client that implements the -// ListProvisionedModelThroughputs operation. -type ListProvisionedModelThroughputsAPIClient interface { - ListProvisionedModelThroughputs(context.Context, *ListProvisionedModelThroughputsInput, ...func(*Options)) (*ListProvisionedModelThroughputsOutput, error) -} - -var _ ListProvisionedModelThroughputsAPIClient = (*Client)(nil) - // ListProvisionedModelThroughputsPaginatorOptions is the paginator options for // ListProvisionedModelThroughputs type ListProvisionedModelThroughputsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *ListProvisionedModelThroughputsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProvisionedModelThroughputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *ListProvisionedModelThroughputsPaginator) NextPage(ctx context.Context, return result, nil } +// ListProvisionedModelThroughputsAPIClient is a client that implements the +// ListProvisionedModelThroughputs operation. +type ListProvisionedModelThroughputsAPIClient interface { + ListProvisionedModelThroughputs(context.Context, *ListProvisionedModelThroughputsInput, ...func(*Options)) (*ListProvisionedModelThroughputsOutput, error) +} + +var _ ListProvisionedModelThroughputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProvisionedModelThroughputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrock/api_op_ListTagsForResource.go b/service/bedrock/api_op_ListTagsForResource.go index c54a431d721..c9438baafa1 100644 --- a/service/bedrock/api_op_ListTagsForResource.go +++ b/service/bedrock/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_PutModelInvocationLoggingConfiguration.go b/service/bedrock/api_op_PutModelInvocationLoggingConfiguration.go index ff703f09921..a977ef33ec7 100644 --- a/service/bedrock/api_op_PutModelInvocationLoggingConfiguration.go +++ b/service/bedrock/api_op_PutModelInvocationLoggingConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPutModelInvocationLoggingConfigurationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutModelInvocationLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_StopEvaluationJob.go b/service/bedrock/api_op_StopEvaluationJob.go index 55d9a14d687..757b0a8c08a 100644 --- a/service/bedrock/api_op_StopEvaluationJob.go +++ b/service/bedrock/api_op_StopEvaluationJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopEvaluationJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEvaluationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_StopModelCustomizationJob.go b/service/bedrock/api_op_StopModelCustomizationJob.go index 041f0acf286..abd139013ac 100644 --- a/service/bedrock/api_op_StopModelCustomizationJob.go +++ b/service/bedrock/api_op_StopModelCustomizationJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStopModelCustomizationJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopModelCustomizationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_TagResource.go b/service/bedrock/api_op_TagResource.go index 6de3958b1a3..0b8de9c9a0e 100644 --- a/service/bedrock/api_op_TagResource.go +++ b/service/bedrock/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_UntagResource.go b/service/bedrock/api_op_UntagResource.go index da42c0d4f1b..e420d5e9232 100644 --- a/service/bedrock/api_op_UntagResource.go +++ b/service/bedrock/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_UpdateGuardrail.go b/service/bedrock/api_op_UpdateGuardrail.go index d6e7ac52372..daeb3d12e45 100644 --- a/service/bedrock/api_op_UpdateGuardrail.go +++ b/service/bedrock/api_op_UpdateGuardrail.go @@ -193,6 +193,9 @@ func (c *Client) addOperationUpdateGuardrailMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGuardrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrock/api_op_UpdateProvisionedModelThroughput.go b/service/bedrock/api_op_UpdateProvisionedModelThroughput.go index 19424d67efc..1f9557f41f9 100644 --- a/service/bedrock/api_op_UpdateProvisionedModelThroughput.go +++ b/service/bedrock/api_op_UpdateProvisionedModelThroughput.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateProvisionedModelThroughputMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProvisionedModelThroughputValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_client.go b/service/bedrockagent/api_client.go index 8ddc6d92d9a..6743cae3439 100644 --- a/service/bedrockagent/api_client.go +++ b/service/bedrockagent/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/bedrockagent/api_op_AssociateAgentKnowledgeBase.go b/service/bedrockagent/api_op_AssociateAgentKnowledgeBase.go index 94712d061ed..ee0f5b20cb9 100644 --- a/service/bedrockagent/api_op_AssociateAgentKnowledgeBase.go +++ b/service/bedrockagent/api_op_AssociateAgentKnowledgeBase.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAssociateAgentKnowledgeBaseMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAgentKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_CreateAgent.go b/service/bedrockagent/api_op_CreateAgent.go index dc4bd4d41c5..1221d229891 100644 --- a/service/bedrockagent/api_op_CreateAgent.go +++ b/service/bedrockagent/api_op_CreateAgent.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAgentMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrockagent/api_op_CreateAgentActionGroup.go b/service/bedrockagent/api_op_CreateAgentActionGroup.go index f0c946e885e..43f8174a94d 100644 --- a/service/bedrockagent/api_op_CreateAgentActionGroup.go +++ b/service/bedrockagent/api_op_CreateAgentActionGroup.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateAgentActionGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAgentActionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrockagent/api_op_CreateAgentAlias.go b/service/bedrockagent/api_op_CreateAgentAlias.go index cddfc766976..f9494f7ab50 100644 --- a/service/bedrockagent/api_op_CreateAgentAlias.go +++ b/service/bedrockagent/api_op_CreateAgentAlias.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateAgentAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAgentAliasMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrockagent/api_op_CreateDataSource.go b/service/bedrockagent/api_op_CreateDataSource.go index c6965fbecb8..ccf25ecc33f 100644 --- a/service/bedrockagent/api_op_CreateDataSource.go +++ b/service/bedrockagent/api_op_CreateDataSource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataSourceMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrockagent/api_op_CreateKnowledgeBase.go b/service/bedrockagent/api_op_CreateKnowledgeBase.go index b419a9ff4f9..cb5fad1dae9 100644 --- a/service/bedrockagent/api_op_CreateKnowledgeBase.go +++ b/service/bedrockagent/api_op_CreateKnowledgeBase.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKnowledgeBaseMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrockagent/api_op_DeleteAgent.go b/service/bedrockagent/api_op_DeleteAgent.go index d7e732e072d..c52d198d733 100644 --- a/service/bedrockagent/api_op_DeleteAgent.go +++ b/service/bedrockagent/api_op_DeleteAgent.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_DeleteAgentActionGroup.go b/service/bedrockagent/api_op_DeleteAgentActionGroup.go index 2d8acdefcc9..e3d736c0885 100644 --- a/service/bedrockagent/api_op_DeleteAgentActionGroup.go +++ b/service/bedrockagent/api_op_DeleteAgentActionGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteAgentActionGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAgentActionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_DeleteAgentAlias.go b/service/bedrockagent/api_op_DeleteAgentAlias.go index 1db031f5a8f..ea612b7d2b2 100644 --- a/service/bedrockagent/api_op_DeleteAgentAlias.go +++ b/service/bedrockagent/api_op_DeleteAgentAlias.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteAgentAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAgentAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_DeleteAgentVersion.go b/service/bedrockagent/api_op_DeleteAgentVersion.go index 4d85e120ba9..3649ac7b158 100644 --- a/service/bedrockagent/api_op_DeleteAgentVersion.go +++ b/service/bedrockagent/api_op_DeleteAgentVersion.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteAgentVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAgentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_DeleteDataSource.go b/service/bedrockagent/api_op_DeleteDataSource.go index cae2823d6bc..83360c87ffe 100644 --- a/service/bedrockagent/api_op_DeleteDataSource.go +++ b/service/bedrockagent/api_op_DeleteDataSource.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_DeleteKnowledgeBase.go b/service/bedrockagent/api_op_DeleteKnowledgeBase.go index 6af2d884cc8..c8f71ffe07b 100644 --- a/service/bedrockagent/api_op_DeleteKnowledgeBase.go +++ b/service/bedrockagent/api_op_DeleteKnowledgeBase.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_DisassociateAgentKnowledgeBase.go b/service/bedrockagent/api_op_DisassociateAgentKnowledgeBase.go index b92b1f00bc4..a61554c0e74 100644 --- a/service/bedrockagent/api_op_DisassociateAgentKnowledgeBase.go +++ b/service/bedrockagent/api_op_DisassociateAgentKnowledgeBase.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateAgentKnowledgeBaseMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAgentKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetAgent.go b/service/bedrockagent/api_op_GetAgent.go index f3d7800fa66..f6811fdb139 100644 --- a/service/bedrockagent/api_op_GetAgent.go +++ b/service/bedrockagent/api_op_GetAgent.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetAgentMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetAgentActionGroup.go b/service/bedrockagent/api_op_GetAgentActionGroup.go index 5007142f3ae..ff508847c60 100644 --- a/service/bedrockagent/api_op_GetAgentActionGroup.go +++ b/service/bedrockagent/api_op_GetAgentActionGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetAgentActionGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgentActionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetAgentAlias.go b/service/bedrockagent/api_op_GetAgentAlias.go index 31777296b67..200b757a64e 100644 --- a/service/bedrockagent/api_op_GetAgentAlias.go +++ b/service/bedrockagent/api_op_GetAgentAlias.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetAgentAliasMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgentAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetAgentKnowledgeBase.go b/service/bedrockagent/api_op_GetAgentKnowledgeBase.go index 20e49a28ae2..c86b4e9b8cf 100644 --- a/service/bedrockagent/api_op_GetAgentKnowledgeBase.go +++ b/service/bedrockagent/api_op_GetAgentKnowledgeBase.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetAgentKnowledgeBaseMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgentKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetAgentVersion.go b/service/bedrockagent/api_op_GetAgentVersion.go index aa5b173a785..7ff32966b9c 100644 --- a/service/bedrockagent/api_op_GetAgentVersion.go +++ b/service/bedrockagent/api_op_GetAgentVersion.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetAgentVersionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetDataSource.go b/service/bedrockagent/api_op_GetDataSource.go index 9b454c3653a..926cf8515c9 100644 --- a/service/bedrockagent/api_op_GetDataSource.go +++ b/service/bedrockagent/api_op_GetDataSource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetIngestionJob.go b/service/bedrockagent/api_op_GetIngestionJob.go index 1453a00987a..4ac6d29cf0d 100644 --- a/service/bedrockagent/api_op_GetIngestionJob.go +++ b/service/bedrockagent/api_op_GetIngestionJob.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetIngestionJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIngestionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_GetKnowledgeBase.go b/service/bedrockagent/api_op_GetKnowledgeBase.go index d1bb80a92dc..9217818307a 100644 --- a/service/bedrockagent/api_op_GetKnowledgeBase.go +++ b/service/bedrockagent/api_op_GetKnowledgeBase.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetKnowledgeBaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_ListAgentActionGroups.go b/service/bedrockagent/api_op_ListAgentActionGroups.go index 16dae505701..80431157f22 100644 --- a/service/bedrockagent/api_op_ListAgentActionGroups.go +++ b/service/bedrockagent/api_op_ListAgentActionGroups.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListAgentActionGroupsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAgentActionGroupsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListAgentActionGroupsMiddlewares(stack *middleware. return nil } -// ListAgentActionGroupsAPIClient is a client that implements the -// ListAgentActionGroups operation. -type ListAgentActionGroupsAPIClient interface { - ListAgentActionGroups(context.Context, *ListAgentActionGroupsInput, ...func(*Options)) (*ListAgentActionGroupsOutput, error) -} - -var _ ListAgentActionGroupsAPIClient = (*Client)(nil) - // ListAgentActionGroupsPaginatorOptions is the paginator options for // ListAgentActionGroups type ListAgentActionGroupsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListAgentActionGroupsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgentActionGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListAgentActionGroupsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAgentActionGroupsAPIClient is a client that implements the +// ListAgentActionGroups operation. +type ListAgentActionGroupsAPIClient interface { + ListAgentActionGroups(context.Context, *ListAgentActionGroupsInput, ...func(*Options)) (*ListAgentActionGroupsOutput, error) +} + +var _ ListAgentActionGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgentActionGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListAgentAliases.go b/service/bedrockagent/api_op_ListAgentAliases.go index ae6c936e5ed..5ec80ebabfd 100644 --- a/service/bedrockagent/api_op_ListAgentAliases.go +++ b/service/bedrockagent/api_op_ListAgentAliases.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAgentAliasesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAgentAliasesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListAgentAliasesMiddlewares(stack *middleware.Stack return nil } -// ListAgentAliasesAPIClient is a client that implements the ListAgentAliases -// operation. -type ListAgentAliasesAPIClient interface { - ListAgentAliases(context.Context, *ListAgentAliasesInput, ...func(*Options)) (*ListAgentAliasesOutput, error) -} - -var _ ListAgentAliasesAPIClient = (*Client)(nil) - // ListAgentAliasesPaginatorOptions is the paginator options for ListAgentAliases type ListAgentAliasesPaginatorOptions struct { // The maximum number of results to return in the response. If the total number of @@ -223,6 +218,9 @@ func (p *ListAgentAliasesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgentAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListAgentAliasesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAgentAliasesAPIClient is a client that implements the ListAgentAliases +// operation. +type ListAgentAliasesAPIClient interface { + ListAgentAliases(context.Context, *ListAgentAliasesInput, ...func(*Options)) (*ListAgentAliasesOutput, error) +} + +var _ ListAgentAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgentAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListAgentKnowledgeBases.go b/service/bedrockagent/api_op_ListAgentKnowledgeBases.go index d5eacd23e16..cef673b712d 100644 --- a/service/bedrockagent/api_op_ListAgentKnowledgeBases.go +++ b/service/bedrockagent/api_op_ListAgentKnowledgeBases.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListAgentKnowledgeBasesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAgentKnowledgeBasesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListAgentKnowledgeBasesMiddlewares(stack *middlewar return nil } -// ListAgentKnowledgeBasesAPIClient is a client that implements the -// ListAgentKnowledgeBases operation. -type ListAgentKnowledgeBasesAPIClient interface { - ListAgentKnowledgeBases(context.Context, *ListAgentKnowledgeBasesInput, ...func(*Options)) (*ListAgentKnowledgeBasesOutput, error) -} - -var _ ListAgentKnowledgeBasesAPIClient = (*Client)(nil) - // ListAgentKnowledgeBasesPaginatorOptions is the paginator options for // ListAgentKnowledgeBases type ListAgentKnowledgeBasesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListAgentKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgentKnowledgeBases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListAgentKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAgentKnowledgeBasesAPIClient is a client that implements the +// ListAgentKnowledgeBases operation. +type ListAgentKnowledgeBasesAPIClient interface { + ListAgentKnowledgeBases(context.Context, *ListAgentKnowledgeBasesInput, ...func(*Options)) (*ListAgentKnowledgeBasesOutput, error) +} + +var _ ListAgentKnowledgeBasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgentKnowledgeBases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListAgentVersions.go b/service/bedrockagent/api_op_ListAgentVersions.go index 3c7b6cbbdd3..065b5f8c78e 100644 --- a/service/bedrockagent/api_op_ListAgentVersions.go +++ b/service/bedrockagent/api_op_ListAgentVersions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAgentVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAgentVersionsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListAgentVersionsMiddlewares(stack *middleware.Stac return nil } -// ListAgentVersionsAPIClient is a client that implements the ListAgentVersions -// operation. -type ListAgentVersionsAPIClient interface { - ListAgentVersions(context.Context, *ListAgentVersionsInput, ...func(*Options)) (*ListAgentVersionsOutput, error) -} - -var _ ListAgentVersionsAPIClient = (*Client)(nil) - // ListAgentVersionsPaginatorOptions is the paginator options for ListAgentVersions type ListAgentVersionsPaginatorOptions struct { // The maximum number of results to return in the response. If the total number of @@ -223,6 +218,9 @@ func (p *ListAgentVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgentVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListAgentVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListAgentVersionsAPIClient is a client that implements the ListAgentVersions +// operation. +type ListAgentVersionsAPIClient interface { + ListAgentVersions(context.Context, *ListAgentVersionsInput, ...func(*Options)) (*ListAgentVersionsOutput, error) +} + +var _ ListAgentVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgentVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListAgents.go b/service/bedrockagent/api_op_ListAgents.go index e5d1b65b598..bcd5225d835 100644 --- a/service/bedrockagent/api_op_ListAgents.go +++ b/service/bedrockagent/api_op_ListAgents.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAgentsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAgents(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListAgentsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAgentsAPIClient is a client that implements the ListAgents operation. -type ListAgentsAPIClient interface { - ListAgents(context.Context, *ListAgentsInput, ...func(*Options)) (*ListAgentsOutput, error) -} - -var _ ListAgentsAPIClient = (*Client)(nil) - // ListAgentsPaginatorOptions is the paginator options for ListAgents type ListAgentsPaginatorOptions struct { // The maximum number of results to return in the response. If the total number of @@ -213,6 +209,9 @@ func (p *ListAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAgentsAPIClient is a client that implements the ListAgents operation. +type ListAgentsAPIClient interface { + ListAgents(context.Context, *ListAgentsInput, ...func(*Options)) (*ListAgentsOutput, error) +} + +var _ ListAgentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListDataSources.go b/service/bedrockagent/api_op_ListDataSources.go index 3a1680a0738..481f844ab6b 100644 --- a/service/bedrockagent/api_op_ListDataSources.go +++ b/service/bedrockagent/api_op_ListDataSources.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListDataSourcesAPIClient is a client that implements the ListDataSources -// operation. -type ListDataSourcesAPIClient interface { - ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) -} - -var _ ListDataSourcesAPIClient = (*Client)(nil) - // ListDataSourcesPaginatorOptions is the paginator options for ListDataSources type ListDataSourcesPaginatorOptions struct { // The maximum number of results to return in the response. If the total number of @@ -223,6 +218,9 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDataSourcesAPIClient is a client that implements the ListDataSources +// operation. +type ListDataSourcesAPIClient interface { + ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) +} + +var _ ListDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListIngestionJobs.go b/service/bedrockagent/api_op_ListIngestionJobs.go index 8370f37c741..bae15284d9d 100644 --- a/service/bedrockagent/api_op_ListIngestionJobs.go +++ b/service/bedrockagent/api_op_ListIngestionJobs.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListIngestionJobsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIngestionJobsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListIngestionJobsMiddlewares(stack *middleware.Stac return nil } -// ListIngestionJobsAPIClient is a client that implements the ListIngestionJobs -// operation. -type ListIngestionJobsAPIClient interface { - ListIngestionJobs(context.Context, *ListIngestionJobsInput, ...func(*Options)) (*ListIngestionJobsOutput, error) -} - -var _ ListIngestionJobsAPIClient = (*Client)(nil) - // ListIngestionJobsPaginatorOptions is the paginator options for ListIngestionJobs type ListIngestionJobsPaginatorOptions struct { // The maximum number of results to return in the response. If the total number of @@ -233,6 +228,9 @@ func (p *ListIngestionJobsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIngestionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListIngestionJobsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListIngestionJobsAPIClient is a client that implements the ListIngestionJobs +// operation. +type ListIngestionJobsAPIClient interface { + ListIngestionJobs(context.Context, *ListIngestionJobsInput, ...func(*Options)) (*ListIngestionJobsOutput, error) +} + +var _ ListIngestionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIngestionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListKnowledgeBases.go b/service/bedrockagent/api_op_ListKnowledgeBases.go index 305ea468069..8a25ae63718 100644 --- a/service/bedrockagent/api_op_ListKnowledgeBases.go +++ b/service/bedrockagent/api_op_ListKnowledgeBases.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListKnowledgeBasesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKnowledgeBases(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListKnowledgeBasesMiddlewares(stack *middleware.Sta return nil } -// ListKnowledgeBasesAPIClient is a client that implements the ListKnowledgeBases -// operation. -type ListKnowledgeBasesAPIClient interface { - ListKnowledgeBases(context.Context, *ListKnowledgeBasesInput, ...func(*Options)) (*ListKnowledgeBasesOutput, error) -} - -var _ ListKnowledgeBasesAPIClient = (*Client)(nil) - // ListKnowledgeBasesPaginatorOptions is the paginator options for // ListKnowledgeBases type ListKnowledgeBasesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKnowledgeBases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListKnowledgeBasesAPIClient is a client that implements the ListKnowledgeBases +// operation. +type ListKnowledgeBasesAPIClient interface { + ListKnowledgeBases(context.Context, *ListKnowledgeBasesInput, ...func(*Options)) (*ListKnowledgeBasesOutput, error) +} + +var _ ListKnowledgeBasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKnowledgeBases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagent/api_op_ListTagsForResource.go b/service/bedrockagent/api_op_ListTagsForResource.go index 1deebf9aba7..d45476104ba 100644 --- a/service/bedrockagent/api_op_ListTagsForResource.go +++ b/service/bedrockagent/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_PrepareAgent.go b/service/bedrockagent/api_op_PrepareAgent.go index b9278b1d084..48408937e6a 100644 --- a/service/bedrockagent/api_op_PrepareAgent.go +++ b/service/bedrockagent/api_op_PrepareAgent.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPrepareAgentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPrepareAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_StartIngestionJob.go b/service/bedrockagent/api_op_StartIngestionJob.go index 9b2672ab540..23709c077ef 100644 --- a/service/bedrockagent/api_op_StartIngestionJob.go +++ b/service/bedrockagent/api_op_StartIngestionJob.go @@ -123,6 +123,9 @@ func (c *Client) addOperationStartIngestionJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartIngestionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/bedrockagent/api_op_TagResource.go b/service/bedrockagent/api_op_TagResource.go index 7d52b9d5002..c92862a9c98 100644 --- a/service/bedrockagent/api_op_TagResource.go +++ b/service/bedrockagent/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UntagResource.go b/service/bedrockagent/api_op_UntagResource.go index f6611ae843e..42caa62485a 100644 --- a/service/bedrockagent/api_op_UntagResource.go +++ b/service/bedrockagent/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UpdateAgent.go b/service/bedrockagent/api_op_UpdateAgent.go index e3f454d7fc5..f83b37ddb9b 100644 --- a/service/bedrockagent/api_op_UpdateAgent.go +++ b/service/bedrockagent/api_op_UpdateAgent.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UpdateAgentActionGroup.go b/service/bedrockagent/api_op_UpdateAgentActionGroup.go index c454e8100f9..9c229b65039 100644 --- a/service/bedrockagent/api_op_UpdateAgentActionGroup.go +++ b/service/bedrockagent/api_op_UpdateAgentActionGroup.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateAgentActionGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentActionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UpdateAgentAlias.go b/service/bedrockagent/api_op_UpdateAgentAlias.go index 313ba7da4da..8a8a404b6ab 100644 --- a/service/bedrockagent/api_op_UpdateAgentAlias.go +++ b/service/bedrockagent/api_op_UpdateAgentAlias.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateAgentAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UpdateAgentKnowledgeBase.go b/service/bedrockagent/api_op_UpdateAgentKnowledgeBase.go index 2d99cab3693..cb9f1f2e07e 100644 --- a/service/bedrockagent/api_op_UpdateAgentKnowledgeBase.go +++ b/service/bedrockagent/api_op_UpdateAgentKnowledgeBase.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateAgentKnowledgeBaseMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UpdateDataSource.go b/service/bedrockagent/api_op_UpdateDataSource.go index ef2eba1ea5d..86a8b33dc59 100644 --- a/service/bedrockagent/api_op_UpdateDataSource.go +++ b/service/bedrockagent/api_op_UpdateDataSource.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagent/api_op_UpdateKnowledgeBase.go b/service/bedrockagent/api_op_UpdateKnowledgeBase.go index 1a7223b7c51..48352e95d56 100644 --- a/service/bedrockagent/api_op_UpdateKnowledgeBase.go +++ b/service/bedrockagent/api_op_UpdateKnowledgeBase.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagentruntime/api_client.go b/service/bedrockagentruntime/api_client.go index c6e0c890325..aea63ae56da 100644 --- a/service/bedrockagentruntime/api_client.go +++ b/service/bedrockagentruntime/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/bedrockagentruntime/api_op_InvokeAgent.go b/service/bedrockagentruntime/api_op_InvokeAgent.go index d2be1430440..42dd8c8b4ff 100644 --- a/service/bedrockagentruntime/api_op_InvokeAgent.go +++ b/service/bedrockagentruntime/api_op_InvokeAgent.go @@ -186,6 +186,9 @@ func (c *Client) addOperationInvokeAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockagentruntime/api_op_Retrieve.go b/service/bedrockagentruntime/api_op_Retrieve.go index 47c015fd622..1bde1849c00 100644 --- a/service/bedrockagentruntime/api_op_Retrieve.go +++ b/service/bedrockagentruntime/api_op_Retrieve.go @@ -129,6 +129,9 @@ func (c *Client) addOperationRetrieveMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationRetrieveMiddlewares(stack *middleware.Stack, option return nil } -// RetrieveAPIClient is a client that implements the Retrieve operation. -type RetrieveAPIClient interface { - Retrieve(context.Context, *RetrieveInput, ...func(*Options)) (*RetrieveOutput, error) -} - -var _ RetrieveAPIClient = (*Client)(nil) - // RetrievePaginatorOptions is the paginator options for Retrieve type RetrievePaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -211,6 +207,9 @@ func (p *RetrievePaginator) NextPage(ctx context.Context, optFns ...func(*Option params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Retrieve(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *RetrievePaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// RetrieveAPIClient is a client that implements the Retrieve operation. +type RetrieveAPIClient interface { + Retrieve(context.Context, *RetrieveInput, ...func(*Options)) (*RetrieveOutput, error) +} + +var _ RetrieveAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opRetrieve(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/bedrockagentruntime/api_op_RetrieveAndGenerate.go b/service/bedrockagentruntime/api_op_RetrieveAndGenerate.go index 12fdc7cbeef..71dfd171e93 100644 --- a/service/bedrockagentruntime/api_op_RetrieveAndGenerate.go +++ b/service/bedrockagentruntime/api_op_RetrieveAndGenerate.go @@ -135,6 +135,9 @@ func (c *Client) addOperationRetrieveAndGenerateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveAndGenerateValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockruntime/api_client.go b/service/bedrockruntime/api_client.go index fb701b8f017..0079860408e 100644 --- a/service/bedrockruntime/api_client.go +++ b/service/bedrockruntime/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/bedrockruntime/api_op_Converse.go b/service/bedrockruntime/api_op_Converse.go index a2d51a61117..74d845aee0c 100644 --- a/service/bedrockruntime/api_op_Converse.go +++ b/service/bedrockruntime/api_op_Converse.go @@ -195,6 +195,9 @@ func (c *Client) addOperationConverseMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConverseValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockruntime/api_op_ConverseStream.go b/service/bedrockruntime/api_op_ConverseStream.go index 84162fb98d4..07e47bf1be1 100644 --- a/service/bedrockruntime/api_op_ConverseStream.go +++ b/service/bedrockruntime/api_op_ConverseStream.go @@ -180,6 +180,9 @@ func (c *Client) addOperationConverseStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConverseStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockruntime/api_op_InvokeModel.go b/service/bedrockruntime/api_op_InvokeModel.go index ed46663863d..1375be9f8a5 100644 --- a/service/bedrockruntime/api_op_InvokeModel.go +++ b/service/bedrockruntime/api_op_InvokeModel.go @@ -179,6 +179,9 @@ func (c *Client) addOperationInvokeModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go b/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go index b0f139fcaa9..405acbecbaa 100644 --- a/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go +++ b/service/bedrockruntime/api_op_InvokeModelWithResponseStream.go @@ -183,6 +183,9 @@ func (c *Client) addOperationInvokeModelWithResponseStreamMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeModelWithResponseStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_client.go b/service/billingconductor/api_client.go index de3437cb416..f285440fc64 100644 --- a/service/billingconductor/api_client.go +++ b/service/billingconductor/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/billingconductor/api_op_AssociateAccounts.go b/service/billingconductor/api_op_AssociateAccounts.go index 836fa7ac0fd..bcb88f18a7e 100644 --- a/service/billingconductor/api_op_AssociateAccounts.go +++ b/service/billingconductor/api_op_AssociateAccounts.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateAccountsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAccountsValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_AssociatePricingRules.go b/service/billingconductor/api_op_AssociatePricingRules.go index 0fa34a1e701..5b9c1180e40 100644 --- a/service/billingconductor/api_op_AssociatePricingRules.go +++ b/service/billingconductor/api_op_AssociatePricingRules.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociatePricingRulesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePricingRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_BatchAssociateResourcesToCustomLineItem.go b/service/billingconductor/api_op_BatchAssociateResourcesToCustomLineItem.go index a9cb516cf9f..c84fd58629f 100644 --- a/service/billingconductor/api_op_BatchAssociateResourcesToCustomLineItem.go +++ b/service/billingconductor/api_op_BatchAssociateResourcesToCustomLineItem.go @@ -119,6 +119,9 @@ func (c *Client) addOperationBatchAssociateResourcesToCustomLineItemMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateResourcesToCustomLineItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_BatchDisassociateResourcesFromCustomLineItem.go b/service/billingconductor/api_op_BatchDisassociateResourcesFromCustomLineItem.go index 4c64fe05d03..212b4ff21ba 100644 --- a/service/billingconductor/api_op_BatchDisassociateResourcesFromCustomLineItem.go +++ b/service/billingconductor/api_op_BatchDisassociateResourcesFromCustomLineItem.go @@ -119,6 +119,9 @@ func (c *Client) addOperationBatchDisassociateResourcesFromCustomLineItemMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateResourcesFromCustomLineItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_CreateBillingGroup.go b/service/billingconductor/api_op_CreateBillingGroup.go index fbd5b2a628d..7aaa4c557e7 100644 --- a/service/billingconductor/api_op_CreateBillingGroup.go +++ b/service/billingconductor/api_op_CreateBillingGroup.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateBillingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateBillingGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/billingconductor/api_op_CreateCustomLineItem.go b/service/billingconductor/api_op_CreateCustomLineItem.go index 3206cee939f..5b2a810a9ae 100644 --- a/service/billingconductor/api_op_CreateCustomLineItem.go +++ b/service/billingconductor/api_op_CreateCustomLineItem.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateCustomLineItemMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCustomLineItemMiddleware(stack, options); err != nil { return err } diff --git a/service/billingconductor/api_op_CreatePricingPlan.go b/service/billingconductor/api_op_CreatePricingPlan.go index 6389dd5bd6b..e1af877c7bd 100644 --- a/service/billingconductor/api_op_CreatePricingPlan.go +++ b/service/billingconductor/api_op_CreatePricingPlan.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreatePricingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePricingPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/billingconductor/api_op_CreatePricingRule.go b/service/billingconductor/api_op_CreatePricingRule.go index d124b81beef..acbc5b6c7e8 100644 --- a/service/billingconductor/api_op_CreatePricingRule.go +++ b/service/billingconductor/api_op_CreatePricingRule.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreatePricingRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePricingRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/billingconductor/api_op_DeleteBillingGroup.go b/service/billingconductor/api_op_DeleteBillingGroup.go index f66d371c6ff..a226545c098 100644 --- a/service/billingconductor/api_op_DeleteBillingGroup.go +++ b/service/billingconductor/api_op_DeleteBillingGroup.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteBillingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBillingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_DeleteCustomLineItem.go b/service/billingconductor/api_op_DeleteCustomLineItem.go index bd5337a1899..07c4d073c08 100644 --- a/service/billingconductor/api_op_DeleteCustomLineItem.go +++ b/service/billingconductor/api_op_DeleteCustomLineItem.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteCustomLineItemMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomLineItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_DeletePricingPlan.go b/service/billingconductor/api_op_DeletePricingPlan.go index 3cc6ac000b2..b91a2348824 100644 --- a/service/billingconductor/api_op_DeletePricingPlan.go +++ b/service/billingconductor/api_op_DeletePricingPlan.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePricingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePricingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_DeletePricingRule.go b/service/billingconductor/api_op_DeletePricingRule.go index 61d5ad7e258..c72ecb5d592 100644 --- a/service/billingconductor/api_op_DeletePricingRule.go +++ b/service/billingconductor/api_op_DeletePricingRule.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePricingRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePricingRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_DisassociateAccounts.go b/service/billingconductor/api_op_DisassociateAccounts.go index 2553c5a775f..dc47e370d09 100644 --- a/service/billingconductor/api_op_DisassociateAccounts.go +++ b/service/billingconductor/api_op_DisassociateAccounts.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateAccountsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAccountsValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_DisassociatePricingRules.go b/service/billingconductor/api_op_DisassociatePricingRules.go index 83b46d27379..fc60c485a70 100644 --- a/service/billingconductor/api_op_DisassociatePricingRules.go +++ b/service/billingconductor/api_op_DisassociatePricingRules.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociatePricingRulesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePricingRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_GetBillingGroupCostReport.go b/service/billingconductor/api_op_GetBillingGroupCostReport.go index 73858e3c2b3..a1cbd7b4ad3 100644 --- a/service/billingconductor/api_op_GetBillingGroupCostReport.go +++ b/service/billingconductor/api_op_GetBillingGroupCostReport.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetBillingGroupCostReportMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBillingGroupCostReportValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationGetBillingGroupCostReportMiddlewares(stack *middlew return nil } -// GetBillingGroupCostReportAPIClient is a client that implements the -// GetBillingGroupCostReport operation. -type GetBillingGroupCostReportAPIClient interface { - GetBillingGroupCostReport(context.Context, *GetBillingGroupCostReportInput, ...func(*Options)) (*GetBillingGroupCostReportOutput, error) -} - -var _ GetBillingGroupCostReportAPIClient = (*Client)(nil) - // GetBillingGroupCostReportPaginatorOptions is the paginator options for // GetBillingGroupCostReport type GetBillingGroupCostReportPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *GetBillingGroupCostReportPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBillingGroupCostReport(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *GetBillingGroupCostReportPaginator) NextPage(ctx context.Context, optFn return result, nil } +// GetBillingGroupCostReportAPIClient is a client that implements the +// GetBillingGroupCostReport operation. +type GetBillingGroupCostReportAPIClient interface { + GetBillingGroupCostReport(context.Context, *GetBillingGroupCostReportInput, ...func(*Options)) (*GetBillingGroupCostReportOutput, error) +} + +var _ GetBillingGroupCostReportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBillingGroupCostReport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListAccountAssociations.go b/service/billingconductor/api_op_ListAccountAssociations.go index 10648fa3570..c7819e5d081 100644 --- a/service/billingconductor/api_op_ListAccountAssociations.go +++ b/service/billingconductor/api_op_ListAccountAssociations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAccountAssociationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAssociations(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListAccountAssociationsMiddlewares(stack *middlewar return nil } -// ListAccountAssociationsAPIClient is a client that implements the -// ListAccountAssociations operation. -type ListAccountAssociationsAPIClient interface { - ListAccountAssociations(context.Context, *ListAccountAssociationsInput, ...func(*Options)) (*ListAccountAssociationsOutput, error) -} - -var _ ListAccountAssociationsAPIClient = (*Client)(nil) - // ListAccountAssociationsPaginatorOptions is the paginator options for // ListAccountAssociations type ListAccountAssociationsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListAccountAssociationsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListAccountAssociationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAccountAssociationsAPIClient is a client that implements the +// ListAccountAssociations operation. +type ListAccountAssociationsAPIClient interface { + ListAccountAssociations(context.Context, *ListAccountAssociationsInput, ...func(*Options)) (*ListAccountAssociationsOutput, error) +} + +var _ ListAccountAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListBillingGroupCostReports.go b/service/billingconductor/api_op_ListBillingGroupCostReports.go index ad1ae4ea020..7bd7a3bbe48 100644 --- a/service/billingconductor/api_op_ListBillingGroupCostReports.go +++ b/service/billingconductor/api_op_ListBillingGroupCostReports.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListBillingGroupCostReportsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillingGroupCostReports(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListBillingGroupCostReportsMiddlewares(stack *middl return nil } -// ListBillingGroupCostReportsAPIClient is a client that implements the -// ListBillingGroupCostReports operation. -type ListBillingGroupCostReportsAPIClient interface { - ListBillingGroupCostReports(context.Context, *ListBillingGroupCostReportsInput, ...func(*Options)) (*ListBillingGroupCostReportsOutput, error) -} - -var _ ListBillingGroupCostReportsAPIClient = (*Client)(nil) - // ListBillingGroupCostReportsPaginatorOptions is the paginator options for // ListBillingGroupCostReports type ListBillingGroupCostReportsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListBillingGroupCostReportsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBillingGroupCostReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListBillingGroupCostReportsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListBillingGroupCostReportsAPIClient is a client that implements the +// ListBillingGroupCostReports operation. +type ListBillingGroupCostReportsAPIClient interface { + ListBillingGroupCostReports(context.Context, *ListBillingGroupCostReportsInput, ...func(*Options)) (*ListBillingGroupCostReportsOutput, error) +} + +var _ ListBillingGroupCostReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBillingGroupCostReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListBillingGroups.go b/service/billingconductor/api_op_ListBillingGroups.go index 0dcace3d83f..8640f694850 100644 --- a/service/billingconductor/api_op_ListBillingGroups.go +++ b/service/billingconductor/api_op_ListBillingGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListBillingGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillingGroups(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListBillingGroupsMiddlewares(stack *middleware.Stac return nil } -// ListBillingGroupsAPIClient is a client that implements the ListBillingGroups -// operation. -type ListBillingGroupsAPIClient interface { - ListBillingGroups(context.Context, *ListBillingGroupsInput, ...func(*Options)) (*ListBillingGroupsOutput, error) -} - -var _ ListBillingGroupsAPIClient = (*Client)(nil) - // ListBillingGroupsPaginatorOptions is the paginator options for ListBillingGroups type ListBillingGroupsPaginatorOptions struct { // The maximum number of billing groups to retrieve. @@ -211,6 +206,9 @@ func (p *ListBillingGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBillingGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListBillingGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListBillingGroupsAPIClient is a client that implements the ListBillingGroups +// operation. +type ListBillingGroupsAPIClient interface { + ListBillingGroups(context.Context, *ListBillingGroupsInput, ...func(*Options)) (*ListBillingGroupsOutput, error) +} + +var _ ListBillingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBillingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListCustomLineItemVersions.go b/service/billingconductor/api_op_ListCustomLineItemVersions.go index 46d6a2b5409..db4aa5ea79a 100644 --- a/service/billingconductor/api_op_ListCustomLineItemVersions.go +++ b/service/billingconductor/api_op_ListCustomLineItemVersions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListCustomLineItemVersionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomLineItemVersionsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCustomLineItemVersionsMiddlewares(stack *middle return nil } -// ListCustomLineItemVersionsAPIClient is a client that implements the -// ListCustomLineItemVersions operation. -type ListCustomLineItemVersionsAPIClient interface { - ListCustomLineItemVersions(context.Context, *ListCustomLineItemVersionsInput, ...func(*Options)) (*ListCustomLineItemVersionsOutput, error) -} - -var _ ListCustomLineItemVersionsAPIClient = (*Client)(nil) - // ListCustomLineItemVersionsPaginatorOptions is the paginator options for // ListCustomLineItemVersions type ListCustomLineItemVersionsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListCustomLineItemVersionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomLineItemVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListCustomLineItemVersionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListCustomLineItemVersionsAPIClient is a client that implements the +// ListCustomLineItemVersions operation. +type ListCustomLineItemVersionsAPIClient interface { + ListCustomLineItemVersions(context.Context, *ListCustomLineItemVersionsInput, ...func(*Options)) (*ListCustomLineItemVersionsOutput, error) +} + +var _ ListCustomLineItemVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomLineItemVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListCustomLineItems.go b/service/billingconductor/api_op_ListCustomLineItems.go index abeb9c467da..b9a7816036f 100644 --- a/service/billingconductor/api_op_ListCustomLineItems.go +++ b/service/billingconductor/api_op_ListCustomLineItems.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCustomLineItemsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomLineItems(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListCustomLineItemsMiddlewares(stack *middleware.St return nil } -// ListCustomLineItemsAPIClient is a client that implements the -// ListCustomLineItems operation. -type ListCustomLineItemsAPIClient interface { - ListCustomLineItems(context.Context, *ListCustomLineItemsInput, ...func(*Options)) (*ListCustomLineItemsOutput, error) -} - -var _ ListCustomLineItemsAPIClient = (*Client)(nil) - // ListCustomLineItemsPaginatorOptions is the paginator options for // ListCustomLineItems type ListCustomLineItemsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListCustomLineItemsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomLineItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListCustomLineItemsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListCustomLineItemsAPIClient is a client that implements the +// ListCustomLineItems operation. +type ListCustomLineItemsAPIClient interface { + ListCustomLineItems(context.Context, *ListCustomLineItemsInput, ...func(*Options)) (*ListCustomLineItemsOutput, error) +} + +var _ ListCustomLineItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomLineItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListPricingPlans.go b/service/billingconductor/api_op_ListPricingPlans.go index 435472f99c2..47d3558f343 100644 --- a/service/billingconductor/api_op_ListPricingPlans.go +++ b/service/billingconductor/api_op_ListPricingPlans.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListPricingPlansMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPricingPlans(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListPricingPlansMiddlewares(stack *middleware.Stack return nil } -// ListPricingPlansAPIClient is a client that implements the ListPricingPlans -// operation. -type ListPricingPlansAPIClient interface { - ListPricingPlans(context.Context, *ListPricingPlansInput, ...func(*Options)) (*ListPricingPlansOutput, error) -} - -var _ ListPricingPlansAPIClient = (*Client)(nil) - // ListPricingPlansPaginatorOptions is the paginator options for ListPricingPlans type ListPricingPlansPaginatorOptions struct { // The maximum number of pricing plans to retrieve. @@ -213,6 +208,9 @@ func (p *ListPricingPlansPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPricingPlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListPricingPlansPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPricingPlansAPIClient is a client that implements the ListPricingPlans +// operation. +type ListPricingPlansAPIClient interface { + ListPricingPlans(context.Context, *ListPricingPlansInput, ...func(*Options)) (*ListPricingPlansOutput, error) +} + +var _ ListPricingPlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPricingPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListPricingPlansAssociatedWithPricingRule.go b/service/billingconductor/api_op_ListPricingPlansAssociatedWithPricingRule.go index 2ca250c749c..3877fd55b0b 100644 --- a/service/billingconductor/api_op_ListPricingPlansAssociatedWithPricingRule.go +++ b/service/billingconductor/api_op_ListPricingPlansAssociatedWithPricingRule.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListPricingPlansAssociatedWithPricingRuleMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPricingPlansAssociatedWithPricingRuleValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListPricingPlansAssociatedWithPricingRuleMiddleware return nil } -// ListPricingPlansAssociatedWithPricingRuleAPIClient is a client that implements -// the ListPricingPlansAssociatedWithPricingRule operation. -type ListPricingPlansAssociatedWithPricingRuleAPIClient interface { - ListPricingPlansAssociatedWithPricingRule(context.Context, *ListPricingPlansAssociatedWithPricingRuleInput, ...func(*Options)) (*ListPricingPlansAssociatedWithPricingRuleOutput, error) -} - -var _ ListPricingPlansAssociatedWithPricingRuleAPIClient = (*Client)(nil) - // ListPricingPlansAssociatedWithPricingRulePaginatorOptions is the paginator // options for ListPricingPlansAssociatedWithPricingRule type ListPricingPlansAssociatedWithPricingRulePaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListPricingPlansAssociatedWithPricingRulePaginator) NextPage(ctx contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPricingPlansAssociatedWithPricingRule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListPricingPlansAssociatedWithPricingRulePaginator) NextPage(ctx contex return result, nil } +// ListPricingPlansAssociatedWithPricingRuleAPIClient is a client that implements +// the ListPricingPlansAssociatedWithPricingRule operation. +type ListPricingPlansAssociatedWithPricingRuleAPIClient interface { + ListPricingPlansAssociatedWithPricingRule(context.Context, *ListPricingPlansAssociatedWithPricingRuleInput, ...func(*Options)) (*ListPricingPlansAssociatedWithPricingRuleOutput, error) +} + +var _ ListPricingPlansAssociatedWithPricingRuleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPricingPlansAssociatedWithPricingRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListPricingRules.go b/service/billingconductor/api_op_ListPricingRules.go index 3b954b0a7e3..70641347a97 100644 --- a/service/billingconductor/api_op_ListPricingRules.go +++ b/service/billingconductor/api_op_ListPricingRules.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPricingRulesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPricingRules(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPricingRulesMiddlewares(stack *middleware.Stack return nil } -// ListPricingRulesAPIClient is a client that implements the ListPricingRules -// operation. -type ListPricingRulesAPIClient interface { - ListPricingRules(context.Context, *ListPricingRulesInput, ...func(*Options)) (*ListPricingRulesOutput, error) -} - -var _ ListPricingRulesAPIClient = (*Client)(nil) - // ListPricingRulesPaginatorOptions is the paginator options for ListPricingRules type ListPricingRulesPaginatorOptions struct { // The maximum number of pricing rules to retrieve. @@ -214,6 +209,9 @@ func (p *ListPricingRulesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPricingRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListPricingRulesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPricingRulesAPIClient is a client that implements the ListPricingRules +// operation. +type ListPricingRulesAPIClient interface { + ListPricingRules(context.Context, *ListPricingRulesInput, ...func(*Options)) (*ListPricingRulesOutput, error) +} + +var _ ListPricingRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPricingRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListPricingRulesAssociatedToPricingPlan.go b/service/billingconductor/api_op_ListPricingRulesAssociatedToPricingPlan.go index 1e6ba1ecca9..207d75ffe17 100644 --- a/service/billingconductor/api_op_ListPricingRulesAssociatedToPricingPlan.go +++ b/service/billingconductor/api_op_ListPricingRulesAssociatedToPricingPlan.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListPricingRulesAssociatedToPricingPlanMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPricingRulesAssociatedToPricingPlanValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListPricingRulesAssociatedToPricingPlanMiddlewares( return nil } -// ListPricingRulesAssociatedToPricingPlanAPIClient is a client that implements -// the ListPricingRulesAssociatedToPricingPlan operation. -type ListPricingRulesAssociatedToPricingPlanAPIClient interface { - ListPricingRulesAssociatedToPricingPlan(context.Context, *ListPricingRulesAssociatedToPricingPlanInput, ...func(*Options)) (*ListPricingRulesAssociatedToPricingPlanOutput, error) -} - -var _ ListPricingRulesAssociatedToPricingPlanAPIClient = (*Client)(nil) - // ListPricingRulesAssociatedToPricingPlanPaginatorOptions is the paginator // options for ListPricingRulesAssociatedToPricingPlan type ListPricingRulesAssociatedToPricingPlanPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListPricingRulesAssociatedToPricingPlanPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPricingRulesAssociatedToPricingPlan(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListPricingRulesAssociatedToPricingPlanPaginator) NextPage(ctx context. return result, nil } +// ListPricingRulesAssociatedToPricingPlanAPIClient is a client that implements +// the ListPricingRulesAssociatedToPricingPlan operation. +type ListPricingRulesAssociatedToPricingPlanAPIClient interface { + ListPricingRulesAssociatedToPricingPlan(context.Context, *ListPricingRulesAssociatedToPricingPlanInput, ...func(*Options)) (*ListPricingRulesAssociatedToPricingPlanOutput, error) +} + +var _ ListPricingRulesAssociatedToPricingPlanAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPricingRulesAssociatedToPricingPlan(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListResourcesAssociatedToCustomLineItem.go b/service/billingconductor/api_op_ListResourcesAssociatedToCustomLineItem.go index a05c3e071b5..dda63f5a129 100644 --- a/service/billingconductor/api_op_ListResourcesAssociatedToCustomLineItem.go +++ b/service/billingconductor/api_op_ListResourcesAssociatedToCustomLineItem.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListResourcesAssociatedToCustomLineItemMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesAssociatedToCustomLineItemValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListResourcesAssociatedToCustomLineItemMiddlewares( return nil } -// ListResourcesAssociatedToCustomLineItemAPIClient is a client that implements -// the ListResourcesAssociatedToCustomLineItem operation. -type ListResourcesAssociatedToCustomLineItemAPIClient interface { - ListResourcesAssociatedToCustomLineItem(context.Context, *ListResourcesAssociatedToCustomLineItemInput, ...func(*Options)) (*ListResourcesAssociatedToCustomLineItemOutput, error) -} - -var _ ListResourcesAssociatedToCustomLineItemAPIClient = (*Client)(nil) - // ListResourcesAssociatedToCustomLineItemPaginatorOptions is the paginator // options for ListResourcesAssociatedToCustomLineItem type ListResourcesAssociatedToCustomLineItemPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListResourcesAssociatedToCustomLineItemPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourcesAssociatedToCustomLineItem(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListResourcesAssociatedToCustomLineItemPaginator) NextPage(ctx context. return result, nil } +// ListResourcesAssociatedToCustomLineItemAPIClient is a client that implements +// the ListResourcesAssociatedToCustomLineItem operation. +type ListResourcesAssociatedToCustomLineItemAPIClient interface { + ListResourcesAssociatedToCustomLineItem(context.Context, *ListResourcesAssociatedToCustomLineItemInput, ...func(*Options)) (*ListResourcesAssociatedToCustomLineItemOutput, error) +} + +var _ ListResourcesAssociatedToCustomLineItemAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourcesAssociatedToCustomLineItem(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/billingconductor/api_op_ListTagsForResource.go b/service/billingconductor/api_op_ListTagsForResource.go index 2d984bb51fd..b0d1e2bf385 100644 --- a/service/billingconductor/api_op_ListTagsForResource.go +++ b/service/billingconductor/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_TagResource.go b/service/billingconductor/api_op_TagResource.go index d29314cce76..a12fac542b8 100644 --- a/service/billingconductor/api_op_TagResource.go +++ b/service/billingconductor/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_UntagResource.go b/service/billingconductor/api_op_UntagResource.go index b91084d0e34..29ca822279c 100644 --- a/service/billingconductor/api_op_UntagResource.go +++ b/service/billingconductor/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_UpdateBillingGroup.go b/service/billingconductor/api_op_UpdateBillingGroup.go index a21db03f073..93840a9160b 100644 --- a/service/billingconductor/api_op_UpdateBillingGroup.go +++ b/service/billingconductor/api_op_UpdateBillingGroup.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateBillingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBillingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_UpdateCustomLineItem.go b/service/billingconductor/api_op_UpdateCustomLineItem.go index c0faa095711..ba5cd203d9c 100644 --- a/service/billingconductor/api_op_UpdateCustomLineItem.go +++ b/service/billingconductor/api_op_UpdateCustomLineItem.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateCustomLineItemMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomLineItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_UpdatePricingPlan.go b/service/billingconductor/api_op_UpdatePricingPlan.go index 3e0d7b8e45f..a1324021620 100644 --- a/service/billingconductor/api_op_UpdatePricingPlan.go +++ b/service/billingconductor/api_op_UpdatePricingPlan.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdatePricingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePricingPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/billingconductor/api_op_UpdatePricingRule.go b/service/billingconductor/api_op_UpdatePricingRule.go index c7cc0cdef3d..d9755a06602 100644 --- a/service/billingconductor/api_op_UpdatePricingRule.go +++ b/service/billingconductor/api_op_UpdatePricingRule.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdatePricingRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePricingRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_client.go b/service/braket/api_client.go index 532f8a8cd6b..f24a67c40a4 100644 --- a/service/braket/api_client.go +++ b/service/braket/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/braket/api_op_CancelJob.go b/service/braket/api_op_CancelJob.go index 8fff39945a7..4a8a9d3fbdd 100644 --- a/service/braket/api_op_CancelJob.go +++ b/service/braket/api_op_CancelJob.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_op_CancelQuantumTask.go b/service/braket/api_op_CancelQuantumTask.go index ead5122d460..8220103e236 100644 --- a/service/braket/api_op_CancelQuantumTask.go +++ b/service/braket/api_op_CancelQuantumTask.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelQuantumTaskMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCancelQuantumTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/braket/api_op_CreateJob.go b/service/braket/api_op_CreateJob.go index 4964b4642ed..7c91490fed3 100644 --- a/service/braket/api_op_CreateJob.go +++ b/service/braket/api_op_CreateJob.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateJobMiddleware(stack, options); err != nil { return err } diff --git a/service/braket/api_op_CreateQuantumTask.go b/service/braket/api_op_CreateQuantumTask.go index e03ffa19cc2..25df66ecd85 100644 --- a/service/braket/api_op_CreateQuantumTask.go +++ b/service/braket/api_op_CreateQuantumTask.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateQuantumTaskMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateQuantumTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/braket/api_op_GetDevice.go b/service/braket/api_op_GetDevice.go index c5e9cffd1a6..0bf86f58773 100644 --- a/service/braket/api_op_GetDevice.go +++ b/service/braket/api_op_GetDevice.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetDeviceMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_op_GetJob.go b/service/braket/api_op_GetJob.go index 2f5d1e605f1..0d820f6c448 100644 --- a/service/braket/api_op_GetJob.go +++ b/service/braket/api_op_GetJob.go @@ -200,6 +200,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_op_GetQuantumTask.go b/service/braket/api_op_GetQuantumTask.go index 7acc7d4ba26..10498d5a6a4 100644 --- a/service/braket/api_op_GetQuantumTask.go +++ b/service/braket/api_op_GetQuantumTask.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetQuantumTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQuantumTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_op_ListTagsForResource.go b/service/braket/api_op_ListTagsForResource.go index 53014515767..90c45cc8895 100644 --- a/service/braket/api_op_ListTagsForResource.go +++ b/service/braket/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_op_SearchDevices.go b/service/braket/api_op_SearchDevices.go index 9001d28647d..676e902deb2 100644 --- a/service/braket/api_op_SearchDevices.go +++ b/service/braket/api_op_SearchDevices.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSearchDevicesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchDevicesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationSearchDevicesMiddlewares(stack *middleware.Stack, o return nil } -// SearchDevicesAPIClient is a client that implements the SearchDevices operation. -type SearchDevicesAPIClient interface { - SearchDevices(context.Context, *SearchDevicesInput, ...func(*Options)) (*SearchDevicesOutput, error) -} - -var _ SearchDevicesAPIClient = (*Client)(nil) - // SearchDevicesPaginatorOptions is the paginator options for SearchDevices type SearchDevicesPaginatorOptions struct { // The maximum number of results to return in the response. @@ -216,6 +212,9 @@ func (p *SearchDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *SearchDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// SearchDevicesAPIClient is a client that implements the SearchDevices operation. +type SearchDevicesAPIClient interface { + SearchDevices(context.Context, *SearchDevicesInput, ...func(*Options)) (*SearchDevicesOutput, error) +} + +var _ SearchDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/braket/api_op_SearchJobs.go b/service/braket/api_op_SearchJobs.go index f15193be471..40b7320f847 100644 --- a/service/braket/api_op_SearchJobs.go +++ b/service/braket/api_op_SearchJobs.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSearchJobsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchJobsValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationSearchJobsMiddlewares(stack *middleware.Stack, opti return nil } -// SearchJobsAPIClient is a client that implements the SearchJobs operation. -type SearchJobsAPIClient interface { - SearchJobs(context.Context, *SearchJobsInput, ...func(*Options)) (*SearchJobsOutput, error) -} - -var _ SearchJobsAPIClient = (*Client)(nil) - // SearchJobsPaginatorOptions is the paginator options for SearchJobs type SearchJobsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -216,6 +212,9 @@ func (p *SearchJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *SearchJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// SearchJobsAPIClient is a client that implements the SearchJobs operation. +type SearchJobsAPIClient interface { + SearchJobs(context.Context, *SearchJobsInput, ...func(*Options)) (*SearchJobsOutput, error) +} + +var _ SearchJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/braket/api_op_SearchQuantumTasks.go b/service/braket/api_op_SearchQuantumTasks.go index 5ef6c7c6401..084b444fd02 100644 --- a/service/braket/api_op_SearchQuantumTasks.go +++ b/service/braket/api_op_SearchQuantumTasks.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSearchQuantumTasksMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchQuantumTasksValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationSearchQuantumTasksMiddlewares(stack *middleware.Sta return nil } -// SearchQuantumTasksAPIClient is a client that implements the SearchQuantumTasks -// operation. -type SearchQuantumTasksAPIClient interface { - SearchQuantumTasks(context.Context, *SearchQuantumTasksInput, ...func(*Options)) (*SearchQuantumTasksOutput, error) -} - -var _ SearchQuantumTasksAPIClient = (*Client)(nil) - // SearchQuantumTasksPaginatorOptions is the paginator options for // SearchQuantumTasks type SearchQuantumTasksPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *SearchQuantumTasksPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchQuantumTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *SearchQuantumTasksPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchQuantumTasksAPIClient is a client that implements the SearchQuantumTasks +// operation. +type SearchQuantumTasksAPIClient interface { + SearchQuantumTasks(context.Context, *SearchQuantumTasksInput, ...func(*Options)) (*SearchQuantumTasksOutput, error) +} + +var _ SearchQuantumTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchQuantumTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/braket/api_op_TagResource.go b/service/braket/api_op_TagResource.go index b2559a50296..28a29cffce4 100644 --- a/service/braket/api_op_TagResource.go +++ b/service/braket/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/braket/api_op_UntagResource.go b/service/braket/api_op_UntagResource.go index 6e9e91801f9..3d6312a7cbd 100644 --- a/service/braket/api_op_UntagResource.go +++ b/service/braket/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_client.go b/service/budgets/api_client.go index e7415f5e09d..81d92fa8e33 100644 --- a/service/budgets/api_client.go +++ b/service/budgets/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/budgets/api_op_CreateBudget.go b/service/budgets/api_op_CreateBudget.go index 11398f7d9c3..7d0a166bc03 100644 --- a/service/budgets/api_op_CreateBudget.go +++ b/service/budgets/api_op_CreateBudget.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateBudgetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBudgetValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_CreateBudgetAction.go b/service/budgets/api_op_CreateBudgetAction.go index 5c497945758..2148cb598de 100644 --- a/service/budgets/api_op_CreateBudgetAction.go +++ b/service/budgets/api_op_CreateBudgetAction.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateBudgetActionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBudgetActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_CreateNotification.go b/service/budgets/api_op_CreateNotification.go index 3e1a8cb6347..be71a9ed9ec 100644 --- a/service/budgets/api_op_CreateNotification.go +++ b/service/budgets/api_op_CreateNotification.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateNotificationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_CreateSubscriber.go b/service/budgets/api_op_CreateSubscriber.go index 3f80c7a16da..97da54e68e9 100644 --- a/service/budgets/api_op_CreateSubscriber.go +++ b/service/budgets/api_op_CreateSubscriber.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateSubscriberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DeleteBudget.go b/service/budgets/api_op_DeleteBudget.go index d5bf4f8cbe1..76064e7abd5 100644 --- a/service/budgets/api_op_DeleteBudget.go +++ b/service/budgets/api_op_DeleteBudget.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteBudgetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBudgetValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DeleteBudgetAction.go b/service/budgets/api_op_DeleteBudgetAction.go index 72b1ff089d6..452c53cd531 100644 --- a/service/budgets/api_op_DeleteBudgetAction.go +++ b/service/budgets/api_op_DeleteBudgetAction.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteBudgetActionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBudgetActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DeleteNotification.go b/service/budgets/api_op_DeleteNotification.go index aeeac5ce96b..9208a4ca80a 100644 --- a/service/budgets/api_op_DeleteNotification.go +++ b/service/budgets/api_op_DeleteNotification.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteNotificationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DeleteSubscriber.go b/service/budgets/api_op_DeleteSubscriber.go index 511d9203721..f7203a2ba9f 100644 --- a/service/budgets/api_op_DeleteSubscriber.go +++ b/service/budgets/api_op_DeleteSubscriber.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteSubscriberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DescribeBudget.go b/service/budgets/api_op_DescribeBudget.go index 930b7f051ad..d1a777e491b 100644 --- a/service/budgets/api_op_DescribeBudget.go +++ b/service/budgets/api_op_DescribeBudget.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeBudgetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DescribeBudgetAction.go b/service/budgets/api_op_DescribeBudgetAction.go index 9cc2263598d..de1fd9e1513 100644 --- a/service/budgets/api_op_DescribeBudgetAction.go +++ b/service/budgets/api_op_DescribeBudgetAction.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeBudgetActionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_DescribeBudgetActionHistories.go b/service/budgets/api_op_DescribeBudgetActionHistories.go index 2d42e32221c..516eb7d8910 100644 --- a/service/budgets/api_op_DescribeBudgetActionHistories.go +++ b/service/budgets/api_op_DescribeBudgetActionHistories.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeBudgetActionHistoriesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetActionHistoriesValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeBudgetActionHistoriesMiddlewares(stack *mid return nil } -// DescribeBudgetActionHistoriesAPIClient is a client that implements the -// DescribeBudgetActionHistories operation. -type DescribeBudgetActionHistoriesAPIClient interface { - DescribeBudgetActionHistories(context.Context, *DescribeBudgetActionHistoriesInput, ...func(*Options)) (*DescribeBudgetActionHistoriesOutput, error) -} - -var _ DescribeBudgetActionHistoriesAPIClient = (*Client)(nil) - // DescribeBudgetActionHistoriesPaginatorOptions is the paginator options for // DescribeBudgetActionHistories type DescribeBudgetActionHistoriesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeBudgetActionHistoriesPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBudgetActionHistories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeBudgetActionHistoriesPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeBudgetActionHistoriesAPIClient is a client that implements the +// DescribeBudgetActionHistories operation. +type DescribeBudgetActionHistoriesAPIClient interface { + DescribeBudgetActionHistories(context.Context, *DescribeBudgetActionHistoriesInput, ...func(*Options)) (*DescribeBudgetActionHistoriesOutput, error) +} + +var _ DescribeBudgetActionHistoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBudgetActionHistories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeBudgetActionsForAccount.go b/service/budgets/api_op_DescribeBudgetActionsForAccount.go index 1aa0cf6a00b..565f01d8ff4 100644 --- a/service/budgets/api_op_DescribeBudgetActionsForAccount.go +++ b/service/budgets/api_op_DescribeBudgetActionsForAccount.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeBudgetActionsForAccountMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetActionsForAccountValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeBudgetActionsForAccountMiddlewares(stack *m return nil } -// DescribeBudgetActionsForAccountAPIClient is a client that implements the -// DescribeBudgetActionsForAccount operation. -type DescribeBudgetActionsForAccountAPIClient interface { - DescribeBudgetActionsForAccount(context.Context, *DescribeBudgetActionsForAccountInput, ...func(*Options)) (*DescribeBudgetActionsForAccountOutput, error) -} - -var _ DescribeBudgetActionsForAccountAPIClient = (*Client)(nil) - // DescribeBudgetActionsForAccountPaginatorOptions is the paginator options for // DescribeBudgetActionsForAccount type DescribeBudgetActionsForAccountPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeBudgetActionsForAccountPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBudgetActionsForAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeBudgetActionsForAccountPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeBudgetActionsForAccountAPIClient is a client that implements the +// DescribeBudgetActionsForAccount operation. +type DescribeBudgetActionsForAccountAPIClient interface { + DescribeBudgetActionsForAccount(context.Context, *DescribeBudgetActionsForAccountInput, ...func(*Options)) (*DescribeBudgetActionsForAccountOutput, error) +} + +var _ DescribeBudgetActionsForAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBudgetActionsForAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeBudgetActionsForBudget.go b/service/budgets/api_op_DescribeBudgetActionsForBudget.go index 1aeff535cb8..cbd15772ce0 100644 --- a/service/budgets/api_op_DescribeBudgetActionsForBudget.go +++ b/service/budgets/api_op_DescribeBudgetActionsForBudget.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeBudgetActionsForBudgetMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetActionsForBudgetValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeBudgetActionsForBudgetMiddlewares(stack *mi return nil } -// DescribeBudgetActionsForBudgetAPIClient is a client that implements the -// DescribeBudgetActionsForBudget operation. -type DescribeBudgetActionsForBudgetAPIClient interface { - DescribeBudgetActionsForBudget(context.Context, *DescribeBudgetActionsForBudgetInput, ...func(*Options)) (*DescribeBudgetActionsForBudgetOutput, error) -} - -var _ DescribeBudgetActionsForBudgetAPIClient = (*Client)(nil) - // DescribeBudgetActionsForBudgetPaginatorOptions is the paginator options for // DescribeBudgetActionsForBudget type DescribeBudgetActionsForBudgetPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeBudgetActionsForBudgetPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBudgetActionsForBudget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeBudgetActionsForBudgetPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeBudgetActionsForBudgetAPIClient is a client that implements the +// DescribeBudgetActionsForBudget operation. +type DescribeBudgetActionsForBudgetAPIClient interface { + DescribeBudgetActionsForBudget(context.Context, *DescribeBudgetActionsForBudgetInput, ...func(*Options)) (*DescribeBudgetActionsForBudgetOutput, error) +} + +var _ DescribeBudgetActionsForBudgetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBudgetActionsForBudget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeBudgetNotificationsForAccount.go b/service/budgets/api_op_DescribeBudgetNotificationsForAccount.go index 842702dd753..63a786b91f2 100644 --- a/service/budgets/api_op_DescribeBudgetNotificationsForAccount.go +++ b/service/budgets/api_op_DescribeBudgetNotificationsForAccount.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeBudgetNotificationsForAccountMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetNotificationsForAccountValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeBudgetNotificationsForAccountMiddlewares(st return nil } -// DescribeBudgetNotificationsForAccountAPIClient is a client that implements the -// DescribeBudgetNotificationsForAccount operation. -type DescribeBudgetNotificationsForAccountAPIClient interface { - DescribeBudgetNotificationsForAccount(context.Context, *DescribeBudgetNotificationsForAccountInput, ...func(*Options)) (*DescribeBudgetNotificationsForAccountOutput, error) -} - -var _ DescribeBudgetNotificationsForAccountAPIClient = (*Client)(nil) - // DescribeBudgetNotificationsForAccountPaginatorOptions is the paginator options // for DescribeBudgetNotificationsForAccount type DescribeBudgetNotificationsForAccountPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeBudgetNotificationsForAccountPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBudgetNotificationsForAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeBudgetNotificationsForAccountPaginator) NextPage(ctx context.Co return result, nil } +// DescribeBudgetNotificationsForAccountAPIClient is a client that implements the +// DescribeBudgetNotificationsForAccount operation. +type DescribeBudgetNotificationsForAccountAPIClient interface { + DescribeBudgetNotificationsForAccount(context.Context, *DescribeBudgetNotificationsForAccountInput, ...func(*Options)) (*DescribeBudgetNotificationsForAccountOutput, error) +} + +var _ DescribeBudgetNotificationsForAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBudgetNotificationsForAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeBudgetPerformanceHistory.go b/service/budgets/api_op_DescribeBudgetPerformanceHistory.go index 4eb60bac3cc..8df058c12d4 100644 --- a/service/budgets/api_op_DescribeBudgetPerformanceHistory.go +++ b/service/budgets/api_op_DescribeBudgetPerformanceHistory.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeBudgetPerformanceHistoryMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetPerformanceHistoryValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeBudgetPerformanceHistoryMiddlewares(stack * return nil } -// DescribeBudgetPerformanceHistoryAPIClient is a client that implements the -// DescribeBudgetPerformanceHistory operation. -type DescribeBudgetPerformanceHistoryAPIClient interface { - DescribeBudgetPerformanceHistory(context.Context, *DescribeBudgetPerformanceHistoryInput, ...func(*Options)) (*DescribeBudgetPerformanceHistoryOutput, error) -} - -var _ DescribeBudgetPerformanceHistoryAPIClient = (*Client)(nil) - // DescribeBudgetPerformanceHistoryPaginatorOptions is the paginator options for // DescribeBudgetPerformanceHistory type DescribeBudgetPerformanceHistoryPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeBudgetPerformanceHistoryPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBudgetPerformanceHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeBudgetPerformanceHistoryPaginator) NextPage(ctx context.Context return result, nil } +// DescribeBudgetPerformanceHistoryAPIClient is a client that implements the +// DescribeBudgetPerformanceHistory operation. +type DescribeBudgetPerformanceHistoryAPIClient interface { + DescribeBudgetPerformanceHistory(context.Context, *DescribeBudgetPerformanceHistoryInput, ...func(*Options)) (*DescribeBudgetPerformanceHistoryOutput, error) +} + +var _ DescribeBudgetPerformanceHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBudgetPerformanceHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeBudgets.go b/service/budgets/api_op_DescribeBudgets.go index 08a7ae5bc7f..2300b2dc828 100644 --- a/service/budgets/api_op_DescribeBudgets.go +++ b/service/budgets/api_op_DescribeBudgets.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeBudgetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBudgetsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeBudgetsMiddlewares(stack *middleware.Stack, return nil } -// DescribeBudgetsAPIClient is a client that implements the DescribeBudgets -// operation. -type DescribeBudgetsAPIClient interface { - DescribeBudgets(context.Context, *DescribeBudgetsInput, ...func(*Options)) (*DescribeBudgetsOutput, error) -} - -var _ DescribeBudgetsAPIClient = (*Client)(nil) - // DescribeBudgetsPaginatorOptions is the paginator options for DescribeBudgets type DescribeBudgetsPaginatorOptions struct { // An integer that represents how many budgets a paginated response contains. The @@ -221,6 +216,9 @@ func (p *DescribeBudgetsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBudgets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeBudgetsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeBudgetsAPIClient is a client that implements the DescribeBudgets +// operation. +type DescribeBudgetsAPIClient interface { + DescribeBudgets(context.Context, *DescribeBudgetsInput, ...func(*Options)) (*DescribeBudgetsOutput, error) +} + +var _ DescribeBudgetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBudgets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeNotificationsForBudget.go b/service/budgets/api_op_DescribeNotificationsForBudget.go index 13f769f8524..d089c401a3e 100644 --- a/service/budgets/api_op_DescribeNotificationsForBudget.go +++ b/service/budgets/api_op_DescribeNotificationsForBudget.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeNotificationsForBudgetMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNotificationsForBudgetValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeNotificationsForBudgetMiddlewares(stack *mi return nil } -// DescribeNotificationsForBudgetAPIClient is a client that implements the -// DescribeNotificationsForBudget operation. -type DescribeNotificationsForBudgetAPIClient interface { - DescribeNotificationsForBudget(context.Context, *DescribeNotificationsForBudgetInput, ...func(*Options)) (*DescribeNotificationsForBudgetOutput, error) -} - -var _ DescribeNotificationsForBudgetAPIClient = (*Client)(nil) - // DescribeNotificationsForBudgetPaginatorOptions is the paginator options for // DescribeNotificationsForBudget type DescribeNotificationsForBudgetPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeNotificationsForBudgetPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNotificationsForBudget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeNotificationsForBudgetPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeNotificationsForBudgetAPIClient is a client that implements the +// DescribeNotificationsForBudget operation. +type DescribeNotificationsForBudgetAPIClient interface { + DescribeNotificationsForBudget(context.Context, *DescribeNotificationsForBudgetInput, ...func(*Options)) (*DescribeNotificationsForBudgetOutput, error) +} + +var _ DescribeNotificationsForBudgetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNotificationsForBudget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_DescribeSubscribersForNotification.go b/service/budgets/api_op_DescribeSubscribersForNotification.go index 14225e34d0f..c5be681b8c2 100644 --- a/service/budgets/api_op_DescribeSubscribersForNotification.go +++ b/service/budgets/api_op_DescribeSubscribersForNotification.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeSubscribersForNotificationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSubscribersForNotificationValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeSubscribersForNotificationMiddlewares(stack return nil } -// DescribeSubscribersForNotificationAPIClient is a client that implements the -// DescribeSubscribersForNotification operation. -type DescribeSubscribersForNotificationAPIClient interface { - DescribeSubscribersForNotification(context.Context, *DescribeSubscribersForNotificationInput, ...func(*Options)) (*DescribeSubscribersForNotificationOutput, error) -} - -var _ DescribeSubscribersForNotificationAPIClient = (*Client)(nil) - // DescribeSubscribersForNotificationPaginatorOptions is the paginator options for // DescribeSubscribersForNotification type DescribeSubscribersForNotificationPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeSubscribersForNotificationPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSubscribersForNotification(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeSubscribersForNotificationPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeSubscribersForNotificationAPIClient is a client that implements the +// DescribeSubscribersForNotification operation. +type DescribeSubscribersForNotificationAPIClient interface { + DescribeSubscribersForNotification(context.Context, *DescribeSubscribersForNotificationInput, ...func(*Options)) (*DescribeSubscribersForNotificationOutput, error) +} + +var _ DescribeSubscribersForNotificationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSubscribersForNotification(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/budgets/api_op_ExecuteBudgetAction.go b/service/budgets/api_op_ExecuteBudgetAction.go index 50f6fcb55ea..95c7929785d 100644 --- a/service/budgets/api_op_ExecuteBudgetAction.go +++ b/service/budgets/api_op_ExecuteBudgetAction.go @@ -140,6 +140,9 @@ func (c *Client) addOperationExecuteBudgetActionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteBudgetActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_ListTagsForResource.go b/service/budgets/api_op_ListTagsForResource.go index 5a06dc2f5a3..4d40e69895a 100644 --- a/service/budgets/api_op_ListTagsForResource.go +++ b/service/budgets/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_TagResource.go b/service/budgets/api_op_TagResource.go index 1af737866ac..a8cda52cc3c 100644 --- a/service/budgets/api_op_TagResource.go +++ b/service/budgets/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_UntagResource.go b/service/budgets/api_op_UntagResource.go index 2a358663a82..957ae8dc654 100644 --- a/service/budgets/api_op_UntagResource.go +++ b/service/budgets/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_UpdateBudget.go b/service/budgets/api_op_UpdateBudget.go index cf26a8291bc..dcc845383b8 100644 --- a/service/budgets/api_op_UpdateBudget.go +++ b/service/budgets/api_op_UpdateBudget.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateBudgetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBudgetValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_UpdateBudgetAction.go b/service/budgets/api_op_UpdateBudgetAction.go index f123d22c585..f088ff01509 100644 --- a/service/budgets/api_op_UpdateBudgetAction.go +++ b/service/budgets/api_op_UpdateBudgetAction.go @@ -154,6 +154,9 @@ func (c *Client) addOperationUpdateBudgetActionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBudgetActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_UpdateNotification.go b/service/budgets/api_op_UpdateNotification.go index 16c6558a071..8d42ea3d530 100644 --- a/service/budgets/api_op_UpdateNotification.go +++ b/service/budgets/api_op_UpdateNotification.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateNotificationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/budgets/api_op_UpdateSubscriber.go b/service/budgets/api_op_UpdateSubscriber.go index 77e750f81a1..5896fd630ff 100644 --- a/service/budgets/api_op_UpdateSubscriber.go +++ b/service/budgets/api_op_UpdateSubscriber.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSubscriberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_client.go b/service/chatbot/api_client.go index e4e3b44a45c..e1f52b1c469 100644 --- a/service/chatbot/api_client.go +++ b/service/chatbot/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/chatbot/api_op_CreateChimeWebhookConfiguration.go b/service/chatbot/api_op_CreateChimeWebhookConfiguration.go index 6eef89bd14d..f234fc2c6a8 100644 --- a/service/chatbot/api_op_CreateChimeWebhookConfiguration.go +++ b/service/chatbot/api_op_CreateChimeWebhookConfiguration.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateChimeWebhookConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChimeWebhookConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_CreateMicrosoftTeamsChannelConfiguration.go b/service/chatbot/api_op_CreateMicrosoftTeamsChannelConfiguration.go index 3e5583aa601..5b367bf3356 100644 --- a/service/chatbot/api_op_CreateMicrosoftTeamsChannelConfiguration.go +++ b/service/chatbot/api_op_CreateMicrosoftTeamsChannelConfiguration.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateMicrosoftTeamsChannelConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMicrosoftTeamsChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_CreateSlackChannelConfiguration.go b/service/chatbot/api_op_CreateSlackChannelConfiguration.go index 2df607c4ef7..4ba61dcf2d3 100644 --- a/service/chatbot/api_op_CreateSlackChannelConfiguration.go +++ b/service/chatbot/api_op_CreateSlackChannelConfiguration.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateSlackChannelConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSlackChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteChimeWebhookConfiguration.go b/service/chatbot/api_op_DeleteChimeWebhookConfiguration.go index 57352cb5077..4d20b8114a3 100644 --- a/service/chatbot/api_op_DeleteChimeWebhookConfiguration.go +++ b/service/chatbot/api_op_DeleteChimeWebhookConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteChimeWebhookConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChimeWebhookConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteMicrosoftTeamsChannelConfiguration.go b/service/chatbot/api_op_DeleteMicrosoftTeamsChannelConfiguration.go index 8ded7069c49..70734e9ed4b 100644 --- a/service/chatbot/api_op_DeleteMicrosoftTeamsChannelConfiguration.go +++ b/service/chatbot/api_op_DeleteMicrosoftTeamsChannelConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMicrosoftTeamsChannelConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMicrosoftTeamsChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteMicrosoftTeamsConfiguredTeam.go b/service/chatbot/api_op_DeleteMicrosoftTeamsConfiguredTeam.go index 61fa6d585af..714afd6f6f2 100644 --- a/service/chatbot/api_op_DeleteMicrosoftTeamsConfiguredTeam.go +++ b/service/chatbot/api_op_DeleteMicrosoftTeamsConfiguredTeam.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteMicrosoftTeamsConfiguredTeamMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMicrosoftTeamsConfiguredTeamValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteMicrosoftTeamsUserIdentity.go b/service/chatbot/api_op_DeleteMicrosoftTeamsUserIdentity.go index e0d0e0dc799..f9cb846b444 100644 --- a/service/chatbot/api_op_DeleteMicrosoftTeamsUserIdentity.go +++ b/service/chatbot/api_op_DeleteMicrosoftTeamsUserIdentity.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteMicrosoftTeamsUserIdentityMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMicrosoftTeamsUserIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteSlackChannelConfiguration.go b/service/chatbot/api_op_DeleteSlackChannelConfiguration.go index fb1d669bbc0..601f5f9d2ff 100644 --- a/service/chatbot/api_op_DeleteSlackChannelConfiguration.go +++ b/service/chatbot/api_op_DeleteSlackChannelConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSlackChannelConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlackChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteSlackUserIdentity.go b/service/chatbot/api_op_DeleteSlackUserIdentity.go index 560d3260137..9b8b84a06a9 100644 --- a/service/chatbot/api_op_DeleteSlackUserIdentity.go +++ b/service/chatbot/api_op_DeleteSlackUserIdentity.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteSlackUserIdentityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlackUserIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DeleteSlackWorkspaceAuthorization.go b/service/chatbot/api_op_DeleteSlackWorkspaceAuthorization.go index 1fc812befa7..772b4a77258 100644 --- a/service/chatbot/api_op_DeleteSlackWorkspaceAuthorization.go +++ b/service/chatbot/api_op_DeleteSlackWorkspaceAuthorization.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteSlackWorkspaceAuthorizationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlackWorkspaceAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go b/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go index f244b436b81..a82b5af3296 100644 --- a/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go +++ b/service/chatbot/api_op_DescribeChimeWebhookConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeChimeWebhookConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChimeWebhookConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeChimeWebhookConfigurationsMiddlewares(stack return nil } -// DescribeChimeWebhookConfigurationsAPIClient is a client that implements the -// DescribeChimeWebhookConfigurations operation. -type DescribeChimeWebhookConfigurationsAPIClient interface { - DescribeChimeWebhookConfigurations(context.Context, *DescribeChimeWebhookConfigurationsInput, ...func(*Options)) (*DescribeChimeWebhookConfigurationsOutput, error) -} - -var _ DescribeChimeWebhookConfigurationsAPIClient = (*Client)(nil) - // DescribeChimeWebhookConfigurationsPaginatorOptions is the paginator options for // DescribeChimeWebhookConfigurations type DescribeChimeWebhookConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeChimeWebhookConfigurationsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeChimeWebhookConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeChimeWebhookConfigurationsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeChimeWebhookConfigurationsAPIClient is a client that implements the +// DescribeChimeWebhookConfigurations operation. +type DescribeChimeWebhookConfigurationsAPIClient interface { + DescribeChimeWebhookConfigurations(context.Context, *DescribeChimeWebhookConfigurationsInput, ...func(*Options)) (*DescribeChimeWebhookConfigurationsOutput, error) +} + +var _ DescribeChimeWebhookConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeChimeWebhookConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_DescribeSlackChannelConfigurations.go b/service/chatbot/api_op_DescribeSlackChannelConfigurations.go index a73087b38a3..bb8a50432aa 100644 --- a/service/chatbot/api_op_DescribeSlackChannelConfigurations.go +++ b/service/chatbot/api_op_DescribeSlackChannelConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeSlackChannelConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSlackChannelConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeSlackChannelConfigurationsMiddlewares(stack return nil } -// DescribeSlackChannelConfigurationsAPIClient is a client that implements the -// DescribeSlackChannelConfigurations operation. -type DescribeSlackChannelConfigurationsAPIClient interface { - DescribeSlackChannelConfigurations(context.Context, *DescribeSlackChannelConfigurationsInput, ...func(*Options)) (*DescribeSlackChannelConfigurationsOutput, error) -} - -var _ DescribeSlackChannelConfigurationsAPIClient = (*Client)(nil) - // DescribeSlackChannelConfigurationsPaginatorOptions is the paginator options for // DescribeSlackChannelConfigurations type DescribeSlackChannelConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeSlackChannelConfigurationsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSlackChannelConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeSlackChannelConfigurationsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeSlackChannelConfigurationsAPIClient is a client that implements the +// DescribeSlackChannelConfigurations operation. +type DescribeSlackChannelConfigurationsAPIClient interface { + DescribeSlackChannelConfigurations(context.Context, *DescribeSlackChannelConfigurationsInput, ...func(*Options)) (*DescribeSlackChannelConfigurationsOutput, error) +} + +var _ DescribeSlackChannelConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSlackChannelConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_DescribeSlackUserIdentities.go b/service/chatbot/api_op_DescribeSlackUserIdentities.go index 46455bb4098..09841e079de 100644 --- a/service/chatbot/api_op_DescribeSlackUserIdentities.go +++ b/service/chatbot/api_op_DescribeSlackUserIdentities.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeSlackUserIdentitiesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSlackUserIdentities(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeSlackUserIdentitiesMiddlewares(stack *middl return nil } -// DescribeSlackUserIdentitiesAPIClient is a client that implements the -// DescribeSlackUserIdentities operation. -type DescribeSlackUserIdentitiesAPIClient interface { - DescribeSlackUserIdentities(context.Context, *DescribeSlackUserIdentitiesInput, ...func(*Options)) (*DescribeSlackUserIdentitiesOutput, error) -} - -var _ DescribeSlackUserIdentitiesAPIClient = (*Client)(nil) - // DescribeSlackUserIdentitiesPaginatorOptions is the paginator options for // DescribeSlackUserIdentities type DescribeSlackUserIdentitiesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeSlackUserIdentitiesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSlackUserIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeSlackUserIdentitiesPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeSlackUserIdentitiesAPIClient is a client that implements the +// DescribeSlackUserIdentities operation. +type DescribeSlackUserIdentitiesAPIClient interface { + DescribeSlackUserIdentities(context.Context, *DescribeSlackUserIdentitiesInput, ...func(*Options)) (*DescribeSlackUserIdentitiesOutput, error) +} + +var _ DescribeSlackUserIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSlackUserIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_DescribeSlackWorkspaces.go b/service/chatbot/api_op_DescribeSlackWorkspaces.go index f5bdad0309a..d646e8fbb97 100644 --- a/service/chatbot/api_op_DescribeSlackWorkspaces.go +++ b/service/chatbot/api_op_DescribeSlackWorkspaces.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeSlackWorkspacesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSlackWorkspaces(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeSlackWorkspacesMiddlewares(stack *middlewar return nil } -// DescribeSlackWorkspacesAPIClient is a client that implements the -// DescribeSlackWorkspaces operation. -type DescribeSlackWorkspacesAPIClient interface { - DescribeSlackWorkspaces(context.Context, *DescribeSlackWorkspacesInput, ...func(*Options)) (*DescribeSlackWorkspacesOutput, error) -} - -var _ DescribeSlackWorkspacesAPIClient = (*Client)(nil) - // DescribeSlackWorkspacesPaginatorOptions is the paginator options for // DescribeSlackWorkspaces type DescribeSlackWorkspacesPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *DescribeSlackWorkspacesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSlackWorkspaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribeSlackWorkspacesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeSlackWorkspacesAPIClient is a client that implements the +// DescribeSlackWorkspaces operation. +type DescribeSlackWorkspacesAPIClient interface { + DescribeSlackWorkspaces(context.Context, *DescribeSlackWorkspacesInput, ...func(*Options)) (*DescribeSlackWorkspacesOutput, error) +} + +var _ DescribeSlackWorkspacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSlackWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_GetAccountPreferences.go b/service/chatbot/api_op_GetAccountPreferences.go index c905b0c26b2..e5ea562e13e 100644 --- a/service/chatbot/api_op_GetAccountPreferences.go +++ b/service/chatbot/api_op_GetAccountPreferences.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetAccountPreferencesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountPreferences(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go b/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go index b7a1e60209e..9144c23dab0 100644 --- a/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go +++ b/service/chatbot/api_op_GetMicrosoftTeamsChannelConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetMicrosoftTeamsChannelConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMicrosoftTeamsChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_ListMicrosoftTeamsChannelConfigurations.go b/service/chatbot/api_op_ListMicrosoftTeamsChannelConfigurations.go index df4ba8a91c3..398c02f23fc 100644 --- a/service/chatbot/api_op_ListMicrosoftTeamsChannelConfigurations.go +++ b/service/chatbot/api_op_ListMicrosoftTeamsChannelConfigurations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListMicrosoftTeamsChannelConfigurationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMicrosoftTeamsChannelConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListMicrosoftTeamsChannelConfigurationsMiddlewares( return nil } -// ListMicrosoftTeamsChannelConfigurationsAPIClient is a client that implements -// the ListMicrosoftTeamsChannelConfigurations operation. -type ListMicrosoftTeamsChannelConfigurationsAPIClient interface { - ListMicrosoftTeamsChannelConfigurations(context.Context, *ListMicrosoftTeamsChannelConfigurationsInput, ...func(*Options)) (*ListMicrosoftTeamsChannelConfigurationsOutput, error) -} - -var _ ListMicrosoftTeamsChannelConfigurationsAPIClient = (*Client)(nil) - // ListMicrosoftTeamsChannelConfigurationsPaginatorOptions is the paginator // options for ListMicrosoftTeamsChannelConfigurations type ListMicrosoftTeamsChannelConfigurationsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListMicrosoftTeamsChannelConfigurationsPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMicrosoftTeamsChannelConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListMicrosoftTeamsChannelConfigurationsPaginator) NextPage(ctx context. return result, nil } +// ListMicrosoftTeamsChannelConfigurationsAPIClient is a client that implements +// the ListMicrosoftTeamsChannelConfigurations operation. +type ListMicrosoftTeamsChannelConfigurationsAPIClient interface { + ListMicrosoftTeamsChannelConfigurations(context.Context, *ListMicrosoftTeamsChannelConfigurationsInput, ...func(*Options)) (*ListMicrosoftTeamsChannelConfigurationsOutput, error) +} + +var _ ListMicrosoftTeamsChannelConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMicrosoftTeamsChannelConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_ListMicrosoftTeamsConfiguredTeams.go b/service/chatbot/api_op_ListMicrosoftTeamsConfiguredTeams.go index b270966a0ef..bd4bfcc5595 100644 --- a/service/chatbot/api_op_ListMicrosoftTeamsConfiguredTeams.go +++ b/service/chatbot/api_op_ListMicrosoftTeamsConfiguredTeams.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListMicrosoftTeamsConfiguredTeamsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMicrosoftTeamsConfiguredTeams(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListMicrosoftTeamsConfiguredTeamsMiddlewares(stack return nil } -// ListMicrosoftTeamsConfiguredTeamsAPIClient is a client that implements the -// ListMicrosoftTeamsConfiguredTeams operation. -type ListMicrosoftTeamsConfiguredTeamsAPIClient interface { - ListMicrosoftTeamsConfiguredTeams(context.Context, *ListMicrosoftTeamsConfiguredTeamsInput, ...func(*Options)) (*ListMicrosoftTeamsConfiguredTeamsOutput, error) -} - -var _ ListMicrosoftTeamsConfiguredTeamsAPIClient = (*Client)(nil) - // ListMicrosoftTeamsConfiguredTeamsPaginatorOptions is the paginator options for // ListMicrosoftTeamsConfiguredTeams type ListMicrosoftTeamsConfiguredTeamsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListMicrosoftTeamsConfiguredTeamsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMicrosoftTeamsConfiguredTeams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListMicrosoftTeamsConfiguredTeamsPaginator) NextPage(ctx context.Contex return result, nil } +// ListMicrosoftTeamsConfiguredTeamsAPIClient is a client that implements the +// ListMicrosoftTeamsConfiguredTeams operation. +type ListMicrosoftTeamsConfiguredTeamsAPIClient interface { + ListMicrosoftTeamsConfiguredTeams(context.Context, *ListMicrosoftTeamsConfiguredTeamsInput, ...func(*Options)) (*ListMicrosoftTeamsConfiguredTeamsOutput, error) +} + +var _ ListMicrosoftTeamsConfiguredTeamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMicrosoftTeamsConfiguredTeams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go b/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go index cb4111b03fb..21d0328de90 100644 --- a/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go +++ b/service/chatbot/api_op_ListMicrosoftTeamsUserIdentities.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListMicrosoftTeamsUserIdentitiesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMicrosoftTeamsUserIdentities(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListMicrosoftTeamsUserIdentitiesMiddlewares(stack * return nil } -// ListMicrosoftTeamsUserIdentitiesAPIClient is a client that implements the -// ListMicrosoftTeamsUserIdentities operation. -type ListMicrosoftTeamsUserIdentitiesAPIClient interface { - ListMicrosoftTeamsUserIdentities(context.Context, *ListMicrosoftTeamsUserIdentitiesInput, ...func(*Options)) (*ListMicrosoftTeamsUserIdentitiesOutput, error) -} - -var _ ListMicrosoftTeamsUserIdentitiesAPIClient = (*Client)(nil) - // ListMicrosoftTeamsUserIdentitiesPaginatorOptions is the paginator options for // ListMicrosoftTeamsUserIdentities type ListMicrosoftTeamsUserIdentitiesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListMicrosoftTeamsUserIdentitiesPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMicrosoftTeamsUserIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListMicrosoftTeamsUserIdentitiesPaginator) NextPage(ctx context.Context return result, nil } +// ListMicrosoftTeamsUserIdentitiesAPIClient is a client that implements the +// ListMicrosoftTeamsUserIdentities operation. +type ListMicrosoftTeamsUserIdentitiesAPIClient interface { + ListMicrosoftTeamsUserIdentities(context.Context, *ListMicrosoftTeamsUserIdentitiesInput, ...func(*Options)) (*ListMicrosoftTeamsUserIdentitiesOutput, error) +} + +var _ ListMicrosoftTeamsUserIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMicrosoftTeamsUserIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chatbot/api_op_ListTagsForResource.go b/service/chatbot/api_op_ListTagsForResource.go index 98958c9ca7b..c86d0180563 100644 --- a/service/chatbot/api_op_ListTagsForResource.go +++ b/service/chatbot/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_TagResource.go b/service/chatbot/api_op_TagResource.go index baf0e5458fc..d76d3f9c68e 100644 --- a/service/chatbot/api_op_TagResource.go +++ b/service/chatbot/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_UntagResource.go b/service/chatbot/api_op_UntagResource.go index 0019d5e3154..b885c0ebbe1 100644 --- a/service/chatbot/api_op_UntagResource.go +++ b/service/chatbot/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_UpdateAccountPreferences.go b/service/chatbot/api_op_UpdateAccountPreferences.go index d0233effaa1..c8d35cf7b76 100644 --- a/service/chatbot/api_op_UpdateAccountPreferences.go +++ b/service/chatbot/api_op_UpdateAccountPreferences.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateAccountPreferencesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountPreferences(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go b/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go index 6424511ea3a..a6370a9bbb4 100644 --- a/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go +++ b/service/chatbot/api_op_UpdateChimeWebhookConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateChimeWebhookConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChimeWebhookConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go b/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go index 3dd12a95d17..a320456616c 100644 --- a/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go +++ b/service/chatbot/api_op_UpdateMicrosoftTeamsChannelConfiguration.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateMicrosoftTeamsChannelConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMicrosoftTeamsChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chatbot/api_op_UpdateSlackChannelConfiguration.go b/service/chatbot/api_op_UpdateSlackChannelConfiguration.go index 706c03703c1..e994209e8ab 100644 --- a/service/chatbot/api_op_UpdateSlackChannelConfiguration.go +++ b/service/chatbot/api_op_UpdateSlackChannelConfiguration.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateSlackChannelConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSlackChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_client.go b/service/chime/api_client.go index 8b127fef03d..46fc90d43e5 100644 --- a/service/chime/api_client.go +++ b/service/chime/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/chime/api_op_AssociatePhoneNumberWithUser.go b/service/chime/api_op_AssociatePhoneNumberWithUser.go index 29d4121a583..f6c398b223e 100644 --- a/service/chime/api_op_AssociatePhoneNumberWithUser.go +++ b/service/chime/api_op_AssociatePhoneNumberWithUser.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociatePhoneNumberWithUserMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePhoneNumberWithUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go b/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go index cdbd95f9acc..ef3c8bd6ae6 100644 --- a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go +++ b/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAssociatePhoneNumbersWithVoiceConnectorMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePhoneNumbersWithVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go b/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go index 20b020b9548..13f7abb625a 100644 --- a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go +++ b/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAssociatePhoneNumbersWithVoiceConnectorGroupMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePhoneNumbersWithVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_AssociateSigninDelegateGroupsWithAccount.go b/service/chime/api_op_AssociateSigninDelegateGroupsWithAccount.go index 0028aa2d611..65c3391b48e 100644 --- a/service/chime/api_op_AssociateSigninDelegateGroupsWithAccount.go +++ b/service/chime/api_op_AssociateSigninDelegateGroupsWithAccount.go @@ -108,6 +108,9 @@ func (c *Client) addOperationAssociateSigninDelegateGroupsWithAccountMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSigninDelegateGroupsWithAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchCreateAttendee.go b/service/chime/api_op_BatchCreateAttendee.go index 32c5d38e4d1..c0e77f902ff 100644 --- a/service/chime/api_op_BatchCreateAttendee.go +++ b/service/chime/api_op_BatchCreateAttendee.go @@ -131,6 +131,9 @@ func (c *Client) addOperationBatchCreateAttendeeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchCreateChannelMembership.go b/service/chime/api_op_BatchCreateChannelMembership.go index 2147f3e0487..f035d710c3d 100644 --- a/service/chime/api_op_BatchCreateChannelMembership.go +++ b/service/chime/api_op_BatchCreateChannelMembership.go @@ -136,6 +136,9 @@ func (c *Client) addOperationBatchCreateChannelMembershipMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchCreateChannelMembershipMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchCreateRoomMembership.go b/service/chime/api_op_BatchCreateRoomMembership.go index acb619274dd..e30c7a3def0 100644 --- a/service/chime/api_op_BatchCreateRoomMembership.go +++ b/service/chime/api_op_BatchCreateRoomMembership.go @@ -119,6 +119,9 @@ func (c *Client) addOperationBatchCreateRoomMembershipMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateRoomMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchDeletePhoneNumber.go b/service/chime/api_op_BatchDeletePhoneNumber.go index 6bbeb40baa1..569aa2715b2 100644 --- a/service/chime/api_op_BatchDeletePhoneNumber.go +++ b/service/chime/api_op_BatchDeletePhoneNumber.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchDeletePhoneNumberMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeletePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchSuspendUser.go b/service/chime/api_op_BatchSuspendUser.go index abda6b700df..f86a5cc836a 100644 --- a/service/chime/api_op_BatchSuspendUser.go +++ b/service/chime/api_op_BatchSuspendUser.go @@ -127,6 +127,9 @@ func (c *Client) addOperationBatchSuspendUserMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchSuspendUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchUnsuspendUser.go b/service/chime/api_op_BatchUnsuspendUser.go index 6a37c199d34..7c2d7b3c558 100644 --- a/service/chime/api_op_BatchUnsuspendUser.go +++ b/service/chime/api_op_BatchUnsuspendUser.go @@ -121,6 +121,9 @@ func (c *Client) addOperationBatchUnsuspendUserMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUnsuspendUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchUpdatePhoneNumber.go b/service/chime/api_op_BatchUpdatePhoneNumber.go index 34eaad47b7f..2b0c1e49b97 100644 --- a/service/chime/api_op_BatchUpdatePhoneNumber.go +++ b/service/chime/api_op_BatchUpdatePhoneNumber.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchUpdatePhoneNumberMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdatePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_BatchUpdateUser.go b/service/chime/api_op_BatchUpdateUser.go index 1b4021c7934..5a4c23d0e34 100644 --- a/service/chime/api_op_BatchUpdateUser.go +++ b/service/chime/api_op_BatchUpdateUser.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchUpdateUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateAccount.go b/service/chime/api_op_CreateAccount.go index d1253503bcb..36046583865 100644 --- a/service/chime/api_op_CreateAccount.go +++ b/service/chime/api_op_CreateAccount.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateAccountMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateAppInstance.go b/service/chime/api_op_CreateAppInstance.go index 87fc241dc9d..5a07e4698e7 100644 --- a/service/chime/api_op_CreateAppInstance.go +++ b/service/chime/api_op_CreateAppInstance.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateAppInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAppInstanceMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateAppInstanceAdmin.go b/service/chime/api_op_CreateAppInstanceAdmin.go index 63412106f47..38b0e46ba0f 100644 --- a/service/chime/api_op_CreateAppInstanceAdmin.go +++ b/service/chime/api_op_CreateAppInstanceAdmin.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateAppInstanceAdminMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAppInstanceAdminMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateAppInstanceUser.go b/service/chime/api_op_CreateAppInstanceUser.go index b38a06feeb5..d7264c702b1 100644 --- a/service/chime/api_op_CreateAppInstanceUser.go +++ b/service/chime/api_op_CreateAppInstanceUser.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateAppInstanceUserMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAppInstanceUserMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateAttendee.go b/service/chime/api_op_CreateAttendee.go index bff0cd363c8..5e5f2144283 100644 --- a/service/chime/api_op_CreateAttendee.go +++ b/service/chime/api_op_CreateAttendee.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateAttendeeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateBot.go b/service/chime/api_op_CreateBot.go index f2174be7304..6196ac3570f 100644 --- a/service/chime/api_op_CreateBot.go +++ b/service/chime/api_op_CreateBot.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateBotMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateChannel.go b/service/chime/api_op_CreateChannel.go index 8a2f514748a..8ff66323b75 100644 --- a/service/chime/api_op_CreateChannel.go +++ b/service/chime/api_op_CreateChannel.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateChannelMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateChannelBan.go b/service/chime/api_op_CreateChannelBan.go index c6af4007b73..27cdf5d5d3d 100644 --- a/service/chime/api_op_CreateChannelBan.go +++ b/service/chime/api_op_CreateChannelBan.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateChannelBanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateChannelBanMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateChannelMembership.go b/service/chime/api_op_CreateChannelMembership.go index 73d8c5ab7ae..a17479b9908 100644 --- a/service/chime/api_op_CreateChannelMembership.go +++ b/service/chime/api_op_CreateChannelMembership.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateChannelMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateChannelMembershipMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateChannelModerator.go b/service/chime/api_op_CreateChannelModerator.go index 611be0bd5bd..958e366fc02 100644 --- a/service/chime/api_op_CreateChannelModerator.go +++ b/service/chime/api_op_CreateChannelModerator.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateChannelModeratorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateChannelModeratorMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateMediaCapturePipeline.go b/service/chime/api_op_CreateMediaCapturePipeline.go index 4e0c58ff060..832d54eeb2b 100644 --- a/service/chime/api_op_CreateMediaCapturePipeline.go +++ b/service/chime/api_op_CreateMediaCapturePipeline.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateMediaCapturePipelineMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaCapturePipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/chime/api_op_CreateMeeting.go b/service/chime/api_op_CreateMeeting.go index b7402af17de..812b3bd7737 100644 --- a/service/chime/api_op_CreateMeeting.go +++ b/service/chime/api_op_CreateMeeting.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateMeetingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMeetingMiddleware(stack, options); err != nil { return err } diff --git a/service/chime/api_op_CreateMeetingDialOut.go b/service/chime/api_op_CreateMeetingDialOut.go index 6385f340040..026dacfa3ec 100644 --- a/service/chime/api_op_CreateMeetingDialOut.go +++ b/service/chime/api_op_CreateMeetingDialOut.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateMeetingDialOutMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMeetingDialOutValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateMeetingWithAttendees.go b/service/chime/api_op_CreateMeetingWithAttendees.go index 3846c9d95ad..ab63939e932 100644 --- a/service/chime/api_op_CreateMeetingWithAttendees.go +++ b/service/chime/api_op_CreateMeetingWithAttendees.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateMeetingWithAttendeesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMeetingWithAttendeesMiddleware(stack, options); err != nil { return err } diff --git a/service/chime/api_op_CreatePhoneNumberOrder.go b/service/chime/api_op_CreatePhoneNumberOrder.go index cddf576af5e..6518f6a08ca 100644 --- a/service/chime/api_op_CreatePhoneNumberOrder.go +++ b/service/chime/api_op_CreatePhoneNumberOrder.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreatePhoneNumberOrderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePhoneNumberOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateProxySession.go b/service/chime/api_op_CreateProxySession.go index b6663b6dd66..9fd5961d98b 100644 --- a/service/chime/api_op_CreateProxySession.go +++ b/service/chime/api_op_CreateProxySession.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateProxySessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateRoom.go b/service/chime/api_op_CreateRoom.go index 896e4ca514b..e182496797b 100644 --- a/service/chime/api_op_CreateRoom.go +++ b/service/chime/api_op_CreateRoom.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateRoomMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRoomMiddleware(stack, options); err != nil { return err } diff --git a/service/chime/api_op_CreateRoomMembership.go b/service/chime/api_op_CreateRoomMembership.go index 19379b73d47..18b8b902ddb 100644 --- a/service/chime/api_op_CreateRoomMembership.go +++ b/service/chime/api_op_CreateRoomMembership.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateRoomMembershipMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRoomMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateSipMediaApplication.go b/service/chime/api_op_CreateSipMediaApplication.go index 2aed5466077..240b2120acc 100644 --- a/service/chime/api_op_CreateSipMediaApplication.go +++ b/service/chime/api_op_CreateSipMediaApplication.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateSipMediaApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateSipMediaApplicationCall.go b/service/chime/api_op_CreateSipMediaApplicationCall.go index 7cdf66314c9..d1927323d3f 100644 --- a/service/chime/api_op_CreateSipMediaApplicationCall.go +++ b/service/chime/api_op_CreateSipMediaApplicationCall.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateSipMediaApplicationCallMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSipMediaApplicationCallValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateSipRule.go b/service/chime/api_op_CreateSipRule.go index 5e94e789b09..01888892573 100644 --- a/service/chime/api_op_CreateSipRule.go +++ b/service/chime/api_op_CreateSipRule.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateSipRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateUser.go b/service/chime/api_op_CreateUser.go index 6f91feaaf98..25487567a56 100644 --- a/service/chime/api_op_CreateUser.go +++ b/service/chime/api_op_CreateUser.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateVoiceConnector.go b/service/chime/api_op_CreateVoiceConnector.go index 81ae73c5b7b..4a66c605623 100644 --- a/service/chime/api_op_CreateVoiceConnector.go +++ b/service/chime/api_op_CreateVoiceConnector.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateVoiceConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_CreateVoiceConnectorGroup.go b/service/chime/api_op_CreateVoiceConnectorGroup.go index 06e7be5d1a9..69415dcfb7f 100644 --- a/service/chime/api_op_CreateVoiceConnectorGroup.go +++ b/service/chime/api_op_CreateVoiceConnectorGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateVoiceConnectorGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteAccount.go b/service/chime/api_op_DeleteAccount.go index bd280043f38..9e78d2f8cc0 100644 --- a/service/chime/api_op_DeleteAccount.go +++ b/service/chime/api_op_DeleteAccount.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteAccountMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteAppInstance.go b/service/chime/api_op_DeleteAppInstance.go index ef5029260a9..978ebd4a9d4 100644 --- a/service/chime/api_op_DeleteAppInstance.go +++ b/service/chime/api_op_DeleteAppInstance.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAppInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAppInstanceMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteAppInstanceAdmin.go b/service/chime/api_op_DeleteAppInstanceAdmin.go index 1baa022b0ca..afcc89e123b 100644 --- a/service/chime/api_op_DeleteAppInstanceAdmin.go +++ b/service/chime/api_op_DeleteAppInstanceAdmin.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteAppInstanceAdminMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAppInstanceAdminMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go b/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go index 8637629ded6..cc7b0f9b7cd 100644 --- a/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go +++ b/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAppInstanceStreamingConfigurationsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppInstanceStreamingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteAppInstanceUser.go b/service/chime/api_op_DeleteAppInstanceUser.go index 8b27c604843..6057547fca0 100644 --- a/service/chime/api_op_DeleteAppInstanceUser.go +++ b/service/chime/api_op_DeleteAppInstanceUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAppInstanceUserMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAppInstanceUserMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteAttendee.go b/service/chime/api_op_DeleteAttendee.go index 9fcf1bd4cfc..d3f24fcd53c 100644 --- a/service/chime/api_op_DeleteAttendee.go +++ b/service/chime/api_op_DeleteAttendee.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteAttendeeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteChannel.go b/service/chime/api_op_DeleteChannel.go index 33516fc026f..6fffc441015 100644 --- a/service/chime/api_op_DeleteChannel.go +++ b/service/chime/api_op_DeleteChannel.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteChannelMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteChannelBan.go b/service/chime/api_op_DeleteChannelBan.go index 2c35b815ef9..9d5bd3bb2b8 100644 --- a/service/chime/api_op_DeleteChannelBan.go +++ b/service/chime/api_op_DeleteChannelBan.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteChannelBanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteChannelBanMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteChannelMembership.go b/service/chime/api_op_DeleteChannelMembership.go index 786c3f5d5a3..452e1841fd2 100644 --- a/service/chime/api_op_DeleteChannelMembership.go +++ b/service/chime/api_op_DeleteChannelMembership.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteChannelMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteChannelMembershipMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteChannelMessage.go b/service/chime/api_op_DeleteChannelMessage.go index 63aac690d5d..b7cc518cc92 100644 --- a/service/chime/api_op_DeleteChannelMessage.go +++ b/service/chime/api_op_DeleteChannelMessage.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteChannelMessageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteChannelMessageMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteChannelModerator.go b/service/chime/api_op_DeleteChannelModerator.go index b715241b11a..7893215980e 100644 --- a/service/chime/api_op_DeleteChannelModerator.go +++ b/service/chime/api_op_DeleteChannelModerator.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteChannelModeratorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteChannelModeratorMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteEventsConfiguration.go b/service/chime/api_op_DeleteEventsConfiguration.go index 9ac1e6fe71e..6a32f3df3af 100644 --- a/service/chime/api_op_DeleteEventsConfiguration.go +++ b/service/chime/api_op_DeleteEventsConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEventsConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteMediaCapturePipeline.go b/service/chime/api_op_DeleteMediaCapturePipeline.go index b4d1c249109..3ba4b993adf 100644 --- a/service/chime/api_op_DeleteMediaCapturePipeline.go +++ b/service/chime/api_op_DeleteMediaCapturePipeline.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteMediaCapturePipelineMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMediaCapturePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteMeeting.go b/service/chime/api_op_DeleteMeeting.go index b7a26117759..aefb3c37a64 100644 --- a/service/chime/api_op_DeleteMeeting.go +++ b/service/chime/api_op_DeleteMeeting.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteMeetingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMeetingValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeletePhoneNumber.go b/service/chime/api_op_DeletePhoneNumber.go index 44900bd37f5..1b91b035791 100644 --- a/service/chime/api_op_DeletePhoneNumber.go +++ b/service/chime/api_op_DeletePhoneNumber.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteProxySession.go b/service/chime/api_op_DeleteProxySession.go index c94d74bdfdc..e2c41a4e2df 100644 --- a/service/chime/api_op_DeleteProxySession.go +++ b/service/chime/api_op_DeleteProxySession.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteProxySessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteRoom.go b/service/chime/api_op_DeleteRoom.go index f6bd2e5e7ec..5db74e6399d 100644 --- a/service/chime/api_op_DeleteRoom.go +++ b/service/chime/api_op_DeleteRoom.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRoomMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoomValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteRoomMembership.go b/service/chime/api_op_DeleteRoomMembership.go index 9222cfbbe91..3099a3713e8 100644 --- a/service/chime/api_op_DeleteRoomMembership.go +++ b/service/chime/api_op_DeleteRoomMembership.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteRoomMembershipMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoomMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteSipMediaApplication.go b/service/chime/api_op_DeleteSipMediaApplication.go index 1f59670d97c..8c6ef7833ee 100644 --- a/service/chime/api_op_DeleteSipMediaApplication.go +++ b/service/chime/api_op_DeleteSipMediaApplication.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteSipMediaApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteSipRule.go b/service/chime/api_op_DeleteSipRule.go index 3194a9af0a9..5d63a7d5639 100644 --- a/service/chime/api_op_DeleteSipRule.go +++ b/service/chime/api_op_DeleteSipRule.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteSipRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnector.go b/service/chime/api_op_DeleteVoiceConnector.go index 019ceebd993..b73d88c128d 100644 --- a/service/chime/api_op_DeleteVoiceConnector.go +++ b/service/chime/api_op_DeleteVoiceConnector.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteVoiceConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go b/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go index 88ee62e9a28..1a300bb1de5 100644 --- a/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go +++ b/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteVoiceConnectorEmergencyCallingConfigurationMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorGroup.go b/service/chime/api_op_DeleteVoiceConnectorGroup.go index 2df7bd4625b..55c3b585ce8 100644 --- a/service/chime/api_op_DeleteVoiceConnectorGroup.go +++ b/service/chime/api_op_DeleteVoiceConnectorGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteVoiceConnectorGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorOrigination.go b/service/chime/api_op_DeleteVoiceConnectorOrigination.go index 691b65b2050..78ef6ffc738 100644 --- a/service/chime/api_op_DeleteVoiceConnectorOrigination.go +++ b/service/chime/api_op_DeleteVoiceConnectorOrigination.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteVoiceConnectorOriginationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorOriginationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorProxy.go b/service/chime/api_op_DeleteVoiceConnectorProxy.go index 382275b9050..10f0561255d 100644 --- a/service/chime/api_op_DeleteVoiceConnectorProxy.go +++ b/service/chime/api_op_DeleteVoiceConnectorProxy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteVoiceConnectorProxyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go b/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go index 33494789747..5eeb49f0162 100644 --- a/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go +++ b/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteVoiceConnectorStreamingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorTermination.go b/service/chime/api_op_DeleteVoiceConnectorTermination.go index ca43b040bb7..6b410a88eb8 100644 --- a/service/chime/api_op_DeleteVoiceConnectorTermination.go +++ b/service/chime/api_op_DeleteVoiceConnectorTermination.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteVoiceConnectorTerminationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorTerminationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go b/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go index c1a610c235d..b7f6426b8f9 100644 --- a/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go +++ b/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteVoiceConnectorTerminationCredentialsMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeAppInstance.go b/service/chime/api_op_DescribeAppInstance.go index 02fbcc89617..82d39deeec2 100644 --- a/service/chime/api_op_DescribeAppInstance.go +++ b/service/chime/api_op_DescribeAppInstance.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeAppInstanceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAppInstanceMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeAppInstanceAdmin.go b/service/chime/api_op_DescribeAppInstanceAdmin.go index d7a29c457c8..14e75ef4bfb 100644 --- a/service/chime/api_op_DescribeAppInstanceAdmin.go +++ b/service/chime/api_op_DescribeAppInstanceAdmin.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeAppInstanceAdminMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAppInstanceAdminMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeAppInstanceUser.go b/service/chime/api_op_DescribeAppInstanceUser.go index 407ed0baba1..811e66dc6b8 100644 --- a/service/chime/api_op_DescribeAppInstanceUser.go +++ b/service/chime/api_op_DescribeAppInstanceUser.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeAppInstanceUserMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAppInstanceUserMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeChannel.go b/service/chime/api_op_DescribeChannel.go index 7830b8ae044..d7b0bd6cc44 100644 --- a/service/chime/api_op_DescribeChannel.go +++ b/service/chime/api_op_DescribeChannel.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeChannelMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeChannelBan.go b/service/chime/api_op_DescribeChannelBan.go index 48ef67eff61..eba30cf9ebe 100644 --- a/service/chime/api_op_DescribeChannelBan.go +++ b/service/chime/api_op_DescribeChannelBan.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeChannelBanMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeChannelBanMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeChannelMembership.go b/service/chime/api_op_DescribeChannelMembership.go index e6a74385914..b102a2fdb3c 100644 --- a/service/chime/api_op_DescribeChannelMembership.go +++ b/service/chime/api_op_DescribeChannelMembership.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeChannelMembershipMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeChannelMembershipMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go b/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go index f8ccd0f3dbd..49b5cc15a29 100644 --- a/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go +++ b/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeChannelMembershipForAppInstanceUserMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go b/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go index 76879f67ae7..d8efa80219a 100644 --- a/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go +++ b/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeChannelModeratedByAppInstanceUserMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DescribeChannelModerator.go b/service/chime/api_op_DescribeChannelModerator.go index b1281529b85..4fe111a63b9 100644 --- a/service/chime/api_op_DescribeChannelModerator.go +++ b/service/chime/api_op_DescribeChannelModerator.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeChannelModeratorMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeChannelModeratorMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DisassociatePhoneNumberFromUser.go b/service/chime/api_op_DisassociatePhoneNumberFromUser.go index 6760d720807..5d2d746eb93 100644 --- a/service/chime/api_op_DisassociatePhoneNumberFromUser.go +++ b/service/chime/api_op_DisassociatePhoneNumberFromUser.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociatePhoneNumberFromUserMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePhoneNumberFromUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go b/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go index ad37db98d57..18ef5026cf4 100644 --- a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go +++ b/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDisassociatePhoneNumbersFromVoiceConnectorMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePhoneNumbersFromVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go b/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go index a042a48a9b1..d74b6574e33 100644 --- a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go +++ b/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDisassociatePhoneNumbersFromVoiceConnectorGroupMidd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePhoneNumbersFromVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_DisassociateSigninDelegateGroupsFromAccount.go b/service/chime/api_op_DisassociateSigninDelegateGroupsFromAccount.go index 491a1d967ac..79de99de3c7 100644 --- a/service/chime/api_op_DisassociateSigninDelegateGroupsFromAccount.go +++ b/service/chime/api_op_DisassociateSigninDelegateGroupsFromAccount.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateSigninDelegateGroupsFromAccountMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateSigninDelegateGroupsFromAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetAccount.go b/service/chime/api_op_GetAccount.go index 0b71da6e952..211e71edbe4 100644 --- a/service/chime/api_op_GetAccount.go +++ b/service/chime/api_op_GetAccount.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetAccountMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetAccountSettings.go b/service/chime/api_op_GetAccountSettings.go index 9a8080903b7..e2ee61470d9 100644 --- a/service/chime/api_op_GetAccountSettings.go +++ b/service/chime/api_op_GetAccountSettings.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccountSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetAppInstanceRetentionSettings.go b/service/chime/api_op_GetAppInstanceRetentionSettings.go index 97ac96723e2..49125d76f78 100644 --- a/service/chime/api_op_GetAppInstanceRetentionSettings.go +++ b/service/chime/api_op_GetAppInstanceRetentionSettings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetAppInstanceRetentionSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAppInstanceRetentionSettingsMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetAppInstanceStreamingConfigurations.go b/service/chime/api_op_GetAppInstanceStreamingConfigurations.go index 07b32ac235e..ed142819663 100644 --- a/service/chime/api_op_GetAppInstanceStreamingConfigurations.go +++ b/service/chime/api_op_GetAppInstanceStreamingConfigurations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetAppInstanceStreamingConfigurationsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppInstanceStreamingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetAttendee.go b/service/chime/api_op_GetAttendee.go index d9775af4468..fa1dbfec629 100644 --- a/service/chime/api_op_GetAttendee.go +++ b/service/chime/api_op_GetAttendee.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetAttendeeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetBot.go b/service/chime/api_op_GetBot.go index 9735967cc9f..77720d8417f 100644 --- a/service/chime/api_op_GetBot.go +++ b/service/chime/api_op_GetBot.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetBotMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetChannelMessage.go b/service/chime/api_op_GetChannelMessage.go index ab192ff8bbe..616a8fbcd41 100644 --- a/service/chime/api_op_GetChannelMessage.go +++ b/service/chime/api_op_GetChannelMessage.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetChannelMessageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetChannelMessageMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetEventsConfiguration.go b/service/chime/api_op_GetEventsConfiguration.go index d2619c8d1f6..cff09d99bfd 100644 --- a/service/chime/api_op_GetEventsConfiguration.go +++ b/service/chime/api_op_GetEventsConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetEventsConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetGlobalSettings.go b/service/chime/api_op_GetGlobalSettings.go index 9cd33cbd4cf..085563fb7b2 100644 --- a/service/chime/api_op_GetGlobalSettings.go +++ b/service/chime/api_op_GetGlobalSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetGlobalSettingsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chime/api_op_GetMediaCapturePipeline.go b/service/chime/api_op_GetMediaCapturePipeline.go index 20f3550ff43..901305043cc 100644 --- a/service/chime/api_op_GetMediaCapturePipeline.go +++ b/service/chime/api_op_GetMediaCapturePipeline.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetMediaCapturePipelineMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaCapturePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetMeeting.go b/service/chime/api_op_GetMeeting.go index 6a03fa70849..70bcccd1d6a 100644 --- a/service/chime/api_op_GetMeeting.go +++ b/service/chime/api_op_GetMeeting.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetMeetingMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMeetingValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetMessagingSessionEndpoint.go b/service/chime/api_op_GetMessagingSessionEndpoint.go index d45baf88937..c0124d285bc 100644 --- a/service/chime/api_op_GetMessagingSessionEndpoint.go +++ b/service/chime/api_op_GetMessagingSessionEndpoint.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetMessagingSessionEndpointMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMessagingSessionEndpointMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetPhoneNumber.go b/service/chime/api_op_GetPhoneNumber.go index 6232fa6c6d2..5d6f669a202 100644 --- a/service/chime/api_op_GetPhoneNumber.go +++ b/service/chime/api_op_GetPhoneNumber.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetPhoneNumberMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetPhoneNumberOrder.go b/service/chime/api_op_GetPhoneNumberOrder.go index be4165b63fa..c20fc38b4de 100644 --- a/service/chime/api_op_GetPhoneNumberOrder.go +++ b/service/chime/api_op_GetPhoneNumberOrder.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetPhoneNumberOrderMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPhoneNumberOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetPhoneNumberSettings.go b/service/chime/api_op_GetPhoneNumberSettings.go index ef500d36767..867c9961fac 100644 --- a/service/chime/api_op_GetPhoneNumberSettings.go +++ b/service/chime/api_op_GetPhoneNumberSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetPhoneNumberSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPhoneNumberSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chime/api_op_GetProxySession.go b/service/chime/api_op_GetProxySession.go index 492b9761a34..1a2fdcc6d84 100644 --- a/service/chime/api_op_GetProxySession.go +++ b/service/chime/api_op_GetProxySession.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetProxySessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetRetentionSettings.go b/service/chime/api_op_GetRetentionSettings.go index e42515f71e3..6149fd9d0b7 100644 --- a/service/chime/api_op_GetRetentionSettings.go +++ b/service/chime/api_op_GetRetentionSettings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetRetentionSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRetentionSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetRoom.go b/service/chime/api_op_GetRoom.go index 40049897662..fcd3612633c 100644 --- a/service/chime/api_op_GetRoom.go +++ b/service/chime/api_op_GetRoom.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetRoomMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoomValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetSipMediaApplication.go b/service/chime/api_op_GetSipMediaApplication.go index af450e8d547..191b3291b0b 100644 --- a/service/chime/api_op_GetSipMediaApplication.go +++ b/service/chime/api_op_GetSipMediaApplication.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSipMediaApplicationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go b/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go index 37ca8053b14..2ba4a99bb97 100644 --- a/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go +++ b/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetSipMediaApplicationLoggingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipMediaApplicationLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetSipRule.go b/service/chime/api_op_GetSipRule.go index b98b469a4c7..e025a3ad478 100644 --- a/service/chime/api_op_GetSipRule.go +++ b/service/chime/api_op_GetSipRule.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetSipRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetUser.go b/service/chime/api_op_GetUser.go index 4a4a20568a3..362e4cbfa7e 100644 --- a/service/chime/api_op_GetUser.go +++ b/service/chime/api_op_GetUser.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetUserSettings.go b/service/chime/api_op_GetUserSettings.go index 70b0753d21c..d485246ba65 100644 --- a/service/chime/api_op_GetUserSettings.go +++ b/service/chime/api_op_GetUserSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetUserSettingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnector.go b/service/chime/api_op_GetVoiceConnector.go index 54dfaa953a4..d50ba17546d 100644 --- a/service/chime/api_op_GetVoiceConnector.go +++ b/service/chime/api_op_GetVoiceConnector.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetVoiceConnectorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go b/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go index 9fad32790c5..389d0886546 100644 --- a/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go +++ b/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetVoiceConnectorEmergencyCallingConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorGroup.go b/service/chime/api_op_GetVoiceConnectorGroup.go index 7bbf7b34cfd..526d9677455 100644 --- a/service/chime/api_op_GetVoiceConnectorGroup.go +++ b/service/chime/api_op_GetVoiceConnectorGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetVoiceConnectorGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go b/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go index 585acc75d27..b59ef6e690c 100644 --- a/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go +++ b/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetVoiceConnectorLoggingConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorOrigination.go b/service/chime/api_op_GetVoiceConnectorOrigination.go index 8cfd81c1ff8..d05917f183b 100644 --- a/service/chime/api_op_GetVoiceConnectorOrigination.go +++ b/service/chime/api_op_GetVoiceConnectorOrigination.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetVoiceConnectorOriginationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorOriginationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorProxy.go b/service/chime/api_op_GetVoiceConnectorProxy.go index 26df32ad06f..e579223e3e0 100644 --- a/service/chime/api_op_GetVoiceConnectorProxy.go +++ b/service/chime/api_op_GetVoiceConnectorProxy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetVoiceConnectorProxyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go b/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go index e4218e7fafa..380fdb82993 100644 --- a/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go +++ b/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetVoiceConnectorStreamingConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorTermination.go b/service/chime/api_op_GetVoiceConnectorTermination.go index 18ee2ab1c30..0a9fa8079a8 100644 --- a/service/chime/api_op_GetVoiceConnectorTermination.go +++ b/service/chime/api_op_GetVoiceConnectorTermination.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetVoiceConnectorTerminationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorTerminationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_GetVoiceConnectorTerminationHealth.go b/service/chime/api_op_GetVoiceConnectorTerminationHealth.go index 1fc8444f3d7..bcb089cdb9d 100644 --- a/service/chime/api_op_GetVoiceConnectorTerminationHealth.go +++ b/service/chime/api_op_GetVoiceConnectorTerminationHealth.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetVoiceConnectorTerminationHealthMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorTerminationHealthValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_InviteUsers.go b/service/chime/api_op_InviteUsers.go index 5da9747bd5a..0aa70f4b6c5 100644 --- a/service/chime/api_op_InviteUsers.go +++ b/service/chime/api_op_InviteUsers.go @@ -116,6 +116,9 @@ func (c *Client) addOperationInviteUsersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInviteUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ListAccounts.go b/service/chime/api_op_ListAccounts.go index 3018caf8366..e12a4ff9c71 100644 --- a/service/chime/api_op_ListAccounts.go +++ b/service/chime/api_op_ListAccounts.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op return nil } -// ListAccountsAPIClient is a client that implements the ListAccounts operation. -type ListAccountsAPIClient interface { - ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) -} - -var _ ListAccountsAPIClient = (*Client)(nil) - // ListAccountsPaginatorOptions is the paginator options for ListAccounts type ListAccountsPaginatorOptions struct { // The maximum number of results to return in a single call. Defaults to 100. @@ -210,6 +206,9 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAccountsAPIClient is a client that implements the ListAccounts operation. +type ListAccountsAPIClient interface { + ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) +} + +var _ ListAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListAppInstanceAdmins.go b/service/chime/api_op_ListAppInstanceAdmins.go index 37c4afbd957..0649db9881d 100644 --- a/service/chime/api_op_ListAppInstanceAdmins.go +++ b/service/chime/api_op_ListAppInstanceAdmins.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListAppInstanceAdminsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAppInstanceAdminsMiddleware(stack); err != nil { return err } @@ -159,41 +162,6 @@ func (c *Client) addOperationListAppInstanceAdminsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListAppInstanceAdminsMiddleware struct { -} - -func (*endpointPrefix_opListAppInstanceAdminsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAppInstanceAdminsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAppInstanceAdminsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAppInstanceAdminsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAppInstanceAdminsAPIClient is a client that implements the -// ListAppInstanceAdmins operation. -type ListAppInstanceAdminsAPIClient interface { - ListAppInstanceAdmins(context.Context, *ListAppInstanceAdminsInput, ...func(*Options)) (*ListAppInstanceAdminsOutput, error) -} - -var _ ListAppInstanceAdminsAPIClient = (*Client)(nil) - // ListAppInstanceAdminsPaginatorOptions is the paginator options for // ListAppInstanceAdmins type ListAppInstanceAdminsPaginatorOptions struct { @@ -258,6 +226,9 @@ func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstanceAdmins(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +248,41 @@ func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListAppInstanceAdminsMiddleware struct { +} + +func (*endpointPrefix_opListAppInstanceAdminsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAppInstanceAdminsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "identity-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAppInstanceAdminsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAppInstanceAdminsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAppInstanceAdminsAPIClient is a client that implements the +// ListAppInstanceAdmins operation. +type ListAppInstanceAdminsAPIClient interface { + ListAppInstanceAdmins(context.Context, *ListAppInstanceAdminsInput, ...func(*Options)) (*ListAppInstanceAdminsOutput, error) +} + +var _ ListAppInstanceAdminsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstanceAdmins(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListAppInstanceUsers.go b/service/chime/api_op_ListAppInstanceUsers.go index ae9a91069f7..bfdafb70350 100644 --- a/service/chime/api_op_ListAppInstanceUsers.go +++ b/service/chime/api_op_ListAppInstanceUsers.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListAppInstanceUsersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAppInstanceUsersMiddleware(stack); err != nil { return err } @@ -157,41 +160,6 @@ func (c *Client) addOperationListAppInstanceUsersMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListAppInstanceUsersMiddleware struct { -} - -func (*endpointPrefix_opListAppInstanceUsersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAppInstanceUsersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAppInstanceUsersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAppInstanceUsersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAppInstanceUsersAPIClient is a client that implements the -// ListAppInstanceUsers operation. -type ListAppInstanceUsersAPIClient interface { - ListAppInstanceUsers(context.Context, *ListAppInstanceUsersInput, ...func(*Options)) (*ListAppInstanceUsersOutput, error) -} - -var _ ListAppInstanceUsersAPIClient = (*Client)(nil) - // ListAppInstanceUsersPaginatorOptions is the paginator options for // ListAppInstanceUsers type ListAppInstanceUsersPaginatorOptions struct { @@ -256,6 +224,9 @@ func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstanceUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +246,41 @@ func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListAppInstanceUsersMiddleware struct { +} + +func (*endpointPrefix_opListAppInstanceUsersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAppInstanceUsersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "identity-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAppInstanceUsersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAppInstanceUsersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAppInstanceUsersAPIClient is a client that implements the +// ListAppInstanceUsers operation. +type ListAppInstanceUsersAPIClient interface { + ListAppInstanceUsers(context.Context, *ListAppInstanceUsersInput, ...func(*Options)) (*ListAppInstanceUsersOutput, error) +} + +var _ ListAppInstanceUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstanceUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListAppInstances.go b/service/chime/api_op_ListAppInstances.go index 818642e9cb9..47aaa3fc2d4 100644 --- a/service/chime/api_op_ListAppInstances.go +++ b/service/chime/api_op_ListAppInstances.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAppInstancesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAppInstancesMiddleware(stack); err != nil { return err } @@ -148,41 +151,6 @@ func (c *Client) addOperationListAppInstancesMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListAppInstancesMiddleware struct { -} - -func (*endpointPrefix_opListAppInstancesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAppInstancesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAppInstancesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAppInstancesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAppInstancesAPIClient is a client that implements the ListAppInstances -// operation. -type ListAppInstancesAPIClient interface { - ListAppInstances(context.Context, *ListAppInstancesInput, ...func(*Options)) (*ListAppInstancesOutput, error) -} - -var _ ListAppInstancesAPIClient = (*Client)(nil) - // ListAppInstancesPaginatorOptions is the paginator options for ListAppInstances type ListAppInstancesPaginatorOptions struct { // The maximum number of AppInstance s that you want to return. @@ -246,6 +214,9 @@ func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +236,41 @@ func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListAppInstancesMiddleware struct { +} + +func (*endpointPrefix_opListAppInstancesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAppInstancesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "identity-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAppInstancesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAppInstancesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAppInstancesAPIClient is a client that implements the ListAppInstances +// operation. +type ListAppInstancesAPIClient interface { + ListAppInstances(context.Context, *ListAppInstancesInput, ...func(*Options)) (*ListAppInstancesOutput, error) +} + +var _ ListAppInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListAttendeeTags.go b/service/chime/api_op_ListAttendeeTags.go index 8f7e3fd6d3b..4621be55772 100644 --- a/service/chime/api_op_ListAttendeeTags.go +++ b/service/chime/api_op_ListAttendeeTags.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAttendeeTagsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttendeeTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ListAttendees.go b/service/chime/api_op_ListAttendees.go index 245fa9c7053..212d4404c53 100644 --- a/service/chime/api_op_ListAttendees.go +++ b/service/chime/api_op_ListAttendees.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListAttendeesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttendeesValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListAttendeesMiddlewares(stack *middleware.Stack, o return nil } -// ListAttendeesAPIClient is a client that implements the ListAttendees operation. -type ListAttendeesAPIClient interface { - ListAttendees(context.Context, *ListAttendeesInput, ...func(*Options)) (*ListAttendeesOutput, error) -} - -var _ ListAttendeesAPIClient = (*Client)(nil) - // ListAttendeesPaginatorOptions is the paginator options for ListAttendees type ListAttendeesPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -224,6 +220,9 @@ func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttendees(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListAttendeesAPIClient is a client that implements the ListAttendees operation. +type ListAttendeesAPIClient interface { + ListAttendees(context.Context, *ListAttendeesInput, ...func(*Options)) (*ListAttendeesOutput, error) +} + +var _ ListAttendeesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttendees(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListBots.go b/service/chime/api_op_ListBots.go index fc4b6e40313..20754a3b7a9 100644 --- a/service/chime/api_op_ListBots.go +++ b/service/chime/api_op_ListBots.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListBotsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotsValidationMiddleware(stack); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListBotsMiddlewares(stack *middleware.Stack, option return nil } -// ListBotsAPIClient is a client that implements the ListBots operation. -type ListBotsAPIClient interface { - ListBots(context.Context, *ListBotsInput, ...func(*Options)) (*ListBotsOutput, error) -} - -var _ ListBotsAPIClient = (*Client)(nil) - // ListBotsPaginatorOptions is the paginator options for ListBots type ListBotsPaginatorOptions struct { // The maximum number of results to return in a single call. The default is 10. @@ -210,6 +206,9 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListBotsAPIClient is a client that implements the ListBots operation. +type ListBotsAPIClient interface { + ListBots(context.Context, *ListBotsInput, ...func(*Options)) (*ListBotsOutput, error) +} + +var _ ListBotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannelBans.go b/service/chime/api_op_ListChannelBans.go index 6d93309aff3..89d89910e05 100644 --- a/service/chime/api_op_ListChannelBans.go +++ b/service/chime/api_op_ListChannelBans.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListChannelBansMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelBansMiddleware(stack); err != nil { return err } @@ -163,41 +166,6 @@ func (c *Client) addOperationListChannelBansMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListChannelBansMiddleware struct { -} - -func (*endpointPrefix_opListChannelBansMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelBansMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelBansMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelBansMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelBansAPIClient is a client that implements the ListChannelBans -// operation. -type ListChannelBansAPIClient interface { - ListChannelBans(context.Context, *ListChannelBansInput, ...func(*Options)) (*ListChannelBansOutput, error) -} - -var _ ListChannelBansAPIClient = (*Client)(nil) - // ListChannelBansPaginatorOptions is the paginator options for ListChannelBans type ListChannelBansPaginatorOptions struct { // The maximum number of bans that you want returned. @@ -261,6 +229,9 @@ func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelBans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +251,41 @@ func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +type endpointPrefix_opListChannelBansMiddleware struct { +} + +func (*endpointPrefix_opListChannelBansMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelBansMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelBansMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelBansMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelBansAPIClient is a client that implements the ListChannelBans +// operation. +type ListChannelBansAPIClient interface { + ListChannelBans(context.Context, *ListChannelBansInput, ...func(*Options)) (*ListChannelBansOutput, error) +} + +var _ ListChannelBansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelBans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannelMemberships.go b/service/chime/api_op_ListChannelMemberships.go index 2ef963649de..2d851ecb6c5 100644 --- a/service/chime/api_op_ListChannelMemberships.go +++ b/service/chime/api_op_ListChannelMemberships.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListChannelMembershipsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelMembershipsMiddleware(stack); err != nil { return err } @@ -171,41 +174,6 @@ func (c *Client) addOperationListChannelMembershipsMiddlewares(stack *middleware return nil } -type endpointPrefix_opListChannelMembershipsMiddleware struct { -} - -func (*endpointPrefix_opListChannelMembershipsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelMembershipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelMembershipsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelMembershipsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelMembershipsAPIClient is a client that implements the -// ListChannelMemberships operation. -type ListChannelMembershipsAPIClient interface { - ListChannelMemberships(context.Context, *ListChannelMembershipsInput, ...func(*Options)) (*ListChannelMembershipsOutput, error) -} - -var _ ListChannelMembershipsAPIClient = (*Client)(nil) - // ListChannelMembershipsPaginatorOptions is the paginator options for // ListChannelMemberships type ListChannelMembershipsPaginatorOptions struct { @@ -270,6 +238,9 @@ func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -289,6 +260,41 @@ func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +type endpointPrefix_opListChannelMembershipsMiddleware struct { +} + +func (*endpointPrefix_opListChannelMembershipsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelMembershipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelMembershipsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelMembershipsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelMembershipsAPIClient is a client that implements the +// ListChannelMemberships operation. +type ListChannelMembershipsAPIClient interface { + ListChannelMemberships(context.Context, *ListChannelMembershipsInput, ...func(*Options)) (*ListChannelMembershipsOutput, error) +} + +var _ ListChannelMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go b/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go index 87f65873392..d344c60e804 100644 --- a/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go +++ b/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListChannelMembershipsForAppInstanceUserMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware(stack); err != nil { return err } @@ -158,41 +161,6 @@ func (c *Client) addOperationListChannelMembershipsForAppInstanceUserMiddlewares return nil } -type endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelMembershipsForAppInstanceUserAPIClient is a client that implements -// the ListChannelMembershipsForAppInstanceUser operation. -type ListChannelMembershipsForAppInstanceUserAPIClient interface { - ListChannelMembershipsForAppInstanceUser(context.Context, *ListChannelMembershipsForAppInstanceUserInput, ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) -} - -var _ ListChannelMembershipsForAppInstanceUserAPIClient = (*Client)(nil) - // ListChannelMembershipsForAppInstanceUserPaginatorOptions is the paginator // options for ListChannelMembershipsForAppInstanceUser type ListChannelMembershipsForAppInstanceUserPaginatorOptions struct { @@ -259,6 +227,9 @@ func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelMembershipsForAppInstanceUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +249,41 @@ func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context return result, nil } +type endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware struct { +} + +func (*endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelMembershipsForAppInstanceUserAPIClient is a client that implements +// the ListChannelMembershipsForAppInstanceUser operation. +type ListChannelMembershipsForAppInstanceUserAPIClient interface { + ListChannelMembershipsForAppInstanceUser(context.Context, *ListChannelMembershipsForAppInstanceUserInput, ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) +} + +var _ ListChannelMembershipsForAppInstanceUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelMembershipsForAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannelMessages.go b/service/chime/api_op_ListChannelMessages.go index dd797566788..eaa0b74dcbd 100644 --- a/service/chime/api_op_ListChannelMessages.go +++ b/service/chime/api_op_ListChannelMessages.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListChannelMessagesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelMessagesMiddleware(stack); err != nil { return err } @@ -182,41 +185,6 @@ func (c *Client) addOperationListChannelMessagesMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListChannelMessagesMiddleware struct { -} - -func (*endpointPrefix_opListChannelMessagesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelMessagesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelMessagesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelMessagesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelMessagesAPIClient is a client that implements the -// ListChannelMessages operation. -type ListChannelMessagesAPIClient interface { - ListChannelMessages(context.Context, *ListChannelMessagesInput, ...func(*Options)) (*ListChannelMessagesOutput, error) -} - -var _ ListChannelMessagesAPIClient = (*Client)(nil) - // ListChannelMessagesPaginatorOptions is the paginator options for // ListChannelMessages type ListChannelMessagesPaginatorOptions struct { @@ -281,6 +249,9 @@ func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelMessages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -300,6 +271,41 @@ func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListChannelMessagesMiddleware struct { +} + +func (*endpointPrefix_opListChannelMessagesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelMessagesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelMessagesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelMessagesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelMessagesAPIClient is a client that implements the +// ListChannelMessages operation. +type ListChannelMessagesAPIClient interface { + ListChannelMessages(context.Context, *ListChannelMessagesInput, ...func(*Options)) (*ListChannelMessagesOutput, error) +} + +var _ ListChannelMessagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelMessages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannelModerators.go b/service/chime/api_op_ListChannelModerators.go index 6872b50a70e..21064ecba9e 100644 --- a/service/chime/api_op_ListChannelModerators.go +++ b/service/chime/api_op_ListChannelModerators.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListChannelModeratorsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelModeratorsMiddleware(stack); err != nil { return err } @@ -165,41 +168,6 @@ func (c *Client) addOperationListChannelModeratorsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListChannelModeratorsMiddleware struct { -} - -func (*endpointPrefix_opListChannelModeratorsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelModeratorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelModeratorsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelModeratorsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelModeratorsAPIClient is a client that implements the -// ListChannelModerators operation. -type ListChannelModeratorsAPIClient interface { - ListChannelModerators(context.Context, *ListChannelModeratorsInput, ...func(*Options)) (*ListChannelModeratorsOutput, error) -} - -var _ ListChannelModeratorsAPIClient = (*Client)(nil) - // ListChannelModeratorsPaginatorOptions is the paginator options for // ListChannelModerators type ListChannelModeratorsPaginatorOptions struct { @@ -264,6 +232,9 @@ func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelModerators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +254,41 @@ func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListChannelModeratorsMiddleware struct { +} + +func (*endpointPrefix_opListChannelModeratorsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelModeratorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelModeratorsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelModeratorsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelModeratorsAPIClient is a client that implements the +// ListChannelModerators operation. +type ListChannelModeratorsAPIClient interface { + ListChannelModerators(context.Context, *ListChannelModeratorsInput, ...func(*Options)) (*ListChannelModeratorsOutput, error) +} + +var _ ListChannelModeratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelModerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannels.go b/service/chime/api_op_ListChannels.go index 5fda4539315..437ba6846d4 100644 --- a/service/chime/api_op_ListChannels.go +++ b/service/chime/api_op_ListChannels.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelsMiddleware(stack); err != nil { return err } @@ -174,40 +177,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListChannelsMiddleware struct { -} - -func (*endpointPrefix_opListChannelsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of channels that you want to return. @@ -271,6 +240,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +262,40 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListChannelsMiddleware struct { +} + +func (*endpointPrefix_opListChannelsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go b/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go index b05bb818593..b923839fe5e 100644 --- a/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go +++ b/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListChannelsModeratedByAppInstanceUserMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware(stack); err != nil { return err } @@ -157,41 +160,6 @@ func (c *Client) addOperationListChannelsModeratedByAppInstanceUserMiddlewares(s return nil } -type endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelsModeratedByAppInstanceUserAPIClient is a client that implements the -// ListChannelsModeratedByAppInstanceUser operation. -type ListChannelsModeratedByAppInstanceUserAPIClient interface { - ListChannelsModeratedByAppInstanceUser(context.Context, *ListChannelsModeratedByAppInstanceUserInput, ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) -} - -var _ ListChannelsModeratedByAppInstanceUserAPIClient = (*Client)(nil) - // ListChannelsModeratedByAppInstanceUserPaginatorOptions is the paginator options // for ListChannelsModeratedByAppInstanceUser type ListChannelsModeratedByAppInstanceUserPaginatorOptions struct { @@ -258,6 +226,9 @@ func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelsModeratedByAppInstanceUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +248,41 @@ func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.C return result, nil } +type endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware struct { +} + +func (*endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "messaging-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListChannelsModeratedByAppInstanceUserAPIClient is a client that implements the +// ListChannelsModeratedByAppInstanceUser operation. +type ListChannelsModeratedByAppInstanceUserAPIClient interface { + ListChannelsModeratedByAppInstanceUser(context.Context, *ListChannelsModeratedByAppInstanceUserInput, ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) +} + +var _ ListChannelsModeratedByAppInstanceUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelsModeratedByAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListMediaCapturePipelines.go b/service/chime/api_op_ListMediaCapturePipelines.go index d787b243991..c7f8f764051 100644 --- a/service/chime/api_op_ListMediaCapturePipelines.go +++ b/service/chime/api_op_ListMediaCapturePipelines.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListMediaCapturePipelinesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaCapturePipelines(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListMediaCapturePipelinesMiddlewares(stack *middlew return nil } -// ListMediaCapturePipelinesAPIClient is a client that implements the -// ListMediaCapturePipelines operation. -type ListMediaCapturePipelinesAPIClient interface { - ListMediaCapturePipelines(context.Context, *ListMediaCapturePipelinesInput, ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) -} - -var _ ListMediaCapturePipelinesAPIClient = (*Client)(nil) - // ListMediaCapturePipelinesPaginatorOptions is the paginator options for // ListMediaCapturePipelines type ListMediaCapturePipelinesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListMediaCapturePipelinesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMediaCapturePipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListMediaCapturePipelinesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListMediaCapturePipelinesAPIClient is a client that implements the +// ListMediaCapturePipelines operation. +type ListMediaCapturePipelinesAPIClient interface { + ListMediaCapturePipelines(context.Context, *ListMediaCapturePipelinesInput, ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) +} + +var _ ListMediaCapturePipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMediaCapturePipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListMeetingTags.go b/service/chime/api_op_ListMeetingTags.go index 00d7044093b..5f13752ffb9 100644 --- a/service/chime/api_op_ListMeetingTags.go +++ b/service/chime/api_op_ListMeetingTags.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListMeetingTagsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMeetingTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ListMeetings.go b/service/chime/api_op_ListMeetings.go index 1a19c284237..fad32a1d02a 100644 --- a/service/chime/api_op_ListMeetings.go +++ b/service/chime/api_op_ListMeetings.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListMeetingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMeetings(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListMeetingsMiddlewares(stack *middleware.Stack, op return nil } -// ListMeetingsAPIClient is a client that implements the ListMeetings operation. -type ListMeetingsAPIClient interface { - ListMeetings(context.Context, *ListMeetingsInput, ...func(*Options)) (*ListMeetingsOutput, error) -} - -var _ ListMeetingsAPIClient = (*Client)(nil) - // ListMeetingsPaginatorOptions is the paginator options for ListMeetings type ListMeetingsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -212,6 +208,9 @@ func (p *ListMeetingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMeetings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListMeetingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListMeetingsAPIClient is a client that implements the ListMeetings operation. +type ListMeetingsAPIClient interface { + ListMeetings(context.Context, *ListMeetingsInput, ...func(*Options)) (*ListMeetingsOutput, error) +} + +var _ ListMeetingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMeetings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListPhoneNumberOrders.go b/service/chime/api_op_ListPhoneNumberOrders.go index 6892e6e5edc..21ff58ec90e 100644 --- a/service/chime/api_op_ListPhoneNumberOrders.go +++ b/service/chime/api_op_ListPhoneNumberOrders.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListPhoneNumberOrdersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPhoneNumberOrders(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListPhoneNumberOrdersMiddlewares(stack *middleware. return nil } -// ListPhoneNumberOrdersAPIClient is a client that implements the -// ListPhoneNumberOrders operation. -type ListPhoneNumberOrdersAPIClient interface { - ListPhoneNumberOrders(context.Context, *ListPhoneNumberOrdersInput, ...func(*Options)) (*ListPhoneNumberOrdersOutput, error) -} - -var _ ListPhoneNumberOrdersAPIClient = (*Client)(nil) - // ListPhoneNumberOrdersPaginatorOptions is the paginator options for // ListPhoneNumberOrders type ListPhoneNumberOrdersPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListPhoneNumberOrdersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumberOrders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListPhoneNumberOrdersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPhoneNumberOrdersAPIClient is a client that implements the +// ListPhoneNumberOrders operation. +type ListPhoneNumberOrdersAPIClient interface { + ListPhoneNumberOrders(context.Context, *ListPhoneNumberOrdersInput, ...func(*Options)) (*ListPhoneNumberOrdersOutput, error) +} + +var _ ListPhoneNumberOrdersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumberOrders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListPhoneNumbers.go b/service/chime/api_op_ListPhoneNumbers.go index a7ddfff3a95..a8872bd5e10 100644 --- a/service/chime/api_op_ListPhoneNumbers.go +++ b/service/chime/api_op_ListPhoneNumbers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListPhoneNumbersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPhoneNumbers(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListPhoneNumbersMiddlewares(stack *middleware.Stack return nil } -// ListPhoneNumbersAPIClient is a client that implements the ListPhoneNumbers -// operation. -type ListPhoneNumbersAPIClient interface { - ListPhoneNumbers(context.Context, *ListPhoneNumbersInput, ...func(*Options)) (*ListPhoneNumbersOutput, error) -} - -var _ ListPhoneNumbersAPIClient = (*Client)(nil) - // ListPhoneNumbersPaginatorOptions is the paginator options for ListPhoneNumbers type ListPhoneNumbersPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -215,6 +210,9 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPhoneNumbersAPIClient is a client that implements the ListPhoneNumbers +// operation. +type ListPhoneNumbersAPIClient interface { + ListPhoneNumbers(context.Context, *ListPhoneNumbersInput, ...func(*Options)) (*ListPhoneNumbersOutput, error) +} + +var _ ListPhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListProxySessions.go b/service/chime/api_op_ListProxySessions.go index a966c3eb8d1..c3ed9f9f500 100644 --- a/service/chime/api_op_ListProxySessions.go +++ b/service/chime/api_op_ListProxySessions.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListProxySessionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProxySessionsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListProxySessionsMiddlewares(stack *middleware.Stac return nil } -// ListProxySessionsAPIClient is a client that implements the ListProxySessions -// operation. -type ListProxySessionsAPIClient interface { - ListProxySessions(context.Context, *ListProxySessionsInput, ...func(*Options)) (*ListProxySessionsOutput, error) -} - -var _ ListProxySessionsAPIClient = (*Client)(nil) - // ListProxySessionsPaginatorOptions is the paginator options for ListProxySessions type ListProxySessionsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -225,6 +220,9 @@ func (p *ListProxySessionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProxySessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListProxySessionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListProxySessionsAPIClient is a client that implements the ListProxySessions +// operation. +type ListProxySessionsAPIClient interface { + ListProxySessions(context.Context, *ListProxySessionsInput, ...func(*Options)) (*ListProxySessionsOutput, error) +} + +var _ ListProxySessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProxySessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListRoomMemberships.go b/service/chime/api_op_ListRoomMemberships.go index f2e93a94dce..0e71731cbcc 100644 --- a/service/chime/api_op_ListRoomMemberships.go +++ b/service/chime/api_op_ListRoomMemberships.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListRoomMembershipsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoomMembershipsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListRoomMembershipsMiddlewares(stack *middleware.St return nil } -// ListRoomMembershipsAPIClient is a client that implements the -// ListRoomMemberships operation. -type ListRoomMembershipsAPIClient interface { - ListRoomMemberships(context.Context, *ListRoomMembershipsInput, ...func(*Options)) (*ListRoomMembershipsOutput, error) -} - -var _ ListRoomMembershipsAPIClient = (*Client)(nil) - // ListRoomMembershipsPaginatorOptions is the paginator options for // ListRoomMemberships type ListRoomMembershipsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListRoomMembershipsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoomMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListRoomMembershipsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRoomMembershipsAPIClient is a client that implements the +// ListRoomMemberships operation. +type ListRoomMembershipsAPIClient interface { + ListRoomMemberships(context.Context, *ListRoomMembershipsInput, ...func(*Options)) (*ListRoomMembershipsOutput, error) +} + +var _ ListRoomMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoomMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListRooms.go b/service/chime/api_op_ListRooms.go index 31883cc789b..53ad8865604 100644 --- a/service/chime/api_op_ListRooms.go +++ b/service/chime/api_op_ListRooms.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRoomsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoomsValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListRoomsMiddlewares(stack *middleware.Stack, optio return nil } -// ListRoomsAPIClient is a client that implements the ListRooms operation. -type ListRoomsAPIClient interface { - ListRooms(context.Context, *ListRoomsInput, ...func(*Options)) (*ListRoomsOutput, error) -} - -var _ ListRoomsAPIClient = (*Client)(nil) - // ListRoomsPaginatorOptions is the paginator options for ListRooms type ListRoomsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -214,6 +210,9 @@ func (p *ListRoomsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRooms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListRoomsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRoomsAPIClient is a client that implements the ListRooms operation. +type ListRoomsAPIClient interface { + ListRooms(context.Context, *ListRoomsInput, ...func(*Options)) (*ListRoomsOutput, error) +} + +var _ ListRoomsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRooms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListSipMediaApplications.go b/service/chime/api_op_ListSipMediaApplications.go index c0574c312e8..6a0e12c5672 100644 --- a/service/chime/api_op_ListSipMediaApplications.go +++ b/service/chime/api_op_ListSipMediaApplications.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListSipMediaApplicationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSipMediaApplications(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListSipMediaApplicationsMiddlewares(stack *middlewa return nil } -// ListSipMediaApplicationsAPIClient is a client that implements the -// ListSipMediaApplications operation. -type ListSipMediaApplicationsAPIClient interface { - ListSipMediaApplications(context.Context, *ListSipMediaApplicationsInput, ...func(*Options)) (*ListSipMediaApplicationsOutput, error) -} - -var _ ListSipMediaApplicationsAPIClient = (*Client)(nil) - // ListSipMediaApplicationsPaginatorOptions is the paginator options for // ListSipMediaApplications type ListSipMediaApplicationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListSipMediaApplicationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSipMediaApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSipMediaApplicationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSipMediaApplicationsAPIClient is a client that implements the +// ListSipMediaApplications operation. +type ListSipMediaApplicationsAPIClient interface { + ListSipMediaApplications(context.Context, *ListSipMediaApplicationsInput, ...func(*Options)) (*ListSipMediaApplicationsOutput, error) +} + +var _ ListSipMediaApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSipMediaApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListSipRules.go b/service/chime/api_op_ListSipRules.go index 2e7cf043cd5..c8ccf879bfc 100644 --- a/service/chime/api_op_ListSipRules.go +++ b/service/chime/api_op_ListSipRules.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSipRulesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSipRules(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListSipRulesMiddlewares(stack *middleware.Stack, op return nil } -// ListSipRulesAPIClient is a client that implements the ListSipRules operation. -type ListSipRulesAPIClient interface { - ListSipRules(context.Context, *ListSipRulesInput, ...func(*Options)) (*ListSipRulesOutput, error) -} - -var _ ListSipRulesAPIClient = (*Client)(nil) - // ListSipRulesPaginatorOptions is the paginator options for ListSipRules type ListSipRulesPaginatorOptions struct { // The maximum number of results to return in a single call. Defaults to 100. @@ -215,6 +211,9 @@ func (p *ListSipRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSipRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListSipRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSipRulesAPIClient is a client that implements the ListSipRules operation. +type ListSipRulesAPIClient interface { + ListSipRules(context.Context, *ListSipRulesInput, ...func(*Options)) (*ListSipRulesOutput, error) +} + +var _ ListSipRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSipRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListSupportedPhoneNumberCountries.go b/service/chime/api_op_ListSupportedPhoneNumberCountries.go index 4bd9d1c2e7f..352fa0cc6ec 100644 --- a/service/chime/api_op_ListSupportedPhoneNumberCountries.go +++ b/service/chime/api_op_ListSupportedPhoneNumberCountries.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListSupportedPhoneNumberCountriesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSupportedPhoneNumberCountriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ListTagsForResource.go b/service/chime/api_op_ListTagsForResource.go index ac3cfdc1740..62cfdc97dfc 100644 --- a/service/chime/api_op_ListTagsForResource.go +++ b/service/chime/api_op_ListTagsForResource.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ListUsers.go b/service/chime/api_op_ListUsers.go index 17ba0067534..186c3633b54 100644 --- a/service/chime/api_op_ListUsers.go +++ b/service/chime/api_op_ListUsers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to return in a single call. Defaults to 100. @@ -217,6 +213,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListVoiceConnectorGroups.go b/service/chime/api_op_ListVoiceConnectorGroups.go index 0a8760333ff..eb9eeea0f24 100644 --- a/service/chime/api_op_ListVoiceConnectorGroups.go +++ b/service/chime/api_op_ListVoiceConnectorGroups.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListVoiceConnectorGroupsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectorGroups(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListVoiceConnectorGroupsMiddlewares(stack *middlewa return nil } -// ListVoiceConnectorGroupsAPIClient is a client that implements the -// ListVoiceConnectorGroups operation. -type ListVoiceConnectorGroupsAPIClient interface { - ListVoiceConnectorGroups(context.Context, *ListVoiceConnectorGroupsInput, ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) -} - -var _ ListVoiceConnectorGroupsAPIClient = (*Client)(nil) - // ListVoiceConnectorGroupsPaginatorOptions is the paginator options for // ListVoiceConnectorGroups type ListVoiceConnectorGroupsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListVoiceConnectorGroupsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVoiceConnectorGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListVoiceConnectorGroupsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListVoiceConnectorGroupsAPIClient is a client that implements the +// ListVoiceConnectorGroups operation. +type ListVoiceConnectorGroupsAPIClient interface { + ListVoiceConnectorGroups(context.Context, *ListVoiceConnectorGroupsInput, ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) +} + +var _ ListVoiceConnectorGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVoiceConnectorGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go b/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go index eb17e758fae..d57043eaf74 100644 --- a/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go +++ b/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListVoiceConnectorTerminationCredentialsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ListVoiceConnectors.go b/service/chime/api_op_ListVoiceConnectors.go index d6fcc1de68f..93a10456369 100644 --- a/service/chime/api_op_ListVoiceConnectors.go +++ b/service/chime/api_op_ListVoiceConnectors.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListVoiceConnectorsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectors(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListVoiceConnectorsMiddlewares(stack *middleware.St return nil } -// ListVoiceConnectorsAPIClient is a client that implements the -// ListVoiceConnectors operation. -type ListVoiceConnectorsAPIClient interface { - ListVoiceConnectors(context.Context, *ListVoiceConnectorsInput, ...func(*Options)) (*ListVoiceConnectorsOutput, error) -} - -var _ ListVoiceConnectorsAPIClient = (*Client)(nil) - // ListVoiceConnectorsPaginatorOptions is the paginator options for // ListVoiceConnectors type ListVoiceConnectorsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListVoiceConnectorsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVoiceConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListVoiceConnectorsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVoiceConnectorsAPIClient is a client that implements the +// ListVoiceConnectors operation. +type ListVoiceConnectorsAPIClient interface { + ListVoiceConnectors(context.Context, *ListVoiceConnectorsInput, ...func(*Options)) (*ListVoiceConnectorsOutput, error) +} + +var _ ListVoiceConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVoiceConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_LogoutUser.go b/service/chime/api_op_LogoutUser.go index c8611dd4e4a..47e9fe077bc 100644 --- a/service/chime/api_op_LogoutUser.go +++ b/service/chime/api_op_LogoutUser.go @@ -107,6 +107,9 @@ func (c *Client) addOperationLogoutUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLogoutUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutAppInstanceRetentionSettings.go b/service/chime/api_op_PutAppInstanceRetentionSettings.go index 2ae85a80f54..1884e726127 100644 --- a/service/chime/api_op_PutAppInstanceRetentionSettings.go +++ b/service/chime/api_op_PutAppInstanceRetentionSettings.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutAppInstanceRetentionSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutAppInstanceRetentionSettingsMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutAppInstanceStreamingConfigurations.go b/service/chime/api_op_PutAppInstanceStreamingConfigurations.go index 3fdb6497c84..b9aac97a3d7 100644 --- a/service/chime/api_op_PutAppInstanceStreamingConfigurations.go +++ b/service/chime/api_op_PutAppInstanceStreamingConfigurations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutAppInstanceStreamingConfigurationsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAppInstanceStreamingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutEventsConfiguration.go b/service/chime/api_op_PutEventsConfiguration.go index 2eae5558aea..58de9196291 100644 --- a/service/chime/api_op_PutEventsConfiguration.go +++ b/service/chime/api_op_PutEventsConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutEventsConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutRetentionSettings.go b/service/chime/api_op_PutRetentionSettings.go index 069adf0b91a..63f34b380a3 100644 --- a/service/chime/api_op_PutRetentionSettings.go +++ b/service/chime/api_op_PutRetentionSettings.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutRetentionSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRetentionSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go b/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go index 878c944dae0..4bf0b3e08b7 100644 --- a/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go +++ b/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPutSipMediaApplicationLoggingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSipMediaApplicationLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go b/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go index 68aca471358..4af011342c5 100644 --- a/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go +++ b/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutVoiceConnectorEmergencyCallingConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go b/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go index 2b952421583..18465c87d0e 100644 --- a/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go +++ b/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutVoiceConnectorLoggingConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorOrigination.go b/service/chime/api_op_PutVoiceConnectorOrigination.go index 4f402857555..50a59cdc155 100644 --- a/service/chime/api_op_PutVoiceConnectorOrigination.go +++ b/service/chime/api_op_PutVoiceConnectorOrigination.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutVoiceConnectorOriginationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorOriginationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorProxy.go b/service/chime/api_op_PutVoiceConnectorProxy.go index 2eeddac65d8..22fde3f1a67 100644 --- a/service/chime/api_op_PutVoiceConnectorProxy.go +++ b/service/chime/api_op_PutVoiceConnectorProxy.go @@ -136,6 +136,9 @@ func (c *Client) addOperationPutVoiceConnectorProxyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go b/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go index 845bc82e70d..e2931620de1 100644 --- a/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go +++ b/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutVoiceConnectorStreamingConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorTermination.go b/service/chime/api_op_PutVoiceConnectorTermination.go index 2663e7d3a18..a065933c5b4 100644 --- a/service/chime/api_op_PutVoiceConnectorTermination.go +++ b/service/chime/api_op_PutVoiceConnectorTermination.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutVoiceConnectorTerminationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorTerminationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go b/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go index 5c1266ed34d..b1fd4836d73 100644 --- a/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go +++ b/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutVoiceConnectorTerminationCredentialsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_RedactChannelMessage.go b/service/chime/api_op_RedactChannelMessage.go index 8cea39d88b2..90713d7922d 100644 --- a/service/chime/api_op_RedactChannelMessage.go +++ b/service/chime/api_op_RedactChannelMessage.go @@ -132,6 +132,9 @@ func (c *Client) addOperationRedactChannelMessageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opRedactChannelMessageMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_RedactConversationMessage.go b/service/chime/api_op_RedactConversationMessage.go index 437c602754b..a8fce0e7913 100644 --- a/service/chime/api_op_RedactConversationMessage.go +++ b/service/chime/api_op_RedactConversationMessage.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRedactConversationMessageMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRedactConversationMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_RedactRoomMessage.go b/service/chime/api_op_RedactRoomMessage.go index 7a32371a8d9..e9b4662caef 100644 --- a/service/chime/api_op_RedactRoomMessage.go +++ b/service/chime/api_op_RedactRoomMessage.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRedactRoomMessageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRedactRoomMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_RegenerateSecurityToken.go b/service/chime/api_op_RegenerateSecurityToken.go index 9dedab2e1dc..de779ece432 100644 --- a/service/chime/api_op_RegenerateSecurityToken.go +++ b/service/chime/api_op_RegenerateSecurityToken.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRegenerateSecurityTokenMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegenerateSecurityTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ResetPersonalPIN.go b/service/chime/api_op_ResetPersonalPIN.go index cef913ea1f4..46bc2a36a52 100644 --- a/service/chime/api_op_ResetPersonalPIN.go +++ b/service/chime/api_op_ResetPersonalPIN.go @@ -112,6 +112,9 @@ func (c *Client) addOperationResetPersonalPINMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetPersonalPINValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_RestorePhoneNumber.go b/service/chime/api_op_RestorePhoneNumber.go index dbd3dbeaacb..ca6343c16c8 100644 --- a/service/chime/api_op_RestorePhoneNumber.go +++ b/service/chime/api_op_RestorePhoneNumber.go @@ -107,6 +107,9 @@ func (c *Client) addOperationRestorePhoneNumberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestorePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_SearchAvailablePhoneNumbers.go b/service/chime/api_op_SearchAvailablePhoneNumbers.go index dcf7f69b665..58c48ee3712 100644 --- a/service/chime/api_op_SearchAvailablePhoneNumbers.go +++ b/service/chime/api_op_SearchAvailablePhoneNumbers.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSearchAvailablePhoneNumbersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchAvailablePhoneNumbers(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationSearchAvailablePhoneNumbersMiddlewares(stack *middl return nil } -// SearchAvailablePhoneNumbersAPIClient is a client that implements the -// SearchAvailablePhoneNumbers operation. -type SearchAvailablePhoneNumbersAPIClient interface { - SearchAvailablePhoneNumbers(context.Context, *SearchAvailablePhoneNumbersInput, ...func(*Options)) (*SearchAvailablePhoneNumbersOutput, error) -} - -var _ SearchAvailablePhoneNumbersAPIClient = (*Client)(nil) - // SearchAvailablePhoneNumbersPaginatorOptions is the paginator options for // SearchAvailablePhoneNumbers type SearchAvailablePhoneNumbersPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchAvailablePhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt return result, nil } +// SearchAvailablePhoneNumbersAPIClient is a client that implements the +// SearchAvailablePhoneNumbers operation. +type SearchAvailablePhoneNumbersAPIClient interface { + SearchAvailablePhoneNumbers(context.Context, *SearchAvailablePhoneNumbersInput, ...func(*Options)) (*SearchAvailablePhoneNumbersOutput, error) +} + +var _ SearchAvailablePhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchAvailablePhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chime/api_op_SendChannelMessage.go b/service/chime/api_op_SendChannelMessage.go index 9e7efe2732b..4c93f7b412c 100644 --- a/service/chime/api_op_SendChannelMessage.go +++ b/service/chime/api_op_SendChannelMessage.go @@ -154,6 +154,9 @@ func (c *Client) addOperationSendChannelMessageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSendChannelMessageMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_StartMeetingTranscription.go b/service/chime/api_op_StartMeetingTranscription.go index 4726cc9fae3..c79febe7992 100644 --- a/service/chime/api_op_StartMeetingTranscription.go +++ b/service/chime/api_op_StartMeetingTranscription.go @@ -133,6 +133,9 @@ func (c *Client) addOperationStartMeetingTranscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMeetingTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_StopMeetingTranscription.go b/service/chime/api_op_StopMeetingTranscription.go index 86eeedd4190..8836d9ed00c 100644 --- a/service/chime/api_op_StopMeetingTranscription.go +++ b/service/chime/api_op_StopMeetingTranscription.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStopMeetingTranscriptionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMeetingTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_TagAttendee.go b/service/chime/api_op_TagAttendee.go index 56492ccda07..d2210da82e1 100644 --- a/service/chime/api_op_TagAttendee.go +++ b/service/chime/api_op_TagAttendee.go @@ -118,6 +118,9 @@ func (c *Client) addOperationTagAttendeeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_TagMeeting.go b/service/chime/api_op_TagMeeting.go index 7495f4f70b1..867af485c70 100644 --- a/service/chime/api_op_TagMeeting.go +++ b/service/chime/api_op_TagMeeting.go @@ -118,6 +118,9 @@ func (c *Client) addOperationTagMeetingMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagMeetingValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_TagResource.go b/service/chime/api_op_TagResource.go index 3a077bf2065..85a925f4dc1 100644 --- a/service/chime/api_op_TagResource.go +++ b/service/chime/api_op_TagResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UntagAttendee.go b/service/chime/api_op_UntagAttendee.go index e8adaa48c3d..70062c19563 100644 --- a/service/chime/api_op_UntagAttendee.go +++ b/service/chime/api_op_UntagAttendee.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUntagAttendeeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UntagMeeting.go b/service/chime/api_op_UntagMeeting.go index e5d442615db..605d777580d 100644 --- a/service/chime/api_op_UntagMeeting.go +++ b/service/chime/api_op_UntagMeeting.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUntagMeetingMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagMeetingValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UntagResource.go b/service/chime/api_op_UntagResource.go index 300b76945a1..0c6a78ba01c 100644 --- a/service/chime/api_op_UntagResource.go +++ b/service/chime/api_op_UntagResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateAccount.go b/service/chime/api_op_UpdateAccount.go index 9fea9eb9fc7..91cf97e024c 100644 --- a/service/chime/api_op_UpdateAccount.go +++ b/service/chime/api_op_UpdateAccount.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateAccountMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateAccountSettings.go b/service/chime/api_op_UpdateAccountSettings.go index 56873f70283..903d9dd01d9 100644 --- a/service/chime/api_op_UpdateAccountSettings.go +++ b/service/chime/api_op_UpdateAccountSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccountSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateAppInstance.go b/service/chime/api_op_UpdateAppInstance.go index 35d31168dfa..bc6338c7e5b 100644 --- a/service/chime/api_op_UpdateAppInstance.go +++ b/service/chime/api_op_UpdateAppInstance.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateAppInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAppInstanceMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateAppInstanceUser.go b/service/chime/api_op_UpdateAppInstanceUser.go index 7e593d4e203..2265766eff7 100644 --- a/service/chime/api_op_UpdateAppInstanceUser.go +++ b/service/chime/api_op_UpdateAppInstanceUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateAppInstanceUserMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAppInstanceUserMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateBot.go b/service/chime/api_op_UpdateBot.go index 9003745ebca..de94e395689 100644 --- a/service/chime/api_op_UpdateBot.go +++ b/service/chime/api_op_UpdateBot.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateBotMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateChannel.go b/service/chime/api_op_UpdateChannel.go index 2154ca4da68..274a8605a2d 100644 --- a/service/chime/api_op_UpdateChannel.go +++ b/service/chime/api_op_UpdateChannel.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateChannelMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateChannelMessage.go b/service/chime/api_op_UpdateChannelMessage.go index 93f1370da27..afee38dfc38 100644 --- a/service/chime/api_op_UpdateChannelMessage.go +++ b/service/chime/api_op_UpdateChannelMessage.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateChannelMessageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateChannelMessageMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateChannelReadMarker.go b/service/chime/api_op_UpdateChannelReadMarker.go index 9f334668708..d95b8206b8f 100644 --- a/service/chime/api_op_UpdateChannelReadMarker.go +++ b/service/chime/api_op_UpdateChannelReadMarker.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateChannelReadMarkerMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateChannelReadMarkerMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateGlobalSettings.go b/service/chime/api_op_UpdateGlobalSettings.go index 0bfafa320c1..02cd5c8d4e4 100644 --- a/service/chime/api_op_UpdateGlobalSettings.go +++ b/service/chime/api_op_UpdateGlobalSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateGlobalSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chime/api_op_UpdatePhoneNumber.go b/service/chime/api_op_UpdatePhoneNumber.go index e01ea088568..ecd02b66391 100644 --- a/service/chime/api_op_UpdatePhoneNumber.go +++ b/service/chime/api_op_UpdatePhoneNumber.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdatePhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdatePhoneNumberSettings.go b/service/chime/api_op_UpdatePhoneNumberSettings.go index 0cc1f9e1b2a..ea8713cb093 100644 --- a/service/chime/api_op_UpdatePhoneNumberSettings.go +++ b/service/chime/api_op_UpdatePhoneNumberSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdatePhoneNumberSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePhoneNumberSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateProxySession.go b/service/chime/api_op_UpdateProxySession.go index 44f3451e7b2..b12e12d7d01 100644 --- a/service/chime/api_op_UpdateProxySession.go +++ b/service/chime/api_op_UpdateProxySession.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateProxySessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateRoom.go b/service/chime/api_op_UpdateRoom.go index 3653d3d45ed..2216e7039e6 100644 --- a/service/chime/api_op_UpdateRoom.go +++ b/service/chime/api_op_UpdateRoom.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateRoomMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoomValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateRoomMembership.go b/service/chime/api_op_UpdateRoomMembership.go index 57b08705769..155f6161b9e 100644 --- a/service/chime/api_op_UpdateRoomMembership.go +++ b/service/chime/api_op_UpdateRoomMembership.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateRoomMembershipMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoomMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateSipMediaApplication.go b/service/chime/api_op_UpdateSipMediaApplication.go index d7ac153df73..1e668d992be 100644 --- a/service/chime/api_op_UpdateSipMediaApplication.go +++ b/service/chime/api_op_UpdateSipMediaApplication.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateSipMediaApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateSipMediaApplicationCall.go b/service/chime/api_op_UpdateSipMediaApplicationCall.go index deb81ee0c71..726690ccb7a 100644 --- a/service/chime/api_op_UpdateSipMediaApplicationCall.go +++ b/service/chime/api_op_UpdateSipMediaApplicationCall.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateSipMediaApplicationCallMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSipMediaApplicationCallValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateSipRule.go b/service/chime/api_op_UpdateSipRule.go index d014e18de9a..03dbdf00f06 100644 --- a/service/chime/api_op_UpdateSipRule.go +++ b/service/chime/api_op_UpdateSipRule.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateSipRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateUser.go b/service/chime/api_op_UpdateUser.go index 69fa67371ba..770eabac282 100644 --- a/service/chime/api_op_UpdateUser.go +++ b/service/chime/api_op_UpdateUser.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateUserSettings.go b/service/chime/api_op_UpdateUserSettings.go index 2aa651d6a84..b508fb29120 100644 --- a/service/chime/api_op_UpdateUserSettings.go +++ b/service/chime/api_op_UpdateUserSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateUserSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateVoiceConnector.go b/service/chime/api_op_UpdateVoiceConnector.go index befb315e8cf..a7e0bc962f7 100644 --- a/service/chime/api_op_UpdateVoiceConnector.go +++ b/service/chime/api_op_UpdateVoiceConnector.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateVoiceConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_UpdateVoiceConnectorGroup.go b/service/chime/api_op_UpdateVoiceConnectorGroup.go index 42c2c74667a..a64eb35f265 100644 --- a/service/chime/api_op_UpdateVoiceConnectorGroup.go +++ b/service/chime/api_op_UpdateVoiceConnectorGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateVoiceConnectorGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chime/api_op_ValidateE911Address.go b/service/chime/api_op_ValidateE911Address.go index 1df1a9e6bc5..be7fcca8df9 100644 --- a/service/chime/api_op_ValidateE911Address.go +++ b/service/chime/api_op_ValidateE911Address.go @@ -162,6 +162,9 @@ func (c *Client) addOperationValidateE911AddressMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateE911AddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_client.go b/service/chimesdkidentity/api_client.go index 7dd09e02fe7..7c55c5319b1 100644 --- a/service/chimesdkidentity/api_client.go +++ b/service/chimesdkidentity/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/chimesdkidentity/api_op_CreateAppInstance.go b/service/chimesdkidentity/api_op_CreateAppInstance.go index fe686f8d1a5..2d6f07ff145 100644 --- a/service/chimesdkidentity/api_op_CreateAppInstance.go +++ b/service/chimesdkidentity/api_op_CreateAppInstance.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateAppInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go b/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go index 2fdcd6ec5da..420fe5085f8 100644 --- a/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go +++ b/service/chimesdkidentity/api_op_CreateAppInstanceAdmin.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateAppInstanceAdminMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppInstanceAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_CreateAppInstanceBot.go b/service/chimesdkidentity/api_op_CreateAppInstanceBot.go index e6be2b6a4df..7ec72b68a17 100644 --- a/service/chimesdkidentity/api_op_CreateAppInstanceBot.go +++ b/service/chimesdkidentity/api_op_CreateAppInstanceBot.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateAppInstanceBotMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppInstanceBotMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_CreateAppInstanceUser.go b/service/chimesdkidentity/api_op_CreateAppInstanceUser.go index 0e8fd2579a9..dc61c71a77c 100644 --- a/service/chimesdkidentity/api_op_CreateAppInstanceUser.go +++ b/service/chimesdkidentity/api_op_CreateAppInstanceUser.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateAppInstanceUserMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppInstanceUserMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DeleteAppInstance.go b/service/chimesdkidentity/api_op_DeleteAppInstance.go index 12c7984861e..4db4b386e5f 100644 --- a/service/chimesdkidentity/api_op_DeleteAppInstance.go +++ b/service/chimesdkidentity/api_op_DeleteAppInstance.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go b/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go index 197ed9d6995..043a18f463d 100644 --- a/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go +++ b/service/chimesdkidentity/api_op_DeleteAppInstanceAdmin.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAppInstanceAdminMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppInstanceAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DeleteAppInstanceBot.go b/service/chimesdkidentity/api_op_DeleteAppInstanceBot.go index 51e258c334c..d28f0d39d24 100644 --- a/service/chimesdkidentity/api_op_DeleteAppInstanceBot.go +++ b/service/chimesdkidentity/api_op_DeleteAppInstanceBot.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppInstanceBotMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppInstanceBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go b/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go index f4994b4f5c4..eb50320bf10 100644 --- a/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go +++ b/service/chimesdkidentity/api_op_DeleteAppInstanceUser.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppInstanceUserMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppInstanceUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DeregisterAppInstanceUserEndpoint.go b/service/chimesdkidentity/api_op_DeregisterAppInstanceUserEndpoint.go index fed41633a79..e598e2cc091 100644 --- a/service/chimesdkidentity/api_op_DeregisterAppInstanceUserEndpoint.go +++ b/service/chimesdkidentity/api_op_DeregisterAppInstanceUserEndpoint.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeregisterAppInstanceUserEndpointMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterAppInstanceUserEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DescribeAppInstance.go b/service/chimesdkidentity/api_op_DescribeAppInstance.go index 5e6e1798f1a..ca416501edd 100644 --- a/service/chimesdkidentity/api_op_DescribeAppInstance.go +++ b/service/chimesdkidentity/api_op_DescribeAppInstance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeAppInstanceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go b/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go index 6ea0f7c8485..62db48e8c4e 100644 --- a/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go +++ b/service/chimesdkidentity/api_op_DescribeAppInstanceAdmin.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeAppInstanceAdminMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppInstanceAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DescribeAppInstanceBot.go b/service/chimesdkidentity/api_op_DescribeAppInstanceBot.go index 104335d0c3d..6d3464a490a 100644 --- a/service/chimesdkidentity/api_op_DescribeAppInstanceBot.go +++ b/service/chimesdkidentity/api_op_DescribeAppInstanceBot.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeAppInstanceBotMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppInstanceBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go b/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go index 6eba8acb73e..07248d0241d 100644 --- a/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go +++ b/service/chimesdkidentity/api_op_DescribeAppInstanceUser.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeAppInstanceUserMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppInstanceUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_DescribeAppInstanceUserEndpoint.go b/service/chimesdkidentity/api_op_DescribeAppInstanceUserEndpoint.go index 46c404e0136..de9d4c63051 100644 --- a/service/chimesdkidentity/api_op_DescribeAppInstanceUserEndpoint.go +++ b/service/chimesdkidentity/api_op_DescribeAppInstanceUserEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAppInstanceUserEndpointMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppInstanceUserEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go b/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go index ed513465139..18993c51a93 100644 --- a/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go +++ b/service/chimesdkidentity/api_op_GetAppInstanceRetentionSettings.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetAppInstanceRetentionSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppInstanceRetentionSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go b/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go index 700889c4b46..4cee4a23afb 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceAdmins.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListAppInstanceAdminsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppInstanceAdminsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListAppInstanceAdminsMiddlewares(stack *middleware. return nil } -// ListAppInstanceAdminsAPIClient is a client that implements the -// ListAppInstanceAdmins operation. -type ListAppInstanceAdminsAPIClient interface { - ListAppInstanceAdmins(context.Context, *ListAppInstanceAdminsInput, ...func(*Options)) (*ListAppInstanceAdminsOutput, error) -} - -var _ ListAppInstanceAdminsAPIClient = (*Client)(nil) - // ListAppInstanceAdminsPaginatorOptions is the paginator options for // ListAppInstanceAdmins type ListAppInstanceAdminsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstanceAdmins(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAppInstanceAdminsAPIClient is a client that implements the +// ListAppInstanceAdmins operation. +type ListAppInstanceAdminsAPIClient interface { + ListAppInstanceAdmins(context.Context, *ListAppInstanceAdminsInput, ...func(*Options)) (*ListAppInstanceAdminsOutput, error) +} + +var _ ListAppInstanceAdminsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstanceAdmins(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkidentity/api_op_ListAppInstanceBots.go b/service/chimesdkidentity/api_op_ListAppInstanceBots.go index f54b3664659..6cb87aa2d11 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceBots.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceBots.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAppInstanceBotsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppInstanceBotsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAppInstanceBotsMiddlewares(stack *middleware.St return nil } -// ListAppInstanceBotsAPIClient is a client that implements the -// ListAppInstanceBots operation. -type ListAppInstanceBotsAPIClient interface { - ListAppInstanceBots(context.Context, *ListAppInstanceBotsInput, ...func(*Options)) (*ListAppInstanceBotsOutput, error) -} - -var _ ListAppInstanceBotsAPIClient = (*Client)(nil) - // ListAppInstanceBotsPaginatorOptions is the paginator options for // ListAppInstanceBots type ListAppInstanceBotsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListAppInstanceBotsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstanceBots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListAppInstanceBotsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAppInstanceBotsAPIClient is a client that implements the +// ListAppInstanceBots operation. +type ListAppInstanceBotsAPIClient interface { + ListAppInstanceBots(context.Context, *ListAppInstanceBotsInput, ...func(*Options)) (*ListAppInstanceBotsOutput, error) +} + +var _ ListAppInstanceBotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstanceBots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go b/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go index d33ea9e54e4..e9d88600c3c 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceUserEndpoints.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAppInstanceUserEndpointsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppInstanceUserEndpointsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListAppInstanceUserEndpointsMiddlewares(stack *midd return nil } -// ListAppInstanceUserEndpointsAPIClient is a client that implements the -// ListAppInstanceUserEndpoints operation. -type ListAppInstanceUserEndpointsAPIClient interface { - ListAppInstanceUserEndpoints(context.Context, *ListAppInstanceUserEndpointsInput, ...func(*Options)) (*ListAppInstanceUserEndpointsOutput, error) -} - -var _ ListAppInstanceUserEndpointsAPIClient = (*Client)(nil) - // ListAppInstanceUserEndpointsPaginatorOptions is the paginator options for // ListAppInstanceUserEndpoints type ListAppInstanceUserEndpointsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAppInstanceUserEndpointsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstanceUserEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAppInstanceUserEndpointsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListAppInstanceUserEndpointsAPIClient is a client that implements the +// ListAppInstanceUserEndpoints operation. +type ListAppInstanceUserEndpointsAPIClient interface { + ListAppInstanceUserEndpoints(context.Context, *ListAppInstanceUserEndpointsInput, ...func(*Options)) (*ListAppInstanceUserEndpointsOutput, error) +} + +var _ ListAppInstanceUserEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstanceUserEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkidentity/api_op_ListAppInstanceUsers.go b/service/chimesdkidentity/api_op_ListAppInstanceUsers.go index b7c09d95537..ec0546d48c3 100644 --- a/service/chimesdkidentity/api_op_ListAppInstanceUsers.go +++ b/service/chimesdkidentity/api_op_ListAppInstanceUsers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAppInstanceUsersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppInstanceUsersValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAppInstanceUsersMiddlewares(stack *middleware.S return nil } -// ListAppInstanceUsersAPIClient is a client that implements the -// ListAppInstanceUsers operation. -type ListAppInstanceUsersAPIClient interface { - ListAppInstanceUsers(context.Context, *ListAppInstanceUsersInput, ...func(*Options)) (*ListAppInstanceUsersOutput, error) -} - -var _ ListAppInstanceUsersAPIClient = (*Client)(nil) - // ListAppInstanceUsersPaginatorOptions is the paginator options for // ListAppInstanceUsers type ListAppInstanceUsersPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstanceUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListAppInstanceUsersAPIClient is a client that implements the +// ListAppInstanceUsers operation. +type ListAppInstanceUsersAPIClient interface { + ListAppInstanceUsers(context.Context, *ListAppInstanceUsersInput, ...func(*Options)) (*ListAppInstanceUsersOutput, error) +} + +var _ ListAppInstanceUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstanceUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkidentity/api_op_ListAppInstances.go b/service/chimesdkidentity/api_op_ListAppInstances.go index 7349c2e9d2a..b4379e2ba20 100644 --- a/service/chimesdkidentity/api_op_ListAppInstances.go +++ b/service/chimesdkidentity/api_op_ListAppInstances.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListAppInstancesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppInstances(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListAppInstancesMiddlewares(stack *middleware.Stack return nil } -// ListAppInstancesAPIClient is a client that implements the ListAppInstances -// operation. -type ListAppInstancesAPIClient interface { - ListAppInstances(context.Context, *ListAppInstancesInput, ...func(*Options)) (*ListAppInstancesOutput, error) -} - -var _ ListAppInstancesAPIClient = (*Client)(nil) - // ListAppInstancesPaginatorOptions is the paginator options for ListAppInstances type ListAppInstancesPaginatorOptions struct { // The maximum number of AppInstance s that you want to return. @@ -204,6 +199,9 @@ func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAppInstancesAPIClient is a client that implements the ListAppInstances +// operation. +type ListAppInstancesAPIClient interface { + ListAppInstances(context.Context, *ListAppInstancesInput, ...func(*Options)) (*ListAppInstancesOutput, error) +} + +var _ ListAppInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkidentity/api_op_ListTagsForResource.go b/service/chimesdkidentity/api_op_ListTagsForResource.go index 269a8939c14..1f3ac17e217 100644 --- a/service/chimesdkidentity/api_op_ListTagsForResource.go +++ b/service/chimesdkidentity/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go b/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go index 5ec604aef13..9e33d488f48 100644 --- a/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go +++ b/service/chimesdkidentity/api_op_PutAppInstanceRetentionSettings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationPutAppInstanceRetentionSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAppInstanceRetentionSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_PutAppInstanceUserExpirationSettings.go b/service/chimesdkidentity/api_op_PutAppInstanceUserExpirationSettings.go index e36a1364e84..878e2ea37a1 100644 --- a/service/chimesdkidentity/api_op_PutAppInstanceUserExpirationSettings.go +++ b/service/chimesdkidentity/api_op_PutAppInstanceUserExpirationSettings.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutAppInstanceUserExpirationSettingsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAppInstanceUserExpirationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_RegisterAppInstanceUserEndpoint.go b/service/chimesdkidentity/api_op_RegisterAppInstanceUserEndpoint.go index 1b862e8177e..cb5b16eb6f8 100644 --- a/service/chimesdkidentity/api_op_RegisterAppInstanceUserEndpoint.go +++ b/service/chimesdkidentity/api_op_RegisterAppInstanceUserEndpoint.go @@ -149,6 +149,9 @@ func (c *Client) addOperationRegisterAppInstanceUserEndpointMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterAppInstanceUserEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_TagResource.go b/service/chimesdkidentity/api_op_TagResource.go index a50bdba76df..8ca03eb80bf 100644 --- a/service/chimesdkidentity/api_op_TagResource.go +++ b/service/chimesdkidentity/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_UntagResource.go b/service/chimesdkidentity/api_op_UntagResource.go index eac138169eb..981b2ae904e 100644 --- a/service/chimesdkidentity/api_op_UntagResource.go +++ b/service/chimesdkidentity/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_UpdateAppInstance.go b/service/chimesdkidentity/api_op_UpdateAppInstance.go index c17985305fa..1b18b1adc3a 100644 --- a/service/chimesdkidentity/api_op_UpdateAppInstance.go +++ b/service/chimesdkidentity/api_op_UpdateAppInstance.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateAppInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_UpdateAppInstanceBot.go b/service/chimesdkidentity/api_op_UpdateAppInstanceBot.go index 962c66a7076..f351c00f2af 100644 --- a/service/chimesdkidentity/api_op_UpdateAppInstanceBot.go +++ b/service/chimesdkidentity/api_op_UpdateAppInstanceBot.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateAppInstanceBotMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppInstanceBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go b/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go index c541c89a421..1d368e99b8e 100644 --- a/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go +++ b/service/chimesdkidentity/api_op_UpdateAppInstanceUser.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateAppInstanceUserMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppInstanceUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkidentity/api_op_UpdateAppInstanceUserEndpoint.go b/service/chimesdkidentity/api_op_UpdateAppInstanceUserEndpoint.go index acb444ebc30..c5c4226864a 100644 --- a/service/chimesdkidentity/api_op_UpdateAppInstanceUserEndpoint.go +++ b/service/chimesdkidentity/api_op_UpdateAppInstanceUserEndpoint.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateAppInstanceUserEndpointMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppInstanceUserEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_client.go b/service/chimesdkmediapipelines/api_client.go index 4c8b23af1c3..c884e00d0d2 100644 --- a/service/chimesdkmediapipelines/api_client.go +++ b/service/chimesdkmediapipelines/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaCapturePipeline.go b/service/chimesdkmediapipelines/api_op_CreateMediaCapturePipeline.go index 2ea59c62b51..b86cdec83a4 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaCapturePipeline.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaCapturePipeline.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateMediaCapturePipelineMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaCapturePipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaConcatenationPipeline.go b/service/chimesdkmediapipelines/api_op_CreateMediaConcatenationPipeline.go index 2ceaae4eb65..f3eca241467 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaConcatenationPipeline.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaConcatenationPipeline.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateMediaConcatenationPipelineMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaConcatenationPipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go b/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go index a69ad695eb3..573e8fe8d3f 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateMediaInsightsPipelineMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaInsightsPipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipelineConfiguration.go b/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipelineConfiguration.go index 9664041cc03..a178fbf3413 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipelineConfiguration.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipelineConfiguration.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateMediaInsightsPipelineConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaInsightsPipelineConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaLiveConnectorPipeline.go b/service/chimesdkmediapipelines/api_op_CreateMediaLiveConnectorPipeline.go index d22356859cb..8be402662d5 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaLiveConnectorPipeline.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaLiveConnectorPipeline.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateMediaLiveConnectorPipelineMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaLiveConnectorPipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaPipelineKinesisVideoStreamPool.go b/service/chimesdkmediapipelines/api_op_CreateMediaPipelineKinesisVideoStreamPool.go index d00c4e5abc9..7aa59fb7b65 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaPipelineKinesisVideoStreamPool.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaPipelineKinesisVideoStreamPool.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateMediaPipelineKinesisVideoStreamPoolMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaPipelineKinesisVideoStreamPoolMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaStreamPipeline.go b/service/chimesdkmediapipelines/api_op_CreateMediaStreamPipeline.go index 1e97f21350c..2028d2d0637 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaStreamPipeline.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaStreamPipeline.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateMediaStreamPipelineMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMediaStreamPipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_DeleteMediaCapturePipeline.go b/service/chimesdkmediapipelines/api_op_DeleteMediaCapturePipeline.go index 49717d9f966..774e29b5ba9 100644 --- a/service/chimesdkmediapipelines/api_op_DeleteMediaCapturePipeline.go +++ b/service/chimesdkmediapipelines/api_op_DeleteMediaCapturePipeline.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMediaCapturePipelineMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMediaCapturePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_DeleteMediaInsightsPipelineConfiguration.go b/service/chimesdkmediapipelines/api_op_DeleteMediaInsightsPipelineConfiguration.go index ac1b3268195..c778d36f7b5 100644 --- a/service/chimesdkmediapipelines/api_op_DeleteMediaInsightsPipelineConfiguration.go +++ b/service/chimesdkmediapipelines/api_op_DeleteMediaInsightsPipelineConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteMediaInsightsPipelineConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMediaInsightsPipelineConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_DeleteMediaPipeline.go b/service/chimesdkmediapipelines/api_op_DeleteMediaPipeline.go index 7b6662057cb..eee626aabfb 100644 --- a/service/chimesdkmediapipelines/api_op_DeleteMediaPipeline.go +++ b/service/chimesdkmediapipelines/api_op_DeleteMediaPipeline.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMediaPipelineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMediaPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_DeleteMediaPipelineKinesisVideoStreamPool.go b/service/chimesdkmediapipelines/api_op_DeleteMediaPipelineKinesisVideoStreamPool.go index bf353c94779..5f1b61edb72 100644 --- a/service/chimesdkmediapipelines/api_op_DeleteMediaPipelineKinesisVideoStreamPool.go +++ b/service/chimesdkmediapipelines/api_op_DeleteMediaPipelineKinesisVideoStreamPool.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMediaPipelineKinesisVideoStreamPoolMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMediaPipelineKinesisVideoStreamPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_GetMediaCapturePipeline.go b/service/chimesdkmediapipelines/api_op_GetMediaCapturePipeline.go index fc9a381af22..9c5cde95a28 100644 --- a/service/chimesdkmediapipelines/api_op_GetMediaCapturePipeline.go +++ b/service/chimesdkmediapipelines/api_op_GetMediaCapturePipeline.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetMediaCapturePipelineMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaCapturePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_GetMediaInsightsPipelineConfiguration.go b/service/chimesdkmediapipelines/api_op_GetMediaInsightsPipelineConfiguration.go index d649f8433a8..8545f779002 100644 --- a/service/chimesdkmediapipelines/api_op_GetMediaInsightsPipelineConfiguration.go +++ b/service/chimesdkmediapipelines/api_op_GetMediaInsightsPipelineConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetMediaInsightsPipelineConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaInsightsPipelineConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_GetMediaPipeline.go b/service/chimesdkmediapipelines/api_op_GetMediaPipeline.go index c85f2cfa162..b37b15a2309 100644 --- a/service/chimesdkmediapipelines/api_op_GetMediaPipeline.go +++ b/service/chimesdkmediapipelines/api_op_GetMediaPipeline.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetMediaPipelineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_GetMediaPipelineKinesisVideoStreamPool.go b/service/chimesdkmediapipelines/api_op_GetMediaPipelineKinesisVideoStreamPool.go index ac1223a378d..88c4c2d901b 100644 --- a/service/chimesdkmediapipelines/api_op_GetMediaPipelineKinesisVideoStreamPool.go +++ b/service/chimesdkmediapipelines/api_op_GetMediaPipelineKinesisVideoStreamPool.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetMediaPipelineKinesisVideoStreamPoolMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaPipelineKinesisVideoStreamPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_GetSpeakerSearchTask.go b/service/chimesdkmediapipelines/api_op_GetSpeakerSearchTask.go index 79624983014..94e284280b6 100644 --- a/service/chimesdkmediapipelines/api_op_GetSpeakerSearchTask.go +++ b/service/chimesdkmediapipelines/api_op_GetSpeakerSearchTask.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetSpeakerSearchTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSpeakerSearchTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_GetVoiceToneAnalysisTask.go b/service/chimesdkmediapipelines/api_op_GetVoiceToneAnalysisTask.go index ba16d7d5466..f636715a367 100644 --- a/service/chimesdkmediapipelines/api_op_GetVoiceToneAnalysisTask.go +++ b/service/chimesdkmediapipelines/api_op_GetVoiceToneAnalysisTask.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetVoiceToneAnalysisTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceToneAnalysisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_ListMediaCapturePipelines.go b/service/chimesdkmediapipelines/api_op_ListMediaCapturePipelines.go index d467c8be2c4..c7a07540715 100644 --- a/service/chimesdkmediapipelines/api_op_ListMediaCapturePipelines.go +++ b/service/chimesdkmediapipelines/api_op_ListMediaCapturePipelines.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListMediaCapturePipelinesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaCapturePipelines(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListMediaCapturePipelinesMiddlewares(stack *middlew return nil } -// ListMediaCapturePipelinesAPIClient is a client that implements the -// ListMediaCapturePipelines operation. -type ListMediaCapturePipelinesAPIClient interface { - ListMediaCapturePipelines(context.Context, *ListMediaCapturePipelinesInput, ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) -} - -var _ ListMediaCapturePipelinesAPIClient = (*Client)(nil) - // ListMediaCapturePipelinesPaginatorOptions is the paginator options for // ListMediaCapturePipelines type ListMediaCapturePipelinesPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListMediaCapturePipelinesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMediaCapturePipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListMediaCapturePipelinesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListMediaCapturePipelinesAPIClient is a client that implements the +// ListMediaCapturePipelines operation. +type ListMediaCapturePipelinesAPIClient interface { + ListMediaCapturePipelines(context.Context, *ListMediaCapturePipelinesInput, ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) +} + +var _ ListMediaCapturePipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMediaCapturePipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmediapipelines/api_op_ListMediaInsightsPipelineConfigurations.go b/service/chimesdkmediapipelines/api_op_ListMediaInsightsPipelineConfigurations.go index 81cde013889..33210a69734 100644 --- a/service/chimesdkmediapipelines/api_op_ListMediaInsightsPipelineConfigurations.go +++ b/service/chimesdkmediapipelines/api_op_ListMediaInsightsPipelineConfigurations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListMediaInsightsPipelineConfigurationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaInsightsPipelineConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListMediaInsightsPipelineConfigurationsMiddlewares( return nil } -// ListMediaInsightsPipelineConfigurationsAPIClient is a client that implements -// the ListMediaInsightsPipelineConfigurations operation. -type ListMediaInsightsPipelineConfigurationsAPIClient interface { - ListMediaInsightsPipelineConfigurations(context.Context, *ListMediaInsightsPipelineConfigurationsInput, ...func(*Options)) (*ListMediaInsightsPipelineConfigurationsOutput, error) -} - -var _ ListMediaInsightsPipelineConfigurationsAPIClient = (*Client)(nil) - // ListMediaInsightsPipelineConfigurationsPaginatorOptions is the paginator // options for ListMediaInsightsPipelineConfigurations type ListMediaInsightsPipelineConfigurationsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListMediaInsightsPipelineConfigurationsPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMediaInsightsPipelineConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListMediaInsightsPipelineConfigurationsPaginator) NextPage(ctx context. return result, nil } +// ListMediaInsightsPipelineConfigurationsAPIClient is a client that implements +// the ListMediaInsightsPipelineConfigurations operation. +type ListMediaInsightsPipelineConfigurationsAPIClient interface { + ListMediaInsightsPipelineConfigurations(context.Context, *ListMediaInsightsPipelineConfigurationsInput, ...func(*Options)) (*ListMediaInsightsPipelineConfigurationsOutput, error) +} + +var _ ListMediaInsightsPipelineConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMediaInsightsPipelineConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmediapipelines/api_op_ListMediaPipelineKinesisVideoStreamPools.go b/service/chimesdkmediapipelines/api_op_ListMediaPipelineKinesisVideoStreamPools.go index 7c2beeaff3f..a24adf14f48 100644 --- a/service/chimesdkmediapipelines/api_op_ListMediaPipelineKinesisVideoStreamPools.go +++ b/service/chimesdkmediapipelines/api_op_ListMediaPipelineKinesisVideoStreamPools.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListMediaPipelineKinesisVideoStreamPoolsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaPipelineKinesisVideoStreamPools(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListMediaPipelineKinesisVideoStreamPoolsMiddlewares return nil } -// ListMediaPipelineKinesisVideoStreamPoolsAPIClient is a client that implements -// the ListMediaPipelineKinesisVideoStreamPools operation. -type ListMediaPipelineKinesisVideoStreamPoolsAPIClient interface { - ListMediaPipelineKinesisVideoStreamPools(context.Context, *ListMediaPipelineKinesisVideoStreamPoolsInput, ...func(*Options)) (*ListMediaPipelineKinesisVideoStreamPoolsOutput, error) -} - -var _ ListMediaPipelineKinesisVideoStreamPoolsAPIClient = (*Client)(nil) - // ListMediaPipelineKinesisVideoStreamPoolsPaginatorOptions is the paginator // options for ListMediaPipelineKinesisVideoStreamPools type ListMediaPipelineKinesisVideoStreamPoolsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListMediaPipelineKinesisVideoStreamPoolsPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMediaPipelineKinesisVideoStreamPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListMediaPipelineKinesisVideoStreamPoolsPaginator) NextPage(ctx context return result, nil } +// ListMediaPipelineKinesisVideoStreamPoolsAPIClient is a client that implements +// the ListMediaPipelineKinesisVideoStreamPools operation. +type ListMediaPipelineKinesisVideoStreamPoolsAPIClient interface { + ListMediaPipelineKinesisVideoStreamPools(context.Context, *ListMediaPipelineKinesisVideoStreamPoolsInput, ...func(*Options)) (*ListMediaPipelineKinesisVideoStreamPoolsOutput, error) +} + +var _ ListMediaPipelineKinesisVideoStreamPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMediaPipelineKinesisVideoStreamPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmediapipelines/api_op_ListMediaPipelines.go b/service/chimesdkmediapipelines/api_op_ListMediaPipelines.go index e8e742593ac..ff7b2accd20 100644 --- a/service/chimesdkmediapipelines/api_op_ListMediaPipelines.go +++ b/service/chimesdkmediapipelines/api_op_ListMediaPipelines.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListMediaPipelinesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaPipelines(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListMediaPipelinesMiddlewares(stack *middleware.Sta return nil } -// ListMediaPipelinesAPIClient is a client that implements the ListMediaPipelines -// operation. -type ListMediaPipelinesAPIClient interface { - ListMediaPipelines(context.Context, *ListMediaPipelinesInput, ...func(*Options)) (*ListMediaPipelinesOutput, error) -} - -var _ ListMediaPipelinesAPIClient = (*Client)(nil) - // ListMediaPipelinesPaginatorOptions is the paginator options for // ListMediaPipelines type ListMediaPipelinesPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListMediaPipelinesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMediaPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListMediaPipelinesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListMediaPipelinesAPIClient is a client that implements the ListMediaPipelines +// operation. +type ListMediaPipelinesAPIClient interface { + ListMediaPipelines(context.Context, *ListMediaPipelinesInput, ...func(*Options)) (*ListMediaPipelinesOutput, error) +} + +var _ ListMediaPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMediaPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmediapipelines/api_op_ListTagsForResource.go b/service/chimesdkmediapipelines/api_op_ListTagsForResource.go index d2c82b12064..0b02d9df601 100644 --- a/service/chimesdkmediapipelines/api_op_ListTagsForResource.go +++ b/service/chimesdkmediapipelines/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_StartSpeakerSearchTask.go b/service/chimesdkmediapipelines/api_op_StartSpeakerSearchTask.go index 54aa3be7434..849b5733ff8 100644 --- a/service/chimesdkmediapipelines/api_op_StartSpeakerSearchTask.go +++ b/service/chimesdkmediapipelines/api_op_StartSpeakerSearchTask.go @@ -126,6 +126,9 @@ func (c *Client) addOperationStartSpeakerSearchTaskMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSpeakerSearchTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_StartVoiceToneAnalysisTask.go b/service/chimesdkmediapipelines/api_op_StartVoiceToneAnalysisTask.go index d1933966d9e..979ca657664 100644 --- a/service/chimesdkmediapipelines/api_op_StartVoiceToneAnalysisTask.go +++ b/service/chimesdkmediapipelines/api_op_StartVoiceToneAnalysisTask.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartVoiceToneAnalysisTaskMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartVoiceToneAnalysisTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_StopSpeakerSearchTask.go b/service/chimesdkmediapipelines/api_op_StopSpeakerSearchTask.go index 251ea10383a..155cb1cedbf 100644 --- a/service/chimesdkmediapipelines/api_op_StopSpeakerSearchTask.go +++ b/service/chimesdkmediapipelines/api_op_StopSpeakerSearchTask.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopSpeakerSearchTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSpeakerSearchTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_StopVoiceToneAnalysisTask.go b/service/chimesdkmediapipelines/api_op_StopVoiceToneAnalysisTask.go index bb32512b8ea..3cd03916a12 100644 --- a/service/chimesdkmediapipelines/api_op_StopVoiceToneAnalysisTask.go +++ b/service/chimesdkmediapipelines/api_op_StopVoiceToneAnalysisTask.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopVoiceToneAnalysisTaskMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopVoiceToneAnalysisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_TagResource.go b/service/chimesdkmediapipelines/api_op_TagResource.go index ed9e341572a..967ecba0b47 100644 --- a/service/chimesdkmediapipelines/api_op_TagResource.go +++ b/service/chimesdkmediapipelines/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_UntagResource.go b/service/chimesdkmediapipelines/api_op_UntagResource.go index ad5f08f5a1f..82109fe5644 100644 --- a/service/chimesdkmediapipelines/api_op_UntagResource.go +++ b/service/chimesdkmediapipelines/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineConfiguration.go b/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineConfiguration.go index ea8cc154f30..94f13c83e55 100644 --- a/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineConfiguration.go +++ b/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateMediaInsightsPipelineConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMediaInsightsPipelineConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineStatus.go b/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineStatus.go index 592327d3a03..51d95c3fd40 100644 --- a/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineStatus.go +++ b/service/chimesdkmediapipelines/api_op_UpdateMediaInsightsPipelineStatus.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateMediaInsightsPipelineStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMediaInsightsPipelineStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmediapipelines/api_op_UpdateMediaPipelineKinesisVideoStreamPool.go b/service/chimesdkmediapipelines/api_op_UpdateMediaPipelineKinesisVideoStreamPool.go index 8e5c9778d22..172c46c7754 100644 --- a/service/chimesdkmediapipelines/api_op_UpdateMediaPipelineKinesisVideoStreamPool.go +++ b/service/chimesdkmediapipelines/api_op_UpdateMediaPipelineKinesisVideoStreamPool.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateMediaPipelineKinesisVideoStreamPoolMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMediaPipelineKinesisVideoStreamPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_client.go b/service/chimesdkmeetings/api_client.go index 37219d7529a..2a96d69e03c 100644 --- a/service/chimesdkmeetings/api_client.go +++ b/service/chimesdkmeetings/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/chimesdkmeetings/api_op_BatchCreateAttendee.go b/service/chimesdkmeetings/api_op_BatchCreateAttendee.go index c2e144e9a36..af7e386874f 100644 --- a/service/chimesdkmeetings/api_op_BatchCreateAttendee.go +++ b/service/chimesdkmeetings/api_op_BatchCreateAttendee.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchCreateAttendeeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_BatchUpdateAttendeeCapabilitiesExcept.go b/service/chimesdkmeetings/api_op_BatchUpdateAttendeeCapabilitiesExcept.go index 5c85bbe70d0..c8abadf508b 100644 --- a/service/chimesdkmeetings/api_op_BatchUpdateAttendeeCapabilitiesExcept.go +++ b/service/chimesdkmeetings/api_op_BatchUpdateAttendeeCapabilitiesExcept.go @@ -142,6 +142,9 @@ func (c *Client) addOperationBatchUpdateAttendeeCapabilitiesExceptMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateAttendeeCapabilitiesExceptValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_CreateAttendee.go b/service/chimesdkmeetings/api_op_CreateAttendee.go index 7c6f0df1b81..163c2291487 100644 --- a/service/chimesdkmeetings/api_op_CreateAttendee.go +++ b/service/chimesdkmeetings/api_op_CreateAttendee.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateAttendeeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_CreateMeeting.go b/service/chimesdkmeetings/api_op_CreateMeeting.go index 1f61a9cab40..6269057faa7 100644 --- a/service/chimesdkmeetings/api_op_CreateMeeting.go +++ b/service/chimesdkmeetings/api_op_CreateMeeting.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateMeetingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMeetingMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go b/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go index 9fcf213c996..448bfa2ed56 100644 --- a/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go +++ b/service/chimesdkmeetings/api_op_CreateMeetingWithAttendees.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateMeetingWithAttendeesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMeetingWithAttendeesMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_DeleteAttendee.go b/service/chimesdkmeetings/api_op_DeleteAttendee.go index bd0f59fd6f2..10d695877e9 100644 --- a/service/chimesdkmeetings/api_op_DeleteAttendee.go +++ b/service/chimesdkmeetings/api_op_DeleteAttendee.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAttendeeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_DeleteMeeting.go b/service/chimesdkmeetings/api_op_DeleteMeeting.go index 98ab96db06c..8eecef86a29 100644 --- a/service/chimesdkmeetings/api_op_DeleteMeeting.go +++ b/service/chimesdkmeetings/api_op_DeleteMeeting.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteMeetingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMeetingValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_GetAttendee.go b/service/chimesdkmeetings/api_op_GetAttendee.go index ff96f5a411a..65259ee2c05 100644 --- a/service/chimesdkmeetings/api_op_GetAttendee.go +++ b/service/chimesdkmeetings/api_op_GetAttendee.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetAttendeeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAttendeeValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_GetMeeting.go b/service/chimesdkmeetings/api_op_GetMeeting.go index 9b3aff86db9..3784128bc8e 100644 --- a/service/chimesdkmeetings/api_op_GetMeeting.go +++ b/service/chimesdkmeetings/api_op_GetMeeting.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetMeetingMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMeetingValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_ListAttendees.go b/service/chimesdkmeetings/api_op_ListAttendees.go index d84c11bbf8b..4f347589962 100644 --- a/service/chimesdkmeetings/api_op_ListAttendees.go +++ b/service/chimesdkmeetings/api_op_ListAttendees.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListAttendeesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttendeesValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListAttendeesMiddlewares(stack *middleware.Stack, o return nil } -// ListAttendeesAPIClient is a client that implements the ListAttendees operation. -type ListAttendeesAPIClient interface { - ListAttendees(context.Context, *ListAttendeesInput, ...func(*Options)) (*ListAttendeesOutput, error) -} - -var _ ListAttendeesAPIClient = (*Client)(nil) - // ListAttendeesPaginatorOptions is the paginator options for ListAttendees type ListAttendeesPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -214,6 +210,9 @@ func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttendees(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListAttendeesAPIClient is a client that implements the ListAttendees operation. +type ListAttendeesAPIClient interface { + ListAttendees(context.Context, *ListAttendeesInput, ...func(*Options)) (*ListAttendeesOutput, error) +} + +var _ ListAttendeesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttendees(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmeetings/api_op_ListTagsForResource.go b/service/chimesdkmeetings/api_op_ListTagsForResource.go index c876595310d..2715f47e9eb 100644 --- a/service/chimesdkmeetings/api_op_ListTagsForResource.go +++ b/service/chimesdkmeetings/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_StartMeetingTranscription.go b/service/chimesdkmeetings/api_op_StartMeetingTranscription.go index 3beb72b6c11..65c8b518073 100644 --- a/service/chimesdkmeetings/api_op_StartMeetingTranscription.go +++ b/service/chimesdkmeetings/api_op_StartMeetingTranscription.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartMeetingTranscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMeetingTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_StopMeetingTranscription.go b/service/chimesdkmeetings/api_op_StopMeetingTranscription.go index eaf38939730..fb782a94404 100644 --- a/service/chimesdkmeetings/api_op_StopMeetingTranscription.go +++ b/service/chimesdkmeetings/api_op_StopMeetingTranscription.go @@ -117,6 +117,9 @@ func (c *Client) addOperationStopMeetingTranscriptionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMeetingTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_TagResource.go b/service/chimesdkmeetings/api_op_TagResource.go index 6d5094b14fb..ef6c62956c3 100644 --- a/service/chimesdkmeetings/api_op_TagResource.go +++ b/service/chimesdkmeetings/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_UntagResource.go b/service/chimesdkmeetings/api_op_UntagResource.go index 66363735816..833401cd86a 100644 --- a/service/chimesdkmeetings/api_op_UntagResource.go +++ b/service/chimesdkmeetings/api_op_UntagResource.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmeetings/api_op_UpdateAttendeeCapabilities.go b/service/chimesdkmeetings/api_op_UpdateAttendeeCapabilities.go index 1b8ef82e8a0..b1d208a8080 100644 --- a/service/chimesdkmeetings/api_op_UpdateAttendeeCapabilities.go +++ b/service/chimesdkmeetings/api_op_UpdateAttendeeCapabilities.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateAttendeeCapabilitiesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAttendeeCapabilitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_client.go b/service/chimesdkmessaging/api_client.go index 62f328f38e9..775b7e6e370 100644 --- a/service/chimesdkmessaging/api_client.go +++ b/service/chimesdkmessaging/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/chimesdkmessaging/api_op_AssociateChannelFlow.go b/service/chimesdkmessaging/api_op_AssociateChannelFlow.go index 19d89d4a8ef..62e4b7e9981 100644 --- a/service/chimesdkmessaging/api_op_AssociateChannelFlow.go +++ b/service/chimesdkmessaging/api_op_AssociateChannelFlow.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssociateChannelFlowMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateChannelFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go b/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go index 2049e416357..cd147cc2f5e 100644 --- a/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go +++ b/service/chimesdkmessaging/api_op_BatchCreateChannelMembership.go @@ -133,6 +133,9 @@ func (c *Client) addOperationBatchCreateChannelMembershipMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateChannelMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_ChannelFlowCallback.go b/service/chimesdkmessaging/api_op_ChannelFlowCallback.go index c0dc0f5881c..119cf0cd037 100644 --- a/service/chimesdkmessaging/api_op_ChannelFlowCallback.go +++ b/service/chimesdkmessaging/api_op_ChannelFlowCallback.go @@ -133,6 +133,9 @@ func (c *Client) addOperationChannelFlowCallbackMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opChannelFlowCallbackMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_CreateChannel.go b/service/chimesdkmessaging/api_op_CreateChannel.go index 32d094426f6..f5b8165b8c3 100644 --- a/service/chimesdkmessaging/api_op_CreateChannel.go +++ b/service/chimesdkmessaging/api_op_CreateChannel.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChannelMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_CreateChannelBan.go b/service/chimesdkmessaging/api_op_CreateChannelBan.go index 8db3ccdec5d..33ecc0c4bd9 100644 --- a/service/chimesdkmessaging/api_op_CreateChannelBan.go +++ b/service/chimesdkmessaging/api_op_CreateChannelBan.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateChannelBanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelBanValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_CreateChannelFlow.go b/service/chimesdkmessaging/api_op_CreateChannelFlow.go index c8a33ff56ed..7be56cf8d86 100644 --- a/service/chimesdkmessaging/api_op_CreateChannelFlow.go +++ b/service/chimesdkmessaging/api_op_CreateChannelFlow.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateChannelFlowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChannelFlowMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_CreateChannelMembership.go b/service/chimesdkmessaging/api_op_CreateChannelMembership.go index 827911011f2..b98fc353deb 100644 --- a/service/chimesdkmessaging/api_op_CreateChannelMembership.go +++ b/service/chimesdkmessaging/api_op_CreateChannelMembership.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateChannelMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_CreateChannelModerator.go b/service/chimesdkmessaging/api_op_CreateChannelModerator.go index eb6115c2c16..d2cbd373841 100644 --- a/service/chimesdkmessaging/api_op_CreateChannelModerator.go +++ b/service/chimesdkmessaging/api_op_CreateChannelModerator.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateChannelModeratorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelModeratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteChannel.go b/service/chimesdkmessaging/api_op_DeleteChannel.go index 7103c1f838e..9d15de6e14c 100644 --- a/service/chimesdkmessaging/api_op_DeleteChannel.go +++ b/service/chimesdkmessaging/api_op_DeleteChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteChannelBan.go b/service/chimesdkmessaging/api_op_DeleteChannelBan.go index d59ef35b2ad..59c4f4c05b7 100644 --- a/service/chimesdkmessaging/api_op_DeleteChannelBan.go +++ b/service/chimesdkmessaging/api_op_DeleteChannelBan.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteChannelBanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelBanValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteChannelFlow.go b/service/chimesdkmessaging/api_op_DeleteChannelFlow.go index 44bb3b9ceb4..8b372744c2f 100644 --- a/service/chimesdkmessaging/api_op_DeleteChannelFlow.go +++ b/service/chimesdkmessaging/api_op_DeleteChannelFlow.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteChannelFlowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteChannelMembership.go b/service/chimesdkmessaging/api_op_DeleteChannelMembership.go index 5aeec7bf7f2..eb644cb9bcd 100644 --- a/service/chimesdkmessaging/api_op_DeleteChannelMembership.go +++ b/service/chimesdkmessaging/api_op_DeleteChannelMembership.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteChannelMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteChannelMessage.go b/service/chimesdkmessaging/api_op_DeleteChannelMessage.go index 028929cc6c3..ffb80581f02 100644 --- a/service/chimesdkmessaging/api_op_DeleteChannelMessage.go +++ b/service/chimesdkmessaging/api_op_DeleteChannelMessage.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteChannelMessageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteChannelModerator.go b/service/chimesdkmessaging/api_op_DeleteChannelModerator.go index 7f5d6c3e81e..176fe8c803c 100644 --- a/service/chimesdkmessaging/api_op_DeleteChannelModerator.go +++ b/service/chimesdkmessaging/api_op_DeleteChannelModerator.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteChannelModeratorMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelModeratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go b/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go index 54fab94e302..b172bfe26a4 100644 --- a/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go +++ b/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMessagingStreamingConfigurationsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMessagingStreamingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannel.go b/service/chimesdkmessaging/api_op_DescribeChannel.go index 7d632b18e12..cd91bf79e8f 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannel.go +++ b/service/chimesdkmessaging/api_op_DescribeChannel.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannelBan.go b/service/chimesdkmessaging/api_op_DescribeChannelBan.go index afbaef0bb5b..c3fdab3f007 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannelBan.go +++ b/service/chimesdkmessaging/api_op_DescribeChannelBan.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeChannelBanMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelBanValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannelFlow.go b/service/chimesdkmessaging/api_op_DescribeChannelFlow.go index 95e91a60183..393a0677904 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannelFlow.go +++ b/service/chimesdkmessaging/api_op_DescribeChannelFlow.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeChannelFlowMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannelMembership.go b/service/chimesdkmessaging/api_op_DescribeChannelMembership.go index e032549a50e..8255c7026cf 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannelMembership.go +++ b/service/chimesdkmessaging/api_op_DescribeChannelMembership.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeChannelMembershipMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go b/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go index 0ad42dc0e2f..d4bb8059eeb 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go +++ b/service/chimesdkmessaging/api_op_DescribeChannelMembershipForAppInstanceUser.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeChannelMembershipForAppInstanceUserMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelMembershipForAppInstanceUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go b/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go index 0e524dade2f..16451ed4659 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go +++ b/service/chimesdkmessaging/api_op_DescribeChannelModeratedByAppInstanceUser.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeChannelModeratedByAppInstanceUserMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelModeratedByAppInstanceUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DescribeChannelModerator.go b/service/chimesdkmessaging/api_op_DescribeChannelModerator.go index b7fcef09f3a..ac29b4f66fd 100644 --- a/service/chimesdkmessaging/api_op_DescribeChannelModerator.go +++ b/service/chimesdkmessaging/api_op_DescribeChannelModerator.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeChannelModeratorMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelModeratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_DisassociateChannelFlow.go b/service/chimesdkmessaging/api_op_DisassociateChannelFlow.go index a1a73a6b9b7..22579217fdc 100644 --- a/service/chimesdkmessaging/api_op_DisassociateChannelFlow.go +++ b/service/chimesdkmessaging/api_op_DisassociateChannelFlow.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDisassociateChannelFlowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateChannelFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_GetChannelMembershipPreferences.go b/service/chimesdkmessaging/api_op_GetChannelMembershipPreferences.go index aa33041de5a..fff6a3c6a2e 100644 --- a/service/chimesdkmessaging/api_op_GetChannelMembershipPreferences.go +++ b/service/chimesdkmessaging/api_op_GetChannelMembershipPreferences.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetChannelMembershipPreferencesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelMembershipPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_GetChannelMessage.go b/service/chimesdkmessaging/api_op_GetChannelMessage.go index 2d5102d917a..61bae0ee49e 100644 --- a/service/chimesdkmessaging/api_op_GetChannelMessage.go +++ b/service/chimesdkmessaging/api_op_GetChannelMessage.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetChannelMessageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_GetChannelMessageStatus.go b/service/chimesdkmessaging/api_op_GetChannelMessageStatus.go index e3783e10aaf..a52532ebaa7 100644 --- a/service/chimesdkmessaging/api_op_GetChannelMessageStatus.go +++ b/service/chimesdkmessaging/api_op_GetChannelMessageStatus.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetChannelMessageStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelMessageStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go b/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go index 4e920042687..1a3c0e369fa 100644 --- a/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go +++ b/service/chimesdkmessaging/api_op_GetMessagingSessionEndpoint.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetMessagingSessionEndpointMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMessagingSessionEndpoint(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go b/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go index cbfa983abba..8d42d6f85fc 100644 --- a/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go +++ b/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetMessagingStreamingConfigurationsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMessagingStreamingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_ListChannelBans.go b/service/chimesdkmessaging/api_op_ListChannelBans.go index 9372021fbb9..513f02bd7cd 100644 --- a/service/chimesdkmessaging/api_op_ListChannelBans.go +++ b/service/chimesdkmessaging/api_op_ListChannelBans.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListChannelBansMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelBansValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListChannelBansMiddlewares(stack *middleware.Stack, return nil } -// ListChannelBansAPIClient is a client that implements the ListChannelBans -// operation. -type ListChannelBansAPIClient interface { - ListChannelBans(context.Context, *ListChannelBansInput, ...func(*Options)) (*ListChannelBansOutput, error) -} - -var _ ListChannelBansAPIClient = (*Client)(nil) - // ListChannelBansPaginatorOptions is the paginator options for ListChannelBans type ListChannelBansPaginatorOptions struct { // The maximum number of bans that you want returned. @@ -222,6 +217,9 @@ func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelBans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListChannelBansAPIClient is a client that implements the ListChannelBans +// operation. +type ListChannelBansAPIClient interface { + ListChannelBans(context.Context, *ListChannelBansInput, ...func(*Options)) (*ListChannelBansOutput, error) +} + +var _ ListChannelBansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelBans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelFlows.go b/service/chimesdkmessaging/api_op_ListChannelFlows.go index 03c7ba954f3..3ab38ed4154 100644 --- a/service/chimesdkmessaging/api_op_ListChannelFlows.go +++ b/service/chimesdkmessaging/api_op_ListChannelFlows.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListChannelFlowsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelFlowsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListChannelFlowsMiddlewares(stack *middleware.Stack return nil } -// ListChannelFlowsAPIClient is a client that implements the ListChannelFlows -// operation. -type ListChannelFlowsAPIClient interface { - ListChannelFlows(context.Context, *ListChannelFlowsInput, ...func(*Options)) (*ListChannelFlowsOutput, error) -} - -var _ ListChannelFlowsAPIClient = (*Client)(nil) - // ListChannelFlowsPaginatorOptions is the paginator options for ListChannelFlows type ListChannelFlowsPaginatorOptions struct { // The maximum number of channel flows that you want to return. @@ -213,6 +208,9 @@ func (p *ListChannelFlowsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelFlows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListChannelFlowsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListChannelFlowsAPIClient is a client that implements the ListChannelFlows +// operation. +type ListChannelFlowsAPIClient interface { + ListChannelFlows(context.Context, *ListChannelFlowsInput, ...func(*Options)) (*ListChannelFlowsOutput, error) +} + +var _ ListChannelFlowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelFlows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelMemberships.go b/service/chimesdkmessaging/api_op_ListChannelMemberships.go index cdb08b80920..291bc578d53 100644 --- a/service/chimesdkmessaging/api_op_ListChannelMemberships.go +++ b/service/chimesdkmessaging/api_op_ListChannelMemberships.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListChannelMembershipsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelMembershipsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListChannelMembershipsMiddlewares(stack *middleware return nil } -// ListChannelMembershipsAPIClient is a client that implements the -// ListChannelMemberships operation. -type ListChannelMembershipsAPIClient interface { - ListChannelMemberships(context.Context, *ListChannelMembershipsInput, ...func(*Options)) (*ListChannelMembershipsOutput, error) -} - -var _ ListChannelMembershipsAPIClient = (*Client)(nil) - // ListChannelMembershipsPaginatorOptions is the paginator options for // ListChannelMemberships type ListChannelMembershipsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListChannelMembershipsAPIClient is a client that implements the +// ListChannelMemberships operation. +type ListChannelMembershipsAPIClient interface { + ListChannelMemberships(context.Context, *ListChannelMembershipsInput, ...func(*Options)) (*ListChannelMembershipsOutput, error) +} + +var _ ListChannelMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go b/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go index 801459ac4e7..858936ea78d 100644 --- a/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go +++ b/service/chimesdkmessaging/api_op_ListChannelMembershipsForAppInstanceUser.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListChannelMembershipsForAppInstanceUserMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelMembershipsForAppInstanceUserValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListChannelMembershipsForAppInstanceUserMiddlewares return nil } -// ListChannelMembershipsForAppInstanceUserAPIClient is a client that implements -// the ListChannelMembershipsForAppInstanceUser operation. -type ListChannelMembershipsForAppInstanceUserAPIClient interface { - ListChannelMembershipsForAppInstanceUser(context.Context, *ListChannelMembershipsForAppInstanceUserInput, ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) -} - -var _ ListChannelMembershipsForAppInstanceUserAPIClient = (*Client)(nil) - // ListChannelMembershipsForAppInstanceUserPaginatorOptions is the paginator // options for ListChannelMembershipsForAppInstanceUser type ListChannelMembershipsForAppInstanceUserPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelMembershipsForAppInstanceUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context return result, nil } +// ListChannelMembershipsForAppInstanceUserAPIClient is a client that implements +// the ListChannelMembershipsForAppInstanceUser operation. +type ListChannelMembershipsForAppInstanceUserAPIClient interface { + ListChannelMembershipsForAppInstanceUser(context.Context, *ListChannelMembershipsForAppInstanceUserInput, ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) +} + +var _ ListChannelMembershipsForAppInstanceUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelMembershipsForAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelMessages.go b/service/chimesdkmessaging/api_op_ListChannelMessages.go index a35549306ae..4098adb5faf 100644 --- a/service/chimesdkmessaging/api_op_ListChannelMessages.go +++ b/service/chimesdkmessaging/api_op_ListChannelMessages.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListChannelMessagesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelMessagesValidationMiddleware(stack); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationListChannelMessagesMiddlewares(stack *middleware.St return nil } -// ListChannelMessagesAPIClient is a client that implements the -// ListChannelMessages operation. -type ListChannelMessagesAPIClient interface { - ListChannelMessages(context.Context, *ListChannelMessagesInput, ...func(*Options)) (*ListChannelMessagesOutput, error) -} - -var _ ListChannelMessagesAPIClient = (*Client)(nil) - // ListChannelMessagesPaginatorOptions is the paginator options for // ListChannelMessages type ListChannelMessagesPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelMessages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListChannelMessagesAPIClient is a client that implements the +// ListChannelMessages operation. +type ListChannelMessagesAPIClient interface { + ListChannelMessages(context.Context, *ListChannelMessagesInput, ...func(*Options)) (*ListChannelMessagesOutput, error) +} + +var _ ListChannelMessagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelMessages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelModerators.go b/service/chimesdkmessaging/api_op_ListChannelModerators.go index 00fb5323808..ce32802ce41 100644 --- a/service/chimesdkmessaging/api_op_ListChannelModerators.go +++ b/service/chimesdkmessaging/api_op_ListChannelModerators.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListChannelModeratorsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelModeratorsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListChannelModeratorsMiddlewares(stack *middleware. return nil } -// ListChannelModeratorsAPIClient is a client that implements the -// ListChannelModerators operation. -type ListChannelModeratorsAPIClient interface { - ListChannelModerators(context.Context, *ListChannelModeratorsInput, ...func(*Options)) (*ListChannelModeratorsOutput, error) -} - -var _ ListChannelModeratorsAPIClient = (*Client)(nil) - // ListChannelModeratorsPaginatorOptions is the paginator options for // ListChannelModerators type ListChannelModeratorsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelModerators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListChannelModeratorsAPIClient is a client that implements the +// ListChannelModerators operation. +type ListChannelModeratorsAPIClient interface { + ListChannelModerators(context.Context, *ListChannelModeratorsInput, ...func(*Options)) (*ListChannelModeratorsOutput, error) +} + +var _ ListChannelModeratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelModerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannels.go b/service/chimesdkmessaging/api_op_ListChannels.go index deef0191b42..0c7cf9c7b41 100644 --- a/service/chimesdkmessaging/api_op_ListChannels.go +++ b/service/chimesdkmessaging/api_op_ListChannels.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelsValidationMiddleware(stack); err != nil { return err } @@ -163,13 +166,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of channels that you want to return. @@ -233,6 +229,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +251,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go b/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go index d315f9720ff..9e7a9649c0c 100644 --- a/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go +++ b/service/chimesdkmessaging/api_op_ListChannelsAssociatedWithChannelFlow.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListChannelsAssociatedWithChannelFlowMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelsAssociatedWithChannelFlowValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListChannelsAssociatedWithChannelFlowMiddlewares(st return nil } -// ListChannelsAssociatedWithChannelFlowAPIClient is a client that implements the -// ListChannelsAssociatedWithChannelFlow operation. -type ListChannelsAssociatedWithChannelFlowAPIClient interface { - ListChannelsAssociatedWithChannelFlow(context.Context, *ListChannelsAssociatedWithChannelFlowInput, ...func(*Options)) (*ListChannelsAssociatedWithChannelFlowOutput, error) -} - -var _ ListChannelsAssociatedWithChannelFlowAPIClient = (*Client)(nil) - // ListChannelsAssociatedWithChannelFlowPaginatorOptions is the paginator options // for ListChannelsAssociatedWithChannelFlow type ListChannelsAssociatedWithChannelFlowPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListChannelsAssociatedWithChannelFlowPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelsAssociatedWithChannelFlow(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListChannelsAssociatedWithChannelFlowPaginator) NextPage(ctx context.Co return result, nil } +// ListChannelsAssociatedWithChannelFlowAPIClient is a client that implements the +// ListChannelsAssociatedWithChannelFlow operation. +type ListChannelsAssociatedWithChannelFlowAPIClient interface { + ListChannelsAssociatedWithChannelFlow(context.Context, *ListChannelsAssociatedWithChannelFlowInput, ...func(*Options)) (*ListChannelsAssociatedWithChannelFlowOutput, error) +} + +var _ ListChannelsAssociatedWithChannelFlowAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelsAssociatedWithChannelFlow(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go b/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go index e48c9612c51..e8c838a238a 100644 --- a/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go +++ b/service/chimesdkmessaging/api_op_ListChannelsModeratedByAppInstanceUser.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListChannelsModeratedByAppInstanceUserMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelsModeratedByAppInstanceUserValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListChannelsModeratedByAppInstanceUserMiddlewares(s return nil } -// ListChannelsModeratedByAppInstanceUserAPIClient is a client that implements the -// ListChannelsModeratedByAppInstanceUser operation. -type ListChannelsModeratedByAppInstanceUserAPIClient interface { - ListChannelsModeratedByAppInstanceUser(context.Context, *ListChannelsModeratedByAppInstanceUserInput, ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) -} - -var _ ListChannelsModeratedByAppInstanceUserAPIClient = (*Client)(nil) - // ListChannelsModeratedByAppInstanceUserPaginatorOptions is the paginator options // for ListChannelsModeratedByAppInstanceUser type ListChannelsModeratedByAppInstanceUserPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelsModeratedByAppInstanceUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.C return result, nil } +// ListChannelsModeratedByAppInstanceUserAPIClient is a client that implements the +// ListChannelsModeratedByAppInstanceUser operation. +type ListChannelsModeratedByAppInstanceUserAPIClient interface { + ListChannelsModeratedByAppInstanceUser(context.Context, *ListChannelsModeratedByAppInstanceUserInput, ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) +} + +var _ ListChannelsModeratedByAppInstanceUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelsModeratedByAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListSubChannels.go b/service/chimesdkmessaging/api_op_ListSubChannels.go index 68634bcadf1..930a7287b1d 100644 --- a/service/chimesdkmessaging/api_op_ListSubChannels.go +++ b/service/chimesdkmessaging/api_op_ListSubChannels.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListSubChannelsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubChannelsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListSubChannelsMiddlewares(stack *middleware.Stack, return nil } -// ListSubChannelsAPIClient is a client that implements the ListSubChannels -// operation. -type ListSubChannelsAPIClient interface { - ListSubChannels(context.Context, *ListSubChannelsInput, ...func(*Options)) (*ListSubChannelsOutput, error) -} - -var _ ListSubChannelsAPIClient = (*Client)(nil) - // ListSubChannelsPaginatorOptions is the paginator options for ListSubChannels type ListSubChannelsPaginatorOptions struct { // The maximum number of sub-channels that you want to return. @@ -222,6 +217,9 @@ func (p *ListSubChannelsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListSubChannelsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListSubChannelsAPIClient is a client that implements the ListSubChannels +// operation. +type ListSubChannelsAPIClient interface { + ListSubChannels(context.Context, *ListSubChannelsInput, ...func(*Options)) (*ListSubChannelsOutput, error) +} + +var _ ListSubChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_ListTagsForResource.go b/service/chimesdkmessaging/api_op_ListTagsForResource.go index 39038c63dcd..0fc5f35db78 100644 --- a/service/chimesdkmessaging/api_op_ListTagsForResource.go +++ b/service/chimesdkmessaging/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_PutChannelExpirationSettings.go b/service/chimesdkmessaging/api_op_PutChannelExpirationSettings.go index 11d45a4f4b2..6fbf5ee3c5a 100644 --- a/service/chimesdkmessaging/api_op_PutChannelExpirationSettings.go +++ b/service/chimesdkmessaging/api_op_PutChannelExpirationSettings.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutChannelExpirationSettingsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutChannelExpirationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_PutChannelMembershipPreferences.go b/service/chimesdkmessaging/api_op_PutChannelMembershipPreferences.go index cc6584e69ac..5f4db6c7513 100644 --- a/service/chimesdkmessaging/api_op_PutChannelMembershipPreferences.go +++ b/service/chimesdkmessaging/api_op_PutChannelMembershipPreferences.go @@ -136,6 +136,9 @@ func (c *Client) addOperationPutChannelMembershipPreferencesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutChannelMembershipPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go b/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go index cbe03cc4a3f..e2eab38c59f 100644 --- a/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go +++ b/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutMessagingStreamingConfigurationsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMessagingStreamingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_RedactChannelMessage.go b/service/chimesdkmessaging/api_op_RedactChannelMessage.go index 2218f8356e1..6d60d1c89cd 100644 --- a/service/chimesdkmessaging/api_op_RedactChannelMessage.go +++ b/service/chimesdkmessaging/api_op_RedactChannelMessage.go @@ -131,6 +131,9 @@ func (c *Client) addOperationRedactChannelMessageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRedactChannelMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_SearchChannels.go b/service/chimesdkmessaging/api_op_SearchChannels.go index b226d50ef39..dde77dc7047 100644 --- a/service/chimesdkmessaging/api_op_SearchChannels.go +++ b/service/chimesdkmessaging/api_op_SearchChannels.go @@ -126,6 +126,9 @@ func (c *Client) addOperationSearchChannelsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchChannelsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationSearchChannelsMiddlewares(stack *middleware.Stack, return nil } -// SearchChannelsAPIClient is a client that implements the SearchChannels -// operation. -type SearchChannelsAPIClient interface { - SearchChannels(context.Context, *SearchChannelsInput, ...func(*Options)) (*SearchChannelsOutput, error) -} - -var _ SearchChannelsAPIClient = (*Client)(nil) - // SearchChannelsPaginatorOptions is the paginator options for SearchChannels type SearchChannelsPaginatorOptions struct { // The maximum number of channels that you want returned. @@ -221,6 +216,9 @@ func (p *SearchChannelsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *SearchChannelsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchChannelsAPIClient is a client that implements the SearchChannels +// operation. +type SearchChannelsAPIClient interface { + SearchChannels(context.Context, *SearchChannelsInput, ...func(*Options)) (*SearchChannelsOutput, error) +} + +var _ SearchChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkmessaging/api_op_SendChannelMessage.go b/service/chimesdkmessaging/api_op_SendChannelMessage.go index 0ad13589661..8056ffb9de7 100644 --- a/service/chimesdkmessaging/api_op_SendChannelMessage.go +++ b/service/chimesdkmessaging/api_op_SendChannelMessage.go @@ -179,6 +179,9 @@ func (c *Client) addOperationSendChannelMessageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendChannelMessageMiddleware(stack, options); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_TagResource.go b/service/chimesdkmessaging/api_op_TagResource.go index 98249787558..a0dc2f26b12 100644 --- a/service/chimesdkmessaging/api_op_TagResource.go +++ b/service/chimesdkmessaging/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_UntagResource.go b/service/chimesdkmessaging/api_op_UntagResource.go index 27e1de085bb..ab3179cd8b0 100644 --- a/service/chimesdkmessaging/api_op_UntagResource.go +++ b/service/chimesdkmessaging/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_UpdateChannel.go b/service/chimesdkmessaging/api_op_UpdateChannel.go index 445f821aeb5..2d7a91edd7a 100644 --- a/service/chimesdkmessaging/api_op_UpdateChannel.go +++ b/service/chimesdkmessaging/api_op_UpdateChannel.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_UpdateChannelFlow.go b/service/chimesdkmessaging/api_op_UpdateChannelFlow.go index d461d92a72f..fb2a20db780 100644 --- a/service/chimesdkmessaging/api_op_UpdateChannelFlow.go +++ b/service/chimesdkmessaging/api_op_UpdateChannelFlow.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateChannelFlowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_UpdateChannelMessage.go b/service/chimesdkmessaging/api_op_UpdateChannelMessage.go index 1b37265bd67..986e05fae48 100644 --- a/service/chimesdkmessaging/api_op_UpdateChannelMessage.go +++ b/service/chimesdkmessaging/api_op_UpdateChannelMessage.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateChannelMessageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go b/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go index 571d47803c7..25fd3aede72 100644 --- a/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go +++ b/service/chimesdkmessaging/api_op_UpdateChannelReadMarker.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateChannelReadMarkerMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelReadMarkerValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_client.go b/service/chimesdkvoice/api_client.go index 19c35adec47..80bba20bcba 100644 --- a/service/chimesdkvoice/api_client.go +++ b/service/chimesdkvoice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnector.go b/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnector.go index add4bb4b739..07237bc414a 100644 --- a/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnector.go +++ b/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnector.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociatePhoneNumbersWithVoiceConnectorMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePhoneNumbersWithVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go b/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go index 25bd3b4bf11..b5534e0f8e6 100644 --- a/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go +++ b/service/chimesdkvoice/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociatePhoneNumbersWithVoiceConnectorGroupMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePhoneNumbersWithVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_BatchDeletePhoneNumber.go b/service/chimesdkvoice/api_op_BatchDeletePhoneNumber.go index d7ccac9bfb9..128a7acc01d 100644 --- a/service/chimesdkvoice/api_op_BatchDeletePhoneNumber.go +++ b/service/chimesdkvoice/api_op_BatchDeletePhoneNumber.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchDeletePhoneNumberMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeletePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go b/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go index 5dff37afcf0..ee267b8f45b 100644 --- a/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go +++ b/service/chimesdkvoice/api_op_BatchUpdatePhoneNumber.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchUpdatePhoneNumberMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdatePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreatePhoneNumberOrder.go b/service/chimesdkvoice/api_op_CreatePhoneNumberOrder.go index 3af030dd679..014149b0105 100644 --- a/service/chimesdkvoice/api_op_CreatePhoneNumberOrder.go +++ b/service/chimesdkvoice/api_op_CreatePhoneNumberOrder.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreatePhoneNumberOrderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePhoneNumberOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateProxySession.go b/service/chimesdkvoice/api_op_CreateProxySession.go index ae372ced9a7..b0448d4cb35 100644 --- a/service/chimesdkvoice/api_op_CreateProxySession.go +++ b/service/chimesdkvoice/api_op_CreateProxySession.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateProxySessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateSipMediaApplication.go b/service/chimesdkvoice/api_op_CreateSipMediaApplication.go index 268fbc2207f..fea2cf81814 100644 --- a/service/chimesdkvoice/api_op_CreateSipMediaApplication.go +++ b/service/chimesdkvoice/api_op_CreateSipMediaApplication.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateSipMediaApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateSipMediaApplicationCall.go b/service/chimesdkvoice/api_op_CreateSipMediaApplicationCall.go index 61295265615..87c0fc00ec4 100644 --- a/service/chimesdkvoice/api_op_CreateSipMediaApplicationCall.go +++ b/service/chimesdkvoice/api_op_CreateSipMediaApplicationCall.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateSipMediaApplicationCallMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSipMediaApplicationCallValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateSipRule.go b/service/chimesdkvoice/api_op_CreateSipRule.go index 24fcc94e29d..c28d9ccbb5f 100644 --- a/service/chimesdkvoice/api_op_CreateSipRule.go +++ b/service/chimesdkvoice/api_op_CreateSipRule.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateSipRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateVoiceConnector.go b/service/chimesdkvoice/api_op_CreateVoiceConnector.go index 5f0aaeb5d38..9f7118e043d 100644 --- a/service/chimesdkvoice/api_op_CreateVoiceConnector.go +++ b/service/chimesdkvoice/api_op_CreateVoiceConnector.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateVoiceConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateVoiceConnectorGroup.go b/service/chimesdkvoice/api_op_CreateVoiceConnectorGroup.go index 583f023f39f..57e1ed77f66 100644 --- a/service/chimesdkvoice/api_op_CreateVoiceConnectorGroup.go +++ b/service/chimesdkvoice/api_op_CreateVoiceConnectorGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateVoiceConnectorGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateVoiceProfile.go b/service/chimesdkvoice/api_op_CreateVoiceProfile.go index bffa0b8ff67..af962da4e86 100644 --- a/service/chimesdkvoice/api_op_CreateVoiceProfile.go +++ b/service/chimesdkvoice/api_op_CreateVoiceProfile.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateVoiceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_CreateVoiceProfileDomain.go b/service/chimesdkvoice/api_op_CreateVoiceProfileDomain.go index 298622602ad..42177caef76 100644 --- a/service/chimesdkvoice/api_op_CreateVoiceProfileDomain.go +++ b/service/chimesdkvoice/api_op_CreateVoiceProfileDomain.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateVoiceProfileDomainMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceProfileDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeletePhoneNumber.go b/service/chimesdkvoice/api_op_DeletePhoneNumber.go index d86e84fdf5c..35d8769a6e6 100644 --- a/service/chimesdkvoice/api_op_DeletePhoneNumber.go +++ b/service/chimesdkvoice/api_op_DeletePhoneNumber.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteProxySession.go b/service/chimesdkvoice/api_op_DeleteProxySession.go index 0e9bf89216a..1d1961173b8 100644 --- a/service/chimesdkvoice/api_op_DeleteProxySession.go +++ b/service/chimesdkvoice/api_op_DeleteProxySession.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteProxySessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteSipMediaApplication.go b/service/chimesdkvoice/api_op_DeleteSipMediaApplication.go index daedce96c77..5a39df400cb 100644 --- a/service/chimesdkvoice/api_op_DeleteSipMediaApplication.go +++ b/service/chimesdkvoice/api_op_DeleteSipMediaApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSipMediaApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteSipRule.go b/service/chimesdkvoice/api_op_DeleteSipRule.go index 4f92772313f..55e3d4ea8b6 100644 --- a/service/chimesdkvoice/api_op_DeleteSipRule.go +++ b/service/chimesdkvoice/api_op_DeleteSipRule.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSipRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnector.go b/service/chimesdkvoice/api_op_DeleteVoiceConnector.go index f68bb9d1551..baf9304e389 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnector.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnector.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteVoiceConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go index 2612b3c06e3..43bcb7bdef4 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteVoiceConnectorEmergencyCallingConfigurationMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorGroup.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorGroup.go index d443ec34e1c..064097fca64 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorGroup.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteVoiceConnectorGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorOrigination.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorOrigination.go index c78eb2935ab..5b4507e7cd2 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorOrigination.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorOrigination.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteVoiceConnectorOriginationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorOriginationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorProxy.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorProxy.go index 18e63a13077..89f1b31e201 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorProxy.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorProxy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteVoiceConnectorProxyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorStreamingConfiguration.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorStreamingConfiguration.go index 6a439d0507c..e5bc288afae 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorStreamingConfiguration.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorStreamingConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteVoiceConnectorStreamingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorTermination.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorTermination.go index 24b6ea7560c..7fce306ab15 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorTermination.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorTermination.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteVoiceConnectorTerminationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorTerminationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceConnectorTerminationCredentials.go b/service/chimesdkvoice/api_op_DeleteVoiceConnectorTerminationCredentials.go index 19fa6b1cd38..b6b7792166c 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceConnectorTerminationCredentials.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceConnectorTerminationCredentials.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteVoiceConnectorTerminationCredentialsMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceProfile.go b/service/chimesdkvoice/api_op_DeleteVoiceProfile.go index 100197b06e5..93ad47c0ff2 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceProfile.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceProfile.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteVoiceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DeleteVoiceProfileDomain.go b/service/chimesdkvoice/api_op_DeleteVoiceProfileDomain.go index ca3f6b83ade..9e45e887240 100644 --- a/service/chimesdkvoice/api_op_DeleteVoiceProfileDomain.go +++ b/service/chimesdkvoice/api_op_DeleteVoiceProfileDomain.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteVoiceProfileDomainMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceProfileDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnector.go b/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnector.go index b3c8caa92eb..e4cf75adea4 100644 --- a/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnector.go +++ b/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnector.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociatePhoneNumbersFromVoiceConnectorMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePhoneNumbersFromVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go b/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go index 1655ab00274..f7b80fb64f6 100644 --- a/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go +++ b/service/chimesdkvoice/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociatePhoneNumbersFromVoiceConnectorGroupMidd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePhoneNumbersFromVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetGlobalSettings.go b/service/chimesdkvoice/api_op_GetGlobalSettings.go index 40b08990f51..37419c2aa6d 100644 --- a/service/chimesdkvoice/api_op_GetGlobalSettings.go +++ b/service/chimesdkvoice/api_op_GetGlobalSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetGlobalSettingsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetPhoneNumber.go b/service/chimesdkvoice/api_op_GetPhoneNumber.go index fc8c3cd20af..e429459cad9 100644 --- a/service/chimesdkvoice/api_op_GetPhoneNumber.go +++ b/service/chimesdkvoice/api_op_GetPhoneNumber.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetPhoneNumberMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetPhoneNumberOrder.go b/service/chimesdkvoice/api_op_GetPhoneNumberOrder.go index 3d20f4bf9a7..8055362d396 100644 --- a/service/chimesdkvoice/api_op_GetPhoneNumberOrder.go +++ b/service/chimesdkvoice/api_op_GetPhoneNumberOrder.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetPhoneNumberOrderMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPhoneNumberOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetPhoneNumberSettings.go b/service/chimesdkvoice/api_op_GetPhoneNumberSettings.go index e83f962930d..f00311377b6 100644 --- a/service/chimesdkvoice/api_op_GetPhoneNumberSettings.go +++ b/service/chimesdkvoice/api_op_GetPhoneNumberSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetPhoneNumberSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPhoneNumberSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetProxySession.go b/service/chimesdkvoice/api_op_GetProxySession.go index 2dc33942e6b..26602f41e78 100644 --- a/service/chimesdkvoice/api_op_GetProxySession.go +++ b/service/chimesdkvoice/api_op_GetProxySession.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetProxySessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetSipMediaApplication.go b/service/chimesdkvoice/api_op_GetSipMediaApplication.go index 93cf8155210..84c6fe556b2 100644 --- a/service/chimesdkvoice/api_op_GetSipMediaApplication.go +++ b/service/chimesdkvoice/api_op_GetSipMediaApplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetSipMediaApplicationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go b/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go index 19353a6e661..00af822e268 100644 --- a/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go +++ b/service/chimesdkvoice/api_op_GetSipMediaApplicationAlexaSkillConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSipMediaApplicationAlexaSkillConfigurationMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipMediaApplicationAlexaSkillConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetSipMediaApplicationLoggingConfiguration.go b/service/chimesdkvoice/api_op_GetSipMediaApplicationLoggingConfiguration.go index c22c689a729..eab21f6b2ad 100644 --- a/service/chimesdkvoice/api_op_GetSipMediaApplicationLoggingConfiguration.go +++ b/service/chimesdkvoice/api_op_GetSipMediaApplicationLoggingConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetSipMediaApplicationLoggingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipMediaApplicationLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetSipRule.go b/service/chimesdkvoice/api_op_GetSipRule.go index 52ce82c242c..74f5eca8c42 100644 --- a/service/chimesdkvoice/api_op_GetSipRule.go +++ b/service/chimesdkvoice/api_op_GetSipRule.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetSipRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetSpeakerSearchTask.go b/service/chimesdkvoice/api_op_GetSpeakerSearchTask.go index 6f9cd0f9ac7..00dc2d51a6b 100644 --- a/service/chimesdkvoice/api_op_GetSpeakerSearchTask.go +++ b/service/chimesdkvoice/api_op_GetSpeakerSearchTask.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetSpeakerSearchTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSpeakerSearchTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnector.go b/service/chimesdkvoice/api_op_GetVoiceConnector.go index 6638befe6e9..12650602e63 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnector.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnector.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetVoiceConnectorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go b/service/chimesdkvoice/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go index 05edc8ebb2f..1103b3e3981 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetVoiceConnectorEmergencyCallingConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorGroup.go b/service/chimesdkvoice/api_op_GetVoiceConnectorGroup.go index 50d24acd833..33a34b960ba 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorGroup.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorGroup.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetVoiceConnectorGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorLoggingConfiguration.go b/service/chimesdkvoice/api_op_GetVoiceConnectorLoggingConfiguration.go index 2e0786886d3..14237c1247a 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorLoggingConfiguration.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorLoggingConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetVoiceConnectorLoggingConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorOrigination.go b/service/chimesdkvoice/api_op_GetVoiceConnectorOrigination.go index 2408e1ae000..2c64f8e821b 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorOrigination.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorOrigination.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetVoiceConnectorOriginationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorOriginationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorProxy.go b/service/chimesdkvoice/api_op_GetVoiceConnectorProxy.go index 4180813f13a..f2da68b64ad 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorProxy.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorProxy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetVoiceConnectorProxyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorStreamingConfiguration.go b/service/chimesdkvoice/api_op_GetVoiceConnectorStreamingConfiguration.go index 86b1cf5a517..c96877f7ec7 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorStreamingConfiguration.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorStreamingConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetVoiceConnectorStreamingConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorTermination.go b/service/chimesdkvoice/api_op_GetVoiceConnectorTermination.go index b4288448ee4..0f2f468169f 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorTermination.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorTermination.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetVoiceConnectorTerminationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorTerminationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceConnectorTerminationHealth.go b/service/chimesdkvoice/api_op_GetVoiceConnectorTerminationHealth.go index 026f532dbca..57a678c1e48 100644 --- a/service/chimesdkvoice/api_op_GetVoiceConnectorTerminationHealth.go +++ b/service/chimesdkvoice/api_op_GetVoiceConnectorTerminationHealth.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetVoiceConnectorTerminationHealthMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceConnectorTerminationHealthValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceProfile.go b/service/chimesdkvoice/api_op_GetVoiceProfile.go index f98b0507fd1..572bd43a3a3 100644 --- a/service/chimesdkvoice/api_op_GetVoiceProfile.go +++ b/service/chimesdkvoice/api_op_GetVoiceProfile.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetVoiceProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceProfileDomain.go b/service/chimesdkvoice/api_op_GetVoiceProfileDomain.go index e72fe975555..88c8851bfb4 100644 --- a/service/chimesdkvoice/api_op_GetVoiceProfileDomain.go +++ b/service/chimesdkvoice/api_op_GetVoiceProfileDomain.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetVoiceProfileDomainMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceProfileDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_GetVoiceToneAnalysisTask.go b/service/chimesdkvoice/api_op_GetVoiceToneAnalysisTask.go index cfe54a34f7b..44139beba44 100644 --- a/service/chimesdkvoice/api_op_GetVoiceToneAnalysisTask.go +++ b/service/chimesdkvoice/api_op_GetVoiceToneAnalysisTask.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetVoiceToneAnalysisTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceToneAnalysisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_ListAvailableVoiceConnectorRegions.go b/service/chimesdkvoice/api_op_ListAvailableVoiceConnectorRegions.go index f3200565b6e..48e88ac9529 100644 --- a/service/chimesdkvoice/api_op_ListAvailableVoiceConnectorRegions.go +++ b/service/chimesdkvoice/api_op_ListAvailableVoiceConnectorRegions.go @@ -101,6 +101,9 @@ func (c *Client) addOperationListAvailableVoiceConnectorRegionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAvailableVoiceConnectorRegions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_ListPhoneNumberOrders.go b/service/chimesdkvoice/api_op_ListPhoneNumberOrders.go index 8debbe134a0..eb680a1ff28 100644 --- a/service/chimesdkvoice/api_op_ListPhoneNumberOrders.go +++ b/service/chimesdkvoice/api_op_ListPhoneNumberOrders.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListPhoneNumberOrdersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPhoneNumberOrders(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListPhoneNumberOrdersMiddlewares(stack *middleware. return nil } -// ListPhoneNumberOrdersAPIClient is a client that implements the -// ListPhoneNumberOrders operation. -type ListPhoneNumberOrdersAPIClient interface { - ListPhoneNumberOrders(context.Context, *ListPhoneNumberOrdersInput, ...func(*Options)) (*ListPhoneNumberOrdersOutput, error) -} - -var _ ListPhoneNumberOrdersAPIClient = (*Client)(nil) - // ListPhoneNumberOrdersPaginatorOptions is the paginator options for // ListPhoneNumberOrders type ListPhoneNumberOrdersPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListPhoneNumberOrdersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumberOrders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListPhoneNumberOrdersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPhoneNumberOrdersAPIClient is a client that implements the +// ListPhoneNumberOrders operation. +type ListPhoneNumberOrdersAPIClient interface { + ListPhoneNumberOrders(context.Context, *ListPhoneNumberOrdersInput, ...func(*Options)) (*ListPhoneNumberOrdersOutput, error) +} + +var _ ListPhoneNumberOrdersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumberOrders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListPhoneNumbers.go b/service/chimesdkvoice/api_op_ListPhoneNumbers.go index 0db096329ef..ed477847082 100644 --- a/service/chimesdkvoice/api_op_ListPhoneNumbers.go +++ b/service/chimesdkvoice/api_op_ListPhoneNumbers.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListPhoneNumbersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPhoneNumbers(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListPhoneNumbersMiddlewares(stack *middleware.Stack return nil } -// ListPhoneNumbersAPIClient is a client that implements the ListPhoneNumbers -// operation. -type ListPhoneNumbersAPIClient interface { - ListPhoneNumbers(context.Context, *ListPhoneNumbersInput, ...func(*Options)) (*ListPhoneNumbersOutput, error) -} - -var _ ListPhoneNumbersAPIClient = (*Client)(nil) - // ListPhoneNumbersPaginatorOptions is the paginator options for ListPhoneNumbers type ListPhoneNumbersPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -216,6 +211,9 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPhoneNumbersAPIClient is a client that implements the ListPhoneNumbers +// operation. +type ListPhoneNumbersAPIClient interface { + ListPhoneNumbers(context.Context, *ListPhoneNumbersInput, ...func(*Options)) (*ListPhoneNumbersOutput, error) +} + +var _ ListPhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListProxySessions.go b/service/chimesdkvoice/api_op_ListProxySessions.go index 1056eabd73a..3ab59e68195 100644 --- a/service/chimesdkvoice/api_op_ListProxySessions.go +++ b/service/chimesdkvoice/api_op_ListProxySessions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListProxySessionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProxySessionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListProxySessionsMiddlewares(stack *middleware.Stac return nil } -// ListProxySessionsAPIClient is a client that implements the ListProxySessions -// operation. -type ListProxySessionsAPIClient interface { - ListProxySessions(context.Context, *ListProxySessionsInput, ...func(*Options)) (*ListProxySessionsOutput, error) -} - -var _ ListProxySessionsAPIClient = (*Client)(nil) - // ListProxySessionsPaginatorOptions is the paginator options for ListProxySessions type ListProxySessionsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -213,6 +208,9 @@ func (p *ListProxySessionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProxySessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListProxySessionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListProxySessionsAPIClient is a client that implements the ListProxySessions +// operation. +type ListProxySessionsAPIClient interface { + ListProxySessions(context.Context, *ListProxySessionsInput, ...func(*Options)) (*ListProxySessionsOutput, error) +} + +var _ ListProxySessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProxySessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListSipMediaApplications.go b/service/chimesdkvoice/api_op_ListSipMediaApplications.go index fe3a6703674..5c9ea61beb2 100644 --- a/service/chimesdkvoice/api_op_ListSipMediaApplications.go +++ b/service/chimesdkvoice/api_op_ListSipMediaApplications.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListSipMediaApplicationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSipMediaApplications(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListSipMediaApplicationsMiddlewares(stack *middlewa return nil } -// ListSipMediaApplicationsAPIClient is a client that implements the -// ListSipMediaApplications operation. -type ListSipMediaApplicationsAPIClient interface { - ListSipMediaApplications(context.Context, *ListSipMediaApplicationsInput, ...func(*Options)) (*ListSipMediaApplicationsOutput, error) -} - -var _ ListSipMediaApplicationsAPIClient = (*Client)(nil) - // ListSipMediaApplicationsPaginatorOptions is the paginator options for // ListSipMediaApplications type ListSipMediaApplicationsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListSipMediaApplicationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSipMediaApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListSipMediaApplicationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSipMediaApplicationsAPIClient is a client that implements the +// ListSipMediaApplications operation. +type ListSipMediaApplicationsAPIClient interface { + ListSipMediaApplications(context.Context, *ListSipMediaApplicationsInput, ...func(*Options)) (*ListSipMediaApplicationsOutput, error) +} + +var _ ListSipMediaApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSipMediaApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListSipRules.go b/service/chimesdkvoice/api_op_ListSipRules.go index 84951743499..12c4e360773 100644 --- a/service/chimesdkvoice/api_op_ListSipRules.go +++ b/service/chimesdkvoice/api_op_ListSipRules.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListSipRulesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSipRules(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListSipRulesMiddlewares(stack *middleware.Stack, op return nil } -// ListSipRulesAPIClient is a client that implements the ListSipRules operation. -type ListSipRulesAPIClient interface { - ListSipRules(context.Context, *ListSipRulesInput, ...func(*Options)) (*ListSipRulesOutput, error) -} - -var _ ListSipRulesAPIClient = (*Client)(nil) - // ListSipRulesPaginatorOptions is the paginator options for ListSipRules type ListSipRulesPaginatorOptions struct { // The maximum number of results to return in a single call. Defaults to 100. @@ -204,6 +200,9 @@ func (p *ListSipRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSipRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListSipRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSipRulesAPIClient is a client that implements the ListSipRules operation. +type ListSipRulesAPIClient interface { + ListSipRules(context.Context, *ListSipRulesInput, ...func(*Options)) (*ListSipRulesOutput, error) +} + +var _ ListSipRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSipRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListSupportedPhoneNumberCountries.go b/service/chimesdkvoice/api_op_ListSupportedPhoneNumberCountries.go index 8ecef3cf4a1..d767c623167 100644 --- a/service/chimesdkvoice/api_op_ListSupportedPhoneNumberCountries.go +++ b/service/chimesdkvoice/api_op_ListSupportedPhoneNumberCountries.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListSupportedPhoneNumberCountriesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSupportedPhoneNumberCountriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_ListTagsForResource.go b/service/chimesdkvoice/api_op_ListTagsForResource.go index 26a23e8e403..bc03701bc9e 100644 --- a/service/chimesdkvoice/api_op_ListTagsForResource.go +++ b/service/chimesdkvoice/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_ListVoiceConnectorGroups.go b/service/chimesdkvoice/api_op_ListVoiceConnectorGroups.go index a62827538ca..d00c6e68f54 100644 --- a/service/chimesdkvoice/api_op_ListVoiceConnectorGroups.go +++ b/service/chimesdkvoice/api_op_ListVoiceConnectorGroups.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListVoiceConnectorGroupsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectorGroups(options.Region), middleware.Before); err != nil { return err } @@ -132,14 +135,6 @@ func (c *Client) addOperationListVoiceConnectorGroupsMiddlewares(stack *middlewa return nil } -// ListVoiceConnectorGroupsAPIClient is a client that implements the -// ListVoiceConnectorGroups operation. -type ListVoiceConnectorGroupsAPIClient interface { - ListVoiceConnectorGroups(context.Context, *ListVoiceConnectorGroupsInput, ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) -} - -var _ ListVoiceConnectorGroupsAPIClient = (*Client)(nil) - // ListVoiceConnectorGroupsPaginatorOptions is the paginator options for // ListVoiceConnectorGroups type ListVoiceConnectorGroupsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListVoiceConnectorGroupsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVoiceConnectorGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListVoiceConnectorGroupsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListVoiceConnectorGroupsAPIClient is a client that implements the +// ListVoiceConnectorGroups operation. +type ListVoiceConnectorGroupsAPIClient interface { + ListVoiceConnectorGroups(context.Context, *ListVoiceConnectorGroupsInput, ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) +} + +var _ ListVoiceConnectorGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVoiceConnectorGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListVoiceConnectorTerminationCredentials.go b/service/chimesdkvoice/api_op_ListVoiceConnectorTerminationCredentials.go index 03f5a1f1f11..079abb0bc8d 100644 --- a/service/chimesdkvoice/api_op_ListVoiceConnectorTerminationCredentials.go +++ b/service/chimesdkvoice/api_op_ListVoiceConnectorTerminationCredentials.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListVoiceConnectorTerminationCredentialsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_ListVoiceConnectors.go b/service/chimesdkvoice/api_op_ListVoiceConnectors.go index 28a1958e2f1..ad938905204 100644 --- a/service/chimesdkvoice/api_op_ListVoiceConnectors.go +++ b/service/chimesdkvoice/api_op_ListVoiceConnectors.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListVoiceConnectorsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectors(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListVoiceConnectorsMiddlewares(stack *middleware.St return nil } -// ListVoiceConnectorsAPIClient is a client that implements the -// ListVoiceConnectors operation. -type ListVoiceConnectorsAPIClient interface { - ListVoiceConnectors(context.Context, *ListVoiceConnectorsInput, ...func(*Options)) (*ListVoiceConnectorsOutput, error) -} - -var _ ListVoiceConnectorsAPIClient = (*Client)(nil) - // ListVoiceConnectorsPaginatorOptions is the paginator options for // ListVoiceConnectors type ListVoiceConnectorsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListVoiceConnectorsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVoiceConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListVoiceConnectorsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVoiceConnectorsAPIClient is a client that implements the +// ListVoiceConnectors operation. +type ListVoiceConnectorsAPIClient interface { + ListVoiceConnectors(context.Context, *ListVoiceConnectorsInput, ...func(*Options)) (*ListVoiceConnectorsOutput, error) +} + +var _ ListVoiceConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVoiceConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListVoiceProfileDomains.go b/service/chimesdkvoice/api_op_ListVoiceProfileDomains.go index b379a9a0d93..4a61879b909 100644 --- a/service/chimesdkvoice/api_op_ListVoiceProfileDomains.go +++ b/service/chimesdkvoice/api_op_ListVoiceProfileDomains.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListVoiceProfileDomainsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceProfileDomains(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListVoiceProfileDomainsMiddlewares(stack *middlewar return nil } -// ListVoiceProfileDomainsAPIClient is a client that implements the -// ListVoiceProfileDomains operation. -type ListVoiceProfileDomainsAPIClient interface { - ListVoiceProfileDomains(context.Context, *ListVoiceProfileDomainsInput, ...func(*Options)) (*ListVoiceProfileDomainsOutput, error) -} - -var _ ListVoiceProfileDomainsAPIClient = (*Client)(nil) - // ListVoiceProfileDomainsPaginatorOptions is the paginator options for // ListVoiceProfileDomains type ListVoiceProfileDomainsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListVoiceProfileDomainsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVoiceProfileDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListVoiceProfileDomainsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListVoiceProfileDomainsAPIClient is a client that implements the +// ListVoiceProfileDomains operation. +type ListVoiceProfileDomainsAPIClient interface { + ListVoiceProfileDomains(context.Context, *ListVoiceProfileDomainsInput, ...func(*Options)) (*ListVoiceProfileDomainsOutput, error) +} + +var _ ListVoiceProfileDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVoiceProfileDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_ListVoiceProfiles.go b/service/chimesdkvoice/api_op_ListVoiceProfiles.go index d4ec03c07a1..2b8a1b4661e 100644 --- a/service/chimesdkvoice/api_op_ListVoiceProfiles.go +++ b/service/chimesdkvoice/api_op_ListVoiceProfiles.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListVoiceProfilesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVoiceProfilesValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListVoiceProfilesMiddlewares(stack *middleware.Stac return nil } -// ListVoiceProfilesAPIClient is a client that implements the ListVoiceProfiles -// operation. -type ListVoiceProfilesAPIClient interface { - ListVoiceProfiles(context.Context, *ListVoiceProfilesInput, ...func(*Options)) (*ListVoiceProfilesOutput, error) -} - -var _ ListVoiceProfilesAPIClient = (*Client)(nil) - // ListVoiceProfilesPaginatorOptions is the paginator options for ListVoiceProfiles type ListVoiceProfilesPaginatorOptions struct { // The maximum number of results in the request. @@ -210,6 +205,9 @@ func (p *ListVoiceProfilesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVoiceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListVoiceProfilesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListVoiceProfilesAPIClient is a client that implements the ListVoiceProfiles +// operation. +type ListVoiceProfilesAPIClient interface { + ListVoiceProfiles(context.Context, *ListVoiceProfilesInput, ...func(*Options)) (*ListVoiceProfilesOutput, error) +} + +var _ ListVoiceProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVoiceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go b/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go index 7e9f18f9d8e..392349634ac 100644 --- a/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go +++ b/service/chimesdkvoice/api_op_PutSipMediaApplicationAlexaSkillConfiguration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutSipMediaApplicationAlexaSkillConfigurationMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSipMediaApplicationAlexaSkillConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutSipMediaApplicationLoggingConfiguration.go b/service/chimesdkvoice/api_op_PutSipMediaApplicationLoggingConfiguration.go index f135cdfdf67..80b483d39a3 100644 --- a/service/chimesdkvoice/api_op_PutSipMediaApplicationLoggingConfiguration.go +++ b/service/chimesdkvoice/api_op_PutSipMediaApplicationLoggingConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutSipMediaApplicationLoggingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSipMediaApplicationLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go b/service/chimesdkvoice/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go index 8bb2edfe0c6..006f2465afd 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutVoiceConnectorEmergencyCallingConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorLoggingConfiguration.go b/service/chimesdkvoice/api_op_PutVoiceConnectorLoggingConfiguration.go index 68f0f284c7b..4f6ab669912 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorLoggingConfiguration.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorLoggingConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutVoiceConnectorLoggingConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorOrigination.go b/service/chimesdkvoice/api_op_PutVoiceConnectorOrigination.go index 6bcd0108d18..f0fdb6ab8ec 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorOrigination.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorOrigination.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutVoiceConnectorOriginationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorOriginationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorProxy.go b/service/chimesdkvoice/api_op_PutVoiceConnectorProxy.go index c201ae0d023..cfc1c55085f 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorProxy.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorProxy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutVoiceConnectorProxyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorStreamingConfiguration.go b/service/chimesdkvoice/api_op_PutVoiceConnectorStreamingConfiguration.go index e562dbce578..436e7a1701d 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorStreamingConfiguration.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorStreamingConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutVoiceConnectorStreamingConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorTermination.go b/service/chimesdkvoice/api_op_PutVoiceConnectorTermination.go index f281c1b2e60..35d562a33d4 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorTermination.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorTermination.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutVoiceConnectorTerminationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorTerminationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_PutVoiceConnectorTerminationCredentials.go b/service/chimesdkvoice/api_op_PutVoiceConnectorTerminationCredentials.go index 8a62b77fe75..6c9485a66d0 100644 --- a/service/chimesdkvoice/api_op_PutVoiceConnectorTerminationCredentials.go +++ b/service/chimesdkvoice/api_op_PutVoiceConnectorTerminationCredentials.go @@ -105,6 +105,9 @@ func (c *Client) addOperationPutVoiceConnectorTerminationCredentialsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_RestorePhoneNumber.go b/service/chimesdkvoice/api_op_RestorePhoneNumber.go index bc1c33865ca..32340de6d6d 100644 --- a/service/chimesdkvoice/api_op_RestorePhoneNumber.go +++ b/service/chimesdkvoice/api_op_RestorePhoneNumber.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRestorePhoneNumberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestorePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_SearchAvailablePhoneNumbers.go b/service/chimesdkvoice/api_op_SearchAvailablePhoneNumbers.go index 576029b2e67..fb9147abf97 100644 --- a/service/chimesdkvoice/api_op_SearchAvailablePhoneNumbers.go +++ b/service/chimesdkvoice/api_op_SearchAvailablePhoneNumbers.go @@ -132,6 +132,9 @@ func (c *Client) addOperationSearchAvailablePhoneNumbersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchAvailablePhoneNumbers(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationSearchAvailablePhoneNumbersMiddlewares(stack *middl return nil } -// SearchAvailablePhoneNumbersAPIClient is a client that implements the -// SearchAvailablePhoneNumbers operation. -type SearchAvailablePhoneNumbersAPIClient interface { - SearchAvailablePhoneNumbers(context.Context, *SearchAvailablePhoneNumbersInput, ...func(*Options)) (*SearchAvailablePhoneNumbersOutput, error) -} - -var _ SearchAvailablePhoneNumbersAPIClient = (*Client)(nil) - // SearchAvailablePhoneNumbersPaginatorOptions is the paginator options for // SearchAvailablePhoneNumbers type SearchAvailablePhoneNumbersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchAvailablePhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt return result, nil } +// SearchAvailablePhoneNumbersAPIClient is a client that implements the +// SearchAvailablePhoneNumbers operation. +type SearchAvailablePhoneNumbersAPIClient interface { + SearchAvailablePhoneNumbers(context.Context, *SearchAvailablePhoneNumbersInput, ...func(*Options)) (*SearchAvailablePhoneNumbersOutput, error) +} + +var _ SearchAvailablePhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchAvailablePhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/chimesdkvoice/api_op_StartSpeakerSearchTask.go b/service/chimesdkvoice/api_op_StartSpeakerSearchTask.go index f8a41483669..40f3607a34a 100644 --- a/service/chimesdkvoice/api_op_StartSpeakerSearchTask.go +++ b/service/chimesdkvoice/api_op_StartSpeakerSearchTask.go @@ -129,6 +129,9 @@ func (c *Client) addOperationStartSpeakerSearchTaskMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSpeakerSearchTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_StartVoiceToneAnalysisTask.go b/service/chimesdkvoice/api_op_StartVoiceToneAnalysisTask.go index 3f5014165ae..fad79b696dd 100644 --- a/service/chimesdkvoice/api_op_StartVoiceToneAnalysisTask.go +++ b/service/chimesdkvoice/api_op_StartVoiceToneAnalysisTask.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartVoiceToneAnalysisTaskMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartVoiceToneAnalysisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_StopSpeakerSearchTask.go b/service/chimesdkvoice/api_op_StopSpeakerSearchTask.go index 940647e1c7f..f88fa70d04c 100644 --- a/service/chimesdkvoice/api_op_StopSpeakerSearchTask.go +++ b/service/chimesdkvoice/api_op_StopSpeakerSearchTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopSpeakerSearchTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSpeakerSearchTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_StopVoiceToneAnalysisTask.go b/service/chimesdkvoice/api_op_StopVoiceToneAnalysisTask.go index ba5346a9833..b9fb9290709 100644 --- a/service/chimesdkvoice/api_op_StopVoiceToneAnalysisTask.go +++ b/service/chimesdkvoice/api_op_StopVoiceToneAnalysisTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopVoiceToneAnalysisTaskMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopVoiceToneAnalysisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_TagResource.go b/service/chimesdkvoice/api_op_TagResource.go index 3b7fc684131..4c72d3461dc 100644 --- a/service/chimesdkvoice/api_op_TagResource.go +++ b/service/chimesdkvoice/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UntagResource.go b/service/chimesdkvoice/api_op_UntagResource.go index bc03406489f..7e9f16a0ba5 100644 --- a/service/chimesdkvoice/api_op_UntagResource.go +++ b/service/chimesdkvoice/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateGlobalSettings.go b/service/chimesdkvoice/api_op_UpdateGlobalSettings.go index dd12853cee5..f52325fba4f 100644 --- a/service/chimesdkvoice/api_op_UpdateGlobalSettings.go +++ b/service/chimesdkvoice/api_op_UpdateGlobalSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationUpdateGlobalSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdatePhoneNumber.go b/service/chimesdkvoice/api_op_UpdatePhoneNumber.go index 9cf31c3c5b1..7cf4a1be5d8 100644 --- a/service/chimesdkvoice/api_op_UpdatePhoneNumber.go +++ b/service/chimesdkvoice/api_op_UpdatePhoneNumber.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdatePhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdatePhoneNumberSettings.go b/service/chimesdkvoice/api_op_UpdatePhoneNumberSettings.go index 5f299101ef0..6855e4cccf9 100644 --- a/service/chimesdkvoice/api_op_UpdatePhoneNumberSettings.go +++ b/service/chimesdkvoice/api_op_UpdatePhoneNumberSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdatePhoneNumberSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePhoneNumberSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateProxySession.go b/service/chimesdkvoice/api_op_UpdateProxySession.go index 7afe8c20b33..49cafc65772 100644 --- a/service/chimesdkvoice/api_op_UpdateProxySession.go +++ b/service/chimesdkvoice/api_op_UpdateProxySession.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateProxySessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProxySessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateSipMediaApplication.go b/service/chimesdkvoice/api_op_UpdateSipMediaApplication.go index eab1c1f62eb..c687184c94b 100644 --- a/service/chimesdkvoice/api_op_UpdateSipMediaApplication.go +++ b/service/chimesdkvoice/api_op_UpdateSipMediaApplication.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateSipMediaApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSipMediaApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateSipMediaApplicationCall.go b/service/chimesdkvoice/api_op_UpdateSipMediaApplicationCall.go index eb5a9f7d78a..6cbcfb485ca 100644 --- a/service/chimesdkvoice/api_op_UpdateSipMediaApplicationCall.go +++ b/service/chimesdkvoice/api_op_UpdateSipMediaApplicationCall.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateSipMediaApplicationCallMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSipMediaApplicationCallValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateSipRule.go b/service/chimesdkvoice/api_op_UpdateSipRule.go index 4a65de7feae..a33fbce2b7e 100644 --- a/service/chimesdkvoice/api_op_UpdateSipRule.go +++ b/service/chimesdkvoice/api_op_UpdateSipRule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateSipRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSipRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateVoiceConnector.go b/service/chimesdkvoice/api_op_UpdateVoiceConnector.go index 0deec393f0b..442642a40ac 100644 --- a/service/chimesdkvoice/api_op_UpdateVoiceConnector.go +++ b/service/chimesdkvoice/api_op_UpdateVoiceConnector.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateVoiceConnectorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateVoiceConnectorGroup.go b/service/chimesdkvoice/api_op_UpdateVoiceConnectorGroup.go index a369f7b6b1f..9bf0cfa8e95 100644 --- a/service/chimesdkvoice/api_op_UpdateVoiceConnectorGroup.go +++ b/service/chimesdkvoice/api_op_UpdateVoiceConnectorGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateVoiceConnectorGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceConnectorGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateVoiceProfile.go b/service/chimesdkvoice/api_op_UpdateVoiceProfile.go index 5aed7d1e085..14c3b7d72e0 100644 --- a/service/chimesdkvoice/api_op_UpdateVoiceProfile.go +++ b/service/chimesdkvoice/api_op_UpdateVoiceProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateVoiceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_UpdateVoiceProfileDomain.go b/service/chimesdkvoice/api_op_UpdateVoiceProfileDomain.go index e833379cbc9..6981810c040 100644 --- a/service/chimesdkvoice/api_op_UpdateVoiceProfileDomain.go +++ b/service/chimesdkvoice/api_op_UpdateVoiceProfileDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateVoiceProfileDomainMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceProfileDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/chimesdkvoice/api_op_ValidateE911Address.go b/service/chimesdkvoice/api_op_ValidateE911Address.go index 1a9454eed4a..9df46709b20 100644 --- a/service/chimesdkvoice/api_op_ValidateE911Address.go +++ b/service/chimesdkvoice/api_op_ValidateE911Address.go @@ -150,6 +150,9 @@ func (c *Client) addOperationValidateE911AddressMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateE911AddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_client.go b/service/cleanrooms/api_client.go index b9f414da6b3..c812f35f709 100644 --- a/service/cleanrooms/api_client.go +++ b/service/cleanrooms/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cleanrooms/api_op_BatchGetCollaborationAnalysisTemplate.go b/service/cleanrooms/api_op_BatchGetCollaborationAnalysisTemplate.go index adba396801f..065a4af2140 100644 --- a/service/cleanrooms/api_op_BatchGetCollaborationAnalysisTemplate.go +++ b/service/cleanrooms/api_op_BatchGetCollaborationAnalysisTemplate.go @@ -123,6 +123,9 @@ func (c *Client) addOperationBatchGetCollaborationAnalysisTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetCollaborationAnalysisTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_BatchGetSchema.go b/service/cleanrooms/api_op_BatchGetSchema.go index 77ab0c0034f..08d7ba9cfde 100644 --- a/service/cleanrooms/api_op_BatchGetSchema.go +++ b/service/cleanrooms/api_op_BatchGetSchema.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchGetSchemaMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_BatchGetSchemaAnalysisRule.go b/service/cleanrooms/api_op_BatchGetSchemaAnalysisRule.go index a8edc2f5250..6c93cf4c0e9 100644 --- a/service/cleanrooms/api_op_BatchGetSchemaAnalysisRule.go +++ b/service/cleanrooms/api_op_BatchGetSchemaAnalysisRule.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchGetSchemaAnalysisRuleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetSchemaAnalysisRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateAnalysisTemplate.go b/service/cleanrooms/api_op_CreateAnalysisTemplate.go index d7803b4e712..92ec04986d2 100644 --- a/service/cleanrooms/api_op_CreateAnalysisTemplate.go +++ b/service/cleanrooms/api_op_CreateAnalysisTemplate.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateAnalysisTemplateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAnalysisTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateCollaboration.go b/service/cleanrooms/api_op_CreateCollaboration.go index f47a7effc42..98d4d1dad46 100644 --- a/service/cleanrooms/api_op_CreateCollaboration.go +++ b/service/cleanrooms/api_op_CreateCollaboration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateCollaborationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCollaborationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateConfiguredAudienceModelAssociation.go b/service/cleanrooms/api_op_CreateConfiguredAudienceModelAssociation.go index 8e93c28dd4c..3f3d7aa97fa 100644 --- a/service/cleanrooms/api_op_CreateConfiguredAudienceModelAssociation.go +++ b/service/cleanrooms/api_op_CreateConfiguredAudienceModelAssociation.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateConfiguredAudienceModelAssociationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfiguredAudienceModelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateConfiguredTable.go b/service/cleanrooms/api_op_CreateConfiguredTable.go index 450a701d161..ecd61161554 100644 --- a/service/cleanrooms/api_op_CreateConfiguredTable.go +++ b/service/cleanrooms/api_op_CreateConfiguredTable.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateConfiguredTableMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfiguredTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateConfiguredTableAnalysisRule.go b/service/cleanrooms/api_op_CreateConfiguredTableAnalysisRule.go index b1398373667..491d6ba7441 100644 --- a/service/cleanrooms/api_op_CreateConfiguredTableAnalysisRule.go +++ b/service/cleanrooms/api_op_CreateConfiguredTableAnalysisRule.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateConfiguredTableAnalysisRuleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfiguredTableAnalysisRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go b/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go index 35178a7029f..4f5e8182a7b 100644 --- a/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go +++ b/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateConfiguredTableAssociationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfiguredTableAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreateMembership.go b/service/cleanrooms/api_op_CreateMembership.go index 35419f70d89..b21f0a05c65 100644 --- a/service/cleanrooms/api_op_CreateMembership.go +++ b/service/cleanrooms/api_op_CreateMembership.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateMembershipMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_CreatePrivacyBudgetTemplate.go b/service/cleanrooms/api_op_CreatePrivacyBudgetTemplate.go index c4c245a0b3a..ecf4857fc40 100644 --- a/service/cleanrooms/api_op_CreatePrivacyBudgetTemplate.go +++ b/service/cleanrooms/api_op_CreatePrivacyBudgetTemplate.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreatePrivacyBudgetTemplateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePrivacyBudgetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteAnalysisTemplate.go b/service/cleanrooms/api_op_DeleteAnalysisTemplate.go index 5fe6b0c3267..c133f739833 100644 --- a/service/cleanrooms/api_op_DeleteAnalysisTemplate.go +++ b/service/cleanrooms/api_op_DeleteAnalysisTemplate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAnalysisTemplateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnalysisTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteCollaboration.go b/service/cleanrooms/api_op_DeleteCollaboration.go index 52c745d3e9d..4a0bc3a8fa9 100644 --- a/service/cleanrooms/api_op_DeleteCollaboration.go +++ b/service/cleanrooms/api_op_DeleteCollaboration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCollaborationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCollaborationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteConfiguredAudienceModelAssociation.go b/service/cleanrooms/api_op_DeleteConfiguredAudienceModelAssociation.go index dec1f0dd47b..1c63e8d4172 100644 --- a/service/cleanrooms/api_op_DeleteConfiguredAudienceModelAssociation.go +++ b/service/cleanrooms/api_op_DeleteConfiguredAudienceModelAssociation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteConfiguredAudienceModelAssociationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfiguredAudienceModelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteConfiguredTable.go b/service/cleanrooms/api_op_DeleteConfiguredTable.go index 4b4137a17b8..c1b0056269c 100644 --- a/service/cleanrooms/api_op_DeleteConfiguredTable.go +++ b/service/cleanrooms/api_op_DeleteConfiguredTable.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteConfiguredTableMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfiguredTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteConfiguredTableAnalysisRule.go b/service/cleanrooms/api_op_DeleteConfiguredTableAnalysisRule.go index a38677cf4ab..8bf856d6089 100644 --- a/service/cleanrooms/api_op_DeleteConfiguredTableAnalysisRule.go +++ b/service/cleanrooms/api_op_DeleteConfiguredTableAnalysisRule.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConfiguredTableAnalysisRuleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfiguredTableAnalysisRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteConfiguredTableAssociation.go b/service/cleanrooms/api_op_DeleteConfiguredTableAssociation.go index 68be63a57f0..ae40e866ce4 100644 --- a/service/cleanrooms/api_op_DeleteConfiguredTableAssociation.go +++ b/service/cleanrooms/api_op_DeleteConfiguredTableAssociation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteConfiguredTableAssociationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfiguredTableAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteMember.go b/service/cleanrooms/api_op_DeleteMember.go index e49637ea047..819a0b81fcb 100644 --- a/service/cleanrooms/api_op_DeleteMember.go +++ b/service/cleanrooms/api_op_DeleteMember.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteMemberMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeleteMembership.go b/service/cleanrooms/api_op_DeleteMembership.go index 9b81cd7c70b..07f591b22c1 100644 --- a/service/cleanrooms/api_op_DeleteMembership.go +++ b/service/cleanrooms/api_op_DeleteMembership.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteMembershipMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_DeletePrivacyBudgetTemplate.go b/service/cleanrooms/api_op_DeletePrivacyBudgetTemplate.go index 9f667d9f3aa..055a4ad53cf 100644 --- a/service/cleanrooms/api_op_DeletePrivacyBudgetTemplate.go +++ b/service/cleanrooms/api_op_DeletePrivacyBudgetTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeletePrivacyBudgetTemplateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePrivacyBudgetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetAnalysisTemplate.go b/service/cleanrooms/api_op_GetAnalysisTemplate.go index 67306ebd701..e11f5da1999 100644 --- a/service/cleanrooms/api_op_GetAnalysisTemplate.go +++ b/service/cleanrooms/api_op_GetAnalysisTemplate.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetAnalysisTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAnalysisTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetCollaboration.go b/service/cleanrooms/api_op_GetCollaboration.go index ebcc1544172..3e41d949243 100644 --- a/service/cleanrooms/api_op_GetCollaboration.go +++ b/service/cleanrooms/api_op_GetCollaboration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetCollaborationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCollaborationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetCollaborationAnalysisTemplate.go b/service/cleanrooms/api_op_GetCollaborationAnalysisTemplate.go index d73509490ba..69c5cd176dd 100644 --- a/service/cleanrooms/api_op_GetCollaborationAnalysisTemplate.go +++ b/service/cleanrooms/api_op_GetCollaborationAnalysisTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetCollaborationAnalysisTemplateMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCollaborationAnalysisTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetCollaborationConfiguredAudienceModelAssociation.go b/service/cleanrooms/api_op_GetCollaborationConfiguredAudienceModelAssociation.go index 548c298e324..1ab754782d0 100644 --- a/service/cleanrooms/api_op_GetCollaborationConfiguredAudienceModelAssociation.go +++ b/service/cleanrooms/api_op_GetCollaborationConfiguredAudienceModelAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetCollaborationConfiguredAudienceModelAssociationM if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCollaborationConfiguredAudienceModelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetCollaborationPrivacyBudgetTemplate.go b/service/cleanrooms/api_op_GetCollaborationPrivacyBudgetTemplate.go index d543b0f2be9..6248b5901d4 100644 --- a/service/cleanrooms/api_op_GetCollaborationPrivacyBudgetTemplate.go +++ b/service/cleanrooms/api_op_GetCollaborationPrivacyBudgetTemplate.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetCollaborationPrivacyBudgetTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCollaborationPrivacyBudgetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetConfiguredAudienceModelAssociation.go b/service/cleanrooms/api_op_GetConfiguredAudienceModelAssociation.go index 54035c4b450..1899be8daf5 100644 --- a/service/cleanrooms/api_op_GetConfiguredAudienceModelAssociation.go +++ b/service/cleanrooms/api_op_GetConfiguredAudienceModelAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetConfiguredAudienceModelAssociationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfiguredAudienceModelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetConfiguredTable.go b/service/cleanrooms/api_op_GetConfiguredTable.go index 188e0f8561f..82aaa374535 100644 --- a/service/cleanrooms/api_op_GetConfiguredTable.go +++ b/service/cleanrooms/api_op_GetConfiguredTable.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetConfiguredTableMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfiguredTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetConfiguredTableAnalysisRule.go b/service/cleanrooms/api_op_GetConfiguredTableAnalysisRule.go index 143271d4fce..4a16070336b 100644 --- a/service/cleanrooms/api_op_GetConfiguredTableAnalysisRule.go +++ b/service/cleanrooms/api_op_GetConfiguredTableAnalysisRule.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetConfiguredTableAnalysisRuleMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfiguredTableAnalysisRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetConfiguredTableAssociation.go b/service/cleanrooms/api_op_GetConfiguredTableAssociation.go index 37b1bcf839c..526a9a214e2 100644 --- a/service/cleanrooms/api_op_GetConfiguredTableAssociation.go +++ b/service/cleanrooms/api_op_GetConfiguredTableAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetConfiguredTableAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfiguredTableAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetMembership.go b/service/cleanrooms/api_op_GetMembership.go index 69d949fc37c..720553afc18 100644 --- a/service/cleanrooms/api_op_GetMembership.go +++ b/service/cleanrooms/api_op_GetMembership.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetMembershipMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetPrivacyBudgetTemplate.go b/service/cleanrooms/api_op_GetPrivacyBudgetTemplate.go index 342d3945248..ecc723714be 100644 --- a/service/cleanrooms/api_op_GetPrivacyBudgetTemplate.go +++ b/service/cleanrooms/api_op_GetPrivacyBudgetTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetPrivacyBudgetTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPrivacyBudgetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetProtectedQuery.go b/service/cleanrooms/api_op_GetProtectedQuery.go index a913558adfa..3fdd35100b3 100644 --- a/service/cleanrooms/api_op_GetProtectedQuery.go +++ b/service/cleanrooms/api_op_GetProtectedQuery.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetProtectedQueryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProtectedQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetSchema.go b/service/cleanrooms/api_op_GetSchema.go index e4359476ad6..27b6d6416c8 100644 --- a/service/cleanrooms/api_op_GetSchema.go +++ b/service/cleanrooms/api_op_GetSchema.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetSchemaMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_GetSchemaAnalysisRule.go b/service/cleanrooms/api_op_GetSchemaAnalysisRule.go index 11b7857c858..aea6092b7e5 100644 --- a/service/cleanrooms/api_op_GetSchemaAnalysisRule.go +++ b/service/cleanrooms/api_op_GetSchemaAnalysisRule.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetSchemaAnalysisRuleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaAnalysisRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_ListAnalysisTemplates.go b/service/cleanrooms/api_op_ListAnalysisTemplates.go index d66bac021a7..b5902340cdd 100644 --- a/service/cleanrooms/api_op_ListAnalysisTemplates.go +++ b/service/cleanrooms/api_op_ListAnalysisTemplates.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAnalysisTemplatesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnalysisTemplatesValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAnalysisTemplatesMiddlewares(stack *middleware. return nil } -// ListAnalysisTemplatesAPIClient is a client that implements the -// ListAnalysisTemplates operation. -type ListAnalysisTemplatesAPIClient interface { - ListAnalysisTemplates(context.Context, *ListAnalysisTemplatesInput, ...func(*Options)) (*ListAnalysisTemplatesOutput, error) -} - -var _ ListAnalysisTemplatesAPIClient = (*Client)(nil) - // ListAnalysisTemplatesPaginatorOptions is the paginator options for // ListAnalysisTemplates type ListAnalysisTemplatesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAnalysisTemplatesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnalysisTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAnalysisTemplatesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAnalysisTemplatesAPIClient is a client that implements the +// ListAnalysisTemplates operation. +type ListAnalysisTemplatesAPIClient interface { + ListAnalysisTemplates(context.Context, *ListAnalysisTemplatesInput, ...func(*Options)) (*ListAnalysisTemplatesOutput, error) +} + +var _ ListAnalysisTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnalysisTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go b/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go index ff5b9f722b0..93ee68f08cb 100644 --- a/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go +++ b/service/cleanrooms/api_op_ListCollaborationAnalysisTemplates.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListCollaborationAnalysisTemplatesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCollaborationAnalysisTemplatesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListCollaborationAnalysisTemplatesMiddlewares(stack return nil } -// ListCollaborationAnalysisTemplatesAPIClient is a client that implements the -// ListCollaborationAnalysisTemplates operation. -type ListCollaborationAnalysisTemplatesAPIClient interface { - ListCollaborationAnalysisTemplates(context.Context, *ListCollaborationAnalysisTemplatesInput, ...func(*Options)) (*ListCollaborationAnalysisTemplatesOutput, error) -} - -var _ ListCollaborationAnalysisTemplatesAPIClient = (*Client)(nil) - // ListCollaborationAnalysisTemplatesPaginatorOptions is the paginator options for // ListCollaborationAnalysisTemplates type ListCollaborationAnalysisTemplatesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListCollaborationAnalysisTemplatesPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollaborationAnalysisTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListCollaborationAnalysisTemplatesPaginator) NextPage(ctx context.Conte return result, nil } +// ListCollaborationAnalysisTemplatesAPIClient is a client that implements the +// ListCollaborationAnalysisTemplates operation. +type ListCollaborationAnalysisTemplatesAPIClient interface { + ListCollaborationAnalysisTemplates(context.Context, *ListCollaborationAnalysisTemplatesInput, ...func(*Options)) (*ListCollaborationAnalysisTemplatesOutput, error) +} + +var _ ListCollaborationAnalysisTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollaborationAnalysisTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go b/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go index b5725f959db..524a59b09f0 100644 --- a/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go +++ b/service/cleanrooms/api_op_ListCollaborationConfiguredAudienceModelAssociations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListCollaborationConfiguredAudienceModelAssociation if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCollaborationConfiguredAudienceModelAssociationsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCollaborationConfiguredAudienceModelAssociation return nil } -// ListCollaborationConfiguredAudienceModelAssociationsAPIClient is a client that -// implements the ListCollaborationConfiguredAudienceModelAssociations operation. -type ListCollaborationConfiguredAudienceModelAssociationsAPIClient interface { - ListCollaborationConfiguredAudienceModelAssociations(context.Context, *ListCollaborationConfiguredAudienceModelAssociationsInput, ...func(*Options)) (*ListCollaborationConfiguredAudienceModelAssociationsOutput, error) -} - -var _ ListCollaborationConfiguredAudienceModelAssociationsAPIClient = (*Client)(nil) - // ListCollaborationConfiguredAudienceModelAssociationsPaginatorOptions is the // paginator options for ListCollaborationConfiguredAudienceModelAssociations type ListCollaborationConfiguredAudienceModelAssociationsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListCollaborationConfiguredAudienceModelAssociationsPaginator) NextPage } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollaborationConfiguredAudienceModelAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListCollaborationConfiguredAudienceModelAssociationsPaginator) NextPage return result, nil } +// ListCollaborationConfiguredAudienceModelAssociationsAPIClient is a client that +// implements the ListCollaborationConfiguredAudienceModelAssociations operation. +type ListCollaborationConfiguredAudienceModelAssociationsAPIClient interface { + ListCollaborationConfiguredAudienceModelAssociations(context.Context, *ListCollaborationConfiguredAudienceModelAssociationsInput, ...func(*Options)) (*ListCollaborationConfiguredAudienceModelAssociationsOutput, error) +} + +var _ ListCollaborationConfiguredAudienceModelAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollaborationConfiguredAudienceModelAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go index e08c33d8571..1dcb2e463d1 100644 --- a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go +++ b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgetTemplates.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetTemplatesMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCollaborationPrivacyBudgetTemplatesValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetTemplatesMiddlewares( return nil } -// ListCollaborationPrivacyBudgetTemplatesAPIClient is a client that implements -// the ListCollaborationPrivacyBudgetTemplates operation. -type ListCollaborationPrivacyBudgetTemplatesAPIClient interface { - ListCollaborationPrivacyBudgetTemplates(context.Context, *ListCollaborationPrivacyBudgetTemplatesInput, ...func(*Options)) (*ListCollaborationPrivacyBudgetTemplatesOutput, error) -} - -var _ ListCollaborationPrivacyBudgetTemplatesAPIClient = (*Client)(nil) - // ListCollaborationPrivacyBudgetTemplatesPaginatorOptions is the paginator // options for ListCollaborationPrivacyBudgetTemplates type ListCollaborationPrivacyBudgetTemplatesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListCollaborationPrivacyBudgetTemplatesPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollaborationPrivacyBudgetTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListCollaborationPrivacyBudgetTemplatesPaginator) NextPage(ctx context. return result, nil } +// ListCollaborationPrivacyBudgetTemplatesAPIClient is a client that implements +// the ListCollaborationPrivacyBudgetTemplates operation. +type ListCollaborationPrivacyBudgetTemplatesAPIClient interface { + ListCollaborationPrivacyBudgetTemplates(context.Context, *ListCollaborationPrivacyBudgetTemplatesInput, ...func(*Options)) (*ListCollaborationPrivacyBudgetTemplatesOutput, error) +} + +var _ ListCollaborationPrivacyBudgetTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollaborationPrivacyBudgetTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go index 270856d3bb5..be36422d526 100644 --- a/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go +++ b/service/cleanrooms/api_op_ListCollaborationPrivacyBudgets.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCollaborationPrivacyBudgetsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListCollaborationPrivacyBudgetsMiddlewares(stack *m return nil } -// ListCollaborationPrivacyBudgetsAPIClient is a client that implements the -// ListCollaborationPrivacyBudgets operation. -type ListCollaborationPrivacyBudgetsAPIClient interface { - ListCollaborationPrivacyBudgets(context.Context, *ListCollaborationPrivacyBudgetsInput, ...func(*Options)) (*ListCollaborationPrivacyBudgetsOutput, error) -} - -var _ ListCollaborationPrivacyBudgetsAPIClient = (*Client)(nil) - // ListCollaborationPrivacyBudgetsPaginatorOptions is the paginator options for // ListCollaborationPrivacyBudgets type ListCollaborationPrivacyBudgetsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListCollaborationPrivacyBudgetsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollaborationPrivacyBudgets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListCollaborationPrivacyBudgetsPaginator) NextPage(ctx context.Context, return result, nil } +// ListCollaborationPrivacyBudgetsAPIClient is a client that implements the +// ListCollaborationPrivacyBudgets operation. +type ListCollaborationPrivacyBudgetsAPIClient interface { + ListCollaborationPrivacyBudgets(context.Context, *ListCollaborationPrivacyBudgetsInput, ...func(*Options)) (*ListCollaborationPrivacyBudgetsOutput, error) +} + +var _ ListCollaborationPrivacyBudgetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollaborationPrivacyBudgets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListCollaborations.go b/service/cleanrooms/api_op_ListCollaborations.go index c707676a464..b8cd4c817df 100644 --- a/service/cleanrooms/api_op_ListCollaborations.go +++ b/service/cleanrooms/api_op_ListCollaborations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListCollaborationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCollaborations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListCollaborationsMiddlewares(stack *middleware.Sta return nil } -// ListCollaborationsAPIClient is a client that implements the ListCollaborations -// operation. -type ListCollaborationsAPIClient interface { - ListCollaborations(context.Context, *ListCollaborationsInput, ...func(*Options)) (*ListCollaborationsOutput, error) -} - -var _ ListCollaborationsAPIClient = (*Client)(nil) - // ListCollaborationsPaginatorOptions is the paginator options for // ListCollaborations type ListCollaborationsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListCollaborationsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollaborations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListCollaborationsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListCollaborationsAPIClient is a client that implements the ListCollaborations +// operation. +type ListCollaborationsAPIClient interface { + ListCollaborations(context.Context, *ListCollaborationsInput, ...func(*Options)) (*ListCollaborationsOutput, error) +} + +var _ ListCollaborationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollaborations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go b/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go index 1b06ba8f2e7..560172d809e 100644 --- a/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go +++ b/service/cleanrooms/api_op_ListConfiguredAudienceModelAssociations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListConfiguredAudienceModelAssociationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConfiguredAudienceModelAssociationsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListConfiguredAudienceModelAssociationsMiddlewares( return nil } -// ListConfiguredAudienceModelAssociationsAPIClient is a client that implements -// the ListConfiguredAudienceModelAssociations operation. -type ListConfiguredAudienceModelAssociationsAPIClient interface { - ListConfiguredAudienceModelAssociations(context.Context, *ListConfiguredAudienceModelAssociationsInput, ...func(*Options)) (*ListConfiguredAudienceModelAssociationsOutput, error) -} - -var _ ListConfiguredAudienceModelAssociationsAPIClient = (*Client)(nil) - // ListConfiguredAudienceModelAssociationsPaginatorOptions is the paginator // options for ListConfiguredAudienceModelAssociations type ListConfiguredAudienceModelAssociationsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListConfiguredAudienceModelAssociationsPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfiguredAudienceModelAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListConfiguredAudienceModelAssociationsPaginator) NextPage(ctx context. return result, nil } +// ListConfiguredAudienceModelAssociationsAPIClient is a client that implements +// the ListConfiguredAudienceModelAssociations operation. +type ListConfiguredAudienceModelAssociationsAPIClient interface { + ListConfiguredAudienceModelAssociations(context.Context, *ListConfiguredAudienceModelAssociationsInput, ...func(*Options)) (*ListConfiguredAudienceModelAssociationsOutput, error) +} + +var _ ListConfiguredAudienceModelAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfiguredAudienceModelAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListConfiguredTableAssociations.go b/service/cleanrooms/api_op_ListConfiguredTableAssociations.go index c01a65ba8c2..7aaeeff37fd 100644 --- a/service/cleanrooms/api_op_ListConfiguredTableAssociations.go +++ b/service/cleanrooms/api_op_ListConfiguredTableAssociations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListConfiguredTableAssociationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConfiguredTableAssociationsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListConfiguredTableAssociationsMiddlewares(stack *m return nil } -// ListConfiguredTableAssociationsAPIClient is a client that implements the -// ListConfiguredTableAssociations operation. -type ListConfiguredTableAssociationsAPIClient interface { - ListConfiguredTableAssociations(context.Context, *ListConfiguredTableAssociationsInput, ...func(*Options)) (*ListConfiguredTableAssociationsOutput, error) -} - -var _ ListConfiguredTableAssociationsAPIClient = (*Client)(nil) - // ListConfiguredTableAssociationsPaginatorOptions is the paginator options for // ListConfiguredTableAssociations type ListConfiguredTableAssociationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListConfiguredTableAssociationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfiguredTableAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListConfiguredTableAssociationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListConfiguredTableAssociationsAPIClient is a client that implements the +// ListConfiguredTableAssociations operation. +type ListConfiguredTableAssociationsAPIClient interface { + ListConfiguredTableAssociations(context.Context, *ListConfiguredTableAssociationsInput, ...func(*Options)) (*ListConfiguredTableAssociationsOutput, error) +} + +var _ ListConfiguredTableAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfiguredTableAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListConfiguredTables.go b/service/cleanrooms/api_op_ListConfiguredTables.go index d45ef2ca2b1..11ac118342a 100644 --- a/service/cleanrooms/api_op_ListConfiguredTables.go +++ b/service/cleanrooms/api_op_ListConfiguredTables.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListConfiguredTablesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfiguredTables(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListConfiguredTablesMiddlewares(stack *middleware.S return nil } -// ListConfiguredTablesAPIClient is a client that implements the -// ListConfiguredTables operation. -type ListConfiguredTablesAPIClient interface { - ListConfiguredTables(context.Context, *ListConfiguredTablesInput, ...func(*Options)) (*ListConfiguredTablesOutput, error) -} - -var _ ListConfiguredTablesAPIClient = (*Client)(nil) - // ListConfiguredTablesPaginatorOptions is the paginator options for // ListConfiguredTables type ListConfiguredTablesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListConfiguredTablesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfiguredTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListConfiguredTablesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListConfiguredTablesAPIClient is a client that implements the +// ListConfiguredTables operation. +type ListConfiguredTablesAPIClient interface { + ListConfiguredTables(context.Context, *ListConfiguredTablesInput, ...func(*Options)) (*ListConfiguredTablesOutput, error) +} + +var _ ListConfiguredTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfiguredTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListMembers.go b/service/cleanrooms/api_op_ListMembers.go index a44ac754562..ea293cca21c 100644 --- a/service/cleanrooms/api_op_ListMembers.go +++ b/service/cleanrooms/api_op_ListMembers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMembersValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // The maximum size of the results that is returned per call. @@ -213,6 +209,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListMemberships.go b/service/cleanrooms/api_op_ListMemberships.go index 3fa28071450..2cf5bad40a9 100644 --- a/service/cleanrooms/api_op_ListMemberships.go +++ b/service/cleanrooms/api_op_ListMemberships.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListMembershipsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMemberships(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListMembershipsMiddlewares(stack *middleware.Stack, return nil } -// ListMembershipsAPIClient is a client that implements the ListMemberships -// operation. -type ListMembershipsAPIClient interface { - ListMemberships(context.Context, *ListMembershipsInput, ...func(*Options)) (*ListMembershipsOutput, error) -} - -var _ ListMembershipsAPIClient = (*Client)(nil) - // ListMembershipsPaginatorOptions is the paginator options for ListMemberships type ListMembershipsPaginatorOptions struct { // The maximum size of the results that is returned per call. @@ -209,6 +204,9 @@ func (p *ListMembershipsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListMembershipsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListMembershipsAPIClient is a client that implements the ListMemberships +// operation. +type ListMembershipsAPIClient interface { + ListMemberships(context.Context, *ListMembershipsInput, ...func(*Options)) (*ListMembershipsOutput, error) +} + +var _ ListMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go b/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go index efc00de1c45..ea30ac18430 100644 --- a/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go +++ b/service/cleanrooms/api_op_ListPrivacyBudgetTemplates.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListPrivacyBudgetTemplatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrivacyBudgetTemplatesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListPrivacyBudgetTemplatesMiddlewares(stack *middle return nil } -// ListPrivacyBudgetTemplatesAPIClient is a client that implements the -// ListPrivacyBudgetTemplates operation. -type ListPrivacyBudgetTemplatesAPIClient interface { - ListPrivacyBudgetTemplates(context.Context, *ListPrivacyBudgetTemplatesInput, ...func(*Options)) (*ListPrivacyBudgetTemplatesOutput, error) -} - -var _ ListPrivacyBudgetTemplatesAPIClient = (*Client)(nil) - // ListPrivacyBudgetTemplatesPaginatorOptions is the paginator options for // ListPrivacyBudgetTemplates type ListPrivacyBudgetTemplatesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListPrivacyBudgetTemplatesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrivacyBudgetTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListPrivacyBudgetTemplatesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPrivacyBudgetTemplatesAPIClient is a client that implements the +// ListPrivacyBudgetTemplates operation. +type ListPrivacyBudgetTemplatesAPIClient interface { + ListPrivacyBudgetTemplates(context.Context, *ListPrivacyBudgetTemplatesInput, ...func(*Options)) (*ListPrivacyBudgetTemplatesOutput, error) +} + +var _ ListPrivacyBudgetTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrivacyBudgetTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListPrivacyBudgets.go b/service/cleanrooms/api_op_ListPrivacyBudgets.go index 9ba82a7b92d..251bbb97256 100644 --- a/service/cleanrooms/api_op_ListPrivacyBudgets.go +++ b/service/cleanrooms/api_op_ListPrivacyBudgets.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListPrivacyBudgetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrivacyBudgetsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListPrivacyBudgetsMiddlewares(stack *middleware.Sta return nil } -// ListPrivacyBudgetsAPIClient is a client that implements the ListPrivacyBudgets -// operation. -type ListPrivacyBudgetsAPIClient interface { - ListPrivacyBudgets(context.Context, *ListPrivacyBudgetsInput, ...func(*Options)) (*ListPrivacyBudgetsOutput, error) -} - -var _ ListPrivacyBudgetsAPIClient = (*Client)(nil) - // ListPrivacyBudgetsPaginatorOptions is the paginator options for // ListPrivacyBudgets type ListPrivacyBudgetsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListPrivacyBudgetsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrivacyBudgets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListPrivacyBudgetsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPrivacyBudgetsAPIClient is a client that implements the ListPrivacyBudgets +// operation. +type ListPrivacyBudgetsAPIClient interface { + ListPrivacyBudgets(context.Context, *ListPrivacyBudgetsInput, ...func(*Options)) (*ListPrivacyBudgetsOutput, error) +} + +var _ ListPrivacyBudgetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrivacyBudgets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListProtectedQueries.go b/service/cleanrooms/api_op_ListProtectedQueries.go index 9a27a2b5611..2a62a6ee867 100644 --- a/service/cleanrooms/api_op_ListProtectedQueries.go +++ b/service/cleanrooms/api_op_ListProtectedQueries.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListProtectedQueriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProtectedQueriesValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListProtectedQueriesMiddlewares(stack *middleware.S return nil } -// ListProtectedQueriesAPIClient is a client that implements the -// ListProtectedQueries operation. -type ListProtectedQueriesAPIClient interface { - ListProtectedQueries(context.Context, *ListProtectedQueriesInput, ...func(*Options)) (*ListProtectedQueriesOutput, error) -} - -var _ ListProtectedQueriesAPIClient = (*Client)(nil) - // ListProtectedQueriesPaginatorOptions is the paginator options for // ListProtectedQueries type ListProtectedQueriesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListProtectedQueriesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProtectedQueries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListProtectedQueriesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListProtectedQueriesAPIClient is a client that implements the +// ListProtectedQueries operation. +type ListProtectedQueriesAPIClient interface { + ListProtectedQueries(context.Context, *ListProtectedQueriesInput, ...func(*Options)) (*ListProtectedQueriesOutput, error) +} + +var _ ListProtectedQueriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProtectedQueries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListSchemas.go b/service/cleanrooms/api_op_ListSchemas.go index a838efb2bac..cbdc6a59623 100644 --- a/service/cleanrooms/api_op_ListSchemas.go +++ b/service/cleanrooms/api_op_ListSchemas.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSchemasValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt return nil } -// ListSchemasAPIClient is a client that implements the ListSchemas operation. -type ListSchemasAPIClient interface { - ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) -} - -var _ ListSchemasAPIClient = (*Client)(nil) - // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { // The maximum size of the results that is returned per call. @@ -218,6 +214,9 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSchemasAPIClient is a client that implements the ListSchemas operation. +type ListSchemasAPIClient interface { + ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) +} + +var _ ListSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanrooms/api_op_ListTagsForResource.go b/service/cleanrooms/api_op_ListTagsForResource.go index 5579beadd9b..262cafd8fa4 100644 --- a/service/cleanrooms/api_op_ListTagsForResource.go +++ b/service/cleanrooms/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_PreviewPrivacyImpact.go b/service/cleanrooms/api_op_PreviewPrivacyImpact.go index d4082ba1444..22fd481dba2 100644 --- a/service/cleanrooms/api_op_PreviewPrivacyImpact.go +++ b/service/cleanrooms/api_op_PreviewPrivacyImpact.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPreviewPrivacyImpactMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPreviewPrivacyImpactValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_StartProtectedQuery.go b/service/cleanrooms/api_op_StartProtectedQuery.go index 62e67cc4e37..59edfaab8b5 100644 --- a/service/cleanrooms/api_op_StartProtectedQuery.go +++ b/service/cleanrooms/api_op_StartProtectedQuery.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStartProtectedQueryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartProtectedQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_TagResource.go b/service/cleanrooms/api_op_TagResource.go index 7a743ffbd7d..f4866c8b309 100644 --- a/service/cleanrooms/api_op_TagResource.go +++ b/service/cleanrooms/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UntagResource.go b/service/cleanrooms/api_op_UntagResource.go index 7eb6beae0f9..ec1bdd20cb2 100644 --- a/service/cleanrooms/api_op_UntagResource.go +++ b/service/cleanrooms/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateAnalysisTemplate.go b/service/cleanrooms/api_op_UpdateAnalysisTemplate.go index a5a52c6efcc..4af245293cf 100644 --- a/service/cleanrooms/api_op_UpdateAnalysisTemplate.go +++ b/service/cleanrooms/api_op_UpdateAnalysisTemplate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateAnalysisTemplateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnalysisTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateCollaboration.go b/service/cleanrooms/api_op_UpdateCollaboration.go index 1792c05cebb..a40416160d5 100644 --- a/service/cleanrooms/api_op_UpdateCollaboration.go +++ b/service/cleanrooms/api_op_UpdateCollaboration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateCollaborationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCollaborationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateConfiguredAudienceModelAssociation.go b/service/cleanrooms/api_op_UpdateConfiguredAudienceModelAssociation.go index d4188ca68eb..c9117eef48e 100644 --- a/service/cleanrooms/api_op_UpdateConfiguredAudienceModelAssociation.go +++ b/service/cleanrooms/api_op_UpdateConfiguredAudienceModelAssociation.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateConfiguredAudienceModelAssociationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfiguredAudienceModelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateConfiguredTable.go b/service/cleanrooms/api_op_UpdateConfiguredTable.go index b400467650c..058109be976 100644 --- a/service/cleanrooms/api_op_UpdateConfiguredTable.go +++ b/service/cleanrooms/api_op_UpdateConfiguredTable.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateConfiguredTableMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfiguredTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateConfiguredTableAnalysisRule.go b/service/cleanrooms/api_op_UpdateConfiguredTableAnalysisRule.go index 631a13f4887..8d43fa888dd 100644 --- a/service/cleanrooms/api_op_UpdateConfiguredTableAnalysisRule.go +++ b/service/cleanrooms/api_op_UpdateConfiguredTableAnalysisRule.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateConfiguredTableAnalysisRuleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfiguredTableAnalysisRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateConfiguredTableAssociation.go b/service/cleanrooms/api_op_UpdateConfiguredTableAssociation.go index 872e11b9464..2ff432ed11e 100644 --- a/service/cleanrooms/api_op_UpdateConfiguredTableAssociation.go +++ b/service/cleanrooms/api_op_UpdateConfiguredTableAssociation.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateConfiguredTableAssociationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfiguredTableAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateMembership.go b/service/cleanrooms/api_op_UpdateMembership.go index 95db4223502..4a75471d782 100644 --- a/service/cleanrooms/api_op_UpdateMembership.go +++ b/service/cleanrooms/api_op_UpdateMembership.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateMembershipMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdatePrivacyBudgetTemplate.go b/service/cleanrooms/api_op_UpdatePrivacyBudgetTemplate.go index 4c495497dd7..70498a762f3 100644 --- a/service/cleanrooms/api_op_UpdatePrivacyBudgetTemplate.go +++ b/service/cleanrooms/api_op_UpdatePrivacyBudgetTemplate.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdatePrivacyBudgetTemplateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePrivacyBudgetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanrooms/api_op_UpdateProtectedQuery.go b/service/cleanrooms/api_op_UpdateProtectedQuery.go index 86691b988a6..3cb0d33407b 100644 --- a/service/cleanrooms/api_op_UpdateProtectedQuery.go +++ b/service/cleanrooms/api_op_UpdateProtectedQuery.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateProtectedQueryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProtectedQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_client.go b/service/cleanroomsml/api_client.go index 18b53b456a0..11d17e8f692 100644 --- a/service/cleanroomsml/api_client.go +++ b/service/cleanroomsml/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cleanroomsml/api_op_CreateAudienceModel.go b/service/cleanroomsml/api_op_CreateAudienceModel.go index ce583200774..2bf4caa5353 100644 --- a/service/cleanroomsml/api_op_CreateAudienceModel.go +++ b/service/cleanroomsml/api_op_CreateAudienceModel.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateAudienceModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_CreateConfiguredAudienceModel.go b/service/cleanroomsml/api_op_CreateConfiguredAudienceModel.go index 9b3967fe8c9..00a6cf4daf9 100644 --- a/service/cleanroomsml/api_op_CreateConfiguredAudienceModel.go +++ b/service/cleanroomsml/api_op_CreateConfiguredAudienceModel.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateConfiguredAudienceModelMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfiguredAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_CreateTrainingDataset.go b/service/cleanroomsml/api_op_CreateTrainingDataset.go index a1174d70b62..fc77680b727 100644 --- a/service/cleanroomsml/api_op_CreateTrainingDataset.go +++ b/service/cleanroomsml/api_op_CreateTrainingDataset.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateTrainingDatasetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrainingDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_DeleteAudienceGenerationJob.go b/service/cleanroomsml/api_op_DeleteAudienceGenerationJob.go index c7880b8ee7d..7ecae867987 100644 --- a/service/cleanroomsml/api_op_DeleteAudienceGenerationJob.go +++ b/service/cleanroomsml/api_op_DeleteAudienceGenerationJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteAudienceGenerationJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAudienceGenerationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_DeleteAudienceModel.go b/service/cleanroomsml/api_op_DeleteAudienceModel.go index 429b586bf5c..a487f0f6d63 100644 --- a/service/cleanroomsml/api_op_DeleteAudienceModel.go +++ b/service/cleanroomsml/api_op_DeleteAudienceModel.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteAudienceModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_DeleteConfiguredAudienceModel.go b/service/cleanroomsml/api_op_DeleteConfiguredAudienceModel.go index 6bc536430c8..e3b779d2ca2 100644 --- a/service/cleanroomsml/api_op_DeleteConfiguredAudienceModel.go +++ b/service/cleanroomsml/api_op_DeleteConfiguredAudienceModel.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteConfiguredAudienceModelMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfiguredAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_DeleteConfiguredAudienceModelPolicy.go b/service/cleanroomsml/api_op_DeleteConfiguredAudienceModelPolicy.go index 40505a48478..0de9f0c5d7e 100644 --- a/service/cleanroomsml/api_op_DeleteConfiguredAudienceModelPolicy.go +++ b/service/cleanroomsml/api_op_DeleteConfiguredAudienceModelPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteConfiguredAudienceModelPolicyMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfiguredAudienceModelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_DeleteTrainingDataset.go b/service/cleanroomsml/api_op_DeleteTrainingDataset.go index b54383912c2..752c86ed6d0 100644 --- a/service/cleanroomsml/api_op_DeleteTrainingDataset.go +++ b/service/cleanroomsml/api_op_DeleteTrainingDataset.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteTrainingDatasetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrainingDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_GetAudienceGenerationJob.go b/service/cleanroomsml/api_op_GetAudienceGenerationJob.go index bb1dea91ba1..83c10a45f56 100644 --- a/service/cleanroomsml/api_op_GetAudienceGenerationJob.go +++ b/service/cleanroomsml/api_op_GetAudienceGenerationJob.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetAudienceGenerationJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAudienceGenerationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_GetAudienceModel.go b/service/cleanroomsml/api_op_GetAudienceModel.go index ee58fa21025..cd3517b3a1d 100644 --- a/service/cleanroomsml/api_op_GetAudienceModel.go +++ b/service/cleanroomsml/api_op_GetAudienceModel.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetAudienceModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_GetConfiguredAudienceModel.go b/service/cleanroomsml/api_op_GetConfiguredAudienceModel.go index 3aec15d03e1..1c8ab8087bf 100644 --- a/service/cleanroomsml/api_op_GetConfiguredAudienceModel.go +++ b/service/cleanroomsml/api_op_GetConfiguredAudienceModel.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetConfiguredAudienceModelMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfiguredAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_GetConfiguredAudienceModelPolicy.go b/service/cleanroomsml/api_op_GetConfiguredAudienceModelPolicy.go index feb2c37bff7..d26467ffa43 100644 --- a/service/cleanroomsml/api_op_GetConfiguredAudienceModelPolicy.go +++ b/service/cleanroomsml/api_op_GetConfiguredAudienceModelPolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetConfiguredAudienceModelPolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfiguredAudienceModelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_GetTrainingDataset.go b/service/cleanroomsml/api_op_GetTrainingDataset.go index 6ebfa0563aa..9b40e065c51 100644 --- a/service/cleanroomsml/api_op_GetTrainingDataset.go +++ b/service/cleanroomsml/api_op_GetTrainingDataset.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetTrainingDatasetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrainingDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_ListAudienceExportJobs.go b/service/cleanroomsml/api_op_ListAudienceExportJobs.go index 6beed61fcd8..050a187effa 100644 --- a/service/cleanroomsml/api_op_ListAudienceExportJobs.go +++ b/service/cleanroomsml/api_op_ListAudienceExportJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAudienceExportJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAudienceExportJobs(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListAudienceExportJobsMiddlewares(stack *middleware return nil } -// ListAudienceExportJobsAPIClient is a client that implements the -// ListAudienceExportJobs operation. -type ListAudienceExportJobsAPIClient interface { - ListAudienceExportJobs(context.Context, *ListAudienceExportJobsInput, ...func(*Options)) (*ListAudienceExportJobsOutput, error) -} - -var _ ListAudienceExportJobsAPIClient = (*Client)(nil) - // ListAudienceExportJobsPaginatorOptions is the paginator options for // ListAudienceExportJobs type ListAudienceExportJobsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListAudienceExportJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAudienceExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListAudienceExportJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAudienceExportJobsAPIClient is a client that implements the +// ListAudienceExportJobs operation. +type ListAudienceExportJobsAPIClient interface { + ListAudienceExportJobs(context.Context, *ListAudienceExportJobsInput, ...func(*Options)) (*ListAudienceExportJobsOutput, error) +} + +var _ ListAudienceExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAudienceExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanroomsml/api_op_ListAudienceGenerationJobs.go b/service/cleanroomsml/api_op_ListAudienceGenerationJobs.go index e9cfdbc3d5e..46f68e56c7b 100644 --- a/service/cleanroomsml/api_op_ListAudienceGenerationJobs.go +++ b/service/cleanroomsml/api_op_ListAudienceGenerationJobs.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAudienceGenerationJobsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAudienceGenerationJobs(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAudienceGenerationJobsMiddlewares(stack *middle return nil } -// ListAudienceGenerationJobsAPIClient is a client that implements the -// ListAudienceGenerationJobs operation. -type ListAudienceGenerationJobsAPIClient interface { - ListAudienceGenerationJobs(context.Context, *ListAudienceGenerationJobsInput, ...func(*Options)) (*ListAudienceGenerationJobsOutput, error) -} - -var _ ListAudienceGenerationJobsAPIClient = (*Client)(nil) - // ListAudienceGenerationJobsPaginatorOptions is the paginator options for // ListAudienceGenerationJobs type ListAudienceGenerationJobsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListAudienceGenerationJobsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAudienceGenerationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListAudienceGenerationJobsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListAudienceGenerationJobsAPIClient is a client that implements the +// ListAudienceGenerationJobs operation. +type ListAudienceGenerationJobsAPIClient interface { + ListAudienceGenerationJobs(context.Context, *ListAudienceGenerationJobsInput, ...func(*Options)) (*ListAudienceGenerationJobsOutput, error) +} + +var _ ListAudienceGenerationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAudienceGenerationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanroomsml/api_op_ListAudienceModels.go b/service/cleanroomsml/api_op_ListAudienceModels.go index b6a6368ff29..5ce236bac1a 100644 --- a/service/cleanroomsml/api_op_ListAudienceModels.go +++ b/service/cleanroomsml/api_op_ListAudienceModels.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListAudienceModelsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAudienceModels(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListAudienceModelsMiddlewares(stack *middleware.Sta return nil } -// ListAudienceModelsAPIClient is a client that implements the ListAudienceModels -// operation. -type ListAudienceModelsAPIClient interface { - ListAudienceModels(context.Context, *ListAudienceModelsInput, ...func(*Options)) (*ListAudienceModelsOutput, error) -} - -var _ ListAudienceModelsAPIClient = (*Client)(nil) - // ListAudienceModelsPaginatorOptions is the paginator options for // ListAudienceModels type ListAudienceModelsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListAudienceModelsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAudienceModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListAudienceModelsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAudienceModelsAPIClient is a client that implements the ListAudienceModels +// operation. +type ListAudienceModelsAPIClient interface { + ListAudienceModels(context.Context, *ListAudienceModelsInput, ...func(*Options)) (*ListAudienceModelsOutput, error) +} + +var _ ListAudienceModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAudienceModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanroomsml/api_op_ListConfiguredAudienceModels.go b/service/cleanroomsml/api_op_ListConfiguredAudienceModels.go index b5b17b75ccc..58a903a8424 100644 --- a/service/cleanroomsml/api_op_ListConfiguredAudienceModels.go +++ b/service/cleanroomsml/api_op_ListConfiguredAudienceModels.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListConfiguredAudienceModelsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfiguredAudienceModels(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListConfiguredAudienceModelsMiddlewares(stack *midd return nil } -// ListConfiguredAudienceModelsAPIClient is a client that implements the -// ListConfiguredAudienceModels operation. -type ListConfiguredAudienceModelsAPIClient interface { - ListConfiguredAudienceModels(context.Context, *ListConfiguredAudienceModelsInput, ...func(*Options)) (*ListConfiguredAudienceModelsOutput, error) -} - -var _ ListConfiguredAudienceModelsAPIClient = (*Client)(nil) - // ListConfiguredAudienceModelsPaginatorOptions is the paginator options for // ListConfiguredAudienceModels type ListConfiguredAudienceModelsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListConfiguredAudienceModelsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfiguredAudienceModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListConfiguredAudienceModelsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListConfiguredAudienceModelsAPIClient is a client that implements the +// ListConfiguredAudienceModels operation. +type ListConfiguredAudienceModelsAPIClient interface { + ListConfiguredAudienceModels(context.Context, *ListConfiguredAudienceModelsInput, ...func(*Options)) (*ListConfiguredAudienceModelsOutput, error) +} + +var _ ListConfiguredAudienceModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfiguredAudienceModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanroomsml/api_op_ListTagsForResource.go b/service/cleanroomsml/api_op_ListTagsForResource.go index cfd9628b98f..8b0c14e5b47 100644 --- a/service/cleanroomsml/api_op_ListTagsForResource.go +++ b/service/cleanroomsml/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_ListTrainingDatasets.go b/service/cleanroomsml/api_op_ListTrainingDatasets.go index 89389edf181..c6afe449f72 100644 --- a/service/cleanroomsml/api_op_ListTrainingDatasets.go +++ b/service/cleanroomsml/api_op_ListTrainingDatasets.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTrainingDatasetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrainingDatasets(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListTrainingDatasetsMiddlewares(stack *middleware.S return nil } -// ListTrainingDatasetsAPIClient is a client that implements the -// ListTrainingDatasets operation. -type ListTrainingDatasetsAPIClient interface { - ListTrainingDatasets(context.Context, *ListTrainingDatasetsInput, ...func(*Options)) (*ListTrainingDatasetsOutput, error) -} - -var _ ListTrainingDatasetsAPIClient = (*Client)(nil) - // ListTrainingDatasetsPaginatorOptions is the paginator options for // ListTrainingDatasets type ListTrainingDatasetsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListTrainingDatasetsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrainingDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListTrainingDatasetsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTrainingDatasetsAPIClient is a client that implements the +// ListTrainingDatasets operation. +type ListTrainingDatasetsAPIClient interface { + ListTrainingDatasets(context.Context, *ListTrainingDatasetsInput, ...func(*Options)) (*ListTrainingDatasetsOutput, error) +} + +var _ ListTrainingDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrainingDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cleanroomsml/api_op_PutConfiguredAudienceModelPolicy.go b/service/cleanroomsml/api_op_PutConfiguredAudienceModelPolicy.go index 6b2d4e102d9..16957e48390 100644 --- a/service/cleanroomsml/api_op_PutConfiguredAudienceModelPolicy.go +++ b/service/cleanroomsml/api_op_PutConfiguredAudienceModelPolicy.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutConfiguredAudienceModelPolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfiguredAudienceModelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_StartAudienceExportJob.go b/service/cleanroomsml/api_op_StartAudienceExportJob.go index ac929c8100d..325e5fb7f4b 100644 --- a/service/cleanroomsml/api_op_StartAudienceExportJob.go +++ b/service/cleanroomsml/api_op_StartAudienceExportJob.go @@ -117,6 +117,9 @@ func (c *Client) addOperationStartAudienceExportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAudienceExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_StartAudienceGenerationJob.go b/service/cleanroomsml/api_op_StartAudienceGenerationJob.go index 770f8031f17..a1488fc91de 100644 --- a/service/cleanroomsml/api_op_StartAudienceGenerationJob.go +++ b/service/cleanroomsml/api_op_StartAudienceGenerationJob.go @@ -158,6 +158,9 @@ func (c *Client) addOperationStartAudienceGenerationJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAudienceGenerationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_TagResource.go b/service/cleanroomsml/api_op_TagResource.go index dbded7d219b..d41d53259cb 100644 --- a/service/cleanroomsml/api_op_TagResource.go +++ b/service/cleanroomsml/api_op_TagResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_UntagResource.go b/service/cleanroomsml/api_op_UntagResource.go index 0f2d0400461..959b59db23e 100644 --- a/service/cleanroomsml/api_op_UntagResource.go +++ b/service/cleanroomsml/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cleanroomsml/api_op_UpdateConfiguredAudienceModel.go b/service/cleanroomsml/api_op_UpdateConfiguredAudienceModel.go index 37a2f30a8b8..1c8bd75d50f 100644 --- a/service/cleanroomsml/api_op_UpdateConfiguredAudienceModel.go +++ b/service/cleanroomsml/api_op_UpdateConfiguredAudienceModel.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateConfiguredAudienceModelMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfiguredAudienceModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_client.go b/service/cloud9/api_client.go index 3e0d464cc2a..bab54a89fc0 100644 --- a/service/cloud9/api_client.go +++ b/service/cloud9/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloud9/api_op_CreateEnvironmentEC2.go b/service/cloud9/api_op_CreateEnvironmentEC2.go index 229e9110dc1..690f140d1a1 100644 --- a/service/cloud9/api_op_CreateEnvironmentEC2.go +++ b/service/cloud9/api_op_CreateEnvironmentEC2.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateEnvironmentEC2Middlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentEC2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_CreateEnvironmentMembership.go b/service/cloud9/api_op_CreateEnvironmentMembership.go index 37dafa5756e..375a05ecf67 100644 --- a/service/cloud9/api_op_CreateEnvironmentMembership.go +++ b/service/cloud9/api_op_CreateEnvironmentMembership.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateEnvironmentMembershipMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_DeleteEnvironment.go b/service/cloud9/api_op_DeleteEnvironment.go index aaf2d319ba7..426a4a23515 100644 --- a/service/cloud9/api_op_DeleteEnvironment.go +++ b/service/cloud9/api_op_DeleteEnvironment.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_DeleteEnvironmentMembership.go b/service/cloud9/api_op_DeleteEnvironmentMembership.go index 74d68f68f54..02a9f0b0968 100644 --- a/service/cloud9/api_op_DeleteEnvironmentMembership.go +++ b/service/cloud9/api_op_DeleteEnvironmentMembership.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEnvironmentMembershipMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_DescribeEnvironmentMemberships.go b/service/cloud9/api_op_DescribeEnvironmentMemberships.go index e346296767c..e6e9c620d27 100644 --- a/service/cloud9/api_op_DescribeEnvironmentMemberships.go +++ b/service/cloud9/api_op_DescribeEnvironmentMemberships.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeEnvironmentMembershipsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEnvironmentMemberships(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeEnvironmentMembershipsMiddlewares(stack *mi return nil } -// DescribeEnvironmentMembershipsAPIClient is a client that implements the -// DescribeEnvironmentMemberships operation. -type DescribeEnvironmentMembershipsAPIClient interface { - DescribeEnvironmentMemberships(context.Context, *DescribeEnvironmentMembershipsInput, ...func(*Options)) (*DescribeEnvironmentMembershipsOutput, error) -} - -var _ DescribeEnvironmentMembershipsAPIClient = (*Client)(nil) - // DescribeEnvironmentMembershipsPaginatorOptions is the paginator options for // DescribeEnvironmentMemberships type DescribeEnvironmentMembershipsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeEnvironmentMembershipsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEnvironmentMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeEnvironmentMembershipsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeEnvironmentMembershipsAPIClient is a client that implements the +// DescribeEnvironmentMemberships operation. +type DescribeEnvironmentMembershipsAPIClient interface { + DescribeEnvironmentMemberships(context.Context, *DescribeEnvironmentMembershipsInput, ...func(*Options)) (*DescribeEnvironmentMembershipsOutput, error) +} + +var _ DescribeEnvironmentMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEnvironmentMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloud9/api_op_DescribeEnvironmentStatus.go b/service/cloud9/api_op_DescribeEnvironmentStatus.go index 6dfd0f3ea64..fae723175f4 100644 --- a/service/cloud9/api_op_DescribeEnvironmentStatus.go +++ b/service/cloud9/api_op_DescribeEnvironmentStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeEnvironmentStatusMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEnvironmentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_DescribeEnvironments.go b/service/cloud9/api_op_DescribeEnvironments.go index 8a9ca0dcf3a..fe40413df21 100644 --- a/service/cloud9/api_op_DescribeEnvironments.go +++ b/service/cloud9/api_op_DescribeEnvironments.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeEnvironmentsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEnvironmentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_ListEnvironments.go b/service/cloud9/api_op_ListEnvironments.go index 3336e1cd4b2..bbd866008a1 100644 --- a/service/cloud9/api_op_ListEnvironments.go +++ b/service/cloud9/api_op_ListEnvironments.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironments(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of environments to get identifiers for. @@ -209,6 +204,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloud9/api_op_ListTagsForResource.go b/service/cloud9/api_op_ListTagsForResource.go index 8db5c2c253f..a776d2842ee 100644 --- a/service/cloud9/api_op_ListTagsForResource.go +++ b/service/cloud9/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_TagResource.go b/service/cloud9/api_op_TagResource.go index 5dca5a30fb4..7b94b13f6bf 100644 --- a/service/cloud9/api_op_TagResource.go +++ b/service/cloud9/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_UntagResource.go b/service/cloud9/api_op_UntagResource.go index 4aa34df7b38..1045c27dabd 100644 --- a/service/cloud9/api_op_UntagResource.go +++ b/service/cloud9/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_UpdateEnvironment.go b/service/cloud9/api_op_UpdateEnvironment.go index 59aae43a146..fd734cd7743 100644 --- a/service/cloud9/api_op_UpdateEnvironment.go +++ b/service/cloud9/api_op_UpdateEnvironment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloud9/api_op_UpdateEnvironmentMembership.go b/service/cloud9/api_op_UpdateEnvironmentMembership.go index f09db929c48..953beb6cab5 100644 --- a/service/cloud9/api_op_UpdateEnvironmentMembership.go +++ b/service/cloud9/api_op_UpdateEnvironmentMembership.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateEnvironmentMembershipMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudcontrol/api_client.go b/service/cloudcontrol/api_client.go index 5ed287aac24..920a68080e7 100644 --- a/service/cloudcontrol/api_client.go +++ b/service/cloudcontrol/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/cloudcontrol/api_op_CancelResourceRequest.go b/service/cloudcontrol/api_op_CancelResourceRequest.go index ae15f68e4b7..a27efcb0f5f 100644 --- a/service/cloudcontrol/api_op_CancelResourceRequest.go +++ b/service/cloudcontrol/api_op_CancelResourceRequest.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCancelResourceRequestMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelResourceRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudcontrol/api_op_CreateResource.go b/service/cloudcontrol/api_op_CreateResource.go index 8138b2a2778..5841e533bb4 100644 --- a/service/cloudcontrol/api_op_CreateResource.go +++ b/service/cloudcontrol/api_op_CreateResource.go @@ -182,6 +182,9 @@ func (c *Client) addOperationCreateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateResourceMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudcontrol/api_op_DeleteResource.go b/service/cloudcontrol/api_op_DeleteResource.go index 34485dd8e0b..2320b753d9b 100644 --- a/service/cloudcontrol/api_op_DeleteResource.go +++ b/service/cloudcontrol/api_op_DeleteResource.go @@ -179,6 +179,9 @@ func (c *Client) addOperationDeleteResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteResourceMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudcontrol/api_op_GetResource.go b/service/cloudcontrol/api_op_GetResource.go index 9252f470adc..893d1c8b4ef 100644 --- a/service/cloudcontrol/api_op_GetResource.go +++ b/service/cloudcontrol/api_op_GetResource.go @@ -157,6 +157,9 @@ func (c *Client) addOperationGetResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudcontrol/api_op_GetResourceRequestStatus.go b/service/cloudcontrol/api_op_GetResourceRequestStatus.go index 581b5ff4f2d..72105dcaf82 100644 --- a/service/cloudcontrol/api_op_GetResourceRequestStatus.go +++ b/service/cloudcontrol/api_op_GetResourceRequestStatus.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetResourceRequestStatusMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceRequestStatusValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationGetResourceRequestStatusMiddlewares(stack *middlewa return nil } -// GetResourceRequestStatusAPIClient is a client that implements the -// GetResourceRequestStatus operation. -type GetResourceRequestStatusAPIClient interface { - GetResourceRequestStatus(context.Context, *GetResourceRequestStatusInput, ...func(*Options)) (*GetResourceRequestStatusOutput, error) -} - -var _ GetResourceRequestStatusAPIClient = (*Client)(nil) - // ResourceRequestSuccessWaiterOptions are waiter options for // ResourceRequestSuccessWaiter type ResourceRequestSuccessWaiterOptions struct { @@ -265,7 +260,13 @@ func (w *ResourceRequestSuccessWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetResourceRequestStatus(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -357,6 +358,14 @@ func resourceRequestSuccessStateRetryable(ctx context.Context, input *GetResourc return true, nil } +// GetResourceRequestStatusAPIClient is a client that implements the +// GetResourceRequestStatus operation. +type GetResourceRequestStatusAPIClient interface { + GetResourceRequestStatus(context.Context, *GetResourceRequestStatusInput, ...func(*Options)) (*GetResourceRequestStatusOutput, error) +} + +var _ GetResourceRequestStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceRequestStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudcontrol/api_op_ListResourceRequests.go b/service/cloudcontrol/api_op_ListResourceRequests.go index 9ea307cf6bf..97838053165 100644 --- a/service/cloudcontrol/api_op_ListResourceRequests.go +++ b/service/cloudcontrol/api_op_ListResourceRequests.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListResourceRequestsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceRequests(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListResourceRequestsMiddlewares(stack *middleware.S return nil } -// ListResourceRequestsAPIClient is a client that implements the -// ListResourceRequests operation. -type ListResourceRequestsAPIClient interface { - ListResourceRequests(context.Context, *ListResourceRequestsInput, ...func(*Options)) (*ListResourceRequestsOutput, error) -} - -var _ ListResourceRequestsAPIClient = (*Client)(nil) - // ListResourceRequestsPaginatorOptions is the paginator options for // ListResourceRequests type ListResourceRequestsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListResourceRequestsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListResourceRequestsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListResourceRequestsAPIClient is a client that implements the +// ListResourceRequests operation. +type ListResourceRequestsAPIClient interface { + ListResourceRequests(context.Context, *ListResourceRequestsInput, ...func(*Options)) (*ListResourceRequestsOutput, error) +} + +var _ ListResourceRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudcontrol/api_op_ListResources.go b/service/cloudcontrol/api_op_ListResources.go index 2b4e779eb03..44b20391a89 100644 --- a/service/cloudcontrol/api_op_ListResources.go +++ b/service/cloudcontrol/api_op_ListResources.go @@ -157,6 +157,9 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesValidationMiddleware(stack); err != nil { return err } @@ -181,13 +184,6 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o return nil } -// ListResourcesAPIClient is a client that implements the ListResources operation. -type ListResourcesAPIClient interface { - ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) -} - -var _ ListResourcesAPIClient = (*Client)(nil) - // ListResourcesPaginatorOptions is the paginator options for ListResources type ListResourcesPaginatorOptions struct { // Reserved. @@ -251,6 +247,9 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +269,13 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListResourcesAPIClient is a client that implements the ListResources operation. +type ListResourcesAPIClient interface { + ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) +} + +var _ ListResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudcontrol/api_op_UpdateResource.go b/service/cloudcontrol/api_op_UpdateResource.go index d9b3d3d3644..cb495b93e7d 100644 --- a/service/cloudcontrol/api_op_UpdateResource.go +++ b/service/cloudcontrol/api_op_UpdateResource.go @@ -197,6 +197,9 @@ func (c *Client) addOperationUpdateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateResourceMiddleware(stack, options); err != nil { return err } diff --git a/service/clouddirectory/api_client.go b/service/clouddirectory/api_client.go index 0ba50408e34..9ab4a0bd700 100644 --- a/service/clouddirectory/api_client.go +++ b/service/clouddirectory/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/clouddirectory/api_op_AddFacetToObject.go b/service/clouddirectory/api_op_AddFacetToObject.go index 52d573a6201..01652730d7a 100644 --- a/service/clouddirectory/api_op_AddFacetToObject.go +++ b/service/clouddirectory/api_op_AddFacetToObject.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAddFacetToObjectMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddFacetToObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_ApplySchema.go b/service/clouddirectory/api_op_ApplySchema.go index 3202ac091ad..c2941fd1550 100644 --- a/service/clouddirectory/api_op_ApplySchema.go +++ b/service/clouddirectory/api_op_ApplySchema.go @@ -118,6 +118,9 @@ func (c *Client) addOperationApplySchemaMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplySchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_AttachObject.go b/service/clouddirectory/api_op_AttachObject.go index 1a0981a0186..ccf048f4e53 100644 --- a/service/clouddirectory/api_op_AttachObject.go +++ b/service/clouddirectory/api_op_AttachObject.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAttachObjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_AttachPolicy.go b/service/clouddirectory/api_op_AttachPolicy.go index 26f078106d7..9bdcccfa279 100644 --- a/service/clouddirectory/api_op_AttachPolicy.go +++ b/service/clouddirectory/api_op_AttachPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_AttachToIndex.go b/service/clouddirectory/api_op_AttachToIndex.go index 92943110d76..b7a8ce7bf0c 100644 --- a/service/clouddirectory/api_op_AttachToIndex.go +++ b/service/clouddirectory/api_op_AttachToIndex.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAttachToIndexMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachToIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_AttachTypedLink.go b/service/clouddirectory/api_op_AttachTypedLink.go index f8e94075255..fa4780bb46a 100644 --- a/service/clouddirectory/api_op_AttachTypedLink.go +++ b/service/clouddirectory/api_op_AttachTypedLink.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAttachTypedLinkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachTypedLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_BatchRead.go b/service/clouddirectory/api_op_BatchRead.go index baee52171f9..5a69b1607a3 100644 --- a/service/clouddirectory/api_op_BatchRead.go +++ b/service/clouddirectory/api_op_BatchRead.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchReadMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchReadValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_BatchWrite.go b/service/clouddirectory/api_op_BatchWrite.go index d29dc19df21..5f969fba8b5 100644 --- a/service/clouddirectory/api_op_BatchWrite.go +++ b/service/clouddirectory/api_op_BatchWrite.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchWriteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchWriteValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_CreateDirectory.go b/service/clouddirectory/api_op_CreateDirectory.go index 61d9725cd21..1522d38320d 100644 --- a/service/clouddirectory/api_op_CreateDirectory.go +++ b/service/clouddirectory/api_op_CreateDirectory.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateDirectoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_CreateFacet.go b/service/clouddirectory/api_op_CreateFacet.go index 9bb6ea0fc18..fca0b005bcf 100644 --- a/service/clouddirectory/api_op_CreateFacet.go +++ b/service/clouddirectory/api_op_CreateFacet.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateFacetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_CreateIndex.go b/service/clouddirectory/api_op_CreateIndex.go index 4359c8598e2..048de41a6fe 100644 --- a/service/clouddirectory/api_op_CreateIndex.go +++ b/service/clouddirectory/api_op_CreateIndex.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_CreateObject.go b/service/clouddirectory/api_op_CreateObject.go index 60ad9ece8ad..ef1e80f1a6e 100644 --- a/service/clouddirectory/api_op_CreateObject.go +++ b/service/clouddirectory/api_op_CreateObject.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateObjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_CreateSchema.go b/service/clouddirectory/api_op_CreateSchema.go index ec33d1a8ac0..a178bc7cf91 100644 --- a/service/clouddirectory/api_op_CreateSchema.go +++ b/service/clouddirectory/api_op_CreateSchema.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_CreateTypedLinkFacet.go b/service/clouddirectory/api_op_CreateTypedLinkFacet.go index 0f654000bc3..e7a73bc2e35 100644 --- a/service/clouddirectory/api_op_CreateTypedLinkFacet.go +++ b/service/clouddirectory/api_op_CreateTypedLinkFacet.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateTypedLinkFacetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTypedLinkFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DeleteDirectory.go b/service/clouddirectory/api_op_DeleteDirectory.go index aa4bbe5555b..a40f2804eed 100644 --- a/service/clouddirectory/api_op_DeleteDirectory.go +++ b/service/clouddirectory/api_op_DeleteDirectory.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDirectoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DeleteFacet.go b/service/clouddirectory/api_op_DeleteFacet.go index ca23b226eb1..102fc8342e3 100644 --- a/service/clouddirectory/api_op_DeleteFacet.go +++ b/service/clouddirectory/api_op_DeleteFacet.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteFacetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DeleteObject.go b/service/clouddirectory/api_op_DeleteObject.go index 30b35c49e3f..34a70d53d68 100644 --- a/service/clouddirectory/api_op_DeleteObject.go +++ b/service/clouddirectory/api_op_DeleteObject.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DeleteSchema.go b/service/clouddirectory/api_op_DeleteSchema.go index d9ec60e9110..22a17f24f8a 100644 --- a/service/clouddirectory/api_op_DeleteSchema.go +++ b/service/clouddirectory/api_op_DeleteSchema.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DeleteTypedLinkFacet.go b/service/clouddirectory/api_op_DeleteTypedLinkFacet.go index 32f5627c8fe..f42b30f711f 100644 --- a/service/clouddirectory/api_op_DeleteTypedLinkFacet.go +++ b/service/clouddirectory/api_op_DeleteTypedLinkFacet.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTypedLinkFacetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTypedLinkFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DetachFromIndex.go b/service/clouddirectory/api_op_DetachFromIndex.go index 746b4634c70..bad78609462 100644 --- a/service/clouddirectory/api_op_DetachFromIndex.go +++ b/service/clouddirectory/api_op_DetachFromIndex.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDetachFromIndexMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachFromIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DetachObject.go b/service/clouddirectory/api_op_DetachObject.go index bfcec7aeae8..eb66dfa58f2 100644 --- a/service/clouddirectory/api_op_DetachObject.go +++ b/service/clouddirectory/api_op_DetachObject.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDetachObjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DetachPolicy.go b/service/clouddirectory/api_op_DetachPolicy.go index 7bbf99c46c1..6e3117ca061 100644 --- a/service/clouddirectory/api_op_DetachPolicy.go +++ b/service/clouddirectory/api_op_DetachPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDetachPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DetachTypedLink.go b/service/clouddirectory/api_op_DetachTypedLink.go index fbaef772b71..21196f18b8d 100644 --- a/service/clouddirectory/api_op_DetachTypedLink.go +++ b/service/clouddirectory/api_op_DetachTypedLink.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDetachTypedLinkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachTypedLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_DisableDirectory.go b/service/clouddirectory/api_op_DisableDirectory.go index e249e25d4c2..b137081f6c4 100644 --- a/service/clouddirectory/api_op_DisableDirectory.go +++ b/service/clouddirectory/api_op_DisableDirectory.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisableDirectoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_EnableDirectory.go b/service/clouddirectory/api_op_EnableDirectory.go index bd4e45cd673..4e111a27a27 100644 --- a/service/clouddirectory/api_op_EnableDirectory.go +++ b/service/clouddirectory/api_op_EnableDirectory.go @@ -108,6 +108,9 @@ func (c *Client) addOperationEnableDirectoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetAppliedSchemaVersion.go b/service/clouddirectory/api_op_GetAppliedSchemaVersion.go index 500d289c9d8..7103212b301 100644 --- a/service/clouddirectory/api_op_GetAppliedSchemaVersion.go +++ b/service/clouddirectory/api_op_GetAppliedSchemaVersion.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAppliedSchemaVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppliedSchemaVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetDirectory.go b/service/clouddirectory/api_op_GetDirectory.go index eea4d5b52c3..3362072aa6d 100644 --- a/service/clouddirectory/api_op_GetDirectory.go +++ b/service/clouddirectory/api_op_GetDirectory.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetDirectoryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetFacet.go b/service/clouddirectory/api_op_GetFacet.go index a3b9dbde3aa..aa7d25a19a6 100644 --- a/service/clouddirectory/api_op_GetFacet.go +++ b/service/clouddirectory/api_op_GetFacet.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetFacetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetLinkAttributes.go b/service/clouddirectory/api_op_GetLinkAttributes.go index 2141a6d89e9..1e6cb2339d5 100644 --- a/service/clouddirectory/api_op_GetLinkAttributes.go +++ b/service/clouddirectory/api_op_GetLinkAttributes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetLinkAttributesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLinkAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetObjectAttributes.go b/service/clouddirectory/api_op_GetObjectAttributes.go index 94e8e4f1917..df67493c117 100644 --- a/service/clouddirectory/api_op_GetObjectAttributes.go +++ b/service/clouddirectory/api_op_GetObjectAttributes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetObjectAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetObjectInformation.go b/service/clouddirectory/api_op_GetObjectInformation.go index ba30a4a55cc..389ef6e2428 100644 --- a/service/clouddirectory/api_op_GetObjectInformation.go +++ b/service/clouddirectory/api_op_GetObjectInformation.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetObjectInformationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetObjectInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetSchemaAsJson.go b/service/clouddirectory/api_op_GetSchemaAsJson.go index 01cfeb78568..feea0c97628 100644 --- a/service/clouddirectory/api_op_GetSchemaAsJson.go +++ b/service/clouddirectory/api_op_GetSchemaAsJson.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSchemaAsJsonMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaAsJsonValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_GetTypedLinkFacetInformation.go b/service/clouddirectory/api_op_GetTypedLinkFacetInformation.go index 934f354357c..36636bf221f 100644 --- a/service/clouddirectory/api_op_GetTypedLinkFacetInformation.go +++ b/service/clouddirectory/api_op_GetTypedLinkFacetInformation.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetTypedLinkFacetInformationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTypedLinkFacetInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_ListAppliedSchemaArns.go b/service/clouddirectory/api_op_ListAppliedSchemaArns.go index c36ccabf6de..d7fa3eb871e 100644 --- a/service/clouddirectory/api_op_ListAppliedSchemaArns.go +++ b/service/clouddirectory/api_op_ListAppliedSchemaArns.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAppliedSchemaArnsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppliedSchemaArnsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAppliedSchemaArnsMiddlewares(stack *middleware. return nil } -// ListAppliedSchemaArnsAPIClient is a client that implements the -// ListAppliedSchemaArns operation. -type ListAppliedSchemaArnsAPIClient interface { - ListAppliedSchemaArns(context.Context, *ListAppliedSchemaArnsInput, ...func(*Options)) (*ListAppliedSchemaArnsOutput, error) -} - -var _ ListAppliedSchemaArnsAPIClient = (*Client)(nil) - // ListAppliedSchemaArnsPaginatorOptions is the paginator options for // ListAppliedSchemaArns type ListAppliedSchemaArnsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAppliedSchemaArnsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppliedSchemaArns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAppliedSchemaArnsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAppliedSchemaArnsAPIClient is a client that implements the +// ListAppliedSchemaArns operation. +type ListAppliedSchemaArnsAPIClient interface { + ListAppliedSchemaArns(context.Context, *ListAppliedSchemaArnsInput, ...func(*Options)) (*ListAppliedSchemaArnsOutput, error) +} + +var _ ListAppliedSchemaArnsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppliedSchemaArns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListAttachedIndices.go b/service/clouddirectory/api_op_ListAttachedIndices.go index 7d029541461..c920d96dc50 100644 --- a/service/clouddirectory/api_op_ListAttachedIndices.go +++ b/service/clouddirectory/api_op_ListAttachedIndices.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListAttachedIndicesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedIndicesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListAttachedIndicesMiddlewares(stack *middleware.St return nil } -// ListAttachedIndicesAPIClient is a client that implements the -// ListAttachedIndices operation. -type ListAttachedIndicesAPIClient interface { - ListAttachedIndices(context.Context, *ListAttachedIndicesInput, ...func(*Options)) (*ListAttachedIndicesOutput, error) -} - -var _ ListAttachedIndicesAPIClient = (*Client)(nil) - // ListAttachedIndicesPaginatorOptions is the paginator options for // ListAttachedIndices type ListAttachedIndicesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListAttachedIndicesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedIndices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListAttachedIndicesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAttachedIndicesAPIClient is a client that implements the +// ListAttachedIndices operation. +type ListAttachedIndicesAPIClient interface { + ListAttachedIndices(context.Context, *ListAttachedIndicesInput, ...func(*Options)) (*ListAttachedIndicesOutput, error) +} + +var _ ListAttachedIndicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedIndices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go b/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go index d897ffa3f9c..1a7e4de55f2 100644 --- a/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go +++ b/service/clouddirectory/api_op_ListDevelopmentSchemaArns.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListDevelopmentSchemaArnsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevelopmentSchemaArns(options.Region), middleware.Before); err != nil { return err } @@ -130,14 +133,6 @@ func (c *Client) addOperationListDevelopmentSchemaArnsMiddlewares(stack *middlew return nil } -// ListDevelopmentSchemaArnsAPIClient is a client that implements the -// ListDevelopmentSchemaArns operation. -type ListDevelopmentSchemaArnsAPIClient interface { - ListDevelopmentSchemaArns(context.Context, *ListDevelopmentSchemaArnsInput, ...func(*Options)) (*ListDevelopmentSchemaArnsOutput, error) -} - -var _ ListDevelopmentSchemaArnsAPIClient = (*Client)(nil) - // ListDevelopmentSchemaArnsPaginatorOptions is the paginator options for // ListDevelopmentSchemaArns type ListDevelopmentSchemaArnsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListDevelopmentSchemaArnsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevelopmentSchemaArns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListDevelopmentSchemaArnsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListDevelopmentSchemaArnsAPIClient is a client that implements the +// ListDevelopmentSchemaArns operation. +type ListDevelopmentSchemaArnsAPIClient interface { + ListDevelopmentSchemaArns(context.Context, *ListDevelopmentSchemaArnsInput, ...func(*Options)) (*ListDevelopmentSchemaArnsOutput, error) +} + +var _ ListDevelopmentSchemaArnsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevelopmentSchemaArns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListDirectories.go b/service/clouddirectory/api_op_ListDirectories.go index 6c19ef8616d..048de873647 100644 --- a/service/clouddirectory/api_op_ListDirectories.go +++ b/service/clouddirectory/api_op_ListDirectories.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDirectoriesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDirectories(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListDirectoriesMiddlewares(stack *middleware.Stack, return nil } -// ListDirectoriesAPIClient is a client that implements the ListDirectories -// operation. -type ListDirectoriesAPIClient interface { - ListDirectories(context.Context, *ListDirectoriesInput, ...func(*Options)) (*ListDirectoriesOutput, error) -} - -var _ ListDirectoriesAPIClient = (*Client)(nil) - // ListDirectoriesPaginatorOptions is the paginator options for ListDirectories type ListDirectoriesPaginatorOptions struct { // The maximum number of results to retrieve. @@ -209,6 +204,9 @@ func (p *ListDirectoriesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDirectories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListDirectoriesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDirectoriesAPIClient is a client that implements the ListDirectories +// operation. +type ListDirectoriesAPIClient interface { + ListDirectories(context.Context, *ListDirectoriesInput, ...func(*Options)) (*ListDirectoriesOutput, error) +} + +var _ ListDirectoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListFacetAttributes.go b/service/clouddirectory/api_op_ListFacetAttributes.go index 7f21a0adf91..9f89a65aa20 100644 --- a/service/clouddirectory/api_op_ListFacetAttributes.go +++ b/service/clouddirectory/api_op_ListFacetAttributes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListFacetAttributesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFacetAttributesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListFacetAttributesMiddlewares(stack *middleware.St return nil } -// ListFacetAttributesAPIClient is a client that implements the -// ListFacetAttributes operation. -type ListFacetAttributesAPIClient interface { - ListFacetAttributes(context.Context, *ListFacetAttributesInput, ...func(*Options)) (*ListFacetAttributesOutput, error) -} - -var _ ListFacetAttributesAPIClient = (*Client)(nil) - // ListFacetAttributesPaginatorOptions is the paginator options for // ListFacetAttributes type ListFacetAttributesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListFacetAttributesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFacetAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListFacetAttributesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFacetAttributesAPIClient is a client that implements the +// ListFacetAttributes operation. +type ListFacetAttributesAPIClient interface { + ListFacetAttributes(context.Context, *ListFacetAttributesInput, ...func(*Options)) (*ListFacetAttributesOutput, error) +} + +var _ ListFacetAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFacetAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListFacetNames.go b/service/clouddirectory/api_op_ListFacetNames.go index 68aca7e4721..6033e943581 100644 --- a/service/clouddirectory/api_op_ListFacetNames.go +++ b/service/clouddirectory/api_op_ListFacetNames.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListFacetNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFacetNamesValidationMiddleware(stack); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListFacetNamesMiddlewares(stack *middleware.Stack, return nil } -// ListFacetNamesAPIClient is a client that implements the ListFacetNames -// operation. -type ListFacetNamesAPIClient interface { - ListFacetNames(context.Context, *ListFacetNamesInput, ...func(*Options)) (*ListFacetNamesOutput, error) -} - -var _ ListFacetNamesAPIClient = (*Client)(nil) - // ListFacetNamesPaginatorOptions is the paginator options for ListFacetNames type ListFacetNamesPaginatorOptions struct { // The maximum number of results to retrieve. @@ -209,6 +204,9 @@ func (p *ListFacetNamesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFacetNames(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListFacetNamesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListFacetNamesAPIClient is a client that implements the ListFacetNames +// operation. +type ListFacetNamesAPIClient interface { + ListFacetNames(context.Context, *ListFacetNamesInput, ...func(*Options)) (*ListFacetNamesOutput, error) +} + +var _ ListFacetNamesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFacetNames(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListIncomingTypedLinks.go b/service/clouddirectory/api_op_ListIncomingTypedLinks.go index e5ac99ae9b7..56449f43c93 100644 --- a/service/clouddirectory/api_op_ListIncomingTypedLinks.go +++ b/service/clouddirectory/api_op_ListIncomingTypedLinks.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListIncomingTypedLinksMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIncomingTypedLinksValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_ListIndex.go b/service/clouddirectory/api_op_ListIndex.go index 965e775294c..cf105051195 100644 --- a/service/clouddirectory/api_op_ListIndex.go +++ b/service/clouddirectory/api_op_ListIndex.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListIndexMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIndexValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListIndexMiddlewares(stack *middleware.Stack, optio return nil } -// ListIndexAPIClient is a client that implements the ListIndex operation. -type ListIndexAPIClient interface { - ListIndex(context.Context, *ListIndexInput, ...func(*Options)) (*ListIndexOutput, error) -} - -var _ ListIndexAPIClient = (*Client)(nil) - // ListIndexPaginatorOptions is the paginator options for ListIndex type ListIndexPaginatorOptions struct { // The maximum number of objects in a single page to retrieve from the index @@ -226,6 +222,9 @@ func (p *ListIndexPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIndex(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListIndexPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListIndexAPIClient is a client that implements the ListIndex operation. +type ListIndexAPIClient interface { + ListIndex(context.Context, *ListIndexInput, ...func(*Options)) (*ListIndexOutput, error) +} + +var _ ListIndexAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIndex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListManagedSchemaArns.go b/service/clouddirectory/api_op_ListManagedSchemaArns.go index dc6ab974ff3..b79ec098aab 100644 --- a/service/clouddirectory/api_op_ListManagedSchemaArns.go +++ b/service/clouddirectory/api_op_ListManagedSchemaArns.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListManagedSchemaArnsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedSchemaArns(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListManagedSchemaArnsMiddlewares(stack *middleware. return nil } -// ListManagedSchemaArnsAPIClient is a client that implements the -// ListManagedSchemaArns operation. -type ListManagedSchemaArnsAPIClient interface { - ListManagedSchemaArns(context.Context, *ListManagedSchemaArnsInput, ...func(*Options)) (*ListManagedSchemaArnsOutput, error) -} - -var _ ListManagedSchemaArnsAPIClient = (*Client)(nil) - // ListManagedSchemaArnsPaginatorOptions is the paginator options for // ListManagedSchemaArns type ListManagedSchemaArnsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListManagedSchemaArnsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedSchemaArns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListManagedSchemaArnsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListManagedSchemaArnsAPIClient is a client that implements the +// ListManagedSchemaArns operation. +type ListManagedSchemaArnsAPIClient interface { + ListManagedSchemaArns(context.Context, *ListManagedSchemaArnsInput, ...func(*Options)) (*ListManagedSchemaArnsOutput, error) +} + +var _ ListManagedSchemaArnsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedSchemaArns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListObjectAttributes.go b/service/clouddirectory/api_op_ListObjectAttributes.go index 66f2510d078..9f841311a78 100644 --- a/service/clouddirectory/api_op_ListObjectAttributes.go +++ b/service/clouddirectory/api_op_ListObjectAttributes.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListObjectAttributesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListObjectAttributesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListObjectAttributesMiddlewares(stack *middleware.S return nil } -// ListObjectAttributesAPIClient is a client that implements the -// ListObjectAttributes operation. -type ListObjectAttributesAPIClient interface { - ListObjectAttributes(context.Context, *ListObjectAttributesInput, ...func(*Options)) (*ListObjectAttributesOutput, error) -} - -var _ ListObjectAttributesAPIClient = (*Client)(nil) - // ListObjectAttributesPaginatorOptions is the paginator options for // ListObjectAttributes type ListObjectAttributesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListObjectAttributesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListObjectAttributesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListObjectAttributesAPIClient is a client that implements the +// ListObjectAttributes operation. +type ListObjectAttributesAPIClient interface { + ListObjectAttributes(context.Context, *ListObjectAttributesInput, ...func(*Options)) (*ListObjectAttributesOutput, error) +} + +var _ ListObjectAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListObjectChildren.go b/service/clouddirectory/api_op_ListObjectChildren.go index 4047c6c3fac..07c982fec3c 100644 --- a/service/clouddirectory/api_op_ListObjectChildren.go +++ b/service/clouddirectory/api_op_ListObjectChildren.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListObjectChildrenMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListObjectChildrenValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListObjectChildrenMiddlewares(stack *middleware.Sta return nil } -// ListObjectChildrenAPIClient is a client that implements the ListObjectChildren -// operation. -type ListObjectChildrenAPIClient interface { - ListObjectChildren(context.Context, *ListObjectChildrenInput, ...func(*Options)) (*ListObjectChildrenOutput, error) -} - -var _ ListObjectChildrenAPIClient = (*Client)(nil) - // ListObjectChildrenPaginatorOptions is the paginator options for // ListObjectChildren type ListObjectChildrenPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListObjectChildrenPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectChildren(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListObjectChildrenPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListObjectChildrenAPIClient is a client that implements the ListObjectChildren +// operation. +type ListObjectChildrenAPIClient interface { + ListObjectChildren(context.Context, *ListObjectChildrenInput, ...func(*Options)) (*ListObjectChildrenOutput, error) +} + +var _ ListObjectChildrenAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectChildren(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListObjectParentPaths.go b/service/clouddirectory/api_op_ListObjectParentPaths.go index 4eb99b7362f..e967efa7c47 100644 --- a/service/clouddirectory/api_op_ListObjectParentPaths.go +++ b/service/clouddirectory/api_op_ListObjectParentPaths.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListObjectParentPathsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListObjectParentPathsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListObjectParentPathsMiddlewares(stack *middleware. return nil } -// ListObjectParentPathsAPIClient is a client that implements the -// ListObjectParentPaths operation. -type ListObjectParentPathsAPIClient interface { - ListObjectParentPaths(context.Context, *ListObjectParentPathsInput, ...func(*Options)) (*ListObjectParentPathsOutput, error) -} - -var _ ListObjectParentPathsAPIClient = (*Client)(nil) - // ListObjectParentPathsPaginatorOptions is the paginator options for // ListObjectParentPaths type ListObjectParentPathsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListObjectParentPathsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectParentPaths(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListObjectParentPathsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListObjectParentPathsAPIClient is a client that implements the +// ListObjectParentPaths operation. +type ListObjectParentPathsAPIClient interface { + ListObjectParentPaths(context.Context, *ListObjectParentPathsInput, ...func(*Options)) (*ListObjectParentPathsOutput, error) +} + +var _ ListObjectParentPathsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectParentPaths(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListObjectParents.go b/service/clouddirectory/api_op_ListObjectParents.go index 4a73c97e214..054f23fbe0a 100644 --- a/service/clouddirectory/api_op_ListObjectParents.go +++ b/service/clouddirectory/api_op_ListObjectParents.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListObjectParentsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListObjectParentsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListObjectParentsMiddlewares(stack *middleware.Stac return nil } -// ListObjectParentsAPIClient is a client that implements the ListObjectParents -// operation. -type ListObjectParentsAPIClient interface { - ListObjectParents(context.Context, *ListObjectParentsInput, ...func(*Options)) (*ListObjectParentsOutput, error) -} - -var _ ListObjectParentsAPIClient = (*Client)(nil) - // ListObjectParentsPaginatorOptions is the paginator options for ListObjectParents type ListObjectParentsPaginatorOptions struct { // The maximum number of items to be retrieved in a single call. This is an @@ -232,6 +227,9 @@ func (p *ListObjectParentsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectParents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListObjectParentsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListObjectParentsAPIClient is a client that implements the ListObjectParents +// operation. +type ListObjectParentsAPIClient interface { + ListObjectParents(context.Context, *ListObjectParentsInput, ...func(*Options)) (*ListObjectParentsOutput, error) +} + +var _ ListObjectParentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectParents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListObjectPolicies.go b/service/clouddirectory/api_op_ListObjectPolicies.go index dd9bbe478ac..05f2a854e9a 100644 --- a/service/clouddirectory/api_op_ListObjectPolicies.go +++ b/service/clouddirectory/api_op_ListObjectPolicies.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListObjectPoliciesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListObjectPoliciesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListObjectPoliciesMiddlewares(stack *middleware.Sta return nil } -// ListObjectPoliciesAPIClient is a client that implements the ListObjectPolicies -// operation. -type ListObjectPoliciesAPIClient interface { - ListObjectPolicies(context.Context, *ListObjectPoliciesInput, ...func(*Options)) (*ListObjectPoliciesOutput, error) -} - -var _ ListObjectPoliciesAPIClient = (*Client)(nil) - // ListObjectPoliciesPaginatorOptions is the paginator options for // ListObjectPolicies type ListObjectPoliciesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListObjectPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListObjectPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListObjectPoliciesAPIClient is a client that implements the ListObjectPolicies +// operation. +type ListObjectPoliciesAPIClient interface { + ListObjectPolicies(context.Context, *ListObjectPoliciesInput, ...func(*Options)) (*ListObjectPoliciesOutput, error) +} + +var _ ListObjectPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListOutgoingTypedLinks.go b/service/clouddirectory/api_op_ListOutgoingTypedLinks.go index ad766615e8c..b399b4952b6 100644 --- a/service/clouddirectory/api_op_ListOutgoingTypedLinks.go +++ b/service/clouddirectory/api_op_ListOutgoingTypedLinks.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListOutgoingTypedLinksMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOutgoingTypedLinksValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_ListPolicyAttachments.go b/service/clouddirectory/api_op_ListPolicyAttachments.go index fc2a8100c53..a21ce35725a 100644 --- a/service/clouddirectory/api_op_ListPolicyAttachments.go +++ b/service/clouddirectory/api_op_ListPolicyAttachments.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListPolicyAttachmentsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyAttachmentsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListPolicyAttachmentsMiddlewares(stack *middleware. return nil } -// ListPolicyAttachmentsAPIClient is a client that implements the -// ListPolicyAttachments operation. -type ListPolicyAttachmentsAPIClient interface { - ListPolicyAttachments(context.Context, *ListPolicyAttachmentsInput, ...func(*Options)) (*ListPolicyAttachmentsOutput, error) -} - -var _ ListPolicyAttachmentsAPIClient = (*Client)(nil) - // ListPolicyAttachmentsPaginatorOptions is the paginator options for // ListPolicyAttachments type ListPolicyAttachmentsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListPolicyAttachmentsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListPolicyAttachmentsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPolicyAttachmentsAPIClient is a client that implements the +// ListPolicyAttachments operation. +type ListPolicyAttachmentsAPIClient interface { + ListPolicyAttachments(context.Context, *ListPolicyAttachmentsInput, ...func(*Options)) (*ListPolicyAttachmentsOutput, error) +} + +var _ ListPolicyAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListPublishedSchemaArns.go b/service/clouddirectory/api_op_ListPublishedSchemaArns.go index 67ddae34e91..8b207971be4 100644 --- a/service/clouddirectory/api_op_ListPublishedSchemaArns.go +++ b/service/clouddirectory/api_op_ListPublishedSchemaArns.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListPublishedSchemaArnsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPublishedSchemaArns(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListPublishedSchemaArnsMiddlewares(stack *middlewar return nil } -// ListPublishedSchemaArnsAPIClient is a client that implements the -// ListPublishedSchemaArns operation. -type ListPublishedSchemaArnsAPIClient interface { - ListPublishedSchemaArns(context.Context, *ListPublishedSchemaArnsInput, ...func(*Options)) (*ListPublishedSchemaArnsOutput, error) -} - -var _ ListPublishedSchemaArnsAPIClient = (*Client)(nil) - // ListPublishedSchemaArnsPaginatorOptions is the paginator options for // ListPublishedSchemaArns type ListPublishedSchemaArnsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListPublishedSchemaArnsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPublishedSchemaArns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListPublishedSchemaArnsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListPublishedSchemaArnsAPIClient is a client that implements the +// ListPublishedSchemaArns operation. +type ListPublishedSchemaArnsAPIClient interface { + ListPublishedSchemaArns(context.Context, *ListPublishedSchemaArnsInput, ...func(*Options)) (*ListPublishedSchemaArnsOutput, error) +} + +var _ ListPublishedSchemaArnsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPublishedSchemaArns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListTagsForResource.go b/service/clouddirectory/api_op_ListTagsForResource.go index 47d69b3f88b..13fb2c211e5 100644 --- a/service/clouddirectory/api_op_ListTagsForResource.go +++ b/service/clouddirectory/api_op_ListTagsForResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go b/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go index a78a714b404..99928545cc8 100644 --- a/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go +++ b/service/clouddirectory/api_op_ListTypedLinkFacetAttributes.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTypedLinkFacetAttributesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTypedLinkFacetAttributesValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListTypedLinkFacetAttributesMiddlewares(stack *midd return nil } -// ListTypedLinkFacetAttributesAPIClient is a client that implements the -// ListTypedLinkFacetAttributes operation. -type ListTypedLinkFacetAttributesAPIClient interface { - ListTypedLinkFacetAttributes(context.Context, *ListTypedLinkFacetAttributesInput, ...func(*Options)) (*ListTypedLinkFacetAttributesOutput, error) -} - -var _ ListTypedLinkFacetAttributesAPIClient = (*Client)(nil) - // ListTypedLinkFacetAttributesPaginatorOptions is the paginator options for // ListTypedLinkFacetAttributes type ListTypedLinkFacetAttributesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListTypedLinkFacetAttributesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTypedLinkFacetAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListTypedLinkFacetAttributesPaginator) NextPage(ctx context.Context, op return result, nil } +// ListTypedLinkFacetAttributesAPIClient is a client that implements the +// ListTypedLinkFacetAttributes operation. +type ListTypedLinkFacetAttributesAPIClient interface { + ListTypedLinkFacetAttributes(context.Context, *ListTypedLinkFacetAttributesInput, ...func(*Options)) (*ListTypedLinkFacetAttributesOutput, error) +} + +var _ ListTypedLinkFacetAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTypedLinkFacetAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_ListTypedLinkFacetNames.go b/service/clouddirectory/api_op_ListTypedLinkFacetNames.go index 808af18b4bb..8c0d58f8a40 100644 --- a/service/clouddirectory/api_op_ListTypedLinkFacetNames.go +++ b/service/clouddirectory/api_op_ListTypedLinkFacetNames.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTypedLinkFacetNamesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTypedLinkFacetNamesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListTypedLinkFacetNamesMiddlewares(stack *middlewar return nil } -// ListTypedLinkFacetNamesAPIClient is a client that implements the -// ListTypedLinkFacetNames operation. -type ListTypedLinkFacetNamesAPIClient interface { - ListTypedLinkFacetNames(context.Context, *ListTypedLinkFacetNamesInput, ...func(*Options)) (*ListTypedLinkFacetNamesOutput, error) -} - -var _ ListTypedLinkFacetNamesAPIClient = (*Client)(nil) - // ListTypedLinkFacetNamesPaginatorOptions is the paginator options for // ListTypedLinkFacetNames type ListTypedLinkFacetNamesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListTypedLinkFacetNamesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTypedLinkFacetNames(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListTypedLinkFacetNamesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTypedLinkFacetNamesAPIClient is a client that implements the +// ListTypedLinkFacetNames operation. +type ListTypedLinkFacetNamesAPIClient interface { + ListTypedLinkFacetNames(context.Context, *ListTypedLinkFacetNamesInput, ...func(*Options)) (*ListTypedLinkFacetNamesOutput, error) +} + +var _ ListTypedLinkFacetNamesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTypedLinkFacetNames(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_LookupPolicy.go b/service/clouddirectory/api_op_LookupPolicy.go index a3f7eef1c16..2573a863273 100644 --- a/service/clouddirectory/api_op_LookupPolicy.go +++ b/service/clouddirectory/api_op_LookupPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationLookupPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLookupPolicyValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationLookupPolicyMiddlewares(stack *middleware.Stack, op return nil } -// LookupPolicyAPIClient is a client that implements the LookupPolicy operation. -type LookupPolicyAPIClient interface { - LookupPolicy(context.Context, *LookupPolicyInput, ...func(*Options)) (*LookupPolicyOutput, error) -} - -var _ LookupPolicyAPIClient = (*Client)(nil) - // LookupPolicyPaginatorOptions is the paginator options for LookupPolicy type LookupPolicyPaginatorOptions struct { // The maximum number of items to be retrieved in a single call. This is an @@ -227,6 +223,9 @@ func (p *LookupPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.LookupPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *LookupPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// LookupPolicyAPIClient is a client that implements the LookupPolicy operation. +type LookupPolicyAPIClient interface { + LookupPolicy(context.Context, *LookupPolicyInput, ...func(*Options)) (*LookupPolicyOutput, error) +} + +var _ LookupPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opLookupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/clouddirectory/api_op_PublishSchema.go b/service/clouddirectory/api_op_PublishSchema.go index 68ff2794e89..82ed8117074 100644 --- a/service/clouddirectory/api_op_PublishSchema.go +++ b/service/clouddirectory/api_op_PublishSchema.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPublishSchemaMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_PutSchemaFromJson.go b/service/clouddirectory/api_op_PutSchemaFromJson.go index edba949069b..02a13dbb802 100644 --- a/service/clouddirectory/api_op_PutSchemaFromJson.go +++ b/service/clouddirectory/api_op_PutSchemaFromJson.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutSchemaFromJsonMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSchemaFromJsonValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_RemoveFacetFromObject.go b/service/clouddirectory/api_op_RemoveFacetFromObject.go index 266bc454d0d..ed65c1e7f06 100644 --- a/service/clouddirectory/api_op_RemoveFacetFromObject.go +++ b/service/clouddirectory/api_op_RemoveFacetFromObject.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRemoveFacetFromObjectMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFacetFromObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_TagResource.go b/service/clouddirectory/api_op_TagResource.go index 2485ef37859..b22d44beec4 100644 --- a/service/clouddirectory/api_op_TagResource.go +++ b/service/clouddirectory/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UntagResource.go b/service/clouddirectory/api_op_UntagResource.go index 2d5e544cc75..f104d3b0794 100644 --- a/service/clouddirectory/api_op_UntagResource.go +++ b/service/clouddirectory/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpdateFacet.go b/service/clouddirectory/api_op_UpdateFacet.go index 32f068442de..d49bead4436 100644 --- a/service/clouddirectory/api_op_UpdateFacet.go +++ b/service/clouddirectory/api_op_UpdateFacet.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateFacetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpdateLinkAttributes.go b/service/clouddirectory/api_op_UpdateLinkAttributes.go index 7b0c5fb2778..9d0d08bb3eb 100644 --- a/service/clouddirectory/api_op_UpdateLinkAttributes.go +++ b/service/clouddirectory/api_op_UpdateLinkAttributes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateLinkAttributesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLinkAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpdateObjectAttributes.go b/service/clouddirectory/api_op_UpdateObjectAttributes.go index 7581007c025..c85d782dd85 100644 --- a/service/clouddirectory/api_op_UpdateObjectAttributes.go +++ b/service/clouddirectory/api_op_UpdateObjectAttributes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateObjectAttributesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateObjectAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpdateSchema.go b/service/clouddirectory/api_op_UpdateSchema.go index d40a7713d3d..6080ccc81d5 100644 --- a/service/clouddirectory/api_op_UpdateSchema.go +++ b/service/clouddirectory/api_op_UpdateSchema.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpdateTypedLinkFacet.go b/service/clouddirectory/api_op_UpdateTypedLinkFacet.go index 61bab0a61e2..ac324fd5f70 100644 --- a/service/clouddirectory/api_op_UpdateTypedLinkFacet.go +++ b/service/clouddirectory/api_op_UpdateTypedLinkFacet.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateTypedLinkFacetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTypedLinkFacetValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpgradeAppliedSchema.go b/service/clouddirectory/api_op_UpgradeAppliedSchema.go index 75c66ce4cbf..0bc97345c90 100644 --- a/service/clouddirectory/api_op_UpgradeAppliedSchema.go +++ b/service/clouddirectory/api_op_UpgradeAppliedSchema.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpgradeAppliedSchemaMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpgradeAppliedSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/clouddirectory/api_op_UpgradePublishedSchema.go b/service/clouddirectory/api_op_UpgradePublishedSchema.go index f209b66b1d3..915ef6a80d8 100644 --- a/service/clouddirectory/api_op_UpgradePublishedSchema.go +++ b/service/clouddirectory/api_op_UpgradePublishedSchema.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpgradePublishedSchemaMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpgradePublishedSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_client.go b/service/cloudformation/api_client.go index 4bfa79f5010..86a64940f2e 100644 --- a/service/cloudformation/api_client.go +++ b/service/cloudformation/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/cloudformation/api_op_ActivateOrganizationsAccess.go b/service/cloudformation/api_op_ActivateOrganizationsAccess.go index 1e5ade246e9..b87a0c469b0 100644 --- a/service/cloudformation/api_op_ActivateOrganizationsAccess.go +++ b/service/cloudformation/api_op_ActivateOrganizationsAccess.go @@ -97,6 +97,9 @@ func (c *Client) addOperationActivateOrganizationsAccessMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateOrganizationsAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_ActivateType.go b/service/cloudformation/api_op_ActivateType.go index ddd08fc5dda..b4c6de03887 100644 --- a/service/cloudformation/api_op_ActivateType.go +++ b/service/cloudformation/api_op_ActivateType.go @@ -175,6 +175,9 @@ func (c *Client) addOperationActivateTypeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_BatchDescribeTypeConfigurations.go b/service/cloudformation/api_op_BatchDescribeTypeConfigurations.go index e08f7c1137e..8eb886e85bc 100644 --- a/service/cloudformation/api_op_BatchDescribeTypeConfigurations.go +++ b/service/cloudformation/api_op_BatchDescribeTypeConfigurations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchDescribeTypeConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDescribeTypeConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_CancelUpdateStack.go b/service/cloudformation/api_op_CancelUpdateStack.go index c1b6f88be3a..6f9f1cd4a38 100644 --- a/service/cloudformation/api_op_CancelUpdateStack.go +++ b/service/cloudformation/api_op_CancelUpdateStack.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCancelUpdateStackMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelUpdateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_ContinueUpdateRollback.go b/service/cloudformation/api_op_ContinueUpdateRollback.go index f0e36da4cea..755760727ea 100644 --- a/service/cloudformation/api_op_ContinueUpdateRollback.go +++ b/service/cloudformation/api_op_ContinueUpdateRollback.go @@ -173,6 +173,9 @@ func (c *Client) addOperationContinueUpdateRollbackMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpContinueUpdateRollbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_CreateChangeSet.go b/service/cloudformation/api_op_CreateChangeSet.go index 0ac192a6d95..04fb2c76787 100644 --- a/service/cloudformation/api_op_CreateChangeSet.go +++ b/service/cloudformation/api_op_CreateChangeSet.go @@ -353,6 +353,9 @@ func (c *Client) addOperationCreateChangeSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_CreateGeneratedTemplate.go b/service/cloudformation/api_op_CreateGeneratedTemplate.go index 3abb91e7d4c..53069cf01aa 100644 --- a/service/cloudformation/api_op_CreateGeneratedTemplate.go +++ b/service/cloudformation/api_op_CreateGeneratedTemplate.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateGeneratedTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGeneratedTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_CreateStack.go b/service/cloudformation/api_op_CreateStack.go index 3f454565970..0af11cdafaa 100644 --- a/service/cloudformation/api_op_CreateStack.go +++ b/service/cloudformation/api_op_CreateStack.go @@ -336,6 +336,9 @@ func (c *Client) addOperationCreateStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_CreateStackInstances.go b/service/cloudformation/api_op_CreateStackInstances.go index c3ceda07261..1a6f426cdff 100644 --- a/service/cloudformation/api_op_CreateStackInstances.go +++ b/service/cloudformation/api_op_CreateStackInstances.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateStackInstancesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStackInstancesMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_CreateStackSet.go b/service/cloudformation/api_op_CreateStackSet.go index 74b3d6eaaf2..f51a980145e 100644 --- a/service/cloudformation/api_op_CreateStackSet.go +++ b/service/cloudformation/api_op_CreateStackSet.go @@ -294,6 +294,9 @@ func (c *Client) addOperationCreateStackSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStackSetMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_DeactivateOrganizationsAccess.go b/service/cloudformation/api_op_DeactivateOrganizationsAccess.go index 399b656b251..ee4b29bf01c 100644 --- a/service/cloudformation/api_op_DeactivateOrganizationsAccess.go +++ b/service/cloudformation/api_op_DeactivateOrganizationsAccess.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeactivateOrganizationsAccessMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateOrganizationsAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DeactivateType.go b/service/cloudformation/api_op_DeactivateType.go index ac82306a8c1..46a8085a80c 100644 --- a/service/cloudformation/api_op_DeactivateType.go +++ b/service/cloudformation/api_op_DeactivateType.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeactivateTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateType(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DeleteChangeSet.go b/service/cloudformation/api_op_DeleteChangeSet.go index 383a5efbe86..6a11fbee2d9 100644 --- a/service/cloudformation/api_op_DeleteChangeSet.go +++ b/service/cloudformation/api_op_DeleteChangeSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteChangeSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DeleteGeneratedTemplate.go b/service/cloudformation/api_op_DeleteGeneratedTemplate.go index b4ef3d52d34..dbd583042be 100644 --- a/service/cloudformation/api_op_DeleteGeneratedTemplate.go +++ b/service/cloudformation/api_op_DeleteGeneratedTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteGeneratedTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGeneratedTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DeleteStack.go b/service/cloudformation/api_op_DeleteStack.go index 951cad1c776..47d3b6b1685 100644 --- a/service/cloudformation/api_op_DeleteStack.go +++ b/service/cloudformation/api_op_DeleteStack.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDeleteStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DeleteStackInstances.go b/service/cloudformation/api_op_DeleteStackInstances.go index 80d0ad553e9..166683eef35 100644 --- a/service/cloudformation/api_op_DeleteStackInstances.go +++ b/service/cloudformation/api_op_DeleteStackInstances.go @@ -171,6 +171,9 @@ func (c *Client) addOperationDeleteStackInstancesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStackInstancesMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_DeleteStackSet.go b/service/cloudformation/api_op_DeleteStackSet.go index 7ee95876bd2..e605e0d9629 100644 --- a/service/cloudformation/api_op_DeleteStackSet.go +++ b/service/cloudformation/api_op_DeleteStackSet.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteStackSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStackSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DeregisterType.go b/service/cloudformation/api_op_DeregisterType.go index 21be4f700a6..05a83a1ec28 100644 --- a/service/cloudformation/api_op_DeregisterType.go +++ b/service/cloudformation/api_op_DeregisterType.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeregisterTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterType(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeAccountLimits.go b/service/cloudformation/api_op_DescribeAccountLimits.go index cbdd29a95ae..eb778208490 100644 --- a/service/cloudformation/api_op_DescribeAccountLimits.go +++ b/service/cloudformation/api_op_DescribeAccountLimits.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountLimits(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. return nil } -// DescribeAccountLimitsAPIClient is a client that implements the -// DescribeAccountLimits operation. -type DescribeAccountLimitsAPIClient interface { - DescribeAccountLimits(context.Context, *DescribeAccountLimitsInput, ...func(*Options)) (*DescribeAccountLimitsOutput, error) -} - -var _ DescribeAccountLimitsAPIClient = (*Client)(nil) - // DescribeAccountLimitsPaginatorOptions is the paginator options for // DescribeAccountLimits type DescribeAccountLimitsPaginatorOptions struct { @@ -196,6 +191,9 @@ func (p *DescribeAccountLimitsPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAccountLimits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -215,6 +213,14 @@ func (p *DescribeAccountLimitsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeAccountLimitsAPIClient is a client that implements the +// DescribeAccountLimits operation. +type DescribeAccountLimitsAPIClient interface { + DescribeAccountLimits(context.Context, *DescribeAccountLimitsInput, ...func(*Options)) (*DescribeAccountLimitsOutput, error) +} + +var _ DescribeAccountLimitsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAccountLimits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_DescribeChangeSet.go b/service/cloudformation/api_op_DescribeChangeSet.go index 2cd541390a0..9155c1cb888 100644 --- a/service/cloudformation/api_op_DescribeChangeSet.go +++ b/service/cloudformation/api_op_DescribeChangeSet.go @@ -228,6 +228,9 @@ func (c *Client) addOperationDescribeChangeSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChangeSetValidationMiddleware(stack); err != nil { return err } @@ -252,14 +255,6 @@ func (c *Client) addOperationDescribeChangeSetMiddlewares(stack *middleware.Stac return nil } -// DescribeChangeSetAPIClient is a client that implements the DescribeChangeSet -// operation. -type DescribeChangeSetAPIClient interface { - DescribeChangeSet(context.Context, *DescribeChangeSetInput, ...func(*Options)) (*DescribeChangeSetOutput, error) -} - -var _ DescribeChangeSetAPIClient = (*Client)(nil) - // ChangeSetCreateCompleteWaiterOptions are waiter options for // ChangeSetCreateCompleteWaiter type ChangeSetCreateCompleteWaiterOptions struct { @@ -377,7 +372,13 @@ func (w *ChangeSetCreateCompleteWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeChangeSet(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -464,6 +465,14 @@ func changeSetCreateCompleteStateRetryable(ctx context.Context, input *DescribeC return true, nil } +// DescribeChangeSetAPIClient is a client that implements the DescribeChangeSet +// operation. +type DescribeChangeSetAPIClient interface { + DescribeChangeSet(context.Context, *DescribeChangeSetInput, ...func(*Options)) (*DescribeChangeSetOutput, error) +} + +var _ DescribeChangeSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeChangeSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_DescribeChangeSetHooks.go b/service/cloudformation/api_op_DescribeChangeSetHooks.go index 1090a5649b4..fbd8782ab92 100644 --- a/service/cloudformation/api_op_DescribeChangeSetHooks.go +++ b/service/cloudformation/api_op_DescribeChangeSetHooks.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeChangeSetHooksMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChangeSetHooksValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeGeneratedTemplate.go b/service/cloudformation/api_op_DescribeGeneratedTemplate.go index 94ba7adfdfd..6d8c37ce568 100644 --- a/service/cloudformation/api_op_DescribeGeneratedTemplate.go +++ b/service/cloudformation/api_op_DescribeGeneratedTemplate.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeGeneratedTemplateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGeneratedTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeOrganizationsAccess.go b/service/cloudformation/api_op_DescribeOrganizationsAccess.go index 2e8cdb3a498..b341187d20d 100644 --- a/service/cloudformation/api_op_DescribeOrganizationsAccess.go +++ b/service/cloudformation/api_op_DescribeOrganizationsAccess.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeOrganizationsAccessMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationsAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribePublisher.go b/service/cloudformation/api_op_DescribePublisher.go index 4454356eb29..c20adeb8cfa 100644 --- a/service/cloudformation/api_op_DescribePublisher.go +++ b/service/cloudformation/api_op_DescribePublisher.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribePublisherMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePublisher(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeResourceScan.go b/service/cloudformation/api_op_DescribeResourceScan.go index 31f1209b525..0cff6e654a9 100644 --- a/service/cloudformation/api_op_DescribeResourceScan.go +++ b/service/cloudformation/api_op_DescribeResourceScan.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeResourceScanMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourceScanValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStackDriftDetectionStatus.go b/service/cloudformation/api_op_DescribeStackDriftDetectionStatus.go index e2cebf4faad..175fb260ce2 100644 --- a/service/cloudformation/api_op_DescribeStackDriftDetectionStatus.go +++ b/service/cloudformation/api_op_DescribeStackDriftDetectionStatus.go @@ -183,6 +183,9 @@ func (c *Client) addOperationDescribeStackDriftDetectionStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackDriftDetectionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStackEvents.go b/service/cloudformation/api_op_DescribeStackEvents.go index 264a9550bbc..a083e010d07 100644 --- a/service/cloudformation/api_op_DescribeStackEvents.go +++ b/service/cloudformation/api_op_DescribeStackEvents.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeStackEventsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStackEvents(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeStackEventsMiddlewares(stack *middleware.St return nil } -// DescribeStackEventsAPIClient is a client that implements the -// DescribeStackEvents operation. -type DescribeStackEventsAPIClient interface { - DescribeStackEvents(context.Context, *DescribeStackEventsInput, ...func(*Options)) (*DescribeStackEventsOutput, error) -} - -var _ DescribeStackEventsAPIClient = (*Client)(nil) - // DescribeStackEventsPaginatorOptions is the paginator options for // DescribeStackEvents type DescribeStackEventsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeStackEventsPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStackEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeStackEventsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeStackEventsAPIClient is a client that implements the +// DescribeStackEvents operation. +type DescribeStackEventsAPIClient interface { + DescribeStackEvents(context.Context, *DescribeStackEventsInput, ...func(*Options)) (*DescribeStackEventsOutput, error) +} + +var _ DescribeStackEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStackEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_DescribeStackInstance.go b/service/cloudformation/api_op_DescribeStackInstance.go index 1d71ebadbb8..e141564ba94 100644 --- a/service/cloudformation/api_op_DescribeStackInstance.go +++ b/service/cloudformation/api_op_DescribeStackInstance.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeStackInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStackResource.go b/service/cloudformation/api_op_DescribeStackResource.go index 771f45b50c6..fce30e9596d 100644 --- a/service/cloudformation/api_op_DescribeStackResource.go +++ b/service/cloudformation/api_op_DescribeStackResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeStackResourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStackResourceDrifts.go b/service/cloudformation/api_op_DescribeStackResourceDrifts.go index dd5e9b95cae..11c69611508 100644 --- a/service/cloudformation/api_op_DescribeStackResourceDrifts.go +++ b/service/cloudformation/api_op_DescribeStackResourceDrifts.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeStackResourceDriftsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackResourceDriftsValidationMiddleware(stack); err != nil { return err } @@ -185,14 +188,6 @@ func (c *Client) addOperationDescribeStackResourceDriftsMiddlewares(stack *middl return nil } -// DescribeStackResourceDriftsAPIClient is a client that implements the -// DescribeStackResourceDrifts operation. -type DescribeStackResourceDriftsAPIClient interface { - DescribeStackResourceDrifts(context.Context, *DescribeStackResourceDriftsInput, ...func(*Options)) (*DescribeStackResourceDriftsOutput, error) -} - -var _ DescribeStackResourceDriftsAPIClient = (*Client)(nil) - // DescribeStackResourceDriftsPaginatorOptions is the paginator options for // DescribeStackResourceDrifts type DescribeStackResourceDriftsPaginatorOptions struct { @@ -262,6 +257,9 @@ func (p *DescribeStackResourceDriftsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStackResourceDrifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -281,6 +279,14 @@ func (p *DescribeStackResourceDriftsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeStackResourceDriftsAPIClient is a client that implements the +// DescribeStackResourceDrifts operation. +type DescribeStackResourceDriftsAPIClient interface { + DescribeStackResourceDrifts(context.Context, *DescribeStackResourceDriftsInput, ...func(*Options)) (*DescribeStackResourceDriftsOutput, error) +} + +var _ DescribeStackResourceDriftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStackResourceDrifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_DescribeStackResources.go b/service/cloudformation/api_op_DescribeStackResources.go index aea990b1b7c..134f14b85c9 100644 --- a/service/cloudformation/api_op_DescribeStackResources.go +++ b/service/cloudformation/api_op_DescribeStackResources.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribeStackResourcesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStackResources(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStackSet.go b/service/cloudformation/api_op_DescribeStackSet.go index 11caea31ed8..c28038f5106 100644 --- a/service/cloudformation/api_op_DescribeStackSet.go +++ b/service/cloudformation/api_op_DescribeStackSet.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeStackSetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStackSetOperation.go b/service/cloudformation/api_op_DescribeStackSetOperation.go index 9f85300ee38..1e99092b29a 100644 --- a/service/cloudformation/api_op_DescribeStackSetOperation.go +++ b/service/cloudformation/api_op_DescribeStackSetOperation.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeStackSetOperationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackSetOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeStacks.go b/service/cloudformation/api_op_DescribeStacks.go index c8bccd1b1f1..81c57e1011f 100644 --- a/service/cloudformation/api_op_DescribeStacks.go +++ b/service/cloudformation/api_op_DescribeStacks.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeStacksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStacks(options.Region), middleware.Before); err != nil { return err } @@ -168,84 +171,6 @@ func (c *Client) addOperationDescribeStacksMiddlewares(stack *middleware.Stack, return nil } -// DescribeStacksAPIClient is a client that implements the DescribeStacks -// operation. -type DescribeStacksAPIClient interface { - DescribeStacks(context.Context, *DescribeStacksInput, ...func(*Options)) (*DescribeStacksOutput, error) -} - -var _ DescribeStacksAPIClient = (*Client)(nil) - -// DescribeStacksPaginatorOptions is the paginator options for DescribeStacks -type DescribeStacksPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeStacksPaginator is a paginator for DescribeStacks -type DescribeStacksPaginator struct { - options DescribeStacksPaginatorOptions - client DescribeStacksAPIClient - params *DescribeStacksInput - nextToken *string - firstPage bool -} - -// NewDescribeStacksPaginator returns a new DescribeStacksPaginator -func NewDescribeStacksPaginator(client DescribeStacksAPIClient, params *DescribeStacksInput, optFns ...func(*DescribeStacksPaginatorOptions)) *DescribeStacksPaginator { - if params == nil { - params = &DescribeStacksInput{} - } - - options := DescribeStacksPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeStacksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeStacksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeStacks page. -func (p *DescribeStacksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStacksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - result, err := p.client.DescribeStacks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // StackCreateCompleteWaiterOptions are waiter options for // StackCreateCompleteWaiter type StackCreateCompleteWaiterOptions struct { @@ -363,7 +288,13 @@ func (w *StackCreateCompleteWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeStacks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -941,7 +872,13 @@ func (w *StackDeleteCompleteWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeStacks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1308,7 +1245,13 @@ func (w *StackExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeS } out, err := w.client.DescribeStacks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1482,7 +1425,13 @@ func (w *StackImportCompleteWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeStacks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1804,7 +1753,13 @@ func (w *StackRollbackCompleteWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeStacks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -2078,7 +2033,13 @@ func (w *StackUpdateCompleteWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeStacks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -2235,6 +2196,87 @@ func stackUpdateCompleteStateRetryable(ctx context.Context, input *DescribeStack return true, nil } +// DescribeStacksPaginatorOptions is the paginator options for DescribeStacks +type DescribeStacksPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeStacksPaginator is a paginator for DescribeStacks +type DescribeStacksPaginator struct { + options DescribeStacksPaginatorOptions + client DescribeStacksAPIClient + params *DescribeStacksInput + nextToken *string + firstPage bool +} + +// NewDescribeStacksPaginator returns a new DescribeStacksPaginator +func NewDescribeStacksPaginator(client DescribeStacksAPIClient, params *DescribeStacksInput, optFns ...func(*DescribeStacksPaginatorOptions)) *DescribeStacksPaginator { + if params == nil { + params = &DescribeStacksInput{} + } + + options := DescribeStacksPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeStacksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeStacksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeStacks page. +func (p *DescribeStacksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStacksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeStacks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeStacksAPIClient is a client that implements the DescribeStacks +// operation. +type DescribeStacksAPIClient interface { + DescribeStacks(context.Context, *DescribeStacksInput, ...func(*Options)) (*DescribeStacksOutput, error) +} + +var _ DescribeStacksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_DescribeType.go b/service/cloudformation/api_op_DescribeType.go index 3e63e138ab8..7f5bf607689 100644 --- a/service/cloudformation/api_op_DescribeType.go +++ b/service/cloudformation/api_op_DescribeType.go @@ -367,6 +367,9 @@ func (c *Client) addOperationDescribeTypeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeType(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_DescribeTypeRegistration.go b/service/cloudformation/api_op_DescribeTypeRegistration.go index 256e1ee66f5..c062be6117f 100644 --- a/service/cloudformation/api_op_DescribeTypeRegistration.go +++ b/service/cloudformation/api_op_DescribeTypeRegistration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeTypeRegistrationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTypeRegistrationValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeTypeRegistrationMiddlewares(stack *middlewa return nil } -// DescribeTypeRegistrationAPIClient is a client that implements the -// DescribeTypeRegistration operation. -type DescribeTypeRegistrationAPIClient interface { - DescribeTypeRegistration(context.Context, *DescribeTypeRegistrationInput, ...func(*Options)) (*DescribeTypeRegistrationOutput, error) -} - -var _ DescribeTypeRegistrationAPIClient = (*Client)(nil) - // TypeRegistrationCompleteWaiterOptions are waiter options for // TypeRegistrationCompleteWaiter type TypeRegistrationCompleteWaiterOptions struct { @@ -285,7 +280,13 @@ func (w *TypeRegistrationCompleteWaiter) WaitForOutput(ctx context.Context, para } out, err := w.client.DescribeTypeRegistration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -360,6 +361,14 @@ func typeRegistrationCompleteStateRetryable(ctx context.Context, input *Describe return true, nil } +// DescribeTypeRegistrationAPIClient is a client that implements the +// DescribeTypeRegistration operation. +type DescribeTypeRegistrationAPIClient interface { + DescribeTypeRegistration(context.Context, *DescribeTypeRegistrationInput, ...func(*Options)) (*DescribeTypeRegistrationOutput, error) +} + +var _ DescribeTypeRegistrationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTypeRegistration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_DetectStackDrift.go b/service/cloudformation/api_op_DetectStackDrift.go index 48bed6e9a0b..6595f5ff3c9 100644 --- a/service/cloudformation/api_op_DetectStackDrift.go +++ b/service/cloudformation/api_op_DetectStackDrift.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDetectStackDriftMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectStackDriftValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DetectStackResourceDrift.go b/service/cloudformation/api_op_DetectStackResourceDrift.go index 24935773f6b..5e145770fde 100644 --- a/service/cloudformation/api_op_DetectStackResourceDrift.go +++ b/service/cloudformation/api_op_DetectStackResourceDrift.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDetectStackResourceDriftMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectStackResourceDriftValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_DetectStackSetDrift.go b/service/cloudformation/api_op_DetectStackSetDrift.go index 4503d552b1e..013533a586a 100644 --- a/service/cloudformation/api_op_DetectStackSetDrift.go +++ b/service/cloudformation/api_op_DetectStackSetDrift.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDetectStackSetDriftMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDetectStackSetDriftMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_EstimateTemplateCost.go b/service/cloudformation/api_op_EstimateTemplateCost.go index 3a69eebf6f3..df464f3a3b1 100644 --- a/service/cloudformation/api_op_EstimateTemplateCost.go +++ b/service/cloudformation/api_op_EstimateTemplateCost.go @@ -130,6 +130,9 @@ func (c *Client) addOperationEstimateTemplateCostMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEstimateTemplateCost(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_ExecuteChangeSet.go b/service/cloudformation/api_op_ExecuteChangeSet.go index a86cfa66143..83769da5a79 100644 --- a/service/cloudformation/api_op_ExecuteChangeSet.go +++ b/service/cloudformation/api_op_ExecuteChangeSet.go @@ -150,6 +150,9 @@ func (c *Client) addOperationExecuteChangeSetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_GetGeneratedTemplate.go b/service/cloudformation/api_op_GetGeneratedTemplate.go index c47c47f6ab0..eb8c169388d 100644 --- a/service/cloudformation/api_op_GetGeneratedTemplate.go +++ b/service/cloudformation/api_op_GetGeneratedTemplate.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetGeneratedTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGeneratedTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_GetStackPolicy.go b/service/cloudformation/api_op_GetStackPolicy.go index cba1be44058..bc38f80dc62 100644 --- a/service/cloudformation/api_op_GetStackPolicy.go +++ b/service/cloudformation/api_op_GetStackPolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetStackPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStackPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_GetTemplate.go b/service/cloudformation/api_op_GetTemplate.go index 1b3f98eaa4c..e95dab3fb3b 100644 --- a/service/cloudformation/api_op_GetTemplate.go +++ b/service/cloudformation/api_op_GetTemplate.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetTemplateMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_GetTemplateSummary.go b/service/cloudformation/api_op_GetTemplateSummary.go index 332191c7a4f..92160a788d2 100644 --- a/service/cloudformation/api_op_GetTemplateSummary.go +++ b/service/cloudformation/api_op_GetTemplateSummary.go @@ -211,6 +211,9 @@ func (c *Client) addOperationGetTemplateSummaryMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTemplateSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_ImportStacksToStackSet.go b/service/cloudformation/api_op_ImportStacksToStackSet.go index daa042760b4..7e375297f3f 100644 --- a/service/cloudformation/api_op_ImportStacksToStackSet.go +++ b/service/cloudformation/api_op_ImportStacksToStackSet.go @@ -145,6 +145,9 @@ func (c *Client) addOperationImportStacksToStackSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportStacksToStackSetMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_ListChangeSets.go b/service/cloudformation/api_op_ListChangeSets.go index 67e02f736f3..ec5b92b1493 100644 --- a/service/cloudformation/api_op_ListChangeSets.go +++ b/service/cloudformation/api_op_ListChangeSets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListChangeSetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChangeSetsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListChangeSetsMiddlewares(stack *middleware.Stack, return nil } -// ListChangeSetsAPIClient is a client that implements the ListChangeSets -// operation. -type ListChangeSetsAPIClient interface { - ListChangeSets(context.Context, *ListChangeSetsInput, ...func(*Options)) (*ListChangeSetsOutput, error) -} - -var _ ListChangeSetsAPIClient = (*Client)(nil) - // ListChangeSetsPaginatorOptions is the paginator options for ListChangeSets type ListChangeSetsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -203,6 +198,9 @@ func (p *ListChangeSetsPaginator) NextPage(ctx context.Context, optFns ...func(* params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChangeSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListChangeSetsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListChangeSetsAPIClient is a client that implements the ListChangeSets +// operation. +type ListChangeSetsAPIClient interface { + ListChangeSets(context.Context, *ListChangeSetsInput, ...func(*Options)) (*ListChangeSetsOutput, error) +} + +var _ ListChangeSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChangeSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListExports.go b/service/cloudformation/api_op_ListExports.go index 448b00f8e17..4288276ef92 100644 --- a/service/cloudformation/api_op_ListExports.go +++ b/service/cloudformation/api_op_ListExports.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExports(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListExportsAPIClient is a client that implements the ListExports operation. -type ListExportsAPIClient interface { - ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) -} - -var _ ListExportsAPIClient = (*Client)(nil) - // ListExportsPaginatorOptions is the paginator options for ListExports type ListExportsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -195,6 +191,9 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +213,13 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListExportsAPIClient is a client that implements the ListExports operation. +type ListExportsAPIClient interface { + ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) +} + +var _ ListExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListGeneratedTemplates.go b/service/cloudformation/api_op_ListGeneratedTemplates.go index 9da3f0839cc..07d3ec5e643 100644 --- a/service/cloudformation/api_op_ListGeneratedTemplates.go +++ b/service/cloudformation/api_op_ListGeneratedTemplates.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListGeneratedTemplatesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeneratedTemplates(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListGeneratedTemplatesMiddlewares(stack *middleware return nil } -// ListGeneratedTemplatesAPIClient is a client that implements the -// ListGeneratedTemplates operation. -type ListGeneratedTemplatesAPIClient interface { - ListGeneratedTemplates(context.Context, *ListGeneratedTemplatesInput, ...func(*Options)) (*ListGeneratedTemplatesOutput, error) -} - -var _ ListGeneratedTemplatesAPIClient = (*Client)(nil) - // ListGeneratedTemplatesPaginatorOptions is the paginator options for // ListGeneratedTemplates type ListGeneratedTemplatesPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListGeneratedTemplatesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGeneratedTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListGeneratedTemplatesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListGeneratedTemplatesAPIClient is a client that implements the +// ListGeneratedTemplates operation. +type ListGeneratedTemplatesAPIClient interface { + ListGeneratedTemplates(context.Context, *ListGeneratedTemplatesInput, ...func(*Options)) (*ListGeneratedTemplatesOutput, error) +} + +var _ ListGeneratedTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGeneratedTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListImports.go b/service/cloudformation/api_op_ListImports.go index 3d5dd34c69c..a2e83e3e03d 100644 --- a/service/cloudformation/api_op_ListImports.go +++ b/service/cloudformation/api_op_ListImports.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImportsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListImportsAPIClient is a client that implements the ListImports operation. -type ListImportsAPIClient interface { - ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) -} - -var _ ListImportsAPIClient = (*Client)(nil) - // ListImportsPaginatorOptions is the paginator options for ListImports type ListImportsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -203,6 +199,9 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListResourceScanRelatedResources.go b/service/cloudformation/api_op_ListResourceScanRelatedResources.go index 1b3c3156b61..e052dbf9984 100644 --- a/service/cloudformation/api_op_ListResourceScanRelatedResources.go +++ b/service/cloudformation/api_op_ListResourceScanRelatedResources.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListResourceScanRelatedResourcesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceScanRelatedResourcesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListResourceScanRelatedResourcesMiddlewares(stack * return nil } -// ListResourceScanRelatedResourcesAPIClient is a client that implements the -// ListResourceScanRelatedResources operation. -type ListResourceScanRelatedResourcesAPIClient interface { - ListResourceScanRelatedResources(context.Context, *ListResourceScanRelatedResourcesInput, ...func(*Options)) (*ListResourceScanRelatedResourcesOutput, error) -} - -var _ ListResourceScanRelatedResourcesAPIClient = (*Client)(nil) - // ListResourceScanRelatedResourcesPaginatorOptions is the paginator options for // ListResourceScanRelatedResources type ListResourceScanRelatedResourcesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListResourceScanRelatedResourcesPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceScanRelatedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListResourceScanRelatedResourcesPaginator) NextPage(ctx context.Context return result, nil } +// ListResourceScanRelatedResourcesAPIClient is a client that implements the +// ListResourceScanRelatedResources operation. +type ListResourceScanRelatedResourcesAPIClient interface { + ListResourceScanRelatedResources(context.Context, *ListResourceScanRelatedResourcesInput, ...func(*Options)) (*ListResourceScanRelatedResourcesOutput, error) +} + +var _ ListResourceScanRelatedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceScanRelatedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListResourceScanResources.go b/service/cloudformation/api_op_ListResourceScanResources.go index 8de49207c21..ca19d0e2d98 100644 --- a/service/cloudformation/api_op_ListResourceScanResources.go +++ b/service/cloudformation/api_op_ListResourceScanResources.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListResourceScanResourcesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceScanResourcesValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListResourceScanResourcesMiddlewares(stack *middlew return nil } -// ListResourceScanResourcesAPIClient is a client that implements the -// ListResourceScanResources operation. -type ListResourceScanResourcesAPIClient interface { - ListResourceScanResources(context.Context, *ListResourceScanResourcesInput, ...func(*Options)) (*ListResourceScanResourcesOutput, error) -} - -var _ ListResourceScanResourcesAPIClient = (*Client)(nil) - // ListResourceScanResourcesPaginatorOptions is the paginator options for // ListResourceScanResources type ListResourceScanResourcesPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListResourceScanResourcesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceScanResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListResourceScanResourcesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListResourceScanResourcesAPIClient is a client that implements the +// ListResourceScanResources operation. +type ListResourceScanResourcesAPIClient interface { + ListResourceScanResources(context.Context, *ListResourceScanResourcesInput, ...func(*Options)) (*ListResourceScanResourcesOutput, error) +} + +var _ ListResourceScanResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceScanResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListResourceScans.go b/service/cloudformation/api_op_ListResourceScans.go index 7a11ee3d00a..7f80d771e1d 100644 --- a/service/cloudformation/api_op_ListResourceScans.go +++ b/service/cloudformation/api_op_ListResourceScans.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListResourceScansMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceScans(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListResourceScansMiddlewares(stack *middleware.Stac return nil } -// ListResourceScansAPIClient is a client that implements the ListResourceScans -// operation. -type ListResourceScansAPIClient interface { - ListResourceScans(context.Context, *ListResourceScansInput, ...func(*Options)) (*ListResourceScansOutput, error) -} - -var _ ListResourceScansAPIClient = (*Client)(nil) - // ListResourceScansPaginatorOptions is the paginator options for ListResourceScans type ListResourceScansPaginatorOptions struct { // If the number of available results exceeds this maximum, the response includes @@ -210,6 +205,9 @@ func (p *ListResourceScansPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceScans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListResourceScansPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListResourceScansAPIClient is a client that implements the ListResourceScans +// operation. +type ListResourceScansAPIClient interface { + ListResourceScans(context.Context, *ListResourceScansInput, ...func(*Options)) (*ListResourceScansOutput, error) +} + +var _ ListResourceScansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceScans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go b/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go index 94b3bf84869..d2acb40b27d 100644 --- a/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go +++ b/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go @@ -181,6 +181,9 @@ func (c *Client) addOperationListStackInstanceResourceDriftsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackInstanceResourceDriftsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_ListStackInstances.go b/service/cloudformation/api_op_ListStackInstances.go index 93030fdd3ea..61fa52088d6 100644 --- a/service/cloudformation/api_op_ListStackInstances.go +++ b/service/cloudformation/api_op_ListStackInstances.go @@ -159,6 +159,9 @@ func (c *Client) addOperationListStackInstancesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackInstancesValidationMiddleware(stack); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationListStackInstancesMiddlewares(stack *middleware.Sta return nil } -// ListStackInstancesAPIClient is a client that implements the ListStackInstances -// operation. -type ListStackInstancesAPIClient interface { - ListStackInstances(context.Context, *ListStackInstancesInput, ...func(*Options)) (*ListStackInstancesOutput, error) -} - -var _ ListStackInstancesAPIClient = (*Client)(nil) - // ListStackInstancesPaginatorOptions is the paginator options for // ListStackInstances type ListStackInstancesPaginatorOptions struct { @@ -258,6 +253,9 @@ func (p *ListStackInstancesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStackInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +275,14 @@ func (p *ListStackInstancesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListStackInstancesAPIClient is a client that implements the ListStackInstances +// operation. +type ListStackInstancesAPIClient interface { + ListStackInstances(context.Context, *ListStackInstancesInput, ...func(*Options)) (*ListStackInstancesOutput, error) +} + +var _ ListStackInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStackInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListStackResources.go b/service/cloudformation/api_op_ListStackResources.go index 132e43ea87e..4628e9f8d90 100644 --- a/service/cloudformation/api_op_ListStackResources.go +++ b/service/cloudformation/api_op_ListStackResources.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListStackResourcesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackResourcesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListStackResourcesMiddlewares(stack *middleware.Sta return nil } -// ListStackResourcesAPIClient is a client that implements the ListStackResources -// operation. -type ListStackResourcesAPIClient interface { - ListStackResources(context.Context, *ListStackResourcesInput, ...func(*Options)) (*ListStackResourcesOutput, error) -} - -var _ ListStackResourcesAPIClient = (*Client)(nil) - // ListStackResourcesPaginatorOptions is the paginator options for // ListStackResources type ListStackResourcesPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListStackResourcesPaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStackResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListStackResourcesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListStackResourcesAPIClient is a client that implements the ListStackResources +// operation. +type ListStackResourcesAPIClient interface { + ListStackResources(context.Context, *ListStackResourcesInput, ...func(*Options)) (*ListStackResourcesOutput, error) +} + +var _ ListStackResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStackResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go b/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go index f6a19205496..8361c43a53c 100644 --- a/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go +++ b/service/cloudformation/api_op_ListStackSetAutoDeploymentTargets.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListStackSetAutoDeploymentTargetsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackSetAutoDeploymentTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_ListStackSetOperationResults.go b/service/cloudformation/api_op_ListStackSetOperationResults.go index 5fce9629f25..f57ffa78a02 100644 --- a/service/cloudformation/api_op_ListStackSetOperationResults.go +++ b/service/cloudformation/api_op_ListStackSetOperationResults.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListStackSetOperationResultsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackSetOperationResultsValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListStackSetOperationResultsMiddlewares(stack *midd return nil } -// ListStackSetOperationResultsAPIClient is a client that implements the -// ListStackSetOperationResults operation. -type ListStackSetOperationResultsAPIClient interface { - ListStackSetOperationResults(context.Context, *ListStackSetOperationResultsInput, ...func(*Options)) (*ListStackSetOperationResultsOutput, error) -} - -var _ ListStackSetOperationResultsAPIClient = (*Client)(nil) - // ListStackSetOperationResultsPaginatorOptions is the paginator options for // ListStackSetOperationResults type ListStackSetOperationResultsPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *ListStackSetOperationResultsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStackSetOperationResults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *ListStackSetOperationResultsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListStackSetOperationResultsAPIClient is a client that implements the +// ListStackSetOperationResults operation. +type ListStackSetOperationResultsAPIClient interface { + ListStackSetOperationResults(context.Context, *ListStackSetOperationResultsInput, ...func(*Options)) (*ListStackSetOperationResultsOutput, error) +} + +var _ ListStackSetOperationResultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStackSetOperationResults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListStackSetOperations.go b/service/cloudformation/api_op_ListStackSetOperations.go index d4c134b4ffb..3bd28179ced 100644 --- a/service/cloudformation/api_op_ListStackSetOperations.go +++ b/service/cloudformation/api_op_ListStackSetOperations.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListStackSetOperationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackSetOperationsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListStackSetOperationsMiddlewares(stack *middleware return nil } -// ListStackSetOperationsAPIClient is a client that implements the -// ListStackSetOperations operation. -type ListStackSetOperationsAPIClient interface { - ListStackSetOperations(context.Context, *ListStackSetOperationsInput, ...func(*Options)) (*ListStackSetOperationsOutput, error) -} - -var _ ListStackSetOperationsAPIClient = (*Client)(nil) - // ListStackSetOperationsPaginatorOptions is the paginator options for // ListStackSetOperations type ListStackSetOperationsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *ListStackSetOperationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStackSetOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListStackSetOperationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListStackSetOperationsAPIClient is a client that implements the +// ListStackSetOperations operation. +type ListStackSetOperationsAPIClient interface { + ListStackSetOperations(context.Context, *ListStackSetOperationsInput, ...func(*Options)) (*ListStackSetOperationsOutput, error) +} + +var _ ListStackSetOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStackSetOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListStackSets.go b/service/cloudformation/api_op_ListStackSets.go index dae14212d23..44694f0346d 100644 --- a/service/cloudformation/api_op_ListStackSets.go +++ b/service/cloudformation/api_op_ListStackSets.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListStackSetsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStackSets(options.Region), middleware.Before); err != nil { return err } @@ -176,13 +179,6 @@ func (c *Client) addOperationListStackSetsMiddlewares(stack *middleware.Stack, o return nil } -// ListStackSetsAPIClient is a client that implements the ListStackSets operation. -type ListStackSetsAPIClient interface { - ListStackSets(context.Context, *ListStackSetsInput, ...func(*Options)) (*ListStackSetsOutput, error) -} - -var _ ListStackSetsAPIClient = (*Client)(nil) - // ListStackSetsPaginatorOptions is the paginator options for ListStackSets type ListStackSetsPaginatorOptions struct { // The maximum number of results to be returned with a single call. If the number @@ -249,6 +245,9 @@ func (p *ListStackSetsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStackSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +267,13 @@ func (p *ListStackSetsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListStackSetsAPIClient is a client that implements the ListStackSets operation. +type ListStackSetsAPIClient interface { + ListStackSets(context.Context, *ListStackSetsInput, ...func(*Options)) (*ListStackSetsOutput, error) +} + +var _ ListStackSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStackSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListStacks.go b/service/cloudformation/api_op_ListStacks.go index ed81c284304..cad2f367081 100644 --- a/service/cloudformation/api_op_ListStacks.go +++ b/service/cloudformation/api_op_ListStacks.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListStacksMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStacks(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListStacksMiddlewares(stack *middleware.Stack, opti return nil } -// ListStacksAPIClient is a client that implements the ListStacks operation. -type ListStacksAPIClient interface { - ListStacks(context.Context, *ListStacksInput, ...func(*Options)) (*ListStacksOutput, error) -} - -var _ ListStacksAPIClient = (*Client)(nil) - // ListStacksPaginatorOptions is the paginator options for ListStacks type ListStacksPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +195,9 @@ func (p *ListStacksPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStacks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +217,13 @@ func (p *ListStacksPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListStacksAPIClient is a client that implements the ListStacks operation. +type ListStacksAPIClient interface { + ListStacks(context.Context, *ListStacksInput, ...func(*Options)) (*ListStacksOutput, error) +} + +var _ ListStacksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListTypeRegistrations.go b/service/cloudformation/api_op_ListTypeRegistrations.go index e3c302eeeaf..5752375bd72 100644 --- a/service/cloudformation/api_op_ListTypeRegistrations.go +++ b/service/cloudformation/api_op_ListTypeRegistrations.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListTypeRegistrationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTypeRegistrations(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListTypeRegistrationsMiddlewares(stack *middleware. return nil } -// ListTypeRegistrationsAPIClient is a client that implements the -// ListTypeRegistrations operation. -type ListTypeRegistrationsAPIClient interface { - ListTypeRegistrations(context.Context, *ListTypeRegistrationsInput, ...func(*Options)) (*ListTypeRegistrationsOutput, error) -} - -var _ ListTypeRegistrationsAPIClient = (*Client)(nil) - // ListTypeRegistrationsPaginatorOptions is the paginator options for // ListTypeRegistrations type ListTypeRegistrationsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListTypeRegistrationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTypeRegistrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListTypeRegistrationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListTypeRegistrationsAPIClient is a client that implements the +// ListTypeRegistrations operation. +type ListTypeRegistrationsAPIClient interface { + ListTypeRegistrations(context.Context, *ListTypeRegistrationsInput, ...func(*Options)) (*ListTypeRegistrationsOutput, error) +} + +var _ ListTypeRegistrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTypeRegistrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListTypeVersions.go b/service/cloudformation/api_op_ListTypeVersions.go index 76bce2427f6..932ae62af98 100644 --- a/service/cloudformation/api_op_ListTypeVersions.go +++ b/service/cloudformation/api_op_ListTypeVersions.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListTypeVersionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTypeVersions(options.Region), middleware.Before); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationListTypeVersionsMiddlewares(stack *middleware.Stack return nil } -// ListTypeVersionsAPIClient is a client that implements the ListTypeVersions -// operation. -type ListTypeVersionsAPIClient interface { - ListTypeVersions(context.Context, *ListTypeVersionsInput, ...func(*Options)) (*ListTypeVersionsOutput, error) -} - -var _ ListTypeVersionsAPIClient = (*Client)(nil) - // ListTypeVersionsPaginatorOptions is the paginator options for ListTypeVersions type ListTypeVersionsPaginatorOptions struct { // The maximum number of results to be returned with a single call. If the number @@ -251,6 +246,9 @@ func (p *ListTypeVersionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTypeVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *ListTypeVersionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTypeVersionsAPIClient is a client that implements the ListTypeVersions +// operation. +type ListTypeVersionsAPIClient interface { + ListTypeVersions(context.Context, *ListTypeVersionsInput, ...func(*Options)) (*ListTypeVersionsOutput, error) +} + +var _ ListTypeVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTypeVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_ListTypes.go b/service/cloudformation/api_op_ListTypes.go index 8fc97d26a52..c93376965d9 100644 --- a/service/cloudformation/api_op_ListTypes.go +++ b/service/cloudformation/api_op_ListTypes.go @@ -181,6 +181,9 @@ func (c *Client) addOperationListTypesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTypes(options.Region), middleware.Before); err != nil { return err } @@ -202,13 +205,6 @@ func (c *Client) addOperationListTypesMiddlewares(stack *middleware.Stack, optio return nil } -// ListTypesAPIClient is a client that implements the ListTypes operation. -type ListTypesAPIClient interface { - ListTypes(context.Context, *ListTypesInput, ...func(*Options)) (*ListTypesOutput, error) -} - -var _ ListTypesAPIClient = (*Client)(nil) - // ListTypesPaginatorOptions is the paginator options for ListTypes type ListTypesPaginatorOptions struct { // The maximum number of results to be returned with a single call. If the number @@ -275,6 +271,9 @@ func (p *ListTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -294,6 +293,13 @@ func (p *ListTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListTypesAPIClient is a client that implements the ListTypes operation. +type ListTypesAPIClient interface { + ListTypes(context.Context, *ListTypesInput, ...func(*Options)) (*ListTypesOutput, error) +} + +var _ ListTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudformation/api_op_PublishType.go b/service/cloudformation/api_op_PublishType.go index 8a8e039eb7a..9896ad2a945 100644 --- a/service/cloudformation/api_op_PublishType.go +++ b/service/cloudformation/api_op_PublishType.go @@ -144,6 +144,9 @@ func (c *Client) addOperationPublishTypeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPublishType(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_RecordHandlerProgress.go b/service/cloudformation/api_op_RecordHandlerProgress.go index 81e94e06255..48c2a24a65f 100644 --- a/service/cloudformation/api_op_RecordHandlerProgress.go +++ b/service/cloudformation/api_op_RecordHandlerProgress.go @@ -140,6 +140,9 @@ func (c *Client) addOperationRecordHandlerProgressMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRecordHandlerProgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_RegisterPublisher.go b/service/cloudformation/api_op_RegisterPublisher.go index d45a52633ad..3f3acd586a4 100644 --- a/service/cloudformation/api_op_RegisterPublisher.go +++ b/service/cloudformation/api_op_RegisterPublisher.go @@ -125,6 +125,9 @@ func (c *Client) addOperationRegisterPublisherMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterPublisher(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_RegisterType.go b/service/cloudformation/api_op_RegisterType.go index 8d126c118a9..b5e2136d6d5 100644 --- a/service/cloudformation/api_op_RegisterType.go +++ b/service/cloudformation/api_op_RegisterType.go @@ -209,6 +209,9 @@ func (c *Client) addOperationRegisterTypeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_RollbackStack.go b/service/cloudformation/api_op_RollbackStack.go index f9fe271de87..3aec7e3cb42 100644 --- a/service/cloudformation/api_op_RollbackStack.go +++ b/service/cloudformation/api_op_RollbackStack.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRollbackStackMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRollbackStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_SetStackPolicy.go b/service/cloudformation/api_op_SetStackPolicy.go index 3007ab39530..ee677d1d37f 100644 --- a/service/cloudformation/api_op_SetStackPolicy.go +++ b/service/cloudformation/api_op_SetStackPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSetStackPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetStackPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_SetTypeConfiguration.go b/service/cloudformation/api_op_SetTypeConfiguration.go index 60b6959dd08..57b96c60d01 100644 --- a/service/cloudformation/api_op_SetTypeConfiguration.go +++ b/service/cloudformation/api_op_SetTypeConfiguration.go @@ -158,6 +158,9 @@ func (c *Client) addOperationSetTypeConfigurationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTypeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_SetTypeDefaultVersion.go b/service/cloudformation/api_op_SetTypeDefaultVersion.go index 70edb54a29b..5b2db6638f3 100644 --- a/service/cloudformation/api_op_SetTypeDefaultVersion.go +++ b/service/cloudformation/api_op_SetTypeDefaultVersion.go @@ -119,6 +119,9 @@ func (c *Client) addOperationSetTypeDefaultVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetTypeDefaultVersion(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_SignalResource.go b/service/cloudformation/api_op_SignalResource.go index 7e1cc10767f..f7b9a1edfc2 100644 --- a/service/cloudformation/api_op_SignalResource.go +++ b/service/cloudformation/api_op_SignalResource.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSignalResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignalResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_StartResourceScan.go b/service/cloudformation/api_op_StartResourceScan.go index 09fc95d5d93..025406a035e 100644 --- a/service/cloudformation/api_op_StartResourceScan.go +++ b/service/cloudformation/api_op_StartResourceScan.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStartResourceScanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartResourceScan(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_StopStackSetOperation.go b/service/cloudformation/api_op_StopStackSetOperation.go index 9d7ee639e38..abd8b684ddf 100644 --- a/service/cloudformation/api_op_StopStackSetOperation.go +++ b/service/cloudformation/api_op_StopStackSetOperation.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStopStackSetOperationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopStackSetOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_TestType.go b/service/cloudformation/api_op_TestType.go index cbe619b38d1..8086e2cefcd 100644 --- a/service/cloudformation/api_op_TestType.go +++ b/service/cloudformation/api_op_TestType.go @@ -169,6 +169,9 @@ func (c *Client) addOperationTestTypeMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestType(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudformation/api_op_UpdateGeneratedTemplate.go b/service/cloudformation/api_op_UpdateGeneratedTemplate.go index 5e9c9d5067b..11e6760d4cd 100644 --- a/service/cloudformation/api_op_UpdateGeneratedTemplate.go +++ b/service/cloudformation/api_op_UpdateGeneratedTemplate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateGeneratedTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGeneratedTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_UpdateStack.go b/service/cloudformation/api_op_UpdateStack.go index ed63038580f..019b0351e21 100644 --- a/service/cloudformation/api_op_UpdateStack.go +++ b/service/cloudformation/api_op_UpdateStack.go @@ -343,6 +343,9 @@ func (c *Client) addOperationUpdateStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_UpdateStackInstances.go b/service/cloudformation/api_op_UpdateStackInstances.go index 7d5a93ba441..e01a6c64ed3 100644 --- a/service/cloudformation/api_op_UpdateStackInstances.go +++ b/service/cloudformation/api_op_UpdateStackInstances.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdateStackInstancesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateStackInstancesMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_UpdateStackSet.go b/service/cloudformation/api_op_UpdateStackSet.go index 01fb9c39249..85fcf2c34e0 100644 --- a/service/cloudformation/api_op_UpdateStackSet.go +++ b/service/cloudformation/api_op_UpdateStackSet.go @@ -383,6 +383,9 @@ func (c *Client) addOperationUpdateStackSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateStackSetMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudformation/api_op_UpdateTerminationProtection.go b/service/cloudformation/api_op_UpdateTerminationProtection.go index 2e4ffadb233..812ec98fda7 100644 --- a/service/cloudformation/api_op_UpdateTerminationProtection.go +++ b/service/cloudformation/api_op_UpdateTerminationProtection.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateTerminationProtectionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTerminationProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudformation/api_op_ValidateTemplate.go b/service/cloudformation/api_op_ValidateTemplate.go index 764355951a4..15f151641d1 100644 --- a/service/cloudformation/api_op_ValidateTemplate.go +++ b/service/cloudformation/api_op_ValidateTemplate.go @@ -146,6 +146,9 @@ func (c *Client) addOperationValidateTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opValidateTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_client.go b/service/cloudfront/api_client.go index d4432e93917..2a8f5ba3e43 100644 --- a/service/cloudfront/api_client.go +++ b/service/cloudfront/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudfront/api_op_AssociateAlias.go b/service/cloudfront/api_op_AssociateAlias.go index a71458f707f..cdc35f58ea8 100644 --- a/service/cloudfront/api_op_AssociateAlias.go +++ b/service/cloudfront/api_op_AssociateAlias.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAssociateAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CopyDistribution.go b/service/cloudfront/api_op_CopyDistribution.go index ff2c909fa67..5266578565d 100644 --- a/service/cloudfront/api_op_CopyDistribution.go +++ b/service/cloudfront/api_op_CopyDistribution.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCopyDistributionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateCachePolicy.go b/service/cloudfront/api_op_CreateCachePolicy.go index e72d1792e59..1b7b93244e8 100644 --- a/service/cloudfront/api_op_CreateCachePolicy.go +++ b/service/cloudfront/api_op_CreateCachePolicy.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateCachePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCachePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go b/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go index e5a03510937..fe190b4bc09 100644 --- a/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go +++ b/service/cloudfront/api_op_CreateCloudFrontOriginAccessIdentity.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateCloudFrontOriginAccessIdentityMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go b/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go index 956afe145fd..c0ef6ad20b8 100644 --- a/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go +++ b/service/cloudfront/api_op_CreateContinuousDeploymentPolicy.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateContinuousDeploymentPolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateDistribution.go b/service/cloudfront/api_op_CreateDistribution.go index 747263b59ae..d49e09dd80a 100644 --- a/service/cloudfront/api_op_CreateDistribution.go +++ b/service/cloudfront/api_op_CreateDistribution.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateDistributionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateDistributionWithTags.go b/service/cloudfront/api_op_CreateDistributionWithTags.go index b4889ef37d1..32fb190271b 100644 --- a/service/cloudfront/api_op_CreateDistributionWithTags.go +++ b/service/cloudfront/api_op_CreateDistributionWithTags.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateDistributionWithTagsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDistributionWithTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go b/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go index 56308cc0796..113800bb62b 100644 --- a/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go +++ b/service/cloudfront/api_op_CreateFieldLevelEncryptionConfig.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateFieldLevelEncryptionConfigMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go b/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go index 65a31ea5550..5e7d6f1921d 100644 --- a/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go +++ b/service/cloudfront/api_op_CreateFieldLevelEncryptionProfile.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateFieldLevelEncryptionProfileMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateFunction.go b/service/cloudfront/api_op_CreateFunction.go index 267e9462f98..8cb5462092c 100644 --- a/service/cloudfront/api_op_CreateFunction.go +++ b/service/cloudfront/api_op_CreateFunction.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateInvalidation.go b/service/cloudfront/api_op_CreateInvalidation.go index 7b70baf3342..fb01d2eaab4 100644 --- a/service/cloudfront/api_op_CreateInvalidation.go +++ b/service/cloudfront/api_op_CreateInvalidation.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateInvalidationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInvalidationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateKeyGroup.go b/service/cloudfront/api_op_CreateKeyGroup.go index 48e155b132c..bb9a709e56d 100644 --- a/service/cloudfront/api_op_CreateKeyGroup.go +++ b/service/cloudfront/api_op_CreateKeyGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateKeyGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateKeyValueStore.go b/service/cloudfront/api_op_CreateKeyValueStore.go index 12d21eb433c..71852f57d71 100644 --- a/service/cloudfront/api_op_CreateKeyValueStore.go +++ b/service/cloudfront/api_op_CreateKeyValueStore.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateKeyValueStoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyValueStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateMonitoringSubscription.go b/service/cloudfront/api_op_CreateMonitoringSubscription.go index 863806feb4a..488db17f33c 100644 --- a/service/cloudfront/api_op_CreateMonitoringSubscription.go +++ b/service/cloudfront/api_op_CreateMonitoringSubscription.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateMonitoringSubscriptionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMonitoringSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateOriginAccessControl.go b/service/cloudfront/api_op_CreateOriginAccessControl.go index 86eb88e1db8..6160f7f0a19 100644 --- a/service/cloudfront/api_op_CreateOriginAccessControl.go +++ b/service/cloudfront/api_op_CreateOriginAccessControl.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateOriginAccessControlMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOriginAccessControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateOriginRequestPolicy.go b/service/cloudfront/api_op_CreateOriginRequestPolicy.go index bdecc92726e..601b8d6a0f6 100644 --- a/service/cloudfront/api_op_CreateOriginRequestPolicy.go +++ b/service/cloudfront/api_op_CreateOriginRequestPolicy.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateOriginRequestPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOriginRequestPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreatePublicKey.go b/service/cloudfront/api_op_CreatePublicKey.go index 5f88914fe8d..a0ec138b58a 100644 --- a/service/cloudfront/api_op_CreatePublicKey.go +++ b/service/cloudfront/api_op_CreatePublicKey.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreatePublicKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateRealtimeLogConfig.go b/service/cloudfront/api_op_CreateRealtimeLogConfig.go index 48ae66520aa..7bf0898d8ef 100644 --- a/service/cloudfront/api_op_CreateRealtimeLogConfig.go +++ b/service/cloudfront/api_op_CreateRealtimeLogConfig.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateRealtimeLogConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRealtimeLogConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateResponseHeadersPolicy.go b/service/cloudfront/api_op_CreateResponseHeadersPolicy.go index 2f12fb2952e..b2a19e90304 100644 --- a/service/cloudfront/api_op_CreateResponseHeadersPolicy.go +++ b/service/cloudfront/api_op_CreateResponseHeadersPolicy.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateResponseHeadersPolicyMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResponseHeadersPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateStreamingDistribution.go b/service/cloudfront/api_op_CreateStreamingDistribution.go index 561b687b52a..c25dadeb5cb 100644 --- a/service/cloudfront/api_op_CreateStreamingDistribution.go +++ b/service/cloudfront/api_op_CreateStreamingDistribution.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateStreamingDistributionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamingDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go b/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go index f619e9aed02..d51edbaa7aa 100644 --- a/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go +++ b/service/cloudfront/api_op_CreateStreamingDistributionWithTags.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateStreamingDistributionWithTagsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamingDistributionWithTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteCachePolicy.go b/service/cloudfront/api_op_DeleteCachePolicy.go index edd91c01f14..62291e472fb 100644 --- a/service/cloudfront/api_op_DeleteCachePolicy.go +++ b/service/cloudfront/api_op_DeleteCachePolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteCachePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCachePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go b/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go index 989a3806636..f6e4b5a7b9b 100644 --- a/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go +++ b/service/cloudfront/api_op_DeleteCloudFrontOriginAccessIdentity.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCloudFrontOriginAccessIdentityMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go b/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go index 87f9e5ecefa..1ad80b6f365 100644 --- a/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go +++ b/service/cloudfront/api_op_DeleteContinuousDeploymentPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteContinuousDeploymentPolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteDistribution.go b/service/cloudfront/api_op_DeleteDistribution.go index 4694ae94808..809b713eb0e 100644 --- a/service/cloudfront/api_op_DeleteDistribution.go +++ b/service/cloudfront/api_op_DeleteDistribution.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDeleteDistributionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go b/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go index 40d4c9a3f25..294651b6ba5 100644 --- a/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go +++ b/service/cloudfront/api_op_DeleteFieldLevelEncryptionConfig.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteFieldLevelEncryptionConfigMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go b/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go index 140e4a6b2c0..0bf700347bc 100644 --- a/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go +++ b/service/cloudfront/api_op_DeleteFieldLevelEncryptionProfile.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteFieldLevelEncryptionProfileMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteFunction.go b/service/cloudfront/api_op_DeleteFunction.go index 15fc59934a2..b8025e8a0b7 100644 --- a/service/cloudfront/api_op_DeleteFunction.go +++ b/service/cloudfront/api_op_DeleteFunction.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteKeyGroup.go b/service/cloudfront/api_op_DeleteKeyGroup.go index 4244bbb3f72..f8351f8bce9 100644 --- a/service/cloudfront/api_op_DeleteKeyGroup.go +++ b/service/cloudfront/api_op_DeleteKeyGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteKeyGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteKeyValueStore.go b/service/cloudfront/api_op_DeleteKeyValueStore.go index 1ca456019dd..b482318de02 100644 --- a/service/cloudfront/api_op_DeleteKeyValueStore.go +++ b/service/cloudfront/api_op_DeleteKeyValueStore.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteKeyValueStoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeyValueStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteMonitoringSubscription.go b/service/cloudfront/api_op_DeleteMonitoringSubscription.go index 9b1b24e79cf..d7a2e85c490 100644 --- a/service/cloudfront/api_op_DeleteMonitoringSubscription.go +++ b/service/cloudfront/api_op_DeleteMonitoringSubscription.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteMonitoringSubscriptionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMonitoringSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteOriginAccessControl.go b/service/cloudfront/api_op_DeleteOriginAccessControl.go index 48bd5ff336d..80d8645b467 100644 --- a/service/cloudfront/api_op_DeleteOriginAccessControl.go +++ b/service/cloudfront/api_op_DeleteOriginAccessControl.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteOriginAccessControlMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOriginAccessControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteOriginRequestPolicy.go b/service/cloudfront/api_op_DeleteOriginRequestPolicy.go index 96c95fba585..317c8fbc50b 100644 --- a/service/cloudfront/api_op_DeleteOriginRequestPolicy.go +++ b/service/cloudfront/api_op_DeleteOriginRequestPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteOriginRequestPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOriginRequestPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeletePublicKey.go b/service/cloudfront/api_op_DeletePublicKey.go index 84273a40de8..532b7fd7050 100644 --- a/service/cloudfront/api_op_DeletePublicKey.go +++ b/service/cloudfront/api_op_DeletePublicKey.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeletePublicKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteRealtimeLogConfig.go b/service/cloudfront/api_op_DeleteRealtimeLogConfig.go index 49332d3e707..2fac3df12cd 100644 --- a/service/cloudfront/api_op_DeleteRealtimeLogConfig.go +++ b/service/cloudfront/api_op_DeleteRealtimeLogConfig.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteRealtimeLogConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRealtimeLogConfig(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go b/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go index 32bce03ad0d..ea3740d1070 100644 --- a/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go +++ b/service/cloudfront/api_op_DeleteResponseHeadersPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteResponseHeadersPolicyMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResponseHeadersPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DeleteStreamingDistribution.go b/service/cloudfront/api_op_DeleteStreamingDistribution.go index 2f8f9e09cb6..ac2264ecb6f 100644 --- a/service/cloudfront/api_op_DeleteStreamingDistribution.go +++ b/service/cloudfront/api_op_DeleteStreamingDistribution.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeleteStreamingDistributionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStreamingDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DescribeFunction.go b/service/cloudfront/api_op_DescribeFunction.go index ab01411cc53..ed69f7d709a 100644 --- a/service/cloudfront/api_op_DescribeFunction.go +++ b/service/cloudfront/api_op_DescribeFunction.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeFunctionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_DescribeKeyValueStore.go b/service/cloudfront/api_op_DescribeKeyValueStore.go index 1342ac7a1a3..b56b5d6d65c 100644 --- a/service/cloudfront/api_op_DescribeKeyValueStore.go +++ b/service/cloudfront/api_op_DescribeKeyValueStore.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeKeyValueStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKeyValueStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetCachePolicy.go b/service/cloudfront/api_op_GetCachePolicy.go index cc8aec16725..137d4ab723e 100644 --- a/service/cloudfront/api_op_GetCachePolicy.go +++ b/service/cloudfront/api_op_GetCachePolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetCachePolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCachePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetCachePolicyConfig.go b/service/cloudfront/api_op_GetCachePolicyConfig.go index 18bfc3d9794..88c28d70bb9 100644 --- a/service/cloudfront/api_op_GetCachePolicyConfig.go +++ b/service/cloudfront/api_op_GetCachePolicyConfig.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetCachePolicyConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCachePolicyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go b/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go index c4b08ca6fcd..b2b5972dc5f 100644 --- a/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go +++ b/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentity.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetCloudFrontOriginAccessIdentityMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go b/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go index 8eefe0727e2..515b731cb6a 100644 --- a/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go +++ b/service/cloudfront/api_op_GetCloudFrontOriginAccessIdentityConfig.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetCloudFrontOriginAccessIdentityConfigMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCloudFrontOriginAccessIdentityConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go b/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go index 4e83e6eb1d6..a3ee0617625 100644 --- a/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go +++ b/service/cloudfront/api_op_GetContinuousDeploymentPolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetContinuousDeploymentPolicyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go b/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go index 7a89e06f5d4..c6c57cfd7bd 100644 --- a/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go +++ b/service/cloudfront/api_op_GetContinuousDeploymentPolicyConfig.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetContinuousDeploymentPolicyConfigMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContinuousDeploymentPolicyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetDistribution.go b/service/cloudfront/api_op_GetDistribution.go index d6a4586ca45..06e69175ba5 100644 --- a/service/cloudfront/api_op_GetDistribution.go +++ b/service/cloudfront/api_op_GetDistribution.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDistributionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDistributionValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationGetDistributionMiddlewares(stack *middleware.Stack, return nil } -// GetDistributionAPIClient is a client that implements the GetDistribution -// operation. -type GetDistributionAPIClient interface { - GetDistribution(context.Context, *GetDistributionInput, ...func(*Options)) (*GetDistributionOutput, error) -} - -var _ GetDistributionAPIClient = (*Client)(nil) - // DistributionDeployedWaiterOptions are waiter options for // DistributionDeployedWaiter type DistributionDeployedWaiterOptions struct { @@ -266,7 +261,13 @@ func (w *DistributionDeployedWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetDistribution(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -324,6 +325,14 @@ func distributionDeployedStateRetryable(ctx context.Context, input *GetDistribut return true, nil } +// GetDistributionAPIClient is a client that implements the GetDistribution +// operation. +type GetDistributionAPIClient interface { + GetDistribution(context.Context, *GetDistributionInput, ...func(*Options)) (*GetDistributionOutput, error) +} + +var _ GetDistributionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDistribution(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_GetDistributionConfig.go b/service/cloudfront/api_op_GetDistributionConfig.go index 8ea1a1decba..f8a46d5b998 100644 --- a/service/cloudfront/api_op_GetDistributionConfig.go +++ b/service/cloudfront/api_op_GetDistributionConfig.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDistributionConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDistributionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetFieldLevelEncryption.go b/service/cloudfront/api_op_GetFieldLevelEncryption.go index 942fd895ccd..349991446cf 100644 --- a/service/cloudfront/api_op_GetFieldLevelEncryption.go +++ b/service/cloudfront/api_op_GetFieldLevelEncryption.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetFieldLevelEncryptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFieldLevelEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go b/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go index 125ac6c4c6a..a21a227f915 100644 --- a/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go +++ b/service/cloudfront/api_op_GetFieldLevelEncryptionConfig.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetFieldLevelEncryptionConfigMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go b/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go index 2fbc71c733a..23a904fe519 100644 --- a/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go +++ b/service/cloudfront/api_op_GetFieldLevelEncryptionProfile.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetFieldLevelEncryptionProfileMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go b/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go index 4d414b121a8..d945ce1a79c 100644 --- a/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go +++ b/service/cloudfront/api_op_GetFieldLevelEncryptionProfileConfig.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetFieldLevelEncryptionProfileConfigMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFieldLevelEncryptionProfileConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetFunction.go b/service/cloudfront/api_op_GetFunction.go index 51b9409b41a..cd2552e8db4 100644 --- a/service/cloudfront/api_op_GetFunction.go +++ b/service/cloudfront/api_op_GetFunction.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetInvalidation.go b/service/cloudfront/api_op_GetInvalidation.go index 7f2b95120ce..927ab21affd 100644 --- a/service/cloudfront/api_op_GetInvalidation.go +++ b/service/cloudfront/api_op_GetInvalidation.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetInvalidationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInvalidationValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationGetInvalidationMiddlewares(stack *middleware.Stack, return nil } -// GetInvalidationAPIClient is a client that implements the GetInvalidation -// operation. -type GetInvalidationAPIClient interface { - GetInvalidation(context.Context, *GetInvalidationInput, ...func(*Options)) (*GetInvalidationOutput, error) -} - -var _ GetInvalidationAPIClient = (*Client)(nil) - // InvalidationCompletedWaiterOptions are waiter options for // InvalidationCompletedWaiter type InvalidationCompletedWaiterOptions struct { @@ -268,7 +263,13 @@ func (w *InvalidationCompletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetInvalidation(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -326,6 +327,14 @@ func invalidationCompletedStateRetryable(ctx context.Context, input *GetInvalida return true, nil } +// GetInvalidationAPIClient is a client that implements the GetInvalidation +// operation. +type GetInvalidationAPIClient interface { + GetInvalidation(context.Context, *GetInvalidationInput, ...func(*Options)) (*GetInvalidationOutput, error) +} + +var _ GetInvalidationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInvalidation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_GetKeyGroup.go b/service/cloudfront/api_op_GetKeyGroup.go index bfa3f46c578..400a27c030c 100644 --- a/service/cloudfront/api_op_GetKeyGroup.go +++ b/service/cloudfront/api_op_GetKeyGroup.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetKeyGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetKeyGroupConfig.go b/service/cloudfront/api_op_GetKeyGroupConfig.go index 9d8121db93a..4008f5d9642 100644 --- a/service/cloudfront/api_op_GetKeyGroupConfig.go +++ b/service/cloudfront/api_op_GetKeyGroupConfig.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetKeyGroupConfigMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyGroupConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetMonitoringSubscription.go b/service/cloudfront/api_op_GetMonitoringSubscription.go index 807618e595e..a43fb02037f 100644 --- a/service/cloudfront/api_op_GetMonitoringSubscription.go +++ b/service/cloudfront/api_op_GetMonitoringSubscription.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetMonitoringSubscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMonitoringSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetOriginAccessControl.go b/service/cloudfront/api_op_GetOriginAccessControl.go index 0931296aab1..bd0f1b0169f 100644 --- a/service/cloudfront/api_op_GetOriginAccessControl.go +++ b/service/cloudfront/api_op_GetOriginAccessControl.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetOriginAccessControlMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOriginAccessControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetOriginAccessControlConfig.go b/service/cloudfront/api_op_GetOriginAccessControlConfig.go index 11fa50bea11..42c07c3e075 100644 --- a/service/cloudfront/api_op_GetOriginAccessControlConfig.go +++ b/service/cloudfront/api_op_GetOriginAccessControlConfig.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetOriginAccessControlConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOriginAccessControlConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetOriginRequestPolicy.go b/service/cloudfront/api_op_GetOriginRequestPolicy.go index 1cc52466df9..9fccdb67959 100644 --- a/service/cloudfront/api_op_GetOriginRequestPolicy.go +++ b/service/cloudfront/api_op_GetOriginRequestPolicy.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetOriginRequestPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOriginRequestPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go b/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go index ade97693925..cea16c721a0 100644 --- a/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go +++ b/service/cloudfront/api_op_GetOriginRequestPolicyConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetOriginRequestPolicyConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOriginRequestPolicyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetPublicKey.go b/service/cloudfront/api_op_GetPublicKey.go index 04d489aeb7d..6f138f84997 100644 --- a/service/cloudfront/api_op_GetPublicKey.go +++ b/service/cloudfront/api_op_GetPublicKey.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetPublicKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetPublicKeyConfig.go b/service/cloudfront/api_op_GetPublicKeyConfig.go index 2f4d57e0d2b..89cbecf0435 100644 --- a/service/cloudfront/api_op_GetPublicKeyConfig.go +++ b/service/cloudfront/api_op_GetPublicKeyConfig.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetPublicKeyConfigMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPublicKeyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetRealtimeLogConfig.go b/service/cloudfront/api_op_GetRealtimeLogConfig.go index a2f396432da..aaa46d88a3b 100644 --- a/service/cloudfront/api_op_GetRealtimeLogConfig.go +++ b/service/cloudfront/api_op_GetRealtimeLogConfig.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetRealtimeLogConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRealtimeLogConfig(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_GetResponseHeadersPolicy.go b/service/cloudfront/api_op_GetResponseHeadersPolicy.go index bc7501b639c..a0bb571f325 100644 --- a/service/cloudfront/api_op_GetResponseHeadersPolicy.go +++ b/service/cloudfront/api_op_GetResponseHeadersPolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetResponseHeadersPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResponseHeadersPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go b/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go index 225cf3dac55..2cd24b472c5 100644 --- a/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go +++ b/service/cloudfront/api_op_GetResponseHeadersPolicyConfig.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetResponseHeadersPolicyConfigMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResponseHeadersPolicyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_GetStreamingDistribution.go b/service/cloudfront/api_op_GetStreamingDistribution.go index 35c617b7948..c9f25e85293 100644 --- a/service/cloudfront/api_op_GetStreamingDistribution.go +++ b/service/cloudfront/api_op_GetStreamingDistribution.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetStreamingDistributionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamingDistributionValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationGetStreamingDistributionMiddlewares(stack *middlewa return nil } -// GetStreamingDistributionAPIClient is a client that implements the -// GetStreamingDistribution operation. -type GetStreamingDistributionAPIClient interface { - GetStreamingDistribution(context.Context, *GetStreamingDistributionInput, ...func(*Options)) (*GetStreamingDistributionOutput, error) -} - -var _ GetStreamingDistributionAPIClient = (*Client)(nil) - // StreamingDistributionDeployedWaiterOptions are waiter options for // StreamingDistributionDeployedWaiter type StreamingDistributionDeployedWaiterOptions struct { @@ -269,7 +264,13 @@ func (w *StreamingDistributionDeployedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetStreamingDistribution(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -327,6 +328,14 @@ func streamingDistributionDeployedStateRetryable(ctx context.Context, input *Get return true, nil } +// GetStreamingDistributionAPIClient is a client that implements the +// GetStreamingDistribution operation. +type GetStreamingDistributionAPIClient interface { + GetStreamingDistribution(context.Context, *GetStreamingDistributionInput, ...func(*Options)) (*GetStreamingDistributionOutput, error) +} + +var _ GetStreamingDistributionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStreamingDistribution(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_GetStreamingDistributionConfig.go b/service/cloudfront/api_op_GetStreamingDistributionConfig.go index 839d9a739d4..4530bf588df 100644 --- a/service/cloudfront/api_op_GetStreamingDistributionConfig.go +++ b/service/cloudfront/api_op_GetStreamingDistributionConfig.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetStreamingDistributionConfigMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamingDistributionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListCachePolicies.go b/service/cloudfront/api_op_ListCachePolicies.go index 3ed9ca3cc21..f954af3f03f 100644 --- a/service/cloudfront/api_op_ListCachePolicies.go +++ b/service/cloudfront/api_op_ListCachePolicies.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListCachePoliciesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCachePolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go b/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go index 74624e5ae00..a7c6994101d 100644 --- a/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go +++ b/service/cloudfront/api_op_ListCloudFrontOriginAccessIdentities.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListCloudFrontOriginAccessIdentitiesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCloudFrontOriginAccessIdentities(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListCloudFrontOriginAccessIdentitiesMiddlewares(sta return nil } -// ListCloudFrontOriginAccessIdentitiesAPIClient is a client that implements the -// ListCloudFrontOriginAccessIdentities operation. -type ListCloudFrontOriginAccessIdentitiesAPIClient interface { - ListCloudFrontOriginAccessIdentities(context.Context, *ListCloudFrontOriginAccessIdentitiesInput, ...func(*Options)) (*ListCloudFrontOriginAccessIdentitiesOutput, error) -} - -var _ ListCloudFrontOriginAccessIdentitiesAPIClient = (*Client)(nil) - // ListCloudFrontOriginAccessIdentitiesPaginatorOptions is the paginator options // for ListCloudFrontOriginAccessIdentities type ListCloudFrontOriginAccessIdentitiesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListCloudFrontOriginAccessIdentitiesPaginator) NextPage(ctx context.Con } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCloudFrontOriginAccessIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListCloudFrontOriginAccessIdentitiesPaginator) NextPage(ctx context.Con return result, nil } +// ListCloudFrontOriginAccessIdentitiesAPIClient is a client that implements the +// ListCloudFrontOriginAccessIdentities operation. +type ListCloudFrontOriginAccessIdentitiesAPIClient interface { + ListCloudFrontOriginAccessIdentities(context.Context, *ListCloudFrontOriginAccessIdentitiesInput, ...func(*Options)) (*ListCloudFrontOriginAccessIdentitiesOutput, error) +} + +var _ ListCloudFrontOriginAccessIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCloudFrontOriginAccessIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_ListConflictingAliases.go b/service/cloudfront/api_op_ListConflictingAliases.go index 667f63235aa..4f75e354a5b 100644 --- a/service/cloudfront/api_op_ListConflictingAliases.go +++ b/service/cloudfront/api_op_ListConflictingAliases.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListConflictingAliasesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConflictingAliasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go b/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go index 306c81c8f90..412818e7f2c 100644 --- a/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go +++ b/service/cloudfront/api_op_ListContinuousDeploymentPolicies.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListContinuousDeploymentPoliciesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContinuousDeploymentPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListDistributions.go b/service/cloudfront/api_op_ListDistributions.go index 09ed67f5d57..22969738b74 100644 --- a/service/cloudfront/api_op_ListDistributions.go +++ b/service/cloudfront/api_op_ListDistributions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDistributionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributions(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListDistributionsMiddlewares(stack *middleware.Stac return nil } -// ListDistributionsAPIClient is a client that implements the ListDistributions -// operation. -type ListDistributionsAPIClient interface { - ListDistributions(context.Context, *ListDistributionsInput, ...func(*Options)) (*ListDistributionsOutput, error) -} - -var _ ListDistributionsAPIClient = (*Client)(nil) - // ListDistributionsPaginatorOptions is the paginator options for ListDistributions type ListDistributionsPaginatorOptions struct { // The maximum number of distributions you want in the response body. @@ -205,6 +200,9 @@ func (p *ListDistributionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDistributions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListDistributionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListDistributionsAPIClient is a client that implements the ListDistributions +// operation. +type ListDistributionsAPIClient interface { + ListDistributions(context.Context, *ListDistributionsInput, ...func(*Options)) (*ListDistributionsOutput, error) +} + +var _ ListDistributionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDistributions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go b/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go index 695bacd71a4..17f07f49105 100644 --- a/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go +++ b/service/cloudfront/api_op_ListDistributionsByCachePolicyId.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDistributionsByCachePolicyIdMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDistributionsByCachePolicyIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListDistributionsByKeyGroup.go b/service/cloudfront/api_op_ListDistributionsByKeyGroup.go index 45927e3c6eb..5e99049ce9c 100644 --- a/service/cloudfront/api_op_ListDistributionsByKeyGroup.go +++ b/service/cloudfront/api_op_ListDistributionsByKeyGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDistributionsByKeyGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDistributionsByKeyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go b/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go index a2e40c80acb..bd7fd81cd89 100644 --- a/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go +++ b/service/cloudfront/api_op_ListDistributionsByOriginRequestPolicyId.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDistributionsByOriginRequestPolicyIdMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDistributionsByOriginRequestPolicyIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go b/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go index 19020966de9..eb2e1477e84 100644 --- a/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go +++ b/service/cloudfront/api_op_ListDistributionsByRealtimeLogConfig.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListDistributionsByRealtimeLogConfigMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionsByRealtimeLogConfig(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go b/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go index c64405647f7..3aea8b52cb1 100644 --- a/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go +++ b/service/cloudfront/api_op_ListDistributionsByResponseHeadersPolicyId.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDistributionsByResponseHeadersPolicyIdMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDistributionsByResponseHeadersPolicyIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListDistributionsByWebACLId.go b/service/cloudfront/api_op_ListDistributionsByWebACLId.go index 9583fc111d4..cc1526bbcbb 100644 --- a/service/cloudfront/api_op_ListDistributionsByWebACLId.go +++ b/service/cloudfront/api_op_ListDistributionsByWebACLId.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListDistributionsByWebACLIdMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDistributionsByWebACLIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go b/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go index 4284ef765de..896925ba8cd 100644 --- a/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go +++ b/service/cloudfront/api_op_ListFieldLevelEncryptionConfigs.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListFieldLevelEncryptionConfigsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFieldLevelEncryptionConfigs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go b/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go index 02a695714f8..57feb677c10 100644 --- a/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go +++ b/service/cloudfront/api_op_ListFieldLevelEncryptionProfiles.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListFieldLevelEncryptionProfilesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFieldLevelEncryptionProfiles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListFunctions.go b/service/cloudfront/api_op_ListFunctions.go index 0bfd6d536c8..e073e723ddf 100644 --- a/service/cloudfront/api_op_ListFunctions.go +++ b/service/cloudfront/api_op_ListFunctions.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListInvalidations.go b/service/cloudfront/api_op_ListInvalidations.go index cc0194ae1fc..798a7740b78 100644 --- a/service/cloudfront/api_op_ListInvalidations.go +++ b/service/cloudfront/api_op_ListInvalidations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListInvalidationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInvalidationsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListInvalidationsMiddlewares(stack *middleware.Stac return nil } -// ListInvalidationsAPIClient is a client that implements the ListInvalidations -// operation. -type ListInvalidationsAPIClient interface { - ListInvalidations(context.Context, *ListInvalidationsInput, ...func(*Options)) (*ListInvalidationsOutput, error) -} - -var _ ListInvalidationsAPIClient = (*Client)(nil) - // ListInvalidationsPaginatorOptions is the paginator options for ListInvalidations type ListInvalidationsPaginatorOptions struct { // The maximum number of invalidation batches that you want in the response body. @@ -215,6 +210,9 @@ func (p *ListInvalidationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInvalidations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListInvalidationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListInvalidationsAPIClient is a client that implements the ListInvalidations +// operation. +type ListInvalidationsAPIClient interface { + ListInvalidations(context.Context, *ListInvalidationsInput, ...func(*Options)) (*ListInvalidationsOutput, error) +} + +var _ ListInvalidationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInvalidations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_ListKeyGroups.go b/service/cloudfront/api_op_ListKeyGroups.go index a624f9004aa..dbafa6c74ba 100644 --- a/service/cloudfront/api_op_ListKeyGroups.go +++ b/service/cloudfront/api_op_ListKeyGroups.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListKeyGroupsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListKeyValueStores.go b/service/cloudfront/api_op_ListKeyValueStores.go index 41cd754886f..a57a4ccadb6 100644 --- a/service/cloudfront/api_op_ListKeyValueStores.go +++ b/service/cloudfront/api_op_ListKeyValueStores.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListKeyValueStoresMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyValueStores(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListKeyValueStoresMiddlewares(stack *middleware.Sta return nil } -// ListKeyValueStoresAPIClient is a client that implements the ListKeyValueStores -// operation. -type ListKeyValueStoresAPIClient interface { - ListKeyValueStores(context.Context, *ListKeyValueStoresInput, ...func(*Options)) (*ListKeyValueStoresOutput, error) -} - -var _ ListKeyValueStoresAPIClient = (*Client)(nil) - // ListKeyValueStoresPaginatorOptions is the paginator options for // ListKeyValueStores type ListKeyValueStoresPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListKeyValueStoresPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeyValueStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListKeyValueStoresPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListKeyValueStoresAPIClient is a client that implements the ListKeyValueStores +// operation. +type ListKeyValueStoresAPIClient interface { + ListKeyValueStores(context.Context, *ListKeyValueStoresInput, ...func(*Options)) (*ListKeyValueStoresOutput, error) +} + +var _ ListKeyValueStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeyValueStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_ListOriginAccessControls.go b/service/cloudfront/api_op_ListOriginAccessControls.go index de95a76b56b..e8921578e60 100644 --- a/service/cloudfront/api_op_ListOriginAccessControls.go +++ b/service/cloudfront/api_op_ListOriginAccessControls.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListOriginAccessControlsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginAccessControls(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListOriginRequestPolicies.go b/service/cloudfront/api_op_ListOriginRequestPolicies.go index 99d6b49a3b0..74ad0e55b7b 100644 --- a/service/cloudfront/api_op_ListOriginRequestPolicies.go +++ b/service/cloudfront/api_op_ListOriginRequestPolicies.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListOriginRequestPoliciesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginRequestPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListPublicKeys.go b/service/cloudfront/api_op_ListPublicKeys.go index 16a49a48bc5..cd73e396500 100644 --- a/service/cloudfront/api_op_ListPublicKeys.go +++ b/service/cloudfront/api_op_ListPublicKeys.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListPublicKeysMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPublicKeys(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListRealtimeLogConfigs.go b/service/cloudfront/api_op_ListRealtimeLogConfigs.go index 98a99caea19..ae22349d13c 100644 --- a/service/cloudfront/api_op_ListRealtimeLogConfigs.go +++ b/service/cloudfront/api_op_ListRealtimeLogConfigs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRealtimeLogConfigsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRealtimeLogConfigs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListResponseHeadersPolicies.go b/service/cloudfront/api_op_ListResponseHeadersPolicies.go index 2fcaf72e191..7e721c10bf3 100644 --- a/service/cloudfront/api_op_ListResponseHeadersPolicies.go +++ b/service/cloudfront/api_op_ListResponseHeadersPolicies.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListResponseHeadersPoliciesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResponseHeadersPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudfront/api_op_ListStreamingDistributions.go b/service/cloudfront/api_op_ListStreamingDistributions.go index a2d4ff92ca7..3289d2e6367 100644 --- a/service/cloudfront/api_op_ListStreamingDistributions.go +++ b/service/cloudfront/api_op_ListStreamingDistributions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListStreamingDistributionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreamingDistributions(options.Region), middleware.Before); err != nil { return err } @@ -130,14 +133,6 @@ func (c *Client) addOperationListStreamingDistributionsMiddlewares(stack *middle return nil } -// ListStreamingDistributionsAPIClient is a client that implements the -// ListStreamingDistributions operation. -type ListStreamingDistributionsAPIClient interface { - ListStreamingDistributions(context.Context, *ListStreamingDistributionsInput, ...func(*Options)) (*ListStreamingDistributionsOutput, error) -} - -var _ ListStreamingDistributionsAPIClient = (*Client)(nil) - // ListStreamingDistributionsPaginatorOptions is the paginator options for // ListStreamingDistributions type ListStreamingDistributionsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListStreamingDistributionsPaginator) NextPage(ctx context.Context, optF } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamingDistributions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListStreamingDistributionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListStreamingDistributionsAPIClient is a client that implements the +// ListStreamingDistributions operation. +type ListStreamingDistributionsAPIClient interface { + ListStreamingDistributions(context.Context, *ListStreamingDistributionsInput, ...func(*Options)) (*ListStreamingDistributionsOutput, error) +} + +var _ ListStreamingDistributionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamingDistributions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfront/api_op_ListTagsForResource.go b/service/cloudfront/api_op_ListTagsForResource.go index 29a1a4e98c9..84585fd700b 100644 --- a/service/cloudfront/api_op_ListTagsForResource.go +++ b/service/cloudfront/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_PublishFunction.go b/service/cloudfront/api_op_PublishFunction.go index 198dd6216aa..d5eab4d2171 100644 --- a/service/cloudfront/api_op_PublishFunction.go +++ b/service/cloudfront/api_op_PublishFunction.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPublishFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_TagResource.go b/service/cloudfront/api_op_TagResource.go index cb800ddf914..fb978b5dcff 100644 --- a/service/cloudfront/api_op_TagResource.go +++ b/service/cloudfront/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_TestFunction.go b/service/cloudfront/api_op_TestFunction.go index ed8e746e3f1..ead70c56bc2 100644 --- a/service/cloudfront/api_op_TestFunction.go +++ b/service/cloudfront/api_op_TestFunction.go @@ -138,6 +138,9 @@ func (c *Client) addOperationTestFunctionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UntagResource.go b/service/cloudfront/api_op_UntagResource.go index 97a01694652..32916f48c82 100644 --- a/service/cloudfront/api_op_UntagResource.go +++ b/service/cloudfront/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateCachePolicy.go b/service/cloudfront/api_op_UpdateCachePolicy.go index a38cf5622c1..9175620d621 100644 --- a/service/cloudfront/api_op_UpdateCachePolicy.go +++ b/service/cloudfront/api_op_UpdateCachePolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateCachePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCachePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go b/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go index d119d9fc7de..8a9ecafc748 100644 --- a/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go +++ b/service/cloudfront/api_op_UpdateCloudFrontOriginAccessIdentity.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateCloudFrontOriginAccessIdentityMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCloudFrontOriginAccessIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go b/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go index 78b4ee37abb..1d57c6625a0 100644 --- a/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go +++ b/service/cloudfront/api_op_UpdateContinuousDeploymentPolicy.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateContinuousDeploymentPolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContinuousDeploymentPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateDistribution.go b/service/cloudfront/api_op_UpdateDistribution.go index 3b1eac6e3e9..fe536d26cd0 100644 --- a/service/cloudfront/api_op_UpdateDistribution.go +++ b/service/cloudfront/api_op_UpdateDistribution.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateDistributionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go b/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go index 14a86319497..3bd1c1c824a 100644 --- a/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go +++ b/service/cloudfront/api_op_UpdateDistributionWithStagingConfig.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateDistributionWithStagingConfigMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDistributionWithStagingConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go b/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go index 03ed334e1ea..c136c1fb431 100644 --- a/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go +++ b/service/cloudfront/api_op_UpdateFieldLevelEncryptionConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateFieldLevelEncryptionConfigMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFieldLevelEncryptionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go b/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go index d6234fd2dd0..e753c96fe27 100644 --- a/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go +++ b/service/cloudfront/api_op_UpdateFieldLevelEncryptionProfile.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateFieldLevelEncryptionProfileMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFieldLevelEncryptionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateFunction.go b/service/cloudfront/api_op_UpdateFunction.go index 5a81e54539f..1f070b63508 100644 --- a/service/cloudfront/api_op_UpdateFunction.go +++ b/service/cloudfront/api_op_UpdateFunction.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateKeyGroup.go b/service/cloudfront/api_op_UpdateKeyGroup.go index 861bdb40ae5..cb901b6ddde 100644 --- a/service/cloudfront/api_op_UpdateKeyGroup.go +++ b/service/cloudfront/api_op_UpdateKeyGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateKeyGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKeyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateKeyValueStore.go b/service/cloudfront/api_op_UpdateKeyValueStore.go index 2762ae46a3f..29bdd4566ad 100644 --- a/service/cloudfront/api_op_UpdateKeyValueStore.go +++ b/service/cloudfront/api_op_UpdateKeyValueStore.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateKeyValueStoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKeyValueStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateOriginAccessControl.go b/service/cloudfront/api_op_UpdateOriginAccessControl.go index 854ecf938ae..c8dc2293cc0 100644 --- a/service/cloudfront/api_op_UpdateOriginAccessControl.go +++ b/service/cloudfront/api_op_UpdateOriginAccessControl.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateOriginAccessControlMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOriginAccessControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateOriginRequestPolicy.go b/service/cloudfront/api_op_UpdateOriginRequestPolicy.go index ba08b262855..39c632b0a1e 100644 --- a/service/cloudfront/api_op_UpdateOriginRequestPolicy.go +++ b/service/cloudfront/api_op_UpdateOriginRequestPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateOriginRequestPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOriginRequestPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdatePublicKey.go b/service/cloudfront/api_op_UpdatePublicKey.go index 39e8f0dbf0e..f7203e00b77 100644 --- a/service/cloudfront/api_op_UpdatePublicKey.go +++ b/service/cloudfront/api_op_UpdatePublicKey.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdatePublicKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateRealtimeLogConfig.go b/service/cloudfront/api_op_UpdateRealtimeLogConfig.go index c35cb339595..3c1cb06c50d 100644 --- a/service/cloudfront/api_op_UpdateRealtimeLogConfig.go +++ b/service/cloudfront/api_op_UpdateRealtimeLogConfig.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateRealtimeLogConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRealtimeLogConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go b/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go index 9f340722f38..b448369f5aa 100644 --- a/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go +++ b/service/cloudfront/api_op_UpdateResponseHeadersPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateResponseHeadersPolicyMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResponseHeadersPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfront/api_op_UpdateStreamingDistribution.go b/service/cloudfront/api_op_UpdateStreamingDistribution.go index 9b9e442051d..7ff2cecbb66 100644 --- a/service/cloudfront/api_op_UpdateStreamingDistribution.go +++ b/service/cloudfront/api_op_UpdateStreamingDistribution.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateStreamingDistributionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStreamingDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfrontkeyvaluestore/api_client.go b/service/cloudfrontkeyvaluestore/api_client.go index 61016e62be4..45faaea9912 100644 --- a/service/cloudfrontkeyvaluestore/api_client.go +++ b/service/cloudfrontkeyvaluestore/api_client.go @@ -459,6 +459,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -564,6 +588,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go b/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go index 908d9c52232..b06f30bb4b7 100644 --- a/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go +++ b/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go b/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go index 4c53f3f74b2..e2f0ad4ad55 100644 --- a/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go +++ b/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeKeyValueStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKeyValueStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfrontkeyvaluestore/api_op_GetKey.go b/service/cloudfrontkeyvaluestore/api_op_GetKey.go index d092853042a..e1fe1cc4c44 100644 --- a/service/cloudfrontkeyvaluestore/api_op_GetKey.go +++ b/service/cloudfrontkeyvaluestore/api_op_GetKey.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetKeyMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfrontkeyvaluestore/api_op_ListKeys.go b/service/cloudfrontkeyvaluestore/api_op_ListKeys.go index c1458df2f5c..c85d6507261 100644 --- a/service/cloudfrontkeyvaluestore/api_op_ListKeys.go +++ b/service/cloudfrontkeyvaluestore/api_op_ListKeys.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKeysValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option return nil } -// ListKeysAPIClient is a client that implements the ListKeys operation. -type ListKeysAPIClient interface { - ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) -} - -var _ ListKeysAPIClient = (*Client)(nil) - // ListKeysPaginatorOptions is the paginator options for ListKeys type ListKeysPaginatorOptions struct { // Maximum number of results that are returned per call. The default is 10 and @@ -218,6 +214,9 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListKeysAPIClient is a client that implements the ListKeys operation. +type ListKeysAPIClient interface { + ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) +} + +var _ ListKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudfrontkeyvaluestore/api_op_PutKey.go b/service/cloudfrontkeyvaluestore/api_op_PutKey.go index 876e9ca63be..dc848347ad5 100644 --- a/service/cloudfrontkeyvaluestore/api_op_PutKey.go +++ b/service/cloudfrontkeyvaluestore/api_op_PutKey.go @@ -140,6 +140,9 @@ func (c *Client) addOperationPutKeyMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go b/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go index 7fa2f4a350b..51e73fa304d 100644 --- a/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go +++ b/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateKeysMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_client.go b/service/cloudhsm/api_client.go index 9f6b793d31f..018460509c3 100644 --- a/service/cloudhsm/api_client.go +++ b/service/cloudhsm/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudhsm/api_op_AddTagsToResource.go b/service/cloudhsm/api_op_AddTagsToResource.go index 800bb900666..bacdf5d2417 100644 --- a/service/cloudhsm/api_op_AddTagsToResource.go +++ b/service/cloudhsm/api_op_AddTagsToResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_CreateHapg.go b/service/cloudhsm/api_op_CreateHapg.go index 8e7efd810ac..f3dc9d5e934 100644 --- a/service/cloudhsm/api_op_CreateHapg.go +++ b/service/cloudhsm/api_op_CreateHapg.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateHapgMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHapgValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_CreateHsm.go b/service/cloudhsm/api_op_CreateHsm.go index a7ac82f5b95..e67bab49d8a 100644 --- a/service/cloudhsm/api_op_CreateHsm.go +++ b/service/cloudhsm/api_op_CreateHsm.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateHsmMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHsmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_CreateLunaClient.go b/service/cloudhsm/api_op_CreateLunaClient.go index 8a3bbd229a5..322177fcea3 100644 --- a/service/cloudhsm/api_op_CreateLunaClient.go +++ b/service/cloudhsm/api_op_CreateLunaClient.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateLunaClientMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLunaClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_DeleteHapg.go b/service/cloudhsm/api_op_DeleteHapg.go index a7fdc33393a..a78f7d62d9e 100644 --- a/service/cloudhsm/api_op_DeleteHapg.go +++ b/service/cloudhsm/api_op_DeleteHapg.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteHapgMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHapgValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_DeleteHsm.go b/service/cloudhsm/api_op_DeleteHsm.go index c8237a7d4a2..047db316b50 100644 --- a/service/cloudhsm/api_op_DeleteHsm.go +++ b/service/cloudhsm/api_op_DeleteHsm.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteHsmMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHsmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_DeleteLunaClient.go b/service/cloudhsm/api_op_DeleteLunaClient.go index 96af15bbc42..aa4299e8199 100644 --- a/service/cloudhsm/api_op_DeleteLunaClient.go +++ b/service/cloudhsm/api_op_DeleteLunaClient.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteLunaClientMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLunaClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_DescribeHapg.go b/service/cloudhsm/api_op_DescribeHapg.go index db443ff47ee..eb429b942c6 100644 --- a/service/cloudhsm/api_op_DescribeHapg.go +++ b/service/cloudhsm/api_op_DescribeHapg.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeHapgMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHapgValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_DescribeHsm.go b/service/cloudhsm/api_op_DescribeHsm.go index c5250b32234..6cd881fe619 100644 --- a/service/cloudhsm/api_op_DescribeHsm.go +++ b/service/cloudhsm/api_op_DescribeHsm.go @@ -190,6 +190,9 @@ func (c *Client) addOperationDescribeHsmMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHsm(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudhsm/api_op_DescribeLunaClient.go b/service/cloudhsm/api_op_DescribeLunaClient.go index f7d72ace028..01bed8cdd34 100644 --- a/service/cloudhsm/api_op_DescribeLunaClient.go +++ b/service/cloudhsm/api_op_DescribeLunaClient.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeLunaClientMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLunaClient(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudhsm/api_op_GetConfig.go b/service/cloudhsm/api_op_GetConfig.go index 3ef397a2316..b1074f7650a 100644 --- a/service/cloudhsm/api_op_GetConfig.go +++ b/service/cloudhsm/api_op_GetConfig.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetConfigMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_ListAvailableZones.go b/service/cloudhsm/api_op_ListAvailableZones.go index 042d3a888c9..bea4c3ac2c8 100644 --- a/service/cloudhsm/api_op_ListAvailableZones.go +++ b/service/cloudhsm/api_op_ListAvailableZones.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListAvailableZonesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAvailableZones(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudhsm/api_op_ListHapgs.go b/service/cloudhsm/api_op_ListHapgs.go index 4da06505f3e..5c093ade918 100644 --- a/service/cloudhsm/api_op_ListHapgs.go +++ b/service/cloudhsm/api_op_ListHapgs.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListHapgsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHapgs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudhsm/api_op_ListHsms.go b/service/cloudhsm/api_op_ListHsms.go index 11b80c8a92c..2d8c0e285de 100644 --- a/service/cloudhsm/api_op_ListHsms.go +++ b/service/cloudhsm/api_op_ListHsms.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListHsmsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHsms(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudhsm/api_op_ListLunaClients.go b/service/cloudhsm/api_op_ListLunaClients.go index 91f2dc73a87..9623fac0dd5 100644 --- a/service/cloudhsm/api_op_ListLunaClients.go +++ b/service/cloudhsm/api_op_ListLunaClients.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListLunaClientsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLunaClients(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudhsm/api_op_ListTagsForResource.go b/service/cloudhsm/api_op_ListTagsForResource.go index efbd959435f..361851985cd 100644 --- a/service/cloudhsm/api_op_ListTagsForResource.go +++ b/service/cloudhsm/api_op_ListTagsForResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_ModifyHapg.go b/service/cloudhsm/api_op_ModifyHapg.go index 4a50e5199bc..e379fb131b1 100644 --- a/service/cloudhsm/api_op_ModifyHapg.go +++ b/service/cloudhsm/api_op_ModifyHapg.go @@ -126,6 +126,9 @@ func (c *Client) addOperationModifyHapgMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyHapgValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_ModifyHsm.go b/service/cloudhsm/api_op_ModifyHsm.go index da1b8224e2a..d0560f37424 100644 --- a/service/cloudhsm/api_op_ModifyHsm.go +++ b/service/cloudhsm/api_op_ModifyHsm.go @@ -146,6 +146,9 @@ func (c *Client) addOperationModifyHsmMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyHsmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_ModifyLunaClient.go b/service/cloudhsm/api_op_ModifyLunaClient.go index a31dc714ddd..afd579c989d 100644 --- a/service/cloudhsm/api_op_ModifyLunaClient.go +++ b/service/cloudhsm/api_op_ModifyLunaClient.go @@ -127,6 +127,9 @@ func (c *Client) addOperationModifyLunaClientMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyLunaClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsm/api_op_RemoveTagsFromResource.go b/service/cloudhsm/api_op_RemoveTagsFromResource.go index 8934a3989b0..0b0d420a993 100644 --- a/service/cloudhsm/api_op_RemoveTagsFromResource.go +++ b/service/cloudhsm/api_op_RemoveTagsFromResource.go @@ -132,6 +132,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_client.go b/service/cloudhsmv2/api_client.go index 5b98807fbcf..28b7ca28ffd 100644 --- a/service/cloudhsmv2/api_client.go +++ b/service/cloudhsmv2/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudhsmv2/api_op_CopyBackupToRegion.go b/service/cloudhsmv2/api_op_CopyBackupToRegion.go index 7caee1c546b..dd3c6899a7f 100644 --- a/service/cloudhsmv2/api_op_CopyBackupToRegion.go +++ b/service/cloudhsmv2/api_op_CopyBackupToRegion.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCopyBackupToRegionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyBackupToRegionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_CreateCluster.go b/service/cloudhsmv2/api_op_CreateCluster.go index 40b0b92b531..15ae98b31ce 100644 --- a/service/cloudhsmv2/api_op_CreateCluster.go +++ b/service/cloudhsmv2/api_op_CreateCluster.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_CreateHsm.go b/service/cloudhsmv2/api_op_CreateHsm.go index 2e7eae2b6db..b1598c36348 100644 --- a/service/cloudhsmv2/api_op_CreateHsm.go +++ b/service/cloudhsmv2/api_op_CreateHsm.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateHsmMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHsmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_DeleteBackup.go b/service/cloudhsmv2/api_op_DeleteBackup.go index 92dfaa40c09..7dd335fecda 100644 --- a/service/cloudhsmv2/api_op_DeleteBackup.go +++ b/service/cloudhsmv2/api_op_DeleteBackup.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_DeleteCluster.go b/service/cloudhsmv2/api_op_DeleteCluster.go index 6e46887cb83..bd7b584c986 100644 --- a/service/cloudhsmv2/api_op_DeleteCluster.go +++ b/service/cloudhsmv2/api_op_DeleteCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_DeleteHsm.go b/service/cloudhsmv2/api_op_DeleteHsm.go index cbdf8fb9351..5d38dadcce1 100644 --- a/service/cloudhsmv2/api_op_DeleteHsm.go +++ b/service/cloudhsmv2/api_op_DeleteHsm.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteHsmMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHsmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_DescribeBackups.go b/service/cloudhsmv2/api_op_DescribeBackups.go index d0a38661270..41a65bb07d6 100644 --- a/service/cloudhsmv2/api_op_DescribeBackups.go +++ b/service/cloudhsmv2/api_op_DescribeBackups.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeBackupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBackups(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeBackupsMiddlewares(stack *middleware.Stack, return nil } -// DescribeBackupsAPIClient is a client that implements the DescribeBackups -// operation. -type DescribeBackupsAPIClient interface { - DescribeBackups(context.Context, *DescribeBackupsInput, ...func(*Options)) (*DescribeBackupsOutput, error) -} - -var _ DescribeBackupsAPIClient = (*Client)(nil) - // DescribeBackupsPaginatorOptions is the paginator options for DescribeBackups type DescribeBackupsPaginatorOptions struct { // The maximum number of backups to return in the response. When there are more @@ -237,6 +232,9 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBackups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeBackupsAPIClient is a client that implements the DescribeBackups +// operation. +type DescribeBackupsAPIClient interface { + DescribeBackups(context.Context, *DescribeBackupsInput, ...func(*Options)) (*DescribeBackupsOutput, error) +} + +var _ DescribeBackupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBackups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudhsmv2/api_op_DescribeClusters.go b/service/cloudhsmv2/api_op_DescribeClusters.go index e51479852c0..0fbf53e660a 100644 --- a/service/cloudhsmv2/api_op_DescribeClusters.go +++ b/service/cloudhsmv2/api_op_DescribeClusters.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusters(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack return nil } -// DescribeClustersAPIClient is a client that implements the DescribeClusters -// operation. -type DescribeClustersAPIClient interface { - DescribeClusters(context.Context, *DescribeClustersInput, ...func(*Options)) (*DescribeClustersOutput, error) -} - -var _ DescribeClustersAPIClient = (*Client)(nil) - // DescribeClustersPaginatorOptions is the paginator options for DescribeClusters type DescribeClustersPaginatorOptions struct { // The maximum number of clusters to return in the response. When there are more @@ -225,6 +220,9 @@ func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeClustersAPIClient is a client that implements the DescribeClusters +// operation. +type DescribeClustersAPIClient interface { + DescribeClusters(context.Context, *DescribeClustersInput, ...func(*Options)) (*DescribeClustersOutput, error) +} + +var _ DescribeClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudhsmv2/api_op_InitializeCluster.go b/service/cloudhsmv2/api_op_InitializeCluster.go index 415a4cfc502..60e0e6a09a4 100644 --- a/service/cloudhsmv2/api_op_InitializeCluster.go +++ b/service/cloudhsmv2/api_op_InitializeCluster.go @@ -129,6 +129,9 @@ func (c *Client) addOperationInitializeClusterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitializeClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_ListTags.go b/service/cloudhsmv2/api_op_ListTags.go index 0d1fb79d03f..2e0c4b71fa6 100644 --- a/service/cloudhsmv2/api_op_ListTags.go +++ b/service/cloudhsmv2/api_op_ListTags.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option return nil } -// ListTagsAPIClient is a client that implements the ListTags operation. -type ListTagsAPIClient interface { - ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) -} - -var _ ListTagsAPIClient = (*Client)(nil) - // ListTagsPaginatorOptions is the paginator options for ListTags type ListTagsPaginatorOptions struct { // The maximum number of tags to return in the response. When there are more tags @@ -222,6 +218,9 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListTagsAPIClient is a client that implements the ListTags operation. +type ListTagsAPIClient interface { + ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) +} + +var _ ListTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudhsmv2/api_op_ModifyBackupAttributes.go b/service/cloudhsmv2/api_op_ModifyBackupAttributes.go index ec9d4608dc4..d7a75b1db33 100644 --- a/service/cloudhsmv2/api_op_ModifyBackupAttributes.go +++ b/service/cloudhsmv2/api_op_ModifyBackupAttributes.go @@ -119,6 +119,9 @@ func (c *Client) addOperationModifyBackupAttributesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyBackupAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_ModifyCluster.go b/service/cloudhsmv2/api_op_ModifyCluster.go index 13f4dc08ef0..266156e9e9b 100644 --- a/service/cloudhsmv2/api_op_ModifyCluster.go +++ b/service/cloudhsmv2/api_op_ModifyCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationModifyClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_RestoreBackup.go b/service/cloudhsmv2/api_op_RestoreBackup.go index 0aa559ed3a1..b127f5dab8c 100644 --- a/service/cloudhsmv2/api_op_RestoreBackup.go +++ b/service/cloudhsmv2/api_op_RestoreBackup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRestoreBackupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_TagResource.go b/service/cloudhsmv2/api_op_TagResource.go index 2f6bc5b7fef..5eadb677948 100644 --- a/service/cloudhsmv2/api_op_TagResource.go +++ b/service/cloudhsmv2/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudhsmv2/api_op_UntagResource.go b/service/cloudhsmv2/api_op_UntagResource.go index 83046a3ab13..66adf692859 100644 --- a/service/cloudhsmv2/api_op_UntagResource.go +++ b/service/cloudhsmv2/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_client.go b/service/cloudsearch/api_client.go index f857d24d347..6d568cb134a 100644 --- a/service/cloudsearch/api_client.go +++ b/service/cloudsearch/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudsearch/api_op_BuildSuggesters.go b/service/cloudsearch/api_op_BuildSuggesters.go index 82d580a9977..c68c8237275 100644 --- a/service/cloudsearch/api_op_BuildSuggesters.go +++ b/service/cloudsearch/api_op_BuildSuggesters.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBuildSuggestersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBuildSuggestersValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_CreateDomain.go b/service/cloudsearch/api_op_CreateDomain.go index adcfb4404f3..e0fcf157623 100644 --- a/service/cloudsearch/api_op_CreateDomain.go +++ b/service/cloudsearch/api_op_CreateDomain.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DefineAnalysisScheme.go b/service/cloudsearch/api_op_DefineAnalysisScheme.go index 1c23fb430f7..5f18e4e93c9 100644 --- a/service/cloudsearch/api_op_DefineAnalysisScheme.go +++ b/service/cloudsearch/api_op_DefineAnalysisScheme.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDefineAnalysisSchemeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDefineAnalysisSchemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DefineExpression.go b/service/cloudsearch/api_op_DefineExpression.go index 8e76b8bd13d..9cf52a35189 100644 --- a/service/cloudsearch/api_op_DefineExpression.go +++ b/service/cloudsearch/api_op_DefineExpression.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDefineExpressionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDefineExpressionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DefineIndexField.go b/service/cloudsearch/api_op_DefineIndexField.go index 117088e32e7..d7af2e93df9 100644 --- a/service/cloudsearch/api_op_DefineIndexField.go +++ b/service/cloudsearch/api_op_DefineIndexField.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDefineIndexFieldMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDefineIndexFieldValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DefineSuggester.go b/service/cloudsearch/api_op_DefineSuggester.go index 1a1e06e4710..e0c4025d9d9 100644 --- a/service/cloudsearch/api_op_DefineSuggester.go +++ b/service/cloudsearch/api_op_DefineSuggester.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDefineSuggesterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDefineSuggesterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DeleteAnalysisScheme.go b/service/cloudsearch/api_op_DeleteAnalysisScheme.go index 89cfb738449..8c2335bf545 100644 --- a/service/cloudsearch/api_op_DeleteAnalysisScheme.go +++ b/service/cloudsearch/api_op_DeleteAnalysisScheme.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteAnalysisSchemeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnalysisSchemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DeleteDomain.go b/service/cloudsearch/api_op_DeleteDomain.go index 6af2afd1bb5..ab24fee21e7 100644 --- a/service/cloudsearch/api_op_DeleteDomain.go +++ b/service/cloudsearch/api_op_DeleteDomain.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DeleteExpression.go b/service/cloudsearch/api_op_DeleteExpression.go index 8723f83f3be..f417b5544c1 100644 --- a/service/cloudsearch/api_op_DeleteExpression.go +++ b/service/cloudsearch/api_op_DeleteExpression.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteExpressionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExpressionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DeleteIndexField.go b/service/cloudsearch/api_op_DeleteIndexField.go index 30b1a03438d..8a5d94eb120 100644 --- a/service/cloudsearch/api_op_DeleteIndexField.go +++ b/service/cloudsearch/api_op_DeleteIndexField.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteIndexFieldMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIndexFieldValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DeleteSuggester.go b/service/cloudsearch/api_op_DeleteSuggester.go index cf46507d07c..47d8a4edd40 100644 --- a/service/cloudsearch/api_op_DeleteSuggester.go +++ b/service/cloudsearch/api_op_DeleteSuggester.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteSuggesterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSuggesterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeAnalysisSchemes.go b/service/cloudsearch/api_op_DescribeAnalysisSchemes.go index 3fe73d0ccc4..79526c8fcff 100644 --- a/service/cloudsearch/api_op_DescribeAnalysisSchemes.go +++ b/service/cloudsearch/api_op_DescribeAnalysisSchemes.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeAnalysisSchemesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnalysisSchemesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeAvailabilityOptions.go b/service/cloudsearch/api_op_DescribeAvailabilityOptions.go index b502f47af64..301a8a9fdca 100644 --- a/service/cloudsearch/api_op_DescribeAvailabilityOptions.go +++ b/service/cloudsearch/api_op_DescribeAvailabilityOptions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeAvailabilityOptionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAvailabilityOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeDomainEndpointOptions.go b/service/cloudsearch/api_op_DescribeDomainEndpointOptions.go index 83cb797fe76..91df1389d8d 100644 --- a/service/cloudsearch/api_op_DescribeDomainEndpointOptions.go +++ b/service/cloudsearch/api_op_DescribeDomainEndpointOptions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeDomainEndpointOptionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainEndpointOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeDomains.go b/service/cloudsearch/api_op_DescribeDomains.go index 6159eb62b23..1b7d6d36988 100644 --- a/service/cloudsearch/api_op_DescribeDomains.go +++ b/service/cloudsearch/api_op_DescribeDomains.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeDomainsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDomains(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeExpressions.go b/service/cloudsearch/api_op_DescribeExpressions.go index 7dea616ddb0..0820c7bd4c9 100644 --- a/service/cloudsearch/api_op_DescribeExpressions.go +++ b/service/cloudsearch/api_op_DescribeExpressions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeExpressionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExpressionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeIndexFields.go b/service/cloudsearch/api_op_DescribeIndexFields.go index dcff3bbf5e1..88210922add 100644 --- a/service/cloudsearch/api_op_DescribeIndexFields.go +++ b/service/cloudsearch/api_op_DescribeIndexFields.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeIndexFieldsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIndexFieldsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeScalingParameters.go b/service/cloudsearch/api_op_DescribeScalingParameters.go index 041d73e035e..a8b23b57e9f 100644 --- a/service/cloudsearch/api_op_DescribeScalingParameters.go +++ b/service/cloudsearch/api_op_DescribeScalingParameters.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeScalingParametersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScalingParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeServiceAccessPolicies.go b/service/cloudsearch/api_op_DescribeServiceAccessPolicies.go index 5308acb3e7d..b46a5f46ba6 100644 --- a/service/cloudsearch/api_op_DescribeServiceAccessPolicies.go +++ b/service/cloudsearch/api_op_DescribeServiceAccessPolicies.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeServiceAccessPoliciesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeServiceAccessPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_DescribeSuggesters.go b/service/cloudsearch/api_op_DescribeSuggesters.go index 26a159f2a9d..a91d14959d4 100644 --- a/service/cloudsearch/api_op_DescribeSuggesters.go +++ b/service/cloudsearch/api_op_DescribeSuggesters.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeSuggestersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSuggestersValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_IndexDocuments.go b/service/cloudsearch/api_op_IndexDocuments.go index 6d0dcc7cd25..60147d1f060 100644 --- a/service/cloudsearch/api_op_IndexDocuments.go +++ b/service/cloudsearch/api_op_IndexDocuments.go @@ -114,6 +114,9 @@ func (c *Client) addOperationIndexDocumentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIndexDocumentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_ListDomainNames.go b/service/cloudsearch/api_op_ListDomainNames.go index 0ecebb1ef34..505ab8fbeeb 100644 --- a/service/cloudsearch/api_op_ListDomainNames.go +++ b/service/cloudsearch/api_op_ListDomainNames.go @@ -101,6 +101,9 @@ func (c *Client) addOperationListDomainNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudsearch/api_op_UpdateAvailabilityOptions.go b/service/cloudsearch/api_op_UpdateAvailabilityOptions.go index e3217c43119..855e739fad9 100644 --- a/service/cloudsearch/api_op_UpdateAvailabilityOptions.go +++ b/service/cloudsearch/api_op_UpdateAvailabilityOptions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateAvailabilityOptionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAvailabilityOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_UpdateDomainEndpointOptions.go b/service/cloudsearch/api_op_UpdateDomainEndpointOptions.go index 747b9dbcf53..6a7209a2d1a 100644 --- a/service/cloudsearch/api_op_UpdateDomainEndpointOptions.go +++ b/service/cloudsearch/api_op_UpdateDomainEndpointOptions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateDomainEndpointOptionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainEndpointOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_UpdateScalingParameters.go b/service/cloudsearch/api_op_UpdateScalingParameters.go index 09ddbc57f28..635f6e70af9 100644 --- a/service/cloudsearch/api_op_UpdateScalingParameters.go +++ b/service/cloudsearch/api_op_UpdateScalingParameters.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateScalingParametersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScalingParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearch/api_op_UpdateServiceAccessPolicies.go b/service/cloudsearch/api_op_UpdateServiceAccessPolicies.go index 4380ffed9f0..050955be0bf 100644 --- a/service/cloudsearch/api_op_UpdateServiceAccessPolicies.go +++ b/service/cloudsearch/api_op_UpdateServiceAccessPolicies.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateServiceAccessPoliciesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceAccessPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearchdomain/api_client.go b/service/cloudsearchdomain/api_client.go index 9f89c57334f..7d8e7ee5e13 100644 --- a/service/cloudsearchdomain/api_client.go +++ b/service/cloudsearchdomain/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudsearchdomain/api_op_Search.go b/service/cloudsearchdomain/api_op_Search.go index a1583553a13..380111b20f5 100644 --- a/service/cloudsearchdomain/api_op_Search.go +++ b/service/cloudsearchdomain/api_op_Search.go @@ -443,6 +443,9 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearchdomain/api_op_Suggest.go b/service/cloudsearchdomain/api_op_Suggest.go index 242afedf129..cefecf5cee2 100644 --- a/service/cloudsearchdomain/api_op_Suggest.go +++ b/service/cloudsearchdomain/api_op_Suggest.go @@ -137,6 +137,9 @@ func (c *Client) addOperationSuggestMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSuggestValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudsearchdomain/api_op_UploadDocuments.go b/service/cloudsearchdomain/api_op_UploadDocuments.go index 30267370a61..7735c319685 100644 --- a/service/cloudsearchdomain/api_op_UploadDocuments.go +++ b/service/cloudsearchdomain/api_op_UploadDocuments.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUploadDocumentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadDocumentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_client.go b/service/cloudtrail/api_client.go index 5a91cff79ae..96348e49bb8 100644 --- a/service/cloudtrail/api_client.go +++ b/service/cloudtrail/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudtrail/api_op_AddTags.go b/service/cloudtrail/api_op_AddTags.go index 0150ddec481..c397e9cc347 100644 --- a/service/cloudtrail/api_op_AddTags.go +++ b/service/cloudtrail/api_op_AddTags.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_CancelQuery.go b/service/cloudtrail/api_op_CancelQuery.go index 22b96acd97a..e99a5358fbb 100644 --- a/service/cloudtrail/api_op_CancelQuery.go +++ b/service/cloudtrail/api_op_CancelQuery.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCancelQueryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_CreateChannel.go b/service/cloudtrail/api_op_CreateChannel.go index 50a49fcb550..03486a35223 100644 --- a/service/cloudtrail/api_op_CreateChannel.go +++ b/service/cloudtrail/api_op_CreateChannel.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_CreateEventDataStore.go b/service/cloudtrail/api_op_CreateEventDataStore.go index 7a6817187f8..631bec5f00c 100644 --- a/service/cloudtrail/api_op_CreateEventDataStore.go +++ b/service/cloudtrail/api_op_CreateEventDataStore.go @@ -257,6 +257,9 @@ func (c *Client) addOperationCreateEventDataStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventDataStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_CreateTrail.go b/service/cloudtrail/api_op_CreateTrail.go index 62d7cda9902..27400c68983 100644 --- a/service/cloudtrail/api_op_CreateTrail.go +++ b/service/cloudtrail/api_op_CreateTrail.go @@ -258,6 +258,9 @@ func (c *Client) addOperationCreateTrailMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_DeleteChannel.go b/service/cloudtrail/api_op_DeleteChannel.go index 62507c712ed..4e2c6f285ce 100644 --- a/service/cloudtrail/api_op_DeleteChannel.go +++ b/service/cloudtrail/api_op_DeleteChannel.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_DeleteEventDataStore.go b/service/cloudtrail/api_op_DeleteEventDataStore.go index 40a5d10f0c5..8ec50eb25ec 100644 --- a/service/cloudtrail/api_op_DeleteEventDataStore.go +++ b/service/cloudtrail/api_op_DeleteEventDataStore.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteEventDataStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventDataStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_DeleteResourcePolicy.go b/service/cloudtrail/api_op_DeleteResourcePolicy.go index 503e2907889..7285e0ff25e 100644 --- a/service/cloudtrail/api_op_DeleteResourcePolicy.go +++ b/service/cloudtrail/api_op_DeleteResourcePolicy.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_DeleteTrail.go b/service/cloudtrail/api_op_DeleteTrail.go index 451d3a283cf..9d25d01bfa8 100644 --- a/service/cloudtrail/api_op_DeleteTrail.go +++ b/service/cloudtrail/api_op_DeleteTrail.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteTrailMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_DeregisterOrganizationDelegatedAdmin.go b/service/cloudtrail/api_op_DeregisterOrganizationDelegatedAdmin.go index 574a201eba8..8cfcb89e8cb 100644 --- a/service/cloudtrail/api_op_DeregisterOrganizationDelegatedAdmin.go +++ b/service/cloudtrail/api_op_DeregisterOrganizationDelegatedAdmin.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeregisterOrganizationDelegatedAdminMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterOrganizationDelegatedAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_DescribeQuery.go b/service/cloudtrail/api_op_DescribeQuery.go index d32daf758fd..3a2d48a7033 100644 --- a/service/cloudtrail/api_op_DescribeQuery.go +++ b/service/cloudtrail/api_op_DescribeQuery.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeQueryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeQuery(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudtrail/api_op_DescribeTrails.go b/service/cloudtrail/api_op_DescribeTrails.go index e77a6b94fa4..bc70217568d 100644 --- a/service/cloudtrail/api_op_DescribeTrails.go +++ b/service/cloudtrail/api_op_DescribeTrails.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeTrailsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrails(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudtrail/api_op_DisableFederation.go b/service/cloudtrail/api_op_DisableFederation.go index f4f011cd7e3..f95e2f23d54 100644 --- a/service/cloudtrail/api_op_DisableFederation.go +++ b/service/cloudtrail/api_op_DisableFederation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisableFederationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableFederationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_EnableFederation.go b/service/cloudtrail/api_op_EnableFederation.go index 509f169692c..5caea312de4 100644 --- a/service/cloudtrail/api_op_EnableFederation.go +++ b/service/cloudtrail/api_op_EnableFederation.go @@ -141,6 +141,9 @@ func (c *Client) addOperationEnableFederationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableFederationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetChannel.go b/service/cloudtrail/api_op_GetChannel.go index 6ff609eea1f..c9c04d9b7de 100644 --- a/service/cloudtrail/api_op_GetChannel.go +++ b/service/cloudtrail/api_op_GetChannel.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetChannelMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetEventDataStore.go b/service/cloudtrail/api_op_GetEventDataStore.go index b3113c37667..24ebc10da46 100644 --- a/service/cloudtrail/api_op_GetEventDataStore.go +++ b/service/cloudtrail/api_op_GetEventDataStore.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetEventDataStoreMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventDataStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetEventSelectors.go b/service/cloudtrail/api_op_GetEventSelectors.go index ec31d3d3b26..6a91939a00f 100644 --- a/service/cloudtrail/api_op_GetEventSelectors.go +++ b/service/cloudtrail/api_op_GetEventSelectors.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetEventSelectorsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventSelectorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetImport.go b/service/cloudtrail/api_op_GetImport.go index 901e5c14b4f..aa169c81a44 100644 --- a/service/cloudtrail/api_op_GetImport.go +++ b/service/cloudtrail/api_op_GetImport.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetImportMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetInsightSelectors.go b/service/cloudtrail/api_op_GetInsightSelectors.go index 2e9c95a1e2f..898eec35b15 100644 --- a/service/cloudtrail/api_op_GetInsightSelectors.go +++ b/service/cloudtrail/api_op_GetInsightSelectors.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetInsightSelectorsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInsightSelectors(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetQueryResults.go b/service/cloudtrail/api_op_GetQueryResults.go index 45d009dbb70..687ca85dc53 100644 --- a/service/cloudtrail/api_op_GetQueryResults.go +++ b/service/cloudtrail/api_op_GetQueryResults.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryResultsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, return nil } -// GetQueryResultsAPIClient is a client that implements the GetQueryResults -// operation. -type GetQueryResultsAPIClient interface { - GetQueryResults(context.Context, *GetQueryResultsInput, ...func(*Options)) (*GetQueryResultsOutput, error) -} - -var _ GetQueryResultsAPIClient = (*Client)(nil) - // GetQueryResultsPaginatorOptions is the paginator options for GetQueryResults type GetQueryResultsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -215,6 +210,9 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetQueryResults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetQueryResultsAPIClient is a client that implements the GetQueryResults +// operation. +type GetQueryResultsAPIClient interface { + GetQueryResults(context.Context, *GetQueryResultsInput, ...func(*Options)) (*GetQueryResultsOutput, error) +} + +var _ GetQueryResultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetQueryResults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_GetResourcePolicy.go b/service/cloudtrail/api_op_GetResourcePolicy.go index 2264e425bdc..a79752112e3 100644 --- a/service/cloudtrail/api_op_GetResourcePolicy.go +++ b/service/cloudtrail/api_op_GetResourcePolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetTrail.go b/service/cloudtrail/api_op_GetTrail.go index 58b96f9f22d..64d794a3bff 100644 --- a/service/cloudtrail/api_op_GetTrail.go +++ b/service/cloudtrail/api_op_GetTrail.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetTrailMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_GetTrailStatus.go b/service/cloudtrail/api_op_GetTrailStatus.go index 35dbff0fa64..dea0d7ea288 100644 --- a/service/cloudtrail/api_op_GetTrailStatus.go +++ b/service/cloudtrail/api_op_GetTrailStatus.go @@ -196,6 +196,9 @@ func (c *Client) addOperationGetTrailStatusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrailStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_ListChannels.go b/service/cloudtrail/api_op_ListChannels.go index cbeb5945db4..fd653aaae41 100644 --- a/service/cloudtrail/api_op_ListChannels.go +++ b/service/cloudtrail/api_op_ListChannels.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of CloudTrail channels to display on a single page. @@ -205,6 +201,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListEventDataStores.go b/service/cloudtrail/api_op_ListEventDataStores.go index 4ed2dfba1ca..b185e51ff20 100644 --- a/service/cloudtrail/api_op_ListEventDataStores.go +++ b/service/cloudtrail/api_op_ListEventDataStores.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListEventDataStoresMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventDataStores(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListEventDataStoresMiddlewares(stack *middleware.St return nil } -// ListEventDataStoresAPIClient is a client that implements the -// ListEventDataStores operation. -type ListEventDataStoresAPIClient interface { - ListEventDataStores(context.Context, *ListEventDataStoresInput, ...func(*Options)) (*ListEventDataStoresOutput, error) -} - -var _ ListEventDataStoresAPIClient = (*Client)(nil) - // ListEventDataStoresPaginatorOptions is the paginator options for // ListEventDataStores type ListEventDataStoresPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListEventDataStoresPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventDataStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListEventDataStoresPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEventDataStoresAPIClient is a client that implements the +// ListEventDataStores operation. +type ListEventDataStoresAPIClient interface { + ListEventDataStores(context.Context, *ListEventDataStoresInput, ...func(*Options)) (*ListEventDataStoresOutput, error) +} + +var _ ListEventDataStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventDataStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListImportFailures.go b/service/cloudtrail/api_op_ListImportFailures.go index 3bba77e02fb..5baf3c36678 100644 --- a/service/cloudtrail/api_op_ListImportFailures.go +++ b/service/cloudtrail/api_op_ListImportFailures.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListImportFailuresMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImportFailuresValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListImportFailuresMiddlewares(stack *middleware.Sta return nil } -// ListImportFailuresAPIClient is a client that implements the ListImportFailures -// operation. -type ListImportFailuresAPIClient interface { - ListImportFailures(context.Context, *ListImportFailuresInput, ...func(*Options)) (*ListImportFailuresOutput, error) -} - -var _ ListImportFailuresAPIClient = (*Client)(nil) - // ListImportFailuresPaginatorOptions is the paginator options for // ListImportFailures type ListImportFailuresPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListImportFailuresPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportFailures(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListImportFailuresPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListImportFailuresAPIClient is a client that implements the ListImportFailures +// operation. +type ListImportFailuresAPIClient interface { + ListImportFailures(context.Context, *ListImportFailuresInput, ...func(*Options)) (*ListImportFailuresOutput, error) +} + +var _ ListImportFailuresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportFailures(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListImports.go b/service/cloudtrail/api_op_ListImports.go index 955f04dc099..bf7e289d70d 100644 --- a/service/cloudtrail/api_op_ListImports.go +++ b/service/cloudtrail/api_op_ListImports.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImports(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListImportsAPIClient is a client that implements the ListImports operation. -type ListImportsAPIClient interface { - ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) -} - -var _ ListImportsAPIClient = (*Client)(nil) - // ListImportsPaginatorOptions is the paginator options for ListImports type ListImportsPaginatorOptions struct { // The maximum number of imports to display on a single page. @@ -209,6 +205,9 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListInsightsMetricData.go b/service/cloudtrail/api_op_ListInsightsMetricData.go index c92a7118f2d..f3afa4989a0 100644 --- a/service/cloudtrail/api_op_ListInsightsMetricData.go +++ b/service/cloudtrail/api_op_ListInsightsMetricData.go @@ -212,6 +212,9 @@ func (c *Client) addOperationListInsightsMetricDataMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInsightsMetricDataValidationMiddleware(stack); err != nil { return err } @@ -236,14 +239,6 @@ func (c *Client) addOperationListInsightsMetricDataMiddlewares(stack *middleware return nil } -// ListInsightsMetricDataAPIClient is a client that implements the -// ListInsightsMetricData operation. -type ListInsightsMetricDataAPIClient interface { - ListInsightsMetricData(context.Context, *ListInsightsMetricDataInput, ...func(*Options)) (*ListInsightsMetricDataOutput, error) -} - -var _ ListInsightsMetricDataAPIClient = (*Client)(nil) - // ListInsightsMetricDataPaginatorOptions is the paginator options for // ListInsightsMetricData type ListInsightsMetricDataPaginatorOptions struct { @@ -309,6 +304,9 @@ func (p *ListInsightsMetricDataPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInsightsMetricData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -328,6 +326,14 @@ func (p *ListInsightsMetricDataPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListInsightsMetricDataAPIClient is a client that implements the +// ListInsightsMetricData operation. +type ListInsightsMetricDataAPIClient interface { + ListInsightsMetricData(context.Context, *ListInsightsMetricDataInput, ...func(*Options)) (*ListInsightsMetricDataOutput, error) +} + +var _ ListInsightsMetricDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInsightsMetricData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListPublicKeys.go b/service/cloudtrail/api_op_ListPublicKeys.go index b52420e0472..a5678c32ad6 100644 --- a/service/cloudtrail/api_op_ListPublicKeys.go +++ b/service/cloudtrail/api_op_ListPublicKeys.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListPublicKeysMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPublicKeys(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListPublicKeysMiddlewares(stack *middleware.Stack, return nil } -// ListPublicKeysAPIClient is a client that implements the ListPublicKeys -// operation. -type ListPublicKeysAPIClient interface { - ListPublicKeys(context.Context, *ListPublicKeysInput, ...func(*Options)) (*ListPublicKeysOutput, error) -} - -var _ ListPublicKeysAPIClient = (*Client)(nil) - // ListPublicKeysPaginatorOptions is the paginator options for ListPublicKeys type ListPublicKeysPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -209,6 +204,9 @@ func (p *ListPublicKeysPaginator) NextPage(ctx context.Context, optFns ...func(* params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPublicKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListPublicKeysPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPublicKeysAPIClient is a client that implements the ListPublicKeys +// operation. +type ListPublicKeysAPIClient interface { + ListPublicKeys(context.Context, *ListPublicKeysInput, ...func(*Options)) (*ListPublicKeysOutput, error) +} + +var _ ListPublicKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListQueries.go b/service/cloudtrail/api_op_ListQueries.go index bb656ffceea..3ff87b47d17 100644 --- a/service/cloudtrail/api_op_ListQueries.go +++ b/service/cloudtrail/api_op_ListQueries.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListQueriesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQueriesValidationMiddleware(stack); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListQueriesMiddlewares(stack *middleware.Stack, opt return nil } -// ListQueriesAPIClient is a client that implements the ListQueries operation. -type ListQueriesAPIClient interface { - ListQueries(context.Context, *ListQueriesInput, ...func(*Options)) (*ListQueriesOutput, error) -} - -var _ ListQueriesAPIClient = (*Client)(nil) - // ListQueriesPaginatorOptions is the paginator options for ListQueries type ListQueriesPaginatorOptions struct { // The maximum number of queries to show on a page. @@ -230,6 +226,9 @@ func (p *ListQueriesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListQueriesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListQueriesAPIClient is a client that implements the ListQueries operation. +type ListQueriesAPIClient interface { + ListQueries(context.Context, *ListQueriesInput, ...func(*Options)) (*ListQueriesOutput, error) +} + +var _ ListQueriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListTags.go b/service/cloudtrail/api_op_ListTags.go index 15cccaaa29a..374017d5277 100644 --- a/service/cloudtrail/api_op_ListTags.go +++ b/service/cloudtrail/api_op_ListTags.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option return nil } -// ListTagsAPIClient is a client that implements the ListTags operation. -type ListTagsAPIClient interface { - ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) -} - -var _ ListTagsAPIClient = (*Client)(nil) - // ListTagsPaginatorOptions is the paginator options for ListTags type ListTagsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -208,6 +204,9 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListTagsAPIClient is a client that implements the ListTags operation. +type ListTagsAPIClient interface { + ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) +} + +var _ ListTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_ListTrails.go b/service/cloudtrail/api_op_ListTrails.go index 3d7a92b409e..6784423125d 100644 --- a/service/cloudtrail/api_op_ListTrails.go +++ b/service/cloudtrail/api_op_ListTrails.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTrailsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrails(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListTrailsMiddlewares(stack *middleware.Stack, opti return nil } -// ListTrailsAPIClient is a client that implements the ListTrails operation. -type ListTrailsAPIClient interface { - ListTrails(context.Context, *ListTrailsInput, ...func(*Options)) (*ListTrailsOutput, error) -} - -var _ ListTrailsAPIClient = (*Client)(nil) - // ListTrailsPaginatorOptions is the paginator options for ListTrails type ListTrailsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -194,6 +190,9 @@ func (p *ListTrailsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -213,6 +212,13 @@ func (p *ListTrailsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTrailsAPIClient is a client that implements the ListTrails operation. +type ListTrailsAPIClient interface { + ListTrails(context.Context, *ListTrailsInput, ...func(*Options)) (*ListTrailsOutput, error) +} + +var _ ListTrailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_LookupEvents.go b/service/cloudtrail/api_op_LookupEvents.go index 00841c04b92..5ca11bc2cb5 100644 --- a/service/cloudtrail/api_op_LookupEvents.go +++ b/service/cloudtrail/api_op_LookupEvents.go @@ -185,6 +185,9 @@ func (c *Client) addOperationLookupEventsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLookupEventsValidationMiddleware(stack); err != nil { return err } @@ -209,13 +212,6 @@ func (c *Client) addOperationLookupEventsMiddlewares(stack *middleware.Stack, op return nil } -// LookupEventsAPIClient is a client that implements the LookupEvents operation. -type LookupEventsAPIClient interface { - LookupEvents(context.Context, *LookupEventsInput, ...func(*Options)) (*LookupEventsOutput, error) -} - -var _ LookupEventsAPIClient = (*Client)(nil) - // LookupEventsPaginatorOptions is the paginator options for LookupEvents type LookupEventsPaginatorOptions struct { // The number of events to return. Possible values are 1 through 50. The default @@ -280,6 +276,9 @@ func (p *LookupEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.LookupEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -299,6 +298,13 @@ func (p *LookupEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// LookupEventsAPIClient is a client that implements the LookupEvents operation. +type LookupEventsAPIClient interface { + LookupEvents(context.Context, *LookupEventsInput, ...func(*Options)) (*LookupEventsOutput, error) +} + +var _ LookupEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opLookupEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudtrail/api_op_PutEventSelectors.go b/service/cloudtrail/api_op_PutEventSelectors.go index e55463a7c51..2ad13c30d53 100644 --- a/service/cloudtrail/api_op_PutEventSelectors.go +++ b/service/cloudtrail/api_op_PutEventSelectors.go @@ -196,6 +196,9 @@ func (c *Client) addOperationPutEventSelectorsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventSelectorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_PutInsightSelectors.go b/service/cloudtrail/api_op_PutInsightSelectors.go index 573888a0d0d..9087c7472f2 100644 --- a/service/cloudtrail/api_op_PutInsightSelectors.go +++ b/service/cloudtrail/api_op_PutInsightSelectors.go @@ -175,6 +175,9 @@ func (c *Client) addOperationPutInsightSelectorsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInsightSelectorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_PutResourcePolicy.go b/service/cloudtrail/api_op_PutResourcePolicy.go index 1a3e93cb8e2..b505fabaad9 100644 --- a/service/cloudtrail/api_op_PutResourcePolicy.go +++ b/service/cloudtrail/api_op_PutResourcePolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_RegisterOrganizationDelegatedAdmin.go b/service/cloudtrail/api_op_RegisterOrganizationDelegatedAdmin.go index f9a23291e2c..3662ba510b7 100644 --- a/service/cloudtrail/api_op_RegisterOrganizationDelegatedAdmin.go +++ b/service/cloudtrail/api_op_RegisterOrganizationDelegatedAdmin.go @@ -107,6 +107,9 @@ func (c *Client) addOperationRegisterOrganizationDelegatedAdminMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterOrganizationDelegatedAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_RemoveTags.go b/service/cloudtrail/api_op_RemoveTags.go index c4f51555fc2..87473003309 100644 --- a/service/cloudtrail/api_op_RemoveTags.go +++ b/service/cloudtrail/api_op_RemoveTags.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_RestoreEventDataStore.go b/service/cloudtrail/api_op_RestoreEventDataStore.go index f5c64f44276..1e60a119dac 100644 --- a/service/cloudtrail/api_op_RestoreEventDataStore.go +++ b/service/cloudtrail/api_op_RestoreEventDataStore.go @@ -152,6 +152,9 @@ func (c *Client) addOperationRestoreEventDataStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreEventDataStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_StartEventDataStoreIngestion.go b/service/cloudtrail/api_op_StartEventDataStoreIngestion.go index 84038b967b6..3b8e3ccc68f 100644 --- a/service/cloudtrail/api_op_StartEventDataStoreIngestion.go +++ b/service/cloudtrail/api_op_StartEventDataStoreIngestion.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStartEventDataStoreIngestionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartEventDataStoreIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_StartImport.go b/service/cloudtrail/api_op_StartImport.go index 98bd87493ef..0be51263e73 100644 --- a/service/cloudtrail/api_op_StartImport.go +++ b/service/cloudtrail/api_op_StartImport.go @@ -172,6 +172,9 @@ func (c *Client) addOperationStartImportMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_StartLogging.go b/service/cloudtrail/api_op_StartLogging.go index dd54b4d8242..a7b5a3bc0b6 100644 --- a/service/cloudtrail/api_op_StartLogging.go +++ b/service/cloudtrail/api_op_StartLogging.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStartLoggingMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_StartQuery.go b/service/cloudtrail/api_op_StartQuery.go index 0f1a5e24724..d063863e44a 100644 --- a/service/cloudtrail/api_op_StartQuery.go +++ b/service/cloudtrail/api_op_StartQuery.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartQueryMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartQuery(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudtrail/api_op_StopEventDataStoreIngestion.go b/service/cloudtrail/api_op_StopEventDataStoreIngestion.go index bbd14837cba..f58a2977f48 100644 --- a/service/cloudtrail/api_op_StopEventDataStoreIngestion.go +++ b/service/cloudtrail/api_op_StopEventDataStoreIngestion.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopEventDataStoreIngestionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEventDataStoreIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_StopImport.go b/service/cloudtrail/api_op_StopImport.go index da9842e0d33..80934b6876a 100644 --- a/service/cloudtrail/api_op_StopImport.go +++ b/service/cloudtrail/api_op_StopImport.go @@ -133,6 +133,9 @@ func (c *Client) addOperationStopImportMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_StopLogging.go b/service/cloudtrail/api_op_StopLogging.go index 7326bbe78d4..7f03f8af826 100644 --- a/service/cloudtrail/api_op_StopLogging.go +++ b/service/cloudtrail/api_op_StopLogging.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStopLoggingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_UpdateChannel.go b/service/cloudtrail/api_op_UpdateChannel.go index e615009a3bd..dc9131088ed 100644 --- a/service/cloudtrail/api_op_UpdateChannel.go +++ b/service/cloudtrail/api_op_UpdateChannel.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_UpdateEventDataStore.go b/service/cloudtrail/api_op_UpdateEventDataStore.go index b669a0125f8..c981f0cf288 100644 --- a/service/cloudtrail/api_op_UpdateEventDataStore.go +++ b/service/cloudtrail/api_op_UpdateEventDataStore.go @@ -267,6 +267,9 @@ func (c *Client) addOperationUpdateEventDataStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventDataStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtrail/api_op_UpdateTrail.go b/service/cloudtrail/api_op_UpdateTrail.go index d8305fd7f71..f1c3d6de364 100644 --- a/service/cloudtrail/api_op_UpdateTrail.go +++ b/service/cloudtrail/api_op_UpdateTrail.go @@ -272,6 +272,9 @@ func (c *Client) addOperationUpdateTrailMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrailValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudtraildata/api_client.go b/service/cloudtraildata/api_client.go index aa57ce90aa4..0ca10226314 100644 --- a/service/cloudtraildata/api_client.go +++ b/service/cloudtraildata/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudtraildata/api_op_PutAuditEvents.go b/service/cloudtraildata/api_op_PutAuditEvents.go index d0eb6355599..a4029a3d1ec 100644 --- a/service/cloudtraildata/api_op_PutAuditEvents.go +++ b/service/cloudtraildata/api_op_PutAuditEvents.go @@ -130,6 +130,9 @@ func (c *Client) addOperationPutAuditEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAuditEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_client.go b/service/cloudwatch/api_client.go index 3cd3be71cf8..22c8cd44804 100644 --- a/service/cloudwatch/api_client.go +++ b/service/cloudwatch/api_client.go @@ -452,6 +452,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -537,6 +561,33 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +func addIsRequestCompressionUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + if !options.DisableRequestCompression { + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureGZIPRequestCompression) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudwatch/api_op_DeleteAlarms.go b/service/cloudwatch/api_op_DeleteAlarms.go index 8ec6078b508..cb6395bf94a 100644 --- a/service/cloudwatch/api_op_DeleteAlarms.go +++ b/service/cloudwatch/api_op_DeleteAlarms.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteAlarmsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAlarmsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DeleteAnomalyDetector.go b/service/cloudwatch/api_op_DeleteAnomalyDetector.go index 291ad548f12..6f07d607dcb 100644 --- a/service/cloudwatch/api_op_DeleteAnomalyDetector.go +++ b/service/cloudwatch/api_op_DeleteAnomalyDetector.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDeleteAnomalyDetectorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DeleteDashboards.go b/service/cloudwatch/api_op_DeleteDashboards.go index eba373b5054..e0258c17547 100644 --- a/service/cloudwatch/api_op_DeleteDashboards.go +++ b/service/cloudwatch/api_op_DeleteDashboards.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteDashboardsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDashboardsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DeleteInsightRules.go b/service/cloudwatch/api_op_DeleteInsightRules.go index 0e262ea0a8b..93418943768 100644 --- a/service/cloudwatch/api_op_DeleteInsightRules.go +++ b/service/cloudwatch/api_op_DeleteInsightRules.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteInsightRulesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInsightRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DeleteMetricStream.go b/service/cloudwatch/api_op_DeleteMetricStream.go index 988609fd047..e4cac13631c 100644 --- a/service/cloudwatch/api_op_DeleteMetricStream.go +++ b/service/cloudwatch/api_op_DeleteMetricStream.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMetricStreamMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMetricStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DescribeAlarmHistory.go b/service/cloudwatch/api_op_DescribeAlarmHistory.go index d2b9f6fb5b6..00fa06d1ea3 100644 --- a/service/cloudwatch/api_op_DescribeAlarmHistory.go +++ b/service/cloudwatch/api_op_DescribeAlarmHistory.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeAlarmHistoryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAlarmHistory(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeAlarmHistoryMiddlewares(stack *middleware.S return nil } -// DescribeAlarmHistoryAPIClient is a client that implements the -// DescribeAlarmHistory operation. -type DescribeAlarmHistoryAPIClient interface { - DescribeAlarmHistory(context.Context, *DescribeAlarmHistoryInput, ...func(*Options)) (*DescribeAlarmHistoryOutput, error) -} - -var _ DescribeAlarmHistoryAPIClient = (*Client)(nil) - // DescribeAlarmHistoryPaginatorOptions is the paginator options for // DescribeAlarmHistory type DescribeAlarmHistoryPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeAlarmHistoryPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAlarmHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeAlarmHistoryPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeAlarmHistoryAPIClient is a client that implements the +// DescribeAlarmHistory operation. +type DescribeAlarmHistoryAPIClient interface { + DescribeAlarmHistory(context.Context, *DescribeAlarmHistoryInput, ...func(*Options)) (*DescribeAlarmHistoryOutput, error) +} + +var _ DescribeAlarmHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAlarmHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_DescribeAlarms.go b/service/cloudwatch/api_op_DescribeAlarms.go index 0878af6681e..156626d92b9 100644 --- a/service/cloudwatch/api_op_DescribeAlarms.go +++ b/service/cloudwatch/api_op_DescribeAlarms.go @@ -189,6 +189,9 @@ func (c *Client) addOperationDescribeAlarmsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAlarms(options.Region), middleware.Before); err != nil { return err } @@ -210,96 +213,6 @@ func (c *Client) addOperationDescribeAlarmsMiddlewares(stack *middleware.Stack, return nil } -// DescribeAlarmsAPIClient is a client that implements the DescribeAlarms -// operation. -type DescribeAlarmsAPIClient interface { - DescribeAlarms(context.Context, *DescribeAlarmsInput, ...func(*Options)) (*DescribeAlarmsOutput, error) -} - -var _ DescribeAlarmsAPIClient = (*Client)(nil) - -// DescribeAlarmsPaginatorOptions is the paginator options for DescribeAlarms -type DescribeAlarmsPaginatorOptions struct { - // The maximum number of alarm descriptions to retrieve. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeAlarmsPaginator is a paginator for DescribeAlarms -type DescribeAlarmsPaginator struct { - options DescribeAlarmsPaginatorOptions - client DescribeAlarmsAPIClient - params *DescribeAlarmsInput - nextToken *string - firstPage bool -} - -// NewDescribeAlarmsPaginator returns a new DescribeAlarmsPaginator -func NewDescribeAlarmsPaginator(client DescribeAlarmsAPIClient, params *DescribeAlarmsInput, optFns ...func(*DescribeAlarmsPaginatorOptions)) *DescribeAlarmsPaginator { - if params == nil { - params = &DescribeAlarmsInput{} - } - - options := DescribeAlarmsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeAlarmsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeAlarmsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeAlarms page. -func (p *DescribeAlarmsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAlarmsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeAlarms(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // AlarmExistsWaiterOptions are waiter options for AlarmExistsWaiter type AlarmExistsWaiterOptions struct { @@ -414,7 +327,13 @@ func (w *AlarmExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeA } out, err := w.client.DescribeAlarms(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -593,7 +512,13 @@ func (w *CompositeAlarmExistsWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeAlarms(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -655,6 +580,99 @@ func compositeAlarmExistsStateRetryable(ctx context.Context, input *DescribeAlar return true, nil } +// DescribeAlarmsPaginatorOptions is the paginator options for DescribeAlarms +type DescribeAlarmsPaginatorOptions struct { + // The maximum number of alarm descriptions to retrieve. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeAlarmsPaginator is a paginator for DescribeAlarms +type DescribeAlarmsPaginator struct { + options DescribeAlarmsPaginatorOptions + client DescribeAlarmsAPIClient + params *DescribeAlarmsInput + nextToken *string + firstPage bool +} + +// NewDescribeAlarmsPaginator returns a new DescribeAlarmsPaginator +func NewDescribeAlarmsPaginator(client DescribeAlarmsAPIClient, params *DescribeAlarmsInput, optFns ...func(*DescribeAlarmsPaginatorOptions)) *DescribeAlarmsPaginator { + if params == nil { + params = &DescribeAlarmsInput{} + } + + options := DescribeAlarmsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAlarmsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAlarmsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAlarms page. +func (p *DescribeAlarmsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAlarmsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAlarms(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeAlarmsAPIClient is a client that implements the DescribeAlarms +// operation. +type DescribeAlarmsAPIClient interface { + DescribeAlarms(context.Context, *DescribeAlarmsInput, ...func(*Options)) (*DescribeAlarmsOutput, error) +} + +var _ DescribeAlarmsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAlarms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_DescribeAlarmsForMetric.go b/service/cloudwatch/api_op_DescribeAlarmsForMetric.go index 22fd086891b..f2efc2d24d6 100644 --- a/service/cloudwatch/api_op_DescribeAlarmsForMetric.go +++ b/service/cloudwatch/api_op_DescribeAlarmsForMetric.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeAlarmsForMetricMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlarmsForMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DescribeAnomalyDetectors.go b/service/cloudwatch/api_op_DescribeAnomalyDetectors.go index cb472dccb9b..52be715d78d 100644 --- a/service/cloudwatch/api_op_DescribeAnomalyDetectors.go +++ b/service/cloudwatch/api_op_DescribeAnomalyDetectors.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeAnomalyDetectorsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnomalyDetectorsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeAnomalyDetectorsMiddlewares(stack *middlewa return nil } -// DescribeAnomalyDetectorsAPIClient is a client that implements the -// DescribeAnomalyDetectors operation. -type DescribeAnomalyDetectorsAPIClient interface { - DescribeAnomalyDetectors(context.Context, *DescribeAnomalyDetectorsInput, ...func(*Options)) (*DescribeAnomalyDetectorsOutput, error) -} - -var _ DescribeAnomalyDetectorsAPIClient = (*Client)(nil) - // DescribeAnomalyDetectorsPaginatorOptions is the paginator options for // DescribeAnomalyDetectors type DescribeAnomalyDetectorsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *DescribeAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAnomalyDetectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *DescribeAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeAnomalyDetectorsAPIClient is a client that implements the +// DescribeAnomalyDetectors operation. +type DescribeAnomalyDetectorsAPIClient interface { + DescribeAnomalyDetectors(context.Context, *DescribeAnomalyDetectorsInput, ...func(*Options)) (*DescribeAnomalyDetectorsOutput, error) +} + +var _ DescribeAnomalyDetectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAnomalyDetectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_DescribeInsightRules.go b/service/cloudwatch/api_op_DescribeInsightRules.go index 8def8d6ecea..a1eaff834a6 100644 --- a/service/cloudwatch/api_op_DescribeInsightRules.go +++ b/service/cloudwatch/api_op_DescribeInsightRules.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeInsightRulesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInsightRules(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeInsightRulesMiddlewares(stack *middleware.S return nil } -// DescribeInsightRulesAPIClient is a client that implements the -// DescribeInsightRules operation. -type DescribeInsightRulesAPIClient interface { - DescribeInsightRules(context.Context, *DescribeInsightRulesInput, ...func(*Options)) (*DescribeInsightRulesOutput, error) -} - -var _ DescribeInsightRulesAPIClient = (*Client)(nil) - // DescribeInsightRulesPaginatorOptions is the paginator options for // DescribeInsightRules type DescribeInsightRulesPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *DescribeInsightRulesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInsightRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *DescribeInsightRulesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeInsightRulesAPIClient is a client that implements the +// DescribeInsightRules operation. +type DescribeInsightRulesAPIClient interface { + DescribeInsightRules(context.Context, *DescribeInsightRulesInput, ...func(*Options)) (*DescribeInsightRulesOutput, error) +} + +var _ DescribeInsightRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInsightRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_DisableAlarmActions.go b/service/cloudwatch/api_op_DisableAlarmActions.go index 9849d7be28f..22aa5c3ef23 100644 --- a/service/cloudwatch/api_op_DisableAlarmActions.go +++ b/service/cloudwatch/api_op_DisableAlarmActions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDisableAlarmActionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableAlarmActionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_DisableInsightRules.go b/service/cloudwatch/api_op_DisableInsightRules.go index fdcdf8a4246..ff642cc985b 100644 --- a/service/cloudwatch/api_op_DisableInsightRules.go +++ b/service/cloudwatch/api_op_DisableInsightRules.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisableInsightRulesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableInsightRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_EnableAlarmActions.go b/service/cloudwatch/api_op_EnableAlarmActions.go index 00b7eba73bc..71a83b61f7b 100644 --- a/service/cloudwatch/api_op_EnableAlarmActions.go +++ b/service/cloudwatch/api_op_EnableAlarmActions.go @@ -101,6 +101,9 @@ func (c *Client) addOperationEnableAlarmActionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableAlarmActionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_EnableInsightRules.go b/service/cloudwatch/api_op_EnableInsightRules.go index f1b4be94cf2..a4e5f65b80b 100644 --- a/service/cloudwatch/api_op_EnableInsightRules.go +++ b/service/cloudwatch/api_op_EnableInsightRules.go @@ -111,6 +111,9 @@ func (c *Client) addOperationEnableInsightRulesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableInsightRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_GetDashboard.go b/service/cloudwatch/api_op_GetDashboard.go index 585aec3bb30..0835fe77a32 100644 --- a/service/cloudwatch/api_op_GetDashboard.go +++ b/service/cloudwatch/api_op_GetDashboard.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetDashboardMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDashboardValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_GetInsightRuleReport.go b/service/cloudwatch/api_op_GetInsightRuleReport.go index b0d9c4c6bf6..40a141b2a07 100644 --- a/service/cloudwatch/api_op_GetInsightRuleReport.go +++ b/service/cloudwatch/api_op_GetInsightRuleReport.go @@ -215,6 +215,9 @@ func (c *Client) addOperationGetInsightRuleReportMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightRuleReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_GetMetricData.go b/service/cloudwatch/api_op_GetMetricData.go index af6938639b4..906a271cb14 100644 --- a/service/cloudwatch/api_op_GetMetricData.go +++ b/service/cloudwatch/api_op_GetMetricData.go @@ -254,6 +254,9 @@ func (c *Client) addOperationGetMetricDataMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricDataValidationMiddleware(stack); err != nil { return err } @@ -278,13 +281,6 @@ func (c *Client) addOperationGetMetricDataMiddlewares(stack *middleware.Stack, o return nil } -// GetMetricDataAPIClient is a client that implements the GetMetricData operation. -type GetMetricDataAPIClient interface { - GetMetricData(context.Context, *GetMetricDataInput, ...func(*Options)) (*GetMetricDataOutput, error) -} - -var _ GetMetricDataAPIClient = (*Client)(nil) - // GetMetricDataPaginatorOptions is the paginator options for GetMetricData type GetMetricDataPaginatorOptions struct { // The maximum number of data points the request should return before paginating. @@ -349,6 +345,9 @@ func (p *GetMetricDataPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxDatapoints = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMetricData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -368,6 +367,13 @@ func (p *GetMetricDataPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetMetricDataAPIClient is a client that implements the GetMetricData operation. +type GetMetricDataAPIClient interface { + GetMetricData(context.Context, *GetMetricDataInput, ...func(*Options)) (*GetMetricDataOutput, error) +} + +var _ GetMetricDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMetricData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_GetMetricStatistics.go b/service/cloudwatch/api_op_GetMetricStatistics.go index bb01d27c1a2..371f02a0edc 100644 --- a/service/cloudwatch/api_op_GetMetricStatistics.go +++ b/service/cloudwatch/api_op_GetMetricStatistics.go @@ -259,6 +259,9 @@ func (c *Client) addOperationGetMetricStatisticsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_GetMetricStream.go b/service/cloudwatch/api_op_GetMetricStream.go index c8c1315a0bb..79376b96496 100644 --- a/service/cloudwatch/api_op_GetMetricStream.go +++ b/service/cloudwatch/api_op_GetMetricStream.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetMetricStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_GetMetricWidgetImage.go b/service/cloudwatch/api_op_GetMetricWidgetImage.go index ee0ace72ce2..cc7dc52dac1 100644 --- a/service/cloudwatch/api_op_GetMetricWidgetImage.go +++ b/service/cloudwatch/api_op_GetMetricWidgetImage.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetMetricWidgetImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricWidgetImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_ListDashboards.go b/service/cloudwatch/api_op_ListDashboards.go index 066320495c9..07a7da914e4 100644 --- a/service/cloudwatch/api_op_ListDashboards.go +++ b/service/cloudwatch/api_op_ListDashboards.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDashboardsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDashboards(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDashboardsMiddlewares(stack *middleware.Stack, return nil } -// ListDashboardsAPIClient is a client that implements the ListDashboards -// operation. -type ListDashboardsAPIClient interface { - ListDashboards(context.Context, *ListDashboardsInput, ...func(*Options)) (*ListDashboardsOutput, error) -} - -var _ ListDashboardsAPIClient = (*Client)(nil) - // ListDashboardsPaginatorOptions is the paginator options for ListDashboards type ListDashboardsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +194,9 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDashboards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +216,14 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListDashboardsAPIClient is a client that implements the ListDashboards +// operation. +type ListDashboardsAPIClient interface { + ListDashboards(context.Context, *ListDashboardsInput, ...func(*Options)) (*ListDashboardsOutput, error) +} + +var _ ListDashboardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDashboards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_ListManagedInsightRules.go b/service/cloudwatch/api_op_ListManagedInsightRules.go index 26d5b48f630..04d9bf35970 100644 --- a/service/cloudwatch/api_op_ListManagedInsightRules.go +++ b/service/cloudwatch/api_op_ListManagedInsightRules.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListManagedInsightRulesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListManagedInsightRulesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListManagedInsightRulesMiddlewares(stack *middlewar return nil } -// ListManagedInsightRulesAPIClient is a client that implements the -// ListManagedInsightRules operation. -type ListManagedInsightRulesAPIClient interface { - ListManagedInsightRules(context.Context, *ListManagedInsightRulesInput, ...func(*Options)) (*ListManagedInsightRulesOutput, error) -} - -var _ ListManagedInsightRulesAPIClient = (*Client)(nil) - // ListManagedInsightRulesPaginatorOptions is the paginator options for // ListManagedInsightRules type ListManagedInsightRulesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListManagedInsightRulesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedInsightRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListManagedInsightRulesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListManagedInsightRulesAPIClient is a client that implements the +// ListManagedInsightRules operation. +type ListManagedInsightRulesAPIClient interface { + ListManagedInsightRules(context.Context, *ListManagedInsightRulesInput, ...func(*Options)) (*ListManagedInsightRulesOutput, error) +} + +var _ ListManagedInsightRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedInsightRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_ListMetricStreams.go b/service/cloudwatch/api_op_ListMetricStreams.go index 5023d546b95..d785905fe72 100644 --- a/service/cloudwatch/api_op_ListMetricStreams.go +++ b/service/cloudwatch/api_op_ListMetricStreams.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListMetricStreamsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMetricStreams(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListMetricStreamsMiddlewares(stack *middleware.Stac return nil } -// ListMetricStreamsAPIClient is a client that implements the ListMetricStreams -// operation. -type ListMetricStreamsAPIClient interface { - ListMetricStreams(context.Context, *ListMetricStreamsInput, ...func(*Options)) (*ListMetricStreamsOutput, error) -} - -var _ ListMetricStreamsAPIClient = (*Client)(nil) - // ListMetricStreamsPaginatorOptions is the paginator options for ListMetricStreams type ListMetricStreamsPaginatorOptions struct { // The maximum number of results to return in one operation. @@ -204,6 +199,9 @@ func (p *ListMetricStreamsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetricStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListMetricStreamsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListMetricStreamsAPIClient is a client that implements the ListMetricStreams +// operation. +type ListMetricStreamsAPIClient interface { + ListMetricStreams(context.Context, *ListMetricStreamsInput, ...func(*Options)) (*ListMetricStreamsOutput, error) +} + +var _ ListMetricStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetricStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_ListMetrics.go b/service/cloudwatch/api_op_ListMetrics.go index b5c27d72eda..a7a0ee12ea8 100644 --- a/service/cloudwatch/api_op_ListMetrics.go +++ b/service/cloudwatch/api_op_ListMetrics.go @@ -166,6 +166,9 @@ func (c *Client) addOperationListMetricsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMetricsValidationMiddleware(stack); err != nil { return err } @@ -190,13 +193,6 @@ func (c *Client) addOperationListMetricsMiddlewares(stack *middleware.Stack, opt return nil } -// ListMetricsAPIClient is a client that implements the ListMetrics operation. -type ListMetricsAPIClient interface { - ListMetrics(context.Context, *ListMetricsInput, ...func(*Options)) (*ListMetricsOutput, error) -} - -var _ ListMetricsAPIClient = (*Client)(nil) - // ListMetricsPaginatorOptions is the paginator options for ListMetrics type ListMetricsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -248,6 +244,9 @@ func (p *ListMetricsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +266,13 @@ func (p *ListMetricsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMetricsAPIClient is a client that implements the ListMetrics operation. +type ListMetricsAPIClient interface { + ListMetrics(context.Context, *ListMetricsInput, ...func(*Options)) (*ListMetricsOutput, error) +} + +var _ ListMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatch/api_op_ListTagsForResource.go b/service/cloudwatch/api_op_ListTagsForResource.go index 5a2a4c39155..b5e2d9ecbc3 100644 --- a/service/cloudwatch/api_op_ListTagsForResource.go +++ b/service/cloudwatch/api_op_ListTagsForResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutAnomalyDetector.go b/service/cloudwatch/api_op_PutAnomalyDetector.go index 96355dde203..c04272705e5 100644 --- a/service/cloudwatch/api_op_PutAnomalyDetector.go +++ b/service/cloudwatch/api_op_PutAnomalyDetector.go @@ -177,6 +177,9 @@ func (c *Client) addOperationPutAnomalyDetectorMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutCompositeAlarm.go b/service/cloudwatch/api_op_PutCompositeAlarm.go index f2140d9b34f..4ca6143cb58 100644 --- a/service/cloudwatch/api_op_PutCompositeAlarm.go +++ b/service/cloudwatch/api_op_PutCompositeAlarm.go @@ -322,6 +322,9 @@ func (c *Client) addOperationPutCompositeAlarmMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutCompositeAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutDashboard.go b/service/cloudwatch/api_op_PutDashboard.go index cf2f332f0d4..b3858a2287a 100644 --- a/service/cloudwatch/api_op_PutDashboard.go +++ b/service/cloudwatch/api_op_PutDashboard.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutDashboardMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDashboardValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutInsightRule.go b/service/cloudwatch/api_op_PutInsightRule.go index d468a962d39..d45d9077d4e 100644 --- a/service/cloudwatch/api_op_PutInsightRule.go +++ b/service/cloudwatch/api_op_PutInsightRule.go @@ -138,6 +138,9 @@ func (c *Client) addOperationPutInsightRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInsightRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutManagedInsightRules.go b/service/cloudwatch/api_op_PutManagedInsightRules.go index d1ff83df374..ab815777a79 100644 --- a/service/cloudwatch/api_op_PutManagedInsightRules.go +++ b/service/cloudwatch/api_op_PutManagedInsightRules.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutManagedInsightRulesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutManagedInsightRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutMetricAlarm.go b/service/cloudwatch/api_op_PutMetricAlarm.go index 19bbbeea7bf..82db2a3f07c 100644 --- a/service/cloudwatch/api_op_PutMetricAlarm.go +++ b/service/cloudwatch/api_op_PutMetricAlarm.go @@ -511,6 +511,9 @@ func (c *Client) addOperationPutMetricAlarmMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMetricAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutMetricData.go b/service/cloudwatch/api_op_PutMetricData.go index 6550230cc31..55d836f34cc 100644 --- a/service/cloudwatch/api_op_PutMetricData.go +++ b/service/cloudwatch/api_op_PutMetricData.go @@ -161,6 +161,12 @@ func (c *Client) addOperationPutMetricDataMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsRequestCompressionUserAgent(stack, options); err != nil { + return err + } if err = addOperationPutMetricDataRequestCompressionMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudwatch/api_op_PutMetricStream.go b/service/cloudwatch/api_op_PutMetricStream.go index b9135570525..f1d4a4f0f71 100644 --- a/service/cloudwatch/api_op_PutMetricStream.go +++ b/service/cloudwatch/api_op_PutMetricStream.go @@ -224,6 +224,9 @@ func (c *Client) addOperationPutMetricStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMetricStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_SetAlarmState.go b/service/cloudwatch/api_op_SetAlarmState.go index 15c0c9edcbd..3048696dff0 100644 --- a/service/cloudwatch/api_op_SetAlarmState.go +++ b/service/cloudwatch/api_op_SetAlarmState.go @@ -138,6 +138,9 @@ func (c *Client) addOperationSetAlarmStateMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetAlarmStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_StartMetricStreams.go b/service/cloudwatch/api_op_StartMetricStreams.go index 532013d1c4d..563b87ca454 100644 --- a/service/cloudwatch/api_op_StartMetricStreams.go +++ b/service/cloudwatch/api_op_StartMetricStreams.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStartMetricStreamsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMetricStreamsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_StopMetricStreams.go b/service/cloudwatch/api_op_StopMetricStreams.go index 16bc53cf034..3c8f148371d 100644 --- a/service/cloudwatch/api_op_StopMetricStreams.go +++ b/service/cloudwatch/api_op_StopMetricStreams.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopMetricStreamsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMetricStreamsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_TagResource.go b/service/cloudwatch/api_op_TagResource.go index 9fba306026e..179b70ce43c 100644 --- a/service/cloudwatch/api_op_TagResource.go +++ b/service/cloudwatch/api_op_TagResource.go @@ -135,6 +135,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatch/api_op_UntagResource.go b/service/cloudwatch/api_op_UntagResource.go index 13c98fb1863..b30b89e955b 100644 --- a/service/cloudwatch/api_op_UntagResource.go +++ b/service/cloudwatch/api_op_UntagResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_client.go b/service/cloudwatchevents/api_client.go index 9b5e0d31454..fdba6622592 100644 --- a/service/cloudwatchevents/api_client.go +++ b/service/cloudwatchevents/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cloudwatchevents/api_op_ActivateEventSource.go b/service/cloudwatchevents/api_op_ActivateEventSource.go index c3c936d6c5e..66555bc5d06 100644 --- a/service/cloudwatchevents/api_op_ActivateEventSource.go +++ b/service/cloudwatchevents/api_op_ActivateEventSource.go @@ -102,6 +102,9 @@ func (c *Client) addOperationActivateEventSourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_CancelReplay.go b/service/cloudwatchevents/api_op_CancelReplay.go index ac98bfccd4f..d0106d664c4 100644 --- a/service/cloudwatchevents/api_op_CancelReplay.go +++ b/service/cloudwatchevents/api_op_CancelReplay.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCancelReplayMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelReplayValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_CreateApiDestination.go b/service/cloudwatchevents/api_op_CreateApiDestination.go index 05c64fff0a8..abdefc52757 100644 --- a/service/cloudwatchevents/api_op_CreateApiDestination.go +++ b/service/cloudwatchevents/api_op_CreateApiDestination.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateApiDestinationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_CreateArchive.go b/service/cloudwatchevents/api_op_CreateArchive.go index 01a09615ab0..dc3075ba10a 100644 --- a/service/cloudwatchevents/api_op_CreateArchive.go +++ b/service/cloudwatchevents/api_op_CreateArchive.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_CreateConnection.go b/service/cloudwatchevents/api_op_CreateConnection.go index 5436b7789dd..edb0726838e 100644 --- a/service/cloudwatchevents/api_op_CreateConnection.go +++ b/service/cloudwatchevents/api_op_CreateConnection.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_CreateEventBus.go b/service/cloudwatchevents/api_op_CreateEventBus.go index c08d9d24b2c..350e05874f1 100644 --- a/service/cloudwatchevents/api_op_CreateEventBus.go +++ b/service/cloudwatchevents/api_op_CreateEventBus.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateEventBusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventBusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_CreatePartnerEventSource.go b/service/cloudwatchevents/api_op_CreatePartnerEventSource.go index 180822bd37a..482d06d685f 100644 --- a/service/cloudwatchevents/api_op_CreatePartnerEventSource.go +++ b/service/cloudwatchevents/api_op_CreatePartnerEventSource.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreatePartnerEventSourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePartnerEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeactivateEventSource.go b/service/cloudwatchevents/api_op_DeactivateEventSource.go index 51ab720235d..4ee2eb127a7 100644 --- a/service/cloudwatchevents/api_op_DeactivateEventSource.go +++ b/service/cloudwatchevents/api_op_DeactivateEventSource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeactivateEventSourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeauthorizeConnection.go b/service/cloudwatchevents/api_op_DeauthorizeConnection.go index 886d023a836..c351bae6db8 100644 --- a/service/cloudwatchevents/api_op_DeauthorizeConnection.go +++ b/service/cloudwatchevents/api_op_DeauthorizeConnection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeauthorizeConnectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeauthorizeConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeleteApiDestination.go b/service/cloudwatchevents/api_op_DeleteApiDestination.go index fbcc7e86e5b..1b1677e5315 100644 --- a/service/cloudwatchevents/api_op_DeleteApiDestination.go +++ b/service/cloudwatchevents/api_op_DeleteApiDestination.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApiDestinationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeleteArchive.go b/service/cloudwatchevents/api_op_DeleteArchive.go index 2223c93f44e..2d40e433546 100644 --- a/service/cloudwatchevents/api_op_DeleteArchive.go +++ b/service/cloudwatchevents/api_op_DeleteArchive.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeleteConnection.go b/service/cloudwatchevents/api_op_DeleteConnection.go index 370db5c3c49..8dae084a9a9 100644 --- a/service/cloudwatchevents/api_op_DeleteConnection.go +++ b/service/cloudwatchevents/api_op_DeleteConnection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeleteEventBus.go b/service/cloudwatchevents/api_op_DeleteEventBus.go index 37cc5fdb16c..1539e611960 100644 --- a/service/cloudwatchevents/api_op_DeleteEventBus.go +++ b/service/cloudwatchevents/api_op_DeleteEventBus.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteEventBusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventBusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeletePartnerEventSource.go b/service/cloudwatchevents/api_op_DeletePartnerEventSource.go index 0f96bb912b6..b4b97744938 100644 --- a/service/cloudwatchevents/api_op_DeletePartnerEventSource.go +++ b/service/cloudwatchevents/api_op_DeletePartnerEventSource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeletePartnerEventSourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePartnerEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DeleteRule.go b/service/cloudwatchevents/api_op_DeleteRule.go index 7b94a549966..8395dbe5b6b 100644 --- a/service/cloudwatchevents/api_op_DeleteRule.go +++ b/service/cloudwatchevents/api_op_DeleteRule.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeApiDestination.go b/service/cloudwatchevents/api_op_DescribeApiDestination.go index d0df8ecabb6..187cd381c5e 100644 --- a/service/cloudwatchevents/api_op_DescribeApiDestination.go +++ b/service/cloudwatchevents/api_op_DescribeApiDestination.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeApiDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeArchive.go b/service/cloudwatchevents/api_op_DescribeArchive.go index b68d274066e..7d9f22999a7 100644 --- a/service/cloudwatchevents/api_op_DescribeArchive.go +++ b/service/cloudwatchevents/api_op_DescribeArchive.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeArchiveMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeConnection.go b/service/cloudwatchevents/api_op_DescribeConnection.go index 1fad1d8a25b..7e7150ae18c 100644 --- a/service/cloudwatchevents/api_op_DescribeConnection.go +++ b/service/cloudwatchevents/api_op_DescribeConnection.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeConnectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeEventBus.go b/service/cloudwatchevents/api_op_DescribeEventBus.go index bea33a12a9c..f1f50da556d 100644 --- a/service/cloudwatchevents/api_op_DescribeEventBus.go +++ b/service/cloudwatchevents/api_op_DescribeEventBus.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeEventBusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventBus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeEventSource.go b/service/cloudwatchevents/api_op_DescribeEventSource.go index 2b5057f6854..a1740f12f46 100644 --- a/service/cloudwatchevents/api_op_DescribeEventSource.go +++ b/service/cloudwatchevents/api_op_DescribeEventSource.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeEventSourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribePartnerEventSource.go b/service/cloudwatchevents/api_op_DescribePartnerEventSource.go index a3afc25dca5..d6fc82e7b8f 100644 --- a/service/cloudwatchevents/api_op_DescribePartnerEventSource.go +++ b/service/cloudwatchevents/api_op_DescribePartnerEventSource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribePartnerEventSourceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePartnerEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeReplay.go b/service/cloudwatchevents/api_op_DescribeReplay.go index 5869edd4bc1..2967dbfca14 100644 --- a/service/cloudwatchevents/api_op_DescribeReplay.go +++ b/service/cloudwatchevents/api_op_DescribeReplay.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeReplayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplayValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DescribeRule.go b/service/cloudwatchevents/api_op_DescribeRule.go index d0e713fcf55..eb396ca9a97 100644 --- a/service/cloudwatchevents/api_op_DescribeRule.go +++ b/service/cloudwatchevents/api_op_DescribeRule.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeRuleMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_DisableRule.go b/service/cloudwatchevents/api_op_DisableRule.go index 2c304761cd1..f3c80ad0287 100644 --- a/service/cloudwatchevents/api_op_DisableRule.go +++ b/service/cloudwatchevents/api_op_DisableRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisableRuleMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_EnableRule.go b/service/cloudwatchevents/api_op_EnableRule.go index 2a1b4491bf8..69bdb7a761e 100644 --- a/service/cloudwatchevents/api_op_EnableRule.go +++ b/service/cloudwatchevents/api_op_EnableRule.go @@ -108,6 +108,9 @@ func (c *Client) addOperationEnableRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListApiDestinations.go b/service/cloudwatchevents/api_op_ListApiDestinations.go index 597b8a56937..a91f16b701c 100644 --- a/service/cloudwatchevents/api_op_ListApiDestinations.go +++ b/service/cloudwatchevents/api_op_ListApiDestinations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListApiDestinationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApiDestinations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListArchives.go b/service/cloudwatchevents/api_op_ListArchives.go index 6d23d8dde2a..3724da20f3d 100644 --- a/service/cloudwatchevents/api_op_ListArchives.go +++ b/service/cloudwatchevents/api_op_ListArchives.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListArchivesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListArchives(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListConnections.go b/service/cloudwatchevents/api_op_ListConnections.go index 94797a0b894..138eb3818e1 100644 --- a/service/cloudwatchevents/api_op_ListConnections.go +++ b/service/cloudwatchevents/api_op_ListConnections.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnections(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListEventBuses.go b/service/cloudwatchevents/api_op_ListEventBuses.go index ca94e2dac75..16b1d4a70a9 100644 --- a/service/cloudwatchevents/api_op_ListEventBuses.go +++ b/service/cloudwatchevents/api_op_ListEventBuses.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEventBusesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventBuses(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListEventSources.go b/service/cloudwatchevents/api_op_ListEventSources.go index e1b22c8e3c3..594883d0559 100644 --- a/service/cloudwatchevents/api_op_ListEventSources.go +++ b/service/cloudwatchevents/api_op_ListEventSources.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListEventSourcesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventSources(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListPartnerEventSourceAccounts.go b/service/cloudwatchevents/api_op_ListPartnerEventSourceAccounts.go index 96171940fc6..e4efe3f37a7 100644 --- a/service/cloudwatchevents/api_op_ListPartnerEventSourceAccounts.go +++ b/service/cloudwatchevents/api_op_ListPartnerEventSourceAccounts.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListPartnerEventSourceAccountsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPartnerEventSourceAccountsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListPartnerEventSources.go b/service/cloudwatchevents/api_op_ListPartnerEventSources.go index 77e941966d1..29180c10813 100644 --- a/service/cloudwatchevents/api_op_ListPartnerEventSources.go +++ b/service/cloudwatchevents/api_op_ListPartnerEventSources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPartnerEventSourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPartnerEventSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListReplays.go b/service/cloudwatchevents/api_op_ListReplays.go index c3050ca4c9e..5b3dff0a591 100644 --- a/service/cloudwatchevents/api_op_ListReplays.go +++ b/service/cloudwatchevents/api_op_ListReplays.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListReplaysMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReplays(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListRuleNamesByTarget.go b/service/cloudwatchevents/api_op_ListRuleNamesByTarget.go index d461787b686..b2519b09299 100644 --- a/service/cloudwatchevents/api_op_ListRuleNamesByTarget.go +++ b/service/cloudwatchevents/api_op_ListRuleNamesByTarget.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRuleNamesByTargetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRuleNamesByTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListRules.go b/service/cloudwatchevents/api_op_ListRules.go index 3b5918af013..931672d81f3 100644 --- a/service/cloudwatchevents/api_op_ListRules.go +++ b/service/cloudwatchevents/api_op_ListRules.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListTagsForResource.go b/service/cloudwatchevents/api_op_ListTagsForResource.go index 974f3bf7997..2b708777617 100644 --- a/service/cloudwatchevents/api_op_ListTagsForResource.go +++ b/service/cloudwatchevents/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_ListTargetsByRule.go b/service/cloudwatchevents/api_op_ListTargetsByRule.go index 64c5eb53c64..1898906a1c6 100644 --- a/service/cloudwatchevents/api_op_ListTargetsByRule.go +++ b/service/cloudwatchevents/api_op_ListTargetsByRule.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTargetsByRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsByRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_PutEvents.go b/service/cloudwatchevents/api_op_PutEvents.go index 261060ea805..bed35a3f2e4 100644 --- a/service/cloudwatchevents/api_op_PutEvents.go +++ b/service/cloudwatchevents/api_op_PutEvents.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutEventsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_PutPartnerEvents.go b/service/cloudwatchevents/api_op_PutPartnerEvents.go index d5f5b5ba471..fb3dc5aa065 100644 --- a/service/cloudwatchevents/api_op_PutPartnerEvents.go +++ b/service/cloudwatchevents/api_op_PutPartnerEvents.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutPartnerEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPartnerEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_PutPermission.go b/service/cloudwatchevents/api_op_PutPermission.go index a46d0e31688..b6b637158d9 100644 --- a/service/cloudwatchevents/api_op_PutPermission.go +++ b/service/cloudwatchevents/api_op_PutPermission.go @@ -163,6 +163,9 @@ func (c *Client) addOperationPutPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_PutRule.go b/service/cloudwatchevents/api_op_PutRule.go index 2bef192371d..cb7f88359a1 100644 --- a/service/cloudwatchevents/api_op_PutRule.go +++ b/service/cloudwatchevents/api_op_PutRule.go @@ -195,6 +195,9 @@ func (c *Client) addOperationPutRuleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_PutTargets.go b/service/cloudwatchevents/api_op_PutTargets.go index 74052cada03..a773703bb21 100644 --- a/service/cloudwatchevents/api_op_PutTargets.go +++ b/service/cloudwatchevents/api_op_PutTargets.go @@ -250,6 +250,9 @@ func (c *Client) addOperationPutTargetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_RemovePermission.go b/service/cloudwatchevents/api_op_RemovePermission.go index 8cb8943e88a..716bffc6711 100644 --- a/service/cloudwatchevents/api_op_RemovePermission.go +++ b/service/cloudwatchevents/api_op_RemovePermission.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemovePermission(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_RemoveTargets.go b/service/cloudwatchevents/api_op_RemoveTargets.go index 7894cbb3513..7b5461d2e39 100644 --- a/service/cloudwatchevents/api_op_RemoveTargets.go +++ b/service/cloudwatchevents/api_op_RemoveTargets.go @@ -134,6 +134,9 @@ func (c *Client) addOperationRemoveTargetsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_StartReplay.go b/service/cloudwatchevents/api_op_StartReplay.go index 89944a3f01d..1019d302dbe 100644 --- a/service/cloudwatchevents/api_op_StartReplay.go +++ b/service/cloudwatchevents/api_op_StartReplay.go @@ -150,6 +150,9 @@ func (c *Client) addOperationStartReplayMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplayValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_TagResource.go b/service/cloudwatchevents/api_op_TagResource.go index e79864d2744..56c73d5ffef 100644 --- a/service/cloudwatchevents/api_op_TagResource.go +++ b/service/cloudwatchevents/api_op_TagResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_TestEventPattern.go b/service/cloudwatchevents/api_op_TestEventPattern.go index 7287ec0deb0..a8a046d9379 100644 --- a/service/cloudwatchevents/api_op_TestEventPattern.go +++ b/service/cloudwatchevents/api_op_TestEventPattern.go @@ -135,6 +135,9 @@ func (c *Client) addOperationTestEventPatternMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestEventPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_UntagResource.go b/service/cloudwatchevents/api_op_UntagResource.go index b95dd7203df..0d12fbb562c 100644 --- a/service/cloudwatchevents/api_op_UntagResource.go +++ b/service/cloudwatchevents/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_UpdateApiDestination.go b/service/cloudwatchevents/api_op_UpdateApiDestination.go index 496dd5aa826..75bbad3edde 100644 --- a/service/cloudwatchevents/api_op_UpdateApiDestination.go +++ b/service/cloudwatchevents/api_op_UpdateApiDestination.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateApiDestinationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_UpdateArchive.go b/service/cloudwatchevents/api_op_UpdateArchive.go index 22586c98c32..86e29276867 100644 --- a/service/cloudwatchevents/api_op_UpdateArchive.go +++ b/service/cloudwatchevents/api_op_UpdateArchive.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchevents/api_op_UpdateConnection.go b/service/cloudwatchevents/api_op_UpdateConnection.go index 604a039fbca..59881a573c9 100644 --- a/service/cloudwatchevents/api_op_UpdateConnection.go +++ b/service/cloudwatchevents/api_op_UpdateConnection.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_client.go b/service/cloudwatchlogs/api_client.go index 5f1960773db..e9729663836 100644 --- a/service/cloudwatchlogs/api_client.go +++ b/service/cloudwatchlogs/api_client.go @@ -457,6 +457,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -549,6 +573,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/cloudwatchlogs/api_op_AssociateKmsKey.go b/service/cloudwatchlogs/api_op_AssociateKmsKey.go index 7167dc20cd3..5bbfa6c7df9 100644 --- a/service/cloudwatchlogs/api_op_AssociateKmsKey.go +++ b/service/cloudwatchlogs/api_op_AssociateKmsKey.go @@ -189,6 +189,9 @@ func (c *Client) addOperationAssociateKmsKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateKmsKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_CancelExportTask.go b/service/cloudwatchlogs/api_op_CancelExportTask.go index d0676be1533..9f8c661f1a5 100644 --- a/service/cloudwatchlogs/api_op_CancelExportTask.go +++ b/service/cloudwatchlogs/api_op_CancelExportTask.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCancelExportTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_CreateDelivery.go b/service/cloudwatchlogs/api_op_CreateDelivery.go index 58e2165fc37..4b3e5161c59 100644 --- a/service/cloudwatchlogs/api_op_CreateDelivery.go +++ b/service/cloudwatchlogs/api_op_CreateDelivery.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateDeliveryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeliveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_CreateExportTask.go b/service/cloudwatchlogs/api_op_CreateExportTask.go index 6fb08873007..52c041aedd5 100644 --- a/service/cloudwatchlogs/api_op_CreateExportTask.go +++ b/service/cloudwatchlogs/api_op_CreateExportTask.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateExportTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go b/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go index f230abb5d57..b97507d0f67 100644 --- a/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go +++ b/service/cloudwatchlogs/api_op_CreateLogAnomalyDetector.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateLogAnomalyDetectorMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLogAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_CreateLogGroup.go b/service/cloudwatchlogs/api_op_CreateLogGroup.go index a05a52f1398..26c1ad6fde0 100644 --- a/service/cloudwatchlogs/api_op_CreateLogGroup.go +++ b/service/cloudwatchlogs/api_op_CreateLogGroup.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateLogGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLogGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_CreateLogStream.go b/service/cloudwatchlogs/api_op_CreateLogStream.go index 0e6e4ecc3e9..6fac1d859a2 100644 --- a/service/cloudwatchlogs/api_op_CreateLogStream.go +++ b/service/cloudwatchlogs/api_op_CreateLogStream.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateLogStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLogStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go b/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go index 16730c48a63..97674402e50 100644 --- a/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go +++ b/service/cloudwatchlogs/api_op_DeleteAccountPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteAccountPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go b/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go index bdec9ffc68b..ae724d55b34 100644 --- a/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go +++ b/service/cloudwatchlogs/api_op_DeleteDataProtectionPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDataProtectionPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataProtectionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteDelivery.go b/service/cloudwatchlogs/api_op_DeleteDelivery.go index 0d1dec3a788..31806d7b191 100644 --- a/service/cloudwatchlogs/api_op_DeleteDelivery.go +++ b/service/cloudwatchlogs/api_op_DeleteDelivery.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDeliveryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeliveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go b/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go index 42a09f2beaf..53a8d2779da 100644 --- a/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go +++ b/service/cloudwatchlogs/api_op_DeleteDeliveryDestination.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteDeliveryDestinationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeliveryDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go b/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go index dee48103814..9c1962128f3 100644 --- a/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go +++ b/service/cloudwatchlogs/api_op_DeleteDeliveryDestinationPolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDeliveryDestinationPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeliveryDestinationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteDeliverySource.go b/service/cloudwatchlogs/api_op_DeleteDeliverySource.go index 3b17e54cfb3..864463e101d 100644 --- a/service/cloudwatchlogs/api_op_DeleteDeliverySource.go +++ b/service/cloudwatchlogs/api_op_DeleteDeliverySource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDeliverySourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeliverySourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteDestination.go b/service/cloudwatchlogs/api_op_DeleteDestination.go index b9d083f3200..4ca33ac0407 100644 --- a/service/cloudwatchlogs/api_op_DeleteDestination.go +++ b/service/cloudwatchlogs/api_op_DeleteDestination.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteDestinationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go b/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go index ca4d20620dd..674099c0725 100644 --- a/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go +++ b/service/cloudwatchlogs/api_op_DeleteLogAnomalyDetector.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteLogAnomalyDetectorMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLogAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteLogGroup.go b/service/cloudwatchlogs/api_op_DeleteLogGroup.go index 75f2186b34c..162be34b2b7 100644 --- a/service/cloudwatchlogs/api_op_DeleteLogGroup.go +++ b/service/cloudwatchlogs/api_op_DeleteLogGroup.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteLogGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLogGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteLogStream.go b/service/cloudwatchlogs/api_op_DeleteLogStream.go index b5b252b0621..4bcaa0794e1 100644 --- a/service/cloudwatchlogs/api_op_DeleteLogStream.go +++ b/service/cloudwatchlogs/api_op_DeleteLogStream.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteLogStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLogStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteMetricFilter.go b/service/cloudwatchlogs/api_op_DeleteMetricFilter.go index 527d495541d..6d269a141a2 100644 --- a/service/cloudwatchlogs/api_op_DeleteMetricFilter.go +++ b/service/cloudwatchlogs/api_op_DeleteMetricFilter.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteMetricFilterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMetricFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go b/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go index ff94345f6a1..74b6b9ce008 100644 --- a/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go +++ b/service/cloudwatchlogs/api_op_DeleteQueryDefinition.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteQueryDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueryDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go b/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go index 0cb0d68ca16..70d4e7112b0 100644 --- a/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go +++ b/service/cloudwatchlogs/api_op_DeleteResourcePolicy.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go b/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go index a143229d6d5..58209e6e385 100644 --- a/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go +++ b/service/cloudwatchlogs/api_op_DeleteRetentionPolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteRetentionPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRetentionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go b/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go index 2f5fe387acb..11f560f3d70 100644 --- a/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go +++ b/service/cloudwatchlogs/api_op_DeleteSubscriptionFilter.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSubscriptionFilterMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriptionFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go b/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go index 38171e89f31..28e0eac607e 100644 --- a/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go +++ b/service/cloudwatchlogs/api_op_DescribeAccountPolicies.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeAccountPoliciesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DescribeDeliveries.go b/service/cloudwatchlogs/api_op_DescribeDeliveries.go index 2b732607ccf..b59e1fafa3f 100644 --- a/service/cloudwatchlogs/api_op_DescribeDeliveries.go +++ b/service/cloudwatchlogs/api_op_DescribeDeliveries.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeDeliveriesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliveries(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationDescribeDeliveriesMiddlewares(stack *middleware.Sta return nil } -// DescribeDeliveriesAPIClient is a client that implements the DescribeDeliveries -// operation. -type DescribeDeliveriesAPIClient interface { - DescribeDeliveries(context.Context, *DescribeDeliveriesInput, ...func(*Options)) (*DescribeDeliveriesOutput, error) -} - -var _ DescribeDeliveriesAPIClient = (*Client)(nil) - // DescribeDeliveriesPaginatorOptions is the paginator options for // DescribeDeliveries type DescribeDeliveriesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeDeliveriesPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDeliveries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeDeliveriesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeDeliveriesAPIClient is a client that implements the DescribeDeliveries +// operation. +type DescribeDeliveriesAPIClient interface { + DescribeDeliveries(context.Context, *DescribeDeliveriesInput, ...func(*Options)) (*DescribeDeliveriesOutput, error) +} + +var _ DescribeDeliveriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDeliveries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go b/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go index 34d19fe4931..78dc58b8e08 100644 --- a/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go +++ b/service/cloudwatchlogs/api_op_DescribeDeliveryDestinations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeDeliveryDestinationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliveryDestinations(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribeDeliveryDestinationsMiddlewares(stack *midd return nil } -// DescribeDeliveryDestinationsAPIClient is a client that implements the -// DescribeDeliveryDestinations operation. -type DescribeDeliveryDestinationsAPIClient interface { - DescribeDeliveryDestinations(context.Context, *DescribeDeliveryDestinationsInput, ...func(*Options)) (*DescribeDeliveryDestinationsOutput, error) -} - -var _ DescribeDeliveryDestinationsAPIClient = (*Client)(nil) - // DescribeDeliveryDestinationsPaginatorOptions is the paginator options for // DescribeDeliveryDestinations type DescribeDeliveryDestinationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeDeliveryDestinationsPaginator) NextPage(ctx context.Context, op } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDeliveryDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeDeliveryDestinationsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeDeliveryDestinationsAPIClient is a client that implements the +// DescribeDeliveryDestinations operation. +type DescribeDeliveryDestinationsAPIClient interface { + DescribeDeliveryDestinations(context.Context, *DescribeDeliveryDestinationsInput, ...func(*Options)) (*DescribeDeliveryDestinationsOutput, error) +} + +var _ DescribeDeliveryDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDeliveryDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeDeliverySources.go b/service/cloudwatchlogs/api_op_DescribeDeliverySources.go index cf869106a33..486dc6f7b8e 100644 --- a/service/cloudwatchlogs/api_op_DescribeDeliverySources.go +++ b/service/cloudwatchlogs/api_op_DescribeDeliverySources.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeDeliverySourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliverySources(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationDescribeDeliverySourcesMiddlewares(stack *middlewar return nil } -// DescribeDeliverySourcesAPIClient is a client that implements the -// DescribeDeliverySources operation. -type DescribeDeliverySourcesAPIClient interface { - DescribeDeliverySources(context.Context, *DescribeDeliverySourcesInput, ...func(*Options)) (*DescribeDeliverySourcesOutput, error) -} - -var _ DescribeDeliverySourcesAPIClient = (*Client)(nil) - // DescribeDeliverySourcesPaginatorOptions is the paginator options for // DescribeDeliverySources type DescribeDeliverySourcesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *DescribeDeliverySourcesPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDeliverySources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *DescribeDeliverySourcesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDeliverySourcesAPIClient is a client that implements the +// DescribeDeliverySources operation. +type DescribeDeliverySourcesAPIClient interface { + DescribeDeliverySources(context.Context, *DescribeDeliverySourcesInput, ...func(*Options)) (*DescribeDeliverySourcesOutput, error) +} + +var _ DescribeDeliverySourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDeliverySources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeDestinations.go b/service/cloudwatchlogs/api_op_DescribeDestinations.go index 75c82987d30..b7a3554e7ec 100644 --- a/service/cloudwatchlogs/api_op_DescribeDestinations.go +++ b/service/cloudwatchlogs/api_op_DescribeDestinations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeDestinationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDestinations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeDestinationsMiddlewares(stack *middleware.S return nil } -// DescribeDestinationsAPIClient is a client that implements the -// DescribeDestinations operation. -type DescribeDestinationsAPIClient interface { - DescribeDestinations(context.Context, *DescribeDestinationsInput, ...func(*Options)) (*DescribeDestinationsOutput, error) -} - -var _ DescribeDestinationsAPIClient = (*Client)(nil) - // DescribeDestinationsPaginatorOptions is the paginator options for // DescribeDestinations type DescribeDestinationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeDestinationsPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeDestinationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeDestinationsAPIClient is a client that implements the +// DescribeDestinations operation. +type DescribeDestinationsAPIClient interface { + DescribeDestinations(context.Context, *DescribeDestinationsInput, ...func(*Options)) (*DescribeDestinationsOutput, error) +} + +var _ DescribeDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeExportTasks.go b/service/cloudwatchlogs/api_op_DescribeExportTasks.go index b0231a317b3..b74cf3ce251 100644 --- a/service/cloudwatchlogs/api_op_DescribeExportTasks.go +++ b/service/cloudwatchlogs/api_op_DescribeExportTasks.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportTasks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DescribeLogGroups.go b/service/cloudwatchlogs/api_op_DescribeLogGroups.go index 421446edcc9..48ff25405aa 100644 --- a/service/cloudwatchlogs/api_op_DescribeLogGroups.go +++ b/service/cloudwatchlogs/api_op_DescribeLogGroups.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeLogGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLogGroups(options.Region), middleware.Before); err != nil { return err } @@ -195,14 +198,6 @@ func (c *Client) addOperationDescribeLogGroupsMiddlewares(stack *middleware.Stac return nil } -// DescribeLogGroupsAPIClient is a client that implements the DescribeLogGroups -// operation. -type DescribeLogGroupsAPIClient interface { - DescribeLogGroups(context.Context, *DescribeLogGroupsInput, ...func(*Options)) (*DescribeLogGroupsOutput, error) -} - -var _ DescribeLogGroupsAPIClient = (*Client)(nil) - // DescribeLogGroupsPaginatorOptions is the paginator options for DescribeLogGroups type DescribeLogGroupsPaginatorOptions struct { // The maximum number of items returned. If you don't specify a value, the default @@ -267,6 +262,9 @@ func (p *DescribeLogGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLogGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +284,14 @@ func (p *DescribeLogGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeLogGroupsAPIClient is a client that implements the DescribeLogGroups +// operation. +type DescribeLogGroupsAPIClient interface { + DescribeLogGroups(context.Context, *DescribeLogGroupsInput, ...func(*Options)) (*DescribeLogGroupsOutput, error) +} + +var _ DescribeLogGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLogGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeLogStreams.go b/service/cloudwatchlogs/api_op_DescribeLogStreams.go index 2684b6e7656..4956cec7d95 100644 --- a/service/cloudwatchlogs/api_op_DescribeLogStreams.go +++ b/service/cloudwatchlogs/api_op_DescribeLogStreams.go @@ -162,6 +162,9 @@ func (c *Client) addOperationDescribeLogStreamsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLogStreams(options.Region), middleware.Before); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationDescribeLogStreamsMiddlewares(stack *middleware.Sta return nil } -// DescribeLogStreamsAPIClient is a client that implements the DescribeLogStreams -// operation. -type DescribeLogStreamsAPIClient interface { - DescribeLogStreams(context.Context, *DescribeLogStreamsInput, ...func(*Options)) (*DescribeLogStreamsOutput, error) -} - -var _ DescribeLogStreamsAPIClient = (*Client)(nil) - // DescribeLogStreamsPaginatorOptions is the paginator options for // DescribeLogStreams type DescribeLogStreamsPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *DescribeLogStreamsPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLogStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *DescribeLogStreamsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeLogStreamsAPIClient is a client that implements the DescribeLogStreams +// operation. +type DescribeLogStreamsAPIClient interface { + DescribeLogStreams(context.Context, *DescribeLogStreamsInput, ...func(*Options)) (*DescribeLogStreamsOutput, error) +} + +var _ DescribeLogStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLogStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeMetricFilters.go b/service/cloudwatchlogs/api_op_DescribeMetricFilters.go index 9b6f4259792..b01d8fbd0f9 100644 --- a/service/cloudwatchlogs/api_op_DescribeMetricFilters.go +++ b/service/cloudwatchlogs/api_op_DescribeMetricFilters.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeMetricFiltersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMetricFilters(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeMetricFiltersMiddlewares(stack *middleware. return nil } -// DescribeMetricFiltersAPIClient is a client that implements the -// DescribeMetricFilters operation. -type DescribeMetricFiltersAPIClient interface { - DescribeMetricFilters(context.Context, *DescribeMetricFiltersInput, ...func(*Options)) (*DescribeMetricFiltersOutput, error) -} - -var _ DescribeMetricFiltersAPIClient = (*Client)(nil) - // DescribeMetricFiltersPaginatorOptions is the paginator options for // DescribeMetricFilters type DescribeMetricFiltersPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeMetricFiltersPaginator) NextPage(ctx context.Context, optFns .. } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMetricFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeMetricFiltersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeMetricFiltersAPIClient is a client that implements the +// DescribeMetricFilters operation. +type DescribeMetricFiltersAPIClient interface { + DescribeMetricFilters(context.Context, *DescribeMetricFiltersInput, ...func(*Options)) (*DescribeMetricFiltersOutput, error) +} + +var _ DescribeMetricFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMetricFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DescribeQueries.go b/service/cloudwatchlogs/api_op_DescribeQueries.go index e5b13eb6ba1..bd211d0b381 100644 --- a/service/cloudwatchlogs/api_op_DescribeQueries.go +++ b/service/cloudwatchlogs/api_op_DescribeQueries.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeQueriesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeQueries(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go b/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go index 79075becc79..1e5cd787beb 100644 --- a/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go +++ b/service/cloudwatchlogs/api_op_DescribeQueryDefinitions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeQueryDefinitionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeQueryDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go b/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go index 9f135aae2bf..beda2f95714 100644 --- a/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go +++ b/service/cloudwatchlogs/api_op_DescribeResourcePolicies.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeResourcePoliciesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourcePolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go b/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go index 58938e31503..4aa645843e0 100644 --- a/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go +++ b/service/cloudwatchlogs/api_op_DescribeSubscriptionFilters.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeSubscriptionFiltersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSubscriptionFiltersValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeSubscriptionFiltersMiddlewares(stack *middl return nil } -// DescribeSubscriptionFiltersAPIClient is a client that implements the -// DescribeSubscriptionFilters operation. -type DescribeSubscriptionFiltersAPIClient interface { - DescribeSubscriptionFilters(context.Context, *DescribeSubscriptionFiltersInput, ...func(*Options)) (*DescribeSubscriptionFiltersOutput, error) -} - -var _ DescribeSubscriptionFiltersAPIClient = (*Client)(nil) - // DescribeSubscriptionFiltersPaginatorOptions is the paginator options for // DescribeSubscriptionFilters type DescribeSubscriptionFiltersPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeSubscriptionFiltersPaginator) NextPage(ctx context.Context, opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSubscriptionFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeSubscriptionFiltersPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeSubscriptionFiltersAPIClient is a client that implements the +// DescribeSubscriptionFilters operation. +type DescribeSubscriptionFiltersAPIClient interface { + DescribeSubscriptionFilters(context.Context, *DescribeSubscriptionFiltersInput, ...func(*Options)) (*DescribeSubscriptionFiltersOutput, error) +} + +var _ DescribeSubscriptionFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSubscriptionFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_DisassociateKmsKey.go b/service/cloudwatchlogs/api_op_DisassociateKmsKey.go index ef8fdcf1993..8d15c93703d 100644 --- a/service/cloudwatchlogs/api_op_DisassociateKmsKey.go +++ b/service/cloudwatchlogs/api_op_DisassociateKmsKey.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDisassociateKmsKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateKmsKey(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_FilterLogEvents.go b/service/cloudwatchlogs/api_op_FilterLogEvents.go index 1de795d97ec..8c859701975 100644 --- a/service/cloudwatchlogs/api_op_FilterLogEvents.go +++ b/service/cloudwatchlogs/api_op_FilterLogEvents.go @@ -206,6 +206,9 @@ func (c *Client) addOperationFilterLogEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFilterLogEvents(options.Region), middleware.Before); err != nil { return err } @@ -227,14 +230,6 @@ func (c *Client) addOperationFilterLogEventsMiddlewares(stack *middleware.Stack, return nil } -// FilterLogEventsAPIClient is a client that implements the FilterLogEvents -// operation. -type FilterLogEventsAPIClient interface { - FilterLogEvents(context.Context, *FilterLogEventsInput, ...func(*Options)) (*FilterLogEventsOutput, error) -} - -var _ FilterLogEventsAPIClient = (*Client)(nil) - // FilterLogEventsPaginatorOptions is the paginator options for FilterLogEvents type FilterLogEventsPaginatorOptions struct { // The maximum number of events to return. The default is 10,000 events. @@ -298,6 +293,9 @@ func (p *FilterLogEventsPaginator) NextPage(ctx context.Context, optFns ...func( } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.FilterLogEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -317,6 +315,14 @@ func (p *FilterLogEventsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// FilterLogEventsAPIClient is a client that implements the FilterLogEvents +// operation. +type FilterLogEventsAPIClient interface { + FilterLogEvents(context.Context, *FilterLogEventsInput, ...func(*Options)) (*FilterLogEventsOutput, error) +} + +var _ FilterLogEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opFilterLogEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go b/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go index 29583382020..ead0f076f6e 100644 --- a/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go +++ b/service/cloudwatchlogs/api_op_GetDataProtectionPolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDataProtectionPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataProtectionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetDelivery.go b/service/cloudwatchlogs/api_op_GetDelivery.go index 98b10fd229e..38be575b487 100644 --- a/service/cloudwatchlogs/api_op_GetDelivery.go +++ b/service/cloudwatchlogs/api_op_GetDelivery.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetDeliveryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeliveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetDeliveryDestination.go b/service/cloudwatchlogs/api_op_GetDeliveryDestination.go index da6b0cd9905..36f99ecae0a 100644 --- a/service/cloudwatchlogs/api_op_GetDeliveryDestination.go +++ b/service/cloudwatchlogs/api_op_GetDeliveryDestination.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDeliveryDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeliveryDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go b/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go index 3bb71617900..5ddc6647f8a 100644 --- a/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go +++ b/service/cloudwatchlogs/api_op_GetDeliveryDestinationPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetDeliveryDestinationPolicyMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeliveryDestinationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetDeliverySource.go b/service/cloudwatchlogs/api_op_GetDeliverySource.go index 09c4db9324c..36bd0b3bd70 100644 --- a/service/cloudwatchlogs/api_op_GetDeliverySource.go +++ b/service/cloudwatchlogs/api_op_GetDeliverySource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDeliverySourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeliverySourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go b/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go index b4424536052..64cb753c939 100644 --- a/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go +++ b/service/cloudwatchlogs/api_op_GetLogAnomalyDetector.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetLogAnomalyDetectorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLogAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetLogEvents.go b/service/cloudwatchlogs/api_op_GetLogEvents.go index ebd9bf0ed48..ef26fcf709b 100644 --- a/service/cloudwatchlogs/api_op_GetLogEvents.go +++ b/service/cloudwatchlogs/api_op_GetLogEvents.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetLogEventsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLogEventsValidationMiddleware(stack); err != nil { return err } @@ -202,13 +205,6 @@ func (c *Client) addOperationGetLogEventsMiddlewares(stack *middleware.Stack, op return nil } -// GetLogEventsAPIClient is a client that implements the GetLogEvents operation. -type GetLogEventsAPIClient interface { - GetLogEvents(context.Context, *GetLogEventsInput, ...func(*Options)) (*GetLogEventsOutput, error) -} - -var _ GetLogEventsAPIClient = (*Client)(nil) - // GetLogEventsPaginatorOptions is the paginator options for GetLogEvents type GetLogEventsPaginatorOptions struct { // The maximum number of log events returned. If you don't specify a limit, the @@ -274,6 +270,9 @@ func (p *GetLogEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetLogEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -293,6 +292,13 @@ func (p *GetLogEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetLogEventsAPIClient is a client that implements the GetLogEvents operation. +type GetLogEventsAPIClient interface { + GetLogEvents(context.Context, *GetLogEventsInput, ...func(*Options)) (*GetLogEventsOutput, error) +} + +var _ GetLogEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLogEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_GetLogGroupFields.go b/service/cloudwatchlogs/api_op_GetLogGroupFields.go index b65f5cb3dc8..2da98415877 100644 --- a/service/cloudwatchlogs/api_op_GetLogGroupFields.go +++ b/service/cloudwatchlogs/api_op_GetLogGroupFields.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetLogGroupFieldsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogGroupFields(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetLogRecord.go b/service/cloudwatchlogs/api_op_GetLogRecord.go index 03839fad545..a39d4b6d166 100644 --- a/service/cloudwatchlogs/api_op_GetLogRecord.go +++ b/service/cloudwatchlogs/api_op_GetLogRecord.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetLogRecordMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLogRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_GetQueryResults.go b/service/cloudwatchlogs/api_op_GetQueryResults.go index 32dadca3c0e..5e145ed81f9 100644 --- a/service/cloudwatchlogs/api_op_GetQueryResults.go +++ b/service/cloudwatchlogs/api_op_GetQueryResults.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_ListAnomalies.go b/service/cloudwatchlogs/api_op_ListAnomalies.go index 4d5ec7851eb..39da0620805 100644 --- a/service/cloudwatchlogs/api_op_ListAnomalies.go +++ b/service/cloudwatchlogs/api_op_ListAnomalies.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAnomaliesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnomalies(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListAnomaliesMiddlewares(stack *middleware.Stack, o return nil } -// ListAnomaliesAPIClient is a client that implements the ListAnomalies operation. -type ListAnomaliesAPIClient interface { - ListAnomalies(context.Context, *ListAnomaliesInput, ...func(*Options)) (*ListAnomaliesOutput, error) -} - -var _ ListAnomaliesAPIClient = (*Client)(nil) - // ListAnomaliesPaginatorOptions is the paginator options for ListAnomalies type ListAnomaliesPaginatorOptions struct { // The maximum number of items to return. If you don't specify a value, the @@ -214,6 +210,9 @@ func (p *ListAnomaliesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomalies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListAnomaliesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListAnomaliesAPIClient is a client that implements the ListAnomalies operation. +type ListAnomaliesAPIClient interface { + ListAnomalies(context.Context, *ListAnomaliesInput, ...func(*Options)) (*ListAnomaliesOutput, error) +} + +var _ ListAnomaliesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomalies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go b/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go index b8be3308da9..258c5e3a689 100644 --- a/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go +++ b/service/cloudwatchlogs/api_op_ListLogAnomalyDetectors.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListLogAnomalyDetectorsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLogAnomalyDetectors(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListLogAnomalyDetectorsMiddlewares(stack *middlewar return nil } -// ListLogAnomalyDetectorsAPIClient is a client that implements the -// ListLogAnomalyDetectors operation. -type ListLogAnomalyDetectorsAPIClient interface { - ListLogAnomalyDetectors(context.Context, *ListLogAnomalyDetectorsInput, ...func(*Options)) (*ListLogAnomalyDetectorsOutput, error) -} - -var _ ListLogAnomalyDetectorsAPIClient = (*Client)(nil) - // ListLogAnomalyDetectorsPaginatorOptions is the paginator options for // ListLogAnomalyDetectors type ListLogAnomalyDetectorsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListLogAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLogAnomalyDetectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListLogAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListLogAnomalyDetectorsAPIClient is a client that implements the +// ListLogAnomalyDetectors operation. +type ListLogAnomalyDetectorsAPIClient interface { + ListLogAnomalyDetectors(context.Context, *ListLogAnomalyDetectorsInput, ...func(*Options)) (*ListLogAnomalyDetectorsOutput, error) +} + +var _ ListLogAnomalyDetectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLogAnomalyDetectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cloudwatchlogs/api_op_ListTagsForResource.go b/service/cloudwatchlogs/api_op_ListTagsForResource.go index 7926e53c8cd..abef4b330b9 100644 --- a/service/cloudwatchlogs/api_op_ListTagsForResource.go +++ b/service/cloudwatchlogs/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_ListTagsLogGroup.go b/service/cloudwatchlogs/api_op_ListTagsLogGroup.go index 6691a701efe..9f5b94a0b90 100644 --- a/service/cloudwatchlogs/api_op_ListTagsLogGroup.go +++ b/service/cloudwatchlogs/api_op_ListTagsLogGroup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsLogGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsLogGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutAccountPolicy.go b/service/cloudwatchlogs/api_op_PutAccountPolicy.go index 9769d2a3549..729d9f3f7c3 100644 --- a/service/cloudwatchlogs/api_op_PutAccountPolicy.go +++ b/service/cloudwatchlogs/api_op_PutAccountPolicy.go @@ -278,6 +278,9 @@ func (c *Client) addOperationPutAccountPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go b/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go index f3b9b730549..fb6356a67ab 100644 --- a/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go +++ b/service/cloudwatchlogs/api_op_PutDataProtectionPolicy.go @@ -178,6 +178,9 @@ func (c *Client) addOperationPutDataProtectionPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDataProtectionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutDeliveryDestination.go b/service/cloudwatchlogs/api_op_PutDeliveryDestination.go index b448599c83b..d3aa190fc2c 100644 --- a/service/cloudwatchlogs/api_op_PutDeliveryDestination.go +++ b/service/cloudwatchlogs/api_op_PutDeliveryDestination.go @@ -160,6 +160,9 @@ func (c *Client) addOperationPutDeliveryDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDeliveryDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go b/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go index 83cda45fb56..a0bbc3d442d 100644 --- a/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go +++ b/service/cloudwatchlogs/api_op_PutDeliveryDestinationPolicy.go @@ -139,6 +139,9 @@ func (c *Client) addOperationPutDeliveryDestinationPolicyMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDeliveryDestinationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutDeliverySource.go b/service/cloudwatchlogs/api_op_PutDeliverySource.go index 7163715573c..bc7ccc22754 100644 --- a/service/cloudwatchlogs/api_op_PutDeliverySource.go +++ b/service/cloudwatchlogs/api_op_PutDeliverySource.go @@ -172,6 +172,9 @@ func (c *Client) addOperationPutDeliverySourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDeliverySourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutDestination.go b/service/cloudwatchlogs/api_op_PutDestination.go index b33ceb3b733..b1579ef7e68 100644 --- a/service/cloudwatchlogs/api_op_PutDestination.go +++ b/service/cloudwatchlogs/api_op_PutDestination.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutDestinationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutDestinationPolicy.go b/service/cloudwatchlogs/api_op_PutDestinationPolicy.go index 222c3f24bf7..1367b0f42c6 100644 --- a/service/cloudwatchlogs/api_op_PutDestinationPolicy.go +++ b/service/cloudwatchlogs/api_op_PutDestinationPolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutDestinationPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDestinationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutLogEvents.go b/service/cloudwatchlogs/api_op_PutLogEvents.go index 3b86b7fe0c5..9e66b633bbb 100644 --- a/service/cloudwatchlogs/api_op_PutLogEvents.go +++ b/service/cloudwatchlogs/api_op_PutLogEvents.go @@ -172,6 +172,9 @@ func (c *Client) addOperationPutLogEventsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLogEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutMetricFilter.go b/service/cloudwatchlogs/api_op_PutMetricFilter.go index 3d4f67123c9..0b5166f64e2 100644 --- a/service/cloudwatchlogs/api_op_PutMetricFilter.go +++ b/service/cloudwatchlogs/api_op_PutMetricFilter.go @@ -140,6 +140,9 @@ func (c *Client) addOperationPutMetricFilterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMetricFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutQueryDefinition.go b/service/cloudwatchlogs/api_op_PutQueryDefinition.go index fe36f020a03..3d1bca9e087 100644 --- a/service/cloudwatchlogs/api_op_PutQueryDefinition.go +++ b/service/cloudwatchlogs/api_op_PutQueryDefinition.go @@ -155,6 +155,9 @@ func (c *Client) addOperationPutQueryDefinitionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutQueryDefinitionMiddleware(stack, options); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutResourcePolicy.go b/service/cloudwatchlogs/api_op_PutResourcePolicy.go index 312ca7ff218..f74b272ba98 100644 --- a/service/cloudwatchlogs/api_op_PutResourcePolicy.go +++ b/service/cloudwatchlogs/api_op_PutResourcePolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutRetentionPolicy.go b/service/cloudwatchlogs/api_op_PutRetentionPolicy.go index ba58097a6e0..3011367f902 100644 --- a/service/cloudwatchlogs/api_op_PutRetentionPolicy.go +++ b/service/cloudwatchlogs/api_op_PutRetentionPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationPutRetentionPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRetentionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go b/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go index c820fecbbb1..1f263b337e2 100644 --- a/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go +++ b/service/cloudwatchlogs/api_op_PutSubscriptionFilter.go @@ -180,6 +180,9 @@ func (c *Client) addOperationPutSubscriptionFilterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSubscriptionFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_StartLiveTail.go b/service/cloudwatchlogs/api_op_StartLiveTail.go index da1bb39bd09..a08338fe3c5 100644 --- a/service/cloudwatchlogs/api_op_StartLiveTail.go +++ b/service/cloudwatchlogs/api_op_StartLiveTail.go @@ -193,6 +193,9 @@ func (c *Client) addOperationStartLiveTailMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartLiveTailMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_StartQuery.go b/service/cloudwatchlogs/api_op_StartQuery.go index e4baa1c884e..daa83cba9cd 100644 --- a/service/cloudwatchlogs/api_op_StartQuery.go +++ b/service/cloudwatchlogs/api_op_StartQuery.go @@ -180,6 +180,9 @@ func (c *Client) addOperationStartQueryMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_StopQuery.go b/service/cloudwatchlogs/api_op_StopQuery.go index f051ea9f3be..1cc3cc7b413 100644 --- a/service/cloudwatchlogs/api_op_StopQuery.go +++ b/service/cloudwatchlogs/api_op_StopQuery.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopQueryMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_TagLogGroup.go b/service/cloudwatchlogs/api_op_TagLogGroup.go index dd5feada946..fae890d9e66 100644 --- a/service/cloudwatchlogs/api_op_TagLogGroup.go +++ b/service/cloudwatchlogs/api_op_TagLogGroup.go @@ -125,6 +125,9 @@ func (c *Client) addOperationTagLogGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagLogGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_TagResource.go b/service/cloudwatchlogs/api_op_TagResource.go index 5527cf720c8..5ca996ff239 100644 --- a/service/cloudwatchlogs/api_op_TagResource.go +++ b/service/cloudwatchlogs/api_op_TagResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_TestMetricFilter.go b/service/cloudwatchlogs/api_op_TestMetricFilter.go index 8a48ed6f097..0930c27b8c2 100644 --- a/service/cloudwatchlogs/api_op_TestMetricFilter.go +++ b/service/cloudwatchlogs/api_op_TestMetricFilter.go @@ -116,6 +116,9 @@ func (c *Client) addOperationTestMetricFilterMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestMetricFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_UntagLogGroup.go b/service/cloudwatchlogs/api_op_UntagLogGroup.go index 31784762d16..22a1116cd74 100644 --- a/service/cloudwatchlogs/api_op_UntagLogGroup.go +++ b/service/cloudwatchlogs/api_op_UntagLogGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUntagLogGroupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagLogGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_UntagResource.go b/service/cloudwatchlogs/api_op_UntagResource.go index be9a4359a10..d7a64b21340 100644 --- a/service/cloudwatchlogs/api_op_UntagResource.go +++ b/service/cloudwatchlogs/api_op_UntagResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_UpdateAnomaly.go b/service/cloudwatchlogs/api_op_UpdateAnomaly.go index be469406ea9..d4091915878 100644 --- a/service/cloudwatchlogs/api_op_UpdateAnomaly.go +++ b/service/cloudwatchlogs/api_op_UpdateAnomaly.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateAnomalyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnomalyValidationMiddleware(stack); err != nil { return err } diff --git a/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go b/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go index dd752ed47ec..35c253a127b 100644 --- a/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go +++ b/service/cloudwatchlogs/api_op_UpdateLogAnomalyDetector.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateLogAnomalyDetectorMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLogAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_client.go b/service/codeartifact/api_client.go index 24f496187ea..7252421586a 100644 --- a/service/codeartifact/api_client.go +++ b/service/codeartifact/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/codeartifact/api_op_AssociateExternalConnection.go b/service/codeartifact/api_op_AssociateExternalConnection.go index 7165803bf13..5b26a79fb2f 100644 --- a/service/codeartifact/api_op_AssociateExternalConnection.go +++ b/service/codeartifact/api_op_AssociateExternalConnection.go @@ -141,6 +141,9 @@ func (c *Client) addOperationAssociateExternalConnectionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateExternalConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_CopyPackageVersions.go b/service/codeartifact/api_op_CopyPackageVersions.go index e6ae21a3a21..5438067aa63 100644 --- a/service/codeartifact/api_op_CopyPackageVersions.go +++ b/service/codeartifact/api_op_CopyPackageVersions.go @@ -199,6 +199,9 @@ func (c *Client) addOperationCopyPackageVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyPackageVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_CreateDomain.go b/service/codeartifact/api_op_CreateDomain.go index cd2be037d49..3d534593b89 100644 --- a/service/codeartifact/api_op_CreateDomain.go +++ b/service/codeartifact/api_op_CreateDomain.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_CreatePackageGroup.go b/service/codeartifact/api_op_CreatePackageGroup.go index 0a2c0497e2d..47ef7e1c93c 100644 --- a/service/codeartifact/api_op_CreatePackageGroup.go +++ b/service/codeartifact/api_op_CreatePackageGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreatePackageGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_CreateRepository.go b/service/codeartifact/api_op_CreateRepository.go index 706b7910a35..b9ca34fbac4 100644 --- a/service/codeartifact/api_op_CreateRepository.go +++ b/service/codeartifact/api_op_CreateRepository.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeleteDomain.go b/service/codeartifact/api_op_DeleteDomain.go index cbf9aa6ca64..226b67cd9a2 100644 --- a/service/codeartifact/api_op_DeleteDomain.go +++ b/service/codeartifact/api_op_DeleteDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeleteDomainPermissionsPolicy.go b/service/codeartifact/api_op_DeleteDomainPermissionsPolicy.go index 0c9c0b8e8df..9ca6f62055b 100644 --- a/service/codeartifact/api_op_DeleteDomainPermissionsPolicy.go +++ b/service/codeartifact/api_op_DeleteDomainPermissionsPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteDomainPermissionsPolicyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainPermissionsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeletePackage.go b/service/codeartifact/api_op_DeletePackage.go index e519587b83b..a742251b236 100644 --- a/service/codeartifact/api_op_DeletePackage.go +++ b/service/codeartifact/api_op_DeletePackage.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDeletePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeletePackageGroup.go b/service/codeartifact/api_op_DeletePackageGroup.go index 496be108918..12abccbc1c8 100644 --- a/service/codeartifact/api_op_DeletePackageGroup.go +++ b/service/codeartifact/api_op_DeletePackageGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeletePackageGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeletePackageVersions.go b/service/codeartifact/api_op_DeletePackageVersions.go index eba5b0e306c..6aedba08bac 100644 --- a/service/codeartifact/api_op_DeletePackageVersions.go +++ b/service/codeartifact/api_op_DeletePackageVersions.go @@ -180,6 +180,9 @@ func (c *Client) addOperationDeletePackageVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackageVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeleteRepository.go b/service/codeartifact/api_op_DeleteRepository.go index d37f3192701..78e70c02ca2 100644 --- a/service/codeartifact/api_op_DeleteRepository.go +++ b/service/codeartifact/api_op_DeleteRepository.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DeleteRepositoryPermissionsPolicy.go b/service/codeartifact/api_op_DeleteRepositoryPermissionsPolicy.go index 647a3423484..ef4144c6d1d 100644 --- a/service/codeartifact/api_op_DeleteRepositoryPermissionsPolicy.go +++ b/service/codeartifact/api_op_DeleteRepositoryPermissionsPolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteRepositoryPermissionsPolicyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryPermissionsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DescribeDomain.go b/service/codeartifact/api_op_DescribeDomain.go index 69bc29a67d9..dae2bd97dd6 100644 --- a/service/codeartifact/api_op_DescribeDomain.go +++ b/service/codeartifact/api_op_DescribeDomain.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DescribePackage.go b/service/codeartifact/api_op_DescribePackage.go index a1e048b75fc..e938d0280e6 100644 --- a/service/codeartifact/api_op_DescribePackage.go +++ b/service/codeartifact/api_op_DescribePackage.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribePackageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DescribePackageGroup.go b/service/codeartifact/api_op_DescribePackageGroup.go index 137dcc4e912..5d8153823ab 100644 --- a/service/codeartifact/api_op_DescribePackageGroup.go +++ b/service/codeartifact/api_op_DescribePackageGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribePackageGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DescribePackageVersion.go b/service/codeartifact/api_op_DescribePackageVersion.go index 178e3599489..62b1b28757b 100644 --- a/service/codeartifact/api_op_DescribePackageVersion.go +++ b/service/codeartifact/api_op_DescribePackageVersion.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribePackageVersionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DescribeRepository.go b/service/codeartifact/api_op_DescribeRepository.go index 20509c1f9b6..dda21dbfdbc 100644 --- a/service/codeartifact/api_op_DescribeRepository.go +++ b/service/codeartifact/api_op_DescribeRepository.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeRepositoryMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DisassociateExternalConnection.go b/service/codeartifact/api_op_DisassociateExternalConnection.go index a76ab6e743d..1891ba1c317 100644 --- a/service/codeartifact/api_op_DisassociateExternalConnection.go +++ b/service/codeartifact/api_op_DisassociateExternalConnection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisassociateExternalConnectionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateExternalConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_DisposePackageVersions.go b/service/codeartifact/api_op_DisposePackageVersions.go index 122b3da7f58..78b0ff8aa7a 100644 --- a/service/codeartifact/api_op_DisposePackageVersions.go +++ b/service/codeartifact/api_op_DisposePackageVersions.go @@ -187,6 +187,9 @@ func (c *Client) addOperationDisposePackageVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisposePackageVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetAssociatedPackageGroup.go b/service/codeartifact/api_op_GetAssociatedPackageGroup.go index 90e8092bf5f..2850b7bec9c 100644 --- a/service/codeartifact/api_op_GetAssociatedPackageGroup.go +++ b/service/codeartifact/api_op_GetAssociatedPackageGroup.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetAssociatedPackageGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssociatedPackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetAuthorizationToken.go b/service/codeartifact/api_op_GetAuthorizationToken.go index 558f1b88fce..9bf792dcf9e 100644 --- a/service/codeartifact/api_op_GetAuthorizationToken.go +++ b/service/codeartifact/api_op_GetAuthorizationToken.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetAuthorizationTokenMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAuthorizationTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetDomainPermissionsPolicy.go b/service/codeartifact/api_op_GetDomainPermissionsPolicy.go index 4f8faade211..c083b55a61a 100644 --- a/service/codeartifact/api_op_GetDomainPermissionsPolicy.go +++ b/service/codeartifact/api_op_GetDomainPermissionsPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetDomainPermissionsPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainPermissionsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetPackageVersionAsset.go b/service/codeartifact/api_op_GetPackageVersionAsset.go index cfd932001a4..b2e86ff3ef4 100644 --- a/service/codeartifact/api_op_GetPackageVersionAsset.go +++ b/service/codeartifact/api_op_GetPackageVersionAsset.go @@ -172,6 +172,9 @@ func (c *Client) addOperationGetPackageVersionAssetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPackageVersionAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetPackageVersionReadme.go b/service/codeartifact/api_op_GetPackageVersionReadme.go index f2958540370..e2d7ee2b3a2 100644 --- a/service/codeartifact/api_op_GetPackageVersionReadme.go +++ b/service/codeartifact/api_op_GetPackageVersionReadme.go @@ -182,6 +182,9 @@ func (c *Client) addOperationGetPackageVersionReadmeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPackageVersionReadmeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetRepositoryEndpoint.go b/service/codeartifact/api_op_GetRepositoryEndpoint.go index 7904d094fee..bad3d00f4b0 100644 --- a/service/codeartifact/api_op_GetRepositoryEndpoint.go +++ b/service/codeartifact/api_op_GetRepositoryEndpoint.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetRepositoryEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_GetRepositoryPermissionsPolicy.go b/service/codeartifact/api_op_GetRepositoryPermissionsPolicy.go index 270eddddc9a..c5949d02f13 100644 --- a/service/codeartifact/api_op_GetRepositoryPermissionsPolicy.go +++ b/service/codeartifact/api_op_GetRepositoryPermissionsPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRepositoryPermissionsPolicyMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryPermissionsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_ListAllowedRepositoriesForGroup.go b/service/codeartifact/api_op_ListAllowedRepositoriesForGroup.go index 37ca38bc328..0e5289968e7 100644 --- a/service/codeartifact/api_op_ListAllowedRepositoriesForGroup.go +++ b/service/codeartifact/api_op_ListAllowedRepositoriesForGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListAllowedRepositoriesForGroupMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAllowedRepositoriesForGroupValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListAllowedRepositoriesForGroupMiddlewares(stack *m return nil } -// ListAllowedRepositoriesForGroupAPIClient is a client that implements the -// ListAllowedRepositoriesForGroup operation. -type ListAllowedRepositoriesForGroupAPIClient interface { - ListAllowedRepositoriesForGroup(context.Context, *ListAllowedRepositoriesForGroupInput, ...func(*Options)) (*ListAllowedRepositoriesForGroupOutput, error) -} - -var _ ListAllowedRepositoriesForGroupAPIClient = (*Client)(nil) - // ListAllowedRepositoriesForGroupPaginatorOptions is the paginator options for // ListAllowedRepositoriesForGroup type ListAllowedRepositoriesForGroupPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListAllowedRepositoriesForGroupPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAllowedRepositoriesForGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListAllowedRepositoriesForGroupPaginator) NextPage(ctx context.Context, return result, nil } +// ListAllowedRepositoriesForGroupAPIClient is a client that implements the +// ListAllowedRepositoriesForGroup operation. +type ListAllowedRepositoriesForGroupAPIClient interface { + ListAllowedRepositoriesForGroup(context.Context, *ListAllowedRepositoriesForGroupInput, ...func(*Options)) (*ListAllowedRepositoriesForGroupOutput, error) +} + +var _ ListAllowedRepositoriesForGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAllowedRepositoriesForGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListAssociatedPackages.go b/service/codeartifact/api_op_ListAssociatedPackages.go index 7c45bf77f11..de208db13ab 100644 --- a/service/codeartifact/api_op_ListAssociatedPackages.go +++ b/service/codeartifact/api_op_ListAssociatedPackages.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListAssociatedPackagesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedPackagesValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListAssociatedPackagesMiddlewares(stack *middleware return nil } -// ListAssociatedPackagesAPIClient is a client that implements the -// ListAssociatedPackages operation. -type ListAssociatedPackagesAPIClient interface { - ListAssociatedPackages(context.Context, *ListAssociatedPackagesInput, ...func(*Options)) (*ListAssociatedPackagesOutput, error) -} - -var _ ListAssociatedPackagesAPIClient = (*Client)(nil) - // ListAssociatedPackagesPaginatorOptions is the paginator options for // ListAssociatedPackages type ListAssociatedPackagesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListAssociatedPackagesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListAssociatedPackagesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAssociatedPackagesAPIClient is a client that implements the +// ListAssociatedPackages operation. +type ListAssociatedPackagesAPIClient interface { + ListAssociatedPackages(context.Context, *ListAssociatedPackagesInput, ...func(*Options)) (*ListAssociatedPackagesOutput, error) +} + +var _ ListAssociatedPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListDomains.go b/service/codeartifact/api_op_ListDomains.go index cea306c3277..928f8a8b138 100644 --- a/service/codeartifact/api_op_ListDomains.go +++ b/service/codeartifact/api_op_ListDomains.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of results to return per page. @@ -210,6 +206,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListPackageGroups.go b/service/codeartifact/api_op_ListPackageGroups.go index 65acf4b6fc7..de505607af4 100644 --- a/service/codeartifact/api_op_ListPackageGroups.go +++ b/service/codeartifact/api_op_ListPackageGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListPackageGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackageGroupsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListPackageGroupsMiddlewares(stack *middleware.Stac return nil } -// ListPackageGroupsAPIClient is a client that implements the ListPackageGroups -// operation. -type ListPackageGroupsAPIClient interface { - ListPackageGroups(context.Context, *ListPackageGroupsInput, ...func(*Options)) (*ListPackageGroupsOutput, error) -} - -var _ ListPackageGroupsAPIClient = (*Client)(nil) - // ListPackageGroupsPaginatorOptions is the paginator options for ListPackageGroups type ListPackageGroupsPaginatorOptions struct { // The maximum number of results to return per page. @@ -220,6 +215,9 @@ func (p *ListPackageGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackageGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListPackageGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListPackageGroupsAPIClient is a client that implements the ListPackageGroups +// operation. +type ListPackageGroupsAPIClient interface { + ListPackageGroups(context.Context, *ListPackageGroupsInput, ...func(*Options)) (*ListPackageGroupsOutput, error) +} + +var _ ListPackageGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackageGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListPackageVersionAssets.go b/service/codeartifact/api_op_ListPackageVersionAssets.go index 1e4468ce6f6..0bbefab5e7b 100644 --- a/service/codeartifact/api_op_ListPackageVersionAssets.go +++ b/service/codeartifact/api_op_ListPackageVersionAssets.go @@ -196,6 +196,9 @@ func (c *Client) addOperationListPackageVersionAssetsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackageVersionAssetsValidationMiddleware(stack); err != nil { return err } @@ -220,14 +223,6 @@ func (c *Client) addOperationListPackageVersionAssetsMiddlewares(stack *middlewa return nil } -// ListPackageVersionAssetsAPIClient is a client that implements the -// ListPackageVersionAssets operation. -type ListPackageVersionAssetsAPIClient interface { - ListPackageVersionAssets(context.Context, *ListPackageVersionAssetsInput, ...func(*Options)) (*ListPackageVersionAssetsOutput, error) -} - -var _ ListPackageVersionAssetsAPIClient = (*Client)(nil) - // ListPackageVersionAssetsPaginatorOptions is the paginator options for // ListPackageVersionAssets type ListPackageVersionAssetsPaginatorOptions struct { @@ -293,6 +288,9 @@ func (p *ListPackageVersionAssetsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackageVersionAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -312,6 +310,14 @@ func (p *ListPackageVersionAssetsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListPackageVersionAssetsAPIClient is a client that implements the +// ListPackageVersionAssets operation. +type ListPackageVersionAssetsAPIClient interface { + ListPackageVersionAssets(context.Context, *ListPackageVersionAssetsInput, ...func(*Options)) (*ListPackageVersionAssetsOutput, error) +} + +var _ ListPackageVersionAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackageVersionAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListPackageVersionDependencies.go b/service/codeartifact/api_op_ListPackageVersionDependencies.go index 81a3d0a212f..02aa5a2dee2 100644 --- a/service/codeartifact/api_op_ListPackageVersionDependencies.go +++ b/service/codeartifact/api_op_ListPackageVersionDependencies.go @@ -199,6 +199,9 @@ func (c *Client) addOperationListPackageVersionDependenciesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackageVersionDependenciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_ListPackageVersions.go b/service/codeartifact/api_op_ListPackageVersions.go index 64202a96b92..5c66a6cffe5 100644 --- a/service/codeartifact/api_op_ListPackageVersions.go +++ b/service/codeartifact/api_op_ListPackageVersions.go @@ -204,6 +204,9 @@ func (c *Client) addOperationListPackageVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackageVersionsValidationMiddleware(stack); err != nil { return err } @@ -228,14 +231,6 @@ func (c *Client) addOperationListPackageVersionsMiddlewares(stack *middleware.St return nil } -// ListPackageVersionsAPIClient is a client that implements the -// ListPackageVersions operation. -type ListPackageVersionsAPIClient interface { - ListPackageVersions(context.Context, *ListPackageVersionsInput, ...func(*Options)) (*ListPackageVersionsOutput, error) -} - -var _ ListPackageVersionsAPIClient = (*Client)(nil) - // ListPackageVersionsPaginatorOptions is the paginator options for // ListPackageVersions type ListPackageVersionsPaginatorOptions struct { @@ -300,6 +295,9 @@ func (p *ListPackageVersionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackageVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -319,6 +317,14 @@ func (p *ListPackageVersionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPackageVersionsAPIClient is a client that implements the +// ListPackageVersions operation. +type ListPackageVersionsAPIClient interface { + ListPackageVersions(context.Context, *ListPackageVersionsInput, ...func(*Options)) (*ListPackageVersionsOutput, error) +} + +var _ ListPackageVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackageVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListPackages.go b/service/codeartifact/api_op_ListPackages.go index 310af3f95ab..c3a18976863 100644 --- a/service/codeartifact/api_op_ListPackages.go +++ b/service/codeartifact/api_op_ListPackages.go @@ -172,6 +172,9 @@ func (c *Client) addOperationListPackagesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackagesValidationMiddleware(stack); err != nil { return err } @@ -196,13 +199,6 @@ func (c *Client) addOperationListPackagesMiddlewares(stack *middleware.Stack, op return nil } -// ListPackagesAPIClient is a client that implements the ListPackages operation. -type ListPackagesAPIClient interface { - ListPackages(context.Context, *ListPackagesInput, ...func(*Options)) (*ListPackagesOutput, error) -} - -var _ ListPackagesAPIClient = (*Client)(nil) - // ListPackagesPaginatorOptions is the paginator options for ListPackages type ListPackagesPaginatorOptions struct { // The maximum number of results to return per page. @@ -266,6 +262,9 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +284,13 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPackagesAPIClient is a client that implements the ListPackages operation. +type ListPackagesAPIClient interface { + ListPackages(context.Context, *ListPackagesInput, ...func(*Options)) (*ListPackagesOutput, error) +} + +var _ ListPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListRepositories.go b/service/codeartifact/api_op_ListRepositories.go index 57c9318d140..802f0cb8913 100644 --- a/service/codeartifact/api_op_ListRepositories.go +++ b/service/codeartifact/api_op_ListRepositories.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositories(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack return nil } -// ListRepositoriesAPIClient is a client that implements the ListRepositories -// operation. -type ListRepositoriesAPIClient interface { - ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) -} - -var _ ListRepositoriesAPIClient = (*Client)(nil) - // ListRepositoriesPaginatorOptions is the paginator options for ListRepositories type ListRepositoriesPaginatorOptions struct { // The maximum number of results to return per page. @@ -215,6 +210,9 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRepositoriesAPIClient is a client that implements the ListRepositories +// operation. +type ListRepositoriesAPIClient interface { + ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) +} + +var _ ListRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListRepositoriesInDomain.go b/service/codeartifact/api_op_ListRepositoriesInDomain.go index bad51fa552c..fab10ebc806 100644 --- a/service/codeartifact/api_op_ListRepositoriesInDomain.go +++ b/service/codeartifact/api_op_ListRepositoriesInDomain.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListRepositoriesInDomainMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRepositoriesInDomainValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListRepositoriesInDomainMiddlewares(stack *middlewa return nil } -// ListRepositoriesInDomainAPIClient is a client that implements the -// ListRepositoriesInDomain operation. -type ListRepositoriesInDomainAPIClient interface { - ListRepositoriesInDomain(context.Context, *ListRepositoriesInDomainInput, ...func(*Options)) (*ListRepositoriesInDomainOutput, error) -} - -var _ ListRepositoriesInDomainAPIClient = (*Client)(nil) - // ListRepositoriesInDomainPaginatorOptions is the paginator options for // ListRepositoriesInDomain type ListRepositoriesInDomainPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListRepositoriesInDomainPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositoriesInDomain(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListRepositoriesInDomainPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListRepositoriesInDomainAPIClient is a client that implements the +// ListRepositoriesInDomain operation. +type ListRepositoriesInDomainAPIClient interface { + ListRepositoriesInDomain(context.Context, *ListRepositoriesInDomainInput, ...func(*Options)) (*ListRepositoriesInDomainOutput, error) +} + +var _ ListRepositoriesInDomainAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositoriesInDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListSubPackageGroups.go b/service/codeartifact/api_op_ListSubPackageGroups.go index ba3a6a1197c..4599ab1fed0 100644 --- a/service/codeartifact/api_op_ListSubPackageGroups.go +++ b/service/codeartifact/api_op_ListSubPackageGroups.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSubPackageGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubPackageGroupsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListSubPackageGroupsMiddlewares(stack *middleware.S return nil } -// ListSubPackageGroupsAPIClient is a client that implements the -// ListSubPackageGroups operation. -type ListSubPackageGroupsAPIClient interface { - ListSubPackageGroups(context.Context, *ListSubPackageGroupsInput, ...func(*Options)) (*ListSubPackageGroupsOutput, error) -} - -var _ ListSubPackageGroupsAPIClient = (*Client)(nil) - // ListSubPackageGroupsPaginatorOptions is the paginator options for // ListSubPackageGroups type ListSubPackageGroupsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListSubPackageGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubPackageGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListSubPackageGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSubPackageGroupsAPIClient is a client that implements the +// ListSubPackageGroups operation. +type ListSubPackageGroupsAPIClient interface { + ListSubPackageGroups(context.Context, *ListSubPackageGroupsInput, ...func(*Options)) (*ListSubPackageGroupsOutput, error) +} + +var _ ListSubPackageGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubPackageGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeartifact/api_op_ListTagsForResource.go b/service/codeartifact/api_op_ListTagsForResource.go index 796245d9e94..bf0e1f7b110 100644 --- a/service/codeartifact/api_op_ListTagsForResource.go +++ b/service/codeartifact/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_PublishPackageVersion.go b/service/codeartifact/api_op_PublishPackageVersion.go index 25795cf7017..6107c7d5fe7 100644 --- a/service/codeartifact/api_op_PublishPackageVersion.go +++ b/service/codeartifact/api_op_PublishPackageVersion.go @@ -207,6 +207,9 @@ func (c *Client) addOperationPublishPackageVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishPackageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_PutDomainPermissionsPolicy.go b/service/codeartifact/api_op_PutDomainPermissionsPolicy.go index f0bce5c4307..7306144eefa 100644 --- a/service/codeartifact/api_op_PutDomainPermissionsPolicy.go +++ b/service/codeartifact/api_op_PutDomainPermissionsPolicy.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutDomainPermissionsPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDomainPermissionsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_PutPackageOriginConfiguration.go b/service/codeartifact/api_op_PutPackageOriginConfiguration.go index 25d80e2808d..b5c3e003a0a 100644 --- a/service/codeartifact/api_op_PutPackageOriginConfiguration.go +++ b/service/codeartifact/api_op_PutPackageOriginConfiguration.go @@ -172,6 +172,9 @@ func (c *Client) addOperationPutPackageOriginConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPackageOriginConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_PutRepositoryPermissionsPolicy.go b/service/codeartifact/api_op_PutRepositoryPermissionsPolicy.go index 0083252ff9f..aa14978f8fd 100644 --- a/service/codeartifact/api_op_PutRepositoryPermissionsPolicy.go +++ b/service/codeartifact/api_op_PutRepositoryPermissionsPolicy.go @@ -134,6 +134,9 @@ func (c *Client) addOperationPutRepositoryPermissionsPolicyMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRepositoryPermissionsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_TagResource.go b/service/codeartifact/api_op_TagResource.go index f3b1d0b9d47..deb79e915c8 100644 --- a/service/codeartifact/api_op_TagResource.go +++ b/service/codeartifact/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_UntagResource.go b/service/codeartifact/api_op_UntagResource.go index 0d626b2802d..1ac193c31da 100644 --- a/service/codeartifact/api_op_UntagResource.go +++ b/service/codeartifact/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_UpdatePackageGroup.go b/service/codeartifact/api_op_UpdatePackageGroup.go index 1ccbb5a7648..97d5217b1dd 100644 --- a/service/codeartifact/api_op_UpdatePackageGroup.go +++ b/service/codeartifact/api_op_UpdatePackageGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdatePackageGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_UpdatePackageGroupOriginConfiguration.go b/service/codeartifact/api_op_UpdatePackageGroupOriginConfiguration.go index 7f429ff913a..f2b05d4bd7d 100644 --- a/service/codeartifact/api_op_UpdatePackageGroupOriginConfiguration.go +++ b/service/codeartifact/api_op_UpdatePackageGroupOriginConfiguration.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdatePackageGroupOriginConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePackageGroupOriginConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_UpdatePackageVersionsStatus.go b/service/codeartifact/api_op_UpdatePackageVersionsStatus.go index 2540d9775ce..83753e26793 100644 --- a/service/codeartifact/api_op_UpdatePackageVersionsStatus.go +++ b/service/codeartifact/api_op_UpdatePackageVersionsStatus.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdatePackageVersionsStatusMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePackageVersionsStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeartifact/api_op_UpdateRepository.go b/service/codeartifact/api_op_UpdateRepository.go index 9043db79075..a848d6f436b 100644 --- a/service/codeartifact/api_op_UpdateRepository.go +++ b/service/codeartifact/api_op_UpdateRepository.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_client.go b/service/codebuild/api_client.go index 69140c661f2..7797ff66744 100644 --- a/service/codebuild/api_client.go +++ b/service/codebuild/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/codebuild/api_op_BatchDeleteBuilds.go b/service/codebuild/api_op_BatchDeleteBuilds.go index f7a4150fd1f..081f80f20dc 100644 --- a/service/codebuild/api_op_BatchDeleteBuilds.go +++ b/service/codebuild/api_op_BatchDeleteBuilds.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchDeleteBuildsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteBuildsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_BatchGetBuildBatches.go b/service/codebuild/api_op_BatchGetBuildBatches.go index cbb4b715b99..f6da8a644b9 100644 --- a/service/codebuild/api_op_BatchGetBuildBatches.go +++ b/service/codebuild/api_op_BatchGetBuildBatches.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetBuildBatchesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetBuildBatchesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_BatchGetBuilds.go b/service/codebuild/api_op_BatchGetBuilds.go index b867925e227..bb5a2e2fe23 100644 --- a/service/codebuild/api_op_BatchGetBuilds.go +++ b/service/codebuild/api_op_BatchGetBuilds.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetBuildsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetBuildsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_BatchGetFleets.go b/service/codebuild/api_op_BatchGetFleets.go index f07fe57365e..e546e9ee5ed 100644 --- a/service/codebuild/api_op_BatchGetFleets.go +++ b/service/codebuild/api_op_BatchGetFleets.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetFleetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFleetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_BatchGetProjects.go b/service/codebuild/api_op_BatchGetProjects.go index a210270743b..d04888412b5 100644 --- a/service/codebuild/api_op_BatchGetProjects.go +++ b/service/codebuild/api_op_BatchGetProjects.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchGetProjectsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetProjectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_BatchGetReportGroups.go b/service/codebuild/api_op_BatchGetReportGroups.go index 15ae492eb5a..2d49512bcae 100644 --- a/service/codebuild/api_op_BatchGetReportGroups.go +++ b/service/codebuild/api_op_BatchGetReportGroups.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetReportGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetReportGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_BatchGetReports.go b/service/codebuild/api_op_BatchGetReports.go index 7584a85db3f..8cbcf1a8291 100644 --- a/service/codebuild/api_op_BatchGetReports.go +++ b/service/codebuild/api_op_BatchGetReports.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetReportsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetReportsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_CreateFleet.go b/service/codebuild/api_op_CreateFleet.go index ec689ea712d..3d615be4820 100644 --- a/service/codebuild/api_op_CreateFleet.go +++ b/service/codebuild/api_op_CreateFleet.go @@ -223,6 +223,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_CreateProject.go b/service/codebuild/api_op_CreateProject.go index e61ba89d355..92c2be9f1c4 100644 --- a/service/codebuild/api_op_CreateProject.go +++ b/service/codebuild/api_op_CreateProject.go @@ -228,6 +228,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_CreateReportGroup.go b/service/codebuild/api_op_CreateReportGroup.go index a0a1ecf5dcf..9327358e82e 100644 --- a/service/codebuild/api_op_CreateReportGroup.go +++ b/service/codebuild/api_op_CreateReportGroup.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateReportGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReportGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_CreateWebhook.go b/service/codebuild/api_op_CreateWebhook.go index b31a1c4d17a..8e800a41602 100644 --- a/service/codebuild/api_op_CreateWebhook.go +++ b/service/codebuild/api_op_CreateWebhook.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteBuildBatch.go b/service/codebuild/api_op_DeleteBuildBatch.go index b92cbae3045..8caef474c59 100644 --- a/service/codebuild/api_op_DeleteBuildBatch.go +++ b/service/codebuild/api_op_DeleteBuildBatch.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteBuildBatchMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBuildBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteFleet.go b/service/codebuild/api_op_DeleteFleet.go index 20983771d34..f177fb63911 100644 --- a/service/codebuild/api_op_DeleteFleet.go +++ b/service/codebuild/api_op_DeleteFleet.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteProject.go b/service/codebuild/api_op_DeleteProject.go index 9f0441c0be2..d292811692e 100644 --- a/service/codebuild/api_op_DeleteProject.go +++ b/service/codebuild/api_op_DeleteProject.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteReport.go b/service/codebuild/api_op_DeleteReport.go index c00c6576d06..8cefed8e931 100644 --- a/service/codebuild/api_op_DeleteReport.go +++ b/service/codebuild/api_op_DeleteReport.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteReportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteReportGroup.go b/service/codebuild/api_op_DeleteReportGroup.go index d8283452ca7..05b67253bba 100644 --- a/service/codebuild/api_op_DeleteReportGroup.go +++ b/service/codebuild/api_op_DeleteReportGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteReportGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReportGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteResourcePolicy.go b/service/codebuild/api_op_DeleteResourcePolicy.go index 648f39f0c6c..2e86c3916ca 100644 --- a/service/codebuild/api_op_DeleteResourcePolicy.go +++ b/service/codebuild/api_op_DeleteResourcePolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteSourceCredentials.go b/service/codebuild/api_op_DeleteSourceCredentials.go index f568e7a32a5..60324ce62a6 100644 --- a/service/codebuild/api_op_DeleteSourceCredentials.go +++ b/service/codebuild/api_op_DeleteSourceCredentials.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteSourceCredentialsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSourceCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DeleteWebhook.go b/service/codebuild/api_op_DeleteWebhook.go index be88f6b273d..76778d22ab4 100644 --- a/service/codebuild/api_op_DeleteWebhook.go +++ b/service/codebuild/api_op_DeleteWebhook.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_DescribeCodeCoverages.go b/service/codebuild/api_op_DescribeCodeCoverages.go index 731cd7436cd..461e42046c6 100644 --- a/service/codebuild/api_op_DescribeCodeCoverages.go +++ b/service/codebuild/api_op_DescribeCodeCoverages.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeCodeCoveragesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCodeCoveragesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeCodeCoveragesMiddlewares(stack *middleware. return nil } -// DescribeCodeCoveragesAPIClient is a client that implements the -// DescribeCodeCoverages operation. -type DescribeCodeCoveragesAPIClient interface { - DescribeCodeCoverages(context.Context, *DescribeCodeCoveragesInput, ...func(*Options)) (*DescribeCodeCoveragesOutput, error) -} - -var _ DescribeCodeCoveragesAPIClient = (*Client)(nil) - // DescribeCodeCoveragesPaginatorOptions is the paginator options for // DescribeCodeCoverages type DescribeCodeCoveragesPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeCodeCoveragesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCodeCoverages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeCodeCoveragesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeCodeCoveragesAPIClient is a client that implements the +// DescribeCodeCoverages operation. +type DescribeCodeCoveragesAPIClient interface { + DescribeCodeCoverages(context.Context, *DescribeCodeCoveragesInput, ...func(*Options)) (*DescribeCodeCoveragesOutput, error) +} + +var _ DescribeCodeCoveragesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCodeCoverages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_DescribeTestCases.go b/service/codebuild/api_op_DescribeTestCases.go index d32c08aadcf..ce51a0dde8d 100644 --- a/service/codebuild/api_op_DescribeTestCases.go +++ b/service/codebuild/api_op_DescribeTestCases.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeTestCasesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTestCasesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeTestCasesMiddlewares(stack *middleware.Stac return nil } -// DescribeTestCasesAPIClient is a client that implements the DescribeTestCases -// operation. -type DescribeTestCasesAPIClient interface { - DescribeTestCases(context.Context, *DescribeTestCasesInput, ...func(*Options)) (*DescribeTestCasesOutput, error) -} - -var _ DescribeTestCasesAPIClient = (*Client)(nil) - // DescribeTestCasesPaginatorOptions is the paginator options for DescribeTestCases type DescribeTestCasesPaginatorOptions struct { // The maximum number of paginated test cases returned per response. Use nextToken @@ -227,6 +222,9 @@ func (p *DescribeTestCasesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTestCases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeTestCasesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeTestCasesAPIClient is a client that implements the DescribeTestCases +// operation. +type DescribeTestCasesAPIClient interface { + DescribeTestCases(context.Context, *DescribeTestCasesInput, ...func(*Options)) (*DescribeTestCasesOutput, error) +} + +var _ DescribeTestCasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTestCases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_GetReportGroupTrend.go b/service/codebuild/api_op_GetReportGroupTrend.go index b2d30d15c32..45241b127f5 100644 --- a/service/codebuild/api_op_GetReportGroupTrend.go +++ b/service/codebuild/api_op_GetReportGroupTrend.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetReportGroupTrendMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReportGroupTrendValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_GetResourcePolicy.go b/service/codebuild/api_op_GetResourcePolicy.go index 9270465e0e3..9a68594381f 100644 --- a/service/codebuild/api_op_GetResourcePolicy.go +++ b/service/codebuild/api_op_GetResourcePolicy.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_ImportSourceCredentials.go b/service/codebuild/api_op_ImportSourceCredentials.go index 0997ce7839a..d23194f46f6 100644 --- a/service/codebuild/api_op_ImportSourceCredentials.go +++ b/service/codebuild/api_op_ImportSourceCredentials.go @@ -131,6 +131,9 @@ func (c *Client) addOperationImportSourceCredentialsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportSourceCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_InvalidateProjectCache.go b/service/codebuild/api_op_InvalidateProjectCache.go index 9c00724f2d6..a0e75c8d91f 100644 --- a/service/codebuild/api_op_InvalidateProjectCache.go +++ b/service/codebuild/api_op_InvalidateProjectCache.go @@ -101,6 +101,9 @@ func (c *Client) addOperationInvalidateProjectCacheMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvalidateProjectCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_ListBuildBatches.go b/service/codebuild/api_op_ListBuildBatches.go index 53472e6c46e..3d60b48f800 100644 --- a/service/codebuild/api_op_ListBuildBatches.go +++ b/service/codebuild/api_op_ListBuildBatches.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListBuildBatchesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuildBatches(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListBuildBatchesMiddlewares(stack *middleware.Stack return nil } -// ListBuildBatchesAPIClient is a client that implements the ListBuildBatches -// operation. -type ListBuildBatchesAPIClient interface { - ListBuildBatches(context.Context, *ListBuildBatchesInput, ...func(*Options)) (*ListBuildBatchesOutput, error) -} - -var _ ListBuildBatchesAPIClient = (*Client)(nil) - // ListBuildBatchesPaginatorOptions is the paginator options for ListBuildBatches type ListBuildBatchesPaginatorOptions struct { // The maximum number of results to return. @@ -217,6 +212,9 @@ func (p *ListBuildBatchesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuildBatches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListBuildBatchesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListBuildBatchesAPIClient is a client that implements the ListBuildBatches +// operation. +type ListBuildBatchesAPIClient interface { + ListBuildBatches(context.Context, *ListBuildBatchesInput, ...func(*Options)) (*ListBuildBatchesOutput, error) +} + +var _ ListBuildBatchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuildBatches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListBuildBatchesForProject.go b/service/codebuild/api_op_ListBuildBatchesForProject.go index ae9933f22ec..dce00631710 100644 --- a/service/codebuild/api_op_ListBuildBatchesForProject.go +++ b/service/codebuild/api_op_ListBuildBatchesForProject.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListBuildBatchesForProjectMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuildBatchesForProject(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListBuildBatchesForProjectMiddlewares(stack *middle return nil } -// ListBuildBatchesForProjectAPIClient is a client that implements the -// ListBuildBatchesForProject operation. -type ListBuildBatchesForProjectAPIClient interface { - ListBuildBatchesForProject(context.Context, *ListBuildBatchesForProjectInput, ...func(*Options)) (*ListBuildBatchesForProjectOutput, error) -} - -var _ ListBuildBatchesForProjectAPIClient = (*Client)(nil) - // ListBuildBatchesForProjectPaginatorOptions is the paginator options for // ListBuildBatchesForProject type ListBuildBatchesForProjectPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListBuildBatchesForProjectPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuildBatchesForProject(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListBuildBatchesForProjectPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListBuildBatchesForProjectAPIClient is a client that implements the +// ListBuildBatchesForProject operation. +type ListBuildBatchesForProjectAPIClient interface { + ListBuildBatchesForProject(context.Context, *ListBuildBatchesForProjectInput, ...func(*Options)) (*ListBuildBatchesForProjectOutput, error) +} + +var _ ListBuildBatchesForProjectAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuildBatchesForProject(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListBuilds.go b/service/codebuild/api_op_ListBuilds.go index 3226a88b392..5c5930a97be 100644 --- a/service/codebuild/api_op_ListBuilds.go +++ b/service/codebuild/api_op_ListBuilds.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListBuildsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuilds(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListBuildsMiddlewares(stack *middleware.Stack, opti return nil } -// ListBuildsAPIClient is a client that implements the ListBuilds operation. -type ListBuildsAPIClient interface { - ListBuilds(context.Context, *ListBuildsInput, ...func(*Options)) (*ListBuildsOutput, error) -} - -var _ ListBuildsAPIClient = (*Client)(nil) - // ListBuildsPaginatorOptions is the paginator options for ListBuilds type ListBuildsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -201,6 +197,9 @@ func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuilds(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListBuildsAPIClient is a client that implements the ListBuilds operation. +type ListBuildsAPIClient interface { + ListBuilds(context.Context, *ListBuildsInput, ...func(*Options)) (*ListBuildsOutput, error) +} + +var _ ListBuildsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuilds(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListBuildsForProject.go b/service/codebuild/api_op_ListBuildsForProject.go index a4139d7dbab..328186ff21a 100644 --- a/service/codebuild/api_op_ListBuildsForProject.go +++ b/service/codebuild/api_op_ListBuildsForProject.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListBuildsForProjectMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBuildsForProjectValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListBuildsForProjectMiddlewares(stack *middleware.S return nil } -// ListBuildsForProjectAPIClient is a client that implements the -// ListBuildsForProject operation. -type ListBuildsForProjectAPIClient interface { - ListBuildsForProject(context.Context, *ListBuildsForProjectInput, ...func(*Options)) (*ListBuildsForProjectOutput, error) -} - -var _ ListBuildsForProjectAPIClient = (*Client)(nil) - // ListBuildsForProjectPaginatorOptions is the paginator options for // ListBuildsForProject type ListBuildsForProjectPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListBuildsForProjectPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuildsForProject(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListBuildsForProjectPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListBuildsForProjectAPIClient is a client that implements the +// ListBuildsForProject operation. +type ListBuildsForProjectAPIClient interface { + ListBuildsForProject(context.Context, *ListBuildsForProjectInput, ...func(*Options)) (*ListBuildsForProjectOutput, error) +} + +var _ ListBuildsForProjectAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuildsForProject(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListCuratedEnvironmentImages.go b/service/codebuild/api_op_ListCuratedEnvironmentImages.go index 93905198d4f..fcc7baa7797 100644 --- a/service/codebuild/api_op_ListCuratedEnvironmentImages.go +++ b/service/codebuild/api_op_ListCuratedEnvironmentImages.go @@ -101,6 +101,9 @@ func (c *Client) addOperationListCuratedEnvironmentImagesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCuratedEnvironmentImages(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codebuild/api_op_ListFleets.go b/service/codebuild/api_op_ListFleets.go index 5696afde0bb..70a68af3d10 100644 --- a/service/codebuild/api_op_ListFleets.go +++ b/service/codebuild/api_op_ListFleets.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleets(options.Region), middleware.Before); err != nil { return err } @@ -163,13 +166,6 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListFleetsAPIClient is a client that implements the ListFleets operation. -type ListFleetsAPIClient interface { - ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) -} - -var _ ListFleetsAPIClient = (*Client)(nil) - // ListFleetsPaginatorOptions is the paginator options for ListFleets type ListFleetsPaginatorOptions struct { // The maximum number of paginated compute fleets returned per response. Use @@ -234,6 +230,9 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListProjects.go b/service/codebuild/api_op_ListProjects.go index 32c60aeab05..35824d2424a 100644 --- a/service/codebuild/api_op_ListProjects.go +++ b/service/codebuild/api_op_ListProjects.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -218,6 +214,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListReportGroups.go b/service/codebuild/api_op_ListReportGroups.go index e354a494d2c..cb947f09496 100644 --- a/service/codebuild/api_op_ListReportGroups.go +++ b/service/codebuild/api_op_ListReportGroups.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListReportGroupsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReportGroups(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListReportGroupsMiddlewares(stack *middleware.Stack return nil } -// ListReportGroupsAPIClient is a client that implements the ListReportGroups -// operation. -type ListReportGroupsAPIClient interface { - ListReportGroups(context.Context, *ListReportGroupsInput, ...func(*Options)) (*ListReportGroupsOutput, error) -} - -var _ ListReportGroupsAPIClient = (*Client)(nil) - // ListReportGroupsPaginatorOptions is the paginator options for ListReportGroups type ListReportGroupsPaginatorOptions struct { // The maximum number of paginated report groups returned per response. Use @@ -232,6 +227,9 @@ func (p *ListReportGroupsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReportGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListReportGroupsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListReportGroupsAPIClient is a client that implements the ListReportGroups +// operation. +type ListReportGroupsAPIClient interface { + ListReportGroups(context.Context, *ListReportGroupsInput, ...func(*Options)) (*ListReportGroupsOutput, error) +} + +var _ ListReportGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReportGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListReports.go b/service/codebuild/api_op_ListReports.go index 59ead2782ee..78889656e7a 100644 --- a/service/codebuild/api_op_ListReports.go +++ b/service/codebuild/api_op_ListReports.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListReportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReports(options.Region), middleware.Before); err != nil { return err } @@ -158,13 +161,6 @@ func (c *Client) addOperationListReportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListReportsAPIClient is a client that implements the ListReports operation. -type ListReportsAPIClient interface { - ListReports(context.Context, *ListReportsInput, ...func(*Options)) (*ListReportsOutput, error) -} - -var _ ListReportsAPIClient = (*Client)(nil) - // ListReportsPaginatorOptions is the paginator options for ListReports type ListReportsPaginatorOptions struct { // The maximum number of paginated reports returned per response. Use nextToken @@ -230,6 +226,9 @@ func (p *ListReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListReportsAPIClient is a client that implements the ListReports operation. +type ListReportsAPIClient interface { + ListReports(context.Context, *ListReportsInput, ...func(*Options)) (*ListReportsOutput, error) +} + +var _ ListReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListReportsForReportGroup.go b/service/codebuild/api_op_ListReportsForReportGroup.go index 39dffbc77bd..c4f446df019 100644 --- a/service/codebuild/api_op_ListReportsForReportGroup.go +++ b/service/codebuild/api_op_ListReportsForReportGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListReportsForReportGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListReportsForReportGroupValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListReportsForReportGroupMiddlewares(stack *middlew return nil } -// ListReportsForReportGroupAPIClient is a client that implements the -// ListReportsForReportGroup operation. -type ListReportsForReportGroupAPIClient interface { - ListReportsForReportGroup(context.Context, *ListReportsForReportGroupInput, ...func(*Options)) (*ListReportsForReportGroupOutput, error) -} - -var _ ListReportsForReportGroupAPIClient = (*Client)(nil) - // ListReportsForReportGroupPaginatorOptions is the paginator options for // ListReportsForReportGroup type ListReportsForReportGroupPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListReportsForReportGroupPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReportsForReportGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListReportsForReportGroupPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListReportsForReportGroupAPIClient is a client that implements the +// ListReportsForReportGroup operation. +type ListReportsForReportGroupAPIClient interface { + ListReportsForReportGroup(context.Context, *ListReportsForReportGroupInput, ...func(*Options)) (*ListReportsForReportGroupOutput, error) +} + +var _ ListReportsForReportGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReportsForReportGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListSharedProjects.go b/service/codebuild/api_op_ListSharedProjects.go index ac55f99bdbe..e21f09ed49e 100644 --- a/service/codebuild/api_op_ListSharedProjects.go +++ b/service/codebuild/api_op_ListSharedProjects.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListSharedProjectsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSharedProjects(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListSharedProjectsMiddlewares(stack *middleware.Sta return nil } -// ListSharedProjectsAPIClient is a client that implements the ListSharedProjects -// operation. -type ListSharedProjectsAPIClient interface { - ListSharedProjects(context.Context, *ListSharedProjectsInput, ...func(*Options)) (*ListSharedProjectsOutput, error) -} - -var _ ListSharedProjectsAPIClient = (*Client)(nil) - // ListSharedProjectsPaginatorOptions is the paginator options for // ListSharedProjects type ListSharedProjectsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListSharedProjectsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSharedProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListSharedProjectsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSharedProjectsAPIClient is a client that implements the ListSharedProjects +// operation. +type ListSharedProjectsAPIClient interface { + ListSharedProjects(context.Context, *ListSharedProjectsInput, ...func(*Options)) (*ListSharedProjectsOutput, error) +} + +var _ ListSharedProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSharedProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListSharedReportGroups.go b/service/codebuild/api_op_ListSharedReportGroups.go index 707c5b13abb..a07972f5a58 100644 --- a/service/codebuild/api_op_ListSharedReportGroups.go +++ b/service/codebuild/api_op_ListSharedReportGroups.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListSharedReportGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSharedReportGroups(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListSharedReportGroupsMiddlewares(stack *middleware return nil } -// ListSharedReportGroupsAPIClient is a client that implements the -// ListSharedReportGroups operation. -type ListSharedReportGroupsAPIClient interface { - ListSharedReportGroups(context.Context, *ListSharedReportGroupsInput, ...func(*Options)) (*ListSharedReportGroupsOutput, error) -} - -var _ ListSharedReportGroupsAPIClient = (*Client)(nil) - // ListSharedReportGroupsPaginatorOptions is the paginator options for // ListSharedReportGroups type ListSharedReportGroupsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListSharedReportGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSharedReportGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListSharedReportGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSharedReportGroupsAPIClient is a client that implements the +// ListSharedReportGroups operation. +type ListSharedReportGroupsAPIClient interface { + ListSharedReportGroups(context.Context, *ListSharedReportGroupsInput, ...func(*Options)) (*ListSharedReportGroupsOutput, error) +} + +var _ ListSharedReportGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSharedReportGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codebuild/api_op_ListSourceCredentials.go b/service/codebuild/api_op_ListSourceCredentials.go index 891068df246..695ebb8ed75 100644 --- a/service/codebuild/api_op_ListSourceCredentials.go +++ b/service/codebuild/api_op_ListSourceCredentials.go @@ -102,6 +102,9 @@ func (c *Client) addOperationListSourceCredentialsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSourceCredentials(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codebuild/api_op_PutResourcePolicy.go b/service/codebuild/api_op_PutResourcePolicy.go index 6a8e93f1683..88ebca54023 100644 --- a/service/codebuild/api_op_PutResourcePolicy.go +++ b/service/codebuild/api_op_PutResourcePolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_RetryBuild.go b/service/codebuild/api_op_RetryBuild.go index 2f79e833338..fa7fcce72df 100644 --- a/service/codebuild/api_op_RetryBuild.go +++ b/service/codebuild/api_op_RetryBuild.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRetryBuildMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetryBuild(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codebuild/api_op_RetryBuildBatch.go b/service/codebuild/api_op_RetryBuildBatch.go index 562767a5e12..9f0b0b80321 100644 --- a/service/codebuild/api_op_RetryBuildBatch.go +++ b/service/codebuild/api_op_RetryBuildBatch.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRetryBuildBatchMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetryBuildBatch(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codebuild/api_op_StartBuild.go b/service/codebuild/api_op_StartBuild.go index 968529d5836..3b19e4aec76 100644 --- a/service/codebuild/api_op_StartBuild.go +++ b/service/codebuild/api_op_StartBuild.go @@ -310,6 +310,9 @@ func (c *Client) addOperationStartBuildMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBuildValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_StartBuildBatch.go b/service/codebuild/api_op_StartBuildBatch.go index 6d22b67b2be..90913e2112b 100644 --- a/service/codebuild/api_op_StartBuildBatch.go +++ b/service/codebuild/api_op_StartBuildBatch.go @@ -286,6 +286,9 @@ func (c *Client) addOperationStartBuildBatchMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBuildBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_StopBuild.go b/service/codebuild/api_op_StopBuild.go index a035095a495..b6c332d8040 100644 --- a/service/codebuild/api_op_StopBuild.go +++ b/service/codebuild/api_op_StopBuild.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopBuildMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopBuildValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_StopBuildBatch.go b/service/codebuild/api_op_StopBuildBatch.go index 1ce7c058822..d35969edde1 100644 --- a/service/codebuild/api_op_StopBuildBatch.go +++ b/service/codebuild/api_op_StopBuildBatch.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopBuildBatchMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopBuildBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_UpdateFleet.go b/service/codebuild/api_op_UpdateFleet.go index 497455c55db..764b284ef95 100644 --- a/service/codebuild/api_op_UpdateFleet.go +++ b/service/codebuild/api_op_UpdateFleet.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_UpdateProject.go b/service/codebuild/api_op_UpdateProject.go index b889d905b4a..1ceaac8bc85 100644 --- a/service/codebuild/api_op_UpdateProject.go +++ b/service/codebuild/api_op_UpdateProject.go @@ -223,6 +223,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_UpdateProjectVisibility.go b/service/codebuild/api_op_UpdateProjectVisibility.go index a4695b7310b..d0098dc0c6f 100644 --- a/service/codebuild/api_op_UpdateProjectVisibility.go +++ b/service/codebuild/api_op_UpdateProjectVisibility.go @@ -157,6 +157,9 @@ func (c *Client) addOperationUpdateProjectVisibilityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectVisibilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_UpdateReportGroup.go b/service/codebuild/api_op_UpdateReportGroup.go index 8eca7049646..350ef9c0980 100644 --- a/service/codebuild/api_op_UpdateReportGroup.go +++ b/service/codebuild/api_op_UpdateReportGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateReportGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReportGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codebuild/api_op_UpdateWebhook.go b/service/codebuild/api_op_UpdateWebhook.go index bd98c577341..8141ebc59b2 100644 --- a/service/codebuild/api_op_UpdateWebhook.go +++ b/service/codebuild/api_op_UpdateWebhook.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_client.go b/service/codecatalyst/api_client.go index 1a1ca082655..25582a4693c 100644 --- a/service/codecatalyst/api_client.go +++ b/service/codecatalyst/api_client.go @@ -414,6 +414,30 @@ func addRecordResponseTiming(stack *middleware.Stack) error { return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -516,6 +540,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codecatalyst/api_op_CreateAccessToken.go b/service/codecatalyst/api_op_CreateAccessToken.go index 12c0a7cb99c..2d10dd71e7d 100644 --- a/service/codecatalyst/api_op_CreateAccessToken.go +++ b/service/codecatalyst/api_op_CreateAccessToken.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateAccessTokenMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccessTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_CreateDevEnvironment.go b/service/codecatalyst/api_op_CreateDevEnvironment.go index f7dfc3c037c..0b70a502ac6 100644 --- a/service/codecatalyst/api_op_CreateDevEnvironment.go +++ b/service/codecatalyst/api_op_CreateDevEnvironment.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateDevEnvironmentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDevEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_CreateProject.go b/service/codecatalyst/api_op_CreateProject.go index d1ebe23ad77..aaf88d05608 100644 --- a/service/codecatalyst/api_op_CreateProject.go +++ b/service/codecatalyst/api_op_CreateProject.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_CreateSourceRepository.go b/service/codecatalyst/api_op_CreateSourceRepository.go index fbdf06a8d37..d47824d9e51 100644 --- a/service/codecatalyst/api_op_CreateSourceRepository.go +++ b/service/codecatalyst/api_op_CreateSourceRepository.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateSourceRepositoryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSourceRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_CreateSourceRepositoryBranch.go b/service/codecatalyst/api_op_CreateSourceRepositoryBranch.go index 19d21900ed8..a4e35bbda88 100644 --- a/service/codecatalyst/api_op_CreateSourceRepositoryBranch.go +++ b/service/codecatalyst/api_op_CreateSourceRepositoryBranch.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateSourceRepositoryBranchMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSourceRepositoryBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_DeleteAccessToken.go b/service/codecatalyst/api_op_DeleteAccessToken.go index 23ed30dc3b2..8ccfee6089b 100644 --- a/service/codecatalyst/api_op_DeleteAccessToken.go +++ b/service/codecatalyst/api_op_DeleteAccessToken.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDeleteAccessTokenMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_DeleteDevEnvironment.go b/service/codecatalyst/api_op_DeleteDevEnvironment.go index 40a94ab1c3c..f664a403fff 100644 --- a/service/codecatalyst/api_op_DeleteDevEnvironment.go +++ b/service/codecatalyst/api_op_DeleteDevEnvironment.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteDevEnvironmentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDevEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_DeleteProject.go b/service/codecatalyst/api_op_DeleteProject.go index 9e683845232..aff1bf763f0 100644 --- a/service/codecatalyst/api_op_DeleteProject.go +++ b/service/codecatalyst/api_op_DeleteProject.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_DeleteSourceRepository.go b/service/codecatalyst/api_op_DeleteSourceRepository.go index 21c3b897723..1e814d4b544 100644 --- a/service/codecatalyst/api_op_DeleteSourceRepository.go +++ b/service/codecatalyst/api_op_DeleteSourceRepository.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteSourceRepositoryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSourceRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_DeleteSpace.go b/service/codecatalyst/api_op_DeleteSpace.go index dd71011463d..df473aa31cf 100644 --- a/service/codecatalyst/api_op_DeleteSpace.go +++ b/service/codecatalyst/api_op_DeleteSpace.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetDevEnvironment.go b/service/codecatalyst/api_op_GetDevEnvironment.go index 2dea43e3a66..49e19473420 100644 --- a/service/codecatalyst/api_op_GetDevEnvironment.go +++ b/service/codecatalyst/api_op_GetDevEnvironment.go @@ -182,6 +182,9 @@ func (c *Client) addOperationGetDevEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDevEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetProject.go b/service/codecatalyst/api_op_GetProject.go index 847c879676a..46d083b39f1 100644 --- a/service/codecatalyst/api_op_GetProject.go +++ b/service/codecatalyst/api_op_GetProject.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetProjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetSourceRepository.go b/service/codecatalyst/api_op_GetSourceRepository.go index 508c3f7ef55..b972ed43dc6 100644 --- a/service/codecatalyst/api_op_GetSourceRepository.go +++ b/service/codecatalyst/api_op_GetSourceRepository.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetSourceRepositoryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSourceRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetSourceRepositoryCloneUrls.go b/service/codecatalyst/api_op_GetSourceRepositoryCloneUrls.go index af484e51ba9..2ece643c658 100644 --- a/service/codecatalyst/api_op_GetSourceRepositoryCloneUrls.go +++ b/service/codecatalyst/api_op_GetSourceRepositoryCloneUrls.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSourceRepositoryCloneUrlsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSourceRepositoryCloneUrlsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetSpace.go b/service/codecatalyst/api_op_GetSpace.go index 99321f52874..f450d6520c5 100644 --- a/service/codecatalyst/api_op_GetSpace.go +++ b/service/codecatalyst/api_op_GetSpace.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSpaceMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetSubscription.go b/service/codecatalyst/api_op_GetSubscription.go index a1df0bea9e3..981427e5b04 100644 --- a/service/codecatalyst/api_op_GetSubscription.go +++ b/service/codecatalyst/api_op_GetSubscription.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetSubscriptionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetUserDetails.go b/service/codecatalyst/api_op_GetUserDetails.go index 205576020f6..5a84ec0eb06 100644 --- a/service/codecatalyst/api_op_GetUserDetails.go +++ b/service/codecatalyst/api_op_GetUserDetails.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetUserDetailsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUserDetails(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetWorkflow.go b/service/codecatalyst/api_op_GetWorkflow.go index e98fc1163b9..e811cc2ee01 100644 --- a/service/codecatalyst/api_op_GetWorkflow.go +++ b/service/codecatalyst/api_op_GetWorkflow.go @@ -171,6 +171,9 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_GetWorkflowRun.go b/service/codecatalyst/api_op_GetWorkflowRun.go index 6ad72af543c..daffe693b77 100644 --- a/service/codecatalyst/api_op_GetWorkflowRun.go +++ b/service/codecatalyst/api_op_GetWorkflowRun.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetWorkflowRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_ListAccessTokens.go b/service/codecatalyst/api_op_ListAccessTokens.go index 47aac172e51..ebe2a140ec3 100644 --- a/service/codecatalyst/api_op_ListAccessTokens.go +++ b/service/codecatalyst/api_op_ListAccessTokens.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListAccessTokensMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessTokens(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListAccessTokensMiddlewares(stack *middleware.Stack return nil } -// ListAccessTokensAPIClient is a client that implements the ListAccessTokens -// operation. -type ListAccessTokensAPIClient interface { - ListAccessTokens(context.Context, *ListAccessTokensInput, ...func(*Options)) (*ListAccessTokensOutput, error) -} - -var _ ListAccessTokensAPIClient = (*Client)(nil) - // ListAccessTokensPaginatorOptions is the paginator options for ListAccessTokens type ListAccessTokensPaginatorOptions struct { // The maximum number of results to show in a single call to this API. If the @@ -209,6 +204,9 @@ func (p *ListAccessTokensPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessTokens(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListAccessTokensPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAccessTokensAPIClient is a client that implements the ListAccessTokens +// operation. +type ListAccessTokensAPIClient interface { + ListAccessTokens(context.Context, *ListAccessTokensInput, ...func(*Options)) (*ListAccessTokensOutput, error) +} + +var _ ListAccessTokensAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessTokens(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListDevEnvironmentSessions.go b/service/codecatalyst/api_op_ListDevEnvironmentSessions.go index e7b9a2a2a96..1d40509c6f5 100644 --- a/service/codecatalyst/api_op_ListDevEnvironmentSessions.go +++ b/service/codecatalyst/api_op_ListDevEnvironmentSessions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListDevEnvironmentSessionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevEnvironmentSessionsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListDevEnvironmentSessionsMiddlewares(stack *middle return nil } -// ListDevEnvironmentSessionsAPIClient is a client that implements the -// ListDevEnvironmentSessions operation. -type ListDevEnvironmentSessionsAPIClient interface { - ListDevEnvironmentSessions(context.Context, *ListDevEnvironmentSessionsInput, ...func(*Options)) (*ListDevEnvironmentSessionsOutput, error) -} - -var _ ListDevEnvironmentSessionsAPIClient = (*Client)(nil) - // ListDevEnvironmentSessionsPaginatorOptions is the paginator options for // ListDevEnvironmentSessions type ListDevEnvironmentSessionsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListDevEnvironmentSessionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevEnvironmentSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListDevEnvironmentSessionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListDevEnvironmentSessionsAPIClient is a client that implements the +// ListDevEnvironmentSessions operation. +type ListDevEnvironmentSessionsAPIClient interface { + ListDevEnvironmentSessions(context.Context, *ListDevEnvironmentSessionsInput, ...func(*Options)) (*ListDevEnvironmentSessionsOutput, error) +} + +var _ ListDevEnvironmentSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevEnvironmentSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListDevEnvironments.go b/service/codecatalyst/api_op_ListDevEnvironments.go index 6330e68d307..64af68fabe5 100644 --- a/service/codecatalyst/api_op_ListDevEnvironments.go +++ b/service/codecatalyst/api_op_ListDevEnvironments.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListDevEnvironmentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevEnvironmentsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListDevEnvironmentsMiddlewares(stack *middleware.St return nil } -// ListDevEnvironmentsAPIClient is a client that implements the -// ListDevEnvironments operation. -type ListDevEnvironmentsAPIClient interface { - ListDevEnvironments(context.Context, *ListDevEnvironmentsInput, ...func(*Options)) (*ListDevEnvironmentsOutput, error) -} - -var _ ListDevEnvironmentsAPIClient = (*Client)(nil) - // ListDevEnvironmentsPaginatorOptions is the paginator options for // ListDevEnvironments type ListDevEnvironmentsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListDevEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListDevEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListDevEnvironmentsAPIClient is a client that implements the +// ListDevEnvironments operation. +type ListDevEnvironmentsAPIClient interface { + ListDevEnvironments(context.Context, *ListDevEnvironmentsInput, ...func(*Options)) (*ListDevEnvironmentsOutput, error) +} + +var _ ListDevEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListEventLogs.go b/service/codecatalyst/api_op_ListEventLogs.go index 0e7401636f1..7f9dc0f958c 100644 --- a/service/codecatalyst/api_op_ListEventLogs.go +++ b/service/codecatalyst/api_op_ListEventLogs.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListEventLogsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventLogsValidationMiddleware(stack); err != nil { return err } @@ -174,13 +177,6 @@ func (c *Client) addOperationListEventLogsMiddlewares(stack *middleware.Stack, o return nil } -// ListEventLogsAPIClient is a client that implements the ListEventLogs operation. -type ListEventLogsAPIClient interface { - ListEventLogs(context.Context, *ListEventLogsInput, ...func(*Options)) (*ListEventLogsOutput, error) -} - -var _ ListEventLogsAPIClient = (*Client)(nil) - // ListEventLogsPaginatorOptions is the paginator options for ListEventLogs type ListEventLogsPaginatorOptions struct { // The maximum number of results to show in a single call to this API. If the @@ -246,6 +242,9 @@ func (p *ListEventLogsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventLogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +264,13 @@ func (p *ListEventLogsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListEventLogsAPIClient is a client that implements the ListEventLogs operation. +type ListEventLogsAPIClient interface { + ListEventLogs(context.Context, *ListEventLogsInput, ...func(*Options)) (*ListEventLogsOutput, error) +} + +var _ ListEventLogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventLogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListProjects.go b/service/codecatalyst/api_op_ListProjects.go index 8a75826abe7..45ce6b34129 100644 --- a/service/codecatalyst/api_op_ListProjects.go +++ b/service/codecatalyst/api_op_ListProjects.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProjectsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of results to show in a single call to this API. If the @@ -215,6 +211,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListSourceRepositories.go b/service/codecatalyst/api_op_ListSourceRepositories.go index 62ec2939608..a999c5e57b5 100644 --- a/service/codecatalyst/api_op_ListSourceRepositories.go +++ b/service/codecatalyst/api_op_ListSourceRepositories.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSourceRepositoriesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSourceRepositoriesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListSourceRepositoriesMiddlewares(stack *middleware return nil } -// ListSourceRepositoriesAPIClient is a client that implements the -// ListSourceRepositories operation. -type ListSourceRepositoriesAPIClient interface { - ListSourceRepositories(context.Context, *ListSourceRepositoriesInput, ...func(*Options)) (*ListSourceRepositoriesOutput, error) -} - -var _ ListSourceRepositoriesAPIClient = (*Client)(nil) - // ListSourceRepositoriesPaginatorOptions is the paginator options for // ListSourceRepositories type ListSourceRepositoriesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListSourceRepositoriesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSourceRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListSourceRepositoriesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSourceRepositoriesAPIClient is a client that implements the +// ListSourceRepositories operation. +type ListSourceRepositoriesAPIClient interface { + ListSourceRepositories(context.Context, *ListSourceRepositoriesInput, ...func(*Options)) (*ListSourceRepositoriesOutput, error) +} + +var _ ListSourceRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSourceRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListSourceRepositoryBranches.go b/service/codecatalyst/api_op_ListSourceRepositoryBranches.go index 969deca1356..a7665707671 100644 --- a/service/codecatalyst/api_op_ListSourceRepositoryBranches.go +++ b/service/codecatalyst/api_op_ListSourceRepositoryBranches.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListSourceRepositoryBranchesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSourceRepositoryBranchesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListSourceRepositoryBranchesMiddlewares(stack *midd return nil } -// ListSourceRepositoryBranchesAPIClient is a client that implements the -// ListSourceRepositoryBranches operation. -type ListSourceRepositoryBranchesAPIClient interface { - ListSourceRepositoryBranches(context.Context, *ListSourceRepositoryBranchesInput, ...func(*Options)) (*ListSourceRepositoryBranchesOutput, error) -} - -var _ ListSourceRepositoryBranchesAPIClient = (*Client)(nil) - // ListSourceRepositoryBranchesPaginatorOptions is the paginator options for // ListSourceRepositoryBranches type ListSourceRepositoryBranchesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListSourceRepositoryBranchesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSourceRepositoryBranches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListSourceRepositoryBranchesPaginator) NextPage(ctx context.Context, op return result, nil } +// ListSourceRepositoryBranchesAPIClient is a client that implements the +// ListSourceRepositoryBranches operation. +type ListSourceRepositoryBranchesAPIClient interface { + ListSourceRepositoryBranches(context.Context, *ListSourceRepositoryBranchesInput, ...func(*Options)) (*ListSourceRepositoryBranchesOutput, error) +} + +var _ ListSourceRepositoryBranchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSourceRepositoryBranches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListSpaces.go b/service/codecatalyst/api_op_ListSpaces.go index 459ef616034..da333bf6cff 100644 --- a/service/codecatalyst/api_op_ListSpaces.go +++ b/service/codecatalyst/api_op_ListSpaces.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListSpacesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSpaces(options.Region), middleware.Before); err != nil { return err } @@ -127,13 +130,6 @@ func (c *Client) addOperationListSpacesMiddlewares(stack *middleware.Stack, opti return nil } -// ListSpacesAPIClient is a client that implements the ListSpaces operation. -type ListSpacesAPIClient interface { - ListSpaces(context.Context, *ListSpacesInput, ...func(*Options)) (*ListSpacesOutput, error) -} - -var _ ListSpacesAPIClient = (*Client)(nil) - // ListSpacesPaginatorOptions is the paginator options for ListSpaces type ListSpacesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -185,6 +181,9 @@ func (p *ListSpacesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSpaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -204,6 +203,13 @@ func (p *ListSpacesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListSpacesAPIClient is a client that implements the ListSpaces operation. +type ListSpacesAPIClient interface { + ListSpaces(context.Context, *ListSpacesInput, ...func(*Options)) (*ListSpacesOutput, error) +} + +var _ ListSpacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSpaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListWorkflowRuns.go b/service/codecatalyst/api_op_ListWorkflowRuns.go index cdd6cb07e7d..ca5ec83955b 100644 --- a/service/codecatalyst/api_op_ListWorkflowRuns.go +++ b/service/codecatalyst/api_op_ListWorkflowRuns.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListWorkflowRunsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowRunsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListWorkflowRunsMiddlewares(stack *middleware.Stack return nil } -// ListWorkflowRunsAPIClient is a client that implements the ListWorkflowRuns -// operation. -type ListWorkflowRunsAPIClient interface { - ListWorkflowRuns(context.Context, *ListWorkflowRunsInput, ...func(*Options)) (*ListWorkflowRunsOutput, error) -} - -var _ ListWorkflowRunsAPIClient = (*Client)(nil) - // ListWorkflowRunsPaginatorOptions is the paginator options for ListWorkflowRuns type ListWorkflowRunsPaginatorOptions struct { // The maximum number of results to show in a single call to this API. If the @@ -224,6 +219,9 @@ func (p *ListWorkflowRunsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListWorkflowRunsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListWorkflowRunsAPIClient is a client that implements the ListWorkflowRuns +// operation. +type ListWorkflowRunsAPIClient interface { + ListWorkflowRuns(context.Context, *ListWorkflowRunsInput, ...func(*Options)) (*ListWorkflowRunsOutput, error) +} + +var _ ListWorkflowRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_ListWorkflows.go b/service/codecatalyst/api_op_ListWorkflows.go index 9f5a5bc976c..ea9ccff2ab5 100644 --- a/service/codecatalyst/api_op_ListWorkflows.go +++ b/service/codecatalyst/api_op_ListWorkflows.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowsValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. -type ListWorkflowsAPIClient interface { - ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) -} - -var _ ListWorkflowsAPIClient = (*Client)(nil) - // ListWorkflowsPaginatorOptions is the paginator options for ListWorkflows type ListWorkflowsPaginatorOptions struct { // The maximum number of results to show in a single call to this API. If the @@ -220,6 +216,9 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. +type ListWorkflowsAPIClient interface { + ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) +} + +var _ ListWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecatalyst/api_op_StartDevEnvironment.go b/service/codecatalyst/api_op_StartDevEnvironment.go index a85a91ce0cc..4fb1af92486 100644 --- a/service/codecatalyst/api_op_StartDevEnvironment.go +++ b/service/codecatalyst/api_op_StartDevEnvironment.go @@ -142,6 +142,9 @@ func (c *Client) addOperationStartDevEnvironmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDevEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_StartDevEnvironmentSession.go b/service/codecatalyst/api_op_StartDevEnvironmentSession.go index 78e5b5c418d..fae762bda40 100644 --- a/service/codecatalyst/api_op_StartDevEnvironmentSession.go +++ b/service/codecatalyst/api_op_StartDevEnvironmentSession.go @@ -138,6 +138,9 @@ func (c *Client) addOperationStartDevEnvironmentSessionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDevEnvironmentSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_StartWorkflowRun.go b/service/codecatalyst/api_op_StartWorkflowRun.go index 08207c58e68..dc9e2f7ed3c 100644 --- a/service/codecatalyst/api_op_StartWorkflowRun.go +++ b/service/codecatalyst/api_op_StartWorkflowRun.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStartWorkflowRunMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartWorkflowRunMiddleware(stack, options); err != nil { return err } diff --git a/service/codecatalyst/api_op_StopDevEnvironment.go b/service/codecatalyst/api_op_StopDevEnvironment.go index 032bfbfc0cd..074049baa18 100644 --- a/service/codecatalyst/api_op_StopDevEnvironment.go +++ b/service/codecatalyst/api_op_StopDevEnvironment.go @@ -131,6 +131,9 @@ func (c *Client) addOperationStopDevEnvironmentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDevEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_StopDevEnvironmentSession.go b/service/codecatalyst/api_op_StopDevEnvironmentSession.go index 719c8657d4e..24b2c4b8a0c 100644 --- a/service/codecatalyst/api_op_StopDevEnvironmentSession.go +++ b/service/codecatalyst/api_op_StopDevEnvironmentSession.go @@ -135,6 +135,9 @@ func (c *Client) addOperationStopDevEnvironmentSessionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDevEnvironmentSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_UpdateDevEnvironment.go b/service/codecatalyst/api_op_UpdateDevEnvironment.go index 9c32d12ba77..101b610ed7a 100644 --- a/service/codecatalyst/api_op_UpdateDevEnvironment.go +++ b/service/codecatalyst/api_op_UpdateDevEnvironment.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateDevEnvironmentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDevEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_UpdateProject.go b/service/codecatalyst/api_op_UpdateProject.go index 0c204168658..0fd73c6cf26 100644 --- a/service/codecatalyst/api_op_UpdateProject.go +++ b/service/codecatalyst/api_op_UpdateProject.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_UpdateSpace.go b/service/codecatalyst/api_op_UpdateSpace.go index b95bfc8e642..fe08025ee2d 100644 --- a/service/codecatalyst/api_op_UpdateSpace.go +++ b/service/codecatalyst/api_op_UpdateSpace.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecatalyst/api_op_VerifySession.go b/service/codecatalyst/api_op_VerifySession.go index 44395ae2a16..8dc9feacd5e 100644 --- a/service/codecatalyst/api_op_VerifySession.go +++ b/service/codecatalyst/api_op_VerifySession.go @@ -97,6 +97,9 @@ func (c *Client) addOperationVerifySessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifySession(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codecommit/api_client.go b/service/codecommit/api_client.go index 10b18f6369c..29a0697bce2 100644 --- a/service/codecommit/api_client.go +++ b/service/codecommit/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codecommit/api_op_AssociateApprovalRuleTemplateWithRepository.go b/service/codecommit/api_op_AssociateApprovalRuleTemplateWithRepository.go index b740a32a28a..bbe92766424 100644 --- a/service/codecommit/api_op_AssociateApprovalRuleTemplateWithRepository.go +++ b/service/codecommit/api_op_AssociateApprovalRuleTemplateWithRepository.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAssociateApprovalRuleTemplateWithRepositoryMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateApprovalRuleTemplateWithRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_BatchAssociateApprovalRuleTemplateWithRepositories.go b/service/codecommit/api_op_BatchAssociateApprovalRuleTemplateWithRepositories.go index 20d898881fb..8f7abfd0f37 100644 --- a/service/codecommit/api_op_BatchAssociateApprovalRuleTemplateWithRepositories.go +++ b/service/codecommit/api_op_BatchAssociateApprovalRuleTemplateWithRepositories.go @@ -123,6 +123,9 @@ func (c *Client) addOperationBatchAssociateApprovalRuleTemplateWithRepositoriesM if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateApprovalRuleTemplateWithRepositoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_BatchDescribeMergeConflicts.go b/service/codecommit/api_op_BatchDescribeMergeConflicts.go index c09151aeadf..8a1cb57fe75 100644 --- a/service/codecommit/api_op_BatchDescribeMergeConflicts.go +++ b/service/codecommit/api_op_BatchDescribeMergeConflicts.go @@ -176,6 +176,9 @@ func (c *Client) addOperationBatchDescribeMergeConflictsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDescribeMergeConflictsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_BatchDisassociateApprovalRuleTemplateFromRepositories.go b/service/codecommit/api_op_BatchDisassociateApprovalRuleTemplateFromRepositories.go index 71a8b745b47..8823e2aafb8 100644 --- a/service/codecommit/api_op_BatchDisassociateApprovalRuleTemplateFromRepositories.go +++ b/service/codecommit/api_op_BatchDisassociateApprovalRuleTemplateFromRepositories.go @@ -126,6 +126,9 @@ func (c *Client) addOperationBatchDisassociateApprovalRuleTemplateFromRepositori if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateApprovalRuleTemplateFromRepositoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_BatchGetCommits.go b/service/codecommit/api_op_BatchGetCommits.go index d7fb707cf41..940e424a0b4 100644 --- a/service/codecommit/api_op_BatchGetCommits.go +++ b/service/codecommit/api_op_BatchGetCommits.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchGetCommitsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetCommitsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_BatchGetRepositories.go b/service/codecommit/api_op_BatchGetRepositories.go index ebc1e4f5504..f63830563ca 100644 --- a/service/codecommit/api_op_BatchGetRepositories.go +++ b/service/codecommit/api_op_BatchGetRepositories.go @@ -124,6 +124,9 @@ func (c *Client) addOperationBatchGetRepositoriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetRepositoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_CreateApprovalRuleTemplate.go b/service/codecommit/api_op_CreateApprovalRuleTemplate.go index 83bf77326ec..9eebcef6fc7 100644 --- a/service/codecommit/api_op_CreateApprovalRuleTemplate.go +++ b/service/codecommit/api_op_CreateApprovalRuleTemplate.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateApprovalRuleTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApprovalRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_CreateBranch.go b/service/codecommit/api_op_CreateBranch.go index 1f3bbdbae50..5caf4f0baca 100644 --- a/service/codecommit/api_op_CreateBranch.go +++ b/service/codecommit/api_op_CreateBranch.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateBranchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_CreateCommit.go b/service/codecommit/api_op_CreateCommit.go index 975b2d5d248..474630077c6 100644 --- a/service/codecommit/api_op_CreateCommit.go +++ b/service/codecommit/api_op_CreateCommit.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateCommitMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCommitValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_CreatePullRequest.go b/service/codecommit/api_op_CreatePullRequest.go index a9f164937d2..4c88054f582 100644 --- a/service/codecommit/api_op_CreatePullRequest.go +++ b/service/codecommit/api_op_CreatePullRequest.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreatePullRequestMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePullRequestMiddleware(stack, options); err != nil { return err } diff --git a/service/codecommit/api_op_CreatePullRequestApprovalRule.go b/service/codecommit/api_op_CreatePullRequestApprovalRule.go index b9b48414322..c6265d72fb6 100644 --- a/service/codecommit/api_op_CreatePullRequestApprovalRule.go +++ b/service/codecommit/api_op_CreatePullRequestApprovalRule.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreatePullRequestApprovalRuleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePullRequestApprovalRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_CreateRepository.go b/service/codecommit/api_op_CreateRepository.go index 6fc4b26c716..933896c7886 100644 --- a/service/codecommit/api_op_CreateRepository.go +++ b/service/codecommit/api_op_CreateRepository.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_CreateUnreferencedMergeCommit.go b/service/codecommit/api_op_CreateUnreferencedMergeCommit.go index e79e80a96cd..5ccf9222b82 100644 --- a/service/codecommit/api_op_CreateUnreferencedMergeCommit.go +++ b/service/codecommit/api_op_CreateUnreferencedMergeCommit.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateUnreferencedMergeCommitMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUnreferencedMergeCommitValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DeleteApprovalRuleTemplate.go b/service/codecommit/api_op_DeleteApprovalRuleTemplate.go index 71f1b687e9f..ff4212939ec 100644 --- a/service/codecommit/api_op_DeleteApprovalRuleTemplate.go +++ b/service/codecommit/api_op_DeleteApprovalRuleTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteApprovalRuleTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApprovalRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DeleteBranch.go b/service/codecommit/api_op_DeleteBranch.go index 8093f773760..901e7a63e93 100644 --- a/service/codecommit/api_op_DeleteBranch.go +++ b/service/codecommit/api_op_DeleteBranch.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteBranchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DeleteCommentContent.go b/service/codecommit/api_op_DeleteCommentContent.go index 61ed0a5ee58..4c3f4ad3f51 100644 --- a/service/codecommit/api_op_DeleteCommentContent.go +++ b/service/codecommit/api_op_DeleteCommentContent.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteCommentContentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCommentContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DeleteFile.go b/service/codecommit/api_op_DeleteFile.go index 2eeefeeec0f..c1992effb27 100644 --- a/service/codecommit/api_op_DeleteFile.go +++ b/service/codecommit/api_op_DeleteFile.go @@ -166,6 +166,9 @@ func (c *Client) addOperationDeleteFileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DeletePullRequestApprovalRule.go b/service/codecommit/api_op_DeletePullRequestApprovalRule.go index 57416d9062c..47a0e01fd7d 100644 --- a/service/codecommit/api_op_DeletePullRequestApprovalRule.go +++ b/service/codecommit/api_op_DeletePullRequestApprovalRule.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeletePullRequestApprovalRuleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePullRequestApprovalRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DeleteRepository.go b/service/codecommit/api_op_DeleteRepository.go index d3598f6a442..6d6e0d17578 100644 --- a/service/codecommit/api_op_DeleteRepository.go +++ b/service/codecommit/api_op_DeleteRepository.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_DescribeMergeConflicts.go b/service/codecommit/api_op_DescribeMergeConflicts.go index 2e0c801fd7e..84cc8336641 100644 --- a/service/codecommit/api_op_DescribeMergeConflicts.go +++ b/service/codecommit/api_op_DescribeMergeConflicts.go @@ -177,6 +177,9 @@ func (c *Client) addOperationDescribeMergeConflictsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMergeConflictsValidationMiddleware(stack); err != nil { return err } @@ -201,14 +204,6 @@ func (c *Client) addOperationDescribeMergeConflictsMiddlewares(stack *middleware return nil } -// DescribeMergeConflictsAPIClient is a client that implements the -// DescribeMergeConflicts operation. -type DescribeMergeConflictsAPIClient interface { - DescribeMergeConflicts(context.Context, *DescribeMergeConflictsInput, ...func(*Options)) (*DescribeMergeConflictsOutput, error) -} - -var _ DescribeMergeConflictsAPIClient = (*Client)(nil) - // DescribeMergeConflictsPaginatorOptions is the paginator options for // DescribeMergeConflicts type DescribeMergeConflictsPaginatorOptions struct { @@ -273,6 +268,9 @@ func (p *DescribeMergeConflictsPaginator) NextPage(ctx context.Context, optFns . } params.MaxMergeHunks = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMergeConflicts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -292,6 +290,14 @@ func (p *DescribeMergeConflictsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeMergeConflictsAPIClient is a client that implements the +// DescribeMergeConflicts operation. +type DescribeMergeConflictsAPIClient interface { + DescribeMergeConflicts(context.Context, *DescribeMergeConflictsInput, ...func(*Options)) (*DescribeMergeConflictsOutput, error) +} + +var _ DescribeMergeConflictsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMergeConflicts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_DescribePullRequestEvents.go b/service/codecommit/api_op_DescribePullRequestEvents.go index 7fe275f5fb6..5004cd019ef 100644 --- a/service/codecommit/api_op_DescribePullRequestEvents.go +++ b/service/codecommit/api_op_DescribePullRequestEvents.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribePullRequestEventsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePullRequestEventsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribePullRequestEventsMiddlewares(stack *middlew return nil } -// DescribePullRequestEventsAPIClient is a client that implements the -// DescribePullRequestEvents operation. -type DescribePullRequestEventsAPIClient interface { - DescribePullRequestEvents(context.Context, *DescribePullRequestEventsInput, ...func(*Options)) (*DescribePullRequestEventsOutput, error) -} - -var _ DescribePullRequestEventsAPIClient = (*Client)(nil) - // DescribePullRequestEventsPaginatorOptions is the paginator options for // DescribePullRequestEvents type DescribePullRequestEventsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribePullRequestEventsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePullRequestEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribePullRequestEventsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribePullRequestEventsAPIClient is a client that implements the +// DescribePullRequestEvents operation. +type DescribePullRequestEventsAPIClient interface { + DescribePullRequestEvents(context.Context, *DescribePullRequestEventsInput, ...func(*Options)) (*DescribePullRequestEventsOutput, error) +} + +var _ DescribePullRequestEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePullRequestEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_DisassociateApprovalRuleTemplateFromRepository.go b/service/codecommit/api_op_DisassociateApprovalRuleTemplateFromRepository.go index 19d0e3b9a88..bb1a462be51 100644 --- a/service/codecommit/api_op_DisassociateApprovalRuleTemplateFromRepository.go +++ b/service/codecommit/api_op_DisassociateApprovalRuleTemplateFromRepository.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisassociateApprovalRuleTemplateFromRepositoryMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateApprovalRuleTemplateFromRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_EvaluatePullRequestApprovalRules.go b/service/codecommit/api_op_EvaluatePullRequestApprovalRules.go index 9eaa3997887..2263b45ab6f 100644 --- a/service/codecommit/api_op_EvaluatePullRequestApprovalRules.go +++ b/service/codecommit/api_op_EvaluatePullRequestApprovalRules.go @@ -118,6 +118,9 @@ func (c *Client) addOperationEvaluatePullRequestApprovalRulesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEvaluatePullRequestApprovalRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetApprovalRuleTemplate.go b/service/codecommit/api_op_GetApprovalRuleTemplate.go index a16c8592c34..f9da8dcf87c 100644 --- a/service/codecommit/api_op_GetApprovalRuleTemplate.go +++ b/service/codecommit/api_op_GetApprovalRuleTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetApprovalRuleTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApprovalRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetBlob.go b/service/codecommit/api_op_GetBlob.go index c3ac5274bac..9dc87a2e1b0 100644 --- a/service/codecommit/api_op_GetBlob.go +++ b/service/codecommit/api_op_GetBlob.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetBlobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlobValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetBranch.go b/service/codecommit/api_op_GetBranch.go index 193ae655912..1a052876501 100644 --- a/service/codecommit/api_op_GetBranch.go +++ b/service/codecommit/api_op_GetBranch.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetBranchMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBranch(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codecommit/api_op_GetComment.go b/service/codecommit/api_op_GetComment.go index 5b234857300..7ecbcfa0fce 100644 --- a/service/codecommit/api_op_GetComment.go +++ b/service/codecommit/api_op_GetComment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCommentMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCommentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetCommentReactions.go b/service/codecommit/api_op_GetCommentReactions.go index 133a1806afd..beb2890dda9 100644 --- a/service/codecommit/api_op_GetCommentReactions.go +++ b/service/codecommit/api_op_GetCommentReactions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetCommentReactionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCommentReactionsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetCommentReactionsMiddlewares(stack *middleware.St return nil } -// GetCommentReactionsAPIClient is a client that implements the -// GetCommentReactions operation. -type GetCommentReactionsAPIClient interface { - GetCommentReactions(context.Context, *GetCommentReactionsInput, ...func(*Options)) (*GetCommentReactionsOutput, error) -} - -var _ GetCommentReactionsAPIClient = (*Client)(nil) - // GetCommentReactionsPaginatorOptions is the paginator options for // GetCommentReactions type GetCommentReactionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *GetCommentReactionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCommentReactions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetCommentReactionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetCommentReactionsAPIClient is a client that implements the +// GetCommentReactions operation. +type GetCommentReactionsAPIClient interface { + GetCommentReactions(context.Context, *GetCommentReactionsInput, ...func(*Options)) (*GetCommentReactionsOutput, error) +} + +var _ GetCommentReactionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCommentReactions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_GetCommentsForComparedCommit.go b/service/codecommit/api_op_GetCommentsForComparedCommit.go index 4c79bfe228b..a0f04a5c9cd 100644 --- a/service/codecommit/api_op_GetCommentsForComparedCommit.go +++ b/service/codecommit/api_op_GetCommentsForComparedCommit.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetCommentsForComparedCommitMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCommentsForComparedCommitValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationGetCommentsForComparedCommitMiddlewares(stack *midd return nil } -// GetCommentsForComparedCommitAPIClient is a client that implements the -// GetCommentsForComparedCommit operation. -type GetCommentsForComparedCommitAPIClient interface { - GetCommentsForComparedCommit(context.Context, *GetCommentsForComparedCommitInput, ...func(*Options)) (*GetCommentsForComparedCommitOutput, error) -} - -var _ GetCommentsForComparedCommitAPIClient = (*Client)(nil) - // GetCommentsForComparedCommitPaginatorOptions is the paginator options for // GetCommentsForComparedCommit type GetCommentsForComparedCommitPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *GetCommentsForComparedCommitPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCommentsForComparedCommit(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *GetCommentsForComparedCommitPaginator) NextPage(ctx context.Context, op return result, nil } +// GetCommentsForComparedCommitAPIClient is a client that implements the +// GetCommentsForComparedCommit operation. +type GetCommentsForComparedCommitAPIClient interface { + GetCommentsForComparedCommit(context.Context, *GetCommentsForComparedCommitInput, ...func(*Options)) (*GetCommentsForComparedCommitOutput, error) +} + +var _ GetCommentsForComparedCommitAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCommentsForComparedCommit(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_GetCommentsForPullRequest.go b/service/codecommit/api_op_GetCommentsForPullRequest.go index e9c8c70879b..e76c07230dc 100644 --- a/service/codecommit/api_op_GetCommentsForPullRequest.go +++ b/service/codecommit/api_op_GetCommentsForPullRequest.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetCommentsForPullRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCommentsForPullRequestValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationGetCommentsForPullRequestMiddlewares(stack *middlew return nil } -// GetCommentsForPullRequestAPIClient is a client that implements the -// GetCommentsForPullRequest operation. -type GetCommentsForPullRequestAPIClient interface { - GetCommentsForPullRequest(context.Context, *GetCommentsForPullRequestInput, ...func(*Options)) (*GetCommentsForPullRequestOutput, error) -} - -var _ GetCommentsForPullRequestAPIClient = (*Client)(nil) - // GetCommentsForPullRequestPaginatorOptions is the paginator options for // GetCommentsForPullRequest type GetCommentsForPullRequestPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *GetCommentsForPullRequestPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCommentsForPullRequest(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *GetCommentsForPullRequestPaginator) NextPage(ctx context.Context, optFn return result, nil } +// GetCommentsForPullRequestAPIClient is a client that implements the +// GetCommentsForPullRequest operation. +type GetCommentsForPullRequestAPIClient interface { + GetCommentsForPullRequest(context.Context, *GetCommentsForPullRequestInput, ...func(*Options)) (*GetCommentsForPullRequestOutput, error) +} + +var _ GetCommentsForPullRequestAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCommentsForPullRequest(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_GetCommit.go b/service/codecommit/api_op_GetCommit.go index 343f11b1c9f..536af1b2a8b 100644 --- a/service/codecommit/api_op_GetCommit.go +++ b/service/codecommit/api_op_GetCommit.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetCommitMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCommitValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetDifferences.go b/service/codecommit/api_op_GetDifferences.go index c3cf6af7eff..999226a3949 100644 --- a/service/codecommit/api_op_GetDifferences.go +++ b/service/codecommit/api_op_GetDifferences.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetDifferencesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDifferencesValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationGetDifferencesMiddlewares(stack *middleware.Stack, return nil } -// GetDifferencesAPIClient is a client that implements the GetDifferences -// operation. -type GetDifferencesAPIClient interface { - GetDifferences(context.Context, *GetDifferencesInput, ...func(*Options)) (*GetDifferencesOutput, error) -} - -var _ GetDifferencesAPIClient = (*Client)(nil) - // GetDifferencesPaginatorOptions is the paginator options for GetDifferences type GetDifferencesPaginatorOptions struct { // A non-zero, non-negative integer used to limit the number of returned results. @@ -238,6 +233,9 @@ func (p *GetDifferencesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDifferences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *GetDifferencesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetDifferencesAPIClient is a client that implements the GetDifferences +// operation. +type GetDifferencesAPIClient interface { + GetDifferences(context.Context, *GetDifferencesInput, ...func(*Options)) (*GetDifferencesOutput, error) +} + +var _ GetDifferencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDifferences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_GetFile.go b/service/codecommit/api_op_GetFile.go index b68619dba90..56a9c9aa9f3 100644 --- a/service/codecommit/api_op_GetFile.go +++ b/service/codecommit/api_op_GetFile.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetFileMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetFolder.go b/service/codecommit/api_op_GetFolder.go index 683170ea48c..84e76530ae8 100644 --- a/service/codecommit/api_op_GetFolder.go +++ b/service/codecommit/api_op_GetFolder.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetFolderMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetMergeCommit.go b/service/codecommit/api_op_GetMergeCommit.go index 7da2a9aa125..0999bc39538 100644 --- a/service/codecommit/api_op_GetMergeCommit.go +++ b/service/codecommit/api_op_GetMergeCommit.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetMergeCommitMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMergeCommitValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetMergeConflicts.go b/service/codecommit/api_op_GetMergeConflicts.go index 4561a7e99f5..80d23e752e9 100644 --- a/service/codecommit/api_op_GetMergeConflicts.go +++ b/service/codecommit/api_op_GetMergeConflicts.go @@ -171,6 +171,9 @@ func (c *Client) addOperationGetMergeConflictsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMergeConflictsValidationMiddleware(stack); err != nil { return err } @@ -195,14 +198,6 @@ func (c *Client) addOperationGetMergeConflictsMiddlewares(stack *middleware.Stac return nil } -// GetMergeConflictsAPIClient is a client that implements the GetMergeConflicts -// operation. -type GetMergeConflictsAPIClient interface { - GetMergeConflicts(context.Context, *GetMergeConflictsInput, ...func(*Options)) (*GetMergeConflictsOutput, error) -} - -var _ GetMergeConflictsAPIClient = (*Client)(nil) - // GetMergeConflictsPaginatorOptions is the paginator options for GetMergeConflicts type GetMergeConflictsPaginatorOptions struct { // The maximum number of files to include in the output. @@ -266,6 +261,9 @@ func (p *GetMergeConflictsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxConflictFiles = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMergeConflicts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +283,14 @@ func (p *GetMergeConflictsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetMergeConflictsAPIClient is a client that implements the GetMergeConflicts +// operation. +type GetMergeConflictsAPIClient interface { + GetMergeConflicts(context.Context, *GetMergeConflictsInput, ...func(*Options)) (*GetMergeConflictsOutput, error) +} + +var _ GetMergeConflictsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMergeConflicts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_GetMergeOptions.go b/service/codecommit/api_op_GetMergeOptions.go index e0a1965afa4..fb11622269e 100644 --- a/service/codecommit/api_op_GetMergeOptions.go +++ b/service/codecommit/api_op_GetMergeOptions.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetMergeOptionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMergeOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetPullRequest.go b/service/codecommit/api_op_GetPullRequest.go index 5c066703c64..d10aec7d449 100644 --- a/service/codecommit/api_op_GetPullRequest.go +++ b/service/codecommit/api_op_GetPullRequest.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetPullRequestMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPullRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetPullRequestApprovalStates.go b/service/codecommit/api_op_GetPullRequestApprovalStates.go index a9ebea6d23f..b64dad993c4 100644 --- a/service/codecommit/api_op_GetPullRequestApprovalStates.go +++ b/service/codecommit/api_op_GetPullRequestApprovalStates.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetPullRequestApprovalStatesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPullRequestApprovalStatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetPullRequestOverrideState.go b/service/codecommit/api_op_GetPullRequestOverrideState.go index f36c375b1ac..171716a29d1 100644 --- a/service/codecommit/api_op_GetPullRequestOverrideState.go +++ b/service/codecommit/api_op_GetPullRequestOverrideState.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetPullRequestOverrideStateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPullRequestOverrideStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetRepository.go b/service/codecommit/api_op_GetRepository.go index d600cb7e871..ca0c29640ad 100644 --- a/service/codecommit/api_op_GetRepository.go +++ b/service/codecommit/api_op_GetRepository.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetRepositoryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_GetRepositoryTriggers.go b/service/codecommit/api_op_GetRepositoryTriggers.go index 8627d3ad0e9..5d123547edb 100644 --- a/service/codecommit/api_op_GetRepositoryTriggers.go +++ b/service/codecommit/api_op_GetRepositoryTriggers.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetRepositoryTriggersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryTriggersValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_ListApprovalRuleTemplates.go b/service/codecommit/api_op_ListApprovalRuleTemplates.go index 2e237801d10..86bf0018702 100644 --- a/service/codecommit/api_op_ListApprovalRuleTemplates.go +++ b/service/codecommit/api_op_ListApprovalRuleTemplates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListApprovalRuleTemplatesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApprovalRuleTemplates(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListApprovalRuleTemplatesMiddlewares(stack *middlew return nil } -// ListApprovalRuleTemplatesAPIClient is a client that implements the -// ListApprovalRuleTemplates operation. -type ListApprovalRuleTemplatesAPIClient interface { - ListApprovalRuleTemplates(context.Context, *ListApprovalRuleTemplatesInput, ...func(*Options)) (*ListApprovalRuleTemplatesOutput, error) -} - -var _ ListApprovalRuleTemplatesAPIClient = (*Client)(nil) - // ListApprovalRuleTemplatesPaginatorOptions is the paginator options for // ListApprovalRuleTemplates type ListApprovalRuleTemplatesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListApprovalRuleTemplatesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApprovalRuleTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListApprovalRuleTemplatesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListApprovalRuleTemplatesAPIClient is a client that implements the +// ListApprovalRuleTemplates operation. +type ListApprovalRuleTemplatesAPIClient interface { + ListApprovalRuleTemplates(context.Context, *ListApprovalRuleTemplatesInput, ...func(*Options)) (*ListApprovalRuleTemplatesOutput, error) +} + +var _ ListApprovalRuleTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApprovalRuleTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go b/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go index 9da4c3d18d9..a502f347d6a 100644 --- a/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go +++ b/service/codecommit/api_op_ListAssociatedApprovalRuleTemplatesForRepository.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAssociatedApprovalRuleTemplatesForRepositoryMid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedApprovalRuleTemplatesForRepositoryValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAssociatedApprovalRuleTemplatesForRepositoryMid return nil } -// ListAssociatedApprovalRuleTemplatesForRepositoryAPIClient is a client that -// implements the ListAssociatedApprovalRuleTemplatesForRepository operation. -type ListAssociatedApprovalRuleTemplatesForRepositoryAPIClient interface { - ListAssociatedApprovalRuleTemplatesForRepository(context.Context, *ListAssociatedApprovalRuleTemplatesForRepositoryInput, ...func(*Options)) (*ListAssociatedApprovalRuleTemplatesForRepositoryOutput, error) -} - -var _ ListAssociatedApprovalRuleTemplatesForRepositoryAPIClient = (*Client)(nil) - // ListAssociatedApprovalRuleTemplatesForRepositoryPaginatorOptions is the // paginator options for ListAssociatedApprovalRuleTemplatesForRepository type ListAssociatedApprovalRuleTemplatesForRepositoryPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListAssociatedApprovalRuleTemplatesForRepositoryPaginator) NextPage(ctx } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedApprovalRuleTemplatesForRepository(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListAssociatedApprovalRuleTemplatesForRepositoryPaginator) NextPage(ctx return result, nil } +// ListAssociatedApprovalRuleTemplatesForRepositoryAPIClient is a client that +// implements the ListAssociatedApprovalRuleTemplatesForRepository operation. +type ListAssociatedApprovalRuleTemplatesForRepositoryAPIClient interface { + ListAssociatedApprovalRuleTemplatesForRepository(context.Context, *ListAssociatedApprovalRuleTemplatesForRepositoryInput, ...func(*Options)) (*ListAssociatedApprovalRuleTemplatesForRepositoryOutput, error) +} + +var _ ListAssociatedApprovalRuleTemplatesForRepositoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedApprovalRuleTemplatesForRepository(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListBranches.go b/service/codecommit/api_op_ListBranches.go index 3074f3147a5..12725cc4d0d 100644 --- a/service/codecommit/api_op_ListBranches.go +++ b/service/codecommit/api_op_ListBranches.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListBranchesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBranchesValidationMiddleware(stack); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListBranchesMiddlewares(stack *middleware.Stack, op return nil } -// ListBranchesAPIClient is a client that implements the ListBranches operation. -type ListBranchesAPIClient interface { - ListBranches(context.Context, *ListBranchesInput, ...func(*Options)) (*ListBranchesOutput, error) -} - -var _ ListBranchesAPIClient = (*Client)(nil) - // ListBranchesPaginatorOptions is the paginator options for ListBranches type ListBranchesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -195,6 +191,9 @@ func (p *ListBranchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBranches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +213,13 @@ func (p *ListBranchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListBranchesAPIClient is a client that implements the ListBranches operation. +type ListBranchesAPIClient interface { + ListBranches(context.Context, *ListBranchesInput, ...func(*Options)) (*ListBranchesOutput, error) +} + +var _ ListBranchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBranches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListFileCommitHistory.go b/service/codecommit/api_op_ListFileCommitHistory.go index 542a8cbcf32..b757925faa7 100644 --- a/service/codecommit/api_op_ListFileCommitHistory.go +++ b/service/codecommit/api_op_ListFileCommitHistory.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListFileCommitHistoryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFileCommitHistoryValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListFileCommitHistoryMiddlewares(stack *middleware. return nil } -// ListFileCommitHistoryAPIClient is a client that implements the -// ListFileCommitHistory operation. -type ListFileCommitHistoryAPIClient interface { - ListFileCommitHistory(context.Context, *ListFileCommitHistoryInput, ...func(*Options)) (*ListFileCommitHistoryOutput, error) -} - -var _ ListFileCommitHistoryAPIClient = (*Client)(nil) - // ListFileCommitHistoryPaginatorOptions is the paginator options for // ListFileCommitHistory type ListFileCommitHistoryPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListFileCommitHistoryPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFileCommitHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListFileCommitHistoryPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListFileCommitHistoryAPIClient is a client that implements the +// ListFileCommitHistory operation. +type ListFileCommitHistoryAPIClient interface { + ListFileCommitHistory(context.Context, *ListFileCommitHistoryInput, ...func(*Options)) (*ListFileCommitHistoryOutput, error) +} + +var _ ListFileCommitHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFileCommitHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListPullRequests.go b/service/codecommit/api_op_ListPullRequests.go index 7ce0a124e81..41c3052af00 100644 --- a/service/codecommit/api_op_ListPullRequests.go +++ b/service/codecommit/api_op_ListPullRequests.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListPullRequestsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPullRequestsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListPullRequestsMiddlewares(stack *middleware.Stack return nil } -// ListPullRequestsAPIClient is a client that implements the ListPullRequests -// operation. -type ListPullRequestsAPIClient interface { - ListPullRequests(context.Context, *ListPullRequestsInput, ...func(*Options)) (*ListPullRequestsOutput, error) -} - -var _ ListPullRequestsAPIClient = (*Client)(nil) - // ListPullRequestsPaginatorOptions is the paginator options for ListPullRequests type ListPullRequestsPaginatorOptions struct { // A non-zero, non-negative integer used to limit the number of returned results. @@ -224,6 +219,9 @@ func (p *ListPullRequestsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPullRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListPullRequestsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPullRequestsAPIClient is a client that implements the ListPullRequests +// operation. +type ListPullRequestsAPIClient interface { + ListPullRequests(context.Context, *ListPullRequestsInput, ...func(*Options)) (*ListPullRequestsOutput, error) +} + +var _ ListPullRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPullRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListRepositories.go b/service/codecommit/api_op_ListRepositories.go index 08d936a9824..a88fb8dc698 100644 --- a/service/codecommit/api_op_ListRepositories.go +++ b/service/codecommit/api_op_ListRepositories.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositories(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack return nil } -// ListRepositoriesAPIClient is a client that implements the ListRepositories -// operation. -type ListRepositoriesAPIClient interface { - ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) -} - -var _ ListRepositoriesAPIClient = (*Client)(nil) - // ListRepositoriesPaginatorOptions is the paginator options for ListRepositories type ListRepositoriesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +194,9 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +216,14 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRepositoriesAPIClient is a client that implements the ListRepositories +// operation. +type ListRepositoriesAPIClient interface { + ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) +} + +var _ ListRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go b/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go index abe5b905279..123afd27536 100644 --- a/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go +++ b/service/codecommit/api_op_ListRepositoriesForApprovalRuleTemplate.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRepositoriesForApprovalRuleTemplateMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRepositoriesForApprovalRuleTemplateValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListRepositoriesForApprovalRuleTemplateMiddlewares( return nil } -// ListRepositoriesForApprovalRuleTemplateAPIClient is a client that implements -// the ListRepositoriesForApprovalRuleTemplate operation. -type ListRepositoriesForApprovalRuleTemplateAPIClient interface { - ListRepositoriesForApprovalRuleTemplate(context.Context, *ListRepositoriesForApprovalRuleTemplateInput, ...func(*Options)) (*ListRepositoriesForApprovalRuleTemplateOutput, error) -} - -var _ ListRepositoriesForApprovalRuleTemplateAPIClient = (*Client)(nil) - // ListRepositoriesForApprovalRuleTemplatePaginatorOptions is the paginator // options for ListRepositoriesForApprovalRuleTemplate type ListRepositoriesForApprovalRuleTemplatePaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListRepositoriesForApprovalRuleTemplatePaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositoriesForApprovalRuleTemplate(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListRepositoriesForApprovalRuleTemplatePaginator) NextPage(ctx context. return result, nil } +// ListRepositoriesForApprovalRuleTemplateAPIClient is a client that implements +// the ListRepositoriesForApprovalRuleTemplate operation. +type ListRepositoriesForApprovalRuleTemplateAPIClient interface { + ListRepositoriesForApprovalRuleTemplate(context.Context, *ListRepositoriesForApprovalRuleTemplateInput, ...func(*Options)) (*ListRepositoriesForApprovalRuleTemplateOutput, error) +} + +var _ ListRepositoriesForApprovalRuleTemplateAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositoriesForApprovalRuleTemplate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codecommit/api_op_ListTagsForResource.go b/service/codecommit/api_op_ListTagsForResource.go index 1081e510d24..1c71d79c23e 100644 --- a/service/codecommit/api_op_ListTagsForResource.go +++ b/service/codecommit/api_op_ListTagsForResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_MergeBranchesByFastForward.go b/service/codecommit/api_op_MergeBranchesByFastForward.go index 10b669af836..1e237e589bd 100644 --- a/service/codecommit/api_op_MergeBranchesByFastForward.go +++ b/service/codecommit/api_op_MergeBranchesByFastForward.go @@ -123,6 +123,9 @@ func (c *Client) addOperationMergeBranchesByFastForwardMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergeBranchesByFastForwardValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_MergeBranchesBySquash.go b/service/codecommit/api_op_MergeBranchesBySquash.go index f63ea382551..ad23abca85d 100644 --- a/service/codecommit/api_op_MergeBranchesBySquash.go +++ b/service/codecommit/api_op_MergeBranchesBySquash.go @@ -156,6 +156,9 @@ func (c *Client) addOperationMergeBranchesBySquashMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergeBranchesBySquashValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_MergeBranchesByThreeWay.go b/service/codecommit/api_op_MergeBranchesByThreeWay.go index c00a40aa87b..a76f8ecc3cc 100644 --- a/service/codecommit/api_op_MergeBranchesByThreeWay.go +++ b/service/codecommit/api_op_MergeBranchesByThreeWay.go @@ -156,6 +156,9 @@ func (c *Client) addOperationMergeBranchesByThreeWayMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergeBranchesByThreeWayValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_MergePullRequestByFastForward.go b/service/codecommit/api_op_MergePullRequestByFastForward.go index 4593118cf87..6deddc56608 100644 --- a/service/codecommit/api_op_MergePullRequestByFastForward.go +++ b/service/codecommit/api_op_MergePullRequestByFastForward.go @@ -119,6 +119,9 @@ func (c *Client) addOperationMergePullRequestByFastForwardMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergePullRequestByFastForwardValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_MergePullRequestBySquash.go b/service/codecommit/api_op_MergePullRequestBySquash.go index 22084fd13c4..2c492cbc511 100644 --- a/service/codecommit/api_op_MergePullRequestBySquash.go +++ b/service/codecommit/api_op_MergePullRequestBySquash.go @@ -150,6 +150,9 @@ func (c *Client) addOperationMergePullRequestBySquashMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergePullRequestBySquashValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_MergePullRequestByThreeWay.go b/service/codecommit/api_op_MergePullRequestByThreeWay.go index 5e443e39be6..aee2d9a6259 100644 --- a/service/codecommit/api_op_MergePullRequestByThreeWay.go +++ b/service/codecommit/api_op_MergePullRequestByThreeWay.go @@ -151,6 +151,9 @@ func (c *Client) addOperationMergePullRequestByThreeWayMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergePullRequestByThreeWayValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_OverridePullRequestApprovalRules.go b/service/codecommit/api_op_OverridePullRequestApprovalRules.go index dd514a7ef0a..7f6a7389680 100644 --- a/service/codecommit/api_op_OverridePullRequestApprovalRules.go +++ b/service/codecommit/api_op_OverridePullRequestApprovalRules.go @@ -118,6 +118,9 @@ func (c *Client) addOperationOverridePullRequestApprovalRulesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpOverridePullRequestApprovalRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_PostCommentForComparedCommit.go b/service/codecommit/api_op_PostCommentForComparedCommit.go index 3537e6d3112..b38c0a8c3a6 100644 --- a/service/codecommit/api_op_PostCommentForComparedCommit.go +++ b/service/codecommit/api_op_PostCommentForComparedCommit.go @@ -151,6 +151,9 @@ func (c *Client) addOperationPostCommentForComparedCommitMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPostCommentForComparedCommitMiddleware(stack, options); err != nil { return err } diff --git a/service/codecommit/api_op_PostCommentForPullRequest.go b/service/codecommit/api_op_PostCommentForPullRequest.go index fcc291e0b8e..ec7dcce5830 100644 --- a/service/codecommit/api_op_PostCommentForPullRequest.go +++ b/service/codecommit/api_op_PostCommentForPullRequest.go @@ -163,6 +163,9 @@ func (c *Client) addOperationPostCommentForPullRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPostCommentForPullRequestMiddleware(stack, options); err != nil { return err } diff --git a/service/codecommit/api_op_PostCommentReply.go b/service/codecommit/api_op_PostCommentReply.go index da7022e6cdd..169298cdb25 100644 --- a/service/codecommit/api_op_PostCommentReply.go +++ b/service/codecommit/api_op_PostCommentReply.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPostCommentReplyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPostCommentReplyMiddleware(stack, options); err != nil { return err } diff --git a/service/codecommit/api_op_PutCommentReaction.go b/service/codecommit/api_op_PutCommentReaction.go index e225aa9ef7e..9adef44a1f0 100644 --- a/service/codecommit/api_op_PutCommentReaction.go +++ b/service/codecommit/api_op_PutCommentReaction.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutCommentReactionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutCommentReactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_PutFile.go b/service/codecommit/api_op_PutFile.go index 467890ae383..50c9ab275ed 100644 --- a/service/codecommit/api_op_PutFile.go +++ b/service/codecommit/api_op_PutFile.go @@ -163,6 +163,9 @@ func (c *Client) addOperationPutFileMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_PutRepositoryTriggers.go b/service/codecommit/api_op_PutRepositoryTriggers.go index d3edacdb126..a01acde4bbb 100644 --- a/service/codecommit/api_op_PutRepositoryTriggers.go +++ b/service/codecommit/api_op_PutRepositoryTriggers.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutRepositoryTriggersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRepositoryTriggersValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_TagResource.go b/service/codecommit/api_op_TagResource.go index 5a690e9acff..87c4b6d3c98 100644 --- a/service/codecommit/api_op_TagResource.go +++ b/service/codecommit/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_TestRepositoryTriggers.go b/service/codecommit/api_op_TestRepositoryTriggers.go index 1a7d83cb5e5..e920bdb4511 100644 --- a/service/codecommit/api_op_TestRepositoryTriggers.go +++ b/service/codecommit/api_op_TestRepositoryTriggers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTestRepositoryTriggersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestRepositoryTriggersValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UntagResource.go b/service/codecommit/api_op_UntagResource.go index 9111310ce03..8ef197e5c49 100644 --- a/service/codecommit/api_op_UntagResource.go +++ b/service/codecommit/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateApprovalRuleTemplateContent.go b/service/codecommit/api_op_UpdateApprovalRuleTemplateContent.go index 34046ad8c62..61eeca36776 100644 --- a/service/codecommit/api_op_UpdateApprovalRuleTemplateContent.go +++ b/service/codecommit/api_op_UpdateApprovalRuleTemplateContent.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateApprovalRuleTemplateContentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApprovalRuleTemplateContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateApprovalRuleTemplateDescription.go b/service/codecommit/api_op_UpdateApprovalRuleTemplateDescription.go index ffb3cfc2c9f..8cf22731e62 100644 --- a/service/codecommit/api_op_UpdateApprovalRuleTemplateDescription.go +++ b/service/codecommit/api_op_UpdateApprovalRuleTemplateDescription.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateApprovalRuleTemplateDescriptionMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApprovalRuleTemplateDescriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateApprovalRuleTemplateName.go b/service/codecommit/api_op_UpdateApprovalRuleTemplateName.go index 61e43a0294b..b446d9cb415 100644 --- a/service/codecommit/api_op_UpdateApprovalRuleTemplateName.go +++ b/service/codecommit/api_op_UpdateApprovalRuleTemplateName.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateApprovalRuleTemplateNameMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApprovalRuleTemplateNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateComment.go b/service/codecommit/api_op_UpdateComment.go index 872de1eb2d3..d8946ebfce0 100644 --- a/service/codecommit/api_op_UpdateComment.go +++ b/service/codecommit/api_op_UpdateComment.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateCommentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCommentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateDefaultBranch.go b/service/codecommit/api_op_UpdateDefaultBranch.go index ac9022b4072..1085b3d4664 100644 --- a/service/codecommit/api_op_UpdateDefaultBranch.go +++ b/service/codecommit/api_op_UpdateDefaultBranch.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDefaultBranchMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDefaultBranchValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdatePullRequestApprovalRuleContent.go b/service/codecommit/api_op_UpdatePullRequestApprovalRuleContent.go index 0b74b9ffe36..f038166143d 100644 --- a/service/codecommit/api_op_UpdatePullRequestApprovalRuleContent.go +++ b/service/codecommit/api_op_UpdatePullRequestApprovalRuleContent.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdatePullRequestApprovalRuleContentMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePullRequestApprovalRuleContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdatePullRequestApprovalState.go b/service/codecommit/api_op_UpdatePullRequestApprovalState.go index a8c1507f076..e84a4c84ad8 100644 --- a/service/codecommit/api_op_UpdatePullRequestApprovalState.go +++ b/service/codecommit/api_op_UpdatePullRequestApprovalState.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdatePullRequestApprovalStateMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePullRequestApprovalStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdatePullRequestDescription.go b/service/codecommit/api_op_UpdatePullRequestDescription.go index ba1ea429c87..8041c7e78a6 100644 --- a/service/codecommit/api_op_UpdatePullRequestDescription.go +++ b/service/codecommit/api_op_UpdatePullRequestDescription.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdatePullRequestDescriptionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePullRequestDescriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdatePullRequestStatus.go b/service/codecommit/api_op_UpdatePullRequestStatus.go index e4b129edf95..79d3ded40b8 100644 --- a/service/codecommit/api_op_UpdatePullRequestStatus.go +++ b/service/codecommit/api_op_UpdatePullRequestStatus.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdatePullRequestStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePullRequestStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdatePullRequestTitle.go b/service/codecommit/api_op_UpdatePullRequestTitle.go index 37958a7873b..c7e820748f9 100644 --- a/service/codecommit/api_op_UpdatePullRequestTitle.go +++ b/service/codecommit/api_op_UpdatePullRequestTitle.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdatePullRequestTitleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePullRequestTitleValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateRepositoryDescription.go b/service/codecommit/api_op_UpdateRepositoryDescription.go index 1f65dfc997e..3cacb9d8e71 100644 --- a/service/codecommit/api_op_UpdateRepositoryDescription.go +++ b/service/codecommit/api_op_UpdateRepositoryDescription.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateRepositoryDescriptionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRepositoryDescriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateRepositoryEncryptionKey.go b/service/codecommit/api_op_UpdateRepositoryEncryptionKey.go index c506fa94852..833f70aebae 100644 --- a/service/codecommit/api_op_UpdateRepositoryEncryptionKey.go +++ b/service/codecommit/api_op_UpdateRepositoryEncryptionKey.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateRepositoryEncryptionKeyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRepositoryEncryptionKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codecommit/api_op_UpdateRepositoryName.go b/service/codecommit/api_op_UpdateRepositoryName.go index 1adc50539db..f8fc042e933 100644 --- a/service/codecommit/api_op_UpdateRepositoryName.go +++ b/service/codecommit/api_op_UpdateRepositoryName.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateRepositoryNameMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRepositoryNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_client.go b/service/codeconnections/api_client.go index 677b1a01cc2..21c9235870e 100644 --- a/service/codeconnections/api_client.go +++ b/service/codeconnections/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/codeconnections/api_op_CreateConnection.go b/service/codeconnections/api_op_CreateConnection.go index 4f171786607..9ba28d823a4 100644 --- a/service/codeconnections/api_op_CreateConnection.go +++ b/service/codeconnections/api_op_CreateConnection.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_CreateHost.go b/service/codeconnections/api_op_CreateHost.go index 0a17a462854..8fd6cb9d5ee 100644 --- a/service/codeconnections/api_op_CreateHost.go +++ b/service/codeconnections/api_op_CreateHost.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateHostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_CreateRepositoryLink.go b/service/codeconnections/api_op_CreateRepositoryLink.go index 868c4dd3e12..94e8aa5039e 100644 --- a/service/codeconnections/api_op_CreateRepositoryLink.go +++ b/service/codeconnections/api_op_CreateRepositoryLink.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateRepositoryLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_CreateSyncConfiguration.go b/service/codeconnections/api_op_CreateSyncConfiguration.go index 80f2d111e55..01233ccac77 100644 --- a/service/codeconnections/api_op_CreateSyncConfiguration.go +++ b/service/codeconnections/api_op_CreateSyncConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateSyncConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_DeleteConnection.go b/service/codeconnections/api_op_DeleteConnection.go index a1ba140947a..bcb637ed8ce 100644 --- a/service/codeconnections/api_op_DeleteConnection.go +++ b/service/codeconnections/api_op_DeleteConnection.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_DeleteHost.go b/service/codeconnections/api_op_DeleteHost.go index 7e4edee7e07..2d1747cbf52 100644 --- a/service/codeconnections/api_op_DeleteHost.go +++ b/service/codeconnections/api_op_DeleteHost.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteHostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_DeleteRepositoryLink.go b/service/codeconnections/api_op_DeleteRepositoryLink.go index cad2ee153d3..cd4a69445c9 100644 --- a/service/codeconnections/api_op_DeleteRepositoryLink.go +++ b/service/codeconnections/api_op_DeleteRepositoryLink.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRepositoryLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_DeleteSyncConfiguration.go b/service/codeconnections/api_op_DeleteSyncConfiguration.go index 51c67a76f6e..e605fe85478 100644 --- a/service/codeconnections/api_op_DeleteSyncConfiguration.go +++ b/service/codeconnections/api_op_DeleteSyncConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSyncConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetConnection.go b/service/codeconnections/api_op_GetConnection.go index fed0aeab7d9..57a843d029d 100644 --- a/service/codeconnections/api_op_GetConnection.go +++ b/service/codeconnections/api_op_GetConnection.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetConnectionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetHost.go b/service/codeconnections/api_op_GetHost.go index 3dba70f4a7a..81c638dc573 100644 --- a/service/codeconnections/api_op_GetHost.go +++ b/service/codeconnections/api_op_GetHost.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetHostMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetRepositoryLink.go b/service/codeconnections/api_op_GetRepositoryLink.go index bd091e4208a..f24904ed3c9 100644 --- a/service/codeconnections/api_op_GetRepositoryLink.go +++ b/service/codeconnections/api_op_GetRepositoryLink.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetRepositoryLinkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetRepositorySyncStatus.go b/service/codeconnections/api_op_GetRepositorySyncStatus.go index 594e0b359d0..8b28112a71b 100644 --- a/service/codeconnections/api_op_GetRepositorySyncStatus.go +++ b/service/codeconnections/api_op_GetRepositorySyncStatus.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetRepositorySyncStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositorySyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetResourceSyncStatus.go b/service/codeconnections/api_op_GetResourceSyncStatus.go index 7e89635fb8a..a69cfa28c15 100644 --- a/service/codeconnections/api_op_GetResourceSyncStatus.go +++ b/service/codeconnections/api_op_GetResourceSyncStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetResourceSyncStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceSyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetSyncBlockerSummary.go b/service/codeconnections/api_op_GetSyncBlockerSummary.go index 3899fcb412e..b13e528cf3a 100644 --- a/service/codeconnections/api_op_GetSyncBlockerSummary.go +++ b/service/codeconnections/api_op_GetSyncBlockerSummary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetSyncBlockerSummaryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSyncBlockerSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_GetSyncConfiguration.go b/service/codeconnections/api_op_GetSyncConfiguration.go index b38915108e8..bb94e348531 100644 --- a/service/codeconnections/api_op_GetSyncConfiguration.go +++ b/service/codeconnections/api_op_GetSyncConfiguration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSyncConfigurationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_ListConnections.go b/service/codeconnections/api_op_ListConnections.go index 952ff3fc5db..18f003b9959 100644 --- a/service/codeconnections/api_op_ListConnections.go +++ b/service/codeconnections/api_op_ListConnections.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnections(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectionsAPIClient is a client that implements the ListConnections -// operation. -type ListConnectionsAPIClient interface { - ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) -} - -var _ ListConnectionsAPIClient = (*Client)(nil) - // ListConnectionsPaginatorOptions is the paginator options for ListConnections type ListConnectionsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -211,6 +206,9 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListConnectionsAPIClient is a client that implements the ListConnections +// operation. +type ListConnectionsAPIClient interface { + ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) +} + +var _ ListConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeconnections/api_op_ListHosts.go b/service/codeconnections/api_op_ListHosts.go index 7626f8a99ea..333d36dc049 100644 --- a/service/codeconnections/api_op_ListHosts.go +++ b/service/codeconnections/api_op_ListHosts.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListHostsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHosts(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListHostsMiddlewares(stack *middleware.Stack, optio return nil } -// ListHostsAPIClient is a client that implements the ListHosts operation. -type ListHostsAPIClient interface { - ListHosts(context.Context, *ListHostsInput, ...func(*Options)) (*ListHostsOutput, error) -} - -var _ ListHostsAPIClient = (*Client)(nil) - // ListHostsPaginatorOptions is the paginator options for ListHosts type ListHostsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -203,6 +199,9 @@ func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHosts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListHostsAPIClient is a client that implements the ListHosts operation. +type ListHostsAPIClient interface { + ListHosts(context.Context, *ListHostsInput, ...func(*Options)) (*ListHostsOutput, error) +} + +var _ ListHostsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHosts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeconnections/api_op_ListRepositoryLinks.go b/service/codeconnections/api_op_ListRepositoryLinks.go index 2e9f9dfd749..27b5f5714a3 100644 --- a/service/codeconnections/api_op_ListRepositoryLinks.go +++ b/service/codeconnections/api_op_ListRepositoryLinks.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRepositoryLinksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositoryLinks(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListRepositoryLinksMiddlewares(stack *middleware.St return nil } -// ListRepositoryLinksAPIClient is a client that implements the -// ListRepositoryLinks operation. -type ListRepositoryLinksAPIClient interface { - ListRepositoryLinks(context.Context, *ListRepositoryLinksInput, ...func(*Options)) (*ListRepositoryLinksOutput, error) -} - -var _ ListRepositoryLinksAPIClient = (*Client)(nil) - // ListRepositoryLinksPaginatorOptions is the paginator options for // ListRepositoryLinks type ListRepositoryLinksPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListRepositoryLinksPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositoryLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListRepositoryLinksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRepositoryLinksAPIClient is a client that implements the +// ListRepositoryLinks operation. +type ListRepositoryLinksAPIClient interface { + ListRepositoryLinks(context.Context, *ListRepositoryLinksInput, ...func(*Options)) (*ListRepositoryLinksOutput, error) +} + +var _ ListRepositoryLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositoryLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeconnections/api_op_ListRepositorySyncDefinitions.go b/service/codeconnections/api_op_ListRepositorySyncDefinitions.go index bf5039f32f6..c371ef18559 100644 --- a/service/codeconnections/api_op_ListRepositorySyncDefinitions.go +++ b/service/codeconnections/api_op_ListRepositorySyncDefinitions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListRepositorySyncDefinitionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRepositorySyncDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_ListSyncConfigurations.go b/service/codeconnections/api_op_ListSyncConfigurations.go index 7cdb8bc95d8..5cf401da114 100644 --- a/service/codeconnections/api_op_ListSyncConfigurations.go +++ b/service/codeconnections/api_op_ListSyncConfigurations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSyncConfigurationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSyncConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListSyncConfigurationsMiddlewares(stack *middleware return nil } -// ListSyncConfigurationsAPIClient is a client that implements the -// ListSyncConfigurations operation. -type ListSyncConfigurationsAPIClient interface { - ListSyncConfigurations(context.Context, *ListSyncConfigurationsInput, ...func(*Options)) (*ListSyncConfigurationsOutput, error) -} - -var _ ListSyncConfigurationsAPIClient = (*Client)(nil) - // ListSyncConfigurationsPaginatorOptions is the paginator options for // ListSyncConfigurations type ListSyncConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListSyncConfigurationsPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSyncConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSyncConfigurationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSyncConfigurationsAPIClient is a client that implements the +// ListSyncConfigurations operation. +type ListSyncConfigurationsAPIClient interface { + ListSyncConfigurations(context.Context, *ListSyncConfigurationsInput, ...func(*Options)) (*ListSyncConfigurationsOutput, error) +} + +var _ ListSyncConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSyncConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeconnections/api_op_ListTagsForResource.go b/service/codeconnections/api_op_ListTagsForResource.go index 828622b4fb7..770e32a484a 100644 --- a/service/codeconnections/api_op_ListTagsForResource.go +++ b/service/codeconnections/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_TagResource.go b/service/codeconnections/api_op_TagResource.go index 41ba15a75bd..fd6a355f323 100644 --- a/service/codeconnections/api_op_TagResource.go +++ b/service/codeconnections/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_UntagResource.go b/service/codeconnections/api_op_UntagResource.go index e47bdfcb9e4..24d8686728b 100644 --- a/service/codeconnections/api_op_UntagResource.go +++ b/service/codeconnections/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_UpdateHost.go b/service/codeconnections/api_op_UpdateHost.go index 74d2f032dee..0a08ea6dac1 100644 --- a/service/codeconnections/api_op_UpdateHost.go +++ b/service/codeconnections/api_op_UpdateHost.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateHostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_UpdateRepositoryLink.go b/service/codeconnections/api_op_UpdateRepositoryLink.go index 33e8b075fd8..b12c82b42b0 100644 --- a/service/codeconnections/api_op_UpdateRepositoryLink.go +++ b/service/codeconnections/api_op_UpdateRepositoryLink.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateRepositoryLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_UpdateSyncBlocker.go b/service/codeconnections/api_op_UpdateSyncBlocker.go index 1449950a7f9..fc834e08b52 100644 --- a/service/codeconnections/api_op_UpdateSyncBlocker.go +++ b/service/codeconnections/api_op_UpdateSyncBlocker.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateSyncBlockerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSyncBlockerValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeconnections/api_op_UpdateSyncConfiguration.go b/service/codeconnections/api_op_UpdateSyncConfiguration.go index cfa069dc1d6..911fe426e92 100644 --- a/service/codeconnections/api_op_UpdateSyncConfiguration.go +++ b/service/codeconnections/api_op_UpdateSyncConfiguration.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateSyncConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_client.go b/service/codedeploy/api_client.go index d8180b5f73a..b445dd44211 100644 --- a/service/codedeploy/api_client.go +++ b/service/codedeploy/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/codedeploy/api_op_AddTagsToOnPremisesInstances.go b/service/codedeploy/api_op_AddTagsToOnPremisesInstances.go index 29fd260681f..78d9841816d 100644 --- a/service/codedeploy/api_op_AddTagsToOnPremisesInstances.go +++ b/service/codedeploy/api_op_AddTagsToOnPremisesInstances.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAddTagsToOnPremisesInstancesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToOnPremisesInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetApplicationRevisions.go b/service/codedeploy/api_op_BatchGetApplicationRevisions.go index 8b4fa39e08b..3f16a4b1736 100644 --- a/service/codedeploy/api_op_BatchGetApplicationRevisions.go +++ b/service/codedeploy/api_op_BatchGetApplicationRevisions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationBatchGetApplicationRevisionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetApplicationRevisionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetApplications.go b/service/codedeploy/api_op_BatchGetApplications.go index 4dadfd1a164..d2d917e0fb8 100644 --- a/service/codedeploy/api_op_BatchGetApplications.go +++ b/service/codedeploy/api_op_BatchGetApplications.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetApplicationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetApplicationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetDeploymentGroups.go b/service/codedeploy/api_op_BatchGetDeploymentGroups.go index 5092a4ee2f5..44747c37726 100644 --- a/service/codedeploy/api_op_BatchGetDeploymentGroups.go +++ b/service/codedeploy/api_op_BatchGetDeploymentGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchGetDeploymentGroupsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDeploymentGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetDeploymentInstances.go b/service/codedeploy/api_op_BatchGetDeploymentInstances.go index b2f7a310e93..3e8abe06513 100644 --- a/service/codedeploy/api_op_BatchGetDeploymentInstances.go +++ b/service/codedeploy/api_op_BatchGetDeploymentInstances.go @@ -124,6 +124,9 @@ func (c *Client) addOperationBatchGetDeploymentInstancesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDeploymentInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetDeploymentTargets.go b/service/codedeploy/api_op_BatchGetDeploymentTargets.go index ae668de31ba..164553d9fa3 100644 --- a/service/codedeploy/api_op_BatchGetDeploymentTargets.go +++ b/service/codedeploy/api_op_BatchGetDeploymentTargets.go @@ -155,6 +155,9 @@ func (c *Client) addOperationBatchGetDeploymentTargetsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDeploymentTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetDeployments.go b/service/codedeploy/api_op_BatchGetDeployments.go index 1818b39f8a4..057b5255b3f 100644 --- a/service/codedeploy/api_op_BatchGetDeployments.go +++ b/service/codedeploy/api_op_BatchGetDeployments.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetDeploymentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDeploymentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_BatchGetOnPremisesInstances.go b/service/codedeploy/api_op_BatchGetOnPremisesInstances.go index bfcfd56409f..1c82dd11a1e 100644 --- a/service/codedeploy/api_op_BatchGetOnPremisesInstances.go +++ b/service/codedeploy/api_op_BatchGetOnPremisesInstances.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetOnPremisesInstancesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetOnPremisesInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_ContinueDeployment.go b/service/codedeploy/api_op_ContinueDeployment.go index 9b9a38e41b8..932464eb7f5 100644 --- a/service/codedeploy/api_op_ContinueDeployment.go +++ b/service/codedeploy/api_op_ContinueDeployment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationContinueDeploymentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opContinueDeployment(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_CreateApplication.go b/service/codedeploy/api_op_CreateApplication.go index 21689fd5195..d1fe2fa51c5 100644 --- a/service/codedeploy/api_op_CreateApplication.go +++ b/service/codedeploy/api_op_CreateApplication.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_CreateDeployment.go b/service/codedeploy/api_op_CreateDeployment.go index 5bd8b2bb3f7..a471a0a0294 100644 --- a/service/codedeploy/api_op_CreateDeployment.go +++ b/service/codedeploy/api_op_CreateDeployment.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_CreateDeploymentConfig.go b/service/codedeploy/api_op_CreateDeploymentConfig.go index 2ae48685deb..0d27c8023d5 100644 --- a/service/codedeploy/api_op_CreateDeploymentConfig.go +++ b/service/codedeploy/api_op_CreateDeploymentConfig.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateDeploymentConfigMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_CreateDeploymentGroup.go b/service/codedeploy/api_op_CreateDeploymentGroup.go index 84583a8372a..36288ef1d3e 100644 --- a/service/codedeploy/api_op_CreateDeploymentGroup.go +++ b/service/codedeploy/api_op_CreateDeploymentGroup.go @@ -222,6 +222,9 @@ func (c *Client) addOperationCreateDeploymentGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_DeleteApplication.go b/service/codedeploy/api_op_DeleteApplication.go index d4761151542..385e28fef10 100644 --- a/service/codedeploy/api_op_DeleteApplication.go +++ b/service/codedeploy/api_op_DeleteApplication.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_DeleteDeploymentConfig.go b/service/codedeploy/api_op_DeleteDeploymentConfig.go index 40b57233926..64543ecc8aa 100644 --- a/service/codedeploy/api_op_DeleteDeploymentConfig.go +++ b/service/codedeploy/api_op_DeleteDeploymentConfig.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDeploymentConfigMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_DeleteDeploymentGroup.go b/service/codedeploy/api_op_DeleteDeploymentGroup.go index 37150f7c723..1bebf71ba03 100644 --- a/service/codedeploy/api_op_DeleteDeploymentGroup.go +++ b/service/codedeploy/api_op_DeleteDeploymentGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteDeploymentGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_DeleteGitHubAccountToken.go b/service/codedeploy/api_op_DeleteGitHubAccountToken.go index b400544bff6..de051ba6735 100644 --- a/service/codedeploy/api_op_DeleteGitHubAccountToken.go +++ b/service/codedeploy/api_op_DeleteGitHubAccountToken.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteGitHubAccountTokenMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGitHubAccountToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_DeleteResourcesByExternalId.go b/service/codedeploy/api_op_DeleteResourcesByExternalId.go index 77f036b0b52..6e2adff4167 100644 --- a/service/codedeploy/api_op_DeleteResourcesByExternalId.go +++ b/service/codedeploy/api_op_DeleteResourcesByExternalId.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteResourcesByExternalIdMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcesByExternalId(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_DeregisterOnPremisesInstance.go b/service/codedeploy/api_op_DeregisterOnPremisesInstance.go index 68af976077e..147c4001eaf 100644 --- a/service/codedeploy/api_op_DeregisterOnPremisesInstance.go +++ b/service/codedeploy/api_op_DeregisterOnPremisesInstance.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeregisterOnPremisesInstanceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterOnPremisesInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetApplication.go b/service/codedeploy/api_op_GetApplication.go index ab53110ebc3..13e38dd8bd8 100644 --- a/service/codedeploy/api_op_GetApplication.go +++ b/service/codedeploy/api_op_GetApplication.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetApplicationRevision.go b/service/codedeploy/api_op_GetApplicationRevision.go index c4f31ad8928..fc8ce94a4cd 100644 --- a/service/codedeploy/api_op_GetApplicationRevision.go +++ b/service/codedeploy/api_op_GetApplicationRevision.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetApplicationRevisionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetDeployment.go b/service/codedeploy/api_op_GetDeployment.go index 6427c398c1c..6c63ba11986 100644 --- a/service/codedeploy/api_op_GetDeployment.go +++ b/service/codedeploy/api_op_GetDeployment.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o return nil } -// GetDeploymentAPIClient is a client that implements the GetDeployment operation. -type GetDeploymentAPIClient interface { - GetDeployment(context.Context, *GetDeploymentInput, ...func(*Options)) (*GetDeploymentOutput, error) -} - -var _ GetDeploymentAPIClient = (*Client)(nil) - // DeploymentSuccessfulWaiterOptions are waiter options for // DeploymentSuccessfulWaiter type DeploymentSuccessfulWaiterOptions struct { @@ -265,7 +261,13 @@ func (w *DeploymentSuccessfulWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetDeployment(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -357,6 +359,13 @@ func deploymentSuccessfulStateRetryable(ctx context.Context, input *GetDeploymen return true, nil } +// GetDeploymentAPIClient is a client that implements the GetDeployment operation. +type GetDeploymentAPIClient interface { + GetDeployment(context.Context, *GetDeploymentInput, ...func(*Options)) (*GetDeploymentOutput, error) +} + +var _ GetDeploymentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDeployment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_GetDeploymentConfig.go b/service/codedeploy/api_op_GetDeploymentConfig.go index 7694e0ee3ec..335980fe59f 100644 --- a/service/codedeploy/api_op_GetDeploymentConfig.go +++ b/service/codedeploy/api_op_GetDeploymentConfig.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetDeploymentConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetDeploymentGroup.go b/service/codedeploy/api_op_GetDeploymentGroup.go index 87067cbe56b..b7fe6ee6fbd 100644 --- a/service/codedeploy/api_op_GetDeploymentGroup.go +++ b/service/codedeploy/api_op_GetDeploymentGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetDeploymentGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetDeploymentInstance.go b/service/codedeploy/api_op_GetDeploymentInstance.go index fe0d0cf73b4..3c4d135cb1c 100644 --- a/service/codedeploy/api_op_GetDeploymentInstance.go +++ b/service/codedeploy/api_op_GetDeploymentInstance.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDeploymentInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetDeploymentTarget.go b/service/codedeploy/api_op_GetDeploymentTarget.go index 2f2a2194f45..9b37b4634cb 100644 --- a/service/codedeploy/api_op_GetDeploymentTarget.go +++ b/service/codedeploy/api_op_GetDeploymentTarget.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetDeploymentTargetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_GetOnPremisesInstance.go b/service/codedeploy/api_op_GetOnPremisesInstance.go index 4b99f176030..b8b70b656ec 100644 --- a/service/codedeploy/api_op_GetOnPremisesInstance.go +++ b/service/codedeploy/api_op_GetOnPremisesInstance.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetOnPremisesInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOnPremisesInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_ListApplicationRevisions.go b/service/codedeploy/api_op_ListApplicationRevisions.go index 025673a41e2..a7a68cad958 100644 --- a/service/codedeploy/api_op_ListApplicationRevisions.go +++ b/service/codedeploy/api_op_ListApplicationRevisions.go @@ -163,6 +163,9 @@ func (c *Client) addOperationListApplicationRevisionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationRevisionsValidationMiddleware(stack); err != nil { return err } @@ -187,14 +190,6 @@ func (c *Client) addOperationListApplicationRevisionsMiddlewares(stack *middlewa return nil } -// ListApplicationRevisionsAPIClient is a client that implements the -// ListApplicationRevisions operation. -type ListApplicationRevisionsAPIClient interface { - ListApplicationRevisions(context.Context, *ListApplicationRevisionsInput, ...func(*Options)) (*ListApplicationRevisionsOutput, error) -} - -var _ ListApplicationRevisionsAPIClient = (*Client)(nil) - // ListApplicationRevisionsPaginatorOptions is the paginator options for // ListApplicationRevisions type ListApplicationRevisionsPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *ListApplicationRevisionsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *ListApplicationRevisionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationRevisionsAPIClient is a client that implements the +// ListApplicationRevisions operation. +type ListApplicationRevisionsAPIClient interface { + ListApplicationRevisions(context.Context, *ListApplicationRevisionsInput, ...func(*Options)) (*ListApplicationRevisionsOutput, error) +} + +var _ ListApplicationRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_ListApplications.go b/service/codedeploy/api_op_ListApplications.go index f1a27c1533d..7d1f51e3091 100644 --- a/service/codedeploy/api_op_ListApplications.go +++ b/service/codedeploy/api_op_ListApplications.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -132,14 +135,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -191,6 +186,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -210,6 +208,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_ListDeploymentConfigs.go b/service/codedeploy/api_op_ListDeploymentConfigs.go index ec359ee6f3f..16879caf83f 100644 --- a/service/codedeploy/api_op_ListDeploymentConfigs.go +++ b/service/codedeploy/api_op_ListDeploymentConfigs.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDeploymentConfigsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeploymentConfigs(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListDeploymentConfigsMiddlewares(stack *middleware. return nil } -// ListDeploymentConfigsAPIClient is a client that implements the -// ListDeploymentConfigs operation. -type ListDeploymentConfigsAPIClient interface { - ListDeploymentConfigs(context.Context, *ListDeploymentConfigsInput, ...func(*Options)) (*ListDeploymentConfigsOutput, error) -} - -var _ ListDeploymentConfigsAPIClient = (*Client)(nil) - // ListDeploymentConfigsPaginatorOptions is the paginator options for // ListDeploymentConfigs type ListDeploymentConfigsPaginatorOptions struct { @@ -194,6 +189,9 @@ func (p *ListDeploymentConfigsPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeploymentConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -213,6 +211,14 @@ func (p *ListDeploymentConfigsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDeploymentConfigsAPIClient is a client that implements the +// ListDeploymentConfigs operation. +type ListDeploymentConfigsAPIClient interface { + ListDeploymentConfigs(context.Context, *ListDeploymentConfigsInput, ...func(*Options)) (*ListDeploymentConfigsOutput, error) +} + +var _ ListDeploymentConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeploymentConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_ListDeploymentGroups.go b/service/codedeploy/api_op_ListDeploymentGroups.go index ebfdffb6f35..3340ecb9a4f 100644 --- a/service/codedeploy/api_op_ListDeploymentGroups.go +++ b/service/codedeploy/api_op_ListDeploymentGroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDeploymentGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentGroupsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListDeploymentGroupsMiddlewares(stack *middleware.S return nil } -// ListDeploymentGroupsAPIClient is a client that implements the -// ListDeploymentGroups operation. -type ListDeploymentGroupsAPIClient interface { - ListDeploymentGroups(context.Context, *ListDeploymentGroupsInput, ...func(*Options)) (*ListDeploymentGroupsOutput, error) -} - -var _ ListDeploymentGroupsAPIClient = (*Client)(nil) - // ListDeploymentGroupsPaginatorOptions is the paginator options for // ListDeploymentGroups type ListDeploymentGroupsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListDeploymentGroupsPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeploymentGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListDeploymentGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDeploymentGroupsAPIClient is a client that implements the +// ListDeploymentGroups operation. +type ListDeploymentGroupsAPIClient interface { + ListDeploymentGroups(context.Context, *ListDeploymentGroupsInput, ...func(*Options)) (*ListDeploymentGroupsOutput, error) +} + +var _ ListDeploymentGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeploymentGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_ListDeploymentInstances.go b/service/codedeploy/api_op_ListDeploymentInstances.go index 14cd72ea88d..d54d723cf66 100644 --- a/service/codedeploy/api_op_ListDeploymentInstances.go +++ b/service/codedeploy/api_op_ListDeploymentInstances.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListDeploymentInstancesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentInstancesValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListDeploymentInstancesMiddlewares(stack *middlewar return nil } -// ListDeploymentInstancesAPIClient is a client that implements the -// ListDeploymentInstances operation. -type ListDeploymentInstancesAPIClient interface { - ListDeploymentInstances(context.Context, *ListDeploymentInstancesInput, ...func(*Options)) (*ListDeploymentInstancesOutput, error) -} - -var _ ListDeploymentInstancesAPIClient = (*Client)(nil) - // ListDeploymentInstancesPaginatorOptions is the paginator options for // ListDeploymentInstances type ListDeploymentInstancesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListDeploymentInstancesPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeploymentInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListDeploymentInstancesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDeploymentInstancesAPIClient is a client that implements the +// ListDeploymentInstances operation. +type ListDeploymentInstancesAPIClient interface { + ListDeploymentInstances(context.Context, *ListDeploymentInstancesInput, ...func(*Options)) (*ListDeploymentInstancesOutput, error) +} + +var _ ListDeploymentInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeploymentInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_ListDeploymentTargets.go b/service/codedeploy/api_op_ListDeploymentTargets.go index 8573c4ca1c4..57f982d3aa9 100644 --- a/service/codedeploy/api_op_ListDeploymentTargets.go +++ b/service/codedeploy/api_op_ListDeploymentTargets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDeploymentTargetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_ListDeployments.go b/service/codedeploy/api_op_ListDeployments.go index 74ab937d305..7b8ccd5cfb6 100644 --- a/service/codedeploy/api_op_ListDeployments.go +++ b/service/codedeploy/api_op_ListDeployments.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeployments(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// ListDeploymentsAPIClient is a client that implements the ListDeployments -// operation. -type ListDeploymentsAPIClient interface { - ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) -} - -var _ ListDeploymentsAPIClient = (*Client)(nil) - // ListDeploymentsPaginatorOptions is the paginator options for ListDeployments type ListDeploymentsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -228,6 +223,9 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDeploymentsAPIClient is a client that implements the ListDeployments +// operation. +type ListDeploymentsAPIClient interface { + ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) +} + +var _ ListDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codedeploy/api_op_ListGitHubAccountTokenNames.go b/service/codedeploy/api_op_ListGitHubAccountTokenNames.go index 9aada566717..0ae5da6909f 100644 --- a/service/codedeploy/api_op_ListGitHubAccountTokenNames.go +++ b/service/codedeploy/api_op_ListGitHubAccountTokenNames.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListGitHubAccountTokenNamesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGitHubAccountTokenNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_ListOnPremisesInstances.go b/service/codedeploy/api_op_ListOnPremisesInstances.go index 50e5394e65a..ce470d8b9c1 100644 --- a/service/codedeploy/api_op_ListOnPremisesInstances.go +++ b/service/codedeploy/api_op_ListOnPremisesInstances.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListOnPremisesInstancesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOnPremisesInstances(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_ListTagsForResource.go b/service/codedeploy/api_op_ListTagsForResource.go index 9e9a6d5e2c6..cb427fa448a 100644 --- a/service/codedeploy/api_op_ListTagsForResource.go +++ b/service/codedeploy/api_op_ListTagsForResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_PutLifecycleEventHookExecutionStatus.go b/service/codedeploy/api_op_PutLifecycleEventHookExecutionStatus.go index 100d9eff29e..44e110f1115 100644 --- a/service/codedeploy/api_op_PutLifecycleEventHookExecutionStatus.go +++ b/service/codedeploy/api_op_PutLifecycleEventHookExecutionStatus.go @@ -126,6 +126,9 @@ func (c *Client) addOperationPutLifecycleEventHookExecutionStatusMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLifecycleEventHookExecutionStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_RegisterApplicationRevision.go b/service/codedeploy/api_op_RegisterApplicationRevision.go index 39ca031b263..b86585e69b5 100644 --- a/service/codedeploy/api_op_RegisterApplicationRevision.go +++ b/service/codedeploy/api_op_RegisterApplicationRevision.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRegisterApplicationRevisionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterApplicationRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_RegisterOnPremisesInstance.go b/service/codedeploy/api_op_RegisterOnPremisesInstance.go index 16ab49a444a..6aa918cebcb 100644 --- a/service/codedeploy/api_op_RegisterOnPremisesInstance.go +++ b/service/codedeploy/api_op_RegisterOnPremisesInstance.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRegisterOnPremisesInstanceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterOnPremisesInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_RemoveTagsFromOnPremisesInstances.go b/service/codedeploy/api_op_RemoveTagsFromOnPremisesInstances.go index 12eaef014a7..ffbf47a2b3e 100644 --- a/service/codedeploy/api_op_RemoveTagsFromOnPremisesInstances.go +++ b/service/codedeploy/api_op_RemoveTagsFromOnPremisesInstances.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRemoveTagsFromOnPremisesInstancesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromOnPremisesInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_SkipWaitTimeForInstanceTermination.go b/service/codedeploy/api_op_SkipWaitTimeForInstanceTermination.go index d3a934791a9..fcb4f9acc72 100644 --- a/service/codedeploy/api_op_SkipWaitTimeForInstanceTermination.go +++ b/service/codedeploy/api_op_SkipWaitTimeForInstanceTermination.go @@ -104,6 +104,9 @@ func (c *Client) addOperationSkipWaitTimeForInstanceTerminationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSkipWaitTimeForInstanceTermination(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_StopDeployment.go b/service/codedeploy/api_op_StopDeployment.go index e98bf17b26a..f8629e0cb8a 100644 --- a/service/codedeploy/api_op_StopDeployment.go +++ b/service/codedeploy/api_op_StopDeployment.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStopDeploymentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_TagResource.go b/service/codedeploy/api_op_TagResource.go index 8f6d12909e2..4246d6d302b 100644 --- a/service/codedeploy/api_op_TagResource.go +++ b/service/codedeploy/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_UntagResource.go b/service/codedeploy/api_op_UntagResource.go index cbdd011784b..12cd404b401 100644 --- a/service/codedeploy/api_op_UntagResource.go +++ b/service/codedeploy/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codedeploy/api_op_UpdateApplication.go b/service/codedeploy/api_op_UpdateApplication.go index f9cafe84647..87cc8a82f5e 100644 --- a/service/codedeploy/api_op_UpdateApplication.go +++ b/service/codedeploy/api_op_UpdateApplication.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApplication(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codedeploy/api_op_UpdateDeploymentGroup.go b/service/codedeploy/api_op_UpdateDeploymentGroup.go index 74ff350ccf8..679e1685665 100644 --- a/service/codedeploy/api_op_UpdateDeploymentGroup.go +++ b/service/codedeploy/api_op_UpdateDeploymentGroup.go @@ -218,6 +218,9 @@ func (c *Client) addOperationUpdateDeploymentGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeploymentGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_client.go b/service/codeguruprofiler/api_client.go index 746105a93ab..31d4f7eec2d 100644 --- a/service/codeguruprofiler/api_client.go +++ b/service/codeguruprofiler/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codeguruprofiler/api_op_AddNotificationChannels.go b/service/codeguruprofiler/api_op_AddNotificationChannels.go index 089a9e415d0..a5ac44f919d 100644 --- a/service/codeguruprofiler/api_op_AddNotificationChannels.go +++ b/service/codeguruprofiler/api_op_AddNotificationChannels.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAddNotificationChannelsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddNotificationChannelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_BatchGetFrameMetricData.go b/service/codeguruprofiler/api_op_BatchGetFrameMetricData.go index db22604584b..01757aca9b4 100644 --- a/service/codeguruprofiler/api_op_BatchGetFrameMetricData.go +++ b/service/codeguruprofiler/api_op_BatchGetFrameMetricData.go @@ -191,6 +191,9 @@ func (c *Client) addOperationBatchGetFrameMetricDataMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFrameMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_ConfigureAgent.go b/service/codeguruprofiler/api_op_ConfigureAgent.go index 91e9622bd9c..636a49aa09a 100644 --- a/service/codeguruprofiler/api_op_ConfigureAgent.go +++ b/service/codeguruprofiler/api_op_ConfigureAgent.go @@ -149,6 +149,9 @@ func (c *Client) addOperationConfigureAgentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_CreateProfilingGroup.go b/service/codeguruprofiler/api_op_CreateProfilingGroup.go index 7aead95742e..0d8419c6f3e 100644 --- a/service/codeguruprofiler/api_op_CreateProfilingGroup.go +++ b/service/codeguruprofiler/api_op_CreateProfilingGroup.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateProfilingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProfilingGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_DeleteProfilingGroup.go b/service/codeguruprofiler/api_op_DeleteProfilingGroup.go index 835ee48a2a4..046187fbb94 100644 --- a/service/codeguruprofiler/api_op_DeleteProfilingGroup.go +++ b/service/codeguruprofiler/api_op_DeleteProfilingGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteProfilingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfilingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_DescribeProfilingGroup.go b/service/codeguruprofiler/api_op_DescribeProfilingGroup.go index 4e221aa6d6c..92a80ae996a 100644 --- a/service/codeguruprofiler/api_op_DescribeProfilingGroup.go +++ b/service/codeguruprofiler/api_op_DescribeProfilingGroup.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeProfilingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProfilingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go b/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go index eb1d01c1c82..8ff9b29dde6 100644 --- a/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go +++ b/service/codeguruprofiler/api_op_GetFindingsReportAccountSummary.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetFindingsReportAccountSummaryMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFindingsReportAccountSummary(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationGetFindingsReportAccountSummaryMiddlewares(stack *m return nil } -// GetFindingsReportAccountSummaryAPIClient is a client that implements the -// GetFindingsReportAccountSummary operation. -type GetFindingsReportAccountSummaryAPIClient interface { - GetFindingsReportAccountSummary(context.Context, *GetFindingsReportAccountSummaryInput, ...func(*Options)) (*GetFindingsReportAccountSummaryOutput, error) -} - -var _ GetFindingsReportAccountSummaryAPIClient = (*Client)(nil) - // GetFindingsReportAccountSummaryPaginatorOptions is the paginator options for // GetFindingsReportAccountSummary type GetFindingsReportAccountSummaryPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *GetFindingsReportAccountSummaryPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFindingsReportAccountSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *GetFindingsReportAccountSummaryPaginator) NextPage(ctx context.Context, return result, nil } +// GetFindingsReportAccountSummaryAPIClient is a client that implements the +// GetFindingsReportAccountSummary operation. +type GetFindingsReportAccountSummaryAPIClient interface { + GetFindingsReportAccountSummary(context.Context, *GetFindingsReportAccountSummaryInput, ...func(*Options)) (*GetFindingsReportAccountSummaryOutput, error) +} + +var _ GetFindingsReportAccountSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFindingsReportAccountSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeguruprofiler/api_op_GetNotificationConfiguration.go b/service/codeguruprofiler/api_op_GetNotificationConfiguration.go index ae66eee7162..c39ff31ce28 100644 --- a/service/codeguruprofiler/api_op_GetNotificationConfiguration.go +++ b/service/codeguruprofiler/api_op_GetNotificationConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetNotificationConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNotificationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_GetPolicy.go b/service/codeguruprofiler/api_op_GetPolicy.go index 86cb979ede2..f1f927acba2 100644 --- a/service/codeguruprofiler/api_op_GetPolicy.go +++ b/service/codeguruprofiler/api_op_GetPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_GetProfile.go b/service/codeguruprofiler/api_op_GetProfile.go index 3d5b853ed69..e69be7f9519 100644 --- a/service/codeguruprofiler/api_op_GetProfile.go +++ b/service/codeguruprofiler/api_op_GetProfile.go @@ -209,6 +209,9 @@ func (c *Client) addOperationGetProfileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_GetRecommendations.go b/service/codeguruprofiler/api_op_GetRecommendations.go index 6f4ba5ba0c9..d8287f85db9 100644 --- a/service/codeguruprofiler/api_op_GetRecommendations.go +++ b/service/codeguruprofiler/api_op_GetRecommendations.go @@ -185,6 +185,9 @@ func (c *Client) addOperationGetRecommendationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_ListFindingsReports.go b/service/codeguruprofiler/api_op_ListFindingsReports.go index 5126ad8af63..8fc4b9aba2d 100644 --- a/service/codeguruprofiler/api_op_ListFindingsReports.go +++ b/service/codeguruprofiler/api_op_ListFindingsReports.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListFindingsReportsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsReportsValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListFindingsReportsMiddlewares(stack *middleware.St return nil } -// ListFindingsReportsAPIClient is a client that implements the -// ListFindingsReports operation. -type ListFindingsReportsAPIClient interface { - ListFindingsReports(context.Context, *ListFindingsReportsInput, ...func(*Options)) (*ListFindingsReportsOutput, error) -} - -var _ ListFindingsReportsAPIClient = (*Client)(nil) - // ListFindingsReportsPaginatorOptions is the paginator options for // ListFindingsReports type ListFindingsReportsPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *ListFindingsReportsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindingsReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *ListFindingsReportsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFindingsReportsAPIClient is a client that implements the +// ListFindingsReports operation. +type ListFindingsReportsAPIClient interface { + ListFindingsReports(context.Context, *ListFindingsReportsInput, ...func(*Options)) (*ListFindingsReportsOutput, error) +} + +var _ ListFindingsReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindingsReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeguruprofiler/api_op_ListProfileTimes.go b/service/codeguruprofiler/api_op_ListProfileTimes.go index 7b761a5c4d7..c0af3a69b98 100644 --- a/service/codeguruprofiler/api_op_ListProfileTimes.go +++ b/service/codeguruprofiler/api_op_ListProfileTimes.go @@ -162,6 +162,9 @@ func (c *Client) addOperationListProfileTimesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProfileTimesValidationMiddleware(stack); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationListProfileTimesMiddlewares(stack *middleware.Stack return nil } -// ListProfileTimesAPIClient is a client that implements the ListProfileTimes -// operation. -type ListProfileTimesAPIClient interface { - ListProfileTimes(context.Context, *ListProfileTimesInput, ...func(*Options)) (*ListProfileTimesOutput, error) -} - -var _ ListProfileTimesAPIClient = (*Client)(nil) - // ListProfileTimesPaginatorOptions is the paginator options for ListProfileTimes type ListProfileTimesPaginatorOptions struct { // The maximum number of profile time results returned by ListProfileTimes in @@ -261,6 +256,9 @@ func (p *ListProfileTimesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfileTimes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +278,14 @@ func (p *ListProfileTimesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListProfileTimesAPIClient is a client that implements the ListProfileTimes +// operation. +type ListProfileTimesAPIClient interface { + ListProfileTimes(context.Context, *ListProfileTimesInput, ...func(*Options)) (*ListProfileTimesOutput, error) +} + +var _ ListProfileTimesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfileTimes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeguruprofiler/api_op_ListProfilingGroups.go b/service/codeguruprofiler/api_op_ListProfilingGroups.go index f47d258a4d9..432330e1d03 100644 --- a/service/codeguruprofiler/api_op_ListProfilingGroups.go +++ b/service/codeguruprofiler/api_op_ListProfilingGroups.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListProfilingGroupsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfilingGroups(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListProfilingGroupsMiddlewares(stack *middleware.St return nil } -// ListProfilingGroupsAPIClient is a client that implements the -// ListProfilingGroups operation. -type ListProfilingGroupsAPIClient interface { - ListProfilingGroups(context.Context, *ListProfilingGroupsInput, ...func(*Options)) (*ListProfilingGroupsOutput, error) -} - -var _ ListProfilingGroupsAPIClient = (*Client)(nil) - // ListProfilingGroupsPaginatorOptions is the paginator options for // ListProfilingGroups type ListProfilingGroupsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListProfilingGroupsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfilingGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListProfilingGroupsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListProfilingGroupsAPIClient is a client that implements the +// ListProfilingGroups operation. +type ListProfilingGroupsAPIClient interface { + ListProfilingGroups(context.Context, *ListProfilingGroupsInput, ...func(*Options)) (*ListProfilingGroupsOutput, error) +} + +var _ ListProfilingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfilingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codeguruprofiler/api_op_ListTagsForResource.go b/service/codeguruprofiler/api_op_ListTagsForResource.go index 32b142d4752..6fe3211b9ff 100644 --- a/service/codeguruprofiler/api_op_ListTagsForResource.go +++ b/service/codeguruprofiler/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_PostAgentProfile.go b/service/codeguruprofiler/api_op_PostAgentProfile.go index 44e9868fbfe..fc6a5aa031c 100644 --- a/service/codeguruprofiler/api_op_PostAgentProfile.go +++ b/service/codeguruprofiler/api_op_PostAgentProfile.go @@ -132,6 +132,9 @@ func (c *Client) addOperationPostAgentProfileMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPostAgentProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_PutPermission.go b/service/codeguruprofiler/api_op_PutPermission.go index 3215e3026b3..873ceb362fb 100644 --- a/service/codeguruprofiler/api_op_PutPermission.go +++ b/service/codeguruprofiler/api_op_PutPermission.go @@ -157,6 +157,9 @@ func (c *Client) addOperationPutPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_RemoveNotificationChannel.go b/service/codeguruprofiler/api_op_RemoveNotificationChannel.go index 3e9709539c1..17ad40272fe 100644 --- a/service/codeguruprofiler/api_op_RemoveNotificationChannel.go +++ b/service/codeguruprofiler/api_op_RemoveNotificationChannel.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveNotificationChannelMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveNotificationChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_RemovePermission.go b/service/codeguruprofiler/api_op_RemovePermission.go index 0726ad2c265..d0afbe98c00 100644 --- a/service/codeguruprofiler/api_op_RemovePermission.go +++ b/service/codeguruprofiler/api_op_RemovePermission.go @@ -141,6 +141,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemovePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_SubmitFeedback.go b/service/codeguruprofiler/api_op_SubmitFeedback.go index 180c8c9a826..53949afc040 100644 --- a/service/codeguruprofiler/api_op_SubmitFeedback.go +++ b/service/codeguruprofiler/api_op_SubmitFeedback.go @@ -121,6 +121,9 @@ func (c *Client) addOperationSubmitFeedbackMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_TagResource.go b/service/codeguruprofiler/api_op_TagResource.go index d1a19c97833..02be7095afe 100644 --- a/service/codeguruprofiler/api_op_TagResource.go +++ b/service/codeguruprofiler/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_UntagResource.go b/service/codeguruprofiler/api_op_UntagResource.go index 1580b65188b..82fd0eb064a 100644 --- a/service/codeguruprofiler/api_op_UntagResource.go +++ b/service/codeguruprofiler/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codeguruprofiler/api_op_UpdateProfilingGroup.go b/service/codeguruprofiler/api_op_UpdateProfilingGroup.go index 9d0fb120a9a..7c4ec810984 100644 --- a/service/codeguruprofiler/api_op_UpdateProfilingGroup.go +++ b/service/codeguruprofiler/api_op_UpdateProfilingGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateProfilingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfilingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurureviewer/api_client.go b/service/codegurureviewer/api_client.go index 6689f232fc4..d151320b8b2 100644 --- a/service/codegurureviewer/api_client.go +++ b/service/codegurureviewer/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codegurureviewer/api_op_AssociateRepository.go b/service/codegurureviewer/api_op_AssociateRepository.go index a3fcb7a89e9..e7c10843411 100644 --- a/service/codegurureviewer/api_op_AssociateRepository.go +++ b/service/codegurureviewer/api_op_AssociateRepository.go @@ -164,6 +164,9 @@ func (c *Client) addOperationAssociateRepositoryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateRepositoryMiddleware(stack, options); err != nil { return err } diff --git a/service/codegurureviewer/api_op_CreateCodeReview.go b/service/codegurureviewer/api_op_CreateCodeReview.go index 0271dd22a8e..d6a77bc9c19 100644 --- a/service/codegurureviewer/api_op_CreateCodeReview.go +++ b/service/codegurureviewer/api_op_CreateCodeReview.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateCodeReviewMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCodeReviewMiddleware(stack, options); err != nil { return err } diff --git a/service/codegurureviewer/api_op_DescribeCodeReview.go b/service/codegurureviewer/api_op_DescribeCodeReview.go index 2de113bbcee..d4a1192e0df 100644 --- a/service/codegurureviewer/api_op_DescribeCodeReview.go +++ b/service/codegurureviewer/api_op_DescribeCodeReview.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeCodeReviewMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCodeReviewValidationMiddleware(stack); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeCodeReviewMiddlewares(stack *middleware.Sta return nil } -// DescribeCodeReviewAPIClient is a client that implements the DescribeCodeReview -// operation. -type DescribeCodeReviewAPIClient interface { - DescribeCodeReview(context.Context, *DescribeCodeReviewInput, ...func(*Options)) (*DescribeCodeReviewOutput, error) -} - -var _ DescribeCodeReviewAPIClient = (*Client)(nil) - // CodeReviewCompletedWaiterOptions are waiter options for // CodeReviewCompletedWaiter type CodeReviewCompletedWaiterOptions struct { @@ -261,7 +256,13 @@ func (w *CodeReviewCompletedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeCodeReview(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -353,6 +354,14 @@ func codeReviewCompletedStateRetryable(ctx context.Context, input *DescribeCodeR return true, nil } +// DescribeCodeReviewAPIClient is a client that implements the DescribeCodeReview +// operation. +type DescribeCodeReviewAPIClient interface { + DescribeCodeReview(context.Context, *DescribeCodeReviewInput, ...func(*Options)) (*DescribeCodeReviewOutput, error) +} + +var _ DescribeCodeReviewAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCodeReview(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go b/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go index 861b2350fd3..932c22369fd 100644 --- a/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go +++ b/service/codegurureviewer/api_op_DescribeRecommendationFeedback.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeRecommendationFeedbackMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecommendationFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go b/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go index c52530b1622..fe46e042e2b 100644 --- a/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go +++ b/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeRepositoryAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRepositoryAssociationValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeRepositoryAssociationMiddlewares(stack *mid return nil } -// DescribeRepositoryAssociationAPIClient is a client that implements the -// DescribeRepositoryAssociation operation. -type DescribeRepositoryAssociationAPIClient interface { - DescribeRepositoryAssociation(context.Context, *DescribeRepositoryAssociationInput, ...func(*Options)) (*DescribeRepositoryAssociationOutput, error) -} - -var _ DescribeRepositoryAssociationAPIClient = (*Client)(nil) - // RepositoryAssociationSucceededWaiterOptions are waiter options for // RepositoryAssociationSucceededWaiter type RepositoryAssociationSucceededWaiterOptions struct { @@ -280,7 +275,13 @@ func (w *RepositoryAssociationSucceededWaiter) WaitForOutput(ctx context.Context } out, err := w.client.DescribeRepositoryAssociation(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -372,6 +373,14 @@ func repositoryAssociationSucceededStateRetryable(ctx context.Context, input *De return true, nil } +// DescribeRepositoryAssociationAPIClient is a client that implements the +// DescribeRepositoryAssociation operation. +type DescribeRepositoryAssociationAPIClient interface { + DescribeRepositoryAssociation(context.Context, *DescribeRepositoryAssociationInput, ...func(*Options)) (*DescribeRepositoryAssociationOutput, error) +} + +var _ DescribeRepositoryAssociationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRepositoryAssociation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurureviewer/api_op_DisassociateRepository.go b/service/codegurureviewer/api_op_DisassociateRepository.go index de4ddf6ac2c..6dbd3ea569a 100644 --- a/service/codegurureviewer/api_op_DisassociateRepository.go +++ b/service/codegurureviewer/api_op_DisassociateRepository.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisassociateRepositoryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurureviewer/api_op_ListCodeReviews.go b/service/codegurureviewer/api_op_ListCodeReviews.go index 674d3a6255c..df3d7f848c6 100644 --- a/service/codegurureviewer/api_op_ListCodeReviews.go +++ b/service/codegurureviewer/api_op_ListCodeReviews.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListCodeReviewsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCodeReviewsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListCodeReviewsMiddlewares(stack *middleware.Stack, return nil } -// ListCodeReviewsAPIClient is a client that implements the ListCodeReviews -// operation. -type ListCodeReviewsAPIClient interface { - ListCodeReviews(context.Context, *ListCodeReviewsInput, ...func(*Options)) (*ListCodeReviewsOutput, error) -} - -var _ ListCodeReviewsAPIClient = (*Client)(nil) - // ListCodeReviewsPaginatorOptions is the paginator options for ListCodeReviews type ListCodeReviewsPaginatorOptions struct { // The maximum number of results that are returned per call. The default is 100. @@ -235,6 +230,9 @@ func (p *ListCodeReviewsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCodeReviews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListCodeReviewsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListCodeReviewsAPIClient is a client that implements the ListCodeReviews +// operation. +type ListCodeReviewsAPIClient interface { + ListCodeReviews(context.Context, *ListCodeReviewsInput, ...func(*Options)) (*ListCodeReviewsOutput, error) +} + +var _ ListCodeReviewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCodeReviews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurureviewer/api_op_ListRecommendationFeedback.go b/service/codegurureviewer/api_op_ListRecommendationFeedback.go index 7d15dcd1b74..ff588db30cd 100644 --- a/service/codegurureviewer/api_op_ListRecommendationFeedback.go +++ b/service/codegurureviewer/api_op_ListRecommendationFeedback.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRecommendationFeedbackMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecommendationFeedbackValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListRecommendationFeedbackMiddlewares(stack *middle return nil } -// ListRecommendationFeedbackAPIClient is a client that implements the -// ListRecommendationFeedback operation. -type ListRecommendationFeedbackAPIClient interface { - ListRecommendationFeedback(context.Context, *ListRecommendationFeedbackInput, ...func(*Options)) (*ListRecommendationFeedbackOutput, error) -} - -var _ ListRecommendationFeedbackAPIClient = (*Client)(nil) - // ListRecommendationFeedbackPaginatorOptions is the paginator options for // ListRecommendationFeedback type ListRecommendationFeedbackPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListRecommendationFeedbackPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendationFeedback(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListRecommendationFeedbackPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListRecommendationFeedbackAPIClient is a client that implements the +// ListRecommendationFeedback operation. +type ListRecommendationFeedbackAPIClient interface { + ListRecommendationFeedback(context.Context, *ListRecommendationFeedbackInput, ...func(*Options)) (*ListRecommendationFeedbackOutput, error) +} + +var _ ListRecommendationFeedbackAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendationFeedback(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurureviewer/api_op_ListRecommendations.go b/service/codegurureviewer/api_op_ListRecommendations.go index 5a99deddac9..05f4e66f6df 100644 --- a/service/codegurureviewer/api_op_ListRecommendations.go +++ b/service/codegurureviewer/api_op_ListRecommendations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St return nil } -// ListRecommendationsAPIClient is a client that implements the -// ListRecommendations operation. -type ListRecommendationsAPIClient interface { - ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) -} - -var _ ListRecommendationsAPIClient = (*Client)(nil) - // ListRecommendationsPaginatorOptions is the paginator options for // ListRecommendations type ListRecommendationsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRecommendationsAPIClient is a client that implements the +// ListRecommendations operation. +type ListRecommendationsAPIClient interface { + ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) +} + +var _ ListRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurureviewer/api_op_ListRepositoryAssociations.go b/service/codegurureviewer/api_op_ListRepositoryAssociations.go index d7d1be1cffb..30abe8ea87e 100644 --- a/service/codegurureviewer/api_op_ListRepositoryAssociations.go +++ b/service/codegurureviewer/api_op_ListRepositoryAssociations.go @@ -178,6 +178,9 @@ func (c *Client) addOperationListRepositoryAssociationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositoryAssociations(options.Region), middleware.Before); err != nil { return err } @@ -199,14 +202,6 @@ func (c *Client) addOperationListRepositoryAssociationsMiddlewares(stack *middle return nil } -// ListRepositoryAssociationsAPIClient is a client that implements the -// ListRepositoryAssociations operation. -type ListRepositoryAssociationsAPIClient interface { - ListRepositoryAssociations(context.Context, *ListRepositoryAssociationsInput, ...func(*Options)) (*ListRepositoryAssociationsOutput, error) -} - -var _ ListRepositoryAssociationsAPIClient = (*Client)(nil) - // ListRepositoryAssociationsPaginatorOptions is the paginator options for // ListRepositoryAssociations type ListRepositoryAssociationsPaginatorOptions struct { @@ -280,6 +275,9 @@ func (p *ListRepositoryAssociationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositoryAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -299,6 +297,14 @@ func (p *ListRepositoryAssociationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListRepositoryAssociationsAPIClient is a client that implements the +// ListRepositoryAssociations operation. +type ListRepositoryAssociationsAPIClient interface { + ListRepositoryAssociations(context.Context, *ListRepositoryAssociationsInput, ...func(*Options)) (*ListRepositoryAssociationsOutput, error) +} + +var _ ListRepositoryAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositoryAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurureviewer/api_op_ListTagsForResource.go b/service/codegurureviewer/api_op_ListTagsForResource.go index 4370279840f..fb905a9d2de 100644 --- a/service/codegurureviewer/api_op_ListTagsForResource.go +++ b/service/codegurureviewer/api_op_ListTagsForResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurureviewer/api_op_PutRecommendationFeedback.go b/service/codegurureviewer/api_op_PutRecommendationFeedback.go index 905540ffae1..0826f367ae0 100644 --- a/service/codegurureviewer/api_op_PutRecommendationFeedback.go +++ b/service/codegurureviewer/api_op_PutRecommendationFeedback.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutRecommendationFeedbackMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecommendationFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurureviewer/api_op_TagResource.go b/service/codegurureviewer/api_op_TagResource.go index 21d2a18d9a7..0a9d9a67874 100644 --- a/service/codegurureviewer/api_op_TagResource.go +++ b/service/codegurureviewer/api_op_TagResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurureviewer/api_op_UntagResource.go b/service/codegurureviewer/api_op_UntagResource.go index 404facdd20a..e08eb722aee 100644 --- a/service/codegurureviewer/api_op_UntagResource.go +++ b/service/codegurureviewer/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_client.go b/service/codegurusecurity/api_client.go index 464581fc34f..772e5d0ea91 100644 --- a/service/codegurusecurity/api_client.go +++ b/service/codegurusecurity/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codegurusecurity/api_op_BatchGetFindings.go b/service/codegurusecurity/api_op_BatchGetFindings.go index 4e9d1d5943d..87e1b199fca 100644 --- a/service/codegurusecurity/api_op_BatchGetFindings.go +++ b/service/codegurusecurity/api_op_BatchGetFindings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchGetFindingsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_CreateScan.go b/service/codegurusecurity/api_op_CreateScan.go index ccd1b69c0b4..828041b3241 100644 --- a/service/codegurusecurity/api_op_CreateScan.go +++ b/service/codegurusecurity/api_op_CreateScan.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateScanMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateScanMiddleware(stack, options); err != nil { return err } diff --git a/service/codegurusecurity/api_op_CreateUploadUrl.go b/service/codegurusecurity/api_op_CreateUploadUrl.go index 7b8bb61ccd3..6e78b7eedb1 100644 --- a/service/codegurusecurity/api_op_CreateUploadUrl.go +++ b/service/codegurusecurity/api_op_CreateUploadUrl.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateUploadUrlMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUploadUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_GetAccountConfiguration.go b/service/codegurusecurity/api_op_GetAccountConfiguration.go index 9a3d754c71a..cee6845205a 100644 --- a/service/codegurusecurity/api_op_GetAccountConfiguration.go +++ b/service/codegurusecurity/api_op_GetAccountConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetAccountConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codegurusecurity/api_op_GetFindings.go b/service/codegurusecurity/api_op_GetFindings.go index 3e2b320c568..e22234c92fd 100644 --- a/service/codegurusecurity/api_op_GetFindings.go +++ b/service/codegurusecurity/api_op_GetFindings.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetFindingsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationGetFindingsMiddlewares(stack *middleware.Stack, opt return nil } -// GetFindingsAPIClient is a client that implements the GetFindings operation. -type GetFindingsAPIClient interface { - GetFindings(context.Context, *GetFindingsInput, ...func(*Options)) (*GetFindingsOutput, error) -} - -var _ GetFindingsAPIClient = (*Client)(nil) - // GetFindingsPaginatorOptions is the paginator options for GetFindings type GetFindingsPaginatorOptions struct { // The maximum number of results to return in the response. Use this parameter @@ -224,6 +220,9 @@ func (p *GetFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *GetFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetFindingsAPIClient is a client that implements the GetFindings operation. +type GetFindingsAPIClient interface { + GetFindings(context.Context, *GetFindingsInput, ...func(*Options)) (*GetFindingsOutput, error) +} + +var _ GetFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurusecurity/api_op_GetMetricsSummary.go b/service/codegurusecurity/api_op_GetMetricsSummary.go index b3b2db1a392..50e27809df6 100644 --- a/service/codegurusecurity/api_op_GetMetricsSummary.go +++ b/service/codegurusecurity/api_op_GetMetricsSummary.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetMetricsSummaryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricsSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_GetScan.go b/service/codegurusecurity/api_op_GetScan.go index 89021e4f21c..1bebffc2b0a 100644 --- a/service/codegurusecurity/api_op_GetScan.go +++ b/service/codegurusecurity/api_op_GetScan.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetScanMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetScanValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_ListFindingsMetrics.go b/service/codegurusecurity/api_op_ListFindingsMetrics.go index 85aa85f498c..04a4f05f541 100644 --- a/service/codegurusecurity/api_op_ListFindingsMetrics.go +++ b/service/codegurusecurity/api_op_ListFindingsMetrics.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFindingsMetricsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsMetricsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListFindingsMetricsMiddlewares(stack *middleware.St return nil } -// ListFindingsMetricsAPIClient is a client that implements the -// ListFindingsMetrics operation. -type ListFindingsMetricsAPIClient interface { - ListFindingsMetrics(context.Context, *ListFindingsMetricsInput, ...func(*Options)) (*ListFindingsMetricsOutput, error) -} - -var _ ListFindingsMetricsAPIClient = (*Client)(nil) - // ListFindingsMetricsPaginatorOptions is the paginator options for // ListFindingsMetrics type ListFindingsMetricsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListFindingsMetricsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindingsMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListFindingsMetricsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFindingsMetricsAPIClient is a client that implements the +// ListFindingsMetrics operation. +type ListFindingsMetricsAPIClient interface { + ListFindingsMetrics(context.Context, *ListFindingsMetricsInput, ...func(*Options)) (*ListFindingsMetricsOutput, error) +} + +var _ ListFindingsMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindingsMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurusecurity/api_op_ListScans.go b/service/codegurusecurity/api_op_ListScans.go index cb84dd7b8bb..daf7426940c 100644 --- a/service/codegurusecurity/api_op_ListScans.go +++ b/service/codegurusecurity/api_op_ListScans.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListScansMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScans(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListScansMiddlewares(stack *middleware.Stack, optio return nil } -// ListScansAPIClient is a client that implements the ListScans operation. -type ListScansAPIClient interface { - ListScans(context.Context, *ListScansInput, ...func(*Options)) (*ListScansOutput, error) -} - -var _ ListScansAPIClient = (*Client)(nil) - // ListScansPaginatorOptions is the paginator options for ListScans type ListScansPaginatorOptions struct { // The maximum number of results to return in the response. Use this parameter @@ -213,6 +209,9 @@ func (p *ListScansPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListScansPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListScansAPIClient is a client that implements the ListScans operation. +type ListScansAPIClient interface { + ListScans(context.Context, *ListScansInput, ...func(*Options)) (*ListScansOutput, error) +} + +var _ ListScansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codegurusecurity/api_op_ListTagsForResource.go b/service/codegurusecurity/api_op_ListTagsForResource.go index f2fd0d206ec..8386aac7805 100644 --- a/service/codegurusecurity/api_op_ListTagsForResource.go +++ b/service/codegurusecurity/api_op_ListTagsForResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_TagResource.go b/service/codegurusecurity/api_op_TagResource.go index 731ef4998e7..882e8902d49 100644 --- a/service/codegurusecurity/api_op_TagResource.go +++ b/service/codegurusecurity/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_UntagResource.go b/service/codegurusecurity/api_op_UntagResource.go index 51c2c4f821c..792b3174553 100644 --- a/service/codegurusecurity/api_op_UntagResource.go +++ b/service/codegurusecurity/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codegurusecurity/api_op_UpdateAccountConfiguration.go b/service/codegurusecurity/api_op_UpdateAccountConfiguration.go index 2226a02f289..230c1ccb6c4 100644 --- a/service/codegurusecurity/api_op_UpdateAccountConfiguration.go +++ b/service/codegurusecurity/api_op_UpdateAccountConfiguration.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateAccountConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccountConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_client.go b/service/codepipeline/api_client.go index ee2cc5666ae..7c34afd3dc2 100644 --- a/service/codepipeline/api_client.go +++ b/service/codepipeline/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codepipeline/api_op_AcknowledgeJob.go b/service/codepipeline/api_op_AcknowledgeJob.go index a81d956a1e6..c23fd3d2c26 100644 --- a/service/codepipeline/api_op_AcknowledgeJob.go +++ b/service/codepipeline/api_op_AcknowledgeJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAcknowledgeJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcknowledgeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_AcknowledgeThirdPartyJob.go b/service/codepipeline/api_op_AcknowledgeThirdPartyJob.go index c9003812ea2..122c0ed1c28 100644 --- a/service/codepipeline/api_op_AcknowledgeThirdPartyJob.go +++ b/service/codepipeline/api_op_AcknowledgeThirdPartyJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationAcknowledgeThirdPartyJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcknowledgeThirdPartyJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_CreateCustomActionType.go b/service/codepipeline/api_op_CreateCustomActionType.go index 90761e663ab..1b20f5ec0bf 100644 --- a/service/codepipeline/api_op_CreateCustomActionType.go +++ b/service/codepipeline/api_op_CreateCustomActionType.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateCustomActionTypeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomActionTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_CreatePipeline.go b/service/codepipeline/api_op_CreatePipeline.go index b0169ae2fb9..3553bf9b3de 100644 --- a/service/codepipeline/api_op_CreatePipeline.go +++ b/service/codepipeline/api_op_CreatePipeline.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_DeleteCustomActionType.go b/service/codepipeline/api_op_DeleteCustomActionType.go index 125bf417670..b71a6b32aca 100644 --- a/service/codepipeline/api_op_DeleteCustomActionType.go +++ b/service/codepipeline/api_op_DeleteCustomActionType.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteCustomActionTypeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomActionTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_DeletePipeline.go b/service/codepipeline/api_op_DeletePipeline.go index b4cfda8a130..2ae968907d6 100644 --- a/service/codepipeline/api_op_DeletePipeline.go +++ b/service/codepipeline/api_op_DeletePipeline.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeletePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_DeleteWebhook.go b/service/codepipeline/api_op_DeleteWebhook.go index 7793d1dacfd..440a0348db9 100644 --- a/service/codepipeline/api_op_DeleteWebhook.go +++ b/service/codepipeline/api_op_DeleteWebhook.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteWebhookMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_DeregisterWebhookWithThirdParty.go b/service/codepipeline/api_op_DeregisterWebhookWithThirdParty.go index c64da1a00c7..441a66b1054 100644 --- a/service/codepipeline/api_op_DeregisterWebhookWithThirdParty.go +++ b/service/codepipeline/api_op_DeregisterWebhookWithThirdParty.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeregisterWebhookWithThirdPartyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterWebhookWithThirdParty(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codepipeline/api_op_DisableStageTransition.go b/service/codepipeline/api_op_DisableStageTransition.go index 6d6b3e7069f..96c02269bbc 100644 --- a/service/codepipeline/api_op_DisableStageTransition.go +++ b/service/codepipeline/api_op_DisableStageTransition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDisableStageTransitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableStageTransitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_EnableStageTransition.go b/service/codepipeline/api_op_EnableStageTransition.go index a1a4fd23daa..d11487c05ce 100644 --- a/service/codepipeline/api_op_EnableStageTransition.go +++ b/service/codepipeline/api_op_EnableStageTransition.go @@ -117,6 +117,9 @@ func (c *Client) addOperationEnableStageTransitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableStageTransitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_GetActionType.go b/service/codepipeline/api_op_GetActionType.go index 60e8414e008..2bdb2f40487 100644 --- a/service/codepipeline/api_op_GetActionType.go +++ b/service/codepipeline/api_op_GetActionType.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetActionTypeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetActionTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_GetJobDetails.go b/service/codepipeline/api_op_GetJobDetails.go index a90008ac968..1a57aff9e85 100644 --- a/service/codepipeline/api_op_GetJobDetails.go +++ b/service/codepipeline/api_op_GetJobDetails.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetJobDetailsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_GetPipeline.go b/service/codepipeline/api_op_GetPipeline.go index f2b7a4aa223..7173b78266c 100644 --- a/service/codepipeline/api_op_GetPipeline.go +++ b/service/codepipeline/api_op_GetPipeline.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetPipelineMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_GetPipelineExecution.go b/service/codepipeline/api_op_GetPipelineExecution.go index 861d03aeaac..9daa6100323 100644 --- a/service/codepipeline/api_op_GetPipelineExecution.go +++ b/service/codepipeline/api_op_GetPipelineExecution.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetPipelineExecutionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_GetPipelineState.go b/service/codepipeline/api_op_GetPipelineState.go index ff9b4513bfd..c993b2cf2e5 100644 --- a/service/codepipeline/api_op_GetPipelineState.go +++ b/service/codepipeline/api_op_GetPipelineState.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetPipelineStateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_GetThirdPartyJobDetails.go b/service/codepipeline/api_op_GetThirdPartyJobDetails.go index 6c1427f0146..6a8f25e0227 100644 --- a/service/codepipeline/api_op_GetThirdPartyJobDetails.go +++ b/service/codepipeline/api_op_GetThirdPartyJobDetails.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetThirdPartyJobDetailsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetThirdPartyJobDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_ListActionExecutions.go b/service/codepipeline/api_op_ListActionExecutions.go index 88073115c0c..7e3b353f097 100644 --- a/service/codepipeline/api_op_ListActionExecutions.go +++ b/service/codepipeline/api_op_ListActionExecutions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListActionExecutionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListActionExecutionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListActionExecutionsMiddlewares(stack *middleware.S return nil } -// ListActionExecutionsAPIClient is a client that implements the -// ListActionExecutions operation. -type ListActionExecutionsAPIClient interface { - ListActionExecutions(context.Context, *ListActionExecutionsInput, ...func(*Options)) (*ListActionExecutionsOutput, error) -} - -var _ ListActionExecutionsAPIClient = (*Client)(nil) - // ListActionExecutionsPaginatorOptions is the paginator options for // ListActionExecutions type ListActionExecutionsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListActionExecutionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActionExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListActionExecutionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListActionExecutionsAPIClient is a client that implements the +// ListActionExecutions operation. +type ListActionExecutionsAPIClient interface { + ListActionExecutions(context.Context, *ListActionExecutionsInput, ...func(*Options)) (*ListActionExecutionsOutput, error) +} + +var _ ListActionExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActionExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codepipeline/api_op_ListActionTypes.go b/service/codepipeline/api_op_ListActionTypes.go index 643d2576d13..da6e86a0907 100644 --- a/service/codepipeline/api_op_ListActionTypes.go +++ b/service/codepipeline/api_op_ListActionTypes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListActionTypesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActionTypes(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListActionTypesMiddlewares(stack *middleware.Stack, return nil } -// ListActionTypesAPIClient is a client that implements the ListActionTypes -// operation. -type ListActionTypesAPIClient interface { - ListActionTypes(context.Context, *ListActionTypesInput, ...func(*Options)) (*ListActionTypesOutput, error) -} - -var _ ListActionTypesAPIClient = (*Client)(nil) - // ListActionTypesPaginatorOptions is the paginator options for ListActionTypes type ListActionTypesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -200,6 +195,9 @@ func (p *ListActionTypesPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActionTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *ListActionTypesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListActionTypesAPIClient is a client that implements the ListActionTypes +// operation. +type ListActionTypesAPIClient interface { + ListActionTypes(context.Context, *ListActionTypesInput, ...func(*Options)) (*ListActionTypesOutput, error) +} + +var _ ListActionTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActionTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codepipeline/api_op_ListPipelineExecutions.go b/service/codepipeline/api_op_ListPipelineExecutions.go index 993b3165503..27fbfff0bc7 100644 --- a/service/codepipeline/api_op_ListPipelineExecutions.go +++ b/service/codepipeline/api_op_ListPipelineExecutions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListPipelineExecutionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPipelineExecutionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListPipelineExecutionsMiddlewares(stack *middleware return nil } -// ListPipelineExecutionsAPIClient is a client that implements the -// ListPipelineExecutions operation. -type ListPipelineExecutionsAPIClient interface { - ListPipelineExecutions(context.Context, *ListPipelineExecutionsInput, ...func(*Options)) (*ListPipelineExecutionsOutput, error) -} - -var _ ListPipelineExecutionsAPIClient = (*Client)(nil) - // ListPipelineExecutionsPaginatorOptions is the paginator options for // ListPipelineExecutions type ListPipelineExecutionsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListPipelineExecutionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelineExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListPipelineExecutionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListPipelineExecutionsAPIClient is a client that implements the +// ListPipelineExecutions operation. +type ListPipelineExecutionsAPIClient interface { + ListPipelineExecutions(context.Context, *ListPipelineExecutionsInput, ...func(*Options)) (*ListPipelineExecutionsOutput, error) +} + +var _ ListPipelineExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelineExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codepipeline/api_op_ListPipelines.go b/service/codepipeline/api_op_ListPipelines.go index f1eb3151ed3..38b910e53c5 100644 --- a/service/codepipeline/api_op_ListPipelines.go +++ b/service/codepipeline/api_op_ListPipelines.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelines(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o return nil } -// ListPipelinesAPIClient is a client that implements the ListPipelines operation. -type ListPipelinesAPIClient interface { - ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) -} - -var _ ListPipelinesAPIClient = (*Client)(nil) - // ListPipelinesPaginatorOptions is the paginator options for ListPipelines type ListPipelinesPaginatorOptions struct { // The maximum number of pipelines to return in a single call. To retrieve the @@ -210,6 +206,9 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListPipelinesAPIClient is a client that implements the ListPipelines operation. +type ListPipelinesAPIClient interface { + ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) +} + +var _ ListPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codepipeline/api_op_ListTagsForResource.go b/service/codepipeline/api_op_ListTagsForResource.go index f46a6b628f9..e97aee1d989 100644 --- a/service/codepipeline/api_op_ListTagsForResource.go +++ b/service/codepipeline/api_op_ListTagsForResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codepipeline/api_op_ListWebhooks.go b/service/codepipeline/api_op_ListWebhooks.go index 109b4082033..4b7c29b6719 100644 --- a/service/codepipeline/api_op_ListWebhooks.go +++ b/service/codepipeline/api_op_ListWebhooks.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListWebhooksMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWebhooks(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListWebhooksMiddlewares(stack *middleware.Stack, op return nil } -// ListWebhooksAPIClient is a client that implements the ListWebhooks operation. -type ListWebhooksAPIClient interface { - ListWebhooks(context.Context, *ListWebhooksInput, ...func(*Options)) (*ListWebhooksOutput, error) -} - -var _ ListWebhooksAPIClient = (*Client)(nil) - // ListWebhooksPaginatorOptions is the paginator options for ListWebhooks type ListWebhooksPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -209,6 +205,9 @@ func (p *ListWebhooksPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWebhooks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListWebhooksPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListWebhooksAPIClient is a client that implements the ListWebhooks operation. +type ListWebhooksAPIClient interface { + ListWebhooks(context.Context, *ListWebhooksInput, ...func(*Options)) (*ListWebhooksOutput, error) +} + +var _ ListWebhooksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWebhooks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codepipeline/api_op_PollForJobs.go b/service/codepipeline/api_op_PollForJobs.go index 340dd916337..9da9c6d4995 100644 --- a/service/codepipeline/api_op_PollForJobs.go +++ b/service/codepipeline/api_op_PollForJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPollForJobsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPollForJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PollForThirdPartyJobs.go b/service/codepipeline/api_op_PollForThirdPartyJobs.go index b6ad66bb9f1..f5570de2942 100644 --- a/service/codepipeline/api_op_PollForThirdPartyJobs.go +++ b/service/codepipeline/api_op_PollForThirdPartyJobs.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPollForThirdPartyJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPollForThirdPartyJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutActionRevision.go b/service/codepipeline/api_op_PutActionRevision.go index 5b9380ff62e..e36fa1171cd 100644 --- a/service/codepipeline/api_op_PutActionRevision.go +++ b/service/codepipeline/api_op_PutActionRevision.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutActionRevisionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutActionRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutApprovalResult.go b/service/codepipeline/api_op_PutApprovalResult.go index 56dfc69e280..8bbe4e5023b 100644 --- a/service/codepipeline/api_op_PutApprovalResult.go +++ b/service/codepipeline/api_op_PutApprovalResult.go @@ -133,6 +133,9 @@ func (c *Client) addOperationPutApprovalResultMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApprovalResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutJobFailureResult.go b/service/codepipeline/api_op_PutJobFailureResult.go index f53e6bcacdb..a4e0f99f4c7 100644 --- a/service/codepipeline/api_op_PutJobFailureResult.go +++ b/service/codepipeline/api_op_PutJobFailureResult.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutJobFailureResultMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutJobFailureResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutJobSuccessResult.go b/service/codepipeline/api_op_PutJobSuccessResult.go index 4e25463d924..9132336085c 100644 --- a/service/codepipeline/api_op_PutJobSuccessResult.go +++ b/service/codepipeline/api_op_PutJobSuccessResult.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutJobSuccessResultMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutJobSuccessResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutThirdPartyJobFailureResult.go b/service/codepipeline/api_op_PutThirdPartyJobFailureResult.go index e9b7a458e18..93eb63b3672 100644 --- a/service/codepipeline/api_op_PutThirdPartyJobFailureResult.go +++ b/service/codepipeline/api_op_PutThirdPartyJobFailureResult.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutThirdPartyJobFailureResultMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutThirdPartyJobFailureResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutThirdPartyJobSuccessResult.go b/service/codepipeline/api_op_PutThirdPartyJobSuccessResult.go index 76964576e7e..976df39eb7e 100644 --- a/service/codepipeline/api_op_PutThirdPartyJobSuccessResult.go +++ b/service/codepipeline/api_op_PutThirdPartyJobSuccessResult.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutThirdPartyJobSuccessResultMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutThirdPartyJobSuccessResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_PutWebhook.go b/service/codepipeline/api_op_PutWebhook.go index 98cc3b817d0..480f9b30411 100644 --- a/service/codepipeline/api_op_PutWebhook.go +++ b/service/codepipeline/api_op_PutWebhook.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutWebhookMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutWebhookValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_RegisterWebhookWithThirdParty.go b/service/codepipeline/api_op_RegisterWebhookWithThirdParty.go index 124d817e334..e39d7df2f5c 100644 --- a/service/codepipeline/api_op_RegisterWebhookWithThirdParty.go +++ b/service/codepipeline/api_op_RegisterWebhookWithThirdParty.go @@ -101,6 +101,9 @@ func (c *Client) addOperationRegisterWebhookWithThirdPartyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterWebhookWithThirdParty(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codepipeline/api_op_RetryStageExecution.go b/service/codepipeline/api_op_RetryStageExecution.go index 846148cfcd3..cee3edd82ad 100644 --- a/service/codepipeline/api_op_RetryStageExecution.go +++ b/service/codepipeline/api_op_RetryStageExecution.go @@ -131,6 +131,9 @@ func (c *Client) addOperationRetryStageExecutionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetryStageExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_RollbackStage.go b/service/codepipeline/api_op_RollbackStage.go index 9632150f90b..989a9c9313f 100644 --- a/service/codepipeline/api_op_RollbackStage.go +++ b/service/codepipeline/api_op_RollbackStage.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRollbackStageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRollbackStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_StartPipelineExecution.go b/service/codepipeline/api_op_StartPipelineExecution.go index a958749e466..684a3d719ff 100644 --- a/service/codepipeline/api_op_StartPipelineExecution.go +++ b/service/codepipeline/api_op_StartPipelineExecution.go @@ -123,6 +123,9 @@ func (c *Client) addOperationStartPipelineExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartPipelineExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/codepipeline/api_op_StopPipelineExecution.go b/service/codepipeline/api_op_StopPipelineExecution.go index 401733db4fd..8867c13affc 100644 --- a/service/codepipeline/api_op_StopPipelineExecution.go +++ b/service/codepipeline/api_op_StopPipelineExecution.go @@ -125,6 +125,9 @@ func (c *Client) addOperationStopPipelineExecutionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopPipelineExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_TagResource.go b/service/codepipeline/api_op_TagResource.go index 253c6a48c23..9339d624a94 100644 --- a/service/codepipeline/api_op_TagResource.go +++ b/service/codepipeline/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_UntagResource.go b/service/codepipeline/api_op_UntagResource.go index 2f7ad00a6f3..56ecac62f23 100644 --- a/service/codepipeline/api_op_UntagResource.go +++ b/service/codepipeline/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_UpdateActionType.go b/service/codepipeline/api_op_UpdateActionType.go index 9fbf55af0c1..af126dece17 100644 --- a/service/codepipeline/api_op_UpdateActionType.go +++ b/service/codepipeline/api_op_UpdateActionType.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateActionTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateActionTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codepipeline/api_op_UpdatePipeline.go b/service/codepipeline/api_op_UpdatePipeline.go index 4151d2c8400..aab9b8ef2d9 100644 --- a/service/codepipeline/api_op_UpdatePipeline.go +++ b/service/codepipeline/api_op_UpdatePipeline.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_client.go b/service/codestar/api_client.go index 118666f82b3..ab88edb69f0 100644 --- a/service/codestar/api_client.go +++ b/service/codestar/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/codestar/api_op_AssociateTeamMember.go b/service/codestar/api_op_AssociateTeamMember.go index 14606c08d70..e9633df6c52 100644 --- a/service/codestar/api_op_AssociateTeamMember.go +++ b/service/codestar/api_op_AssociateTeamMember.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAssociateTeamMemberMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTeamMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_CreateProject.go b/service/codestar/api_op_CreateProject.go index f3e3dd20ba3..65167bcaf07 100644 --- a/service/codestar/api_op_CreateProject.go +++ b/service/codestar/api_op_CreateProject.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_CreateUserProfile.go b/service/codestar/api_op_CreateUserProfile.go index 58a6fc97a09..7aa5a1ee371 100644 --- a/service/codestar/api_op_CreateUserProfile.go +++ b/service/codestar/api_op_CreateUserProfile.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_DeleteProject.go b/service/codestar/api_op_DeleteProject.go index ab6683696e5..f3df876d33c 100644 --- a/service/codestar/api_op_DeleteProject.go +++ b/service/codestar/api_op_DeleteProject.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_DeleteUserProfile.go b/service/codestar/api_op_DeleteUserProfile.go index 7c647d77d86..a66c262a374 100644 --- a/service/codestar/api_op_DeleteUserProfile.go +++ b/service/codestar/api_op_DeleteUserProfile.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_DescribeProject.go b/service/codestar/api_op_DescribeProject.go index 3b906a82064..8d4e40d5f2d 100644 --- a/service/codestar/api_op_DescribeProject.go +++ b/service/codestar/api_op_DescribeProject.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_DescribeUserProfile.go b/service/codestar/api_op_DescribeUserProfile.go index 47996f1738e..8e3733ee019 100644 --- a/service/codestar/api_op_DescribeUserProfile.go +++ b/service/codestar/api_op_DescribeUserProfile.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeUserProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_DisassociateTeamMember.go b/service/codestar/api_op_DisassociateTeamMember.go index ac340ef62a4..dd417f06e83 100644 --- a/service/codestar/api_op_DisassociateTeamMember.go +++ b/service/codestar/api_op_DisassociateTeamMember.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisassociateTeamMemberMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTeamMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_ListProjects.go b/service/codestar/api_op_ListProjects.go index 881b6b2e8a2..2fc7012467c 100644 --- a/service/codestar/api_op_ListProjects.go +++ b/service/codestar/api_op_ListProjects.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codestar/api_op_ListResources.go b/service/codestar/api_op_ListResources.go index da29fbee3d1..426f8ec24b0 100644 --- a/service/codestar/api_op_ListResources.go +++ b/service/codestar/api_op_ListResources.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_ListTagsForProject.go b/service/codestar/api_op_ListTagsForProject.go index eb236f08d93..edf0bdcf786 100644 --- a/service/codestar/api_op_ListTagsForProject.go +++ b/service/codestar/api_op_ListTagsForProject.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTagsForProjectMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_ListTeamMembers.go b/service/codestar/api_op_ListTeamMembers.go index e407637d90c..185ac8607c0 100644 --- a/service/codestar/api_op_ListTeamMembers.go +++ b/service/codestar/api_op_ListTeamMembers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListTeamMembersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTeamMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_ListUserProfiles.go b/service/codestar/api_op_ListUserProfiles.go index fc22360995f..d23d5bb7c93 100644 --- a/service/codestar/api_op_ListUserProfiles.go +++ b/service/codestar/api_op_ListUserProfiles.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListUserProfilesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserProfiles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/codestar/api_op_TagProject.go b/service/codestar/api_op_TagProject.go index 8126d9bb04d..607c7f27d94 100644 --- a/service/codestar/api_op_TagProject.go +++ b/service/codestar/api_op_TagProject.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagProjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_UntagProject.go b/service/codestar/api_op_UntagProject.go index a1e90fdb155..d1b0e4b2a66 100644 --- a/service/codestar/api_op_UntagProject.go +++ b/service/codestar/api_op_UntagProject.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagProjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_UpdateProject.go b/service/codestar/api_op_UpdateProject.go index add5c720903..e044501329e 100644 --- a/service/codestar/api_op_UpdateProject.go +++ b/service/codestar/api_op_UpdateProject.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_UpdateTeamMember.go b/service/codestar/api_op_UpdateTeamMember.go index 5bc6b31840e..125f8aa807c 100644 --- a/service/codestar/api_op_UpdateTeamMember.go +++ b/service/codestar/api_op_UpdateTeamMember.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateTeamMemberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTeamMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestar/api_op_UpdateUserProfile.go b/service/codestar/api_op_UpdateUserProfile.go index 0b3a538d34f..3e587edb3f9 100644 --- a/service/codestar/api_op_UpdateUserProfile.go +++ b/service/codestar/api_op_UpdateUserProfile.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_client.go b/service/codestarconnections/api_client.go index c3e7344b8b7..54f915126d8 100644 --- a/service/codestarconnections/api_client.go +++ b/service/codestarconnections/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/codestarconnections/api_op_CreateConnection.go b/service/codestarconnections/api_op_CreateConnection.go index 9dcbd0e9871..9500446e806 100644 --- a/service/codestarconnections/api_op_CreateConnection.go +++ b/service/codestarconnections/api_op_CreateConnection.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_CreateHost.go b/service/codestarconnections/api_op_CreateHost.go index 66f8381be08..021601cf1b8 100644 --- a/service/codestarconnections/api_op_CreateHost.go +++ b/service/codestarconnections/api_op_CreateHost.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateHostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_CreateRepositoryLink.go b/service/codestarconnections/api_op_CreateRepositoryLink.go index 702b915d339..8e5be4c5e75 100644 --- a/service/codestarconnections/api_op_CreateRepositoryLink.go +++ b/service/codestarconnections/api_op_CreateRepositoryLink.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateRepositoryLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_CreateSyncConfiguration.go b/service/codestarconnections/api_op_CreateSyncConfiguration.go index c3074b69e9d..258c72bfda2 100644 --- a/service/codestarconnections/api_op_CreateSyncConfiguration.go +++ b/service/codestarconnections/api_op_CreateSyncConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateSyncConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_DeleteConnection.go b/service/codestarconnections/api_op_DeleteConnection.go index 40189dd00d8..117dbd906ce 100644 --- a/service/codestarconnections/api_op_DeleteConnection.go +++ b/service/codestarconnections/api_op_DeleteConnection.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_DeleteHost.go b/service/codestarconnections/api_op_DeleteHost.go index 2932cf04cee..c758c87063f 100644 --- a/service/codestarconnections/api_op_DeleteHost.go +++ b/service/codestarconnections/api_op_DeleteHost.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteHostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_DeleteRepositoryLink.go b/service/codestarconnections/api_op_DeleteRepositoryLink.go index 437d44cf668..ec15a058da6 100644 --- a/service/codestarconnections/api_op_DeleteRepositoryLink.go +++ b/service/codestarconnections/api_op_DeleteRepositoryLink.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRepositoryLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_DeleteSyncConfiguration.go b/service/codestarconnections/api_op_DeleteSyncConfiguration.go index add50ae4717..df08f723241 100644 --- a/service/codestarconnections/api_op_DeleteSyncConfiguration.go +++ b/service/codestarconnections/api_op_DeleteSyncConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSyncConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetConnection.go b/service/codestarconnections/api_op_GetConnection.go index f0faff21c3f..a82a89f990b 100644 --- a/service/codestarconnections/api_op_GetConnection.go +++ b/service/codestarconnections/api_op_GetConnection.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetConnectionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetHost.go b/service/codestarconnections/api_op_GetHost.go index 207d663488f..1e180d1b4fe 100644 --- a/service/codestarconnections/api_op_GetHost.go +++ b/service/codestarconnections/api_op_GetHost.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetHostMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetRepositoryLink.go b/service/codestarconnections/api_op_GetRepositoryLink.go index 1ba414954cd..fd39fa025e8 100644 --- a/service/codestarconnections/api_op_GetRepositoryLink.go +++ b/service/codestarconnections/api_op_GetRepositoryLink.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetRepositoryLinkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetRepositorySyncStatus.go b/service/codestarconnections/api_op_GetRepositorySyncStatus.go index b15aa81dd34..ea197d72609 100644 --- a/service/codestarconnections/api_op_GetRepositorySyncStatus.go +++ b/service/codestarconnections/api_op_GetRepositorySyncStatus.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetRepositorySyncStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositorySyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetResourceSyncStatus.go b/service/codestarconnections/api_op_GetResourceSyncStatus.go index 3480c6537bb..5a5fb9d0003 100644 --- a/service/codestarconnections/api_op_GetResourceSyncStatus.go +++ b/service/codestarconnections/api_op_GetResourceSyncStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetResourceSyncStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceSyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetSyncBlockerSummary.go b/service/codestarconnections/api_op_GetSyncBlockerSummary.go index db6632939be..d9ea70735a9 100644 --- a/service/codestarconnections/api_op_GetSyncBlockerSummary.go +++ b/service/codestarconnections/api_op_GetSyncBlockerSummary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetSyncBlockerSummaryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSyncBlockerSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_GetSyncConfiguration.go b/service/codestarconnections/api_op_GetSyncConfiguration.go index e2ace0e8059..127a97ed7e9 100644 --- a/service/codestarconnections/api_op_GetSyncConfiguration.go +++ b/service/codestarconnections/api_op_GetSyncConfiguration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSyncConfigurationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_ListConnections.go b/service/codestarconnections/api_op_ListConnections.go index d44c07aa0bf..0894e027751 100644 --- a/service/codestarconnections/api_op_ListConnections.go +++ b/service/codestarconnections/api_op_ListConnections.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnections(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectionsAPIClient is a client that implements the ListConnections -// operation. -type ListConnectionsAPIClient interface { - ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) -} - -var _ ListConnectionsAPIClient = (*Client)(nil) - // ListConnectionsPaginatorOptions is the paginator options for ListConnections type ListConnectionsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -211,6 +206,9 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListConnectionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListConnectionsAPIClient is a client that implements the ListConnections +// operation. +type ListConnectionsAPIClient interface { + ListConnections(context.Context, *ListConnectionsInput, ...func(*Options)) (*ListConnectionsOutput, error) +} + +var _ ListConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarconnections/api_op_ListHosts.go b/service/codestarconnections/api_op_ListHosts.go index b5a0fb593e0..b1b174ed872 100644 --- a/service/codestarconnections/api_op_ListHosts.go +++ b/service/codestarconnections/api_op_ListHosts.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListHostsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHosts(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListHostsMiddlewares(stack *middleware.Stack, optio return nil } -// ListHostsAPIClient is a client that implements the ListHosts operation. -type ListHostsAPIClient interface { - ListHosts(context.Context, *ListHostsInput, ...func(*Options)) (*ListHostsOutput, error) -} - -var _ ListHostsAPIClient = (*Client)(nil) - // ListHostsPaginatorOptions is the paginator options for ListHosts type ListHostsPaginatorOptions struct { // The maximum number of results to return in a single call. To retrieve the @@ -203,6 +199,9 @@ func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHosts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListHostsAPIClient is a client that implements the ListHosts operation. +type ListHostsAPIClient interface { + ListHosts(context.Context, *ListHostsInput, ...func(*Options)) (*ListHostsOutput, error) +} + +var _ ListHostsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHosts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarconnections/api_op_ListRepositoryLinks.go b/service/codestarconnections/api_op_ListRepositoryLinks.go index 9b077511eac..0a3214de225 100644 --- a/service/codestarconnections/api_op_ListRepositoryLinks.go +++ b/service/codestarconnections/api_op_ListRepositoryLinks.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRepositoryLinksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositoryLinks(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListRepositoryLinksMiddlewares(stack *middleware.St return nil } -// ListRepositoryLinksAPIClient is a client that implements the -// ListRepositoryLinks operation. -type ListRepositoryLinksAPIClient interface { - ListRepositoryLinks(context.Context, *ListRepositoryLinksInput, ...func(*Options)) (*ListRepositoryLinksOutput, error) -} - -var _ ListRepositoryLinksAPIClient = (*Client)(nil) - // ListRepositoryLinksPaginatorOptions is the paginator options for // ListRepositoryLinks type ListRepositoryLinksPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListRepositoryLinksPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositoryLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListRepositoryLinksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRepositoryLinksAPIClient is a client that implements the +// ListRepositoryLinks operation. +type ListRepositoryLinksAPIClient interface { + ListRepositoryLinks(context.Context, *ListRepositoryLinksInput, ...func(*Options)) (*ListRepositoryLinksOutput, error) +} + +var _ ListRepositoryLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositoryLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarconnections/api_op_ListRepositorySyncDefinitions.go b/service/codestarconnections/api_op_ListRepositorySyncDefinitions.go index ca89ceaa064..54c1989b8c1 100644 --- a/service/codestarconnections/api_op_ListRepositorySyncDefinitions.go +++ b/service/codestarconnections/api_op_ListRepositorySyncDefinitions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListRepositorySyncDefinitionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRepositorySyncDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_ListSyncConfigurations.go b/service/codestarconnections/api_op_ListSyncConfigurations.go index b5850ba73f9..8a8960f51a9 100644 --- a/service/codestarconnections/api_op_ListSyncConfigurations.go +++ b/service/codestarconnections/api_op_ListSyncConfigurations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSyncConfigurationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSyncConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListSyncConfigurationsMiddlewares(stack *middleware return nil } -// ListSyncConfigurationsAPIClient is a client that implements the -// ListSyncConfigurations operation. -type ListSyncConfigurationsAPIClient interface { - ListSyncConfigurations(context.Context, *ListSyncConfigurationsInput, ...func(*Options)) (*ListSyncConfigurationsOutput, error) -} - -var _ ListSyncConfigurationsAPIClient = (*Client)(nil) - // ListSyncConfigurationsPaginatorOptions is the paginator options for // ListSyncConfigurations type ListSyncConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListSyncConfigurationsPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSyncConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSyncConfigurationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSyncConfigurationsAPIClient is a client that implements the +// ListSyncConfigurations operation. +type ListSyncConfigurationsAPIClient interface { + ListSyncConfigurations(context.Context, *ListSyncConfigurationsInput, ...func(*Options)) (*ListSyncConfigurationsOutput, error) +} + +var _ ListSyncConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSyncConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarconnections/api_op_ListTagsForResource.go b/service/codestarconnections/api_op_ListTagsForResource.go index 90bac8a45aa..0da2e19e1bd 100644 --- a/service/codestarconnections/api_op_ListTagsForResource.go +++ b/service/codestarconnections/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_TagResource.go b/service/codestarconnections/api_op_TagResource.go index 6164f8ca833..37e5a1cfc02 100644 --- a/service/codestarconnections/api_op_TagResource.go +++ b/service/codestarconnections/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_UntagResource.go b/service/codestarconnections/api_op_UntagResource.go index 21c16f62e3f..57a40a192f6 100644 --- a/service/codestarconnections/api_op_UntagResource.go +++ b/service/codestarconnections/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_UpdateHost.go b/service/codestarconnections/api_op_UpdateHost.go index fb78544df98..bb2f1acbbb0 100644 --- a/service/codestarconnections/api_op_UpdateHost.go +++ b/service/codestarconnections/api_op_UpdateHost.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateHostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHostValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_UpdateRepositoryLink.go b/service/codestarconnections/api_op_UpdateRepositoryLink.go index 3894c197c25..c8332eb6174 100644 --- a/service/codestarconnections/api_op_UpdateRepositoryLink.go +++ b/service/codestarconnections/api_op_UpdateRepositoryLink.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateRepositoryLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRepositoryLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_UpdateSyncBlocker.go b/service/codestarconnections/api_op_UpdateSyncBlocker.go index 24a80d87f55..de3314cdf3b 100644 --- a/service/codestarconnections/api_op_UpdateSyncBlocker.go +++ b/service/codestarconnections/api_op_UpdateSyncBlocker.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateSyncBlockerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSyncBlockerValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarconnections/api_op_UpdateSyncConfiguration.go b/service/codestarconnections/api_op_UpdateSyncConfiguration.go index f86a68a11d7..17ba68cbcb1 100644 --- a/service/codestarconnections/api_op_UpdateSyncConfiguration.go +++ b/service/codestarconnections/api_op_UpdateSyncConfiguration.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateSyncConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSyncConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_client.go b/service/codestarnotifications/api_client.go index 39739df24c6..65e19e14d11 100644 --- a/service/codestarnotifications/api_client.go +++ b/service/codestarnotifications/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/codestarnotifications/api_op_CreateNotificationRule.go b/service/codestarnotifications/api_op_CreateNotificationRule.go index 401b3debb69..3c3561b9d46 100644 --- a/service/codestarnotifications/api_op_CreateNotificationRule.go +++ b/service/codestarnotifications/api_op_CreateNotificationRule.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateNotificationRuleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNotificationRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/codestarnotifications/api_op_DeleteNotificationRule.go b/service/codestarnotifications/api_op_DeleteNotificationRule.go index bbdb4bf0d9b..4c610977275 100644 --- a/service/codestarnotifications/api_op_DeleteNotificationRule.go +++ b/service/codestarnotifications/api_op_DeleteNotificationRule.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteNotificationRuleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotificationRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_DeleteTarget.go b/service/codestarnotifications/api_op_DeleteTarget.go index 508901a4e7c..0804e0aa560 100644 --- a/service/codestarnotifications/api_op_DeleteTarget.go +++ b/service/codestarnotifications/api_op_DeleteTarget.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteTargetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_DescribeNotificationRule.go b/service/codestarnotifications/api_op_DescribeNotificationRule.go index 37aae03b0d2..0839c0d1715 100644 --- a/service/codestarnotifications/api_op_DescribeNotificationRule.go +++ b/service/codestarnotifications/api_op_DescribeNotificationRule.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeNotificationRuleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNotificationRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_ListEventTypes.go b/service/codestarnotifications/api_op_ListEventTypes.go index d6cdfffabb7..b3751c6dbb3 100644 --- a/service/codestarnotifications/api_op_ListEventTypes.go +++ b/service/codestarnotifications/api_op_ListEventTypes.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEventTypesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventTypesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListEventTypesMiddlewares(stack *middleware.Stack, return nil } -// ListEventTypesAPIClient is a client that implements the ListEventTypes -// operation. -type ListEventTypesAPIClient interface { - ListEventTypes(context.Context, *ListEventTypesInput, ...func(*Options)) (*ListEventTypesOutput, error) -} - -var _ ListEventTypesAPIClient = (*Client)(nil) - // ListEventTypesPaginatorOptions is the paginator options for ListEventTypes type ListEventTypesPaginatorOptions struct { // A non-negative integer used to limit the number of returned results. The @@ -214,6 +209,9 @@ func (p *ListEventTypesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEventTypesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListEventTypesAPIClient is a client that implements the ListEventTypes +// operation. +type ListEventTypesAPIClient interface { + ListEventTypes(context.Context, *ListEventTypesInput, ...func(*Options)) (*ListEventTypesOutput, error) +} + +var _ ListEventTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarnotifications/api_op_ListNotificationRules.go b/service/codestarnotifications/api_op_ListNotificationRules.go index e2c14d10579..34336938c92 100644 --- a/service/codestarnotifications/api_op_ListNotificationRules.go +++ b/service/codestarnotifications/api_op_ListNotificationRules.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListNotificationRulesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNotificationRulesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListNotificationRulesMiddlewares(stack *middleware. return nil } -// ListNotificationRulesAPIClient is a client that implements the -// ListNotificationRules operation. -type ListNotificationRulesAPIClient interface { - ListNotificationRules(context.Context, *ListNotificationRulesInput, ...func(*Options)) (*ListNotificationRulesOutput, error) -} - -var _ ListNotificationRulesAPIClient = (*Client)(nil) - // ListNotificationRulesPaginatorOptions is the paginator options for // ListNotificationRules type ListNotificationRulesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListNotificationRulesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotificationRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListNotificationRulesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListNotificationRulesAPIClient is a client that implements the +// ListNotificationRules operation. +type ListNotificationRulesAPIClient interface { + ListNotificationRules(context.Context, *ListNotificationRulesInput, ...func(*Options)) (*ListNotificationRulesOutput, error) +} + +var _ ListNotificationRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotificationRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarnotifications/api_op_ListTagsForResource.go b/service/codestarnotifications/api_op_ListTagsForResource.go index f1a00df0bcc..b30e3c3df04 100644 --- a/service/codestarnotifications/api_op_ListTagsForResource.go +++ b/service/codestarnotifications/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_ListTargets.go b/service/codestarnotifications/api_op_ListTargets.go index b0db83c8188..6adb1e0c3f3 100644 --- a/service/codestarnotifications/api_op_ListTargets.go +++ b/service/codestarnotifications/api_op_ListTargets.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTargetsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListTargetsMiddlewares(stack *middleware.Stack, opt return nil } -// ListTargetsAPIClient is a client that implements the ListTargets operation. -type ListTargetsAPIClient interface { - ListTargets(context.Context, *ListTargetsInput, ...func(*Options)) (*ListTargetsOutput, error) -} - -var _ ListTargetsAPIClient = (*Client)(nil) - // ListTargetsPaginatorOptions is the paginator options for ListTargets type ListTargetsPaginatorOptions struct { // A non-negative integer used to limit the number of returned results. The @@ -216,6 +212,9 @@ func (p *ListTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListTargetsAPIClient is a client that implements the ListTargets operation. +type ListTargetsAPIClient interface { + ListTargets(context.Context, *ListTargetsInput, ...func(*Options)) (*ListTargetsOutput, error) +} + +var _ ListTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/codestarnotifications/api_op_Subscribe.go b/service/codestarnotifications/api_op_Subscribe.go index 6defee9b210..23a8dad4709 100644 --- a/service/codestarnotifications/api_op_Subscribe.go +++ b/service/codestarnotifications/api_op_Subscribe.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSubscribeMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubscribeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_TagResource.go b/service/codestarnotifications/api_op_TagResource.go index 357eb47ddf6..42caa5c49b8 100644 --- a/service/codestarnotifications/api_op_TagResource.go +++ b/service/codestarnotifications/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_Unsubscribe.go b/service/codestarnotifications/api_op_Unsubscribe.go index 3c8c4054bd5..6f4e8a132e1 100644 --- a/service/codestarnotifications/api_op_Unsubscribe.go +++ b/service/codestarnotifications/api_op_Unsubscribe.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUnsubscribeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnsubscribeValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_UntagResource.go b/service/codestarnotifications/api_op_UntagResource.go index 3e5fd12527b..d654058a8df 100644 --- a/service/codestarnotifications/api_op_UntagResource.go +++ b/service/codestarnotifications/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/codestarnotifications/api_op_UpdateNotificationRule.go b/service/codestarnotifications/api_op_UpdateNotificationRule.go index f6c64dca8eb..93f2653d782 100644 --- a/service/codestarnotifications/api_op_UpdateNotificationRule.go +++ b/service/codestarnotifications/api_op_UpdateNotificationRule.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateNotificationRuleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotificationRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_client.go b/service/cognitoidentity/api_client.go index 8f2a459e683..0a788dce4a7 100644 --- a/service/cognitoidentity/api_client.go +++ b/service/cognitoidentity/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cognitoidentity/api_op_CreateIdentityPool.go b/service/cognitoidentity/api_op_CreateIdentityPool.go index 2d184fdd49a..ba7b8e8e0df 100644 --- a/service/cognitoidentity/api_op_CreateIdentityPool.go +++ b/service/cognitoidentity/api_op_CreateIdentityPool.go @@ -199,6 +199,9 @@ func (c *Client) addOperationCreateIdentityPoolMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIdentityPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_DeleteIdentities.go b/service/cognitoidentity/api_op_DeleteIdentities.go index 1753c4820b4..aa0590052a3 100644 --- a/service/cognitoidentity/api_op_DeleteIdentities.go +++ b/service/cognitoidentity/api_op_DeleteIdentities.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteIdentitiesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_DeleteIdentityPool.go b/service/cognitoidentity/api_op_DeleteIdentityPool.go index 2a8f50bd88d..e023e23f3c3 100644 --- a/service/cognitoidentity/api_op_DeleteIdentityPool.go +++ b/service/cognitoidentity/api_op_DeleteIdentityPool.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteIdentityPoolMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentityPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_DescribeIdentity.go b/service/cognitoidentity/api_op_DescribeIdentity.go index 6e9a65253cf..43064941828 100644 --- a/service/cognitoidentity/api_op_DescribeIdentity.go +++ b/service/cognitoidentity/api_op_DescribeIdentity.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeIdentityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_DescribeIdentityPool.go b/service/cognitoidentity/api_op_DescribeIdentityPool.go index fbe5d80dd00..57c43449e95 100644 --- a/service/cognitoidentity/api_op_DescribeIdentityPool.go +++ b/service/cognitoidentity/api_op_DescribeIdentityPool.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeIdentityPoolMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_GetCredentialsForIdentity.go b/service/cognitoidentity/api_op_GetCredentialsForIdentity.go index c6587182d5d..cccf4a281d1 100644 --- a/service/cognitoidentity/api_op_GetCredentialsForIdentity.go +++ b/service/cognitoidentity/api_op_GetCredentialsForIdentity.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetCredentialsForIdentityMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCredentialsForIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_GetId.go b/service/cognitoidentity/api_op_GetId.go index 375dee8aebb..4d636125536 100644 --- a/service/cognitoidentity/api_op_GetId.go +++ b/service/cognitoidentity/api_op_GetId.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetIdMiddlewares(stack *middleware.Stack, options O if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_GetIdentityPoolRoles.go b/service/cognitoidentity/api_op_GetIdentityPoolRoles.go index ab5ca87d447..6244b4ceaf1 100644 --- a/service/cognitoidentity/api_op_GetIdentityPoolRoles.go +++ b/service/cognitoidentity/api_op_GetIdentityPoolRoles.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityPoolRolesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_GetOpenIdToken.go b/service/cognitoidentity/api_op_GetOpenIdToken.go index 12030a87455..607133f87f0 100644 --- a/service/cognitoidentity/api_op_GetOpenIdToken.go +++ b/service/cognitoidentity/api_op_GetOpenIdToken.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetOpenIdTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpenIdTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go b/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go index 6631bdfedab..d689b71141e 100644 --- a/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go +++ b/service/cognitoidentity/api_op_GetOpenIdTokenForDeveloperIdentity.go @@ -157,6 +157,9 @@ func (c *Client) addOperationGetOpenIdTokenForDeveloperIdentityMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpenIdTokenForDeveloperIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go b/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go index 4bb5e598260..301bf00167b 100644 --- a/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go +++ b/service/cognitoidentity/api_op_GetPrincipalTagAttributeMap.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPrincipalTagAttributeMapValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_ListIdentities.go b/service/cognitoidentity/api_op_ListIdentities.go index 5f5593aa2d2..76a23fe043f 100644 --- a/service/cognitoidentity/api_op_ListIdentities.go +++ b/service/cognitoidentity/api_op_ListIdentities.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_ListIdentityPools.go b/service/cognitoidentity/api_op_ListIdentityPools.go index dac0ee725ba..d08aa8fa212 100644 --- a/service/cognitoidentity/api_op_ListIdentityPools.go +++ b/service/cognitoidentity/api_op_ListIdentityPools.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListIdentityPoolsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityPoolsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListIdentityPoolsMiddlewares(stack *middleware.Stac return nil } -// ListIdentityPoolsAPIClient is a client that implements the ListIdentityPools -// operation. -type ListIdentityPoolsAPIClient interface { - ListIdentityPools(context.Context, *ListIdentityPoolsInput, ...func(*Options)) (*ListIdentityPoolsOutput, error) -} - -var _ ListIdentityPoolsAPIClient = (*Client)(nil) - // ListIdentityPoolsPaginatorOptions is the paginator options for ListIdentityPools type ListIdentityPoolsPaginatorOptions struct { // The maximum number of identities to return. @@ -211,6 +206,9 @@ func (p *ListIdentityPoolsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentityPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListIdentityPoolsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListIdentityPoolsAPIClient is a client that implements the ListIdentityPools +// operation. +type ListIdentityPoolsAPIClient interface { + ListIdentityPools(context.Context, *ListIdentityPoolsInput, ...func(*Options)) (*ListIdentityPoolsOutput, error) +} + +var _ ListIdentityPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentityPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentity/api_op_ListTagsForResource.go b/service/cognitoidentity/api_op_ListTagsForResource.go index 7de58d63b58..4864429b630 100644 --- a/service/cognitoidentity/api_op_ListTagsForResource.go +++ b/service/cognitoidentity/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_LookupDeveloperIdentity.go b/service/cognitoidentity/api_op_LookupDeveloperIdentity.go index c89d1b42562..10810b29784 100644 --- a/service/cognitoidentity/api_op_LookupDeveloperIdentity.go +++ b/service/cognitoidentity/api_op_LookupDeveloperIdentity.go @@ -154,6 +154,9 @@ func (c *Client) addOperationLookupDeveloperIdentityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLookupDeveloperIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_MergeDeveloperIdentities.go b/service/cognitoidentity/api_op_MergeDeveloperIdentities.go index f7e1b948938..6a60dc79d48 100644 --- a/service/cognitoidentity/api_op_MergeDeveloperIdentities.go +++ b/service/cognitoidentity/api_op_MergeDeveloperIdentities.go @@ -142,6 +142,9 @@ func (c *Client) addOperationMergeDeveloperIdentitiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergeDeveloperIdentitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_SetIdentityPoolRoles.go b/service/cognitoidentity/api_op_SetIdentityPoolRoles.go index 6640c25e8e8..3f8edc26b5d 100644 --- a/service/cognitoidentity/api_op_SetIdentityPoolRoles.go +++ b/service/cognitoidentity/api_op_SetIdentityPoolRoles.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSetIdentityPoolRolesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityPoolRolesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go b/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go index 704d34e5fc5..7cc8230987b 100644 --- a/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go +++ b/service/cognitoidentity/api_op_SetPrincipalTagAttributeMap.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSetPrincipalTagAttributeMapMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetPrincipalTagAttributeMapValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_TagResource.go b/service/cognitoidentity/api_op_TagResource.go index 85a9a1b60cb..7290c38a1d1 100644 --- a/service/cognitoidentity/api_op_TagResource.go +++ b/service/cognitoidentity/api_op_TagResource.go @@ -123,6 +123,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go b/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go index 16b6d5187e7..603133bd28d 100644 --- a/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go +++ b/service/cognitoidentity/api_op_UnlinkDeveloperIdentity.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUnlinkDeveloperIdentityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnlinkDeveloperIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_UnlinkIdentity.go b/service/cognitoidentity/api_op_UnlinkIdentity.go index 24db5c76672..806fcfc3dec 100644 --- a/service/cognitoidentity/api_op_UnlinkIdentity.go +++ b/service/cognitoidentity/api_op_UnlinkIdentity.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUnlinkIdentityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnlinkIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_UntagResource.go b/service/cognitoidentity/api_op_UntagResource.go index 947ec036942..71ccf83d1bc 100644 --- a/service/cognitoidentity/api_op_UntagResource.go +++ b/service/cognitoidentity/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentity/api_op_UpdateIdentityPool.go b/service/cognitoidentity/api_op_UpdateIdentityPool.go index 89ea1ccefe0..b5091108b04 100644 --- a/service/cognitoidentity/api_op_UpdateIdentityPool.go +++ b/service/cognitoidentity/api_op_UpdateIdentityPool.go @@ -186,6 +186,9 @@ func (c *Client) addOperationUpdateIdentityPoolMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdentityPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_client.go b/service/cognitoidentityprovider/api_client.go index 14269308974..300b9f4feb7 100644 --- a/service/cognitoidentityprovider/api_client.go +++ b/service/cognitoidentityprovider/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cognitoidentityprovider/api_op_AddCustomAttributes.go b/service/cognitoidentityprovider/api_op_AddCustomAttributes.go index 63120881c60..cea169af05b 100644 --- a/service/cognitoidentityprovider/api_op_AddCustomAttributes.go +++ b/service/cognitoidentityprovider/api_op_AddCustomAttributes.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAddCustomAttributesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddCustomAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go b/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go index 4795a9be548..3c13bd2351b 100644 --- a/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go +++ b/service/cognitoidentityprovider/api_op_AdminAddUserToGroup.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAdminAddUserToGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminAddUserToGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go b/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go index 15d80861694..e47b16d4e22 100644 --- a/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go +++ b/service/cognitoidentityprovider/api_op_AdminConfirmSignUp.go @@ -167,6 +167,9 @@ func (c *Client) addOperationAdminConfirmSignUpMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminConfirmSignUpValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminCreateUser.go b/service/cognitoidentityprovider/api_op_AdminCreateUser.go index ce17fd4a6b4..f2364ebbf52 100644 --- a/service/cognitoidentityprovider/api_op_AdminCreateUser.go +++ b/service/cognitoidentityprovider/api_op_AdminCreateUser.go @@ -285,6 +285,9 @@ func (c *Client) addOperationAdminCreateUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminDeleteUser.go b/service/cognitoidentityprovider/api_op_AdminDeleteUser.go index 02b678b4fdd..9d430ba0d5f 100644 --- a/service/cognitoidentityprovider/api_op_AdminDeleteUser.go +++ b/service/cognitoidentityprovider/api_op_AdminDeleteUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAdminDeleteUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go b/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go index 098aa3553c2..e0bf7514563 100644 --- a/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_AdminDeleteUserAttributes.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAdminDeleteUserAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminDeleteUserAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminDisableProviderForUser.go b/service/cognitoidentityprovider/api_op_AdminDisableProviderForUser.go index ef3430e22fa..8aa146246f4 100644 --- a/service/cognitoidentityprovider/api_op_AdminDisableProviderForUser.go +++ b/service/cognitoidentityprovider/api_op_AdminDisableProviderForUser.go @@ -149,6 +149,9 @@ func (c *Client) addOperationAdminDisableProviderForUserMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminDisableProviderForUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminDisableUser.go b/service/cognitoidentityprovider/api_op_AdminDisableUser.go index 82514ec7b20..689d2cee601 100644 --- a/service/cognitoidentityprovider/api_op_AdminDisableUser.go +++ b/service/cognitoidentityprovider/api_op_AdminDisableUser.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAdminDisableUserMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminDisableUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminEnableUser.go b/service/cognitoidentityprovider/api_op_AdminEnableUser.go index 6a0f641e132..f89f8291f19 100644 --- a/service/cognitoidentityprovider/api_op_AdminEnableUser.go +++ b/service/cognitoidentityprovider/api_op_AdminEnableUser.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAdminEnableUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminEnableUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminForgetDevice.go b/service/cognitoidentityprovider/api_op_AdminForgetDevice.go index f195bff6572..bdff17a5b2c 100644 --- a/service/cognitoidentityprovider/api_op_AdminForgetDevice.go +++ b/service/cognitoidentityprovider/api_op_AdminForgetDevice.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAdminForgetDeviceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminForgetDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminGetDevice.go b/service/cognitoidentityprovider/api_op_AdminGetDevice.go index 036bffa4e2d..23a2972d543 100644 --- a/service/cognitoidentityprovider/api_op_AdminGetDevice.go +++ b/service/cognitoidentityprovider/api_op_AdminGetDevice.go @@ -138,6 +138,9 @@ func (c *Client) addOperationAdminGetDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminGetDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminGetUser.go b/service/cognitoidentityprovider/api_op_AdminGetUser.go index 3b86801729e..4c332935a6c 100644 --- a/service/cognitoidentityprovider/api_op_AdminGetUser.go +++ b/service/cognitoidentityprovider/api_op_AdminGetUser.go @@ -181,6 +181,9 @@ func (c *Client) addOperationAdminGetUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminGetUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go b/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go index 9654a768df7..735a11bb570 100644 --- a/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go +++ b/service/cognitoidentityprovider/api_op_AdminInitiateAuth.go @@ -346,6 +346,9 @@ func (c *Client) addOperationAdminInitiateAuthMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminInitiateAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go b/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go index 047da5559ed..e755a50194e 100644 --- a/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go +++ b/service/cognitoidentityprovider/api_op_AdminLinkProviderForUser.go @@ -183,6 +183,9 @@ func (c *Client) addOperationAdminLinkProviderForUserMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminLinkProviderForUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminListDevices.go b/service/cognitoidentityprovider/api_op_AdminListDevices.go index 7b086fb4909..bf538923822 100644 --- a/service/cognitoidentityprovider/api_op_AdminListDevices.go +++ b/service/cognitoidentityprovider/api_op_AdminListDevices.go @@ -148,6 +148,9 @@ func (c *Client) addOperationAdminListDevicesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminListDevicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go b/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go index 72d83f3912c..34441ea5e03 100644 --- a/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go +++ b/service/cognitoidentityprovider/api_op_AdminListGroupsForUser.go @@ -140,6 +140,9 @@ func (c *Client) addOperationAdminListGroupsForUserMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminListGroupsForUserValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationAdminListGroupsForUserMiddlewares(stack *middleware return nil } -// AdminListGroupsForUserAPIClient is a client that implements the -// AdminListGroupsForUser operation. -type AdminListGroupsForUserAPIClient interface { - AdminListGroupsForUser(context.Context, *AdminListGroupsForUserInput, ...func(*Options)) (*AdminListGroupsForUserOutput, error) -} - -var _ AdminListGroupsForUserAPIClient = (*Client)(nil) - // AdminListGroupsForUserPaginatorOptions is the paginator options for // AdminListGroupsForUser type AdminListGroupsForUserPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *AdminListGroupsForUserPaginator) NextPage(ctx context.Context, optFns . } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.AdminListGroupsForUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *AdminListGroupsForUserPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// AdminListGroupsForUserAPIClient is a client that implements the +// AdminListGroupsForUser operation. +type AdminListGroupsForUserAPIClient interface { + AdminListGroupsForUser(context.Context, *AdminListGroupsForUserInput, ...func(*Options)) (*AdminListGroupsForUserOutput, error) +} + +var _ AdminListGroupsForUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opAdminListGroupsForUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go b/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go index 6f6f0222455..c6e09921b8f 100644 --- a/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go +++ b/service/cognitoidentityprovider/api_op_AdminListUserAuthEvents.go @@ -141,6 +141,9 @@ func (c *Client) addOperationAdminListUserAuthEventsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminListUserAuthEventsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationAdminListUserAuthEventsMiddlewares(stack *middlewar return nil } -// AdminListUserAuthEventsAPIClient is a client that implements the -// AdminListUserAuthEvents operation. -type AdminListUserAuthEventsAPIClient interface { - AdminListUserAuthEvents(context.Context, *AdminListUserAuthEventsInput, ...func(*Options)) (*AdminListUserAuthEventsOutput, error) -} - -var _ AdminListUserAuthEventsAPIClient = (*Client)(nil) - // AdminListUserAuthEventsPaginatorOptions is the paginator options for // AdminListUserAuthEvents type AdminListUserAuthEventsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *AdminListUserAuthEventsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.AdminListUserAuthEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *AdminListUserAuthEventsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// AdminListUserAuthEventsAPIClient is a client that implements the +// AdminListUserAuthEvents operation. +type AdminListUserAuthEventsAPIClient interface { + AdminListUserAuthEvents(context.Context, *AdminListUserAuthEventsInput, ...func(*Options)) (*AdminListUserAuthEventsOutput, error) +} + +var _ AdminListUserAuthEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opAdminListUserAuthEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go b/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go index 0cb1384ed83..675873ade8b 100644 --- a/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go +++ b/service/cognitoidentityprovider/api_op_AdminRemoveUserFromGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAdminRemoveUserFromGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminRemoveUserFromGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go b/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go index 5d704025d6d..79a80809ad9 100644 --- a/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go +++ b/service/cognitoidentityprovider/api_op_AdminResetUserPassword.go @@ -189,6 +189,9 @@ func (c *Client) addOperationAdminResetUserPasswordMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminResetUserPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go b/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go index 015af5cbc92..1acd70f72dc 100644 --- a/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go +++ b/service/cognitoidentityprovider/api_op_AdminRespondToAuthChallenge.go @@ -301,6 +301,9 @@ func (c *Client) addOperationAdminRespondToAuthChallengeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminRespondToAuthChallengeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go b/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go index 77eb0a5b6f3..0992f1d4831 100644 --- a/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go +++ b/service/cognitoidentityprovider/api_op_AdminSetUserMFAPreference.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAdminSetUserMFAPreferenceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminSetUserMFAPreferenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go b/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go index 337f8c513c3..bf1e5fd668b 100644 --- a/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go +++ b/service/cognitoidentityprovider/api_op_AdminSetUserPassword.go @@ -154,6 +154,9 @@ func (c *Client) addOperationAdminSetUserPasswordMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminSetUserPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go b/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go index c3e15316fdd..0e97be4c7be 100644 --- a/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go +++ b/service/cognitoidentityprovider/api_op_AdminSetUserSettings.go @@ -139,6 +139,9 @@ func (c *Client) addOperationAdminSetUserSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminSetUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go b/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go index 828c513d105..abba8e547f0 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateAuthEventFeedback.go @@ -141,6 +141,9 @@ func (c *Client) addOperationAdminUpdateAuthEventFeedbackMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminUpdateAuthEventFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go b/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go index 5e1b7d025a2..949362e5d3a 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateDeviceStatus.go @@ -135,6 +135,9 @@ func (c *Client) addOperationAdminUpdateDeviceStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminUpdateDeviceStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go index 2abe374b920..755687f583d 100644 --- a/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_AdminUpdateUserAttributes.go @@ -206,6 +206,9 @@ func (c *Client) addOperationAdminUpdateUserAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminUpdateUserAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go b/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go index 4136c4c1499..09ac48d28fe 100644 --- a/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go +++ b/service/cognitoidentityprovider/api_op_AdminUserGlobalSignOut.go @@ -148,6 +148,9 @@ func (c *Client) addOperationAdminUserGlobalSignOutMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdminUserGlobalSignOutValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go b/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go index 5c573753904..45867cc2d01 100644 --- a/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go +++ b/service/cognitoidentityprovider/api_op_AssociateSoftwareToken.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAssociateSoftwareTokenMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateSoftwareToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ChangePassword.go b/service/cognitoidentityprovider/api_op_ChangePassword.go index bf96976b967..231fcd8d073 100644 --- a/service/cognitoidentityprovider/api_op_ChangePassword.go +++ b/service/cognitoidentityprovider/api_op_ChangePassword.go @@ -122,6 +122,9 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangePasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ConfirmDevice.go b/service/cognitoidentityprovider/api_op_ConfirmDevice.go index 8f1bf169685..79ef76445d6 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmDevice.go +++ b/service/cognitoidentityprovider/api_op_ConfirmDevice.go @@ -130,6 +130,9 @@ func (c *Client) addOperationConfirmDeviceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go b/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go index 85faf6d8a08..9ae6a2a0c95 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go +++ b/service/cognitoidentityprovider/api_op_ConfirmForgotPassword.go @@ -180,6 +180,9 @@ func (c *Client) addOperationConfirmForgotPasswordMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmForgotPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ConfirmSignUp.go b/service/cognitoidentityprovider/api_op_ConfirmSignUp.go index b4ead52677b..bfd51b81719 100644 --- a/service/cognitoidentityprovider/api_op_ConfirmSignUp.go +++ b/service/cognitoidentityprovider/api_op_ConfirmSignUp.go @@ -189,6 +189,9 @@ func (c *Client) addOperationConfirmSignUpMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmSignUpValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateGroup.go b/service/cognitoidentityprovider/api_op_CreateGroup.go index 3b2fdf977de..9981a8fd144 100644 --- a/service/cognitoidentityprovider/api_op_CreateGroup.go +++ b/service/cognitoidentityprovider/api_op_CreateGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateIdentityProvider.go b/service/cognitoidentityprovider/api_op_CreateIdentityProvider.go index 60c6d7f0726..061a25bb788 100644 --- a/service/cognitoidentityprovider/api_op_CreateIdentityProvider.go +++ b/service/cognitoidentityprovider/api_op_CreateIdentityProvider.go @@ -236,6 +236,9 @@ func (c *Client) addOperationCreateIdentityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateResourceServer.go b/service/cognitoidentityprovider/api_op_CreateResourceServer.go index 4fffb0115a9..0a90091375a 100644 --- a/service/cognitoidentityprovider/api_op_CreateResourceServer.go +++ b/service/cognitoidentityprovider/api_op_CreateResourceServer.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateResourceServerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateUserImportJob.go b/service/cognitoidentityprovider/api_op_CreateUserImportJob.go index ede949bba36..8be755c4ee8 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserImportJob.go +++ b/service/cognitoidentityprovider/api_op_CreateUserImportJob.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateUserImportJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateUserPool.go b/service/cognitoidentityprovider/api_op_CreateUserPool.go index df000fd274c..90b4c94dbc0 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPool.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPool.go @@ -279,6 +279,9 @@ func (c *Client) addOperationCreateUserPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go b/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go index d979955e67a..c76a5d430bb 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPoolClient.go @@ -409,6 +409,9 @@ func (c *Client) addOperationCreateUserPoolClientMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserPoolClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go b/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go index e14cda97dc8..0270a117952 100644 --- a/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go +++ b/service/cognitoidentityprovider/api_op_CreateUserPoolDomain.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateUserPoolDomainMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserPoolDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteGroup.go b/service/cognitoidentityprovider/api_op_DeleteGroup.go index 36b4dbd40fa..e084aa22185 100644 --- a/service/cognitoidentityprovider/api_op_DeleteGroup.go +++ b/service/cognitoidentityprovider/api_op_DeleteGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteIdentityProvider.go b/service/cognitoidentityprovider/api_op_DeleteIdentityProvider.go index 1d26182a09a..d6ecabd4d81 100644 --- a/service/cognitoidentityprovider/api_op_DeleteIdentityProvider.go +++ b/service/cognitoidentityprovider/api_op_DeleteIdentityProvider.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteIdentityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteResourceServer.go b/service/cognitoidentityprovider/api_op_DeleteResourceServer.go index f449a28d1fc..66a06c98a93 100644 --- a/service/cognitoidentityprovider/api_op_DeleteResourceServer.go +++ b/service/cognitoidentityprovider/api_op_DeleteResourceServer.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteResourceServerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteUser.go b/service/cognitoidentityprovider/api_op_DeleteUser.go index 4eafa6107b6..0557f2458fb 100644 --- a/service/cognitoidentityprovider/api_op_DeleteUser.go +++ b/service/cognitoidentityprovider/api_op_DeleteUser.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteUserAttributes.go b/service/cognitoidentityprovider/api_op_DeleteUserAttributes.go index e68c67a90dd..feb9038d400 100644 --- a/service/cognitoidentityprovider/api_op_DeleteUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_DeleteUserAttributes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteUserAttributesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteUserPool.go b/service/cognitoidentityprovider/api_op_DeleteUserPool.go index 4c3c77323d8..952581d5db2 100644 --- a/service/cognitoidentityprovider/api_op_DeleteUserPool.go +++ b/service/cognitoidentityprovider/api_op_DeleteUserPool.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteUserPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteUserPoolClient.go b/service/cognitoidentityprovider/api_op_DeleteUserPoolClient.go index b721d9dca31..7b9ada960a4 100644 --- a/service/cognitoidentityprovider/api_op_DeleteUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_DeleteUserPoolClient.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteUserPoolClientMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPoolClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DeleteUserPoolDomain.go b/service/cognitoidentityprovider/api_op_DeleteUserPoolDomain.go index dcdd7205c6d..ad827230507 100644 --- a/service/cognitoidentityprovider/api_op_DeleteUserPoolDomain.go +++ b/service/cognitoidentityprovider/api_op_DeleteUserPoolDomain.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteUserPoolDomainMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPoolDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeIdentityProvider.go b/service/cognitoidentityprovider/api_op_DescribeIdentityProvider.go index f50c751a164..93156e7ae2c 100644 --- a/service/cognitoidentityprovider/api_op_DescribeIdentityProvider.go +++ b/service/cognitoidentityprovider/api_op_DescribeIdentityProvider.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeIdentityProviderMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeResourceServer.go b/service/cognitoidentityprovider/api_op_DescribeResourceServer.go index 59d41f2352e..a2f3b3e68ab 100644 --- a/service/cognitoidentityprovider/api_op_DescribeResourceServer.go +++ b/service/cognitoidentityprovider/api_op_DescribeResourceServer.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeResourceServerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeRiskConfiguration.go b/service/cognitoidentityprovider/api_op_DescribeRiskConfiguration.go index a162ba995b7..c502af7f0a6 100644 --- a/service/cognitoidentityprovider/api_op_DescribeRiskConfiguration.go +++ b/service/cognitoidentityprovider/api_op_DescribeRiskConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeRiskConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRiskConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeUserImportJob.go b/service/cognitoidentityprovider/api_op_DescribeUserImportJob.go index 357ab1b07be..232c200d1e1 100644 --- a/service/cognitoidentityprovider/api_op_DescribeUserImportJob.go +++ b/service/cognitoidentityprovider/api_op_DescribeUserImportJob.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeUserImportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeUserPool.go b/service/cognitoidentityprovider/api_op_DescribeUserPool.go index abbf9ce7604..de0d058fbe7 100644 --- a/service/cognitoidentityprovider/api_op_DescribeUserPool.go +++ b/service/cognitoidentityprovider/api_op_DescribeUserPool.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeUserPoolMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeUserPoolClient.go b/service/cognitoidentityprovider/api_op_DescribeUserPoolClient.go index c3c147b4052..8a6744f8890 100644 --- a/service/cognitoidentityprovider/api_op_DescribeUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_DescribeUserPoolClient.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeUserPoolClientMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserPoolClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_DescribeUserPoolDomain.go b/service/cognitoidentityprovider/api_op_DescribeUserPoolDomain.go index e4bca1ee98e..c0e7798a395 100644 --- a/service/cognitoidentityprovider/api_op_DescribeUserPoolDomain.go +++ b/service/cognitoidentityprovider/api_op_DescribeUserPoolDomain.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeUserPoolDomainMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserPoolDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ForgetDevice.go b/service/cognitoidentityprovider/api_op_ForgetDevice.go index 86fe07234d8..c741b23d174 100644 --- a/service/cognitoidentityprovider/api_op_ForgetDevice.go +++ b/service/cognitoidentityprovider/api_op_ForgetDevice.go @@ -116,6 +116,9 @@ func (c *Client) addOperationForgetDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpForgetDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ForgotPassword.go b/service/cognitoidentityprovider/api_op_ForgotPassword.go index 9e0fbfcad68..a32856075e5 100644 --- a/service/cognitoidentityprovider/api_op_ForgotPassword.go +++ b/service/cognitoidentityprovider/api_op_ForgotPassword.go @@ -203,6 +203,9 @@ func (c *Client) addOperationForgotPasswordMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpForgotPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetCSVHeader.go b/service/cognitoidentityprovider/api_op_GetCSVHeader.go index 48c96bea075..709759bc3f4 100644 --- a/service/cognitoidentityprovider/api_op_GetCSVHeader.go +++ b/service/cognitoidentityprovider/api_op_GetCSVHeader.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetCSVHeaderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCSVHeaderValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetDevice.go b/service/cognitoidentityprovider/api_op_GetDevice.go index 4c1fd90799b..36f682dc624 100644 --- a/service/cognitoidentityprovider/api_op_GetDevice.go +++ b/service/cognitoidentityprovider/api_op_GetDevice.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetDeviceMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetGroup.go b/service/cognitoidentityprovider/api_op_GetGroup.go index 5bd7abf38d4..64138f1e8f2 100644 --- a/service/cognitoidentityprovider/api_op_GetGroup.go +++ b/service/cognitoidentityprovider/api_op_GetGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetIdentityProviderByIdentifier.go b/service/cognitoidentityprovider/api_op_GetIdentityProviderByIdentifier.go index 18376f23d34..013dca94bff 100644 --- a/service/cognitoidentityprovider/api_op_GetIdentityProviderByIdentifier.go +++ b/service/cognitoidentityprovider/api_op_GetIdentityProviderByIdentifier.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetIdentityProviderByIdentifierMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityProviderByIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetLogDeliveryConfiguration.go b/service/cognitoidentityprovider/api_op_GetLogDeliveryConfiguration.go index 1a0799c4a72..d24c7bb3f74 100644 --- a/service/cognitoidentityprovider/api_op_GetLogDeliveryConfiguration.go +++ b/service/cognitoidentityprovider/api_op_GetLogDeliveryConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetLogDeliveryConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLogDeliveryConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetSigningCertificate.go b/service/cognitoidentityprovider/api_op_GetSigningCertificate.go index 011399758fd..f6b1bc05f32 100644 --- a/service/cognitoidentityprovider/api_op_GetSigningCertificate.go +++ b/service/cognitoidentityprovider/api_op_GetSigningCertificate.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetSigningCertificateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetUICustomization.go b/service/cognitoidentityprovider/api_op_GetUICustomization.go index 3fe84a0c951..842dc0e3bbe 100644 --- a/service/cognitoidentityprovider/api_op_GetUICustomization.go +++ b/service/cognitoidentityprovider/api_op_GetUICustomization.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetUICustomizationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUICustomizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetUser.go b/service/cognitoidentityprovider/api_op_GetUser.go index df293fafb47..555a6b792cd 100644 --- a/service/cognitoidentityprovider/api_op_GetUser.go +++ b/service/cognitoidentityprovider/api_op_GetUser.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go b/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go index 4daa3ed7a81..702aa7dedb2 100644 --- a/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go +++ b/service/cognitoidentityprovider/api_op_GetUserAttributeVerificationCode.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetUserAttributeVerificationCodeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserAttributeVerificationCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go b/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go index b1c9f6c20f3..763d83ecbbe 100644 --- a/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go +++ b/service/cognitoidentityprovider/api_op_GetUserPoolMfaConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetUserPoolMfaConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserPoolMfaConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_GlobalSignOut.go b/service/cognitoidentityprovider/api_op_GlobalSignOut.go index 9343e5e9d06..97f61af50be 100644 --- a/service/cognitoidentityprovider/api_op_GlobalSignOut.go +++ b/service/cognitoidentityprovider/api_op_GlobalSignOut.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGlobalSignOutMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGlobalSignOutValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_InitiateAuth.go b/service/cognitoidentityprovider/api_op_InitiateAuth.go index 98f606cdbd0..febe3b6dc10 100644 --- a/service/cognitoidentityprovider/api_op_InitiateAuth.go +++ b/service/cognitoidentityprovider/api_op_InitiateAuth.go @@ -321,6 +321,9 @@ func (c *Client) addOperationInitiateAuthMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateAuthValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ListDevices.go b/service/cognitoidentityprovider/api_op_ListDevices.go index 378e4a5baca..7e75402d638 100644 --- a/service/cognitoidentityprovider/api_op_ListDevices.go +++ b/service/cognitoidentityprovider/api_op_ListDevices.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ListGroups.go b/service/cognitoidentityprovider/api_op_ListGroups.go index 102934b30bf..94a7366c4de 100644 --- a/service/cognitoidentityprovider/api_op_ListGroups.go +++ b/service/cognitoidentityprovider/api_op_ListGroups.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The limit of the request to list groups. @@ -225,6 +221,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ListIdentityProviders.go b/service/cognitoidentityprovider/api_op_ListIdentityProviders.go index 870a6db35ae..d01e9219cb0 100644 --- a/service/cognitoidentityprovider/api_op_ListIdentityProviders.go +++ b/service/cognitoidentityprovider/api_op_ListIdentityProviders.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityProvidersValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. return nil } -// ListIdentityProvidersAPIClient is a client that implements the -// ListIdentityProviders operation. -type ListIdentityProvidersAPIClient interface { - ListIdentityProviders(context.Context, *ListIdentityProvidersInput, ...func(*Options)) (*ListIdentityProvidersOutput, error) -} - -var _ ListIdentityProvidersAPIClient = (*Client)(nil) - // ListIdentityProvidersPaginatorOptions is the paginator options for // ListIdentityProviders type ListIdentityProvidersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentityProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListIdentityProvidersAPIClient is a client that implements the +// ListIdentityProviders operation. +type ListIdentityProvidersAPIClient interface { + ListIdentityProviders(context.Context, *ListIdentityProvidersInput, ...func(*Options)) (*ListIdentityProvidersOutput, error) +} + +var _ ListIdentityProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentityProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ListResourceServers.go b/service/cognitoidentityprovider/api_op_ListResourceServers.go index 1d9614a84fe..39ed6ac9260 100644 --- a/service/cognitoidentityprovider/api_op_ListResourceServers.go +++ b/service/cognitoidentityprovider/api_op_ListResourceServers.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListResourceServersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceServersValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListResourceServersMiddlewares(stack *middleware.St return nil } -// ListResourceServersAPIClient is a client that implements the -// ListResourceServers operation. -type ListResourceServersAPIClient interface { - ListResourceServers(context.Context, *ListResourceServersInput, ...func(*Options)) (*ListResourceServersOutput, error) -} - -var _ ListResourceServersAPIClient = (*Client)(nil) - // ListResourceServersPaginatorOptions is the paginator options for // ListResourceServers type ListResourceServersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListResourceServersPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListResourceServersPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListResourceServersAPIClient is a client that implements the +// ListResourceServers operation. +type ListResourceServersAPIClient interface { + ListResourceServers(context.Context, *ListResourceServersInput, ...func(*Options)) (*ListResourceServersOutput, error) +} + +var _ ListResourceServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ListTagsForResource.go b/service/cognitoidentityprovider/api_op_ListTagsForResource.go index a4938853e4f..3ee8462c94c 100644 --- a/service/cognitoidentityprovider/api_op_ListTagsForResource.go +++ b/service/cognitoidentityprovider/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ListUserImportJobs.go b/service/cognitoidentityprovider/api_op_ListUserImportJobs.go index 817629ae1b3..c134a7f54e1 100644 --- a/service/cognitoidentityprovider/api_op_ListUserImportJobs.go +++ b/service/cognitoidentityprovider/api_op_ListUserImportJobs.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListUserImportJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserImportJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_ListUserPoolClients.go b/service/cognitoidentityprovider/api_op_ListUserPoolClients.go index 166b13ad55a..110f4d81312 100644 --- a/service/cognitoidentityprovider/api_op_ListUserPoolClients.go +++ b/service/cognitoidentityprovider/api_op_ListUserPoolClients.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListUserPoolClientsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserPoolClientsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListUserPoolClientsMiddlewares(stack *middleware.St return nil } -// ListUserPoolClientsAPIClient is a client that implements the -// ListUserPoolClients operation. -type ListUserPoolClientsAPIClient interface { - ListUserPoolClients(context.Context, *ListUserPoolClientsInput, ...func(*Options)) (*ListUserPoolClientsOutput, error) -} - -var _ ListUserPoolClientsAPIClient = (*Client)(nil) - // ListUserPoolClientsPaginatorOptions is the paginator options for // ListUserPoolClients type ListUserPoolClientsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListUserPoolClientsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserPoolClients(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListUserPoolClientsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListUserPoolClientsAPIClient is a client that implements the +// ListUserPoolClients operation. +type ListUserPoolClientsAPIClient interface { + ListUserPoolClients(context.Context, *ListUserPoolClientsInput, ...func(*Options)) (*ListUserPoolClientsOutput, error) +} + +var _ ListUserPoolClientsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserPoolClients(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ListUserPools.go b/service/cognitoidentityprovider/api_op_ListUserPools.go index 241488cbf0a..b0338704aeb 100644 --- a/service/cognitoidentityprovider/api_op_ListUserPools.go +++ b/service/cognitoidentityprovider/api_op_ListUserPools.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListUserPoolsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserPoolsValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListUserPoolsMiddlewares(stack *middleware.Stack, o return nil } -// ListUserPoolsAPIClient is a client that implements the ListUserPools operation. -type ListUserPoolsAPIClient interface { - ListUserPools(context.Context, *ListUserPoolsInput, ...func(*Options)) (*ListUserPoolsOutput, error) -} - -var _ ListUserPoolsAPIClient = (*Client)(nil) - // ListUserPoolsPaginatorOptions is the paginator options for ListUserPools type ListUserPoolsPaginatorOptions struct { // The maximum number of results you want the request to return when listing the @@ -226,6 +222,9 @@ func (p *ListUserPoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListUserPoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListUserPoolsAPIClient is a client that implements the ListUserPools operation. +type ListUserPoolsAPIClient interface { + ListUserPools(context.Context, *ListUserPoolsInput, ...func(*Options)) (*ListUserPoolsOutput, error) +} + +var _ ListUserPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ListUsers.go b/service/cognitoidentityprovider/api_op_ListUsers.go index c55ea32df7c..711116d85a4 100644 --- a/service/cognitoidentityprovider/api_op_ListUsers.go +++ b/service/cognitoidentityprovider/api_op_ListUsers.go @@ -217,6 +217,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -241,13 +244,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // Maximum number of users to be returned. @@ -311,6 +307,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -330,6 +329,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ListUsersInGroup.go b/service/cognitoidentityprovider/api_op_ListUsersInGroup.go index 63b2c13591f..55fd004286e 100644 --- a/service/cognitoidentityprovider/api_op_ListUsersInGroup.go +++ b/service/cognitoidentityprovider/api_op_ListUsersInGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListUsersInGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersInGroupValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListUsersInGroupMiddlewares(stack *middleware.Stack return nil } -// ListUsersInGroupAPIClient is a client that implements the ListUsersInGroup -// operation. -type ListUsersInGroupAPIClient interface { - ListUsersInGroup(context.Context, *ListUsersInGroupInput, ...func(*Options)) (*ListUsersInGroupOutput, error) -} - -var _ ListUsersInGroupAPIClient = (*Client)(nil) - // ListUsersInGroupPaginatorOptions is the paginator options for ListUsersInGroup type ListUsersInGroupPaginatorOptions struct { // The maximum number of users that you want to retrieve before pagination. @@ -231,6 +226,9 @@ func (p *ListUsersInGroupPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsersInGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListUsersInGroupPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListUsersInGroupAPIClient is a client that implements the ListUsersInGroup +// operation. +type ListUsersInGroupAPIClient interface { + ListUsersInGroup(context.Context, *ListUsersInGroupInput, ...func(*Options)) (*ListUsersInGroupOutput, error) +} + +var _ ListUsersInGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsersInGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go b/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go index 523bf3c33fe..664102558cd 100644 --- a/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go +++ b/service/cognitoidentityprovider/api_op_ResendConfirmationCode.go @@ -187,6 +187,9 @@ func (c *Client) addOperationResendConfirmationCodeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResendConfirmationCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go b/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go index 9b96aca6e7f..198e70f1d81 100644 --- a/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go +++ b/service/cognitoidentityprovider/api_op_RespondToAuthChallenge.go @@ -274,6 +274,9 @@ func (c *Client) addOperationRespondToAuthChallengeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRespondToAuthChallengeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_RevokeToken.go b/service/cognitoidentityprovider/api_op_RevokeToken.go index 8b50de26a3f..f30b1c4aac8 100644 --- a/service/cognitoidentityprovider/api_op_RevokeToken.go +++ b/service/cognitoidentityprovider/api_op_RevokeToken.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRevokeTokenMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SetLogDeliveryConfiguration.go b/service/cognitoidentityprovider/api_op_SetLogDeliveryConfiguration.go index f6aad591510..7fd01a908a1 100644 --- a/service/cognitoidentityprovider/api_op_SetLogDeliveryConfiguration.go +++ b/service/cognitoidentityprovider/api_op_SetLogDeliveryConfiguration.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSetLogDeliveryConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLogDeliveryConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SetRiskConfiguration.go b/service/cognitoidentityprovider/api_op_SetRiskConfiguration.go index fceb766f349..b20720c36ad 100644 --- a/service/cognitoidentityprovider/api_op_SetRiskConfiguration.go +++ b/service/cognitoidentityprovider/api_op_SetRiskConfiguration.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSetRiskConfigurationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetRiskConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SetUICustomization.go b/service/cognitoidentityprovider/api_op_SetUICustomization.go index 6a25ddfd326..fe63a3006d7 100644 --- a/service/cognitoidentityprovider/api_op_SetUICustomization.go +++ b/service/cognitoidentityprovider/api_op_SetUICustomization.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSetUICustomizationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetUICustomizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go b/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go index 614363874fb..e4ef3326be2 100644 --- a/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go +++ b/service/cognitoidentityprovider/api_op_SetUserMFAPreference.go @@ -126,6 +126,9 @@ func (c *Client) addOperationSetUserMFAPreferenceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetUserMFAPreferenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go b/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go index 3f3cc52f3ee..53b3ac28309 100644 --- a/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go +++ b/service/cognitoidentityprovider/api_op_SetUserPoolMfaConfig.go @@ -158,6 +158,9 @@ func (c *Client) addOperationSetUserPoolMfaConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetUserPoolMfaConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SetUserSettings.go b/service/cognitoidentityprovider/api_op_SetUserSettings.go index ef17266008b..70897e0a567 100644 --- a/service/cognitoidentityprovider/api_op_SetUserSettings.go +++ b/service/cognitoidentityprovider/api_op_SetUserSettings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationSetUserSettingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_SignUp.go b/service/cognitoidentityprovider/api_op_SignUp.go index f4ebbf0eaef..c4828f14949 100644 --- a/service/cognitoidentityprovider/api_op_SignUp.go +++ b/service/cognitoidentityprovider/api_op_SignUp.go @@ -221,6 +221,9 @@ func (c *Client) addOperationSignUpMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignUpValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_StartUserImportJob.go b/service/cognitoidentityprovider/api_op_StartUserImportJob.go index 939178dce5a..673eaf17078 100644 --- a/service/cognitoidentityprovider/api_op_StartUserImportJob.go +++ b/service/cognitoidentityprovider/api_op_StartUserImportJob.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartUserImportJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartUserImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_StopUserImportJob.go b/service/cognitoidentityprovider/api_op_StopUserImportJob.go index 951a51067f3..44f4efa9a5b 100644 --- a/service/cognitoidentityprovider/api_op_StopUserImportJob.go +++ b/service/cognitoidentityprovider/api_op_StopUserImportJob.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStopUserImportJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopUserImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_TagResource.go b/service/cognitoidentityprovider/api_op_TagResource.go index 1a9b23fc9da..90461579858 100644 --- a/service/cognitoidentityprovider/api_op_TagResource.go +++ b/service/cognitoidentityprovider/api_op_TagResource.go @@ -123,6 +123,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UntagResource.go b/service/cognitoidentityprovider/api_op_UntagResource.go index dd7bfee5e30..e2a377b6cc8 100644 --- a/service/cognitoidentityprovider/api_op_UntagResource.go +++ b/service/cognitoidentityprovider/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go b/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go index e774ad89ea7..933525b76f0 100644 --- a/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go +++ b/service/cognitoidentityprovider/api_op_UpdateAuthEventFeedback.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateAuthEventFeedbackMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAuthEventFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go b/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go index d0b5cde4bc9..1fd11ece0cd 100644 --- a/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go +++ b/service/cognitoidentityprovider/api_op_UpdateDeviceStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateDeviceStatusMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateGroup.go b/service/cognitoidentityprovider/api_op_UpdateGroup.go index ea99a18049a..e310897d0cb 100644 --- a/service/cognitoidentityprovider/api_op_UpdateGroup.go +++ b/service/cognitoidentityprovider/api_op_UpdateGroup.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateIdentityProvider.go b/service/cognitoidentityprovider/api_op_UpdateIdentityProvider.go index 98b76989f0d..35b04e45f75 100644 --- a/service/cognitoidentityprovider/api_op_UpdateIdentityProvider.go +++ b/service/cognitoidentityprovider/api_op_UpdateIdentityProvider.go @@ -228,6 +228,9 @@ func (c *Client) addOperationUpdateIdentityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateResourceServer.go b/service/cognitoidentityprovider/api_op_UpdateResourceServer.go index c91d177e152..01ac261e539 100644 --- a/service/cognitoidentityprovider/api_op_UpdateResourceServer.go +++ b/service/cognitoidentityprovider/api_op_UpdateResourceServer.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateResourceServerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go b/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go index 4b6e774b047..f0e1b7ba089 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserAttributes.go @@ -186,6 +186,9 @@ func (c *Client) addOperationUpdateUserAttributesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPool.go b/service/cognitoidentityprovider/api_op_UpdateUserPool.go index f321d30030f..7149447b435 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPool.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPool.go @@ -251,6 +251,9 @@ func (c *Client) addOperationUpdateUserPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go b/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go index 83aee82c0f6..d05a3ff917c 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPoolClient.go @@ -405,6 +405,9 @@ func (c *Client) addOperationUpdateUserPoolClientMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserPoolClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go b/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go index 4d301bf2721..49fda27ba89 100644 --- a/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go +++ b/service/cognitoidentityprovider/api_op_UpdateUserPoolDomain.go @@ -169,6 +169,9 @@ func (c *Client) addOperationUpdateUserPoolDomainMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserPoolDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go b/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go index 5520ddaa367..ebb72079822 100644 --- a/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go +++ b/service/cognitoidentityprovider/api_op_VerifySoftwareToken.go @@ -130,6 +130,9 @@ func (c *Client) addOperationVerifySoftwareTokenMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifySoftwareTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitoidentityprovider/api_op_VerifyUserAttribute.go b/service/cognitoidentityprovider/api_op_VerifyUserAttribute.go index a40f9d79925..b49c725114d 100644 --- a/service/cognitoidentityprovider/api_op_VerifyUserAttribute.go +++ b/service/cognitoidentityprovider/api_op_VerifyUserAttribute.go @@ -128,6 +128,9 @@ func (c *Client) addOperationVerifyUserAttributeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyUserAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_client.go b/service/cognitosync/api_client.go index da8d8bee8bc..228e10186d7 100644 --- a/service/cognitosync/api_client.go +++ b/service/cognitosync/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/cognitosync/api_op_BulkPublish.go b/service/cognitosync/api_op_BulkPublish.go index 1b3260b0764..be13173e1dd 100644 --- a/service/cognitosync/api_op_BulkPublish.go +++ b/service/cognitosync/api_op_BulkPublish.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBulkPublishMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBulkPublishValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_DeleteDataset.go b/service/cognitosync/api_op_DeleteDataset.go index 78fe339d9c6..75379067ec4 100644 --- a/service/cognitosync/api_op_DeleteDataset.go +++ b/service/cognitosync/api_op_DeleteDataset.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_DescribeDataset.go b/service/cognitosync/api_op_DescribeDataset.go index acb54c3df38..8c49f786b81 100644 --- a/service/cognitosync/api_op_DescribeDataset.go +++ b/service/cognitosync/api_op_DescribeDataset.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_DescribeIdentityPoolUsage.go b/service/cognitosync/api_op_DescribeIdentityPoolUsage.go index 6a2a9a3f34f..57846696830 100644 --- a/service/cognitosync/api_op_DescribeIdentityPoolUsage.go +++ b/service/cognitosync/api_op_DescribeIdentityPoolUsage.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeIdentityPoolUsageMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityPoolUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_DescribeIdentityUsage.go b/service/cognitosync/api_op_DescribeIdentityUsage.go index 6815c0e63f5..fb5b54378f5 100644 --- a/service/cognitosync/api_op_DescribeIdentityUsage.go +++ b/service/cognitosync/api_op_DescribeIdentityUsage.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeIdentityUsageMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_GetBulkPublishDetails.go b/service/cognitosync/api_op_GetBulkPublishDetails.go index be7c29b03c5..02eca472f7d 100644 --- a/service/cognitosync/api_op_GetBulkPublishDetails.go +++ b/service/cognitosync/api_op_GetBulkPublishDetails.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetBulkPublishDetailsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBulkPublishDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_GetCognitoEvents.go b/service/cognitosync/api_op_GetCognitoEvents.go index 238ae7d6470..7aafeabbf07 100644 --- a/service/cognitosync/api_op_GetCognitoEvents.go +++ b/service/cognitosync/api_op_GetCognitoEvents.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCognitoEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCognitoEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_GetIdentityPoolConfiguration.go b/service/cognitosync/api_op_GetIdentityPoolConfiguration.go index 368d37ddb0b..95a96515c41 100644 --- a/service/cognitosync/api_op_GetIdentityPoolConfiguration.go +++ b/service/cognitosync/api_op_GetIdentityPoolConfiguration.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetIdentityPoolConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityPoolConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_ListDatasets.go b/service/cognitosync/api_op_ListDatasets.go index 74c983c3489..d1526112810 100644 --- a/service/cognitosync/api_op_ListDatasets.go +++ b/service/cognitosync/api_op_ListDatasets.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_ListIdentityPoolUsage.go b/service/cognitosync/api_op_ListIdentityPoolUsage.go index ffef52460fa..1e5810dfdbf 100644 --- a/service/cognitosync/api_op_ListIdentityPoolUsage.go +++ b/service/cognitosync/api_op_ListIdentityPoolUsage.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListIdentityPoolUsageMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentityPoolUsage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/cognitosync/api_op_ListRecords.go b/service/cognitosync/api_op_ListRecords.go index 9921c9cd028..bc12ee25d06 100644 --- a/service/cognitosync/api_op_ListRecords.go +++ b/service/cognitosync/api_op_ListRecords.go @@ -186,6 +186,9 @@ func (c *Client) addOperationListRecordsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_RegisterDevice.go b/service/cognitosync/api_op_RegisterDevice.go index 72e9cd40311..f74c8868c79 100644 --- a/service/cognitosync/api_op_RegisterDevice.go +++ b/service/cognitosync/api_op_RegisterDevice.go @@ -146,6 +146,9 @@ func (c *Client) addOperationRegisterDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_SetCognitoEvents.go b/service/cognitosync/api_op_SetCognitoEvents.go index 099227c0be9..5bb3338507d 100644 --- a/service/cognitosync/api_op_SetCognitoEvents.go +++ b/service/cognitosync/api_op_SetCognitoEvents.go @@ -115,6 +115,9 @@ func (c *Client) addOperationSetCognitoEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetCognitoEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_SetIdentityPoolConfiguration.go b/service/cognitosync/api_op_SetIdentityPoolConfiguration.go index b592e8844bd..b1798bb5c72 100644 --- a/service/cognitosync/api_op_SetIdentityPoolConfiguration.go +++ b/service/cognitosync/api_op_SetIdentityPoolConfiguration.go @@ -146,6 +146,9 @@ func (c *Client) addOperationSetIdentityPoolConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityPoolConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_SubscribeToDataset.go b/service/cognitosync/api_op_SubscribeToDataset.go index ae8a5bdf4ca..01281bf5f04 100644 --- a/service/cognitosync/api_op_SubscribeToDataset.go +++ b/service/cognitosync/api_op_SubscribeToDataset.go @@ -143,6 +143,9 @@ func (c *Client) addOperationSubscribeToDatasetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubscribeToDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_UnsubscribeFromDataset.go b/service/cognitosync/api_op_UnsubscribeFromDataset.go index 567c190af68..ea1547d6096 100644 --- a/service/cognitosync/api_op_UnsubscribeFromDataset.go +++ b/service/cognitosync/api_op_UnsubscribeFromDataset.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUnsubscribeFromDatasetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnsubscribeFromDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/cognitosync/api_op_UpdateRecords.go b/service/cognitosync/api_op_UpdateRecords.go index f1d8d47baa2..7f4770db39a 100644 --- a/service/cognitosync/api_op_UpdateRecords.go +++ b/service/cognitosync/api_op_UpdateRecords.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateRecordsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_client.go b/service/comprehend/api_client.go index 7f3aac2f6be..5c8a1ae4d36 100644 --- a/service/comprehend/api_client.go +++ b/service/comprehend/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/comprehend/api_op_BatchDetectDominantLanguage.go b/service/comprehend/api_op_BatchDetectDominantLanguage.go index 95e130c739a..0a4c6268607 100644 --- a/service/comprehend/api_op_BatchDetectDominantLanguage.go +++ b/service/comprehend/api_op_BatchDetectDominantLanguage.go @@ -124,6 +124,9 @@ func (c *Client) addOperationBatchDetectDominantLanguageMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDetectDominantLanguageValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_BatchDetectEntities.go b/service/comprehend/api_op_BatchDetectEntities.go index 74a95a61f08..d9ddf65c8f5 100644 --- a/service/comprehend/api_op_BatchDetectEntities.go +++ b/service/comprehend/api_op_BatchDetectEntities.go @@ -131,6 +131,9 @@ func (c *Client) addOperationBatchDetectEntitiesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDetectEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_BatchDetectKeyPhrases.go b/service/comprehend/api_op_BatchDetectKeyPhrases.go index 32b52475a1a..f80635baa6b 100644 --- a/service/comprehend/api_op_BatchDetectKeyPhrases.go +++ b/service/comprehend/api_op_BatchDetectKeyPhrases.go @@ -127,6 +127,9 @@ func (c *Client) addOperationBatchDetectKeyPhrasesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDetectKeyPhrasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_BatchDetectSentiment.go b/service/comprehend/api_op_BatchDetectSentiment.go index 26b5e477849..d339548925c 100644 --- a/service/comprehend/api_op_BatchDetectSentiment.go +++ b/service/comprehend/api_op_BatchDetectSentiment.go @@ -128,6 +128,9 @@ func (c *Client) addOperationBatchDetectSentimentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDetectSentimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_BatchDetectSyntax.go b/service/comprehend/api_op_BatchDetectSyntax.go index d49d354ae42..31d5874b1c5 100644 --- a/service/comprehend/api_op_BatchDetectSyntax.go +++ b/service/comprehend/api_op_BatchDetectSyntax.go @@ -132,6 +132,9 @@ func (c *Client) addOperationBatchDetectSyntaxMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDetectSyntaxValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_BatchDetectTargetedSentiment.go b/service/comprehend/api_op_BatchDetectTargetedSentiment.go index 539c20cf5aa..d12210224f1 100644 --- a/service/comprehend/api_op_BatchDetectTargetedSentiment.go +++ b/service/comprehend/api_op_BatchDetectTargetedSentiment.go @@ -129,6 +129,9 @@ func (c *Client) addOperationBatchDetectTargetedSentimentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDetectTargetedSentimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_ClassifyDocument.go b/service/comprehend/api_op_ClassifyDocument.go index 78db9aa5112..61d2a80717f 100644 --- a/service/comprehend/api_op_ClassifyDocument.go +++ b/service/comprehend/api_op_ClassifyDocument.go @@ -203,6 +203,9 @@ func (c *Client) addOperationClassifyDocumentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpClassifyDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_ContainsPiiEntities.go b/service/comprehend/api_op_ContainsPiiEntities.go index 0e83272ac5d..4dc4d4f18df 100644 --- a/service/comprehend/api_op_ContainsPiiEntities.go +++ b/service/comprehend/api_op_ContainsPiiEntities.go @@ -114,6 +114,9 @@ func (c *Client) addOperationContainsPiiEntitiesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpContainsPiiEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_CreateDataset.go b/service/comprehend/api_op_CreateDataset.go index 7c305b3841d..b9d898c7d4e 100644 --- a/service/comprehend/api_op_CreateDataset.go +++ b/service/comprehend/api_op_CreateDataset.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_CreateDocumentClassifier.go b/service/comprehend/api_op_CreateDocumentClassifier.go index 0a029c30f87..6a01d3004d1 100644 --- a/service/comprehend/api_op_CreateDocumentClassifier.go +++ b/service/comprehend/api_op_CreateDocumentClassifier.go @@ -201,6 +201,9 @@ func (c *Client) addOperationCreateDocumentClassifierMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDocumentClassifierMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_CreateEndpoint.go b/service/comprehend/api_op_CreateEndpoint.go index edf0405db01..1863e0cff22 100644 --- a/service/comprehend/api_op_CreateEndpoint.go +++ b/service/comprehend/api_op_CreateEndpoint.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_CreateEntityRecognizer.go b/service/comprehend/api_op_CreateEntityRecognizer.go index 8bffeb65b77..c1bf3746557 100644 --- a/service/comprehend/api_op_CreateEntityRecognizer.go +++ b/service/comprehend/api_op_CreateEntityRecognizer.go @@ -192,6 +192,9 @@ func (c *Client) addOperationCreateEntityRecognizerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEntityRecognizerMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_CreateFlywheel.go b/service/comprehend/api_op_CreateFlywheel.go index 183edc15877..09e2ff80bed 100644 --- a/service/comprehend/api_op_CreateFlywheel.go +++ b/service/comprehend/api_op_CreateFlywheel.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateFlywheelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFlywheelMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_DeleteDocumentClassifier.go b/service/comprehend/api_op_DeleteDocumentClassifier.go index a01ad2c744d..2940b13cb43 100644 --- a/service/comprehend/api_op_DeleteDocumentClassifier.go +++ b/service/comprehend/api_op_DeleteDocumentClassifier.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDocumentClassifierMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDocumentClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DeleteEndpoint.go b/service/comprehend/api_op_DeleteEndpoint.go index 4d0eb86b9ea..be260f44f1d 100644 --- a/service/comprehend/api_op_DeleteEndpoint.go +++ b/service/comprehend/api_op_DeleteEndpoint.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DeleteEntityRecognizer.go b/service/comprehend/api_op_DeleteEntityRecognizer.go index f1d0253a4c5..9bd1a8977e5 100644 --- a/service/comprehend/api_op_DeleteEntityRecognizer.go +++ b/service/comprehend/api_op_DeleteEntityRecognizer.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteEntityRecognizerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEntityRecognizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DeleteFlywheel.go b/service/comprehend/api_op_DeleteFlywheel.go index fa50e589b91..776b516af5a 100644 --- a/service/comprehend/api_op_DeleteFlywheel.go +++ b/service/comprehend/api_op_DeleteFlywheel.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteFlywheelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFlywheelValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DeleteResourcePolicy.go b/service/comprehend/api_op_DeleteResourcePolicy.go index acfebd582d7..68d4d90c2c6 100644 --- a/service/comprehend/api_op_DeleteResourcePolicy.go +++ b/service/comprehend/api_op_DeleteResourcePolicy.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeDataset.go b/service/comprehend/api_op_DescribeDataset.go index 893d7735a4c..b89bdfe7ac1 100644 --- a/service/comprehend/api_op_DescribeDataset.go +++ b/service/comprehend/api_op_DescribeDataset.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeDocumentClassificationJob.go b/service/comprehend/api_op_DescribeDocumentClassificationJob.go index 2c4290263f7..43ad19a235d 100644 --- a/service/comprehend/api_op_DescribeDocumentClassificationJob.go +++ b/service/comprehend/api_op_DescribeDocumentClassificationJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeDocumentClassificationJobMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDocumentClassificationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeDocumentClassifier.go b/service/comprehend/api_op_DescribeDocumentClassifier.go index 8e75db57b9b..28d74ecdbda 100644 --- a/service/comprehend/api_op_DescribeDocumentClassifier.go +++ b/service/comprehend/api_op_DescribeDocumentClassifier.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeDocumentClassifierMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDocumentClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeDominantLanguageDetectionJob.go b/service/comprehend/api_op_DescribeDominantLanguageDetectionJob.go index ee4b74b2da7..6e0f023fa0f 100644 --- a/service/comprehend/api_op_DescribeDominantLanguageDetectionJob.go +++ b/service/comprehend/api_op_DescribeDominantLanguageDetectionJob.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeDominantLanguageDetectionJobMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDominantLanguageDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeEndpoint.go b/service/comprehend/api_op_DescribeEndpoint.go index c806ecd8a38..6226a589804 100644 --- a/service/comprehend/api_op_DescribeEndpoint.go +++ b/service/comprehend/api_op_DescribeEndpoint.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeEndpointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeEntitiesDetectionJob.go b/service/comprehend/api_op_DescribeEntitiesDetectionJob.go index 623167c272f..bd52bfc1a53 100644 --- a/service/comprehend/api_op_DescribeEntitiesDetectionJob.go +++ b/service/comprehend/api_op_DescribeEntitiesDetectionJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeEntitiesDetectionJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntitiesDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeEntityRecognizer.go b/service/comprehend/api_op_DescribeEntityRecognizer.go index cd17e778682..133cbdda69c 100644 --- a/service/comprehend/api_op_DescribeEntityRecognizer.go +++ b/service/comprehend/api_op_DescribeEntityRecognizer.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeEntityRecognizerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntityRecognizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeEventsDetectionJob.go b/service/comprehend/api_op_DescribeEventsDetectionJob.go index 4db8319fb57..49b20d8e259 100644 --- a/service/comprehend/api_op_DescribeEventsDetectionJob.go +++ b/service/comprehend/api_op_DescribeEventsDetectionJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeEventsDetectionJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventsDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeFlywheel.go b/service/comprehend/api_op_DescribeFlywheel.go index cc7b7ccc652..51744319bd2 100644 --- a/service/comprehend/api_op_DescribeFlywheel.go +++ b/service/comprehend/api_op_DescribeFlywheel.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeFlywheelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlywheelValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeFlywheelIteration.go b/service/comprehend/api_op_DescribeFlywheelIteration.go index 54e2985bbe8..3636ec1c733 100644 --- a/service/comprehend/api_op_DescribeFlywheelIteration.go +++ b/service/comprehend/api_op_DescribeFlywheelIteration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeFlywheelIterationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlywheelIterationValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeKeyPhrasesDetectionJob.go b/service/comprehend/api_op_DescribeKeyPhrasesDetectionJob.go index 0383526e0aa..42f3dd9bcae 100644 --- a/service/comprehend/api_op_DescribeKeyPhrasesDetectionJob.go +++ b/service/comprehend/api_op_DescribeKeyPhrasesDetectionJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeKeyPhrasesDetectionJobMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKeyPhrasesDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribePiiEntitiesDetectionJob.go b/service/comprehend/api_op_DescribePiiEntitiesDetectionJob.go index bc1cb691ae6..96c8c976497 100644 --- a/service/comprehend/api_op_DescribePiiEntitiesDetectionJob.go +++ b/service/comprehend/api_op_DescribePiiEntitiesDetectionJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribePiiEntitiesDetectionJobMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePiiEntitiesDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeResourcePolicy.go b/service/comprehend/api_op_DescribeResourcePolicy.go index e60932c7f26..a22586d9aaa 100644 --- a/service/comprehend/api_op_DescribeResourcePolicy.go +++ b/service/comprehend/api_op_DescribeResourcePolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeSentimentDetectionJob.go b/service/comprehend/api_op_DescribeSentimentDetectionJob.go index 6dcf7a5cb58..e53ad667da0 100644 --- a/service/comprehend/api_op_DescribeSentimentDetectionJob.go +++ b/service/comprehend/api_op_DescribeSentimentDetectionJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeSentimentDetectionJobMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSentimentDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeTargetedSentimentDetectionJob.go b/service/comprehend/api_op_DescribeTargetedSentimentDetectionJob.go index 6f6de05f258..7cf8522e7cf 100644 --- a/service/comprehend/api_op_DescribeTargetedSentimentDetectionJob.go +++ b/service/comprehend/api_op_DescribeTargetedSentimentDetectionJob.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeTargetedSentimentDetectionJobMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTargetedSentimentDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DescribeTopicsDetectionJob.go b/service/comprehend/api_op_DescribeTopicsDetectionJob.go index cb75cf81c63..ed9d959003b 100644 --- a/service/comprehend/api_op_DescribeTopicsDetectionJob.go +++ b/service/comprehend/api_op_DescribeTopicsDetectionJob.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeTopicsDetectionJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTopicsDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectDominantLanguage.go b/service/comprehend/api_op_DetectDominantLanguage.go index 7be7d650a60..bb8924a561b 100644 --- a/service/comprehend/api_op_DetectDominantLanguage.go +++ b/service/comprehend/api_op_DetectDominantLanguage.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDetectDominantLanguageMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectDominantLanguageValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectEntities.go b/service/comprehend/api_op_DetectEntities.go index 3943c119b19..c1038f7bc1b 100644 --- a/service/comprehend/api_op_DetectEntities.go +++ b/service/comprehend/api_op_DetectEntities.go @@ -201,6 +201,9 @@ func (c *Client) addOperationDetectEntitiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectKeyPhrases.go b/service/comprehend/api_op_DetectKeyPhrases.go index 346cf2598d1..1c05841f6b1 100644 --- a/service/comprehend/api_op_DetectKeyPhrases.go +++ b/service/comprehend/api_op_DetectKeyPhrases.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDetectKeyPhrasesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectKeyPhrasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectPiiEntities.go b/service/comprehend/api_op_DetectPiiEntities.go index 1056a2867fd..ce4a6c36fe6 100644 --- a/service/comprehend/api_op_DetectPiiEntities.go +++ b/service/comprehend/api_op_DetectPiiEntities.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDetectPiiEntitiesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectPiiEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectSentiment.go b/service/comprehend/api_op_DetectSentiment.go index 0017c05c35c..6c9d4373c19 100644 --- a/service/comprehend/api_op_DetectSentiment.go +++ b/service/comprehend/api_op_DetectSentiment.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDetectSentimentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectSentimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectSyntax.go b/service/comprehend/api_op_DetectSyntax.go index 59f5872c2c1..427903661bf 100644 --- a/service/comprehend/api_op_DetectSyntax.go +++ b/service/comprehend/api_op_DetectSyntax.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDetectSyntaxMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectSyntaxValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectTargetedSentiment.go b/service/comprehend/api_op_DetectTargetedSentiment.go index b190208bfc3..d3b7ee46a6f 100644 --- a/service/comprehend/api_op_DetectTargetedSentiment.go +++ b/service/comprehend/api_op_DetectTargetedSentiment.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDetectTargetedSentimentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectTargetedSentimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_DetectToxicContent.go b/service/comprehend/api_op_DetectToxicContent.go index 603eb764538..d85c5f97cc7 100644 --- a/service/comprehend/api_op_DetectToxicContent.go +++ b/service/comprehend/api_op_DetectToxicContent.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDetectToxicContentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectToxicContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_ImportModel.go b/service/comprehend/api_op_ImportModel.go index c6b6e588582..9b086877725 100644 --- a/service/comprehend/api_op_ImportModel.go +++ b/service/comprehend/api_op_ImportModel.go @@ -144,6 +144,9 @@ func (c *Client) addOperationImportModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_ListDatasets.go b/service/comprehend/api_op_ListDatasets.go index f3249d4d9fb..6da7a65dc76 100644 --- a/service/comprehend/api_op_ListDatasets.go +++ b/service/comprehend/api_op_ListDatasets.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // Maximum number of results to return in a response. The default is 100. @@ -210,6 +206,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListDocumentClassificationJobs.go b/service/comprehend/api_op_ListDocumentClassificationJobs.go index 9f441871b6f..d6556b7c567 100644 --- a/service/comprehend/api_op_ListDocumentClassificationJobs.go +++ b/service/comprehend/api_op_ListDocumentClassificationJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDocumentClassificationJobsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDocumentClassificationJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListDocumentClassificationJobsMiddlewares(stack *mi return nil } -// ListDocumentClassificationJobsAPIClient is a client that implements the -// ListDocumentClassificationJobs operation. -type ListDocumentClassificationJobsAPIClient interface { - ListDocumentClassificationJobs(context.Context, *ListDocumentClassificationJobsInput, ...func(*Options)) (*ListDocumentClassificationJobsOutput, error) -} - -var _ ListDocumentClassificationJobsAPIClient = (*Client)(nil) - // ListDocumentClassificationJobsPaginatorOptions is the paginator options for // ListDocumentClassificationJobs type ListDocumentClassificationJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListDocumentClassificationJobsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDocumentClassificationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListDocumentClassificationJobsPaginator) NextPage(ctx context.Context, return result, nil } +// ListDocumentClassificationJobsAPIClient is a client that implements the +// ListDocumentClassificationJobs operation. +type ListDocumentClassificationJobsAPIClient interface { + ListDocumentClassificationJobs(context.Context, *ListDocumentClassificationJobsInput, ...func(*Options)) (*ListDocumentClassificationJobsOutput, error) +} + +var _ ListDocumentClassificationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDocumentClassificationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListDocumentClassifierSummaries.go b/service/comprehend/api_op_ListDocumentClassifierSummaries.go index 22ddcb8764c..056ffc3d349 100644 --- a/service/comprehend/api_op_ListDocumentClassifierSummaries.go +++ b/service/comprehend/api_op_ListDocumentClassifierSummaries.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListDocumentClassifierSummariesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDocumentClassifierSummaries(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListDocumentClassifierSummariesMiddlewares(stack *m return nil } -// ListDocumentClassifierSummariesAPIClient is a client that implements the -// ListDocumentClassifierSummaries operation. -type ListDocumentClassifierSummariesAPIClient interface { - ListDocumentClassifierSummaries(context.Context, *ListDocumentClassifierSummariesInput, ...func(*Options)) (*ListDocumentClassifierSummariesOutput, error) -} - -var _ ListDocumentClassifierSummariesAPIClient = (*Client)(nil) - // ListDocumentClassifierSummariesPaginatorOptions is the paginator options for // ListDocumentClassifierSummaries type ListDocumentClassifierSummariesPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListDocumentClassifierSummariesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDocumentClassifierSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListDocumentClassifierSummariesPaginator) NextPage(ctx context.Context, return result, nil } +// ListDocumentClassifierSummariesAPIClient is a client that implements the +// ListDocumentClassifierSummaries operation. +type ListDocumentClassifierSummariesAPIClient interface { + ListDocumentClassifierSummaries(context.Context, *ListDocumentClassifierSummariesInput, ...func(*Options)) (*ListDocumentClassifierSummariesOutput, error) +} + +var _ ListDocumentClassifierSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDocumentClassifierSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListDocumentClassifiers.go b/service/comprehend/api_op_ListDocumentClassifiers.go index f06e9b03b16..6d089253835 100644 --- a/service/comprehend/api_op_ListDocumentClassifiers.go +++ b/service/comprehend/api_op_ListDocumentClassifiers.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDocumentClassifiersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDocumentClassifiers(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListDocumentClassifiersMiddlewares(stack *middlewar return nil } -// ListDocumentClassifiersAPIClient is a client that implements the -// ListDocumentClassifiers operation. -type ListDocumentClassifiersAPIClient interface { - ListDocumentClassifiers(context.Context, *ListDocumentClassifiersInput, ...func(*Options)) (*ListDocumentClassifiersOutput, error) -} - -var _ ListDocumentClassifiersAPIClient = (*Client)(nil) - // ListDocumentClassifiersPaginatorOptions is the paginator options for // ListDocumentClassifiers type ListDocumentClassifiersPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListDocumentClassifiersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDocumentClassifiers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListDocumentClassifiersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDocumentClassifiersAPIClient is a client that implements the +// ListDocumentClassifiers operation. +type ListDocumentClassifiersAPIClient interface { + ListDocumentClassifiers(context.Context, *ListDocumentClassifiersInput, ...func(*Options)) (*ListDocumentClassifiersOutput, error) +} + +var _ ListDocumentClassifiersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDocumentClassifiers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go b/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go index b6faa015a33..5885b15bff2 100644 --- a/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go +++ b/service/comprehend/api_op_ListDominantLanguageDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDominantLanguageDetectionJobsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDominantLanguageDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListDominantLanguageDetectionJobsMiddlewares(stack return nil } -// ListDominantLanguageDetectionJobsAPIClient is a client that implements the -// ListDominantLanguageDetectionJobs operation. -type ListDominantLanguageDetectionJobsAPIClient interface { - ListDominantLanguageDetectionJobs(context.Context, *ListDominantLanguageDetectionJobsInput, ...func(*Options)) (*ListDominantLanguageDetectionJobsOutput, error) -} - -var _ ListDominantLanguageDetectionJobsAPIClient = (*Client)(nil) - // ListDominantLanguageDetectionJobsPaginatorOptions is the paginator options for // ListDominantLanguageDetectionJobs type ListDominantLanguageDetectionJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListDominantLanguageDetectionJobsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDominantLanguageDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListDominantLanguageDetectionJobsPaginator) NextPage(ctx context.Contex return result, nil } +// ListDominantLanguageDetectionJobsAPIClient is a client that implements the +// ListDominantLanguageDetectionJobs operation. +type ListDominantLanguageDetectionJobsAPIClient interface { + ListDominantLanguageDetectionJobs(context.Context, *ListDominantLanguageDetectionJobsInput, ...func(*Options)) (*ListDominantLanguageDetectionJobsOutput, error) +} + +var _ ListDominantLanguageDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDominantLanguageDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListEndpoints.go b/service/comprehend/api_op_ListEndpoints.go index cd130409af8..4daf6557784 100644 --- a/service/comprehend/api_op_ListEndpoints.go +++ b/service/comprehend/api_op_ListEndpoints.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o return nil } -// ListEndpointsAPIClient is a client that implements the ListEndpoints operation. -type ListEndpointsAPIClient interface { - ListEndpoints(context.Context, *ListEndpointsInput, ...func(*Options)) (*ListEndpointsOutput, error) -} - -var _ ListEndpointsAPIClient = (*Client)(nil) - // ListEndpointsPaginatorOptions is the paginator options for ListEndpoints type ListEndpointsPaginatorOptions struct { // The maximum number of results to return in each page. The default is 100. @@ -210,6 +206,9 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListEndpointsAPIClient is a client that implements the ListEndpoints operation. +type ListEndpointsAPIClient interface { + ListEndpoints(context.Context, *ListEndpointsInput, ...func(*Options)) (*ListEndpointsOutput, error) +} + +var _ ListEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListEntitiesDetectionJobs.go b/service/comprehend/api_op_ListEntitiesDetectionJobs.go index c856c3c5092..8eb7b51f688 100644 --- a/service/comprehend/api_op_ListEntitiesDetectionJobs.go +++ b/service/comprehend/api_op_ListEntitiesDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEntitiesDetectionJobsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntitiesDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEntitiesDetectionJobsMiddlewares(stack *middlew return nil } -// ListEntitiesDetectionJobsAPIClient is a client that implements the -// ListEntitiesDetectionJobs operation. -type ListEntitiesDetectionJobsAPIClient interface { - ListEntitiesDetectionJobs(context.Context, *ListEntitiesDetectionJobsInput, ...func(*Options)) (*ListEntitiesDetectionJobsOutput, error) -} - -var _ ListEntitiesDetectionJobsAPIClient = (*Client)(nil) - // ListEntitiesDetectionJobsPaginatorOptions is the paginator options for // ListEntitiesDetectionJobs type ListEntitiesDetectionJobsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListEntitiesDetectionJobsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntitiesDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListEntitiesDetectionJobsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListEntitiesDetectionJobsAPIClient is a client that implements the +// ListEntitiesDetectionJobs operation. +type ListEntitiesDetectionJobsAPIClient interface { + ListEntitiesDetectionJobs(context.Context, *ListEntitiesDetectionJobsInput, ...func(*Options)) (*ListEntitiesDetectionJobsOutput, error) +} + +var _ ListEntitiesDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntitiesDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListEntityRecognizerSummaries.go b/service/comprehend/api_op_ListEntityRecognizerSummaries.go index aea28845a5a..cdf632c9e65 100644 --- a/service/comprehend/api_op_ListEntityRecognizerSummaries.go +++ b/service/comprehend/api_op_ListEntityRecognizerSummaries.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListEntityRecognizerSummariesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntityRecognizerSummaries(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListEntityRecognizerSummariesMiddlewares(stack *mid return nil } -// ListEntityRecognizerSummariesAPIClient is a client that implements the -// ListEntityRecognizerSummaries operation. -type ListEntityRecognizerSummariesAPIClient interface { - ListEntityRecognizerSummaries(context.Context, *ListEntityRecognizerSummariesInput, ...func(*Options)) (*ListEntityRecognizerSummariesOutput, error) -} - -var _ ListEntityRecognizerSummariesAPIClient = (*Client)(nil) - // ListEntityRecognizerSummariesPaginatorOptions is the paginator options for // ListEntityRecognizerSummaries type ListEntityRecognizerSummariesPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListEntityRecognizerSummariesPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntityRecognizerSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListEntityRecognizerSummariesPaginator) NextPage(ctx context.Context, o return result, nil } +// ListEntityRecognizerSummariesAPIClient is a client that implements the +// ListEntityRecognizerSummaries operation. +type ListEntityRecognizerSummariesAPIClient interface { + ListEntityRecognizerSummaries(context.Context, *ListEntityRecognizerSummariesInput, ...func(*Options)) (*ListEntityRecognizerSummariesOutput, error) +} + +var _ ListEntityRecognizerSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntityRecognizerSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListEntityRecognizers.go b/service/comprehend/api_op_ListEntityRecognizers.go index 4a81cfbd0d9..b0305e6c541 100644 --- a/service/comprehend/api_op_ListEntityRecognizers.go +++ b/service/comprehend/api_op_ListEntityRecognizers.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListEntityRecognizersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntityRecognizers(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListEntityRecognizersMiddlewares(stack *middleware. return nil } -// ListEntityRecognizersAPIClient is a client that implements the -// ListEntityRecognizers operation. -type ListEntityRecognizersAPIClient interface { - ListEntityRecognizers(context.Context, *ListEntityRecognizersInput, ...func(*Options)) (*ListEntityRecognizersOutput, error) -} - -var _ ListEntityRecognizersAPIClient = (*Client)(nil) - // ListEntityRecognizersPaginatorOptions is the paginator options for // ListEntityRecognizers type ListEntityRecognizersPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListEntityRecognizersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntityRecognizers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEntityRecognizersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListEntityRecognizersAPIClient is a client that implements the +// ListEntityRecognizers operation. +type ListEntityRecognizersAPIClient interface { + ListEntityRecognizers(context.Context, *ListEntityRecognizersInput, ...func(*Options)) (*ListEntityRecognizersOutput, error) +} + +var _ ListEntityRecognizersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntityRecognizers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListEventsDetectionJobs.go b/service/comprehend/api_op_ListEventsDetectionJobs.go index 9f9c9d45255..8915c16699d 100644 --- a/service/comprehend/api_op_ListEventsDetectionJobs.go +++ b/service/comprehend/api_op_ListEventsDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEventsDetectionJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventsDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEventsDetectionJobsMiddlewares(stack *middlewar return nil } -// ListEventsDetectionJobsAPIClient is a client that implements the -// ListEventsDetectionJobs operation. -type ListEventsDetectionJobsAPIClient interface { - ListEventsDetectionJobs(context.Context, *ListEventsDetectionJobsInput, ...func(*Options)) (*ListEventsDetectionJobsOutput, error) -} - -var _ ListEventsDetectionJobsAPIClient = (*Client)(nil) - // ListEventsDetectionJobsPaginatorOptions is the paginator options for // ListEventsDetectionJobs type ListEventsDetectionJobsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListEventsDetectionJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventsDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListEventsDetectionJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEventsDetectionJobsAPIClient is a client that implements the +// ListEventsDetectionJobs operation. +type ListEventsDetectionJobsAPIClient interface { + ListEventsDetectionJobs(context.Context, *ListEventsDetectionJobsInput, ...func(*Options)) (*ListEventsDetectionJobsOutput, error) +} + +var _ ListEventsDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventsDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListFlywheelIterationHistory.go b/service/comprehend/api_op_ListFlywheelIterationHistory.go index fe1a8403e5b..a87dc4bc892 100644 --- a/service/comprehend/api_op_ListFlywheelIterationHistory.go +++ b/service/comprehend/api_op_ListFlywheelIterationHistory.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListFlywheelIterationHistoryMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFlywheelIterationHistoryValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListFlywheelIterationHistoryMiddlewares(stack *midd return nil } -// ListFlywheelIterationHistoryAPIClient is a client that implements the -// ListFlywheelIterationHistory operation. -type ListFlywheelIterationHistoryAPIClient interface { - ListFlywheelIterationHistory(context.Context, *ListFlywheelIterationHistoryInput, ...func(*Options)) (*ListFlywheelIterationHistoryOutput, error) -} - -var _ ListFlywheelIterationHistoryAPIClient = (*Client)(nil) - // ListFlywheelIterationHistoryPaginatorOptions is the paginator options for // ListFlywheelIterationHistory type ListFlywheelIterationHistoryPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListFlywheelIterationHistoryPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlywheelIterationHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListFlywheelIterationHistoryPaginator) NextPage(ctx context.Context, op return result, nil } +// ListFlywheelIterationHistoryAPIClient is a client that implements the +// ListFlywheelIterationHistory operation. +type ListFlywheelIterationHistoryAPIClient interface { + ListFlywheelIterationHistory(context.Context, *ListFlywheelIterationHistoryInput, ...func(*Options)) (*ListFlywheelIterationHistoryOutput, error) +} + +var _ ListFlywheelIterationHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlywheelIterationHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListFlywheels.go b/service/comprehend/api_op_ListFlywheels.go index 92679661d08..c8a4e6c221b 100644 --- a/service/comprehend/api_op_ListFlywheels.go +++ b/service/comprehend/api_op_ListFlywheels.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListFlywheelsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFlywheels(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListFlywheelsMiddlewares(stack *middleware.Stack, o return nil } -// ListFlywheelsAPIClient is a client that implements the ListFlywheels operation. -type ListFlywheelsAPIClient interface { - ListFlywheels(context.Context, *ListFlywheelsInput, ...func(*Options)) (*ListFlywheelsOutput, error) -} - -var _ ListFlywheelsAPIClient = (*Client)(nil) - // ListFlywheelsPaginatorOptions is the paginator options for ListFlywheels type ListFlywheelsPaginatorOptions struct { // Maximum number of results to return in a response. The default is 100. @@ -207,6 +203,9 @@ func (p *ListFlywheelsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlywheels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListFlywheelsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListFlywheelsAPIClient is a client that implements the ListFlywheels operation. +type ListFlywheelsAPIClient interface { + ListFlywheels(context.Context, *ListFlywheelsInput, ...func(*Options)) (*ListFlywheelsOutput, error) +} + +var _ ListFlywheelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlywheels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go b/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go index 4d59c87b9c6..54c00b0f416 100644 --- a/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go +++ b/service/comprehend/api_op_ListKeyPhrasesDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListKeyPhrasesDetectionJobsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyPhrasesDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListKeyPhrasesDetectionJobsMiddlewares(stack *middl return nil } -// ListKeyPhrasesDetectionJobsAPIClient is a client that implements the -// ListKeyPhrasesDetectionJobs operation. -type ListKeyPhrasesDetectionJobsAPIClient interface { - ListKeyPhrasesDetectionJobs(context.Context, *ListKeyPhrasesDetectionJobsInput, ...func(*Options)) (*ListKeyPhrasesDetectionJobsOutput, error) -} - -var _ ListKeyPhrasesDetectionJobsAPIClient = (*Client)(nil) - // ListKeyPhrasesDetectionJobsPaginatorOptions is the paginator options for // ListKeyPhrasesDetectionJobs type ListKeyPhrasesDetectionJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListKeyPhrasesDetectionJobsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeyPhrasesDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListKeyPhrasesDetectionJobsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListKeyPhrasesDetectionJobsAPIClient is a client that implements the +// ListKeyPhrasesDetectionJobs operation. +type ListKeyPhrasesDetectionJobsAPIClient interface { + ListKeyPhrasesDetectionJobs(context.Context, *ListKeyPhrasesDetectionJobsInput, ...func(*Options)) (*ListKeyPhrasesDetectionJobsOutput, error) +} + +var _ ListKeyPhrasesDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeyPhrasesDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListPiiEntitiesDetectionJobs.go b/service/comprehend/api_op_ListPiiEntitiesDetectionJobs.go index 00e1b3585a8..ef1b99b7fd6 100644 --- a/service/comprehend/api_op_ListPiiEntitiesDetectionJobs.go +++ b/service/comprehend/api_op_ListPiiEntitiesDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListPiiEntitiesDetectionJobsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPiiEntitiesDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListPiiEntitiesDetectionJobsMiddlewares(stack *midd return nil } -// ListPiiEntitiesDetectionJobsAPIClient is a client that implements the -// ListPiiEntitiesDetectionJobs operation. -type ListPiiEntitiesDetectionJobsAPIClient interface { - ListPiiEntitiesDetectionJobs(context.Context, *ListPiiEntitiesDetectionJobsInput, ...func(*Options)) (*ListPiiEntitiesDetectionJobsOutput, error) -} - -var _ ListPiiEntitiesDetectionJobsAPIClient = (*Client)(nil) - // ListPiiEntitiesDetectionJobsPaginatorOptions is the paginator options for // ListPiiEntitiesDetectionJobs type ListPiiEntitiesDetectionJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListPiiEntitiesDetectionJobsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPiiEntitiesDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListPiiEntitiesDetectionJobsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListPiiEntitiesDetectionJobsAPIClient is a client that implements the +// ListPiiEntitiesDetectionJobs operation. +type ListPiiEntitiesDetectionJobsAPIClient interface { + ListPiiEntitiesDetectionJobs(context.Context, *ListPiiEntitiesDetectionJobsInput, ...func(*Options)) (*ListPiiEntitiesDetectionJobsOutput, error) +} + +var _ ListPiiEntitiesDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPiiEntitiesDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListSentimentDetectionJobs.go b/service/comprehend/api_op_ListSentimentDetectionJobs.go index 7a66f1c6165..81f85178bd7 100644 --- a/service/comprehend/api_op_ListSentimentDetectionJobs.go +++ b/service/comprehend/api_op_ListSentimentDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSentimentDetectionJobsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSentimentDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListSentimentDetectionJobsMiddlewares(stack *middle return nil } -// ListSentimentDetectionJobsAPIClient is a client that implements the -// ListSentimentDetectionJobs operation. -type ListSentimentDetectionJobsAPIClient interface { - ListSentimentDetectionJobs(context.Context, *ListSentimentDetectionJobsInput, ...func(*Options)) (*ListSentimentDetectionJobsOutput, error) -} - -var _ ListSentimentDetectionJobsAPIClient = (*Client)(nil) - // ListSentimentDetectionJobsPaginatorOptions is the paginator options for // ListSentimentDetectionJobs type ListSentimentDetectionJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListSentimentDetectionJobsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSentimentDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListSentimentDetectionJobsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSentimentDetectionJobsAPIClient is a client that implements the +// ListSentimentDetectionJobs operation. +type ListSentimentDetectionJobsAPIClient interface { + ListSentimentDetectionJobs(context.Context, *ListSentimentDetectionJobsInput, ...func(*Options)) (*ListSentimentDetectionJobsOutput, error) +} + +var _ ListSentimentDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSentimentDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListTagsForResource.go b/service/comprehend/api_op_ListTagsForResource.go index 91ef1cdd5dd..55dd804fed5 100644 --- a/service/comprehend/api_op_ListTagsForResource.go +++ b/service/comprehend/api_op_ListTagsForResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_ListTargetedSentimentDetectionJobs.go b/service/comprehend/api_op_ListTargetedSentimentDetectionJobs.go index 1a80074a288..01975832ca9 100644 --- a/service/comprehend/api_op_ListTargetedSentimentDetectionJobs.go +++ b/service/comprehend/api_op_ListTargetedSentimentDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTargetedSentimentDetectionJobsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTargetedSentimentDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListTargetedSentimentDetectionJobsMiddlewares(stack return nil } -// ListTargetedSentimentDetectionJobsAPIClient is a client that implements the -// ListTargetedSentimentDetectionJobs operation. -type ListTargetedSentimentDetectionJobsAPIClient interface { - ListTargetedSentimentDetectionJobs(context.Context, *ListTargetedSentimentDetectionJobsInput, ...func(*Options)) (*ListTargetedSentimentDetectionJobsOutput, error) -} - -var _ ListTargetedSentimentDetectionJobsAPIClient = (*Client)(nil) - // ListTargetedSentimentDetectionJobsPaginatorOptions is the paginator options for // ListTargetedSentimentDetectionJobs type ListTargetedSentimentDetectionJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListTargetedSentimentDetectionJobsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetedSentimentDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListTargetedSentimentDetectionJobsPaginator) NextPage(ctx context.Conte return result, nil } +// ListTargetedSentimentDetectionJobsAPIClient is a client that implements the +// ListTargetedSentimentDetectionJobs operation. +type ListTargetedSentimentDetectionJobsAPIClient interface { + ListTargetedSentimentDetectionJobs(context.Context, *ListTargetedSentimentDetectionJobsInput, ...func(*Options)) (*ListTargetedSentimentDetectionJobsOutput, error) +} + +var _ ListTargetedSentimentDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetedSentimentDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_ListTopicsDetectionJobs.go b/service/comprehend/api_op_ListTopicsDetectionJobs.go index dbff5d6191b..aee23cd7021 100644 --- a/service/comprehend/api_op_ListTopicsDetectionJobs.go +++ b/service/comprehend/api_op_ListTopicsDetectionJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTopicsDetectionJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTopicsDetectionJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListTopicsDetectionJobsMiddlewares(stack *middlewar return nil } -// ListTopicsDetectionJobsAPIClient is a client that implements the -// ListTopicsDetectionJobs operation. -type ListTopicsDetectionJobsAPIClient interface { - ListTopicsDetectionJobs(context.Context, *ListTopicsDetectionJobsInput, ...func(*Options)) (*ListTopicsDetectionJobsOutput, error) -} - -var _ ListTopicsDetectionJobsAPIClient = (*Client)(nil) - // ListTopicsDetectionJobsPaginatorOptions is the paginator options for // ListTopicsDetectionJobs type ListTopicsDetectionJobsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListTopicsDetectionJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTopicsDetectionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListTopicsDetectionJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTopicsDetectionJobsAPIClient is a client that implements the +// ListTopicsDetectionJobs operation. +type ListTopicsDetectionJobsAPIClient interface { + ListTopicsDetectionJobs(context.Context, *ListTopicsDetectionJobsInput, ...func(*Options)) (*ListTopicsDetectionJobsOutput, error) +} + +var _ ListTopicsDetectionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTopicsDetectionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/comprehend/api_op_PutResourcePolicy.go b/service/comprehend/api_op_PutResourcePolicy.go index 3f8a2b53e82..9cd94fdbeb5 100644 --- a/service/comprehend/api_op_PutResourcePolicy.go +++ b/service/comprehend/api_op_PutResourcePolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StartDocumentClassificationJob.go b/service/comprehend/api_op_StartDocumentClassificationJob.go index afbddf3793b..6f99bb564df 100644 --- a/service/comprehend/api_op_StartDocumentClassificationJob.go +++ b/service/comprehend/api_op_StartDocumentClassificationJob.go @@ -191,6 +191,9 @@ func (c *Client) addOperationStartDocumentClassificationJobMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartDocumentClassificationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartDominantLanguageDetectionJob.go b/service/comprehend/api_op_StartDominantLanguageDetectionJob.go index b9edbb57237..09c696e3552 100644 --- a/service/comprehend/api_op_StartDominantLanguageDetectionJob.go +++ b/service/comprehend/api_op_StartDominantLanguageDetectionJob.go @@ -175,6 +175,9 @@ func (c *Client) addOperationStartDominantLanguageDetectionJobMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartDominantLanguageDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartEntitiesDetectionJob.go b/service/comprehend/api_op_StartEntitiesDetectionJob.go index e804af18d91..9fcb223c3bc 100644 --- a/service/comprehend/api_op_StartEntitiesDetectionJob.go +++ b/service/comprehend/api_op_StartEntitiesDetectionJob.go @@ -205,6 +205,9 @@ func (c *Client) addOperationStartEntitiesDetectionJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartEntitiesDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartEventsDetectionJob.go b/service/comprehend/api_op_StartEventsDetectionJob.go index b47756a3702..63638e5037c 100644 --- a/service/comprehend/api_op_StartEventsDetectionJob.go +++ b/service/comprehend/api_op_StartEventsDetectionJob.go @@ -156,6 +156,9 @@ func (c *Client) addOperationStartEventsDetectionJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartEventsDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartFlywheelIteration.go b/service/comprehend/api_op_StartFlywheelIteration.go index f8086b4547c..882dc9ab228 100644 --- a/service/comprehend/api_op_StartFlywheelIteration.go +++ b/service/comprehend/api_op_StartFlywheelIteration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartFlywheelIterationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFlywheelIterationValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StartKeyPhrasesDetectionJob.go b/service/comprehend/api_op_StartKeyPhrasesDetectionJob.go index e8437c7dfee..9fd49bf3ef2 100644 --- a/service/comprehend/api_op_StartKeyPhrasesDetectionJob.go +++ b/service/comprehend/api_op_StartKeyPhrasesDetectionJob.go @@ -182,6 +182,9 @@ func (c *Client) addOperationStartKeyPhrasesDetectionJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartKeyPhrasesDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartPiiEntitiesDetectionJob.go b/service/comprehend/api_op_StartPiiEntitiesDetectionJob.go index 384697cda17..8fa266745fe 100644 --- a/service/comprehend/api_op_StartPiiEntitiesDetectionJob.go +++ b/service/comprehend/api_op_StartPiiEntitiesDetectionJob.go @@ -164,6 +164,9 @@ func (c *Client) addOperationStartPiiEntitiesDetectionJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartPiiEntitiesDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartSentimentDetectionJob.go b/service/comprehend/api_op_StartSentimentDetectionJob.go index b6be15770f0..9111cfd3777 100644 --- a/service/comprehend/api_op_StartSentimentDetectionJob.go +++ b/service/comprehend/api_op_StartSentimentDetectionJob.go @@ -182,6 +182,9 @@ func (c *Client) addOperationStartSentimentDetectionJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSentimentDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartTargetedSentimentDetectionJob.go b/service/comprehend/api_op_StartTargetedSentimentDetectionJob.go index e884b2cd910..0a316302042 100644 --- a/service/comprehend/api_op_StartTargetedSentimentDetectionJob.go +++ b/service/comprehend/api_op_StartTargetedSentimentDetectionJob.go @@ -182,6 +182,9 @@ func (c *Client) addOperationStartTargetedSentimentDetectionJobMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartTargetedSentimentDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StartTopicsDetectionJob.go b/service/comprehend/api_op_StartTopicsDetectionJob.go index 3a22170d27c..e66d8d522e2 100644 --- a/service/comprehend/api_op_StartTopicsDetectionJob.go +++ b/service/comprehend/api_op_StartTopicsDetectionJob.go @@ -181,6 +181,9 @@ func (c *Client) addOperationStartTopicsDetectionJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartTopicsDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehend/api_op_StopDominantLanguageDetectionJob.go b/service/comprehend/api_op_StopDominantLanguageDetectionJob.go index 741fe26f263..d6d5f8083df 100644 --- a/service/comprehend/api_op_StopDominantLanguageDetectionJob.go +++ b/service/comprehend/api_op_StopDominantLanguageDetectionJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopDominantLanguageDetectionJobMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDominantLanguageDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopEntitiesDetectionJob.go b/service/comprehend/api_op_StopEntitiesDetectionJob.go index cab3a6cd911..fe4fd3e6ade 100644 --- a/service/comprehend/api_op_StopEntitiesDetectionJob.go +++ b/service/comprehend/api_op_StopEntitiesDetectionJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopEntitiesDetectionJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEntitiesDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopEventsDetectionJob.go b/service/comprehend/api_op_StopEventsDetectionJob.go index e9e042a4c66..4f8a225136e 100644 --- a/service/comprehend/api_op_StopEventsDetectionJob.go +++ b/service/comprehend/api_op_StopEventsDetectionJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopEventsDetectionJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEventsDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopKeyPhrasesDetectionJob.go b/service/comprehend/api_op_StopKeyPhrasesDetectionJob.go index 5f0881b1249..ac8fdacff57 100644 --- a/service/comprehend/api_op_StopKeyPhrasesDetectionJob.go +++ b/service/comprehend/api_op_StopKeyPhrasesDetectionJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopKeyPhrasesDetectionJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopKeyPhrasesDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopPiiEntitiesDetectionJob.go b/service/comprehend/api_op_StopPiiEntitiesDetectionJob.go index c839fdd4dbb..e96a44e6d40 100644 --- a/service/comprehend/api_op_StopPiiEntitiesDetectionJob.go +++ b/service/comprehend/api_op_StopPiiEntitiesDetectionJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopPiiEntitiesDetectionJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopPiiEntitiesDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopSentimentDetectionJob.go b/service/comprehend/api_op_StopSentimentDetectionJob.go index f4d20995068..588f3173d6c 100644 --- a/service/comprehend/api_op_StopSentimentDetectionJob.go +++ b/service/comprehend/api_op_StopSentimentDetectionJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopSentimentDetectionJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSentimentDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopTargetedSentimentDetectionJob.go b/service/comprehend/api_op_StopTargetedSentimentDetectionJob.go index cc65a92440e..512a66c6c42 100644 --- a/service/comprehend/api_op_StopTargetedSentimentDetectionJob.go +++ b/service/comprehend/api_op_StopTargetedSentimentDetectionJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopTargetedSentimentDetectionJobMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTargetedSentimentDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopTrainingDocumentClassifier.go b/service/comprehend/api_op_StopTrainingDocumentClassifier.go index ad62adc811c..f5c04206246 100644 --- a/service/comprehend/api_op_StopTrainingDocumentClassifier.go +++ b/service/comprehend/api_op_StopTrainingDocumentClassifier.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopTrainingDocumentClassifierMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTrainingDocumentClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_StopTrainingEntityRecognizer.go b/service/comprehend/api_op_StopTrainingEntityRecognizer.go index 3a1a27b4aab..1b9b8158d0c 100644 --- a/service/comprehend/api_op_StopTrainingEntityRecognizer.go +++ b/service/comprehend/api_op_StopTrainingEntityRecognizer.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopTrainingEntityRecognizerMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTrainingEntityRecognizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_TagResource.go b/service/comprehend/api_op_TagResource.go index 9522f28ae37..eb928b57927 100644 --- a/service/comprehend/api_op_TagResource.go +++ b/service/comprehend/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_UntagResource.go b/service/comprehend/api_op_UntagResource.go index 8ee01c52bff..7772b153d79 100644 --- a/service/comprehend/api_op_UntagResource.go +++ b/service/comprehend/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_UpdateEndpoint.go b/service/comprehend/api_op_UpdateEndpoint.go index 4501979322d..0bd93a438ac 100644 --- a/service/comprehend/api_op_UpdateEndpoint.go +++ b/service/comprehend/api_op_UpdateEndpoint.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehend/api_op_UpdateFlywheel.go b/service/comprehend/api_op_UpdateFlywheel.go index 4b5187e4a8f..46b33ed6d62 100644 --- a/service/comprehend/api_op_UpdateFlywheel.go +++ b/service/comprehend/api_op_UpdateFlywheel.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateFlywheelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlywheelValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_client.go b/service/comprehendmedical/api_client.go index 0c0207760c3..87e8d910d2f 100644 --- a/service/comprehendmedical/api_client.go +++ b/service/comprehendmedical/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/comprehendmedical/api_op_DescribeEntitiesDetectionV2Job.go b/service/comprehendmedical/api_op_DescribeEntitiesDetectionV2Job.go index 08497562fd6..702e089bd85 100644 --- a/service/comprehendmedical/api_op_DescribeEntitiesDetectionV2Job.go +++ b/service/comprehendmedical/api_op_DescribeEntitiesDetectionV2Job.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeEntitiesDetectionV2JobMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntitiesDetectionV2JobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DescribeICD10CMInferenceJob.go b/service/comprehendmedical/api_op_DescribeICD10CMInferenceJob.go index 7fb6159fbca..bbf7550ab0d 100644 --- a/service/comprehendmedical/api_op_DescribeICD10CMInferenceJob.go +++ b/service/comprehendmedical/api_op_DescribeICD10CMInferenceJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeICD10CMInferenceJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeICD10CMInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DescribePHIDetectionJob.go b/service/comprehendmedical/api_op_DescribePHIDetectionJob.go index 839f1fd30d4..9216fd67594 100644 --- a/service/comprehendmedical/api_op_DescribePHIDetectionJob.go +++ b/service/comprehendmedical/api_op_DescribePHIDetectionJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribePHIDetectionJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePHIDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DescribeRxNormInferenceJob.go b/service/comprehendmedical/api_op_DescribeRxNormInferenceJob.go index a933a8893a8..14614a56f9c 100644 --- a/service/comprehendmedical/api_op_DescribeRxNormInferenceJob.go +++ b/service/comprehendmedical/api_op_DescribeRxNormInferenceJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeRxNormInferenceJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRxNormInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DescribeSNOMEDCTInferenceJob.go b/service/comprehendmedical/api_op_DescribeSNOMEDCTInferenceJob.go index ec4549d456a..1367bc0741e 100644 --- a/service/comprehendmedical/api_op_DescribeSNOMEDCTInferenceJob.go +++ b/service/comprehendmedical/api_op_DescribeSNOMEDCTInferenceJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeSNOMEDCTInferenceJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSNOMEDCTInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DetectEntities.go b/service/comprehendmedical/api_op_DetectEntities.go index 94a3014fce0..39b6dc92b93 100644 --- a/service/comprehendmedical/api_op_DetectEntities.go +++ b/service/comprehendmedical/api_op_DetectEntities.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDetectEntitiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DetectEntitiesV2.go b/service/comprehendmedical/api_op_DetectEntitiesV2.go index 19398eba928..201b29ebc8c 100644 --- a/service/comprehendmedical/api_op_DetectEntitiesV2.go +++ b/service/comprehendmedical/api_op_DetectEntitiesV2.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDetectEntitiesV2Middlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectEntitiesV2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_DetectPHI.go b/service/comprehendmedical/api_op_DetectPHI.go index 5a54e9425ce..ccf32bca018 100644 --- a/service/comprehendmedical/api_op_DetectPHI.go +++ b/service/comprehendmedical/api_op_DetectPHI.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDetectPHIMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectPHIValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_InferICD10CM.go b/service/comprehendmedical/api_op_InferICD10CM.go index b212bc006f4..a372b40ac5a 100644 --- a/service/comprehendmedical/api_op_InferICD10CM.go +++ b/service/comprehendmedical/api_op_InferICD10CM.go @@ -122,6 +122,9 @@ func (c *Client) addOperationInferICD10CMMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInferICD10CMValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_InferRxNorm.go b/service/comprehendmedical/api_op_InferRxNorm.go index 4f007a7b135..394e4a16b32 100644 --- a/service/comprehendmedical/api_op_InferRxNorm.go +++ b/service/comprehendmedical/api_op_InferRxNorm.go @@ -122,6 +122,9 @@ func (c *Client) addOperationInferRxNormMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInferRxNormValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_InferSNOMEDCT.go b/service/comprehendmedical/api_op_InferSNOMEDCT.go index 39e91350203..c02c41b28cc 100644 --- a/service/comprehendmedical/api_op_InferSNOMEDCT.go +++ b/service/comprehendmedical/api_op_InferSNOMEDCT.go @@ -131,6 +131,9 @@ func (c *Client) addOperationInferSNOMEDCTMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInferSNOMEDCTValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_ListEntitiesDetectionV2Jobs.go b/service/comprehendmedical/api_op_ListEntitiesDetectionV2Jobs.go index 5d84a7c3b12..b72352f1123 100644 --- a/service/comprehendmedical/api_op_ListEntitiesDetectionV2Jobs.go +++ b/service/comprehendmedical/api_op_ListEntitiesDetectionV2Jobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEntitiesDetectionV2JobsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntitiesDetectionV2Jobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/comprehendmedical/api_op_ListICD10CMInferenceJobs.go b/service/comprehendmedical/api_op_ListICD10CMInferenceJobs.go index 6d0973500ca..a458c48a2ae 100644 --- a/service/comprehendmedical/api_op_ListICD10CMInferenceJobs.go +++ b/service/comprehendmedical/api_op_ListICD10CMInferenceJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListICD10CMInferenceJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListICD10CMInferenceJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/comprehendmedical/api_op_ListPHIDetectionJobs.go b/service/comprehendmedical/api_op_ListPHIDetectionJobs.go index 00246d5d68f..577f513dd3e 100644 --- a/service/comprehendmedical/api_op_ListPHIDetectionJobs.go +++ b/service/comprehendmedical/api_op_ListPHIDetectionJobs.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListPHIDetectionJobsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPHIDetectionJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/comprehendmedical/api_op_ListRxNormInferenceJobs.go b/service/comprehendmedical/api_op_ListRxNormInferenceJobs.go index 74ab537234d..78bd0ddd787 100644 --- a/service/comprehendmedical/api_op_ListRxNormInferenceJobs.go +++ b/service/comprehendmedical/api_op_ListRxNormInferenceJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListRxNormInferenceJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRxNormInferenceJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/comprehendmedical/api_op_ListSNOMEDCTInferenceJobs.go b/service/comprehendmedical/api_op_ListSNOMEDCTInferenceJobs.go index a06c447c766..eff55ed108d 100644 --- a/service/comprehendmedical/api_op_ListSNOMEDCTInferenceJobs.go +++ b/service/comprehendmedical/api_op_ListSNOMEDCTInferenceJobs.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListSNOMEDCTInferenceJobsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSNOMEDCTInferenceJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StartEntitiesDetectionV2Job.go b/service/comprehendmedical/api_op_StartEntitiesDetectionV2Job.go index cb30ce1ab93..e8d5f9b659b 100644 --- a/service/comprehendmedical/api_op_StartEntitiesDetectionV2Job.go +++ b/service/comprehendmedical/api_op_StartEntitiesDetectionV2Job.go @@ -141,6 +141,9 @@ func (c *Client) addOperationStartEntitiesDetectionV2JobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartEntitiesDetectionV2JobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StartICD10CMInferenceJob.go b/service/comprehendmedical/api_op_StartICD10CMInferenceJob.go index 6252ac02fc6..f151b96bbac 100644 --- a/service/comprehendmedical/api_op_StartICD10CMInferenceJob.go +++ b/service/comprehendmedical/api_op_StartICD10CMInferenceJob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationStartICD10CMInferenceJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartICD10CMInferenceJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StartPHIDetectionJob.go b/service/comprehendmedical/api_op_StartPHIDetectionJob.go index ac39adb4b0d..9940958a1da 100644 --- a/service/comprehendmedical/api_op_StartPHIDetectionJob.go +++ b/service/comprehendmedical/api_op_StartPHIDetectionJob.go @@ -138,6 +138,9 @@ func (c *Client) addOperationStartPHIDetectionJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartPHIDetectionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StartRxNormInferenceJob.go b/service/comprehendmedical/api_op_StartRxNormInferenceJob.go index fc7495d6c3a..dee1547df48 100644 --- a/service/comprehendmedical/api_op_StartRxNormInferenceJob.go +++ b/service/comprehendmedical/api_op_StartRxNormInferenceJob.go @@ -138,6 +138,9 @@ func (c *Client) addOperationStartRxNormInferenceJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartRxNormInferenceJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StartSNOMEDCTInferenceJob.go b/service/comprehendmedical/api_op_StartSNOMEDCTInferenceJob.go index 778e6cfba15..f1619dd32fc 100644 --- a/service/comprehendmedical/api_op_StartSNOMEDCTInferenceJob.go +++ b/service/comprehendmedical/api_op_StartSNOMEDCTInferenceJob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationStartSNOMEDCTInferenceJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSNOMEDCTInferenceJobMiddleware(stack, options); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StopEntitiesDetectionV2Job.go b/service/comprehendmedical/api_op_StopEntitiesDetectionV2Job.go index 42e9e7fbd32..400bd2355e8 100644 --- a/service/comprehendmedical/api_op_StopEntitiesDetectionV2Job.go +++ b/service/comprehendmedical/api_op_StopEntitiesDetectionV2Job.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopEntitiesDetectionV2JobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEntitiesDetectionV2JobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StopICD10CMInferenceJob.go b/service/comprehendmedical/api_op_StopICD10CMInferenceJob.go index 8a5d83d2a0a..3d2219fa269 100644 --- a/service/comprehendmedical/api_op_StopICD10CMInferenceJob.go +++ b/service/comprehendmedical/api_op_StopICD10CMInferenceJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopICD10CMInferenceJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopICD10CMInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StopPHIDetectionJob.go b/service/comprehendmedical/api_op_StopPHIDetectionJob.go index 953a664aae7..15f71f12472 100644 --- a/service/comprehendmedical/api_op_StopPHIDetectionJob.go +++ b/service/comprehendmedical/api_op_StopPHIDetectionJob.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopPHIDetectionJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopPHIDetectionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StopRxNormInferenceJob.go b/service/comprehendmedical/api_op_StopRxNormInferenceJob.go index e026110022a..c58a8edcc0f 100644 --- a/service/comprehendmedical/api_op_StopRxNormInferenceJob.go +++ b/service/comprehendmedical/api_op_StopRxNormInferenceJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopRxNormInferenceJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopRxNormInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/comprehendmedical/api_op_StopSNOMEDCTInferenceJob.go b/service/comprehendmedical/api_op_StopSNOMEDCTInferenceJob.go index 8dbd8948436..49b04542b7c 100644 --- a/service/comprehendmedical/api_op_StopSNOMEDCTInferenceJob.go +++ b/service/comprehendmedical/api_op_StopSNOMEDCTInferenceJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopSNOMEDCTInferenceJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSNOMEDCTInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_client.go b/service/computeoptimizer/api_client.go index 71e527eb709..eb6be297c2c 100644 --- a/service/computeoptimizer/api_client.go +++ b/service/computeoptimizer/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go b/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go index a768069f341..9eb3adbfaad 100644 --- a/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go +++ b/service/computeoptimizer/api_op_DeleteRecommendationPreferences.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteRecommendationPreferencesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecommendationPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_DescribeRecommendationExportJobs.go b/service/computeoptimizer/api_op_DescribeRecommendationExportJobs.go index dd819ecc8d7..2e56c331c38 100644 --- a/service/computeoptimizer/api_op_DescribeRecommendationExportJobs.go +++ b/service/computeoptimizer/api_op_DescribeRecommendationExportJobs.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeRecommendationExportJobsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRecommendationExportJobs(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeRecommendationExportJobsMiddlewares(stack * return nil } -// DescribeRecommendationExportJobsAPIClient is a client that implements the -// DescribeRecommendationExportJobs operation. -type DescribeRecommendationExportJobsAPIClient interface { - DescribeRecommendationExportJobs(context.Context, *DescribeRecommendationExportJobsInput, ...func(*Options)) (*DescribeRecommendationExportJobsOutput, error) -} - -var _ DescribeRecommendationExportJobsAPIClient = (*Client)(nil) - // DescribeRecommendationExportJobsPaginatorOptions is the paginator options for // DescribeRecommendationExportJobs type DescribeRecommendationExportJobsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeRecommendationExportJobsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRecommendationExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeRecommendationExportJobsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeRecommendationExportJobsAPIClient is a client that implements the +// DescribeRecommendationExportJobs operation. +type DescribeRecommendationExportJobsAPIClient interface { + DescribeRecommendationExportJobs(context.Context, *DescribeRecommendationExportJobsInput, ...func(*Options)) (*DescribeRecommendationExportJobsOutput, error) +} + +var _ DescribeRecommendationExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRecommendationExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/computeoptimizer/api_op_ExportAutoScalingGroupRecommendations.go b/service/computeoptimizer/api_op_ExportAutoScalingGroupRecommendations.go index 327aab5b6ef..d30428c98d7 100644 --- a/service/computeoptimizer/api_op_ExportAutoScalingGroupRecommendations.go +++ b/service/computeoptimizer/api_op_ExportAutoScalingGroupRecommendations.go @@ -188,6 +188,9 @@ func (c *Client) addOperationExportAutoScalingGroupRecommendationsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportAutoScalingGroupRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_ExportEBSVolumeRecommendations.go b/service/computeoptimizer/api_op_ExportEBSVolumeRecommendations.go index 12287a1e67b..5030ff8db31 100644 --- a/service/computeoptimizer/api_op_ExportEBSVolumeRecommendations.go +++ b/service/computeoptimizer/api_op_ExportEBSVolumeRecommendations.go @@ -185,6 +185,9 @@ func (c *Client) addOperationExportEBSVolumeRecommendationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportEBSVolumeRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go b/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go index 1da71eb838a..88646d09d7b 100644 --- a/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go +++ b/service/computeoptimizer/api_op_ExportEC2InstanceRecommendations.go @@ -185,6 +185,9 @@ func (c *Client) addOperationExportEC2InstanceRecommendationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportEC2InstanceRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_ExportECSServiceRecommendations.go b/service/computeoptimizer/api_op_ExportECSServiceRecommendations.go index 07b66184416..13333fcb4b5 100644 --- a/service/computeoptimizer/api_op_ExportECSServiceRecommendations.go +++ b/service/computeoptimizer/api_op_ExportECSServiceRecommendations.go @@ -181,6 +181,9 @@ func (c *Client) addOperationExportECSServiceRecommendationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportECSServiceRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_ExportLambdaFunctionRecommendations.go b/service/computeoptimizer/api_op_ExportLambdaFunctionRecommendations.go index 5b2c41612a1..9c3bf33b0d7 100644 --- a/service/computeoptimizer/api_op_ExportLambdaFunctionRecommendations.go +++ b/service/computeoptimizer/api_op_ExportLambdaFunctionRecommendations.go @@ -185,6 +185,9 @@ func (c *Client) addOperationExportLambdaFunctionRecommendationsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportLambdaFunctionRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_ExportLicenseRecommendations.go b/service/computeoptimizer/api_op_ExportLicenseRecommendations.go index 2b646d81011..048fae97c54 100644 --- a/service/computeoptimizer/api_op_ExportLicenseRecommendations.go +++ b/service/computeoptimizer/api_op_ExportLicenseRecommendations.go @@ -182,6 +182,9 @@ func (c *Client) addOperationExportLicenseRecommendationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportLicenseRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetAutoScalingGroupRecommendations.go b/service/computeoptimizer/api_op_GetAutoScalingGroupRecommendations.go index 822aef1e5ad..bed4a35853d 100644 --- a/service/computeoptimizer/api_op_GetAutoScalingGroupRecommendations.go +++ b/service/computeoptimizer/api_op_GetAutoScalingGroupRecommendations.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetAutoScalingGroupRecommendationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAutoScalingGroupRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetEBSVolumeRecommendations.go b/service/computeoptimizer/api_op_GetEBSVolumeRecommendations.go index 75b7e9e1770..92d41701409 100644 --- a/service/computeoptimizer/api_op_GetEBSVolumeRecommendations.go +++ b/service/computeoptimizer/api_op_GetEBSVolumeRecommendations.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetEBSVolumeRecommendationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEBSVolumeRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetEC2InstanceRecommendations.go b/service/computeoptimizer/api_op_GetEC2InstanceRecommendations.go index 1a7d8e5faec..c86b1083dcc 100644 --- a/service/computeoptimizer/api_op_GetEC2InstanceRecommendations.go +++ b/service/computeoptimizer/api_op_GetEC2InstanceRecommendations.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetEC2InstanceRecommendationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEC2InstanceRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetEC2RecommendationProjectedMetrics.go b/service/computeoptimizer/api_op_GetEC2RecommendationProjectedMetrics.go index a0383c575f4..303e5be3eac 100644 --- a/service/computeoptimizer/api_op_GetEC2RecommendationProjectedMetrics.go +++ b/service/computeoptimizer/api_op_GetEC2RecommendationProjectedMetrics.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetEC2RecommendationProjectedMetricsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEC2RecommendationProjectedMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetECSServiceRecommendationProjectedMetrics.go b/service/computeoptimizer/api_op_GetECSServiceRecommendationProjectedMetrics.go index 174f4119c3e..439cff6e78e 100644 --- a/service/computeoptimizer/api_op_GetECSServiceRecommendationProjectedMetrics.go +++ b/service/computeoptimizer/api_op_GetECSServiceRecommendationProjectedMetrics.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetECSServiceRecommendationProjectedMetricsMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetECSServiceRecommendationProjectedMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetECSServiceRecommendations.go b/service/computeoptimizer/api_op_GetECSServiceRecommendations.go index b93dfb19091..60df08bfb3e 100644 --- a/service/computeoptimizer/api_op_GetECSServiceRecommendations.go +++ b/service/computeoptimizer/api_op_GetECSServiceRecommendations.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetECSServiceRecommendationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetECSServiceRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go b/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go index 233c2d3d8a9..a50c8218384 100644 --- a/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go +++ b/service/computeoptimizer/api_op_GetEffectiveRecommendationPreferences.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetEffectiveRecommendationPreferencesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEffectiveRecommendationPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetEnrollmentStatus.go b/service/computeoptimizer/api_op_GetEnrollmentStatus.go index 148b448121a..18facd4ce16 100644 --- a/service/computeoptimizer/api_op_GetEnrollmentStatus.go +++ b/service/computeoptimizer/api_op_GetEnrollmentStatus.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetEnrollmentStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEnrollmentStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetEnrollmentStatusesForOrganization.go b/service/computeoptimizer/api_op_GetEnrollmentStatusesForOrganization.go index aba53d48e55..162ca3e43f2 100644 --- a/service/computeoptimizer/api_op_GetEnrollmentStatusesForOrganization.go +++ b/service/computeoptimizer/api_op_GetEnrollmentStatusesForOrganization.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetEnrollmentStatusesForOrganizationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEnrollmentStatusesForOrganization(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetEnrollmentStatusesForOrganizationMiddlewares(sta return nil } -// GetEnrollmentStatusesForOrganizationAPIClient is a client that implements the -// GetEnrollmentStatusesForOrganization operation. -type GetEnrollmentStatusesForOrganizationAPIClient interface { - GetEnrollmentStatusesForOrganization(context.Context, *GetEnrollmentStatusesForOrganizationInput, ...func(*Options)) (*GetEnrollmentStatusesForOrganizationOutput, error) -} - -var _ GetEnrollmentStatusesForOrganizationAPIClient = (*Client)(nil) - // GetEnrollmentStatusesForOrganizationPaginatorOptions is the paginator options // for GetEnrollmentStatusesForOrganization type GetEnrollmentStatusesForOrganizationPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *GetEnrollmentStatusesForOrganizationPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEnrollmentStatusesForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *GetEnrollmentStatusesForOrganizationPaginator) NextPage(ctx context.Con return result, nil } +// GetEnrollmentStatusesForOrganizationAPIClient is a client that implements the +// GetEnrollmentStatusesForOrganization operation. +type GetEnrollmentStatusesForOrganizationAPIClient interface { + GetEnrollmentStatusesForOrganization(context.Context, *GetEnrollmentStatusesForOrganizationInput, ...func(*Options)) (*GetEnrollmentStatusesForOrganizationOutput, error) +} + +var _ GetEnrollmentStatusesForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEnrollmentStatusesForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/computeoptimizer/api_op_GetLambdaFunctionRecommendations.go b/service/computeoptimizer/api_op_GetLambdaFunctionRecommendations.go index 3f518d44d28..42252d48219 100644 --- a/service/computeoptimizer/api_op_GetLambdaFunctionRecommendations.go +++ b/service/computeoptimizer/api_op_GetLambdaFunctionRecommendations.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetLambdaFunctionRecommendationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLambdaFunctionRecommendations(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationGetLambdaFunctionRecommendationsMiddlewares(stack * return nil } -// GetLambdaFunctionRecommendationsAPIClient is a client that implements the -// GetLambdaFunctionRecommendations operation. -type GetLambdaFunctionRecommendationsAPIClient interface { - GetLambdaFunctionRecommendations(context.Context, *GetLambdaFunctionRecommendationsInput, ...func(*Options)) (*GetLambdaFunctionRecommendationsOutput, error) -} - -var _ GetLambdaFunctionRecommendationsAPIClient = (*Client)(nil) - // GetLambdaFunctionRecommendationsPaginatorOptions is the paginator options for // GetLambdaFunctionRecommendations type GetLambdaFunctionRecommendationsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *GetLambdaFunctionRecommendationsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetLambdaFunctionRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *GetLambdaFunctionRecommendationsPaginator) NextPage(ctx context.Context return result, nil } +// GetLambdaFunctionRecommendationsAPIClient is a client that implements the +// GetLambdaFunctionRecommendations operation. +type GetLambdaFunctionRecommendationsAPIClient interface { + GetLambdaFunctionRecommendations(context.Context, *GetLambdaFunctionRecommendationsInput, ...func(*Options)) (*GetLambdaFunctionRecommendationsOutput, error) +} + +var _ GetLambdaFunctionRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLambdaFunctionRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/computeoptimizer/api_op_GetLicenseRecommendations.go b/service/computeoptimizer/api_op_GetLicenseRecommendations.go index d772b47d119..3e383bc6450 100644 --- a/service/computeoptimizer/api_op_GetLicenseRecommendations.go +++ b/service/computeoptimizer/api_op_GetLicenseRecommendations.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetLicenseRecommendationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLicenseRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/computeoptimizer/api_op_GetRecommendationPreferences.go b/service/computeoptimizer/api_op_GetRecommendationPreferences.go index 635be0138d1..0418db438c0 100644 --- a/service/computeoptimizer/api_op_GetRecommendationPreferences.go +++ b/service/computeoptimizer/api_op_GetRecommendationPreferences.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetRecommendationPreferencesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationPreferencesValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationGetRecommendationPreferencesMiddlewares(stack *midd return nil } -// GetRecommendationPreferencesAPIClient is a client that implements the -// GetRecommendationPreferences operation. -type GetRecommendationPreferencesAPIClient interface { - GetRecommendationPreferences(context.Context, *GetRecommendationPreferencesInput, ...func(*Options)) (*GetRecommendationPreferencesOutput, error) -} - -var _ GetRecommendationPreferencesAPIClient = (*Client)(nil) - // GetRecommendationPreferencesPaginatorOptions is the paginator options for // GetRecommendationPreferences type GetRecommendationPreferencesPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *GetRecommendationPreferencesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetRecommendationPreferences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *GetRecommendationPreferencesPaginator) NextPage(ctx context.Context, op return result, nil } +// GetRecommendationPreferencesAPIClient is a client that implements the +// GetRecommendationPreferences operation. +type GetRecommendationPreferencesAPIClient interface { + GetRecommendationPreferences(context.Context, *GetRecommendationPreferencesInput, ...func(*Options)) (*GetRecommendationPreferencesOutput, error) +} + +var _ GetRecommendationPreferencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRecommendationPreferences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/computeoptimizer/api_op_GetRecommendationSummaries.go b/service/computeoptimizer/api_op_GetRecommendationSummaries.go index 89ea9f1ba0b..ecad20e6695 100644 --- a/service/computeoptimizer/api_op_GetRecommendationSummaries.go +++ b/service/computeoptimizer/api_op_GetRecommendationSummaries.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetRecommendationSummariesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRecommendationSummaries(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationGetRecommendationSummariesMiddlewares(stack *middle return nil } -// GetRecommendationSummariesAPIClient is a client that implements the -// GetRecommendationSummaries operation. -type GetRecommendationSummariesAPIClient interface { - GetRecommendationSummaries(context.Context, *GetRecommendationSummariesInput, ...func(*Options)) (*GetRecommendationSummariesOutput, error) -} - -var _ GetRecommendationSummariesAPIClient = (*Client)(nil) - // GetRecommendationSummariesPaginatorOptions is the paginator options for // GetRecommendationSummaries type GetRecommendationSummariesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *GetRecommendationSummariesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetRecommendationSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *GetRecommendationSummariesPaginator) NextPage(ctx context.Context, optF return result, nil } +// GetRecommendationSummariesAPIClient is a client that implements the +// GetRecommendationSummaries operation. +type GetRecommendationSummariesAPIClient interface { + GetRecommendationSummaries(context.Context, *GetRecommendationSummariesInput, ...func(*Options)) (*GetRecommendationSummariesOutput, error) +} + +var _ GetRecommendationSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRecommendationSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/computeoptimizer/api_op_PutRecommendationPreferences.go b/service/computeoptimizer/api_op_PutRecommendationPreferences.go index 357a25c8649..2591fcd789e 100644 --- a/service/computeoptimizer/api_op_PutRecommendationPreferences.go +++ b/service/computeoptimizer/api_op_PutRecommendationPreferences.go @@ -221,6 +221,9 @@ func (c *Client) addOperationPutRecommendationPreferencesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecommendationPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/computeoptimizer/api_op_UpdateEnrollmentStatus.go b/service/computeoptimizer/api_op_UpdateEnrollmentStatus.go index c232470025b..f00efad6e4f 100644 --- a/service/computeoptimizer/api_op_UpdateEnrollmentStatus.go +++ b/service/computeoptimizer/api_op_UpdateEnrollmentStatus.go @@ -147,6 +147,9 @@ func (c *Client) addOperationUpdateEnrollmentStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnrollmentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_client.go b/service/configservice/api_client.go index 2db9886e82a..a0f553b7869 100644 --- a/service/configservice/api_client.go +++ b/service/configservice/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/configservice/api_op_BatchGetAggregateResourceConfig.go b/service/configservice/api_op_BatchGetAggregateResourceConfig.go index ec0de4017d8..a6d9a40b7ee 100644 --- a/service/configservice/api_op_BatchGetAggregateResourceConfig.go +++ b/service/configservice/api_op_BatchGetAggregateResourceConfig.go @@ -122,6 +122,9 @@ func (c *Client) addOperationBatchGetAggregateResourceConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetAggregateResourceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_BatchGetResourceConfig.go b/service/configservice/api_op_BatchGetResourceConfig.go index dba8c35dacd..2b593a4620b 100644 --- a/service/configservice/api_op_BatchGetResourceConfig.go +++ b/service/configservice/api_op_BatchGetResourceConfig.go @@ -124,6 +124,9 @@ func (c *Client) addOperationBatchGetResourceConfigMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetResourceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteAggregationAuthorization.go b/service/configservice/api_op_DeleteAggregationAuthorization.go index 6f3fa000d8d..ca0ddf3c221 100644 --- a/service/configservice/api_op_DeleteAggregationAuthorization.go +++ b/service/configservice/api_op_DeleteAggregationAuthorization.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAggregationAuthorizationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAggregationAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteConfigRule.go b/service/configservice/api_op_DeleteConfigRule.go index ae174b71a2d..5756c34d0fc 100644 --- a/service/configservice/api_op_DeleteConfigRule.go +++ b/service/configservice/api_op_DeleteConfigRule.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteConfigRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteConfigurationAggregator.go b/service/configservice/api_op_DeleteConfigurationAggregator.go index 4526d7fbb2a..e50c047a5e3 100644 --- a/service/configservice/api_op_DeleteConfigurationAggregator.go +++ b/service/configservice/api_op_DeleteConfigurationAggregator.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteConfigurationAggregatorMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationAggregatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteConfigurationRecorder.go b/service/configservice/api_op_DeleteConfigurationRecorder.go index 0ced4203251..341b01538ae 100644 --- a/service/configservice/api_op_DeleteConfigurationRecorder.go +++ b/service/configservice/api_op_DeleteConfigurationRecorder.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteConfigurationRecorderMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationRecorderValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteConformancePack.go b/service/configservice/api_op_DeleteConformancePack.go index f876d7cbe30..eba8a0af477 100644 --- a/service/configservice/api_op_DeleteConformancePack.go +++ b/service/configservice/api_op_DeleteConformancePack.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteConformancePackMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConformancePackValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteDeliveryChannel.go b/service/configservice/api_op_DeleteDeliveryChannel.go index 36f3d023a80..6bdd2bb360c 100644 --- a/service/configservice/api_op_DeleteDeliveryChannel.go +++ b/service/configservice/api_op_DeleteDeliveryChannel.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDeliveryChannelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeliveryChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteEvaluationResults.go b/service/configservice/api_op_DeleteEvaluationResults.go index 50e77df0ab1..c5327b637d5 100644 --- a/service/configservice/api_op_DeleteEvaluationResults.go +++ b/service/configservice/api_op_DeleteEvaluationResults.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteEvaluationResultsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEvaluationResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteOrganizationConfigRule.go b/service/configservice/api_op_DeleteOrganizationConfigRule.go index 9a29b123edb..07c020cb4f6 100644 --- a/service/configservice/api_op_DeleteOrganizationConfigRule.go +++ b/service/configservice/api_op_DeleteOrganizationConfigRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteOrganizationConfigRuleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOrganizationConfigRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteOrganizationConformancePack.go b/service/configservice/api_op_DeleteOrganizationConformancePack.go index bea71e09d2b..9f6ee194781 100644 --- a/service/configservice/api_op_DeleteOrganizationConformancePack.go +++ b/service/configservice/api_op_DeleteOrganizationConformancePack.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteOrganizationConformancePackMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOrganizationConformancePackValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeletePendingAggregationRequest.go b/service/configservice/api_op_DeletePendingAggregationRequest.go index c07ff19aa23..13899d13919 100644 --- a/service/configservice/api_op_DeletePendingAggregationRequest.go +++ b/service/configservice/api_op_DeletePendingAggregationRequest.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePendingAggregationRequestMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePendingAggregationRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteRemediationConfiguration.go b/service/configservice/api_op_DeleteRemediationConfiguration.go index 4365a76f415..bedd5425efa 100644 --- a/service/configservice/api_op_DeleteRemediationConfiguration.go +++ b/service/configservice/api_op_DeleteRemediationConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteRemediationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRemediationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteRemediationExceptions.go b/service/configservice/api_op_DeleteRemediationExceptions.go index 20281b0b7b3..36a63d08870 100644 --- a/service/configservice/api_op_DeleteRemediationExceptions.go +++ b/service/configservice/api_op_DeleteRemediationExceptions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteRemediationExceptionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRemediationExceptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteResourceConfig.go b/service/configservice/api_op_DeleteResourceConfig.go index 8b3677830d8..6a104337a3b 100644 --- a/service/configservice/api_op_DeleteResourceConfig.go +++ b/service/configservice/api_op_DeleteResourceConfig.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteResourceConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteRetentionConfiguration.go b/service/configservice/api_op_DeleteRetentionConfiguration.go index 29188ea079c..fc8118d250c 100644 --- a/service/configservice/api_op_DeleteRetentionConfiguration.go +++ b/service/configservice/api_op_DeleteRetentionConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRetentionConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRetentionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeleteStoredQuery.go b/service/configservice/api_op_DeleteStoredQuery.go index 194abce41cd..357046c2bd1 100644 --- a/service/configservice/api_op_DeleteStoredQuery.go +++ b/service/configservice/api_op_DeleteStoredQuery.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteStoredQueryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStoredQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DeliverConfigSnapshot.go b/service/configservice/api_op_DeliverConfigSnapshot.go index 1d7b344aef9..14f04c054f3 100644 --- a/service/configservice/api_op_DeliverConfigSnapshot.go +++ b/service/configservice/api_op_DeliverConfigSnapshot.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeliverConfigSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeliverConfigSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go b/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go index d9e08607d24..2bf3c2e5927 100644 --- a/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go +++ b/service/configservice/api_op_DescribeAggregateComplianceByConfigRules.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeAggregateComplianceByConfigRulesMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAggregateComplianceByConfigRulesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeAggregateComplianceByConfigRulesMiddlewares return nil } -// DescribeAggregateComplianceByConfigRulesAPIClient is a client that implements -// the DescribeAggregateComplianceByConfigRules operation. -type DescribeAggregateComplianceByConfigRulesAPIClient interface { - DescribeAggregateComplianceByConfigRules(context.Context, *DescribeAggregateComplianceByConfigRulesInput, ...func(*Options)) (*DescribeAggregateComplianceByConfigRulesOutput, error) -} - -var _ DescribeAggregateComplianceByConfigRulesAPIClient = (*Client)(nil) - // DescribeAggregateComplianceByConfigRulesPaginatorOptions is the paginator // options for DescribeAggregateComplianceByConfigRules type DescribeAggregateComplianceByConfigRulesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeAggregateComplianceByConfigRulesPaginator) NextPage(ctx context params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAggregateComplianceByConfigRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeAggregateComplianceByConfigRulesPaginator) NextPage(ctx context return result, nil } +// DescribeAggregateComplianceByConfigRulesAPIClient is a client that implements +// the DescribeAggregateComplianceByConfigRules operation. +type DescribeAggregateComplianceByConfigRulesAPIClient interface { + DescribeAggregateComplianceByConfigRules(context.Context, *DescribeAggregateComplianceByConfigRulesInput, ...func(*Options)) (*DescribeAggregateComplianceByConfigRulesOutput, error) +} + +var _ DescribeAggregateComplianceByConfigRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAggregateComplianceByConfigRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go b/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go index 132bde46007..06a70cae2f1 100644 --- a/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go +++ b/service/configservice/api_op_DescribeAggregateComplianceByConformancePacks.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeAggregateComplianceByConformancePacksMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAggregateComplianceByConformancePacksValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeAggregateComplianceByConformancePacksMiddle return nil } -// DescribeAggregateComplianceByConformancePacksAPIClient is a client that -// implements the DescribeAggregateComplianceByConformancePacks operation. -type DescribeAggregateComplianceByConformancePacksAPIClient interface { - DescribeAggregateComplianceByConformancePacks(context.Context, *DescribeAggregateComplianceByConformancePacksInput, ...func(*Options)) (*DescribeAggregateComplianceByConformancePacksOutput, error) -} - -var _ DescribeAggregateComplianceByConformancePacksAPIClient = (*Client)(nil) - // DescribeAggregateComplianceByConformancePacksPaginatorOptions is the paginator // options for DescribeAggregateComplianceByConformancePacks type DescribeAggregateComplianceByConformancePacksPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeAggregateComplianceByConformancePacksPaginator) NextPage(ctx co params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAggregateComplianceByConformancePacks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeAggregateComplianceByConformancePacksPaginator) NextPage(ctx co return result, nil } +// DescribeAggregateComplianceByConformancePacksAPIClient is a client that +// implements the DescribeAggregateComplianceByConformancePacks operation. +type DescribeAggregateComplianceByConformancePacksAPIClient interface { + DescribeAggregateComplianceByConformancePacks(context.Context, *DescribeAggregateComplianceByConformancePacksInput, ...func(*Options)) (*DescribeAggregateComplianceByConformancePacksOutput, error) +} + +var _ DescribeAggregateComplianceByConformancePacksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAggregateComplianceByConformancePacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeAggregationAuthorizations.go b/service/configservice/api_op_DescribeAggregationAuthorizations.go index ccbc90ce353..053fa38fb95 100644 --- a/service/configservice/api_op_DescribeAggregationAuthorizations.go +++ b/service/configservice/api_op_DescribeAggregationAuthorizations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAggregationAuthorizationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAggregationAuthorizations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeAggregationAuthorizationsMiddlewares(stack return nil } -// DescribeAggregationAuthorizationsAPIClient is a client that implements the -// DescribeAggregationAuthorizations operation. -type DescribeAggregationAuthorizationsAPIClient interface { - DescribeAggregationAuthorizations(context.Context, *DescribeAggregationAuthorizationsInput, ...func(*Options)) (*DescribeAggregationAuthorizationsOutput, error) -} - -var _ DescribeAggregationAuthorizationsAPIClient = (*Client)(nil) - // DescribeAggregationAuthorizationsPaginatorOptions is the paginator options for // DescribeAggregationAuthorizations type DescribeAggregationAuthorizationsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *DescribeAggregationAuthorizationsPaginator) NextPage(ctx context.Contex params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAggregationAuthorizations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *DescribeAggregationAuthorizationsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeAggregationAuthorizationsAPIClient is a client that implements the +// DescribeAggregationAuthorizations operation. +type DescribeAggregationAuthorizationsAPIClient interface { + DescribeAggregationAuthorizations(context.Context, *DescribeAggregationAuthorizationsInput, ...func(*Options)) (*DescribeAggregationAuthorizationsOutput, error) +} + +var _ DescribeAggregationAuthorizationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAggregationAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeComplianceByConfigRule.go b/service/configservice/api_op_DescribeComplianceByConfigRule.go index 18ca97c4b71..9cbe1d35816 100644 --- a/service/configservice/api_op_DescribeComplianceByConfigRule.go +++ b/service/configservice/api_op_DescribeComplianceByConfigRule.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeComplianceByConfigRuleMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeComplianceByConfigRule(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeComplianceByConfigRuleMiddlewares(stack *mi return nil } -// DescribeComplianceByConfigRuleAPIClient is a client that implements the -// DescribeComplianceByConfigRule operation. -type DescribeComplianceByConfigRuleAPIClient interface { - DescribeComplianceByConfigRule(context.Context, *DescribeComplianceByConfigRuleInput, ...func(*Options)) (*DescribeComplianceByConfigRuleOutput, error) -} - -var _ DescribeComplianceByConfigRuleAPIClient = (*Client)(nil) - // DescribeComplianceByConfigRulePaginatorOptions is the paginator options for // DescribeComplianceByConfigRule type DescribeComplianceByConfigRulePaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeComplianceByConfigRulePaginator) NextPage(ctx context.Context, params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeComplianceByConfigRule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeComplianceByConfigRulePaginator) NextPage(ctx context.Context, return result, nil } +// DescribeComplianceByConfigRuleAPIClient is a client that implements the +// DescribeComplianceByConfigRule operation. +type DescribeComplianceByConfigRuleAPIClient interface { + DescribeComplianceByConfigRule(context.Context, *DescribeComplianceByConfigRuleInput, ...func(*Options)) (*DescribeComplianceByConfigRuleOutput, error) +} + +var _ DescribeComplianceByConfigRuleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeComplianceByConfigRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeComplianceByResource.go b/service/configservice/api_op_DescribeComplianceByResource.go index 7cbb632e8f5..c39b8aae39b 100644 --- a/service/configservice/api_op_DescribeComplianceByResource.go +++ b/service/configservice/api_op_DescribeComplianceByResource.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeComplianceByResourceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeComplianceByResource(options.Region), middleware.Before); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationDescribeComplianceByResourceMiddlewares(stack *midd return nil } -// DescribeComplianceByResourceAPIClient is a client that implements the -// DescribeComplianceByResource operation. -type DescribeComplianceByResourceAPIClient interface { - DescribeComplianceByResource(context.Context, *DescribeComplianceByResourceInput, ...func(*Options)) (*DescribeComplianceByResourceOutput, error) -} - -var _ DescribeComplianceByResourceAPIClient = (*Client)(nil) - // DescribeComplianceByResourcePaginatorOptions is the paginator options for // DescribeComplianceByResource type DescribeComplianceByResourcePaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *DescribeComplianceByResourcePaginator) NextPage(ctx context.Context, op params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeComplianceByResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *DescribeComplianceByResourcePaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeComplianceByResourceAPIClient is a client that implements the +// DescribeComplianceByResource operation. +type DescribeComplianceByResourceAPIClient interface { + DescribeComplianceByResource(context.Context, *DescribeComplianceByResourceInput, ...func(*Options)) (*DescribeComplianceByResourceOutput, error) +} + +var _ DescribeComplianceByResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeComplianceByResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go index 9e4fef517eb..8a8a5893718 100644 --- a/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go +++ b/service/configservice/api_op_DescribeConfigRuleEvaluationStatus.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeConfigRuleEvaluationStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigRuleEvaluationStatus(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeConfigRuleEvaluationStatusMiddlewares(stack return nil } -// DescribeConfigRuleEvaluationStatusAPIClient is a client that implements the -// DescribeConfigRuleEvaluationStatus operation. -type DescribeConfigRuleEvaluationStatusAPIClient interface { - DescribeConfigRuleEvaluationStatus(context.Context, *DescribeConfigRuleEvaluationStatusInput, ...func(*Options)) (*DescribeConfigRuleEvaluationStatusOutput, error) -} - -var _ DescribeConfigRuleEvaluationStatusAPIClient = (*Client)(nil) - // DescribeConfigRuleEvaluationStatusPaginatorOptions is the paginator options for // DescribeConfigRuleEvaluationStatus type DescribeConfigRuleEvaluationStatusPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeConfigRuleEvaluationStatusPaginator) NextPage(ctx context.Conte params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConfigRuleEvaluationStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeConfigRuleEvaluationStatusPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeConfigRuleEvaluationStatusAPIClient is a client that implements the +// DescribeConfigRuleEvaluationStatus operation. +type DescribeConfigRuleEvaluationStatusAPIClient interface { + DescribeConfigRuleEvaluationStatus(context.Context, *DescribeConfigRuleEvaluationStatusInput, ...func(*Options)) (*DescribeConfigRuleEvaluationStatusOutput, error) +} + +var _ DescribeConfigRuleEvaluationStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConfigRuleEvaluationStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigRules.go b/service/configservice/api_op_DescribeConfigRules.go index b41c4262f57..36e786fb85a 100644 --- a/service/configservice/api_op_DescribeConfigRules.go +++ b/service/configservice/api_op_DescribeConfigRules.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeConfigRulesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigRules(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeConfigRulesMiddlewares(stack *middleware.St return nil } -// DescribeConfigRulesAPIClient is a client that implements the -// DescribeConfigRules operation. -type DescribeConfigRulesAPIClient interface { - DescribeConfigRules(context.Context, *DescribeConfigRulesInput, ...func(*Options)) (*DescribeConfigRulesOutput, error) -} - -var _ DescribeConfigRulesAPIClient = (*Client)(nil) - // DescribeConfigRulesPaginatorOptions is the paginator options for // DescribeConfigRules type DescribeConfigRulesPaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *DescribeConfigRulesPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConfigRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *DescribeConfigRulesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeConfigRulesAPIClient is a client that implements the +// DescribeConfigRules operation. +type DescribeConfigRulesAPIClient interface { + DescribeConfigRules(context.Context, *DescribeConfigRulesInput, ...func(*Options)) (*DescribeConfigRulesOutput, error) +} + +var _ DescribeConfigRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConfigRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go b/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go index c6fedccb0d5..943893103b8 100644 --- a/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go +++ b/service/configservice/api_op_DescribeConfigurationAggregatorSourcesStatus.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeConfigurationAggregatorSourcesStatusMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationAggregatorSourcesStatusValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeConfigurationAggregatorSourcesStatusMiddlew return nil } -// DescribeConfigurationAggregatorSourcesStatusAPIClient is a client that -// implements the DescribeConfigurationAggregatorSourcesStatus operation. -type DescribeConfigurationAggregatorSourcesStatusAPIClient interface { - DescribeConfigurationAggregatorSourcesStatus(context.Context, *DescribeConfigurationAggregatorSourcesStatusInput, ...func(*Options)) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) -} - -var _ DescribeConfigurationAggregatorSourcesStatusAPIClient = (*Client)(nil) - // DescribeConfigurationAggregatorSourcesStatusPaginatorOptions is the paginator // options for DescribeConfigurationAggregatorSourcesStatus type DescribeConfigurationAggregatorSourcesStatusPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeConfigurationAggregatorSourcesStatusPaginator) NextPage(ctx con params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConfigurationAggregatorSourcesStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeConfigurationAggregatorSourcesStatusPaginator) NextPage(ctx con return result, nil } +// DescribeConfigurationAggregatorSourcesStatusAPIClient is a client that +// implements the DescribeConfigurationAggregatorSourcesStatus operation. +type DescribeConfigurationAggregatorSourcesStatusAPIClient interface { + DescribeConfigurationAggregatorSourcesStatus(context.Context, *DescribeConfigurationAggregatorSourcesStatusInput, ...func(*Options)) (*DescribeConfigurationAggregatorSourcesStatusOutput, error) +} + +var _ DescribeConfigurationAggregatorSourcesStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConfigurationAggregatorSourcesStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigurationAggregators.go b/service/configservice/api_op_DescribeConfigurationAggregators.go index faec2443ab5..edbf3c3befd 100644 --- a/service/configservice/api_op_DescribeConfigurationAggregators.go +++ b/service/configservice/api_op_DescribeConfigurationAggregators.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeConfigurationAggregatorsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationAggregators(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeConfigurationAggregatorsMiddlewares(stack * return nil } -// DescribeConfigurationAggregatorsAPIClient is a client that implements the -// DescribeConfigurationAggregators operation. -type DescribeConfigurationAggregatorsAPIClient interface { - DescribeConfigurationAggregators(context.Context, *DescribeConfigurationAggregatorsInput, ...func(*Options)) (*DescribeConfigurationAggregatorsOutput, error) -} - -var _ DescribeConfigurationAggregatorsAPIClient = (*Client)(nil) - // DescribeConfigurationAggregatorsPaginatorOptions is the paginator options for // DescribeConfigurationAggregators type DescribeConfigurationAggregatorsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeConfigurationAggregatorsPaginator) NextPage(ctx context.Context params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConfigurationAggregators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeConfigurationAggregatorsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeConfigurationAggregatorsAPIClient is a client that implements the +// DescribeConfigurationAggregators operation. +type DescribeConfigurationAggregatorsAPIClient interface { + DescribeConfigurationAggregators(context.Context, *DescribeConfigurationAggregatorsInput, ...func(*Options)) (*DescribeConfigurationAggregatorsOutput, error) +} + +var _ DescribeConfigurationAggregatorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConfigurationAggregators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConfigurationRecorderStatus.go b/service/configservice/api_op_DescribeConfigurationRecorderStatus.go index eb8fb07d427..108db6a3e5f 100644 --- a/service/configservice/api_op_DescribeConfigurationRecorderStatus.go +++ b/service/configservice/api_op_DescribeConfigurationRecorderStatus.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeConfigurationRecorderStatusMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationRecorderStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_DescribeConfigurationRecorders.go b/service/configservice/api_op_DescribeConfigurationRecorders.go index c899206a799..1c68012342d 100644 --- a/service/configservice/api_op_DescribeConfigurationRecorders.go +++ b/service/configservice/api_op_DescribeConfigurationRecorders.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeConfigurationRecordersMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationRecorders(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_DescribeConformancePackCompliance.go b/service/configservice/api_op_DescribeConformancePackCompliance.go index 4ba27b6a56e..197531ffaa4 100644 --- a/service/configservice/api_op_DescribeConformancePackCompliance.go +++ b/service/configservice/api_op_DescribeConformancePackCompliance.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeConformancePackComplianceMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConformancePackComplianceValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeConformancePackComplianceMiddlewares(stack return nil } -// DescribeConformancePackComplianceAPIClient is a client that implements the -// DescribeConformancePackCompliance operation. -type DescribeConformancePackComplianceAPIClient interface { - DescribeConformancePackCompliance(context.Context, *DescribeConformancePackComplianceInput, ...func(*Options)) (*DescribeConformancePackComplianceOutput, error) -} - -var _ DescribeConformancePackComplianceAPIClient = (*Client)(nil) - // DescribeConformancePackCompliancePaginatorOptions is the paginator options for // DescribeConformancePackCompliance type DescribeConformancePackCompliancePaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeConformancePackCompliancePaginator) NextPage(ctx context.Contex params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConformancePackCompliance(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeConformancePackCompliancePaginator) NextPage(ctx context.Contex return result, nil } +// DescribeConformancePackComplianceAPIClient is a client that implements the +// DescribeConformancePackCompliance operation. +type DescribeConformancePackComplianceAPIClient interface { + DescribeConformancePackCompliance(context.Context, *DescribeConformancePackComplianceInput, ...func(*Options)) (*DescribeConformancePackComplianceOutput, error) +} + +var _ DescribeConformancePackComplianceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConformancePackCompliance(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConformancePackStatus.go b/service/configservice/api_op_DescribeConformancePackStatus.go index b26a0e9d9f5..f92de1e2d0c 100644 --- a/service/configservice/api_op_DescribeConformancePackStatus.go +++ b/service/configservice/api_op_DescribeConformancePackStatus.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeConformancePackStatusMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConformancePackStatus(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeConformancePackStatusMiddlewares(stack *mid return nil } -// DescribeConformancePackStatusAPIClient is a client that implements the -// DescribeConformancePackStatus operation. -type DescribeConformancePackStatusAPIClient interface { - DescribeConformancePackStatus(context.Context, *DescribeConformancePackStatusInput, ...func(*Options)) (*DescribeConformancePackStatusOutput, error) -} - -var _ DescribeConformancePackStatusAPIClient = (*Client)(nil) - // DescribeConformancePackStatusPaginatorOptions is the paginator options for // DescribeConformancePackStatus type DescribeConformancePackStatusPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *DescribeConformancePackStatusPaginator) NextPage(ctx context.Context, o params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConformancePackStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *DescribeConformancePackStatusPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeConformancePackStatusAPIClient is a client that implements the +// DescribeConformancePackStatus operation. +type DescribeConformancePackStatusAPIClient interface { + DescribeConformancePackStatus(context.Context, *DescribeConformancePackStatusInput, ...func(*Options)) (*DescribeConformancePackStatusOutput, error) +} + +var _ DescribeConformancePackStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConformancePackStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeConformancePacks.go b/service/configservice/api_op_DescribeConformancePacks.go index 92654b372c1..e236a615482 100644 --- a/service/configservice/api_op_DescribeConformancePacks.go +++ b/service/configservice/api_op_DescribeConformancePacks.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeConformancePacksMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConformancePacks(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeConformancePacksMiddlewares(stack *middlewa return nil } -// DescribeConformancePacksAPIClient is a client that implements the -// DescribeConformancePacks operation. -type DescribeConformancePacksAPIClient interface { - DescribeConformancePacks(context.Context, *DescribeConformancePacksInput, ...func(*Options)) (*DescribeConformancePacksOutput, error) -} - -var _ DescribeConformancePacksAPIClient = (*Client)(nil) - // DescribeConformancePacksPaginatorOptions is the paginator options for // DescribeConformancePacks type DescribeConformancePacksPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *DescribeConformancePacksPaginator) NextPage(ctx context.Context, optFns params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConformancePacks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *DescribeConformancePacksPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeConformancePacksAPIClient is a client that implements the +// DescribeConformancePacks operation. +type DescribeConformancePacksAPIClient interface { + DescribeConformancePacks(context.Context, *DescribeConformancePacksInput, ...func(*Options)) (*DescribeConformancePacksOutput, error) +} + +var _ DescribeConformancePacksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConformancePacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeDeliveryChannelStatus.go b/service/configservice/api_op_DescribeDeliveryChannelStatus.go index 1ebf29dd2e2..d0a3807c21c 100644 --- a/service/configservice/api_op_DescribeDeliveryChannelStatus.go +++ b/service/configservice/api_op_DescribeDeliveryChannelStatus.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeDeliveryChannelStatusMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliveryChannelStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_DescribeDeliveryChannels.go b/service/configservice/api_op_DescribeDeliveryChannels.go index 9c9154756a0..c237ab596af 100644 --- a/service/configservice/api_op_DescribeDeliveryChannels.go +++ b/service/configservice/api_op_DescribeDeliveryChannels.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeDeliveryChannelsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeliveryChannels(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go b/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go index 316f611da21..910aefc6f73 100644 --- a/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go +++ b/service/configservice/api_op_DescribeOrganizationConfigRuleStatuses.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeOrganizationConfigRuleStatusesMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfigRuleStatuses(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeOrganizationConfigRuleStatusesMiddlewares(s return nil } -// DescribeOrganizationConfigRuleStatusesAPIClient is a client that implements the -// DescribeOrganizationConfigRuleStatuses operation. -type DescribeOrganizationConfigRuleStatusesAPIClient interface { - DescribeOrganizationConfigRuleStatuses(context.Context, *DescribeOrganizationConfigRuleStatusesInput, ...func(*Options)) (*DescribeOrganizationConfigRuleStatusesOutput, error) -} - -var _ DescribeOrganizationConfigRuleStatusesAPIClient = (*Client)(nil) - // DescribeOrganizationConfigRuleStatusesPaginatorOptions is the paginator options // for DescribeOrganizationConfigRuleStatuses type DescribeOrganizationConfigRuleStatusesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeOrganizationConfigRuleStatusesPaginator) NextPage(ctx context.C params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrganizationConfigRuleStatuses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeOrganizationConfigRuleStatusesPaginator) NextPage(ctx context.C return result, nil } +// DescribeOrganizationConfigRuleStatusesAPIClient is a client that implements the +// DescribeOrganizationConfigRuleStatuses operation. +type DescribeOrganizationConfigRuleStatusesAPIClient interface { + DescribeOrganizationConfigRuleStatuses(context.Context, *DescribeOrganizationConfigRuleStatusesInput, ...func(*Options)) (*DescribeOrganizationConfigRuleStatusesOutput, error) +} + +var _ DescribeOrganizationConfigRuleStatusesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrganizationConfigRuleStatuses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConfigRules.go b/service/configservice/api_op_DescribeOrganizationConfigRules.go index 2f2e1dcfb97..4be435e75ba 100644 --- a/service/configservice/api_op_DescribeOrganizationConfigRules.go +++ b/service/configservice/api_op_DescribeOrganizationConfigRules.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeOrganizationConfigRulesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfigRules(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeOrganizationConfigRulesMiddlewares(stack *m return nil } -// DescribeOrganizationConfigRulesAPIClient is a client that implements the -// DescribeOrganizationConfigRules operation. -type DescribeOrganizationConfigRulesAPIClient interface { - DescribeOrganizationConfigRules(context.Context, *DescribeOrganizationConfigRulesInput, ...func(*Options)) (*DescribeOrganizationConfigRulesOutput, error) -} - -var _ DescribeOrganizationConfigRulesAPIClient = (*Client)(nil) - // DescribeOrganizationConfigRulesPaginatorOptions is the paginator options for // DescribeOrganizationConfigRules type DescribeOrganizationConfigRulesPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeOrganizationConfigRulesPaginator) NextPage(ctx context.Context, params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrganizationConfigRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeOrganizationConfigRulesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeOrganizationConfigRulesAPIClient is a client that implements the +// DescribeOrganizationConfigRules operation. +type DescribeOrganizationConfigRulesAPIClient interface { + DescribeOrganizationConfigRules(context.Context, *DescribeOrganizationConfigRulesInput, ...func(*Options)) (*DescribeOrganizationConfigRulesOutput, error) +} + +var _ DescribeOrganizationConfigRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrganizationConfigRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go b/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go index 3b03bc9349d..9a66678f522 100644 --- a/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go +++ b/service/configservice/api_op_DescribeOrganizationConformancePackStatuses.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeOrganizationConformancePackStatusesMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConformancePackStatuses(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeOrganizationConformancePackStatusesMiddlewa return nil } -// DescribeOrganizationConformancePackStatusesAPIClient is a client that -// implements the DescribeOrganizationConformancePackStatuses operation. -type DescribeOrganizationConformancePackStatusesAPIClient interface { - DescribeOrganizationConformancePackStatuses(context.Context, *DescribeOrganizationConformancePackStatusesInput, ...func(*Options)) (*DescribeOrganizationConformancePackStatusesOutput, error) -} - -var _ DescribeOrganizationConformancePackStatusesAPIClient = (*Client)(nil) - // DescribeOrganizationConformancePackStatusesPaginatorOptions is the paginator // options for DescribeOrganizationConformancePackStatuses type DescribeOrganizationConformancePackStatusesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeOrganizationConformancePackStatusesPaginator) NextPage(ctx cont params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrganizationConformancePackStatuses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeOrganizationConformancePackStatusesPaginator) NextPage(ctx cont return result, nil } +// DescribeOrganizationConformancePackStatusesAPIClient is a client that +// implements the DescribeOrganizationConformancePackStatuses operation. +type DescribeOrganizationConformancePackStatusesAPIClient interface { + DescribeOrganizationConformancePackStatuses(context.Context, *DescribeOrganizationConformancePackStatusesInput, ...func(*Options)) (*DescribeOrganizationConformancePackStatusesOutput, error) +} + +var _ DescribeOrganizationConformancePackStatusesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrganizationConformancePackStatuses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeOrganizationConformancePacks.go b/service/configservice/api_op_DescribeOrganizationConformancePacks.go index 08d111c6973..f01bde3784a 100644 --- a/service/configservice/api_op_DescribeOrganizationConformancePacks.go +++ b/service/configservice/api_op_DescribeOrganizationConformancePacks.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeOrganizationConformancePacksMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConformancePacks(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeOrganizationConformancePacksMiddlewares(sta return nil } -// DescribeOrganizationConformancePacksAPIClient is a client that implements the -// DescribeOrganizationConformancePacks operation. -type DescribeOrganizationConformancePacksAPIClient interface { - DescribeOrganizationConformancePacks(context.Context, *DescribeOrganizationConformancePacksInput, ...func(*Options)) (*DescribeOrganizationConformancePacksOutput, error) -} - -var _ DescribeOrganizationConformancePacksAPIClient = (*Client)(nil) - // DescribeOrganizationConformancePacksPaginatorOptions is the paginator options // for DescribeOrganizationConformancePacks type DescribeOrganizationConformancePacksPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeOrganizationConformancePacksPaginator) NextPage(ctx context.Con params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrganizationConformancePacks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeOrganizationConformancePacksPaginator) NextPage(ctx context.Con return result, nil } +// DescribeOrganizationConformancePacksAPIClient is a client that implements the +// DescribeOrganizationConformancePacks operation. +type DescribeOrganizationConformancePacksAPIClient interface { + DescribeOrganizationConformancePacks(context.Context, *DescribeOrganizationConformancePacksInput, ...func(*Options)) (*DescribeOrganizationConformancePacksOutput, error) +} + +var _ DescribeOrganizationConformancePacksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrganizationConformancePacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribePendingAggregationRequests.go b/service/configservice/api_op_DescribePendingAggregationRequests.go index 376b47142bb..02553506195 100644 --- a/service/configservice/api_op_DescribePendingAggregationRequests.go +++ b/service/configservice/api_op_DescribePendingAggregationRequests.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribePendingAggregationRequestsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePendingAggregationRequests(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribePendingAggregationRequestsMiddlewares(stack return nil } -// DescribePendingAggregationRequestsAPIClient is a client that implements the -// DescribePendingAggregationRequests operation. -type DescribePendingAggregationRequestsAPIClient interface { - DescribePendingAggregationRequests(context.Context, *DescribePendingAggregationRequestsInput, ...func(*Options)) (*DescribePendingAggregationRequestsOutput, error) -} - -var _ DescribePendingAggregationRequestsAPIClient = (*Client)(nil) - // DescribePendingAggregationRequestsPaginatorOptions is the paginator options for // DescribePendingAggregationRequests type DescribePendingAggregationRequestsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *DescribePendingAggregationRequestsPaginator) NextPage(ctx context.Conte params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePendingAggregationRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *DescribePendingAggregationRequestsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribePendingAggregationRequestsAPIClient is a client that implements the +// DescribePendingAggregationRequests operation. +type DescribePendingAggregationRequestsAPIClient interface { + DescribePendingAggregationRequests(context.Context, *DescribePendingAggregationRequestsInput, ...func(*Options)) (*DescribePendingAggregationRequestsOutput, error) +} + +var _ DescribePendingAggregationRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePendingAggregationRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeRemediationConfigurations.go b/service/configservice/api_op_DescribeRemediationConfigurations.go index 0afddd4f307..c1979452474 100644 --- a/service/configservice/api_op_DescribeRemediationConfigurations.go +++ b/service/configservice/api_op_DescribeRemediationConfigurations.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeRemediationConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRemediationConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_DescribeRemediationExceptions.go b/service/configservice/api_op_DescribeRemediationExceptions.go index 1eb7293d381..ffb320d0812 100644 --- a/service/configservice/api_op_DescribeRemediationExceptions.go +++ b/service/configservice/api_op_DescribeRemediationExceptions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeRemediationExceptionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRemediationExceptionsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeRemediationExceptionsMiddlewares(stack *mid return nil } -// DescribeRemediationExceptionsAPIClient is a client that implements the -// DescribeRemediationExceptions operation. -type DescribeRemediationExceptionsAPIClient interface { - DescribeRemediationExceptions(context.Context, *DescribeRemediationExceptionsInput, ...func(*Options)) (*DescribeRemediationExceptionsOutput, error) -} - -var _ DescribeRemediationExceptionsAPIClient = (*Client)(nil) - // DescribeRemediationExceptionsPaginatorOptions is the paginator options for // DescribeRemediationExceptions type DescribeRemediationExceptionsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeRemediationExceptionsPaginator) NextPage(ctx context.Context, o params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRemediationExceptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeRemediationExceptionsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeRemediationExceptionsAPIClient is a client that implements the +// DescribeRemediationExceptions operation. +type DescribeRemediationExceptionsAPIClient interface { + DescribeRemediationExceptions(context.Context, *DescribeRemediationExceptionsInput, ...func(*Options)) (*DescribeRemediationExceptionsOutput, error) +} + +var _ DescribeRemediationExceptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRemediationExceptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeRemediationExecutionStatus.go b/service/configservice/api_op_DescribeRemediationExecutionStatus.go index e3eeedd2948..3f471f3ed56 100644 --- a/service/configservice/api_op_DescribeRemediationExecutionStatus.go +++ b/service/configservice/api_op_DescribeRemediationExecutionStatus.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeRemediationExecutionStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRemediationExecutionStatusValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeRemediationExecutionStatusMiddlewares(stack return nil } -// DescribeRemediationExecutionStatusAPIClient is a client that implements the -// DescribeRemediationExecutionStatus operation. -type DescribeRemediationExecutionStatusAPIClient interface { - DescribeRemediationExecutionStatus(context.Context, *DescribeRemediationExecutionStatusInput, ...func(*Options)) (*DescribeRemediationExecutionStatusOutput, error) -} - -var _ DescribeRemediationExecutionStatusAPIClient = (*Client)(nil) - // DescribeRemediationExecutionStatusPaginatorOptions is the paginator options for // DescribeRemediationExecutionStatus type DescribeRemediationExecutionStatusPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeRemediationExecutionStatusPaginator) NextPage(ctx context.Conte params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRemediationExecutionStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeRemediationExecutionStatusPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeRemediationExecutionStatusAPIClient is a client that implements the +// DescribeRemediationExecutionStatus operation. +type DescribeRemediationExecutionStatusAPIClient interface { + DescribeRemediationExecutionStatus(context.Context, *DescribeRemediationExecutionStatusInput, ...func(*Options)) (*DescribeRemediationExecutionStatusOutput, error) +} + +var _ DescribeRemediationExecutionStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRemediationExecutionStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_DescribeRetentionConfigurations.go b/service/configservice/api_op_DescribeRetentionConfigurations.go index e48f658d21f..278eb165a83 100644 --- a/service/configservice/api_op_DescribeRetentionConfigurations.go +++ b/service/configservice/api_op_DescribeRetentionConfigurations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeRetentionConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRetentionConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationDescribeRetentionConfigurationsMiddlewares(stack *m return nil } -// DescribeRetentionConfigurationsAPIClient is a client that implements the -// DescribeRetentionConfigurations operation. -type DescribeRetentionConfigurationsAPIClient interface { - DescribeRetentionConfigurations(context.Context, *DescribeRetentionConfigurationsInput, ...func(*Options)) (*DescribeRetentionConfigurationsOutput, error) -} - -var _ DescribeRetentionConfigurationsAPIClient = (*Client)(nil) - // DescribeRetentionConfigurationsPaginatorOptions is the paginator options for // DescribeRetentionConfigurations type DescribeRetentionConfigurationsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *DescribeRetentionConfigurationsPaginator) NextPage(ctx context.Context, params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRetentionConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *DescribeRetentionConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeRetentionConfigurationsAPIClient is a client that implements the +// DescribeRetentionConfigurations operation. +type DescribeRetentionConfigurationsAPIClient interface { + DescribeRetentionConfigurations(context.Context, *DescribeRetentionConfigurationsInput, ...func(*Options)) (*DescribeRetentionConfigurationsOutput, error) +} + +var _ DescribeRetentionConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRetentionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go index 6634f28c70e..e59b971aa59 100644 --- a/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetAggregateComplianceDetailsByConfigRule.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetAggregateComplianceDetailsByConfigRuleMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAggregateComplianceDetailsByConfigRuleValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationGetAggregateComplianceDetailsByConfigRuleMiddleware return nil } -// GetAggregateComplianceDetailsByConfigRuleAPIClient is a client that implements -// the GetAggregateComplianceDetailsByConfigRule operation. -type GetAggregateComplianceDetailsByConfigRuleAPIClient interface { - GetAggregateComplianceDetailsByConfigRule(context.Context, *GetAggregateComplianceDetailsByConfigRuleInput, ...func(*Options)) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) -} - -var _ GetAggregateComplianceDetailsByConfigRuleAPIClient = (*Client)(nil) - // GetAggregateComplianceDetailsByConfigRulePaginatorOptions is the paginator // options for GetAggregateComplianceDetailsByConfigRule type GetAggregateComplianceDetailsByConfigRulePaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *GetAggregateComplianceDetailsByConfigRulePaginator) NextPage(ctx contex params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAggregateComplianceDetailsByConfigRule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *GetAggregateComplianceDetailsByConfigRulePaginator) NextPage(ctx contex return result, nil } +// GetAggregateComplianceDetailsByConfigRuleAPIClient is a client that implements +// the GetAggregateComplianceDetailsByConfigRule operation. +type GetAggregateComplianceDetailsByConfigRuleAPIClient interface { + GetAggregateComplianceDetailsByConfigRule(context.Context, *GetAggregateComplianceDetailsByConfigRuleInput, ...func(*Options)) (*GetAggregateComplianceDetailsByConfigRuleOutput, error) +} + +var _ GetAggregateComplianceDetailsByConfigRuleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAggregateComplianceDetailsByConfigRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go b/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go index 26ec8a9fed9..08324d4fb43 100644 --- a/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go +++ b/service/configservice/api_op_GetAggregateConfigRuleComplianceSummary.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetAggregateConfigRuleComplianceSummaryMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAggregateConfigRuleComplianceSummaryValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationGetAggregateConfigRuleComplianceSummaryMiddlewares( return nil } -// GetAggregateConfigRuleComplianceSummaryAPIClient is a client that implements -// the GetAggregateConfigRuleComplianceSummary operation. -type GetAggregateConfigRuleComplianceSummaryAPIClient interface { - GetAggregateConfigRuleComplianceSummary(context.Context, *GetAggregateConfigRuleComplianceSummaryInput, ...func(*Options)) (*GetAggregateConfigRuleComplianceSummaryOutput, error) -} - -var _ GetAggregateConfigRuleComplianceSummaryAPIClient = (*Client)(nil) - // GetAggregateConfigRuleComplianceSummaryPaginatorOptions is the paginator // options for GetAggregateConfigRuleComplianceSummary type GetAggregateConfigRuleComplianceSummaryPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *GetAggregateConfigRuleComplianceSummaryPaginator) NextPage(ctx context. params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAggregateConfigRuleComplianceSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *GetAggregateConfigRuleComplianceSummaryPaginator) NextPage(ctx context. return result, nil } +// GetAggregateConfigRuleComplianceSummaryAPIClient is a client that implements +// the GetAggregateConfigRuleComplianceSummary operation. +type GetAggregateConfigRuleComplianceSummaryAPIClient interface { + GetAggregateConfigRuleComplianceSummary(context.Context, *GetAggregateConfigRuleComplianceSummaryInput, ...func(*Options)) (*GetAggregateConfigRuleComplianceSummaryOutput, error) +} + +var _ GetAggregateConfigRuleComplianceSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAggregateConfigRuleComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go b/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go index 9e427421059..4bdcaaa1409 100644 --- a/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go +++ b/service/configservice/api_op_GetAggregateConformancePackComplianceSummary.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetAggregateConformancePackComplianceSummaryMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAggregateConformancePackComplianceSummaryValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationGetAggregateConformancePackComplianceSummaryMiddlew return nil } -// GetAggregateConformancePackComplianceSummaryAPIClient is a client that -// implements the GetAggregateConformancePackComplianceSummary operation. -type GetAggregateConformancePackComplianceSummaryAPIClient interface { - GetAggregateConformancePackComplianceSummary(context.Context, *GetAggregateConformancePackComplianceSummaryInput, ...func(*Options)) (*GetAggregateConformancePackComplianceSummaryOutput, error) -} - -var _ GetAggregateConformancePackComplianceSummaryAPIClient = (*Client)(nil) - // GetAggregateConformancePackComplianceSummaryPaginatorOptions is the paginator // options for GetAggregateConformancePackComplianceSummary type GetAggregateConformancePackComplianceSummaryPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *GetAggregateConformancePackComplianceSummaryPaginator) NextPage(ctx con params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAggregateConformancePackComplianceSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *GetAggregateConformancePackComplianceSummaryPaginator) NextPage(ctx con return result, nil } +// GetAggregateConformancePackComplianceSummaryAPIClient is a client that +// implements the GetAggregateConformancePackComplianceSummary operation. +type GetAggregateConformancePackComplianceSummaryAPIClient interface { + GetAggregateConformancePackComplianceSummary(context.Context, *GetAggregateConformancePackComplianceSummaryInput, ...func(*Options)) (*GetAggregateConformancePackComplianceSummaryOutput, error) +} + +var _ GetAggregateConformancePackComplianceSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAggregateConformancePackComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go b/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go index 985364923dd..a45e522bcba 100644 --- a/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go +++ b/service/configservice/api_op_GetAggregateDiscoveredResourceCounts.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetAggregateDiscoveredResourceCountsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAggregateDiscoveredResourceCountsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationGetAggregateDiscoveredResourceCountsMiddlewares(sta return nil } -// GetAggregateDiscoveredResourceCountsAPIClient is a client that implements the -// GetAggregateDiscoveredResourceCounts operation. -type GetAggregateDiscoveredResourceCountsAPIClient interface { - GetAggregateDiscoveredResourceCounts(context.Context, *GetAggregateDiscoveredResourceCountsInput, ...func(*Options)) (*GetAggregateDiscoveredResourceCountsOutput, error) -} - -var _ GetAggregateDiscoveredResourceCountsAPIClient = (*Client)(nil) - // GetAggregateDiscoveredResourceCountsPaginatorOptions is the paginator options // for GetAggregateDiscoveredResourceCounts type GetAggregateDiscoveredResourceCountsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *GetAggregateDiscoveredResourceCountsPaginator) NextPage(ctx context.Con params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAggregateDiscoveredResourceCounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *GetAggregateDiscoveredResourceCountsPaginator) NextPage(ctx context.Con return result, nil } +// GetAggregateDiscoveredResourceCountsAPIClient is a client that implements the +// GetAggregateDiscoveredResourceCounts operation. +type GetAggregateDiscoveredResourceCountsAPIClient interface { + GetAggregateDiscoveredResourceCounts(context.Context, *GetAggregateDiscoveredResourceCountsInput, ...func(*Options)) (*GetAggregateDiscoveredResourceCountsOutput, error) +} + +var _ GetAggregateDiscoveredResourceCountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAggregateDiscoveredResourceCounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetAggregateResourceConfig.go b/service/configservice/api_op_GetAggregateResourceConfig.go index 2f70bbd8859..f90d2c7d7c0 100644 --- a/service/configservice/api_op_GetAggregateResourceConfig.go +++ b/service/configservice/api_op_GetAggregateResourceConfig.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAggregateResourceConfigMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAggregateResourceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go index 40425b2ee00..d7732f27d0e 100644 --- a/service/configservice/api_op_GetComplianceDetailsByConfigRule.go +++ b/service/configservice/api_op_GetComplianceDetailsByConfigRule.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetComplianceDetailsByConfigRuleMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComplianceDetailsByConfigRuleValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationGetComplianceDetailsByConfigRuleMiddlewares(stack * return nil } -// GetComplianceDetailsByConfigRuleAPIClient is a client that implements the -// GetComplianceDetailsByConfigRule operation. -type GetComplianceDetailsByConfigRuleAPIClient interface { - GetComplianceDetailsByConfigRule(context.Context, *GetComplianceDetailsByConfigRuleInput, ...func(*Options)) (*GetComplianceDetailsByConfigRuleOutput, error) -} - -var _ GetComplianceDetailsByConfigRuleAPIClient = (*Client)(nil) - // GetComplianceDetailsByConfigRulePaginatorOptions is the paginator options for // GetComplianceDetailsByConfigRule type GetComplianceDetailsByConfigRulePaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetComplianceDetailsByConfigRulePaginator) NextPage(ctx context.Context params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetComplianceDetailsByConfigRule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetComplianceDetailsByConfigRulePaginator) NextPage(ctx context.Context return result, nil } +// GetComplianceDetailsByConfigRuleAPIClient is a client that implements the +// GetComplianceDetailsByConfigRule operation. +type GetComplianceDetailsByConfigRuleAPIClient interface { + GetComplianceDetailsByConfigRule(context.Context, *GetComplianceDetailsByConfigRuleInput, ...func(*Options)) (*GetComplianceDetailsByConfigRuleOutput, error) +} + +var _ GetComplianceDetailsByConfigRuleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetComplianceDetailsByConfigRule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetComplianceDetailsByResource.go b/service/configservice/api_op_GetComplianceDetailsByResource.go index 5550f98242b..26b04291df9 100644 --- a/service/configservice/api_op_GetComplianceDetailsByResource.go +++ b/service/configservice/api_op_GetComplianceDetailsByResource.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetComplianceDetailsByResourceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComplianceDetailsByResource(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationGetComplianceDetailsByResourceMiddlewares(stack *mi return nil } -// GetComplianceDetailsByResourceAPIClient is a client that implements the -// GetComplianceDetailsByResource operation. -type GetComplianceDetailsByResourceAPIClient interface { - GetComplianceDetailsByResource(context.Context, *GetComplianceDetailsByResourceInput, ...func(*Options)) (*GetComplianceDetailsByResourceOutput, error) -} - -var _ GetComplianceDetailsByResourceAPIClient = (*Client)(nil) - // GetComplianceDetailsByResourcePaginatorOptions is the paginator options for // GetComplianceDetailsByResource type GetComplianceDetailsByResourcePaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *GetComplianceDetailsByResourcePaginator) NextPage(ctx context.Context, params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetComplianceDetailsByResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *GetComplianceDetailsByResourcePaginator) NextPage(ctx context.Context, return result, nil } +// GetComplianceDetailsByResourceAPIClient is a client that implements the +// GetComplianceDetailsByResource operation. +type GetComplianceDetailsByResourceAPIClient interface { + GetComplianceDetailsByResource(context.Context, *GetComplianceDetailsByResourceInput, ...func(*Options)) (*GetComplianceDetailsByResourceOutput, error) +} + +var _ GetComplianceDetailsByResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetComplianceDetailsByResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetComplianceSummaryByConfigRule.go b/service/configservice/api_op_GetComplianceSummaryByConfigRule.go index 881f16ae9fa..7b882e71d59 100644 --- a/service/configservice/api_op_GetComplianceSummaryByConfigRule.go +++ b/service/configservice/api_op_GetComplianceSummaryByConfigRule.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetComplianceSummaryByConfigRuleMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComplianceSummaryByConfigRule(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_GetComplianceSummaryByResourceType.go b/service/configservice/api_op_GetComplianceSummaryByResourceType.go index 891f4539993..e46b72bb3a6 100644 --- a/service/configservice/api_op_GetComplianceSummaryByResourceType.go +++ b/service/configservice/api_op_GetComplianceSummaryByResourceType.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetComplianceSummaryByResourceTypeMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComplianceSummaryByResourceType(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_GetConformancePackComplianceDetails.go b/service/configservice/api_op_GetConformancePackComplianceDetails.go index bbc87aa7fa8..99fd3dee381 100644 --- a/service/configservice/api_op_GetConformancePackComplianceDetails.go +++ b/service/configservice/api_op_GetConformancePackComplianceDetails.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetConformancePackComplianceDetailsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConformancePackComplianceDetailsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetConformancePackComplianceDetailsMiddlewares(stac return nil } -// GetConformancePackComplianceDetailsAPIClient is a client that implements the -// GetConformancePackComplianceDetails operation. -type GetConformancePackComplianceDetailsAPIClient interface { - GetConformancePackComplianceDetails(context.Context, *GetConformancePackComplianceDetailsInput, ...func(*Options)) (*GetConformancePackComplianceDetailsOutput, error) -} - -var _ GetConformancePackComplianceDetailsAPIClient = (*Client)(nil) - // GetConformancePackComplianceDetailsPaginatorOptions is the paginator options // for GetConformancePackComplianceDetails type GetConformancePackComplianceDetailsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *GetConformancePackComplianceDetailsPaginator) NextPage(ctx context.Cont params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConformancePackComplianceDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetConformancePackComplianceDetailsPaginator) NextPage(ctx context.Cont return result, nil } +// GetConformancePackComplianceDetailsAPIClient is a client that implements the +// GetConformancePackComplianceDetails operation. +type GetConformancePackComplianceDetailsAPIClient interface { + GetConformancePackComplianceDetails(context.Context, *GetConformancePackComplianceDetailsInput, ...func(*Options)) (*GetConformancePackComplianceDetailsOutput, error) +} + +var _ GetConformancePackComplianceDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConformancePackComplianceDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetConformancePackComplianceSummary.go b/service/configservice/api_op_GetConformancePackComplianceSummary.go index 4c424b67705..add742e326e 100644 --- a/service/configservice/api_op_GetConformancePackComplianceSummary.go +++ b/service/configservice/api_op_GetConformancePackComplianceSummary.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetConformancePackComplianceSummaryMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConformancePackComplianceSummaryValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetConformancePackComplianceSummaryMiddlewares(stac return nil } -// GetConformancePackComplianceSummaryAPIClient is a client that implements the -// GetConformancePackComplianceSummary operation. -type GetConformancePackComplianceSummaryAPIClient interface { - GetConformancePackComplianceSummary(context.Context, *GetConformancePackComplianceSummaryInput, ...func(*Options)) (*GetConformancePackComplianceSummaryOutput, error) -} - -var _ GetConformancePackComplianceSummaryAPIClient = (*Client)(nil) - // GetConformancePackComplianceSummaryPaginatorOptions is the paginator options // for GetConformancePackComplianceSummary type GetConformancePackComplianceSummaryPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *GetConformancePackComplianceSummaryPaginator) NextPage(ctx context.Cont params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConformancePackComplianceSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *GetConformancePackComplianceSummaryPaginator) NextPage(ctx context.Cont return result, nil } +// GetConformancePackComplianceSummaryAPIClient is a client that implements the +// GetConformancePackComplianceSummary operation. +type GetConformancePackComplianceSummaryAPIClient interface { + GetConformancePackComplianceSummary(context.Context, *GetConformancePackComplianceSummaryInput, ...func(*Options)) (*GetConformancePackComplianceSummaryOutput, error) +} + +var _ GetConformancePackComplianceSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConformancePackComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetCustomRulePolicy.go b/service/configservice/api_op_GetCustomRulePolicy.go index b315cf54f84..fbe745ed0cc 100644 --- a/service/configservice/api_op_GetCustomRulePolicy.go +++ b/service/configservice/api_op_GetCustomRulePolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetCustomRulePolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCustomRulePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_GetDiscoveredResourceCounts.go b/service/configservice/api_op_GetDiscoveredResourceCounts.go index afcc8c283a6..4f1e9d13a90 100644 --- a/service/configservice/api_op_GetDiscoveredResourceCounts.go +++ b/service/configservice/api_op_GetDiscoveredResourceCounts.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetDiscoveredResourceCountsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDiscoveredResourceCounts(options.Region), middleware.Before); err != nil { return err } @@ -197,14 +200,6 @@ func (c *Client) addOperationGetDiscoveredResourceCountsMiddlewares(stack *middl return nil } -// GetDiscoveredResourceCountsAPIClient is a client that implements the -// GetDiscoveredResourceCounts operation. -type GetDiscoveredResourceCountsAPIClient interface { - GetDiscoveredResourceCounts(context.Context, *GetDiscoveredResourceCountsInput, ...func(*Options)) (*GetDiscoveredResourceCountsOutput, error) -} - -var _ GetDiscoveredResourceCountsAPIClient = (*Client)(nil) - // GetDiscoveredResourceCountsPaginatorOptions is the paginator options for // GetDiscoveredResourceCounts type GetDiscoveredResourceCountsPaginatorOptions struct { @@ -269,6 +264,9 @@ func (p *GetDiscoveredResourceCountsPaginator) NextPage(ctx context.Context, opt params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDiscoveredResourceCounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +286,14 @@ func (p *GetDiscoveredResourceCountsPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetDiscoveredResourceCountsAPIClient is a client that implements the +// GetDiscoveredResourceCounts operation. +type GetDiscoveredResourceCountsAPIClient interface { + GetDiscoveredResourceCounts(context.Context, *GetDiscoveredResourceCountsInput, ...func(*Options)) (*GetDiscoveredResourceCountsOutput, error) +} + +var _ GetDiscoveredResourceCountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDiscoveredResourceCounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go b/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go index 9e16c5b03a3..184953f0a4f 100644 --- a/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go +++ b/service/configservice/api_op_GetOrganizationConfigRuleDetailedStatus.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetOrganizationConfigRuleDetailedStatusMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrganizationConfigRuleDetailedStatusValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetOrganizationConfigRuleDetailedStatusMiddlewares( return nil } -// GetOrganizationConfigRuleDetailedStatusAPIClient is a client that implements -// the GetOrganizationConfigRuleDetailedStatus operation. -type GetOrganizationConfigRuleDetailedStatusAPIClient interface { - GetOrganizationConfigRuleDetailedStatus(context.Context, *GetOrganizationConfigRuleDetailedStatusInput, ...func(*Options)) (*GetOrganizationConfigRuleDetailedStatusOutput, error) -} - -var _ GetOrganizationConfigRuleDetailedStatusAPIClient = (*Client)(nil) - // GetOrganizationConfigRuleDetailedStatusPaginatorOptions is the paginator // options for GetOrganizationConfigRuleDetailedStatus type GetOrganizationConfigRuleDetailedStatusPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *GetOrganizationConfigRuleDetailedStatusPaginator) NextPage(ctx context. params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOrganizationConfigRuleDetailedStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *GetOrganizationConfigRuleDetailedStatusPaginator) NextPage(ctx context. return result, nil } +// GetOrganizationConfigRuleDetailedStatusAPIClient is a client that implements +// the GetOrganizationConfigRuleDetailedStatus operation. +type GetOrganizationConfigRuleDetailedStatusAPIClient interface { + GetOrganizationConfigRuleDetailedStatus(context.Context, *GetOrganizationConfigRuleDetailedStatusInput, ...func(*Options)) (*GetOrganizationConfigRuleDetailedStatusOutput, error) +} + +var _ GetOrganizationConfigRuleDetailedStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOrganizationConfigRuleDetailedStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go b/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go index 76a4a87a30d..a30a908dda3 100644 --- a/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go +++ b/service/configservice/api_op_GetOrganizationConformancePackDetailedStatus.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetOrganizationConformancePackDetailedStatusMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrganizationConformancePackDetailedStatusValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetOrganizationConformancePackDetailedStatusMiddlew return nil } -// GetOrganizationConformancePackDetailedStatusAPIClient is a client that -// implements the GetOrganizationConformancePackDetailedStatus operation. -type GetOrganizationConformancePackDetailedStatusAPIClient interface { - GetOrganizationConformancePackDetailedStatus(context.Context, *GetOrganizationConformancePackDetailedStatusInput, ...func(*Options)) (*GetOrganizationConformancePackDetailedStatusOutput, error) -} - -var _ GetOrganizationConformancePackDetailedStatusAPIClient = (*Client)(nil) - // GetOrganizationConformancePackDetailedStatusPaginatorOptions is the paginator // options for GetOrganizationConformancePackDetailedStatus type GetOrganizationConformancePackDetailedStatusPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *GetOrganizationConformancePackDetailedStatusPaginator) NextPage(ctx con params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOrganizationConformancePackDetailedStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *GetOrganizationConformancePackDetailedStatusPaginator) NextPage(ctx con return result, nil } +// GetOrganizationConformancePackDetailedStatusAPIClient is a client that +// implements the GetOrganizationConformancePackDetailedStatus operation. +type GetOrganizationConformancePackDetailedStatusAPIClient interface { + GetOrganizationConformancePackDetailedStatus(context.Context, *GetOrganizationConformancePackDetailedStatusInput, ...func(*Options)) (*GetOrganizationConformancePackDetailedStatusOutput, error) +} + +var _ GetOrganizationConformancePackDetailedStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOrganizationConformancePackDetailedStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetOrganizationCustomRulePolicy.go b/service/configservice/api_op_GetOrganizationCustomRulePolicy.go index 0004124178c..641a761ff2f 100644 --- a/service/configservice/api_op_GetOrganizationCustomRulePolicy.go +++ b/service/configservice/api_op_GetOrganizationCustomRulePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetOrganizationCustomRulePolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrganizationCustomRulePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_GetResourceConfigHistory.go b/service/configservice/api_op_GetResourceConfigHistory.go index 8c1af01d726..16b0d589ea2 100644 --- a/service/configservice/api_op_GetResourceConfigHistory.go +++ b/service/configservice/api_op_GetResourceConfigHistory.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetResourceConfigHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceConfigHistoryValidationMiddleware(stack); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationGetResourceConfigHistoryMiddlewares(stack *middlewa return nil } -// GetResourceConfigHistoryAPIClient is a client that implements the -// GetResourceConfigHistory operation. -type GetResourceConfigHistoryAPIClient interface { - GetResourceConfigHistory(context.Context, *GetResourceConfigHistoryInput, ...func(*Options)) (*GetResourceConfigHistoryOutput, error) -} - -var _ GetResourceConfigHistoryAPIClient = (*Client)(nil) - // GetResourceConfigHistoryPaginatorOptions is the paginator options for // GetResourceConfigHistory type GetResourceConfigHistoryPaginatorOptions struct { @@ -254,6 +249,9 @@ func (p *GetResourceConfigHistoryPaginator) NextPage(ctx context.Context, optFns params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourceConfigHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +271,14 @@ func (p *GetResourceConfigHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetResourceConfigHistoryAPIClient is a client that implements the +// GetResourceConfigHistory operation. +type GetResourceConfigHistoryAPIClient interface { + GetResourceConfigHistory(context.Context, *GetResourceConfigHistoryInput, ...func(*Options)) (*GetResourceConfigHistoryOutput, error) +} + +var _ GetResourceConfigHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceConfigHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_GetResourceEvaluationSummary.go b/service/configservice/api_op_GetResourceEvaluationSummary.go index 5b68db3e742..af24080fc08 100644 --- a/service/configservice/api_op_GetResourceEvaluationSummary.go +++ b/service/configservice/api_op_GetResourceEvaluationSummary.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetResourceEvaluationSummaryMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceEvaluationSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_GetStoredQuery.go b/service/configservice/api_op_GetStoredQuery.go index 7b36cc79753..c3d238eeed9 100644 --- a/service/configservice/api_op_GetStoredQuery.go +++ b/service/configservice/api_op_GetStoredQuery.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetStoredQueryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStoredQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_ListAggregateDiscoveredResources.go b/service/configservice/api_op_ListAggregateDiscoveredResources.go index 992be56b455..de60a0d9506 100644 --- a/service/configservice/api_op_ListAggregateDiscoveredResources.go +++ b/service/configservice/api_op_ListAggregateDiscoveredResources.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListAggregateDiscoveredResourcesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAggregateDiscoveredResourcesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListAggregateDiscoveredResourcesMiddlewares(stack * return nil } -// ListAggregateDiscoveredResourcesAPIClient is a client that implements the -// ListAggregateDiscoveredResources operation. -type ListAggregateDiscoveredResourcesAPIClient interface { - ListAggregateDiscoveredResources(context.Context, *ListAggregateDiscoveredResourcesInput, ...func(*Options)) (*ListAggregateDiscoveredResourcesOutput, error) -} - -var _ ListAggregateDiscoveredResourcesAPIClient = (*Client)(nil) - // ListAggregateDiscoveredResourcesPaginatorOptions is the paginator options for // ListAggregateDiscoveredResources type ListAggregateDiscoveredResourcesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListAggregateDiscoveredResourcesPaginator) NextPage(ctx context.Context params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAggregateDiscoveredResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListAggregateDiscoveredResourcesPaginator) NextPage(ctx context.Context return result, nil } +// ListAggregateDiscoveredResourcesAPIClient is a client that implements the +// ListAggregateDiscoveredResources operation. +type ListAggregateDiscoveredResourcesAPIClient interface { + ListAggregateDiscoveredResources(context.Context, *ListAggregateDiscoveredResourcesInput, ...func(*Options)) (*ListAggregateDiscoveredResourcesOutput, error) +} + +var _ ListAggregateDiscoveredResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAggregateDiscoveredResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListConformancePackComplianceScores.go b/service/configservice/api_op_ListConformancePackComplianceScores.go index 19f9cd68659..fe7e22f08d2 100644 --- a/service/configservice/api_op_ListConformancePackComplianceScores.go +++ b/service/configservice/api_op_ListConformancePackComplianceScores.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListConformancePackComplianceScoresMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConformancePackComplianceScoresValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationListConformancePackComplianceScoresMiddlewares(stac return nil } -// ListConformancePackComplianceScoresAPIClient is a client that implements the -// ListConformancePackComplianceScores operation. -type ListConformancePackComplianceScoresAPIClient interface { - ListConformancePackComplianceScores(context.Context, *ListConformancePackComplianceScoresInput, ...func(*Options)) (*ListConformancePackComplianceScoresOutput, error) -} - -var _ ListConformancePackComplianceScoresAPIClient = (*Client)(nil) - // ListConformancePackComplianceScoresPaginatorOptions is the paginator options // for ListConformancePackComplianceScores type ListConformancePackComplianceScoresPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListConformancePackComplianceScoresPaginator) NextPage(ctx context.Cont params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConformancePackComplianceScores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListConformancePackComplianceScoresPaginator) NextPage(ctx context.Cont return result, nil } +// ListConformancePackComplianceScoresAPIClient is a client that implements the +// ListConformancePackComplianceScores operation. +type ListConformancePackComplianceScoresAPIClient interface { + ListConformancePackComplianceScores(context.Context, *ListConformancePackComplianceScoresInput, ...func(*Options)) (*ListConformancePackComplianceScoresOutput, error) +} + +var _ ListConformancePackComplianceScoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConformancePackComplianceScores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListDiscoveredResources.go b/service/configservice/api_op_ListDiscoveredResources.go index d0cc8bb8569..ccda8ad0c30 100644 --- a/service/configservice/api_op_ListDiscoveredResources.go +++ b/service/configservice/api_op_ListDiscoveredResources.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListDiscoveredResourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDiscoveredResourcesValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationListDiscoveredResourcesMiddlewares(stack *middlewar return nil } -// ListDiscoveredResourcesAPIClient is a client that implements the -// ListDiscoveredResources operation. -type ListDiscoveredResourcesAPIClient interface { - ListDiscoveredResources(context.Context, *ListDiscoveredResourcesInput, ...func(*Options)) (*ListDiscoveredResourcesOutput, error) -} - -var _ ListDiscoveredResourcesAPIClient = (*Client)(nil) - // ListDiscoveredResourcesPaginatorOptions is the paginator options for // ListDiscoveredResources type ListDiscoveredResourcesPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDiscoveredResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDiscoveredResourcesAPIClient is a client that implements the +// ListDiscoveredResources operation. +type ListDiscoveredResourcesAPIClient interface { + ListDiscoveredResources(context.Context, *ListDiscoveredResourcesInput, ...func(*Options)) (*ListDiscoveredResourcesOutput, error) +} + +var _ ListDiscoveredResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDiscoveredResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListResourceEvaluations.go b/service/configservice/api_op_ListResourceEvaluations.go index f7b03bd786b..37acedac302 100644 --- a/service/configservice/api_op_ListResourceEvaluations.go +++ b/service/configservice/api_op_ListResourceEvaluations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListResourceEvaluationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceEvaluations(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListResourceEvaluationsMiddlewares(stack *middlewar return nil } -// ListResourceEvaluationsAPIClient is a client that implements the -// ListResourceEvaluations operation. -type ListResourceEvaluationsAPIClient interface { - ListResourceEvaluations(context.Context, *ListResourceEvaluationsInput, ...func(*Options)) (*ListResourceEvaluationsOutput, error) -} - -var _ ListResourceEvaluationsAPIClient = (*Client)(nil) - // ListResourceEvaluationsPaginatorOptions is the paginator options for // ListResourceEvaluations type ListResourceEvaluationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListResourceEvaluationsPaginator) NextPage(ctx context.Context, optFns params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceEvaluations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListResourceEvaluationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListResourceEvaluationsAPIClient is a client that implements the +// ListResourceEvaluations operation. +type ListResourceEvaluationsAPIClient interface { + ListResourceEvaluations(context.Context, *ListResourceEvaluationsInput, ...func(*Options)) (*ListResourceEvaluationsOutput, error) +} + +var _ ListResourceEvaluationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceEvaluations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListStoredQueries.go b/service/configservice/api_op_ListStoredQueries.go index bbe856a1097..d4df3e99274 100644 --- a/service/configservice/api_op_ListStoredQueries.go +++ b/service/configservice/api_op_ListStoredQueries.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListStoredQueriesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStoredQueries(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListStoredQueriesMiddlewares(stack *middleware.Stac return nil } -// ListStoredQueriesAPIClient is a client that implements the ListStoredQueries -// operation. -type ListStoredQueriesAPIClient interface { - ListStoredQueries(context.Context, *ListStoredQueriesInput, ...func(*Options)) (*ListStoredQueriesOutput, error) -} - -var _ ListStoredQueriesAPIClient = (*Client)(nil) - // ListStoredQueriesPaginatorOptions is the paginator options for ListStoredQueries type ListStoredQueriesPaginatorOptions struct { // The maximum number of results to be returned with a single call. @@ -208,6 +203,9 @@ func (p *ListStoredQueriesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStoredQueries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListStoredQueriesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListStoredQueriesAPIClient is a client that implements the ListStoredQueries +// operation. +type ListStoredQueriesAPIClient interface { + ListStoredQueries(context.Context, *ListStoredQueriesInput, ...func(*Options)) (*ListStoredQueriesOutput, error) +} + +var _ ListStoredQueriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStoredQueries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_ListTagsForResource.go b/service/configservice/api_op_ListTagsForResource.go index c9c340c25db..fc99369614c 100644 --- a/service/configservice/api_op_ListTagsForResource.go +++ b/service/configservice/api_op_ListTagsForResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_PutAggregationAuthorization.go b/service/configservice/api_op_PutAggregationAuthorization.go index 3ed0ffeb837..f6b06977f64 100644 --- a/service/configservice/api_op_PutAggregationAuthorization.go +++ b/service/configservice/api_op_PutAggregationAuthorization.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPutAggregationAuthorizationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAggregationAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutConfigRule.go b/service/configservice/api_op_PutConfigRule.go index 437c7f44e39..676f9edaacb 100644 --- a/service/configservice/api_op_PutConfigRule.go +++ b/service/configservice/api_op_PutConfigRule.go @@ -153,6 +153,9 @@ func (c *Client) addOperationPutConfigRuleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutConfigurationAggregator.go b/service/configservice/api_op_PutConfigurationAggregator.go index deeef39099a..5076f104fbc 100644 --- a/service/configservice/api_op_PutConfigurationAggregator.go +++ b/service/configservice/api_op_PutConfigurationAggregator.go @@ -142,6 +142,9 @@ func (c *Client) addOperationPutConfigurationAggregatorMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationAggregatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutConfigurationRecorder.go b/service/configservice/api_op_PutConfigurationRecorder.go index 0b6e250cd15..f56b78e8103 100644 --- a/service/configservice/api_op_PutConfigurationRecorder.go +++ b/service/configservice/api_op_PutConfigurationRecorder.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutConfigurationRecorderMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationRecorderValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutConformancePack.go b/service/configservice/api_op_PutConformancePack.go index 2719cc04796..4d363aaa1a8 100644 --- a/service/configservice/api_op_PutConformancePack.go +++ b/service/configservice/api_op_PutConformancePack.go @@ -157,6 +157,9 @@ func (c *Client) addOperationPutConformancePackMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConformancePackValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutDeliveryChannel.go b/service/configservice/api_op_PutDeliveryChannel.go index 31b9da089a5..b06b760849c 100644 --- a/service/configservice/api_op_PutDeliveryChannel.go +++ b/service/configservice/api_op_PutDeliveryChannel.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutDeliveryChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDeliveryChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutEvaluations.go b/service/configservice/api_op_PutEvaluations.go index 09fa4b439b4..38c28dd7b50 100644 --- a/service/configservice/api_op_PutEvaluations.go +++ b/service/configservice/api_op_PutEvaluations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutEvaluationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEvaluationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutExternalEvaluation.go b/service/configservice/api_op_PutExternalEvaluation.go index f75ab546081..0c516ea074f 100644 --- a/service/configservice/api_op_PutExternalEvaluation.go +++ b/service/configservice/api_op_PutExternalEvaluation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPutExternalEvaluationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutExternalEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutOrganizationConfigRule.go b/service/configservice/api_op_PutOrganizationConfigRule.go index 45806ef8a3f..7f3cb75098d 100644 --- a/service/configservice/api_op_PutOrganizationConfigRule.go +++ b/service/configservice/api_op_PutOrganizationConfigRule.go @@ -187,6 +187,9 @@ func (c *Client) addOperationPutOrganizationConfigRuleMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutOrganizationConfigRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutOrganizationConformancePack.go b/service/configservice/api_op_PutOrganizationConformancePack.go index ce2c8437561..80a2331fcbb 100644 --- a/service/configservice/api_op_PutOrganizationConformancePack.go +++ b/service/configservice/api_op_PutOrganizationConformancePack.go @@ -168,6 +168,9 @@ func (c *Client) addOperationPutOrganizationConformancePackMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutOrganizationConformancePackValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutRemediationConfigurations.go b/service/configservice/api_op_PutRemediationConfigurations.go index 55f4e29816e..b71dfb6c0b2 100644 --- a/service/configservice/api_op_PutRemediationConfigurations.go +++ b/service/configservice/api_op_PutRemediationConfigurations.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutRemediationConfigurationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRemediationConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutRemediationExceptions.go b/service/configservice/api_op_PutRemediationExceptions.go index 9d62ea03c8d..b578dde55c3 100644 --- a/service/configservice/api_op_PutRemediationExceptions.go +++ b/service/configservice/api_op_PutRemediationExceptions.go @@ -164,6 +164,9 @@ func (c *Client) addOperationPutRemediationExceptionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRemediationExceptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutResourceConfig.go b/service/configservice/api_op_PutResourceConfig.go index e216b6a0ce2..71d20b1cce2 100644 --- a/service/configservice/api_op_PutResourceConfig.go +++ b/service/configservice/api_op_PutResourceConfig.go @@ -148,6 +148,9 @@ func (c *Client) addOperationPutResourceConfigMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutRetentionConfiguration.go b/service/configservice/api_op_PutRetentionConfiguration.go index cc98629ad69..0cf1707b647 100644 --- a/service/configservice/api_op_PutRetentionConfiguration.go +++ b/service/configservice/api_op_PutRetentionConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationPutRetentionConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRetentionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_PutStoredQuery.go b/service/configservice/api_op_PutStoredQuery.go index 9f959e4e382..80128972a22 100644 --- a/service/configservice/api_op_PutStoredQuery.go +++ b/service/configservice/api_op_PutStoredQuery.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutStoredQueryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutStoredQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_SelectAggregateResourceConfig.go b/service/configservice/api_op_SelectAggregateResourceConfig.go index 7fa57c56839..31491a3f785 100644 --- a/service/configservice/api_op_SelectAggregateResourceConfig.go +++ b/service/configservice/api_op_SelectAggregateResourceConfig.go @@ -147,6 +147,9 @@ func (c *Client) addOperationSelectAggregateResourceConfigMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSelectAggregateResourceConfigValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationSelectAggregateResourceConfigMiddlewares(stack *mid return nil } -// SelectAggregateResourceConfigAPIClient is a client that implements the -// SelectAggregateResourceConfig operation. -type SelectAggregateResourceConfigAPIClient interface { - SelectAggregateResourceConfig(context.Context, *SelectAggregateResourceConfigInput, ...func(*Options)) (*SelectAggregateResourceConfigOutput, error) -} - -var _ SelectAggregateResourceConfigAPIClient = (*Client)(nil) - // SelectAggregateResourceConfigPaginatorOptions is the paginator options for // SelectAggregateResourceConfig type SelectAggregateResourceConfigPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *SelectAggregateResourceConfigPaginator) NextPage(ctx context.Context, o params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SelectAggregateResourceConfig(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *SelectAggregateResourceConfigPaginator) NextPage(ctx context.Context, o return result, nil } +// SelectAggregateResourceConfigAPIClient is a client that implements the +// SelectAggregateResourceConfig operation. +type SelectAggregateResourceConfigAPIClient interface { + SelectAggregateResourceConfig(context.Context, *SelectAggregateResourceConfigInput, ...func(*Options)) (*SelectAggregateResourceConfigOutput, error) +} + +var _ SelectAggregateResourceConfigAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSelectAggregateResourceConfig(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_SelectResourceConfig.go b/service/configservice/api_op_SelectResourceConfig.go index 78d07343ad0..765531fb4e1 100644 --- a/service/configservice/api_op_SelectResourceConfig.go +++ b/service/configservice/api_op_SelectResourceConfig.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSelectResourceConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSelectResourceConfigValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationSelectResourceConfigMiddlewares(stack *middleware.S return nil } -// SelectResourceConfigAPIClient is a client that implements the -// SelectResourceConfig operation. -type SelectResourceConfigAPIClient interface { - SelectResourceConfig(context.Context, *SelectResourceConfigInput, ...func(*Options)) (*SelectResourceConfigOutput, error) -} - -var _ SelectResourceConfigAPIClient = (*Client)(nil) - // SelectResourceConfigPaginatorOptions is the paginator options for // SelectResourceConfig type SelectResourceConfigPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *SelectResourceConfigPaginator) NextPage(ctx context.Context, optFns ... params.Limit = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SelectResourceConfig(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *SelectResourceConfigPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SelectResourceConfigAPIClient is a client that implements the +// SelectResourceConfig operation. +type SelectResourceConfigAPIClient interface { + SelectResourceConfig(context.Context, *SelectResourceConfigInput, ...func(*Options)) (*SelectResourceConfigOutput, error) +} + +var _ SelectResourceConfigAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSelectResourceConfig(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/configservice/api_op_StartConfigRulesEvaluation.go b/service/configservice/api_op_StartConfigRulesEvaluation.go index 7b6ffa7c15f..67662269674 100644 --- a/service/configservice/api_op_StartConfigRulesEvaluation.go +++ b/service/configservice/api_op_StartConfigRulesEvaluation.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartConfigRulesEvaluationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartConfigRulesEvaluation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/configservice/api_op_StartConfigurationRecorder.go b/service/configservice/api_op_StartConfigurationRecorder.go index d0ee36c0ae7..b08710fe4a4 100644 --- a/service/configservice/api_op_StartConfigurationRecorder.go +++ b/service/configservice/api_op_StartConfigurationRecorder.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartConfigurationRecorderMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartConfigurationRecorderValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_StartRemediationExecution.go b/service/configservice/api_op_StartRemediationExecution.go index 1b254cba62d..2839c2f2a14 100644 --- a/service/configservice/api_op_StartRemediationExecution.go +++ b/service/configservice/api_op_StartRemediationExecution.go @@ -123,6 +123,9 @@ func (c *Client) addOperationStartRemediationExecutionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRemediationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_StartResourceEvaluation.go b/service/configservice/api_op_StartResourceEvaluation.go index ba9b976d57d..89bc0efe68a 100644 --- a/service/configservice/api_op_StartResourceEvaluation.go +++ b/service/configservice/api_op_StartResourceEvaluation.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStartResourceEvaluationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartResourceEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_StopConfigurationRecorder.go b/service/configservice/api_op_StopConfigurationRecorder.go index ab6ffba4739..4a1a6f470c7 100644 --- a/service/configservice/api_op_StopConfigurationRecorder.go +++ b/service/configservice/api_op_StopConfigurationRecorder.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStopConfigurationRecorderMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopConfigurationRecorderValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_TagResource.go b/service/configservice/api_op_TagResource.go index 886534493a8..276b99de3c6 100644 --- a/service/configservice/api_op_TagResource.go +++ b/service/configservice/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/configservice/api_op_UntagResource.go b/service/configservice/api_op_UntagResource.go index 77344f00d47..8d51d5abc26 100644 --- a/service/configservice/api_op_UntagResource.go +++ b/service/configservice/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_client.go b/service/connect/api_client.go index 883e8a8cb1c..582c94c4a4e 100644 --- a/service/connect/api_client.go +++ b/service/connect/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/connect/api_op_ActivateEvaluationForm.go b/service/connect/api_op_ActivateEvaluationForm.go index a0820b8af14..9a672f46488 100644 --- a/service/connect/api_op_ActivateEvaluationForm.go +++ b/service/connect/api_op_ActivateEvaluationForm.go @@ -133,6 +133,9 @@ func (c *Client) addOperationActivateEvaluationFormMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateEvaluationFormValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateAnalyticsDataSet.go b/service/connect/api_op_AssociateAnalyticsDataSet.go index 71417dec81b..78c2a72b103 100644 --- a/service/connect/api_op_AssociateAnalyticsDataSet.go +++ b/service/connect/api_op_AssociateAnalyticsDataSet.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAssociateAnalyticsDataSetMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAnalyticsDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateApprovedOrigin.go b/service/connect/api_op_AssociateApprovedOrigin.go index 97479296ee0..f5da6da2642 100644 --- a/service/connect/api_op_AssociateApprovedOrigin.go +++ b/service/connect/api_op_AssociateApprovedOrigin.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociateApprovedOriginMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateApprovedOriginValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateBot.go b/service/connect/api_op_AssociateBot.go index 6d842fc1610..6da1b4495d2 100644 --- a/service/connect/api_op_AssociateBot.go +++ b/service/connect/api_op_AssociateBot.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssociateBotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateDefaultVocabulary.go b/service/connect/api_op_AssociateDefaultVocabulary.go index 03aa4a7dcfb..7561b4c29e0 100644 --- a/service/connect/api_op_AssociateDefaultVocabulary.go +++ b/service/connect/api_op_AssociateDefaultVocabulary.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateDefaultVocabularyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDefaultVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateFlow.go b/service/connect/api_op_AssociateFlow.go index 10f459c0db8..d926dd6ad1b 100644 --- a/service/connect/api_op_AssociateFlow.go +++ b/service/connect/api_op_AssociateFlow.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAssociateFlowMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateInstanceStorageConfig.go b/service/connect/api_op_AssociateInstanceStorageConfig.go index 8d723937a7c..7f3207cfc4f 100644 --- a/service/connect/api_op_AssociateInstanceStorageConfig.go +++ b/service/connect/api_op_AssociateInstanceStorageConfig.go @@ -143,6 +143,9 @@ func (c *Client) addOperationAssociateInstanceStorageConfigMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateInstanceStorageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateLambdaFunction.go b/service/connect/api_op_AssociateLambdaFunction.go index f30c7ab3923..efe01f6c25c 100644 --- a/service/connect/api_op_AssociateLambdaFunction.go +++ b/service/connect/api_op_AssociateLambdaFunction.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssociateLambdaFunctionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateLambdaFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateLexBot.go b/service/connect/api_op_AssociateLexBot.go index 53fe8fc8bc6..ff0c0516ec8 100644 --- a/service/connect/api_op_AssociateLexBot.go +++ b/service/connect/api_op_AssociateLexBot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssociateLexBotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateLexBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociatePhoneNumberContactFlow.go b/service/connect/api_op_AssociatePhoneNumberContactFlow.go index 59925b6436a..dfc7186d765 100644 --- a/service/connect/api_op_AssociatePhoneNumberContactFlow.go +++ b/service/connect/api_op_AssociatePhoneNumberContactFlow.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAssociatePhoneNumberContactFlowMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePhoneNumberContactFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateQueueQuickConnects.go b/service/connect/api_op_AssociateQueueQuickConnects.go index 70a7640f7c9..d20554cd81b 100644 --- a/service/connect/api_op_AssociateQueueQuickConnects.go +++ b/service/connect/api_op_AssociateQueueQuickConnects.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateQueueQuickConnectsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateQueueQuickConnectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateRoutingProfileQueues.go b/service/connect/api_op_AssociateRoutingProfileQueues.go index 1a229b94bb1..8431f5d00ac 100644 --- a/service/connect/api_op_AssociateRoutingProfileQueues.go +++ b/service/connect/api_op_AssociateRoutingProfileQueues.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAssociateRoutingProfileQueuesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateRoutingProfileQueuesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateSecurityKey.go b/service/connect/api_op_AssociateSecurityKey.go index e3ec5ff73ba..b3b226a7b30 100644 --- a/service/connect/api_op_AssociateSecurityKey.go +++ b/service/connect/api_op_AssociateSecurityKey.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateSecurityKeyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSecurityKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateTrafficDistributionGroupUser.go b/service/connect/api_op_AssociateTrafficDistributionGroupUser.go index 814bc899c5d..6e4288f85b3 100644 --- a/service/connect/api_op_AssociateTrafficDistributionGroupUser.go +++ b/service/connect/api_op_AssociateTrafficDistributionGroupUser.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateTrafficDistributionGroupUserMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTrafficDistributionGroupUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_AssociateUserProficiencies.go b/service/connect/api_op_AssociateUserProficiencies.go index 142fabb5f45..18c1da2a50d 100644 --- a/service/connect/api_op_AssociateUserProficiencies.go +++ b/service/connect/api_op_AssociateUserProficiencies.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssociateUserProficienciesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateUserProficienciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_BatchAssociateAnalyticsDataSet.go b/service/connect/api_op_BatchAssociateAnalyticsDataSet.go index 9f7a7851807..046d74fb291 100644 --- a/service/connect/api_op_BatchAssociateAnalyticsDataSet.go +++ b/service/connect/api_op_BatchAssociateAnalyticsDataSet.go @@ -128,6 +128,9 @@ func (c *Client) addOperationBatchAssociateAnalyticsDataSetMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateAnalyticsDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_BatchDisassociateAnalyticsDataSet.go b/service/connect/api_op_BatchDisassociateAnalyticsDataSet.go index b5cb5431abf..963a7932a47 100644 --- a/service/connect/api_op_BatchDisassociateAnalyticsDataSet.go +++ b/service/connect/api_op_BatchDisassociateAnalyticsDataSet.go @@ -126,6 +126,9 @@ func (c *Client) addOperationBatchDisassociateAnalyticsDataSetMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateAnalyticsDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_BatchGetAttachedFileMetadata.go b/service/connect/api_op_BatchGetAttachedFileMetadata.go index b3e05355237..e943e75a093 100644 --- a/service/connect/api_op_BatchGetAttachedFileMetadata.go +++ b/service/connect/api_op_BatchGetAttachedFileMetadata.go @@ -126,6 +126,9 @@ func (c *Client) addOperationBatchGetAttachedFileMetadataMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetAttachedFileMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_BatchGetFlowAssociation.go b/service/connect/api_op_BatchGetFlowAssociation.go index 5296e723d7d..03fd1888396 100644 --- a/service/connect/api_op_BatchGetFlowAssociation.go +++ b/service/connect/api_op_BatchGetFlowAssociation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchGetFlowAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFlowAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_BatchPutContact.go b/service/connect/api_op_BatchPutContact.go index 11c39abb97a..365950f4f54 100644 --- a/service/connect/api_op_BatchPutContact.go +++ b/service/connect/api_op_BatchPutContact.go @@ -134,6 +134,9 @@ func (c *Client) addOperationBatchPutContactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opBatchPutContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_ClaimPhoneNumber.go b/service/connect/api_op_ClaimPhoneNumber.go index 2aff222838e..8e3a2d67495 100644 --- a/service/connect/api_op_ClaimPhoneNumber.go +++ b/service/connect/api_op_ClaimPhoneNumber.go @@ -169,6 +169,9 @@ func (c *Client) addOperationClaimPhoneNumberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opClaimPhoneNumberMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CompleteAttachedFileUpload.go b/service/connect/api_op_CompleteAttachedFileUpload.go index 83c23ed4655..497680ec48c 100644 --- a/service/connect/api_op_CompleteAttachedFileUpload.go +++ b/service/connect/api_op_CompleteAttachedFileUpload.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCompleteAttachedFileUploadMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteAttachedFileUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateAgentStatus.go b/service/connect/api_op_CreateAgentStatus.go index e9a59cc07b4..9d63c9945b7 100644 --- a/service/connect/api_op_CreateAgentStatus.go +++ b/service/connect/api_op_CreateAgentStatus.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateAgentStatusMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAgentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateContactFlow.go b/service/connect/api_op_CreateContactFlow.go index b8e862a2d25..4bc0937dadc 100644 --- a/service/connect/api_op_CreateContactFlow.go +++ b/service/connect/api_op_CreateContactFlow.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateContactFlowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContactFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateContactFlowModule.go b/service/connect/api_op_CreateContactFlowModule.go index 07fbaab987b..1bd6064dce1 100644 --- a/service/connect/api_op_CreateContactFlowModule.go +++ b/service/connect/api_op_CreateContactFlowModule.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateContactFlowModuleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateContactFlowModuleMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CreateEvaluationForm.go b/service/connect/api_op_CreateEvaluationForm.go index 78214a91426..ea261a38c92 100644 --- a/service/connect/api_op_CreateEvaluationForm.go +++ b/service/connect/api_op_CreateEvaluationForm.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateEvaluationFormMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEvaluationFormMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CreateHoursOfOperation.go b/service/connect/api_op_CreateHoursOfOperation.go index fede5bb0931..e4856862235 100644 --- a/service/connect/api_op_CreateHoursOfOperation.go +++ b/service/connect/api_op_CreateHoursOfOperation.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateHoursOfOperationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHoursOfOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateInstance.go b/service/connect/api_op_CreateInstance.go index b5f5824c51c..3a69bfcbf0f 100644 --- a/service/connect/api_op_CreateInstance.go +++ b/service/connect/api_op_CreateInstance.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateIntegrationAssociation.go b/service/connect/api_op_CreateIntegrationAssociation.go index ac830f25652..9356e9d4b24 100644 --- a/service/connect/api_op_CreateIntegrationAssociation.go +++ b/service/connect/api_op_CreateIntegrationAssociation.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateIntegrationAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntegrationAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateParticipant.go b/service/connect/api_op_CreateParticipant.go index 982b87b596c..05d1dcdd097 100644 --- a/service/connect/api_op_CreateParticipant.go +++ b/service/connect/api_op_CreateParticipant.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateParticipantMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateParticipantMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CreatePersistentContactAssociation.go b/service/connect/api_op_CreatePersistentContactAssociation.go index 145d84fbef8..cbf607f9084 100644 --- a/service/connect/api_op_CreatePersistentContactAssociation.go +++ b/service/connect/api_op_CreatePersistentContactAssociation.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreatePersistentContactAssociationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePersistentContactAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreatePredefinedAttribute.go b/service/connect/api_op_CreatePredefinedAttribute.go index e59a1b73e84..55d5fff893c 100644 --- a/service/connect/api_op_CreatePredefinedAttribute.go +++ b/service/connect/api_op_CreatePredefinedAttribute.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreatePredefinedAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePredefinedAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreatePrompt.go b/service/connect/api_op_CreatePrompt.go index 020a2a3b8ec..26309d42167 100644 --- a/service/connect/api_op_CreatePrompt.go +++ b/service/connect/api_op_CreatePrompt.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreatePromptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePromptValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateQueue.go b/service/connect/api_op_CreateQueue.go index 5b7cba2aa7e..d5e626cb3c0 100644 --- a/service/connect/api_op_CreateQueue.go +++ b/service/connect/api_op_CreateQueue.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateQuickConnect.go b/service/connect/api_op_CreateQuickConnect.go index b4f55159bb9..fbbd00dccca 100644 --- a/service/connect/api_op_CreateQuickConnect.go +++ b/service/connect/api_op_CreateQuickConnect.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateQuickConnectMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateQuickConnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateRoutingProfile.go b/service/connect/api_op_CreateRoutingProfile.go index c326894ba5d..83db742bd9e 100644 --- a/service/connect/api_op_CreateRoutingProfile.go +++ b/service/connect/api_op_CreateRoutingProfile.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateRoutingProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRoutingProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateRule.go b/service/connect/api_op_CreateRule.go index 3dbfd7e80b7..187493a50e4 100644 --- a/service/connect/api_op_CreateRule.go +++ b/service/connect/api_op_CreateRule.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CreateSecurityProfile.go b/service/connect/api_op_CreateSecurityProfile.go index e712f23a633..4833a78f37a 100644 --- a/service/connect/api_op_CreateSecurityProfile.go +++ b/service/connect/api_op_CreateSecurityProfile.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateTaskTemplate.go b/service/connect/api_op_CreateTaskTemplate.go index 77b5c77d121..3bdc455ba00 100644 --- a/service/connect/api_op_CreateTaskTemplate.go +++ b/service/connect/api_op_CreateTaskTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateTaskTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTaskTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CreateTrafficDistributionGroup.go b/service/connect/api_op_CreateTrafficDistributionGroup.go index 6ac2ea1fd0b..44e9d4af9ea 100644 --- a/service/connect/api_op_CreateTrafficDistributionGroup.go +++ b/service/connect/api_op_CreateTrafficDistributionGroup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateTrafficDistributionGroupMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrafficDistributionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_CreateUseCase.go b/service/connect/api_op_CreateUseCase.go index 2c5f4f6b2ff..f7b8384e9bf 100644 --- a/service/connect/api_op_CreateUseCase.go +++ b/service/connect/api_op_CreateUseCase.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateUseCaseMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUseCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateUser.go b/service/connect/api_op_CreateUser.go index 05e5884fa14..28eb69dcac3 100644 --- a/service/connect/api_op_CreateUser.go +++ b/service/connect/api_op_CreateUser.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateUserHierarchyGroup.go b/service/connect/api_op_CreateUserHierarchyGroup.go index fae05b687c4..47c47f09a0e 100644 --- a/service/connect/api_op_CreateUserHierarchyGroup.go +++ b/service/connect/api_op_CreateUserHierarchyGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateUserHierarchyGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserHierarchyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateView.go b/service/connect/api_op_CreateView.go index ed50db7bdfe..4701729a7f1 100644 --- a/service/connect/api_op_CreateView.go +++ b/service/connect/api_op_CreateView.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateViewMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateViewVersion.go b/service/connect/api_op_CreateViewVersion.go index 41f03710826..ccdb36296d0 100644 --- a/service/connect/api_op_CreateViewVersion.go +++ b/service/connect/api_op_CreateViewVersion.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateViewVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateViewVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_CreateVocabulary.go b/service/connect/api_op_CreateVocabulary.go index c6c79b6f705..2075adae4eb 100644 --- a/service/connect/api_op_CreateVocabulary.go +++ b/service/connect/api_op_CreateVocabulary.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateVocabularyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVocabularyMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_DeactivateEvaluationForm.go b/service/connect/api_op_DeactivateEvaluationForm.go index 26dae2d0ab4..ba2843e480e 100644 --- a/service/connect/api_op_DeactivateEvaluationForm.go +++ b/service/connect/api_op_DeactivateEvaluationForm.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeactivateEvaluationFormMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateEvaluationFormValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteAttachedFile.go b/service/connect/api_op_DeleteAttachedFile.go index 0fad3442cf2..bb7bbede395 100644 --- a/service/connect/api_op_DeleteAttachedFile.go +++ b/service/connect/api_op_DeleteAttachedFile.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteAttachedFileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttachedFileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteContactEvaluation.go b/service/connect/api_op_DeleteContactEvaluation.go index a11629e3e86..46ea8a05a54 100644 --- a/service/connect/api_op_DeleteContactEvaluation.go +++ b/service/connect/api_op_DeleteContactEvaluation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteContactEvaluationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteContactFlow.go b/service/connect/api_op_DeleteContactFlow.go index 3ed59643445..5d676349e41 100644 --- a/service/connect/api_op_DeleteContactFlow.go +++ b/service/connect/api_op_DeleteContactFlow.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteContactFlowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteContactFlowModule.go b/service/connect/api_op_DeleteContactFlowModule.go index 6321e03f7a6..bd4f0b2e42c 100644 --- a/service/connect/api_op_DeleteContactFlowModule.go +++ b/service/connect/api_op_DeleteContactFlowModule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteContactFlowModuleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactFlowModuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteEvaluationForm.go b/service/connect/api_op_DeleteEvaluationForm.go index fe2f4cff2c1..166c703c90d 100644 --- a/service/connect/api_op_DeleteEvaluationForm.go +++ b/service/connect/api_op_DeleteEvaluationForm.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteEvaluationFormMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEvaluationFormValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteHoursOfOperation.go b/service/connect/api_op_DeleteHoursOfOperation.go index 80def1c3eab..78ff74dba63 100644 --- a/service/connect/api_op_DeleteHoursOfOperation.go +++ b/service/connect/api_op_DeleteHoursOfOperation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteHoursOfOperationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHoursOfOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteInstance.go b/service/connect/api_op_DeleteInstance.go index 6131280cdee..fc8f7a1a213 100644 --- a/service/connect/api_op_DeleteInstance.go +++ b/service/connect/api_op_DeleteInstance.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteIntegrationAssociation.go b/service/connect/api_op_DeleteIntegrationAssociation.go index da1aa9f9ea8..4fd4f170f77 100644 --- a/service/connect/api_op_DeleteIntegrationAssociation.go +++ b/service/connect/api_op_DeleteIntegrationAssociation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteIntegrationAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeletePredefinedAttribute.go b/service/connect/api_op_DeletePredefinedAttribute.go index 91760597e2c..444a03795b7 100644 --- a/service/connect/api_op_DeletePredefinedAttribute.go +++ b/service/connect/api_op_DeletePredefinedAttribute.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePredefinedAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePredefinedAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeletePrompt.go b/service/connect/api_op_DeletePrompt.go index 20e628fa1bc..53cc0090f8e 100644 --- a/service/connect/api_op_DeletePrompt.go +++ b/service/connect/api_op_DeletePrompt.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeletePromptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePromptValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteQueue.go b/service/connect/api_op_DeleteQueue.go index ea9c92fb892..9d0b8196a80 100644 --- a/service/connect/api_op_DeleteQueue.go +++ b/service/connect/api_op_DeleteQueue.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteQuickConnect.go b/service/connect/api_op_DeleteQuickConnect.go index 956c1406cd9..5fd6a6a1447 100644 --- a/service/connect/api_op_DeleteQuickConnect.go +++ b/service/connect/api_op_DeleteQuickConnect.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteQuickConnectMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQuickConnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteRoutingProfile.go b/service/connect/api_op_DeleteRoutingProfile.go index a4a45743f4e..ee9b9458e89 100644 --- a/service/connect/api_op_DeleteRoutingProfile.go +++ b/service/connect/api_op_DeleteRoutingProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteRoutingProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoutingProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteRule.go b/service/connect/api_op_DeleteRule.go index d44cfdaaeef..dd9a11c35b3 100644 --- a/service/connect/api_op_DeleteRule.go +++ b/service/connect/api_op_DeleteRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteSecurityProfile.go b/service/connect/api_op_DeleteSecurityProfile.go index eef586dffbe..f7f8c0a72f2 100644 --- a/service/connect/api_op_DeleteSecurityProfile.go +++ b/service/connect/api_op_DeleteSecurityProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteTaskTemplate.go b/service/connect/api_op_DeleteTaskTemplate.go index 2a62a96c6c5..97046b38e8e 100644 --- a/service/connect/api_op_DeleteTaskTemplate.go +++ b/service/connect/api_op_DeleteTaskTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTaskTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTaskTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteTrafficDistributionGroup.go b/service/connect/api_op_DeleteTrafficDistributionGroup.go index e2b318a2b42..905b65dac41 100644 --- a/service/connect/api_op_DeleteTrafficDistributionGroup.go +++ b/service/connect/api_op_DeleteTrafficDistributionGroup.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTrafficDistributionGroupMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficDistributionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteUseCase.go b/service/connect/api_op_DeleteUseCase.go index cd4f0242fda..053beb2972c 100644 --- a/service/connect/api_op_DeleteUseCase.go +++ b/service/connect/api_op_DeleteUseCase.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteUseCaseMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUseCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteUser.go b/service/connect/api_op_DeleteUser.go index 708f196faee..c079947a02f 100644 --- a/service/connect/api_op_DeleteUser.go +++ b/service/connect/api_op_DeleteUser.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteUserHierarchyGroup.go b/service/connect/api_op_DeleteUserHierarchyGroup.go index bcfc5022bff..cf4f7a5b876 100644 --- a/service/connect/api_op_DeleteUserHierarchyGroup.go +++ b/service/connect/api_op_DeleteUserHierarchyGroup.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteUserHierarchyGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserHierarchyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteView.go b/service/connect/api_op_DeleteView.go index fdcf0a2b118..19786807cbb 100644 --- a/service/connect/api_op_DeleteView.go +++ b/service/connect/api_op_DeleteView.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteViewMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteViewVersion.go b/service/connect/api_op_DeleteViewVersion.go index c15da9a1dc3..391e20301be 100644 --- a/service/connect/api_op_DeleteViewVersion.go +++ b/service/connect/api_op_DeleteViewVersion.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteViewVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteViewVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DeleteVocabulary.go b/service/connect/api_op_DeleteVocabulary.go index 16b6fc9dd4b..3248a738be0 100644 --- a/service/connect/api_op_DeleteVocabulary.go +++ b/service/connect/api_op_DeleteVocabulary.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteVocabularyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeAgentStatus.go b/service/connect/api_op_DescribeAgentStatus.go index 844fa7c92e9..421c3bb8e4d 100644 --- a/service/connect/api_op_DescribeAgentStatus.go +++ b/service/connect/api_op_DescribeAgentStatus.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeAgentStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAgentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeContact.go b/service/connect/api_op_DescribeContact.go index d53133cb0eb..28d8205679e 100644 --- a/service/connect/api_op_DescribeContact.go +++ b/service/connect/api_op_DescribeContact.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeContactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeContactEvaluation.go b/service/connect/api_op_DescribeContactEvaluation.go index a3d9c9b226a..4ca45e70a46 100644 --- a/service/connect/api_op_DescribeContactEvaluation.go +++ b/service/connect/api_op_DescribeContactEvaluation.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeContactEvaluationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContactEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeContactFlow.go b/service/connect/api_op_DescribeContactFlow.go index 6d6da63cf1f..e079977f699 100644 --- a/service/connect/api_op_DescribeContactFlow.go +++ b/service/connect/api_op_DescribeContactFlow.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeContactFlowMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContactFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeContactFlowModule.go b/service/connect/api_op_DescribeContactFlowModule.go index ab159c247e5..e6a5387c8e0 100644 --- a/service/connect/api_op_DescribeContactFlowModule.go +++ b/service/connect/api_op_DescribeContactFlowModule.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeContactFlowModuleMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContactFlowModuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeEvaluationForm.go b/service/connect/api_op_DescribeEvaluationForm.go index 596510224cb..8c1f1c35a4f 100644 --- a/service/connect/api_op_DescribeEvaluationForm.go +++ b/service/connect/api_op_DescribeEvaluationForm.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeEvaluationFormMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEvaluationFormValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeHoursOfOperation.go b/service/connect/api_op_DescribeHoursOfOperation.go index 5610a8cdc5d..d34d665e598 100644 --- a/service/connect/api_op_DescribeHoursOfOperation.go +++ b/service/connect/api_op_DescribeHoursOfOperation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeHoursOfOperationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHoursOfOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeInstance.go b/service/connect/api_op_DescribeInstance.go index c12c416c4bd..65757030d02 100644 --- a/service/connect/api_op_DescribeInstance.go +++ b/service/connect/api_op_DescribeInstance.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeInstanceAttribute.go b/service/connect/api_op_DescribeInstanceAttribute.go index 1204f1e3228..52f242cec30 100644 --- a/service/connect/api_op_DescribeInstanceAttribute.go +++ b/service/connect/api_op_DescribeInstanceAttribute.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeInstanceAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeInstanceStorageConfig.go b/service/connect/api_op_DescribeInstanceStorageConfig.go index 42e606750d2..68a65f17b85 100644 --- a/service/connect/api_op_DescribeInstanceStorageConfig.go +++ b/service/connect/api_op_DescribeInstanceStorageConfig.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeInstanceStorageConfigMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceStorageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribePhoneNumber.go b/service/connect/api_op_DescribePhoneNumber.go index cc27a688e6a..a85eae6a2bd 100644 --- a/service/connect/api_op_DescribePhoneNumber.go +++ b/service/connect/api_op_DescribePhoneNumber.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribePhoneNumberMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribePredefinedAttribute.go b/service/connect/api_op_DescribePredefinedAttribute.go index d4c409b9046..b7b8b0fb257 100644 --- a/service/connect/api_op_DescribePredefinedAttribute.go +++ b/service/connect/api_op_DescribePredefinedAttribute.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribePredefinedAttributeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePredefinedAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribePrompt.go b/service/connect/api_op_DescribePrompt.go index 8d2a3cb9451..90fc6616220 100644 --- a/service/connect/api_op_DescribePrompt.go +++ b/service/connect/api_op_DescribePrompt.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribePromptMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePromptValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeQueue.go b/service/connect/api_op_DescribeQueue.go index a4ce768c2ba..6fad848d0b9 100644 --- a/service/connect/api_op_DescribeQueue.go +++ b/service/connect/api_op_DescribeQueue.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeQueueMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeQuickConnect.go b/service/connect/api_op_DescribeQuickConnect.go index 49247830caf..eea228c8f60 100644 --- a/service/connect/api_op_DescribeQuickConnect.go +++ b/service/connect/api_op_DescribeQuickConnect.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeQuickConnectMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeQuickConnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeRoutingProfile.go b/service/connect/api_op_DescribeRoutingProfile.go index b2066904ecb..09d0d1ab8f1 100644 --- a/service/connect/api_op_DescribeRoutingProfile.go +++ b/service/connect/api_op_DescribeRoutingProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeRoutingProfileMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRoutingProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeRule.go b/service/connect/api_op_DescribeRule.go index 6832123933a..0aa86106337 100644 --- a/service/connect/api_op_DescribeRule.go +++ b/service/connect/api_op_DescribeRule.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeRuleMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeSecurityProfile.go b/service/connect/api_op_DescribeSecurityProfile.go index 445d6222c34..5d6b148855a 100644 --- a/service/connect/api_op_DescribeSecurityProfile.go +++ b/service/connect/api_op_DescribeSecurityProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeSecurityProfileMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeTrafficDistributionGroup.go b/service/connect/api_op_DescribeTrafficDistributionGroup.go index 661cc0c250a..e357a333b2c 100644 --- a/service/connect/api_op_DescribeTrafficDistributionGroup.go +++ b/service/connect/api_op_DescribeTrafficDistributionGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeTrafficDistributionGroupMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrafficDistributionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeUser.go b/service/connect/api_op_DescribeUser.go index 79de40718aa..c81d02e5ede 100644 --- a/service/connect/api_op_DescribeUser.go +++ b/service/connect/api_op_DescribeUser.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeUserHierarchyGroup.go b/service/connect/api_op_DescribeUserHierarchyGroup.go index 843ae2bd772..16575409895 100644 --- a/service/connect/api_op_DescribeUserHierarchyGroup.go +++ b/service/connect/api_op_DescribeUserHierarchyGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeUserHierarchyGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserHierarchyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeUserHierarchyStructure.go b/service/connect/api_op_DescribeUserHierarchyStructure.go index 4dbbc601532..49616b6988f 100644 --- a/service/connect/api_op_DescribeUserHierarchyStructure.go +++ b/service/connect/api_op_DescribeUserHierarchyStructure.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeUserHierarchyStructureMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserHierarchyStructureValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeView.go b/service/connect/api_op_DescribeView.go index 7eecde09af0..0c5e598fc68 100644 --- a/service/connect/api_op_DescribeView.go +++ b/service/connect/api_op_DescribeView.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeViewMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DescribeVocabulary.go b/service/connect/api_op_DescribeVocabulary.go index a399de37d40..6f93503995e 100644 --- a/service/connect/api_op_DescribeVocabulary.go +++ b/service/connect/api_op_DescribeVocabulary.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeVocabularyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateAnalyticsDataSet.go b/service/connect/api_op_DisassociateAnalyticsDataSet.go index 110d5cb82e3..7470093538e 100644 --- a/service/connect/api_op_DisassociateAnalyticsDataSet.go +++ b/service/connect/api_op_DisassociateAnalyticsDataSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateAnalyticsDataSetMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAnalyticsDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateApprovedOrigin.go b/service/connect/api_op_DisassociateApprovedOrigin.go index b66d0e22e25..86a30eefd9c 100644 --- a/service/connect/api_op_DisassociateApprovedOrigin.go +++ b/service/connect/api_op_DisassociateApprovedOrigin.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateApprovedOriginMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateApprovedOriginValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateBot.go b/service/connect/api_op_DisassociateBot.go index cbbd7a48278..7fd49bc4ea9 100644 --- a/service/connect/api_op_DisassociateBot.go +++ b/service/connect/api_op_DisassociateBot.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisassociateBotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateFlow.go b/service/connect/api_op_DisassociateFlow.go index 67598cf50ae..4912f79a180 100644 --- a/service/connect/api_op_DisassociateFlow.go +++ b/service/connect/api_op_DisassociateFlow.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisassociateFlowMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateInstanceStorageConfig.go b/service/connect/api_op_DisassociateInstanceStorageConfig.go index 4287e8d1813..4496446c693 100644 --- a/service/connect/api_op_DisassociateInstanceStorageConfig.go +++ b/service/connect/api_op_DisassociateInstanceStorageConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDisassociateInstanceStorageConfigMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateInstanceStorageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateLambdaFunction.go b/service/connect/api_op_DisassociateLambdaFunction.go index 63686d2625f..60956bf8cf0 100644 --- a/service/connect/api_op_DisassociateLambdaFunction.go +++ b/service/connect/api_op_DisassociateLambdaFunction.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateLambdaFunctionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateLambdaFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateLexBot.go b/service/connect/api_op_DisassociateLexBot.go index a67e4c8dd96..f83ca151fbf 100644 --- a/service/connect/api_op_DisassociateLexBot.go +++ b/service/connect/api_op_DisassociateLexBot.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateLexBotMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateLexBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociatePhoneNumberContactFlow.go b/service/connect/api_op_DisassociatePhoneNumberContactFlow.go index f616f628c32..71d5717e93e 100644 --- a/service/connect/api_op_DisassociatePhoneNumberContactFlow.go +++ b/service/connect/api_op_DisassociatePhoneNumberContactFlow.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDisassociatePhoneNumberContactFlowMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePhoneNumberContactFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateQueueQuickConnects.go b/service/connect/api_op_DisassociateQueueQuickConnects.go index 271551cdc58..a4a3ffc9d75 100644 --- a/service/connect/api_op_DisassociateQueueQuickConnects.go +++ b/service/connect/api_op_DisassociateQueueQuickConnects.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateQueueQuickConnectsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateQueueQuickConnectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateRoutingProfileQueues.go b/service/connect/api_op_DisassociateRoutingProfileQueues.go index 21df4943358..55d74c2e68d 100644 --- a/service/connect/api_op_DisassociateRoutingProfileQueues.go +++ b/service/connect/api_op_DisassociateRoutingProfileQueues.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisassociateRoutingProfileQueuesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateRoutingProfileQueuesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateSecurityKey.go b/service/connect/api_op_DisassociateSecurityKey.go index 9a08381d198..5cf9d9b93ae 100644 --- a/service/connect/api_op_DisassociateSecurityKey.go +++ b/service/connect/api_op_DisassociateSecurityKey.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateSecurityKeyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateSecurityKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateTrafficDistributionGroupUser.go b/service/connect/api_op_DisassociateTrafficDistributionGroupUser.go index 53dbd275b1c..1d98c7b1b9a 100644 --- a/service/connect/api_op_DisassociateTrafficDistributionGroupUser.go +++ b/service/connect/api_op_DisassociateTrafficDistributionGroupUser.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateTrafficDistributionGroupUserMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTrafficDistributionGroupUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DisassociateUserProficiencies.go b/service/connect/api_op_DisassociateUserProficiencies.go index 4dc37e893cc..a5919a1ebdd 100644 --- a/service/connect/api_op_DisassociateUserProficiencies.go +++ b/service/connect/api_op_DisassociateUserProficiencies.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociateUserProficienciesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateUserProficienciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_DismissUserContact.go b/service/connect/api_op_DismissUserContact.go index 4a02a4114c1..ccff9bf96ad 100644 --- a/service/connect/api_op_DismissUserContact.go +++ b/service/connect/api_op_DismissUserContact.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDismissUserContactMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDismissUserContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetAttachedFile.go b/service/connect/api_op_GetAttachedFile.go index fe7d8f3f218..1ebd03e7e6c 100644 --- a/service/connect/api_op_GetAttachedFile.go +++ b/service/connect/api_op_GetAttachedFile.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetAttachedFileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAttachedFileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetContactAttributes.go b/service/connect/api_op_GetContactAttributes.go index 834383f7f7b..b505fc25557 100644 --- a/service/connect/api_op_GetContactAttributes.go +++ b/service/connect/api_op_GetContactAttributes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetContactAttributesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContactAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetCurrentMetricData.go b/service/connect/api_op_GetCurrentMetricData.go index d5226fd8814..d66399f9e9d 100644 --- a/service/connect/api_op_GetCurrentMetricData.go +++ b/service/connect/api_op_GetCurrentMetricData.go @@ -279,6 +279,9 @@ func (c *Client) addOperationGetCurrentMetricDataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCurrentMetricDataValidationMiddleware(stack); err != nil { return err } @@ -303,14 +306,6 @@ func (c *Client) addOperationGetCurrentMetricDataMiddlewares(stack *middleware.S return nil } -// GetCurrentMetricDataAPIClient is a client that implements the -// GetCurrentMetricData operation. -type GetCurrentMetricDataAPIClient interface { - GetCurrentMetricData(context.Context, *GetCurrentMetricDataInput, ...func(*Options)) (*GetCurrentMetricDataOutput, error) -} - -var _ GetCurrentMetricDataAPIClient = (*Client)(nil) - // GetCurrentMetricDataPaginatorOptions is the paginator options for // GetCurrentMetricData type GetCurrentMetricDataPaginatorOptions struct { @@ -375,6 +370,9 @@ func (p *GetCurrentMetricDataPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCurrentMetricData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -394,6 +392,14 @@ func (p *GetCurrentMetricDataPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// GetCurrentMetricDataAPIClient is a client that implements the +// GetCurrentMetricData operation. +type GetCurrentMetricDataAPIClient interface { + GetCurrentMetricData(context.Context, *GetCurrentMetricDataInput, ...func(*Options)) (*GetCurrentMetricDataOutput, error) +} + +var _ GetCurrentMetricDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCurrentMetricData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_GetCurrentUserData.go b/service/connect/api_op_GetCurrentUserData.go index 54069392ed9..7570da23348 100644 --- a/service/connect/api_op_GetCurrentUserData.go +++ b/service/connect/api_op_GetCurrentUserData.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetCurrentUserDataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCurrentUserDataValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationGetCurrentUserDataMiddlewares(stack *middleware.Sta return nil } -// GetCurrentUserDataAPIClient is a client that implements the GetCurrentUserData -// operation. -type GetCurrentUserDataAPIClient interface { - GetCurrentUserData(context.Context, *GetCurrentUserDataInput, ...func(*Options)) (*GetCurrentUserDataOutput, error) -} - -var _ GetCurrentUserDataAPIClient = (*Client)(nil) - // GetCurrentUserDataPaginatorOptions is the paginator options for // GetCurrentUserData type GetCurrentUserDataPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *GetCurrentUserDataPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCurrentUserData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *GetCurrentUserDataPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetCurrentUserDataAPIClient is a client that implements the GetCurrentUserData +// operation. +type GetCurrentUserDataAPIClient interface { + GetCurrentUserData(context.Context, *GetCurrentUserDataInput, ...func(*Options)) (*GetCurrentUserDataOutput, error) +} + +var _ GetCurrentUserDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCurrentUserData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_GetFederationToken.go b/service/connect/api_op_GetFederationToken.go index aca80ccf4fb..890a42eed39 100644 --- a/service/connect/api_op_GetFederationToken.go +++ b/service/connect/api_op_GetFederationToken.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetFlowAssociation.go b/service/connect/api_op_GetFlowAssociation.go index 43129bfa00a..831f7e43288 100644 --- a/service/connect/api_op_GetFlowAssociation.go +++ b/service/connect/api_op_GetFlowAssociation.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetFlowAssociationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFlowAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetMetricData.go b/service/connect/api_op_GetMetricData.go index 3c2bf9d8bda..cfd2f922b6e 100644 --- a/service/connect/api_op_GetMetricData.go +++ b/service/connect/api_op_GetMetricData.go @@ -300,6 +300,9 @@ func (c *Client) addOperationGetMetricDataMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricDataValidationMiddleware(stack); err != nil { return err } @@ -324,13 +327,6 @@ func (c *Client) addOperationGetMetricDataMiddlewares(stack *middleware.Stack, o return nil } -// GetMetricDataAPIClient is a client that implements the GetMetricData operation. -type GetMetricDataAPIClient interface { - GetMetricData(context.Context, *GetMetricDataInput, ...func(*Options)) (*GetMetricDataOutput, error) -} - -var _ GetMetricDataAPIClient = (*Client)(nil) - // GetMetricDataPaginatorOptions is the paginator options for GetMetricData type GetMetricDataPaginatorOptions struct { // The maximum number of results to return per page. @@ -394,6 +390,9 @@ func (p *GetMetricDataPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMetricData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -413,6 +412,13 @@ func (p *GetMetricDataPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetMetricDataAPIClient is a client that implements the GetMetricData operation. +type GetMetricDataAPIClient interface { + GetMetricData(context.Context, *GetMetricDataInput, ...func(*Options)) (*GetMetricDataOutput, error) +} + +var _ GetMetricDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMetricData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_GetMetricDataV2.go b/service/connect/api_op_GetMetricDataV2.go index a94b53ab6aa..ff264ff7193 100644 --- a/service/connect/api_op_GetMetricDataV2.go +++ b/service/connect/api_op_GetMetricDataV2.go @@ -1074,6 +1074,9 @@ func (c *Client) addOperationGetMetricDataV2Middlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricDataV2ValidationMiddleware(stack); err != nil { return err } @@ -1098,14 +1101,6 @@ func (c *Client) addOperationGetMetricDataV2Middlewares(stack *middleware.Stack, return nil } -// GetMetricDataV2APIClient is a client that implements the GetMetricDataV2 -// operation. -type GetMetricDataV2APIClient interface { - GetMetricDataV2(context.Context, *GetMetricDataV2Input, ...func(*Options)) (*GetMetricDataV2Output, error) -} - -var _ GetMetricDataV2APIClient = (*Client)(nil) - // GetMetricDataV2PaginatorOptions is the paginator options for GetMetricDataV2 type GetMetricDataV2PaginatorOptions struct { // The maximum number of results to return per page. @@ -1169,6 +1164,9 @@ func (p *GetMetricDataV2Paginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMetricDataV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -1188,6 +1186,14 @@ func (p *GetMetricDataV2Paginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetMetricDataV2APIClient is a client that implements the GetMetricDataV2 +// operation. +type GetMetricDataV2APIClient interface { + GetMetricDataV2(context.Context, *GetMetricDataV2Input, ...func(*Options)) (*GetMetricDataV2Output, error) +} + +var _ GetMetricDataV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMetricDataV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_GetPromptFile.go b/service/connect/api_op_GetPromptFile.go index 9ff1dad5914..42fe26e24b4 100644 --- a/service/connect/api_op_GetPromptFile.go +++ b/service/connect/api_op_GetPromptFile.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetPromptFileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPromptFileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetTaskTemplate.go b/service/connect/api_op_GetTaskTemplate.go index 7ee65399314..c0b6db3f9f8 100644 --- a/service/connect/api_op_GetTaskTemplate.go +++ b/service/connect/api_op_GetTaskTemplate.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetTaskTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTaskTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_GetTrafficDistribution.go b/service/connect/api_op_GetTrafficDistribution.go index 4aa5af4139c..7c6fe725fc8 100644 --- a/service/connect/api_op_GetTrafficDistribution.go +++ b/service/connect/api_op_GetTrafficDistribution.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetTrafficDistributionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrafficDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_ImportPhoneNumber.go b/service/connect/api_op_ImportPhoneNumber.go index b317daab2ce..74d552e512d 100644 --- a/service/connect/api_op_ImportPhoneNumber.go +++ b/service/connect/api_op_ImportPhoneNumber.go @@ -134,6 +134,9 @@ func (c *Client) addOperationImportPhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportPhoneNumberMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_ListAgentStatuses.go b/service/connect/api_op_ListAgentStatuses.go index 04a8069c2c6..8098d7be420 100644 --- a/service/connect/api_op_ListAgentStatuses.go +++ b/service/connect/api_op_ListAgentStatuses.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAgentStatusesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAgentStatusesValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAgentStatusesMiddlewares(stack *middleware.Stac return nil } -// ListAgentStatusesAPIClient is a client that implements the ListAgentStatuses -// operation. -type ListAgentStatusesAPIClient interface { - ListAgentStatuses(context.Context, *ListAgentStatusesInput, ...func(*Options)) (*ListAgentStatusesOutput, error) -} - -var _ ListAgentStatusesAPIClient = (*Client)(nil) - // ListAgentStatusesPaginatorOptions is the paginator options for ListAgentStatuses type ListAgentStatusesPaginatorOptions struct { // The maximum number of results to return per page. @@ -219,6 +214,9 @@ func (p *ListAgentStatusesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgentStatuses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListAgentStatusesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListAgentStatusesAPIClient is a client that implements the ListAgentStatuses +// operation. +type ListAgentStatusesAPIClient interface { + ListAgentStatuses(context.Context, *ListAgentStatusesInput, ...func(*Options)) (*ListAgentStatusesOutput, error) +} + +var _ ListAgentStatusesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgentStatuses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListAnalyticsDataAssociations.go b/service/connect/api_op_ListAnalyticsDataAssociations.go index e62bcfd236c..3d9b4f715d4 100644 --- a/service/connect/api_op_ListAnalyticsDataAssociations.go +++ b/service/connect/api_op_ListAnalyticsDataAssociations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListAnalyticsDataAssociationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnalyticsDataAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_ListApprovedOrigins.go b/service/connect/api_op_ListApprovedOrigins.go index bb0c992354d..660aa527d81 100644 --- a/service/connect/api_op_ListApprovedOrigins.go +++ b/service/connect/api_op_ListApprovedOrigins.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListApprovedOriginsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApprovedOriginsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListApprovedOriginsMiddlewares(stack *middleware.St return nil } -// ListApprovedOriginsAPIClient is a client that implements the -// ListApprovedOrigins operation. -type ListApprovedOriginsAPIClient interface { - ListApprovedOrigins(context.Context, *ListApprovedOriginsInput, ...func(*Options)) (*ListApprovedOriginsOutput, error) -} - -var _ ListApprovedOriginsAPIClient = (*Client)(nil) - // ListApprovedOriginsPaginatorOptions is the paginator options for // ListApprovedOrigins type ListApprovedOriginsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListApprovedOriginsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApprovedOrigins(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListApprovedOriginsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListApprovedOriginsAPIClient is a client that implements the +// ListApprovedOrigins operation. +type ListApprovedOriginsAPIClient interface { + ListApprovedOrigins(context.Context, *ListApprovedOriginsInput, ...func(*Options)) (*ListApprovedOriginsOutput, error) +} + +var _ ListApprovedOriginsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApprovedOrigins(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListBots.go b/service/connect/api_op_ListBots.go index 737b5981481..227114ded83 100644 --- a/service/connect/api_op_ListBots.go +++ b/service/connect/api_op_ListBots.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListBotsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotsValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListBotsMiddlewares(stack *middleware.Stack, option return nil } -// ListBotsAPIClient is a client that implements the ListBots operation. -type ListBotsAPIClient interface { - ListBots(context.Context, *ListBotsInput, ...func(*Options)) (*ListBotsOutput, error) -} - -var _ ListBotsAPIClient = (*Client)(nil) - // ListBotsPaginatorOptions is the paginator options for ListBots type ListBotsPaginatorOptions struct { // The maximum number of results to return per page. @@ -223,6 +219,9 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListBotsAPIClient is a client that implements the ListBots operation. +type ListBotsAPIClient interface { + ListBots(context.Context, *ListBotsInput, ...func(*Options)) (*ListBotsOutput, error) +} + +var _ ListBotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListContactEvaluations.go b/service/connect/api_op_ListContactEvaluations.go index e0e42983763..d2ccefd9b67 100644 --- a/service/connect/api_op_ListContactEvaluations.go +++ b/service/connect/api_op_ListContactEvaluations.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListContactEvaluationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactEvaluationsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListContactEvaluationsMiddlewares(stack *middleware return nil } -// ListContactEvaluationsAPIClient is a client that implements the -// ListContactEvaluations operation. -type ListContactEvaluationsAPIClient interface { - ListContactEvaluations(context.Context, *ListContactEvaluationsInput, ...func(*Options)) (*ListContactEvaluationsOutput, error) -} - -var _ ListContactEvaluationsAPIClient = (*Client)(nil) - // ListContactEvaluationsPaginatorOptions is the paginator options for // ListContactEvaluations type ListContactEvaluationsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListContactEvaluationsPaginator) NextPage(ctx context.Context, optFns . params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContactEvaluations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListContactEvaluationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListContactEvaluationsAPIClient is a client that implements the +// ListContactEvaluations operation. +type ListContactEvaluationsAPIClient interface { + ListContactEvaluations(context.Context, *ListContactEvaluationsInput, ...func(*Options)) (*ListContactEvaluationsOutput, error) +} + +var _ ListContactEvaluationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContactEvaluations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListContactFlowModules.go b/service/connect/api_op_ListContactFlowModules.go index 0cee3981b76..b919b1998e4 100644 --- a/service/connect/api_op_ListContactFlowModules.go +++ b/service/connect/api_op_ListContactFlowModules.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListContactFlowModulesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactFlowModulesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListContactFlowModulesMiddlewares(stack *middleware return nil } -// ListContactFlowModulesAPIClient is a client that implements the -// ListContactFlowModules operation. -type ListContactFlowModulesAPIClient interface { - ListContactFlowModules(context.Context, *ListContactFlowModulesInput, ...func(*Options)) (*ListContactFlowModulesOutput, error) -} - -var _ ListContactFlowModulesAPIClient = (*Client)(nil) - // ListContactFlowModulesPaginatorOptions is the paginator options for // ListContactFlowModules type ListContactFlowModulesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListContactFlowModulesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContactFlowModules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListContactFlowModulesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListContactFlowModulesAPIClient is a client that implements the +// ListContactFlowModules operation. +type ListContactFlowModulesAPIClient interface { + ListContactFlowModules(context.Context, *ListContactFlowModulesInput, ...func(*Options)) (*ListContactFlowModulesOutput, error) +} + +var _ ListContactFlowModulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContactFlowModules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListContactFlows.go b/service/connect/api_op_ListContactFlows.go index 2fc92f60884..a6f072fc5db 100644 --- a/service/connect/api_op_ListContactFlows.go +++ b/service/connect/api_op_ListContactFlows.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListContactFlowsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactFlowsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListContactFlowsMiddlewares(stack *middleware.Stack return nil } -// ListContactFlowsAPIClient is a client that implements the ListContactFlows -// operation. -type ListContactFlowsAPIClient interface { - ListContactFlows(context.Context, *ListContactFlowsInput, ...func(*Options)) (*ListContactFlowsOutput, error) -} - -var _ ListContactFlowsAPIClient = (*Client)(nil) - // ListContactFlowsPaginatorOptions is the paginator options for ListContactFlows type ListContactFlowsPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -227,6 +222,9 @@ func (p *ListContactFlowsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContactFlows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListContactFlowsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListContactFlowsAPIClient is a client that implements the ListContactFlows +// operation. +type ListContactFlowsAPIClient interface { + ListContactFlows(context.Context, *ListContactFlowsInput, ...func(*Options)) (*ListContactFlowsOutput, error) +} + +var _ ListContactFlowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContactFlows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListContactReferences.go b/service/connect/api_op_ListContactReferences.go index dab9bf3c2bc..2592da01ea5 100644 --- a/service/connect/api_op_ListContactReferences.go +++ b/service/connect/api_op_ListContactReferences.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListContactReferencesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactReferencesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListContactReferencesMiddlewares(stack *middleware. return nil } -// ListContactReferencesAPIClient is a client that implements the -// ListContactReferences operation. -type ListContactReferencesAPIClient interface { - ListContactReferences(context.Context, *ListContactReferencesInput, ...func(*Options)) (*ListContactReferencesOutput, error) -} - -var _ ListContactReferencesAPIClient = (*Client)(nil) - // ListContactReferencesPaginatorOptions is the paginator options for // ListContactReferences type ListContactReferencesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListContactReferencesPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContactReferences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListContactReferencesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListContactReferencesAPIClient is a client that implements the +// ListContactReferences operation. +type ListContactReferencesAPIClient interface { + ListContactReferences(context.Context, *ListContactReferencesInput, ...func(*Options)) (*ListContactReferencesOutput, error) +} + +var _ ListContactReferencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContactReferences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListDefaultVocabularies.go b/service/connect/api_op_ListDefaultVocabularies.go index 141ee873448..308c1356955 100644 --- a/service/connect/api_op_ListDefaultVocabularies.go +++ b/service/connect/api_op_ListDefaultVocabularies.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListDefaultVocabulariesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDefaultVocabulariesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListDefaultVocabulariesMiddlewares(stack *middlewar return nil } -// ListDefaultVocabulariesAPIClient is a client that implements the -// ListDefaultVocabularies operation. -type ListDefaultVocabulariesAPIClient interface { - ListDefaultVocabularies(context.Context, *ListDefaultVocabulariesInput, ...func(*Options)) (*ListDefaultVocabulariesOutput, error) -} - -var _ ListDefaultVocabulariesAPIClient = (*Client)(nil) - // ListDefaultVocabulariesPaginatorOptions is the paginator options for // ListDefaultVocabularies type ListDefaultVocabulariesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListDefaultVocabulariesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDefaultVocabularies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListDefaultVocabulariesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDefaultVocabulariesAPIClient is a client that implements the +// ListDefaultVocabularies operation. +type ListDefaultVocabulariesAPIClient interface { + ListDefaultVocabularies(context.Context, *ListDefaultVocabulariesInput, ...func(*Options)) (*ListDefaultVocabulariesOutput, error) +} + +var _ ListDefaultVocabulariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDefaultVocabularies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListEvaluationFormVersions.go b/service/connect/api_op_ListEvaluationFormVersions.go index 7792229cc96..4035d201def 100644 --- a/service/connect/api_op_ListEvaluationFormVersions.go +++ b/service/connect/api_op_ListEvaluationFormVersions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListEvaluationFormVersionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEvaluationFormVersionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListEvaluationFormVersionsMiddlewares(stack *middle return nil } -// ListEvaluationFormVersionsAPIClient is a client that implements the -// ListEvaluationFormVersions operation. -type ListEvaluationFormVersionsAPIClient interface { - ListEvaluationFormVersions(context.Context, *ListEvaluationFormVersionsInput, ...func(*Options)) (*ListEvaluationFormVersionsOutput, error) -} - -var _ ListEvaluationFormVersionsAPIClient = (*Client)(nil) - // ListEvaluationFormVersionsPaginatorOptions is the paginator options for // ListEvaluationFormVersions type ListEvaluationFormVersionsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListEvaluationFormVersionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEvaluationFormVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListEvaluationFormVersionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListEvaluationFormVersionsAPIClient is a client that implements the +// ListEvaluationFormVersions operation. +type ListEvaluationFormVersionsAPIClient interface { + ListEvaluationFormVersions(context.Context, *ListEvaluationFormVersionsInput, ...func(*Options)) (*ListEvaluationFormVersionsOutput, error) +} + +var _ ListEvaluationFormVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEvaluationFormVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListEvaluationForms.go b/service/connect/api_op_ListEvaluationForms.go index 178edb8a38b..d9844508e7e 100644 --- a/service/connect/api_op_ListEvaluationForms.go +++ b/service/connect/api_op_ListEvaluationForms.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListEvaluationFormsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEvaluationFormsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListEvaluationFormsMiddlewares(stack *middleware.St return nil } -// ListEvaluationFormsAPIClient is a client that implements the -// ListEvaluationForms operation. -type ListEvaluationFormsAPIClient interface { - ListEvaluationForms(context.Context, *ListEvaluationFormsInput, ...func(*Options)) (*ListEvaluationFormsOutput, error) -} - -var _ ListEvaluationFormsAPIClient = (*Client)(nil) - // ListEvaluationFormsPaginatorOptions is the paginator options for // ListEvaluationForms type ListEvaluationFormsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListEvaluationFormsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEvaluationForms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListEvaluationFormsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEvaluationFormsAPIClient is a client that implements the +// ListEvaluationForms operation. +type ListEvaluationFormsAPIClient interface { + ListEvaluationForms(context.Context, *ListEvaluationFormsInput, ...func(*Options)) (*ListEvaluationFormsOutput, error) +} + +var _ ListEvaluationFormsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEvaluationForms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListFlowAssociations.go b/service/connect/api_op_ListFlowAssociations.go index 03127b30735..71ce78d294d 100644 --- a/service/connect/api_op_ListFlowAssociations.go +++ b/service/connect/api_op_ListFlowAssociations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListFlowAssociationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFlowAssociationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListFlowAssociationsMiddlewares(stack *middleware.S return nil } -// ListFlowAssociationsAPIClient is a client that implements the -// ListFlowAssociations operation. -type ListFlowAssociationsAPIClient interface { - ListFlowAssociations(context.Context, *ListFlowAssociationsInput, ...func(*Options)) (*ListFlowAssociationsOutput, error) -} - -var _ ListFlowAssociationsAPIClient = (*Client)(nil) - // ListFlowAssociationsPaginatorOptions is the paginator options for // ListFlowAssociations type ListFlowAssociationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListFlowAssociationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlowAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListFlowAssociationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListFlowAssociationsAPIClient is a client that implements the +// ListFlowAssociations operation. +type ListFlowAssociationsAPIClient interface { + ListFlowAssociations(context.Context, *ListFlowAssociationsInput, ...func(*Options)) (*ListFlowAssociationsOutput, error) +} + +var _ ListFlowAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlowAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListHoursOfOperations.go b/service/connect/api_op_ListHoursOfOperations.go index a1747441a99..2b49631a98d 100644 --- a/service/connect/api_op_ListHoursOfOperations.go +++ b/service/connect/api_op_ListHoursOfOperations.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListHoursOfOperationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHoursOfOperationsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListHoursOfOperationsMiddlewares(stack *middleware. return nil } -// ListHoursOfOperationsAPIClient is a client that implements the -// ListHoursOfOperations operation. -type ListHoursOfOperationsAPIClient interface { - ListHoursOfOperations(context.Context, *ListHoursOfOperationsInput, ...func(*Options)) (*ListHoursOfOperationsOutput, error) -} - -var _ ListHoursOfOperationsAPIClient = (*Client)(nil) - // ListHoursOfOperationsPaginatorOptions is the paginator options for // ListHoursOfOperations type ListHoursOfOperationsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListHoursOfOperationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHoursOfOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListHoursOfOperationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListHoursOfOperationsAPIClient is a client that implements the +// ListHoursOfOperations operation. +type ListHoursOfOperationsAPIClient interface { + ListHoursOfOperations(context.Context, *ListHoursOfOperationsInput, ...func(*Options)) (*ListHoursOfOperationsOutput, error) +} + +var _ ListHoursOfOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHoursOfOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListInstanceAttributes.go b/service/connect/api_op_ListInstanceAttributes.go index be9e39c62a9..c7884ce6010 100644 --- a/service/connect/api_op_ListInstanceAttributes.go +++ b/service/connect/api_op_ListInstanceAttributes.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListInstanceAttributesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceAttributesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListInstanceAttributesMiddlewares(stack *middleware return nil } -// ListInstanceAttributesAPIClient is a client that implements the -// ListInstanceAttributes operation. -type ListInstanceAttributesAPIClient interface { - ListInstanceAttributes(context.Context, *ListInstanceAttributesInput, ...func(*Options)) (*ListInstanceAttributesOutput, error) -} - -var _ ListInstanceAttributesAPIClient = (*Client)(nil) - // ListInstanceAttributesPaginatorOptions is the paginator options for // ListInstanceAttributes type ListInstanceAttributesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListInstanceAttributesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListInstanceAttributesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListInstanceAttributesAPIClient is a client that implements the +// ListInstanceAttributes operation. +type ListInstanceAttributesAPIClient interface { + ListInstanceAttributes(context.Context, *ListInstanceAttributesInput, ...func(*Options)) (*ListInstanceAttributesOutput, error) +} + +var _ ListInstanceAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListInstanceStorageConfigs.go b/service/connect/api_op_ListInstanceStorageConfigs.go index 40244cc3418..29c311e0120 100644 --- a/service/connect/api_op_ListInstanceStorageConfigs.go +++ b/service/connect/api_op_ListInstanceStorageConfigs.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListInstanceStorageConfigsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceStorageConfigsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListInstanceStorageConfigsMiddlewares(stack *middle return nil } -// ListInstanceStorageConfigsAPIClient is a client that implements the -// ListInstanceStorageConfigs operation. -type ListInstanceStorageConfigsAPIClient interface { - ListInstanceStorageConfigs(context.Context, *ListInstanceStorageConfigsInput, ...func(*Options)) (*ListInstanceStorageConfigsOutput, error) -} - -var _ ListInstanceStorageConfigsAPIClient = (*Client)(nil) - // ListInstanceStorageConfigsPaginatorOptions is the paginator options for // ListInstanceStorageConfigs type ListInstanceStorageConfigsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListInstanceStorageConfigsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceStorageConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListInstanceStorageConfigsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListInstanceStorageConfigsAPIClient is a client that implements the +// ListInstanceStorageConfigs operation. +type ListInstanceStorageConfigsAPIClient interface { + ListInstanceStorageConfigs(context.Context, *ListInstanceStorageConfigsInput, ...func(*Options)) (*ListInstanceStorageConfigsOutput, error) +} + +var _ ListInstanceStorageConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceStorageConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListInstances.go b/service/connect/api_op_ListInstances.go index 954fc7b69a8..2e3f890f58c 100644 --- a/service/connect/api_op_ListInstances.go +++ b/service/connect/api_op_ListInstances.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstances(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o return nil } -// ListInstancesAPIClient is a client that implements the ListInstances operation. -type ListInstancesAPIClient interface { - ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) -} - -var _ ListInstancesAPIClient = (*Client)(nil) - // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { // The maximum number of results to return per page. @@ -207,6 +203,9 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListInstancesAPIClient is a client that implements the ListInstances operation. +type ListInstancesAPIClient interface { + ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) +} + +var _ ListInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListIntegrationAssociations.go b/service/connect/api_op_ListIntegrationAssociations.go index e05513efea7..bf82bc894bf 100644 --- a/service/connect/api_op_ListIntegrationAssociations.go +++ b/service/connect/api_op_ListIntegrationAssociations.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListIntegrationAssociationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIntegrationAssociationsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListIntegrationAssociationsMiddlewares(stack *middl return nil } -// ListIntegrationAssociationsAPIClient is a client that implements the -// ListIntegrationAssociations operation. -type ListIntegrationAssociationsAPIClient interface { - ListIntegrationAssociations(context.Context, *ListIntegrationAssociationsInput, ...func(*Options)) (*ListIntegrationAssociationsOutput, error) -} - -var _ ListIntegrationAssociationsAPIClient = (*Client)(nil) - // ListIntegrationAssociationsPaginatorOptions is the paginator options for // ListIntegrationAssociations type ListIntegrationAssociationsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListIntegrationAssociationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIntegrationAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListIntegrationAssociationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListIntegrationAssociationsAPIClient is a client that implements the +// ListIntegrationAssociations operation. +type ListIntegrationAssociationsAPIClient interface { + ListIntegrationAssociations(context.Context, *ListIntegrationAssociationsInput, ...func(*Options)) (*ListIntegrationAssociationsOutput, error) +} + +var _ ListIntegrationAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIntegrationAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListLambdaFunctions.go b/service/connect/api_op_ListLambdaFunctions.go index 526b1877364..7856d44cda9 100644 --- a/service/connect/api_op_ListLambdaFunctions.go +++ b/service/connect/api_op_ListLambdaFunctions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListLambdaFunctionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLambdaFunctionsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListLambdaFunctionsMiddlewares(stack *middleware.St return nil } -// ListLambdaFunctionsAPIClient is a client that implements the -// ListLambdaFunctions operation. -type ListLambdaFunctionsAPIClient interface { - ListLambdaFunctions(context.Context, *ListLambdaFunctionsInput, ...func(*Options)) (*ListLambdaFunctionsOutput, error) -} - -var _ ListLambdaFunctionsAPIClient = (*Client)(nil) - // ListLambdaFunctionsPaginatorOptions is the paginator options for // ListLambdaFunctions type ListLambdaFunctionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListLambdaFunctionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLambdaFunctions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListLambdaFunctionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListLambdaFunctionsAPIClient is a client that implements the +// ListLambdaFunctions operation. +type ListLambdaFunctionsAPIClient interface { + ListLambdaFunctions(context.Context, *ListLambdaFunctionsInput, ...func(*Options)) (*ListLambdaFunctionsOutput, error) +} + +var _ ListLambdaFunctionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLambdaFunctions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListLexBots.go b/service/connect/api_op_ListLexBots.go index d7cd15fd946..771525845be 100644 --- a/service/connect/api_op_ListLexBots.go +++ b/service/connect/api_op_ListLexBots.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListLexBotsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLexBotsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListLexBotsMiddlewares(stack *middleware.Stack, opt return nil } -// ListLexBotsAPIClient is a client that implements the ListLexBots operation. -type ListLexBotsAPIClient interface { - ListLexBots(context.Context, *ListLexBotsInput, ...func(*Options)) (*ListLexBotsOutput, error) -} - -var _ ListLexBotsAPIClient = (*Client)(nil) - // ListLexBotsPaginatorOptions is the paginator options for ListLexBots type ListLexBotsPaginatorOptions struct { // The maximum number of results to return per page. If no value is specified, the @@ -221,6 +217,9 @@ func (p *ListLexBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLexBots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListLexBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListLexBotsAPIClient is a client that implements the ListLexBots operation. +type ListLexBotsAPIClient interface { + ListLexBots(context.Context, *ListLexBotsInput, ...func(*Options)) (*ListLexBotsOutput, error) +} + +var _ ListLexBotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLexBots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListPhoneNumbers.go b/service/connect/api_op_ListPhoneNumbers.go index 93fc21ec6ba..483920927bb 100644 --- a/service/connect/api_op_ListPhoneNumbers.go +++ b/service/connect/api_op_ListPhoneNumbers.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListPhoneNumbersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPhoneNumbersValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListPhoneNumbersMiddlewares(stack *middleware.Stack return nil } -// ListPhoneNumbersAPIClient is a client that implements the ListPhoneNumbers -// operation. -type ListPhoneNumbersAPIClient interface { - ListPhoneNumbers(context.Context, *ListPhoneNumbersInput, ...func(*Options)) (*ListPhoneNumbersOutput, error) -} - -var _ ListPhoneNumbersAPIClient = (*Client)(nil) - // ListPhoneNumbersPaginatorOptions is the paginator options for ListPhoneNumbers type ListPhoneNumbersPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -246,6 +241,9 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListPhoneNumbersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPhoneNumbersAPIClient is a client that implements the ListPhoneNumbers +// operation. +type ListPhoneNumbersAPIClient interface { + ListPhoneNumbers(context.Context, *ListPhoneNumbersInput, ...func(*Options)) (*ListPhoneNumbersOutput, error) +} + +var _ ListPhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListPhoneNumbersV2.go b/service/connect/api_op_ListPhoneNumbersV2.go index 455f320f074..73e95365625 100644 --- a/service/connect/api_op_ListPhoneNumbersV2.go +++ b/service/connect/api_op_ListPhoneNumbersV2.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListPhoneNumbersV2Middlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPhoneNumbersV2(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListPhoneNumbersV2Middlewares(stack *middleware.Sta return nil } -// ListPhoneNumbersV2APIClient is a client that implements the ListPhoneNumbersV2 -// operation. -type ListPhoneNumbersV2APIClient interface { - ListPhoneNumbersV2(context.Context, *ListPhoneNumbersV2Input, ...func(*Options)) (*ListPhoneNumbersV2Output, error) -} - -var _ ListPhoneNumbersV2APIClient = (*Client)(nil) - // ListPhoneNumbersV2PaginatorOptions is the paginator options for // ListPhoneNumbersV2 type ListPhoneNumbersV2PaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *ListPhoneNumbersV2Paginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumbersV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListPhoneNumbersV2Paginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPhoneNumbersV2APIClient is a client that implements the ListPhoneNumbersV2 +// operation. +type ListPhoneNumbersV2APIClient interface { + ListPhoneNumbersV2(context.Context, *ListPhoneNumbersV2Input, ...func(*Options)) (*ListPhoneNumbersV2Output, error) +} + +var _ ListPhoneNumbersV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumbersV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListPredefinedAttributes.go b/service/connect/api_op_ListPredefinedAttributes.go index 7415a5900fe..a732fda4665 100644 --- a/service/connect/api_op_ListPredefinedAttributes.go +++ b/service/connect/api_op_ListPredefinedAttributes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListPredefinedAttributesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPredefinedAttributesValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListPredefinedAttributesMiddlewares(stack *middlewa return nil } -// ListPredefinedAttributesAPIClient is a client that implements the -// ListPredefinedAttributes operation. -type ListPredefinedAttributesAPIClient interface { - ListPredefinedAttributes(context.Context, *ListPredefinedAttributesInput, ...func(*Options)) (*ListPredefinedAttributesOutput, error) -} - -var _ ListPredefinedAttributesAPIClient = (*Client)(nil) - // ListPredefinedAttributesPaginatorOptions is the paginator options for // ListPredefinedAttributes type ListPredefinedAttributesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListPredefinedAttributesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPredefinedAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListPredefinedAttributesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListPredefinedAttributesAPIClient is a client that implements the +// ListPredefinedAttributes operation. +type ListPredefinedAttributesAPIClient interface { + ListPredefinedAttributes(context.Context, *ListPredefinedAttributesInput, ...func(*Options)) (*ListPredefinedAttributesOutput, error) +} + +var _ ListPredefinedAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPredefinedAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListPrompts.go b/service/connect/api_op_ListPrompts.go index ba9bcab4479..9961bd7b937 100644 --- a/service/connect/api_op_ListPrompts.go +++ b/service/connect/api_op_ListPrompts.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPromptsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPromptsValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListPromptsMiddlewares(stack *middleware.Stack, opt return nil } -// ListPromptsAPIClient is a client that implements the ListPrompts operation. -type ListPromptsAPIClient interface { - ListPrompts(context.Context, *ListPromptsInput, ...func(*Options)) (*ListPromptsOutput, error) -} - -var _ ListPromptsAPIClient = (*Client)(nil) - // ListPromptsPaginatorOptions is the paginator options for ListPrompts type ListPromptsPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -213,6 +209,9 @@ func (p *ListPromptsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrompts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListPromptsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListPromptsAPIClient is a client that implements the ListPrompts operation. +type ListPromptsAPIClient interface { + ListPrompts(context.Context, *ListPromptsInput, ...func(*Options)) (*ListPromptsOutput, error) +} + +var _ ListPromptsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrompts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListQueueQuickConnects.go b/service/connect/api_op_ListQueueQuickConnects.go index fcb8448ddd2..6773da6c8d0 100644 --- a/service/connect/api_op_ListQueueQuickConnects.go +++ b/service/connect/api_op_ListQueueQuickConnects.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListQueueQuickConnectsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQueueQuickConnectsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListQueueQuickConnectsMiddlewares(stack *middleware return nil } -// ListQueueQuickConnectsAPIClient is a client that implements the -// ListQueueQuickConnects operation. -type ListQueueQuickConnectsAPIClient interface { - ListQueueQuickConnects(context.Context, *ListQueueQuickConnectsInput, ...func(*Options)) (*ListQueueQuickConnectsOutput, error) -} - -var _ ListQueueQuickConnectsAPIClient = (*Client)(nil) - // ListQueueQuickConnectsPaginatorOptions is the paginator options for // ListQueueQuickConnects type ListQueueQuickConnectsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListQueueQuickConnectsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueueQuickConnects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListQueueQuickConnectsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListQueueQuickConnectsAPIClient is a client that implements the +// ListQueueQuickConnects operation. +type ListQueueQuickConnectsAPIClient interface { + ListQueueQuickConnects(context.Context, *ListQueueQuickConnectsInput, ...func(*Options)) (*ListQueueQuickConnectsOutput, error) +} + +var _ ListQueueQuickConnectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueueQuickConnects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListQueues.go b/service/connect/api_op_ListQueues.go index c287b2d86e9..5b1701b8f6c 100644 --- a/service/connect/api_op_ListQueues.go +++ b/service/connect/api_op_ListQueues.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQueuesValidationMiddleware(stack); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti return nil } -// ListQueuesAPIClient is a client that implements the ListQueues operation. -type ListQueuesAPIClient interface { - ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) -} - -var _ ListQueuesAPIClient = (*Client)(nil) - // ListQueuesPaginatorOptions is the paginator options for ListQueues type ListQueuesPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -228,6 +224,9 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +246,13 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListQueuesAPIClient is a client that implements the ListQueues operation. +type ListQueuesAPIClient interface { + ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) +} + +var _ ListQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListQuickConnects.go b/service/connect/api_op_ListQuickConnects.go index 5ca18f5ca28..cd4e1eb6811 100644 --- a/service/connect/api_op_ListQuickConnects.go +++ b/service/connect/api_op_ListQuickConnects.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListQuickConnectsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQuickConnectsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListQuickConnectsMiddlewares(stack *middleware.Stac return nil } -// ListQuickConnectsAPIClient is a client that implements the ListQuickConnects -// operation. -type ListQuickConnectsAPIClient interface { - ListQuickConnects(context.Context, *ListQuickConnectsInput, ...func(*Options)) (*ListQuickConnectsOutput, error) -} - -var _ ListQuickConnectsAPIClient = (*Client)(nil) - // ListQuickConnectsPaginatorOptions is the paginator options for ListQuickConnects type ListQuickConnectsPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -222,6 +217,9 @@ func (p *ListQuickConnectsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQuickConnects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListQuickConnectsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListQuickConnectsAPIClient is a client that implements the ListQuickConnects +// operation. +type ListQuickConnectsAPIClient interface { + ListQuickConnects(context.Context, *ListQuickConnectsInput, ...func(*Options)) (*ListQuickConnectsOutput, error) +} + +var _ ListQuickConnectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQuickConnects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListRealtimeContactAnalysisSegmentsV2.go b/service/connect/api_op_ListRealtimeContactAnalysisSegmentsV2.go index 881883207d7..e411a8fdcbf 100644 --- a/service/connect/api_op_ListRealtimeContactAnalysisSegmentsV2.go +++ b/service/connect/api_op_ListRealtimeContactAnalysisSegmentsV2.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListRealtimeContactAnalysisSegmentsV2Middlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRealtimeContactAnalysisSegmentsV2ValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationListRealtimeContactAnalysisSegmentsV2Middlewares(st return nil } -// ListRealtimeContactAnalysisSegmentsV2APIClient is a client that implements the -// ListRealtimeContactAnalysisSegmentsV2 operation. -type ListRealtimeContactAnalysisSegmentsV2APIClient interface { - ListRealtimeContactAnalysisSegmentsV2(context.Context, *ListRealtimeContactAnalysisSegmentsV2Input, ...func(*Options)) (*ListRealtimeContactAnalysisSegmentsV2Output, error) -} - -var _ ListRealtimeContactAnalysisSegmentsV2APIClient = (*Client)(nil) - // ListRealtimeContactAnalysisSegmentsV2PaginatorOptions is the paginator options // for ListRealtimeContactAnalysisSegmentsV2 type ListRealtimeContactAnalysisSegmentsV2PaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *ListRealtimeContactAnalysisSegmentsV2Paginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRealtimeContactAnalysisSegmentsV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListRealtimeContactAnalysisSegmentsV2Paginator) NextPage(ctx context.Co return result, nil } +// ListRealtimeContactAnalysisSegmentsV2APIClient is a client that implements the +// ListRealtimeContactAnalysisSegmentsV2 operation. +type ListRealtimeContactAnalysisSegmentsV2APIClient interface { + ListRealtimeContactAnalysisSegmentsV2(context.Context, *ListRealtimeContactAnalysisSegmentsV2Input, ...func(*Options)) (*ListRealtimeContactAnalysisSegmentsV2Output, error) +} + +var _ ListRealtimeContactAnalysisSegmentsV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRealtimeContactAnalysisSegmentsV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListRoutingProfileQueues.go b/service/connect/api_op_ListRoutingProfileQueues.go index 8dcbb9d9131..f17885ebd85 100644 --- a/service/connect/api_op_ListRoutingProfileQueues.go +++ b/service/connect/api_op_ListRoutingProfileQueues.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRoutingProfileQueuesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoutingProfileQueuesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListRoutingProfileQueuesMiddlewares(stack *middlewa return nil } -// ListRoutingProfileQueuesAPIClient is a client that implements the -// ListRoutingProfileQueues operation. -type ListRoutingProfileQueuesAPIClient interface { - ListRoutingProfileQueues(context.Context, *ListRoutingProfileQueuesInput, ...func(*Options)) (*ListRoutingProfileQueuesOutput, error) -} - -var _ ListRoutingProfileQueuesAPIClient = (*Client)(nil) - // ListRoutingProfileQueuesPaginatorOptions is the paginator options for // ListRoutingProfileQueues type ListRoutingProfileQueuesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListRoutingProfileQueuesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoutingProfileQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListRoutingProfileQueuesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListRoutingProfileQueuesAPIClient is a client that implements the +// ListRoutingProfileQueues operation. +type ListRoutingProfileQueuesAPIClient interface { + ListRoutingProfileQueues(context.Context, *ListRoutingProfileQueuesInput, ...func(*Options)) (*ListRoutingProfileQueuesOutput, error) +} + +var _ ListRoutingProfileQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoutingProfileQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListRoutingProfiles.go b/service/connect/api_op_ListRoutingProfiles.go index ee823b1d95b..19e86378e1d 100644 --- a/service/connect/api_op_ListRoutingProfiles.go +++ b/service/connect/api_op_ListRoutingProfiles.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListRoutingProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoutingProfilesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListRoutingProfilesMiddlewares(stack *middleware.St return nil } -// ListRoutingProfilesAPIClient is a client that implements the -// ListRoutingProfiles operation. -type ListRoutingProfilesAPIClient interface { - ListRoutingProfiles(context.Context, *ListRoutingProfilesInput, ...func(*Options)) (*ListRoutingProfilesOutput, error) -} - -var _ ListRoutingProfilesAPIClient = (*Client)(nil) - // ListRoutingProfilesPaginatorOptions is the paginator options for // ListRoutingProfiles type ListRoutingProfilesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListRoutingProfilesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoutingProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListRoutingProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRoutingProfilesAPIClient is a client that implements the +// ListRoutingProfiles operation. +type ListRoutingProfilesAPIClient interface { + ListRoutingProfiles(context.Context, *ListRoutingProfilesInput, ...func(*Options)) (*ListRoutingProfilesOutput, error) +} + +var _ ListRoutingProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoutingProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListRules.go b/service/connect/api_op_ListRules.go index c7a8a0a091a..dbe91ca7da9 100644 --- a/service/connect/api_op_ListRules.go +++ b/service/connect/api_op_ListRules.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRulesValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio return nil } -// ListRulesAPIClient is a client that implements the ListRules operation. -type ListRulesAPIClient interface { - ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) -} - -var _ ListRulesAPIClient = (*Client)(nil) - // ListRulesPaginatorOptions is the paginator options for ListRules type ListRulesPaginatorOptions struct { // The maximum number of results to return per page. @@ -221,6 +217,9 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRulesAPIClient is a client that implements the ListRules operation. +type ListRulesAPIClient interface { + ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) +} + +var _ ListRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListSecurityKeys.go b/service/connect/api_op_ListSecurityKeys.go index cd5475e6a99..a60360b00fe 100644 --- a/service/connect/api_op_ListSecurityKeys.go +++ b/service/connect/api_op_ListSecurityKeys.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSecurityKeysMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityKeysValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListSecurityKeysMiddlewares(stack *middleware.Stack return nil } -// ListSecurityKeysAPIClient is a client that implements the ListSecurityKeys -// operation. -type ListSecurityKeysAPIClient interface { - ListSecurityKeys(context.Context, *ListSecurityKeysInput, ...func(*Options)) (*ListSecurityKeysOutput, error) -} - -var _ ListSecurityKeysAPIClient = (*Client)(nil) - // ListSecurityKeysPaginatorOptions is the paginator options for ListSecurityKeys type ListSecurityKeysPaginatorOptions struct { // The maximum number of results to return per page. @@ -216,6 +211,9 @@ func (p *ListSecurityKeysPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSecurityKeysPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListSecurityKeysAPIClient is a client that implements the ListSecurityKeys +// operation. +type ListSecurityKeysAPIClient interface { + ListSecurityKeys(context.Context, *ListSecurityKeysInput, ...func(*Options)) (*ListSecurityKeysOutput, error) +} + +var _ ListSecurityKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListSecurityProfileApplications.go b/service/connect/api_op_ListSecurityProfileApplications.go index dfae19a6811..0128e695705 100644 --- a/service/connect/api_op_ListSecurityProfileApplications.go +++ b/service/connect/api_op_ListSecurityProfileApplications.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSecurityProfileApplicationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityProfileApplicationsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListSecurityProfileApplicationsMiddlewares(stack *m return nil } -// ListSecurityProfileApplicationsAPIClient is a client that implements the -// ListSecurityProfileApplications operation. -type ListSecurityProfileApplicationsAPIClient interface { - ListSecurityProfileApplications(context.Context, *ListSecurityProfileApplicationsInput, ...func(*Options)) (*ListSecurityProfileApplicationsOutput, error) -} - -var _ ListSecurityProfileApplicationsAPIClient = (*Client)(nil) - // ListSecurityProfileApplicationsPaginatorOptions is the paginator options for // ListSecurityProfileApplications type ListSecurityProfileApplicationsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListSecurityProfileApplicationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityProfileApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListSecurityProfileApplicationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListSecurityProfileApplicationsAPIClient is a client that implements the +// ListSecurityProfileApplications operation. +type ListSecurityProfileApplicationsAPIClient interface { + ListSecurityProfileApplications(context.Context, *ListSecurityProfileApplicationsInput, ...func(*Options)) (*ListSecurityProfileApplicationsOutput, error) +} + +var _ ListSecurityProfileApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityProfileApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListSecurityProfilePermissions.go b/service/connect/api_op_ListSecurityProfilePermissions.go index 403157a40e8..51da42f0326 100644 --- a/service/connect/api_op_ListSecurityProfilePermissions.go +++ b/service/connect/api_op_ListSecurityProfilePermissions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListSecurityProfilePermissionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityProfilePermissionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListSecurityProfilePermissionsMiddlewares(stack *mi return nil } -// ListSecurityProfilePermissionsAPIClient is a client that implements the -// ListSecurityProfilePermissions operation. -type ListSecurityProfilePermissionsAPIClient interface { - ListSecurityProfilePermissions(context.Context, *ListSecurityProfilePermissionsInput, ...func(*Options)) (*ListSecurityProfilePermissionsOutput, error) -} - -var _ ListSecurityProfilePermissionsAPIClient = (*Client)(nil) - // ListSecurityProfilePermissionsPaginatorOptions is the paginator options for // ListSecurityProfilePermissions type ListSecurityProfilePermissionsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListSecurityProfilePermissionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityProfilePermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListSecurityProfilePermissionsPaginator) NextPage(ctx context.Context, return result, nil } +// ListSecurityProfilePermissionsAPIClient is a client that implements the +// ListSecurityProfilePermissions operation. +type ListSecurityProfilePermissionsAPIClient interface { + ListSecurityProfilePermissions(context.Context, *ListSecurityProfilePermissionsInput, ...func(*Options)) (*ListSecurityProfilePermissionsOutput, error) +} + +var _ ListSecurityProfilePermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityProfilePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListSecurityProfiles.go b/service/connect/api_op_ListSecurityProfiles.go index 92c75639dbe..5e188da5780 100644 --- a/service/connect/api_op_ListSecurityProfiles.go +++ b/service/connect/api_op_ListSecurityProfiles.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListSecurityProfilesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityProfilesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListSecurityProfilesMiddlewares(stack *middleware.S return nil } -// ListSecurityProfilesAPIClient is a client that implements the -// ListSecurityProfiles operation. -type ListSecurityProfilesAPIClient interface { - ListSecurityProfiles(context.Context, *ListSecurityProfilesInput, ...func(*Options)) (*ListSecurityProfilesOutput, error) -} - -var _ ListSecurityProfilesAPIClient = (*Client)(nil) - // ListSecurityProfilesPaginatorOptions is the paginator options for // ListSecurityProfiles type ListSecurityProfilesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSecurityProfilesAPIClient is a client that implements the +// ListSecurityProfiles operation. +type ListSecurityProfilesAPIClient interface { + ListSecurityProfiles(context.Context, *ListSecurityProfilesInput, ...func(*Options)) (*ListSecurityProfilesOutput, error) +} + +var _ ListSecurityProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListTagsForResource.go b/service/connect/api_op_ListTagsForResource.go index ba5abc2f1f9..cabd4ef1278 100644 --- a/service/connect/api_op_ListTagsForResource.go +++ b/service/connect/api_op_ListTagsForResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_ListTaskTemplates.go b/service/connect/api_op_ListTaskTemplates.go index ae7a9255aeb..d084e603f57 100644 --- a/service/connect/api_op_ListTaskTemplates.go +++ b/service/connect/api_op_ListTaskTemplates.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListTaskTemplatesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTaskTemplatesValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListTaskTemplatesMiddlewares(stack *middleware.Stac return nil } -// ListTaskTemplatesAPIClient is a client that implements the ListTaskTemplates -// operation. -type ListTaskTemplatesAPIClient interface { - ListTaskTemplates(context.Context, *ListTaskTemplatesInput, ...func(*Options)) (*ListTaskTemplatesOutput, error) -} - -var _ ListTaskTemplatesAPIClient = (*Client)(nil) - // ListTaskTemplatesPaginatorOptions is the paginator options for ListTaskTemplates type ListTaskTemplatesPaginatorOptions struct { // The maximum number of results to return per page. @@ -231,6 +226,9 @@ func (p *ListTaskTemplatesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTaskTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListTaskTemplatesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListTaskTemplatesAPIClient is a client that implements the ListTaskTemplates +// operation. +type ListTaskTemplatesAPIClient interface { + ListTaskTemplates(context.Context, *ListTaskTemplatesInput, ...func(*Options)) (*ListTaskTemplatesOutput, error) +} + +var _ ListTaskTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTaskTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListTrafficDistributionGroupUsers.go b/service/connect/api_op_ListTrafficDistributionGroupUsers.go index 8dfacaf8848..43a642b0ce5 100644 --- a/service/connect/api_op_ListTrafficDistributionGroupUsers.go +++ b/service/connect/api_op_ListTrafficDistributionGroupUsers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTrafficDistributionGroupUsersMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrafficDistributionGroupUsersValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListTrafficDistributionGroupUsersMiddlewares(stack return nil } -// ListTrafficDistributionGroupUsersAPIClient is a client that implements the -// ListTrafficDistributionGroupUsers operation. -type ListTrafficDistributionGroupUsersAPIClient interface { - ListTrafficDistributionGroupUsers(context.Context, *ListTrafficDistributionGroupUsersInput, ...func(*Options)) (*ListTrafficDistributionGroupUsersOutput, error) -} - -var _ ListTrafficDistributionGroupUsersAPIClient = (*Client)(nil) - // ListTrafficDistributionGroupUsersPaginatorOptions is the paginator options for // ListTrafficDistributionGroupUsers type ListTrafficDistributionGroupUsersPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListTrafficDistributionGroupUsersPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrafficDistributionGroupUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTrafficDistributionGroupUsersPaginator) NextPage(ctx context.Contex return result, nil } +// ListTrafficDistributionGroupUsersAPIClient is a client that implements the +// ListTrafficDistributionGroupUsers operation. +type ListTrafficDistributionGroupUsersAPIClient interface { + ListTrafficDistributionGroupUsers(context.Context, *ListTrafficDistributionGroupUsersInput, ...func(*Options)) (*ListTrafficDistributionGroupUsersOutput, error) +} + +var _ ListTrafficDistributionGroupUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrafficDistributionGroupUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListTrafficDistributionGroups.go b/service/connect/api_op_ListTrafficDistributionGroups.go index 5b9966bf712..1e961aaf524 100644 --- a/service/connect/api_op_ListTrafficDistributionGroups.go +++ b/service/connect/api_op_ListTrafficDistributionGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTrafficDistributionGroupsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficDistributionGroups(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListTrafficDistributionGroupsMiddlewares(stack *mid return nil } -// ListTrafficDistributionGroupsAPIClient is a client that implements the -// ListTrafficDistributionGroups operation. -type ListTrafficDistributionGroupsAPIClient interface { - ListTrafficDistributionGroups(context.Context, *ListTrafficDistributionGroupsInput, ...func(*Options)) (*ListTrafficDistributionGroupsOutput, error) -} - -var _ ListTrafficDistributionGroupsAPIClient = (*Client)(nil) - // ListTrafficDistributionGroupsPaginatorOptions is the paginator options for // ListTrafficDistributionGroups type ListTrafficDistributionGroupsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListTrafficDistributionGroupsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrafficDistributionGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListTrafficDistributionGroupsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListTrafficDistributionGroupsAPIClient is a client that implements the +// ListTrafficDistributionGroups operation. +type ListTrafficDistributionGroupsAPIClient interface { + ListTrafficDistributionGroups(context.Context, *ListTrafficDistributionGroupsInput, ...func(*Options)) (*ListTrafficDistributionGroupsOutput, error) +} + +var _ ListTrafficDistributionGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrafficDistributionGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListUseCases.go b/service/connect/api_op_ListUseCases.go index 62779734325..db9142ca4c3 100644 --- a/service/connect/api_op_ListUseCases.go +++ b/service/connect/api_op_ListUseCases.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListUseCasesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUseCasesValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListUseCasesMiddlewares(stack *middleware.Stack, op return nil } -// ListUseCasesAPIClient is a client that implements the ListUseCases operation. -type ListUseCasesAPIClient interface { - ListUseCases(context.Context, *ListUseCasesInput, ...func(*Options)) (*ListUseCasesOutput, error) -} - -var _ ListUseCasesAPIClient = (*Client)(nil) - // ListUseCasesPaginatorOptions is the paginator options for ListUseCases type ListUseCasesPaginatorOptions struct { // The maximum number of results to return per page. @@ -220,6 +216,9 @@ func (p *ListUseCasesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUseCases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListUseCasesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListUseCasesAPIClient is a client that implements the ListUseCases operation. +type ListUseCasesAPIClient interface { + ListUseCases(context.Context, *ListUseCasesInput, ...func(*Options)) (*ListUseCasesOutput, error) +} + +var _ ListUseCasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUseCases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListUserHierarchyGroups.go b/service/connect/api_op_ListUserHierarchyGroups.go index fb447712ded..635e0b144eb 100644 --- a/service/connect/api_op_ListUserHierarchyGroups.go +++ b/service/connect/api_op_ListUserHierarchyGroups.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListUserHierarchyGroupsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserHierarchyGroupsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListUserHierarchyGroupsMiddlewares(stack *middlewar return nil } -// ListUserHierarchyGroupsAPIClient is a client that implements the -// ListUserHierarchyGroups operation. -type ListUserHierarchyGroupsAPIClient interface { - ListUserHierarchyGroups(context.Context, *ListUserHierarchyGroupsInput, ...func(*Options)) (*ListUserHierarchyGroupsOutput, error) -} - -var _ ListUserHierarchyGroupsAPIClient = (*Client)(nil) - // ListUserHierarchyGroupsPaginatorOptions is the paginator options for // ListUserHierarchyGroups type ListUserHierarchyGroupsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListUserHierarchyGroupsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserHierarchyGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListUserHierarchyGroupsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListUserHierarchyGroupsAPIClient is a client that implements the +// ListUserHierarchyGroups operation. +type ListUserHierarchyGroupsAPIClient interface { + ListUserHierarchyGroups(context.Context, *ListUserHierarchyGroupsInput, ...func(*Options)) (*ListUserHierarchyGroupsOutput, error) +} + +var _ ListUserHierarchyGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserHierarchyGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListUserProficiencies.go b/service/connect/api_op_ListUserProficiencies.go index 272f69e6459..d51fb66db42 100644 --- a/service/connect/api_op_ListUserProficiencies.go +++ b/service/connect/api_op_ListUserProficiencies.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListUserProficienciesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserProficienciesValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListUserProficienciesMiddlewares(stack *middleware. return nil } -// ListUserProficienciesAPIClient is a client that implements the -// ListUserProficiencies operation. -type ListUserProficienciesAPIClient interface { - ListUserProficiencies(context.Context, *ListUserProficienciesInput, ...func(*Options)) (*ListUserProficienciesOutput, error) -} - -var _ ListUserProficienciesAPIClient = (*Client)(nil) - // ListUserProficienciesPaginatorOptions is the paginator options for // ListUserProficiencies type ListUserProficienciesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListUserProficienciesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserProficiencies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListUserProficienciesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListUserProficienciesAPIClient is a client that implements the +// ListUserProficiencies operation. +type ListUserProficienciesAPIClient interface { + ListUserProficiencies(context.Context, *ListUserProficienciesInput, ...func(*Options)) (*ListUserProficienciesOutput, error) +} + +var _ ListUserProficienciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserProficiencies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListUsers.go b/service/connect/api_op_ListUsers.go index 53360ccf191..b90056d32a9 100644 --- a/service/connect/api_op_ListUsers.go +++ b/service/connect/api_op_ListUsers.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -216,6 +212,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListViewVersions.go b/service/connect/api_op_ListViewVersions.go index ef4921dd5ae..65604229a21 100644 --- a/service/connect/api_op_ListViewVersions.go +++ b/service/connect/api_op_ListViewVersions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListViewVersionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListViewVersionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListViewVersionsMiddlewares(stack *middleware.Stack return nil } -// ListViewVersionsAPIClient is a client that implements the ListViewVersions -// operation. -type ListViewVersionsAPIClient interface { - ListViewVersions(context.Context, *ListViewVersionsInput, ...func(*Options)) (*ListViewVersionsOutput, error) -} - -var _ ListViewVersionsAPIClient = (*Client)(nil) - // ListViewVersionsPaginatorOptions is the paginator options for ListViewVersions type ListViewVersionsPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -223,6 +218,9 @@ func (p *ListViewVersionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListViewVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListViewVersionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListViewVersionsAPIClient is a client that implements the ListViewVersions +// operation. +type ListViewVersionsAPIClient interface { + ListViewVersions(context.Context, *ListViewVersionsInput, ...func(*Options)) (*ListViewVersionsOutput, error) +} + +var _ ListViewVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListViewVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_ListViews.go b/service/connect/api_op_ListViews.go index e935e4f4c4c..79927ed0eee 100644 --- a/service/connect/api_op_ListViews.go +++ b/service/connect/api_op_ListViews.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListViewsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListViewsValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListViewsMiddlewares(stack *middleware.Stack, optio return nil } -// ListViewsAPIClient is a client that implements the ListViews operation. -type ListViewsAPIClient interface { - ListViews(context.Context, *ListViewsInput, ...func(*Options)) (*ListViewsOutput, error) -} - -var _ ListViewsAPIClient = (*Client)(nil) - // ListViewsPaginatorOptions is the paginator options for ListViews type ListViewsPaginatorOptions struct { // The maximum number of results to return per page. The default MaxResult size is @@ -219,6 +215,9 @@ func (p *ListViewsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListViews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListViewsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListViewsAPIClient is a client that implements the ListViews operation. +type ListViewsAPIClient interface { + ListViews(context.Context, *ListViewsInput, ...func(*Options)) (*ListViewsOutput, error) +} + +var _ ListViewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListViews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_MonitorContact.go b/service/connect/api_op_MonitorContact.go index 8f1454982ac..4b8728e79aa 100644 --- a/service/connect/api_op_MonitorContact.go +++ b/service/connect/api_op_MonitorContact.go @@ -134,6 +134,9 @@ func (c *Client) addOperationMonitorContactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opMonitorContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_PauseContact.go b/service/connect/api_op_PauseContact.go index 845a4f94f71..4b4a622c41b 100644 --- a/service/connect/api_op_PauseContact.go +++ b/service/connect/api_op_PauseContact.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPauseContactMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPauseContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_PutUserStatus.go b/service/connect/api_op_PutUserStatus.go index 26057b72d2f..a43977eff05 100644 --- a/service/connect/api_op_PutUserStatus.go +++ b/service/connect/api_op_PutUserStatus.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutUserStatusMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutUserStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_ReleasePhoneNumber.go b/service/connect/api_op_ReleasePhoneNumber.go index c7aeca0d416..fc2da930c89 100644 --- a/service/connect/api_op_ReleasePhoneNumber.go +++ b/service/connect/api_op_ReleasePhoneNumber.go @@ -135,6 +135,9 @@ func (c *Client) addOperationReleasePhoneNumberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opReleasePhoneNumberMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_ReplicateInstance.go b/service/connect/api_op_ReplicateInstance.go index 683cae50e82..4f1f987a7ea 100644 --- a/service/connect/api_op_ReplicateInstance.go +++ b/service/connect/api_op_ReplicateInstance.go @@ -137,6 +137,9 @@ func (c *Client) addOperationReplicateInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opReplicateInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_ResumeContact.go b/service/connect/api_op_ResumeContact.go index 64631d0000b..20564815076 100644 --- a/service/connect/api_op_ResumeContact.go +++ b/service/connect/api_op_ResumeContact.go @@ -110,6 +110,9 @@ func (c *Client) addOperationResumeContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_ResumeContactRecording.go b/service/connect/api_op_ResumeContactRecording.go index 01718656398..a0033f7c388 100644 --- a/service/connect/api_op_ResumeContactRecording.go +++ b/service/connect/api_op_ResumeContactRecording.go @@ -120,6 +120,9 @@ func (c *Client) addOperationResumeContactRecordingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeContactRecordingValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_SearchAvailablePhoneNumbers.go b/service/connect/api_op_SearchAvailablePhoneNumbers.go index 47efc630bc8..423d76a3de3 100644 --- a/service/connect/api_op_SearchAvailablePhoneNumbers.go +++ b/service/connect/api_op_SearchAvailablePhoneNumbers.go @@ -141,6 +141,9 @@ func (c *Client) addOperationSearchAvailablePhoneNumbersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchAvailablePhoneNumbersValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationSearchAvailablePhoneNumbersMiddlewares(stack *middl return nil } -// SearchAvailablePhoneNumbersAPIClient is a client that implements the -// SearchAvailablePhoneNumbers operation. -type SearchAvailablePhoneNumbersAPIClient interface { - SearchAvailablePhoneNumbers(context.Context, *SearchAvailablePhoneNumbersInput, ...func(*Options)) (*SearchAvailablePhoneNumbersOutput, error) -} - -var _ SearchAvailablePhoneNumbersAPIClient = (*Client)(nil) - // SearchAvailablePhoneNumbersPaginatorOptions is the paginator options for // SearchAvailablePhoneNumbers type SearchAvailablePhoneNumbersPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchAvailablePhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *SearchAvailablePhoneNumbersPaginator) NextPage(ctx context.Context, opt return result, nil } +// SearchAvailablePhoneNumbersAPIClient is a client that implements the +// SearchAvailablePhoneNumbers operation. +type SearchAvailablePhoneNumbersAPIClient interface { + SearchAvailablePhoneNumbers(context.Context, *SearchAvailablePhoneNumbersInput, ...func(*Options)) (*SearchAvailablePhoneNumbersOutput, error) +} + +var _ SearchAvailablePhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchAvailablePhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchContactFlowModules.go b/service/connect/api_op_SearchContactFlowModules.go index ff7fc5cee83..9f01aa00171 100644 --- a/service/connect/api_op_SearchContactFlowModules.go +++ b/service/connect/api_op_SearchContactFlowModules.go @@ -131,6 +131,9 @@ func (c *Client) addOperationSearchContactFlowModulesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchContactFlowModulesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationSearchContactFlowModulesMiddlewares(stack *middlewa return nil } -// SearchContactFlowModulesAPIClient is a client that implements the -// SearchContactFlowModules operation. -type SearchContactFlowModulesAPIClient interface { - SearchContactFlowModules(context.Context, *SearchContactFlowModulesInput, ...func(*Options)) (*SearchContactFlowModulesOutput, error) -} - -var _ SearchContactFlowModulesAPIClient = (*Client)(nil) - // SearchContactFlowModulesPaginatorOptions is the paginator options for // SearchContactFlowModules type SearchContactFlowModulesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *SearchContactFlowModulesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchContactFlowModules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *SearchContactFlowModulesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// SearchContactFlowModulesAPIClient is a client that implements the +// SearchContactFlowModules operation. +type SearchContactFlowModulesAPIClient interface { + SearchContactFlowModules(context.Context, *SearchContactFlowModulesInput, ...func(*Options)) (*SearchContactFlowModulesOutput, error) +} + +var _ SearchContactFlowModulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchContactFlowModules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchContactFlows.go b/service/connect/api_op_SearchContactFlows.go index e7ba2ff5f5a..397a934a3ee 100644 --- a/service/connect/api_op_SearchContactFlows.go +++ b/service/connect/api_op_SearchContactFlows.go @@ -131,6 +131,9 @@ func (c *Client) addOperationSearchContactFlowsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchContactFlowsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationSearchContactFlowsMiddlewares(stack *middleware.Sta return nil } -// SearchContactFlowsAPIClient is a client that implements the SearchContactFlows -// operation. -type SearchContactFlowsAPIClient interface { - SearchContactFlows(context.Context, *SearchContactFlowsInput, ...func(*Options)) (*SearchContactFlowsOutput, error) -} - -var _ SearchContactFlowsAPIClient = (*Client)(nil) - // SearchContactFlowsPaginatorOptions is the paginator options for // SearchContactFlows type SearchContactFlowsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *SearchContactFlowsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchContactFlows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *SearchContactFlowsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchContactFlowsAPIClient is a client that implements the SearchContactFlows +// operation. +type SearchContactFlowsAPIClient interface { + SearchContactFlows(context.Context, *SearchContactFlowsInput, ...func(*Options)) (*SearchContactFlowsOutput, error) +} + +var _ SearchContactFlowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchContactFlows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchContacts.go b/service/connect/api_op_SearchContacts.go index db84a1bb0e1..32b960bc529 100644 --- a/service/connect/api_op_SearchContacts.go +++ b/service/connect/api_op_SearchContacts.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSearchContactsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchContactsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationSearchContactsMiddlewares(stack *middleware.Stack, return nil } -// SearchContactsAPIClient is a client that implements the SearchContacts -// operation. -type SearchContactsAPIClient interface { - SearchContacts(context.Context, *SearchContactsInput, ...func(*Options)) (*SearchContactsOutput, error) -} - -var _ SearchContactsAPIClient = (*Client)(nil) - // SearchContactsPaginatorOptions is the paginator options for SearchContacts type SearchContactsPaginatorOptions struct { // The maximum number of results to return per page. @@ -228,6 +223,9 @@ func (p *SearchContactsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchContacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *SearchContactsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchContactsAPIClient is a client that implements the SearchContacts +// operation. +type SearchContactsAPIClient interface { + SearchContacts(context.Context, *SearchContactsInput, ...func(*Options)) (*SearchContactsOutput, error) +} + +var _ SearchContactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchContacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchHoursOfOperations.go b/service/connect/api_op_SearchHoursOfOperations.go index 839b28b6913..e96c22fdb3c 100644 --- a/service/connect/api_op_SearchHoursOfOperations.go +++ b/service/connect/api_op_SearchHoursOfOperations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSearchHoursOfOperationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchHoursOfOperationsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationSearchHoursOfOperationsMiddlewares(stack *middlewar return nil } -// SearchHoursOfOperationsAPIClient is a client that implements the -// SearchHoursOfOperations operation. -type SearchHoursOfOperationsAPIClient interface { - SearchHoursOfOperations(context.Context, *SearchHoursOfOperationsInput, ...func(*Options)) (*SearchHoursOfOperationsOutput, error) -} - -var _ SearchHoursOfOperationsAPIClient = (*Client)(nil) - // SearchHoursOfOperationsPaginatorOptions is the paginator options for // SearchHoursOfOperations type SearchHoursOfOperationsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *SearchHoursOfOperationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchHoursOfOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *SearchHoursOfOperationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// SearchHoursOfOperationsAPIClient is a client that implements the +// SearchHoursOfOperations operation. +type SearchHoursOfOperationsAPIClient interface { + SearchHoursOfOperations(context.Context, *SearchHoursOfOperationsInput, ...func(*Options)) (*SearchHoursOfOperationsOutput, error) +} + +var _ SearchHoursOfOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchHoursOfOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchPredefinedAttributes.go b/service/connect/api_op_SearchPredefinedAttributes.go index 991f1a85261..c3867759865 100644 --- a/service/connect/api_op_SearchPredefinedAttributes.go +++ b/service/connect/api_op_SearchPredefinedAttributes.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSearchPredefinedAttributesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchPredefinedAttributesValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationSearchPredefinedAttributesMiddlewares(stack *middle return nil } -// SearchPredefinedAttributesAPIClient is a client that implements the -// SearchPredefinedAttributes operation. -type SearchPredefinedAttributesAPIClient interface { - SearchPredefinedAttributes(context.Context, *SearchPredefinedAttributesInput, ...func(*Options)) (*SearchPredefinedAttributesOutput, error) -} - -var _ SearchPredefinedAttributesAPIClient = (*Client)(nil) - // SearchPredefinedAttributesPaginatorOptions is the paginator options for // SearchPredefinedAttributes type SearchPredefinedAttributesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *SearchPredefinedAttributesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchPredefinedAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *SearchPredefinedAttributesPaginator) NextPage(ctx context.Context, optF return result, nil } +// SearchPredefinedAttributesAPIClient is a client that implements the +// SearchPredefinedAttributes operation. +type SearchPredefinedAttributesAPIClient interface { + SearchPredefinedAttributes(context.Context, *SearchPredefinedAttributesInput, ...func(*Options)) (*SearchPredefinedAttributesOutput, error) +} + +var _ SearchPredefinedAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchPredefinedAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchPrompts.go b/service/connect/api_op_SearchPrompts.go index 088e7c1edc0..73fdcb12843 100644 --- a/service/connect/api_op_SearchPrompts.go +++ b/service/connect/api_op_SearchPrompts.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSearchPromptsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchPromptsValidationMiddleware(stack); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationSearchPromptsMiddlewares(stack *middleware.Stack, o return nil } -// SearchPromptsAPIClient is a client that implements the SearchPrompts operation. -type SearchPromptsAPIClient interface { - SearchPrompts(context.Context, *SearchPromptsInput, ...func(*Options)) (*SearchPromptsOutput, error) -} - -var _ SearchPromptsAPIClient = (*Client)(nil) - // SearchPromptsPaginatorOptions is the paginator options for SearchPrompts type SearchPromptsPaginatorOptions struct { // The maximum number of results to return per page. @@ -222,6 +218,9 @@ func (p *SearchPromptsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchPrompts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *SearchPromptsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// SearchPromptsAPIClient is a client that implements the SearchPrompts operation. +type SearchPromptsAPIClient interface { + SearchPrompts(context.Context, *SearchPromptsInput, ...func(*Options)) (*SearchPromptsOutput, error) +} + +var _ SearchPromptsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchPrompts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchQueues.go b/service/connect/api_op_SearchQueues.go index 404861adeb2..7f869bfe508 100644 --- a/service/connect/api_op_SearchQueues.go +++ b/service/connect/api_op_SearchQueues.go @@ -132,6 +132,9 @@ func (c *Client) addOperationSearchQueuesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchQueuesValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationSearchQueuesMiddlewares(stack *middleware.Stack, op return nil } -// SearchQueuesAPIClient is a client that implements the SearchQueues operation. -type SearchQueuesAPIClient interface { - SearchQueues(context.Context, *SearchQueuesInput, ...func(*Options)) (*SearchQueuesOutput, error) -} - -var _ SearchQueuesAPIClient = (*Client)(nil) - // SearchQueuesPaginatorOptions is the paginator options for SearchQueues type SearchQueuesPaginatorOptions struct { // The maximum number of results to return per page. @@ -226,6 +222,9 @@ func (p *SearchQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *SearchQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// SearchQueuesAPIClient is a client that implements the SearchQueues operation. +type SearchQueuesAPIClient interface { + SearchQueues(context.Context, *SearchQueuesInput, ...func(*Options)) (*SearchQueuesOutput, error) +} + +var _ SearchQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchQuickConnects.go b/service/connect/api_op_SearchQuickConnects.go index 2a27596bb66..fe7dd226ff7 100644 --- a/service/connect/api_op_SearchQuickConnects.go +++ b/service/connect/api_op_SearchQuickConnects.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSearchQuickConnectsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchQuickConnectsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationSearchQuickConnectsMiddlewares(stack *middleware.St return nil } -// SearchQuickConnectsAPIClient is a client that implements the -// SearchQuickConnects operation. -type SearchQuickConnectsAPIClient interface { - SearchQuickConnects(context.Context, *SearchQuickConnectsInput, ...func(*Options)) (*SearchQuickConnectsOutput, error) -} - -var _ SearchQuickConnectsAPIClient = (*Client)(nil) - // SearchQuickConnectsPaginatorOptions is the paginator options for // SearchQuickConnects type SearchQuickConnectsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *SearchQuickConnectsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchQuickConnects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *SearchQuickConnectsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// SearchQuickConnectsAPIClient is a client that implements the +// SearchQuickConnects operation. +type SearchQuickConnectsAPIClient interface { + SearchQuickConnects(context.Context, *SearchQuickConnectsInput, ...func(*Options)) (*SearchQuickConnectsOutput, error) +} + +var _ SearchQuickConnectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchQuickConnects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchResourceTags.go b/service/connect/api_op_SearchResourceTags.go index e3faf79e9a2..6da89137ff1 100644 --- a/service/connect/api_op_SearchResourceTags.go +++ b/service/connect/api_op_SearchResourceTags.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSearchResourceTagsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchResourceTagsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationSearchResourceTagsMiddlewares(stack *middleware.Sta return nil } -// SearchResourceTagsAPIClient is a client that implements the SearchResourceTags -// operation. -type SearchResourceTagsAPIClient interface { - SearchResourceTags(context.Context, *SearchResourceTagsInput, ...func(*Options)) (*SearchResourceTagsOutput, error) -} - -var _ SearchResourceTagsAPIClient = (*Client)(nil) - // SearchResourceTagsPaginatorOptions is the paginator options for // SearchResourceTags type SearchResourceTagsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *SearchResourceTagsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchResourceTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *SearchResourceTagsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchResourceTagsAPIClient is a client that implements the SearchResourceTags +// operation. +type SearchResourceTagsAPIClient interface { + SearchResourceTags(context.Context, *SearchResourceTagsInput, ...func(*Options)) (*SearchResourceTagsOutput, error) +} + +var _ SearchResourceTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchResourceTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchRoutingProfiles.go b/service/connect/api_op_SearchRoutingProfiles.go index 789890bd81c..27490aea34c 100644 --- a/service/connect/api_op_SearchRoutingProfiles.go +++ b/service/connect/api_op_SearchRoutingProfiles.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSearchRoutingProfilesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchRoutingProfilesValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationSearchRoutingProfilesMiddlewares(stack *middleware. return nil } -// SearchRoutingProfilesAPIClient is a client that implements the -// SearchRoutingProfiles operation. -type SearchRoutingProfilesAPIClient interface { - SearchRoutingProfiles(context.Context, *SearchRoutingProfilesInput, ...func(*Options)) (*SearchRoutingProfilesOutput, error) -} - -var _ SearchRoutingProfilesAPIClient = (*Client)(nil) - // SearchRoutingProfilesPaginatorOptions is the paginator options for // SearchRoutingProfiles type SearchRoutingProfilesPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *SearchRoutingProfilesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchRoutingProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *SearchRoutingProfilesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// SearchRoutingProfilesAPIClient is a client that implements the +// SearchRoutingProfiles operation. +type SearchRoutingProfilesAPIClient interface { + SearchRoutingProfiles(context.Context, *SearchRoutingProfilesInput, ...func(*Options)) (*SearchRoutingProfilesOutput, error) +} + +var _ SearchRoutingProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchRoutingProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchSecurityProfiles.go b/service/connect/api_op_SearchSecurityProfiles.go index 163a546883b..7a3395a3e39 100644 --- a/service/connect/api_op_SearchSecurityProfiles.go +++ b/service/connect/api_op_SearchSecurityProfiles.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSearchSecurityProfilesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchSecurityProfilesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationSearchSecurityProfilesMiddlewares(stack *middleware return nil } -// SearchSecurityProfilesAPIClient is a client that implements the -// SearchSecurityProfiles operation. -type SearchSecurityProfilesAPIClient interface { - SearchSecurityProfiles(context.Context, *SearchSecurityProfilesInput, ...func(*Options)) (*SearchSecurityProfilesOutput, error) -} - -var _ SearchSecurityProfilesAPIClient = (*Client)(nil) - // SearchSecurityProfilesPaginatorOptions is the paginator options for // SearchSecurityProfiles type SearchSecurityProfilesPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *SearchSecurityProfilesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchSecurityProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *SearchSecurityProfilesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// SearchSecurityProfilesAPIClient is a client that implements the +// SearchSecurityProfiles operation. +type SearchSecurityProfilesAPIClient interface { + SearchSecurityProfiles(context.Context, *SearchSecurityProfilesInput, ...func(*Options)) (*SearchSecurityProfilesOutput, error) +} + +var _ SearchSecurityProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchSecurityProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchUsers.go b/service/connect/api_op_SearchUsers.go index 84eacfd6a14..a0a8df88de5 100644 --- a/service/connect/api_op_SearchUsers.go +++ b/service/connect/api_op_SearchUsers.go @@ -136,6 +136,9 @@ func (c *Client) addOperationSearchUsersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchUsersValidationMiddleware(stack); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationSearchUsersMiddlewares(stack *middleware.Stack, opt return nil } -// SearchUsersAPIClient is a client that implements the SearchUsers operation. -type SearchUsersAPIClient interface { - SearchUsers(context.Context, *SearchUsersInput, ...func(*Options)) (*SearchUsersOutput, error) -} - -var _ SearchUsersAPIClient = (*Client)(nil) - // SearchUsersPaginatorOptions is the paginator options for SearchUsers type SearchUsersPaginatorOptions struct { // The maximum number of results to return per page. @@ -230,6 +226,9 @@ func (p *SearchUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *SearchUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// SearchUsersAPIClient is a client that implements the SearchUsers operation. +type SearchUsersAPIClient interface { + SearchUsers(context.Context, *SearchUsersInput, ...func(*Options)) (*SearchUsersOutput, error) +} + +var _ SearchUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SearchVocabularies.go b/service/connect/api_op_SearchVocabularies.go index 5753ff7df05..d4e8c08f6f6 100644 --- a/service/connect/api_op_SearchVocabularies.go +++ b/service/connect/api_op_SearchVocabularies.go @@ -132,6 +132,9 @@ func (c *Client) addOperationSearchVocabulariesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchVocabulariesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationSearchVocabulariesMiddlewares(stack *middleware.Sta return nil } -// SearchVocabulariesAPIClient is a client that implements the SearchVocabularies -// operation. -type SearchVocabulariesAPIClient interface { - SearchVocabularies(context.Context, *SearchVocabulariesInput, ...func(*Options)) (*SearchVocabulariesOutput, error) -} - -var _ SearchVocabulariesAPIClient = (*Client)(nil) - // SearchVocabulariesPaginatorOptions is the paginator options for // SearchVocabularies type SearchVocabulariesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *SearchVocabulariesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchVocabularies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *SearchVocabulariesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchVocabulariesAPIClient is a client that implements the SearchVocabularies +// operation. +type SearchVocabulariesAPIClient interface { + SearchVocabularies(context.Context, *SearchVocabulariesInput, ...func(*Options)) (*SearchVocabulariesOutput, error) +} + +var _ SearchVocabulariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchVocabularies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connect/api_op_SendChatIntegrationEvent.go b/service/connect/api_op_SendChatIntegrationEvent.go index 350d476a0b6..27b7898e0ac 100644 --- a/service/connect/api_op_SendChatIntegrationEvent.go +++ b/service/connect/api_op_SendChatIntegrationEvent.go @@ -149,6 +149,9 @@ func (c *Client) addOperationSendChatIntegrationEventMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendChatIntegrationEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_StartAttachedFileUpload.go b/service/connect/api_op_StartAttachedFileUpload.go index 23248f60ba9..1d23fafc915 100644 --- a/service/connect/api_op_StartAttachedFileUpload.go +++ b/service/connect/api_op_StartAttachedFileUpload.go @@ -171,6 +171,9 @@ func (c *Client) addOperationStartAttachedFileUploadMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartAttachedFileUploadMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StartChatContact.go b/service/connect/api_op_StartChatContact.go index 8d989eb0419..4e3d960c5e8 100644 --- a/service/connect/api_op_StartChatContact.go +++ b/service/connect/api_op_StartChatContact.go @@ -229,6 +229,9 @@ func (c *Client) addOperationStartChatContactMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartChatContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StartContactEvaluation.go b/service/connect/api_op_StartContactEvaluation.go index c27bc621b83..cac43ee44bb 100644 --- a/service/connect/api_op_StartContactEvaluation.go +++ b/service/connect/api_op_StartContactEvaluation.go @@ -139,6 +139,9 @@ func (c *Client) addOperationStartContactEvaluationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartContactEvaluationMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StartContactRecording.go b/service/connect/api_op_StartContactRecording.go index 1f364221319..19f3faa9e48 100644 --- a/service/connect/api_op_StartContactRecording.go +++ b/service/connect/api_op_StartContactRecording.go @@ -141,6 +141,9 @@ func (c *Client) addOperationStartContactRecordingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartContactRecordingValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_StartContactStreaming.go b/service/connect/api_op_StartContactStreaming.go index 6b2300eaa8c..a19ad5359bd 100644 --- a/service/connect/api_op_StartContactStreaming.go +++ b/service/connect/api_op_StartContactStreaming.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStartContactStreamingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartContactStreamingMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StartOutboundVoiceContact.go b/service/connect/api_op_StartOutboundVoiceContact.go index 2daa234f89c..2f28100339c 100644 --- a/service/connect/api_op_StartOutboundVoiceContact.go +++ b/service/connect/api_op_StartOutboundVoiceContact.go @@ -204,6 +204,9 @@ func (c *Client) addOperationStartOutboundVoiceContactMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartOutboundVoiceContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StartTaskContact.go b/service/connect/api_op_StartTaskContact.go index a03a06955b7..654e22475c9 100644 --- a/service/connect/api_op_StartTaskContact.go +++ b/service/connect/api_op_StartTaskContact.go @@ -221,6 +221,9 @@ func (c *Client) addOperationStartTaskContactMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartTaskContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StartWebRTCContact.go b/service/connect/api_op_StartWebRTCContact.go index 4a34fb844c2..3ab1a206b42 100644 --- a/service/connect/api_op_StartWebRTCContact.go +++ b/service/connect/api_op_StartWebRTCContact.go @@ -178,6 +178,9 @@ func (c *Client) addOperationStartWebRTCContactMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartWebRTCContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_StopContact.go b/service/connect/api_op_StopContact.go index 23adf4e4fb2..f07eb6ef72f 100644 --- a/service/connect/api_op_StopContact.go +++ b/service/connect/api_op_StopContact.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStopContactMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_StopContactRecording.go b/service/connect/api_op_StopContactRecording.go index 019632b0a07..b13b0e22eb7 100644 --- a/service/connect/api_op_StopContactRecording.go +++ b/service/connect/api_op_StopContactRecording.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopContactRecordingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopContactRecordingValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_StopContactStreaming.go b/service/connect/api_op_StopContactStreaming.go index ca4cb76a661..7a7fb91dec4 100644 --- a/service/connect/api_op_StopContactStreaming.go +++ b/service/connect/api_op_StopContactStreaming.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStopContactStreamingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopContactStreamingValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_SubmitContactEvaluation.go b/service/connect/api_op_SubmitContactEvaluation.go index 449728b0ff1..4a1f2afa3c4 100644 --- a/service/connect/api_op_SubmitContactEvaluation.go +++ b/service/connect/api_op_SubmitContactEvaluation.go @@ -134,6 +134,9 @@ func (c *Client) addOperationSubmitContactEvaluationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitContactEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_SuspendContactRecording.go b/service/connect/api_op_SuspendContactRecording.go index b3647314de1..d480ed4bce4 100644 --- a/service/connect/api_op_SuspendContactRecording.go +++ b/service/connect/api_op_SuspendContactRecording.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSuspendContactRecordingMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSuspendContactRecordingValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_TagContact.go b/service/connect/api_op_TagContact.go index cffcd6abe9e..246acef51de 100644 --- a/service/connect/api_op_TagContact.go +++ b/service/connect/api_op_TagContact.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTagContactMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_TagResource.go b/service/connect/api_op_TagResource.go index 5d536c03063..65aa789b6f4 100644 --- a/service/connect/api_op_TagResource.go +++ b/service/connect/api_op_TagResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_TransferContact.go b/service/connect/api_op_TransferContact.go index af6140f9cef..1912fe449a8 100644 --- a/service/connect/api_op_TransferContact.go +++ b/service/connect/api_op_TransferContact.go @@ -151,6 +151,9 @@ func (c *Client) addOperationTransferContactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opTransferContactMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_UntagContact.go b/service/connect/api_op_UntagContact.go index 6e58929ec25..f5686ecfe88 100644 --- a/service/connect/api_op_UntagContact.go +++ b/service/connect/api_op_UntagContact.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUntagContactMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UntagResource.go b/service/connect/api_op_UntagResource.go index b6c5cbc0e0e..142b6215457 100644 --- a/service/connect/api_op_UntagResource.go +++ b/service/connect/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateAgentStatus.go b/service/connect/api_op_UpdateAgentStatus.go index ce3e29af164..3d208af7eec 100644 --- a/service/connect/api_op_UpdateAgentStatus.go +++ b/service/connect/api_op_UpdateAgentStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateAgentStatusMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContact.go b/service/connect/api_op_UpdateContact.go index 6525a42e4b6..634a021aaf1 100644 --- a/service/connect/api_op_UpdateContact.go +++ b/service/connect/api_op_UpdateContact.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactAttributes.go b/service/connect/api_op_UpdateContactAttributes.go index cb5aa743c4a..acdd26673d9 100644 --- a/service/connect/api_op_UpdateContactAttributes.go +++ b/service/connect/api_op_UpdateContactAttributes.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateContactAttributesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactEvaluation.go b/service/connect/api_op_UpdateContactEvaluation.go index e345e24186f..051c8924f47 100644 --- a/service/connect/api_op_UpdateContactEvaluation.go +++ b/service/connect/api_op_UpdateContactEvaluation.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateContactEvaluationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactFlowContent.go b/service/connect/api_op_UpdateContactFlowContent.go index e67dd7c1fd6..f7e8a5424dd 100644 --- a/service/connect/api_op_UpdateContactFlowContent.go +++ b/service/connect/api_op_UpdateContactFlowContent.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateContactFlowContentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactFlowContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactFlowMetadata.go b/service/connect/api_op_UpdateContactFlowMetadata.go index a4e12778f24..0995c34f7c3 100644 --- a/service/connect/api_op_UpdateContactFlowMetadata.go +++ b/service/connect/api_op_UpdateContactFlowMetadata.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateContactFlowMetadataMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactFlowMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactFlowModuleContent.go b/service/connect/api_op_UpdateContactFlowModuleContent.go index a19afd1fbda..0d36c80a867 100644 --- a/service/connect/api_op_UpdateContactFlowModuleContent.go +++ b/service/connect/api_op_UpdateContactFlowModuleContent.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateContactFlowModuleContentMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactFlowModuleContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactFlowModuleMetadata.go b/service/connect/api_op_UpdateContactFlowModuleMetadata.go index 39df9b4b065..7afbd21084a 100644 --- a/service/connect/api_op_UpdateContactFlowModuleMetadata.go +++ b/service/connect/api_op_UpdateContactFlowModuleMetadata.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateContactFlowModuleMetadataMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactFlowModuleMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactFlowName.go b/service/connect/api_op_UpdateContactFlowName.go index f83f0f0f3ae..77a06af5b5e 100644 --- a/service/connect/api_op_UpdateContactFlowName.go +++ b/service/connect/api_op_UpdateContactFlowName.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateContactFlowNameMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactFlowNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactRoutingData.go b/service/connect/api_op_UpdateContactRoutingData.go index 77753bd9775..ab4d8f1eb89 100644 --- a/service/connect/api_op_UpdateContactRoutingData.go +++ b/service/connect/api_op_UpdateContactRoutingData.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateContactRoutingDataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactRoutingDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateContactSchedule.go b/service/connect/api_op_UpdateContactSchedule.go index 6751d4adc46..2ec78850bb5 100644 --- a/service/connect/api_op_UpdateContactSchedule.go +++ b/service/connect/api_op_UpdateContactSchedule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateContactScheduleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateEvaluationForm.go b/service/connect/api_op_UpdateEvaluationForm.go index 150eff27698..d1635da1f59 100644 --- a/service/connect/api_op_UpdateEvaluationForm.go +++ b/service/connect/api_op_UpdateEvaluationForm.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateEvaluationFormMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateEvaluationFormMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_UpdateHoursOfOperation.go b/service/connect/api_op_UpdateHoursOfOperation.go index c49a37fd8ca..2b8d3d967c2 100644 --- a/service/connect/api_op_UpdateHoursOfOperation.go +++ b/service/connect/api_op_UpdateHoursOfOperation.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateHoursOfOperationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHoursOfOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateInstanceAttribute.go b/service/connect/api_op_UpdateInstanceAttribute.go index bc09cd097dd..aad7ff8712a 100644 --- a/service/connect/api_op_UpdateInstanceAttribute.go +++ b/service/connect/api_op_UpdateInstanceAttribute.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateInstanceAttributeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateInstanceStorageConfig.go b/service/connect/api_op_UpdateInstanceStorageConfig.go index d6dce42de51..efea890dd0f 100644 --- a/service/connect/api_op_UpdateInstanceStorageConfig.go +++ b/service/connect/api_op_UpdateInstanceStorageConfig.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateInstanceStorageConfigMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceStorageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateParticipantRoleConfig.go b/service/connect/api_op_UpdateParticipantRoleConfig.go index 60e8ab0db8b..1b987debc69 100644 --- a/service/connect/api_op_UpdateParticipantRoleConfig.go +++ b/service/connect/api_op_UpdateParticipantRoleConfig.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateParticipantRoleConfigMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateParticipantRoleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdatePhoneNumber.go b/service/connect/api_op_UpdatePhoneNumber.go index c2db390dde8..bebf22073cb 100644 --- a/service/connect/api_op_UpdatePhoneNumber.go +++ b/service/connect/api_op_UpdatePhoneNumber.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdatePhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePhoneNumberMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_UpdatePhoneNumberMetadata.go b/service/connect/api_op_UpdatePhoneNumberMetadata.go index 4ec5add4a0b..3dbd897c23e 100644 --- a/service/connect/api_op_UpdatePhoneNumberMetadata.go +++ b/service/connect/api_op_UpdatePhoneNumberMetadata.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdatePhoneNumberMetadataMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePhoneNumberMetadataMiddleware(stack, options); err != nil { return err } diff --git a/service/connect/api_op_UpdatePredefinedAttribute.go b/service/connect/api_op_UpdatePredefinedAttribute.go index b22b1e583f7..871be3f8b3a 100644 --- a/service/connect/api_op_UpdatePredefinedAttribute.go +++ b/service/connect/api_op_UpdatePredefinedAttribute.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdatePredefinedAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePredefinedAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdatePrompt.go b/service/connect/api_op_UpdatePrompt.go index 7e73aaeea6a..a2526724f32 100644 --- a/service/connect/api_op_UpdatePrompt.go +++ b/service/connect/api_op_UpdatePrompt.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdatePromptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePromptValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQueueHoursOfOperation.go b/service/connect/api_op_UpdateQueueHoursOfOperation.go index 8dd6a009f76..87b2eb127ac 100644 --- a/service/connect/api_op_UpdateQueueHoursOfOperation.go +++ b/service/connect/api_op_UpdateQueueHoursOfOperation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateQueueHoursOfOperationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQueueHoursOfOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQueueMaxContacts.go b/service/connect/api_op_UpdateQueueMaxContacts.go index 56d1410922d..cca4558c329 100644 --- a/service/connect/api_op_UpdateQueueMaxContacts.go +++ b/service/connect/api_op_UpdateQueueMaxContacts.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateQueueMaxContactsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQueueMaxContactsValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQueueName.go b/service/connect/api_op_UpdateQueueName.go index 2bf39891ca9..9fff58ea9a4 100644 --- a/service/connect/api_op_UpdateQueueName.go +++ b/service/connect/api_op_UpdateQueueName.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateQueueNameMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQueueNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQueueOutboundCallerConfig.go b/service/connect/api_op_UpdateQueueOutboundCallerConfig.go index 3aac3125b8f..4ab8989e69c 100644 --- a/service/connect/api_op_UpdateQueueOutboundCallerConfig.go +++ b/service/connect/api_op_UpdateQueueOutboundCallerConfig.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateQueueOutboundCallerConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQueueOutboundCallerConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQueueStatus.go b/service/connect/api_op_UpdateQueueStatus.go index 616e64c8816..afd4af10e9c 100644 --- a/service/connect/api_op_UpdateQueueStatus.go +++ b/service/connect/api_op_UpdateQueueStatus.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateQueueStatusMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQueueStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQuickConnectConfig.go b/service/connect/api_op_UpdateQuickConnectConfig.go index c81bbed4568..8f57a4c7c75 100644 --- a/service/connect/api_op_UpdateQuickConnectConfig.go +++ b/service/connect/api_op_UpdateQuickConnectConfig.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateQuickConnectConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQuickConnectConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateQuickConnectName.go b/service/connect/api_op_UpdateQuickConnectName.go index c1dd001ddc9..f8da81a8249 100644 --- a/service/connect/api_op_UpdateQuickConnectName.go +++ b/service/connect/api_op_UpdateQuickConnectName.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateQuickConnectNameMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQuickConnectNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateRoutingProfileAgentAvailabilityTimer.go b/service/connect/api_op_UpdateRoutingProfileAgentAvailabilityTimer.go index bce381fea05..0b968e652a7 100644 --- a/service/connect/api_op_UpdateRoutingProfileAgentAvailabilityTimer.go +++ b/service/connect/api_op_UpdateRoutingProfileAgentAvailabilityTimer.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateRoutingProfileAgentAvailabilityTimerMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingProfileAgentAvailabilityTimerValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateRoutingProfileConcurrency.go b/service/connect/api_op_UpdateRoutingProfileConcurrency.go index 3f6aa459727..34b814d1c6d 100644 --- a/service/connect/api_op_UpdateRoutingProfileConcurrency.go +++ b/service/connect/api_op_UpdateRoutingProfileConcurrency.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateRoutingProfileConcurrencyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingProfileConcurrencyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateRoutingProfileDefaultOutboundQueue.go b/service/connect/api_op_UpdateRoutingProfileDefaultOutboundQueue.go index 2edfd3c4abe..46bd9f8d837 100644 --- a/service/connect/api_op_UpdateRoutingProfileDefaultOutboundQueue.go +++ b/service/connect/api_op_UpdateRoutingProfileDefaultOutboundQueue.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateRoutingProfileDefaultOutboundQueueMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingProfileDefaultOutboundQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateRoutingProfileName.go b/service/connect/api_op_UpdateRoutingProfileName.go index b675092a756..8d0960a8b93 100644 --- a/service/connect/api_op_UpdateRoutingProfileName.go +++ b/service/connect/api_op_UpdateRoutingProfileName.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateRoutingProfileNameMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingProfileNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateRoutingProfileQueues.go b/service/connect/api_op_UpdateRoutingProfileQueues.go index f8e6c1a530e..4c7686519a8 100644 --- a/service/connect/api_op_UpdateRoutingProfileQueues.go +++ b/service/connect/api_op_UpdateRoutingProfileQueues.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateRoutingProfileQueuesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingProfileQueuesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateRule.go b/service/connect/api_op_UpdateRule.go index 300d6bcd310..f8406d9fb36 100644 --- a/service/connect/api_op_UpdateRule.go +++ b/service/connect/api_op_UpdateRule.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateSecurityProfile.go b/service/connect/api_op_UpdateSecurityProfile.go index f55a461681e..784153e94fb 100644 --- a/service/connect/api_op_UpdateSecurityProfile.go +++ b/service/connect/api_op_UpdateSecurityProfile.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateTaskTemplate.go b/service/connect/api_op_UpdateTaskTemplate.go index bf67c1bd6a7..f0f6a97f59f 100644 --- a/service/connect/api_op_UpdateTaskTemplate.go +++ b/service/connect/api_op_UpdateTaskTemplate.go @@ -182,6 +182,9 @@ func (c *Client) addOperationUpdateTaskTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTaskTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateTrafficDistribution.go b/service/connect/api_op_UpdateTrafficDistribution.go index 0f695d86a42..02ab54741d0 100644 --- a/service/connect/api_op_UpdateTrafficDistribution.go +++ b/service/connect/api_op_UpdateTrafficDistribution.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateTrafficDistributionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrafficDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserHierarchy.go b/service/connect/api_op_UpdateUserHierarchy.go index b0836aa9f2c..1f4f0822b48 100644 --- a/service/connect/api_op_UpdateUserHierarchy.go +++ b/service/connect/api_op_UpdateUserHierarchy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateUserHierarchyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserHierarchyValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserHierarchyGroupName.go b/service/connect/api_op_UpdateUserHierarchyGroupName.go index e316fe5c854..b61d7a3288e 100644 --- a/service/connect/api_op_UpdateUserHierarchyGroupName.go +++ b/service/connect/api_op_UpdateUserHierarchyGroupName.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateUserHierarchyGroupNameMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserHierarchyGroupNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserHierarchyStructure.go b/service/connect/api_op_UpdateUserHierarchyStructure.go index 873c308369a..4525f6c1dc1 100644 --- a/service/connect/api_op_UpdateUserHierarchyStructure.go +++ b/service/connect/api_op_UpdateUserHierarchyStructure.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateUserHierarchyStructureMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserHierarchyStructureValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserIdentityInfo.go b/service/connect/api_op_UpdateUserIdentityInfo.go index c41dc503990..1cfd1bbea26 100644 --- a/service/connect/api_op_UpdateUserIdentityInfo.go +++ b/service/connect/api_op_UpdateUserIdentityInfo.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateUserIdentityInfoMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserIdentityInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserPhoneConfig.go b/service/connect/api_op_UpdateUserPhoneConfig.go index 1c049bf99ad..2761e05da70 100644 --- a/service/connect/api_op_UpdateUserPhoneConfig.go +++ b/service/connect/api_op_UpdateUserPhoneConfig.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateUserPhoneConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserPhoneConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserProficiencies.go b/service/connect/api_op_UpdateUserProficiencies.go index 47accd0a138..affb60e2e2e 100644 --- a/service/connect/api_op_UpdateUserProficiencies.go +++ b/service/connect/api_op_UpdateUserProficiencies.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateUserProficienciesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserProficienciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserRoutingProfile.go b/service/connect/api_op_UpdateUserRoutingProfile.go index 9a74de905de..f92b061d89e 100644 --- a/service/connect/api_op_UpdateUserRoutingProfile.go +++ b/service/connect/api_op_UpdateUserRoutingProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateUserRoutingProfileMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserRoutingProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateUserSecurityProfiles.go b/service/connect/api_op_UpdateUserSecurityProfiles.go index cedbef4b8d1..398fea8f6dd 100644 --- a/service/connect/api_op_UpdateUserSecurityProfiles.go +++ b/service/connect/api_op_UpdateUserSecurityProfiles.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateUserSecurityProfilesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserSecurityProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateViewContent.go b/service/connect/api_op_UpdateViewContent.go index 4a1a25eae8f..32420bb35ed 100644 --- a/service/connect/api_op_UpdateViewContent.go +++ b/service/connect/api_op_UpdateViewContent.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateViewContentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateViewContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/connect/api_op_UpdateViewMetadata.go b/service/connect/api_op_UpdateViewMetadata.go index c0ce3dc4f8c..8feb9a9857c 100644 --- a/service/connect/api_op_UpdateViewMetadata.go +++ b/service/connect/api_op_UpdateViewMetadata.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateViewMetadataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateViewMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_client.go b/service/connectcampaigns/api_client.go index 4281a080d50..1d5df2e48f7 100644 --- a/service/connectcampaigns/api_client.go +++ b/service/connectcampaigns/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/connectcampaigns/api_op_CreateCampaign.go b/service/connectcampaigns/api_op_CreateCampaign.go index fe08cb419f4..a0f530d2cd2 100644 --- a/service/connectcampaigns/api_op_CreateCampaign.go +++ b/service/connectcampaigns/api_op_CreateCampaign.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_DeleteCampaign.go b/service/connectcampaigns/api_op_DeleteCampaign.go index 464984138d6..08f31ee6124 100644 --- a/service/connectcampaigns/api_op_DeleteCampaign.go +++ b/service/connectcampaigns/api_op_DeleteCampaign.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_DeleteConnectInstanceConfig.go b/service/connectcampaigns/api_op_DeleteConnectInstanceConfig.go index 12b2fdb7de9..d33531549c7 100644 --- a/service/connectcampaigns/api_op_DeleteConnectInstanceConfig.go +++ b/service/connectcampaigns/api_op_DeleteConnectInstanceConfig.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteConnectInstanceConfigMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectInstanceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_DeleteInstanceOnboardingJob.go b/service/connectcampaigns/api_op_DeleteInstanceOnboardingJob.go index 935ae3c1eac..5f32fc22d7e 100644 --- a/service/connectcampaigns/api_op_DeleteInstanceOnboardingJob.go +++ b/service/connectcampaigns/api_op_DeleteInstanceOnboardingJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteInstanceOnboardingJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceOnboardingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_DescribeCampaign.go b/service/connectcampaigns/api_op_DescribeCampaign.go index 9152c163bcf..5c9ac4bc592 100644 --- a/service/connectcampaigns/api_op_DescribeCampaign.go +++ b/service/connectcampaigns/api_op_DescribeCampaign.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeCampaignMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_GetCampaignState.go b/service/connectcampaigns/api_op_GetCampaignState.go index 97d55ed3c25..7dd47da3299 100644 --- a/service/connectcampaigns/api_op_GetCampaignState.go +++ b/service/connectcampaigns/api_op_GetCampaignState.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetCampaignStateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_GetCampaignStateBatch.go b/service/connectcampaigns/api_op_GetCampaignStateBatch.go index 86517d6e283..db139cea5e4 100644 --- a/service/connectcampaigns/api_op_GetCampaignStateBatch.go +++ b/service/connectcampaigns/api_op_GetCampaignStateBatch.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCampaignStateBatchMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignStateBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_GetConnectInstanceConfig.go b/service/connectcampaigns/api_op_GetConnectInstanceConfig.go index 00ba2a38a85..d6be795e97a 100644 --- a/service/connectcampaigns/api_op_GetConnectInstanceConfig.go +++ b/service/connectcampaigns/api_op_GetConnectInstanceConfig.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetConnectInstanceConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectInstanceConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_GetInstanceOnboardingJobStatus.go b/service/connectcampaigns/api_op_GetInstanceOnboardingJobStatus.go index 5d17c99ec27..9c7a9671e6d 100644 --- a/service/connectcampaigns/api_op_GetInstanceOnboardingJobStatus.go +++ b/service/connectcampaigns/api_op_GetInstanceOnboardingJobStatus.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetInstanceOnboardingJobStatusMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceOnboardingJobStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_ListCampaigns.go b/service/connectcampaigns/api_op_ListCampaigns.go index 4060b41ec4d..a997b17cd7b 100644 --- a/service/connectcampaigns/api_op_ListCampaigns.go +++ b/service/connectcampaigns/api_op_ListCampaigns.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListCampaignsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCampaignsValidationMiddleware(stack); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListCampaignsMiddlewares(stack *middleware.Stack, o return nil } -// ListCampaignsAPIClient is a client that implements the ListCampaigns operation. -type ListCampaignsAPIClient interface { - ListCampaigns(context.Context, *ListCampaignsInput, ...func(*Options)) (*ListCampaignsOutput, error) -} - -var _ ListCampaignsAPIClient = (*Client)(nil) - // ListCampaignsPaginatorOptions is the paginator options for ListCampaigns type ListCampaignsPaginatorOptions struct { // The maximum number of results to return per page. @@ -210,6 +206,9 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCampaigns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListCampaignsAPIClient is a client that implements the ListCampaigns operation. +type ListCampaignsAPIClient interface { + ListCampaigns(context.Context, *ListCampaignsInput, ...func(*Options)) (*ListCampaignsOutput, error) +} + +var _ ListCampaignsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCampaigns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcampaigns/api_op_ListTagsForResource.go b/service/connectcampaigns/api_op_ListTagsForResource.go index 44ff80c056b..379ece5cf12 100644 --- a/service/connectcampaigns/api_op_ListTagsForResource.go +++ b/service/connectcampaigns/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_PauseCampaign.go b/service/connectcampaigns/api_op_PauseCampaign.go index 837c5e19ed5..51fd79f1e9f 100644 --- a/service/connectcampaigns/api_op_PauseCampaign.go +++ b/service/connectcampaigns/api_op_PauseCampaign.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPauseCampaignMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPauseCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_PutDialRequestBatch.go b/service/connectcampaigns/api_op_PutDialRequestBatch.go index 26cfa0d472c..0a1a3e364c3 100644 --- a/service/connectcampaigns/api_op_PutDialRequestBatch.go +++ b/service/connectcampaigns/api_op_PutDialRequestBatch.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutDialRequestBatchMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDialRequestBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_ResumeCampaign.go b/service/connectcampaigns/api_op_ResumeCampaign.go index 427a6d54a68..2ae9dce3e47 100644 --- a/service/connectcampaigns/api_op_ResumeCampaign.go +++ b/service/connectcampaigns/api_op_ResumeCampaign.go @@ -102,6 +102,9 @@ func (c *Client) addOperationResumeCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_StartCampaign.go b/service/connectcampaigns/api_op_StartCampaign.go index ca61d7a1811..cd58fddf922 100644 --- a/service/connectcampaigns/api_op_StartCampaign.go +++ b/service/connectcampaigns/api_op_StartCampaign.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStartCampaignMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_StartInstanceOnboardingJob.go b/service/connectcampaigns/api_op_StartInstanceOnboardingJob.go index 45d66bc1f46..cef143c8434 100644 --- a/service/connectcampaigns/api_op_StartInstanceOnboardingJob.go +++ b/service/connectcampaigns/api_op_StartInstanceOnboardingJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartInstanceOnboardingJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInstanceOnboardingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_StopCampaign.go b/service/connectcampaigns/api_op_StopCampaign.go index 26d27a264fa..7ba99a0a450 100644 --- a/service/connectcampaigns/api_op_StopCampaign.go +++ b/service/connectcampaigns/api_op_StopCampaign.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStopCampaignMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_TagResource.go b/service/connectcampaigns/api_op_TagResource.go index 7f44a9bf73a..1b56544980c 100644 --- a/service/connectcampaigns/api_op_TagResource.go +++ b/service/connectcampaigns/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_UntagResource.go b/service/connectcampaigns/api_op_UntagResource.go index 693619a4926..ed548ddd35f 100644 --- a/service/connectcampaigns/api_op_UntagResource.go +++ b/service/connectcampaigns/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_UpdateCampaignDialerConfig.go b/service/connectcampaigns/api_op_UpdateCampaignDialerConfig.go index 17370e65644..512799aeb8a 100644 --- a/service/connectcampaigns/api_op_UpdateCampaignDialerConfig.go +++ b/service/connectcampaigns/api_op_UpdateCampaignDialerConfig.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateCampaignDialerConfigMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCampaignDialerConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_UpdateCampaignName.go b/service/connectcampaigns/api_op_UpdateCampaignName.go index 138644dc31f..b5ae203eb62 100644 --- a/service/connectcampaigns/api_op_UpdateCampaignName.go +++ b/service/connectcampaigns/api_op_UpdateCampaignName.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateCampaignNameMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCampaignNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcampaigns/api_op_UpdateCampaignOutboundCallConfig.go b/service/connectcampaigns/api_op_UpdateCampaignOutboundCallConfig.go index 882669bc7a8..9d68557f42f 100644 --- a/service/connectcampaigns/api_op_UpdateCampaignOutboundCallConfig.go +++ b/service/connectcampaigns/api_op_UpdateCampaignOutboundCallConfig.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateCampaignOutboundCallConfigMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCampaignOutboundCallConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_client.go b/service/connectcases/api_client.go index b190f0dd3de..5ce149f4d8e 100644 --- a/service/connectcases/api_client.go +++ b/service/connectcases/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/connectcases/api_op_BatchGetField.go b/service/connectcases/api_op_BatchGetField.go index 6d9120a3edb..34446798a55 100644 --- a/service/connectcases/api_op_BatchGetField.go +++ b/service/connectcases/api_op_BatchGetField.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchGetFieldMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFieldValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_BatchPutFieldOptions.go b/service/connectcases/api_op_BatchPutFieldOptions.go index f81bd9fd878..cbd453373ed 100644 --- a/service/connectcases/api_op_BatchPutFieldOptions.go +++ b/service/connectcases/api_op_BatchPutFieldOptions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchPutFieldOptionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutFieldOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_CreateCase.go b/service/connectcases/api_op_CreateCase.go index 8946c95d413..a7990d279d9 100644 --- a/service/connectcases/api_op_CreateCase.go +++ b/service/connectcases/api_op_CreateCase.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateCaseMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCaseMiddleware(stack, options); err != nil { return err } diff --git a/service/connectcases/api_op_CreateDomain.go b/service/connectcases/api_op_CreateDomain.go index 92c392ca578..794655228d4 100644 --- a/service/connectcases/api_op_CreateDomain.go +++ b/service/connectcases/api_op_CreateDomain.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_CreateField.go b/service/connectcases/api_op_CreateField.go index 5587e1feb05..b8c91ea7143 100644 --- a/service/connectcases/api_op_CreateField.go +++ b/service/connectcases/api_op_CreateField.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateFieldMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFieldValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_CreateLayout.go b/service/connectcases/api_op_CreateLayout.go index 12d57c0079c..6bd07d2de77 100644 --- a/service/connectcases/api_op_CreateLayout.go +++ b/service/connectcases/api_op_CreateLayout.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateLayoutMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLayoutValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_CreateRelatedItem.go b/service/connectcases/api_op_CreateRelatedItem.go index ae82327aaa8..029f66b9478 100644 --- a/service/connectcases/api_op_CreateRelatedItem.go +++ b/service/connectcases/api_op_CreateRelatedItem.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateRelatedItemMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRelatedItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_CreateTemplate.go b/service/connectcases/api_op_CreateTemplate.go index bb68311a056..a2547194aca 100644 --- a/service/connectcases/api_op_CreateTemplate.go +++ b/service/connectcases/api_op_CreateTemplate.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_DeleteDomain.go b/service/connectcases/api_op_DeleteDomain.go index afd1dbd4e9c..63cdbfc1351 100644 --- a/service/connectcases/api_op_DeleteDomain.go +++ b/service/connectcases/api_op_DeleteDomain.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_DeleteField.go b/service/connectcases/api_op_DeleteField.go index b2f44510dfd..76941bce3f5 100644 --- a/service/connectcases/api_op_DeleteField.go +++ b/service/connectcases/api_op_DeleteField.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDeleteFieldMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFieldValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_DeleteLayout.go b/service/connectcases/api_op_DeleteLayout.go index 1a4fc010e86..069a7317be6 100644 --- a/service/connectcases/api_op_DeleteLayout.go +++ b/service/connectcases/api_op_DeleteLayout.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteLayoutMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLayoutValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_DeleteTemplate.go b/service/connectcases/api_op_DeleteTemplate.go index 23c82b3e76e..b166722b8fa 100644 --- a/service/connectcases/api_op_DeleteTemplate.go +++ b/service/connectcases/api_op_DeleteTemplate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_GetCase.go b/service/connectcases/api_op_GetCase.go index 9e0b6a8a131..8335338b240 100644 --- a/service/connectcases/api_op_GetCase.go +++ b/service/connectcases/api_op_GetCase.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetCaseMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCaseValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationGetCaseMiddlewares(stack *middleware.Stack, options return nil } -// GetCaseAPIClient is a client that implements the GetCase operation. -type GetCaseAPIClient interface { - GetCase(context.Context, *GetCaseInput, ...func(*Options)) (*GetCaseOutput, error) -} - -var _ GetCaseAPIClient = (*Client)(nil) - // GetCasePaginatorOptions is the paginator options for GetCase type GetCasePaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -217,6 +213,9 @@ func (p *GetCasePaginator) NextPage(ctx context.Context, optFns ...func(*Options params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCase(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *GetCasePaginator) NextPage(ctx context.Context, optFns ...func(*Options return result, nil } +// GetCaseAPIClient is a client that implements the GetCase operation. +type GetCaseAPIClient interface { + GetCase(context.Context, *GetCaseInput, ...func(*Options)) (*GetCaseOutput, error) +} + +var _ GetCaseAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCase(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_GetCaseAuditEvents.go b/service/connectcases/api_op_GetCaseAuditEvents.go index 9b991e2feeb..64d4e2874bf 100644 --- a/service/connectcases/api_op_GetCaseAuditEvents.go +++ b/service/connectcases/api_op_GetCaseAuditEvents.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetCaseAuditEventsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCaseAuditEventsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetCaseAuditEventsMiddlewares(stack *middleware.Sta return nil } -// GetCaseAuditEventsAPIClient is a client that implements the GetCaseAuditEvents -// operation. -type GetCaseAuditEventsAPIClient interface { - GetCaseAuditEvents(context.Context, *GetCaseAuditEventsInput, ...func(*Options)) (*GetCaseAuditEventsOutput, error) -} - -var _ GetCaseAuditEventsAPIClient = (*Client)(nil) - // GetCaseAuditEventsPaginatorOptions is the paginator options for // GetCaseAuditEvents type GetCaseAuditEventsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *GetCaseAuditEventsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCaseAuditEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetCaseAuditEventsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetCaseAuditEventsAPIClient is a client that implements the GetCaseAuditEvents +// operation. +type GetCaseAuditEventsAPIClient interface { + GetCaseAuditEvents(context.Context, *GetCaseAuditEventsInput, ...func(*Options)) (*GetCaseAuditEventsOutput, error) +} + +var _ GetCaseAuditEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCaseAuditEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_GetCaseEventConfiguration.go b/service/connectcases/api_op_GetCaseEventConfiguration.go index e1fc4ee09e0..3e85c458289 100644 --- a/service/connectcases/api_op_GetCaseEventConfiguration.go +++ b/service/connectcases/api_op_GetCaseEventConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetCaseEventConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCaseEventConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_GetDomain.go b/service/connectcases/api_op_GetDomain.go index 02fa3e2b8ea..c88b092b457 100644 --- a/service/connectcases/api_op_GetDomain.go +++ b/service/connectcases/api_op_GetDomain.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetDomainMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_GetLayout.go b/service/connectcases/api_op_GetLayout.go index ededf20b2f1..b1aa727ce13 100644 --- a/service/connectcases/api_op_GetLayout.go +++ b/service/connectcases/api_op_GetLayout.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetLayoutMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLayoutValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_GetTemplate.go b/service/connectcases/api_op_GetTemplate.go index 8ecf364ebd3..a473203eea7 100644 --- a/service/connectcases/api_op_GetTemplate.go +++ b/service/connectcases/api_op_GetTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetTemplateMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_ListCasesForContact.go b/service/connectcases/api_op_ListCasesForContact.go index f6a6504525d..9dfc5693d63 100644 --- a/service/connectcases/api_op_ListCasesForContact.go +++ b/service/connectcases/api_op_ListCasesForContact.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCasesForContactMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCasesForContactValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListCasesForContactMiddlewares(stack *middleware.St return nil } -// ListCasesForContactAPIClient is a client that implements the -// ListCasesForContact operation. -type ListCasesForContactAPIClient interface { - ListCasesForContact(context.Context, *ListCasesForContactInput, ...func(*Options)) (*ListCasesForContactOutput, error) -} - -var _ ListCasesForContactAPIClient = (*Client)(nil) - // ListCasesForContactPaginatorOptions is the paginator options for // ListCasesForContact type ListCasesForContactPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListCasesForContactPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCasesForContact(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListCasesForContactPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListCasesForContactAPIClient is a client that implements the +// ListCasesForContact operation. +type ListCasesForContactAPIClient interface { + ListCasesForContact(context.Context, *ListCasesForContactInput, ...func(*Options)) (*ListCasesForContactOutput, error) +} + +var _ ListCasesForContactAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCasesForContact(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_ListDomains.go b/service/connectcases/api_op_ListDomains.go index 2a20a3b453c..b3daf61d1cc 100644 --- a/service/connectcases/api_op_ListDomains.go +++ b/service/connectcases/api_op_ListDomains.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of results to return per page. @@ -206,6 +202,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_ListFieldOptions.go b/service/connectcases/api_op_ListFieldOptions.go index ea5ba6b3bd2..38712ae9366 100644 --- a/service/connectcases/api_op_ListFieldOptions.go +++ b/service/connectcases/api_op_ListFieldOptions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListFieldOptionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFieldOptionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListFieldOptionsMiddlewares(stack *middleware.Stack return nil } -// ListFieldOptionsAPIClient is a client that implements the ListFieldOptions -// operation. -type ListFieldOptionsAPIClient interface { - ListFieldOptions(context.Context, *ListFieldOptionsInput, ...func(*Options)) (*ListFieldOptionsOutput, error) -} - -var _ ListFieldOptionsAPIClient = (*Client)(nil) - // ListFieldOptionsPaginatorOptions is the paginator options for ListFieldOptions type ListFieldOptionsPaginatorOptions struct { // The maximum number of results to return per page. @@ -222,6 +217,9 @@ func (p *ListFieldOptionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFieldOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListFieldOptionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListFieldOptionsAPIClient is a client that implements the ListFieldOptions +// operation. +type ListFieldOptionsAPIClient interface { + ListFieldOptions(context.Context, *ListFieldOptionsInput, ...func(*Options)) (*ListFieldOptionsOutput, error) +} + +var _ ListFieldOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFieldOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_ListFields.go b/service/connectcases/api_op_ListFields.go index caf82bf90ca..19ca5a9ba5c 100644 --- a/service/connectcases/api_op_ListFields.go +++ b/service/connectcases/api_op_ListFields.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListFieldsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFieldsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListFieldsMiddlewares(stack *middleware.Stack, opti return nil } -// ListFieldsAPIClient is a client that implements the ListFields operation. -type ListFieldsAPIClient interface { - ListFields(context.Context, *ListFieldsInput, ...func(*Options)) (*ListFieldsOutput, error) -} - -var _ ListFieldsAPIClient = (*Client)(nil) - // ListFieldsPaginatorOptions is the paginator options for ListFields type ListFieldsPaginatorOptions struct { // The maximum number of results to return per page. @@ -213,6 +209,9 @@ func (p *ListFieldsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFields(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListFieldsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListFieldsAPIClient is a client that implements the ListFields operation. +type ListFieldsAPIClient interface { + ListFields(context.Context, *ListFieldsInput, ...func(*Options)) (*ListFieldsOutput, error) +} + +var _ ListFieldsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFields(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_ListLayouts.go b/service/connectcases/api_op_ListLayouts.go index 7807db0ed41..6238b5d7c8a 100644 --- a/service/connectcases/api_op_ListLayouts.go +++ b/service/connectcases/api_op_ListLayouts.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListLayoutsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLayoutsValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListLayoutsMiddlewares(stack *middleware.Stack, opt return nil } -// ListLayoutsAPIClient is a client that implements the ListLayouts operation. -type ListLayoutsAPIClient interface { - ListLayouts(context.Context, *ListLayoutsInput, ...func(*Options)) (*ListLayoutsOutput, error) -} - -var _ ListLayoutsAPIClient = (*Client)(nil) - // ListLayoutsPaginatorOptions is the paginator options for ListLayouts type ListLayoutsPaginatorOptions struct { // The maximum number of results to return per page. @@ -214,6 +210,9 @@ func (p *ListLayoutsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLayouts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListLayoutsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListLayoutsAPIClient is a client that implements the ListLayouts operation. +type ListLayoutsAPIClient interface { + ListLayouts(context.Context, *ListLayoutsInput, ...func(*Options)) (*ListLayoutsOutput, error) +} + +var _ ListLayoutsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLayouts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_ListTagsForResource.go b/service/connectcases/api_op_ListTagsForResource.go index 9a2fd774338..5d2ddf1f613 100644 --- a/service/connectcases/api_op_ListTagsForResource.go +++ b/service/connectcases/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_ListTemplates.go b/service/connectcases/api_op_ListTemplates.go index 384f9491f00..7cdc63d93ec 100644 --- a/service/connectcases/api_op_ListTemplates.go +++ b/service/connectcases/api_op_ListTemplates.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplatesValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o return nil } -// ListTemplatesAPIClient is a client that implements the ListTemplates operation. -type ListTemplatesAPIClient interface { - ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) -} - -var _ ListTemplatesAPIClient = (*Client)(nil) - // ListTemplatesPaginatorOptions is the paginator options for ListTemplates type ListTemplatesPaginatorOptions struct { // The maximum number of results to return per page. @@ -217,6 +213,9 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListTemplatesAPIClient is a client that implements the ListTemplates operation. +type ListTemplatesAPIClient interface { + ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) +} + +var _ ListTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_PutCaseEventConfiguration.go b/service/connectcases/api_op_PutCaseEventConfiguration.go index ffc1771b7a8..7c8fd2ca65a 100644 --- a/service/connectcases/api_op_PutCaseEventConfiguration.go +++ b/service/connectcases/api_op_PutCaseEventConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutCaseEventConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutCaseEventConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_SearchCases.go b/service/connectcases/api_op_SearchCases.go index 8b1a57c05b1..9c93ee28790 100644 --- a/service/connectcases/api_op_SearchCases.go +++ b/service/connectcases/api_op_SearchCases.go @@ -139,6 +139,9 @@ func (c *Client) addOperationSearchCasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchCasesValidationMiddleware(stack); err != nil { return err } @@ -163,13 +166,6 @@ func (c *Client) addOperationSearchCasesMiddlewares(stack *middleware.Stack, opt return nil } -// SearchCasesAPIClient is a client that implements the SearchCases operation. -type SearchCasesAPIClient interface { - SearchCases(context.Context, *SearchCasesInput, ...func(*Options)) (*SearchCasesOutput, error) -} - -var _ SearchCasesAPIClient = (*Client)(nil) - // SearchCasesPaginatorOptions is the paginator options for SearchCases type SearchCasesPaginatorOptions struct { // The maximum number of cases to return. The current maximum supported value is @@ -234,6 +230,9 @@ func (p *SearchCasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchCases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *SearchCasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// SearchCasesAPIClient is a client that implements the SearchCases operation. +type SearchCasesAPIClient interface { + SearchCases(context.Context, *SearchCasesInput, ...func(*Options)) (*SearchCasesOutput, error) +} + +var _ SearchCasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchCases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_SearchRelatedItems.go b/service/connectcases/api_op_SearchRelatedItems.go index 5ce3d3bc694..67cefc34adf 100644 --- a/service/connectcases/api_op_SearchRelatedItems.go +++ b/service/connectcases/api_op_SearchRelatedItems.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSearchRelatedItemsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchRelatedItemsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationSearchRelatedItemsMiddlewares(stack *middleware.Sta return nil } -// SearchRelatedItemsAPIClient is a client that implements the SearchRelatedItems -// operation. -type SearchRelatedItemsAPIClient interface { - SearchRelatedItems(context.Context, *SearchRelatedItemsInput, ...func(*Options)) (*SearchRelatedItemsOutput, error) -} - -var _ SearchRelatedItemsAPIClient = (*Client)(nil) - // SearchRelatedItemsPaginatorOptions is the paginator options for // SearchRelatedItems type SearchRelatedItemsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *SearchRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchRelatedItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *SearchRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchRelatedItemsAPIClient is a client that implements the SearchRelatedItems +// operation. +type SearchRelatedItemsAPIClient interface { + SearchRelatedItems(context.Context, *SearchRelatedItemsInput, ...func(*Options)) (*SearchRelatedItemsOutput, error) +} + +var _ SearchRelatedItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectcases/api_op_TagResource.go b/service/connectcases/api_op_TagResource.go index 303016f5c36..4048abc8c9a 100644 --- a/service/connectcases/api_op_TagResource.go +++ b/service/connectcases/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_UntagResource.go b/service/connectcases/api_op_UntagResource.go index 4ba5d64707b..6897f624cbd 100644 --- a/service/connectcases/api_op_UntagResource.go +++ b/service/connectcases/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_UpdateCase.go b/service/connectcases/api_op_UpdateCase.go index 30d383814c3..1104f65bfa8 100644 --- a/service/connectcases/api_op_UpdateCase.go +++ b/service/connectcases/api_op_UpdateCase.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateCaseMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_UpdateField.go b/service/connectcases/api_op_UpdateField.go index 172dff5d074..8a7a033b150 100644 --- a/service/connectcases/api_op_UpdateField.go +++ b/service/connectcases/api_op_UpdateField.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateFieldMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFieldValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_UpdateLayout.go b/service/connectcases/api_op_UpdateLayout.go index 7bbc354a98f..ac9225b3691 100644 --- a/service/connectcases/api_op_UpdateLayout.go +++ b/service/connectcases/api_op_UpdateLayout.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateLayoutMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLayoutValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcases/api_op_UpdateTemplate.go b/service/connectcases/api_op_UpdateTemplate.go index f75f4831c17..a71cedc0c3d 100644 --- a/service/connectcases/api_op_UpdateTemplate.go +++ b/service/connectcases/api_op_UpdateTemplate.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectcontactlens/api_client.go b/service/connectcontactlens/api_client.go index a91af07ad03..1a57ab53a4f 100644 --- a/service/connectcontactlens/api_client.go +++ b/service/connectcontactlens/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go b/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go index 2d2013962e5..3fe97dc748d 100644 --- a/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go +++ b/service/connectcontactlens/api_op_ListRealtimeContactAnalysisSegments.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListRealtimeContactAnalysisSegmentsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRealtimeContactAnalysisSegmentsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListRealtimeContactAnalysisSegmentsMiddlewares(stac return nil } -// ListRealtimeContactAnalysisSegmentsAPIClient is a client that implements the -// ListRealtimeContactAnalysisSegments operation. -type ListRealtimeContactAnalysisSegmentsAPIClient interface { - ListRealtimeContactAnalysisSegments(context.Context, *ListRealtimeContactAnalysisSegmentsInput, ...func(*Options)) (*ListRealtimeContactAnalysisSegmentsOutput, error) -} - -var _ ListRealtimeContactAnalysisSegmentsAPIClient = (*Client)(nil) - // ListRealtimeContactAnalysisSegmentsPaginatorOptions is the paginator options // for ListRealtimeContactAnalysisSegments type ListRealtimeContactAnalysisSegmentsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListRealtimeContactAnalysisSegmentsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRealtimeContactAnalysisSegments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListRealtimeContactAnalysisSegmentsPaginator) NextPage(ctx context.Cont return result, nil } +// ListRealtimeContactAnalysisSegmentsAPIClient is a client that implements the +// ListRealtimeContactAnalysisSegments operation. +type ListRealtimeContactAnalysisSegmentsAPIClient interface { + ListRealtimeContactAnalysisSegments(context.Context, *ListRealtimeContactAnalysisSegmentsInput, ...func(*Options)) (*ListRealtimeContactAnalysisSegmentsOutput, error) +} + +var _ ListRealtimeContactAnalysisSegmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRealtimeContactAnalysisSegments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectparticipant/api_client.go b/service/connectparticipant/api_client.go index 9a152a4065e..9bda77be35c 100644 --- a/service/connectparticipant/api_client.go +++ b/service/connectparticipant/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/connectparticipant/api_op_CompleteAttachmentUpload.go b/service/connectparticipant/api_op_CompleteAttachmentUpload.go index 55a3ab2829b..21c88c72a3a 100644 --- a/service/connectparticipant/api_op_CompleteAttachmentUpload.go +++ b/service/connectparticipant/api_op_CompleteAttachmentUpload.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCompleteAttachmentUploadMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCompleteAttachmentUploadMiddleware(stack, options); err != nil { return err } diff --git a/service/connectparticipant/api_op_CreateParticipantConnection.go b/service/connectparticipant/api_op_CreateParticipantConnection.go index 813ed5e408a..c5d7078c86d 100644 --- a/service/connectparticipant/api_op_CreateParticipantConnection.go +++ b/service/connectparticipant/api_op_CreateParticipantConnection.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateParticipantConnectionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateParticipantConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectparticipant/api_op_DescribeView.go b/service/connectparticipant/api_op_DescribeView.go index c31fc955298..2cbfc495f9d 100644 --- a/service/connectparticipant/api_op_DescribeView.go +++ b/service/connectparticipant/api_op_DescribeView.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeViewMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectparticipant/api_op_DisconnectParticipant.go b/service/connectparticipant/api_op_DisconnectParticipant.go index 799037be911..ea8228a40c7 100644 --- a/service/connectparticipant/api_op_DisconnectParticipant.go +++ b/service/connectparticipant/api_op_DisconnectParticipant.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisconnectParticipantMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisconnectParticipantMiddleware(stack, options); err != nil { return err } diff --git a/service/connectparticipant/api_op_GetAttachment.go b/service/connectparticipant/api_op_GetAttachment.go index d9375a07c79..2a02adfb2aa 100644 --- a/service/connectparticipant/api_op_GetAttachment.go +++ b/service/connectparticipant/api_op_GetAttachment.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetAttachmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/connectparticipant/api_op_GetTranscript.go b/service/connectparticipant/api_op_GetTranscript.go index c4fa7e13817..b111564e24d 100644 --- a/service/connectparticipant/api_op_GetTranscript.go +++ b/service/connectparticipant/api_op_GetTranscript.go @@ -156,6 +156,9 @@ func (c *Client) addOperationGetTranscriptMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTranscriptValidationMiddleware(stack); err != nil { return err } @@ -180,13 +183,6 @@ func (c *Client) addOperationGetTranscriptMiddlewares(stack *middleware.Stack, o return nil } -// GetTranscriptAPIClient is a client that implements the GetTranscript operation. -type GetTranscriptAPIClient interface { - GetTranscript(context.Context, *GetTranscriptInput, ...func(*Options)) (*GetTranscriptOutput, error) -} - -var _ GetTranscriptAPIClient = (*Client)(nil) - // GetTranscriptPaginatorOptions is the paginator options for GetTranscript type GetTranscriptPaginatorOptions struct { // The maximum number of results to return in the page. Default: 10. @@ -250,6 +246,9 @@ func (p *GetTranscriptPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTranscript(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +268,13 @@ func (p *GetTranscriptPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetTranscriptAPIClient is a client that implements the GetTranscript operation. +type GetTranscriptAPIClient interface { + GetTranscript(context.Context, *GetTranscriptInput, ...func(*Options)) (*GetTranscriptOutput, error) +} + +var _ GetTranscriptAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTranscript(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/connectparticipant/api_op_SendEvent.go b/service/connectparticipant/api_op_SendEvent.go index 98e0ccef745..9f09618d422 100644 --- a/service/connectparticipant/api_op_SendEvent.go +++ b/service/connectparticipant/api_op_SendEvent.go @@ -151,6 +151,9 @@ func (c *Client) addOperationSendEventMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendEventMiddleware(stack, options); err != nil { return err } diff --git a/service/connectparticipant/api_op_SendMessage.go b/service/connectparticipant/api_op_SendMessage.go index 32dd3b04ae4..061dd2fd5ef 100644 --- a/service/connectparticipant/api_op_SendMessage.go +++ b/service/connectparticipant/api_op_SendMessage.go @@ -145,6 +145,9 @@ func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendMessageMiddleware(stack, options); err != nil { return err } diff --git a/service/connectparticipant/api_op_StartAttachmentUpload.go b/service/connectparticipant/api_op_StartAttachmentUpload.go index 5aa45a189e4..ce8393b1e3d 100644 --- a/service/connectparticipant/api_op_StartAttachmentUpload.go +++ b/service/connectparticipant/api_op_StartAttachmentUpload.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartAttachmentUploadMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartAttachmentUploadMiddleware(stack, options); err != nil { return err } diff --git a/service/controlcatalog/api_client.go b/service/controlcatalog/api_client.go index edb1e52c6d0..33ba9793235 100644 --- a/service/controlcatalog/api_client.go +++ b/service/controlcatalog/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/controlcatalog/api_op_ListCommonControls.go b/service/controlcatalog/api_op_ListCommonControls.go index 8b66dc99a86..a4b1e7d3bb9 100644 --- a/service/controlcatalog/api_op_ListCommonControls.go +++ b/service/controlcatalog/api_op_ListCommonControls.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListCommonControlsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCommonControls(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListCommonControlsMiddlewares(stack *middleware.Sta return nil } -// ListCommonControlsAPIClient is a client that implements the ListCommonControls -// operation. -type ListCommonControlsAPIClient interface { - ListCommonControls(context.Context, *ListCommonControlsInput, ...func(*Options)) (*ListCommonControlsOutput, error) -} - -var _ ListCommonControlsAPIClient = (*Client)(nil) - // ListCommonControlsPaginatorOptions is the paginator options for // ListCommonControls type ListCommonControlsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListCommonControlsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCommonControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListCommonControlsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListCommonControlsAPIClient is a client that implements the ListCommonControls +// operation. +type ListCommonControlsAPIClient interface { + ListCommonControls(context.Context, *ListCommonControlsInput, ...func(*Options)) (*ListCommonControlsOutput, error) +} + +var _ ListCommonControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCommonControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controlcatalog/api_op_ListDomains.go b/service/controlcatalog/api_op_ListDomains.go index bf4c24d2b55..a7157418a94 100644 --- a/service/controlcatalog/api_op_ListDomains.go +++ b/service/controlcatalog/api_op_ListDomains.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of results on a page or for an API request call. @@ -204,6 +200,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controlcatalog/api_op_ListObjectives.go b/service/controlcatalog/api_op_ListObjectives.go index 3f01bd8c239..b88657f0015 100644 --- a/service/controlcatalog/api_op_ListObjectives.go +++ b/service/controlcatalog/api_op_ListObjectives.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListObjectivesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListObjectives(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListObjectivesMiddlewares(stack *middleware.Stack, return nil } -// ListObjectivesAPIClient is a client that implements the ListObjectives -// operation. -type ListObjectivesAPIClient interface { - ListObjectives(context.Context, *ListObjectivesInput, ...func(*Options)) (*ListObjectivesOutput, error) -} - -var _ ListObjectivesAPIClient = (*Client)(nil) - // ListObjectivesPaginatorOptions is the paginator options for ListObjectives type ListObjectivesPaginatorOptions struct { // The maximum number of results on a page or for an API request call. @@ -215,6 +210,9 @@ func (p *ListObjectivesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectives(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListObjectivesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListObjectivesAPIClient is a client that implements the ListObjectives +// operation. +type ListObjectivesAPIClient interface { + ListObjectives(context.Context, *ListObjectivesInput, ...func(*Options)) (*ListObjectivesOutput, error) +} + +var _ ListObjectivesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectives(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controltower/api_client.go b/service/controltower/api_client.go index 0bc262d0569..209d1da1e2d 100644 --- a/service/controltower/api_client.go +++ b/service/controltower/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/controltower/api_op_CreateLandingZone.go b/service/controltower/api_op_CreateLandingZone.go index 6b2941a239b..89d2247caca 100644 --- a/service/controltower/api_op_CreateLandingZone.go +++ b/service/controltower/api_op_CreateLandingZone.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateLandingZoneMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLandingZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_DeleteLandingZone.go b/service/controltower/api_op_DeleteLandingZone.go index 82a5284c87b..3387a624cda 100644 --- a/service/controltower/api_op_DeleteLandingZone.go +++ b/service/controltower/api_op_DeleteLandingZone.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteLandingZoneMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLandingZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_DisableBaseline.go b/service/controltower/api_op_DisableBaseline.go index 739d0ca7f5a..921eb0b203f 100644 --- a/service/controltower/api_op_DisableBaseline.go +++ b/service/controltower/api_op_DisableBaseline.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisableBaselineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_DisableControl.go b/service/controltower/api_op_DisableControl.go index 01c0b8da192..18eceb6a2ab 100644 --- a/service/controltower/api_op_DisableControl.go +++ b/service/controltower/api_op_DisableControl.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDisableControlMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_EnableBaseline.go b/service/controltower/api_op_EnableBaseline.go index d73bc6bcb23..cd25e9d5416 100644 --- a/service/controltower/api_op_EnableBaseline.go +++ b/service/controltower/api_op_EnableBaseline.go @@ -137,6 +137,9 @@ func (c *Client) addOperationEnableBaselineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_EnableControl.go b/service/controltower/api_op_EnableControl.go index 6d401a5af83..d50599b8aa8 100644 --- a/service/controltower/api_op_EnableControl.go +++ b/service/controltower/api_op_EnableControl.go @@ -136,6 +136,9 @@ func (c *Client) addOperationEnableControlMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetBaseline.go b/service/controltower/api_op_GetBaseline.go index 01e43d300c8..597982579f2 100644 --- a/service/controltower/api_op_GetBaseline.go +++ b/service/controltower/api_op_GetBaseline.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetBaselineMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetBaselineOperation.go b/service/controltower/api_op_GetBaselineOperation.go index f67c7637e86..6158728cf6b 100644 --- a/service/controltower/api_op_GetBaselineOperation.go +++ b/service/controltower/api_op_GetBaselineOperation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetBaselineOperationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBaselineOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetControlOperation.go b/service/controltower/api_op_GetControlOperation.go index a13f913fd19..40559f0846f 100644 --- a/service/controltower/api_op_GetControlOperation.go +++ b/service/controltower/api_op_GetControlOperation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetControlOperationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetControlOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetEnabledBaseline.go b/service/controltower/api_op_GetEnabledBaseline.go index 7c56d166b14..3c81250ca30 100644 --- a/service/controltower/api_op_GetEnabledBaseline.go +++ b/service/controltower/api_op_GetEnabledBaseline.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetEnabledBaselineMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnabledBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetEnabledControl.go b/service/controltower/api_op_GetEnabledControl.go index 89eb5b86ebe..5b555c5c073 100644 --- a/service/controltower/api_op_GetEnabledControl.go +++ b/service/controltower/api_op_GetEnabledControl.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetEnabledControlMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnabledControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetLandingZone.go b/service/controltower/api_op_GetLandingZone.go index 952d9139c24..fffdd4aa5b3 100644 --- a/service/controltower/api_op_GetLandingZone.go +++ b/service/controltower/api_op_GetLandingZone.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetLandingZoneMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLandingZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_GetLandingZoneOperation.go b/service/controltower/api_op_GetLandingZoneOperation.go index fe7c2340b18..6b4bbeccd5a 100644 --- a/service/controltower/api_op_GetLandingZoneOperation.go +++ b/service/controltower/api_op_GetLandingZoneOperation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetLandingZoneOperationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLandingZoneOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_ListBaselines.go b/service/controltower/api_op_ListBaselines.go index 9c50bbbe034..cf49716c053 100644 --- a/service/controltower/api_op_ListBaselines.go +++ b/service/controltower/api_op_ListBaselines.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListBaselinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBaselines(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListBaselinesMiddlewares(stack *middleware.Stack, o return nil } -// ListBaselinesAPIClient is a client that implements the ListBaselines operation. -type ListBaselinesAPIClient interface { - ListBaselines(context.Context, *ListBaselinesInput, ...func(*Options)) (*ListBaselinesOutput, error) -} - -var _ ListBaselinesAPIClient = (*Client)(nil) - // ListBaselinesPaginatorOptions is the paginator options for ListBaselines type ListBaselinesPaginatorOptions struct { // The maximum number of results to be shown. @@ -205,6 +201,9 @@ func (p *ListBaselinesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBaselines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListBaselinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListBaselinesAPIClient is a client that implements the ListBaselines operation. +type ListBaselinesAPIClient interface { + ListBaselines(context.Context, *ListBaselinesInput, ...func(*Options)) (*ListBaselinesOutput, error) +} + +var _ ListBaselinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBaselines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controltower/api_op_ListControlOperations.go b/service/controltower/api_op_ListControlOperations.go index 9a87d5e4098..29bbad42890 100644 --- a/service/controltower/api_op_ListControlOperations.go +++ b/service/controltower/api_op_ListControlOperations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListControlOperationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListControlOperations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListControlOperationsMiddlewares(stack *middleware. return nil } -// ListControlOperationsAPIClient is a client that implements the -// ListControlOperations operation. -type ListControlOperationsAPIClient interface { - ListControlOperations(context.Context, *ListControlOperationsInput, ...func(*Options)) (*ListControlOperationsOutput, error) -} - -var _ ListControlOperationsAPIClient = (*Client)(nil) - // ListControlOperationsPaginatorOptions is the paginator options for // ListControlOperations type ListControlOperationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListControlOperationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListControlOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListControlOperationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListControlOperationsAPIClient is a client that implements the +// ListControlOperations operation. +type ListControlOperationsAPIClient interface { + ListControlOperations(context.Context, *ListControlOperationsInput, ...func(*Options)) (*ListControlOperationsOutput, error) +} + +var _ ListControlOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListControlOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controltower/api_op_ListEnabledBaselines.go b/service/controltower/api_op_ListEnabledBaselines.go index 2c9bbac9b09..39247ace1dc 100644 --- a/service/controltower/api_op_ListEnabledBaselines.go +++ b/service/controltower/api_op_ListEnabledBaselines.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListEnabledBaselinesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnabledBaselines(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListEnabledBaselinesMiddlewares(stack *middleware.S return nil } -// ListEnabledBaselinesAPIClient is a client that implements the -// ListEnabledBaselines operation. -type ListEnabledBaselinesAPIClient interface { - ListEnabledBaselines(context.Context, *ListEnabledBaselinesInput, ...func(*Options)) (*ListEnabledBaselinesOutput, error) -} - -var _ ListEnabledBaselinesAPIClient = (*Client)(nil) - // ListEnabledBaselinesPaginatorOptions is the paginator options for // ListEnabledBaselines type ListEnabledBaselinesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListEnabledBaselinesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnabledBaselines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEnabledBaselinesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListEnabledBaselinesAPIClient is a client that implements the +// ListEnabledBaselines operation. +type ListEnabledBaselinesAPIClient interface { + ListEnabledBaselines(context.Context, *ListEnabledBaselinesInput, ...func(*Options)) (*ListEnabledBaselinesOutput, error) +} + +var _ ListEnabledBaselinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnabledBaselines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controltower/api_op_ListEnabledControls.go b/service/controltower/api_op_ListEnabledControls.go index 79dc6eec68c..01cbb47b62b 100644 --- a/service/controltower/api_op_ListEnabledControls.go +++ b/service/controltower/api_op_ListEnabledControls.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListEnabledControlsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnabledControls(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListEnabledControlsMiddlewares(stack *middleware.St return nil } -// ListEnabledControlsAPIClient is a client that implements the -// ListEnabledControls operation. -type ListEnabledControlsAPIClient interface { - ListEnabledControls(context.Context, *ListEnabledControlsInput, ...func(*Options)) (*ListEnabledControlsOutput, error) -} - -var _ ListEnabledControlsAPIClient = (*Client)(nil) - // ListEnabledControlsPaginatorOptions is the paginator options for // ListEnabledControls type ListEnabledControlsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListEnabledControlsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnabledControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListEnabledControlsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEnabledControlsAPIClient is a client that implements the +// ListEnabledControls operation. +type ListEnabledControlsAPIClient interface { + ListEnabledControls(context.Context, *ListEnabledControlsInput, ...func(*Options)) (*ListEnabledControlsOutput, error) +} + +var _ ListEnabledControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnabledControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controltower/api_op_ListLandingZones.go b/service/controltower/api_op_ListLandingZones.go index 8c50cce532c..bb6bae0c88f 100644 --- a/service/controltower/api_op_ListLandingZones.go +++ b/service/controltower/api_op_ListLandingZones.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListLandingZonesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLandingZones(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListLandingZonesMiddlewares(stack *middleware.Stack return nil } -// ListLandingZonesAPIClient is a client that implements the ListLandingZones -// operation. -type ListLandingZonesAPIClient interface { - ListLandingZones(context.Context, *ListLandingZonesInput, ...func(*Options)) (*ListLandingZonesOutput, error) -} - -var _ ListLandingZonesAPIClient = (*Client)(nil) - // ListLandingZonesPaginatorOptions is the paginator options for ListLandingZones type ListLandingZonesPaginatorOptions struct { // The maximum number of returned landing zone ARNs, which is one. @@ -210,6 +205,9 @@ func (p *ListLandingZonesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLandingZones(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListLandingZonesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListLandingZonesAPIClient is a client that implements the ListLandingZones +// operation. +type ListLandingZonesAPIClient interface { + ListLandingZones(context.Context, *ListLandingZonesInput, ...func(*Options)) (*ListLandingZonesOutput, error) +} + +var _ ListLandingZonesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLandingZones(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/controltower/api_op_ListTagsForResource.go b/service/controltower/api_op_ListTagsForResource.go index d0ee64e50f2..09aa478c45a 100644 --- a/service/controltower/api_op_ListTagsForResource.go +++ b/service/controltower/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_ResetEnabledBaseline.go b/service/controltower/api_op_ResetEnabledBaseline.go index a8831487b5d..6ea5f609341 100644 --- a/service/controltower/api_op_ResetEnabledBaseline.go +++ b/service/controltower/api_op_ResetEnabledBaseline.go @@ -114,6 +114,9 @@ func (c *Client) addOperationResetEnabledBaselineMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetEnabledBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_ResetLandingZone.go b/service/controltower/api_op_ResetLandingZone.go index 3311a010a56..6d44ec02b1c 100644 --- a/service/controltower/api_op_ResetLandingZone.go +++ b/service/controltower/api_op_ResetLandingZone.go @@ -111,6 +111,9 @@ func (c *Client) addOperationResetLandingZoneMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetLandingZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_TagResource.go b/service/controltower/api_op_TagResource.go index 0ce8475b412..0f1f88b19d5 100644 --- a/service/controltower/api_op_TagResource.go +++ b/service/controltower/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_UntagResource.go b/service/controltower/api_op_UntagResource.go index 3358206606f..09939a7845b 100644 --- a/service/controltower/api_op_UntagResource.go +++ b/service/controltower/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_UpdateEnabledBaseline.go b/service/controltower/api_op_UpdateEnabledBaseline.go index f469384d64c..b3370146e38 100644 --- a/service/controltower/api_op_UpdateEnabledBaseline.go +++ b/service/controltower/api_op_UpdateEnabledBaseline.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateEnabledBaselineMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnabledBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_UpdateEnabledControl.go b/service/controltower/api_op_UpdateEnabledControl.go index 5c1eae580c7..4db43f02bf3 100644 --- a/service/controltower/api_op_UpdateEnabledControl.go +++ b/service/controltower/api_op_UpdateEnabledControl.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateEnabledControlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnabledControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/controltower/api_op_UpdateLandingZone.go b/service/controltower/api_op_UpdateLandingZone.go index 834e35c1448..bd375510bb2 100644 --- a/service/controltower/api_op_UpdateLandingZone.go +++ b/service/controltower/api_op_UpdateLandingZone.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateLandingZoneMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLandingZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/costandusagereportservice/api_client.go b/service/costandusagereportservice/api_client.go index c2cd1df098f..eb2009f1caf 100644 --- a/service/costandusagereportservice/api_client.go +++ b/service/costandusagereportservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/costandusagereportservice/api_op_DeleteReportDefinition.go b/service/costandusagereportservice/api_op_DeleteReportDefinition.go index 508cb8ebea3..674c876fb3a 100644 --- a/service/costandusagereportservice/api_op_DeleteReportDefinition.go +++ b/service/costandusagereportservice/api_op_DeleteReportDefinition.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteReportDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costandusagereportservice/api_op_DescribeReportDefinitions.go b/service/costandusagereportservice/api_op_DescribeReportDefinitions.go index df112f44794..d00a7bc1b14 100644 --- a/service/costandusagereportservice/api_op_DescribeReportDefinitions.go +++ b/service/costandusagereportservice/api_op_DescribeReportDefinitions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeReportDefinitionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReportDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribeReportDefinitionsMiddlewares(stack *middlew return nil } -// DescribeReportDefinitionsAPIClient is a client that implements the -// DescribeReportDefinitions operation. -type DescribeReportDefinitionsAPIClient interface { - DescribeReportDefinitions(context.Context, *DescribeReportDefinitionsInput, ...func(*Options)) (*DescribeReportDefinitionsOutput, error) -} - -var _ DescribeReportDefinitionsAPIClient = (*Client)(nil) - // DescribeReportDefinitionsPaginatorOptions is the paginator options for // DescribeReportDefinitions type DescribeReportDefinitionsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *DescribeReportDefinitionsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReportDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *DescribeReportDefinitionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeReportDefinitionsAPIClient is a client that implements the +// DescribeReportDefinitions operation. +type DescribeReportDefinitionsAPIClient interface { + DescribeReportDefinitions(context.Context, *DescribeReportDefinitionsInput, ...func(*Options)) (*DescribeReportDefinitionsOutput, error) +} + +var _ DescribeReportDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReportDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costandusagereportservice/api_op_ListTagsForResource.go b/service/costandusagereportservice/api_op_ListTagsForResource.go index 52ea98deb8f..b4bde1b7bcf 100644 --- a/service/costandusagereportservice/api_op_ListTagsForResource.go +++ b/service/costandusagereportservice/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/costandusagereportservice/api_op_ModifyReportDefinition.go b/service/costandusagereportservice/api_op_ModifyReportDefinition.go index b98938f6c4c..27074bd960d 100644 --- a/service/costandusagereportservice/api_op_ModifyReportDefinition.go +++ b/service/costandusagereportservice/api_op_ModifyReportDefinition.go @@ -110,6 +110,9 @@ func (c *Client) addOperationModifyReportDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costandusagereportservice/api_op_PutReportDefinition.go b/service/costandusagereportservice/api_op_PutReportDefinition.go index 6c4b8417a25..8d2e7a36322 100644 --- a/service/costandusagereportservice/api_op_PutReportDefinition.go +++ b/service/costandusagereportservice/api_op_PutReportDefinition.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutReportDefinitionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutReportDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costandusagereportservice/api_op_TagResource.go b/service/costandusagereportservice/api_op_TagResource.go index b7248bfda03..09803e8218b 100644 --- a/service/costandusagereportservice/api_op_TagResource.go +++ b/service/costandusagereportservice/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/costandusagereportservice/api_op_UntagResource.go b/service/costandusagereportservice/api_op_UntagResource.go index 36dadab71a8..d38103918bc 100644 --- a/service/costandusagereportservice/api_op_UntagResource.go +++ b/service/costandusagereportservice/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_client.go b/service/costexplorer/api_client.go index c033dc228ba..d1c13e9ce3c 100644 --- a/service/costexplorer/api_client.go +++ b/service/costexplorer/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/costexplorer/api_op_CreateAnomalyMonitor.go b/service/costexplorer/api_op_CreateAnomalyMonitor.go index 9fed9ab667f..304ec716b56 100644 --- a/service/costexplorer/api_op_CreateAnomalyMonitor.go +++ b/service/costexplorer/api_op_CreateAnomalyMonitor.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateAnomalyMonitorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAnomalyMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_CreateAnomalySubscription.go b/service/costexplorer/api_op_CreateAnomalySubscription.go index 39823604e87..e95680f7915 100644 --- a/service/costexplorer/api_op_CreateAnomalySubscription.go +++ b/service/costexplorer/api_op_CreateAnomalySubscription.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateAnomalySubscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAnomalySubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_CreateCostCategoryDefinition.go b/service/costexplorer/api_op_CreateCostCategoryDefinition.go index 1851d783f2d..3c1c0ad0697 100644 --- a/service/costexplorer/api_op_CreateCostCategoryDefinition.go +++ b/service/costexplorer/api_op_CreateCostCategoryDefinition.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateCostCategoryDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCostCategoryDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_DeleteAnomalyMonitor.go b/service/costexplorer/api_op_DeleteAnomalyMonitor.go index 4b53c5464ac..8580a127847 100644 --- a/service/costexplorer/api_op_DeleteAnomalyMonitor.go +++ b/service/costexplorer/api_op_DeleteAnomalyMonitor.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAnomalyMonitorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnomalyMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_DeleteAnomalySubscription.go b/service/costexplorer/api_op_DeleteAnomalySubscription.go index 8fc771bf4d0..6d8926c5499 100644 --- a/service/costexplorer/api_op_DeleteAnomalySubscription.go +++ b/service/costexplorer/api_op_DeleteAnomalySubscription.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAnomalySubscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnomalySubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_DeleteCostCategoryDefinition.go b/service/costexplorer/api_op_DeleteCostCategoryDefinition.go index 64f2d22e6a9..83b5470f777 100644 --- a/service/costexplorer/api_op_DeleteCostCategoryDefinition.go +++ b/service/costexplorer/api_op_DeleteCostCategoryDefinition.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteCostCategoryDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCostCategoryDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_DescribeCostCategoryDefinition.go b/service/costexplorer/api_op_DescribeCostCategoryDefinition.go index 1feb49508b1..cdb3d5c38f7 100644 --- a/service/costexplorer/api_op_DescribeCostCategoryDefinition.go +++ b/service/costexplorer/api_op_DescribeCostCategoryDefinition.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeCostCategoryDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCostCategoryDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetAnomalies.go b/service/costexplorer/api_op_GetAnomalies.go index b3c5961bda7..0b99db2e765 100644 --- a/service/costexplorer/api_op_GetAnomalies.go +++ b/service/costexplorer/api_op_GetAnomalies.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetAnomaliesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAnomaliesValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetAnomalyMonitors.go b/service/costexplorer/api_op_GetAnomalyMonitors.go index d0026427b77..af951300424 100644 --- a/service/costexplorer/api_op_GetAnomalyMonitors.go +++ b/service/costexplorer/api_op_GetAnomalyMonitors.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetAnomalyMonitorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAnomalyMonitors(options.Region), middleware.Before); err != nil { return err } diff --git a/service/costexplorer/api_op_GetAnomalySubscriptions.go b/service/costexplorer/api_op_GetAnomalySubscriptions.go index b21a76ae642..11a39e06337 100644 --- a/service/costexplorer/api_op_GetAnomalySubscriptions.go +++ b/service/costexplorer/api_op_GetAnomalySubscriptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetAnomalySubscriptionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAnomalySubscriptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/costexplorer/api_op_GetApproximateUsageRecords.go b/service/costexplorer/api_op_GetApproximateUsageRecords.go index 986a1453686..c93b13e8921 100644 --- a/service/costexplorer/api_op_GetApproximateUsageRecords.go +++ b/service/costexplorer/api_op_GetApproximateUsageRecords.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetApproximateUsageRecordsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApproximateUsageRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetCostAndUsage.go b/service/costexplorer/api_op_GetCostAndUsage.go index a8224cd453b..2d96676825b 100644 --- a/service/costexplorer/api_op_GetCostAndUsage.go +++ b/service/costexplorer/api_op_GetCostAndUsage.go @@ -189,6 +189,9 @@ func (c *Client) addOperationGetCostAndUsageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCostAndUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetCostAndUsageWithResources.go b/service/costexplorer/api_op_GetCostAndUsageWithResources.go index bc7324d9bfe..0599eba0047 100644 --- a/service/costexplorer/api_op_GetCostAndUsageWithResources.go +++ b/service/costexplorer/api_op_GetCostAndUsageWithResources.go @@ -194,6 +194,9 @@ func (c *Client) addOperationGetCostAndUsageWithResourcesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCostAndUsageWithResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetCostCategories.go b/service/costexplorer/api_op_GetCostCategories.go index 157470724f8..f0577c84903 100644 --- a/service/costexplorer/api_op_GetCostCategories.go +++ b/service/costexplorer/api_op_GetCostCategories.go @@ -259,6 +259,9 @@ func (c *Client) addOperationGetCostCategoriesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCostCategoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetCostForecast.go b/service/costexplorer/api_op_GetCostForecast.go index 9bb68a331bc..2ec64094593 100644 --- a/service/costexplorer/api_op_GetCostForecast.go +++ b/service/costexplorer/api_op_GetCostForecast.go @@ -197,6 +197,9 @@ func (c *Client) addOperationGetCostForecastMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCostForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetDimensionValues.go b/service/costexplorer/api_op_GetDimensionValues.go index 0f3cda7f9b2..310918e8182 100644 --- a/service/costexplorer/api_op_GetDimensionValues.go +++ b/service/costexplorer/api_op_GetDimensionValues.go @@ -481,6 +481,9 @@ func (c *Client) addOperationGetDimensionValuesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDimensionValuesValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetReservationCoverage.go b/service/costexplorer/api_op_GetReservationCoverage.go index 54327dcdd77..6409722642a 100644 --- a/service/costexplorer/api_op_GetReservationCoverage.go +++ b/service/costexplorer/api_op_GetReservationCoverage.go @@ -273,6 +273,9 @@ func (c *Client) addOperationGetReservationCoverageMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReservationCoverageValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go b/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go index 06d3b1cd326..1383ed1dd55 100644 --- a/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go +++ b/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go @@ -240,6 +240,9 @@ func (c *Client) addOperationGetReservationPurchaseRecommendationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReservationPurchaseRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetReservationUtilization.go b/service/costexplorer/api_op_GetReservationUtilization.go index 7151d4fefe4..2d262e098d2 100644 --- a/service/costexplorer/api_op_GetReservationUtilization.go +++ b/service/costexplorer/api_op_GetReservationUtilization.go @@ -219,6 +219,9 @@ func (c *Client) addOperationGetReservationUtilizationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReservationUtilizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetRightsizingRecommendation.go b/service/costexplorer/api_op_GetRightsizingRecommendation.go index e5a0271e212..c68c52ca47c 100644 --- a/service/costexplorer/api_op_GetRightsizingRecommendation.go +++ b/service/costexplorer/api_op_GetRightsizingRecommendation.go @@ -222,6 +222,9 @@ func (c *Client) addOperationGetRightsizingRecommendationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRightsizingRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go b/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go index c7e90d270cf..c6d59af2b51 100644 --- a/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go +++ b/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetSavingsPlanPurchaseRecommendationDetailsMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSavingsPlanPurchaseRecommendationDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetSavingsPlansCoverage.go b/service/costexplorer/api_op_GetSavingsPlansCoverage.go index 0a6064a228f..b5212bb9d48 100644 --- a/service/costexplorer/api_op_GetSavingsPlansCoverage.go +++ b/service/costexplorer/api_op_GetSavingsPlansCoverage.go @@ -194,6 +194,9 @@ func (c *Client) addOperationGetSavingsPlansCoverageMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSavingsPlansCoverageValidationMiddleware(stack); err != nil { return err } @@ -218,14 +221,6 @@ func (c *Client) addOperationGetSavingsPlansCoverageMiddlewares(stack *middlewar return nil } -// GetSavingsPlansCoverageAPIClient is a client that implements the -// GetSavingsPlansCoverage operation. -type GetSavingsPlansCoverageAPIClient interface { - GetSavingsPlansCoverage(context.Context, *GetSavingsPlansCoverageInput, ...func(*Options)) (*GetSavingsPlansCoverageOutput, error) -} - -var _ GetSavingsPlansCoverageAPIClient = (*Client)(nil) - // GetSavingsPlansCoveragePaginatorOptions is the paginator options for // GetSavingsPlansCoverage type GetSavingsPlansCoveragePaginatorOptions struct { @@ -292,6 +287,9 @@ func (p *GetSavingsPlansCoveragePaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSavingsPlansCoverage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -311,6 +309,14 @@ func (p *GetSavingsPlansCoveragePaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetSavingsPlansCoverageAPIClient is a client that implements the +// GetSavingsPlansCoverage operation. +type GetSavingsPlansCoverageAPIClient interface { + GetSavingsPlansCoverage(context.Context, *GetSavingsPlansCoverageInput, ...func(*Options)) (*GetSavingsPlansCoverageOutput, error) +} + +var _ GetSavingsPlansCoverageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSavingsPlansCoverage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costexplorer/api_op_GetSavingsPlansPurchaseRecommendation.go b/service/costexplorer/api_op_GetSavingsPlansPurchaseRecommendation.go index 53ead156ea1..e35789e0251 100644 --- a/service/costexplorer/api_op_GetSavingsPlansPurchaseRecommendation.go +++ b/service/costexplorer/api_op_GetSavingsPlansPurchaseRecommendation.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetSavingsPlansPurchaseRecommendationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSavingsPlansPurchaseRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetSavingsPlansUtilization.go b/service/costexplorer/api_op_GetSavingsPlansUtilization.go index 7b0f0be0967..40ee253b4b6 100644 --- a/service/costexplorer/api_op_GetSavingsPlansUtilization.go +++ b/service/costexplorer/api_op_GetSavingsPlansUtilization.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetSavingsPlansUtilizationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSavingsPlansUtilizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go b/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go index da621de6972..0731933ce75 100644 --- a/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go +++ b/service/costexplorer/api_op_GetSavingsPlansUtilizationDetails.go @@ -184,6 +184,9 @@ func (c *Client) addOperationGetSavingsPlansUtilizationDetailsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSavingsPlansUtilizationDetailsValidationMiddleware(stack); err != nil { return err } @@ -208,14 +211,6 @@ func (c *Client) addOperationGetSavingsPlansUtilizationDetailsMiddlewares(stack return nil } -// GetSavingsPlansUtilizationDetailsAPIClient is a client that implements the -// GetSavingsPlansUtilizationDetails operation. -type GetSavingsPlansUtilizationDetailsAPIClient interface { - GetSavingsPlansUtilizationDetails(context.Context, *GetSavingsPlansUtilizationDetailsInput, ...func(*Options)) (*GetSavingsPlansUtilizationDetailsOutput, error) -} - -var _ GetSavingsPlansUtilizationDetailsAPIClient = (*Client)(nil) - // GetSavingsPlansUtilizationDetailsPaginatorOptions is the paginator options for // GetSavingsPlansUtilizationDetails type GetSavingsPlansUtilizationDetailsPaginatorOptions struct { @@ -283,6 +278,9 @@ func (p *GetSavingsPlansUtilizationDetailsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSavingsPlansUtilizationDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -302,6 +300,14 @@ func (p *GetSavingsPlansUtilizationDetailsPaginator) NextPage(ctx context.Contex return result, nil } +// GetSavingsPlansUtilizationDetailsAPIClient is a client that implements the +// GetSavingsPlansUtilizationDetails operation. +type GetSavingsPlansUtilizationDetailsAPIClient interface { + GetSavingsPlansUtilizationDetails(context.Context, *GetSavingsPlansUtilizationDetailsInput, ...func(*Options)) (*GetSavingsPlansUtilizationDetailsOutput, error) +} + +var _ GetSavingsPlansUtilizationDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSavingsPlansUtilizationDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costexplorer/api_op_GetTags.go b/service/costexplorer/api_op_GetTags.go index 40ff871d3a9..63c13cf1fbe 100644 --- a/service/costexplorer/api_op_GetTags.go +++ b/service/costexplorer/api_op_GetTags.go @@ -246,6 +246,9 @@ func (c *Client) addOperationGetTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_GetUsageForecast.go b/service/costexplorer/api_op_GetUsageForecast.go index 427de68ae60..0eb1ed24eba 100644 --- a/service/costexplorer/api_op_GetUsageForecast.go +++ b/service/costexplorer/api_op_GetUsageForecast.go @@ -192,6 +192,9 @@ func (c *Client) addOperationGetUsageForecastMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsageForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_ListCostAllocationTagBackfillHistory.go b/service/costexplorer/api_op_ListCostAllocationTagBackfillHistory.go index c7ef40c4908..d90d99ce6ff 100644 --- a/service/costexplorer/api_op_ListCostAllocationTagBackfillHistory.go +++ b/service/costexplorer/api_op_ListCostAllocationTagBackfillHistory.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListCostAllocationTagBackfillHistoryMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCostAllocationTagBackfillHistory(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListCostAllocationTagBackfillHistoryMiddlewares(sta return nil } -// ListCostAllocationTagBackfillHistoryAPIClient is a client that implements the -// ListCostAllocationTagBackfillHistory operation. -type ListCostAllocationTagBackfillHistoryAPIClient interface { - ListCostAllocationTagBackfillHistory(context.Context, *ListCostAllocationTagBackfillHistoryInput, ...func(*Options)) (*ListCostAllocationTagBackfillHistoryOutput, error) -} - -var _ ListCostAllocationTagBackfillHistoryAPIClient = (*Client)(nil) - // ListCostAllocationTagBackfillHistoryPaginatorOptions is the paginator options // for ListCostAllocationTagBackfillHistory type ListCostAllocationTagBackfillHistoryPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListCostAllocationTagBackfillHistoryPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCostAllocationTagBackfillHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListCostAllocationTagBackfillHistoryPaginator) NextPage(ctx context.Con return result, nil } +// ListCostAllocationTagBackfillHistoryAPIClient is a client that implements the +// ListCostAllocationTagBackfillHistory operation. +type ListCostAllocationTagBackfillHistoryAPIClient interface { + ListCostAllocationTagBackfillHistory(context.Context, *ListCostAllocationTagBackfillHistoryInput, ...func(*Options)) (*ListCostAllocationTagBackfillHistoryOutput, error) +} + +var _ ListCostAllocationTagBackfillHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCostAllocationTagBackfillHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costexplorer/api_op_ListCostAllocationTags.go b/service/costexplorer/api_op_ListCostAllocationTags.go index f6eb7771816..168ca30276f 100644 --- a/service/costexplorer/api_op_ListCostAllocationTags.go +++ b/service/costexplorer/api_op_ListCostAllocationTags.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListCostAllocationTagsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCostAllocationTags(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListCostAllocationTagsMiddlewares(stack *middleware return nil } -// ListCostAllocationTagsAPIClient is a client that implements the -// ListCostAllocationTags operation. -type ListCostAllocationTagsAPIClient interface { - ListCostAllocationTags(context.Context, *ListCostAllocationTagsInput, ...func(*Options)) (*ListCostAllocationTagsOutput, error) -} - -var _ ListCostAllocationTagsAPIClient = (*Client)(nil) - // ListCostAllocationTagsPaginatorOptions is the paginator options for // ListCostAllocationTags type ListCostAllocationTagsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListCostAllocationTagsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCostAllocationTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListCostAllocationTagsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListCostAllocationTagsAPIClient is a client that implements the +// ListCostAllocationTags operation. +type ListCostAllocationTagsAPIClient interface { + ListCostAllocationTags(context.Context, *ListCostAllocationTagsInput, ...func(*Options)) (*ListCostAllocationTagsOutput, error) +} + +var _ ListCostAllocationTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCostAllocationTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costexplorer/api_op_ListCostCategoryDefinitions.go b/service/costexplorer/api_op_ListCostCategoryDefinitions.go index 76590750f84..eab71e3aaf6 100644 --- a/service/costexplorer/api_op_ListCostCategoryDefinitions.go +++ b/service/costexplorer/api_op_ListCostCategoryDefinitions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCostCategoryDefinitionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCostCategoryDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCostCategoryDefinitionsMiddlewares(stack *middl return nil } -// ListCostCategoryDefinitionsAPIClient is a client that implements the -// ListCostCategoryDefinitions operation. -type ListCostCategoryDefinitionsAPIClient interface { - ListCostCategoryDefinitions(context.Context, *ListCostCategoryDefinitionsInput, ...func(*Options)) (*ListCostCategoryDefinitionsOutput, error) -} - -var _ ListCostCategoryDefinitionsAPIClient = (*Client)(nil) - // ListCostCategoryDefinitionsPaginatorOptions is the paginator options for // ListCostCategoryDefinitions type ListCostCategoryDefinitionsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListCostCategoryDefinitionsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCostCategoryDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListCostCategoryDefinitionsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListCostCategoryDefinitionsAPIClient is a client that implements the +// ListCostCategoryDefinitions operation. +type ListCostCategoryDefinitionsAPIClient interface { + ListCostCategoryDefinitions(context.Context, *ListCostCategoryDefinitionsInput, ...func(*Options)) (*ListCostCategoryDefinitionsOutput, error) +} + +var _ ListCostCategoryDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCostCategoryDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costexplorer/api_op_ListSavingsPlansPurchaseRecommendationGeneration.go b/service/costexplorer/api_op_ListSavingsPlansPurchaseRecommendationGeneration.go index 2577cb2a762..262754d4d0d 100644 --- a/service/costexplorer/api_op_ListSavingsPlansPurchaseRecommendationGeneration.go +++ b/service/costexplorer/api_op_ListSavingsPlansPurchaseRecommendationGeneration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListSavingsPlansPurchaseRecommendationGenerationMid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSavingsPlansPurchaseRecommendationGeneration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/costexplorer/api_op_ListTagsForResource.go b/service/costexplorer/api_op_ListTagsForResource.go index 3cf05268675..79dc60e507c 100644 --- a/service/costexplorer/api_op_ListTagsForResource.go +++ b/service/costexplorer/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_ProvideAnomalyFeedback.go b/service/costexplorer/api_op_ProvideAnomalyFeedback.go index a6b9317e629..dd3cf3445d5 100644 --- a/service/costexplorer/api_op_ProvideAnomalyFeedback.go +++ b/service/costexplorer/api_op_ProvideAnomalyFeedback.go @@ -114,6 +114,9 @@ func (c *Client) addOperationProvideAnomalyFeedbackMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvideAnomalyFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_StartCostAllocationTagBackfill.go b/service/costexplorer/api_op_StartCostAllocationTagBackfill.go index 6e1c3249de2..621dea14b5f 100644 --- a/service/costexplorer/api_op_StartCostAllocationTagBackfill.go +++ b/service/costexplorer/api_op_StartCostAllocationTagBackfill.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartCostAllocationTagBackfillMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCostAllocationTagBackfillValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_StartSavingsPlansPurchaseRecommendationGeneration.go b/service/costexplorer/api_op_StartSavingsPlansPurchaseRecommendationGeneration.go index 91ffd8b69b9..9eb80483a9f 100644 --- a/service/costexplorer/api_op_StartSavingsPlansPurchaseRecommendationGeneration.go +++ b/service/costexplorer/api_op_StartSavingsPlansPurchaseRecommendationGeneration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStartSavingsPlansPurchaseRecommendationGenerationMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartSavingsPlansPurchaseRecommendationGeneration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/costexplorer/api_op_TagResource.go b/service/costexplorer/api_op_TagResource.go index dea0f7ac738..e7fd781c1f2 100644 --- a/service/costexplorer/api_op_TagResource.go +++ b/service/costexplorer/api_op_TagResource.go @@ -140,6 +140,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_UntagResource.go b/service/costexplorer/api_op_UntagResource.go index 64058708c93..f9762407ea4 100644 --- a/service/costexplorer/api_op_UntagResource.go +++ b/service/costexplorer/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_UpdateAnomalyMonitor.go b/service/costexplorer/api_op_UpdateAnomalyMonitor.go index b348874c288..4e5082f7973 100644 --- a/service/costexplorer/api_op_UpdateAnomalyMonitor.go +++ b/service/costexplorer/api_op_UpdateAnomalyMonitor.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateAnomalyMonitorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnomalyMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_UpdateAnomalySubscription.go b/service/costexplorer/api_op_UpdateAnomalySubscription.go index f44a4faf67b..3482f6b8ce2 100644 --- a/service/costexplorer/api_op_UpdateAnomalySubscription.go +++ b/service/costexplorer/api_op_UpdateAnomalySubscription.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateAnomalySubscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnomalySubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_UpdateCostAllocationTagsStatus.go b/service/costexplorer/api_op_UpdateCostAllocationTagsStatus.go index d10b0974649..635d0ccccd1 100644 --- a/service/costexplorer/api_op_UpdateCostAllocationTagsStatus.go +++ b/service/costexplorer/api_op_UpdateCostAllocationTagsStatus.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateCostAllocationTagsStatusMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCostAllocationTagsStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/costexplorer/api_op_UpdateCostCategoryDefinition.go b/service/costexplorer/api_op_UpdateCostCategoryDefinition.go index ffbc01054a2..2350f525e5d 100644 --- a/service/costexplorer/api_op_UpdateCostCategoryDefinition.go +++ b/service/costexplorer/api_op_UpdateCostCategoryDefinition.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateCostCategoryDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCostCategoryDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/costoptimizationhub/api_client.go b/service/costoptimizationhub/api_client.go index 8a474a4cc9d..c9737d5e979 100644 --- a/service/costoptimizationhub/api_client.go +++ b/service/costoptimizationhub/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/costoptimizationhub/api_op_GetPreferences.go b/service/costoptimizationhub/api_op_GetPreferences.go index 9b8de18099d..5ecbb76ec86 100644 --- a/service/costoptimizationhub/api_op_GetPreferences.go +++ b/service/costoptimizationhub/api_op_GetPreferences.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetPreferencesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPreferences(options.Region), middleware.Before); err != nil { return err } diff --git a/service/costoptimizationhub/api_op_GetRecommendation.go b/service/costoptimizationhub/api_op_GetRecommendation.go index 7fe52935256..50b1039d6fe 100644 --- a/service/costoptimizationhub/api_op_GetRecommendation.go +++ b/service/costoptimizationhub/api_op_GetRecommendation.go @@ -181,6 +181,9 @@ func (c *Client) addOperationGetRecommendationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/costoptimizationhub/api_op_ListEnrollmentStatuses.go b/service/costoptimizationhub/api_op_ListEnrollmentStatuses.go index 9156957b28d..4383d5d27b9 100644 --- a/service/costoptimizationhub/api_op_ListEnrollmentStatuses.go +++ b/service/costoptimizationhub/api_op_ListEnrollmentStatuses.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListEnrollmentStatusesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnrollmentStatuses(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListEnrollmentStatusesMiddlewares(stack *middleware return nil } -// ListEnrollmentStatusesAPIClient is a client that implements the -// ListEnrollmentStatuses operation. -type ListEnrollmentStatusesAPIClient interface { - ListEnrollmentStatuses(context.Context, *ListEnrollmentStatusesInput, ...func(*Options)) (*ListEnrollmentStatusesOutput, error) -} - -var _ ListEnrollmentStatusesAPIClient = (*Client)(nil) - // ListEnrollmentStatusesPaginatorOptions is the paginator options for // ListEnrollmentStatuses type ListEnrollmentStatusesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListEnrollmentStatusesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnrollmentStatuses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListEnrollmentStatusesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListEnrollmentStatusesAPIClient is a client that implements the +// ListEnrollmentStatuses operation. +type ListEnrollmentStatusesAPIClient interface { + ListEnrollmentStatuses(context.Context, *ListEnrollmentStatusesInput, ...func(*Options)) (*ListEnrollmentStatusesOutput, error) +} + +var _ ListEnrollmentStatusesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnrollmentStatuses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costoptimizationhub/api_op_ListRecommendationSummaries.go b/service/costoptimizationhub/api_op_ListRecommendationSummaries.go index 28e3096072a..3de42af7a26 100644 --- a/service/costoptimizationhub/api_op_ListRecommendationSummaries.go +++ b/service/costoptimizationhub/api_op_ListRecommendationSummaries.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRecommendationSummariesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecommendationSummariesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListRecommendationSummariesMiddlewares(stack *middl return nil } -// ListRecommendationSummariesAPIClient is a client that implements the -// ListRecommendationSummaries operation. -type ListRecommendationSummariesAPIClient interface { - ListRecommendationSummaries(context.Context, *ListRecommendationSummariesInput, ...func(*Options)) (*ListRecommendationSummariesOutput, error) -} - -var _ ListRecommendationSummariesAPIClient = (*Client)(nil) - // ListRecommendationSummariesPaginatorOptions is the paginator options for // ListRecommendationSummaries type ListRecommendationSummariesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListRecommendationSummariesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendationSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListRecommendationSummariesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListRecommendationSummariesAPIClient is a client that implements the +// ListRecommendationSummaries operation. +type ListRecommendationSummariesAPIClient interface { + ListRecommendationSummaries(context.Context, *ListRecommendationSummariesInput, ...func(*Options)) (*ListRecommendationSummariesOutput, error) +} + +var _ ListRecommendationSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendationSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costoptimizationhub/api_op_ListRecommendations.go b/service/costoptimizationhub/api_op_ListRecommendations.go index 542a7a51ba9..d10aeb2d202 100644 --- a/service/costoptimizationhub/api_op_ListRecommendations.go +++ b/service/costoptimizationhub/api_op_ListRecommendations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommendations(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St return nil } -// ListRecommendationsAPIClient is a client that implements the -// ListRecommendations operation. -type ListRecommendationsAPIClient interface { - ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) -} - -var _ ListRecommendationsAPIClient = (*Client)(nil) - // ListRecommendationsPaginatorOptions is the paginator options for // ListRecommendations type ListRecommendationsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRecommendationsAPIClient is a client that implements the +// ListRecommendations operation. +type ListRecommendationsAPIClient interface { + ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) +} + +var _ ListRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/costoptimizationhub/api_op_UpdateEnrollmentStatus.go b/service/costoptimizationhub/api_op_UpdateEnrollmentStatus.go index 2cfba8c68fa..604dea1869b 100644 --- a/service/costoptimizationhub/api_op_UpdateEnrollmentStatus.go +++ b/service/costoptimizationhub/api_op_UpdateEnrollmentStatus.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateEnrollmentStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnrollmentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/costoptimizationhub/api_op_UpdatePreferences.go b/service/costoptimizationhub/api_op_UpdatePreferences.go index a1500deb33c..6c51c1eea13 100644 --- a/service/costoptimizationhub/api_op_UpdatePreferences.go +++ b/service/costoptimizationhub/api_op_UpdatePreferences.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdatePreferencesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePreferences(options.Region), middleware.Before); err != nil { return err } diff --git a/service/customerprofiles/api_client.go b/service/customerprofiles/api_client.go index 39563497858..e8c7bd58260 100644 --- a/service/customerprofiles/api_client.go +++ b/service/customerprofiles/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/customerprofiles/api_op_AddProfileKey.go b/service/customerprofiles/api_op_AddProfileKey.go index 4374327af5f..397cb184bcd 100644 --- a/service/customerprofiles/api_op_AddProfileKey.go +++ b/service/customerprofiles/api_op_AddProfileKey.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAddProfileKeyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddProfileKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_CreateCalculatedAttributeDefinition.go b/service/customerprofiles/api_op_CreateCalculatedAttributeDefinition.go index bab2d6f29f3..44aef6094d9 100644 --- a/service/customerprofiles/api_op_CreateCalculatedAttributeDefinition.go +++ b/service/customerprofiles/api_op_CreateCalculatedAttributeDefinition.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateCalculatedAttributeDefinitionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCalculatedAttributeDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_CreateDomain.go b/service/customerprofiles/api_op_CreateDomain.go index b61a8f86bab..f9c8edc2f13 100644 --- a/service/customerprofiles/api_op_CreateDomain.go +++ b/service/customerprofiles/api_op_CreateDomain.go @@ -214,6 +214,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_CreateEventStream.go b/service/customerprofiles/api_op_CreateEventStream.go index 1e250e60047..f731aafa925 100644 --- a/service/customerprofiles/api_op_CreateEventStream.go +++ b/service/customerprofiles/api_op_CreateEventStream.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateEventStreamMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_CreateIntegrationWorkflow.go b/service/customerprofiles/api_op_CreateIntegrationWorkflow.go index e3ea996c617..7058fbb6562 100644 --- a/service/customerprofiles/api_op_CreateIntegrationWorkflow.go +++ b/service/customerprofiles/api_op_CreateIntegrationWorkflow.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateIntegrationWorkflowMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntegrationWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_CreateProfile.go b/service/customerprofiles/api_op_CreateProfile.go index d390397df29..c073d32c49d 100644 --- a/service/customerprofiles/api_op_CreateProfile.go +++ b/service/customerprofiles/api_op_CreateProfile.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteCalculatedAttributeDefinition.go b/service/customerprofiles/api_op_DeleteCalculatedAttributeDefinition.go index 47c804e0554..716e3cb512e 100644 --- a/service/customerprofiles/api_op_DeleteCalculatedAttributeDefinition.go +++ b/service/customerprofiles/api_op_DeleteCalculatedAttributeDefinition.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteCalculatedAttributeDefinitionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCalculatedAttributeDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteDomain.go b/service/customerprofiles/api_op_DeleteDomain.go index 7102b466b4a..ebb46f278d6 100644 --- a/service/customerprofiles/api_op_DeleteDomain.go +++ b/service/customerprofiles/api_op_DeleteDomain.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteEventStream.go b/service/customerprofiles/api_op_DeleteEventStream.go index b2797c3427c..9e7ce627129 100644 --- a/service/customerprofiles/api_op_DeleteEventStream.go +++ b/service/customerprofiles/api_op_DeleteEventStream.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEventStreamMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteIntegration.go b/service/customerprofiles/api_op_DeleteIntegration.go index 3312121085a..f2dfc0a51cf 100644 --- a/service/customerprofiles/api_op_DeleteIntegration.go +++ b/service/customerprofiles/api_op_DeleteIntegration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteProfile.go b/service/customerprofiles/api_op_DeleteProfile.go index 5f77d500f0b..8f56b521bff 100644 --- a/service/customerprofiles/api_op_DeleteProfile.go +++ b/service/customerprofiles/api_op_DeleteProfile.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteProfileKey.go b/service/customerprofiles/api_op_DeleteProfileKey.go index 5c1cd7fdac1..4a61a031e8e 100644 --- a/service/customerprofiles/api_op_DeleteProfileKey.go +++ b/service/customerprofiles/api_op_DeleteProfileKey.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteProfileKeyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteProfileObject.go b/service/customerprofiles/api_op_DeleteProfileObject.go index fcea84315b5..24ba5a58acf 100644 --- a/service/customerprofiles/api_op_DeleteProfileObject.go +++ b/service/customerprofiles/api_op_DeleteProfileObject.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteProfileObjectMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteProfileObjectType.go b/service/customerprofiles/api_op_DeleteProfileObjectType.go index 543e7371382..994688a738e 100644 --- a/service/customerprofiles/api_op_DeleteProfileObjectType.go +++ b/service/customerprofiles/api_op_DeleteProfileObjectType.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteProfileObjectTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileObjectTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DeleteWorkflow.go b/service/customerprofiles/api_op_DeleteWorkflow.go index 101fc31d91d..50b74ee32d1 100644 --- a/service/customerprofiles/api_op_DeleteWorkflow.go +++ b/service/customerprofiles/api_op_DeleteWorkflow.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_DetectProfileObjectType.go b/service/customerprofiles/api_op_DetectProfileObjectType.go index 9a21a5d9e8e..ae1048aad8b 100644 --- a/service/customerprofiles/api_op_DetectProfileObjectType.go +++ b/service/customerprofiles/api_op_DetectProfileObjectType.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDetectProfileObjectTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectProfileObjectTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetAutoMergingPreview.go b/service/customerprofiles/api_op_GetAutoMergingPreview.go index 88f8e72c7bc..6b36428b8e4 100644 --- a/service/customerprofiles/api_op_GetAutoMergingPreview.go +++ b/service/customerprofiles/api_op_GetAutoMergingPreview.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetAutoMergingPreviewMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAutoMergingPreviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetCalculatedAttributeDefinition.go b/service/customerprofiles/api_op_GetCalculatedAttributeDefinition.go index c5cda4c3f4b..24a64bc0454 100644 --- a/service/customerprofiles/api_op_GetCalculatedAttributeDefinition.go +++ b/service/customerprofiles/api_op_GetCalculatedAttributeDefinition.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetCalculatedAttributeDefinitionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCalculatedAttributeDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetCalculatedAttributeForProfile.go b/service/customerprofiles/api_op_GetCalculatedAttributeForProfile.go index ce3d075b723..dd5675d9344 100644 --- a/service/customerprofiles/api_op_GetCalculatedAttributeForProfile.go +++ b/service/customerprofiles/api_op_GetCalculatedAttributeForProfile.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetCalculatedAttributeForProfileMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCalculatedAttributeForProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetDomain.go b/service/customerprofiles/api_op_GetDomain.go index 2c1793d2514..8bd6143c511 100644 --- a/service/customerprofiles/api_op_GetDomain.go +++ b/service/customerprofiles/api_op_GetDomain.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetDomainMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetEventStream.go b/service/customerprofiles/api_op_GetEventStream.go index 3e9785b8196..87ade05f607 100644 --- a/service/customerprofiles/api_op_GetEventStream.go +++ b/service/customerprofiles/api_op_GetEventStream.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetEventStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetIdentityResolutionJob.go b/service/customerprofiles/api_op_GetIdentityResolutionJob.go index 4cc491d05a5..1230e82ea48 100644 --- a/service/customerprofiles/api_op_GetIdentityResolutionJob.go +++ b/service/customerprofiles/api_op_GetIdentityResolutionJob.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetIdentityResolutionJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityResolutionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetIntegration.go b/service/customerprofiles/api_op_GetIntegration.go index 84a37ee8eaa..32b6aa4d724 100644 --- a/service/customerprofiles/api_op_GetIntegration.go +++ b/service/customerprofiles/api_op_GetIntegration.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetIntegrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetMatches.go b/service/customerprofiles/api_op_GetMatches.go index 8a8417f031e..1d3a2f770dc 100644 --- a/service/customerprofiles/api_op_GetMatches.go +++ b/service/customerprofiles/api_op_GetMatches.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetMatchesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMatchesValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetProfileObjectType.go b/service/customerprofiles/api_op_GetProfileObjectType.go index fde0c579b57..e6093398715 100644 --- a/service/customerprofiles/api_op_GetProfileObjectType.go +++ b/service/customerprofiles/api_op_GetProfileObjectType.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetProfileObjectTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileObjectTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go b/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go index 361ae9df1ff..b0d6082126f 100644 --- a/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go +++ b/service/customerprofiles/api_op_GetProfileObjectTypeTemplate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetProfileObjectTypeTemplateMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileObjectTypeTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetSimilarProfiles.go b/service/customerprofiles/api_op_GetSimilarProfiles.go index 77ee8d5d4c7..7526e716c08 100644 --- a/service/customerprofiles/api_op_GetSimilarProfiles.go +++ b/service/customerprofiles/api_op_GetSimilarProfiles.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetSimilarProfilesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSimilarProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetWorkflow.go b/service/customerprofiles/api_op_GetWorkflow.go index d0e6adccb34..ea7c51ccef5 100644 --- a/service/customerprofiles/api_op_GetWorkflow.go +++ b/service/customerprofiles/api_op_GetWorkflow.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_GetWorkflowSteps.go b/service/customerprofiles/api_op_GetWorkflowSteps.go index 79946a629c7..0f8ae21d139 100644 --- a/service/customerprofiles/api_op_GetWorkflowSteps.go +++ b/service/customerprofiles/api_op_GetWorkflowSteps.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetWorkflowStepsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowStepsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListAccountIntegrations.go b/service/customerprofiles/api_op_ListAccountIntegrations.go index e0afa87ae70..fafb6c34da0 100644 --- a/service/customerprofiles/api_op_ListAccountIntegrations.go +++ b/service/customerprofiles/api_op_ListAccountIntegrations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAccountIntegrationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountIntegrationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListCalculatedAttributeDefinitions.go b/service/customerprofiles/api_op_ListCalculatedAttributeDefinitions.go index 04e9bead96b..904f04e7035 100644 --- a/service/customerprofiles/api_op_ListCalculatedAttributeDefinitions.go +++ b/service/customerprofiles/api_op_ListCalculatedAttributeDefinitions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCalculatedAttributeDefinitionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCalculatedAttributeDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListCalculatedAttributesForProfile.go b/service/customerprofiles/api_op_ListCalculatedAttributesForProfile.go index b13ccb24d9e..0ca9944311d 100644 --- a/service/customerprofiles/api_op_ListCalculatedAttributesForProfile.go +++ b/service/customerprofiles/api_op_ListCalculatedAttributesForProfile.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCalculatedAttributesForProfileMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCalculatedAttributesForProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListDomains.go b/service/customerprofiles/api_op_ListDomains.go index e3928843e2a..21c326b7aab 100644 --- a/service/customerprofiles/api_op_ListDomains.go +++ b/service/customerprofiles/api_op_ListDomains.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListEventStreams.go b/service/customerprofiles/api_op_ListEventStreams.go index 3773b453a54..77baef76e9e 100644 --- a/service/customerprofiles/api_op_ListEventStreams.go +++ b/service/customerprofiles/api_op_ListEventStreams.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEventStreamsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventStreamsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListEventStreamsMiddlewares(stack *middleware.Stack return nil } -// ListEventStreamsAPIClient is a client that implements the ListEventStreams -// operation. -type ListEventStreamsAPIClient interface { - ListEventStreams(context.Context, *ListEventStreamsInput, ...func(*Options)) (*ListEventStreamsOutput, error) -} - -var _ ListEventStreamsAPIClient = (*Client)(nil) - // ListEventStreamsPaginatorOptions is the paginator options for ListEventStreams type ListEventStreamsPaginatorOptions struct { // The maximum number of objects returned per page. @@ -210,6 +205,9 @@ func (p *ListEventStreamsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListEventStreamsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEventStreamsAPIClient is a client that implements the ListEventStreams +// operation. +type ListEventStreamsAPIClient interface { + ListEventStreams(context.Context, *ListEventStreamsInput, ...func(*Options)) (*ListEventStreamsOutput, error) +} + +var _ ListEventStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/customerprofiles/api_op_ListIdentityResolutionJobs.go b/service/customerprofiles/api_op_ListIdentityResolutionJobs.go index 85cc98ab1ca..d434ca53e77 100644 --- a/service/customerprofiles/api_op_ListIdentityResolutionJobs.go +++ b/service/customerprofiles/api_op_ListIdentityResolutionJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListIdentityResolutionJobsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityResolutionJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListIntegrations.go b/service/customerprofiles/api_op_ListIntegrations.go index 8e9501b3247..c19969345c5 100644 --- a/service/customerprofiles/api_op_ListIntegrations.go +++ b/service/customerprofiles/api_op_ListIntegrations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListIntegrationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIntegrationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListProfileObjectTypeTemplates.go b/service/customerprofiles/api_op_ListProfileObjectTypeTemplates.go index e69005a2b3c..3486ac08e1b 100644 --- a/service/customerprofiles/api_op_ListProfileObjectTypeTemplates.go +++ b/service/customerprofiles/api_op_ListProfileObjectTypeTemplates.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListProfileObjectTypeTemplatesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfileObjectTypeTemplates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListProfileObjectTypes.go b/service/customerprofiles/api_op_ListProfileObjectTypes.go index 0e891f61ee3..ffdbde19eda 100644 --- a/service/customerprofiles/api_op_ListProfileObjectTypes.go +++ b/service/customerprofiles/api_op_ListProfileObjectTypes.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListProfileObjectTypesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProfileObjectTypesValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListProfileObjects.go b/service/customerprofiles/api_op_ListProfileObjects.go index 4882147c952..a1a354e9429 100644 --- a/service/customerprofiles/api_op_ListProfileObjects.go +++ b/service/customerprofiles/api_op_ListProfileObjects.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListProfileObjectsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProfileObjectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListRuleBasedMatches.go b/service/customerprofiles/api_op_ListRuleBasedMatches.go index 2f92f3dfc03..7d5bd6777d2 100644 --- a/service/customerprofiles/api_op_ListRuleBasedMatches.go +++ b/service/customerprofiles/api_op_ListRuleBasedMatches.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRuleBasedMatchesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRuleBasedMatchesValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListTagsForResource.go b/service/customerprofiles/api_op_ListTagsForResource.go index c3bfb51aa7b..54e590597e4 100644 --- a/service/customerprofiles/api_op_ListTagsForResource.go +++ b/service/customerprofiles/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_ListWorkflows.go b/service/customerprofiles/api_op_ListWorkflows.go index be5a8df27aa..671d4f16925 100644 --- a/service/customerprofiles/api_op_ListWorkflows.go +++ b/service/customerprofiles/api_op_ListWorkflows.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowsValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_MergeProfiles.go b/service/customerprofiles/api_op_MergeProfiles.go index c54fe2107cc..a1e72cb1188 100644 --- a/service/customerprofiles/api_op_MergeProfiles.go +++ b/service/customerprofiles/api_op_MergeProfiles.go @@ -151,6 +151,9 @@ func (c *Client) addOperationMergeProfilesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergeProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_PutIntegration.go b/service/customerprofiles/api_op_PutIntegration.go index 4cae31da6f8..2a7b9b9daf1 100644 --- a/service/customerprofiles/api_op_PutIntegration.go +++ b/service/customerprofiles/api_op_PutIntegration.go @@ -173,6 +173,9 @@ func (c *Client) addOperationPutIntegrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_PutProfileObject.go b/service/customerprofiles/api_op_PutProfileObject.go index c0a07a274ff..231057985bd 100644 --- a/service/customerprofiles/api_op_PutProfileObject.go +++ b/service/customerprofiles/api_op_PutProfileObject.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPutProfileObjectMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutProfileObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_PutProfileObjectType.go b/service/customerprofiles/api_op_PutProfileObjectType.go index a57668f65ce..1affdda80d4 100644 --- a/service/customerprofiles/api_op_PutProfileObjectType.go +++ b/service/customerprofiles/api_op_PutProfileObjectType.go @@ -203,6 +203,9 @@ func (c *Client) addOperationPutProfileObjectTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutProfileObjectTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_SearchProfiles.go b/service/customerprofiles/api_op_SearchProfiles.go index ee7d82b79d9..e007a30428f 100644 --- a/service/customerprofiles/api_op_SearchProfiles.go +++ b/service/customerprofiles/api_op_SearchProfiles.go @@ -162,6 +162,9 @@ func (c *Client) addOperationSearchProfilesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_TagResource.go b/service/customerprofiles/api_op_TagResource.go index 42b6be4ec94..6c4f7fcfb92 100644 --- a/service/customerprofiles/api_op_TagResource.go +++ b/service/customerprofiles/api_op_TagResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_UntagResource.go b/service/customerprofiles/api_op_UntagResource.go index 66980fb7afa..aa06a1e7859 100644 --- a/service/customerprofiles/api_op_UntagResource.go +++ b/service/customerprofiles/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_UpdateCalculatedAttributeDefinition.go b/service/customerprofiles/api_op_UpdateCalculatedAttributeDefinition.go index 4a505e70104..59cd90a6908 100644 --- a/service/customerprofiles/api_op_UpdateCalculatedAttributeDefinition.go +++ b/service/customerprofiles/api_op_UpdateCalculatedAttributeDefinition.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateCalculatedAttributeDefinitionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCalculatedAttributeDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_UpdateDomain.go b/service/customerprofiles/api_op_UpdateDomain.go index 6713c7b73a0..66d8d6a699f 100644 --- a/service/customerprofiles/api_op_UpdateDomain.go +++ b/service/customerprofiles/api_op_UpdateDomain.go @@ -213,6 +213,9 @@ func (c *Client) addOperationUpdateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/customerprofiles/api_op_UpdateProfile.go b/service/customerprofiles/api_op_UpdateProfile.go index 36805ce5473..268b4d6ceaf 100644 --- a/service/customerprofiles/api_op_UpdateProfile.go +++ b/service/customerprofiles/api_op_UpdateProfile.go @@ -194,6 +194,9 @@ func (c *Client) addOperationUpdateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_client.go b/service/databasemigrationservice/api_client.go index e72705a058c..602624542ef 100644 --- a/service/databasemigrationservice/api_client.go +++ b/service/databasemigrationservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/databasemigrationservice/api_op_AddTagsToResource.go b/service/databasemigrationservice/api_op_AddTagsToResource.go index 27ae8d757b1..2da6a6864b9 100644 --- a/service/databasemigrationservice/api_op_AddTagsToResource.go +++ b/service/databasemigrationservice/api_op_AddTagsToResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go b/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go index e757c06d98d..afbc918ff5c 100644 --- a/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go +++ b/service/databasemigrationservice/api_op_ApplyPendingMaintenanceAction.go @@ -130,6 +130,9 @@ func (c *Client) addOperationApplyPendingMaintenanceActionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplyPendingMaintenanceActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_BatchStartRecommendations.go b/service/databasemigrationservice/api_op_BatchStartRecommendations.go index 67bb6c9137d..55429867376 100644 --- a/service/databasemigrationservice/api_op_BatchStartRecommendations.go +++ b/service/databasemigrationservice/api_op_BatchStartRecommendations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchStartRecommendationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchStartRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go b/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go index 1e605ad9de3..ec1d90d7b45 100644 --- a/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go +++ b/service/databasemigrationservice/api_op_CancelReplicationTaskAssessmentRun.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCancelReplicationTaskAssessmentRunMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelReplicationTaskAssessmentRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateDataProvider.go b/service/databasemigrationservice/api_op_CreateDataProvider.go index 550dea41071..696c2324152 100644 --- a/service/databasemigrationservice/api_op_CreateDataProvider.go +++ b/service/databasemigrationservice/api_op_CreateDataProvider.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateDataProviderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateEndpoint.go b/service/databasemigrationservice/api_op_CreateEndpoint.go index 196112e4864..bd8e21fdea6 100644 --- a/service/databasemigrationservice/api_op_CreateEndpoint.go +++ b/service/databasemigrationservice/api_op_CreateEndpoint.go @@ -319,6 +319,9 @@ func (c *Client) addOperationCreateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateEventSubscription.go b/service/databasemigrationservice/api_op_CreateEventSubscription.go index 5046c2c8a4d..cbacceea574 100644 --- a/service/databasemigrationservice/api_op_CreateEventSubscription.go +++ b/service/databasemigrationservice/api_op_CreateEventSubscription.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateFleetAdvisorCollector.go b/service/databasemigrationservice/api_op_CreateFleetAdvisorCollector.go index 8d8c16757cb..ac77dee67b6 100644 --- a/service/databasemigrationservice/api_op_CreateFleetAdvisorCollector.go +++ b/service/databasemigrationservice/api_op_CreateFleetAdvisorCollector.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateFleetAdvisorCollectorMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetAdvisorCollectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateInstanceProfile.go b/service/databasemigrationservice/api_op_CreateInstanceProfile.go index 621ba6e7a61..78332883370 100644 --- a/service/databasemigrationservice/api_op_CreateInstanceProfile.go +++ b/service/databasemigrationservice/api_op_CreateInstanceProfile.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceProfile(options.Region), middleware.Before); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateMigrationProject.go b/service/databasemigrationservice/api_op_CreateMigrationProject.go index 67b9a028590..f784e3ae917 100644 --- a/service/databasemigrationservice/api_op_CreateMigrationProject.go +++ b/service/databasemigrationservice/api_op_CreateMigrationProject.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateMigrationProjectMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMigrationProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateReplicationConfig.go b/service/databasemigrationservice/api_op_CreateReplicationConfig.go index d19d72781a7..9d5785bc81c 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationConfig.go +++ b/service/databasemigrationservice/api_op_CreateReplicationConfig.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateReplicationConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateReplicationInstance.go b/service/databasemigrationservice/api_op_CreateReplicationInstance.go index 34e4b85ffd1..65c719e8620 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationInstance.go +++ b/service/databasemigrationservice/api_op_CreateReplicationInstance.go @@ -230,6 +230,9 @@ func (c *Client) addOperationCreateReplicationInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go index a07d823ba8f..ff168766e99 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_CreateReplicationSubnetGroup.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateReplicationSubnetGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_CreateReplicationTask.go b/service/databasemigrationservice/api_op_CreateReplicationTask.go index 24021eff0b0..0416b2c5ec5 100644 --- a/service/databasemigrationservice/api_op_CreateReplicationTask.go +++ b/service/databasemigrationservice/api_op_CreateReplicationTask.go @@ -207,6 +207,9 @@ func (c *Client) addOperationCreateReplicationTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteCertificate.go b/service/databasemigrationservice/api_op_DeleteCertificate.go index 8f69e735d14..0b815067496 100644 --- a/service/databasemigrationservice/api_op_DeleteCertificate.go +++ b/service/databasemigrationservice/api_op_DeleteCertificate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteConnection.go b/service/databasemigrationservice/api_op_DeleteConnection.go index a27a403c4dd..8a024489404 100644 --- a/service/databasemigrationservice/api_op_DeleteConnection.go +++ b/service/databasemigrationservice/api_op_DeleteConnection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteDataProvider.go b/service/databasemigrationservice/api_op_DeleteDataProvider.go index cdca69ee597..daef7c5fec9 100644 --- a/service/databasemigrationservice/api_op_DeleteDataProvider.go +++ b/service/databasemigrationservice/api_op_DeleteDataProvider.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDataProviderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteEndpoint.go b/service/databasemigrationservice/api_op_DeleteEndpoint.go index 1d439e73886..cc89cb63850 100644 --- a/service/databasemigrationservice/api_op_DeleteEndpoint.go +++ b/service/databasemigrationservice/api_op_DeleteEndpoint.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteEventSubscription.go b/service/databasemigrationservice/api_op_DeleteEventSubscription.go index 9cd650eec86..bc4b5fe9918 100644 --- a/service/databasemigrationservice/api_op_DeleteEventSubscription.go +++ b/service/databasemigrationservice/api_op_DeleteEventSubscription.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteFleetAdvisorCollector.go b/service/databasemigrationservice/api_op_DeleteFleetAdvisorCollector.go index 9eea465073b..4fe9bf68378 100644 --- a/service/databasemigrationservice/api_op_DeleteFleetAdvisorCollector.go +++ b/service/databasemigrationservice/api_op_DeleteFleetAdvisorCollector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFleetAdvisorCollectorMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetAdvisorCollectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteFleetAdvisorDatabases.go b/service/databasemigrationservice/api_op_DeleteFleetAdvisorDatabases.go index 89de7fb4d9f..2a7292431c5 100644 --- a/service/databasemigrationservice/api_op_DeleteFleetAdvisorDatabases.go +++ b/service/databasemigrationservice/api_op_DeleteFleetAdvisorDatabases.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteFleetAdvisorDatabasesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetAdvisorDatabasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteInstanceProfile.go b/service/databasemigrationservice/api_op_DeleteInstanceProfile.go index 0b85c5111ff..a4bbb9cc98e 100644 --- a/service/databasemigrationservice/api_op_DeleteInstanceProfile.go +++ b/service/databasemigrationservice/api_op_DeleteInstanceProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteMigrationProject.go b/service/databasemigrationservice/api_op_DeleteMigrationProject.go index 672d5b5fc25..e578980914f 100644 --- a/service/databasemigrationservice/api_op_DeleteMigrationProject.go +++ b/service/databasemigrationservice/api_op_DeleteMigrationProject.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteMigrationProjectMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMigrationProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteReplicationConfig.go b/service/databasemigrationservice/api_op_DeleteReplicationConfig.go index c766a56a101..c90f0e8ec5f 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationConfig.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationConfig.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteReplicationConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteReplicationInstance.go b/service/databasemigrationservice/api_op_DeleteReplicationInstance.go index adbdc713107..e2db1a4a753 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationInstance.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationInstance.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteReplicationInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go index 27d53029d1b..de3fca8c264 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationSubnetGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteReplicationSubnetGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteReplicationTask.go b/service/databasemigrationservice/api_op_DeleteReplicationTask.go index 57d1c4f5f70..49471180c1e 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationTask.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteReplicationTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go b/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go index 0cb7ee17a3a..3b9ba43a57f 100644 --- a/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go +++ b/service/databasemigrationservice/api_op_DeleteReplicationTaskAssessmentRun.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteReplicationTaskAssessmentRunMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationTaskAssessmentRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DescribeAccountAttributes.go b/service/databasemigrationservice/api_op_DescribeAccountAttributes.go index 97c5a86614e..5056c433eed 100644 --- a/service/databasemigrationservice/api_op_DescribeAccountAttributes.go +++ b/service/databasemigrationservice/api_op_DescribeAccountAttributes.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go b/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go index 4f232b5ce4d..686e7713a91 100644 --- a/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeApplicableIndividualAssessments.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeApplicableIndividualAssessmentsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicableIndividualAssessments(options.Region), middleware.Before); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationDescribeApplicableIndividualAssessmentsMiddlewares( return nil } -// DescribeApplicableIndividualAssessmentsAPIClient is a client that implements -// the DescribeApplicableIndividualAssessments operation. -type DescribeApplicableIndividualAssessmentsAPIClient interface { - DescribeApplicableIndividualAssessments(context.Context, *DescribeApplicableIndividualAssessmentsInput, ...func(*Options)) (*DescribeApplicableIndividualAssessmentsOutput, error) -} - -var _ DescribeApplicableIndividualAssessmentsAPIClient = (*Client)(nil) - // DescribeApplicableIndividualAssessmentsPaginatorOptions is the paginator // options for DescribeApplicableIndividualAssessments type DescribeApplicableIndividualAssessmentsPaginatorOptions struct { @@ -260,6 +255,9 @@ func (p *DescribeApplicableIndividualAssessmentsPaginator) NextPage(ctx context. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeApplicableIndividualAssessments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *DescribeApplicableIndividualAssessmentsPaginator) NextPage(ctx context. return result, nil } +// DescribeApplicableIndividualAssessmentsAPIClient is a client that implements +// the DescribeApplicableIndividualAssessments operation. +type DescribeApplicableIndividualAssessmentsAPIClient interface { + DescribeApplicableIndividualAssessments(context.Context, *DescribeApplicableIndividualAssessmentsInput, ...func(*Options)) (*DescribeApplicableIndividualAssessmentsOutput, error) +} + +var _ DescribeApplicableIndividualAssessmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeApplicableIndividualAssessments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeCertificates.go b/service/databasemigrationservice/api_op_DescribeCertificates.go index 8d02ff5927e..4d3d577cf65 100644 --- a/service/databasemigrationservice/api_op_DescribeCertificates.go +++ b/service/databasemigrationservice/api_op_DescribeCertificates.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeCertificatesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificatesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeCertificatesMiddlewares(stack *middleware.S return nil } -// DescribeCertificatesAPIClient is a client that implements the -// DescribeCertificates operation. -type DescribeCertificatesAPIClient interface { - DescribeCertificates(context.Context, *DescribeCertificatesInput, ...func(*Options)) (*DescribeCertificatesOutput, error) -} - -var _ DescribeCertificatesAPIClient = (*Client)(nil) - // DescribeCertificatesPaginatorOptions is the paginator options for // DescribeCertificates type DescribeCertificatesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeCertificatesAPIClient is a client that implements the +// DescribeCertificates operation. +type DescribeCertificatesAPIClient interface { + DescribeCertificates(context.Context, *DescribeCertificatesInput, ...func(*Options)) (*DescribeCertificatesOutput, error) +} + +var _ DescribeCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeConnections.go b/service/databasemigrationservice/api_op_DescribeConnections.go index a2f1b2c388e..2922ed7706f 100644 --- a/service/databasemigrationservice/api_op_DescribeConnections.go +++ b/service/databasemigrationservice/api_op_DescribeConnections.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeConnectionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectionsValidationMiddleware(stack); err != nil { return err } @@ -155,103 +158,6 @@ func (c *Client) addOperationDescribeConnectionsMiddlewares(stack *middleware.St return nil } -// DescribeConnectionsAPIClient is a client that implements the -// DescribeConnections operation. -type DescribeConnectionsAPIClient interface { - DescribeConnections(context.Context, *DescribeConnectionsInput, ...func(*Options)) (*DescribeConnectionsOutput, error) -} - -var _ DescribeConnectionsAPIClient = (*Client)(nil) - -// DescribeConnectionsPaginatorOptions is the paginator options for -// DescribeConnections -type DescribeConnectionsPaginatorOptions struct { - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeConnectionsPaginator is a paginator for DescribeConnections -type DescribeConnectionsPaginator struct { - options DescribeConnectionsPaginatorOptions - client DescribeConnectionsAPIClient - params *DescribeConnectionsInput - nextToken *string - firstPage bool -} - -// NewDescribeConnectionsPaginator returns a new DescribeConnectionsPaginator -func NewDescribeConnectionsPaginator(client DescribeConnectionsAPIClient, params *DescribeConnectionsInput, optFns ...func(*DescribeConnectionsPaginatorOptions)) *DescribeConnectionsPaginator { - if params == nil { - params = &DescribeConnectionsInput{} - } - - options := DescribeConnectionsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeConnectionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeConnectionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeConnections page. -func (p *DescribeConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConnectionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeConnections(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // TestConnectionSucceedsWaiterOptions are waiter options for // TestConnectionSucceedsWaiter type TestConnectionSucceedsWaiterOptions struct { @@ -369,7 +275,13 @@ func (w *TestConnectionSucceedsWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeConnections(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -466,6 +378,106 @@ func testConnectionSucceedsStateRetryable(ctx context.Context, input *DescribeCo return true, nil } +// DescribeConnectionsPaginatorOptions is the paginator options for +// DescribeConnections +type DescribeConnectionsPaginatorOptions struct { + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeConnectionsPaginator is a paginator for DescribeConnections +type DescribeConnectionsPaginator struct { + options DescribeConnectionsPaginatorOptions + client DescribeConnectionsAPIClient + params *DescribeConnectionsInput + nextToken *string + firstPage bool +} + +// NewDescribeConnectionsPaginator returns a new DescribeConnectionsPaginator +func NewDescribeConnectionsPaginator(client DescribeConnectionsAPIClient, params *DescribeConnectionsInput, optFns ...func(*DescribeConnectionsPaginatorOptions)) *DescribeConnectionsPaginator { + if params == nil { + params = &DescribeConnectionsInput{} + } + + options := DescribeConnectionsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeConnectionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeConnectionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeConnections page. +func (p *DescribeConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeConnectionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeConnections(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeConnectionsAPIClient is a client that implements the +// DescribeConnections operation. +type DescribeConnectionsAPIClient interface { + DescribeConnections(context.Context, *DescribeConnectionsInput, ...func(*Options)) (*DescribeConnectionsOutput, error) +} + +var _ DescribeConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeConversionConfiguration.go b/service/databasemigrationservice/api_op_DescribeConversionConfiguration.go index ddc68c12fea..aa179c4cc2f 100644 --- a/service/databasemigrationservice/api_op_DescribeConversionConfiguration.go +++ b/service/databasemigrationservice/api_op_DescribeConversionConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeConversionConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConversionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DescribeDataProviders.go b/service/databasemigrationservice/api_op_DescribeDataProviders.go index d6df7fa4d51..983e6411352 100644 --- a/service/databasemigrationservice/api_op_DescribeDataProviders.go +++ b/service/databasemigrationservice/api_op_DescribeDataProviders.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeDataProvidersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataProvidersValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeDataProvidersMiddlewares(stack *middleware. return nil } -// DescribeDataProvidersAPIClient is a client that implements the -// DescribeDataProviders operation. -type DescribeDataProvidersAPIClient interface { - DescribeDataProviders(context.Context, *DescribeDataProvidersInput, ...func(*Options)) (*DescribeDataProvidersOutput, error) -} - -var _ DescribeDataProvidersAPIClient = (*Client)(nil) - // DescribeDataProvidersPaginatorOptions is the paginator options for // DescribeDataProviders type DescribeDataProvidersPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeDataProvidersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDataProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeDataProvidersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeDataProvidersAPIClient is a client that implements the +// DescribeDataProviders operation. +type DescribeDataProvidersAPIClient interface { + DescribeDataProviders(context.Context, *DescribeDataProvidersInput, ...func(*Options)) (*DescribeDataProvidersOutput, error) +} + +var _ DescribeDataProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeEndpointSettings.go b/service/databasemigrationservice/api_op_DescribeEndpointSettings.go index 82df959b6fd..4fd38813d00 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpointSettings.go +++ b/service/databasemigrationservice/api_op_DescribeEndpointSettings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeEndpointSettingsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointSettingsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeEndpointSettingsMiddlewares(stack *middlewa return nil } -// DescribeEndpointSettingsAPIClient is a client that implements the -// DescribeEndpointSettings operation. -type DescribeEndpointSettingsAPIClient interface { - DescribeEndpointSettings(context.Context, *DescribeEndpointSettingsInput, ...func(*Options)) (*DescribeEndpointSettingsOutput, error) -} - -var _ DescribeEndpointSettingsAPIClient = (*Client)(nil) - // DescribeEndpointSettingsPaginatorOptions is the paginator options for // DescribeEndpointSettings type DescribeEndpointSettingsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeEndpointSettingsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEndpointSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeEndpointSettingsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeEndpointSettingsAPIClient is a client that implements the +// DescribeEndpointSettings operation. +type DescribeEndpointSettingsAPIClient interface { + DescribeEndpointSettings(context.Context, *DescribeEndpointSettingsInput, ...func(*Options)) (*DescribeEndpointSettingsOutput, error) +} + +var _ DescribeEndpointSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpointSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeEndpointTypes.go b/service/databasemigrationservice/api_op_DescribeEndpointTypes.go index 86b4965340d..80ba823da27 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpointTypes.go +++ b/service/databasemigrationservice/api_op_DescribeEndpointTypes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeEndpointTypesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointTypesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeEndpointTypesMiddlewares(stack *middleware. return nil } -// DescribeEndpointTypesAPIClient is a client that implements the -// DescribeEndpointTypes operation. -type DescribeEndpointTypesAPIClient interface { - DescribeEndpointTypes(context.Context, *DescribeEndpointTypesInput, ...func(*Options)) (*DescribeEndpointTypesOutput, error) -} - -var _ DescribeEndpointTypesAPIClient = (*Client)(nil) - // DescribeEndpointTypesPaginatorOptions is the paginator options for // DescribeEndpointTypes type DescribeEndpointTypesPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeEndpointTypesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEndpointTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeEndpointTypesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeEndpointTypesAPIClient is a client that implements the +// DescribeEndpointTypes operation. +type DescribeEndpointTypesAPIClient interface { + DescribeEndpointTypes(context.Context, *DescribeEndpointTypesInput, ...func(*Options)) (*DescribeEndpointTypesOutput, error) +} + +var _ DescribeEndpointTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpointTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeEndpoints.go b/service/databasemigrationservice/api_op_DescribeEndpoints.go index 2fe4cc10964..91633795c59 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpoints.go +++ b/service/databasemigrationservice/api_op_DescribeEndpoints.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointsValidationMiddleware(stack); err != nil { return err } @@ -154,102 +157,6 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac return nil } -// DescribeEndpointsAPIClient is a client that implements the DescribeEndpoints -// operation. -type DescribeEndpointsAPIClient interface { - DescribeEndpoints(context.Context, *DescribeEndpointsInput, ...func(*Options)) (*DescribeEndpointsOutput, error) -} - -var _ DescribeEndpointsAPIClient = (*Client)(nil) - -// DescribeEndpointsPaginatorOptions is the paginator options for DescribeEndpoints -type DescribeEndpointsPaginatorOptions struct { - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeEndpointsPaginator is a paginator for DescribeEndpoints -type DescribeEndpointsPaginator struct { - options DescribeEndpointsPaginatorOptions - client DescribeEndpointsAPIClient - params *DescribeEndpointsInput - nextToken *string - firstPage bool -} - -// NewDescribeEndpointsPaginator returns a new DescribeEndpointsPaginator -func NewDescribeEndpointsPaginator(client DescribeEndpointsAPIClient, params *DescribeEndpointsInput, optFns ...func(*DescribeEndpointsPaginatorOptions)) *DescribeEndpointsPaginator { - if params == nil { - params = &DescribeEndpointsInput{} - } - - options := DescribeEndpointsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeEndpointsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeEndpointsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeEndpoints page. -func (p *DescribeEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEndpointsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeEndpoints(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // EndpointDeletedWaiterOptions are waiter options for EndpointDeletedWaiter type EndpointDeletedWaiterOptions struct { @@ -365,7 +272,13 @@ func (w *EndpointDeletedWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeEndpoints(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -461,6 +374,105 @@ func endpointDeletedStateRetryable(ctx context.Context, input *DescribeEndpoints return true, nil } +// DescribeEndpointsPaginatorOptions is the paginator options for DescribeEndpoints +type DescribeEndpointsPaginatorOptions struct { + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeEndpointsPaginator is a paginator for DescribeEndpoints +type DescribeEndpointsPaginator struct { + options DescribeEndpointsPaginatorOptions + client DescribeEndpointsAPIClient + params *DescribeEndpointsInput + nextToken *string + firstPage bool +} + +// NewDescribeEndpointsPaginator returns a new DescribeEndpointsPaginator +func NewDescribeEndpointsPaginator(client DescribeEndpointsAPIClient, params *DescribeEndpointsInput, optFns ...func(*DescribeEndpointsPaginatorOptions)) *DescribeEndpointsPaginator { + if params == nil { + params = &DescribeEndpointsInput{} + } + + options := DescribeEndpointsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeEndpointsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeEndpointsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeEndpoints page. +func (p *DescribeEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEndpointsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeEndpoints(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeEndpointsAPIClient is a client that implements the DescribeEndpoints +// operation. +type DescribeEndpointsAPIClient interface { + DescribeEndpoints(context.Context, *DescribeEndpointsInput, ...func(*Options)) (*DescribeEndpointsOutput, error) +} + +var _ DescribeEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeEngineVersions.go b/service/databasemigrationservice/api_op_DescribeEngineVersions.go index 0f6f5886a2c..2743452fad6 100644 --- a/service/databasemigrationservice/api_op_DescribeEngineVersions.go +++ b/service/databasemigrationservice/api_op_DescribeEngineVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeEngineVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEngineVersions(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeEngineVersionsMiddlewares(stack *middleware return nil } -// DescribeEngineVersionsAPIClient is a client that implements the -// DescribeEngineVersions operation. -type DescribeEngineVersionsAPIClient interface { - DescribeEngineVersions(context.Context, *DescribeEngineVersionsInput, ...func(*Options)) (*DescribeEngineVersionsOutput, error) -} - -var _ DescribeEngineVersionsAPIClient = (*Client)(nil) - // DescribeEngineVersionsPaginatorOptions is the paginator options for // DescribeEngineVersions type DescribeEngineVersionsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *DescribeEngineVersionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribeEngineVersionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeEngineVersionsAPIClient is a client that implements the +// DescribeEngineVersions operation. +type DescribeEngineVersionsAPIClient interface { + DescribeEngineVersions(context.Context, *DescribeEngineVersionsInput, ...func(*Options)) (*DescribeEngineVersionsOutput, error) +} + +var _ DescribeEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeEventCategories.go b/service/databasemigrationservice/api_op_DescribeEventCategories.go index 87518eba50b..9f9cd6b78db 100644 --- a/service/databasemigrationservice/api_op_DescribeEventCategories.go +++ b/service/databasemigrationservice/api_op_DescribeEventCategories.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeEventCategoriesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventCategoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go b/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go index c42de58dc5e..4103811009a 100644 --- a/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go +++ b/service/databasemigrationservice/api_op_DescribeEventSubscriptions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle return nil } -// DescribeEventSubscriptionsAPIClient is a client that implements the -// DescribeEventSubscriptions operation. -type DescribeEventSubscriptionsAPIClient interface { - DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) -} - -var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) - // DescribeEventSubscriptionsPaginatorOptions is the paginator options for // DescribeEventSubscriptions type DescribeEventSubscriptionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeEventSubscriptionsAPIClient is a client that implements the +// DescribeEventSubscriptions operation. +type DescribeEventSubscriptionsAPIClient interface { + DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) +} + +var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeEvents.go b/service/databasemigrationservice/api_op_DescribeEvents.go index 17ece89b9e7..e94a81a969e 100644 --- a/service/databasemigrationservice/api_op_DescribeEvents.go +++ b/service/databasemigrationservice/api_op_DescribeEvents.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventsValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of records to include in the response. If more records @@ -250,6 +245,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeExtensionPackAssociations.go b/service/databasemigrationservice/api_op_DescribeExtensionPackAssociations.go index d960e14c9f6..3ca89d6e3f2 100644 --- a/service/databasemigrationservice/api_op_DescribeExtensionPackAssociations.go +++ b/service/databasemigrationservice/api_op_DescribeExtensionPackAssociations.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeExtensionPackAssociationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExtensionPackAssociationsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeExtensionPackAssociationsMiddlewares(stack return nil } -// DescribeExtensionPackAssociationsAPIClient is a client that implements the -// DescribeExtensionPackAssociations operation. -type DescribeExtensionPackAssociationsAPIClient interface { - DescribeExtensionPackAssociations(context.Context, *DescribeExtensionPackAssociationsInput, ...func(*Options)) (*DescribeExtensionPackAssociationsOutput, error) -} - -var _ DescribeExtensionPackAssociationsAPIClient = (*Client)(nil) - // DescribeExtensionPackAssociationsPaginatorOptions is the paginator options for // DescribeExtensionPackAssociations type DescribeExtensionPackAssociationsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeExtensionPackAssociationsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeExtensionPackAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeExtensionPackAssociationsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeExtensionPackAssociationsAPIClient is a client that implements the +// DescribeExtensionPackAssociations operation. +type DescribeExtensionPackAssociationsAPIClient interface { + DescribeExtensionPackAssociations(context.Context, *DescribeExtensionPackAssociationsInput, ...func(*Options)) (*DescribeExtensionPackAssociationsOutput, error) +} + +var _ DescribeExtensionPackAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExtensionPackAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeFleetAdvisorCollectors.go b/service/databasemigrationservice/api_op_DescribeFleetAdvisorCollectors.go index 6d1978173b0..ed127e1f8e3 100644 --- a/service/databasemigrationservice/api_op_DescribeFleetAdvisorCollectors.go +++ b/service/databasemigrationservice/api_op_DescribeFleetAdvisorCollectors.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeFleetAdvisorCollectorsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetAdvisorCollectorsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeFleetAdvisorCollectorsMiddlewares(stack *mi return nil } -// DescribeFleetAdvisorCollectorsAPIClient is a client that implements the -// DescribeFleetAdvisorCollectors operation. -type DescribeFleetAdvisorCollectorsAPIClient interface { - DescribeFleetAdvisorCollectors(context.Context, *DescribeFleetAdvisorCollectorsInput, ...func(*Options)) (*DescribeFleetAdvisorCollectorsOutput, error) -} - -var _ DescribeFleetAdvisorCollectorsAPIClient = (*Client)(nil) - // DescribeFleetAdvisorCollectorsPaginatorOptions is the paginator options for // DescribeFleetAdvisorCollectors type DescribeFleetAdvisorCollectorsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeFleetAdvisorCollectorsPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetAdvisorCollectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeFleetAdvisorCollectorsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeFleetAdvisorCollectorsAPIClient is a client that implements the +// DescribeFleetAdvisorCollectors operation. +type DescribeFleetAdvisorCollectorsAPIClient interface { + DescribeFleetAdvisorCollectors(context.Context, *DescribeFleetAdvisorCollectorsInput, ...func(*Options)) (*DescribeFleetAdvisorCollectorsOutput, error) +} + +var _ DescribeFleetAdvisorCollectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetAdvisorCollectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeFleetAdvisorDatabases.go b/service/databasemigrationservice/api_op_DescribeFleetAdvisorDatabases.go index ca4b94a03de..a230ee03b36 100644 --- a/service/databasemigrationservice/api_op_DescribeFleetAdvisorDatabases.go +++ b/service/databasemigrationservice/api_op_DescribeFleetAdvisorDatabases.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeFleetAdvisorDatabasesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetAdvisorDatabasesValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeFleetAdvisorDatabasesMiddlewares(stack *mid return nil } -// DescribeFleetAdvisorDatabasesAPIClient is a client that implements the -// DescribeFleetAdvisorDatabases operation. -type DescribeFleetAdvisorDatabasesAPIClient interface { - DescribeFleetAdvisorDatabases(context.Context, *DescribeFleetAdvisorDatabasesInput, ...func(*Options)) (*DescribeFleetAdvisorDatabasesOutput, error) -} - -var _ DescribeFleetAdvisorDatabasesAPIClient = (*Client)(nil) - // DescribeFleetAdvisorDatabasesPaginatorOptions is the paginator options for // DescribeFleetAdvisorDatabases type DescribeFleetAdvisorDatabasesPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeFleetAdvisorDatabasesPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetAdvisorDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeFleetAdvisorDatabasesPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeFleetAdvisorDatabasesAPIClient is a client that implements the +// DescribeFleetAdvisorDatabases operation. +type DescribeFleetAdvisorDatabasesAPIClient interface { + DescribeFleetAdvisorDatabases(context.Context, *DescribeFleetAdvisorDatabasesInput, ...func(*Options)) (*DescribeFleetAdvisorDatabasesOutput, error) +} + +var _ DescribeFleetAdvisorDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetAdvisorDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeFleetAdvisorLsaAnalysis.go b/service/databasemigrationservice/api_op_DescribeFleetAdvisorLsaAnalysis.go index 7559235878b..e6312f78f3a 100644 --- a/service/databasemigrationservice/api_op_DescribeFleetAdvisorLsaAnalysis.go +++ b/service/databasemigrationservice/api_op_DescribeFleetAdvisorLsaAnalysis.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeFleetAdvisorLsaAnalysisMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetAdvisorLsaAnalysis(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeFleetAdvisorLsaAnalysisMiddlewares(stack *m return nil } -// DescribeFleetAdvisorLsaAnalysisAPIClient is a client that implements the -// DescribeFleetAdvisorLsaAnalysis operation. -type DescribeFleetAdvisorLsaAnalysisAPIClient interface { - DescribeFleetAdvisorLsaAnalysis(context.Context, *DescribeFleetAdvisorLsaAnalysisInput, ...func(*Options)) (*DescribeFleetAdvisorLsaAnalysisOutput, error) -} - -var _ DescribeFleetAdvisorLsaAnalysisAPIClient = (*Client)(nil) - // DescribeFleetAdvisorLsaAnalysisPaginatorOptions is the paginator options for // DescribeFleetAdvisorLsaAnalysis type DescribeFleetAdvisorLsaAnalysisPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *DescribeFleetAdvisorLsaAnalysisPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetAdvisorLsaAnalysis(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribeFleetAdvisorLsaAnalysisPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeFleetAdvisorLsaAnalysisAPIClient is a client that implements the +// DescribeFleetAdvisorLsaAnalysis operation. +type DescribeFleetAdvisorLsaAnalysisAPIClient interface { + DescribeFleetAdvisorLsaAnalysis(context.Context, *DescribeFleetAdvisorLsaAnalysisInput, ...func(*Options)) (*DescribeFleetAdvisorLsaAnalysisOutput, error) +} + +var _ DescribeFleetAdvisorLsaAnalysisAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetAdvisorLsaAnalysis(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemaObjectSummary.go b/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemaObjectSummary.go index d868931b4d2..1ccb1c80504 100644 --- a/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemaObjectSummary.go +++ b/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemaObjectSummary.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeFleetAdvisorSchemaObjectSummaryMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetAdvisorSchemaObjectSummaryValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeFleetAdvisorSchemaObjectSummaryMiddlewares( return nil } -// DescribeFleetAdvisorSchemaObjectSummaryAPIClient is a client that implements -// the DescribeFleetAdvisorSchemaObjectSummary operation. -type DescribeFleetAdvisorSchemaObjectSummaryAPIClient interface { - DescribeFleetAdvisorSchemaObjectSummary(context.Context, *DescribeFleetAdvisorSchemaObjectSummaryInput, ...func(*Options)) (*DescribeFleetAdvisorSchemaObjectSummaryOutput, error) -} - -var _ DescribeFleetAdvisorSchemaObjectSummaryAPIClient = (*Client)(nil) - // DescribeFleetAdvisorSchemaObjectSummaryPaginatorOptions is the paginator // options for DescribeFleetAdvisorSchemaObjectSummary type DescribeFleetAdvisorSchemaObjectSummaryPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeFleetAdvisorSchemaObjectSummaryPaginator) NextPage(ctx context. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetAdvisorSchemaObjectSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeFleetAdvisorSchemaObjectSummaryPaginator) NextPage(ctx context. return result, nil } +// DescribeFleetAdvisorSchemaObjectSummaryAPIClient is a client that implements +// the DescribeFleetAdvisorSchemaObjectSummary operation. +type DescribeFleetAdvisorSchemaObjectSummaryAPIClient interface { + DescribeFleetAdvisorSchemaObjectSummary(context.Context, *DescribeFleetAdvisorSchemaObjectSummaryInput, ...func(*Options)) (*DescribeFleetAdvisorSchemaObjectSummaryOutput, error) +} + +var _ DescribeFleetAdvisorSchemaObjectSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetAdvisorSchemaObjectSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemas.go b/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemas.go index 79b78cdea04..de5d75fa974 100644 --- a/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemas.go +++ b/service/databasemigrationservice/api_op_DescribeFleetAdvisorSchemas.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeFleetAdvisorSchemasMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetAdvisorSchemasValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeFleetAdvisorSchemasMiddlewares(stack *middl return nil } -// DescribeFleetAdvisorSchemasAPIClient is a client that implements the -// DescribeFleetAdvisorSchemas operation. -type DescribeFleetAdvisorSchemasAPIClient interface { - DescribeFleetAdvisorSchemas(context.Context, *DescribeFleetAdvisorSchemasInput, ...func(*Options)) (*DescribeFleetAdvisorSchemasOutput, error) -} - -var _ DescribeFleetAdvisorSchemasAPIClient = (*Client)(nil) - // DescribeFleetAdvisorSchemasPaginatorOptions is the paginator options for // DescribeFleetAdvisorSchemas type DescribeFleetAdvisorSchemasPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeFleetAdvisorSchemasPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetAdvisorSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeFleetAdvisorSchemasPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeFleetAdvisorSchemasAPIClient is a client that implements the +// DescribeFleetAdvisorSchemas operation. +type DescribeFleetAdvisorSchemasAPIClient interface { + DescribeFleetAdvisorSchemas(context.Context, *DescribeFleetAdvisorSchemasInput, ...func(*Options)) (*DescribeFleetAdvisorSchemasOutput, error) +} + +var _ DescribeFleetAdvisorSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetAdvisorSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeInstanceProfiles.go b/service/databasemigrationservice/api_op_DescribeInstanceProfiles.go index 1b7fbf8bce5..6053a6e8c05 100644 --- a/service/databasemigrationservice/api_op_DescribeInstanceProfiles.go +++ b/service/databasemigrationservice/api_op_DescribeInstanceProfiles.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeInstanceProfilesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceProfilesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeInstanceProfilesMiddlewares(stack *middlewa return nil } -// DescribeInstanceProfilesAPIClient is a client that implements the -// DescribeInstanceProfiles operation. -type DescribeInstanceProfilesAPIClient interface { - DescribeInstanceProfiles(context.Context, *DescribeInstanceProfilesInput, ...func(*Options)) (*DescribeInstanceProfilesOutput, error) -} - -var _ DescribeInstanceProfilesAPIClient = (*Client)(nil) - // DescribeInstanceProfilesPaginatorOptions is the paginator options for // DescribeInstanceProfiles type DescribeInstanceProfilesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeInstanceProfilesPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeInstanceProfilesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeInstanceProfilesAPIClient is a client that implements the +// DescribeInstanceProfiles operation. +type DescribeInstanceProfilesAPIClient interface { + DescribeInstanceProfiles(context.Context, *DescribeInstanceProfilesInput, ...func(*Options)) (*DescribeInstanceProfilesOutput, error) +} + +var _ DescribeInstanceProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeMetadataModelAssessments.go b/service/databasemigrationservice/api_op_DescribeMetadataModelAssessments.go index 8f1a48fe361..03a5d008195 100644 --- a/service/databasemigrationservice/api_op_DescribeMetadataModelAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeMetadataModelAssessments.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeMetadataModelAssessmentsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetadataModelAssessmentsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeMetadataModelAssessmentsMiddlewares(stack * return nil } -// DescribeMetadataModelAssessmentsAPIClient is a client that implements the -// DescribeMetadataModelAssessments operation. -type DescribeMetadataModelAssessmentsAPIClient interface { - DescribeMetadataModelAssessments(context.Context, *DescribeMetadataModelAssessmentsInput, ...func(*Options)) (*DescribeMetadataModelAssessmentsOutput, error) -} - -var _ DescribeMetadataModelAssessmentsAPIClient = (*Client)(nil) - // DescribeMetadataModelAssessmentsPaginatorOptions is the paginator options for // DescribeMetadataModelAssessments type DescribeMetadataModelAssessmentsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeMetadataModelAssessmentsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMetadataModelAssessments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeMetadataModelAssessmentsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeMetadataModelAssessmentsAPIClient is a client that implements the +// DescribeMetadataModelAssessments operation. +type DescribeMetadataModelAssessmentsAPIClient interface { + DescribeMetadataModelAssessments(context.Context, *DescribeMetadataModelAssessmentsInput, ...func(*Options)) (*DescribeMetadataModelAssessmentsOutput, error) +} + +var _ DescribeMetadataModelAssessmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMetadataModelAssessments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeMetadataModelConversions.go b/service/databasemigrationservice/api_op_DescribeMetadataModelConversions.go index 59462dc9002..5c3093d9442 100644 --- a/service/databasemigrationservice/api_op_DescribeMetadataModelConversions.go +++ b/service/databasemigrationservice/api_op_DescribeMetadataModelConversions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeMetadataModelConversionsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetadataModelConversionsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeMetadataModelConversionsMiddlewares(stack * return nil } -// DescribeMetadataModelConversionsAPIClient is a client that implements the -// DescribeMetadataModelConversions operation. -type DescribeMetadataModelConversionsAPIClient interface { - DescribeMetadataModelConversions(context.Context, *DescribeMetadataModelConversionsInput, ...func(*Options)) (*DescribeMetadataModelConversionsOutput, error) -} - -var _ DescribeMetadataModelConversionsAPIClient = (*Client)(nil) - // DescribeMetadataModelConversionsPaginatorOptions is the paginator options for // DescribeMetadataModelConversions type DescribeMetadataModelConversionsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeMetadataModelConversionsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMetadataModelConversions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeMetadataModelConversionsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeMetadataModelConversionsAPIClient is a client that implements the +// DescribeMetadataModelConversions operation. +type DescribeMetadataModelConversionsAPIClient interface { + DescribeMetadataModelConversions(context.Context, *DescribeMetadataModelConversionsInput, ...func(*Options)) (*DescribeMetadataModelConversionsOutput, error) +} + +var _ DescribeMetadataModelConversionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMetadataModelConversions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeMetadataModelExportsAsScript.go b/service/databasemigrationservice/api_op_DescribeMetadataModelExportsAsScript.go index d8b8d7a14f8..d1b7d6c3bb5 100644 --- a/service/databasemigrationservice/api_op_DescribeMetadataModelExportsAsScript.go +++ b/service/databasemigrationservice/api_op_DescribeMetadataModelExportsAsScript.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeMetadataModelExportsAsScriptMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetadataModelExportsAsScriptValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeMetadataModelExportsAsScriptMiddlewares(sta return nil } -// DescribeMetadataModelExportsAsScriptAPIClient is a client that implements the -// DescribeMetadataModelExportsAsScript operation. -type DescribeMetadataModelExportsAsScriptAPIClient interface { - DescribeMetadataModelExportsAsScript(context.Context, *DescribeMetadataModelExportsAsScriptInput, ...func(*Options)) (*DescribeMetadataModelExportsAsScriptOutput, error) -} - -var _ DescribeMetadataModelExportsAsScriptAPIClient = (*Client)(nil) - // DescribeMetadataModelExportsAsScriptPaginatorOptions is the paginator options // for DescribeMetadataModelExportsAsScript type DescribeMetadataModelExportsAsScriptPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeMetadataModelExportsAsScriptPaginator) NextPage(ctx context.Con } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMetadataModelExportsAsScript(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeMetadataModelExportsAsScriptPaginator) NextPage(ctx context.Con return result, nil } +// DescribeMetadataModelExportsAsScriptAPIClient is a client that implements the +// DescribeMetadataModelExportsAsScript operation. +type DescribeMetadataModelExportsAsScriptAPIClient interface { + DescribeMetadataModelExportsAsScript(context.Context, *DescribeMetadataModelExportsAsScriptInput, ...func(*Options)) (*DescribeMetadataModelExportsAsScriptOutput, error) +} + +var _ DescribeMetadataModelExportsAsScriptAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMetadataModelExportsAsScript(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeMetadataModelExportsToTarget.go b/service/databasemigrationservice/api_op_DescribeMetadataModelExportsToTarget.go index 4cd1fd9969b..7a9991a1dc7 100644 --- a/service/databasemigrationservice/api_op_DescribeMetadataModelExportsToTarget.go +++ b/service/databasemigrationservice/api_op_DescribeMetadataModelExportsToTarget.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeMetadataModelExportsToTargetMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetadataModelExportsToTargetValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeMetadataModelExportsToTargetMiddlewares(sta return nil } -// DescribeMetadataModelExportsToTargetAPIClient is a client that implements the -// DescribeMetadataModelExportsToTarget operation. -type DescribeMetadataModelExportsToTargetAPIClient interface { - DescribeMetadataModelExportsToTarget(context.Context, *DescribeMetadataModelExportsToTargetInput, ...func(*Options)) (*DescribeMetadataModelExportsToTargetOutput, error) -} - -var _ DescribeMetadataModelExportsToTargetAPIClient = (*Client)(nil) - // DescribeMetadataModelExportsToTargetPaginatorOptions is the paginator options // for DescribeMetadataModelExportsToTarget type DescribeMetadataModelExportsToTargetPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeMetadataModelExportsToTargetPaginator) NextPage(ctx context.Con } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMetadataModelExportsToTarget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeMetadataModelExportsToTargetPaginator) NextPage(ctx context.Con return result, nil } +// DescribeMetadataModelExportsToTargetAPIClient is a client that implements the +// DescribeMetadataModelExportsToTarget operation. +type DescribeMetadataModelExportsToTargetAPIClient interface { + DescribeMetadataModelExportsToTarget(context.Context, *DescribeMetadataModelExportsToTargetInput, ...func(*Options)) (*DescribeMetadataModelExportsToTargetOutput, error) +} + +var _ DescribeMetadataModelExportsToTargetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMetadataModelExportsToTarget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeMetadataModelImports.go b/service/databasemigrationservice/api_op_DescribeMetadataModelImports.go index ee2ba0d02ee..416fa3b27cf 100644 --- a/service/databasemigrationservice/api_op_DescribeMetadataModelImports.go +++ b/service/databasemigrationservice/api_op_DescribeMetadataModelImports.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeMetadataModelImportsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetadataModelImportsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeMetadataModelImportsMiddlewares(stack *midd return nil } -// DescribeMetadataModelImportsAPIClient is a client that implements the -// DescribeMetadataModelImports operation. -type DescribeMetadataModelImportsAPIClient interface { - DescribeMetadataModelImports(context.Context, *DescribeMetadataModelImportsInput, ...func(*Options)) (*DescribeMetadataModelImportsOutput, error) -} - -var _ DescribeMetadataModelImportsAPIClient = (*Client)(nil) - // DescribeMetadataModelImportsPaginatorOptions is the paginator options for // DescribeMetadataModelImports type DescribeMetadataModelImportsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeMetadataModelImportsPaginator) NextPage(ctx context.Context, op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMetadataModelImports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeMetadataModelImportsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeMetadataModelImportsAPIClient is a client that implements the +// DescribeMetadataModelImports operation. +type DescribeMetadataModelImportsAPIClient interface { + DescribeMetadataModelImports(context.Context, *DescribeMetadataModelImportsInput, ...func(*Options)) (*DescribeMetadataModelImportsOutput, error) +} + +var _ DescribeMetadataModelImportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMetadataModelImports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeMigrationProjects.go b/service/databasemigrationservice/api_op_DescribeMigrationProjects.go index a5a46c6e93e..425aee5569b 100644 --- a/service/databasemigrationservice/api_op_DescribeMigrationProjects.go +++ b/service/databasemigrationservice/api_op_DescribeMigrationProjects.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeMigrationProjectsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMigrationProjectsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeMigrationProjectsMiddlewares(stack *middlew return nil } -// DescribeMigrationProjectsAPIClient is a client that implements the -// DescribeMigrationProjects operation. -type DescribeMigrationProjectsAPIClient interface { - DescribeMigrationProjects(context.Context, *DescribeMigrationProjectsInput, ...func(*Options)) (*DescribeMigrationProjectsOutput, error) -} - -var _ DescribeMigrationProjectsAPIClient = (*Client)(nil) - // DescribeMigrationProjectsPaginatorOptions is the paginator options for // DescribeMigrationProjects type DescribeMigrationProjectsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeMigrationProjectsPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMigrationProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeMigrationProjectsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeMigrationProjectsAPIClient is a client that implements the +// DescribeMigrationProjects operation. +type DescribeMigrationProjectsAPIClient interface { + DescribeMigrationProjects(context.Context, *DescribeMigrationProjectsInput, ...func(*Options)) (*DescribeMigrationProjectsOutput, error) +} + +var _ DescribeMigrationProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMigrationProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go index bdcdc0057f2..038467e7646 100644 --- a/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeOrderableReplicationInstances.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeOrderableReplicationInstancesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrderableReplicationInstances(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeOrderableReplicationInstancesMiddlewares(st return nil } -// DescribeOrderableReplicationInstancesAPIClient is a client that implements the -// DescribeOrderableReplicationInstances operation. -type DescribeOrderableReplicationInstancesAPIClient interface { - DescribeOrderableReplicationInstances(context.Context, *DescribeOrderableReplicationInstancesInput, ...func(*Options)) (*DescribeOrderableReplicationInstancesOutput, error) -} - -var _ DescribeOrderableReplicationInstancesAPIClient = (*Client)(nil) - // DescribeOrderableReplicationInstancesPaginatorOptions is the paginator options // for DescribeOrderableReplicationInstances type DescribeOrderableReplicationInstancesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeOrderableReplicationInstancesPaginator) NextPage(ctx context.Co } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrderableReplicationInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeOrderableReplicationInstancesPaginator) NextPage(ctx context.Co return result, nil } +// DescribeOrderableReplicationInstancesAPIClient is a client that implements the +// DescribeOrderableReplicationInstances operation. +type DescribeOrderableReplicationInstancesAPIClient interface { + DescribeOrderableReplicationInstances(context.Context, *DescribeOrderableReplicationInstancesInput, ...func(*Options)) (*DescribeOrderableReplicationInstancesOutput, error) +} + +var _ DescribeOrderableReplicationInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrderableReplicationInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go b/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go index 05c4cc3c9fd..7912c172388 100644 --- a/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go +++ b/service/databasemigrationservice/api_op_DescribePendingMaintenanceActions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePendingMaintenanceActionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack return nil } -// DescribePendingMaintenanceActionsAPIClient is a client that implements the -// DescribePendingMaintenanceActions operation. -type DescribePendingMaintenanceActionsAPIClient interface { - DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) -} - -var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) - // DescribePendingMaintenanceActionsPaginatorOptions is the paginator options for // DescribePendingMaintenanceActions type DescribePendingMaintenanceActionsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePendingMaintenanceActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribePendingMaintenanceActionsAPIClient is a client that implements the +// DescribePendingMaintenanceActions operation. +type DescribePendingMaintenanceActionsAPIClient interface { + DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) +} + +var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePendingMaintenanceActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeRecommendationLimitations.go b/service/databasemigrationservice/api_op_DescribeRecommendationLimitations.go index 015ac977ee8..416e383a0b2 100644 --- a/service/databasemigrationservice/api_op_DescribeRecommendationLimitations.go +++ b/service/databasemigrationservice/api_op_DescribeRecommendationLimitations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeRecommendationLimitationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecommendationLimitationsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeRecommendationLimitationsMiddlewares(stack return nil } -// DescribeRecommendationLimitationsAPIClient is a client that implements the -// DescribeRecommendationLimitations operation. -type DescribeRecommendationLimitationsAPIClient interface { - DescribeRecommendationLimitations(context.Context, *DescribeRecommendationLimitationsInput, ...func(*Options)) (*DescribeRecommendationLimitationsOutput, error) -} - -var _ DescribeRecommendationLimitationsAPIClient = (*Client)(nil) - // DescribeRecommendationLimitationsPaginatorOptions is the paginator options for // DescribeRecommendationLimitations type DescribeRecommendationLimitationsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeRecommendationLimitationsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRecommendationLimitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeRecommendationLimitationsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeRecommendationLimitationsAPIClient is a client that implements the +// DescribeRecommendationLimitations operation. +type DescribeRecommendationLimitationsAPIClient interface { + DescribeRecommendationLimitations(context.Context, *DescribeRecommendationLimitationsInput, ...func(*Options)) (*DescribeRecommendationLimitationsOutput, error) +} + +var _ DescribeRecommendationLimitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRecommendationLimitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeRecommendations.go b/service/databasemigrationservice/api_op_DescribeRecommendations.go index dd0904834d4..9140d505791 100644 --- a/service/databasemigrationservice/api_op_DescribeRecommendations.go +++ b/service/databasemigrationservice/api_op_DescribeRecommendations.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeRecommendationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeRecommendationsMiddlewares(stack *middlewar return nil } -// DescribeRecommendationsAPIClient is a client that implements the -// DescribeRecommendations operation. -type DescribeRecommendationsAPIClient interface { - DescribeRecommendations(context.Context, *DescribeRecommendationsInput, ...func(*Options)) (*DescribeRecommendationsOutput, error) -} - -var _ DescribeRecommendationsAPIClient = (*Client)(nil) - // DescribeRecommendationsPaginatorOptions is the paginator options for // DescribeRecommendations type DescribeRecommendationsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeRecommendationsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeRecommendationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeRecommendationsAPIClient is a client that implements the +// DescribeRecommendations operation. +type DescribeRecommendationsAPIClient interface { + DescribeRecommendations(context.Context, *DescribeRecommendationsInput, ...func(*Options)) (*DescribeRecommendationsOutput, error) +} + +var _ DescribeRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go b/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go index 8b3e9991df9..367e009bf42 100644 --- a/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go +++ b/service/databasemigrationservice/api_op_DescribeRefreshSchemasStatus.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeRefreshSchemasStatusMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRefreshSchemasStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_DescribeReplicationConfigs.go b/service/databasemigrationservice/api_op_DescribeReplicationConfigs.go index 135679a9dc6..32bb8879613 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationConfigs.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationConfigs.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeReplicationConfigsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationConfigsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeReplicationConfigsMiddlewares(stack *middle return nil } -// DescribeReplicationConfigsAPIClient is a client that implements the -// DescribeReplicationConfigs operation. -type DescribeReplicationConfigsAPIClient interface { - DescribeReplicationConfigs(context.Context, *DescribeReplicationConfigsInput, ...func(*Options)) (*DescribeReplicationConfigsOutput, error) -} - -var _ DescribeReplicationConfigsAPIClient = (*Client)(nil) - // DescribeReplicationConfigsPaginatorOptions is the paginator options for // DescribeReplicationConfigs type DescribeReplicationConfigsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeReplicationConfigsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeReplicationConfigsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeReplicationConfigsAPIClient is a client that implements the +// DescribeReplicationConfigs operation. +type DescribeReplicationConfigsAPIClient interface { + DescribeReplicationConfigs(context.Context, *DescribeReplicationConfigsInput, ...func(*Options)) (*DescribeReplicationConfigsOutput, error) +} + +var _ DescribeReplicationConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go b/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go index 0fb36fa514e..c2a6e1b8896 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationInstanceTaskLogs.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeReplicationInstanceTaskLogsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationInstanceTaskLogsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeReplicationInstanceTaskLogsMiddlewares(stac return nil } -// DescribeReplicationInstanceTaskLogsAPIClient is a client that implements the -// DescribeReplicationInstanceTaskLogs operation. -type DescribeReplicationInstanceTaskLogsAPIClient interface { - DescribeReplicationInstanceTaskLogs(context.Context, *DescribeReplicationInstanceTaskLogsInput, ...func(*Options)) (*DescribeReplicationInstanceTaskLogsOutput, error) -} - -var _ DescribeReplicationInstanceTaskLogsAPIClient = (*Client)(nil) - // DescribeReplicationInstanceTaskLogsPaginatorOptions is the paginator options // for DescribeReplicationInstanceTaskLogs type DescribeReplicationInstanceTaskLogsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeReplicationInstanceTaskLogsPaginator) NextPage(ctx context.Cont } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationInstanceTaskLogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeReplicationInstanceTaskLogsPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeReplicationInstanceTaskLogsAPIClient is a client that implements the +// DescribeReplicationInstanceTaskLogs operation. +type DescribeReplicationInstanceTaskLogsAPIClient interface { + DescribeReplicationInstanceTaskLogs(context.Context, *DescribeReplicationInstanceTaskLogsInput, ...func(*Options)) (*DescribeReplicationInstanceTaskLogsOutput, error) +} + +var _ DescribeReplicationInstanceTaskLogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationInstanceTaskLogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go index 96b54f40125..c5d67cfa97e 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeReplicationInstancesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationInstancesValidationMiddleware(stack); err != nil { return err } @@ -156,105 +159,6 @@ func (c *Client) addOperationDescribeReplicationInstancesMiddlewares(stack *midd return nil } -// DescribeReplicationInstancesAPIClient is a client that implements the -// DescribeReplicationInstances operation. -type DescribeReplicationInstancesAPIClient interface { - DescribeReplicationInstances(context.Context, *DescribeReplicationInstancesInput, ...func(*Options)) (*DescribeReplicationInstancesOutput, error) -} - -var _ DescribeReplicationInstancesAPIClient = (*Client)(nil) - -// DescribeReplicationInstancesPaginatorOptions is the paginator options for -// DescribeReplicationInstances -type DescribeReplicationInstancesPaginatorOptions struct { - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeReplicationInstancesPaginator is a paginator for -// DescribeReplicationInstances -type DescribeReplicationInstancesPaginator struct { - options DescribeReplicationInstancesPaginatorOptions - client DescribeReplicationInstancesAPIClient - params *DescribeReplicationInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeReplicationInstancesPaginator returns a new -// DescribeReplicationInstancesPaginator -func NewDescribeReplicationInstancesPaginator(client DescribeReplicationInstancesAPIClient, params *DescribeReplicationInstancesInput, optFns ...func(*DescribeReplicationInstancesPaginatorOptions)) *DescribeReplicationInstancesPaginator { - if params == nil { - params = &DescribeReplicationInstancesInput{} - } - - options := DescribeReplicationInstancesPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeReplicationInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeReplicationInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeReplicationInstances page. -func (p *DescribeReplicationInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeReplicationInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ReplicationInstanceAvailableWaiterOptions are waiter options for // ReplicationInstanceAvailableWaiter type ReplicationInstanceAvailableWaiterOptions struct { @@ -374,7 +278,13 @@ func (w *ReplicationInstanceAvailableWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.DescribeReplicationInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -662,7 +572,13 @@ func (w *ReplicationInstanceDeletedWaiter) WaitForOutput(ctx context.Context, pa } out, err := w.client.DescribeReplicationInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -734,6 +650,108 @@ func replicationInstanceDeletedStateRetryable(ctx context.Context, input *Descri return true, nil } +// DescribeReplicationInstancesPaginatorOptions is the paginator options for +// DescribeReplicationInstances +type DescribeReplicationInstancesPaginatorOptions struct { + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeReplicationInstancesPaginator is a paginator for +// DescribeReplicationInstances +type DescribeReplicationInstancesPaginator struct { + options DescribeReplicationInstancesPaginatorOptions + client DescribeReplicationInstancesAPIClient + params *DescribeReplicationInstancesInput + nextToken *string + firstPage bool +} + +// NewDescribeReplicationInstancesPaginator returns a new +// DescribeReplicationInstancesPaginator +func NewDescribeReplicationInstancesPaginator(client DescribeReplicationInstancesAPIClient, params *DescribeReplicationInstancesInput, optFns ...func(*DescribeReplicationInstancesPaginatorOptions)) *DescribeReplicationInstancesPaginator { + if params == nil { + params = &DescribeReplicationInstancesInput{} + } + + options := DescribeReplicationInstancesPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReplicationInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReplicationInstancesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeReplicationInstances page. +func (p *DescribeReplicationInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationInstancesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeReplicationInstances(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeReplicationInstancesAPIClient is a client that implements the +// DescribeReplicationInstances operation. +type DescribeReplicationInstancesAPIClient interface { + DescribeReplicationInstances(context.Context, *DescribeReplicationInstancesInput, ...func(*Options)) (*DescribeReplicationInstancesOutput, error) +} + +var _ DescribeReplicationInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go b/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go index 6a36d45c33d..3810afc4d4c 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationSubnetGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeReplicationSubnetGroupsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationSubnetGroupsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeReplicationSubnetGroupsMiddlewares(stack *m return nil } -// DescribeReplicationSubnetGroupsAPIClient is a client that implements the -// DescribeReplicationSubnetGroups operation. -type DescribeReplicationSubnetGroupsAPIClient interface { - DescribeReplicationSubnetGroups(context.Context, *DescribeReplicationSubnetGroupsInput, ...func(*Options)) (*DescribeReplicationSubnetGroupsOutput, error) -} - -var _ DescribeReplicationSubnetGroupsAPIClient = (*Client)(nil) - // DescribeReplicationSubnetGroupsPaginatorOptions is the paginator options for // DescribeReplicationSubnetGroups type DescribeReplicationSubnetGroupsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeReplicationSubnetGroupsPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeReplicationSubnetGroupsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeReplicationSubnetGroupsAPIClient is a client that implements the +// DescribeReplicationSubnetGroups operation. +type DescribeReplicationSubnetGroupsAPIClient interface { + DescribeReplicationSubnetGroups(context.Context, *DescribeReplicationSubnetGroupsInput, ...func(*Options)) (*DescribeReplicationSubnetGroupsOutput, error) +} + +var _ DescribeReplicationSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTableStatistics.go b/service/databasemigrationservice/api_op_DescribeReplicationTableStatistics.go index 1e6dd2274b4..0baeedeed21 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTableStatistics.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTableStatistics.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeReplicationTableStatisticsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationTableStatisticsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeReplicationTableStatisticsMiddlewares(stack return nil } -// DescribeReplicationTableStatisticsAPIClient is a client that implements the -// DescribeReplicationTableStatistics operation. -type DescribeReplicationTableStatisticsAPIClient interface { - DescribeReplicationTableStatistics(context.Context, *DescribeReplicationTableStatisticsInput, ...func(*Options)) (*DescribeReplicationTableStatisticsOutput, error) -} - -var _ DescribeReplicationTableStatisticsAPIClient = (*Client)(nil) - // DescribeReplicationTableStatisticsPaginatorOptions is the paginator options for // DescribeReplicationTableStatistics type DescribeReplicationTableStatisticsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeReplicationTableStatisticsPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationTableStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeReplicationTableStatisticsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeReplicationTableStatisticsAPIClient is a client that implements the +// DescribeReplicationTableStatistics operation. +type DescribeReplicationTableStatisticsAPIClient interface { + DescribeReplicationTableStatistics(context.Context, *DescribeReplicationTableStatisticsInput, ...func(*Options)) (*DescribeReplicationTableStatisticsOutput, error) +} + +var _ DescribeReplicationTableStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationTableStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go index ba1974861c1..07527d70e40 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentResults.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeReplicationTaskAssessmentResultsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplicationTaskAssessmentResults(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeReplicationTaskAssessmentResultsMiddlewares return nil } -// DescribeReplicationTaskAssessmentResultsAPIClient is a client that implements -// the DescribeReplicationTaskAssessmentResults operation. -type DescribeReplicationTaskAssessmentResultsAPIClient interface { - DescribeReplicationTaskAssessmentResults(context.Context, *DescribeReplicationTaskAssessmentResultsInput, ...func(*Options)) (*DescribeReplicationTaskAssessmentResultsOutput, error) -} - -var _ DescribeReplicationTaskAssessmentResultsAPIClient = (*Client)(nil) - // DescribeReplicationTaskAssessmentResultsPaginatorOptions is the paginator // options for DescribeReplicationTaskAssessmentResults type DescribeReplicationTaskAssessmentResultsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeReplicationTaskAssessmentResultsPaginator) NextPage(ctx context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationTaskAssessmentResults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeReplicationTaskAssessmentResultsPaginator) NextPage(ctx context return result, nil } +// DescribeReplicationTaskAssessmentResultsAPIClient is a client that implements +// the DescribeReplicationTaskAssessmentResults operation. +type DescribeReplicationTaskAssessmentResultsAPIClient interface { + DescribeReplicationTaskAssessmentResults(context.Context, *DescribeReplicationTaskAssessmentResultsInput, ...func(*Options)) (*DescribeReplicationTaskAssessmentResultsOutput, error) +} + +var _ DescribeReplicationTaskAssessmentResultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationTaskAssessmentResults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go index de6a7d114dc..a1a019ec9ee 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskAssessmentRuns.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeReplicationTaskAssessmentRunsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationTaskAssessmentRunsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeReplicationTaskAssessmentRunsMiddlewares(st return nil } -// DescribeReplicationTaskAssessmentRunsAPIClient is a client that implements the -// DescribeReplicationTaskAssessmentRuns operation. -type DescribeReplicationTaskAssessmentRunsAPIClient interface { - DescribeReplicationTaskAssessmentRuns(context.Context, *DescribeReplicationTaskAssessmentRunsInput, ...func(*Options)) (*DescribeReplicationTaskAssessmentRunsOutput, error) -} - -var _ DescribeReplicationTaskAssessmentRunsAPIClient = (*Client)(nil) - // DescribeReplicationTaskAssessmentRunsPaginatorOptions is the paginator options // for DescribeReplicationTaskAssessmentRuns type DescribeReplicationTaskAssessmentRunsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *DescribeReplicationTaskAssessmentRunsPaginator) NextPage(ctx context.Co } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationTaskAssessmentRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *DescribeReplicationTaskAssessmentRunsPaginator) NextPage(ctx context.Co return result, nil } +// DescribeReplicationTaskAssessmentRunsAPIClient is a client that implements the +// DescribeReplicationTaskAssessmentRuns operation. +type DescribeReplicationTaskAssessmentRunsAPIClient interface { + DescribeReplicationTaskAssessmentRuns(context.Context, *DescribeReplicationTaskAssessmentRunsInput, ...func(*Options)) (*DescribeReplicationTaskAssessmentRunsOutput, error) +} + +var _ DescribeReplicationTaskAssessmentRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationTaskAssessmentRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go b/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go index 70b9c4d657e..ddfb7375c4f 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTaskIndividualAssessments.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeReplicationTaskIndividualAssessmentsMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationTaskIndividualAssessmentsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeReplicationTaskIndividualAssessmentsMiddlew return nil } -// DescribeReplicationTaskIndividualAssessmentsAPIClient is a client that -// implements the DescribeReplicationTaskIndividualAssessments operation. -type DescribeReplicationTaskIndividualAssessmentsAPIClient interface { - DescribeReplicationTaskIndividualAssessments(context.Context, *DescribeReplicationTaskIndividualAssessmentsInput, ...func(*Options)) (*DescribeReplicationTaskIndividualAssessmentsOutput, error) -} - -var _ DescribeReplicationTaskIndividualAssessmentsAPIClient = (*Client)(nil) - // DescribeReplicationTaskIndividualAssessmentsPaginatorOptions is the paginator // options for DescribeReplicationTaskIndividualAssessments type DescribeReplicationTaskIndividualAssessmentsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeReplicationTaskIndividualAssessmentsPaginator) NextPage(ctx con } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationTaskIndividualAssessments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeReplicationTaskIndividualAssessmentsPaginator) NextPage(ctx con return result, nil } +// DescribeReplicationTaskIndividualAssessmentsAPIClient is a client that +// implements the DescribeReplicationTaskIndividualAssessments operation. +type DescribeReplicationTaskIndividualAssessmentsAPIClient interface { + DescribeReplicationTaskIndividualAssessments(context.Context, *DescribeReplicationTaskIndividualAssessmentsInput, ...func(*Options)) (*DescribeReplicationTaskIndividualAssessmentsOutput, error) +} + +var _ DescribeReplicationTaskIndividualAssessmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationTaskIndividualAssessments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go index 8ce87b7b126..3f16601ddd7 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeReplicationTasksMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationTasksValidationMiddleware(stack); err != nil { return err } @@ -161,104 +164,6 @@ func (c *Client) addOperationDescribeReplicationTasksMiddlewares(stack *middlewa return nil } -// DescribeReplicationTasksAPIClient is a client that implements the -// DescribeReplicationTasks operation. -type DescribeReplicationTasksAPIClient interface { - DescribeReplicationTasks(context.Context, *DescribeReplicationTasksInput, ...func(*Options)) (*DescribeReplicationTasksOutput, error) -} - -var _ DescribeReplicationTasksAPIClient = (*Client)(nil) - -// DescribeReplicationTasksPaginatorOptions is the paginator options for -// DescribeReplicationTasks -type DescribeReplicationTasksPaginatorOptions struct { - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeReplicationTasksPaginator is a paginator for DescribeReplicationTasks -type DescribeReplicationTasksPaginator struct { - options DescribeReplicationTasksPaginatorOptions - client DescribeReplicationTasksAPIClient - params *DescribeReplicationTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeReplicationTasksPaginator returns a new -// DescribeReplicationTasksPaginator -func NewDescribeReplicationTasksPaginator(client DescribeReplicationTasksAPIClient, params *DescribeReplicationTasksInput, optFns ...func(*DescribeReplicationTasksPaginatorOptions)) *DescribeReplicationTasksPaginator { - if params == nil { - params = &DescribeReplicationTasksInput{} - } - - options := DescribeReplicationTasksPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeReplicationTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeReplicationTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeReplicationTasks page. -func (p *DescribeReplicationTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeReplicationTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ReplicationTaskDeletedWaiterOptions are waiter options for // ReplicationTaskDeletedWaiter type ReplicationTaskDeletedWaiterOptions struct { @@ -376,7 +281,13 @@ func (w *ReplicationTaskDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeReplicationTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -661,7 +572,13 @@ func (w *ReplicationTaskReadyWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeReplicationTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1043,7 +960,13 @@ func (w *ReplicationTaskRunningWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeReplicationTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1425,7 +1348,13 @@ func (w *ReplicationTaskStoppedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeReplicationTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1666,6 +1595,107 @@ func replicationTaskStoppedStateRetryable(ctx context.Context, input *DescribeRe return true, nil } +// DescribeReplicationTasksPaginatorOptions is the paginator options for +// DescribeReplicationTasks +type DescribeReplicationTasksPaginatorOptions struct { + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeReplicationTasksPaginator is a paginator for DescribeReplicationTasks +type DescribeReplicationTasksPaginator struct { + options DescribeReplicationTasksPaginatorOptions + client DescribeReplicationTasksAPIClient + params *DescribeReplicationTasksInput + nextToken *string + firstPage bool +} + +// NewDescribeReplicationTasksPaginator returns a new +// DescribeReplicationTasksPaginator +func NewDescribeReplicationTasksPaginator(client DescribeReplicationTasksAPIClient, params *DescribeReplicationTasksInput, optFns ...func(*DescribeReplicationTasksPaginatorOptions)) *DescribeReplicationTasksPaginator { + if params == nil { + params = &DescribeReplicationTasksInput{} + } + + options := DescribeReplicationTasksPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReplicationTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReplicationTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeReplicationTasks page. +func (p *DescribeReplicationTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationTasksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeReplicationTasks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeReplicationTasksAPIClient is a client that implements the +// DescribeReplicationTasks operation. +type DescribeReplicationTasksAPIClient interface { + DescribeReplicationTasks(context.Context, *DescribeReplicationTasksInput, ...func(*Options)) (*DescribeReplicationTasksOutput, error) +} + +var _ DescribeReplicationTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeReplications.go b/service/databasemigrationservice/api_op_DescribeReplications.go index 22ff1472b5f..39e3c0f9fa8 100644 --- a/service/databasemigrationservice/api_op_DescribeReplications.go +++ b/service/databasemigrationservice/api_op_DescribeReplications.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeReplicationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicationsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeReplicationsMiddlewares(stack *middleware.S return nil } -// DescribeReplicationsAPIClient is a client that implements the -// DescribeReplications operation. -type DescribeReplicationsAPIClient interface { - DescribeReplications(context.Context, *DescribeReplicationsInput, ...func(*Options)) (*DescribeReplicationsOutput, error) -} - -var _ DescribeReplicationsAPIClient = (*Client)(nil) - // DescribeReplicationsPaginatorOptions is the paginator options for // DescribeReplications type DescribeReplicationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeReplicationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeReplicationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeReplicationsAPIClient is a client that implements the +// DescribeReplications operation. +type DescribeReplicationsAPIClient interface { + DescribeReplications(context.Context, *DescribeReplicationsInput, ...func(*Options)) (*DescribeReplicationsOutput, error) +} + +var _ DescribeReplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeSchemas.go b/service/databasemigrationservice/api_op_DescribeSchemas.go index 5b4c92e61a7..21c449f741a 100644 --- a/service/databasemigrationservice/api_op_DescribeSchemas.go +++ b/service/databasemigrationservice/api_op_DescribeSchemas.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeSchemasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSchemasValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeSchemasMiddlewares(stack *middleware.Stack, return nil } -// DescribeSchemasAPIClient is a client that implements the DescribeSchemas -// operation. -type DescribeSchemasAPIClient interface { - DescribeSchemas(context.Context, *DescribeSchemasInput, ...func(*Options)) (*DescribeSchemasOutput, error) -} - -var _ DescribeSchemasAPIClient = (*Client)(nil) - // DescribeSchemasPaginatorOptions is the paginator options for DescribeSchemas type DescribeSchemasPaginatorOptions struct { // The maximum number of records to include in the response. If more records @@ -225,6 +220,9 @@ func (p *DescribeSchemasPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeSchemasPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeSchemasAPIClient is a client that implements the DescribeSchemas +// operation. +type DescribeSchemasAPIClient interface { + DescribeSchemas(context.Context, *DescribeSchemasInput, ...func(*Options)) (*DescribeSchemasOutput, error) +} + +var _ DescribeSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_DescribeTableStatistics.go b/service/databasemigrationservice/api_op_DescribeTableStatistics.go index 56d747beb0d..1f32d3e435b 100644 --- a/service/databasemigrationservice/api_op_DescribeTableStatistics.go +++ b/service/databasemigrationservice/api_op_DescribeTableStatistics.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeTableStatisticsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTableStatisticsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeTableStatisticsMiddlewares(stack *middlewar return nil } -// DescribeTableStatisticsAPIClient is a client that implements the -// DescribeTableStatistics operation. -type DescribeTableStatisticsAPIClient interface { - DescribeTableStatistics(context.Context, *DescribeTableStatisticsInput, ...func(*Options)) (*DescribeTableStatisticsOutput, error) -} - -var _ DescribeTableStatisticsAPIClient = (*Client)(nil) - // DescribeTableStatisticsPaginatorOptions is the paginator options for // DescribeTableStatistics type DescribeTableStatisticsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *DescribeTableStatisticsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTableStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *DescribeTableStatisticsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeTableStatisticsAPIClient is a client that implements the +// DescribeTableStatistics operation. +type DescribeTableStatisticsAPIClient interface { + DescribeTableStatistics(context.Context, *DescribeTableStatisticsInput, ...func(*Options)) (*DescribeTableStatisticsOutput, error) +} + +var _ DescribeTableStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTableStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databasemigrationservice/api_op_ExportMetadataModelAssessment.go b/service/databasemigrationservice/api_op_ExportMetadataModelAssessment.go index 995598ed9c3..7676bb9de6d 100644 --- a/service/databasemigrationservice/api_op_ExportMetadataModelAssessment.go +++ b/service/databasemigrationservice/api_op_ExportMetadataModelAssessment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationExportMetadataModelAssessmentMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportMetadataModelAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ImportCertificate.go b/service/databasemigrationservice/api_op_ImportCertificate.go index b6f92e910ea..f8d9df47ff9 100644 --- a/service/databasemigrationservice/api_op_ImportCertificate.go +++ b/service/databasemigrationservice/api_op_ImportCertificate.go @@ -121,6 +121,9 @@ func (c *Client) addOperationImportCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ListTagsForResource.go b/service/databasemigrationservice/api_op_ListTagsForResource.go index 5a2aa3c382d..c00915aa431 100644 --- a/service/databasemigrationservice/api_op_ListTagsForResource.go +++ b/service/databasemigrationservice/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyConversionConfiguration.go b/service/databasemigrationservice/api_op_ModifyConversionConfiguration.go index 991f09c7832..bcb740a62cd 100644 --- a/service/databasemigrationservice/api_op_ModifyConversionConfiguration.go +++ b/service/databasemigrationservice/api_op_ModifyConversionConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationModifyConversionConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyConversionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyDataProvider.go b/service/databasemigrationservice/api_op_ModifyDataProvider.go index 2a7da740ad5..0b80e621f21 100644 --- a/service/databasemigrationservice/api_op_ModifyDataProvider.go +++ b/service/databasemigrationservice/api_op_ModifyDataProvider.go @@ -138,6 +138,9 @@ func (c *Client) addOperationModifyDataProviderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDataProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyEndpoint.go b/service/databasemigrationservice/api_op_ModifyEndpoint.go index dbe471da592..8d420093af5 100644 --- a/service/databasemigrationservice/api_op_ModifyEndpoint.go +++ b/service/databasemigrationservice/api_op_ModifyEndpoint.go @@ -313,6 +313,9 @@ func (c *Client) addOperationModifyEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyEventSubscription.go b/service/databasemigrationservice/api_op_ModifyEventSubscription.go index 39a908df84e..4656b4310bf 100644 --- a/service/databasemigrationservice/api_op_ModifyEventSubscription.go +++ b/service/databasemigrationservice/api_op_ModifyEventSubscription.go @@ -123,6 +123,9 @@ func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyInstanceProfile.go b/service/databasemigrationservice/api_op_ModifyInstanceProfile.go index 0d01195fa17..08ed7378ed2 100644 --- a/service/databasemigrationservice/api_op_ModifyInstanceProfile.go +++ b/service/databasemigrationservice/api_op_ModifyInstanceProfile.go @@ -151,6 +151,9 @@ func (c *Client) addOperationModifyInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyMigrationProject.go b/service/databasemigrationservice/api_op_ModifyMigrationProject.go index 6ef942ef610..648dfb2c93e 100644 --- a/service/databasemigrationservice/api_op_ModifyMigrationProject.go +++ b/service/databasemigrationservice/api_op_ModifyMigrationProject.go @@ -137,6 +137,9 @@ func (c *Client) addOperationModifyMigrationProjectMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyMigrationProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyReplicationConfig.go b/service/databasemigrationservice/api_op_ModifyReplicationConfig.go index 166daa876ba..f51883b5ff1 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationConfig.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationConfig.go @@ -141,6 +141,9 @@ func (c *Client) addOperationModifyReplicationConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReplicationConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyReplicationInstance.go b/service/databasemigrationservice/api_op_ModifyReplicationInstance.go index 54ab87717e3..6635f02a235 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationInstance.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationInstance.go @@ -190,6 +190,9 @@ func (c *Client) addOperationModifyReplicationInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go b/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go index 1e088e7358f..2d49e5478bf 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationSubnetGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationModifyReplicationSubnetGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReplicationSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ModifyReplicationTask.go b/service/databasemigrationservice/api_op_ModifyReplicationTask.go index b551119df57..a705b0df403 100644 --- a/service/databasemigrationservice/api_op_ModifyReplicationTask.go +++ b/service/databasemigrationservice/api_op_ModifyReplicationTask.go @@ -182,6 +182,9 @@ func (c *Client) addOperationModifyReplicationTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReplicationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_MoveReplicationTask.go b/service/databasemigrationservice/api_op_MoveReplicationTask.go index 6178cb71899..700388ec1f5 100644 --- a/service/databasemigrationservice/api_op_MoveReplicationTask.go +++ b/service/databasemigrationservice/api_op_MoveReplicationTask.go @@ -114,6 +114,9 @@ func (c *Client) addOperationMoveReplicationTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMoveReplicationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_RebootReplicationInstance.go b/service/databasemigrationservice/api_op_RebootReplicationInstance.go index f06eb2be1d5..195b3c22a1b 100644 --- a/service/databasemigrationservice/api_op_RebootReplicationInstance.go +++ b/service/databasemigrationservice/api_op_RebootReplicationInstance.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRebootReplicationInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootReplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_RefreshSchemas.go b/service/databasemigrationservice/api_op_RefreshSchemas.go index 768896de527..fedd65d6e3b 100644 --- a/service/databasemigrationservice/api_op_RefreshSchemas.go +++ b/service/databasemigrationservice/api_op_RefreshSchemas.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRefreshSchemasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRefreshSchemasValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ReloadReplicationTables.go b/service/databasemigrationservice/api_op_ReloadReplicationTables.go index c727f927e15..2d1a06daf23 100644 --- a/service/databasemigrationservice/api_op_ReloadReplicationTables.go +++ b/service/databasemigrationservice/api_op_ReloadReplicationTables.go @@ -120,6 +120,9 @@ func (c *Client) addOperationReloadReplicationTablesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReloadReplicationTablesValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_ReloadTables.go b/service/databasemigrationservice/api_op_ReloadTables.go index 8eb4f36cfc6..5d4c0953f7b 100644 --- a/service/databasemigrationservice/api_op_ReloadTables.go +++ b/service/databasemigrationservice/api_op_ReloadTables.go @@ -123,6 +123,9 @@ func (c *Client) addOperationReloadTablesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReloadTablesValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_RemoveTagsFromResource.go b/service/databasemigrationservice/api_op_RemoveTagsFromResource.go index f5341c5237c..d2efe5c5c19 100644 --- a/service/databasemigrationservice/api_op_RemoveTagsFromResource.go +++ b/service/databasemigrationservice/api_op_RemoveTagsFromResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_RunFleetAdvisorLsaAnalysis.go b/service/databasemigrationservice/api_op_RunFleetAdvisorLsaAnalysis.go index 0b75a745422..6a91991587a 100644 --- a/service/databasemigrationservice/api_op_RunFleetAdvisorLsaAnalysis.go +++ b/service/databasemigrationservice/api_op_RunFleetAdvisorLsaAnalysis.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRunFleetAdvisorLsaAnalysisMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRunFleetAdvisorLsaAnalysis(options.Region), middleware.Before); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartExtensionPackAssociation.go b/service/databasemigrationservice/api_op_StartExtensionPackAssociation.go index a5dd6fc6662..386d20318d5 100644 --- a/service/databasemigrationservice/api_op_StartExtensionPackAssociation.go +++ b/service/databasemigrationservice/api_op_StartExtensionPackAssociation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartExtensionPackAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExtensionPackAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartMetadataModelAssessment.go b/service/databasemigrationservice/api_op_StartMetadataModelAssessment.go index e220a9b24ee..dbd4548b111 100644 --- a/service/databasemigrationservice/api_op_StartMetadataModelAssessment.go +++ b/service/databasemigrationservice/api_op_StartMetadataModelAssessment.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartMetadataModelAssessmentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMetadataModelAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartMetadataModelConversion.go b/service/databasemigrationservice/api_op_StartMetadataModelConversion.go index e4e277e4341..b77e677cccd 100644 --- a/service/databasemigrationservice/api_op_StartMetadataModelConversion.go +++ b/service/databasemigrationservice/api_op_StartMetadataModelConversion.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartMetadataModelConversionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMetadataModelConversionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartMetadataModelExportAsScript.go b/service/databasemigrationservice/api_op_StartMetadataModelExportAsScript.go index 17c668c0c14..09328a1dd73 100644 --- a/service/databasemigrationservice/api_op_StartMetadataModelExportAsScript.go +++ b/service/databasemigrationservice/api_op_StartMetadataModelExportAsScript.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStartMetadataModelExportAsScriptMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMetadataModelExportAsScriptValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartMetadataModelExportToTarget.go b/service/databasemigrationservice/api_op_StartMetadataModelExportToTarget.go index bbecf859f49..0943fc5dd0f 100644 --- a/service/databasemigrationservice/api_op_StartMetadataModelExportToTarget.go +++ b/service/databasemigrationservice/api_op_StartMetadataModelExportToTarget.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartMetadataModelExportToTargetMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMetadataModelExportToTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartMetadataModelImport.go b/service/databasemigrationservice/api_op_StartMetadataModelImport.go index 2017acf7475..d28782bda21 100644 --- a/service/databasemigrationservice/api_op_StartMetadataModelImport.go +++ b/service/databasemigrationservice/api_op_StartMetadataModelImport.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStartMetadataModelImportMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMetadataModelImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartRecommendations.go b/service/databasemigrationservice/api_op_StartRecommendations.go index 0fb98f7948c..5dc9ff616b9 100644 --- a/service/databasemigrationservice/api_op_StartRecommendations.go +++ b/service/databasemigrationservice/api_op_StartRecommendations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStartRecommendationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartReplication.go b/service/databasemigrationservice/api_op_StartReplication.go index c76a639f2fa..bd5d0646a27 100644 --- a/service/databasemigrationservice/api_op_StartReplication.go +++ b/service/databasemigrationservice/api_op_StartReplication.go @@ -132,6 +132,9 @@ func (c *Client) addOperationStartReplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartReplicationTask.go b/service/databasemigrationservice/api_op_StartReplicationTask.go index 4172938dba5..e9bd6168d6f 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTask.go +++ b/service/databasemigrationservice/api_op_StartReplicationTask.go @@ -169,6 +169,9 @@ func (c *Client) addOperationStartReplicationTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplicationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go b/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go index 3da3b6c1db5..e91a3b30c77 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go +++ b/service/databasemigrationservice/api_op_StartReplicationTaskAssessment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStartReplicationTaskAssessmentMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplicationTaskAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go b/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go index 6215e875111..39f289b7005 100644 --- a/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go +++ b/service/databasemigrationservice/api_op_StartReplicationTaskAssessmentRun.go @@ -178,6 +178,9 @@ func (c *Client) addOperationStartReplicationTaskAssessmentRunMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplicationTaskAssessmentRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StopReplication.go b/service/databasemigrationservice/api_op_StopReplication.go index d06634b1ae4..5bd27b46b22 100644 --- a/service/databasemigrationservice/api_op_StopReplication.go +++ b/service/databasemigrationservice/api_op_StopReplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopReplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_StopReplicationTask.go b/service/databasemigrationservice/api_op_StopReplicationTask.go index b765f408476..f405143cdf0 100644 --- a/service/databasemigrationservice/api_op_StopReplicationTask.go +++ b/service/databasemigrationservice/api_op_StopReplicationTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopReplicationTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopReplicationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_TestConnection.go b/service/databasemigrationservice/api_op_TestConnection.go index 515dd3e89f3..95d8e2530db 100644 --- a/service/databasemigrationservice/api_op_TestConnection.go +++ b/service/databasemigrationservice/api_op_TestConnection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTestConnectionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go b/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go index 7285be92cbc..7373e5cd3f8 100644 --- a/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go +++ b/service/databasemigrationservice/api_op_UpdateSubscriptionsToEventBridge.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateSubscriptionsToEventBridgeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSubscriptionsToEventBridge(options.Region), middleware.Before); err != nil { return err } diff --git a/service/databrew/api_client.go b/service/databrew/api_client.go index c15018743f4..5a43a5995ed 100644 --- a/service/databrew/api_client.go +++ b/service/databrew/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/databrew/api_op_BatchDeleteRecipeVersion.go b/service/databrew/api_op_BatchDeleteRecipeVersion.go index 95de059519f..11a71e70d0d 100644 --- a/service/databrew/api_op_BatchDeleteRecipeVersion.go +++ b/service/databrew/api_op_BatchDeleteRecipeVersion.go @@ -145,6 +145,9 @@ func (c *Client) addOperationBatchDeleteRecipeVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteRecipeVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateDataset.go b/service/databrew/api_op_CreateDataset.go index bd30c59ab8c..91538222a6b 100644 --- a/service/databrew/api_op_CreateDataset.go +++ b/service/databrew/api_op_CreateDataset.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateProfileJob.go b/service/databrew/api_op_CreateProfileJob.go index c7e3415b605..37b60fb7e5f 100644 --- a/service/databrew/api_op_CreateProfileJob.go +++ b/service/databrew/api_op_CreateProfileJob.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateProfileJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProfileJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateProject.go b/service/databrew/api_op_CreateProject.go index 3ea51c09aa6..72904015753 100644 --- a/service/databrew/api_op_CreateProject.go +++ b/service/databrew/api_op_CreateProject.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateRecipe.go b/service/databrew/api_op_CreateRecipe.go index 8338ce91c66..b2887fc666a 100644 --- a/service/databrew/api_op_CreateRecipe.go +++ b/service/databrew/api_op_CreateRecipe.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateRecipeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateRecipeJob.go b/service/databrew/api_op_CreateRecipeJob.go index c1f8c7dd424..efb231c9d7f 100644 --- a/service/databrew/api_op_CreateRecipeJob.go +++ b/service/databrew/api_op_CreateRecipeJob.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateRecipeJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRecipeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateRuleset.go b/service/databrew/api_op_CreateRuleset.go index e7cdeb87fac..2514c71379a 100644 --- a/service/databrew/api_op_CreateRuleset.go +++ b/service/databrew/api_op_CreateRuleset.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateRulesetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_CreateSchedule.go b/service/databrew/api_op_CreateSchedule.go index e9bc42923ee..8d5f34770d1 100644 --- a/service/databrew/api_op_CreateSchedule.go +++ b/service/databrew/api_op_CreateSchedule.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DeleteDataset.go b/service/databrew/api_op_DeleteDataset.go index e1859bc8ee8..04c95a80578 100644 --- a/service/databrew/api_op_DeleteDataset.go +++ b/service/databrew/api_op_DeleteDataset.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DeleteJob.go b/service/databrew/api_op_DeleteJob.go index 3cd05a60684..e3f8f28ba59 100644 --- a/service/databrew/api_op_DeleteJob.go +++ b/service/databrew/api_op_DeleteJob.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DeleteProject.go b/service/databrew/api_op_DeleteProject.go index ef3d91bee3c..49983c38590 100644 --- a/service/databrew/api_op_DeleteProject.go +++ b/service/databrew/api_op_DeleteProject.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DeleteRecipeVersion.go b/service/databrew/api_op_DeleteRecipeVersion.go index d9107f726c1..e9ae5194965 100644 --- a/service/databrew/api_op_DeleteRecipeVersion.go +++ b/service/databrew/api_op_DeleteRecipeVersion.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteRecipeVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecipeVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DeleteRuleset.go b/service/databrew/api_op_DeleteRuleset.go index 413e457152e..d801adb786c 100644 --- a/service/databrew/api_op_DeleteRuleset.go +++ b/service/databrew/api_op_DeleteRuleset.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteRulesetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DeleteSchedule.go b/service/databrew/api_op_DeleteSchedule.go index 374043d5b06..086212b20f9 100644 --- a/service/databrew/api_op_DeleteSchedule.go +++ b/service/databrew/api_op_DeleteSchedule.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeDataset.go b/service/databrew/api_op_DescribeDataset.go index 07f9436ce2c..4802ca1cf61 100644 --- a/service/databrew/api_op_DescribeDataset.go +++ b/service/databrew/api_op_DescribeDataset.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeJob.go b/service/databrew/api_op_DescribeJob.go index 4c714a32bfa..8e855f0830d 100644 --- a/service/databrew/api_op_DescribeJob.go +++ b/service/databrew/api_op_DescribeJob.go @@ -196,6 +196,9 @@ func (c *Client) addOperationDescribeJobMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeJobRun.go b/service/databrew/api_op_DescribeJobRun.go index 4fa20a1a0a2..377107188ac 100644 --- a/service/databrew/api_op_DescribeJobRun.go +++ b/service/databrew/api_op_DescribeJobRun.go @@ -176,6 +176,9 @@ func (c *Client) addOperationDescribeJobRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeProject.go b/service/databrew/api_op_DescribeProject.go index f461379df1e..70dbd76341a 100644 --- a/service/databrew/api_op_DescribeProject.go +++ b/service/databrew/api_op_DescribeProject.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeRecipe.go b/service/databrew/api_op_DescribeRecipe.go index 502accadc14..669202dbaa4 100644 --- a/service/databrew/api_op_DescribeRecipe.go +++ b/service/databrew/api_op_DescribeRecipe.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeRecipeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeRuleset.go b/service/databrew/api_op_DescribeRuleset.go index ee9dab29de6..319bb000db3 100644 --- a/service/databrew/api_op_DescribeRuleset.go +++ b/service/databrew/api_op_DescribeRuleset.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeRulesetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_DescribeSchedule.go b/service/databrew/api_op_DescribeSchedule.go index 34e553fbeed..8c636aac3f6 100644 --- a/service/databrew/api_op_DescribeSchedule.go +++ b/service/databrew/api_op_DescribeSchedule.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeScheduleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_ListDatasets.go b/service/databrew/api_op_ListDatasets.go index 732a51c666b..344d2edf08c 100644 --- a/service/databrew/api_op_ListDatasets.go +++ b/service/databrew/api_op_ListDatasets.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -204,6 +200,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListJobRuns.go b/service/databrew/api_op_ListJobRuns.go index ae2c36d37e3..b4ccc96831c 100644 --- a/service/databrew/api_op_ListJobRuns.go +++ b/service/databrew/api_op_ListJobRuns.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListJobRunsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobRunsValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListJobRunsMiddlewares(stack *middleware.Stack, opt return nil } -// ListJobRunsAPIClient is a client that implements the ListJobRuns operation. -type ListJobRunsAPIClient interface { - ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error) -} - -var _ ListJobRunsAPIClient = (*Client)(nil) - // ListJobRunsPaginatorOptions is the paginator options for ListJobRuns type ListJobRunsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -212,6 +208,9 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListJobRunsAPIClient is a client that implements the ListJobRuns operation. +type ListJobRunsAPIClient interface { + ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error) +} + +var _ ListJobRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListJobs.go b/service/databrew/api_op_ListJobs.go index 46fe0b04511..d575da61323 100644 --- a/service/databrew/api_op_ListJobs.go +++ b/service/databrew/api_op_ListJobs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -214,6 +210,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListProjects.go b/service/databrew/api_op_ListProjects.go index c61ced81b32..704092d5bee 100644 --- a/service/databrew/api_op_ListProjects.go +++ b/service/databrew/api_op_ListProjects.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -204,6 +200,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListRecipeVersions.go b/service/databrew/api_op_ListRecipeVersions.go index 7d04a314876..31d4faea1a2 100644 --- a/service/databrew/api_op_ListRecipeVersions.go +++ b/service/databrew/api_op_ListRecipeVersions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRecipeVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecipeVersionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListRecipeVersionsMiddlewares(stack *middleware.Sta return nil } -// ListRecipeVersionsAPIClient is a client that implements the ListRecipeVersions -// operation. -type ListRecipeVersionsAPIClient interface { - ListRecipeVersions(context.Context, *ListRecipeVersionsInput, ...func(*Options)) (*ListRecipeVersionsOutput, error) -} - -var _ ListRecipeVersionsAPIClient = (*Client)(nil) - // ListRecipeVersionsPaginatorOptions is the paginator options for // ListRecipeVersions type ListRecipeVersionsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListRecipeVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecipeVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListRecipeVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListRecipeVersionsAPIClient is a client that implements the ListRecipeVersions +// operation. +type ListRecipeVersionsAPIClient interface { + ListRecipeVersions(context.Context, *ListRecipeVersionsInput, ...func(*Options)) (*ListRecipeVersionsOutput, error) +} + +var _ ListRecipeVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecipeVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListRecipes.go b/service/databrew/api_op_ListRecipes.go index 6300cf5d809..98b5c8ab313 100644 --- a/service/databrew/api_op_ListRecipes.go +++ b/service/databrew/api_op_ListRecipes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRecipesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecipes(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListRecipesMiddlewares(stack *middleware.Stack, opt return nil } -// ListRecipesAPIClient is a client that implements the ListRecipes operation. -type ListRecipesAPIClient interface { - ListRecipes(context.Context, *ListRecipesInput, ...func(*Options)) (*ListRecipesOutput, error) -} - -var _ ListRecipesAPIClient = (*Client)(nil) - // ListRecipesPaginatorOptions is the paginator options for ListRecipes type ListRecipesPaginatorOptions struct { // The maximum number of results to return in this request. @@ -211,6 +207,9 @@ func (p *ListRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecipes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListRecipesAPIClient is a client that implements the ListRecipes operation. +type ListRecipesAPIClient interface { + ListRecipes(context.Context, *ListRecipesInput, ...func(*Options)) (*ListRecipesOutput, error) +} + +var _ ListRecipesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecipes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListRulesets.go b/service/databrew/api_op_ListRulesets.go index 1fc153a189a..d63e3c0e28b 100644 --- a/service/databrew/api_op_ListRulesets.go +++ b/service/databrew/api_op_ListRulesets.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListRulesetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRulesets(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListRulesetsMiddlewares(stack *middleware.Stack, op return nil } -// ListRulesetsAPIClient is a client that implements the ListRulesets operation. -type ListRulesetsAPIClient interface { - ListRulesets(context.Context, *ListRulesetsInput, ...func(*Options)) (*ListRulesetsOutput, error) -} - -var _ ListRulesetsAPIClient = (*Client)(nil) - // ListRulesetsPaginatorOptions is the paginator options for ListRulesets type ListRulesetsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -212,6 +208,9 @@ func (p *ListRulesetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRulesets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListRulesetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListRulesetsAPIClient is a client that implements the ListRulesets operation. +type ListRulesetsAPIClient interface { + ListRulesets(context.Context, *ListRulesetsInput, ...func(*Options)) (*ListRulesetsOutput, error) +} + +var _ ListRulesetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRulesets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListSchedules.go b/service/databrew/api_op_ListSchedules.go index 5238c99ca73..6060e8ea762 100644 --- a/service/databrew/api_op_ListSchedules.go +++ b/service/databrew/api_op_ListSchedules.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListSchedulesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchedules(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListSchedulesMiddlewares(stack *middleware.Stack, o return nil } -// ListSchedulesAPIClient is a client that implements the ListSchedules operation. -type ListSchedulesAPIClient interface { - ListSchedules(context.Context, *ListSchedulesInput, ...func(*Options)) (*ListSchedulesOutput, error) -} - -var _ ListSchedulesAPIClient = (*Client)(nil) - // ListSchedulesPaginatorOptions is the paginator options for ListSchedules type ListSchedulesPaginatorOptions struct { // The maximum number of results to return in this request. @@ -207,6 +203,9 @@ func (p *ListSchedulesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchedules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListSchedulesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListSchedulesAPIClient is a client that implements the ListSchedules operation. +type ListSchedulesAPIClient interface { + ListSchedules(context.Context, *ListSchedulesInput, ...func(*Options)) (*ListSchedulesOutput, error) +} + +var _ ListSchedulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchedules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/databrew/api_op_ListTagsForResource.go b/service/databrew/api_op_ListTagsForResource.go index e93e2774198..dd3e034e07a 100644 --- a/service/databrew/api_op_ListTagsForResource.go +++ b/service/databrew/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_PublishRecipe.go b/service/databrew/api_op_PublishRecipe.go index 9832a0494eb..d4933043061 100644 --- a/service/databrew/api_op_PublishRecipe.go +++ b/service/databrew/api_op_PublishRecipe.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPublishRecipeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_SendProjectSessionAction.go b/service/databrew/api_op_SendProjectSessionAction.go index 97b3b5bc202..7ddef942593 100644 --- a/service/databrew/api_op_SendProjectSessionAction.go +++ b/service/databrew/api_op_SendProjectSessionAction.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSendProjectSessionActionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendProjectSessionActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_StartJobRun.go b/service/databrew/api_op_StartJobRun.go index 9a3d8be4a0c..c349cb58548 100644 --- a/service/databrew/api_op_StartJobRun.go +++ b/service/databrew/api_op_StartJobRun.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartJobRunMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_StartProjectSession.go b/service/databrew/api_op_StartProjectSession.go index f3f186edd63..f460c039f78 100644 --- a/service/databrew/api_op_StartProjectSession.go +++ b/service/databrew/api_op_StartProjectSession.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartProjectSessionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartProjectSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_StopJobRun.go b/service/databrew/api_op_StopJobRun.go index 5537f821a15..f3130afb3d0 100644 --- a/service/databrew/api_op_StopJobRun.go +++ b/service/databrew/api_op_StopJobRun.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStopJobRunMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_TagResource.go b/service/databrew/api_op_TagResource.go index 81b9ddc1408..6d43762cabc 100644 --- a/service/databrew/api_op_TagResource.go +++ b/service/databrew/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UntagResource.go b/service/databrew/api_op_UntagResource.go index 5e8f97319aa..b245468c703 100644 --- a/service/databrew/api_op_UntagResource.go +++ b/service/databrew/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateDataset.go b/service/databrew/api_op_UpdateDataset.go index 367a2f0ee0e..a8190fe26a7 100644 --- a/service/databrew/api_op_UpdateDataset.go +++ b/service/databrew/api_op_UpdateDataset.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateProfileJob.go b/service/databrew/api_op_UpdateProfileJob.go index 0bc0f42dc94..29be2352579 100644 --- a/service/databrew/api_op_UpdateProfileJob.go +++ b/service/databrew/api_op_UpdateProfileJob.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateProfileJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateProject.go b/service/databrew/api_op_UpdateProject.go index 131e65cf9f3..0de760f5d20 100644 --- a/service/databrew/api_op_UpdateProject.go +++ b/service/databrew/api_op_UpdateProject.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateRecipe.go b/service/databrew/api_op_UpdateRecipe.go index eade24206ca..2aff3de17ab 100644 --- a/service/databrew/api_op_UpdateRecipe.go +++ b/service/databrew/api_op_UpdateRecipe.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateRecipeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateRecipeJob.go b/service/databrew/api_op_UpdateRecipeJob.go index 8f371788a5d..5c8157b4cc3 100644 --- a/service/databrew/api_op_UpdateRecipeJob.go +++ b/service/databrew/api_op_UpdateRecipeJob.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateRecipeJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecipeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateRuleset.go b/service/databrew/api_op_UpdateRuleset.go index b48ccca5bd6..3662452a734 100644 --- a/service/databrew/api_op_UpdateRuleset.go +++ b/service/databrew/api_op_UpdateRuleset.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateRulesetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/databrew/api_op_UpdateSchedule.go b/service/databrew/api_op_UpdateSchedule.go index 08285239568..1608808c352 100644 --- a/service/databrew/api_op_UpdateSchedule.go +++ b/service/databrew/api_op_UpdateSchedule.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_client.go b/service/dataexchange/api_client.go index 972ae61789d..972a1d1cc37 100644 --- a/service/dataexchange/api_client.go +++ b/service/dataexchange/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/dataexchange/api_op_CancelJob.go b/service/dataexchange/api_op_CancelJob.go index 4b2ee236d87..31a4cfee3d7 100644 --- a/service/dataexchange/api_op_CancelJob.go +++ b/service/dataexchange/api_op_CancelJob.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_CreateDataSet.go b/service/dataexchange/api_op_CreateDataSet.go index 09534420847..aefdf9bb67a 100644 --- a/service/dataexchange/api_op_CreateDataSet.go +++ b/service/dataexchange/api_op_CreateDataSet.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateDataSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_CreateEventAction.go b/service/dataexchange/api_op_CreateEventAction.go index 932aff1166b..6aea87bd446 100644 --- a/service/dataexchange/api_op_CreateEventAction.go +++ b/service/dataexchange/api_op_CreateEventAction.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateEventActionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_CreateJob.go b/service/dataexchange/api_op_CreateJob.go index 86bf5c12748..2a3a103c9b7 100644 --- a/service/dataexchange/api_op_CreateJob.go +++ b/service/dataexchange/api_op_CreateJob.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_CreateRevision.go b/service/dataexchange/api_op_CreateRevision.go index 18f047852e1..04e009743a7 100644 --- a/service/dataexchange/api_op_CreateRevision.go +++ b/service/dataexchange/api_op_CreateRevision.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateRevisionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_DeleteAsset.go b/service/dataexchange/api_op_DeleteAsset.go index 05de9772f4c..676a3bc552f 100644 --- a/service/dataexchange/api_op_DeleteAsset.go +++ b/service/dataexchange/api_op_DeleteAsset.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_DeleteDataSet.go b/service/dataexchange/api_op_DeleteDataSet.go index 884a2a39591..5c0d0a071a7 100644 --- a/service/dataexchange/api_op_DeleteDataSet.go +++ b/service/dataexchange/api_op_DeleteDataSet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDataSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_DeleteEventAction.go b/service/dataexchange/api_op_DeleteEventAction.go index 954cc5576fb..6bd2b4529ea 100644 --- a/service/dataexchange/api_op_DeleteEventAction.go +++ b/service/dataexchange/api_op_DeleteEventAction.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteEventActionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_DeleteRevision.go b/service/dataexchange/api_op_DeleteRevision.go index 00692c95f1a..987b226bbd6 100644 --- a/service/dataexchange/api_op_DeleteRevision.go +++ b/service/dataexchange/api_op_DeleteRevision.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRevisionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_GetAsset.go b/service/dataexchange/api_op_GetAsset.go index 6fe44cdf6a0..297c747ab9f 100644 --- a/service/dataexchange/api_op_GetAsset.go +++ b/service/dataexchange/api_op_GetAsset.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetAssetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_GetDataSet.go b/service/dataexchange/api_op_GetDataSet.go index 7ac2a735650..4cf261d8bad 100644 --- a/service/dataexchange/api_op_GetDataSet.go +++ b/service/dataexchange/api_op_GetDataSet.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetDataSetMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_GetEventAction.go b/service/dataexchange/api_op_GetEventAction.go index a80e290d18e..995ee049044 100644 --- a/service/dataexchange/api_op_GetEventAction.go +++ b/service/dataexchange/api_op_GetEventAction.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetEventActionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_GetJob.go b/service/dataexchange/api_op_GetJob.go index 23c77ebc177..db39525deb0 100644 --- a/service/dataexchange/api_op_GetJob.go +++ b/service/dataexchange/api_op_GetJob.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_GetRevision.go b/service/dataexchange/api_op_GetRevision.go index 62b92a9c757..7abb67d1f48 100644 --- a/service/dataexchange/api_op_GetRevision.go +++ b/service/dataexchange/api_op_GetRevision.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetRevisionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_ListDataSetRevisions.go b/service/dataexchange/api_op_ListDataSetRevisions.go index ab83748ac33..a913898cf96 100644 --- a/service/dataexchange/api_op_ListDataSetRevisions.go +++ b/service/dataexchange/api_op_ListDataSetRevisions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDataSetRevisionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSetRevisionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListDataSetRevisionsMiddlewares(stack *middleware.S return nil } -// ListDataSetRevisionsAPIClient is a client that implements the -// ListDataSetRevisions operation. -type ListDataSetRevisionsAPIClient interface { - ListDataSetRevisions(context.Context, *ListDataSetRevisionsInput, ...func(*Options)) (*ListDataSetRevisionsOutput, error) -} - -var _ ListDataSetRevisionsAPIClient = (*Client)(nil) - // ListDataSetRevisionsPaginatorOptions is the paginator options for // ListDataSetRevisions type ListDataSetRevisionsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListDataSetRevisionsPaginator) NextPage(ctx context.Context, optFns ... params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSetRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListDataSetRevisionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDataSetRevisionsAPIClient is a client that implements the +// ListDataSetRevisions operation. +type ListDataSetRevisionsAPIClient interface { + ListDataSetRevisions(context.Context, *ListDataSetRevisionsInput, ...func(*Options)) (*ListDataSetRevisionsOutput, error) +} + +var _ ListDataSetRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSetRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dataexchange/api_op_ListDataSets.go b/service/dataexchange/api_op_ListDataSets.go index e804bf23ea6..35b1f497458 100644 --- a/service/dataexchange/api_op_ListDataSets.go +++ b/service/dataexchange/api_op_ListDataSets.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDataSetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataSets(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListDataSetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDataSetsAPIClient is a client that implements the ListDataSets operation. -type ListDataSetsAPIClient interface { - ListDataSets(context.Context, *ListDataSetsInput, ...func(*Options)) (*ListDataSetsOutput, error) -} - -var _ ListDataSetsAPIClient = (*Client)(nil) - // ListDataSetsPaginatorOptions is the paginator options for ListDataSets type ListDataSetsPaginatorOptions struct { // The maximum number of results returned by a single call. @@ -205,6 +201,9 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDataSetsAPIClient is a client that implements the ListDataSets operation. +type ListDataSetsAPIClient interface { + ListDataSets(context.Context, *ListDataSetsInput, ...func(*Options)) (*ListDataSetsOutput, error) +} + +var _ ListDataSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dataexchange/api_op_ListEventActions.go b/service/dataexchange/api_op_ListEventActions.go index bf796eafcd9..73cc4d5c6aa 100644 --- a/service/dataexchange/api_op_ListEventActions.go +++ b/service/dataexchange/api_op_ListEventActions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEventActionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventActions(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEventActionsMiddlewares(stack *middleware.Stack return nil } -// ListEventActionsAPIClient is a client that implements the ListEventActions -// operation. -type ListEventActionsAPIClient interface { - ListEventActions(context.Context, *ListEventActionsInput, ...func(*Options)) (*ListEventActionsOutput, error) -} - -var _ ListEventActionsAPIClient = (*Client)(nil) - // ListEventActionsPaginatorOptions is the paginator options for ListEventActions type ListEventActionsPaginatorOptions struct { // The maximum number of results returned by a single call. @@ -203,6 +198,9 @@ func (p *ListEventActionsPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListEventActionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEventActionsAPIClient is a client that implements the ListEventActions +// operation. +type ListEventActionsAPIClient interface { + ListEventActions(context.Context, *ListEventActionsInput, ...func(*Options)) (*ListEventActionsOutput, error) +} + +var _ ListEventActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dataexchange/api_op_ListJobs.go b/service/dataexchange/api_op_ListJobs.go index cb244907566..810de2ceb52 100644 --- a/service/dataexchange/api_op_ListJobs.go +++ b/service/dataexchange/api_op_ListJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of results returned by a single call. @@ -205,6 +201,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dataexchange/api_op_ListRevisionAssets.go b/service/dataexchange/api_op_ListRevisionAssets.go index b0e7dc54914..c64c0293acd 100644 --- a/service/dataexchange/api_op_ListRevisionAssets.go +++ b/service/dataexchange/api_op_ListRevisionAssets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListRevisionAssetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRevisionAssetsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListRevisionAssetsMiddlewares(stack *middleware.Sta return nil } -// ListRevisionAssetsAPIClient is a client that implements the ListRevisionAssets -// operation. -type ListRevisionAssetsAPIClient interface { - ListRevisionAssets(context.Context, *ListRevisionAssetsInput, ...func(*Options)) (*ListRevisionAssetsOutput, error) -} - -var _ ListRevisionAssetsAPIClient = (*Client)(nil) - // ListRevisionAssetsPaginatorOptions is the paginator options for // ListRevisionAssets type ListRevisionAssetsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListRevisionAssetsPaginator) NextPage(ctx context.Context, optFns ...fu params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRevisionAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListRevisionAssetsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListRevisionAssetsAPIClient is a client that implements the ListRevisionAssets +// operation. +type ListRevisionAssetsAPIClient interface { + ListRevisionAssets(context.Context, *ListRevisionAssetsInput, ...func(*Options)) (*ListRevisionAssetsOutput, error) +} + +var _ ListRevisionAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRevisionAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dataexchange/api_op_ListTagsForResource.go b/service/dataexchange/api_op_ListTagsForResource.go index 230b4373174..5ef4cd2f1ec 100644 --- a/service/dataexchange/api_op_ListTagsForResource.go +++ b/service/dataexchange/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_RevokeRevision.go b/service/dataexchange/api_op_RevokeRevision.go index 13077dc293d..390d5fead7b 100644 --- a/service/dataexchange/api_op_RevokeRevision.go +++ b/service/dataexchange/api_op_RevokeRevision.go @@ -156,6 +156,9 @@ func (c *Client) addOperationRevokeRevisionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_SendApiAsset.go b/service/dataexchange/api_op_SendApiAsset.go index 0f8966b28d7..2b5c79567de 100644 --- a/service/dataexchange/api_op_SendApiAsset.go +++ b/service/dataexchange/api_op_SendApiAsset.go @@ -142,6 +142,9 @@ func (c *Client) addOperationSendApiAssetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSendApiAssetMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_SendDataSetNotification.go b/service/dataexchange/api_op_SendDataSetNotification.go index 73eecdf7172..92fdab1bf93 100644 --- a/service/dataexchange/api_op_SendDataSetNotification.go +++ b/service/dataexchange/api_op_SendDataSetNotification.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSendDataSetNotificationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendDataSetNotificationMiddleware(stack, options); err != nil { return err } diff --git a/service/dataexchange/api_op_StartJob.go b/service/dataexchange/api_op_StartJob.go index f2702a9d5fc..2ff774a6451 100644 --- a/service/dataexchange/api_op_StartJob.go +++ b/service/dataexchange/api_op_StartJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStartJobMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_TagResource.go b/service/dataexchange/api_op_TagResource.go index 2837e992d88..9149d428dd3 100644 --- a/service/dataexchange/api_op_TagResource.go +++ b/service/dataexchange/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_UntagResource.go b/service/dataexchange/api_op_UntagResource.go index 0e5c541ebb5..c7b73bec538 100644 --- a/service/dataexchange/api_op_UntagResource.go +++ b/service/dataexchange/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_UpdateAsset.go b/service/dataexchange/api_op_UpdateAsset.go index 4c2f9eafd45..c9221d2c9d9 100644 --- a/service/dataexchange/api_op_UpdateAsset.go +++ b/service/dataexchange/api_op_UpdateAsset.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_UpdateDataSet.go b/service/dataexchange/api_op_UpdateDataSet.go index 65a82b20ebb..67f4a3bf909 100644 --- a/service/dataexchange/api_op_UpdateDataSet.go +++ b/service/dataexchange/api_op_UpdateDataSet.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateDataSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_UpdateEventAction.go b/service/dataexchange/api_op_UpdateEventAction.go index 8394365abc0..c93dff77a03 100644 --- a/service/dataexchange/api_op_UpdateEventAction.go +++ b/service/dataexchange/api_op_UpdateEventAction.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateEventActionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/dataexchange/api_op_UpdateRevision.go b/service/dataexchange/api_op_UpdateRevision.go index 6ec4bcfa15d..bea78effda0 100644 --- a/service/dataexchange/api_op_UpdateRevision.go +++ b/service/dataexchange/api_op_UpdateRevision.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateRevisionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_client.go b/service/datapipeline/api_client.go index f75265cd823..9f19ad78a2f 100644 --- a/service/datapipeline/api_client.go +++ b/service/datapipeline/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/datapipeline/api_op_ActivatePipeline.go b/service/datapipeline/api_op_ActivatePipeline.go index f22228d3afe..0330711c8e7 100644 --- a/service/datapipeline/api_op_ActivatePipeline.go +++ b/service/datapipeline/api_op_ActivatePipeline.go @@ -132,6 +132,9 @@ func (c *Client) addOperationActivatePipelineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_AddTags.go b/service/datapipeline/api_op_AddTags.go index 211ce547e54..cd0c105317e 100644 --- a/service/datapipeline/api_op_AddTags.go +++ b/service/datapipeline/api_op_AddTags.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_CreatePipeline.go b/service/datapipeline/api_op_CreatePipeline.go index 1639655147b..a32b078e8e2 100644 --- a/service/datapipeline/api_op_CreatePipeline.go +++ b/service/datapipeline/api_op_CreatePipeline.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_DeactivatePipeline.go b/service/datapipeline/api_op_DeactivatePipeline.go index 18d2c1aab39..e52b4e763e9 100644 --- a/service/datapipeline/api_op_DeactivatePipeline.go +++ b/service/datapipeline/api_op_DeactivatePipeline.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeactivatePipelineMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_DeletePipeline.go b/service/datapipeline/api_op_DeletePipeline.go index ec3494a3f2b..de785d630a4 100644 --- a/service/datapipeline/api_op_DeletePipeline.go +++ b/service/datapipeline/api_op_DeletePipeline.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeletePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_DescribeObjects.go b/service/datapipeline/api_op_DescribeObjects.go index 5943e5e06d1..a3ebd867b21 100644 --- a/service/datapipeline/api_op_DescribeObjects.go +++ b/service/datapipeline/api_op_DescribeObjects.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeObjectsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeObjectsValidationMiddleware(stack); err != nil { return err } @@ -181,14 +184,6 @@ func (c *Client) addOperationDescribeObjectsMiddlewares(stack *middleware.Stack, return nil } -// DescribeObjectsAPIClient is a client that implements the DescribeObjects -// operation. -type DescribeObjectsAPIClient interface { - DescribeObjects(context.Context, *DescribeObjectsInput, ...func(*Options)) (*DescribeObjectsOutput, error) -} - -var _ DescribeObjectsAPIClient = (*Client)(nil) - // DescribeObjectsPaginatorOptions is the paginator options for DescribeObjects type DescribeObjectsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -240,6 +235,9 @@ func (p *DescribeObjectsPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeObjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeObjectsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeObjectsAPIClient is a client that implements the DescribeObjects +// operation. +type DescribeObjectsAPIClient interface { + DescribeObjects(context.Context, *DescribeObjectsInput, ...func(*Options)) (*DescribeObjectsOutput, error) +} + +var _ DescribeObjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeObjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datapipeline/api_op_DescribePipelines.go b/service/datapipeline/api_op_DescribePipelines.go index 11d044f0c2e..8b7582876e9 100644 --- a/service/datapipeline/api_op_DescribePipelines.go +++ b/service/datapipeline/api_op_DescribePipelines.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribePipelinesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePipelinesValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_EvaluateExpression.go b/service/datapipeline/api_op_EvaluateExpression.go index 69d0227439a..eb395f0bf10 100644 --- a/service/datapipeline/api_op_EvaluateExpression.go +++ b/service/datapipeline/api_op_EvaluateExpression.go @@ -136,6 +136,9 @@ func (c *Client) addOperationEvaluateExpressionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEvaluateExpressionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_GetPipelineDefinition.go b/service/datapipeline/api_op_GetPipelineDefinition.go index bb2644d46dd..93ffc5ea692 100644 --- a/service/datapipeline/api_op_GetPipelineDefinition.go +++ b/service/datapipeline/api_op_GetPipelineDefinition.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetPipelineDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_ListPipelines.go b/service/datapipeline/api_op_ListPipelines.go index 8b5fcb5ea35..213b8f86275 100644 --- a/service/datapipeline/api_op_ListPipelines.go +++ b/service/datapipeline/api_op_ListPipelines.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelines(options.Region), middleware.Before); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o return nil } -// ListPipelinesAPIClient is a client that implements the ListPipelines operation. -type ListPipelinesAPIClient interface { - ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) -} - -var _ ListPipelinesAPIClient = (*Client)(nil) - // ListPipelinesPaginatorOptions is the paginator options for ListPipelines type ListPipelinesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -215,6 +211,9 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListPipelinesAPIClient is a client that implements the ListPipelines operation. +type ListPipelinesAPIClient interface { + ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) +} + +var _ ListPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datapipeline/api_op_PollForTask.go b/service/datapipeline/api_op_PollForTask.go index 2389c96e199..d19d8f47e85 100644 --- a/service/datapipeline/api_op_PollForTask.go +++ b/service/datapipeline/api_op_PollForTask.go @@ -171,6 +171,9 @@ func (c *Client) addOperationPollForTaskMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPollForTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_PutPipelineDefinition.go b/service/datapipeline/api_op_PutPipelineDefinition.go index 578d60a03d8..d027151212e 100644 --- a/service/datapipeline/api_op_PutPipelineDefinition.go +++ b/service/datapipeline/api_op_PutPipelineDefinition.go @@ -197,6 +197,9 @@ func (c *Client) addOperationPutPipelineDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPipelineDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_QueryObjects.go b/service/datapipeline/api_op_QueryObjects.go index 676272f5ac3..65e23414dc0 100644 --- a/service/datapipeline/api_op_QueryObjects.go +++ b/service/datapipeline/api_op_QueryObjects.go @@ -154,6 +154,9 @@ func (c *Client) addOperationQueryObjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryObjectsValidationMiddleware(stack); err != nil { return err } @@ -178,13 +181,6 @@ func (c *Client) addOperationQueryObjectsMiddlewares(stack *middleware.Stack, op return nil } -// QueryObjectsAPIClient is a client that implements the QueryObjects operation. -type QueryObjectsAPIClient interface { - QueryObjects(context.Context, *QueryObjectsInput, ...func(*Options)) (*QueryObjectsOutput, error) -} - -var _ QueryObjectsAPIClient = (*Client)(nil) - // QueryObjectsPaginatorOptions is the paginator options for QueryObjects type QueryObjectsPaginatorOptions struct { // The maximum number of object names that QueryObjects will return in a single @@ -249,6 +245,9 @@ func (p *QueryObjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.QueryObjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +267,13 @@ func (p *QueryObjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// QueryObjectsAPIClient is a client that implements the QueryObjects operation. +type QueryObjectsAPIClient interface { + QueryObjects(context.Context, *QueryObjectsInput, ...func(*Options)) (*QueryObjectsOutput, error) +} + +var _ QueryObjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opQueryObjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datapipeline/api_op_RemoveTags.go b/service/datapipeline/api_op_RemoveTags.go index a2d14325b2c..8096fce531d 100644 --- a/service/datapipeline/api_op_RemoveTags.go +++ b/service/datapipeline/api_op_RemoveTags.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_ReportTaskProgress.go b/service/datapipeline/api_op_ReportTaskProgress.go index 93dcd1c779e..50b8a79bf80 100644 --- a/service/datapipeline/api_op_ReportTaskProgress.go +++ b/service/datapipeline/api_op_ReportTaskProgress.go @@ -141,6 +141,9 @@ func (c *Client) addOperationReportTaskProgressMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReportTaskProgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_ReportTaskRunnerHeartbeat.go b/service/datapipeline/api_op_ReportTaskRunnerHeartbeat.go index d2ae13e05bd..6271e604929 100644 --- a/service/datapipeline/api_op_ReportTaskRunnerHeartbeat.go +++ b/service/datapipeline/api_op_ReportTaskRunnerHeartbeat.go @@ -140,6 +140,9 @@ func (c *Client) addOperationReportTaskRunnerHeartbeatMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReportTaskRunnerHeartbeatValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_SetStatus.go b/service/datapipeline/api_op_SetStatus.go index b4ecf8d13c0..b8f7368d2f9 100644 --- a/service/datapipeline/api_op_SetStatus.go +++ b/service/datapipeline/api_op_SetStatus.go @@ -131,6 +131,9 @@ func (c *Client) addOperationSetStatusMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_SetTaskStatus.go b/service/datapipeline/api_op_SetTaskStatus.go index 1fb88e09f0c..a2d11c9ec85 100644 --- a/service/datapipeline/api_op_SetTaskStatus.go +++ b/service/datapipeline/api_op_SetTaskStatus.go @@ -147,6 +147,9 @@ func (c *Client) addOperationSetTaskStatusMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTaskStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/datapipeline/api_op_ValidatePipelineDefinition.go b/service/datapipeline/api_op_ValidatePipelineDefinition.go index b7c6055c365..fc9e7de8f06 100644 --- a/service/datapipeline/api_op_ValidatePipelineDefinition.go +++ b/service/datapipeline/api_op_ValidatePipelineDefinition.go @@ -182,6 +182,9 @@ func (c *Client) addOperationValidatePipelineDefinitionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidatePipelineDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_client.go b/service/datasync/api_client.go index 0bb6c98e62d..86782d30718 100644 --- a/service/datasync/api_client.go +++ b/service/datasync/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/datasync/api_op_AddStorageSystem.go b/service/datasync/api_op_AddStorageSystem.go index c8ab6389ae5..d1eb79b0b15 100644 --- a/service/datasync/api_op_AddStorageSystem.go +++ b/service/datasync/api_op_AddStorageSystem.go @@ -152,6 +152,9 @@ func (c *Client) addOperationAddStorageSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAddStorageSystemMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CancelTaskExecution.go b/service/datasync/api_op_CancelTaskExecution.go index 56083dc746b..9998c9f2368 100644 --- a/service/datasync/api_op_CancelTaskExecution.go +++ b/service/datasync/api_op_CancelTaskExecution.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCancelTaskExecutionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelTaskExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateAgent.go b/service/datasync/api_op_CreateAgent.go index c304f466ef5..1adebfc05e6 100644 --- a/service/datasync/api_op_CreateAgent.go +++ b/service/datasync/api_op_CreateAgent.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationAzureBlob.go b/service/datasync/api_op_CreateLocationAzureBlob.go index 53151323f9f..85f2a3454b6 100644 --- a/service/datasync/api_op_CreateLocationAzureBlob.go +++ b/service/datasync/api_op_CreateLocationAzureBlob.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateLocationAzureBlobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationAzureBlobValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationEfs.go b/service/datasync/api_op_CreateLocationEfs.go index c03b386f5b0..5728f564c63 100644 --- a/service/datasync/api_op_CreateLocationEfs.go +++ b/service/datasync/api_op_CreateLocationEfs.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateLocationEfsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationEfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationFsxLustre.go b/service/datasync/api_op_CreateLocationFsxLustre.go index e20b26d1db3..8b9b8f9a770 100644 --- a/service/datasync/api_op_CreateLocationFsxLustre.go +++ b/service/datasync/api_op_CreateLocationFsxLustre.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateLocationFsxLustreMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationFsxLustreValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationFsxOntap.go b/service/datasync/api_op_CreateLocationFsxOntap.go index bd11555dab7..a72960f44ba 100644 --- a/service/datasync/api_op_CreateLocationFsxOntap.go +++ b/service/datasync/api_op_CreateLocationFsxOntap.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateLocationFsxOntapMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationFsxOntapValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationFsxOpenZfs.go b/service/datasync/api_op_CreateLocationFsxOpenZfs.go index fa010f5a14c..f3e89a9ed1d 100644 --- a/service/datasync/api_op_CreateLocationFsxOpenZfs.go +++ b/service/datasync/api_op_CreateLocationFsxOpenZfs.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateLocationFsxOpenZfsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationFsxOpenZfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationFsxWindows.go b/service/datasync/api_op_CreateLocationFsxWindows.go index 22c395ffad2..3078a9354bc 100644 --- a/service/datasync/api_op_CreateLocationFsxWindows.go +++ b/service/datasync/api_op_CreateLocationFsxWindows.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateLocationFsxWindowsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationFsxWindowsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationHdfs.go b/service/datasync/api_op_CreateLocationHdfs.go index 5fb6afcecf0..b02b319c24e 100644 --- a/service/datasync/api_op_CreateLocationHdfs.go +++ b/service/datasync/api_op_CreateLocationHdfs.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateLocationHdfsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationHdfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationNfs.go b/service/datasync/api_op_CreateLocationNfs.go index 8c3fe9143f4..59728f69a16 100644 --- a/service/datasync/api_op_CreateLocationNfs.go +++ b/service/datasync/api_op_CreateLocationNfs.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateLocationNfsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationNfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationObjectStorage.go b/service/datasync/api_op_CreateLocationObjectStorage.go index 601ef33e382..0cab515719a 100644 --- a/service/datasync/api_op_CreateLocationObjectStorage.go +++ b/service/datasync/api_op_CreateLocationObjectStorage.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateLocationObjectStorageMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationObjectStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationS3.go b/service/datasync/api_op_CreateLocationS3.go index 0c5b9a8038a..c77cf1423f0 100644 --- a/service/datasync/api_op_CreateLocationS3.go +++ b/service/datasync/api_op_CreateLocationS3.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateLocationS3Middlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationS3ValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateLocationSmb.go b/service/datasync/api_op_CreateLocationSmb.go index d46bf6a0a43..4dbf2ef738a 100644 --- a/service/datasync/api_op_CreateLocationSmb.go +++ b/service/datasync/api_op_CreateLocationSmb.go @@ -172,6 +172,9 @@ func (c *Client) addOperationCreateLocationSmbMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationSmbValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_CreateTask.go b/service/datasync/api_op_CreateTask.go index 73e40c64c3a..e1030e82668 100644 --- a/service/datasync/api_op_CreateTask.go +++ b/service/datasync/api_op_CreateTask.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DeleteAgent.go b/service/datasync/api_op_DeleteAgent.go index 56328cd32e1..639795df984 100644 --- a/service/datasync/api_op_DeleteAgent.go +++ b/service/datasync/api_op_DeleteAgent.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DeleteLocation.go b/service/datasync/api_op_DeleteLocation.go index 8338dd3b682..1c3dd8a5add 100644 --- a/service/datasync/api_op_DeleteLocation.go +++ b/service/datasync/api_op_DeleteLocation.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteLocationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DeleteTask.go b/service/datasync/api_op_DeleteTask.go index 6336199f4dd..310ef574f0e 100644 --- a/service/datasync/api_op_DeleteTask.go +++ b/service/datasync/api_op_DeleteTask.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeAgent.go b/service/datasync/api_op_DescribeAgent.go index e6c31d8c281..bf42d81f1b8 100644 --- a/service/datasync/api_op_DescribeAgent.go +++ b/service/datasync/api_op_DescribeAgent.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeAgentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeDiscoveryJob.go b/service/datasync/api_op_DescribeDiscoveryJob.go index a4b44c64474..e6084956e93 100644 --- a/service/datasync/api_op_DescribeDiscoveryJob.go +++ b/service/datasync/api_op_DescribeDiscoveryJob.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDiscoveryJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeDiscoveryJobMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationAzureBlob.go b/service/datasync/api_op_DescribeLocationAzureBlob.go index 8aeff9a783d..72e7c5cef7c 100644 --- a/service/datasync/api_op_DescribeLocationAzureBlob.go +++ b/service/datasync/api_op_DescribeLocationAzureBlob.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeLocationAzureBlobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationAzureBlobValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationEfs.go b/service/datasync/api_op_DescribeLocationEfs.go index cb04c8fc2b4..0d477f9a88f 100644 --- a/service/datasync/api_op_DescribeLocationEfs.go +++ b/service/datasync/api_op_DescribeLocationEfs.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeLocationEfsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationEfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationFsxLustre.go b/service/datasync/api_op_DescribeLocationFsxLustre.go index 08d03a8098d..31320e4fb26 100644 --- a/service/datasync/api_op_DescribeLocationFsxLustre.go +++ b/service/datasync/api_op_DescribeLocationFsxLustre.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeLocationFsxLustreMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationFsxLustreValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationFsxOntap.go b/service/datasync/api_op_DescribeLocationFsxOntap.go index 43ea4086307..fa98b9ca49c 100644 --- a/service/datasync/api_op_DescribeLocationFsxOntap.go +++ b/service/datasync/api_op_DescribeLocationFsxOntap.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeLocationFsxOntapMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationFsxOntapValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationFsxOpenZfs.go b/service/datasync/api_op_DescribeLocationFsxOpenZfs.go index 830dc823b3c..eaafbad0d5c 100644 --- a/service/datasync/api_op_DescribeLocationFsxOpenZfs.go +++ b/service/datasync/api_op_DescribeLocationFsxOpenZfs.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeLocationFsxOpenZfsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationFsxOpenZfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationFsxWindows.go b/service/datasync/api_op_DescribeLocationFsxWindows.go index 5f2f86dc005..3f21aafb53d 100644 --- a/service/datasync/api_op_DescribeLocationFsxWindows.go +++ b/service/datasync/api_op_DescribeLocationFsxWindows.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeLocationFsxWindowsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationFsxWindowsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationHdfs.go b/service/datasync/api_op_DescribeLocationHdfs.go index 8eb6def9baf..acb2715c39a 100644 --- a/service/datasync/api_op_DescribeLocationHdfs.go +++ b/service/datasync/api_op_DescribeLocationHdfs.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeLocationHdfsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationHdfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationNfs.go b/service/datasync/api_op_DescribeLocationNfs.go index 8632549b9a7..c1ac6ee6343 100644 --- a/service/datasync/api_op_DescribeLocationNfs.go +++ b/service/datasync/api_op_DescribeLocationNfs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeLocationNfsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationNfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationObjectStorage.go b/service/datasync/api_op_DescribeLocationObjectStorage.go index 6ec5de5259a..f536eb3acd0 100644 --- a/service/datasync/api_op_DescribeLocationObjectStorage.go +++ b/service/datasync/api_op_DescribeLocationObjectStorage.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeLocationObjectStorageMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationObjectStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationS3.go b/service/datasync/api_op_DescribeLocationS3.go index cca7119c028..0efe658a19a 100644 --- a/service/datasync/api_op_DescribeLocationS3.go +++ b/service/datasync/api_op_DescribeLocationS3.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeLocationS3Middlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationS3ValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeLocationSmb.go b/service/datasync/api_op_DescribeLocationSmb.go index 775619c8724..4d0acc1e908 100644 --- a/service/datasync/api_op_DescribeLocationSmb.go +++ b/service/datasync/api_op_DescribeLocationSmb.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeLocationSmbMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLocationSmbValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeStorageSystem.go b/service/datasync/api_op_DescribeStorageSystem.go index c9cbd04cde6..1446a65d5a8 100644 --- a/service/datasync/api_op_DescribeStorageSystem.go +++ b/service/datasync/api_op_DescribeStorageSystem.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeStorageSystemMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeStorageSystemMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeStorageSystemResourceMetrics.go b/service/datasync/api_op_DescribeStorageSystemResourceMetrics.go index 27b2047908c..dd6ac8e012c 100644 --- a/service/datasync/api_op_DescribeStorageSystemResourceMetrics.go +++ b/service/datasync/api_op_DescribeStorageSystemResourceMetrics.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeStorageSystemResourceMetricsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware(stack); err != nil { return err } @@ -170,41 +173,6 @@ func (c *Client) addOperationDescribeStorageSystemResourceMetricsMiddlewares(sta return nil } -type endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware struct { -} - -func (*endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "discovery-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// DescribeStorageSystemResourceMetricsAPIClient is a client that implements the -// DescribeStorageSystemResourceMetrics operation. -type DescribeStorageSystemResourceMetricsAPIClient interface { - DescribeStorageSystemResourceMetrics(context.Context, *DescribeStorageSystemResourceMetricsInput, ...func(*Options)) (*DescribeStorageSystemResourceMetricsOutput, error) -} - -var _ DescribeStorageSystemResourceMetricsAPIClient = (*Client)(nil) - // DescribeStorageSystemResourceMetricsPaginatorOptions is the paginator options // for DescribeStorageSystemResourceMetrics type DescribeStorageSystemResourceMetricsPaginatorOptions struct { @@ -271,6 +239,9 @@ func (p *DescribeStorageSystemResourceMetricsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStorageSystemResourceMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +261,41 @@ func (p *DescribeStorageSystemResourceMetricsPaginator) NextPage(ctx context.Con return result, nil } +type endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware struct { +} + +func (*endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "discovery-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDescribeStorageSystemResourceMetricsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// DescribeStorageSystemResourceMetricsAPIClient is a client that implements the +// DescribeStorageSystemResourceMetrics operation. +type DescribeStorageSystemResourceMetricsAPIClient interface { + DescribeStorageSystemResourceMetrics(context.Context, *DescribeStorageSystemResourceMetricsInput, ...func(*Options)) (*DescribeStorageSystemResourceMetricsOutput, error) +} + +var _ DescribeStorageSystemResourceMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStorageSystemResourceMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_DescribeStorageSystemResources.go b/service/datasync/api_op_DescribeStorageSystemResources.go index da011a19e51..8c7b4b7768d 100644 --- a/service/datasync/api_op_DescribeStorageSystemResources.go +++ b/service/datasync/api_op_DescribeStorageSystemResources.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeStorageSystemResourcesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeStorageSystemResourcesMiddleware(stack); err != nil { return err } @@ -167,41 +170,6 @@ func (c *Client) addOperationDescribeStorageSystemResourcesMiddlewares(stack *mi return nil } -type endpointPrefix_opDescribeStorageSystemResourcesMiddleware struct { -} - -func (*endpointPrefix_opDescribeStorageSystemResourcesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeStorageSystemResourcesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "discovery-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeStorageSystemResourcesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeStorageSystemResourcesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// DescribeStorageSystemResourcesAPIClient is a client that implements the -// DescribeStorageSystemResources operation. -type DescribeStorageSystemResourcesAPIClient interface { - DescribeStorageSystemResources(context.Context, *DescribeStorageSystemResourcesInput, ...func(*Options)) (*DescribeStorageSystemResourcesOutput, error) -} - -var _ DescribeStorageSystemResourcesAPIClient = (*Client)(nil) - // DescribeStorageSystemResourcesPaginatorOptions is the paginator options for // DescribeStorageSystemResources type DescribeStorageSystemResourcesPaginatorOptions struct { @@ -269,6 +237,9 @@ func (p *DescribeStorageSystemResourcesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStorageSystemResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +259,41 @@ func (p *DescribeStorageSystemResourcesPaginator) NextPage(ctx context.Context, return result, nil } +type endpointPrefix_opDescribeStorageSystemResourcesMiddleware struct { +} + +func (*endpointPrefix_opDescribeStorageSystemResourcesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDescribeStorageSystemResourcesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "discovery-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDescribeStorageSystemResourcesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDescribeStorageSystemResourcesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// DescribeStorageSystemResourcesAPIClient is a client that implements the +// DescribeStorageSystemResources operation. +type DescribeStorageSystemResourcesAPIClient interface { + DescribeStorageSystemResources(context.Context, *DescribeStorageSystemResourcesInput, ...func(*Options)) (*DescribeStorageSystemResourcesOutput, error) +} + +var _ DescribeStorageSystemResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStorageSystemResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_DescribeTask.go b/service/datasync/api_op_DescribeTask.go index eb1050457d5..cde57b9c90d 100644 --- a/service/datasync/api_op_DescribeTask.go +++ b/service/datasync/api_op_DescribeTask.go @@ -202,6 +202,9 @@ func (c *Client) addOperationDescribeTaskMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_DescribeTaskExecution.go b/service/datasync/api_op_DescribeTaskExecution.go index 7a11aae2ae2..61aa5c4bbcc 100644 --- a/service/datasync/api_op_DescribeTaskExecution.go +++ b/service/datasync/api_op_DescribeTaskExecution.go @@ -232,6 +232,9 @@ func (c *Client) addOperationDescribeTaskExecutionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTaskExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_GenerateRecommendations.go b/service/datasync/api_op_GenerateRecommendations.go index c266ade0262..66f34293c66 100644 --- a/service/datasync/api_op_GenerateRecommendations.go +++ b/service/datasync/api_op_GenerateRecommendations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGenerateRecommendationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGenerateRecommendationsMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_ListAgents.go b/service/datasync/api_op_ListAgents.go index 5f5378cf6ad..4635c746874 100644 --- a/service/datasync/api_op_ListAgents.go +++ b/service/datasync/api_op_ListAgents.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListAgentsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAgents(options.Region), middleware.Before); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListAgentsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAgentsAPIClient is a client that implements the ListAgents operation. -type ListAgentsAPIClient interface { - ListAgents(context.Context, *ListAgentsInput, ...func(*Options)) (*ListAgentsOutput, error) -} - -var _ ListAgentsAPIClient = (*Client)(nil) - // ListAgentsPaginatorOptions is the paginator options for ListAgents type ListAgentsPaginatorOptions struct { // Specifies the maximum number of DataSync agents to list in a response. By @@ -223,6 +219,9 @@ func (p *ListAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAgentsAPIClient is a client that implements the ListAgents operation. +type ListAgentsAPIClient interface { + ListAgents(context.Context, *ListAgentsInput, ...func(*Options)) (*ListAgentsOutput, error) +} + +var _ ListAgentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_ListDiscoveryJobs.go b/service/datasync/api_op_ListDiscoveryJobs.go index 16863650cb2..1146c2eec78 100644 --- a/service/datasync/api_op_ListDiscoveryJobs.go +++ b/service/datasync/api_op_ListDiscoveryJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDiscoveryJobsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListDiscoveryJobsMiddleware(stack); err != nil { return err } @@ -142,41 +145,6 @@ func (c *Client) addOperationListDiscoveryJobsMiddlewares(stack *middleware.Stac return nil } -type endpointPrefix_opListDiscoveryJobsMiddleware struct { -} - -func (*endpointPrefix_opListDiscoveryJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListDiscoveryJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "discovery-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListDiscoveryJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListDiscoveryJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListDiscoveryJobsAPIClient is a client that implements the ListDiscoveryJobs -// operation. -type ListDiscoveryJobsAPIClient interface { - ListDiscoveryJobs(context.Context, *ListDiscoveryJobsInput, ...func(*Options)) (*ListDiscoveryJobsOutput, error) -} - -var _ ListDiscoveryJobsAPIClient = (*Client)(nil) - // ListDiscoveryJobsPaginatorOptions is the paginator options for ListDiscoveryJobs type ListDiscoveryJobsPaginatorOptions struct { // Specifies how many results you want in the response. @@ -240,6 +208,9 @@ func (p *ListDiscoveryJobsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDiscoveryJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +230,41 @@ func (p *ListDiscoveryJobsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +type endpointPrefix_opListDiscoveryJobsMiddleware struct { +} + +func (*endpointPrefix_opListDiscoveryJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListDiscoveryJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "discovery-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListDiscoveryJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListDiscoveryJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListDiscoveryJobsAPIClient is a client that implements the ListDiscoveryJobs +// operation. +type ListDiscoveryJobsAPIClient interface { + ListDiscoveryJobs(context.Context, *ListDiscoveryJobsInput, ...func(*Options)) (*ListDiscoveryJobsOutput, error) +} + +var _ ListDiscoveryJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDiscoveryJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_ListLocations.go b/service/datasync/api_op_ListLocations.go index b5007404b24..f64e23df070 100644 --- a/service/datasync/api_op_ListLocations.go +++ b/service/datasync/api_op_ListLocations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListLocationsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLocationsValidationMiddleware(stack); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListLocationsMiddlewares(stack *middleware.Stack, o return nil } -// ListLocationsAPIClient is a client that implements the ListLocations operation. -type ListLocationsAPIClient interface { - ListLocations(context.Context, *ListLocationsInput, ...func(*Options)) (*ListLocationsOutput, error) -} - -var _ ListLocationsAPIClient = (*Client)(nil) - // ListLocationsPaginatorOptions is the paginator options for ListLocations type ListLocationsPaginatorOptions struct { // The maximum number of locations to return. @@ -219,6 +215,9 @@ func (p *ListLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListLocationsAPIClient is a client that implements the ListLocations operation. +type ListLocationsAPIClient interface { + ListLocations(context.Context, *ListLocationsInput, ...func(*Options)) (*ListLocationsOutput, error) +} + +var _ ListLocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_ListStorageSystems.go b/service/datasync/api_op_ListStorageSystems.go index f86cfe0db98..dcf9e878194 100644 --- a/service/datasync/api_op_ListStorageSystems.go +++ b/service/datasync/api_op_ListStorageSystems.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListStorageSystemsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStorageSystemsMiddleware(stack); err != nil { return err } @@ -137,41 +140,6 @@ func (c *Client) addOperationListStorageSystemsMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opListStorageSystemsMiddleware struct { -} - -func (*endpointPrefix_opListStorageSystemsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStorageSystemsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "discovery-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStorageSystemsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStorageSystemsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStorageSystemsAPIClient is a client that implements the ListStorageSystems -// operation. -type ListStorageSystemsAPIClient interface { - ListStorageSystems(context.Context, *ListStorageSystemsInput, ...func(*Options)) (*ListStorageSystemsOutput, error) -} - -var _ ListStorageSystemsAPIClient = (*Client)(nil) - // ListStorageSystemsPaginatorOptions is the paginator options for // ListStorageSystems type ListStorageSystemsPaginatorOptions struct { @@ -236,6 +204,9 @@ func (p *ListStorageSystemsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStorageSystems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +226,41 @@ func (p *ListStorageSystemsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +type endpointPrefix_opListStorageSystemsMiddleware struct { +} + +func (*endpointPrefix_opListStorageSystemsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStorageSystemsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "discovery-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStorageSystemsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStorageSystemsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStorageSystemsAPIClient is a client that implements the ListStorageSystems +// operation. +type ListStorageSystemsAPIClient interface { + ListStorageSystems(context.Context, *ListStorageSystemsInput, ...func(*Options)) (*ListStorageSystemsOutput, error) +} + +var _ ListStorageSystemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStorageSystems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_ListTagsForResource.go b/service/datasync/api_op_ListTagsForResource.go index b83b6df2177..9dc20a6ffa9 100644 --- a/service/datasync/api_op_ListTagsForResource.go +++ b/service/datasync/api_op_ListTagsForResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_ListTaskExecutions.go b/service/datasync/api_op_ListTaskExecutions.go index cef0f5ee909..a15aeb8129a 100644 --- a/service/datasync/api_op_ListTaskExecutions.go +++ b/service/datasync/api_op_ListTaskExecutions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTaskExecutionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTaskExecutions(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListTaskExecutionsMiddlewares(stack *middleware.Sta return nil } -// ListTaskExecutionsAPIClient is a client that implements the ListTaskExecutions -// operation. -type ListTaskExecutionsAPIClient interface { - ListTaskExecutions(context.Context, *ListTaskExecutionsInput, ...func(*Options)) (*ListTaskExecutionsOutput, error) -} - -var _ ListTaskExecutionsAPIClient = (*Client)(nil) - // ListTaskExecutionsPaginatorOptions is the paginator options for // ListTaskExecutions type ListTaskExecutionsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListTaskExecutionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTaskExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListTaskExecutionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListTaskExecutionsAPIClient is a client that implements the ListTaskExecutions +// operation. +type ListTaskExecutionsAPIClient interface { + ListTaskExecutions(context.Context, *ListTaskExecutionsInput, ...func(*Options)) (*ListTaskExecutionsOutput, error) +} + +var _ ListTaskExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTaskExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_ListTasks.go b/service/datasync/api_op_ListTasks.go index 958b94fa3bb..f4680c9240a 100644 --- a/service/datasync/api_op_ListTasks.go +++ b/service/datasync/api_op_ListTasks.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTasksValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio return nil } -// ListTasksAPIClient is a client that implements the ListTasks operation. -type ListTasksAPIClient interface { - ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) -} - -var _ ListTasksAPIClient = (*Client)(nil) - // ListTasksPaginatorOptions is the paginator options for ListTasks type ListTasksPaginatorOptions struct { // The maximum number of tasks to return. @@ -214,6 +210,9 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListTasksAPIClient is a client that implements the ListTasks operation. +type ListTasksAPIClient interface { + ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) +} + +var _ ListTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datasync/api_op_RemoveStorageSystem.go b/service/datasync/api_op_RemoveStorageSystem.go index bc37d3b3d5b..cf5b3b61944 100644 --- a/service/datasync/api_op_RemoveStorageSystem.go +++ b/service/datasync/api_op_RemoveStorageSystem.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveStorageSystemMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opRemoveStorageSystemMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_StartDiscoveryJob.go b/service/datasync/api_op_StartDiscoveryJob.go index ab9a9250827..87368a9c2de 100644 --- a/service/datasync/api_op_StartDiscoveryJob.go +++ b/service/datasync/api_op_StartDiscoveryJob.go @@ -131,6 +131,9 @@ func (c *Client) addOperationStartDiscoveryJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartDiscoveryJobMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_StartTaskExecution.go b/service/datasync/api_op_StartTaskExecution.go index e2af6bec94f..06d9402a30a 100644 --- a/service/datasync/api_op_StartTaskExecution.go +++ b/service/datasync/api_op_StartTaskExecution.go @@ -177,6 +177,9 @@ func (c *Client) addOperationStartTaskExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTaskExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_StopDiscoveryJob.go b/service/datasync/api_op_StopDiscoveryJob.go index cf3698799ab..7291bb0ecd2 100644 --- a/service/datasync/api_op_StopDiscoveryJob.go +++ b/service/datasync/api_op_StopDiscoveryJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopDiscoveryJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStopDiscoveryJobMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_TagResource.go b/service/datasync/api_op_TagResource.go index 763af72a944..37b98267cd1 100644 --- a/service/datasync/api_op_TagResource.go +++ b/service/datasync/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UntagResource.go b/service/datasync/api_op_UntagResource.go index 49c29c1bb7a..ef675d32135 100644 --- a/service/datasync/api_op_UntagResource.go +++ b/service/datasync/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateAgent.go b/service/datasync/api_op_UpdateAgent.go index 7d32903039d..9eaf423f6dc 100644 --- a/service/datasync/api_op_UpdateAgent.go +++ b/service/datasync/api_op_UpdateAgent.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateAgentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateDiscoveryJob.go b/service/datasync/api_op_UpdateDiscoveryJob.go index d377ae5328c..5c8dacf1e61 100644 --- a/service/datasync/api_op_UpdateDiscoveryJob.go +++ b/service/datasync/api_op_UpdateDiscoveryJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateDiscoveryJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateDiscoveryJobMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateLocationAzureBlob.go b/service/datasync/api_op_UpdateLocationAzureBlob.go index cf4fb991540..31d842097ee 100644 --- a/service/datasync/api_op_UpdateLocationAzureBlob.go +++ b/service/datasync/api_op_UpdateLocationAzureBlob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateLocationAzureBlobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLocationAzureBlobValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateLocationHdfs.go b/service/datasync/api_op_UpdateLocationHdfs.go index bc1955c4cb4..124cd5985ba 100644 --- a/service/datasync/api_op_UpdateLocationHdfs.go +++ b/service/datasync/api_op_UpdateLocationHdfs.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateLocationHdfsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLocationHdfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateLocationNfs.go b/service/datasync/api_op_UpdateLocationNfs.go index f8d795daf21..16329e06d12 100644 --- a/service/datasync/api_op_UpdateLocationNfs.go +++ b/service/datasync/api_op_UpdateLocationNfs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateLocationNfsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLocationNfsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateLocationObjectStorage.go b/service/datasync/api_op_UpdateLocationObjectStorage.go index b33bc86a7b1..0cfeff63c1d 100644 --- a/service/datasync/api_op_UpdateLocationObjectStorage.go +++ b/service/datasync/api_op_UpdateLocationObjectStorage.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateLocationObjectStorageMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLocationObjectStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateLocationSmb.go b/service/datasync/api_op_UpdateLocationSmb.go index 97ec228f5d4..5bdc1a6b13b 100644 --- a/service/datasync/api_op_UpdateLocationSmb.go +++ b/service/datasync/api_op_UpdateLocationSmb.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateLocationSmbMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLocationSmbValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateStorageSystem.go b/service/datasync/api_op_UpdateStorageSystem.go index a4755c78965..79a88be7a0a 100644 --- a/service/datasync/api_op_UpdateStorageSystem.go +++ b/service/datasync/api_op_UpdateStorageSystem.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateStorageSystemMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateStorageSystemMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateTask.go b/service/datasync/api_op_UpdateTask.go index 6cd3509997c..9d6aa3b01cc 100644 --- a/service/datasync/api_op_UpdateTask.go +++ b/service/datasync/api_op_UpdateTask.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/datasync/api_op_UpdateTaskExecution.go b/service/datasync/api_op_UpdateTaskExecution.go index 95b5998606c..4e5023f5585 100644 --- a/service/datasync/api_op_UpdateTaskExecution.go +++ b/service/datasync/api_op_UpdateTaskExecution.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateTaskExecutionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTaskExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_client.go b/service/datazone/api_client.go index 5c35acb3176..b52e62fe671 100644 --- a/service/datazone/api_client.go +++ b/service/datazone/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/datazone/api_op_AcceptPredictions.go b/service/datazone/api_op_AcceptPredictions.go index 04a9706750f..400557680f2 100644 --- a/service/datazone/api_op_AcceptPredictions.go +++ b/service/datazone/api_op_AcceptPredictions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationAcceptPredictionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAcceptPredictionsMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_AcceptSubscriptionRequest.go b/service/datazone/api_op_AcceptSubscriptionRequest.go index b2622bee528..00e85bb206d 100644 --- a/service/datazone/api_op_AcceptSubscriptionRequest.go +++ b/service/datazone/api_op_AcceptSubscriptionRequest.go @@ -172,6 +172,9 @@ func (c *Client) addOperationAcceptSubscriptionRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptSubscriptionRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_AssociateEnvironmentRole.go b/service/datazone/api_op_AssociateEnvironmentRole.go index f5241a685f6..927baa8e740 100644 --- a/service/datazone/api_op_AssociateEnvironmentRole.go +++ b/service/datazone/api_op_AssociateEnvironmentRole.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAssociateEnvironmentRoleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateEnvironmentRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CancelMetadataGenerationRun.go b/service/datazone/api_op_CancelMetadataGenerationRun.go index d8d1559fc1c..d9ae74f7c72 100644 --- a/service/datazone/api_op_CancelMetadataGenerationRun.go +++ b/service/datazone/api_op_CancelMetadataGenerationRun.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCancelMetadataGenerationRunMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMetadataGenerationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CancelSubscription.go b/service/datazone/api_op_CancelSubscription.go index d0019e5c184..e684c5a890a 100644 --- a/service/datazone/api_op_CancelSubscription.go +++ b/service/datazone/api_op_CancelSubscription.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCancelSubscriptionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateAsset.go b/service/datazone/api_op_CreateAsset.go index b47381b75c6..bc02fc42ab7 100644 --- a/service/datazone/api_op_CreateAsset.go +++ b/service/datazone/api_op_CreateAsset.go @@ -217,6 +217,9 @@ func (c *Client) addOperationCreateAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAssetMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateAssetRevision.go b/service/datazone/api_op_CreateAssetRevision.go index d15728373bd..bdb0b6c4ca6 100644 --- a/service/datazone/api_op_CreateAssetRevision.go +++ b/service/datazone/api_op_CreateAssetRevision.go @@ -211,6 +211,9 @@ func (c *Client) addOperationCreateAssetRevisionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAssetRevisionMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateAssetType.go b/service/datazone/api_op_CreateAssetType.go index 20e2ba10ced..085dffe0055 100644 --- a/service/datazone/api_op_CreateAssetType.go +++ b/service/datazone/api_op_CreateAssetType.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateAssetTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssetTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateDataSource.go b/service/datazone/api_op_CreateDataSource.go index fae45562b42..3d96549a1ac 100644 --- a/service/datazone/api_op_CreateDataSource.go +++ b/service/datazone/api_op_CreateDataSource.go @@ -231,6 +231,9 @@ func (c *Client) addOperationCreateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataSourceMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateDomain.go b/service/datazone/api_op_CreateDomain.go index b5c87bffba1..cd2703438da 100644 --- a/service/datazone/api_op_CreateDomain.go +++ b/service/datazone/api_op_CreateDomain.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDomainMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateEnvironment.go b/service/datazone/api_op_CreateEnvironment.go index 6762c29bc80..d01ac584584 100644 --- a/service/datazone/api_op_CreateEnvironment.go +++ b/service/datazone/api_op_CreateEnvironment.go @@ -217,6 +217,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateEnvironmentAction.go b/service/datazone/api_op_CreateEnvironmentAction.go index b1756c32d2c..adef4399d6d 100644 --- a/service/datazone/api_op_CreateEnvironmentAction.go +++ b/service/datazone/api_op_CreateEnvironmentAction.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateEnvironmentActionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateEnvironmentProfile.go b/service/datazone/api_op_CreateEnvironmentProfile.go index e5cc1be945f..f131419a42c 100644 --- a/service/datazone/api_op_CreateEnvironmentProfile.go +++ b/service/datazone/api_op_CreateEnvironmentProfile.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateEnvironmentProfileMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateFormType.go b/service/datazone/api_op_CreateFormType.go index 23b4c0353de..5b818ba6fb1 100644 --- a/service/datazone/api_op_CreateFormType.go +++ b/service/datazone/api_op_CreateFormType.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateFormTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFormTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateGlossary.go b/service/datazone/api_op_CreateGlossary.go index 7c8eabcdb72..43f7e6eed1b 100644 --- a/service/datazone/api_op_CreateGlossary.go +++ b/service/datazone/api_op_CreateGlossary.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateGlossaryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateGlossaryMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateGlossaryTerm.go b/service/datazone/api_op_CreateGlossaryTerm.go index 8e1a5cdca6f..91a47328e96 100644 --- a/service/datazone/api_op_CreateGlossaryTerm.go +++ b/service/datazone/api_op_CreateGlossaryTerm.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateGlossaryTermMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateGlossaryTermMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateGroupProfile.go b/service/datazone/api_op_CreateGroupProfile.go index 770a2d770ad..3d20777e4aa 100644 --- a/service/datazone/api_op_CreateGroupProfile.go +++ b/service/datazone/api_op_CreateGroupProfile.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateGroupProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateGroupProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateListingChangeSet.go b/service/datazone/api_op_CreateListingChangeSet.go index 4e5048c58b7..7f7aee952ee 100644 --- a/service/datazone/api_op_CreateListingChangeSet.go +++ b/service/datazone/api_op_CreateListingChangeSet.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateListingChangeSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateListingChangeSetMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateProject.go b/service/datazone/api_op_CreateProject.go index e2bff7c69c6..b01ab9db5b6 100644 --- a/service/datazone/api_op_CreateProject.go +++ b/service/datazone/api_op_CreateProject.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateProjectMembership.go b/service/datazone/api_op_CreateProjectMembership.go index 4f65abb8937..a8735364c2a 100644 --- a/service/datazone/api_op_CreateProjectMembership.go +++ b/service/datazone/api_op_CreateProjectMembership.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateProjectMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_CreateSubscriptionGrant.go b/service/datazone/api_op_CreateSubscriptionGrant.go index b54992db5a2..d4138118386 100644 --- a/service/datazone/api_op_CreateSubscriptionGrant.go +++ b/service/datazone/api_op_CreateSubscriptionGrant.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateSubscriptionGrantMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSubscriptionGrantMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateSubscriptionRequest.go b/service/datazone/api_op_CreateSubscriptionRequest.go index b804b17c879..fe895a5d2ee 100644 --- a/service/datazone/api_op_CreateSubscriptionRequest.go +++ b/service/datazone/api_op_CreateSubscriptionRequest.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreateSubscriptionRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSubscriptionRequestMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateSubscriptionTarget.go b/service/datazone/api_op_CreateSubscriptionTarget.go index 582820a0c4f..bf732100d4a 100644 --- a/service/datazone/api_op_CreateSubscriptionTarget.go +++ b/service/datazone/api_op_CreateSubscriptionTarget.go @@ -218,6 +218,9 @@ func (c *Client) addOperationCreateSubscriptionTargetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSubscriptionTargetMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_CreateUserProfile.go b/service/datazone/api_op_CreateUserProfile.go index ef72f7aec6f..6413502f2f8 100644 --- a/service/datazone/api_op_CreateUserProfile.go +++ b/service/datazone/api_op_CreateUserProfile.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateUserProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_DeleteAsset.go b/service/datazone/api_op_DeleteAsset.go index 4b01469f0b5..fec52aade8e 100644 --- a/service/datazone/api_op_DeleteAsset.go +++ b/service/datazone/api_op_DeleteAsset.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteAssetType.go b/service/datazone/api_op_DeleteAssetType.go index 375b610a9ed..f607e7dbf34 100644 --- a/service/datazone/api_op_DeleteAssetType.go +++ b/service/datazone/api_op_DeleteAssetType.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAssetTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssetTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteDataSource.go b/service/datazone/api_op_DeleteDataSource.go index d23a167faac..db56d4dc101 100644 --- a/service/datazone/api_op_DeleteDataSource.go +++ b/service/datazone/api_op_DeleteDataSource.go @@ -196,6 +196,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteDataSourceMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_DeleteDomain.go b/service/datazone/api_op_DeleteDomain.go index 2412802448f..9c51ad61fe8 100644 --- a/service/datazone/api_op_DeleteDomain.go +++ b/service/datazone/api_op_DeleteDomain.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteDomainMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_DeleteEnvironment.go b/service/datazone/api_op_DeleteEnvironment.go index 5ee155fe51d..bf92055a83f 100644 --- a/service/datazone/api_op_DeleteEnvironment.go +++ b/service/datazone/api_op_DeleteEnvironment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteEnvironmentAction.go b/service/datazone/api_op_DeleteEnvironmentAction.go index 9cf71029a8d..6db17f3bb0c 100644 --- a/service/datazone/api_op_DeleteEnvironmentAction.go +++ b/service/datazone/api_op_DeleteEnvironmentAction.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteEnvironmentActionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteEnvironmentBlueprintConfiguration.go b/service/datazone/api_op_DeleteEnvironmentBlueprintConfiguration.go index 9f92292272b..d71549401c6 100644 --- a/service/datazone/api_op_DeleteEnvironmentBlueprintConfiguration.go +++ b/service/datazone/api_op_DeleteEnvironmentBlueprintConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEnvironmentBlueprintConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentBlueprintConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteEnvironmentProfile.go b/service/datazone/api_op_DeleteEnvironmentProfile.go index a0ecce406df..78eec0318c6 100644 --- a/service/datazone/api_op_DeleteEnvironmentProfile.go +++ b/service/datazone/api_op_DeleteEnvironmentProfile.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEnvironmentProfileMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteFormType.go b/service/datazone/api_op_DeleteFormType.go index 2e83b58f28c..e71bf103e47 100644 --- a/service/datazone/api_op_DeleteFormType.go +++ b/service/datazone/api_op_DeleteFormType.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFormTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFormTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteGlossary.go b/service/datazone/api_op_DeleteGlossary.go index 4d43511c83d..a43ac3535bc 100644 --- a/service/datazone/api_op_DeleteGlossary.go +++ b/service/datazone/api_op_DeleteGlossary.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteGlossaryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlossaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteGlossaryTerm.go b/service/datazone/api_op_DeleteGlossaryTerm.go index 59968966fb5..5193d18be5b 100644 --- a/service/datazone/api_op_DeleteGlossaryTerm.go +++ b/service/datazone/api_op_DeleteGlossaryTerm.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteGlossaryTermMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlossaryTermValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteListing.go b/service/datazone/api_op_DeleteListing.go index 5a609082a38..77e5752e3ad 100644 --- a/service/datazone/api_op_DeleteListing.go +++ b/service/datazone/api_op_DeleteListing.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteListingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteListingValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteProject.go b/service/datazone/api_op_DeleteProject.go index 63fc051dccf..7de42a3e944 100644 --- a/service/datazone/api_op_DeleteProject.go +++ b/service/datazone/api_op_DeleteProject.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteProjectMembership.go b/service/datazone/api_op_DeleteProjectMembership.go index 7fc1431a694..6b280906b95 100644 --- a/service/datazone/api_op_DeleteProjectMembership.go +++ b/service/datazone/api_op_DeleteProjectMembership.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteProjectMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteSubscriptionGrant.go b/service/datazone/api_op_DeleteSubscriptionGrant.go index 8acca4a2c04..698fcd0c8b8 100644 --- a/service/datazone/api_op_DeleteSubscriptionGrant.go +++ b/service/datazone/api_op_DeleteSubscriptionGrant.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDeleteSubscriptionGrantMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriptionGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteSubscriptionRequest.go b/service/datazone/api_op_DeleteSubscriptionRequest.go index fc2d512a5cf..3f3e9c4bce9 100644 --- a/service/datazone/api_op_DeleteSubscriptionRequest.go +++ b/service/datazone/api_op_DeleteSubscriptionRequest.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteSubscriptionRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriptionRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteSubscriptionTarget.go b/service/datazone/api_op_DeleteSubscriptionTarget.go index 5845912d48b..d2352383e4e 100644 --- a/service/datazone/api_op_DeleteSubscriptionTarget.go +++ b/service/datazone/api_op_DeleteSubscriptionTarget.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteSubscriptionTargetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriptionTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_DeleteTimeSeriesDataPoints.go b/service/datazone/api_op_DeleteTimeSeriesDataPoints.go index a9281403919..26acb723d56 100644 --- a/service/datazone/api_op_DeleteTimeSeriesDataPoints.go +++ b/service/datazone/api_op_DeleteTimeSeriesDataPoints.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteTimeSeriesDataPointsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteTimeSeriesDataPointsMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_DisassociateEnvironmentRole.go b/service/datazone/api_op_DisassociateEnvironmentRole.go index b2fe9257ba8..5b301a9ac4b 100644 --- a/service/datazone/api_op_DisassociateEnvironmentRole.go +++ b/service/datazone/api_op_DisassociateEnvironmentRole.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateEnvironmentRoleMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateEnvironmentRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetAsset.go b/service/datazone/api_op_GetAsset.go index b23eca44b0a..6f4d5d4fe92 100644 --- a/service/datazone/api_op_GetAsset.go +++ b/service/datazone/api_op_GetAsset.go @@ -183,6 +183,9 @@ func (c *Client) addOperationGetAssetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetAssetType.go b/service/datazone/api_op_GetAssetType.go index 253ea7d5a69..31116e58ffb 100644 --- a/service/datazone/api_op_GetAssetType.go +++ b/service/datazone/api_op_GetAssetType.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetAssetTypeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssetTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetDataSource.go b/service/datazone/api_op_GetDataSource.go index 69fd3b26e7c..cf1b302c27d 100644 --- a/service/datazone/api_op_GetDataSource.go +++ b/service/datazone/api_op_GetDataSource.go @@ -188,6 +188,9 @@ func (c *Client) addOperationGetDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetDataSourceRun.go b/service/datazone/api_op_GetDataSourceRun.go index 6b843c5648c..543435c8b12 100644 --- a/service/datazone/api_op_GetDataSourceRun.go +++ b/service/datazone/api_op_GetDataSourceRun.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetDataSourceRunMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetDomain.go b/service/datazone/api_op_GetDomain.go index fc852915423..e75592816aa 100644 --- a/service/datazone/api_op_GetDomain.go +++ b/service/datazone/api_op_GetDomain.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetDomainMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetEnvironment.go b/service/datazone/api_op_GetEnvironment.go index eb95d4de284..9c7fda022c9 100644 --- a/service/datazone/api_op_GetEnvironment.go +++ b/service/datazone/api_op_GetEnvironment.go @@ -182,6 +182,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetEnvironmentAction.go b/service/datazone/api_op_GetEnvironmentAction.go index 24ad13d393c..36e1ee88dcd 100644 --- a/service/datazone/api_op_GetEnvironmentAction.go +++ b/service/datazone/api_op_GetEnvironmentAction.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetEnvironmentActionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetEnvironmentBlueprint.go b/service/datazone/api_op_GetEnvironmentBlueprint.go index a343191a1c2..a07e6e7978b 100644 --- a/service/datazone/api_op_GetEnvironmentBlueprint.go +++ b/service/datazone/api_op_GetEnvironmentBlueprint.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetEnvironmentBlueprintMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentBlueprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetEnvironmentBlueprintConfiguration.go b/service/datazone/api_op_GetEnvironmentBlueprintConfiguration.go index 3fdb9ba6527..3da36e8a6f0 100644 --- a/service/datazone/api_op_GetEnvironmentBlueprintConfiguration.go +++ b/service/datazone/api_op_GetEnvironmentBlueprintConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetEnvironmentBlueprintConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentBlueprintConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetEnvironmentProfile.go b/service/datazone/api_op_GetEnvironmentProfile.go index 372031e5cb8..ba091331073 100644 --- a/service/datazone/api_op_GetEnvironmentProfile.go +++ b/service/datazone/api_op_GetEnvironmentProfile.go @@ -156,6 +156,9 @@ func (c *Client) addOperationGetEnvironmentProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetFormType.go b/service/datazone/api_op_GetFormType.go index 94a43748305..1c13170085e 100644 --- a/service/datazone/api_op_GetFormType.go +++ b/service/datazone/api_op_GetFormType.go @@ -157,6 +157,9 @@ func (c *Client) addOperationGetFormTypeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFormTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetGlossary.go b/service/datazone/api_op_GetGlossary.go index cc454416969..7b67bf31afc 100644 --- a/service/datazone/api_op_GetGlossary.go +++ b/service/datazone/api_op_GetGlossary.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetGlossaryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGlossaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetGlossaryTerm.go b/service/datazone/api_op_GetGlossaryTerm.go index 8d0a28a0d40..60e76741c87 100644 --- a/service/datazone/api_op_GetGlossaryTerm.go +++ b/service/datazone/api_op_GetGlossaryTerm.go @@ -157,6 +157,9 @@ func (c *Client) addOperationGetGlossaryTermMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGlossaryTermValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetGroupProfile.go b/service/datazone/api_op_GetGroupProfile.go index 7669d9117cd..2e190f0c76d 100644 --- a/service/datazone/api_op_GetGroupProfile.go +++ b/service/datazone/api_op_GetGroupProfile.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetGroupProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetIamPortalLoginUrl.go b/service/datazone/api_op_GetIamPortalLoginUrl.go index 345b01f9a35..615d556cc25 100644 --- a/service/datazone/api_op_GetIamPortalLoginUrl.go +++ b/service/datazone/api_op_GetIamPortalLoginUrl.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetIamPortalLoginUrlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIamPortalLoginUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetListing.go b/service/datazone/api_op_GetListing.go index 62d753e3d4e..bb66714c9f9 100644 --- a/service/datazone/api_op_GetListing.go +++ b/service/datazone/api_op_GetListing.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetListingMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetListingValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetMetadataGenerationRun.go b/service/datazone/api_op_GetMetadataGenerationRun.go index a395b70f86d..5e2c35ea6fa 100644 --- a/service/datazone/api_op_GetMetadataGenerationRun.go +++ b/service/datazone/api_op_GetMetadataGenerationRun.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetMetadataGenerationRunMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetadataGenerationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetProject.go b/service/datazone/api_op_GetProject.go index 7c98e668e01..d0da52769d4 100644 --- a/service/datazone/api_op_GetProject.go +++ b/service/datazone/api_op_GetProject.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetProjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetSubscription.go b/service/datazone/api_op_GetSubscription.go index 09ca1ad2a2b..e1190ce86cd 100644 --- a/service/datazone/api_op_GetSubscription.go +++ b/service/datazone/api_op_GetSubscription.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetSubscriptionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetSubscriptionGrant.go b/service/datazone/api_op_GetSubscriptionGrant.go index 1facfe14b19..fec79b71c2c 100644 --- a/service/datazone/api_op_GetSubscriptionGrant.go +++ b/service/datazone/api_op_GetSubscriptionGrant.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetSubscriptionGrantMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetSubscriptionRequestDetails.go b/service/datazone/api_op_GetSubscriptionRequestDetails.go index 037491827aa..81ab7a1184f 100644 --- a/service/datazone/api_op_GetSubscriptionRequestDetails.go +++ b/service/datazone/api_op_GetSubscriptionRequestDetails.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetSubscriptionRequestDetailsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionRequestDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetSubscriptionTarget.go b/service/datazone/api_op_GetSubscriptionTarget.go index b20fcd34af4..2dd040e0a80 100644 --- a/service/datazone/api_op_GetSubscriptionTarget.go +++ b/service/datazone/api_op_GetSubscriptionTarget.go @@ -185,6 +185,9 @@ func (c *Client) addOperationGetSubscriptionTargetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetTimeSeriesDataPoint.go b/service/datazone/api_op_GetTimeSeriesDataPoint.go index 6693c9a922a..c015e07205d 100644 --- a/service/datazone/api_op_GetTimeSeriesDataPoint.go +++ b/service/datazone/api_op_GetTimeSeriesDataPoint.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetTimeSeriesDataPointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTimeSeriesDataPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_GetUserProfile.go b/service/datazone/api_op_GetUserProfile.go index fc79e618ccd..2b8c628430e 100644 --- a/service/datazone/api_op_GetUserProfile.go +++ b/service/datazone/api_op_GetUserProfile.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetUserProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_ListAssetRevisions.go b/service/datazone/api_op_ListAssetRevisions.go index e63d1769df7..a271dfc526a 100644 --- a/service/datazone/api_op_ListAssetRevisions.go +++ b/service/datazone/api_op_ListAssetRevisions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListAssetRevisionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssetRevisionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListAssetRevisionsMiddlewares(stack *middleware.Sta return nil } -// ListAssetRevisionsAPIClient is a client that implements the ListAssetRevisions -// operation. -type ListAssetRevisionsAPIClient interface { - ListAssetRevisions(context.Context, *ListAssetRevisionsInput, ...func(*Options)) (*ListAssetRevisionsOutput, error) -} - -var _ ListAssetRevisionsAPIClient = (*Client)(nil) - // ListAssetRevisionsPaginatorOptions is the paginator options for // ListAssetRevisions type ListAssetRevisionsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListAssetRevisionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListAssetRevisionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAssetRevisionsAPIClient is a client that implements the ListAssetRevisions +// operation. +type ListAssetRevisionsAPIClient interface { + ListAssetRevisions(context.Context, *ListAssetRevisionsInput, ...func(*Options)) (*ListAssetRevisionsOutput, error) +} + +var _ ListAssetRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListDataSourceRunActivities.go b/service/datazone/api_op_ListDataSourceRunActivities.go index 5e26d3c9c08..276874af41f 100644 --- a/service/datazone/api_op_ListDataSourceRunActivities.go +++ b/service/datazone/api_op_ListDataSourceRunActivities.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListDataSourceRunActivitiesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourceRunActivitiesValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListDataSourceRunActivitiesMiddlewares(stack *middl return nil } -// ListDataSourceRunActivitiesAPIClient is a client that implements the -// ListDataSourceRunActivities operation. -type ListDataSourceRunActivitiesAPIClient interface { - ListDataSourceRunActivities(context.Context, *ListDataSourceRunActivitiesInput, ...func(*Options)) (*ListDataSourceRunActivitiesOutput, error) -} - -var _ ListDataSourceRunActivitiesAPIClient = (*Client)(nil) - // ListDataSourceRunActivitiesPaginatorOptions is the paginator options for // ListDataSourceRunActivities type ListDataSourceRunActivitiesPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListDataSourceRunActivitiesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSourceRunActivities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListDataSourceRunActivitiesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListDataSourceRunActivitiesAPIClient is a client that implements the +// ListDataSourceRunActivities operation. +type ListDataSourceRunActivitiesAPIClient interface { + ListDataSourceRunActivities(context.Context, *ListDataSourceRunActivitiesInput, ...func(*Options)) (*ListDataSourceRunActivitiesOutput, error) +} + +var _ ListDataSourceRunActivitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSourceRunActivities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListDataSourceRuns.go b/service/datazone/api_op_ListDataSourceRuns.go index 9d378f9e510..c1c8793bbc7 100644 --- a/service/datazone/api_op_ListDataSourceRuns.go +++ b/service/datazone/api_op_ListDataSourceRuns.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListDataSourceRunsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourceRunsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListDataSourceRunsMiddlewares(stack *middleware.Sta return nil } -// ListDataSourceRunsAPIClient is a client that implements the ListDataSourceRuns -// operation. -type ListDataSourceRunsAPIClient interface { - ListDataSourceRuns(context.Context, *ListDataSourceRunsInput, ...func(*Options)) (*ListDataSourceRunsOutput, error) -} - -var _ ListDataSourceRunsAPIClient = (*Client)(nil) - // ListDataSourceRunsPaginatorOptions is the paginator options for // ListDataSourceRuns type ListDataSourceRunsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListDataSourceRunsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSourceRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListDataSourceRunsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListDataSourceRunsAPIClient is a client that implements the ListDataSourceRuns +// operation. +type ListDataSourceRunsAPIClient interface { + ListDataSourceRuns(context.Context, *ListDataSourceRunsInput, ...func(*Options)) (*ListDataSourceRunsOutput, error) +} + +var _ ListDataSourceRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSourceRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListDataSources.go b/service/datazone/api_op_ListDataSources.go index a5dfd0fdf78..792968735f7 100644 --- a/service/datazone/api_op_ListDataSources.go +++ b/service/datazone/api_op_ListDataSources.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListDataSourcesAPIClient is a client that implements the ListDataSources -// operation. -type ListDataSourcesAPIClient interface { - ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) -} - -var _ ListDataSourcesAPIClient = (*Client)(nil) - // ListDataSourcesPaginatorOptions is the paginator options for ListDataSources type ListDataSourcesPaginatorOptions struct { // The maximum number of data sources to return in a single call to ListDataSources @@ -243,6 +238,9 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDataSourcesAPIClient is a client that implements the ListDataSources +// operation. +type ListDataSourcesAPIClient interface { + ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) +} + +var _ ListDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListDomains.go b/service/datazone/api_op_ListDomains.go index 158f73104f5..42c0d35ff91 100644 --- a/service/datazone/api_op_ListDomains.go +++ b/service/datazone/api_op_ListDomains.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of domains to return in a single call to ListDomains . When @@ -220,6 +216,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListEnvironmentActions.go b/service/datazone/api_op_ListEnvironmentActions.go index a4e71da8794..5ddadc69a97 100644 --- a/service/datazone/api_op_ListEnvironmentActions.go +++ b/service/datazone/api_op_ListEnvironmentActions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListEnvironmentActionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentActionsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListEnvironmentActionsMiddlewares(stack *middleware return nil } -// ListEnvironmentActionsAPIClient is a client that implements the -// ListEnvironmentActions operation. -type ListEnvironmentActionsAPIClient interface { - ListEnvironmentActions(context.Context, *ListEnvironmentActionsInput, ...func(*Options)) (*ListEnvironmentActionsOutput, error) -} - -var _ ListEnvironmentActionsAPIClient = (*Client)(nil) - // ListEnvironmentActionsPaginatorOptions is the paginator options for // ListEnvironmentActions type ListEnvironmentActionsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListEnvironmentActionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListEnvironmentActionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListEnvironmentActionsAPIClient is a client that implements the +// ListEnvironmentActions operation. +type ListEnvironmentActionsAPIClient interface { + ListEnvironmentActions(context.Context, *ListEnvironmentActionsInput, ...func(*Options)) (*ListEnvironmentActionsOutput, error) +} + +var _ ListEnvironmentActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListEnvironmentBlueprintConfigurations.go b/service/datazone/api_op_ListEnvironmentBlueprintConfigurations.go index d4b11b57e39..a52caca4c1f 100644 --- a/service/datazone/api_op_ListEnvironmentBlueprintConfigurations.go +++ b/service/datazone/api_op_ListEnvironmentBlueprintConfigurations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListEnvironmentBlueprintConfigurationsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentBlueprintConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListEnvironmentBlueprintConfigurationsMiddlewares(s return nil } -// ListEnvironmentBlueprintConfigurationsAPIClient is a client that implements the -// ListEnvironmentBlueprintConfigurations operation. -type ListEnvironmentBlueprintConfigurationsAPIClient interface { - ListEnvironmentBlueprintConfigurations(context.Context, *ListEnvironmentBlueprintConfigurationsInput, ...func(*Options)) (*ListEnvironmentBlueprintConfigurationsOutput, error) -} - -var _ ListEnvironmentBlueprintConfigurationsAPIClient = (*Client)(nil) - // ListEnvironmentBlueprintConfigurationsPaginatorOptions is the paginator options // for ListEnvironmentBlueprintConfigurations type ListEnvironmentBlueprintConfigurationsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListEnvironmentBlueprintConfigurationsPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentBlueprintConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListEnvironmentBlueprintConfigurationsPaginator) NextPage(ctx context.C return result, nil } +// ListEnvironmentBlueprintConfigurationsAPIClient is a client that implements the +// ListEnvironmentBlueprintConfigurations operation. +type ListEnvironmentBlueprintConfigurationsAPIClient interface { + ListEnvironmentBlueprintConfigurations(context.Context, *ListEnvironmentBlueprintConfigurationsInput, ...func(*Options)) (*ListEnvironmentBlueprintConfigurationsOutput, error) +} + +var _ ListEnvironmentBlueprintConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentBlueprintConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListEnvironmentBlueprints.go b/service/datazone/api_op_ListEnvironmentBlueprints.go index df07fb7f768..0c7a9baaad3 100644 --- a/service/datazone/api_op_ListEnvironmentBlueprints.go +++ b/service/datazone/api_op_ListEnvironmentBlueprints.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListEnvironmentBlueprintsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentBlueprintsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListEnvironmentBlueprintsMiddlewares(stack *middlew return nil } -// ListEnvironmentBlueprintsAPIClient is a client that implements the -// ListEnvironmentBlueprints operation. -type ListEnvironmentBlueprintsAPIClient interface { - ListEnvironmentBlueprints(context.Context, *ListEnvironmentBlueprintsInput, ...func(*Options)) (*ListEnvironmentBlueprintsOutput, error) -} - -var _ ListEnvironmentBlueprintsAPIClient = (*Client)(nil) - // ListEnvironmentBlueprintsPaginatorOptions is the paginator options for // ListEnvironmentBlueprints type ListEnvironmentBlueprintsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListEnvironmentBlueprintsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentBlueprints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListEnvironmentBlueprintsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListEnvironmentBlueprintsAPIClient is a client that implements the +// ListEnvironmentBlueprints operation. +type ListEnvironmentBlueprintsAPIClient interface { + ListEnvironmentBlueprints(context.Context, *ListEnvironmentBlueprintsInput, ...func(*Options)) (*ListEnvironmentBlueprintsOutput, error) +} + +var _ ListEnvironmentBlueprintsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentBlueprints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListEnvironmentProfiles.go b/service/datazone/api_op_ListEnvironmentProfiles.go index 8d21f1f9ea4..24e65a43b79 100644 --- a/service/datazone/api_op_ListEnvironmentProfiles.go +++ b/service/datazone/api_op_ListEnvironmentProfiles.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListEnvironmentProfilesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentProfilesValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationListEnvironmentProfilesMiddlewares(stack *middlewar return nil } -// ListEnvironmentProfilesAPIClient is a client that implements the -// ListEnvironmentProfiles operation. -type ListEnvironmentProfilesAPIClient interface { - ListEnvironmentProfiles(context.Context, *ListEnvironmentProfilesInput, ...func(*Options)) (*ListEnvironmentProfilesOutput, error) -} - -var _ ListEnvironmentProfilesAPIClient = (*Client)(nil) - // ListEnvironmentProfilesPaginatorOptions is the paginator options for // ListEnvironmentProfiles type ListEnvironmentProfilesPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListEnvironmentProfilesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListEnvironmentProfilesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEnvironmentProfilesAPIClient is a client that implements the +// ListEnvironmentProfiles operation. +type ListEnvironmentProfilesAPIClient interface { + ListEnvironmentProfiles(context.Context, *ListEnvironmentProfilesInput, ...func(*Options)) (*ListEnvironmentProfilesOutput, error) +} + +var _ ListEnvironmentProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListEnvironments.go b/service/datazone/api_op_ListEnvironments.go index 80800f8b95f..a92128f9d8f 100644 --- a/service/datazone/api_op_ListEnvironments.go +++ b/service/datazone/api_op_ListEnvironments.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentsValidationMiddleware(stack); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of environments to return in a single call to @@ -255,6 +250,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListMetadataGenerationRuns.go b/service/datazone/api_op_ListMetadataGenerationRuns.go index ebbdd176016..7e8878d7091 100644 --- a/service/datazone/api_op_ListMetadataGenerationRuns.go +++ b/service/datazone/api_op_ListMetadataGenerationRuns.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListMetadataGenerationRunsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMetadataGenerationRunsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListMetadataGenerationRunsMiddlewares(stack *middle return nil } -// ListMetadataGenerationRunsAPIClient is a client that implements the -// ListMetadataGenerationRuns operation. -type ListMetadataGenerationRunsAPIClient interface { - ListMetadataGenerationRuns(context.Context, *ListMetadataGenerationRunsInput, ...func(*Options)) (*ListMetadataGenerationRunsOutput, error) -} - -var _ ListMetadataGenerationRunsAPIClient = (*Client)(nil) - // ListMetadataGenerationRunsPaginatorOptions is the paginator options for // ListMetadataGenerationRuns type ListMetadataGenerationRunsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListMetadataGenerationRunsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetadataGenerationRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListMetadataGenerationRunsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListMetadataGenerationRunsAPIClient is a client that implements the +// ListMetadataGenerationRuns operation. +type ListMetadataGenerationRunsAPIClient interface { + ListMetadataGenerationRuns(context.Context, *ListMetadataGenerationRunsInput, ...func(*Options)) (*ListMetadataGenerationRunsOutput, error) +} + +var _ ListMetadataGenerationRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetadataGenerationRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListNotifications.go b/service/datazone/api_op_ListNotifications.go index fbe88a5b772..eae84e9ff7f 100644 --- a/service/datazone/api_op_ListNotifications.go +++ b/service/datazone/api_op_ListNotifications.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListNotificationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNotificationsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListNotificationsMiddlewares(stack *middleware.Stac return nil } -// ListNotificationsAPIClient is a client that implements the ListNotifications -// operation. -type ListNotificationsAPIClient interface { - ListNotifications(context.Context, *ListNotificationsInput, ...func(*Options)) (*ListNotificationsOutput, error) -} - -var _ ListNotificationsAPIClient = (*Client)(nil) - // ListNotificationsPaginatorOptions is the paginator options for ListNotifications type ListNotificationsPaginatorOptions struct { // The maximum number of notifications to return in a single call to @@ -244,6 +239,9 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListNotificationsAPIClient is a client that implements the ListNotifications +// operation. +type ListNotificationsAPIClient interface { + ListNotifications(context.Context, *ListNotificationsInput, ...func(*Options)) (*ListNotificationsOutput, error) +} + +var _ ListNotificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListProjectMemberships.go b/service/datazone/api_op_ListProjectMemberships.go index 595688c9c92..1d1ef866d9d 100644 --- a/service/datazone/api_op_ListProjectMemberships.go +++ b/service/datazone/api_op_ListProjectMemberships.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListProjectMembershipsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProjectMembershipsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListProjectMembershipsMiddlewares(stack *middleware return nil } -// ListProjectMembershipsAPIClient is a client that implements the -// ListProjectMemberships operation. -type ListProjectMembershipsAPIClient interface { - ListProjectMemberships(context.Context, *ListProjectMembershipsInput, ...func(*Options)) (*ListProjectMembershipsOutput, error) -} - -var _ ListProjectMembershipsAPIClient = (*Client)(nil) - // ListProjectMembershipsPaginatorOptions is the paginator options for // ListProjectMemberships type ListProjectMembershipsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListProjectMembershipsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjectMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListProjectMembershipsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListProjectMembershipsAPIClient is a client that implements the +// ListProjectMemberships operation. +type ListProjectMembershipsAPIClient interface { + ListProjectMemberships(context.Context, *ListProjectMembershipsInput, ...func(*Options)) (*ListProjectMembershipsOutput, error) +} + +var _ ListProjectMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjectMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListProjects.go b/service/datazone/api_op_ListProjects.go index 38e24d3ecaa..aae0d6f8cb4 100644 --- a/service/datazone/api_op_ListProjects.go +++ b/service/datazone/api_op_ListProjects.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProjectsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of projects to return in a single call to ListProjects . When @@ -232,6 +228,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +250,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListSubscriptionGrants.go b/service/datazone/api_op_ListSubscriptionGrants.go index 4019d1285ee..2aff9c7e466 100644 --- a/service/datazone/api_op_ListSubscriptionGrants.go +++ b/service/datazone/api_op_ListSubscriptionGrants.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListSubscriptionGrantsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubscriptionGrantsValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListSubscriptionGrantsMiddlewares(stack *middleware return nil } -// ListSubscriptionGrantsAPIClient is a client that implements the -// ListSubscriptionGrants operation. -type ListSubscriptionGrantsAPIClient interface { - ListSubscriptionGrants(context.Context, *ListSubscriptionGrantsInput, ...func(*Options)) (*ListSubscriptionGrantsOutput, error) -} - -var _ ListSubscriptionGrantsAPIClient = (*Client)(nil) - // ListSubscriptionGrantsPaginatorOptions is the paginator options for // ListSubscriptionGrants type ListSubscriptionGrantsPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListSubscriptionGrantsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscriptionGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListSubscriptionGrantsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSubscriptionGrantsAPIClient is a client that implements the +// ListSubscriptionGrants operation. +type ListSubscriptionGrantsAPIClient interface { + ListSubscriptionGrants(context.Context, *ListSubscriptionGrantsInput, ...func(*Options)) (*ListSubscriptionGrantsOutput, error) +} + +var _ ListSubscriptionGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscriptionGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListSubscriptionRequests.go b/service/datazone/api_op_ListSubscriptionRequests.go index e12bb21ea68..0e9601794cc 100644 --- a/service/datazone/api_op_ListSubscriptionRequests.go +++ b/service/datazone/api_op_ListSubscriptionRequests.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListSubscriptionRequestsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubscriptionRequestsValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListSubscriptionRequestsMiddlewares(stack *middlewa return nil } -// ListSubscriptionRequestsAPIClient is a client that implements the -// ListSubscriptionRequests operation. -type ListSubscriptionRequestsAPIClient interface { - ListSubscriptionRequests(context.Context, *ListSubscriptionRequestsInput, ...func(*Options)) (*ListSubscriptionRequestsOutput, error) -} - -var _ ListSubscriptionRequestsAPIClient = (*Client)(nil) - // ListSubscriptionRequestsPaginatorOptions is the paginator options for // ListSubscriptionRequests type ListSubscriptionRequestsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *ListSubscriptionRequestsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscriptionRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListSubscriptionRequestsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSubscriptionRequestsAPIClient is a client that implements the +// ListSubscriptionRequests operation. +type ListSubscriptionRequestsAPIClient interface { + ListSubscriptionRequests(context.Context, *ListSubscriptionRequestsInput, ...func(*Options)) (*ListSubscriptionRequestsOutput, error) +} + +var _ ListSubscriptionRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscriptionRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListSubscriptionTargets.go b/service/datazone/api_op_ListSubscriptionTargets.go index 521d490f5f8..97ff6b74053 100644 --- a/service/datazone/api_op_ListSubscriptionTargets.go +++ b/service/datazone/api_op_ListSubscriptionTargets.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListSubscriptionTargetsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubscriptionTargetsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListSubscriptionTargetsMiddlewares(stack *middlewar return nil } -// ListSubscriptionTargetsAPIClient is a client that implements the -// ListSubscriptionTargets operation. -type ListSubscriptionTargetsAPIClient interface { - ListSubscriptionTargets(context.Context, *ListSubscriptionTargetsInput, ...func(*Options)) (*ListSubscriptionTargetsOutput, error) -} - -var _ ListSubscriptionTargetsAPIClient = (*Client)(nil) - // ListSubscriptionTargetsPaginatorOptions is the paginator options for // ListSubscriptionTargets type ListSubscriptionTargetsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *ListSubscriptionTargetsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscriptionTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *ListSubscriptionTargetsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSubscriptionTargetsAPIClient is a client that implements the +// ListSubscriptionTargets operation. +type ListSubscriptionTargetsAPIClient interface { + ListSubscriptionTargets(context.Context, *ListSubscriptionTargetsInput, ...func(*Options)) (*ListSubscriptionTargetsOutput, error) +} + +var _ ListSubscriptionTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscriptionTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListSubscriptions.go b/service/datazone/api_op_ListSubscriptions.go index 24d49370cb3..41be81c4b4e 100644 --- a/service/datazone/api_op_ListSubscriptions.go +++ b/service/datazone/api_op_ListSubscriptions.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListSubscriptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationListSubscriptionsMiddlewares(stack *middleware.Stac return nil } -// ListSubscriptionsAPIClient is a client that implements the ListSubscriptions -// operation. -type ListSubscriptionsAPIClient interface { - ListSubscriptions(context.Context, *ListSubscriptionsInput, ...func(*Options)) (*ListSubscriptionsOutput, error) -} - -var _ ListSubscriptionsAPIClient = (*Client)(nil) - // ListSubscriptionsPaginatorOptions is the paginator options for ListSubscriptions type ListSubscriptionsPaginatorOptions struct { // The maximum number of subscriptions to return in a single call to @@ -251,6 +246,9 @@ func (p *ListSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *ListSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListSubscriptionsAPIClient is a client that implements the ListSubscriptions +// operation. +type ListSubscriptionsAPIClient interface { + ListSubscriptions(context.Context, *ListSubscriptionsInput, ...func(*Options)) (*ListSubscriptionsOutput, error) +} + +var _ ListSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_ListTagsForResource.go b/service/datazone/api_op_ListTagsForResource.go index 995736b3d9f..d3a787b7c23 100644 --- a/service/datazone/api_op_ListTagsForResource.go +++ b/service/datazone/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_ListTimeSeriesDataPoints.go b/service/datazone/api_op_ListTimeSeriesDataPoints.go index cd9424e42a1..aab58e5fcd8 100644 --- a/service/datazone/api_op_ListTimeSeriesDataPoints.go +++ b/service/datazone/api_op_ListTimeSeriesDataPoints.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListTimeSeriesDataPointsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTimeSeriesDataPointsValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListTimeSeriesDataPointsMiddlewares(stack *middlewa return nil } -// ListTimeSeriesDataPointsAPIClient is a client that implements the -// ListTimeSeriesDataPoints operation. -type ListTimeSeriesDataPointsAPIClient interface { - ListTimeSeriesDataPoints(context.Context, *ListTimeSeriesDataPointsInput, ...func(*Options)) (*ListTimeSeriesDataPointsOutput, error) -} - -var _ ListTimeSeriesDataPointsAPIClient = (*Client)(nil) - // ListTimeSeriesDataPointsPaginatorOptions is the paginator options for // ListTimeSeriesDataPoints type ListTimeSeriesDataPointsPaginatorOptions struct { @@ -251,6 +246,9 @@ func (p *ListTimeSeriesDataPointsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTimeSeriesDataPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *ListTimeSeriesDataPointsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTimeSeriesDataPointsAPIClient is a client that implements the +// ListTimeSeriesDataPoints operation. +type ListTimeSeriesDataPointsAPIClient interface { + ListTimeSeriesDataPoints(context.Context, *ListTimeSeriesDataPointsInput, ...func(*Options)) (*ListTimeSeriesDataPointsOutput, error) +} + +var _ ListTimeSeriesDataPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTimeSeriesDataPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_PostTimeSeriesDataPoints.go b/service/datazone/api_op_PostTimeSeriesDataPoints.go index 9fc72c12f6d..8ca29b21315 100644 --- a/service/datazone/api_op_PostTimeSeriesDataPoints.go +++ b/service/datazone/api_op_PostTimeSeriesDataPoints.go @@ -136,6 +136,9 @@ func (c *Client) addOperationPostTimeSeriesDataPointsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPostTimeSeriesDataPointsMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_PutEnvironmentBlueprintConfiguration.go b/service/datazone/api_op_PutEnvironmentBlueprintConfiguration.go index 9a439362803..2039b31e84d 100644 --- a/service/datazone/api_op_PutEnvironmentBlueprintConfiguration.go +++ b/service/datazone/api_op_PutEnvironmentBlueprintConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationPutEnvironmentBlueprintConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEnvironmentBlueprintConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_RejectPredictions.go b/service/datazone/api_op_RejectPredictions.go index 4c33aea529a..d49f2b7f24b 100644 --- a/service/datazone/api_op_RejectPredictions.go +++ b/service/datazone/api_op_RejectPredictions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRejectPredictionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRejectPredictionsMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_RejectSubscriptionRequest.go b/service/datazone/api_op_RejectSubscriptionRequest.go index b66ca7f7f59..1957751fa84 100644 --- a/service/datazone/api_op_RejectSubscriptionRequest.go +++ b/service/datazone/api_op_RejectSubscriptionRequest.go @@ -168,6 +168,9 @@ func (c *Client) addOperationRejectSubscriptionRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectSubscriptionRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_RevokeSubscription.go b/service/datazone/api_op_RevokeSubscription.go index d2e9cdc5506..966fa0296c0 100644 --- a/service/datazone/api_op_RevokeSubscription.go +++ b/service/datazone/api_op_RevokeSubscription.go @@ -163,6 +163,9 @@ func (c *Client) addOperationRevokeSubscriptionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_Search.go b/service/datazone/api_op_Search.go index 718eeba2c2b..ee8c2fc673b 100644 --- a/service/datazone/api_op_Search.go +++ b/service/datazone/api_op_Search.go @@ -152,6 +152,9 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchValidationMiddleware(stack); err != nil { return err } @@ -176,13 +179,6 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options return nil } -// SearchAPIClient is a client that implements the Search operation. -type SearchAPIClient interface { - Search(context.Context, *SearchInput, ...func(*Options)) (*SearchOutput, error) -} - -var _ SearchAPIClient = (*Client)(nil) - // SearchPaginatorOptions is the paginator options for Search type SearchPaginatorOptions struct { // The maximum number of results to return in a single call to Search . When the @@ -249,6 +245,9 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Search(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +267,13 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) return result, nil } +// SearchAPIClient is a client that implements the Search operation. +type SearchAPIClient interface { + Search(context.Context, *SearchInput, ...func(*Options)) (*SearchOutput, error) +} + +var _ SearchAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearch(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_SearchGroupProfiles.go b/service/datazone/api_op_SearchGroupProfiles.go index fc61e04e175..2069b8fead0 100644 --- a/service/datazone/api_op_SearchGroupProfiles.go +++ b/service/datazone/api_op_SearchGroupProfiles.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSearchGroupProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchGroupProfilesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationSearchGroupProfilesMiddlewares(stack *middleware.St return nil } -// SearchGroupProfilesAPIClient is a client that implements the -// SearchGroupProfiles operation. -type SearchGroupProfilesAPIClient interface { - SearchGroupProfiles(context.Context, *SearchGroupProfilesInput, ...func(*Options)) (*SearchGroupProfilesOutput, error) -} - -var _ SearchGroupProfilesAPIClient = (*Client)(nil) - // SearchGroupProfilesPaginatorOptions is the paginator options for // SearchGroupProfiles type SearchGroupProfilesPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *SearchGroupProfilesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchGroupProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *SearchGroupProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// SearchGroupProfilesAPIClient is a client that implements the +// SearchGroupProfiles operation. +type SearchGroupProfilesAPIClient interface { + SearchGroupProfiles(context.Context, *SearchGroupProfilesInput, ...func(*Options)) (*SearchGroupProfilesOutput, error) +} + +var _ SearchGroupProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchGroupProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_SearchListings.go b/service/datazone/api_op_SearchListings.go index 67308650320..e419b55535b 100644 --- a/service/datazone/api_op_SearchListings.go +++ b/service/datazone/api_op_SearchListings.go @@ -144,6 +144,9 @@ func (c *Client) addOperationSearchListingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchListingsValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationSearchListingsMiddlewares(stack *middleware.Stack, return nil } -// SearchListingsAPIClient is a client that implements the SearchListings -// operation. -type SearchListingsAPIClient interface { - SearchListings(context.Context, *SearchListingsInput, ...func(*Options)) (*SearchListingsOutput, error) -} - -var _ SearchListingsAPIClient = (*Client)(nil) - // SearchListingsPaginatorOptions is the paginator options for SearchListings type SearchListingsPaginatorOptions struct { // The maximum number of results to return in a single call to SearchListings . @@ -242,6 +237,9 @@ func (p *SearchListingsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchListings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *SearchListingsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchListingsAPIClient is a client that implements the SearchListings +// operation. +type SearchListingsAPIClient interface { + SearchListings(context.Context, *SearchListingsInput, ...func(*Options)) (*SearchListingsOutput, error) +} + +var _ SearchListingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchListings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_SearchTypes.go b/service/datazone/api_op_SearchTypes.go index aaa76b00775..ffef8729e07 100644 --- a/service/datazone/api_op_SearchTypes.go +++ b/service/datazone/api_op_SearchTypes.go @@ -152,6 +152,9 @@ func (c *Client) addOperationSearchTypesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchTypesValidationMiddleware(stack); err != nil { return err } @@ -176,13 +179,6 @@ func (c *Client) addOperationSearchTypesMiddlewares(stack *middleware.Stack, opt return nil } -// SearchTypesAPIClient is a client that implements the SearchTypes operation. -type SearchTypesAPIClient interface { - SearchTypes(context.Context, *SearchTypesInput, ...func(*Options)) (*SearchTypesOutput, error) -} - -var _ SearchTypesAPIClient = (*Client)(nil) - // SearchTypesPaginatorOptions is the paginator options for SearchTypes type SearchTypesPaginatorOptions struct { // The maximum number of results to return in a single call to SearchTypes . When @@ -249,6 +245,9 @@ func (p *SearchTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +267,13 @@ func (p *SearchTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// SearchTypesAPIClient is a client that implements the SearchTypes operation. +type SearchTypesAPIClient interface { + SearchTypes(context.Context, *SearchTypesInput, ...func(*Options)) (*SearchTypesOutput, error) +} + +var _ SearchTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_SearchUserProfiles.go b/service/datazone/api_op_SearchUserProfiles.go index 0604f8f4993..932c1e665ee 100644 --- a/service/datazone/api_op_SearchUserProfiles.go +++ b/service/datazone/api_op_SearchUserProfiles.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSearchUserProfilesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchUserProfilesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationSearchUserProfilesMiddlewares(stack *middleware.Sta return nil } -// SearchUserProfilesAPIClient is a client that implements the SearchUserProfiles -// operation. -type SearchUserProfilesAPIClient interface { - SearchUserProfiles(context.Context, *SearchUserProfilesInput, ...func(*Options)) (*SearchUserProfilesOutput, error) -} - -var _ SearchUserProfilesAPIClient = (*Client)(nil) - // SearchUserProfilesPaginatorOptions is the paginator options for // SearchUserProfiles type SearchUserProfilesPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *SearchUserProfilesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchUserProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *SearchUserProfilesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchUserProfilesAPIClient is a client that implements the SearchUserProfiles +// operation. +type SearchUserProfilesAPIClient interface { + SearchUserProfiles(context.Context, *SearchUserProfilesInput, ...func(*Options)) (*SearchUserProfilesOutput, error) +} + +var _ SearchUserProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchUserProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/datazone/api_op_StartDataSourceRun.go b/service/datazone/api_op_StartDataSourceRun.go index 5de854c1dfb..d06e7ebb81e 100644 --- a/service/datazone/api_op_StartDataSourceRun.go +++ b/service/datazone/api_op_StartDataSourceRun.go @@ -171,6 +171,9 @@ func (c *Client) addOperationStartDataSourceRunMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartDataSourceRunMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_StartMetadataGenerationRun.go b/service/datazone/api_op_StartMetadataGenerationRun.go index 719ee8d235e..8ecc4b734f7 100644 --- a/service/datazone/api_op_StartMetadataGenerationRun.go +++ b/service/datazone/api_op_StartMetadataGenerationRun.go @@ -152,6 +152,9 @@ func (c *Client) addOperationStartMetadataGenerationRunMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartMetadataGenerationRunMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_TagResource.go b/service/datazone/api_op_TagResource.go index f1d5eb81c2d..fe3f8bb1148 100644 --- a/service/datazone/api_op_TagResource.go +++ b/service/datazone/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UntagResource.go b/service/datazone/api_op_UntagResource.go index 56c26de20b2..6d0802b7481 100644 --- a/service/datazone/api_op_UntagResource.go +++ b/service/datazone/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateDataSource.go b/service/datazone/api_op_UpdateDataSource.go index 2c3b5dab9e7..0cf603fefd7 100644 --- a/service/datazone/api_op_UpdateDataSource.go +++ b/service/datazone/api_op_UpdateDataSource.go @@ -218,6 +218,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateDomain.go b/service/datazone/api_op_UpdateDomain.go index 7f4134cf065..8910ee2837d 100644 --- a/service/datazone/api_op_UpdateDomain.go +++ b/service/datazone/api_op_UpdateDomain.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateDomainMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_UpdateEnvironment.go b/service/datazone/api_op_UpdateEnvironment.go index d4f67214d1a..67e2c755dd3 100644 --- a/service/datazone/api_op_UpdateEnvironment.go +++ b/service/datazone/api_op_UpdateEnvironment.go @@ -193,6 +193,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateEnvironmentAction.go b/service/datazone/api_op_UpdateEnvironmentAction.go index 8f4c314e4fb..1923cb4dd96 100644 --- a/service/datazone/api_op_UpdateEnvironmentAction.go +++ b/service/datazone/api_op_UpdateEnvironmentAction.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateEnvironmentActionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateEnvironmentProfile.go b/service/datazone/api_op_UpdateEnvironmentProfile.go index 4202a3d08cc..dd2e7b5ca96 100644 --- a/service/datazone/api_op_UpdateEnvironmentProfile.go +++ b/service/datazone/api_op_UpdateEnvironmentProfile.go @@ -179,6 +179,9 @@ func (c *Client) addOperationUpdateEnvironmentProfileMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateGlossary.go b/service/datazone/api_op_UpdateGlossary.go index 317fd4b9730..f19eba26132 100644 --- a/service/datazone/api_op_UpdateGlossary.go +++ b/service/datazone/api_op_UpdateGlossary.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateGlossaryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateGlossaryMiddleware(stack, options); err != nil { return err } diff --git a/service/datazone/api_op_UpdateGlossaryTerm.go b/service/datazone/api_op_UpdateGlossaryTerm.go index c9596b7e53a..9edc3d28f22 100644 --- a/service/datazone/api_op_UpdateGlossaryTerm.go +++ b/service/datazone/api_op_UpdateGlossaryTerm.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdateGlossaryTermMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGlossaryTermValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateGroupProfile.go b/service/datazone/api_op_UpdateGroupProfile.go index 1f8eff82fcf..9b3094ec709 100644 --- a/service/datazone/api_op_UpdateGroupProfile.go +++ b/service/datazone/api_op_UpdateGroupProfile.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateGroupProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateProject.go b/service/datazone/api_op_UpdateProject.go index 67380ad5d54..85647b976de 100644 --- a/service/datazone/api_op_UpdateProject.go +++ b/service/datazone/api_op_UpdateProject.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateSubscriptionGrantStatus.go b/service/datazone/api_op_UpdateSubscriptionGrantStatus.go index 0a893482928..febf585431a 100644 --- a/service/datazone/api_op_UpdateSubscriptionGrantStatus.go +++ b/service/datazone/api_op_UpdateSubscriptionGrantStatus.go @@ -182,6 +182,9 @@ func (c *Client) addOperationUpdateSubscriptionGrantStatusMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriptionGrantStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateSubscriptionRequest.go b/service/datazone/api_op_UpdateSubscriptionRequest.go index 98e50897e5e..e7e4e9e1928 100644 --- a/service/datazone/api_op_UpdateSubscriptionRequest.go +++ b/service/datazone/api_op_UpdateSubscriptionRequest.go @@ -170,6 +170,9 @@ func (c *Client) addOperationUpdateSubscriptionRequestMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriptionRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateSubscriptionTarget.go b/service/datazone/api_op_UpdateSubscriptionTarget.go index 7c52af3ee0e..2a4101240e7 100644 --- a/service/datazone/api_op_UpdateSubscriptionTarget.go +++ b/service/datazone/api_op_UpdateSubscriptionTarget.go @@ -213,6 +213,9 @@ func (c *Client) addOperationUpdateSubscriptionTargetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriptionTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/datazone/api_op_UpdateUserProfile.go b/service/datazone/api_op_UpdateUserProfile.go index 1b39dd87277..64ee12b7589 100644 --- a/service/datazone/api_op_UpdateUserProfile.go +++ b/service/datazone/api_op_UpdateUserProfile.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_client.go b/service/dax/api_client.go index d4791518318..366c37b7554 100644 --- a/service/dax/api_client.go +++ b/service/dax/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/dax/api_op_CreateCluster.go b/service/dax/api_op_CreateCluster.go index 30f587e0cb2..3ee278713c7 100644 --- a/service/dax/api_op_CreateCluster.go +++ b/service/dax/api_op_CreateCluster.go @@ -209,6 +209,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_CreateParameterGroup.go b/service/dax/api_op_CreateParameterGroup.go index 4b16d72ece2..ad11fd51154 100644 --- a/service/dax/api_op_CreateParameterGroup.go +++ b/service/dax/api_op_CreateParameterGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_CreateSubnetGroup.go b/service/dax/api_op_CreateSubnetGroup.go index c578a3d0020..176912a736f 100644 --- a/service/dax/api_op_CreateSubnetGroup.go +++ b/service/dax/api_op_CreateSubnetGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateSubnetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_DecreaseReplicationFactor.go b/service/dax/api_op_DecreaseReplicationFactor.go index 1ae33a90d99..42e413392dc 100644 --- a/service/dax/api_op_DecreaseReplicationFactor.go +++ b/service/dax/api_op_DecreaseReplicationFactor.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDecreaseReplicationFactorMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecreaseReplicationFactorValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_DeleteCluster.go b/service/dax/api_op_DeleteCluster.go index c7abc82d054..57ede57570f 100644 --- a/service/dax/api_op_DeleteCluster.go +++ b/service/dax/api_op_DeleteCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_DeleteParameterGroup.go b/service/dax/api_op_DeleteParameterGroup.go index 26ee1b60c69..d881dfea783 100644 --- a/service/dax/api_op_DeleteParameterGroup.go +++ b/service/dax/api_op_DeleteParameterGroup.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_DeleteSubnetGroup.go b/service/dax/api_op_DeleteSubnetGroup.go index 9d4e4d070ab..d01b302e2b2 100644 --- a/service/dax/api_op_DeleteSubnetGroup.go +++ b/service/dax/api_op_DeleteSubnetGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSubnetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_DescribeClusters.go b/service/dax/api_op_DescribeClusters.go index 5178eab7ec7..9b4fe477ac8 100644 --- a/service/dax/api_op_DescribeClusters.go +++ b/service/dax/api_op_DescribeClusters.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusters(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dax/api_op_DescribeDefaultParameters.go b/service/dax/api_op_DescribeDefaultParameters.go index 39db4f50d9d..18eaf3c805d 100644 --- a/service/dax/api_op_DescribeDefaultParameters.go +++ b/service/dax/api_op_DescribeDefaultParameters.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDefaultParametersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDefaultParameters(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dax/api_op_DescribeEvents.go b/service/dax/api_op_DescribeEvents.go index b945aabc86f..1d663f6ca39 100644 --- a/service/dax/api_op_DescribeEvents.go +++ b/service/dax/api_op_DescribeEvents.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dax/api_op_DescribeParameterGroups.go b/service/dax/api_op_DescribeParameterGroups.go index 29db9897b84..32001025446 100644 --- a/service/dax/api_op_DescribeParameterGroups.go +++ b/service/dax/api_op_DescribeParameterGroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeParameterGroupsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeParameterGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dax/api_op_DescribeParameters.go b/service/dax/api_op_DescribeParameters.go index d05df897fd4..c1302d9459f 100644 --- a/service/dax/api_op_DescribeParameters.go +++ b/service/dax/api_op_DescribeParameters.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_DescribeSubnetGroups.go b/service/dax/api_op_DescribeSubnetGroups.go index d231abbfd1e..c51ec4c736a 100644 --- a/service/dax/api_op_DescribeSubnetGroups.go +++ b/service/dax/api_op_DescribeSubnetGroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeSubnetGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSubnetGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dax/api_op_IncreaseReplicationFactor.go b/service/dax/api_op_IncreaseReplicationFactor.go index 6c53ed079cc..b2d6dcd42d6 100644 --- a/service/dax/api_op_IncreaseReplicationFactor.go +++ b/service/dax/api_op_IncreaseReplicationFactor.go @@ -116,6 +116,9 @@ func (c *Client) addOperationIncreaseReplicationFactorMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIncreaseReplicationFactorValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_ListTags.go b/service/dax/api_op_ListTags.go index cfa73ac752f..54672973a3c 100644 --- a/service/dax/api_op_ListTags.go +++ b/service/dax/api_op_ListTags.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_RebootNode.go b/service/dax/api_op_RebootNode.go index 84777d6b854..b106f9fbcab 100644 --- a/service/dax/api_op_RebootNode.go +++ b/service/dax/api_op_RebootNode.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRebootNodeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_TagResource.go b/service/dax/api_op_TagResource.go index be35f527c9d..abc097909d8 100644 --- a/service/dax/api_op_TagResource.go +++ b/service/dax/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_UntagResource.go b/service/dax/api_op_UntagResource.go index 814bc577398..0dc4821d086 100644 --- a/service/dax/api_op_UntagResource.go +++ b/service/dax/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_UpdateCluster.go b/service/dax/api_op_UpdateCluster.go index 69a6437d955..f95123ed50d 100644 --- a/service/dax/api_op_UpdateCluster.go +++ b/service/dax/api_op_UpdateCluster.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_UpdateParameterGroup.go b/service/dax/api_op_UpdateParameterGroup.go index 1588629e1c2..19aabea0a9a 100644 --- a/service/dax/api_op_UpdateParameterGroup.go +++ b/service/dax/api_op_UpdateParameterGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dax/api_op_UpdateSubnetGroup.go b/service/dax/api_op_UpdateSubnetGroup.go index c04b47cf1d5..13d8b2075b9 100644 --- a/service/dax/api_op_UpdateSubnetGroup.go +++ b/service/dax/api_op_UpdateSubnetGroup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateSubnetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_client.go b/service/deadline/api_client.go index 73e6b4b8c8b..20d3f50be22 100644 --- a/service/deadline/api_client.go +++ b/service/deadline/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/deadline/api_op_AssociateMemberToFarm.go b/service/deadline/api_op_AssociateMemberToFarm.go index 6f5f5d74bb8..503c20549d9 100644 --- a/service/deadline/api_op_AssociateMemberToFarm.go +++ b/service/deadline/api_op_AssociateMemberToFarm.go @@ -122,6 +122,9 @@ func (c *Client) addOperationAssociateMemberToFarmMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateMemberToFarmMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssociateMemberToFleet.go b/service/deadline/api_op_AssociateMemberToFleet.go index a7f5fa766cd..65c99803e0e 100644 --- a/service/deadline/api_op_AssociateMemberToFleet.go +++ b/service/deadline/api_op_AssociateMemberToFleet.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAssociateMemberToFleetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateMemberToFleetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssociateMemberToJob.go b/service/deadline/api_op_AssociateMemberToJob.go index 09734efe75f..81f252bd175 100644 --- a/service/deadline/api_op_AssociateMemberToJob.go +++ b/service/deadline/api_op_AssociateMemberToJob.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAssociateMemberToJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateMemberToJobMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssociateMemberToQueue.go b/service/deadline/api_op_AssociateMemberToQueue.go index a18a9709207..3ed01f96743 100644 --- a/service/deadline/api_op_AssociateMemberToQueue.go +++ b/service/deadline/api_op_AssociateMemberToQueue.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAssociateMemberToQueueMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateMemberToQueueMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssumeFleetRoleForRead.go b/service/deadline/api_op_AssumeFleetRoleForRead.go index afbb5b4d78a..827ebef4af9 100644 --- a/service/deadline/api_op_AssumeFleetRoleForRead.go +++ b/service/deadline/api_op_AssumeFleetRoleForRead.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssumeFleetRoleForReadMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssumeFleetRoleForReadMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssumeFleetRoleForWorker.go b/service/deadline/api_op_AssumeFleetRoleForWorker.go index 61d7fdbe1fc..549d83c2b0f 100644 --- a/service/deadline/api_op_AssumeFleetRoleForWorker.go +++ b/service/deadline/api_op_AssumeFleetRoleForWorker.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssumeFleetRoleForWorkerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssumeFleetRoleForWorkerMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssumeQueueRoleForRead.go b/service/deadline/api_op_AssumeQueueRoleForRead.go index 57b77dafca9..20e7b12870a 100644 --- a/service/deadline/api_op_AssumeQueueRoleForRead.go +++ b/service/deadline/api_op_AssumeQueueRoleForRead.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssumeQueueRoleForReadMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssumeQueueRoleForReadMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssumeQueueRoleForUser.go b/service/deadline/api_op_AssumeQueueRoleForUser.go index 826e11d7232..1ce4f75143f 100644 --- a/service/deadline/api_op_AssumeQueueRoleForUser.go +++ b/service/deadline/api_op_AssumeQueueRoleForUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssumeQueueRoleForUserMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssumeQueueRoleForUserMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_AssumeQueueRoleForWorker.go b/service/deadline/api_op_AssumeQueueRoleForWorker.go index 8239b19c4c0..873eba7fd14 100644 --- a/service/deadline/api_op_AssumeQueueRoleForWorker.go +++ b/service/deadline/api_op_AssumeQueueRoleForWorker.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAssumeQueueRoleForWorkerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssumeQueueRoleForWorkerMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_BatchGetJobEntity.go b/service/deadline/api_op_BatchGetJobEntity.go index 9521ca3c75d..764f13ed50d 100644 --- a/service/deadline/api_op_BatchGetJobEntity.go +++ b/service/deadline/api_op_BatchGetJobEntity.go @@ -130,6 +130,9 @@ func (c *Client) addOperationBatchGetJobEntityMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchGetJobEntityMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CopyJobTemplate.go b/service/deadline/api_op_CopyJobTemplate.go index bc94c735205..4c441a16cc8 100644 --- a/service/deadline/api_op_CopyJobTemplate.go +++ b/service/deadline/api_op_CopyJobTemplate.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCopyJobTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCopyJobTemplateMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateBudget.go b/service/deadline/api_op_CreateBudget.go index 8ca2fdcb5b0..98ac793e12d 100644 --- a/service/deadline/api_op_CreateBudget.go +++ b/service/deadline/api_op_CreateBudget.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateBudgetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateBudgetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateFarm.go b/service/deadline/api_op_CreateFarm.go index e3513743f2f..6d7ea73f78a 100644 --- a/service/deadline/api_op_CreateFarm.go +++ b/service/deadline/api_op_CreateFarm.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateFarmMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateFarmMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateFleet.go b/service/deadline/api_op_CreateFleet.go index b6e3c8241bc..6a8ad82a549 100644 --- a/service/deadline/api_op_CreateFleet.go +++ b/service/deadline/api_op_CreateFleet.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateFleetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateJob.go b/service/deadline/api_op_CreateJob.go index bd165fb941c..ea620cdd137 100644 --- a/service/deadline/api_op_CreateJob.go +++ b/service/deadline/api_op_CreateJob.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateJobMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateLicenseEndpoint.go b/service/deadline/api_op_CreateLicenseEndpoint.go index 8e02a9660af..b9c36e7a357 100644 --- a/service/deadline/api_op_CreateLicenseEndpoint.go +++ b/service/deadline/api_op_CreateLicenseEndpoint.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateLicenseEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateLicenseEndpointMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateMonitor.go b/service/deadline/api_op_CreateMonitor.go index 2747fe7c52c..efac0edf80d 100644 --- a/service/deadline/api_op_CreateMonitor.go +++ b/service/deadline/api_op_CreateMonitor.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateMonitorMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateQueue.go b/service/deadline/api_op_CreateQueue.go index b637d20e8b2..6abbf13ba83 100644 --- a/service/deadline/api_op_CreateQueue.go +++ b/service/deadline/api_op_CreateQueue.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateQueueMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateQueueEnvironment.go b/service/deadline/api_op_CreateQueueEnvironment.go index 05b031ebdff..c7be78d8c0e 100644 --- a/service/deadline/api_op_CreateQueueEnvironment.go +++ b/service/deadline/api_op_CreateQueueEnvironment.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateQueueEnvironmentMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateQueueEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateQueueFleetAssociation.go b/service/deadline/api_op_CreateQueueFleetAssociation.go index 414c82c3ba0..4c2bea3c393 100644 --- a/service/deadline/api_op_CreateQueueFleetAssociation.go +++ b/service/deadline/api_op_CreateQueueFleetAssociation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateQueueFleetAssociationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateQueueFleetAssociationMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateStorageProfile.go b/service/deadline/api_op_CreateStorageProfile.go index 60119f0f5d6..cc391dd0460 100644 --- a/service/deadline/api_op_CreateStorageProfile.go +++ b/service/deadline/api_op_CreateStorageProfile.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateStorageProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateStorageProfileMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_CreateWorker.go b/service/deadline/api_op_CreateWorker.go index 25d92668d6b..553708ca058 100644 --- a/service/deadline/api_op_CreateWorker.go +++ b/service/deadline/api_op_CreateWorker.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateWorkerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateWorkerMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteBudget.go b/service/deadline/api_op_DeleteBudget.go index cb5bb1d965d..3a280c9a2f8 100644 --- a/service/deadline/api_op_DeleteBudget.go +++ b/service/deadline/api_op_DeleteBudget.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteBudgetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteBudgetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteFarm.go b/service/deadline/api_op_DeleteFarm.go index 29bcc2823bf..40d02facdf2 100644 --- a/service/deadline/api_op_DeleteFarm.go +++ b/service/deadline/api_op_DeleteFarm.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFarmMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteFarmMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteFleet.go b/service/deadline/api_op_DeleteFleet.go index a168b17f5fd..a4d1a53c388 100644 --- a/service/deadline/api_op_DeleteFleet.go +++ b/service/deadline/api_op_DeleteFleet.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteFleetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteLicenseEndpoint.go b/service/deadline/api_op_DeleteLicenseEndpoint.go index 60eb64e320e..b86905e460d 100644 --- a/service/deadline/api_op_DeleteLicenseEndpoint.go +++ b/service/deadline/api_op_DeleteLicenseEndpoint.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteLicenseEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteLicenseEndpointMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteMeteredProduct.go b/service/deadline/api_op_DeleteMeteredProduct.go index 28b5b627971..c8d37ae0531 100644 --- a/service/deadline/api_op_DeleteMeteredProduct.go +++ b/service/deadline/api_op_DeleteMeteredProduct.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteMeteredProductMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteMeteredProductMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteMonitor.go b/service/deadline/api_op_DeleteMonitor.go index d09bc6f244b..984136d69b2 100644 --- a/service/deadline/api_op_DeleteMonitor.go +++ b/service/deadline/api_op_DeleteMonitor.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteMonitorMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteQueue.go b/service/deadline/api_op_DeleteQueue.go index 24242c45228..3575e040225 100644 --- a/service/deadline/api_op_DeleteQueue.go +++ b/service/deadline/api_op_DeleteQueue.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteQueueMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteQueueEnvironment.go b/service/deadline/api_op_DeleteQueueEnvironment.go index e1f3b9efbc8..7d614a22321 100644 --- a/service/deadline/api_op_DeleteQueueEnvironment.go +++ b/service/deadline/api_op_DeleteQueueEnvironment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteQueueEnvironmentMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteQueueEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteQueueFleetAssociation.go b/service/deadline/api_op_DeleteQueueFleetAssociation.go index d20d715c6c5..4af4ed1e704 100644 --- a/service/deadline/api_op_DeleteQueueFleetAssociation.go +++ b/service/deadline/api_op_DeleteQueueFleetAssociation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteQueueFleetAssociationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteQueueFleetAssociationMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteStorageProfile.go b/service/deadline/api_op_DeleteStorageProfile.go index 81932c3acc7..cc7ba1cf225 100644 --- a/service/deadline/api_op_DeleteStorageProfile.go +++ b/service/deadline/api_op_DeleteStorageProfile.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteStorageProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteStorageProfileMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DeleteWorker.go b/service/deadline/api_op_DeleteWorker.go index 5b365a268cd..9b2d884572c 100644 --- a/service/deadline/api_op_DeleteWorker.go +++ b/service/deadline/api_op_DeleteWorker.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteWorkerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteWorkerMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DisassociateMemberFromFarm.go b/service/deadline/api_op_DisassociateMemberFromFarm.go index 9384ff26492..597c7d6d4cd 100644 --- a/service/deadline/api_op_DisassociateMemberFromFarm.go +++ b/service/deadline/api_op_DisassociateMemberFromFarm.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateMemberFromFarmMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateMemberFromFarmMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DisassociateMemberFromFleet.go b/service/deadline/api_op_DisassociateMemberFromFleet.go index 20eaa976dd7..54be9a29337 100644 --- a/service/deadline/api_op_DisassociateMemberFromFleet.go +++ b/service/deadline/api_op_DisassociateMemberFromFleet.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateMemberFromFleetMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateMemberFromFleetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DisassociateMemberFromJob.go b/service/deadline/api_op_DisassociateMemberFromJob.go index 5076218ccc6..e9143f9fd11 100644 --- a/service/deadline/api_op_DisassociateMemberFromJob.go +++ b/service/deadline/api_op_DisassociateMemberFromJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateMemberFromJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateMemberFromJobMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_DisassociateMemberFromQueue.go b/service/deadline/api_op_DisassociateMemberFromQueue.go index c12861ae744..b9f53f97058 100644 --- a/service/deadline/api_op_DisassociateMemberFromQueue.go +++ b/service/deadline/api_op_DisassociateMemberFromQueue.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateMemberFromQueueMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateMemberFromQueueMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetBudget.go b/service/deadline/api_op_GetBudget.go index 57ff02d3311..f0f382f5700 100644 --- a/service/deadline/api_op_GetBudget.go +++ b/service/deadline/api_op_GetBudget.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetBudgetMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBudgetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetFarm.go b/service/deadline/api_op_GetFarm.go index e4f5dcd8ed6..a88c49bf7b2 100644 --- a/service/deadline/api_op_GetFarm.go +++ b/service/deadline/api_op_GetFarm.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetFarmMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetFarmMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetFleet.go b/service/deadline/api_op_GetFleet.go index 81324f1ece4..3844db669d6 100644 --- a/service/deadline/api_op_GetFleet.go +++ b/service/deadline/api_op_GetFleet.go @@ -186,6 +186,9 @@ func (c *Client) addOperationGetFleetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetFleetMiddleware(stack); err != nil { return err } @@ -213,40 +216,6 @@ func (c *Client) addOperationGetFleetMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opGetFleetMiddleware struct { -} - -func (*endpointPrefix_opGetFleetMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetFleetMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetFleetMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetFleetMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetFleetAPIClient is a client that implements the GetFleet operation. -type GetFleetAPIClient interface { - GetFleet(context.Context, *GetFleetInput, ...func(*Options)) (*GetFleetOutput, error) -} - -var _ GetFleetAPIClient = (*Client)(nil) - // FleetActiveWaiterOptions are waiter options for FleetActiveWaiter type FleetActiveWaiterOptions struct { @@ -361,7 +330,13 @@ func (w *FleetActiveWaiter) WaitForOutput(ctx context.Context, params *GetFleetI } out, err := w.client.GetFleet(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -453,6 +428,40 @@ func fleetActiveStateRetryable(ctx context.Context, input *GetFleetInput, output return true, nil } +type endpointPrefix_opGetFleetMiddleware struct { +} + +func (*endpointPrefix_opGetFleetMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetFleetMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetFleetMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetFleetMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetFleetAPIClient is a client that implements the GetFleet operation. +type GetFleetAPIClient interface { + GetFleet(context.Context, *GetFleetInput, ...func(*Options)) (*GetFleetOutput, error) +} + +var _ GetFleetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFleet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_GetJob.go b/service/deadline/api_op_GetJob.go index e8fd26739d8..5a5484cfc20 100644 --- a/service/deadline/api_op_GetJob.go +++ b/service/deadline/api_op_GetJob.go @@ -192,6 +192,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetJobMiddleware(stack); err != nil { return err } @@ -219,40 +222,6 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options return nil } -type endpointPrefix_opGetJobMiddleware struct { -} - -func (*endpointPrefix_opGetJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetJobAPIClient is a client that implements the GetJob operation. -type GetJobAPIClient interface { - GetJob(context.Context, *GetJobInput, ...func(*Options)) (*GetJobOutput, error) -} - -var _ GetJobAPIClient = (*Client)(nil) - // JobCreateCompleteWaiterOptions are waiter options for JobCreateCompleteWaiter type JobCreateCompleteWaiterOptions struct { @@ -368,7 +337,13 @@ func (w *JobCreateCompleteWaiter) WaitForOutput(ctx context.Context, params *Get } out, err := w.client.GetJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -511,6 +486,40 @@ func jobCreateCompleteStateRetryable(ctx context.Context, input *GetJobInput, ou return true, nil } +type endpointPrefix_opGetJobMiddleware struct { +} + +func (*endpointPrefix_opGetJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetJobAPIClient is a client that implements the GetJob operation. +type GetJobAPIClient interface { + GetJob(context.Context, *GetJobInput, ...func(*Options)) (*GetJobOutput, error) +} + +var _ GetJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_GetLicenseEndpoint.go b/service/deadline/api_op_GetLicenseEndpoint.go index 42e6d09fcdc..4c9b67bcf86 100644 --- a/service/deadline/api_op_GetLicenseEndpoint.go +++ b/service/deadline/api_op_GetLicenseEndpoint.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetLicenseEndpointMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetLicenseEndpointMiddleware(stack); err != nil { return err } @@ -162,41 +165,6 @@ func (c *Client) addOperationGetLicenseEndpointMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opGetLicenseEndpointMiddleware struct { -} - -func (*endpointPrefix_opGetLicenseEndpointMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetLicenseEndpointMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetLicenseEndpointMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetLicenseEndpointMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetLicenseEndpointAPIClient is a client that implements the GetLicenseEndpoint -// operation. -type GetLicenseEndpointAPIClient interface { - GetLicenseEndpoint(context.Context, *GetLicenseEndpointInput, ...func(*Options)) (*GetLicenseEndpointOutput, error) -} - -var _ GetLicenseEndpointAPIClient = (*Client)(nil) - // LicenseEndpointValidWaiterOptions are waiter options for // LicenseEndpointValidWaiter type LicenseEndpointValidWaiterOptions struct { @@ -314,7 +282,13 @@ func (w *LicenseEndpointValidWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetLicenseEndpoint(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -506,7 +480,13 @@ func (w *LicenseEndpointDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetLicenseEndpoint(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -571,6 +551,41 @@ func licenseEndpointDeletedStateRetryable(ctx context.Context, input *GetLicense return true, nil } +type endpointPrefix_opGetLicenseEndpointMiddleware struct { +} + +func (*endpointPrefix_opGetLicenseEndpointMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetLicenseEndpointMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetLicenseEndpointMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetLicenseEndpointMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetLicenseEndpointAPIClient is a client that implements the GetLicenseEndpoint +// operation. +type GetLicenseEndpointAPIClient interface { + GetLicenseEndpoint(context.Context, *GetLicenseEndpointInput, ...func(*Options)) (*GetLicenseEndpointOutput, error) +} + +var _ GetLicenseEndpointAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLicenseEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_GetMonitor.go b/service/deadline/api_op_GetMonitor.go index 1f87e779cc2..b24a8927905 100644 --- a/service/deadline/api_op_GetMonitor.go +++ b/service/deadline/api_op_GetMonitor.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetMonitorMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMonitorMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetQueue.go b/service/deadline/api_op_GetQueue.go index 8fb11474d11..9de0b57909a 100644 --- a/service/deadline/api_op_GetQueue.go +++ b/service/deadline/api_op_GetQueue.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetQueueMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetQueueMiddleware(stack); err != nil { return err } @@ -207,40 +210,6 @@ func (c *Client) addOperationGetQueueMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opGetQueueMiddleware struct { -} - -func (*endpointPrefix_opGetQueueMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetQueueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetQueueMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetQueueMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetQueueAPIClient is a client that implements the GetQueue operation. -type GetQueueAPIClient interface { - GetQueue(context.Context, *GetQueueInput, ...func(*Options)) (*GetQueueOutput, error) -} - -var _ GetQueueAPIClient = (*Client)(nil) - // QueueSchedulingBlockedWaiterOptions are waiter options for // QueueSchedulingBlockedWaiter type QueueSchedulingBlockedWaiterOptions struct { @@ -358,7 +327,13 @@ func (w *QueueSchedulingBlockedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetQueue(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -531,7 +506,13 @@ func (w *QueueSchedulingWaiter) WaitForOutput(ctx context.Context, params *GetQu } out, err := w.client.GetQueue(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -589,6 +570,40 @@ func queueSchedulingStateRetryable(ctx context.Context, input *GetQueueInput, ou return true, nil } +type endpointPrefix_opGetQueueMiddleware struct { +} + +func (*endpointPrefix_opGetQueueMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetQueueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetQueueMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetQueueMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetQueueAPIClient is a client that implements the GetQueue operation. +type GetQueueAPIClient interface { + GetQueue(context.Context, *GetQueueInput, ...func(*Options)) (*GetQueueOutput, error) +} + +var _ GetQueueAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetQueue(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_GetQueueEnvironment.go b/service/deadline/api_op_GetQueueEnvironment.go index fc6e6091e92..d531a0320a9 100644 --- a/service/deadline/api_op_GetQueueEnvironment.go +++ b/service/deadline/api_op_GetQueueEnvironment.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetQueueEnvironmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetQueueEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetQueueFleetAssociation.go b/service/deadline/api_op_GetQueueFleetAssociation.go index f508d81b706..227204ee338 100644 --- a/service/deadline/api_op_GetQueueFleetAssociation.go +++ b/service/deadline/api_op_GetQueueFleetAssociation.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetQueueFleetAssociationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetQueueFleetAssociationMiddleware(stack); err != nil { return err } @@ -175,41 +178,6 @@ func (c *Client) addOperationGetQueueFleetAssociationMiddlewares(stack *middlewa return nil } -type endpointPrefix_opGetQueueFleetAssociationMiddleware struct { -} - -func (*endpointPrefix_opGetQueueFleetAssociationMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetQueueFleetAssociationMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetQueueFleetAssociationMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetQueueFleetAssociationMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetQueueFleetAssociationAPIClient is a client that implements the -// GetQueueFleetAssociation operation. -type GetQueueFleetAssociationAPIClient interface { - GetQueueFleetAssociation(context.Context, *GetQueueFleetAssociationInput, ...func(*Options)) (*GetQueueFleetAssociationOutput, error) -} - -var _ GetQueueFleetAssociationAPIClient = (*Client)(nil) - // QueueFleetAssociationStoppedWaiterOptions are waiter options for // QueueFleetAssociationStoppedWaiter type QueueFleetAssociationStoppedWaiterOptions struct { @@ -329,7 +297,13 @@ func (w *QueueFleetAssociationStoppedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetQueueFleetAssociation(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -387,6 +361,41 @@ func queueFleetAssociationStoppedStateRetryable(ctx context.Context, input *GetQ return true, nil } +type endpointPrefix_opGetQueueFleetAssociationMiddleware struct { +} + +func (*endpointPrefix_opGetQueueFleetAssociationMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetQueueFleetAssociationMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetQueueFleetAssociationMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetQueueFleetAssociationMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetQueueFleetAssociationAPIClient is a client that implements the +// GetQueueFleetAssociation operation. +type GetQueueFleetAssociationAPIClient interface { + GetQueueFleetAssociation(context.Context, *GetQueueFleetAssociationInput, ...func(*Options)) (*GetQueueFleetAssociationOutput, error) +} + +var _ GetQueueFleetAssociationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetQueueFleetAssociation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_GetSession.go b/service/deadline/api_op_GetSession.go index 809cc3f4f14..2120d4c9a2d 100644 --- a/service/deadline/api_op_GetSession.go +++ b/service/deadline/api_op_GetSession.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSessionMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetSessionAction.go b/service/deadline/api_op_GetSessionAction.go index 6559db55c9c..cfc77bfdf7e 100644 --- a/service/deadline/api_op_GetSessionAction.go +++ b/service/deadline/api_op_GetSessionAction.go @@ -157,6 +157,9 @@ func (c *Client) addOperationGetSessionActionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSessionActionMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetSessionsStatisticsAggregation.go b/service/deadline/api_op_GetSessionsStatisticsAggregation.go index f82038aee1b..63d51f2e190 100644 --- a/service/deadline/api_op_GetSessionsStatisticsAggregation.go +++ b/service/deadline/api_op_GetSessionsStatisticsAggregation.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetSessionsStatisticsAggregationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSessionsStatisticsAggregationMiddleware(stack); err != nil { return err } @@ -167,41 +170,6 @@ func (c *Client) addOperationGetSessionsStatisticsAggregationMiddlewares(stack * return nil } -type endpointPrefix_opGetSessionsStatisticsAggregationMiddleware struct { -} - -func (*endpointPrefix_opGetSessionsStatisticsAggregationMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetSessionsStatisticsAggregationMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetSessionsStatisticsAggregationMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetSessionsStatisticsAggregationMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetSessionsStatisticsAggregationAPIClient is a client that implements the -// GetSessionsStatisticsAggregation operation. -type GetSessionsStatisticsAggregationAPIClient interface { - GetSessionsStatisticsAggregation(context.Context, *GetSessionsStatisticsAggregationInput, ...func(*Options)) (*GetSessionsStatisticsAggregationOutput, error) -} - -var _ GetSessionsStatisticsAggregationAPIClient = (*Client)(nil) - // GetSessionsStatisticsAggregationPaginatorOptions is the paginator options for // GetSessionsStatisticsAggregation type GetSessionsStatisticsAggregationPaginatorOptions struct { @@ -269,6 +237,9 @@ func (p *GetSessionsStatisticsAggregationPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSessionsStatisticsAggregation(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +259,41 @@ func (p *GetSessionsStatisticsAggregationPaginator) NextPage(ctx context.Context return result, nil } +type endpointPrefix_opGetSessionsStatisticsAggregationMiddleware struct { +} + +func (*endpointPrefix_opGetSessionsStatisticsAggregationMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetSessionsStatisticsAggregationMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetSessionsStatisticsAggregationMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetSessionsStatisticsAggregationMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetSessionsStatisticsAggregationAPIClient is a client that implements the +// GetSessionsStatisticsAggregation operation. +type GetSessionsStatisticsAggregationAPIClient interface { + GetSessionsStatisticsAggregation(context.Context, *GetSessionsStatisticsAggregationInput, ...func(*Options)) (*GetSessionsStatisticsAggregationOutput, error) +} + +var _ GetSessionsStatisticsAggregationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSessionsStatisticsAggregation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_GetStep.go b/service/deadline/api_op_GetStep.go index fd0fc8c70a8..12e712e9e8f 100644 --- a/service/deadline/api_op_GetStep.go +++ b/service/deadline/api_op_GetStep.go @@ -184,6 +184,9 @@ func (c *Client) addOperationGetStepMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetStepMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetStorageProfile.go b/service/deadline/api_op_GetStorageProfile.go index d6abf926849..634db08138b 100644 --- a/service/deadline/api_op_GetStorageProfile.go +++ b/service/deadline/api_op_GetStorageProfile.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetStorageProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetStorageProfileMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetStorageProfileForQueue.go b/service/deadline/api_op_GetStorageProfileForQueue.go index 3ca177da53c..41b2478bd37 100644 --- a/service/deadline/api_op_GetStorageProfileForQueue.go +++ b/service/deadline/api_op_GetStorageProfileForQueue.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetStorageProfileForQueueMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetStorageProfileForQueueMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetTask.go b/service/deadline/api_op_GetTask.go index a3c7e507b09..6d68ce59165 100644 --- a/service/deadline/api_op_GetTask.go +++ b/service/deadline/api_op_GetTask.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetTaskMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetTaskMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_GetWorker.go b/service/deadline/api_op_GetWorker.go index 7dc0520c8e2..f8afb69a66d 100644 --- a/service/deadline/api_op_GetWorker.go +++ b/service/deadline/api_op_GetWorker.go @@ -156,6 +156,9 @@ func (c *Client) addOperationGetWorkerMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetWorkerMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_ListAvailableMeteredProducts.go b/service/deadline/api_op_ListAvailableMeteredProducts.go index a9dd5510acf..05708295961 100644 --- a/service/deadline/api_op_ListAvailableMeteredProducts.go +++ b/service/deadline/api_op_ListAvailableMeteredProducts.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAvailableMeteredProductsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAvailableMeteredProductsMiddleware(stack); err != nil { return err } @@ -142,41 +145,6 @@ func (c *Client) addOperationListAvailableMeteredProductsMiddlewares(stack *midd return nil } -type endpointPrefix_opListAvailableMeteredProductsMiddleware struct { -} - -func (*endpointPrefix_opListAvailableMeteredProductsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAvailableMeteredProductsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAvailableMeteredProductsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAvailableMeteredProductsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAvailableMeteredProductsAPIClient is a client that implements the -// ListAvailableMeteredProducts operation. -type ListAvailableMeteredProductsAPIClient interface { - ListAvailableMeteredProducts(context.Context, *ListAvailableMeteredProductsInput, ...func(*Options)) (*ListAvailableMeteredProductsOutput, error) -} - -var _ ListAvailableMeteredProductsAPIClient = (*Client)(nil) - // ListAvailableMeteredProductsPaginatorOptions is the paginator options for // ListAvailableMeteredProducts type ListAvailableMeteredProductsPaginatorOptions struct { @@ -244,6 +212,9 @@ func (p *ListAvailableMeteredProductsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAvailableMeteredProducts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +234,41 @@ func (p *ListAvailableMeteredProductsPaginator) NextPage(ctx context.Context, op return result, nil } +type endpointPrefix_opListAvailableMeteredProductsMiddleware struct { +} + +func (*endpointPrefix_opListAvailableMeteredProductsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAvailableMeteredProductsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAvailableMeteredProductsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAvailableMeteredProductsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAvailableMeteredProductsAPIClient is a client that implements the +// ListAvailableMeteredProducts operation. +type ListAvailableMeteredProductsAPIClient interface { + ListAvailableMeteredProducts(context.Context, *ListAvailableMeteredProductsInput, ...func(*Options)) (*ListAvailableMeteredProductsOutput, error) +} + +var _ ListAvailableMeteredProductsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAvailableMeteredProducts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListBudgets.go b/service/deadline/api_op_ListBudgets.go index 400952e3254..183adeddfa4 100644 --- a/service/deadline/api_op_ListBudgets.go +++ b/service/deadline/api_op_ListBudgets.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListBudgetsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListBudgetsMiddleware(stack); err != nil { return err } @@ -153,40 +156,6 @@ func (c *Client) addOperationListBudgetsMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opListBudgetsMiddleware struct { -} - -func (*endpointPrefix_opListBudgetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListBudgetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListBudgetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListBudgetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListBudgetsAPIClient is a client that implements the ListBudgets operation. -type ListBudgetsAPIClient interface { - ListBudgets(context.Context, *ListBudgetsInput, ...func(*Options)) (*ListBudgetsOutput, error) -} - -var _ ListBudgetsAPIClient = (*Client)(nil) - // ListBudgetsPaginatorOptions is the paginator options for ListBudgets type ListBudgetsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -251,6 +220,9 @@ func (p *ListBudgetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBudgets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +242,40 @@ func (p *ListBudgetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +type endpointPrefix_opListBudgetsMiddleware struct { +} + +func (*endpointPrefix_opListBudgetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListBudgetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListBudgetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListBudgetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListBudgetsAPIClient is a client that implements the ListBudgets operation. +type ListBudgetsAPIClient interface { + ListBudgets(context.Context, *ListBudgetsInput, ...func(*Options)) (*ListBudgetsOutput, error) +} + +var _ ListBudgetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBudgets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListFarmMembers.go b/service/deadline/api_op_ListFarmMembers.go index f14bbd854dd..ad5204ede9e 100644 --- a/service/deadline/api_op_ListFarmMembers.go +++ b/service/deadline/api_op_ListFarmMembers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListFarmMembersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListFarmMembersMiddleware(stack); err != nil { return err } @@ -150,41 +153,6 @@ func (c *Client) addOperationListFarmMembersMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListFarmMembersMiddleware struct { -} - -func (*endpointPrefix_opListFarmMembersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListFarmMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListFarmMembersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListFarmMembersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListFarmMembersAPIClient is a client that implements the ListFarmMembers -// operation. -type ListFarmMembersAPIClient interface { - ListFarmMembers(context.Context, *ListFarmMembersInput, ...func(*Options)) (*ListFarmMembersOutput, error) -} - -var _ ListFarmMembersAPIClient = (*Client)(nil) - // ListFarmMembersPaginatorOptions is the paginator options for ListFarmMembers type ListFarmMembersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -249,6 +217,9 @@ func (p *ListFarmMembersPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFarmMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +239,41 @@ func (p *ListFarmMembersPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +type endpointPrefix_opListFarmMembersMiddleware struct { +} + +func (*endpointPrefix_opListFarmMembersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListFarmMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListFarmMembersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListFarmMembersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListFarmMembersAPIClient is a client that implements the ListFarmMembers +// operation. +type ListFarmMembersAPIClient interface { + ListFarmMembers(context.Context, *ListFarmMembersInput, ...func(*Options)) (*ListFarmMembersOutput, error) +} + +var _ ListFarmMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFarmMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListFarms.go b/service/deadline/api_op_ListFarms.go index c4ade04d735..81841d378e6 100644 --- a/service/deadline/api_op_ListFarms.go +++ b/service/deadline/api_op_ListFarms.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListFarmsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListFarmsMiddleware(stack); err != nil { return err } @@ -145,40 +148,6 @@ func (c *Client) addOperationListFarmsMiddlewares(stack *middleware.Stack, optio return nil } -type endpointPrefix_opListFarmsMiddleware struct { -} - -func (*endpointPrefix_opListFarmsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListFarmsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListFarmsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListFarmsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListFarmsAPIClient is a client that implements the ListFarms operation. -type ListFarmsAPIClient interface { - ListFarms(context.Context, *ListFarmsInput, ...func(*Options)) (*ListFarmsOutput, error) -} - -var _ ListFarmsAPIClient = (*Client)(nil) - // ListFarmsPaginatorOptions is the paginator options for ListFarms type ListFarmsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -243,6 +212,9 @@ func (p *ListFarmsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFarms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +234,40 @@ func (p *ListFarmsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +type endpointPrefix_opListFarmsMiddleware struct { +} + +func (*endpointPrefix_opListFarmsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListFarmsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListFarmsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListFarmsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListFarmsAPIClient is a client that implements the ListFarms operation. +type ListFarmsAPIClient interface { + ListFarms(context.Context, *ListFarmsInput, ...func(*Options)) (*ListFarmsOutput, error) +} + +var _ ListFarmsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFarms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListFleetMembers.go b/service/deadline/api_op_ListFleetMembers.go index a7ba2e31f27..c4320fc9a54 100644 --- a/service/deadline/api_op_ListFleetMembers.go +++ b/service/deadline/api_op_ListFleetMembers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListFleetMembersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListFleetMembersMiddleware(stack); err != nil { return err } @@ -155,41 +158,6 @@ func (c *Client) addOperationListFleetMembersMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListFleetMembersMiddleware struct { -} - -func (*endpointPrefix_opListFleetMembersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListFleetMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListFleetMembersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListFleetMembersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListFleetMembersAPIClient is a client that implements the ListFleetMembers -// operation. -type ListFleetMembersAPIClient interface { - ListFleetMembers(context.Context, *ListFleetMembersInput, ...func(*Options)) (*ListFleetMembersOutput, error) -} - -var _ ListFleetMembersAPIClient = (*Client)(nil) - // ListFleetMembersPaginatorOptions is the paginator options for ListFleetMembers type ListFleetMembersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -254,6 +222,9 @@ func (p *ListFleetMembersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleetMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +244,41 @@ func (p *ListFleetMembersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListFleetMembersMiddleware struct { +} + +func (*endpointPrefix_opListFleetMembersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListFleetMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListFleetMembersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListFleetMembersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListFleetMembersAPIClient is a client that implements the ListFleetMembers +// operation. +type ListFleetMembersAPIClient interface { + ListFleetMembers(context.Context, *ListFleetMembersInput, ...func(*Options)) (*ListFleetMembersOutput, error) +} + +var _ ListFleetMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleetMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListFleets.go b/service/deadline/api_op_ListFleets.go index 5806d648132..2cb2dd45e28 100644 --- a/service/deadline/api_op_ListFleets.go +++ b/service/deadline/api_op_ListFleets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListFleetsMiddleware(stack); err != nil { return err } @@ -159,40 +162,6 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opListFleetsMiddleware struct { -} - -func (*endpointPrefix_opListFleetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListFleetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListFleetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListFleetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListFleetsAPIClient is a client that implements the ListFleets operation. -type ListFleetsAPIClient interface { - ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) -} - -var _ ListFleetsAPIClient = (*Client)(nil) - // ListFleetsPaginatorOptions is the paginator options for ListFleets type ListFleetsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -257,6 +226,9 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +248,40 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +type endpointPrefix_opListFleetsMiddleware struct { +} + +func (*endpointPrefix_opListFleetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListFleetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListFleetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListFleetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListJobMembers.go b/service/deadline/api_op_ListJobMembers.go index 16f56e51d47..790b1c78c60 100644 --- a/service/deadline/api_op_ListJobMembers.go +++ b/service/deadline/api_op_ListJobMembers.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListJobMembersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListJobMembersMiddleware(stack); err != nil { return err } @@ -160,41 +163,6 @@ func (c *Client) addOperationListJobMembersMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListJobMembersMiddleware struct { -} - -func (*endpointPrefix_opListJobMembersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListJobMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListJobMembersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListJobMembersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListJobMembersAPIClient is a client that implements the ListJobMembers -// operation. -type ListJobMembersAPIClient interface { - ListJobMembers(context.Context, *ListJobMembersInput, ...func(*Options)) (*ListJobMembersOutput, error) -} - -var _ ListJobMembersAPIClient = (*Client)(nil) - // ListJobMembersPaginatorOptions is the paginator options for ListJobMembers type ListJobMembersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -259,6 +227,9 @@ func (p *ListJobMembersPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +249,41 @@ func (p *ListJobMembersPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListJobMembersMiddleware struct { +} + +func (*endpointPrefix_opListJobMembersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListJobMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListJobMembersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListJobMembersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListJobMembersAPIClient is a client that implements the ListJobMembers +// operation. +type ListJobMembersAPIClient interface { + ListJobMembers(context.Context, *ListJobMembersInput, ...func(*Options)) (*ListJobMembersOutput, error) +} + +var _ ListJobMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListJobs.go b/service/deadline/api_op_ListJobs.go index fcbb3a75233..f88f59dac15 100644 --- a/service/deadline/api_op_ListJobs.go +++ b/service/deadline/api_op_ListJobs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListJobsMiddleware(stack); err != nil { return err } @@ -158,40 +161,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opListJobsMiddleware struct { -} - -func (*endpointPrefix_opListJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -256,6 +225,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +247,40 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +type endpointPrefix_opListJobsMiddleware struct { +} + +func (*endpointPrefix_opListJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListLicenseEndpoints.go b/service/deadline/api_op_ListLicenseEndpoints.go index fd159be76a7..d985065ebe2 100644 --- a/service/deadline/api_op_ListLicenseEndpoints.go +++ b/service/deadline/api_op_ListLicenseEndpoints.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListLicenseEndpointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListLicenseEndpointsMiddleware(stack); err != nil { return err } @@ -142,41 +145,6 @@ func (c *Client) addOperationListLicenseEndpointsMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListLicenseEndpointsMiddleware struct { -} - -func (*endpointPrefix_opListLicenseEndpointsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListLicenseEndpointsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListLicenseEndpointsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListLicenseEndpointsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListLicenseEndpointsAPIClient is a client that implements the -// ListLicenseEndpoints operation. -type ListLicenseEndpointsAPIClient interface { - ListLicenseEndpoints(context.Context, *ListLicenseEndpointsInput, ...func(*Options)) (*ListLicenseEndpointsOutput, error) -} - -var _ ListLicenseEndpointsAPIClient = (*Client)(nil) - // ListLicenseEndpointsPaginatorOptions is the paginator options for // ListLicenseEndpoints type ListLicenseEndpointsPaginatorOptions struct { @@ -242,6 +210,9 @@ func (p *ListLicenseEndpointsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLicenseEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +232,41 @@ func (p *ListLicenseEndpointsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListLicenseEndpointsMiddleware struct { +} + +func (*endpointPrefix_opListLicenseEndpointsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListLicenseEndpointsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListLicenseEndpointsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListLicenseEndpointsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListLicenseEndpointsAPIClient is a client that implements the +// ListLicenseEndpoints operation. +type ListLicenseEndpointsAPIClient interface { + ListLicenseEndpoints(context.Context, *ListLicenseEndpointsInput, ...func(*Options)) (*ListLicenseEndpointsOutput, error) +} + +var _ ListLicenseEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLicenseEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListMeteredProducts.go b/service/deadline/api_op_ListMeteredProducts.go index 9412bdded1e..95d055b64da 100644 --- a/service/deadline/api_op_ListMeteredProducts.go +++ b/service/deadline/api_op_ListMeteredProducts.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListMeteredProductsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListMeteredProductsMiddleware(stack); err != nil { return err } @@ -150,41 +153,6 @@ func (c *Client) addOperationListMeteredProductsMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListMeteredProductsMiddleware struct { -} - -func (*endpointPrefix_opListMeteredProductsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMeteredProductsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListMeteredProductsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListMeteredProductsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListMeteredProductsAPIClient is a client that implements the -// ListMeteredProducts operation. -type ListMeteredProductsAPIClient interface { - ListMeteredProducts(context.Context, *ListMeteredProductsInput, ...func(*Options)) (*ListMeteredProductsOutput, error) -} - -var _ ListMeteredProductsAPIClient = (*Client)(nil) - // ListMeteredProductsPaginatorOptions is the paginator options for // ListMeteredProducts type ListMeteredProductsPaginatorOptions struct { @@ -250,6 +218,9 @@ func (p *ListMeteredProductsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMeteredProducts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +240,41 @@ func (p *ListMeteredProductsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListMeteredProductsMiddleware struct { +} + +func (*endpointPrefix_opListMeteredProductsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListMeteredProductsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListMeteredProductsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListMeteredProductsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListMeteredProductsAPIClient is a client that implements the +// ListMeteredProducts operation. +type ListMeteredProductsAPIClient interface { + ListMeteredProducts(context.Context, *ListMeteredProductsInput, ...func(*Options)) (*ListMeteredProductsOutput, error) +} + +var _ ListMeteredProductsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMeteredProducts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListMonitors.go b/service/deadline/api_op_ListMonitors.go index 22c29c36394..6f6d459b3a0 100644 --- a/service/deadline/api_op_ListMonitors.go +++ b/service/deadline/api_op_ListMonitors.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListMonitorsMiddleware(stack); err != nil { return err } @@ -143,40 +146,6 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListMonitorsMiddleware struct { -} - -func (*endpointPrefix_opListMonitorsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMonitorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListMonitorsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListMonitorsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListMonitorsAPIClient is a client that implements the ListMonitors operation. -type ListMonitorsAPIClient interface { - ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) -} - -var _ ListMonitorsAPIClient = (*Client)(nil) - // ListMonitorsPaginatorOptions is the paginator options for ListMonitors type ListMonitorsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -241,6 +210,9 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +232,40 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListMonitorsMiddleware struct { +} + +func (*endpointPrefix_opListMonitorsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListMonitorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListMonitorsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListMonitorsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListMonitorsAPIClient is a client that implements the ListMonitors operation. +type ListMonitorsAPIClient interface { + ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) +} + +var _ ListMonitorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListQueueEnvironments.go b/service/deadline/api_op_ListQueueEnvironments.go index 8780bca01a4..87a0bc6a70c 100644 --- a/service/deadline/api_op_ListQueueEnvironments.go +++ b/service/deadline/api_op_ListQueueEnvironments.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListQueueEnvironmentsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListQueueEnvironmentsMiddleware(stack); err != nil { return err } @@ -155,41 +158,6 @@ func (c *Client) addOperationListQueueEnvironmentsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListQueueEnvironmentsMiddleware struct { -} - -func (*endpointPrefix_opListQueueEnvironmentsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListQueueEnvironmentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListQueueEnvironmentsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListQueueEnvironmentsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListQueueEnvironmentsAPIClient is a client that implements the -// ListQueueEnvironments operation. -type ListQueueEnvironmentsAPIClient interface { - ListQueueEnvironments(context.Context, *ListQueueEnvironmentsInput, ...func(*Options)) (*ListQueueEnvironmentsOutput, error) -} - -var _ ListQueueEnvironmentsAPIClient = (*Client)(nil) - // ListQueueEnvironmentsPaginatorOptions is the paginator options for // ListQueueEnvironments type ListQueueEnvironmentsPaginatorOptions struct { @@ -255,6 +223,9 @@ func (p *ListQueueEnvironmentsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueueEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +245,41 @@ func (p *ListQueueEnvironmentsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListQueueEnvironmentsMiddleware struct { +} + +func (*endpointPrefix_opListQueueEnvironmentsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListQueueEnvironmentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListQueueEnvironmentsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListQueueEnvironmentsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListQueueEnvironmentsAPIClient is a client that implements the +// ListQueueEnvironments operation. +type ListQueueEnvironmentsAPIClient interface { + ListQueueEnvironments(context.Context, *ListQueueEnvironmentsInput, ...func(*Options)) (*ListQueueEnvironmentsOutput, error) +} + +var _ ListQueueEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueueEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListQueueFleetAssociations.go b/service/deadline/api_op_ListQueueFleetAssociations.go index ef0632b150a..2050f1ddb9b 100644 --- a/service/deadline/api_op_ListQueueFleetAssociations.go +++ b/service/deadline/api_op_ListQueueFleetAssociations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListQueueFleetAssociationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListQueueFleetAssociationsMiddleware(stack); err != nil { return err } @@ -156,41 +159,6 @@ func (c *Client) addOperationListQueueFleetAssociationsMiddlewares(stack *middle return nil } -type endpointPrefix_opListQueueFleetAssociationsMiddleware struct { -} - -func (*endpointPrefix_opListQueueFleetAssociationsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListQueueFleetAssociationsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListQueueFleetAssociationsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListQueueFleetAssociationsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListQueueFleetAssociationsAPIClient is a client that implements the -// ListQueueFleetAssociations operation. -type ListQueueFleetAssociationsAPIClient interface { - ListQueueFleetAssociations(context.Context, *ListQueueFleetAssociationsInput, ...func(*Options)) (*ListQueueFleetAssociationsOutput, error) -} - -var _ ListQueueFleetAssociationsAPIClient = (*Client)(nil) - // ListQueueFleetAssociationsPaginatorOptions is the paginator options for // ListQueueFleetAssociations type ListQueueFleetAssociationsPaginatorOptions struct { @@ -258,6 +226,9 @@ func (p *ListQueueFleetAssociationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueueFleetAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +248,41 @@ func (p *ListQueueFleetAssociationsPaginator) NextPage(ctx context.Context, optF return result, nil } +type endpointPrefix_opListQueueFleetAssociationsMiddleware struct { +} + +func (*endpointPrefix_opListQueueFleetAssociationsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListQueueFleetAssociationsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListQueueFleetAssociationsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListQueueFleetAssociationsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListQueueFleetAssociationsAPIClient is a client that implements the +// ListQueueFleetAssociations operation. +type ListQueueFleetAssociationsAPIClient interface { + ListQueueFleetAssociations(context.Context, *ListQueueFleetAssociationsInput, ...func(*Options)) (*ListQueueFleetAssociationsOutput, error) +} + +var _ ListQueueFleetAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueueFleetAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListQueueMembers.go b/service/deadline/api_op_ListQueueMembers.go index 70e72c89d23..93ebfc7c017 100644 --- a/service/deadline/api_op_ListQueueMembers.go +++ b/service/deadline/api_op_ListQueueMembers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListQueueMembersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListQueueMembersMiddleware(stack); err != nil { return err } @@ -155,41 +158,6 @@ func (c *Client) addOperationListQueueMembersMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListQueueMembersMiddleware struct { -} - -func (*endpointPrefix_opListQueueMembersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListQueueMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListQueueMembersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListQueueMembersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListQueueMembersAPIClient is a client that implements the ListQueueMembers -// operation. -type ListQueueMembersAPIClient interface { - ListQueueMembers(context.Context, *ListQueueMembersInput, ...func(*Options)) (*ListQueueMembersOutput, error) -} - -var _ ListQueueMembersAPIClient = (*Client)(nil) - // ListQueueMembersPaginatorOptions is the paginator options for ListQueueMembers type ListQueueMembersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -254,6 +222,9 @@ func (p *ListQueueMembersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueueMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +244,41 @@ func (p *ListQueueMembersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListQueueMembersMiddleware struct { +} + +func (*endpointPrefix_opListQueueMembersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListQueueMembersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListQueueMembersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListQueueMembersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListQueueMembersAPIClient is a client that implements the ListQueueMembers +// operation. +type ListQueueMembersAPIClient interface { + ListQueueMembers(context.Context, *ListQueueMembersInput, ...func(*Options)) (*ListQueueMembersOutput, error) +} + +var _ ListQueueMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueueMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListQueues.go b/service/deadline/api_op_ListQueues.go index 4803dbad63e..10784b4c7fd 100644 --- a/service/deadline/api_op_ListQueues.go +++ b/service/deadline/api_op_ListQueues.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListQueuesMiddleware(stack); err != nil { return err } @@ -163,40 +166,6 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opListQueuesMiddleware struct { -} - -func (*endpointPrefix_opListQueuesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListQueuesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListQueuesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListQueuesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListQueuesAPIClient is a client that implements the ListQueues operation. -type ListQueuesAPIClient interface { - ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) -} - -var _ ListQueuesAPIClient = (*Client)(nil) - // ListQueuesPaginatorOptions is the paginator options for ListQueues type ListQueuesPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -261,6 +230,9 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +252,40 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +type endpointPrefix_opListQueuesMiddleware struct { +} + +func (*endpointPrefix_opListQueuesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListQueuesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListQueuesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListQueuesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListQueuesAPIClient is a client that implements the ListQueues operation. +type ListQueuesAPIClient interface { + ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) +} + +var _ ListQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListSessionActions.go b/service/deadline/api_op_ListSessionActions.go index fbf3ba53298..2363c5ee766 100644 --- a/service/deadline/api_op_ListSessionActions.go +++ b/service/deadline/api_op_ListSessionActions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListSessionActionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSessionActionsMiddleware(stack); err != nil { return err } @@ -166,41 +169,6 @@ func (c *Client) addOperationListSessionActionsMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opListSessionActionsMiddleware struct { -} - -func (*endpointPrefix_opListSessionActionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSessionActionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSessionActionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSessionActionsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSessionActionsAPIClient is a client that implements the ListSessionActions -// operation. -type ListSessionActionsAPIClient interface { - ListSessionActions(context.Context, *ListSessionActionsInput, ...func(*Options)) (*ListSessionActionsOutput, error) -} - -var _ ListSessionActionsAPIClient = (*Client)(nil) - // ListSessionActionsPaginatorOptions is the paginator options for // ListSessionActions type ListSessionActionsPaginatorOptions struct { @@ -266,6 +234,9 @@ func (p *ListSessionActionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessionActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +256,41 @@ func (p *ListSessionActionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +type endpointPrefix_opListSessionActionsMiddleware struct { +} + +func (*endpointPrefix_opListSessionActionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSessionActionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSessionActionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSessionActionsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSessionActionsAPIClient is a client that implements the ListSessionActions +// operation. +type ListSessionActionsAPIClient interface { + ListSessionActions(context.Context, *ListSessionActionsInput, ...func(*Options)) (*ListSessionActionsOutput, error) +} + +var _ ListSessionActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessionActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListSessions.go b/service/deadline/api_op_ListSessions.go index ec92be47463..aed3ec9863b 100644 --- a/service/deadline/api_op_ListSessions.go +++ b/service/deadline/api_op_ListSessions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSessionsMiddleware(stack); err != nil { return err } @@ -160,40 +163,6 @@ func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListSessionsMiddleware struct { -} - -func (*endpointPrefix_opListSessionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSessionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSessionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSessionsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSessionsAPIClient is a client that implements the ListSessions operation. -type ListSessionsAPIClient interface { - ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) -} - -var _ ListSessionsAPIClient = (*Client)(nil) - // ListSessionsPaginatorOptions is the paginator options for ListSessions type ListSessionsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -258,6 +227,9 @@ func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +249,40 @@ func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListSessionsMiddleware struct { +} + +func (*endpointPrefix_opListSessionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSessionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSessionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSessionsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSessionsAPIClient is a client that implements the ListSessions operation. +type ListSessionsAPIClient interface { + ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) +} + +var _ ListSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListSessionsForWorker.go b/service/deadline/api_op_ListSessionsForWorker.go index b03f5ccc2f2..62b18b2980f 100644 --- a/service/deadline/api_op_ListSessionsForWorker.go +++ b/service/deadline/api_op_ListSessionsForWorker.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListSessionsForWorkerMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSessionsForWorkerMiddleware(stack); err != nil { return err } @@ -155,41 +158,6 @@ func (c *Client) addOperationListSessionsForWorkerMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListSessionsForWorkerMiddleware struct { -} - -func (*endpointPrefix_opListSessionsForWorkerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSessionsForWorkerMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSessionsForWorkerMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSessionsForWorkerMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSessionsForWorkerAPIClient is a client that implements the -// ListSessionsForWorker operation. -type ListSessionsForWorkerAPIClient interface { - ListSessionsForWorker(context.Context, *ListSessionsForWorkerInput, ...func(*Options)) (*ListSessionsForWorkerOutput, error) -} - -var _ ListSessionsForWorkerAPIClient = (*Client)(nil) - // ListSessionsForWorkerPaginatorOptions is the paginator options for // ListSessionsForWorker type ListSessionsForWorkerPaginatorOptions struct { @@ -255,6 +223,9 @@ func (p *ListSessionsForWorkerPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessionsForWorker(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +245,41 @@ func (p *ListSessionsForWorkerPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListSessionsForWorkerMiddleware struct { +} + +func (*endpointPrefix_opListSessionsForWorkerMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSessionsForWorkerMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSessionsForWorkerMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSessionsForWorkerMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSessionsForWorkerAPIClient is a client that implements the +// ListSessionsForWorker operation. +type ListSessionsForWorkerAPIClient interface { + ListSessionsForWorker(context.Context, *ListSessionsForWorkerInput, ...func(*Options)) (*ListSessionsForWorkerOutput, error) +} + +var _ ListSessionsForWorkerAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessionsForWorker(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListStepConsumers.go b/service/deadline/api_op_ListStepConsumers.go index 9cac69bf390..419266ec290 100644 --- a/service/deadline/api_op_ListStepConsumers.go +++ b/service/deadline/api_op_ListStepConsumers.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListStepConsumersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStepConsumersMiddleware(stack); err != nil { return err } @@ -165,41 +168,6 @@ func (c *Client) addOperationListStepConsumersMiddlewares(stack *middleware.Stac return nil } -type endpointPrefix_opListStepConsumersMiddleware struct { -} - -func (*endpointPrefix_opListStepConsumersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStepConsumersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStepConsumersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStepConsumersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStepConsumersAPIClient is a client that implements the ListStepConsumers -// operation. -type ListStepConsumersAPIClient interface { - ListStepConsumers(context.Context, *ListStepConsumersInput, ...func(*Options)) (*ListStepConsumersOutput, error) -} - -var _ ListStepConsumersAPIClient = (*Client)(nil) - // ListStepConsumersPaginatorOptions is the paginator options for ListStepConsumers type ListStepConsumersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -264,6 +232,9 @@ func (p *ListStepConsumersPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStepConsumers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +254,41 @@ func (p *ListStepConsumersPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +type endpointPrefix_opListStepConsumersMiddleware struct { +} + +func (*endpointPrefix_opListStepConsumersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStepConsumersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStepConsumersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStepConsumersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStepConsumersAPIClient is a client that implements the ListStepConsumers +// operation. +type ListStepConsumersAPIClient interface { + ListStepConsumers(context.Context, *ListStepConsumersInput, ...func(*Options)) (*ListStepConsumersOutput, error) +} + +var _ ListStepConsumersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStepConsumers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListStepDependencies.go b/service/deadline/api_op_ListStepDependencies.go index 6ffb80176d7..c98dc5d12af 100644 --- a/service/deadline/api_op_ListStepDependencies.go +++ b/service/deadline/api_op_ListStepDependencies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListStepDependenciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStepDependenciesMiddleware(stack); err != nil { return err } @@ -165,41 +168,6 @@ func (c *Client) addOperationListStepDependenciesMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListStepDependenciesMiddleware struct { -} - -func (*endpointPrefix_opListStepDependenciesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStepDependenciesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStepDependenciesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStepDependenciesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStepDependenciesAPIClient is a client that implements the -// ListStepDependencies operation. -type ListStepDependenciesAPIClient interface { - ListStepDependencies(context.Context, *ListStepDependenciesInput, ...func(*Options)) (*ListStepDependenciesOutput, error) -} - -var _ ListStepDependenciesAPIClient = (*Client)(nil) - // ListStepDependenciesPaginatorOptions is the paginator options for // ListStepDependencies type ListStepDependenciesPaginatorOptions struct { @@ -265,6 +233,9 @@ func (p *ListStepDependenciesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStepDependencies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +255,41 @@ func (p *ListStepDependenciesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListStepDependenciesMiddleware struct { +} + +func (*endpointPrefix_opListStepDependenciesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStepDependenciesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStepDependenciesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStepDependenciesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStepDependenciesAPIClient is a client that implements the +// ListStepDependencies operation. +type ListStepDependenciesAPIClient interface { + ListStepDependencies(context.Context, *ListStepDependenciesInput, ...func(*Options)) (*ListStepDependenciesOutput, error) +} + +var _ ListStepDependenciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStepDependencies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListSteps.go b/service/deadline/api_op_ListSteps.go index 7f6a1c9f509..687f4ff4c2a 100644 --- a/service/deadline/api_op_ListSteps.go +++ b/service/deadline/api_op_ListSteps.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListStepsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStepsMiddleware(stack); err != nil { return err } @@ -160,40 +163,6 @@ func (c *Client) addOperationListStepsMiddlewares(stack *middleware.Stack, optio return nil } -type endpointPrefix_opListStepsMiddleware struct { -} - -func (*endpointPrefix_opListStepsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStepsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStepsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStepsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStepsAPIClient is a client that implements the ListSteps operation. -type ListStepsAPIClient interface { - ListSteps(context.Context, *ListStepsInput, ...func(*Options)) (*ListStepsOutput, error) -} - -var _ ListStepsAPIClient = (*Client)(nil) - // ListStepsPaginatorOptions is the paginator options for ListSteps type ListStepsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -258,6 +227,9 @@ func (p *ListStepsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +249,40 @@ func (p *ListStepsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +type endpointPrefix_opListStepsMiddleware struct { +} + +func (*endpointPrefix_opListStepsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStepsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStepsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStepsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStepsAPIClient is a client that implements the ListSteps operation. +type ListStepsAPIClient interface { + ListSteps(context.Context, *ListStepsInput, ...func(*Options)) (*ListStepsOutput, error) +} + +var _ ListStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListStorageProfiles.go b/service/deadline/api_op_ListStorageProfiles.go index 30c9dd34282..071b1ccc238 100644 --- a/service/deadline/api_op_ListStorageProfiles.go +++ b/service/deadline/api_op_ListStorageProfiles.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListStorageProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStorageProfilesMiddleware(stack); err != nil { return err } @@ -150,41 +153,6 @@ func (c *Client) addOperationListStorageProfilesMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListStorageProfilesMiddleware struct { -} - -func (*endpointPrefix_opListStorageProfilesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStorageProfilesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStorageProfilesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStorageProfilesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStorageProfilesAPIClient is a client that implements the -// ListStorageProfiles operation. -type ListStorageProfilesAPIClient interface { - ListStorageProfiles(context.Context, *ListStorageProfilesInput, ...func(*Options)) (*ListStorageProfilesOutput, error) -} - -var _ ListStorageProfilesAPIClient = (*Client)(nil) - // ListStorageProfilesPaginatorOptions is the paginator options for // ListStorageProfiles type ListStorageProfilesPaginatorOptions struct { @@ -250,6 +218,9 @@ func (p *ListStorageProfilesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStorageProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +240,41 @@ func (p *ListStorageProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListStorageProfilesMiddleware struct { +} + +func (*endpointPrefix_opListStorageProfilesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStorageProfilesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStorageProfilesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStorageProfilesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStorageProfilesAPIClient is a client that implements the +// ListStorageProfiles operation. +type ListStorageProfilesAPIClient interface { + ListStorageProfiles(context.Context, *ListStorageProfilesInput, ...func(*Options)) (*ListStorageProfilesOutput, error) +} + +var _ ListStorageProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStorageProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListStorageProfilesForQueue.go b/service/deadline/api_op_ListStorageProfilesForQueue.go index 3f976272366..532d0c8741f 100644 --- a/service/deadline/api_op_ListStorageProfilesForQueue.go +++ b/service/deadline/api_op_ListStorageProfilesForQueue.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListStorageProfilesForQueueMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStorageProfilesForQueueMiddleware(stack); err != nil { return err } @@ -155,41 +158,6 @@ func (c *Client) addOperationListStorageProfilesForQueueMiddlewares(stack *middl return nil } -type endpointPrefix_opListStorageProfilesForQueueMiddleware struct { -} - -func (*endpointPrefix_opListStorageProfilesForQueueMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStorageProfilesForQueueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStorageProfilesForQueueMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStorageProfilesForQueueMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStorageProfilesForQueueAPIClient is a client that implements the -// ListStorageProfilesForQueue operation. -type ListStorageProfilesForQueueAPIClient interface { - ListStorageProfilesForQueue(context.Context, *ListStorageProfilesForQueueInput, ...func(*Options)) (*ListStorageProfilesForQueueOutput, error) -} - -var _ ListStorageProfilesForQueueAPIClient = (*Client)(nil) - // ListStorageProfilesForQueuePaginatorOptions is the paginator options for // ListStorageProfilesForQueue type ListStorageProfilesForQueuePaginatorOptions struct { @@ -257,6 +225,9 @@ func (p *ListStorageProfilesForQueuePaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStorageProfilesForQueue(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +247,41 @@ func (p *ListStorageProfilesForQueuePaginator) NextPage(ctx context.Context, opt return result, nil } +type endpointPrefix_opListStorageProfilesForQueueMiddleware struct { +} + +func (*endpointPrefix_opListStorageProfilesForQueueMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStorageProfilesForQueueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStorageProfilesForQueueMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStorageProfilesForQueueMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStorageProfilesForQueueAPIClient is a client that implements the +// ListStorageProfilesForQueue operation. +type ListStorageProfilesForQueueAPIClient interface { + ListStorageProfilesForQueue(context.Context, *ListStorageProfilesForQueueInput, ...func(*Options)) (*ListStorageProfilesForQueueOutput, error) +} + +var _ ListStorageProfilesForQueueAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStorageProfilesForQueue(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListTagsForResource.go b/service/deadline/api_op_ListTagsForResource.go index 0f020121eae..2d9a73683c1 100644 --- a/service/deadline/api_op_ListTagsForResource.go +++ b/service/deadline/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_ListTasks.go b/service/deadline/api_op_ListTasks.go index e72c9692828..a961c0c67b4 100644 --- a/service/deadline/api_op_ListTasks.go +++ b/service/deadline/api_op_ListTasks.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTasksMiddleware(stack); err != nil { return err } @@ -165,40 +168,6 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio return nil } -type endpointPrefix_opListTasksMiddleware struct { -} - -func (*endpointPrefix_opListTasksMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTasksMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListTasksMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListTasksMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListTasksAPIClient is a client that implements the ListTasks operation. -type ListTasksAPIClient interface { - ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) -} - -var _ ListTasksAPIClient = (*Client)(nil) - // ListTasksPaginatorOptions is the paginator options for ListTasks type ListTasksPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -263,6 +232,9 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -282,6 +254,40 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +type endpointPrefix_opListTasksMiddleware struct { +} + +func (*endpointPrefix_opListTasksMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListTasksMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListTasksMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListTasksMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListTasksAPIClient is a client that implements the ListTasks operation. +type ListTasksAPIClient interface { + ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) +} + +var _ ListTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_ListWorkers.go b/service/deadline/api_op_ListWorkers.go index c30f668b06e..cf7108824fe 100644 --- a/service/deadline/api_op_ListWorkers.go +++ b/service/deadline/api_op_ListWorkers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListWorkersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListWorkersMiddleware(stack); err != nil { return err } @@ -155,40 +158,6 @@ func (c *Client) addOperationListWorkersMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opListWorkersMiddleware struct { -} - -func (*endpointPrefix_opListWorkersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListWorkersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "management." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListWorkersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListWorkersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListWorkersAPIClient is a client that implements the ListWorkers operation. -type ListWorkersAPIClient interface { - ListWorkers(context.Context, *ListWorkersInput, ...func(*Options)) (*ListWorkersOutput, error) -} - -var _ ListWorkersAPIClient = (*Client)(nil) - // ListWorkersPaginatorOptions is the paginator options for ListWorkers type ListWorkersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -253,6 +222,9 @@ func (p *ListWorkersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +244,40 @@ func (p *ListWorkersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +type endpointPrefix_opListWorkersMiddleware struct { +} + +func (*endpointPrefix_opListWorkersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListWorkersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "management." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListWorkersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListWorkersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListWorkersAPIClient is a client that implements the ListWorkers operation. +type ListWorkersAPIClient interface { + ListWorkers(context.Context, *ListWorkersInput, ...func(*Options)) (*ListWorkersOutput, error) +} + +var _ ListWorkersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/deadline/api_op_PutMeteredProduct.go b/service/deadline/api_op_PutMeteredProduct.go index d0078ece96d..00c528526da 100644 --- a/service/deadline/api_op_PutMeteredProduct.go +++ b/service/deadline/api_op_PutMeteredProduct.go @@ -106,6 +106,9 @@ func (c *Client) addOperationPutMeteredProductMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutMeteredProductMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_SearchJobs.go b/service/deadline/api_op_SearchJobs.go index 8d7fd2f4c18..1ebd8129bce 100644 --- a/service/deadline/api_op_SearchJobs.go +++ b/service/deadline/api_op_SearchJobs.go @@ -138,6 +138,9 @@ func (c *Client) addOperationSearchJobsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchJobsMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_SearchSteps.go b/service/deadline/api_op_SearchSteps.go index be8657f7999..ba65d5f67f4 100644 --- a/service/deadline/api_op_SearchSteps.go +++ b/service/deadline/api_op_SearchSteps.go @@ -141,6 +141,9 @@ func (c *Client) addOperationSearchStepsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchStepsMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_SearchTasks.go b/service/deadline/api_op_SearchTasks.go index b927f999ec7..079c5e460c9 100644 --- a/service/deadline/api_op_SearchTasks.go +++ b/service/deadline/api_op_SearchTasks.go @@ -141,6 +141,9 @@ func (c *Client) addOperationSearchTasksMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchTasksMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_SearchWorkers.go b/service/deadline/api_op_SearchWorkers.go index 30042435d88..ef136d798b7 100644 --- a/service/deadline/api_op_SearchWorkers.go +++ b/service/deadline/api_op_SearchWorkers.go @@ -138,6 +138,9 @@ func (c *Client) addOperationSearchWorkersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchWorkersMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_StartSessionsStatisticsAggregation.go b/service/deadline/api_op_StartSessionsStatisticsAggregation.go index aa53be078d6..decf9426336 100644 --- a/service/deadline/api_op_StartSessionsStatisticsAggregation.go +++ b/service/deadline/api_op_StartSessionsStatisticsAggregation.go @@ -145,6 +145,9 @@ func (c *Client) addOperationStartSessionsStatisticsAggregationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartSessionsStatisticsAggregationMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_TagResource.go b/service/deadline/api_op_TagResource.go index 1874ef4f05c..875debd7954 100644 --- a/service/deadline/api_op_TagResource.go +++ b/service/deadline/api_op_TagResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UntagResource.go b/service/deadline/api_op_UntagResource.go index 243695ac081..2df5de75068 100644 --- a/service/deadline/api_op_UntagResource.go +++ b/service/deadline/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateBudget.go b/service/deadline/api_op_UpdateBudget.go index a0d48398523..54b605f7d0e 100644 --- a/service/deadline/api_op_UpdateBudget.go +++ b/service/deadline/api_op_UpdateBudget.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateBudgetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateBudgetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateFarm.go b/service/deadline/api_op_UpdateFarm.go index 2d0d29d2791..31a427d7a24 100644 --- a/service/deadline/api_op_UpdateFarm.go +++ b/service/deadline/api_op_UpdateFarm.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateFarmMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateFarmMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateFleet.go b/service/deadline/api_op_UpdateFleet.go index 645cd0931b4..b264f90b45b 100644 --- a/service/deadline/api_op_UpdateFleet.go +++ b/service/deadline/api_op_UpdateFleet.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateFleetMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateJob.go b/service/deadline/api_op_UpdateJob.go index b01d30f8603..423125558f0 100644 --- a/service/deadline/api_op_UpdateJob.go +++ b/service/deadline/api_op_UpdateJob.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateJobMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateMonitor.go b/service/deadline/api_op_UpdateMonitor.go index 5bf19085eef..0cf1db4b1a9 100644 --- a/service/deadline/api_op_UpdateMonitor.go +++ b/service/deadline/api_op_UpdateMonitor.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateMonitorMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateQueue.go b/service/deadline/api_op_UpdateQueue.go index eb5157c7261..783ef1b9b4e 100644 --- a/service/deadline/api_op_UpdateQueue.go +++ b/service/deadline/api_op_UpdateQueue.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateQueueMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateQueueEnvironment.go b/service/deadline/api_op_UpdateQueueEnvironment.go index 9cfa7e1f925..c199a3d75e2 100644 --- a/service/deadline/api_op_UpdateQueueEnvironment.go +++ b/service/deadline/api_op_UpdateQueueEnvironment.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateQueueEnvironmentMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateQueueEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateQueueFleetAssociation.go b/service/deadline/api_op_UpdateQueueFleetAssociation.go index 371efc08349..639802cf54e 100644 --- a/service/deadline/api_op_UpdateQueueFleetAssociation.go +++ b/service/deadline/api_op_UpdateQueueFleetAssociation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateQueueFleetAssociationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateQueueFleetAssociationMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateSession.go b/service/deadline/api_op_UpdateSession.go index dfff88565de..c21afd63505 100644 --- a/service/deadline/api_op_UpdateSession.go +++ b/service/deadline/api_op_UpdateSession.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateSessionMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateStep.go b/service/deadline/api_op_UpdateStep.go index f16b0c3054e..14eb854b542 100644 --- a/service/deadline/api_op_UpdateStep.go +++ b/service/deadline/api_op_UpdateStep.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateStepMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateStepMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateStorageProfile.go b/service/deadline/api_op_UpdateStorageProfile.go index acea77c05c4..3f9c9a001fe 100644 --- a/service/deadline/api_op_UpdateStorageProfile.go +++ b/service/deadline/api_op_UpdateStorageProfile.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateStorageProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateStorageProfileMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateTask.go b/service/deadline/api_op_UpdateTask.go index b7ca08bd3ea..12d568b4b88 100644 --- a/service/deadline/api_op_UpdateTask.go +++ b/service/deadline/api_op_UpdateTask.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateTaskMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateWorker.go b/service/deadline/api_op_UpdateWorker.go index c07f63e270b..c643bbac24c 100644 --- a/service/deadline/api_op_UpdateWorker.go +++ b/service/deadline/api_op_UpdateWorker.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateWorkerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateWorkerMiddleware(stack); err != nil { return err } diff --git a/service/deadline/api_op_UpdateWorkerSchedule.go b/service/deadline/api_op_UpdateWorkerSchedule.go index a72633e9bc3..aeb2fdaaba0 100644 --- a/service/deadline/api_op_UpdateWorkerSchedule.go +++ b/service/deadline/api_op_UpdateWorkerSchedule.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateWorkerScheduleMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateWorkerScheduleMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_client.go b/service/detective/api_client.go index dfb54425b99..29c7ae23b0f 100644 --- a/service/detective/api_client.go +++ b/service/detective/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/detective/api_op_AcceptInvitation.go b/service/detective/api_op_AcceptInvitation.go index ae8c6d9c2ad..d971c9c159f 100644 --- a/service/detective/api_op_AcceptInvitation.go +++ b/service/detective/api_op_AcceptInvitation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAcceptInvitationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_BatchGetGraphMemberDatasources.go b/service/detective/api_op_BatchGetGraphMemberDatasources.go index f92b29561bf..fefb046df32 100644 --- a/service/detective/api_op_BatchGetGraphMemberDatasources.go +++ b/service/detective/api_op_BatchGetGraphMemberDatasources.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchGetGraphMemberDatasourcesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetGraphMemberDatasourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_BatchGetMembershipDatasources.go b/service/detective/api_op_BatchGetMembershipDatasources.go index 9fcc803dee4..eb350a0a9a1 100644 --- a/service/detective/api_op_BatchGetMembershipDatasources.go +++ b/service/detective/api_op_BatchGetMembershipDatasources.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetMembershipDatasourcesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetMembershipDatasourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_CreateGraph.go b/service/detective/api_op_CreateGraph.go index 77b2dd9b9a8..86f941c4650 100644 --- a/service/detective/api_op_CreateGraph.go +++ b/service/detective/api_op_CreateGraph.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateGraphMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGraph(options.Region), middleware.Before); err != nil { return err } diff --git a/service/detective/api_op_CreateMembers.go b/service/detective/api_op_CreateMembers.go index 54a4df0dc39..296d2bf2bef 100644 --- a/service/detective/api_op_CreateMembers.go +++ b/service/detective/api_op_CreateMembers.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_DeleteGraph.go b/service/detective/api_op_DeleteGraph.go index 605101038b1..5fd0949147e 100644 --- a/service/detective/api_op_DeleteGraph.go +++ b/service/detective/api_op_DeleteGraph.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteGraphMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGraphValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_DeleteMembers.go b/service/detective/api_op_DeleteMembers.go index 6b2145a2e35..d1d6b805146 100644 --- a/service/detective/api_op_DeleteMembers.go +++ b/service/detective/api_op_DeleteMembers.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_DescribeOrganizationConfiguration.go b/service/detective/api_op_DescribeOrganizationConfiguration.go index b22e97d30ed..b2b89eaf917 100644 --- a/service/detective/api_op_DescribeOrganizationConfiguration.go +++ b/service/detective/api_op_DescribeOrganizationConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_DisableOrganizationAdminAccount.go b/service/detective/api_op_DisableOrganizationAdminAccount.go index 61de14f9464..e738910d4d6 100644 --- a/service/detective/api_op_DisableOrganizationAdminAccount.go +++ b/service/detective/api_op_DisableOrganizationAdminAccount.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisableOrganizationAdminAccountMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableOrganizationAdminAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/detective/api_op_DisassociateMembership.go b/service/detective/api_op_DisassociateMembership.go index c8a40e9be52..bd7c929da98 100644 --- a/service/detective/api_op_DisassociateMembership.go +++ b/service/detective/api_op_DisassociateMembership.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisassociateMembershipMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_EnableOrganizationAdminAccount.go b/service/detective/api_op_EnableOrganizationAdminAccount.go index 81d5cd1227d..87186f2de77 100644 --- a/service/detective/api_op_EnableOrganizationAdminAccount.go +++ b/service/detective/api_op_EnableOrganizationAdminAccount.go @@ -119,6 +119,9 @@ func (c *Client) addOperationEnableOrganizationAdminAccountMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_GetInvestigation.go b/service/detective/api_op_GetInvestigation.go index 1d4e8701c3a..e830de89400 100644 --- a/service/detective/api_op_GetInvestigation.go +++ b/service/detective/api_op_GetInvestigation.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetInvestigationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInvestigationValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_GetMembers.go b/service/detective/api_op_GetMembers.go index 587ebe26407..241fc6da10c 100644 --- a/service/detective/api_op_GetMembers.go +++ b/service/detective/api_op_GetMembers.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetMembersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_ListDatasourcePackages.go b/service/detective/api_op_ListDatasourcePackages.go index fe711f25921..33727887a8f 100644 --- a/service/detective/api_op_ListDatasourcePackages.go +++ b/service/detective/api_op_ListDatasourcePackages.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDatasourcePackagesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasourcePackagesValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListDatasourcePackagesMiddlewares(stack *middleware return nil } -// ListDatasourcePackagesAPIClient is a client that implements the -// ListDatasourcePackages operation. -type ListDatasourcePackagesAPIClient interface { - ListDatasourcePackages(context.Context, *ListDatasourcePackagesInput, ...func(*Options)) (*ListDatasourcePackagesOutput, error) -} - -var _ ListDatasourcePackagesAPIClient = (*Client)(nil) - // ListDatasourcePackagesPaginatorOptions is the paginator options for // ListDatasourcePackages type ListDatasourcePackagesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDatasourcePackagesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasourcePackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDatasourcePackagesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDatasourcePackagesAPIClient is a client that implements the +// ListDatasourcePackages operation. +type ListDatasourcePackagesAPIClient interface { + ListDatasourcePackages(context.Context, *ListDatasourcePackagesInput, ...func(*Options)) (*ListDatasourcePackagesOutput, error) +} + +var _ ListDatasourcePackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasourcePackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/detective/api_op_ListGraphs.go b/service/detective/api_op_ListGraphs.go index cd16e8af6ad..17f68305a79 100644 --- a/service/detective/api_op_ListGraphs.go +++ b/service/detective/api_op_ListGraphs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListGraphsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGraphs(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListGraphsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGraphsAPIClient is a client that implements the ListGraphs operation. -type ListGraphsAPIClient interface { - ListGraphs(context.Context, *ListGraphsInput, ...func(*Options)) (*ListGraphsOutput, error) -} - -var _ ListGraphsAPIClient = (*Client)(nil) - // ListGraphsPaginatorOptions is the paginator options for ListGraphs type ListGraphsPaginatorOptions struct { // The maximum number of graphs to return at a time. The total must be less than @@ -211,6 +207,9 @@ func (p *ListGraphsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGraphs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListGraphsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGraphsAPIClient is a client that implements the ListGraphs operation. +type ListGraphsAPIClient interface { + ListGraphs(context.Context, *ListGraphsInput, ...func(*Options)) (*ListGraphsOutput, error) +} + +var _ ListGraphsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGraphs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/detective/api_op_ListIndicators.go b/service/detective/api_op_ListIndicators.go index d967c14e508..04bbb36924f 100644 --- a/service/detective/api_op_ListIndicators.go +++ b/service/detective/api_op_ListIndicators.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListIndicatorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIndicatorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_ListInvestigations.go b/service/detective/api_op_ListInvestigations.go index 17a8fa64d3a..b41c4143f28 100644 --- a/service/detective/api_op_ListInvestigations.go +++ b/service/detective/api_op_ListInvestigations.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListInvestigationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInvestigationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_ListInvitations.go b/service/detective/api_op_ListInvitations.go index 00dd924bd1d..d4da55c6cfe 100644 --- a/service/detective/api_op_ListInvitations.go +++ b/service/detective/api_op_ListInvitations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInvitations(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, return nil } -// ListInvitationsAPIClient is a client that implements the ListInvitations -// operation. -type ListInvitationsAPIClient interface { - ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) -} - -var _ ListInvitationsAPIClient = (*Client)(nil) - // ListInvitationsPaginatorOptions is the paginator options for ListInvitations type ListInvitationsPaginatorOptions struct { // The maximum number of behavior graph invitations to return in the response. The @@ -217,6 +212,9 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListInvitationsAPIClient is a client that implements the ListInvitations +// operation. +type ListInvitationsAPIClient interface { + ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) +} + +var _ ListInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/detective/api_op_ListMembers.go b/service/detective/api_op_ListMembers.go index 0ece56f78fd..fee16d89036 100644 --- a/service/detective/api_op_ListMembers.go +++ b/service/detective/api_op_ListMembers.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMembersValidationMiddleware(stack); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // The maximum number of member accounts to include in the response. The total @@ -232,6 +228,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +250,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/detective/api_op_ListOrganizationAdminAccounts.go b/service/detective/api_op_ListOrganizationAdminAccounts.go index 66e42765eb9..2e852ae7ca2 100644 --- a/service/detective/api_op_ListOrganizationAdminAccounts.go +++ b/service/detective/api_op_ListOrganizationAdminAccounts.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationAdminAccounts(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid return nil } -// ListOrganizationAdminAccountsAPIClient is a client that implements the -// ListOrganizationAdminAccounts operation. -type ListOrganizationAdminAccountsAPIClient interface { - ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) -} - -var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) - // ListOrganizationAdminAccountsPaginatorOptions is the paginator options for // ListOrganizationAdminAccounts type ListOrganizationAdminAccountsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationAdminAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListOrganizationAdminAccountsAPIClient is a client that implements the +// ListOrganizationAdminAccounts operation. +type ListOrganizationAdminAccountsAPIClient interface { + ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) +} + +var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationAdminAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/detective/api_op_ListTagsForResource.go b/service/detective/api_op_ListTagsForResource.go index bcb5aba6715..4b3c44afae8 100644 --- a/service/detective/api_op_ListTagsForResource.go +++ b/service/detective/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_RejectInvitation.go b/service/detective/api_op_RejectInvitation.go index 13a53f7f714..db0fac28cca 100644 --- a/service/detective/api_op_RejectInvitation.go +++ b/service/detective/api_op_RejectInvitation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRejectInvitationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_StartInvestigation.go b/service/detective/api_op_StartInvestigation.go index f075ef83857..bfd7ab52339 100644 --- a/service/detective/api_op_StartInvestigation.go +++ b/service/detective/api_op_StartInvestigation.go @@ -127,6 +127,9 @@ func (c *Client) addOperationStartInvestigationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInvestigationValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_StartMonitoringMember.go b/service/detective/api_op_StartMonitoringMember.go index 06f47b7df9f..6e1d8866a20 100644 --- a/service/detective/api_op_StartMonitoringMember.go +++ b/service/detective/api_op_StartMonitoringMember.go @@ -117,6 +117,9 @@ func (c *Client) addOperationStartMonitoringMemberMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMonitoringMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_TagResource.go b/service/detective/api_op_TagResource.go index 688f0048f29..edf6c211990 100644 --- a/service/detective/api_op_TagResource.go +++ b/service/detective/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_UntagResource.go b/service/detective/api_op_UntagResource.go index 55e183107ee..0ffa9b93bd7 100644 --- a/service/detective/api_op_UntagResource.go +++ b/service/detective/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_UpdateDatasourcePackages.go b/service/detective/api_op_UpdateDatasourcePackages.go index d987435e1ae..8a1467d66b3 100644 --- a/service/detective/api_op_UpdateDatasourcePackages.go +++ b/service/detective/api_op_UpdateDatasourcePackages.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateDatasourcePackagesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatasourcePackagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_UpdateInvestigationState.go b/service/detective/api_op_UpdateInvestigationState.go index f8f32ed8e1b..15276e99fa2 100644 --- a/service/detective/api_op_UpdateInvestigationState.go +++ b/service/detective/api_op_UpdateInvestigationState.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateInvestigationStateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInvestigationStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/detective/api_op_UpdateOrganizationConfiguration.go b/service/detective/api_op_UpdateOrganizationConfiguration.go index 4820a99003f..67df75c43e1 100644 --- a/service/detective/api_op_UpdateOrganizationConfiguration.go +++ b/service/detective/api_op_UpdateOrganizationConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateOrganizationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_client.go b/service/devicefarm/api_client.go index fcd898092c1..23f3edeb6fb 100644 --- a/service/devicefarm/api_client.go +++ b/service/devicefarm/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/devicefarm/api_op_CreateDevicePool.go b/service/devicefarm/api_op_CreateDevicePool.go index efa800b26a8..ac9edc9aadc 100644 --- a/service/devicefarm/api_op_CreateDevicePool.go +++ b/service/devicefarm/api_op_CreateDevicePool.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateDevicePoolMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDevicePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateInstanceProfile.go b/service/devicefarm/api_op_CreateInstanceProfile.go index 6c8e909a85d..d45ea11923a 100644 --- a/service/devicefarm/api_op_CreateInstanceProfile.go +++ b/service/devicefarm/api_op_CreateInstanceProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateNetworkProfile.go b/service/devicefarm/api_op_CreateNetworkProfile.go index a50776ba9b7..53f559dc863 100644 --- a/service/devicefarm/api_op_CreateNetworkProfile.go +++ b/service/devicefarm/api_op_CreateNetworkProfile.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateNetworkProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNetworkProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateProject.go b/service/devicefarm/api_op_CreateProject.go index 29058d108db..9b4f7d54fd3 100644 --- a/service/devicefarm/api_op_CreateProject.go +++ b/service/devicefarm/api_op_CreateProject.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateRemoteAccessSession.go b/service/devicefarm/api_op_CreateRemoteAccessSession.go index 790ede177db..9b9a6baa795 100644 --- a/service/devicefarm/api_op_CreateRemoteAccessSession.go +++ b/service/devicefarm/api_op_CreateRemoteAccessSession.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateRemoteAccessSessionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRemoteAccessSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateTestGridProject.go b/service/devicefarm/api_op_CreateTestGridProject.go index 5cf9cc9b073..472bc2c6afb 100644 --- a/service/devicefarm/api_op_CreateTestGridProject.go +++ b/service/devicefarm/api_op_CreateTestGridProject.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCreateTestGridProjectMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTestGridProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateTestGridUrl.go b/service/devicefarm/api_op_CreateTestGridUrl.go index b2274f6a992..2a63b79294b 100644 --- a/service/devicefarm/api_op_CreateTestGridUrl.go +++ b/service/devicefarm/api_op_CreateTestGridUrl.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateTestGridUrlMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTestGridUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateUpload.go b/service/devicefarm/api_op_CreateUpload.go index c4c34200eb1..6df3e276541 100644 --- a/service/devicefarm/api_op_CreateUpload.go +++ b/service/devicefarm/api_op_CreateUpload.go @@ -194,6 +194,9 @@ func (c *Client) addOperationCreateUploadMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_CreateVPCEConfiguration.go b/service/devicefarm/api_op_CreateVPCEConfiguration.go index e6ac23a6e15..a9ca0e35e9e 100644 --- a/service/devicefarm/api_op_CreateVPCEConfiguration.go +++ b/service/devicefarm/api_op_CreateVPCEConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateVPCEConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVPCEConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteDevicePool.go b/service/devicefarm/api_op_DeleteDevicePool.go index 83e32ee82e0..32c272c5fee 100644 --- a/service/devicefarm/api_op_DeleteDevicePool.go +++ b/service/devicefarm/api_op_DeleteDevicePool.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDevicePoolMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDevicePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteInstanceProfile.go b/service/devicefarm/api_op_DeleteInstanceProfile.go index 533405bf058..ed941b57130 100644 --- a/service/devicefarm/api_op_DeleteInstanceProfile.go +++ b/service/devicefarm/api_op_DeleteInstanceProfile.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteNetworkProfile.go b/service/devicefarm/api_op_DeleteNetworkProfile.go index 2de0757a1d1..fda14e35f7b 100644 --- a/service/devicefarm/api_op_DeleteNetworkProfile.go +++ b/service/devicefarm/api_op_DeleteNetworkProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteNetworkProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteProject.go b/service/devicefarm/api_op_DeleteProject.go index b3c11ffd3cc..ac555bf8f50 100644 --- a/service/devicefarm/api_op_DeleteProject.go +++ b/service/devicefarm/api_op_DeleteProject.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteRemoteAccessSession.go b/service/devicefarm/api_op_DeleteRemoteAccessSession.go index 219f8d0dce0..60751c6b41f 100644 --- a/service/devicefarm/api_op_DeleteRemoteAccessSession.go +++ b/service/devicefarm/api_op_DeleteRemoteAccessSession.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteRemoteAccessSessionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRemoteAccessSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteRun.go b/service/devicefarm/api_op_DeleteRun.go index bb15c8a64d5..c24664b760a 100644 --- a/service/devicefarm/api_op_DeleteRun.go +++ b/service/devicefarm/api_op_DeleteRun.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteRunMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteTestGridProject.go b/service/devicefarm/api_op_DeleteTestGridProject.go index 18e6fe309b8..f0e6c116c18 100644 --- a/service/devicefarm/api_op_DeleteTestGridProject.go +++ b/service/devicefarm/api_op_DeleteTestGridProject.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteTestGridProjectMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTestGridProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteUpload.go b/service/devicefarm/api_op_DeleteUpload.go index bca78aea2fe..400e977b74d 100644 --- a/service/devicefarm/api_op_DeleteUpload.go +++ b/service/devicefarm/api_op_DeleteUpload.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteUploadMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_DeleteVPCEConfiguration.go b/service/devicefarm/api_op_DeleteVPCEConfiguration.go index c583b582439..aff16fe4f68 100644 --- a/service/devicefarm/api_op_DeleteVPCEConfiguration.go +++ b/service/devicefarm/api_op_DeleteVPCEConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteVPCEConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVPCEConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetAccountSettings.go b/service/devicefarm/api_op_GetAccountSettings.go index 9ec1fdbde13..bcc8ead2047 100644 --- a/service/devicefarm/api_op_GetAccountSettings.go +++ b/service/devicefarm/api_op_GetAccountSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devicefarm/api_op_GetDevice.go b/service/devicefarm/api_op_GetDevice.go index 98867390467..4aa3d2d7b70 100644 --- a/service/devicefarm/api_op_GetDevice.go +++ b/service/devicefarm/api_op_GetDevice.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetDeviceMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetDeviceInstance.go b/service/devicefarm/api_op_GetDeviceInstance.go index c033dfffd19..63864b4d5ca 100644 --- a/service/devicefarm/api_op_GetDeviceInstance.go +++ b/service/devicefarm/api_op_GetDeviceInstance.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetDeviceInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetDevicePool.go b/service/devicefarm/api_op_GetDevicePool.go index 0322aa8ad96..a024ec4cc6c 100644 --- a/service/devicefarm/api_op_GetDevicePool.go +++ b/service/devicefarm/api_op_GetDevicePool.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetDevicePoolMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDevicePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetDevicePoolCompatibility.go b/service/devicefarm/api_op_GetDevicePoolCompatibility.go index ef9539a4a4c..eddc086f7ac 100644 --- a/service/devicefarm/api_op_GetDevicePoolCompatibility.go +++ b/service/devicefarm/api_op_GetDevicePoolCompatibility.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetDevicePoolCompatibilityMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDevicePoolCompatibilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetInstanceProfile.go b/service/devicefarm/api_op_GetInstanceProfile.go index 46895b5c8da..7256abb1787 100644 --- a/service/devicefarm/api_op_GetInstanceProfile.go +++ b/service/devicefarm/api_op_GetInstanceProfile.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetJob.go b/service/devicefarm/api_op_GetJob.go index 4c02464b39f..d511ecf3300 100644 --- a/service/devicefarm/api_op_GetJob.go +++ b/service/devicefarm/api_op_GetJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetNetworkProfile.go b/service/devicefarm/api_op_GetNetworkProfile.go index 8d6f2116347..cae65bbb207 100644 --- a/service/devicefarm/api_op_GetNetworkProfile.go +++ b/service/devicefarm/api_op_GetNetworkProfile.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetNetworkProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetOfferingStatus.go b/service/devicefarm/api_op_GetOfferingStatus.go index a4d5c03d301..d8b61e7e953 100644 --- a/service/devicefarm/api_op_GetOfferingStatus.go +++ b/service/devicefarm/api_op_GetOfferingStatus.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetOfferingStatusMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOfferingStatus(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationGetOfferingStatusMiddlewares(stack *middleware.Stac return nil } -// GetOfferingStatusAPIClient is a client that implements the GetOfferingStatus -// operation. -type GetOfferingStatusAPIClient interface { - GetOfferingStatus(context.Context, *GetOfferingStatusInput, ...func(*Options)) (*GetOfferingStatusOutput, error) -} - -var _ GetOfferingStatusAPIClient = (*Client)(nil) - // GetOfferingStatusPaginatorOptions is the paginator options for GetOfferingStatus type GetOfferingStatusPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +194,9 @@ func (p *GetOfferingStatusPaginator) NextPage(ctx context.Context, optFns ...fun params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOfferingStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +216,14 @@ func (p *GetOfferingStatusPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetOfferingStatusAPIClient is a client that implements the GetOfferingStatus +// operation. +type GetOfferingStatusAPIClient interface { + GetOfferingStatus(context.Context, *GetOfferingStatusInput, ...func(*Options)) (*GetOfferingStatusOutput, error) +} + +var _ GetOfferingStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOfferingStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_GetProject.go b/service/devicefarm/api_op_GetProject.go index c48e2afaea7..c884f66e473 100644 --- a/service/devicefarm/api_op_GetProject.go +++ b/service/devicefarm/api_op_GetProject.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetProjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetRemoteAccessSession.go b/service/devicefarm/api_op_GetRemoteAccessSession.go index f9933c11caf..c21ea5d78c8 100644 --- a/service/devicefarm/api_op_GetRemoteAccessSession.go +++ b/service/devicefarm/api_op_GetRemoteAccessSession.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetRemoteAccessSessionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRemoteAccessSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetRun.go b/service/devicefarm/api_op_GetRun.go index 5d283d20dd3..d1884c78254 100644 --- a/service/devicefarm/api_op_GetRun.go +++ b/service/devicefarm/api_op_GetRun.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetRunMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetSuite.go b/service/devicefarm/api_op_GetSuite.go index e29e1d9d09e..ddbe4da6dba 100644 --- a/service/devicefarm/api_op_GetSuite.go +++ b/service/devicefarm/api_op_GetSuite.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetSuiteMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSuiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetTest.go b/service/devicefarm/api_op_GetTest.go index badb4f1278d..da518e0e8a6 100644 --- a/service/devicefarm/api_op_GetTest.go +++ b/service/devicefarm/api_op_GetTest.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetTestMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetTestGridProject.go b/service/devicefarm/api_op_GetTestGridProject.go index d7a56229b01..99b866afc22 100644 --- a/service/devicefarm/api_op_GetTestGridProject.go +++ b/service/devicefarm/api_op_GetTestGridProject.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetTestGridProjectMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestGridProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetTestGridSession.go b/service/devicefarm/api_op_GetTestGridSession.go index fc779ee2fbb..b77e368fd05 100644 --- a/service/devicefarm/api_op_GetTestGridSession.go +++ b/service/devicefarm/api_op_GetTestGridSession.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetTestGridSessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTestGridSession(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devicefarm/api_op_GetUpload.go b/service/devicefarm/api_op_GetUpload.go index 032f01fb4aa..0894e84f339 100644 --- a/service/devicefarm/api_op_GetUpload.go +++ b/service/devicefarm/api_op_GetUpload.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetUploadMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_GetVPCEConfiguration.go b/service/devicefarm/api_op_GetVPCEConfiguration.go index 38b603c63c0..b3b63de38ec 100644 --- a/service/devicefarm/api_op_GetVPCEConfiguration.go +++ b/service/devicefarm/api_op_GetVPCEConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetVPCEConfigurationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVPCEConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_InstallToRemoteAccessSession.go b/service/devicefarm/api_op_InstallToRemoteAccessSession.go index 12f42eda0d0..8ae41dc38f2 100644 --- a/service/devicefarm/api_op_InstallToRemoteAccessSession.go +++ b/service/devicefarm/api_op_InstallToRemoteAccessSession.go @@ -118,6 +118,9 @@ func (c *Client) addOperationInstallToRemoteAccessSessionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInstallToRemoteAccessSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_ListArtifacts.go b/service/devicefarm/api_op_ListArtifacts.go index b1328a7156c..393ea641ec7 100644 --- a/service/devicefarm/api_op_ListArtifacts.go +++ b/service/devicefarm/api_op_ListArtifacts.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListArtifactsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListArtifactsValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListArtifactsMiddlewares(stack *middleware.Stack, o return nil } -// ListArtifactsAPIClient is a client that implements the ListArtifacts operation. -type ListArtifactsAPIClient interface { - ListArtifacts(context.Context, *ListArtifactsInput, ...func(*Options)) (*ListArtifactsOutput, error) -} - -var _ ListArtifactsAPIClient = (*Client)(nil) - // ListArtifactsPaginatorOptions is the paginator options for ListArtifacts type ListArtifactsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -212,6 +208,9 @@ func (p *ListArtifactsPaginator) NextPage(ctx context.Context, optFns ...func(*O params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListArtifacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListArtifactsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListArtifactsAPIClient is a client that implements the ListArtifacts operation. +type ListArtifactsAPIClient interface { + ListArtifacts(context.Context, *ListArtifactsInput, ...func(*Options)) (*ListArtifactsOutput, error) +} + +var _ ListArtifactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListArtifacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListDeviceInstances.go b/service/devicefarm/api_op_ListDeviceInstances.go index d9bbfc57a9f..89baadef2c9 100644 --- a/service/devicefarm/api_op_ListDeviceInstances.go +++ b/service/devicefarm/api_op_ListDeviceInstances.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListDeviceInstancesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceInstances(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devicefarm/api_op_ListDevicePools.go b/service/devicefarm/api_op_ListDevicePools.go index ad7e8055747..be37eef8f37 100644 --- a/service/devicefarm/api_op_ListDevicePools.go +++ b/service/devicefarm/api_op_ListDevicePools.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListDevicePoolsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevicePoolsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListDevicePoolsMiddlewares(stack *middleware.Stack, return nil } -// ListDevicePoolsAPIClient is a client that implements the ListDevicePools -// operation. -type ListDevicePoolsAPIClient interface { - ListDevicePools(context.Context, *ListDevicePoolsInput, ...func(*Options)) (*ListDevicePoolsOutput, error) -} - -var _ ListDevicePoolsAPIClient = (*Client)(nil) - // ListDevicePoolsPaginatorOptions is the paginator options for ListDevicePools type ListDevicePoolsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -210,6 +205,9 @@ func (p *ListDevicePoolsPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevicePools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListDevicePoolsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDevicePoolsAPIClient is a client that implements the ListDevicePools +// operation. +type ListDevicePoolsAPIClient interface { + ListDevicePools(context.Context, *ListDevicePoolsInput, ...func(*Options)) (*ListDevicePoolsOutput, error) +} + +var _ ListDevicePoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevicePools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListDevices.go b/service/devicefarm/api_op_ListDevices.go index 4f2632743de..b63bf25eb30 100644 --- a/service/devicefarm/api_op_ListDevices.go +++ b/service/devicefarm/api_op_ListDevices.go @@ -179,6 +179,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevicesValidationMiddleware(stack); err != nil { return err } @@ -203,13 +206,6 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListDevicesAPIClient is a client that implements the ListDevices operation. -type ListDevicesAPIClient interface { - ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) -} - -var _ ListDevicesAPIClient = (*Client)(nil) - // ListDevicesPaginatorOptions is the paginator options for ListDevices type ListDevicesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -261,6 +257,9 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +279,13 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListInstanceProfiles.go b/service/devicefarm/api_op_ListInstanceProfiles.go index e665b1db952..fb89f7d1b0b 100644 --- a/service/devicefarm/api_op_ListInstanceProfiles.go +++ b/service/devicefarm/api_op_ListInstanceProfiles.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfiles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devicefarm/api_op_ListJobs.go b/service/devicefarm/api_op_ListJobs.go index d311df4e835..ac0df674b1c 100644 --- a/service/devicefarm/api_op_ListJobs.go +++ b/service/devicefarm/api_op_ListJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobsValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +195,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +217,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListNetworkProfiles.go b/service/devicefarm/api_op_ListNetworkProfiles.go index a66a7189d44..ff8fdd359e9 100644 --- a/service/devicefarm/api_op_ListNetworkProfiles.go +++ b/service/devicefarm/api_op_ListNetworkProfiles.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListNetworkProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNetworkProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_ListOfferingPromotions.go b/service/devicefarm/api_op_ListOfferingPromotions.go index c0c9e669365..36895ccdb81 100644 --- a/service/devicefarm/api_op_ListOfferingPromotions.go +++ b/service/devicefarm/api_op_ListOfferingPromotions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListOfferingPromotionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOfferingPromotions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devicefarm/api_op_ListOfferingTransactions.go b/service/devicefarm/api_op_ListOfferingTransactions.go index 9d35932e7cc..0b706181e66 100644 --- a/service/devicefarm/api_op_ListOfferingTransactions.go +++ b/service/devicefarm/api_op_ListOfferingTransactions.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListOfferingTransactionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOfferingTransactions(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListOfferingTransactionsMiddlewares(stack *middlewa return nil } -// ListOfferingTransactionsAPIClient is a client that implements the -// ListOfferingTransactions operation. -type ListOfferingTransactionsAPIClient interface { - ListOfferingTransactions(context.Context, *ListOfferingTransactionsInput, ...func(*Options)) (*ListOfferingTransactionsOutput, error) -} - -var _ ListOfferingTransactionsAPIClient = (*Client)(nil) - // ListOfferingTransactionsPaginatorOptions is the paginator options for // ListOfferingTransactions type ListOfferingTransactionsPaginatorOptions struct { @@ -198,6 +193,9 @@ func (p *ListOfferingTransactionsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOfferingTransactions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -217,6 +215,14 @@ func (p *ListOfferingTransactionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListOfferingTransactionsAPIClient is a client that implements the +// ListOfferingTransactions operation. +type ListOfferingTransactionsAPIClient interface { + ListOfferingTransactions(context.Context, *ListOfferingTransactionsInput, ...func(*Options)) (*ListOfferingTransactionsOutput, error) +} + +var _ ListOfferingTransactionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOfferingTransactions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListOfferings.go b/service/devicefarm/api_op_ListOfferings.go index 667438a7cf0..e9391336d97 100644 --- a/service/devicefarm/api_op_ListOfferings.go +++ b/service/devicefarm/api_op_ListOfferings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListOfferingsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOfferings(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListOfferingsMiddlewares(stack *middleware.Stack, o return nil } -// ListOfferingsAPIClient is a client that implements the ListOfferings operation. -type ListOfferingsAPIClient interface { - ListOfferings(context.Context, *ListOfferingsInput, ...func(*Options)) (*ListOfferingsOutput, error) -} - -var _ ListOfferingsAPIClient = (*Client)(nil) - // ListOfferingsPaginatorOptions is the paginator options for ListOfferings type ListOfferingsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -194,6 +190,9 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -213,6 +212,13 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListOfferingsAPIClient is a client that implements the ListOfferings operation. +type ListOfferingsAPIClient interface { + ListOfferings(context.Context, *ListOfferingsInput, ...func(*Options)) (*ListOfferingsOutput, error) +} + +var _ ListOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListProjects.go b/service/devicefarm/api_op_ListProjects.go index 1ec56c88112..3cd3efbcdb7 100644 --- a/service/devicefarm/api_op_ListProjects.go +++ b/service/devicefarm/api_op_ListProjects.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -196,6 +192,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -215,6 +214,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListRemoteAccessSessions.go b/service/devicefarm/api_op_ListRemoteAccessSessions.go index 9ff4aa3326c..f942f21d5f3 100644 --- a/service/devicefarm/api_op_ListRemoteAccessSessions.go +++ b/service/devicefarm/api_op_ListRemoteAccessSessions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListRemoteAccessSessionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRemoteAccessSessionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_ListRuns.go b/service/devicefarm/api_op_ListRuns.go index 38e198c0710..0713ee80ad8 100644 --- a/service/devicefarm/api_op_ListRuns.go +++ b/service/devicefarm/api_op_ListRuns.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListRunsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRunsValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListRunsMiddlewares(stack *middleware.Stack, option return nil } -// ListRunsAPIClient is a client that implements the ListRuns operation. -type ListRunsAPIClient interface { - ListRuns(context.Context, *ListRunsInput, ...func(*Options)) (*ListRunsOutput, error) -} - -var _ ListRunsAPIClient = (*Client)(nil) - // ListRunsPaginatorOptions is the paginator options for ListRuns type ListRunsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +195,9 @@ func (p *ListRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +217,13 @@ func (p *ListRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListRunsAPIClient is a client that implements the ListRuns operation. +type ListRunsAPIClient interface { + ListRuns(context.Context, *ListRunsInput, ...func(*Options)) (*ListRunsOutput, error) +} + +var _ ListRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListSamples.go b/service/devicefarm/api_op_ListSamples.go index c1c56d511f4..1ee520eedc0 100644 --- a/service/devicefarm/api_op_ListSamples.go +++ b/service/devicefarm/api_op_ListSamples.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListSamplesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSamplesValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListSamplesMiddlewares(stack *middleware.Stack, opt return nil } -// ListSamplesAPIClient is a client that implements the ListSamples operation. -type ListSamplesAPIClient interface { - ListSamples(context.Context, *ListSamplesInput, ...func(*Options)) (*ListSamplesOutput, error) -} - -var _ ListSamplesAPIClient = (*Client)(nil) - // ListSamplesPaginatorOptions is the paginator options for ListSamples type ListSamplesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +195,9 @@ func (p *ListSamplesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSamples(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +217,13 @@ func (p *ListSamplesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSamplesAPIClient is a client that implements the ListSamples operation. +type ListSamplesAPIClient interface { + ListSamples(context.Context, *ListSamplesInput, ...func(*Options)) (*ListSamplesOutput, error) +} + +var _ ListSamplesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSamples(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListSuites.go b/service/devicefarm/api_op_ListSuites.go index f5b2ab303a0..ec9e6da0f3d 100644 --- a/service/devicefarm/api_op_ListSuites.go +++ b/service/devicefarm/api_op_ListSuites.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListSuitesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSuitesValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListSuitesMiddlewares(stack *middleware.Stack, opti return nil } -// ListSuitesAPIClient is a client that implements the ListSuites operation. -type ListSuitesAPIClient interface { - ListSuites(context.Context, *ListSuitesInput, ...func(*Options)) (*ListSuitesOutput, error) -} - -var _ ListSuitesAPIClient = (*Client)(nil) - // ListSuitesPaginatorOptions is the paginator options for ListSuites type ListSuitesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +195,9 @@ func (p *ListSuitesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSuites(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +217,13 @@ func (p *ListSuitesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListSuitesAPIClient is a client that implements the ListSuites operation. +type ListSuitesAPIClient interface { + ListSuites(context.Context, *ListSuitesInput, ...func(*Options)) (*ListSuitesOutput, error) +} + +var _ ListSuitesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSuites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListTagsForResource.go b/service/devicefarm/api_op_ListTagsForResource.go index fcf8a1518a2..df2609e12d8 100644 --- a/service/devicefarm/api_op_ListTagsForResource.go +++ b/service/devicefarm/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_ListTestGridProjects.go b/service/devicefarm/api_op_ListTestGridProjects.go index 1acaa40618e..0dcbd697f4e 100644 --- a/service/devicefarm/api_op_ListTestGridProjects.go +++ b/service/devicefarm/api_op_ListTestGridProjects.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTestGridProjectsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTestGridProjects(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListTestGridProjectsMiddlewares(stack *middleware.S return nil } -// ListTestGridProjectsAPIClient is a client that implements the -// ListTestGridProjects operation. -type ListTestGridProjectsAPIClient interface { - ListTestGridProjects(context.Context, *ListTestGridProjectsInput, ...func(*Options)) (*ListTestGridProjectsOutput, error) -} - -var _ ListTestGridProjectsAPIClient = (*Client)(nil) - // ListTestGridProjectsPaginatorOptions is the paginator options for // ListTestGridProjects type ListTestGridProjectsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListTestGridProjectsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResult = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestGridProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListTestGridProjectsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTestGridProjectsAPIClient is a client that implements the +// ListTestGridProjects operation. +type ListTestGridProjectsAPIClient interface { + ListTestGridProjects(context.Context, *ListTestGridProjectsInput, ...func(*Options)) (*ListTestGridProjectsOutput, error) +} + +var _ ListTestGridProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestGridProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListTestGridSessionActions.go b/service/devicefarm/api_op_ListTestGridSessionActions.go index 0cc98e58647..ea5ce62d196 100644 --- a/service/devicefarm/api_op_ListTestGridSessionActions.go +++ b/service/devicefarm/api_op_ListTestGridSessionActions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTestGridSessionActionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestGridSessionActionsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListTestGridSessionActionsMiddlewares(stack *middle return nil } -// ListTestGridSessionActionsAPIClient is a client that implements the -// ListTestGridSessionActions operation. -type ListTestGridSessionActionsAPIClient interface { - ListTestGridSessionActions(context.Context, *ListTestGridSessionActionsInput, ...func(*Options)) (*ListTestGridSessionActionsOutput, error) -} - -var _ ListTestGridSessionActionsAPIClient = (*Client)(nil) - // ListTestGridSessionActionsPaginatorOptions is the paginator options for // ListTestGridSessionActions type ListTestGridSessionActionsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListTestGridSessionActionsPaginator) NextPage(ctx context.Context, optF } params.MaxResult = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestGridSessionActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListTestGridSessionActionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListTestGridSessionActionsAPIClient is a client that implements the +// ListTestGridSessionActions operation. +type ListTestGridSessionActionsAPIClient interface { + ListTestGridSessionActions(context.Context, *ListTestGridSessionActionsInput, ...func(*Options)) (*ListTestGridSessionActionsOutput, error) +} + +var _ ListTestGridSessionActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestGridSessionActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListTestGridSessionArtifacts.go b/service/devicefarm/api_op_ListTestGridSessionArtifacts.go index 8dfdca85485..90375b104a9 100644 --- a/service/devicefarm/api_op_ListTestGridSessionArtifacts.go +++ b/service/devicefarm/api_op_ListTestGridSessionArtifacts.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTestGridSessionArtifactsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestGridSessionArtifactsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListTestGridSessionArtifactsMiddlewares(stack *midd return nil } -// ListTestGridSessionArtifactsAPIClient is a client that implements the -// ListTestGridSessionArtifacts operation. -type ListTestGridSessionArtifactsAPIClient interface { - ListTestGridSessionArtifacts(context.Context, *ListTestGridSessionArtifactsInput, ...func(*Options)) (*ListTestGridSessionArtifactsOutput, error) -} - -var _ ListTestGridSessionArtifactsAPIClient = (*Client)(nil) - // ListTestGridSessionArtifactsPaginatorOptions is the paginator options for // ListTestGridSessionArtifacts type ListTestGridSessionArtifactsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListTestGridSessionArtifactsPaginator) NextPage(ctx context.Context, op } params.MaxResult = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestGridSessionArtifacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTestGridSessionArtifactsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListTestGridSessionArtifactsAPIClient is a client that implements the +// ListTestGridSessionArtifacts operation. +type ListTestGridSessionArtifactsAPIClient interface { + ListTestGridSessionArtifacts(context.Context, *ListTestGridSessionArtifactsInput, ...func(*Options)) (*ListTestGridSessionArtifactsOutput, error) +} + +var _ ListTestGridSessionArtifactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestGridSessionArtifacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListTestGridSessions.go b/service/devicefarm/api_op_ListTestGridSessions.go index a4e8415c630..2ec21a2575b 100644 --- a/service/devicefarm/api_op_ListTestGridSessions.go +++ b/service/devicefarm/api_op_ListTestGridSessions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListTestGridSessionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestGridSessionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListTestGridSessionsMiddlewares(stack *middleware.S return nil } -// ListTestGridSessionsAPIClient is a client that implements the -// ListTestGridSessions operation. -type ListTestGridSessionsAPIClient interface { - ListTestGridSessions(context.Context, *ListTestGridSessionsInput, ...func(*Options)) (*ListTestGridSessionsOutput, error) -} - -var _ ListTestGridSessionsAPIClient = (*Client)(nil) - // ListTestGridSessionsPaginatorOptions is the paginator options for // ListTestGridSessions type ListTestGridSessionsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListTestGridSessionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResult = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestGridSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListTestGridSessionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTestGridSessionsAPIClient is a client that implements the +// ListTestGridSessions operation. +type ListTestGridSessionsAPIClient interface { + ListTestGridSessions(context.Context, *ListTestGridSessionsInput, ...func(*Options)) (*ListTestGridSessionsOutput, error) +} + +var _ ListTestGridSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestGridSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListTests.go b/service/devicefarm/api_op_ListTests.go index 98ad3f5e5f4..51b636a3d4b 100644 --- a/service/devicefarm/api_op_ListTests.go +++ b/service/devicefarm/api_op_ListTests.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTestsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestsValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListTestsMiddlewares(stack *middleware.Stack, optio return nil } -// ListTestsAPIClient is a client that implements the ListTests operation. -type ListTestsAPIClient interface { - ListTests(context.Context, *ListTestsInput, ...func(*Options)) (*ListTestsOutput, error) -} - -var _ ListTestsAPIClient = (*Client)(nil) - // ListTestsPaginatorOptions is the paginator options for ListTests type ListTestsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -199,6 +195,9 @@ func (p *ListTestsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +217,13 @@ func (p *ListTestsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListTestsAPIClient is a client that implements the ListTests operation. +type ListTestsAPIClient interface { + ListTests(context.Context, *ListTestsInput, ...func(*Options)) (*ListTestsOutput, error) +} + +var _ ListTestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListUniqueProblems.go b/service/devicefarm/api_op_ListUniqueProblems.go index 59ebccf9c57..b701ec5379f 100644 --- a/service/devicefarm/api_op_ListUniqueProblems.go +++ b/service/devicefarm/api_op_ListUniqueProblems.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListUniqueProblemsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUniqueProblemsValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListUniqueProblemsMiddlewares(stack *middleware.Sta return nil } -// ListUniqueProblemsAPIClient is a client that implements the ListUniqueProblems -// operation. -type ListUniqueProblemsAPIClient interface { - ListUniqueProblems(context.Context, *ListUniqueProblemsInput, ...func(*Options)) (*ListUniqueProblemsOutput, error) -} - -var _ ListUniqueProblemsAPIClient = (*Client)(nil) - // ListUniqueProblemsPaginatorOptions is the paginator options for // ListUniqueProblems type ListUniqueProblemsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListUniqueProblemsPaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUniqueProblems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListUniqueProblemsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListUniqueProblemsAPIClient is a client that implements the ListUniqueProblems +// operation. +type ListUniqueProblemsAPIClient interface { + ListUniqueProblems(context.Context, *ListUniqueProblemsInput, ...func(*Options)) (*ListUniqueProblemsOutput, error) +} + +var _ ListUniqueProblemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUniqueProblems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListUploads.go b/service/devicefarm/api_op_ListUploads.go index b77c19e6ced..1989cee0439 100644 --- a/service/devicefarm/api_op_ListUploads.go +++ b/service/devicefarm/api_op_ListUploads.go @@ -187,6 +187,9 @@ func (c *Client) addOperationListUploadsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUploadsValidationMiddleware(stack); err != nil { return err } @@ -211,13 +214,6 @@ func (c *Client) addOperationListUploadsMiddlewares(stack *middleware.Stack, opt return nil } -// ListUploadsAPIClient is a client that implements the ListUploads operation. -type ListUploadsAPIClient interface { - ListUploads(context.Context, *ListUploadsInput, ...func(*Options)) (*ListUploadsOutput, error) -} - -var _ ListUploadsAPIClient = (*Client)(nil) - // ListUploadsPaginatorOptions is the paginator options for ListUploads type ListUploadsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -269,6 +265,9 @@ func (p *ListUploadsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUploads(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +287,13 @@ func (p *ListUploadsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListUploadsAPIClient is a client that implements the ListUploads operation. +type ListUploadsAPIClient interface { + ListUploads(context.Context, *ListUploadsInput, ...func(*Options)) (*ListUploadsOutput, error) +} + +var _ ListUploadsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUploads(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devicefarm/api_op_ListVPCEConfigurations.go b/service/devicefarm/api_op_ListVPCEConfigurations.go index c3eee9f1de9..7d98b5effd4 100644 --- a/service/devicefarm/api_op_ListVPCEConfigurations.go +++ b/service/devicefarm/api_op_ListVPCEConfigurations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListVPCEConfigurationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVPCEConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devicefarm/api_op_PurchaseOffering.go b/service/devicefarm/api_op_PurchaseOffering.go index 655ee76c256..f0eee399dc0 100644 --- a/service/devicefarm/api_op_PurchaseOffering.go +++ b/service/devicefarm/api_op_PurchaseOffering.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPurchaseOfferingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_RenewOffering.go b/service/devicefarm/api_op_RenewOffering.go index a5b5b52635a..60b0fc14bc6 100644 --- a/service/devicefarm/api_op_RenewOffering.go +++ b/service/devicefarm/api_op_RenewOffering.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRenewOfferingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRenewOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_ScheduleRun.go b/service/devicefarm/api_op_ScheduleRun.go index fab23246e84..d4c0ae84906 100644 --- a/service/devicefarm/api_op_ScheduleRun.go +++ b/service/devicefarm/api_op_ScheduleRun.go @@ -135,6 +135,9 @@ func (c *Client) addOperationScheduleRunMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpScheduleRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_StopJob.go b/service/devicefarm/api_op_StopJob.go index 8c5b1bab581..81172969604 100644 --- a/service/devicefarm/api_op_StopJob.go +++ b/service/devicefarm/api_op_StopJob.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStopJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_StopRemoteAccessSession.go b/service/devicefarm/api_op_StopRemoteAccessSession.go index fbdc7d5b7d1..8959d562c92 100644 --- a/service/devicefarm/api_op_StopRemoteAccessSession.go +++ b/service/devicefarm/api_op_StopRemoteAccessSession.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStopRemoteAccessSessionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopRemoteAccessSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_StopRun.go b/service/devicefarm/api_op_StopRun.go index 2aad61f5c2a..212c10cc0cd 100644 --- a/service/devicefarm/api_op_StopRun.go +++ b/service/devicefarm/api_op_StopRun.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStopRunMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_TagResource.go b/service/devicefarm/api_op_TagResource.go index 319f4de7a26..82ffa59deb8 100644 --- a/service/devicefarm/api_op_TagResource.go +++ b/service/devicefarm/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UntagResource.go b/service/devicefarm/api_op_UntagResource.go index aa852756098..3fa062b0d45 100644 --- a/service/devicefarm/api_op_UntagResource.go +++ b/service/devicefarm/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateDeviceInstance.go b/service/devicefarm/api_op_UpdateDeviceInstance.go index ad7a79b1ee1..d0f417b04d2 100644 --- a/service/devicefarm/api_op_UpdateDeviceInstance.go +++ b/service/devicefarm/api_op_UpdateDeviceInstance.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDeviceInstanceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateDevicePool.go b/service/devicefarm/api_op_UpdateDevicePool.go index 2e4399ca517..69c0170c88d 100644 --- a/service/devicefarm/api_op_UpdateDevicePool.go +++ b/service/devicefarm/api_op_UpdateDevicePool.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateDevicePoolMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDevicePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateInstanceProfile.go b/service/devicefarm/api_op_UpdateInstanceProfile.go index 0dc5e38a255..1f34a4f5041 100644 --- a/service/devicefarm/api_op_UpdateInstanceProfile.go +++ b/service/devicefarm/api_op_UpdateInstanceProfile.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateNetworkProfile.go b/service/devicefarm/api_op_UpdateNetworkProfile.go index a69c4dc58bc..0cd2adf8083 100644 --- a/service/devicefarm/api_op_UpdateNetworkProfile.go +++ b/service/devicefarm/api_op_UpdateNetworkProfile.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateNetworkProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNetworkProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateProject.go b/service/devicefarm/api_op_UpdateProject.go index 7938cac8819..b8868090218 100644 --- a/service/devicefarm/api_op_UpdateProject.go +++ b/service/devicefarm/api_op_UpdateProject.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateTestGridProject.go b/service/devicefarm/api_op_UpdateTestGridProject.go index 0b20106eefa..6bd498eee67 100644 --- a/service/devicefarm/api_op_UpdateTestGridProject.go +++ b/service/devicefarm/api_op_UpdateTestGridProject.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateTestGridProjectMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTestGridProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateUpload.go b/service/devicefarm/api_op_UpdateUpload.go index 0d13021d3be..76efeafa4ac 100644 --- a/service/devicefarm/api_op_UpdateUpload.go +++ b/service/devicefarm/api_op_UpdateUpload.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateUploadMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/devicefarm/api_op_UpdateVPCEConfiguration.go b/service/devicefarm/api_op_UpdateVPCEConfiguration.go index 80a2aca3957..e6bd800d1f1 100644 --- a/service/devicefarm/api_op_UpdateVPCEConfiguration.go +++ b/service/devicefarm/api_op_UpdateVPCEConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateVPCEConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVPCEConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_client.go b/service/devopsguru/api_client.go index aa07eb3f72c..bafe7263b7f 100644 --- a/service/devopsguru/api_client.go +++ b/service/devopsguru/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/devopsguru/api_op_AddNotificationChannel.go b/service/devopsguru/api_op_AddNotificationChannel.go index 181b11504ff..4467f9c08a2 100644 --- a/service/devopsguru/api_op_AddNotificationChannel.go +++ b/service/devopsguru/api_op_AddNotificationChannel.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAddNotificationChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddNotificationChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_DeleteInsight.go b/service/devopsguru/api_op_DeleteInsight.go index 705f81fac76..6f14e67ee3c 100644 --- a/service/devopsguru/api_op_DeleteInsight.go +++ b/service/devopsguru/api_op_DeleteInsight.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteInsightMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeAccountHealth.go b/service/devopsguru/api_op_DescribeAccountHealth.go index 2a7335f28bc..6821a46f049 100644 --- a/service/devopsguru/api_op_DescribeAccountHealth.go +++ b/service/devopsguru/api_op_DescribeAccountHealth.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeAccountHealthMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountHealth(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeAccountOverview.go b/service/devopsguru/api_op_DescribeAccountOverview.go index 910abd8edf9..ecc8c42ce83 100644 --- a/service/devopsguru/api_op_DescribeAccountOverview.go +++ b/service/devopsguru/api_op_DescribeAccountOverview.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeAccountOverviewMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountOverviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeAnomaly.go b/service/devopsguru/api_op_DescribeAnomaly.go index 3814ae2d030..e79bb1fa242 100644 --- a/service/devopsguru/api_op_DescribeAnomaly.go +++ b/service/devopsguru/api_op_DescribeAnomaly.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeAnomalyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnomalyValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeEventSourcesConfig.go b/service/devopsguru/api_op_DescribeEventSourcesConfig.go index b2a91f7610a..0afca3db6dd 100644 --- a/service/devopsguru/api_op_DescribeEventSourcesConfig.go +++ b/service/devopsguru/api_op_DescribeEventSourcesConfig.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeEventSourcesConfigMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventSourcesConfig(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeFeedback.go b/service/devopsguru/api_op_DescribeFeedback.go index 6c2336cad41..1c177971036 100644 --- a/service/devopsguru/api_op_DescribeFeedback.go +++ b/service/devopsguru/api_op_DescribeFeedback.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeFeedbackMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFeedback(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeInsight.go b/service/devopsguru/api_op_DescribeInsight.go index 31728da6979..c3112bf8bf4 100644 --- a/service/devopsguru/api_op_DescribeInsight.go +++ b/service/devopsguru/api_op_DescribeInsight.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeInsightMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeOrganizationHealth.go b/service/devopsguru/api_op_DescribeOrganizationHealth.go index b93afdf355e..98087d5ecd2 100644 --- a/service/devopsguru/api_op_DescribeOrganizationHealth.go +++ b/service/devopsguru/api_op_DescribeOrganizationHealth.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeOrganizationHealthMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationHealth(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeOrganizationOverview.go b/service/devopsguru/api_op_DescribeOrganizationOverview.go index 8ef5a1238d4..296a2513869 100644 --- a/service/devopsguru/api_op_DescribeOrganizationOverview.go +++ b/service/devopsguru/api_op_DescribeOrganizationOverview.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeOrganizationOverviewMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationOverviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go b/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go index 235126e6d84..7ee297dc85c 100644 --- a/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go +++ b/service/devopsguru/api_op_DescribeOrganizationResourceCollectionHealth.go @@ -171,6 +171,9 @@ func (c *Client) addOperationDescribeOrganizationResourceCollectionHealthMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationResourceCollectionHealthValidationMiddleware(stack); err != nil { return err } @@ -195,14 +198,6 @@ func (c *Client) addOperationDescribeOrganizationResourceCollectionHealthMiddlew return nil } -// DescribeOrganizationResourceCollectionHealthAPIClient is a client that -// implements the DescribeOrganizationResourceCollectionHealth operation. -type DescribeOrganizationResourceCollectionHealthAPIClient interface { - DescribeOrganizationResourceCollectionHealth(context.Context, *DescribeOrganizationResourceCollectionHealthInput, ...func(*Options)) (*DescribeOrganizationResourceCollectionHealthOutput, error) -} - -var _ DescribeOrganizationResourceCollectionHealthAPIClient = (*Client)(nil) - // DescribeOrganizationResourceCollectionHealthPaginatorOptions is the paginator // options for DescribeOrganizationResourceCollectionHealth type DescribeOrganizationResourceCollectionHealthPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *DescribeOrganizationResourceCollectionHealthPaginator) NextPage(ctx con params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrganizationResourceCollectionHealth(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *DescribeOrganizationResourceCollectionHealthPaginator) NextPage(ctx con return result, nil } +// DescribeOrganizationResourceCollectionHealthAPIClient is a client that +// implements the DescribeOrganizationResourceCollectionHealth operation. +type DescribeOrganizationResourceCollectionHealthAPIClient interface { + DescribeOrganizationResourceCollectionHealth(context.Context, *DescribeOrganizationResourceCollectionHealthInput, ...func(*Options)) (*DescribeOrganizationResourceCollectionHealthOutput, error) +} + +var _ DescribeOrganizationResourceCollectionHealthAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrganizationResourceCollectionHealth(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_DescribeResourceCollectionHealth.go b/service/devopsguru/api_op_DescribeResourceCollectionHealth.go index b1f2fdf7e25..293af2fef2b 100644 --- a/service/devopsguru/api_op_DescribeResourceCollectionHealth.go +++ b/service/devopsguru/api_op_DescribeResourceCollectionHealth.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDescribeResourceCollectionHealthMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourceCollectionHealthValidationMiddleware(stack); err != nil { return err } @@ -192,14 +195,6 @@ func (c *Client) addOperationDescribeResourceCollectionHealthMiddlewares(stack * return nil } -// DescribeResourceCollectionHealthAPIClient is a client that implements the -// DescribeResourceCollectionHealth operation. -type DescribeResourceCollectionHealthAPIClient interface { - DescribeResourceCollectionHealth(context.Context, *DescribeResourceCollectionHealthInput, ...func(*Options)) (*DescribeResourceCollectionHealthOutput, error) -} - -var _ DescribeResourceCollectionHealthAPIClient = (*Client)(nil) - // DescribeResourceCollectionHealthPaginatorOptions is the paginator options for // DescribeResourceCollectionHealth type DescribeResourceCollectionHealthPaginatorOptions struct { @@ -254,6 +249,9 @@ func (p *DescribeResourceCollectionHealthPaginator) NextPage(ctx context.Context params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeResourceCollectionHealth(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +271,14 @@ func (p *DescribeResourceCollectionHealthPaginator) NextPage(ctx context.Context return result, nil } +// DescribeResourceCollectionHealthAPIClient is a client that implements the +// DescribeResourceCollectionHealth operation. +type DescribeResourceCollectionHealthAPIClient interface { + DescribeResourceCollectionHealth(context.Context, *DescribeResourceCollectionHealthInput, ...func(*Options)) (*DescribeResourceCollectionHealthOutput, error) +} + +var _ DescribeResourceCollectionHealthAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeResourceCollectionHealth(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_DescribeServiceIntegration.go b/service/devopsguru/api_op_DescribeServiceIntegration.go index f6e1a10e63e..0e5e4d3e1a0 100644 --- a/service/devopsguru/api_op_DescribeServiceIntegration.go +++ b/service/devopsguru/api_op_DescribeServiceIntegration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeServiceIntegrationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServiceIntegration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_GetCostEstimation.go b/service/devopsguru/api_op_GetCostEstimation.go index 7c7bf8168f5..83a4f06e458 100644 --- a/service/devopsguru/api_op_GetCostEstimation.go +++ b/service/devopsguru/api_op_GetCostEstimation.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetCostEstimationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCostEstimation(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetCostEstimationMiddlewares(stack *middleware.Stac return nil } -// GetCostEstimationAPIClient is a client that implements the GetCostEstimation -// operation. -type GetCostEstimationAPIClient interface { - GetCostEstimation(context.Context, *GetCostEstimationInput, ...func(*Options)) (*GetCostEstimationOutput, error) -} - -var _ GetCostEstimationAPIClient = (*Client)(nil) - // GetCostEstimationPaginatorOptions is the paginator options for GetCostEstimation type GetCostEstimationPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -210,6 +205,9 @@ func (p *GetCostEstimationPaginator) NextPage(ctx context.Context, optFns ...fun params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCostEstimation(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *GetCostEstimationPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetCostEstimationAPIClient is a client that implements the GetCostEstimation +// operation. +type GetCostEstimationAPIClient interface { + GetCostEstimation(context.Context, *GetCostEstimationInput, ...func(*Options)) (*GetCostEstimationOutput, error) +} + +var _ GetCostEstimationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCostEstimation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_GetResourceCollection.go b/service/devopsguru/api_op_GetResourceCollection.go index 00a3076c29a..68a250376b4 100644 --- a/service/devopsguru/api_op_GetResourceCollection.go +++ b/service/devopsguru/api_op_GetResourceCollection.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetResourceCollectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceCollectionValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationGetResourceCollectionMiddlewares(stack *middleware. return nil } -// GetResourceCollectionAPIClient is a client that implements the -// GetResourceCollection operation. -type GetResourceCollectionAPIClient interface { - GetResourceCollection(context.Context, *GetResourceCollectionInput, ...func(*Options)) (*GetResourceCollectionOutput, error) -} - -var _ GetResourceCollectionAPIClient = (*Client)(nil) - // GetResourceCollectionPaginatorOptions is the paginator options for // GetResourceCollection type GetResourceCollectionPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *GetResourceCollectionPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourceCollection(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *GetResourceCollectionPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// GetResourceCollectionAPIClient is a client that implements the +// GetResourceCollection operation. +type GetResourceCollectionAPIClient interface { + GetResourceCollection(context.Context, *GetResourceCollectionInput, ...func(*Options)) (*GetResourceCollectionOutput, error) +} + +var _ GetResourceCollectionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceCollection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListAnomaliesForInsight.go b/service/devopsguru/api_op_ListAnomaliesForInsight.go index 968248f3ee9..72c6d5f0682 100644 --- a/service/devopsguru/api_op_ListAnomaliesForInsight.go +++ b/service/devopsguru/api_op_ListAnomaliesForInsight.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListAnomaliesForInsightMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnomaliesForInsightValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListAnomaliesForInsightMiddlewares(stack *middlewar return nil } -// ListAnomaliesForInsightAPIClient is a client that implements the -// ListAnomaliesForInsight operation. -type ListAnomaliesForInsightAPIClient interface { - ListAnomaliesForInsight(context.Context, *ListAnomaliesForInsightInput, ...func(*Options)) (*ListAnomaliesForInsightOutput, error) -} - -var _ ListAnomaliesForInsightAPIClient = (*Client)(nil) - // ListAnomaliesForInsightPaginatorOptions is the paginator options for // ListAnomaliesForInsight type ListAnomaliesForInsightPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListAnomaliesForInsightPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomaliesForInsight(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListAnomaliesForInsightPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAnomaliesForInsightAPIClient is a client that implements the +// ListAnomaliesForInsight operation. +type ListAnomaliesForInsightAPIClient interface { + ListAnomaliesForInsight(context.Context, *ListAnomaliesForInsightInput, ...func(*Options)) (*ListAnomaliesForInsightOutput, error) +} + +var _ ListAnomaliesForInsightAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomaliesForInsight(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListAnomalousLogGroups.go b/service/devopsguru/api_op_ListAnomalousLogGroups.go index aff28c083ac..c58d10bda42 100644 --- a/service/devopsguru/api_op_ListAnomalousLogGroups.go +++ b/service/devopsguru/api_op_ListAnomalousLogGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAnomalousLogGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnomalousLogGroupsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListAnomalousLogGroupsMiddlewares(stack *middleware return nil } -// ListAnomalousLogGroupsAPIClient is a client that implements the -// ListAnomalousLogGroups operation. -type ListAnomalousLogGroupsAPIClient interface { - ListAnomalousLogGroups(context.Context, *ListAnomalousLogGroupsInput, ...func(*Options)) (*ListAnomalousLogGroupsOutput, error) -} - -var _ ListAnomalousLogGroupsAPIClient = (*Client)(nil) - // ListAnomalousLogGroupsPaginatorOptions is the paginator options for // ListAnomalousLogGroups type ListAnomalousLogGroupsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListAnomalousLogGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomalousLogGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListAnomalousLogGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAnomalousLogGroupsAPIClient is a client that implements the +// ListAnomalousLogGroups operation. +type ListAnomalousLogGroupsAPIClient interface { + ListAnomalousLogGroups(context.Context, *ListAnomalousLogGroupsInput, ...func(*Options)) (*ListAnomalousLogGroupsOutput, error) +} + +var _ ListAnomalousLogGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomalousLogGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListEvents.go b/service/devopsguru/api_op_ListEvents.go index f2f1e098074..d926326c941 100644 --- a/service/devopsguru/api_op_ListEvents.go +++ b/service/devopsguru/api_op_ListEvents.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListEventsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventsValidationMiddleware(stack); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListEventsMiddlewares(stack *middleware.Stack, opti return nil } -// ListEventsAPIClient is a client that implements the ListEvents operation. -type ListEventsAPIClient interface { - ListEvents(context.Context, *ListEventsInput, ...func(*Options)) (*ListEventsOutput, error) -} - -var _ ListEventsAPIClient = (*Client)(nil) - // ListEventsPaginatorOptions is the paginator options for ListEvents type ListEventsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -220,6 +216,9 @@ func (p *ListEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListEventsAPIClient is a client that implements the ListEvents operation. +type ListEventsAPIClient interface { + ListEvents(context.Context, *ListEventsInput, ...func(*Options)) (*ListEventsOutput, error) +} + +var _ ListEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListInsights.go b/service/devopsguru/api_op_ListInsights.go index 31b58e2c01b..c21a107fe2f 100644 --- a/service/devopsguru/api_op_ListInsights.go +++ b/service/devopsguru/api_op_ListInsights.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListInsightsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInsightsValidationMiddleware(stack); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListInsightsMiddlewares(stack *middleware.Stack, op return nil } -// ListInsightsAPIClient is a client that implements the ListInsights operation. -type ListInsightsAPIClient interface { - ListInsights(context.Context, *ListInsightsInput, ...func(*Options)) (*ListInsightsOutput, error) -} - -var _ ListInsightsAPIClient = (*Client)(nil) - // ListInsightsPaginatorOptions is the paginator options for ListInsights type ListInsightsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -220,6 +216,9 @@ func (p *ListInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListInsightsAPIClient is a client that implements the ListInsights operation. +type ListInsightsAPIClient interface { + ListInsights(context.Context, *ListInsightsInput, ...func(*Options)) (*ListInsightsOutput, error) +} + +var _ ListInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListMonitoredResources.go b/service/devopsguru/api_op_ListMonitoredResources.go index ca633921009..c33e0abdd35 100644 --- a/service/devopsguru/api_op_ListMonitoredResources.go +++ b/service/devopsguru/api_op_ListMonitoredResources.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListMonitoredResourcesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMonitoredResourcesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListMonitoredResourcesMiddlewares(stack *middleware return nil } -// ListMonitoredResourcesAPIClient is a client that implements the -// ListMonitoredResources operation. -type ListMonitoredResourcesAPIClient interface { - ListMonitoredResources(context.Context, *ListMonitoredResourcesInput, ...func(*Options)) (*ListMonitoredResourcesOutput, error) -} - -var _ ListMonitoredResourcesAPIClient = (*Client)(nil) - // ListMonitoredResourcesPaginatorOptions is the paginator options for // ListMonitoredResources type ListMonitoredResourcesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListMonitoredResourcesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitoredResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListMonitoredResourcesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListMonitoredResourcesAPIClient is a client that implements the +// ListMonitoredResources operation. +type ListMonitoredResourcesAPIClient interface { + ListMonitoredResources(context.Context, *ListMonitoredResourcesInput, ...func(*Options)) (*ListMonitoredResourcesOutput, error) +} + +var _ ListMonitoredResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitoredResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListNotificationChannels.go b/service/devopsguru/api_op_ListNotificationChannels.go index bcee80bcbb5..a217491e8f0 100644 --- a/service/devopsguru/api_op_ListNotificationChannels.go +++ b/service/devopsguru/api_op_ListNotificationChannels.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListNotificationChannelsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNotificationChannels(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListNotificationChannelsMiddlewares(stack *middlewa return nil } -// ListNotificationChannelsAPIClient is a client that implements the -// ListNotificationChannels operation. -type ListNotificationChannelsAPIClient interface { - ListNotificationChannels(context.Context, *ListNotificationChannelsInput, ...func(*Options)) (*ListNotificationChannelsOutput, error) -} - -var _ ListNotificationChannelsAPIClient = (*Client)(nil) - // ListNotificationChannelsPaginatorOptions is the paginator options for // ListNotificationChannels type ListNotificationChannelsPaginatorOptions struct { @@ -196,6 +191,9 @@ func (p *ListNotificationChannelsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotificationChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -215,6 +213,14 @@ func (p *ListNotificationChannelsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListNotificationChannelsAPIClient is a client that implements the +// ListNotificationChannels operation. +type ListNotificationChannelsAPIClient interface { + ListNotificationChannels(context.Context, *ListNotificationChannelsInput, ...func(*Options)) (*ListNotificationChannelsOutput, error) +} + +var _ ListNotificationChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotificationChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListOrganizationInsights.go b/service/devopsguru/api_op_ListOrganizationInsights.go index 9dff51bed2c..1db049aae7d 100644 --- a/service/devopsguru/api_op_ListOrganizationInsights.go +++ b/service/devopsguru/api_op_ListOrganizationInsights.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListOrganizationInsightsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrganizationInsightsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListOrganizationInsightsMiddlewares(stack *middlewa return nil } -// ListOrganizationInsightsAPIClient is a client that implements the -// ListOrganizationInsights operation. -type ListOrganizationInsightsAPIClient interface { - ListOrganizationInsights(context.Context, *ListOrganizationInsightsInput, ...func(*Options)) (*ListOrganizationInsightsOutput, error) -} - -var _ ListOrganizationInsightsAPIClient = (*Client)(nil) - // ListOrganizationInsightsPaginatorOptions is the paginator options for // ListOrganizationInsights type ListOrganizationInsightsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListOrganizationInsightsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListOrganizationInsightsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListOrganizationInsightsAPIClient is a client that implements the +// ListOrganizationInsights operation. +type ListOrganizationInsightsAPIClient interface { + ListOrganizationInsights(context.Context, *ListOrganizationInsightsInput, ...func(*Options)) (*ListOrganizationInsightsOutput, error) +} + +var _ ListOrganizationInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_ListRecommendations.go b/service/devopsguru/api_op_ListRecommendations.go index f7628a5ad2c..bd37d4beb38 100644 --- a/service/devopsguru/api_op_ListRecommendations.go +++ b/service/devopsguru/api_op_ListRecommendations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St return nil } -// ListRecommendationsAPIClient is a client that implements the -// ListRecommendations operation. -type ListRecommendationsAPIClient interface { - ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) -} - -var _ ListRecommendationsAPIClient = (*Client)(nil) - // ListRecommendationsPaginatorOptions is the paginator options for // ListRecommendations type ListRecommendationsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRecommendationsAPIClient is a client that implements the +// ListRecommendations operation. +type ListRecommendationsAPIClient interface { + ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) +} + +var _ ListRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_PutFeedback.go b/service/devopsguru/api_op_PutFeedback.go index d50eef5e666..10564c588aa 100644 --- a/service/devopsguru/api_op_PutFeedback.go +++ b/service/devopsguru/api_op_PutFeedback.go @@ -100,6 +100,9 @@ func (c *Client) addOperationPutFeedbackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFeedback(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_RemoveNotificationChannel.go b/service/devopsguru/api_op_RemoveNotificationChannel.go index fd7f7961b46..bda786c7808 100644 --- a/service/devopsguru/api_op_RemoveNotificationChannel.go +++ b/service/devopsguru/api_op_RemoveNotificationChannel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationRemoveNotificationChannelMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveNotificationChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_SearchInsights.go b/service/devopsguru/api_op_SearchInsights.go index 13cd6a0347f..0d2c6801e93 100644 --- a/service/devopsguru/api_op_SearchInsights.go +++ b/service/devopsguru/api_op_SearchInsights.go @@ -138,6 +138,9 @@ func (c *Client) addOperationSearchInsightsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchInsightsValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationSearchInsightsMiddlewares(stack *middleware.Stack, return nil } -// SearchInsightsAPIClient is a client that implements the SearchInsights -// operation. -type SearchInsightsAPIClient interface { - SearchInsights(context.Context, *SearchInsightsInput, ...func(*Options)) (*SearchInsightsOutput, error) -} - -var _ SearchInsightsAPIClient = (*Client)(nil) - // SearchInsightsPaginatorOptions is the paginator options for SearchInsights type SearchInsightsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -234,6 +229,9 @@ func (p *SearchInsightsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *SearchInsightsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchInsightsAPIClient is a client that implements the SearchInsights +// operation. +type SearchInsightsAPIClient interface { + SearchInsights(context.Context, *SearchInsightsInput, ...func(*Options)) (*SearchInsightsOutput, error) +} + +var _ SearchInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_SearchOrganizationInsights.go b/service/devopsguru/api_op_SearchOrganizationInsights.go index d5db1f646f4..8379c70687d 100644 --- a/service/devopsguru/api_op_SearchOrganizationInsights.go +++ b/service/devopsguru/api_op_SearchOrganizationInsights.go @@ -145,6 +145,9 @@ func (c *Client) addOperationSearchOrganizationInsightsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchOrganizationInsightsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationSearchOrganizationInsightsMiddlewares(stack *middle return nil } -// SearchOrganizationInsightsAPIClient is a client that implements the -// SearchOrganizationInsights operation. -type SearchOrganizationInsightsAPIClient interface { - SearchOrganizationInsights(context.Context, *SearchOrganizationInsightsInput, ...func(*Options)) (*SearchOrganizationInsightsOutput, error) -} - -var _ SearchOrganizationInsightsAPIClient = (*Client)(nil) - // SearchOrganizationInsightsPaginatorOptions is the paginator options for // SearchOrganizationInsights type SearchOrganizationInsightsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *SearchOrganizationInsightsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchOrganizationInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *SearchOrganizationInsightsPaginator) NextPage(ctx context.Context, optF return result, nil } +// SearchOrganizationInsightsAPIClient is a client that implements the +// SearchOrganizationInsights operation. +type SearchOrganizationInsightsAPIClient interface { + SearchOrganizationInsights(context.Context, *SearchOrganizationInsightsInput, ...func(*Options)) (*SearchOrganizationInsightsOutput, error) +} + +var _ SearchOrganizationInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchOrganizationInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/devopsguru/api_op_StartCostEstimation.go b/service/devopsguru/api_op_StartCostEstimation.go index 92e90b48610..4a23b22e4b0 100644 --- a/service/devopsguru/api_op_StartCostEstimation.go +++ b/service/devopsguru/api_op_StartCostEstimation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartCostEstimationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartCostEstimationMiddleware(stack, options); err != nil { return err } diff --git a/service/devopsguru/api_op_UpdateEventSourcesConfig.go b/service/devopsguru/api_op_UpdateEventSourcesConfig.go index 2ed1ae47bfe..086333e8dea 100644 --- a/service/devopsguru/api_op_UpdateEventSourcesConfig.go +++ b/service/devopsguru/api_op_UpdateEventSourcesConfig.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateEventSourcesConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventSourcesConfig(options.Region), middleware.Before); err != nil { return err } diff --git a/service/devopsguru/api_op_UpdateResourceCollection.go b/service/devopsguru/api_op_UpdateResourceCollection.go index 103ef6e5aba..21870122a1c 100644 --- a/service/devopsguru/api_op_UpdateResourceCollection.go +++ b/service/devopsguru/api_op_UpdateResourceCollection.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateResourceCollectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/devopsguru/api_op_UpdateServiceIntegration.go b/service/devopsguru/api_op_UpdateServiceIntegration.go index 866429cf280..342aa1a1a4d 100644 --- a/service/devopsguru/api_op_UpdateServiceIntegration.go +++ b/service/devopsguru/api_op_UpdateServiceIntegration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateServiceIntegrationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_client.go b/service/directconnect/api_client.go index ce63c9838b5..1ddaaa04fde 100644 --- a/service/directconnect/api_client.go +++ b/service/directconnect/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/directconnect/api_op_AcceptDirectConnectGatewayAssociationProposal.go b/service/directconnect/api_op_AcceptDirectConnectGatewayAssociationProposal.go index a9678f14906..63b22f9acc1 100644 --- a/service/directconnect/api_op_AcceptDirectConnectGatewayAssociationProposal.go +++ b/service/directconnect/api_op_AcceptDirectConnectGatewayAssociationProposal.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAcceptDirectConnectGatewayAssociationProposalMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptDirectConnectGatewayAssociationProposalValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AllocateConnectionOnInterconnect.go b/service/directconnect/api_op_AllocateConnectionOnInterconnect.go index 27198df0f05..fb3e1b92799 100644 --- a/service/directconnect/api_op_AllocateConnectionOnInterconnect.go +++ b/service/directconnect/api_op_AllocateConnectionOnInterconnect.go @@ -236,6 +236,9 @@ func (c *Client) addOperationAllocateConnectionOnInterconnectMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocateConnectionOnInterconnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AllocateHostedConnection.go b/service/directconnect/api_op_AllocateHostedConnection.go index 720cf5d15aa..c3bb17cbacd 100644 --- a/service/directconnect/api_op_AllocateHostedConnection.go +++ b/service/directconnect/api_op_AllocateHostedConnection.go @@ -238,6 +238,9 @@ func (c *Client) addOperationAllocateHostedConnectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocateHostedConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AllocatePrivateVirtualInterface.go b/service/directconnect/api_op_AllocatePrivateVirtualInterface.go index cf9603c3ebc..99ffff59e94 100644 --- a/service/directconnect/api_op_AllocatePrivateVirtualInterface.go +++ b/service/directconnect/api_op_AllocatePrivateVirtualInterface.go @@ -236,6 +236,9 @@ func (c *Client) addOperationAllocatePrivateVirtualInterfaceMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocatePrivateVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AllocatePublicVirtualInterface.go b/service/directconnect/api_op_AllocatePublicVirtualInterface.go index 264de0661cd..df0335d61c2 100644 --- a/service/directconnect/api_op_AllocatePublicVirtualInterface.go +++ b/service/directconnect/api_op_AllocatePublicVirtualInterface.go @@ -243,6 +243,9 @@ func (c *Client) addOperationAllocatePublicVirtualInterfaceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocatePublicVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AllocateTransitVirtualInterface.go b/service/directconnect/api_op_AllocateTransitVirtualInterface.go index ae76485f20e..7e28bae2503 100644 --- a/service/directconnect/api_op_AllocateTransitVirtualInterface.go +++ b/service/directconnect/api_op_AllocateTransitVirtualInterface.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAllocateTransitVirtualInterfaceMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocateTransitVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AssociateConnectionWithLag.go b/service/directconnect/api_op_AssociateConnectionWithLag.go index 1e9563a7594..a75f1ffda15 100644 --- a/service/directconnect/api_op_AssociateConnectionWithLag.go +++ b/service/directconnect/api_op_AssociateConnectionWithLag.go @@ -224,6 +224,9 @@ func (c *Client) addOperationAssociateConnectionWithLagMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateConnectionWithLagValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AssociateHostedConnection.go b/service/directconnect/api_op_AssociateHostedConnection.go index 75c67f7467f..46d663bf3f0 100644 --- a/service/directconnect/api_op_AssociateHostedConnection.go +++ b/service/directconnect/api_op_AssociateHostedConnection.go @@ -214,6 +214,9 @@ func (c *Client) addOperationAssociateHostedConnectionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateHostedConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AssociateMacSecKey.go b/service/directconnect/api_op_AssociateMacSecKey.go index 3da3949beb8..06d21230bf5 100644 --- a/service/directconnect/api_op_AssociateMacSecKey.go +++ b/service/directconnect/api_op_AssociateMacSecKey.go @@ -152,6 +152,9 @@ func (c *Client) addOperationAssociateMacSecKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateMacSecKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_AssociateVirtualInterface.go b/service/directconnect/api_op_AssociateVirtualInterface.go index e84e89577fe..74285893ab0 100644 --- a/service/directconnect/api_op_AssociateVirtualInterface.go +++ b/service/directconnect/api_op_AssociateVirtualInterface.go @@ -238,6 +238,9 @@ func (c *Client) addOperationAssociateVirtualInterfaceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_ConfirmConnection.go b/service/directconnect/api_op_ConfirmConnection.go index 9c4a7d3bafa..bd42613d1a0 100644 --- a/service/directconnect/api_op_ConfirmConnection.go +++ b/service/directconnect/api_op_ConfirmConnection.go @@ -133,6 +133,9 @@ func (c *Client) addOperationConfirmConnectionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_ConfirmCustomerAgreement.go b/service/directconnect/api_op_ConfirmCustomerAgreement.go index 708aeac8eed..4ebb9bde220 100644 --- a/service/directconnect/api_op_ConfirmCustomerAgreement.go +++ b/service/directconnect/api_op_ConfirmCustomerAgreement.go @@ -106,6 +106,9 @@ func (c *Client) addOperationConfirmCustomerAgreementMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConfirmCustomerAgreement(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_ConfirmPrivateVirtualInterface.go b/service/directconnect/api_op_ConfirmPrivateVirtualInterface.go index a989a23338f..318b0919f19 100644 --- a/service/directconnect/api_op_ConfirmPrivateVirtualInterface.go +++ b/service/directconnect/api_op_ConfirmPrivateVirtualInterface.go @@ -145,6 +145,9 @@ func (c *Client) addOperationConfirmPrivateVirtualInterfaceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmPrivateVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_ConfirmPublicVirtualInterface.go b/service/directconnect/api_op_ConfirmPublicVirtualInterface.go index 3ec5aab8003..30c70ed8583 100644 --- a/service/directconnect/api_op_ConfirmPublicVirtualInterface.go +++ b/service/directconnect/api_op_ConfirmPublicVirtualInterface.go @@ -138,6 +138,9 @@ func (c *Client) addOperationConfirmPublicVirtualInterfaceMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmPublicVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_ConfirmTransitVirtualInterface.go b/service/directconnect/api_op_ConfirmTransitVirtualInterface.go index 2043d2219b5..64289102765 100644 --- a/service/directconnect/api_op_ConfirmTransitVirtualInterface.go +++ b/service/directconnect/api_op_ConfirmTransitVirtualInterface.go @@ -143,6 +143,9 @@ func (c *Client) addOperationConfirmTransitVirtualInterfaceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmTransitVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateBGPPeer.go b/service/directconnect/api_op_CreateBGPPeer.go index b8cfe0dceab..e74e8a3bb18 100644 --- a/service/directconnect/api_op_CreateBGPPeer.go +++ b/service/directconnect/api_op_CreateBGPPeer.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateBGPPeerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBGPPeer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_CreateConnection.go b/service/directconnect/api_op_CreateConnection.go index ecf0ef0e61a..96f4035d3d1 100644 --- a/service/directconnect/api_op_CreateConnection.go +++ b/service/directconnect/api_op_CreateConnection.go @@ -244,6 +244,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateDirectConnectGateway.go b/service/directconnect/api_op_CreateDirectConnectGateway.go index f584c0f1a8b..ad76385cd38 100644 --- a/service/directconnect/api_op_CreateDirectConnectGateway.go +++ b/service/directconnect/api_op_CreateDirectConnectGateway.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateDirectConnectGatewayMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDirectConnectGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateDirectConnectGatewayAssociation.go b/service/directconnect/api_op_CreateDirectConnectGatewayAssociation.go index b8780bd0bdf..b269009fa0e 100644 --- a/service/directconnect/api_op_CreateDirectConnectGatewayAssociation.go +++ b/service/directconnect/api_op_CreateDirectConnectGatewayAssociation.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateDirectConnectGatewayAssociationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDirectConnectGatewayAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateDirectConnectGatewayAssociationProposal.go b/service/directconnect/api_op_CreateDirectConnectGatewayAssociationProposal.go index e20e4764dca..e2a7887c169 100644 --- a/service/directconnect/api_op_CreateDirectConnectGatewayAssociationProposal.go +++ b/service/directconnect/api_op_CreateDirectConnectGatewayAssociationProposal.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateDirectConnectGatewayAssociationProposalMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDirectConnectGatewayAssociationProposalValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateInterconnect.go b/service/directconnect/api_op_CreateInterconnect.go index b24086ed36f..8de40461d4c 100644 --- a/service/directconnect/api_op_CreateInterconnect.go +++ b/service/directconnect/api_op_CreateInterconnect.go @@ -210,6 +210,9 @@ func (c *Client) addOperationCreateInterconnectMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInterconnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateLag.go b/service/directconnect/api_op_CreateLag.go index 2b1b82dc1d8..4abb72c82f7 100644 --- a/service/directconnect/api_op_CreateLag.go +++ b/service/directconnect/api_op_CreateLag.go @@ -254,6 +254,9 @@ func (c *Client) addOperationCreateLagMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLagValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreatePrivateVirtualInterface.go b/service/directconnect/api_op_CreatePrivateVirtualInterface.go index ff1ff97df3e..6b35b490eda 100644 --- a/service/directconnect/api_op_CreatePrivateVirtualInterface.go +++ b/service/directconnect/api_op_CreatePrivateVirtualInterface.go @@ -238,6 +238,9 @@ func (c *Client) addOperationCreatePrivateVirtualInterfaceMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePrivateVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreatePublicVirtualInterface.go b/service/directconnect/api_op_CreatePublicVirtualInterface.go index 074ea78597f..89646b6bb58 100644 --- a/service/directconnect/api_op_CreatePublicVirtualInterface.go +++ b/service/directconnect/api_op_CreatePublicVirtualInterface.go @@ -231,6 +231,9 @@ func (c *Client) addOperationCreatePublicVirtualInterfaceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePublicVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_CreateTransitVirtualInterface.go b/service/directconnect/api_op_CreateTransitVirtualInterface.go index ef33b813459..8cfe1b98ffb 100644 --- a/service/directconnect/api_op_CreateTransitVirtualInterface.go +++ b/service/directconnect/api_op_CreateTransitVirtualInterface.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateTransitVirtualInterfaceMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteBGPPeer.go b/service/directconnect/api_op_DeleteBGPPeer.go index c2d3538b867..e5ac02575df 100644 --- a/service/directconnect/api_op_DeleteBGPPeer.go +++ b/service/directconnect/api_op_DeleteBGPPeer.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteBGPPeerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBGPPeer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteConnection.go b/service/directconnect/api_op_DeleteConnection.go index bd8540006f8..2d20b5f69ce 100644 --- a/service/directconnect/api_op_DeleteConnection.go +++ b/service/directconnect/api_op_DeleteConnection.go @@ -207,6 +207,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteDirectConnectGateway.go b/service/directconnect/api_op_DeleteDirectConnectGateway.go index 319c33320fe..d9636dc746c 100644 --- a/service/directconnect/api_op_DeleteDirectConnectGateway.go +++ b/service/directconnect/api_op_DeleteDirectConnectGateway.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDirectConnectGatewayMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDirectConnectGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteDirectConnectGatewayAssociation.go b/service/directconnect/api_op_DeleteDirectConnectGatewayAssociation.go index 4f1e5328b4e..2fca331a539 100644 --- a/service/directconnect/api_op_DeleteDirectConnectGatewayAssociation.go +++ b/service/directconnect/api_op_DeleteDirectConnectGatewayAssociation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteDirectConnectGatewayAssociationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDirectConnectGatewayAssociation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteDirectConnectGatewayAssociationProposal.go b/service/directconnect/api_op_DeleteDirectConnectGatewayAssociationProposal.go index 8615afd4ea6..2753d645b4e 100644 --- a/service/directconnect/api_op_DeleteDirectConnectGatewayAssociationProposal.go +++ b/service/directconnect/api_op_DeleteDirectConnectGatewayAssociationProposal.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDirectConnectGatewayAssociationProposalMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDirectConnectGatewayAssociationProposalValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteInterconnect.go b/service/directconnect/api_op_DeleteInterconnect.go index 3a32cd2713b..40e8b203938 100644 --- a/service/directconnect/api_op_DeleteInterconnect.go +++ b/service/directconnect/api_op_DeleteInterconnect.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteInterconnectMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInterconnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteLag.go b/service/directconnect/api_op_DeleteLag.go index a9c98577f92..9eb1b2225a2 100644 --- a/service/directconnect/api_op_DeleteLag.go +++ b/service/directconnect/api_op_DeleteLag.go @@ -192,6 +192,9 @@ func (c *Client) addOperationDeleteLagMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLagValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DeleteVirtualInterface.go b/service/directconnect/api_op_DeleteVirtualInterface.go index 44aa3b6d02d..007d83589e3 100644 --- a/service/directconnect/api_op_DeleteVirtualInterface.go +++ b/service/directconnect/api_op_DeleteVirtualInterface.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteVirtualInterfaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeConnectionLoa.go b/service/directconnect/api_op_DescribeConnectionLoa.go index fa3c3c1e77e..93b0e00953b 100644 --- a/service/directconnect/api_op_DescribeConnectionLoa.go +++ b/service/directconnect/api_op_DescribeConnectionLoa.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeConnectionLoaMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectionLoaValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeConnections.go b/service/directconnect/api_op_DescribeConnections.go index df72b2b47df..3145a15c1c0 100644 --- a/service/directconnect/api_op_DescribeConnections.go +++ b/service/directconnect/api_op_DescribeConnections.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeConnectionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnections(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeConnectionsOnInterconnect.go b/service/directconnect/api_op_DescribeConnectionsOnInterconnect.go index 14548ce14c1..668512a3892 100644 --- a/service/directconnect/api_op_DescribeConnectionsOnInterconnect.go +++ b/service/directconnect/api_op_DescribeConnectionsOnInterconnect.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeConnectionsOnInterconnectMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectionsOnInterconnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeCustomerMetadata.go b/service/directconnect/api_op_DescribeCustomerMetadata.go index ec52e6064cc..3454a41df5c 100644 --- a/service/directconnect/api_op_DescribeCustomerMetadata.go +++ b/service/directconnect/api_op_DescribeCustomerMetadata.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeCustomerMetadataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomerMetadata(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeDirectConnectGatewayAssociationProposals.go b/service/directconnect/api_op_DescribeDirectConnectGatewayAssociationProposals.go index 75503239866..359ff1746f7 100644 --- a/service/directconnect/api_op_DescribeDirectConnectGatewayAssociationProposals.go +++ b/service/directconnect/api_op_DescribeDirectConnectGatewayAssociationProposals.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeDirectConnectGatewayAssociationProposalsMid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDirectConnectGatewayAssociationProposals(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeDirectConnectGatewayAssociations.go b/service/directconnect/api_op_DescribeDirectConnectGatewayAssociations.go index 8ab5c39e063..f13bd0ab66b 100644 --- a/service/directconnect/api_op_DescribeDirectConnectGatewayAssociations.go +++ b/service/directconnect/api_op_DescribeDirectConnectGatewayAssociations.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeDirectConnectGatewayAssociationsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDirectConnectGatewayAssociations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeDirectConnectGatewayAttachments.go b/service/directconnect/api_op_DescribeDirectConnectGatewayAttachments.go index e3d41020e8a..be0add618eb 100644 --- a/service/directconnect/api_op_DescribeDirectConnectGatewayAttachments.go +++ b/service/directconnect/api_op_DescribeDirectConnectGatewayAttachments.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDirectConnectGatewayAttachmentsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDirectConnectGatewayAttachments(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeDirectConnectGateways.go b/service/directconnect/api_op_DescribeDirectConnectGateways.go index 22d4a057dd4..97897edc39d 100644 --- a/service/directconnect/api_op_DescribeDirectConnectGateways.go +++ b/service/directconnect/api_op_DescribeDirectConnectGateways.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeDirectConnectGatewaysMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDirectConnectGateways(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeHostedConnections.go b/service/directconnect/api_op_DescribeHostedConnections.go index 63af56b9c33..9383ddf91c0 100644 --- a/service/directconnect/api_op_DescribeHostedConnections.go +++ b/service/directconnect/api_op_DescribeHostedConnections.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeHostedConnectionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHostedConnectionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeInterconnectLoa.go b/service/directconnect/api_op_DescribeInterconnectLoa.go index cad56717f4c..407ff5a2e5f 100644 --- a/service/directconnect/api_op_DescribeInterconnectLoa.go +++ b/service/directconnect/api_op_DescribeInterconnectLoa.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeInterconnectLoaMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInterconnectLoaValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeInterconnects.go b/service/directconnect/api_op_DescribeInterconnects.go index 9d6743e417d..6b40ee9ed42 100644 --- a/service/directconnect/api_op_DescribeInterconnects.go +++ b/service/directconnect/api_op_DescribeInterconnects.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeInterconnectsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInterconnects(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeLags.go b/service/directconnect/api_op_DescribeLags.go index 37df08ddcaf..279a0d69f4e 100644 --- a/service/directconnect/api_op_DescribeLags.go +++ b/service/directconnect/api_op_DescribeLags.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeLagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLags(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeLoa.go b/service/directconnect/api_op_DescribeLoa.go index e2c5933551f..fee1a51e268 100644 --- a/service/directconnect/api_op_DescribeLoa.go +++ b/service/directconnect/api_op_DescribeLoa.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeLoaMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoaValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeLocations.go b/service/directconnect/api_op_DescribeLocations.go index d4201ec2118..9c36379a395 100644 --- a/service/directconnect/api_op_DescribeLocations.go +++ b/service/directconnect/api_op_DescribeLocations.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDescribeLocationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeRouterConfiguration.go b/service/directconnect/api_op_DescribeRouterConfiguration.go index bddb5894147..05df9afa968 100644 --- a/service/directconnect/api_op_DescribeRouterConfiguration.go +++ b/service/directconnect/api_op_DescribeRouterConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeRouterConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRouterConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeTags.go b/service/directconnect/api_op_DescribeTags.go index 4973806740b..4573f7a782d 100644 --- a/service/directconnect/api_op_DescribeTags.go +++ b/service/directconnect/api_op_DescribeTags.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeVirtualGateways.go b/service/directconnect/api_op_DescribeVirtualGateways.go index c766a499887..2b3ede59908 100644 --- a/service/directconnect/api_op_DescribeVirtualGateways.go +++ b/service/directconnect/api_op_DescribeVirtualGateways.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeVirtualGatewaysMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVirtualGateways(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DescribeVirtualInterfaces.go b/service/directconnect/api_op_DescribeVirtualInterfaces.go index c19a0e30e79..3a0ece7a040 100644 --- a/service/directconnect/api_op_DescribeVirtualInterfaces.go +++ b/service/directconnect/api_op_DescribeVirtualInterfaces.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeVirtualInterfacesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVirtualInterfaces(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_DisassociateConnectionFromLag.go b/service/directconnect/api_op_DisassociateConnectionFromLag.go index ac8effa84ff..20086b2b5bb 100644 --- a/service/directconnect/api_op_DisassociateConnectionFromLag.go +++ b/service/directconnect/api_op_DisassociateConnectionFromLag.go @@ -218,6 +218,9 @@ func (c *Client) addOperationDisassociateConnectionFromLagMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateConnectionFromLagValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_DisassociateMacSecKey.go b/service/directconnect/api_op_DisassociateMacSecKey.go index 3669f2b4fb2..676b02201d4 100644 --- a/service/directconnect/api_op_DisassociateMacSecKey.go +++ b/service/directconnect/api_op_DisassociateMacSecKey.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDisassociateMacSecKeyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMacSecKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_ListVirtualInterfaceTestHistory.go b/service/directconnect/api_op_ListVirtualInterfaceTestHistory.go index 7d149ab56b0..0e9c9b119aa 100644 --- a/service/directconnect/api_op_ListVirtualInterfaceTestHistory.go +++ b/service/directconnect/api_op_ListVirtualInterfaceTestHistory.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListVirtualInterfaceTestHistoryMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualInterfaceTestHistory(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_StartBgpFailoverTest.go b/service/directconnect/api_op_StartBgpFailoverTest.go index 9638de332d8..c5f86e6b791 100644 --- a/service/directconnect/api_op_StartBgpFailoverTest.go +++ b/service/directconnect/api_op_StartBgpFailoverTest.go @@ -127,6 +127,9 @@ func (c *Client) addOperationStartBgpFailoverTestMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBgpFailoverTestValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_StopBgpFailoverTest.go b/service/directconnect/api_op_StopBgpFailoverTest.go index 2356c4044e3..5b4921dbfee 100644 --- a/service/directconnect/api_op_StopBgpFailoverTest.go +++ b/service/directconnect/api_op_StopBgpFailoverTest.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopBgpFailoverTestMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopBgpFailoverTestValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_TagResource.go b/service/directconnect/api_op_TagResource.go index c8fe76a541b..08cc0790294 100644 --- a/service/directconnect/api_op_TagResource.go +++ b/service/directconnect/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_UntagResource.go b/service/directconnect/api_op_UntagResource.go index fde507c0cee..1948e1d3026 100644 --- a/service/directconnect/api_op_UntagResource.go +++ b/service/directconnect/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_UpdateConnection.go b/service/directconnect/api_op_UpdateConnection.go index 000f70f45e0..a39b5a36e5c 100644 --- a/service/directconnect/api_op_UpdateConnection.go +++ b/service/directconnect/api_op_UpdateConnection.go @@ -219,6 +219,9 @@ func (c *Client) addOperationUpdateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_UpdateDirectConnectGateway.go b/service/directconnect/api_op_UpdateDirectConnectGateway.go index e8ec0eae7c2..a89cb3ea202 100644 --- a/service/directconnect/api_op_UpdateDirectConnectGateway.go +++ b/service/directconnect/api_op_UpdateDirectConnectGateway.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDirectConnectGatewayMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDirectConnectGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_UpdateDirectConnectGatewayAssociation.go b/service/directconnect/api_op_UpdateDirectConnectGatewayAssociation.go index 0d432013a52..ecc052907c3 100644 --- a/service/directconnect/api_op_UpdateDirectConnectGatewayAssociation.go +++ b/service/directconnect/api_op_UpdateDirectConnectGatewayAssociation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateDirectConnectGatewayAssociationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDirectConnectGatewayAssociation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directconnect/api_op_UpdateLag.go b/service/directconnect/api_op_UpdateLag.go index 38a1b82cb81..04c8d97d753 100644 --- a/service/directconnect/api_op_UpdateLag.go +++ b/service/directconnect/api_op_UpdateLag.go @@ -223,6 +223,9 @@ func (c *Client) addOperationUpdateLagMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLagValidationMiddleware(stack); err != nil { return err } diff --git a/service/directconnect/api_op_UpdateVirtualInterfaceAttributes.go b/service/directconnect/api_op_UpdateVirtualInterfaceAttributes.go index c7277d223ed..dce9e7b8f5c 100644 --- a/service/directconnect/api_op_UpdateVirtualInterfaceAttributes.go +++ b/service/directconnect/api_op_UpdateVirtualInterfaceAttributes.go @@ -237,6 +237,9 @@ func (c *Client) addOperationUpdateVirtualInterfaceAttributesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVirtualInterfaceAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_client.go b/service/directoryservice/api_client.go index fca5be4ff10..a23d48cba1f 100644 --- a/service/directoryservice/api_client.go +++ b/service/directoryservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/directoryservice/api_op_AcceptSharedDirectory.go b/service/directoryservice/api_op_AcceptSharedDirectory.go index aa3d2419abd..08725da863f 100644 --- a/service/directoryservice/api_op_AcceptSharedDirectory.go +++ b/service/directoryservice/api_op_AcceptSharedDirectory.go @@ -108,6 +108,9 @@ func (c *Client) addOperationAcceptSharedDirectoryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptSharedDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_AddIpRoutes.go b/service/directoryservice/api_op_AddIpRoutes.go index 5f6202f4969..b750c5c485c 100644 --- a/service/directoryservice/api_op_AddIpRoutes.go +++ b/service/directoryservice/api_op_AddIpRoutes.go @@ -166,6 +166,9 @@ func (c *Client) addOperationAddIpRoutesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddIpRoutesValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_AddRegion.go b/service/directoryservice/api_op_AddRegion.go index 940613cc1a2..2e97055e5ae 100644 --- a/service/directoryservice/api_op_AddRegion.go +++ b/service/directoryservice/api_op_AddRegion.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAddRegionMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddRegionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_AddTagsToResource.go b/service/directoryservice/api_op_AddTagsToResource.go index 72f09dd78aa..b60961a9dc0 100644 --- a/service/directoryservice/api_op_AddTagsToResource.go +++ b/service/directoryservice/api_op_AddTagsToResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CancelSchemaExtension.go b/service/directoryservice/api_op_CancelSchemaExtension.go index cd5a9d3a1cf..ecb080df011 100644 --- a/service/directoryservice/api_op_CancelSchemaExtension.go +++ b/service/directoryservice/api_op_CancelSchemaExtension.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCancelSchemaExtensionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSchemaExtensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_ConnectDirectory.go b/service/directoryservice/api_op_ConnectDirectory.go index 93b567d04c6..68f45b3794a 100644 --- a/service/directoryservice/api_op_ConnectDirectory.go +++ b/service/directoryservice/api_op_ConnectDirectory.go @@ -139,6 +139,9 @@ func (c *Client) addOperationConnectDirectoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConnectDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateAlias.go b/service/directoryservice/api_op_CreateAlias.go index 3e5cb1f633f..7c2afe670db 100644 --- a/service/directoryservice/api_op_CreateAlias.go +++ b/service/directoryservice/api_op_CreateAlias.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateComputer.go b/service/directoryservice/api_op_CreateComputer.go index da5c1206853..a82a3d2ff77 100644 --- a/service/directoryservice/api_op_CreateComputer.go +++ b/service/directoryservice/api_op_CreateComputer.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateComputerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateComputerValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateConditionalForwarder.go b/service/directoryservice/api_op_CreateConditionalForwarder.go index 54207523b6b..623c6ec7a67 100644 --- a/service/directoryservice/api_op_CreateConditionalForwarder.go +++ b/service/directoryservice/api_op_CreateConditionalForwarder.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateConditionalForwarderMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConditionalForwarderValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateDirectory.go b/service/directoryservice/api_op_CreateDirectory.go index 1943cf58b7d..4b233e1b992 100644 --- a/service/directoryservice/api_op_CreateDirectory.go +++ b/service/directoryservice/api_op_CreateDirectory.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateDirectoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateLogSubscription.go b/service/directoryservice/api_op_CreateLogSubscription.go index d8ea4fdba0f..1eafc5b47e6 100644 --- a/service/directoryservice/api_op_CreateLogSubscription.go +++ b/service/directoryservice/api_op_CreateLogSubscription.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateLogSubscriptionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLogSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateMicrosoftAD.go b/service/directoryservice/api_op_CreateMicrosoftAD.go index 085e525e561..8bdc47d8e2e 100644 --- a/service/directoryservice/api_op_CreateMicrosoftAD.go +++ b/service/directoryservice/api_op_CreateMicrosoftAD.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateMicrosoftADMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMicrosoftADValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateSnapshot.go b/service/directoryservice/api_op_CreateSnapshot.go index 15bab0a0513..8f060193de0 100644 --- a/service/directoryservice/api_op_CreateSnapshot.go +++ b/service/directoryservice/api_op_CreateSnapshot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_CreateTrust.go b/service/directoryservice/api_op_CreateTrust.go index 300e3e9a629..68704cbd53c 100644 --- a/service/directoryservice/api_op_CreateTrust.go +++ b/service/directoryservice/api_op_CreateTrust.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateTrustMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrustValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeleteConditionalForwarder.go b/service/directoryservice/api_op_DeleteConditionalForwarder.go index 96415930128..20e788e8329 100644 --- a/service/directoryservice/api_op_DeleteConditionalForwarder.go +++ b/service/directoryservice/api_op_DeleteConditionalForwarder.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConditionalForwarderMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConditionalForwarderValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeleteDirectory.go b/service/directoryservice/api_op_DeleteDirectory.go index 75e86bcd778..fc7e9ba10aa 100644 --- a/service/directoryservice/api_op_DeleteDirectory.go +++ b/service/directoryservice/api_op_DeleteDirectory.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDirectoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeleteLogSubscription.go b/service/directoryservice/api_op_DeleteLogSubscription.go index 0e8e05d36ee..80afd4fc67e 100644 --- a/service/directoryservice/api_op_DeleteLogSubscription.go +++ b/service/directoryservice/api_op_DeleteLogSubscription.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteLogSubscriptionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLogSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeleteSnapshot.go b/service/directoryservice/api_op_DeleteSnapshot.go index 842e7779b3f..2395139269c 100644 --- a/service/directoryservice/api_op_DeleteSnapshot.go +++ b/service/directoryservice/api_op_DeleteSnapshot.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeleteTrust.go b/service/directoryservice/api_op_DeleteTrust.go index 2f46ee1fcfc..96a6792bfac 100644 --- a/service/directoryservice/api_op_DeleteTrust.go +++ b/service/directoryservice/api_op_DeleteTrust.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTrustMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrustValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeregisterCertificate.go b/service/directoryservice/api_op_DeregisterCertificate.go index 5f09f83e61d..94720f76606 100644 --- a/service/directoryservice/api_op_DeregisterCertificate.go +++ b/service/directoryservice/api_op_DeregisterCertificate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeregisterCertificateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DeregisterEventTopic.go b/service/directoryservice/api_op_DeregisterEventTopic.go index 95d4b9ff7eb..aa2fb004299 100644 --- a/service/directoryservice/api_op_DeregisterEventTopic.go +++ b/service/directoryservice/api_op_DeregisterEventTopic.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeregisterEventTopicMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterEventTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DescribeCertificate.go b/service/directoryservice/api_op_DescribeCertificate.go index f42067a59ca..4a98c0b5b64 100644 --- a/service/directoryservice/api_op_DescribeCertificate.go +++ b/service/directoryservice/api_op_DescribeCertificate.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go b/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go index f15a74b11bf..dba627cf104 100644 --- a/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go +++ b/service/directoryservice/api_op_DescribeClientAuthenticationSettings.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeClientAuthenticationSettingsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientAuthenticationSettingsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeClientAuthenticationSettingsMiddlewares(sta return nil } -// DescribeClientAuthenticationSettingsAPIClient is a client that implements the -// DescribeClientAuthenticationSettings operation. -type DescribeClientAuthenticationSettingsAPIClient interface { - DescribeClientAuthenticationSettings(context.Context, *DescribeClientAuthenticationSettingsInput, ...func(*Options)) (*DescribeClientAuthenticationSettingsOutput, error) -} - -var _ DescribeClientAuthenticationSettingsAPIClient = (*Client)(nil) - // DescribeClientAuthenticationSettingsPaginatorOptions is the paginator options // for DescribeClientAuthenticationSettings type DescribeClientAuthenticationSettingsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeClientAuthenticationSettingsPaginator) NextPage(ctx context.Con } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClientAuthenticationSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeClientAuthenticationSettingsPaginator) NextPage(ctx context.Con return result, nil } +// DescribeClientAuthenticationSettingsAPIClient is a client that implements the +// DescribeClientAuthenticationSettings operation. +type DescribeClientAuthenticationSettingsAPIClient interface { + DescribeClientAuthenticationSettings(context.Context, *DescribeClientAuthenticationSettingsInput, ...func(*Options)) (*DescribeClientAuthenticationSettingsOutput, error) +} + +var _ DescribeClientAuthenticationSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClientAuthenticationSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeConditionalForwarders.go b/service/directoryservice/api_op_DescribeConditionalForwarders.go index 571ddd57eae..414a1001bfa 100644 --- a/service/directoryservice/api_op_DescribeConditionalForwarders.go +++ b/service/directoryservice/api_op_DescribeConditionalForwarders.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeConditionalForwardersMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConditionalForwardersValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DescribeDirectories.go b/service/directoryservice/api_op_DescribeDirectories.go index ecd2c9575e6..9fd42b53d35 100644 --- a/service/directoryservice/api_op_DescribeDirectories.go +++ b/service/directoryservice/api_op_DescribeDirectories.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeDirectoriesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDirectories(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeDirectoriesMiddlewares(stack *middleware.St return nil } -// DescribeDirectoriesAPIClient is a client that implements the -// DescribeDirectories operation. -type DescribeDirectoriesAPIClient interface { - DescribeDirectories(context.Context, *DescribeDirectoriesInput, ...func(*Options)) (*DescribeDirectoriesOutput, error) -} - -var _ DescribeDirectoriesAPIClient = (*Client)(nil) - // DescribeDirectoriesPaginatorOptions is the paginator options for // DescribeDirectories type DescribeDirectoriesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeDirectoriesPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDirectories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeDirectoriesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeDirectoriesAPIClient is a client that implements the +// DescribeDirectories operation. +type DescribeDirectoriesAPIClient interface { + DescribeDirectories(context.Context, *DescribeDirectoriesInput, ...func(*Options)) (*DescribeDirectoriesOutput, error) +} + +var _ DescribeDirectoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeDomainControllers.go b/service/directoryservice/api_op_DescribeDomainControllers.go index e065fed742d..0a5f4193941 100644 --- a/service/directoryservice/api_op_DescribeDomainControllers.go +++ b/service/directoryservice/api_op_DescribeDomainControllers.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeDomainControllersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainControllersValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeDomainControllersMiddlewares(stack *middlew return nil } -// DescribeDomainControllersAPIClient is a client that implements the -// DescribeDomainControllers operation. -type DescribeDomainControllersAPIClient interface { - DescribeDomainControllers(context.Context, *DescribeDomainControllersInput, ...func(*Options)) (*DescribeDomainControllersOutput, error) -} - -var _ DescribeDomainControllersAPIClient = (*Client)(nil) - // DescribeDomainControllersPaginatorOptions is the paginator options for // DescribeDomainControllers type DescribeDomainControllersPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeDomainControllersPaginator) NextPage(ctx context.Context, optFn } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDomainControllers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeDomainControllersPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeDomainControllersAPIClient is a client that implements the +// DescribeDomainControllers operation. +type DescribeDomainControllersAPIClient interface { + DescribeDomainControllers(context.Context, *DescribeDomainControllersInput, ...func(*Options)) (*DescribeDomainControllersOutput, error) +} + +var _ DescribeDomainControllersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDomainControllers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeEventTopics.go b/service/directoryservice/api_op_DescribeEventTopics.go index f016be2b436..e5143fd764b 100644 --- a/service/directoryservice/api_op_DescribeEventTopics.go +++ b/service/directoryservice/api_op_DescribeEventTopics.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeEventTopicsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventTopics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directoryservice/api_op_DescribeLDAPSSettings.go b/service/directoryservice/api_op_DescribeLDAPSSettings.go index 0c9be53caf1..59c84a54083 100644 --- a/service/directoryservice/api_op_DescribeLDAPSSettings.go +++ b/service/directoryservice/api_op_DescribeLDAPSSettings.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeLDAPSSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLDAPSSettingsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeLDAPSSettingsMiddlewares(stack *middleware. return nil } -// DescribeLDAPSSettingsAPIClient is a client that implements the -// DescribeLDAPSSettings operation. -type DescribeLDAPSSettingsAPIClient interface { - DescribeLDAPSSettings(context.Context, *DescribeLDAPSSettingsInput, ...func(*Options)) (*DescribeLDAPSSettingsOutput, error) -} - -var _ DescribeLDAPSSettingsAPIClient = (*Client)(nil) - // DescribeLDAPSSettingsPaginatorOptions is the paginator options for // DescribeLDAPSSettings type DescribeLDAPSSettingsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeLDAPSSettingsPaginator) NextPage(ctx context.Context, optFns .. } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLDAPSSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeLDAPSSettingsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeLDAPSSettingsAPIClient is a client that implements the +// DescribeLDAPSSettings operation. +type DescribeLDAPSSettingsAPIClient interface { + DescribeLDAPSSettings(context.Context, *DescribeLDAPSSettingsInput, ...func(*Options)) (*DescribeLDAPSSettingsOutput, error) +} + +var _ DescribeLDAPSSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLDAPSSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeRegions.go b/service/directoryservice/api_op_DescribeRegions.go index 20c462b31cb..278afc7c113 100644 --- a/service/directoryservice/api_op_DescribeRegions.go +++ b/service/directoryservice/api_op_DescribeRegions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeRegionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeRegionsMiddlewares(stack *middleware.Stack, return nil } -// DescribeRegionsAPIClient is a client that implements the DescribeRegions -// operation. -type DescribeRegionsAPIClient interface { - DescribeRegions(context.Context, *DescribeRegionsInput, ...func(*Options)) (*DescribeRegionsOutput, error) -} - -var _ DescribeRegionsAPIClient = (*Client)(nil) - // DescribeRegionsPaginatorOptions is the paginator options for DescribeRegions type DescribeRegionsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -201,6 +196,9 @@ func (p *DescribeRegionsPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *DescribeRegionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeRegionsAPIClient is a client that implements the DescribeRegions +// operation. +type DescribeRegionsAPIClient interface { + DescribeRegions(context.Context, *DescribeRegionsInput, ...func(*Options)) (*DescribeRegionsOutput, error) +} + +var _ DescribeRegionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeSettings.go b/service/directoryservice/api_op_DescribeSettings.go index 214eaeac25c..25b6ef0b52f 100644 --- a/service/directoryservice/api_op_DescribeSettings.go +++ b/service/directoryservice/api_op_DescribeSettings.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeSettingsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DescribeSharedDirectories.go b/service/directoryservice/api_op_DescribeSharedDirectories.go index 9c838d820dc..896c1296d0d 100644 --- a/service/directoryservice/api_op_DescribeSharedDirectories.go +++ b/service/directoryservice/api_op_DescribeSharedDirectories.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeSharedDirectoriesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSharedDirectoriesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeSharedDirectoriesMiddlewares(stack *middlew return nil } -// DescribeSharedDirectoriesAPIClient is a client that implements the -// DescribeSharedDirectories operation. -type DescribeSharedDirectoriesAPIClient interface { - DescribeSharedDirectories(context.Context, *DescribeSharedDirectoriesInput, ...func(*Options)) (*DescribeSharedDirectoriesOutput, error) -} - -var _ DescribeSharedDirectoriesAPIClient = (*Client)(nil) - // DescribeSharedDirectoriesPaginatorOptions is the paginator options for // DescribeSharedDirectories type DescribeSharedDirectoriesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeSharedDirectoriesPaginator) NextPage(ctx context.Context, optFn } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSharedDirectories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeSharedDirectoriesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeSharedDirectoriesAPIClient is a client that implements the +// DescribeSharedDirectories operation. +type DescribeSharedDirectoriesAPIClient interface { + DescribeSharedDirectories(context.Context, *DescribeSharedDirectoriesInput, ...func(*Options)) (*DescribeSharedDirectoriesOutput, error) +} + +var _ DescribeSharedDirectoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSharedDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeSnapshots.go b/service/directoryservice/api_op_DescribeSnapshots.go index b2561d11c8f..42ebaa4e402 100644 --- a/service/directoryservice/api_op_DescribeSnapshots.go +++ b/service/directoryservice/api_op_DescribeSnapshots.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac return nil } -// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots -// operation. -type DescribeSnapshotsAPIClient interface { - DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) -} - -var _ DescribeSnapshotsAPIClient = (*Client)(nil) - // DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots type DescribeSnapshotsPaginatorOptions struct { // The maximum number of objects to return. @@ -227,6 +222,9 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots +// operation. +type DescribeSnapshotsAPIClient interface { + DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) +} + +var _ DescribeSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeTrusts.go b/service/directoryservice/api_op_DescribeTrusts.go index bf90c93c1fd..0151d9b4079 100644 --- a/service/directoryservice/api_op_DescribeTrusts.go +++ b/service/directoryservice/api_op_DescribeTrusts.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeTrustsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrusts(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeTrustsMiddlewares(stack *middleware.Stack, return nil } -// DescribeTrustsAPIClient is a client that implements the DescribeTrusts -// operation. -type DescribeTrustsAPIClient interface { - DescribeTrusts(context.Context, *DescribeTrustsInput, ...func(*Options)) (*DescribeTrustsOutput, error) -} - -var _ DescribeTrustsAPIClient = (*Client)(nil) - // DescribeTrustsPaginatorOptions is the paginator options for DescribeTrusts type DescribeTrustsPaginatorOptions struct { // The maximum number of objects to return. @@ -227,6 +222,9 @@ func (p *DescribeTrustsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrusts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeTrustsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeTrustsAPIClient is a client that implements the DescribeTrusts +// operation. +type DescribeTrustsAPIClient interface { + DescribeTrusts(context.Context, *DescribeTrustsInput, ...func(*Options)) (*DescribeTrustsOutput, error) +} + +var _ DescribeTrustsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrusts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DescribeUpdateDirectory.go b/service/directoryservice/api_op_DescribeUpdateDirectory.go index 4478c73563a..98351b53dad 100644 --- a/service/directoryservice/api_op_DescribeUpdateDirectory.go +++ b/service/directoryservice/api_op_DescribeUpdateDirectory.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeUpdateDirectoryMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUpdateDirectoryValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeUpdateDirectoryMiddlewares(stack *middlewar return nil } -// DescribeUpdateDirectoryAPIClient is a client that implements the -// DescribeUpdateDirectory operation. -type DescribeUpdateDirectoryAPIClient interface { - DescribeUpdateDirectory(context.Context, *DescribeUpdateDirectoryInput, ...func(*Options)) (*DescribeUpdateDirectoryOutput, error) -} - -var _ DescribeUpdateDirectoryAPIClient = (*Client)(nil) - // DescribeUpdateDirectoryPaginatorOptions is the paginator options for // DescribeUpdateDirectory type DescribeUpdateDirectoryPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *DescribeUpdateDirectoryPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUpdateDirectory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *DescribeUpdateDirectoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeUpdateDirectoryAPIClient is a client that implements the +// DescribeUpdateDirectory operation. +type DescribeUpdateDirectoryAPIClient interface { + DescribeUpdateDirectory(context.Context, *DescribeUpdateDirectoryInput, ...func(*Options)) (*DescribeUpdateDirectoryOutput, error) +} + +var _ DescribeUpdateDirectoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUpdateDirectory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_DisableClientAuthentication.go b/service/directoryservice/api_op_DisableClientAuthentication.go index 7eb7462ca22..65a21783e8b 100644 --- a/service/directoryservice/api_op_DisableClientAuthentication.go +++ b/service/directoryservice/api_op_DisableClientAuthentication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisableClientAuthenticationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableClientAuthenticationValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DisableLDAPS.go b/service/directoryservice/api_op_DisableLDAPS.go index f12cc32ae62..e1ef87bd5ad 100644 --- a/service/directoryservice/api_op_DisableLDAPS.go +++ b/service/directoryservice/api_op_DisableLDAPS.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisableLDAPSMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableLDAPSValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DisableRadius.go b/service/directoryservice/api_op_DisableRadius.go index 011f0416aa9..16ff7e668fe 100644 --- a/service/directoryservice/api_op_DisableRadius.go +++ b/service/directoryservice/api_op_DisableRadius.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDisableRadiusMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableRadiusValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_DisableSso.go b/service/directoryservice/api_op_DisableSso.go index bf28126460a..41ef37956eb 100644 --- a/service/directoryservice/api_op_DisableSso.go +++ b/service/directoryservice/api_op_DisableSso.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDisableSsoMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableSsoValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_EnableClientAuthentication.go b/service/directoryservice/api_op_EnableClientAuthentication.go index 4e2bfa49867..eee510ca033 100644 --- a/service/directoryservice/api_op_EnableClientAuthentication.go +++ b/service/directoryservice/api_op_EnableClientAuthentication.go @@ -110,6 +110,9 @@ func (c *Client) addOperationEnableClientAuthenticationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableClientAuthenticationValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_EnableLDAPS.go b/service/directoryservice/api_op_EnableLDAPS.go index 0facab103bc..758e7413941 100644 --- a/service/directoryservice/api_op_EnableLDAPS.go +++ b/service/directoryservice/api_op_EnableLDAPS.go @@ -108,6 +108,9 @@ func (c *Client) addOperationEnableLDAPSMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableLDAPSValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_EnableRadius.go b/service/directoryservice/api_op_EnableRadius.go index 29a972cc984..2dd4ea67906 100644 --- a/service/directoryservice/api_op_EnableRadius.go +++ b/service/directoryservice/api_op_EnableRadius.go @@ -110,6 +110,9 @@ func (c *Client) addOperationEnableRadiusMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableRadiusValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_EnableSso.go b/service/directoryservice/api_op_EnableSso.go index d609f660824..48fef43b7da 100644 --- a/service/directoryservice/api_op_EnableSso.go +++ b/service/directoryservice/api_op_EnableSso.go @@ -121,6 +121,9 @@ func (c *Client) addOperationEnableSsoMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableSsoValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_GetDirectoryLimits.go b/service/directoryservice/api_op_GetDirectoryLimits.go index 81f455999f6..36ec2d80239 100644 --- a/service/directoryservice/api_op_GetDirectoryLimits.go +++ b/service/directoryservice/api_op_GetDirectoryLimits.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetDirectoryLimitsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDirectoryLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/directoryservice/api_op_GetSnapshotLimits.go b/service/directoryservice/api_op_GetSnapshotLimits.go index b8c31d8a892..5bca90d5b01 100644 --- a/service/directoryservice/api_op_GetSnapshotLimits.go +++ b/service/directoryservice/api_op_GetSnapshotLimits.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetSnapshotLimitsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSnapshotLimitsValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_ListCertificates.go b/service/directoryservice/api_op_ListCertificates.go index ed3dccd26bb..4d98b4017ad 100644 --- a/service/directoryservice/api_op_ListCertificates.go +++ b/service/directoryservice/api_op_ListCertificates.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCertificatesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack return nil } -// ListCertificatesAPIClient is a client that implements the ListCertificates -// operation. -type ListCertificatesAPIClient interface { - ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) -} - -var _ ListCertificatesAPIClient = (*Client)(nil) - // ListCertificatesPaginatorOptions is the paginator options for ListCertificates type ListCertificatesPaginatorOptions struct { // The number of items that should show up on one page @@ -216,6 +211,9 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCertificatesAPIClient is a client that implements the ListCertificates +// operation. +type ListCertificatesAPIClient interface { + ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) +} + +var _ ListCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListIpRoutes.go b/service/directoryservice/api_op_ListIpRoutes.go index 9538a7b8ee6..de60eacecf1 100644 --- a/service/directoryservice/api_op_ListIpRoutes.go +++ b/service/directoryservice/api_op_ListIpRoutes.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListIpRoutesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIpRoutesValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListIpRoutesMiddlewares(stack *middleware.Stack, op return nil } -// ListIpRoutesAPIClient is a client that implements the ListIpRoutes operation. -type ListIpRoutesAPIClient interface { - ListIpRoutes(context.Context, *ListIpRoutesInput, ...func(*Options)) (*ListIpRoutesOutput, error) -} - -var _ ListIpRoutesAPIClient = (*Client)(nil) - // ListIpRoutesPaginatorOptions is the paginator options for ListIpRoutes type ListIpRoutesPaginatorOptions struct { // Maximum number of items to return. If this value is zero, the maximum number of @@ -214,6 +210,9 @@ func (p *ListIpRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIpRoutes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListIpRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListIpRoutesAPIClient is a client that implements the ListIpRoutes operation. +type ListIpRoutesAPIClient interface { + ListIpRoutes(context.Context, *ListIpRoutesInput, ...func(*Options)) (*ListIpRoutesOutput, error) +} + +var _ ListIpRoutesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIpRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListLogSubscriptions.go b/service/directoryservice/api_op_ListLogSubscriptions.go index 1f2a4f8f2d6..6d0695d280f 100644 --- a/service/directoryservice/api_op_ListLogSubscriptions.go +++ b/service/directoryservice/api_op_ListLogSubscriptions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListLogSubscriptionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLogSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListLogSubscriptionsMiddlewares(stack *middleware.S return nil } -// ListLogSubscriptionsAPIClient is a client that implements the -// ListLogSubscriptions operation. -type ListLogSubscriptionsAPIClient interface { - ListLogSubscriptions(context.Context, *ListLogSubscriptionsInput, ...func(*Options)) (*ListLogSubscriptionsOutput, error) -} - -var _ ListLogSubscriptionsAPIClient = (*Client)(nil) - // ListLogSubscriptionsPaginatorOptions is the paginator options for // ListLogSubscriptions type ListLogSubscriptionsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListLogSubscriptionsPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLogSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListLogSubscriptionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListLogSubscriptionsAPIClient is a client that implements the +// ListLogSubscriptions operation. +type ListLogSubscriptionsAPIClient interface { + ListLogSubscriptions(context.Context, *ListLogSubscriptionsInput, ...func(*Options)) (*ListLogSubscriptionsOutput, error) +} + +var _ ListLogSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLogSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListSchemaExtensions.go b/service/directoryservice/api_op_ListSchemaExtensions.go index fe85440c909..1bafecaef18 100644 --- a/service/directoryservice/api_op_ListSchemaExtensions.go +++ b/service/directoryservice/api_op_ListSchemaExtensions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListSchemaExtensionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSchemaExtensionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListSchemaExtensionsMiddlewares(stack *middleware.S return nil } -// ListSchemaExtensionsAPIClient is a client that implements the -// ListSchemaExtensions operation. -type ListSchemaExtensionsAPIClient interface { - ListSchemaExtensions(context.Context, *ListSchemaExtensionsInput, ...func(*Options)) (*ListSchemaExtensionsOutput, error) -} - -var _ ListSchemaExtensionsAPIClient = (*Client)(nil) - // ListSchemaExtensionsPaginatorOptions is the paginator options for // ListSchemaExtensions type ListSchemaExtensionsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListSchemaExtensionsPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemaExtensions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListSchemaExtensionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSchemaExtensionsAPIClient is a client that implements the +// ListSchemaExtensions operation. +type ListSchemaExtensionsAPIClient interface { + ListSchemaExtensions(context.Context, *ListSchemaExtensionsInput, ...func(*Options)) (*ListSchemaExtensionsOutput, error) +} + +var _ ListSchemaExtensionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemaExtensions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_ListTagsForResource.go b/service/directoryservice/api_op_ListTagsForResource.go index fe3d8af1a79..798acabbf21 100644 --- a/service/directoryservice/api_op_ListTagsForResource.go +++ b/service/directoryservice/api_op_ListTagsForResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/directoryservice/api_op_RegisterCertificate.go b/service/directoryservice/api_op_RegisterCertificate.go index cbed2075a49..ae10b3e9548 100644 --- a/service/directoryservice/api_op_RegisterCertificate.go +++ b/service/directoryservice/api_op_RegisterCertificate.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRegisterCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_RegisterEventTopic.go b/service/directoryservice/api_op_RegisterEventTopic.go index e788381f7dd..22923f8d42a 100644 --- a/service/directoryservice/api_op_RegisterEventTopic.go +++ b/service/directoryservice/api_op_RegisterEventTopic.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRegisterEventTopicMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterEventTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_RejectSharedDirectory.go b/service/directoryservice/api_op_RejectSharedDirectory.go index 63e3d1cd848..10770d5489a 100644 --- a/service/directoryservice/api_op_RejectSharedDirectory.go +++ b/service/directoryservice/api_op_RejectSharedDirectory.go @@ -107,6 +107,9 @@ func (c *Client) addOperationRejectSharedDirectoryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectSharedDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_RemoveIpRoutes.go b/service/directoryservice/api_op_RemoveIpRoutes.go index d7252219022..3b652defde2 100644 --- a/service/directoryservice/api_op_RemoveIpRoutes.go +++ b/service/directoryservice/api_op_RemoveIpRoutes.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRemoveIpRoutesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveIpRoutesValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_RemoveRegion.go b/service/directoryservice/api_op_RemoveRegion.go index 3f365bebed8..02dfd8975e1 100644 --- a/service/directoryservice/api_op_RemoveRegion.go +++ b/service/directoryservice/api_op_RemoveRegion.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveRegionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRegionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_RemoveTagsFromResource.go b/service/directoryservice/api_op_RemoveTagsFromResource.go index e6f9d1a6b81..2cd5307e92d 100644 --- a/service/directoryservice/api_op_RemoveTagsFromResource.go +++ b/service/directoryservice/api_op_RemoveTagsFromResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_ResetUserPassword.go b/service/directoryservice/api_op_ResetUserPassword.go index 53873449511..d9d79523a8e 100644 --- a/service/directoryservice/api_op_ResetUserPassword.go +++ b/service/directoryservice/api_op_ResetUserPassword.go @@ -129,6 +129,9 @@ func (c *Client) addOperationResetUserPasswordMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetUserPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_RestoreFromSnapshot.go b/service/directoryservice/api_op_RestoreFromSnapshot.go index 37f4b8ded37..66b5bf51623 100644 --- a/service/directoryservice/api_op_RestoreFromSnapshot.go +++ b/service/directoryservice/api_op_RestoreFromSnapshot.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRestoreFromSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_ShareDirectory.go b/service/directoryservice/api_op_ShareDirectory.go index 6eb7ce8da95..71cd69ad326 100644 --- a/service/directoryservice/api_op_ShareDirectory.go +++ b/service/directoryservice/api_op_ShareDirectory.go @@ -145,6 +145,9 @@ func (c *Client) addOperationShareDirectoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpShareDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_StartSchemaExtension.go b/service/directoryservice/api_op_StartSchemaExtension.go index fbb67dd93e0..d7adb7bd4d0 100644 --- a/service/directoryservice/api_op_StartSchemaExtension.go +++ b/service/directoryservice/api_op_StartSchemaExtension.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStartSchemaExtensionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSchemaExtensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UnshareDirectory.go b/service/directoryservice/api_op_UnshareDirectory.go index bb8b13db850..9a3601846e4 100644 --- a/service/directoryservice/api_op_UnshareDirectory.go +++ b/service/directoryservice/api_op_UnshareDirectory.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUnshareDirectoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnshareDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UpdateConditionalForwarder.go b/service/directoryservice/api_op_UpdateConditionalForwarder.go index 9602220b0f5..f2f4c398803 100644 --- a/service/directoryservice/api_op_UpdateConditionalForwarder.go +++ b/service/directoryservice/api_op_UpdateConditionalForwarder.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateConditionalForwarderMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConditionalForwarderValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UpdateDirectorySetup.go b/service/directoryservice/api_op_UpdateDirectorySetup.go index 412222bdc07..940e1a806d8 100644 --- a/service/directoryservice/api_op_UpdateDirectorySetup.go +++ b/service/directoryservice/api_op_UpdateDirectorySetup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateDirectorySetupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDirectorySetupValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UpdateNumberOfDomainControllers.go b/service/directoryservice/api_op_UpdateNumberOfDomainControllers.go index 0e2db01405a..49db91da542 100644 --- a/service/directoryservice/api_op_UpdateNumberOfDomainControllers.go +++ b/service/directoryservice/api_op_UpdateNumberOfDomainControllers.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateNumberOfDomainControllersMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNumberOfDomainControllersValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UpdateRadius.go b/service/directoryservice/api_op_UpdateRadius.go index db6067d1227..3c057a70102 100644 --- a/service/directoryservice/api_op_UpdateRadius.go +++ b/service/directoryservice/api_op_UpdateRadius.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateRadiusMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRadiusValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UpdateSettings.go b/service/directoryservice/api_op_UpdateSettings.go index 19d30036901..2e5282b457b 100644 --- a/service/directoryservice/api_op_UpdateSettings.go +++ b/service/directoryservice/api_op_UpdateSettings.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateSettingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_UpdateTrust.go b/service/directoryservice/api_op_UpdateTrust.go index 650b5090dcd..0f00bcf5c40 100644 --- a/service/directoryservice/api_op_UpdateTrust.go +++ b/service/directoryservice/api_op_UpdateTrust.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateTrustMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrustValidationMiddleware(stack); err != nil { return err } diff --git a/service/directoryservice/api_op_VerifyTrust.go b/service/directoryservice/api_op_VerifyTrust.go index 4643aec08e6..848382d9dd3 100644 --- a/service/directoryservice/api_op_VerifyTrust.go +++ b/service/directoryservice/api_op_VerifyTrust.go @@ -112,6 +112,9 @@ func (c *Client) addOperationVerifyTrustMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyTrustValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_client.go b/service/dlm/api_client.go index 85fd654a816..c7ac0efd497 100644 --- a/service/dlm/api_client.go +++ b/service/dlm/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/dlm/api_op_CreateLifecyclePolicy.go b/service/dlm/api_op_CreateLifecyclePolicy.go index 539b96f298f..2511a75b8ee 100644 --- a/service/dlm/api_op_CreateLifecyclePolicy.go +++ b/service/dlm/api_op_CreateLifecyclePolicy.go @@ -214,6 +214,9 @@ func (c *Client) addOperationCreateLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_op_DeleteLifecyclePolicy.go b/service/dlm/api_op_DeleteLifecyclePolicy.go index ce832ee033b..349c0ee8806 100644 --- a/service/dlm/api_op_DeleteLifecyclePolicy.go +++ b/service/dlm/api_op_DeleteLifecyclePolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_op_GetLifecyclePolicies.go b/service/dlm/api_op_GetLifecyclePolicies.go index a11594ae602..e11c9f9599c 100644 --- a/service/dlm/api_op_GetLifecyclePolicies.go +++ b/service/dlm/api_op_GetLifecyclePolicies.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetLifecyclePoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLifecyclePolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dlm/api_op_GetLifecyclePolicy.go b/service/dlm/api_op_GetLifecyclePolicy.go index c862f5b6387..41cf70846de 100644 --- a/service/dlm/api_op_GetLifecyclePolicy.go +++ b/service/dlm/api_op_GetLifecyclePolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetLifecyclePolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_op_ListTagsForResource.go b/service/dlm/api_op_ListTagsForResource.go index 8298bc71f97..57be6286e96 100644 --- a/service/dlm/api_op_ListTagsForResource.go +++ b/service/dlm/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_op_TagResource.go b/service/dlm/api_op_TagResource.go index b3190f7efb8..744ccfc8569 100644 --- a/service/dlm/api_op_TagResource.go +++ b/service/dlm/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_op_UntagResource.go b/service/dlm/api_op_UntagResource.go index 6b42c1640e6..d1146985b64 100644 --- a/service/dlm/api_op_UntagResource.go +++ b/service/dlm/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dlm/api_op_UpdateLifecyclePolicy.go b/service/dlm/api_op_UpdateLifecyclePolicy.go index e933747e76c..f649b7f72f3 100644 --- a/service/dlm/api_op_UpdateLifecyclePolicy.go +++ b/service/dlm/api_op_UpdateLifecyclePolicy.go @@ -168,6 +168,9 @@ func (c *Client) addOperationUpdateLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_client.go b/service/docdb/api_client.go index ede5936c354..704dffd2649 100644 --- a/service/docdb/api_client.go +++ b/service/docdb/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -539,6 +563,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/docdb/api_op_AddSourceIdentifierToSubscription.go b/service/docdb/api_op_AddSourceIdentifierToSubscription.go index 5e44a2d353f..81a3e84a32f 100644 --- a/service/docdb/api_op_AddSourceIdentifierToSubscription.go +++ b/service/docdb/api_op_AddSourceIdentifierToSubscription.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAddSourceIdentifierToSubscriptionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddSourceIdentifierToSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_AddTagsToResource.go b/service/docdb/api_op_AddTagsToResource.go index 29a5c3b4025..c051ec96736 100644 --- a/service/docdb/api_op_AddTagsToResource.go +++ b/service/docdb/api_op_AddTagsToResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ApplyPendingMaintenanceAction.go b/service/docdb/api_op_ApplyPendingMaintenanceAction.go index c28853b20a3..2cbc3580a5c 100644 --- a/service/docdb/api_op_ApplyPendingMaintenanceAction.go +++ b/service/docdb/api_op_ApplyPendingMaintenanceAction.go @@ -131,6 +131,9 @@ func (c *Client) addOperationApplyPendingMaintenanceActionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplyPendingMaintenanceActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CopyDBClusterParameterGroup.go b/service/docdb/api_op_CopyDBClusterParameterGroup.go index c94fe82119b..c95bc618891 100644 --- a/service/docdb/api_op_CopyDBClusterParameterGroup.go +++ b/service/docdb/api_op_CopyDBClusterParameterGroup.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCopyDBClusterParameterGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CopyDBClusterSnapshot.go b/service/docdb/api_op_CopyDBClusterSnapshot.go index 4b43b5f3fc9..aa38e393f55 100644 --- a/service/docdb/api_op_CopyDBClusterSnapshot.go +++ b/service/docdb/api_op_CopyDBClusterSnapshot.go @@ -219,6 +219,9 @@ func (c *Client) addOperationCopyDBClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateDBCluster.go b/service/docdb/api_op_CreateDBCluster.go index 986368d5ba6..3a4293c2627 100644 --- a/service/docdb/api_op_CreateDBCluster.go +++ b/service/docdb/api_op_CreateDBCluster.go @@ -279,6 +279,9 @@ func (c *Client) addOperationCreateDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateDBClusterParameterGroup.go b/service/docdb/api_op_CreateDBClusterParameterGroup.go index 61bae42bed8..a6cf623c974 100644 --- a/service/docdb/api_op_CreateDBClusterParameterGroup.go +++ b/service/docdb/api_op_CreateDBClusterParameterGroup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateDBClusterSnapshot.go b/service/docdb/api_op_CreateDBClusterSnapshot.go index fa3e8133baf..6cca5dac738 100644 --- a/service/docdb/api_op_CreateDBClusterSnapshot.go +++ b/service/docdb/api_op_CreateDBClusterSnapshot.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateDBClusterSnapshotMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateDBInstance.go b/service/docdb/api_op_CreateDBInstance.go index 1d15bca032b..0515ff34faf 100644 --- a/service/docdb/api_op_CreateDBInstance.go +++ b/service/docdb/api_op_CreateDBInstance.go @@ -203,6 +203,9 @@ func (c *Client) addOperationCreateDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateDBSubnetGroup.go b/service/docdb/api_op_CreateDBSubnetGroup.go index bf570ae380a..1a368a2050b 100644 --- a/service/docdb/api_op_CreateDBSubnetGroup.go +++ b/service/docdb/api_op_CreateDBSubnetGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateEventSubscription.go b/service/docdb/api_op_CreateEventSubscription.go index 59f87f238fb..7ba79595318 100644 --- a/service/docdb/api_op_CreateEventSubscription.go +++ b/service/docdb/api_op_CreateEventSubscription.go @@ -172,6 +172,9 @@ func (c *Client) addOperationCreateEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_CreateGlobalCluster.go b/service/docdb/api_op_CreateGlobalCluster.go index 9e321cb337f..1c244fce52c 100644 --- a/service/docdb/api_op_CreateGlobalCluster.go +++ b/service/docdb/api_op_CreateGlobalCluster.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteDBCluster.go b/service/docdb/api_op_DeleteDBCluster.go index 58c955f7628..b486cfe53b2 100644 --- a/service/docdb/api_op_DeleteDBCluster.go +++ b/service/docdb/api_op_DeleteDBCluster.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDeleteDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteDBClusterParameterGroup.go b/service/docdb/api_op_DeleteDBClusterParameterGroup.go index c7e107e459c..52b62aa2fdd 100644 --- a/service/docdb/api_op_DeleteDBClusterParameterGroup.go +++ b/service/docdb/api_op_DeleteDBClusterParameterGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteDBClusterSnapshot.go b/service/docdb/api_op_DeleteDBClusterSnapshot.go index 0885ec3bc03..a8d56f7521a 100644 --- a/service/docdb/api_op_DeleteDBClusterSnapshot.go +++ b/service/docdb/api_op_DeleteDBClusterSnapshot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDBClusterSnapshotMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteDBInstance.go b/service/docdb/api_op_DeleteDBInstance.go index b02a5492129..5ebe5a29d8c 100644 --- a/service/docdb/api_op_DeleteDBInstance.go +++ b/service/docdb/api_op_DeleteDBInstance.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteDBSubnetGroup.go b/service/docdb/api_op_DeleteDBSubnetGroup.go index 86999364dc4..88030f3389f 100644 --- a/service/docdb/api_op_DeleteDBSubnetGroup.go +++ b/service/docdb/api_op_DeleteDBSubnetGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteEventSubscription.go b/service/docdb/api_op_DeleteEventSubscription.go index b0331ec8da4..163498b6bd9 100644 --- a/service/docdb/api_op_DeleteEventSubscription.go +++ b/service/docdb/api_op_DeleteEventSubscription.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DeleteGlobalCluster.go b/service/docdb/api_op_DeleteGlobalCluster.go index 810403c55e8..8b4191ed0d6 100644 --- a/service/docdb/api_op_DeleteGlobalCluster.go +++ b/service/docdb/api_op_DeleteGlobalCluster.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DescribeCertificates.go b/service/docdb/api_op_DescribeCertificates.go index fc3ab465059..6671bd50955 100644 --- a/service/docdb/api_op_DescribeCertificates.go +++ b/service/docdb/api_op_DescribeCertificates.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeCertificatesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificatesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeCertificatesMiddlewares(stack *middleware.S return nil } -// DescribeCertificatesAPIClient is a client that implements the -// DescribeCertificates operation. -type DescribeCertificatesAPIClient interface { - DescribeCertificates(context.Context, *DescribeCertificatesInput, ...func(*Options)) (*DescribeCertificatesOutput, error) -} - -var _ DescribeCertificatesAPIClient = (*Client)(nil) - // DescribeCertificatesPaginatorOptions is the paginator options for // DescribeCertificates type DescribeCertificatesPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeCertificatesAPIClient is a client that implements the +// DescribeCertificates operation. +type DescribeCertificatesAPIClient interface { + DescribeCertificates(context.Context, *DescribeCertificatesInput, ...func(*Options)) (*DescribeCertificatesOutput, error) +} + +var _ DescribeCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBClusterParameterGroups.go b/service/docdb/api_op_DescribeDBClusterParameterGroups.go index 6687e62f39f..07ac577dc6c 100644 --- a/service/docdb/api_op_DescribeDBClusterParameterGroups.go +++ b/service/docdb/api_op_DescribeDBClusterParameterGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeDBClusterParameterGroupsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterParameterGroupsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeDBClusterParameterGroupsMiddlewares(stack * return nil } -// DescribeDBClusterParameterGroupsAPIClient is a client that implements the -// DescribeDBClusterParameterGroups operation. -type DescribeDBClusterParameterGroupsAPIClient interface { - DescribeDBClusterParameterGroups(context.Context, *DescribeDBClusterParameterGroupsInput, ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) -} - -var _ DescribeDBClusterParameterGroupsAPIClient = (*Client)(nil) - // DescribeDBClusterParameterGroupsPaginatorOptions is the paginator options for // DescribeDBClusterParameterGroups type DescribeDBClusterParameterGroupsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeDBClusterParameterGroupsAPIClient is a client that implements the +// DescribeDBClusterParameterGroups operation. +type DescribeDBClusterParameterGroupsAPIClient interface { + DescribeDBClusterParameterGroups(context.Context, *DescribeDBClusterParameterGroupsInput, ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) +} + +var _ DescribeDBClusterParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBClusterParameters.go b/service/docdb/api_op_DescribeDBClusterParameters.go index 373c5399fa0..19b59f693d8 100644 --- a/service/docdb/api_op_DescribeDBClusterParameters.go +++ b/service/docdb/api_op_DescribeDBClusterParameters.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeDBClusterParametersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterParametersValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationDescribeDBClusterParametersMiddlewares(stack *middl return nil } -// DescribeDBClusterParametersAPIClient is a client that implements the -// DescribeDBClusterParameters operation. -type DescribeDBClusterParametersAPIClient interface { - DescribeDBClusterParameters(context.Context, *DescribeDBClusterParametersInput, ...func(*Options)) (*DescribeDBClusterParametersOutput, error) -} - -var _ DescribeDBClusterParametersAPIClient = (*Client)(nil) - // DescribeDBClusterParametersPaginatorOptions is the paginator options for // DescribeDBClusterParameters type DescribeDBClusterParametersPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeDBClusterParametersAPIClient is a client that implements the +// DescribeDBClusterParameters operation. +type DescribeDBClusterParametersAPIClient interface { + DescribeDBClusterParameters(context.Context, *DescribeDBClusterParametersInput, ...func(*Options)) (*DescribeDBClusterParametersOutput, error) +} + +var _ DescribeDBClusterParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBClusterSnapshotAttributes.go b/service/docdb/api_op_DescribeDBClusterSnapshotAttributes.go index 1faf0e22c06..b86537df041 100644 --- a/service/docdb/api_op_DescribeDBClusterSnapshotAttributes.go +++ b/service/docdb/api_op_DescribeDBClusterSnapshotAttributes.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDBClusterSnapshotAttributesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterSnapshotAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DescribeDBClusterSnapshots.go b/service/docdb/api_op_DescribeDBClusterSnapshots.go index 775db6469b9..2e243ae96b7 100644 --- a/service/docdb/api_op_DescribeDBClusterSnapshots.go +++ b/service/docdb/api_op_DescribeDBClusterSnapshots.go @@ -183,6 +183,9 @@ func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterSnapshotsValidationMiddleware(stack); err != nil { return err } @@ -207,14 +210,6 @@ func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middle return nil } -// DescribeDBClusterSnapshotsAPIClient is a client that implements the -// DescribeDBClusterSnapshots operation. -type DescribeDBClusterSnapshotsAPIClient interface { - DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) -} - -var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil) - // DescribeDBClusterSnapshotsPaginatorOptions is the paginator options for // DescribeDBClusterSnapshots type DescribeDBClusterSnapshotsPaginatorOptions struct { @@ -287,6 +282,9 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -306,6 +304,14 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeDBClusterSnapshotsAPIClient is a client that implements the +// DescribeDBClusterSnapshots operation. +type DescribeDBClusterSnapshotsAPIClient interface { + DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) +} + +var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBClusters.go b/service/docdb/api_op_DescribeDBClusters.go index f04cfb59fad..90c58001c46 100644 --- a/service/docdb/api_op_DescribeDBClusters.go +++ b/service/docdb/api_op_DescribeDBClusters.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClustersValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Sta return nil } -// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters -// operation. -type DescribeDBClustersAPIClient interface { - DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error) -} - -var _ DescribeDBClustersAPIClient = (*Client)(nil) - // DescribeDBClustersPaginatorOptions is the paginator options for // DescribeDBClusters type DescribeDBClustersPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters +// operation. +type DescribeDBClustersAPIClient interface { + DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error) +} + +var _ DescribeDBClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBEngineVersions.go b/service/docdb/api_op_DescribeDBEngineVersions.go index 829d8744e86..a57a848d149 100644 --- a/service/docdb/api_op_DescribeDBEngineVersions.go +++ b/service/docdb/api_op_DescribeDBEngineVersions.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBEngineVersionsValidationMiddleware(stack); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middlewa return nil } -// DescribeDBEngineVersionsAPIClient is a client that implements the -// DescribeDBEngineVersions operation. -type DescribeDBEngineVersionsAPIClient interface { - DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) -} - -var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil) - // DescribeDBEngineVersionsPaginatorOptions is the paginator options for // DescribeDBEngineVersions type DescribeDBEngineVersionsPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDBEngineVersionsAPIClient is a client that implements the +// DescribeDBEngineVersions operation. +type DescribeDBEngineVersionsAPIClient interface { + DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) +} + +var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBInstances.go b/service/docdb/api_op_DescribeDBInstances.go index 91f808d99dd..862a4361483 100644 --- a/service/docdb/api_op_DescribeDBInstances.go +++ b/service/docdb/api_op_DescribeDBInstances.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBInstancesValidationMiddleware(stack); err != nil { return err } @@ -175,103 +178,6 @@ func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.St return nil } -// DescribeDBInstancesAPIClient is a client that implements the -// DescribeDBInstances operation. -type DescribeDBInstancesAPIClient interface { - DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error) -} - -var _ DescribeDBInstancesAPIClient = (*Client)(nil) - -// DescribeDBInstancesPaginatorOptions is the paginator options for -// DescribeDBInstances -type DescribeDBInstancesPaginatorOptions struct { - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token (marker) is - // included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances -type DescribeDBInstancesPaginator struct { - options DescribeDBInstancesPaginatorOptions - client DescribeDBInstancesAPIClient - params *DescribeDBInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator -func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator { - if params == nil { - params = &DescribeDBInstancesInput{} - } - - options := DescribeDBInstancesPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDBInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDBInstances page. -func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeDBInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DBInstanceAvailableWaiterOptions are waiter options for // DBInstanceAvailableWaiter type DBInstanceAvailableWaiterOptions struct { @@ -389,7 +295,13 @@ func (w *DBInstanceAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -697,7 +609,13 @@ func (w *DBInstanceDeletedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -878,6 +796,106 @@ func dBInstanceDeletedStateRetryable(ctx context.Context, input *DescribeDBInsta return true, nil } +// DescribeDBInstancesPaginatorOptions is the paginator options for +// DescribeDBInstances +type DescribeDBInstancesPaginatorOptions struct { + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token (marker) is + // included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances +type DescribeDBInstancesPaginator struct { + options DescribeDBInstancesPaginatorOptions + client DescribeDBInstancesAPIClient + params *DescribeDBInstancesInput + nextToken *string + firstPage bool +} + +// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator +func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator { + if params == nil { + params = &DescribeDBInstancesInput{} + } + + options := DescribeDBInstancesPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDBInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDBInstancesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDBInstances page. +func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDBInstances(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDBInstancesAPIClient is a client that implements the +// DescribeDBInstances operation. +type DescribeDBInstancesAPIClient interface { + DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error) +} + +var _ DescribeDBInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeDBSubnetGroups.go b/service/docdb/api_op_DescribeDBSubnetGroups.go index 45606d307cc..912187437fe 100644 --- a/service/docdb/api_op_DescribeDBSubnetGroups.go +++ b/service/docdb/api_op_DescribeDBSubnetGroups.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSubnetGroupsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware return nil } -// DescribeDBSubnetGroupsAPIClient is a client that implements the -// DescribeDBSubnetGroups operation. -type DescribeDBSubnetGroupsAPIClient interface { - DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) -} - -var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil) - // DescribeDBSubnetGroupsPaginatorOptions is the paginator options for // DescribeDBSubnetGroups type DescribeDBSubnetGroupsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeDBSubnetGroupsAPIClient is a client that implements the +// DescribeDBSubnetGroups operation. +type DescribeDBSubnetGroupsAPIClient interface { + DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) +} + +var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeEngineDefaultClusterParameters.go b/service/docdb/api_op_DescribeEngineDefaultClusterParameters.go index 553ce0572be..4531d2f6649 100644 --- a/service/docdb/api_op_DescribeEngineDefaultClusterParameters.go +++ b/service/docdb/api_op_DescribeEngineDefaultClusterParameters.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeEngineDefaultClusterParametersMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngineDefaultClusterParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DescribeEventCategories.go b/service/docdb/api_op_DescribeEventCategories.go index 5522bd5af65..43edb1eddd1 100644 --- a/service/docdb/api_op_DescribeEventCategories.go +++ b/service/docdb/api_op_DescribeEventCategories.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeEventCategoriesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventCategoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_DescribeEventSubscriptions.go b/service/docdb/api_op_DescribeEventSubscriptions.go index 7ba9aa810d1..6edb4c04bdf 100644 --- a/service/docdb/api_op_DescribeEventSubscriptions.go +++ b/service/docdb/api_op_DescribeEventSubscriptions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle return nil } -// DescribeEventSubscriptionsAPIClient is a client that implements the -// DescribeEventSubscriptions operation. -type DescribeEventSubscriptionsAPIClient interface { - DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) -} - -var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) - // DescribeEventSubscriptionsPaginatorOptions is the paginator options for // DescribeEventSubscriptions type DescribeEventSubscriptionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeEventSubscriptionsAPIClient is a client that implements the +// DescribeEventSubscriptions operation. +type DescribeEventSubscriptionsAPIClient interface { + DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) +} + +var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeEvents.go b/service/docdb/api_op_DescribeEvents.go index f33847a9a36..203950b88bf 100644 --- a/service/docdb/api_op_DescribeEvents.go +++ b/service/docdb/api_op_DescribeEvents.go @@ -175,6 +175,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventsValidationMiddleware(stack); err != nil { return err } @@ -199,14 +202,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of records to include in the response. If more records @@ -276,6 +271,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -295,6 +293,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeGlobalClusters.go b/service/docdb/api_op_DescribeGlobalClusters.go index 4c67e922a27..42a7fe8a3cb 100644 --- a/service/docdb/api_op_DescribeGlobalClusters.go +++ b/service/docdb/api_op_DescribeGlobalClusters.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGlobalClustersValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware return nil } -// DescribeGlobalClustersAPIClient is a client that implements the -// DescribeGlobalClusters operation. -type DescribeGlobalClustersAPIClient interface { - DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error) -} - -var _ DescribeGlobalClustersAPIClient = (*Client)(nil) - // DescribeGlobalClustersPaginatorOptions is the paginator options for // DescribeGlobalClusters type DescribeGlobalClustersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGlobalClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeGlobalClustersAPIClient is a client that implements the +// DescribeGlobalClusters operation. +type DescribeGlobalClustersAPIClient interface { + DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error) +} + +var _ DescribeGlobalClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGlobalClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go b/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go index 9de4411eeab..c1453038ecc 100644 --- a/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/docdb/api_op_DescribeOrderableDBInstanceOptions.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrderableDBInstanceOptionsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack return nil } -// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the -// DescribeOrderableDBInstanceOptions operation. -type DescribeOrderableDBInstanceOptionsAPIClient interface { - DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) -} - -var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil) - // DescribeOrderableDBInstanceOptionsPaginatorOptions is the paginator options for // DescribeOrderableDBInstanceOptions type DescribeOrderableDBInstanceOptionsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrderableDBInstanceOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the +// DescribeOrderableDBInstanceOptions operation. +type DescribeOrderableDBInstanceOptionsAPIClient interface { + DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) +} + +var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrderableDBInstanceOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_DescribePendingMaintenanceActions.go b/service/docdb/api_op_DescribePendingMaintenanceActions.go index 84af7311ceb..77c78cd29a3 100644 --- a/service/docdb/api_op_DescribePendingMaintenanceActions.go +++ b/service/docdb/api_op_DescribePendingMaintenanceActions.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePendingMaintenanceActionsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack return nil } -// DescribePendingMaintenanceActionsAPIClient is a client that implements the -// DescribePendingMaintenanceActions operation. -type DescribePendingMaintenanceActionsAPIClient interface { - DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) -} - -var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) - // DescribePendingMaintenanceActionsPaginatorOptions is the paginator options for // DescribePendingMaintenanceActions type DescribePendingMaintenanceActionsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePendingMaintenanceActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribePendingMaintenanceActionsAPIClient is a client that implements the +// DescribePendingMaintenanceActions operation. +type DescribePendingMaintenanceActionsAPIClient interface { + DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) +} + +var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePendingMaintenanceActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdb/api_op_FailoverDBCluster.go b/service/docdb/api_op_FailoverDBCluster.go index 09c15bf3c67..6361dd3f0a9 100644 --- a/service/docdb/api_op_FailoverDBCluster.go +++ b/service/docdb/api_op_FailoverDBCluster.go @@ -124,6 +124,9 @@ func (c *Client) addOperationFailoverDBClusterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFailoverDBCluster(options.Region), middleware.Before); err != nil { return err } diff --git a/service/docdb/api_op_ListTagsForResource.go b/service/docdb/api_op_ListTagsForResource.go index 5334b4cf737..4e01d136a45 100644 --- a/service/docdb/api_op_ListTagsForResource.go +++ b/service/docdb/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyDBCluster.go b/service/docdb/api_op_ModifyDBCluster.go index e109d48d58b..7fe3780f3aa 100644 --- a/service/docdb/api_op_ModifyDBCluster.go +++ b/service/docdb/api_op_ModifyDBCluster.go @@ -243,6 +243,9 @@ func (c *Client) addOperationModifyDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyDBClusterParameterGroup.go b/service/docdb/api_op_ModifyDBClusterParameterGroup.go index af18d1acbf5..24692059c8b 100644 --- a/service/docdb/api_op_ModifyDBClusterParameterGroup.go +++ b/service/docdb/api_op_ModifyDBClusterParameterGroup.go @@ -139,6 +139,9 @@ func (c *Client) addOperationModifyDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyDBClusterSnapshotAttribute.go b/service/docdb/api_op_ModifyDBClusterSnapshotAttribute.go index c9f08dbfede..38fc673396a 100644 --- a/service/docdb/api_op_ModifyDBClusterSnapshotAttribute.go +++ b/service/docdb/api_op_ModifyDBClusterSnapshotAttribute.go @@ -152,6 +152,9 @@ func (c *Client) addOperationModifyDBClusterSnapshotAttributeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyDBInstance.go b/service/docdb/api_op_ModifyDBInstance.go index 126f3a5aa55..e80e42593cc 100644 --- a/service/docdb/api_op_ModifyDBInstance.go +++ b/service/docdb/api_op_ModifyDBInstance.go @@ -221,6 +221,9 @@ func (c *Client) addOperationModifyDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyDBSubnetGroup.go b/service/docdb/api_op_ModifyDBSubnetGroup.go index ac67586e1f2..8090ede7a05 100644 --- a/service/docdb/api_op_ModifyDBSubnetGroup.go +++ b/service/docdb/api_op_ModifyDBSubnetGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationModifyDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyEventSubscription.go b/service/docdb/api_op_ModifyEventSubscription.go index 9fb069cabde..e9af6aae4a4 100644 --- a/service/docdb/api_op_ModifyEventSubscription.go +++ b/service/docdb/api_op_ModifyEventSubscription.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ModifyGlobalCluster.go b/service/docdb/api_op_ModifyGlobalCluster.go index e8f71c6286b..154fd78953e 100644 --- a/service/docdb/api_op_ModifyGlobalCluster.go +++ b/service/docdb/api_op_ModifyGlobalCluster.go @@ -133,6 +133,9 @@ func (c *Client) addOperationModifyGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_RebootDBInstance.go b/service/docdb/api_op_RebootDBInstance.go index 2f22057b3dd..cc6a90b8627 100644 --- a/service/docdb/api_op_RebootDBInstance.go +++ b/service/docdb/api_op_RebootDBInstance.go @@ -124,6 +124,9 @@ func (c *Client) addOperationRebootDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_RemoveFromGlobalCluster.go b/service/docdb/api_op_RemoveFromGlobalCluster.go index c9951bf4714..ee58a502910 100644 --- a/service/docdb/api_op_RemoveFromGlobalCluster.go +++ b/service/docdb/api_op_RemoveFromGlobalCluster.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRemoveFromGlobalClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFromGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_RemoveSourceIdentifierFromSubscription.go b/service/docdb/api_op_RemoveSourceIdentifierFromSubscription.go index 9d948b028c6..666b3857632 100644 --- a/service/docdb/api_op_RemoveSourceIdentifierFromSubscription.go +++ b/service/docdb/api_op_RemoveSourceIdentifierFromSubscription.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_RemoveTagsFromResource.go b/service/docdb/api_op_RemoveTagsFromResource.go index fc3d3cfb125..8803f74bae0 100644 --- a/service/docdb/api_op_RemoveTagsFromResource.go +++ b/service/docdb/api_op_RemoveTagsFromResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_ResetDBClusterParameterGroup.go b/service/docdb/api_op_ResetDBClusterParameterGroup.go index 225ecbc5acd..6d917383b90 100644 --- a/service/docdb/api_op_ResetDBClusterParameterGroup.go +++ b/service/docdb/api_op_ResetDBClusterParameterGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationResetDBClusterParameterGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_RestoreDBClusterFromSnapshot.go b/service/docdb/api_op_RestoreDBClusterFromSnapshot.go index 1b49910c284..5b29d7fef47 100644 --- a/service/docdb/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/docdb/api_op_RestoreDBClusterFromSnapshot.go @@ -225,6 +225,9 @@ func (c *Client) addOperationRestoreDBClusterFromSnapshotMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_RestoreDBClusterToPointInTime.go b/service/docdb/api_op_RestoreDBClusterToPointInTime.go index 73f97d97eb9..f245209fa01 100644 --- a/service/docdb/api_op_RestoreDBClusterToPointInTime.go +++ b/service/docdb/api_op_RestoreDBClusterToPointInTime.go @@ -234,6 +234,9 @@ func (c *Client) addOperationRestoreDBClusterToPointInTimeMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_StartDBCluster.go b/service/docdb/api_op_StartDBCluster.go index 9a6d3bbaef0..2df4eca7239 100644 --- a/service/docdb/api_op_StartDBCluster.go +++ b/service/docdb/api_op_StartDBCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStartDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_StopDBCluster.go b/service/docdb/api_op_StopDBCluster.go index 2350ae4821c..b90d857ff77 100644 --- a/service/docdb/api_op_StopDBCluster.go +++ b/service/docdb/api_op_StopDBCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopDBClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdb/api_op_SwitchoverGlobalCluster.go b/service/docdb/api_op_SwitchoverGlobalCluster.go index 0b18bf1d449..3ff5064d699 100644 --- a/service/docdb/api_op_SwitchoverGlobalCluster.go +++ b/service/docdb/api_op_SwitchoverGlobalCluster.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSwitchoverGlobalClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSwitchoverGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_client.go b/service/docdbelastic/api_client.go index 3d5b9b205c1..69ea0748f1c 100644 --- a/service/docdbelastic/api_client.go +++ b/service/docdbelastic/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/docdbelastic/api_op_CopyClusterSnapshot.go b/service/docdbelastic/api_op_CopyClusterSnapshot.go index 5dcc235d945..24104518d07 100644 --- a/service/docdbelastic/api_op_CopyClusterSnapshot.go +++ b/service/docdbelastic/api_op_CopyClusterSnapshot.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCopyClusterSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_CreateCluster.go b/service/docdbelastic/api_op_CreateCluster.go index 36cabb55d53..23b6629ea55 100644 --- a/service/docdbelastic/api_op_CreateCluster.go +++ b/service/docdbelastic/api_op_CreateCluster.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/docdbelastic/api_op_CreateClusterSnapshot.go b/service/docdbelastic/api_op_CreateClusterSnapshot.go index bee96e216dd..f2fcec59e29 100644 --- a/service/docdbelastic/api_op_CreateClusterSnapshot.go +++ b/service/docdbelastic/api_op_CreateClusterSnapshot.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_DeleteCluster.go b/service/docdbelastic/api_op_DeleteCluster.go index 749879d3bd2..f04f08814d9 100644 --- a/service/docdbelastic/api_op_DeleteCluster.go +++ b/service/docdbelastic/api_op_DeleteCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_DeleteClusterSnapshot.go b/service/docdbelastic/api_op_DeleteClusterSnapshot.go index 97a799b511f..ec75c4ccd2b 100644 --- a/service/docdbelastic/api_op_DeleteClusterSnapshot.go +++ b/service/docdbelastic/api_op_DeleteClusterSnapshot.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_GetCluster.go b/service/docdbelastic/api_op_GetCluster.go index b87e4e6ae4e..aa79547c3d1 100644 --- a/service/docdbelastic/api_op_GetCluster.go +++ b/service/docdbelastic/api_op_GetCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetClusterMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_GetClusterSnapshot.go b/service/docdbelastic/api_op_GetClusterSnapshot.go index 0c078fc8bb4..97352bdffa9 100644 --- a/service/docdbelastic/api_op_GetClusterSnapshot.go +++ b/service/docdbelastic/api_op_GetClusterSnapshot.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetClusterSnapshotMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_ListClusterSnapshots.go b/service/docdbelastic/api_op_ListClusterSnapshots.go index 92bf99d7f12..7cf4f289cc3 100644 --- a/service/docdbelastic/api_op_ListClusterSnapshots.go +++ b/service/docdbelastic/api_op_ListClusterSnapshots.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListClusterSnapshotsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusterSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListClusterSnapshotsMiddlewares(stack *middleware.S return nil } -// ListClusterSnapshotsAPIClient is a client that implements the -// ListClusterSnapshots operation. -type ListClusterSnapshotsAPIClient interface { - ListClusterSnapshots(context.Context, *ListClusterSnapshotsInput, ...func(*Options)) (*ListClusterSnapshotsOutput, error) -} - -var _ ListClusterSnapshotsAPIClient = (*Client)(nil) - // ListClusterSnapshotsPaginatorOptions is the paginator options for // ListClusterSnapshots type ListClusterSnapshotsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusterSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListClusterSnapshotsAPIClient is a client that implements the +// ListClusterSnapshots operation. +type ListClusterSnapshotsAPIClient interface { + ListClusterSnapshots(context.Context, *ListClusterSnapshotsInput, ...func(*Options)) (*ListClusterSnapshotsOutput, error) +} + +var _ ListClusterSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusterSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdbelastic/api_op_ListClusters.go b/service/docdbelastic/api_op_ListClusters.go index 55dc327e50f..8a01f80b418 100644 --- a/service/docdbelastic/api_op_ListClusters.go +++ b/service/docdbelastic/api_op_ListClusters.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // The maximum number of elastic cluster snapshot results to receive in the @@ -211,6 +207,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/docdbelastic/api_op_ListTagsForResource.go b/service/docdbelastic/api_op_ListTagsForResource.go index 88b3722bce3..eac1444e804 100644 --- a/service/docdbelastic/api_op_ListTagsForResource.go +++ b/service/docdbelastic/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_RestoreClusterFromSnapshot.go b/service/docdbelastic/api_op_RestoreClusterFromSnapshot.go index fa7b6b21244..bc9c05665cc 100644 --- a/service/docdbelastic/api_op_RestoreClusterFromSnapshot.go +++ b/service/docdbelastic/api_op_RestoreClusterFromSnapshot.go @@ -146,6 +146,9 @@ func (c *Client) addOperationRestoreClusterFromSnapshotMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreClusterFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_StartCluster.go b/service/docdbelastic/api_op_StartCluster.go index 4aa67c3c981..f19d38aaa63 100644 --- a/service/docdbelastic/api_op_StartCluster.go +++ b/service/docdbelastic/api_op_StartCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartClusterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_StopCluster.go b/service/docdbelastic/api_op_StopCluster.go index b18395cee1a..e1eed9af1cc 100644 --- a/service/docdbelastic/api_op_StopCluster.go +++ b/service/docdbelastic/api_op_StopCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopClusterMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_TagResource.go b/service/docdbelastic/api_op_TagResource.go index fcb456a5e63..8f2a8ceede8 100644 --- a/service/docdbelastic/api_op_TagResource.go +++ b/service/docdbelastic/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_UntagResource.go b/service/docdbelastic/api_op_UntagResource.go index 101986c472f..c5042f101ef 100644 --- a/service/docdbelastic/api_op_UntagResource.go +++ b/service/docdbelastic/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/docdbelastic/api_op_UpdateCluster.go b/service/docdbelastic/api_op_UpdateCluster.go index ba6ebfd0645..a319ea60c94 100644 --- a/service/docdbelastic/api_op_UpdateCluster.go +++ b/service/docdbelastic/api_op_UpdateCluster.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/drs/api_client.go b/service/drs/api_client.go index 03551bc9ce4..b365f9179c1 100644 --- a/service/drs/api_client.go +++ b/service/drs/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/drs/api_op_AssociateSourceNetworkStack.go b/service/drs/api_op_AssociateSourceNetworkStack.go index b8d7397a5ff..d5d98ac3a87 100644 --- a/service/drs/api_op_AssociateSourceNetworkStack.go +++ b/service/drs/api_op_AssociateSourceNetworkStack.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssociateSourceNetworkStackMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSourceNetworkStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_CreateExtendedSourceServer.go b/service/drs/api_op_CreateExtendedSourceServer.go index 2001d780935..94f0d3a785f 100644 --- a/service/drs/api_op_CreateExtendedSourceServer.go +++ b/service/drs/api_op_CreateExtendedSourceServer.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateExtendedSourceServerMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExtendedSourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_CreateLaunchConfigurationTemplate.go b/service/drs/api_op_CreateLaunchConfigurationTemplate.go index 581c450e170..41a0bae9d11 100644 --- a/service/drs/api_op_CreateLaunchConfigurationTemplate.go +++ b/service/drs/api_op_CreateLaunchConfigurationTemplate.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateLaunchConfigurationTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchConfigurationTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/drs/api_op_CreateReplicationConfigurationTemplate.go b/service/drs/api_op_CreateReplicationConfigurationTemplate.go index 424897a6b25..f460cf79d75 100644 --- a/service/drs/api_op_CreateReplicationConfigurationTemplate.go +++ b/service/drs/api_op_CreateReplicationConfigurationTemplate.go @@ -230,6 +230,9 @@ func (c *Client) addOperationCreateReplicationConfigurationTemplateMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_CreateSourceNetwork.go b/service/drs/api_op_CreateSourceNetwork.go index 412665ab967..25977a182fe 100644 --- a/service/drs/api_op_CreateSourceNetwork.go +++ b/service/drs/api_op_CreateSourceNetwork.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateSourceNetworkMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSourceNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteJob.go b/service/drs/api_op_DeleteJob.go index d6a4db90ebd..70315c36dce 100644 --- a/service/drs/api_op_DeleteJob.go +++ b/service/drs/api_op_DeleteJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteLaunchAction.go b/service/drs/api_op_DeleteLaunchAction.go index 7f622734d07..a05f8c457ce 100644 --- a/service/drs/api_op_DeleteLaunchAction.go +++ b/service/drs/api_op_DeleteLaunchAction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteLaunchActionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLaunchActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteLaunchConfigurationTemplate.go b/service/drs/api_op_DeleteLaunchConfigurationTemplate.go index f4c1451f6c4..f1cc9c05d67 100644 --- a/service/drs/api_op_DeleteLaunchConfigurationTemplate.go +++ b/service/drs/api_op_DeleteLaunchConfigurationTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteLaunchConfigurationTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLaunchConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteRecoveryInstance.go b/service/drs/api_op_DeleteRecoveryInstance.go index 7673a7715ec..e0cfa7d7539 100644 --- a/service/drs/api_op_DeleteRecoveryInstance.go +++ b/service/drs/api_op_DeleteRecoveryInstance.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteRecoveryInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecoveryInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteReplicationConfigurationTemplate.go b/service/drs/api_op_DeleteReplicationConfigurationTemplate.go index aacb72f08eb..4ea7da9b711 100644 --- a/service/drs/api_op_DeleteReplicationConfigurationTemplate.go +++ b/service/drs/api_op_DeleteReplicationConfigurationTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteReplicationConfigurationTemplateMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteSourceNetwork.go b/service/drs/api_op_DeleteSourceNetwork.go index 6482f64c31a..db449bbea88 100644 --- a/service/drs/api_op_DeleteSourceNetwork.go +++ b/service/drs/api_op_DeleteSourceNetwork.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSourceNetworkMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSourceNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DeleteSourceServer.go b/service/drs/api_op_DeleteSourceServer.go index 89dce088b0b..f1789ef3105 100644 --- a/service/drs/api_op_DeleteSourceServer.go +++ b/service/drs/api_op_DeleteSourceServer.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteSourceServerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DescribeJobLogItems.go b/service/drs/api_op_DescribeJobLogItems.go index fd52aa17279..d8583ee247b 100644 --- a/service/drs/api_op_DescribeJobLogItems.go +++ b/service/drs/api_op_DescribeJobLogItems.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeJobLogItemsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobLogItemsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeJobLogItemsMiddlewares(stack *middleware.St return nil } -// DescribeJobLogItemsAPIClient is a client that implements the -// DescribeJobLogItems operation. -type DescribeJobLogItemsAPIClient interface { - DescribeJobLogItems(context.Context, *DescribeJobLogItemsInput, ...func(*Options)) (*DescribeJobLogItemsOutput, error) -} - -var _ DescribeJobLogItemsAPIClient = (*Client)(nil) - // DescribeJobLogItemsPaginatorOptions is the paginator options for // DescribeJobLogItems type DescribeJobLogItemsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *DescribeJobLogItemsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeJobLogItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *DescribeJobLogItemsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeJobLogItemsAPIClient is a client that implements the +// DescribeJobLogItems operation. +type DescribeJobLogItemsAPIClient interface { + DescribeJobLogItems(context.Context, *DescribeJobLogItemsInput, ...func(*Options)) (*DescribeJobLogItemsOutput, error) +} + +var _ DescribeJobLogItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeJobLogItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeJobs.go b/service/drs/api_op_DescribeJobs.go index f2e7728e524..e4336239ebc 100644 --- a/service/drs/api_op_DescribeJobs.go +++ b/service/drs/api_op_DescribeJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeJobsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJobs(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationDescribeJobsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeJobsAPIClient is a client that implements the DescribeJobs operation. -type DescribeJobsAPIClient interface { - DescribeJobs(context.Context, *DescribeJobsInput, ...func(*Options)) (*DescribeJobsOutput, error) -} - -var _ DescribeJobsAPIClient = (*Client)(nil) - // DescribeJobsPaginatorOptions is the paginator options for DescribeJobs type DescribeJobsPaginatorOptions struct { // Maximum number of Jobs to retrieve. @@ -209,6 +205,9 @@ func (p *DescribeJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *DescribeJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeJobsAPIClient is a client that implements the DescribeJobs operation. +type DescribeJobsAPIClient interface { + DescribeJobs(context.Context, *DescribeJobsInput, ...func(*Options)) (*DescribeJobsOutput, error) +} + +var _ DescribeJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeLaunchConfigurationTemplates.go b/service/drs/api_op_DescribeLaunchConfigurationTemplates.go index d66145dab68..1fcdf03d137 100644 --- a/service/drs/api_op_DescribeLaunchConfigurationTemplates.go +++ b/service/drs/api_op_DescribeLaunchConfigurationTemplates.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeLaunchConfigurationTemplatesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchConfigurationTemplates(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeLaunchConfigurationTemplatesMiddlewares(sta return nil } -// DescribeLaunchConfigurationTemplatesAPIClient is a client that implements the -// DescribeLaunchConfigurationTemplates operation. -type DescribeLaunchConfigurationTemplatesAPIClient interface { - DescribeLaunchConfigurationTemplates(context.Context, *DescribeLaunchConfigurationTemplatesInput, ...func(*Options)) (*DescribeLaunchConfigurationTemplatesOutput, error) -} - -var _ DescribeLaunchConfigurationTemplatesAPIClient = (*Client)(nil) - // DescribeLaunchConfigurationTemplatesPaginatorOptions is the paginator options // for DescribeLaunchConfigurationTemplates type DescribeLaunchConfigurationTemplatesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeLaunchConfigurationTemplatesPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLaunchConfigurationTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeLaunchConfigurationTemplatesPaginator) NextPage(ctx context.Con return result, nil } +// DescribeLaunchConfigurationTemplatesAPIClient is a client that implements the +// DescribeLaunchConfigurationTemplates operation. +type DescribeLaunchConfigurationTemplatesAPIClient interface { + DescribeLaunchConfigurationTemplates(context.Context, *DescribeLaunchConfigurationTemplatesInput, ...func(*Options)) (*DescribeLaunchConfigurationTemplatesOutput, error) +} + +var _ DescribeLaunchConfigurationTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLaunchConfigurationTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeRecoveryInstances.go b/service/drs/api_op_DescribeRecoveryInstances.go index 50df813ef3a..0a63032ce0a 100644 --- a/service/drs/api_op_DescribeRecoveryInstances.go +++ b/service/drs/api_op_DescribeRecoveryInstances.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeRecoveryInstancesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRecoveryInstances(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribeRecoveryInstancesMiddlewares(stack *middlew return nil } -// DescribeRecoveryInstancesAPIClient is a client that implements the -// DescribeRecoveryInstances operation. -type DescribeRecoveryInstancesAPIClient interface { - DescribeRecoveryInstances(context.Context, *DescribeRecoveryInstancesInput, ...func(*Options)) (*DescribeRecoveryInstancesOutput, error) -} - -var _ DescribeRecoveryInstancesAPIClient = (*Client)(nil) - // DescribeRecoveryInstancesPaginatorOptions is the paginator options for // DescribeRecoveryInstances type DescribeRecoveryInstancesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *DescribeRecoveryInstancesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRecoveryInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *DescribeRecoveryInstancesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeRecoveryInstancesAPIClient is a client that implements the +// DescribeRecoveryInstances operation. +type DescribeRecoveryInstancesAPIClient interface { + DescribeRecoveryInstances(context.Context, *DescribeRecoveryInstancesInput, ...func(*Options)) (*DescribeRecoveryInstancesOutput, error) +} + +var _ DescribeRecoveryInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRecoveryInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeRecoverySnapshots.go b/service/drs/api_op_DescribeRecoverySnapshots.go index 58d162ea118..3425859555b 100644 --- a/service/drs/api_op_DescribeRecoverySnapshots.go +++ b/service/drs/api_op_DescribeRecoverySnapshots.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeRecoverySnapshotsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecoverySnapshotsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeRecoverySnapshotsMiddlewares(stack *middlew return nil } -// DescribeRecoverySnapshotsAPIClient is a client that implements the -// DescribeRecoverySnapshots operation. -type DescribeRecoverySnapshotsAPIClient interface { - DescribeRecoverySnapshots(context.Context, *DescribeRecoverySnapshotsInput, ...func(*Options)) (*DescribeRecoverySnapshotsOutput, error) -} - -var _ DescribeRecoverySnapshotsAPIClient = (*Client)(nil) - // DescribeRecoverySnapshotsPaginatorOptions is the paginator options for // DescribeRecoverySnapshots type DescribeRecoverySnapshotsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeRecoverySnapshotsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRecoverySnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeRecoverySnapshotsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeRecoverySnapshotsAPIClient is a client that implements the +// DescribeRecoverySnapshots operation. +type DescribeRecoverySnapshotsAPIClient interface { + DescribeRecoverySnapshots(context.Context, *DescribeRecoverySnapshotsInput, ...func(*Options)) (*DescribeRecoverySnapshotsOutput, error) +} + +var _ DescribeRecoverySnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRecoverySnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeReplicationConfigurationTemplates.go b/service/drs/api_op_DescribeReplicationConfigurationTemplates.go index 7c0c10e44b6..ac7d1bd9e6e 100644 --- a/service/drs/api_op_DescribeReplicationConfigurationTemplates.go +++ b/service/drs/api_op_DescribeReplicationConfigurationTemplates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeReplicationConfigurationTemplatesMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplicationConfigurationTemplates(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationDescribeReplicationConfigurationTemplatesMiddleware return nil } -// DescribeReplicationConfigurationTemplatesAPIClient is a client that implements -// the DescribeReplicationConfigurationTemplates operation. -type DescribeReplicationConfigurationTemplatesAPIClient interface { - DescribeReplicationConfigurationTemplates(context.Context, *DescribeReplicationConfigurationTemplatesInput, ...func(*Options)) (*DescribeReplicationConfigurationTemplatesOutput, error) -} - -var _ DescribeReplicationConfigurationTemplatesAPIClient = (*Client)(nil) - // DescribeReplicationConfigurationTemplatesPaginatorOptions is the paginator // options for DescribeReplicationConfigurationTemplates type DescribeReplicationConfigurationTemplatesPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeReplicationConfigurationTemplatesPaginator) NextPage(ctx contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationConfigurationTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeReplicationConfigurationTemplatesPaginator) NextPage(ctx contex return result, nil } +// DescribeReplicationConfigurationTemplatesAPIClient is a client that implements +// the DescribeReplicationConfigurationTemplates operation. +type DescribeReplicationConfigurationTemplatesAPIClient interface { + DescribeReplicationConfigurationTemplates(context.Context, *DescribeReplicationConfigurationTemplatesInput, ...func(*Options)) (*DescribeReplicationConfigurationTemplatesOutput, error) +} + +var _ DescribeReplicationConfigurationTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationConfigurationTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeSourceNetworks.go b/service/drs/api_op_DescribeSourceNetworks.go index dfe1ec61aa0..a7862825c9b 100644 --- a/service/drs/api_op_DescribeSourceNetworks.go +++ b/service/drs/api_op_DescribeSourceNetworks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeSourceNetworksMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSourceNetworks(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribeSourceNetworksMiddlewares(stack *middleware return nil } -// DescribeSourceNetworksAPIClient is a client that implements the -// DescribeSourceNetworks operation. -type DescribeSourceNetworksAPIClient interface { - DescribeSourceNetworks(context.Context, *DescribeSourceNetworksInput, ...func(*Options)) (*DescribeSourceNetworksOutput, error) -} - -var _ DescribeSourceNetworksAPIClient = (*Client)(nil) - // DescribeSourceNetworksPaginatorOptions is the paginator options for // DescribeSourceNetworks type DescribeSourceNetworksPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *DescribeSourceNetworksPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSourceNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *DescribeSourceNetworksPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeSourceNetworksAPIClient is a client that implements the +// DescribeSourceNetworks operation. +type DescribeSourceNetworksAPIClient interface { + DescribeSourceNetworks(context.Context, *DescribeSourceNetworksInput, ...func(*Options)) (*DescribeSourceNetworksOutput, error) +} + +var _ DescribeSourceNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSourceNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DescribeSourceServers.go b/service/drs/api_op_DescribeSourceServers.go index 9a48c667d56..efbac811643 100644 --- a/service/drs/api_op_DescribeSourceServers.go +++ b/service/drs/api_op_DescribeSourceServers.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeSourceServersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSourceServers(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribeSourceServersMiddlewares(stack *middleware. return nil } -// DescribeSourceServersAPIClient is a client that implements the -// DescribeSourceServers operation. -type DescribeSourceServersAPIClient interface { - DescribeSourceServers(context.Context, *DescribeSourceServersInput, ...func(*Options)) (*DescribeSourceServersOutput, error) -} - -var _ DescribeSourceServersAPIClient = (*Client)(nil) - // DescribeSourceServersPaginatorOptions is the paginator options for // DescribeSourceServers type DescribeSourceServersPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *DescribeSourceServersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSourceServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *DescribeSourceServersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeSourceServersAPIClient is a client that implements the +// DescribeSourceServers operation. +type DescribeSourceServersAPIClient interface { + DescribeSourceServers(context.Context, *DescribeSourceServersInput, ...func(*Options)) (*DescribeSourceServersOutput, error) +} + +var _ DescribeSourceServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSourceServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_DisconnectRecoveryInstance.go b/service/drs/api_op_DisconnectRecoveryInstance.go index e18eedbeb39..ace4afbe45f 100644 --- a/service/drs/api_op_DisconnectRecoveryInstance.go +++ b/service/drs/api_op_DisconnectRecoveryInstance.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisconnectRecoveryInstanceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisconnectRecoveryInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_DisconnectSourceServer.go b/service/drs/api_op_DisconnectSourceServer.go index 6075465a544..5bffdbcd062 100644 --- a/service/drs/api_op_DisconnectSourceServer.go +++ b/service/drs/api_op_DisconnectSourceServer.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDisconnectSourceServerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisconnectSourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_ExportSourceNetworkCfnTemplate.go b/service/drs/api_op_ExportSourceNetworkCfnTemplate.go index 0b348c885b2..38389c8f3ff 100644 --- a/service/drs/api_op_ExportSourceNetworkCfnTemplate.go +++ b/service/drs/api_op_ExportSourceNetworkCfnTemplate.go @@ -105,6 +105,9 @@ func (c *Client) addOperationExportSourceNetworkCfnTemplateMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportSourceNetworkCfnTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_GetFailbackReplicationConfiguration.go b/service/drs/api_op_GetFailbackReplicationConfiguration.go index 1273b8f5752..56697c12b95 100644 --- a/service/drs/api_op_GetFailbackReplicationConfiguration.go +++ b/service/drs/api_op_GetFailbackReplicationConfiguration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetFailbackReplicationConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFailbackReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_GetLaunchConfiguration.go b/service/drs/api_op_GetLaunchConfiguration.go index 142ac8772e2..77448730de5 100644 --- a/service/drs/api_op_GetLaunchConfiguration.go +++ b/service/drs/api_op_GetLaunchConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetLaunchConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_GetReplicationConfiguration.go b/service/drs/api_op_GetReplicationConfiguration.go index 3ff767e3091..5afd7e1368e 100644 --- a/service/drs/api_op_GetReplicationConfiguration.go +++ b/service/drs/api_op_GetReplicationConfiguration.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetReplicationConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_InitializeService.go b/service/drs/api_op_InitializeService.go index 70197258ffd..e3702bd76a9 100644 --- a/service/drs/api_op_InitializeService.go +++ b/service/drs/api_op_InitializeService.go @@ -95,6 +95,9 @@ func (c *Client) addOperationInitializeServiceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInitializeService(options.Region), middleware.Before); err != nil { return err } diff --git a/service/drs/api_op_ListExtensibleSourceServers.go b/service/drs/api_op_ListExtensibleSourceServers.go index f50daee3ddd..ff7f56ed28f 100644 --- a/service/drs/api_op_ListExtensibleSourceServers.go +++ b/service/drs/api_op_ListExtensibleSourceServers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListExtensibleSourceServersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExtensibleSourceServersValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListExtensibleSourceServersMiddlewares(stack *middl return nil } -// ListExtensibleSourceServersAPIClient is a client that implements the -// ListExtensibleSourceServers operation. -type ListExtensibleSourceServersAPIClient interface { - ListExtensibleSourceServers(context.Context, *ListExtensibleSourceServersInput, ...func(*Options)) (*ListExtensibleSourceServersOutput, error) -} - -var _ ListExtensibleSourceServersAPIClient = (*Client)(nil) - // ListExtensibleSourceServersPaginatorOptions is the paginator options for // ListExtensibleSourceServers type ListExtensibleSourceServersPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListExtensibleSourceServersPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExtensibleSourceServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListExtensibleSourceServersPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListExtensibleSourceServersAPIClient is a client that implements the +// ListExtensibleSourceServers operation. +type ListExtensibleSourceServersAPIClient interface { + ListExtensibleSourceServers(context.Context, *ListExtensibleSourceServersInput, ...func(*Options)) (*ListExtensibleSourceServersOutput, error) +} + +var _ ListExtensibleSourceServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExtensibleSourceServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_ListLaunchActions.go b/service/drs/api_op_ListLaunchActions.go index 3503db85ab1..b807a82377f 100644 --- a/service/drs/api_op_ListLaunchActions.go +++ b/service/drs/api_op_ListLaunchActions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListLaunchActionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLaunchActionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListLaunchActionsMiddlewares(stack *middleware.Stac return nil } -// ListLaunchActionsAPIClient is a client that implements the ListLaunchActions -// operation. -type ListLaunchActionsAPIClient interface { - ListLaunchActions(context.Context, *ListLaunchActionsInput, ...func(*Options)) (*ListLaunchActionsOutput, error) -} - -var _ ListLaunchActionsAPIClient = (*Client)(nil) - // ListLaunchActionsPaginatorOptions is the paginator options for ListLaunchActions type ListLaunchActionsPaginatorOptions struct { // Maximum amount of items to return when listing resource launch actions. @@ -213,6 +208,9 @@ func (p *ListLaunchActionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLaunchActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListLaunchActionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListLaunchActionsAPIClient is a client that implements the ListLaunchActions +// operation. +type ListLaunchActionsAPIClient interface { + ListLaunchActions(context.Context, *ListLaunchActionsInput, ...func(*Options)) (*ListLaunchActionsOutput, error) +} + +var _ ListLaunchActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLaunchActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_ListStagingAccounts.go b/service/drs/api_op_ListStagingAccounts.go index 61de82f276c..620e7c53a27 100644 --- a/service/drs/api_op_ListStagingAccounts.go +++ b/service/drs/api_op_ListStagingAccounts.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListStagingAccountsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStagingAccounts(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListStagingAccountsMiddlewares(stack *middleware.St return nil } -// ListStagingAccountsAPIClient is a client that implements the -// ListStagingAccounts operation. -type ListStagingAccountsAPIClient interface { - ListStagingAccounts(context.Context, *ListStagingAccountsInput, ...func(*Options)) (*ListStagingAccountsOutput, error) -} - -var _ ListStagingAccountsAPIClient = (*Client)(nil) - // ListStagingAccountsPaginatorOptions is the paginator options for // ListStagingAccounts type ListStagingAccountsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListStagingAccountsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStagingAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListStagingAccountsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListStagingAccountsAPIClient is a client that implements the +// ListStagingAccounts operation. +type ListStagingAccountsAPIClient interface { + ListStagingAccounts(context.Context, *ListStagingAccountsInput, ...func(*Options)) (*ListStagingAccountsOutput, error) +} + +var _ ListStagingAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStagingAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/drs/api_op_ListTagsForResource.go b/service/drs/api_op_ListTagsForResource.go index bd14ee628ee..954b5cb80f0 100644 --- a/service/drs/api_op_ListTagsForResource.go +++ b/service/drs/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_PutLaunchAction.go b/service/drs/api_op_PutLaunchAction.go index 110f5b620c6..1a7268bc06e 100644 --- a/service/drs/api_op_PutLaunchAction.go +++ b/service/drs/api_op_PutLaunchAction.go @@ -187,6 +187,9 @@ func (c *Client) addOperationPutLaunchActionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLaunchActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_RetryDataReplication.go b/service/drs/api_op_RetryDataReplication.go index 44adb37e7eb..70f1eeb05f4 100644 --- a/service/drs/api_op_RetryDataReplication.go +++ b/service/drs/api_op_RetryDataReplication.go @@ -153,6 +153,9 @@ func (c *Client) addOperationRetryDataReplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetryDataReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_ReverseReplication.go b/service/drs/api_op_ReverseReplication.go index 07d81a87b40..3436b6b3e5f 100644 --- a/service/drs/api_op_ReverseReplication.go +++ b/service/drs/api_op_ReverseReplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationReverseReplicationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReverseReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StartFailbackLaunch.go b/service/drs/api_op_StartFailbackLaunch.go index 3a2254ec9f5..f9677f32340 100644 --- a/service/drs/api_op_StartFailbackLaunch.go +++ b/service/drs/api_op_StartFailbackLaunch.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartFailbackLaunchMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFailbackLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StartRecovery.go b/service/drs/api_op_StartRecovery.go index c9d3f1fbe65..990b2a90774 100644 --- a/service/drs/api_op_StartRecovery.go +++ b/service/drs/api_op_StartRecovery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartRecoveryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRecoveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StartReplication.go b/service/drs/api_op_StartReplication.go index c6c2ef33635..eafab2a4d2c 100644 --- a/service/drs/api_op_StartReplication.go +++ b/service/drs/api_op_StartReplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartReplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StartSourceNetworkRecovery.go b/service/drs/api_op_StartSourceNetworkRecovery.go index 410ea12568a..dfe6684f3bf 100644 --- a/service/drs/api_op_StartSourceNetworkRecovery.go +++ b/service/drs/api_op_StartSourceNetworkRecovery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartSourceNetworkRecoveryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSourceNetworkRecoveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StartSourceNetworkReplication.go b/service/drs/api_op_StartSourceNetworkReplication.go index 2a667ba3edf..cb4da8ca2af 100644 --- a/service/drs/api_op_StartSourceNetworkReplication.go +++ b/service/drs/api_op_StartSourceNetworkReplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartSourceNetworkReplicationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSourceNetworkReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StopFailback.go b/service/drs/api_op_StopFailback.go index 912021ad1e8..36200c6bc9c 100644 --- a/service/drs/api_op_StopFailback.go +++ b/service/drs/api_op_StopFailback.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStopFailbackMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopFailbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StopReplication.go b/service/drs/api_op_StopReplication.go index b1b9bfe602a..857bdbb0687 100644 --- a/service/drs/api_op_StopReplication.go +++ b/service/drs/api_op_StopReplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopReplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_StopSourceNetworkReplication.go b/service/drs/api_op_StopSourceNetworkReplication.go index 79de3485748..e264abaf84a 100644 --- a/service/drs/api_op_StopSourceNetworkReplication.go +++ b/service/drs/api_op_StopSourceNetworkReplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopSourceNetworkReplicationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSourceNetworkReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_TagResource.go b/service/drs/api_op_TagResource.go index dab55a6c2f6..238ded1425a 100644 --- a/service/drs/api_op_TagResource.go +++ b/service/drs/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_TerminateRecoveryInstances.go b/service/drs/api_op_TerminateRecoveryInstances.go index 5ce567cd927..ca5091d0f9b 100644 --- a/service/drs/api_op_TerminateRecoveryInstances.go +++ b/service/drs/api_op_TerminateRecoveryInstances.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTerminateRecoveryInstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateRecoveryInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_UntagResource.go b/service/drs/api_op_UntagResource.go index c0be3e0c6c8..2a07117968f 100644 --- a/service/drs/api_op_UntagResource.go +++ b/service/drs/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_UpdateFailbackReplicationConfiguration.go b/service/drs/api_op_UpdateFailbackReplicationConfiguration.go index 8974285014f..1169deb9f13 100644 --- a/service/drs/api_op_UpdateFailbackReplicationConfiguration.go +++ b/service/drs/api_op_UpdateFailbackReplicationConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateFailbackReplicationConfigurationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFailbackReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_UpdateLaunchConfiguration.go b/service/drs/api_op_UpdateLaunchConfiguration.go index 3b5536cfb0a..0404730d6ef 100644 --- a/service/drs/api_op_UpdateLaunchConfiguration.go +++ b/service/drs/api_op_UpdateLaunchConfiguration.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateLaunchConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLaunchConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_UpdateLaunchConfigurationTemplate.go b/service/drs/api_op_UpdateLaunchConfigurationTemplate.go index 431aa6cbce8..dd02e294f87 100644 --- a/service/drs/api_op_UpdateLaunchConfigurationTemplate.go +++ b/service/drs/api_op_UpdateLaunchConfigurationTemplate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateLaunchConfigurationTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLaunchConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_UpdateReplicationConfiguration.go b/service/drs/api_op_UpdateReplicationConfiguration.go index a12bedbf5bd..c18d75186cd 100644 --- a/service/drs/api_op_UpdateReplicationConfiguration.go +++ b/service/drs/api_op_UpdateReplicationConfiguration.go @@ -210,6 +210,9 @@ func (c *Client) addOperationUpdateReplicationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/drs/api_op_UpdateReplicationConfigurationTemplate.go b/service/drs/api_op_UpdateReplicationConfigurationTemplate.go index d8d7e2b9e01..bf5324db3d3 100644 --- a/service/drs/api_op_UpdateReplicationConfigurationTemplate.go +++ b/service/drs/api_op_UpdateReplicationConfigurationTemplate.go @@ -210,6 +210,9 @@ func (c *Client) addOperationUpdateReplicationConfigurationTemplateMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReplicationConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_client.go b/service/dynamodb/api_client.go index f4c43fea74e..2bb5801fa21 100644 --- a/service/dynamodb/api_client.go +++ b/service/dynamodb/api_client.go @@ -467,6 +467,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -641,6 +665,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/dynamodb/api_op_BatchExecuteStatement.go b/service/dynamodb/api_op_BatchExecuteStatement.go index 92d74aff1fa..c1bb300b786 100644 --- a/service/dynamodb/api_op_BatchExecuteStatement.go +++ b/service/dynamodb/api_op_BatchExecuteStatement.go @@ -140,6 +140,9 @@ func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchExecuteStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_BatchGetItem.go b/service/dynamodb/api_op_BatchGetItem.go index da8671fd4bf..d8581acb831 100644 --- a/service/dynamodb/api_op_BatchGetItem.go +++ b/service/dynamodb/api_op_BatchGetItem.go @@ -277,6 +277,9 @@ func (c *Client) addOperationBatchGetItemMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_BatchWriteItem.go b/service/dynamodb/api_op_BatchWriteItem.go index 85d138fa8bb..7730d1f7019 100644 --- a/service/dynamodb/api_op_BatchWriteItem.go +++ b/service/dynamodb/api_op_BatchWriteItem.go @@ -297,6 +297,9 @@ func (c *Client) addOperationBatchWriteItemMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchWriteItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_CreateBackup.go b/service/dynamodb/api_op_CreateBackup.go index c68b9ac626c..6f0e92ddd3e 100644 --- a/service/dynamodb/api_op_CreateBackup.go +++ b/service/dynamodb/api_op_CreateBackup.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_CreateGlobalTable.go b/service/dynamodb/api_op_CreateGlobalTable.go index 11c082bccb6..d0d91dd6761 100644 --- a/service/dynamodb/api_op_CreateGlobalTable.go +++ b/service/dynamodb/api_op_CreateGlobalTable.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateGlobalTableMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGlobalTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_CreateTable.go b/service/dynamodb/api_op_CreateTable.go index d3487c2d545..aee3578760e 100644 --- a/service/dynamodb/api_op_CreateTable.go +++ b/service/dynamodb/api_op_CreateTable.go @@ -322,6 +322,9 @@ func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DeleteBackup.go b/service/dynamodb/api_op_DeleteBackup.go index fdd033fadee..8f381639e98 100644 --- a/service/dynamodb/api_op_DeleteBackup.go +++ b/service/dynamodb/api_op_DeleteBackup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DeleteItem.go b/service/dynamodb/api_op_DeleteItem.go index 6abf521488e..8e56c3f2bbe 100644 --- a/service/dynamodb/api_op_DeleteItem.go +++ b/service/dynamodb/api_op_DeleteItem.go @@ -308,6 +308,9 @@ func (c *Client) addOperationDeleteItemMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DeleteResourcePolicy.go b/service/dynamodb/api_op_DeleteResourcePolicy.go index 81ffd81d2df..eabdff7ce2d 100644 --- a/service/dynamodb/api_op_DeleteResourcePolicy.go +++ b/service/dynamodb/api_op_DeleteResourcePolicy.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DeleteTable.go b/service/dynamodb/api_op_DeleteTable.go index a4c370dec77..1ad08d85aeb 100644 --- a/service/dynamodb/api_op_DeleteTable.go +++ b/service/dynamodb/api_op_DeleteTable.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeBackup.go b/service/dynamodb/api_op_DescribeBackup.go index cd7fbddb1c2..d5a1a308cc3 100644 --- a/service/dynamodb/api_op_DescribeBackup.go +++ b/service/dynamodb/api_op_DescribeBackup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeBackupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeContinuousBackups.go b/service/dynamodb/api_op_DescribeContinuousBackups.go index e3f82c58c4d..44b6c1c2c62 100644 --- a/service/dynamodb/api_op_DescribeContinuousBackups.go +++ b/service/dynamodb/api_op_DescribeContinuousBackups.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeContinuousBackupsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContinuousBackupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeContributorInsights.go b/service/dynamodb/api_op_DescribeContributorInsights.go index a0929fc2007..1dc102910d6 100644 --- a/service/dynamodb/api_op_DescribeContributorInsights.go +++ b/service/dynamodb/api_op_DescribeContributorInsights.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeContributorInsightsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContributorInsightsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeEndpoints.go b/service/dynamodb/api_op_DescribeEndpoints.go index 6ab40647d6b..f3cb6578f5b 100644 --- a/service/dynamodb/api_op_DescribeEndpoints.go +++ b/service/dynamodb/api_op_DescribeEndpoints.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeExport.go b/service/dynamodb/api_op_DescribeExport.go index d36467e907f..50c046d4f08 100644 --- a/service/dynamodb/api_op_DescribeExport.go +++ b/service/dynamodb/api_op_DescribeExport.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeExportMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeGlobalTable.go b/service/dynamodb/api_op_DescribeGlobalTable.go index 385f584b2c5..fa1a06b6f07 100644 --- a/service/dynamodb/api_op_DescribeGlobalTable.go +++ b/service/dynamodb/api_op_DescribeGlobalTable.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeGlobalTableMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGlobalTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeGlobalTableSettings.go b/service/dynamodb/api_op_DescribeGlobalTableSettings.go index 62a152ed945..82ec90045a1 100644 --- a/service/dynamodb/api_op_DescribeGlobalTableSettings.go +++ b/service/dynamodb/api_op_DescribeGlobalTableSettings.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeGlobalTableSettingsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGlobalTableSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeImport.go b/service/dynamodb/api_op_DescribeImport.go index 4f9bc2a3813..d5c038becc8 100644 --- a/service/dynamodb/api_op_DescribeImport.go +++ b/service/dynamodb/api_op_DescribeImport.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeImportMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go b/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go index a083722d2c1..f56f025991f 100644 --- a/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_DescribeKinesisStreamingDestination.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeKinesisStreamingDestinationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKinesisStreamingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeLimits.go b/service/dynamodb/api_op_DescribeLimits.go index 65a481dde5a..a66ff0f1d50 100644 --- a/service/dynamodb/api_op_DescribeLimits.go +++ b/service/dynamodb/api_op_DescribeLimits.go @@ -179,6 +179,9 @@ func (c *Client) addOperationDescribeLimitsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeTable.go b/service/dynamodb/api_op_DescribeTable.go index 7d0d92a0c09..80548a34284 100644 --- a/service/dynamodb/api_op_DescribeTable.go +++ b/service/dynamodb/api_op_DescribeTable.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTableValidationMiddleware(stack); err != nil { return err } @@ -158,56 +161,6 @@ func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, o return nil } -func addOpDescribeTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - }, - }, - DiscoverOperation: c.fetchOpDescribeTableDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: false, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*DescribeTableInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("DynamoDB.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - return internalEndpointDiscovery.WeightedAddress{}, nil -} - -// DescribeTableAPIClient is a client that implements the DescribeTable operation. -type DescribeTableAPIClient interface { - DescribeTable(context.Context, *DescribeTableInput, ...func(*Options)) (*DescribeTableOutput, error) -} - -var _ DescribeTableAPIClient = (*Client)(nil) - // TableExistsWaiterOptions are waiter options for TableExistsWaiter type TableExistsWaiterOptions struct { @@ -322,7 +275,13 @@ func (w *TableExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeT } out, err := w.client.DescribeTable(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -502,7 +461,13 @@ func (w *TableNotExistsWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeTable(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -550,6 +515,56 @@ func tableNotExistsStateRetryable(ctx context.Context, input *DescribeTableInput return true, nil } +func addOpDescribeTableDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + }, + }, + DiscoverOperation: c.fetchOpDescribeTableDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: false, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpDescribeTableDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*DescribeTableInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("DynamoDB.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + return internalEndpointDiscovery.WeightedAddress{}, nil +} + +// DescribeTableAPIClient is a client that implements the DescribeTable operation. +type DescribeTableAPIClient interface { + DescribeTable(context.Context, *DescribeTableInput, ...func(*Options)) (*DescribeTableOutput, error) +} + +var _ DescribeTableAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go b/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go index 9579d5790ac..3eee5ea572d 100644 --- a/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go +++ b/service/dynamodb/api_op_DescribeTableReplicaAutoScaling.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeTableReplicaAutoScalingMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTableReplicaAutoScalingValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DescribeTimeToLive.go b/service/dynamodb/api_op_DescribeTimeToLive.go index a93b6e14962..d3368ee57da 100644 --- a/service/dynamodb/api_op_DescribeTimeToLive.go +++ b/service/dynamodb/api_op_DescribeTimeToLive.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeTimeToLiveMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTimeToLiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_DisableKinesisStreamingDestination.go b/service/dynamodb/api_op_DisableKinesisStreamingDestination.go index 9372836f861..e8bd9dff6d9 100644 --- a/service/dynamodb/api_op_DisableKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_DisableKinesisStreamingDestination.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDisableKinesisStreamingDestinationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableKinesisStreamingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_EnableKinesisStreamingDestination.go b/service/dynamodb/api_op_EnableKinesisStreamingDestination.go index 9d547884379..a63c4cdaa8c 100644 --- a/service/dynamodb/api_op_EnableKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_EnableKinesisStreamingDestination.go @@ -131,6 +131,9 @@ func (c *Client) addOperationEnableKinesisStreamingDestinationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableKinesisStreamingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_ExecuteStatement.go b/service/dynamodb/api_op_ExecuteStatement.go index 0837755f08e..b1a7ba049d9 100644 --- a/service/dynamodb/api_op_ExecuteStatement.go +++ b/service/dynamodb/api_op_ExecuteStatement.go @@ -190,6 +190,9 @@ func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_ExecuteTransaction.go b/service/dynamodb/api_op_ExecuteTransaction.go index afa4af25956..89d8d043e82 100644 --- a/service/dynamodb/api_op_ExecuteTransaction.go +++ b/service/dynamodb/api_op_ExecuteTransaction.go @@ -129,6 +129,9 @@ func (c *Client) addOperationExecuteTransactionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExecuteTransactionMiddleware(stack, options); err != nil { return err } diff --git a/service/dynamodb/api_op_ExportTableToPointInTime.go b/service/dynamodb/api_op_ExportTableToPointInTime.go index c3608a91bae..62becd46ef5 100644 --- a/service/dynamodb/api_op_ExportTableToPointInTime.go +++ b/service/dynamodb/api_op_ExportTableToPointInTime.go @@ -169,6 +169,9 @@ func (c *Client) addOperationExportTableToPointInTimeMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExportTableToPointInTimeMiddleware(stack, options); err != nil { return err } diff --git a/service/dynamodb/api_op_GetItem.go b/service/dynamodb/api_op_GetItem.go index f18ea03d4a4..e8ccb81cb7a 100644 --- a/service/dynamodb/api_op_GetItem.go +++ b/service/dynamodb/api_op_GetItem.go @@ -218,6 +218,9 @@ func (c *Client) addOperationGetItemMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_GetResourcePolicy.go b/service/dynamodb/api_op_GetResourcePolicy.go index 565e7f7fe3d..9bec60243ef 100644 --- a/service/dynamodb/api_op_GetResourcePolicy.go +++ b/service/dynamodb/api_op_GetResourcePolicy.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_ImportTable.go b/service/dynamodb/api_op_ImportTable.go index 400cfc97d9c..f0e2a4310ec 100644 --- a/service/dynamodb/api_op_ImportTable.go +++ b/service/dynamodb/api_op_ImportTable.go @@ -140,6 +140,9 @@ func (c *Client) addOperationImportTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportTableMiddleware(stack, options); err != nil { return err } diff --git a/service/dynamodb/api_op_ListBackups.go b/service/dynamodb/api_op_ListBackups.go index 7528be9132c..85c4e3d9e71 100644 --- a/service/dynamodb/api_op_ListBackups.go +++ b/service/dynamodb/api_op_ListBackups.go @@ -167,6 +167,9 @@ func (c *Client) addOperationListBackupsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBackups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dynamodb/api_op_ListContributorInsights.go b/service/dynamodb/api_op_ListContributorInsights.go index cf714df0857..98d42348efb 100644 --- a/service/dynamodb/api_op_ListContributorInsights.go +++ b/service/dynamodb/api_op_ListContributorInsights.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListContributorInsightsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContributorInsights(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListContributorInsightsMiddlewares(stack *middlewar return nil } -// ListContributorInsightsAPIClient is a client that implements the -// ListContributorInsights operation. -type ListContributorInsightsAPIClient interface { - ListContributorInsights(context.Context, *ListContributorInsightsInput, ...func(*Options)) (*ListContributorInsightsOutput, error) -} - -var _ ListContributorInsightsAPIClient = (*Client)(nil) - // ListContributorInsightsPaginatorOptions is the paginator options for // ListContributorInsights type ListContributorInsightsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListContributorInsightsPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContributorInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListContributorInsightsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListContributorInsightsAPIClient is a client that implements the +// ListContributorInsights operation. +type ListContributorInsightsAPIClient interface { + ListContributorInsights(context.Context, *ListContributorInsightsInput, ...func(*Options)) (*ListContributorInsightsOutput, error) +} + +var _ ListContributorInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContributorInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_ListExports.go b/service/dynamodb/api_op_ListExports.go index 0f9c69434ff..703fde9214f 100644 --- a/service/dynamodb/api_op_ListExports.go +++ b/service/dynamodb/api_op_ListExports.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExports(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListExportsAPIClient is a client that implements the ListExports operation. -type ListExportsAPIClient interface { - ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) -} - -var _ ListExportsAPIClient = (*Client)(nil) - // ListExportsPaginatorOptions is the paginator options for ListExports type ListExportsPaginatorOptions struct { // Maximum number of results to return per page. @@ -213,6 +209,9 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListExportsAPIClient is a client that implements the ListExports operation. +type ListExportsAPIClient interface { + ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) +} + +var _ ListExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_ListGlobalTables.go b/service/dynamodb/api_op_ListGlobalTables.go index eede2670ec4..d4e057486af 100644 --- a/service/dynamodb/api_op_ListGlobalTables.go +++ b/service/dynamodb/api_op_ListGlobalTables.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListGlobalTablesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGlobalTables(options.Region), middleware.Before); err != nil { return err } diff --git a/service/dynamodb/api_op_ListImports.go b/service/dynamodb/api_op_ListImports.go index 4ccea36d5a4..9a169326445 100644 --- a/service/dynamodb/api_op_ListImports.go +++ b/service/dynamodb/api_op_ListImports.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImports(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListImportsAPIClient is a client that implements the ListImports operation. -type ListImportsAPIClient interface { - ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) -} - -var _ ListImportsAPIClient = (*Client)(nil) - // ListImportsPaginatorOptions is the paginator options for ListImports type ListImportsPaginatorOptions struct { // The number of ImportSummary objects returned in a single page. @@ -213,6 +209,9 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_ListTables.go b/service/dynamodb/api_op_ListTables.go index b853b85cab9..70912ae72ba 100644 --- a/service/dynamodb/api_op_ListTables.go +++ b/service/dynamodb/api_op_ListTables.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTables(options.Region), middleware.Before); err != nil { return err } @@ -157,56 +160,6 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti return nil } -func addOpListTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - }, - }, - DiscoverOperation: c.fetchOpListTablesDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: false, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ListTablesInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("DynamoDB.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - return internalEndpointDiscovery.WeightedAddress{}, nil -} - -// ListTablesAPIClient is a client that implements the ListTables operation. -type ListTablesAPIClient interface { - ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) -} - -var _ ListTablesAPIClient = (*Client)(nil) - // ListTablesPaginatorOptions is the paginator options for ListTables type ListTablesPaginatorOptions struct { // A maximum number of table names to return. If this parameter is not specified, @@ -271,6 +224,9 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +246,56 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +func addOpListTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + }, + }, + DiscoverOperation: c.fetchOpListTablesDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: false, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ListTablesInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("DynamoDB.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + return internalEndpointDiscovery.WeightedAddress{}, nil +} + +// ListTablesAPIClient is a client that implements the ListTables operation. +type ListTablesAPIClient interface { + ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) +} + +var _ ListTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_ListTagsOfResource.go b/service/dynamodb/api_op_ListTagsOfResource.go index 699b3dcc8d8..801b277f768 100644 --- a/service/dynamodb/api_op_ListTagsOfResource.go +++ b/service/dynamodb/api_op_ListTagsOfResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListTagsOfResourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsOfResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_PutItem.go b/service/dynamodb/api_op_PutItem.go index 63bb18605dd..ff2d36cad88 100644 --- a/service/dynamodb/api_op_PutItem.go +++ b/service/dynamodb/api_op_PutItem.go @@ -341,6 +341,9 @@ func (c *Client) addOperationPutItemMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_PutResourcePolicy.go b/service/dynamodb/api_op_PutResourcePolicy.go index 1467e800f26..2beb0496542 100644 --- a/service/dynamodb/api_op_PutResourcePolicy.go +++ b/service/dynamodb/api_op_PutResourcePolicy.go @@ -168,6 +168,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_Query.go b/service/dynamodb/api_op_Query.go index 7ac48d2af32..0e2099adadc 100644 --- a/service/dynamodb/api_op_Query.go +++ b/service/dynamodb/api_op_Query.go @@ -510,6 +510,9 @@ func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options O if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryValidationMiddleware(stack); err != nil { return err } @@ -540,56 +543,6 @@ func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options O return nil } -func addOpQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - }, - }, - DiscoverOperation: c.fetchOpQueryDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: false, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*QueryInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("DynamoDB.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - return internalEndpointDiscovery.WeightedAddress{}, nil -} - -// QueryAPIClient is a client that implements the Query operation. -type QueryAPIClient interface { - Query(context.Context, *QueryInput, ...func(*Options)) (*QueryOutput, error) -} - -var _ QueryAPIClient = (*Client)(nil) - // QueryPaginatorOptions is the paginator options for Query type QueryPaginatorOptions struct { // The maximum number of items to evaluate (not necessarily the number of matching @@ -659,6 +612,9 @@ func (p *QueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Query(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -673,6 +629,56 @@ func (p *QueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) return result, nil } +func addOpQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + }, + }, + DiscoverOperation: c.fetchOpQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: false, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*QueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("DynamoDB.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + return internalEndpointDiscovery.WeightedAddress{}, nil +} + +// QueryAPIClient is a client that implements the Query operation. +type QueryAPIClient interface { + Query(context.Context, *QueryInput, ...func(*Options)) (*QueryOutput, error) +} + +var _ QueryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opQuery(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_RestoreTableFromBackup.go b/service/dynamodb/api_op_RestoreTableFromBackup.go index 5b88170096a..ea13a605784 100644 --- a/service/dynamodb/api_op_RestoreTableFromBackup.go +++ b/service/dynamodb/api_op_RestoreTableFromBackup.go @@ -156,6 +156,9 @@ func (c *Client) addOperationRestoreTableFromBackupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreTableFromBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_RestoreTableToPointInTime.go b/service/dynamodb/api_op_RestoreTableToPointInTime.go index 0ef459af1be..aab521b0731 100644 --- a/service/dynamodb/api_op_RestoreTableToPointInTime.go +++ b/service/dynamodb/api_op_RestoreTableToPointInTime.go @@ -187,6 +187,9 @@ func (c *Client) addOperationRestoreTableToPointInTimeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreTableToPointInTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_Scan.go b/service/dynamodb/api_op_Scan.go index da5b1e9b78e..10e174a77a0 100644 --- a/service/dynamodb/api_op_Scan.go +++ b/service/dynamodb/api_op_Scan.go @@ -441,6 +441,9 @@ func (c *Client) addOperationScanMiddlewares(stack *middleware.Stack, options Op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpScanValidationMiddleware(stack); err != nil { return err } @@ -471,56 +474,6 @@ func (c *Client) addOperationScanMiddlewares(stack *middleware.Stack, options Op return nil } -func addOpScanDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - }, - }, - DiscoverOperation: c.fetchOpScanDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: false, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpScanDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ScanInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("DynamoDB.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - return internalEndpointDiscovery.WeightedAddress{}, nil -} - -// ScanAPIClient is a client that implements the Scan operation. -type ScanAPIClient interface { - Scan(context.Context, *ScanInput, ...func(*Options)) (*ScanOutput, error) -} - -var _ ScanAPIClient = (*Client)(nil) - // ScanPaginatorOptions is the paginator options for Scan type ScanPaginatorOptions struct { // The maximum number of items to evaluate (not necessarily the number of matching @@ -590,6 +543,9 @@ func (p *ScanPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Scan(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -604,6 +560,56 @@ func (p *ScanPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) return result, nil } +func addOpScanDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + }, + }, + DiscoverOperation: c.fetchOpScanDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: false, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpScanDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ScanInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("DynamoDB.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + go c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + return internalEndpointDiscovery.WeightedAddress{}, nil +} + +// ScanAPIClient is a client that implements the Scan operation. +type ScanAPIClient interface { + Scan(context.Context, *ScanInput, ...func(*Options)) (*ScanOutput, error) +} + +var _ ScanAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opScan(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/dynamodb/api_op_TagResource.go b/service/dynamodb/api_op_TagResource.go index c79179a40fa..7d9d34c8c48 100644 --- a/service/dynamodb/api_op_TagResource.go +++ b/service/dynamodb/api_op_TagResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_TransactGetItems.go b/service/dynamodb/api_op_TransactGetItems.go index 51ad10b8046..f991904d95b 100644 --- a/service/dynamodb/api_op_TransactGetItems.go +++ b/service/dynamodb/api_op_TransactGetItems.go @@ -147,6 +147,9 @@ func (c *Client) addOperationTransactGetItemsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTransactGetItemsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_TransactWriteItems.go b/service/dynamodb/api_op_TransactWriteItems.go index 348f063cf39..3d47daf86ba 100644 --- a/service/dynamodb/api_op_TransactWriteItems.go +++ b/service/dynamodb/api_op_TransactWriteItems.go @@ -214,6 +214,9 @@ func (c *Client) addOperationTransactWriteItemsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opTransactWriteItemsMiddleware(stack, options); err != nil { return err } diff --git a/service/dynamodb/api_op_UntagResource.go b/service/dynamodb/api_op_UntagResource.go index 998452f7760..d24b12bc9f8 100644 --- a/service/dynamodb/api_op_UntagResource.go +++ b/service/dynamodb/api_op_UntagResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateContinuousBackups.go b/service/dynamodb/api_op_UpdateContinuousBackups.go index 9de5317c21e..ef37cf18cee 100644 --- a/service/dynamodb/api_op_UpdateContinuousBackups.go +++ b/service/dynamodb/api_op_UpdateContinuousBackups.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateContinuousBackupsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContinuousBackupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateContributorInsights.go b/service/dynamodb/api_op_UpdateContributorInsights.go index ce46f47e4a0..83cb7e083bf 100644 --- a/service/dynamodb/api_op_UpdateContributorInsights.go +++ b/service/dynamodb/api_op_UpdateContributorInsights.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateContributorInsightsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContributorInsightsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateGlobalTable.go b/service/dynamodb/api_op_UpdateGlobalTable.go index 7fac42e0b1e..24d1b9f7533 100644 --- a/service/dynamodb/api_op_UpdateGlobalTable.go +++ b/service/dynamodb/api_op_UpdateGlobalTable.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateGlobalTableMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGlobalTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateGlobalTableSettings.go b/service/dynamodb/api_op_UpdateGlobalTableSettings.go index ffb27a2ca11..22e95c17041 100644 --- a/service/dynamodb/api_op_UpdateGlobalTableSettings.go +++ b/service/dynamodb/api_op_UpdateGlobalTableSettings.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateGlobalTableSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGlobalTableSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateItem.go b/service/dynamodb/api_op_UpdateItem.go index 540e5aa3558..616ec73f349 100644 --- a/service/dynamodb/api_op_UpdateItem.go +++ b/service/dynamodb/api_op_UpdateItem.go @@ -394,6 +394,9 @@ func (c *Client) addOperationUpdateItemMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go b/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go index b587983a222..583fc2000b0 100644 --- a/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go +++ b/service/dynamodb/api_op_UpdateKinesisStreamingDestination.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateKinesisStreamingDestinationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKinesisStreamingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateTable.go b/service/dynamodb/api_op_UpdateTable.go index 516c6924a7b..0d436352450 100644 --- a/service/dynamodb/api_op_UpdateTable.go +++ b/service/dynamodb/api_op_UpdateTable.go @@ -202,6 +202,9 @@ func (c *Client) addOperationUpdateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go b/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go index f37d93c2be1..e22377680bd 100644 --- a/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go +++ b/service/dynamodb/api_op_UpdateTableReplicaAutoScaling.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateTableReplicaAutoScalingMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableReplicaAutoScalingValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodb/api_op_UpdateTimeToLive.go b/service/dynamodb/api_op_UpdateTimeToLive.go index b6c042cc630..3a044e4245b 100644 --- a/service/dynamodb/api_op_UpdateTimeToLive.go +++ b/service/dynamodb/api_op_UpdateTimeToLive.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateTimeToLiveMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTimeToLiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodbstreams/api_client.go b/service/dynamodbstreams/api_client.go index ea1ad2d2794..eeffe7c1764 100644 --- a/service/dynamodbstreams/api_client.go +++ b/service/dynamodbstreams/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/dynamodbstreams/api_op_DescribeStream.go b/service/dynamodbstreams/api_op_DescribeStream.go index dda337e9057..401a644d6ca 100644 --- a/service/dynamodbstreams/api_op_DescribeStream.go +++ b/service/dynamodbstreams/api_op_DescribeStream.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodbstreams/api_op_GetRecords.go b/service/dynamodbstreams/api_op_GetRecords.go index d60d30925db..028eed5c36a 100644 --- a/service/dynamodbstreams/api_op_GetRecords.go +++ b/service/dynamodbstreams/api_op_GetRecords.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetRecordsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodbstreams/api_op_GetShardIterator.go b/service/dynamodbstreams/api_op_GetShardIterator.go index ed7816f82e5..7fd034a0978 100644 --- a/service/dynamodbstreams/api_op_GetShardIterator.go +++ b/service/dynamodbstreams/api_op_GetShardIterator.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetShardIteratorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetShardIteratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/dynamodbstreams/api_op_ListStreams.go b/service/dynamodbstreams/api_op_ListStreams.go index ad6caa1357e..aebf7da44b6 100644 --- a/service/dynamodbstreams/api_op_ListStreams.go +++ b/service/dynamodbstreams/api_op_ListStreams.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ebs/api_client.go b/service/ebs/api_client.go index 23078ac1139..0ed8bda29de 100644 --- a/service/ebs/api_client.go +++ b/service/ebs/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ebs/api_op_CompleteSnapshot.go b/service/ebs/api_op_CompleteSnapshot.go index 4ff063b342f..10ec380f5de 100644 --- a/service/ebs/api_op_CompleteSnapshot.go +++ b/service/ebs/api_op_CompleteSnapshot.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCompleteSnapshotMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ebs/api_op_GetSnapshotBlock.go b/service/ebs/api_op_GetSnapshotBlock.go index 4bb3f4708c6..faadf5d06e6 100644 --- a/service/ebs/api_op_GetSnapshotBlock.go +++ b/service/ebs/api_op_GetSnapshotBlock.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetSnapshotBlockMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSnapshotBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ebs/api_op_ListChangedBlocks.go b/service/ebs/api_op_ListChangedBlocks.go index 765c0a61f79..d4771366485 100644 --- a/service/ebs/api_op_ListChangedBlocks.go +++ b/service/ebs/api_op_ListChangedBlocks.go @@ -159,6 +159,9 @@ func (c *Client) addOperationListChangedBlocksMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChangedBlocksValidationMiddleware(stack); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationListChangedBlocksMiddlewares(stack *middleware.Stac return nil } -// ListChangedBlocksAPIClient is a client that implements the ListChangedBlocks -// operation. -type ListChangedBlocksAPIClient interface { - ListChangedBlocks(context.Context, *ListChangedBlocksInput, ...func(*Options)) (*ListChangedBlocksOutput, error) -} - -var _ ListChangedBlocksAPIClient = (*Client)(nil) - // ListChangedBlocksPaginatorOptions is the paginator options for ListChangedBlocks type ListChangedBlocksPaginatorOptions struct { // The maximum number of blocks to be returned by the request. @@ -261,6 +256,9 @@ func (p *ListChangedBlocksPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChangedBlocks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +278,14 @@ func (p *ListChangedBlocksPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListChangedBlocksAPIClient is a client that implements the ListChangedBlocks +// operation. +type ListChangedBlocksAPIClient interface { + ListChangedBlocks(context.Context, *ListChangedBlocksInput, ...func(*Options)) (*ListChangedBlocksOutput, error) +} + +var _ ListChangedBlocksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChangedBlocks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ebs/api_op_ListSnapshotBlocks.go b/service/ebs/api_op_ListSnapshotBlocks.go index 64fafbb027e..5ec2cf1a64c 100644 --- a/service/ebs/api_op_ListSnapshotBlocks.go +++ b/service/ebs/api_op_ListSnapshotBlocks.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListSnapshotBlocksMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSnapshotBlocksValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListSnapshotBlocksMiddlewares(stack *middleware.Sta return nil } -// ListSnapshotBlocksAPIClient is a client that implements the ListSnapshotBlocks -// operation. -type ListSnapshotBlocksAPIClient interface { - ListSnapshotBlocks(context.Context, *ListSnapshotBlocksInput, ...func(*Options)) (*ListSnapshotBlocksOutput, error) -} - -var _ ListSnapshotBlocksAPIClient = (*Client)(nil) - // ListSnapshotBlocksPaginatorOptions is the paginator options for // ListSnapshotBlocks type ListSnapshotBlocksPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *ListSnapshotBlocksPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSnapshotBlocks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListSnapshotBlocksPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSnapshotBlocksAPIClient is a client that implements the ListSnapshotBlocks +// operation. +type ListSnapshotBlocksAPIClient interface { + ListSnapshotBlocks(context.Context, *ListSnapshotBlocksInput, ...func(*Options)) (*ListSnapshotBlocksOutput, error) +} + +var _ ListSnapshotBlocksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSnapshotBlocks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ebs/api_op_PutSnapshotBlock.go b/service/ebs/api_op_PutSnapshotBlock.go index 8b81db4b982..08538d99bcc 100644 --- a/service/ebs/api_op_PutSnapshotBlock.go +++ b/service/ebs/api_op_PutSnapshotBlock.go @@ -176,6 +176,9 @@ func (c *Client) addOperationPutSnapshotBlockMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSnapshotBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ebs/api_op_StartSnapshot.go b/service/ebs/api_op_StartSnapshot.go index b187823a63b..2445066485a 100644 --- a/service/ebs/api_op_StartSnapshot.go +++ b/service/ebs/api_op_StartSnapshot.go @@ -235,6 +235,9 @@ func (c *Client) addOperationStartSnapshotMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSnapshotMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_client.go b/service/ec2/api_client.go index d928e29e53c..d8626d889e7 100644 --- a/service/ec2/api_client.go +++ b/service/ec2/api_client.go @@ -458,6 +458,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -550,6 +574,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ec2/api_op_AcceptAddressTransfer.go b/service/ec2/api_op_AcceptAddressTransfer.go index 5624498c732..6c498c660e9 100644 --- a/service/ec2/api_op_AcceptAddressTransfer.go +++ b/service/ec2/api_op_AcceptAddressTransfer.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAcceptAddressTransferMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptAddressTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go b/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go index 2919d503c66..028f2d9d446 100644 --- a/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go +++ b/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAcceptReservedInstancesExchangeQuoteMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptReservedInstancesExchangeQuoteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go b/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go index a6fa4409269..0761bd6e7cc 100644 --- a/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go +++ b/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAcceptTransitGatewayMulticastDomainAssociationsMidd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go b/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go index 8b2ead5eb0b..cb10e8572e0 100644 --- a/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go +++ b/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAcceptTransitGatewayPeeringAttachmentMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go b/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go index fb92ba6cd33..6d041425ea9 100644 --- a/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go +++ b/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAcceptTransitGatewayVpcAttachmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AcceptVpcEndpointConnections.go b/service/ec2/api_op_AcceptVpcEndpointConnections.go index f7d22c7dee3..7780416c916 100644 --- a/service/ec2/api_op_AcceptVpcEndpointConnections.go +++ b/service/ec2/api_op_AcceptVpcEndpointConnections.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAcceptVpcEndpointConnectionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptVpcEndpointConnectionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AcceptVpcPeeringConnection.go b/service/ec2/api_op_AcceptVpcPeeringConnection.go index 25ba966896c..77578265b43 100644 --- a/service/ec2/api_op_AcceptVpcPeeringConnection.go +++ b/service/ec2/api_op_AcceptVpcPeeringConnection.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAcceptVpcPeeringConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptVpcPeeringConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AdvertiseByoipCidr.go b/service/ec2/api_op_AdvertiseByoipCidr.go index 9b5844c6bd9..7f3dba8942c 100644 --- a/service/ec2/api_op_AdvertiseByoipCidr.go +++ b/service/ec2/api_op_AdvertiseByoipCidr.go @@ -151,6 +151,9 @@ func (c *Client) addOperationAdvertiseByoipCidrMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdvertiseByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AllocateAddress.go b/service/ec2/api_op_AllocateAddress.go index 473bf3dbac2..af888d81e89 100644 --- a/service/ec2/api_op_AllocateAddress.go +++ b/service/ec2/api_op_AllocateAddress.go @@ -178,6 +178,9 @@ func (c *Client) addOperationAllocateAddressMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllocateAddress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_AllocateHosts.go b/service/ec2/api_op_AllocateHosts.go index d5226b646d6..1f3304aa11b 100644 --- a/service/ec2/api_op_AllocateHosts.go +++ b/service/ec2/api_op_AllocateHosts.go @@ -190,6 +190,9 @@ func (c *Client) addOperationAllocateHostsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocateHostsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AllocateIpamPoolCidr.go b/service/ec2/api_op_AllocateIpamPoolCidr.go index df40f646e09..61b85d3b313 100644 --- a/service/ec2/api_op_AllocateIpamPoolCidr.go +++ b/service/ec2/api_op_AllocateIpamPoolCidr.go @@ -169,6 +169,9 @@ func (c *Client) addOperationAllocateIpamPoolCidrMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAllocateIpamPoolCidrMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go b/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go index 03de536f180..64942eb1889 100644 --- a/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go +++ b/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go @@ -124,6 +124,9 @@ func (c *Client) addOperationApplySecurityGroupsToClientVpnTargetNetworkMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplySecurityGroupsToClientVpnTargetNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssignIpv6Addresses.go b/service/ec2/api_op_AssignIpv6Addresses.go index f6982051a18..b8161f58dd9 100644 --- a/service/ec2/api_op_AssignIpv6Addresses.go +++ b/service/ec2/api_op_AssignIpv6Addresses.go @@ -146,6 +146,9 @@ func (c *Client) addOperationAssignIpv6AddressesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssignIpv6AddressesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssignPrivateIpAddresses.go b/service/ec2/api_op_AssignPrivateIpAddresses.go index 58f7d5cff20..1def543ed15 100644 --- a/service/ec2/api_op_AssignPrivateIpAddresses.go +++ b/service/ec2/api_op_AssignPrivateIpAddresses.go @@ -163,6 +163,9 @@ func (c *Client) addOperationAssignPrivateIpAddressesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssignPrivateIpAddressesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssignPrivateNatGatewayAddress.go b/service/ec2/api_op_AssignPrivateNatGatewayAddress.go index 1acc4edd342..0fcb0b003ee 100644 --- a/service/ec2/api_op_AssignPrivateNatGatewayAddress.go +++ b/service/ec2/api_op_AssignPrivateNatGatewayAddress.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAssignPrivateNatGatewayAddressMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssignPrivateNatGatewayAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateAddress.go b/service/ec2/api_op_AssociateAddress.go index eff050a63fc..895d700817f 100644 --- a/service/ec2/api_op_AssociateAddress.go +++ b/service/ec2/api_op_AssociateAddress.go @@ -155,6 +155,9 @@ func (c *Client) addOperationAssociateAddressMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateAddress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_AssociateClientVpnTargetNetwork.go b/service/ec2/api_op_AssociateClientVpnTargetNetwork.go index 08dfeb60f49..f840728aa0c 100644 --- a/service/ec2/api_op_AssociateClientVpnTargetNetwork.go +++ b/service/ec2/api_op_AssociateClientVpnTargetNetwork.go @@ -135,6 +135,9 @@ func (c *Client) addOperationAssociateClientVpnTargetNetworkMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateClientVpnTargetNetworkMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_AssociateDhcpOptions.go b/service/ec2/api_op_AssociateDhcpOptions.go index 50a6a40218b..a040d3d22b8 100644 --- a/service/ec2/api_op_AssociateDhcpOptions.go +++ b/service/ec2/api_op_AssociateDhcpOptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAssociateDhcpOptionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDhcpOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go b/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go index 950d6cd1726..d42faeb8de4 100644 --- a/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go +++ b/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go @@ -143,6 +143,9 @@ func (c *Client) addOperationAssociateEnclaveCertificateIamRoleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateEnclaveCertificateIamRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateIamInstanceProfile.go b/service/ec2/api_op_AssociateIamInstanceProfile.go index d588e4d826a..fdc6ea7f68a 100644 --- a/service/ec2/api_op_AssociateIamInstanceProfile.go +++ b/service/ec2/api_op_AssociateIamInstanceProfile.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAssociateIamInstanceProfileMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateIamInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateInstanceEventWindow.go b/service/ec2/api_op_AssociateInstanceEventWindow.go index 73e5df0f913..8cb5874b3ca 100644 --- a/service/ec2/api_op_AssociateInstanceEventWindow.go +++ b/service/ec2/api_op_AssociateInstanceEventWindow.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAssociateInstanceEventWindowMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateInstanceEventWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateIpamByoasn.go b/service/ec2/api_op_AssociateIpamByoasn.go index 140a7ca3296..cdc050c2d42 100644 --- a/service/ec2/api_op_AssociateIpamByoasn.go +++ b/service/ec2/api_op_AssociateIpamByoasn.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateIpamByoasnMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateIpamByoasnValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateIpamResourceDiscovery.go b/service/ec2/api_op_AssociateIpamResourceDiscovery.go index e021f962a39..284e792b0c1 100644 --- a/service/ec2/api_op_AssociateIpamResourceDiscovery.go +++ b/service/ec2/api_op_AssociateIpamResourceDiscovery.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateIpamResourceDiscoveryMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateIpamResourceDiscoveryMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_AssociateNatGatewayAddress.go b/service/ec2/api_op_AssociateNatGatewayAddress.go index 8008d0e5b31..0425f26de85 100644 --- a/service/ec2/api_op_AssociateNatGatewayAddress.go +++ b/service/ec2/api_op_AssociateNatGatewayAddress.go @@ -141,6 +141,9 @@ func (c *Client) addOperationAssociateNatGatewayAddressMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateNatGatewayAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateRouteTable.go b/service/ec2/api_op_AssociateRouteTable.go index 7d1d3245f59..35100026858 100644 --- a/service/ec2/api_op_AssociateRouteTable.go +++ b/service/ec2/api_op_AssociateRouteTable.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAssociateRouteTableMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateSubnetCidrBlock.go b/service/ec2/api_op_AssociateSubnetCidrBlock.go index af7908c56ad..4d89d817033 100644 --- a/service/ec2/api_op_AssociateSubnetCidrBlock.go +++ b/service/ec2/api_op_AssociateSubnetCidrBlock.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateSubnetCidrBlockMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSubnetCidrBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go b/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go index bf59d7da596..02796c703ea 100644 --- a/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go +++ b/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAssociateTransitGatewayMulticastDomainMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go b/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go index d134ff06a30..fc3ecb129f3 100644 --- a/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go +++ b/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAssociateTransitGatewayPolicyTableMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateTransitGatewayRouteTable.go b/service/ec2/api_op_AssociateTransitGatewayRouteTable.go index e634459fb3c..a31df53d824 100644 --- a/service/ec2/api_op_AssociateTransitGatewayRouteTable.go +++ b/service/ec2/api_op_AssociateTransitGatewayRouteTable.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssociateTransitGatewayRouteTableMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTransitGatewayRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AssociateTrunkInterface.go b/service/ec2/api_op_AssociateTrunkInterface.go index 2f1a9097a61..16c07461b7a 100644 --- a/service/ec2/api_op_AssociateTrunkInterface.go +++ b/service/ec2/api_op_AssociateTrunkInterface.go @@ -142,6 +142,9 @@ func (c *Client) addOperationAssociateTrunkInterfaceMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateTrunkInterfaceMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_AssociateVpcCidrBlock.go b/service/ec2/api_op_AssociateVpcCidrBlock.go index 04653270ef0..e88a9b3bc20 100644 --- a/service/ec2/api_op_AssociateVpcCidrBlock.go +++ b/service/ec2/api_op_AssociateVpcCidrBlock.go @@ -176,6 +176,9 @@ func (c *Client) addOperationAssociateVpcCidrBlockMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateVpcCidrBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AttachClassicLinkVpc.go b/service/ec2/api_op_AttachClassicLinkVpc.go index d114d1fdec8..cc10d7f2ba0 100644 --- a/service/ec2/api_op_AttachClassicLinkVpc.go +++ b/service/ec2/api_op_AttachClassicLinkVpc.go @@ -135,6 +135,9 @@ func (c *Client) addOperationAttachClassicLinkVpcMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachClassicLinkVpcValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AttachInternetGateway.go b/service/ec2/api_op_AttachInternetGateway.go index bae14a752a5..3a7f0ed99c2 100644 --- a/service/ec2/api_op_AttachInternetGateway.go +++ b/service/ec2/api_op_AttachInternetGateway.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAttachInternetGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachInternetGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AttachNetworkInterface.go b/service/ec2/api_op_AttachNetworkInterface.go index 3f2dcd6f27b..3c2ca2fac9e 100644 --- a/service/ec2/api_op_AttachNetworkInterface.go +++ b/service/ec2/api_op_AttachNetworkInterface.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAttachNetworkInterfaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachNetworkInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go b/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go index 5512f6c6e39..cb5f38ebfbe 100644 --- a/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAttachVerifiedAccessTrustProviderMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAttachVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_AttachVolume.go b/service/ec2/api_op_AttachVolume.go index c2134848906..72fcd9c65a5 100644 --- a/service/ec2/api_op_AttachVolume.go +++ b/service/ec2/api_op_AttachVolume.go @@ -179,6 +179,9 @@ func (c *Client) addOperationAttachVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AttachVpnGateway.go b/service/ec2/api_op_AttachVpnGateway.go index 2c557196f86..a1cac5620ac 100644 --- a/service/ec2/api_op_AttachVpnGateway.go +++ b/service/ec2/api_op_AttachVpnGateway.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAttachVpnGatewayMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachVpnGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AuthorizeClientVpnIngress.go b/service/ec2/api_op_AuthorizeClientVpnIngress.go index 72dda7220c6..2fa39d5fdf7 100644 --- a/service/ec2/api_op_AuthorizeClientVpnIngress.go +++ b/service/ec2/api_op_AuthorizeClientVpnIngress.go @@ -140,6 +140,9 @@ func (c *Client) addOperationAuthorizeClientVpnIngressMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAuthorizeClientVpnIngressMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_AuthorizeSecurityGroupEgress.go b/service/ec2/api_op_AuthorizeSecurityGroupEgress.go index 6cd490c1747..5363f60af25 100644 --- a/service/ec2/api_op_AuthorizeSecurityGroupEgress.go +++ b/service/ec2/api_op_AuthorizeSecurityGroupEgress.go @@ -162,6 +162,9 @@ func (c *Client) addOperationAuthorizeSecurityGroupEgressMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeSecurityGroupEgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_AuthorizeSecurityGroupIngress.go b/service/ec2/api_op_AuthorizeSecurityGroupIngress.go index f5e14c3d806..e2c91f2c807 100644 --- a/service/ec2/api_op_AuthorizeSecurityGroupIngress.go +++ b/service/ec2/api_op_AuthorizeSecurityGroupIngress.go @@ -199,6 +199,9 @@ func (c *Client) addOperationAuthorizeSecurityGroupIngressMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeSecurityGroupIngress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_BundleInstance.go b/service/ec2/api_op_BundleInstance.go index 70fbe1774a5..cfbdf35555f 100644 --- a/service/ec2/api_op_BundleInstance.go +++ b/service/ec2/api_op_BundleInstance.go @@ -129,6 +129,9 @@ func (c *Client) addOperationBundleInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBundleInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelBundleTask.go b/service/ec2/api_op_CancelBundleTask.go index af43fab39e4..7900cbb2356 100644 --- a/service/ec2/api_op_CancelBundleTask.go +++ b/service/ec2/api_op_CancelBundleTask.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelBundleTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelBundleTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelCapacityReservation.go b/service/ec2/api_op_CancelCapacityReservation.go index 70d17874116..ddf3ecd085f 100644 --- a/service/ec2/api_op_CancelCapacityReservation.go +++ b/service/ec2/api_op_CancelCapacityReservation.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelCapacityReservationFleets.go b/service/ec2/api_op_CancelCapacityReservationFleets.go index d8fb8c70c8b..1abc12d4853 100644 --- a/service/ec2/api_op_CancelCapacityReservationFleets.go +++ b/service/ec2/api_op_CancelCapacityReservationFleets.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCancelCapacityReservationFleetsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelCapacityReservationFleetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelConversionTask.go b/service/ec2/api_op_CancelConversionTask.go index 4711572719c..2558ac61fa4 100644 --- a/service/ec2/api_op_CancelConversionTask.go +++ b/service/ec2/api_op_CancelConversionTask.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelConversionTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelConversionTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelExportTask.go b/service/ec2/api_op_CancelExportTask.go index d1e7db7f385..d8832c24b72 100644 --- a/service/ec2/api_op_CancelExportTask.go +++ b/service/ec2/api_op_CancelExportTask.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCancelExportTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelImageLaunchPermission.go b/service/ec2/api_op_CancelImageLaunchPermission.go index e1beb57187c..63757b2e51e 100644 --- a/service/ec2/api_op_CancelImageLaunchPermission.go +++ b/service/ec2/api_op_CancelImageLaunchPermission.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelImageLaunchPermissionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelImageLaunchPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelImportTask.go b/service/ec2/api_op_CancelImportTask.go index 4ec85566186..9b92e9516ac 100644 --- a/service/ec2/api_op_CancelImportTask.go +++ b/service/ec2/api_op_CancelImportTask.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelImportTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelImportTask(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CancelReservedInstancesListing.go b/service/ec2/api_op_CancelReservedInstancesListing.go index 922f0bdc0da..bac57b76dab 100644 --- a/service/ec2/api_op_CancelReservedInstancesListing.go +++ b/service/ec2/api_op_CancelReservedInstancesListing.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCancelReservedInstancesListingMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelReservedInstancesListingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelSpotFleetRequests.go b/service/ec2/api_op_CancelSpotFleetRequests.go index e2437bdd9ee..2b591e2ed49 100644 --- a/service/ec2/api_op_CancelSpotFleetRequests.go +++ b/service/ec2/api_op_CancelSpotFleetRequests.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCancelSpotFleetRequestsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSpotFleetRequestsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CancelSpotInstanceRequests.go b/service/ec2/api_op_CancelSpotInstanceRequests.go index 61a826b8fcf..b733795577f 100644 --- a/service/ec2/api_op_CancelSpotInstanceRequests.go +++ b/service/ec2/api_op_CancelSpotInstanceRequests.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCancelSpotInstanceRequestsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSpotInstanceRequestsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ConfirmProductInstance.go b/service/ec2/api_op_ConfirmProductInstance.go index 4965175351d..0429ceeaab6 100644 --- a/service/ec2/api_op_ConfirmProductInstance.go +++ b/service/ec2/api_op_ConfirmProductInstance.go @@ -123,6 +123,9 @@ func (c *Client) addOperationConfirmProductInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmProductInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CopyFpgaImage.go b/service/ec2/api_op_CopyFpgaImage.go index 84d51c37cca..960fd544931 100644 --- a/service/ec2/api_op_CopyFpgaImage.go +++ b/service/ec2/api_op_CopyFpgaImage.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCopyFpgaImageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyFpgaImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CopyImage.go b/service/ec2/api_op_CopyImage.go index e8ac71545c2..5d16fa33546 100644 --- a/service/ec2/api_op_CopyImage.go +++ b/service/ec2/api_op_CopyImage.go @@ -231,6 +231,9 @@ func (c *Client) addOperationCopyImageMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CopySnapshot.go b/service/ec2/api_op_CopySnapshot.go index b949d6af2c4..3dca3d67e16 100644 --- a/service/ec2/api_op_CopySnapshot.go +++ b/service/ec2/api_op_CopySnapshot.go @@ -217,6 +217,9 @@ func (c *Client) addOperationCopySnapshotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopySnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateCapacityReservation.go b/service/ec2/api_op_CreateCapacityReservation.go index ce59243b858..372940bd84c 100644 --- a/service/ec2/api_op_CreateCapacityReservation.go +++ b/service/ec2/api_op_CreateCapacityReservation.go @@ -238,6 +238,9 @@ func (c *Client) addOperationCreateCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateCapacityReservationFleet.go b/service/ec2/api_op_CreateCapacityReservationFleet.go index 3145eea1639..81402db5f9e 100644 --- a/service/ec2/api_op_CreateCapacityReservationFleet.go +++ b/service/ec2/api_op_CreateCapacityReservationFleet.go @@ -209,6 +209,9 @@ func (c *Client) addOperationCreateCapacityReservationFleetMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCapacityReservationFleetMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateCarrierGateway.go b/service/ec2/api_op_CreateCarrierGateway.go index 5331533b99d..d06d5e4298f 100644 --- a/service/ec2/api_op_CreateCarrierGateway.go +++ b/service/ec2/api_op_CreateCarrierGateway.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateCarrierGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCarrierGatewayMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateClientVpnEndpoint.go b/service/ec2/api_op_CreateClientVpnEndpoint.go index ca0933569a0..0168fdb417e 100644 --- a/service/ec2/api_op_CreateClientVpnEndpoint.go +++ b/service/ec2/api_op_CreateClientVpnEndpoint.go @@ -220,6 +220,9 @@ func (c *Client) addOperationCreateClientVpnEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateClientVpnEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateClientVpnRoute.go b/service/ec2/api_op_CreateClientVpnRoute.go index f831948ecc2..0d2702fdde0 100644 --- a/service/ec2/api_op_CreateClientVpnRoute.go +++ b/service/ec2/api_op_CreateClientVpnRoute.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateClientVpnRouteMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateClientVpnRouteMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateCoipCidr.go b/service/ec2/api_op_CreateCoipCidr.go index 3d971a3ccff..5e6f159b68d 100644 --- a/service/ec2/api_op_CreateCoipCidr.go +++ b/service/ec2/api_op_CreateCoipCidr.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateCoipCidrMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateCoipPool.go b/service/ec2/api_op_CreateCoipPool.go index 2b7e220e3eb..f7af21d2e62 100644 --- a/service/ec2/api_op_CreateCoipPool.go +++ b/service/ec2/api_op_CreateCoipPool.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateCoipPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCoipPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateCustomerGateway.go b/service/ec2/api_op_CreateCustomerGateway.go index 75dcaac99b4..a15f067bcf3 100644 --- a/service/ec2/api_op_CreateCustomerGateway.go +++ b/service/ec2/api_op_CreateCustomerGateway.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateCustomerGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomerGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateDefaultSubnet.go b/service/ec2/api_op_CreateDefaultSubnet.go index 67ca307e063..18fb58338e8 100644 --- a/service/ec2/api_op_CreateDefaultSubnet.go +++ b/service/ec2/api_op_CreateDefaultSubnet.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateDefaultSubnetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDefaultSubnetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateDefaultVpc.go b/service/ec2/api_op_CreateDefaultVpc.go index 591d828a604..690534e98e2 100644 --- a/service/ec2/api_op_CreateDefaultVpc.go +++ b/service/ec2/api_op_CreateDefaultVpc.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateDefaultVpcMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDefaultVpc(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateDhcpOptions.go b/service/ec2/api_op_CreateDhcpOptions.go index 87ea1f5c345..55b39a37411 100644 --- a/service/ec2/api_op_CreateDhcpOptions.go +++ b/service/ec2/api_op_CreateDhcpOptions.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateDhcpOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDhcpOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateEgressOnlyInternetGateway.go b/service/ec2/api_op_CreateEgressOnlyInternetGateway.go index cf59d1978f7..280b2e04c46 100644 --- a/service/ec2/api_op_CreateEgressOnlyInternetGateway.go +++ b/service/ec2/api_op_CreateEgressOnlyInternetGateway.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateEgressOnlyInternetGatewayMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEgressOnlyInternetGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateFleet.go b/service/ec2/api_op_CreateFleet.go index aa2cfd3ed9f..7cefb889a45 100644 --- a/service/ec2/api_op_CreateFleet.go +++ b/service/ec2/api_op_CreateFleet.go @@ -212,6 +212,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateFlowLogs.go b/service/ec2/api_op_CreateFlowLogs.go index 63c49c4553e..530ad6be3d4 100644 --- a/service/ec2/api_op_CreateFlowLogs.go +++ b/service/ec2/api_op_CreateFlowLogs.go @@ -231,6 +231,9 @@ func (c *Client) addOperationCreateFlowLogsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFlowLogsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateFpgaImage.go b/service/ec2/api_op_CreateFpgaImage.go index f32bbfdd429..f2084721f9c 100644 --- a/service/ec2/api_op_CreateFpgaImage.go +++ b/service/ec2/api_op_CreateFpgaImage.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateFpgaImageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFpgaImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateImage.go b/service/ec2/api_op_CreateImage.go index b12cf9a0ff0..c5222fea873 100644 --- a/service/ec2/api_op_CreateImage.go +++ b/service/ec2/api_op_CreateImage.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateInstanceConnectEndpoint.go b/service/ec2/api_op_CreateInstanceConnectEndpoint.go index 562e267c44f..a4439685403 100644 --- a/service/ec2/api_op_CreateInstanceConnectEndpoint.go +++ b/service/ec2/api_op_CreateInstanceConnectEndpoint.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateInstanceConnectEndpointMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateInstanceConnectEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateInstanceEventWindow.go b/service/ec2/api_op_CreateInstanceEventWindow.go index 949a831ffe4..65c72f3f7d0 100644 --- a/service/ec2/api_op_CreateInstanceEventWindow.go +++ b/service/ec2/api_op_CreateInstanceEventWindow.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateInstanceEventWindowMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceEventWindow(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateInstanceExportTask.go b/service/ec2/api_op_CreateInstanceExportTask.go index aa009c3e52f..9505f83a3d9 100644 --- a/service/ec2/api_op_CreateInstanceExportTask.go +++ b/service/ec2/api_op_CreateInstanceExportTask.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateInstanceExportTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateInternetGateway.go b/service/ec2/api_op_CreateInternetGateway.go index 41202c9c9e3..ee13040aaaa 100644 --- a/service/ec2/api_op_CreateInternetGateway.go +++ b/service/ec2/api_op_CreateInternetGateway.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateInternetGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInternetGateway(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateIpam.go b/service/ec2/api_op_CreateIpam.go index 425b24c597b..3afba1fdc38 100644 --- a/service/ec2/api_op_CreateIpam.go +++ b/service/ec2/api_op_CreateIpam.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateIpamMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIpamMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateIpamPool.go b/service/ec2/api_op_CreateIpamPool.go index dc926a3f251..87f993f1280 100644 --- a/service/ec2/api_op_CreateIpamPool.go +++ b/service/ec2/api_op_CreateIpamPool.go @@ -216,6 +216,9 @@ func (c *Client) addOperationCreateIpamPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIpamPoolMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateIpamResourceDiscovery.go b/service/ec2/api_op_CreateIpamResourceDiscovery.go index 7566b3ed14a..232c7b5b10e 100644 --- a/service/ec2/api_op_CreateIpamResourceDiscovery.go +++ b/service/ec2/api_op_CreateIpamResourceDiscovery.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateIpamResourceDiscoveryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIpamResourceDiscoveryMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateIpamScope.go b/service/ec2/api_op_CreateIpamScope.go index 98298af8d56..6c6c9833386 100644 --- a/service/ec2/api_op_CreateIpamScope.go +++ b/service/ec2/api_op_CreateIpamScope.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateIpamScopeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIpamScopeMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateKeyPair.go b/service/ec2/api_op_CreateKeyPair.go index f519690091a..4f42d1fb219 100644 --- a/service/ec2/api_op_CreateKeyPair.go +++ b/service/ec2/api_op_CreateKeyPair.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateKeyPairMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateLaunchTemplate.go b/service/ec2/api_op_CreateLaunchTemplate.go index ea9c43329e8..d1f8e42f8e2 100644 --- a/service/ec2/api_op_CreateLaunchTemplate.go +++ b/service/ec2/api_op_CreateLaunchTemplate.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateLaunchTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLaunchTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateLaunchTemplateVersion.go b/service/ec2/api_op_CreateLaunchTemplateVersion.go index 257c6c65a2f..e8cd79cab8e 100644 --- a/service/ec2/api_op_CreateLaunchTemplateVersion.go +++ b/service/ec2/api_op_CreateLaunchTemplateVersion.go @@ -176,6 +176,9 @@ func (c *Client) addOperationCreateLaunchTemplateVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLaunchTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateLocalGatewayRoute.go b/service/ec2/api_op_CreateLocalGatewayRoute.go index d9c4482a569..e7b8d3ffa50 100644 --- a/service/ec2/api_op_CreateLocalGatewayRoute.go +++ b/service/ec2/api_op_CreateLocalGatewayRoute.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateLocalGatewayRouteMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocalGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateLocalGatewayRouteTable.go b/service/ec2/api_op_CreateLocalGatewayRouteTable.go index af9d4126cce..04060f2fff9 100644 --- a/service/ec2/api_op_CreateLocalGatewayRouteTable.go +++ b/service/ec2/api_op_CreateLocalGatewayRouteTable.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateLocalGatewayRouteTableMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocalGatewayRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go b/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go index 7ecccf26564..5d0834c824a 100644 --- a/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go +++ b/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateLocalGatewayRouteTableVirtualInterfaceGroupAs if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go b/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go index 58aedc0cc5e..6cacecddcc8 100644 --- a/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go +++ b/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateLocalGatewayRouteTableVpcAssociationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateManagedPrefixList.go b/service/ec2/api_op_CreateManagedPrefixList.go index f2612b06c7f..2520a295784 100644 --- a/service/ec2/api_op_CreateManagedPrefixList.go +++ b/service/ec2/api_op_CreateManagedPrefixList.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateManagedPrefixListMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateManagedPrefixListMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateNatGateway.go b/service/ec2/api_op_CreateNatGateway.go index e8e2b5e867f..8a28841e173 100644 --- a/service/ec2/api_op_CreateNatGateway.go +++ b/service/ec2/api_op_CreateNatGateway.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateNatGatewayMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNatGatewayMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateNetworkAcl.go b/service/ec2/api_op_CreateNetworkAcl.go index f4e785e15b7..c5ab742ad1a 100644 --- a/service/ec2/api_op_CreateNetworkAcl.go +++ b/service/ec2/api_op_CreateNetworkAcl.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateNetworkAclMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkAclMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateNetworkAclEntry.go b/service/ec2/api_op_CreateNetworkAclEntry.go index 33002dd257e..270310b3a9a 100644 --- a/service/ec2/api_op_CreateNetworkAclEntry.go +++ b/service/ec2/api_op_CreateNetworkAclEntry.go @@ -173,6 +173,9 @@ func (c *Client) addOperationCreateNetworkAclEntryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNetworkAclEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateNetworkInsightsAccessScope.go b/service/ec2/api_op_CreateNetworkInsightsAccessScope.go index b0ebe5c9c3a..6fc8a517a03 100644 --- a/service/ec2/api_op_CreateNetworkInsightsAccessScope.go +++ b/service/ec2/api_op_CreateNetworkInsightsAccessScope.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateNetworkInsightsAccessScopeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkInsightsAccessScopeMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateNetworkInsightsPath.go b/service/ec2/api_op_CreateNetworkInsightsPath.go index 4b9c3d05dc6..17b5c9439b1 100644 --- a/service/ec2/api_op_CreateNetworkInsightsPath.go +++ b/service/ec2/api_op_CreateNetworkInsightsPath.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateNetworkInsightsPathMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkInsightsPathMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateNetworkInterface.go b/service/ec2/api_op_CreateNetworkInterface.go index f0e666bd6ff..ddca5c48c40 100644 --- a/service/ec2/api_op_CreateNetworkInterface.go +++ b/service/ec2/api_op_CreateNetworkInterface.go @@ -234,6 +234,9 @@ func (c *Client) addOperationCreateNetworkInterfaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkInterfaceMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateNetworkInterfacePermission.go b/service/ec2/api_op_CreateNetworkInterfacePermission.go index 16a9418463d..07a16b37c3d 100644 --- a/service/ec2/api_op_CreateNetworkInterfacePermission.go +++ b/service/ec2/api_op_CreateNetworkInterfacePermission.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateNetworkInterfacePermissionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNetworkInterfacePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreatePlacementGroup.go b/service/ec2/api_op_CreatePlacementGroup.go index 942372a75b3..2ef24f1f1b3 100644 --- a/service/ec2/api_op_CreatePlacementGroup.go +++ b/service/ec2/api_op_CreatePlacementGroup.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreatePlacementGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePlacementGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreatePublicIpv4Pool.go b/service/ec2/api_op_CreatePublicIpv4Pool.go index 264b0ab4d7d..18dc1987e14 100644 --- a/service/ec2/api_op_CreatePublicIpv4Pool.go +++ b/service/ec2/api_op_CreatePublicIpv4Pool.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreatePublicIpv4PoolMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePublicIpv4Pool(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateReplaceRootVolumeTask.go b/service/ec2/api_op_CreateReplaceRootVolumeTask.go index d24ff7e01e6..c8c04b4fc36 100644 --- a/service/ec2/api_op_CreateReplaceRootVolumeTask.go +++ b/service/ec2/api_op_CreateReplaceRootVolumeTask.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateReplaceRootVolumeTaskMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateReplaceRootVolumeTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateReservedInstancesListing.go b/service/ec2/api_op_CreateReservedInstancesListing.go index aa51b096fd1..dfc5241a967 100644 --- a/service/ec2/api_op_CreateReservedInstancesListing.go +++ b/service/ec2/api_op_CreateReservedInstancesListing.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateReservedInstancesListingMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReservedInstancesListingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateRestoreImageTask.go b/service/ec2/api_op_CreateRestoreImageTask.go index 1dccc18e0b1..51bc3208095 100644 --- a/service/ec2/api_op_CreateRestoreImageTask.go +++ b/service/ec2/api_op_CreateRestoreImageTask.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateRestoreImageTaskMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRestoreImageTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateRoute.go b/service/ec2/api_op_CreateRoute.go index 62db8150ed6..0c420bf7eae 100644 --- a/service/ec2/api_op_CreateRoute.go +++ b/service/ec2/api_op_CreateRoute.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateRouteTable.go b/service/ec2/api_op_CreateRouteTable.go index b95b4d62303..547e64e967f 100644 --- a/service/ec2/api_op_CreateRouteTable.go +++ b/service/ec2/api_op_CreateRouteTable.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateRouteTableMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRouteTableMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateSecurityGroup.go b/service/ec2/api_op_CreateSecurityGroup.go index 2dd34ec9f58..006b8cd2029 100644 --- a/service/ec2/api_op_CreateSecurityGroup.go +++ b/service/ec2/api_op_CreateSecurityGroup.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateSecurityGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateSnapshot.go b/service/ec2/api_op_CreateSnapshot.go index 1a19e78ffdd..1f50c9e70e0 100644 --- a/service/ec2/api_op_CreateSnapshot.go +++ b/service/ec2/api_op_CreateSnapshot.go @@ -248,6 +248,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateSnapshots.go b/service/ec2/api_op_CreateSnapshots.go index 1175a5fd612..8fbc7bb6617 100644 --- a/service/ec2/api_op_CreateSnapshots.go +++ b/service/ec2/api_op_CreateSnapshots.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateSnapshotsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateSpotDatafeedSubscription.go b/service/ec2/api_op_CreateSpotDatafeedSubscription.go index ea5bf8d8884..f4b823eaffe 100644 --- a/service/ec2/api_op_CreateSpotDatafeedSubscription.go +++ b/service/ec2/api_op_CreateSpotDatafeedSubscription.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateSpotDatafeedSubscriptionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSpotDatafeedSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateStoreImageTask.go b/service/ec2/api_op_CreateStoreImageTask.go index 7449f21976e..bed25c7eac7 100644 --- a/service/ec2/api_op_CreateStoreImageTask.go +++ b/service/ec2/api_op_CreateStoreImageTask.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateStoreImageTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStoreImageTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateSubnet.go b/service/ec2/api_op_CreateSubnet.go index aaa0949381d..00914f54707 100644 --- a/service/ec2/api_op_CreateSubnet.go +++ b/service/ec2/api_op_CreateSubnet.go @@ -190,6 +190,9 @@ func (c *Client) addOperationCreateSubnetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubnetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateSubnetCidrReservation.go b/service/ec2/api_op_CreateSubnetCidrReservation.go index f6bb970e52e..eb3173a6517 100644 --- a/service/ec2/api_op_CreateSubnetCidrReservation.go +++ b/service/ec2/api_op_CreateSubnetCidrReservation.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateSubnetCidrReservationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubnetCidrReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTags.go b/service/ec2/api_op_CreateTags.go index 62373c911c7..7ee21fec790 100644 --- a/service/ec2/api_op_CreateTags.go +++ b/service/ec2/api_op_CreateTags.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTrafficMirrorFilter.go b/service/ec2/api_op_CreateTrafficMirrorFilter.go index 03f45b2a464..6dc5c288b27 100644 --- a/service/ec2/api_op_CreateTrafficMirrorFilter.go +++ b/service/ec2/api_op_CreateTrafficMirrorFilter.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateTrafficMirrorFilterMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrafficMirrorFilterMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateTrafficMirrorFilterRule.go b/service/ec2/api_op_CreateTrafficMirrorFilterRule.go index 91be61415e9..a809d38661f 100644 --- a/service/ec2/api_op_CreateTrafficMirrorFilterRule.go +++ b/service/ec2/api_op_CreateTrafficMirrorFilterRule.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateTrafficMirrorFilterRuleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrafficMirrorFilterRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateTrafficMirrorSession.go b/service/ec2/api_op_CreateTrafficMirrorSession.go index 6fdb365c54d..0e0f77fe8b7 100644 --- a/service/ec2/api_op_CreateTrafficMirrorSession.go +++ b/service/ec2/api_op_CreateTrafficMirrorSession.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateTrafficMirrorSessionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrafficMirrorSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateTrafficMirrorTarget.go b/service/ec2/api_op_CreateTrafficMirrorTarget.go index 9cbadc928a9..8103d497c39 100644 --- a/service/ec2/api_op_CreateTrafficMirrorTarget.go +++ b/service/ec2/api_op_CreateTrafficMirrorTarget.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateTrafficMirrorTargetMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrafficMirrorTargetMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGateway.go b/service/ec2/api_op_CreateTransitGateway.go index d1462baf90d..e45b0630e0d 100644 --- a/service/ec2/api_op_CreateTransitGateway.go +++ b/service/ec2/api_op_CreateTransitGateway.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateTransitGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGateway(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayConnect.go b/service/ec2/api_op_CreateTransitGatewayConnect.go index 9eeb4ee987e..2de45d82769 100644 --- a/service/ec2/api_op_CreateTransitGatewayConnect.go +++ b/service/ec2/api_op_CreateTransitGatewayConnect.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateTransitGatewayConnectMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayConnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayConnectPeer.go b/service/ec2/api_op_CreateTransitGatewayConnectPeer.go index 28f340fc23b..65db392ae46 100644 --- a/service/ec2/api_op_CreateTransitGatewayConnectPeer.go +++ b/service/ec2/api_op_CreateTransitGatewayConnectPeer.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateTransitGatewayConnectPeerMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go b/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go index 16c08be6892..9f68fd108d5 100644 --- a/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go +++ b/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateTransitGatewayMulticastDomainMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go b/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go index 7ea8bcb1e44..81672972201 100644 --- a/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go +++ b/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateTransitGatewayPeeringAttachmentMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayPolicyTable.go b/service/ec2/api_op_CreateTransitGatewayPolicyTable.go index ca2f8fe10d3..a2ea10d730a 100644 --- a/service/ec2/api_op_CreateTransitGatewayPolicyTable.go +++ b/service/ec2/api_op_CreateTransitGatewayPolicyTable.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateTransitGatewayPolicyTableMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go b/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go index 9a7a49ca45e..980b5b4b1ba 100644 --- a/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go +++ b/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateTransitGatewayPrefixListReferenceMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayRoute.go b/service/ec2/api_op_CreateTransitGatewayRoute.go index fc090ea2aa2..09a1a4e3fa9 100644 --- a/service/ec2/api_op_CreateTransitGatewayRoute.go +++ b/service/ec2/api_op_CreateTransitGatewayRoute.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateTransitGatewayRouteMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayRouteTable.go b/service/ec2/api_op_CreateTransitGatewayRouteTable.go index 2d8f34fdb94..83c3b1b1638 100644 --- a/service/ec2/api_op_CreateTransitGatewayRouteTable.go +++ b/service/ec2/api_op_CreateTransitGatewayRouteTable.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateTransitGatewayRouteTableMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go b/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go index fcf0cc87307..da0c056f4fe 100644 --- a/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go +++ b/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateTransitGatewayRouteTableAnnouncementMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayRouteTableAnnouncementValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go b/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go index d285ec48fb4..efc44b00c6c 100644 --- a/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go +++ b/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateTransitGatewayVpcAttachmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateVerifiedAccessEndpoint.go b/service/ec2/api_op_CreateVerifiedAccessEndpoint.go index 933b9d0d11e..1eecf9c42d5 100644 --- a/service/ec2/api_op_CreateVerifiedAccessEndpoint.go +++ b/service/ec2/api_op_CreateVerifiedAccessEndpoint.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateVerifiedAccessEndpointMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVerifiedAccessEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateVerifiedAccessGroup.go b/service/ec2/api_op_CreateVerifiedAccessGroup.go index ba56e8cc418..924c7346d16 100644 --- a/service/ec2/api_op_CreateVerifiedAccessGroup.go +++ b/service/ec2/api_op_CreateVerifiedAccessGroup.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateVerifiedAccessGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVerifiedAccessGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateVerifiedAccessInstance.go b/service/ec2/api_op_CreateVerifiedAccessInstance.go index a42283f5539..289b94610cc 100644 --- a/service/ec2/api_op_CreateVerifiedAccessInstance.go +++ b/service/ec2/api_op_CreateVerifiedAccessInstance.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateVerifiedAccessInstanceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVerifiedAccessInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go b/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go index 47457c2628a..10d9dfcff0f 100644 --- a/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateVerifiedAccessTrustProviderMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateVolume.go b/service/ec2/api_op_CreateVolume.go index a7602385441..3deecf0582b 100644 --- a/service/ec2/api_op_CreateVolume.go +++ b/service/ec2/api_op_CreateVolume.go @@ -319,6 +319,9 @@ func (c *Client) addOperationCreateVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpc.go b/service/ec2/api_op_CreateVpc.go index 79e7ef8facd..e32c1a39bab 100644 --- a/service/ec2/api_op_CreateVpc.go +++ b/service/ec2/api_op_CreateVpc.go @@ -196,6 +196,9 @@ func (c *Client) addOperationCreateVpcMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpc(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpcEndpoint.go b/service/ec2/api_op_CreateVpcEndpoint.go index 87b4141a6f7..431f84c55e3 100644 --- a/service/ec2/api_op_CreateVpcEndpoint.go +++ b/service/ec2/api_op_CreateVpcEndpoint.go @@ -182,6 +182,9 @@ func (c *Client) addOperationCreateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go b/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go index 5fbb8a2cfb7..66765d3ddc1 100644 --- a/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go +++ b/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateVpcEndpointConnectionNotificationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcEndpointConnectionNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go b/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go index 1c3bc5208ec..79c2d14c6e8 100644 --- a/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go +++ b/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateVpcEndpointServiceConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcEndpointServiceConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpcPeeringConnection.go b/service/ec2/api_op_CreateVpcPeeringConnection.go index 7d93d8483eb..f84a4c0fc19 100644 --- a/service/ec2/api_op_CreateVpcPeeringConnection.go +++ b/service/ec2/api_op_CreateVpcPeeringConnection.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateVpcPeeringConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcPeeringConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpnConnection.go b/service/ec2/api_op_CreateVpnConnection.go index 967abe3b860..0036c9a8fb4 100644 --- a/service/ec2/api_op_CreateVpnConnection.go +++ b/service/ec2/api_op_CreateVpnConnection.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateVpnConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpnConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpnConnectionRoute.go b/service/ec2/api_op_CreateVpnConnectionRoute.go index 4caeec1c636..ca0198f5dc5 100644 --- a/service/ec2/api_op_CreateVpnConnectionRoute.go +++ b/service/ec2/api_op_CreateVpnConnectionRoute.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateVpnConnectionRouteMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpnConnectionRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_CreateVpnGateway.go b/service/ec2/api_op_CreateVpnGateway.go index b1aad7a615e..3aaba10761f 100644 --- a/service/ec2/api_op_CreateVpnGateway.go +++ b/service/ec2/api_op_CreateVpnGateway.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateVpnGatewayMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpnGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteCarrierGateway.go b/service/ec2/api_op_DeleteCarrierGateway.go index 10836955637..b94d66e954b 100644 --- a/service/ec2/api_op_DeleteCarrierGateway.go +++ b/service/ec2/api_op_DeleteCarrierGateway.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteCarrierGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCarrierGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteClientVpnEndpoint.go b/service/ec2/api_op_DeleteClientVpnEndpoint.go index 6d801890fd5..a98187cdd0e 100644 --- a/service/ec2/api_op_DeleteClientVpnEndpoint.go +++ b/service/ec2/api_op_DeleteClientVpnEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteClientVpnEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClientVpnEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteClientVpnRoute.go b/service/ec2/api_op_DeleteClientVpnRoute.go index 33609237dbb..9af44209e11 100644 --- a/service/ec2/api_op_DeleteClientVpnRoute.go +++ b/service/ec2/api_op_DeleteClientVpnRoute.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteClientVpnRouteMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClientVpnRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteCoipCidr.go b/service/ec2/api_op_DeleteCoipCidr.go index 0bc25b3de1f..3180b1529bf 100644 --- a/service/ec2/api_op_DeleteCoipCidr.go +++ b/service/ec2/api_op_DeleteCoipCidr.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteCoipCidrMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteCoipPool.go b/service/ec2/api_op_DeleteCoipPool.go index a3846b67c5e..3f82dbebcae 100644 --- a/service/ec2/api_op_DeleteCoipPool.go +++ b/service/ec2/api_op_DeleteCoipPool.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteCoipPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCoipPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteCustomerGateway.go b/service/ec2/api_op_DeleteCustomerGateway.go index 467083dffbb..5204605579e 100644 --- a/service/ec2/api_op_DeleteCustomerGateway.go +++ b/service/ec2/api_op_DeleteCustomerGateway.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteCustomerGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomerGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteDhcpOptions.go b/service/ec2/api_op_DeleteDhcpOptions.go index ff8d9e1092c..419ee133706 100644 --- a/service/ec2/api_op_DeleteDhcpOptions.go +++ b/service/ec2/api_op_DeleteDhcpOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDhcpOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDhcpOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go b/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go index 8af6bdb3d17..bbe1d4cefbb 100644 --- a/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go +++ b/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteEgressOnlyInternetGatewayMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEgressOnlyInternetGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteFleets.go b/service/ec2/api_op_DeleteFleets.go index 44958b4cf4f..938b4a07479 100644 --- a/service/ec2/api_op_DeleteFleets.go +++ b/service/ec2/api_op_DeleteFleets.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDeleteFleetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteFlowLogs.go b/service/ec2/api_op_DeleteFlowLogs.go index 64d0c66df65..08df3272cd5 100644 --- a/service/ec2/api_op_DeleteFlowLogs.go +++ b/service/ec2/api_op_DeleteFlowLogs.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteFlowLogsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFlowLogsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteFpgaImage.go b/service/ec2/api_op_DeleteFpgaImage.go index c6038dae16e..8be47b7bf7c 100644 --- a/service/ec2/api_op_DeleteFpgaImage.go +++ b/service/ec2/api_op_DeleteFpgaImage.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteFpgaImageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFpgaImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteInstanceConnectEndpoint.go b/service/ec2/api_op_DeleteInstanceConnectEndpoint.go index 6c1900cea8c..16611ce7925 100644 --- a/service/ec2/api_op_DeleteInstanceConnectEndpoint.go +++ b/service/ec2/api_op_DeleteInstanceConnectEndpoint.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteInstanceConnectEndpointMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceConnectEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteInstanceEventWindow.go b/service/ec2/api_op_DeleteInstanceEventWindow.go index 753396c5cda..6a38295ccfb 100644 --- a/service/ec2/api_op_DeleteInstanceEventWindow.go +++ b/service/ec2/api_op_DeleteInstanceEventWindow.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteInstanceEventWindowMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceEventWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteInternetGateway.go b/service/ec2/api_op_DeleteInternetGateway.go index a309a148408..2a6acad6f56 100644 --- a/service/ec2/api_op_DeleteInternetGateway.go +++ b/service/ec2/api_op_DeleteInternetGateway.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteInternetGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInternetGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteIpam.go b/service/ec2/api_op_DeleteIpam.go index e65086ed7d7..c77b5dab011 100644 --- a/service/ec2/api_op_DeleteIpam.go +++ b/service/ec2/api_op_DeleteIpam.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteIpamMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIpamValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteIpamPool.go b/service/ec2/api_op_DeleteIpamPool.go index 20a0b1d6b74..a2901638dcc 100644 --- a/service/ec2/api_op_DeleteIpamPool.go +++ b/service/ec2/api_op_DeleteIpamPool.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteIpamPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIpamPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteIpamResourceDiscovery.go b/service/ec2/api_op_DeleteIpamResourceDiscovery.go index df787fb12d7..5a394171f93 100644 --- a/service/ec2/api_op_DeleteIpamResourceDiscovery.go +++ b/service/ec2/api_op_DeleteIpamResourceDiscovery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteIpamResourceDiscoveryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIpamResourceDiscoveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteIpamScope.go b/service/ec2/api_op_DeleteIpamScope.go index 8ed0b354e01..cabadc58392 100644 --- a/service/ec2/api_op_DeleteIpamScope.go +++ b/service/ec2/api_op_DeleteIpamScope.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteIpamScopeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIpamScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteKeyPair.go b/service/ec2/api_op_DeleteKeyPair.go index 9fb2aae45b5..9f440e796b7 100644 --- a/service/ec2/api_op_DeleteKeyPair.go +++ b/service/ec2/api_op_DeleteKeyPair.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteKeyPairMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeyPair(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DeleteLaunchTemplate.go b/service/ec2/api_op_DeleteLaunchTemplate.go index e95cd6bc04c..5958b366204 100644 --- a/service/ec2/api_op_DeleteLaunchTemplate.go +++ b/service/ec2/api_op_DeleteLaunchTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteLaunchTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DeleteLaunchTemplateVersions.go b/service/ec2/api_op_DeleteLaunchTemplateVersions.go index 4c37d1b717c..5ae92cb58b6 100644 --- a/service/ec2/api_op_DeleteLaunchTemplateVersions.go +++ b/service/ec2/api_op_DeleteLaunchTemplateVersions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDeleteLaunchTemplateVersionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLaunchTemplateVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteLocalGatewayRoute.go b/service/ec2/api_op_DeleteLocalGatewayRoute.go index 0e5a17df16d..caff12dceea 100644 --- a/service/ec2/api_op_DeleteLocalGatewayRoute.go +++ b/service/ec2/api_op_DeleteLocalGatewayRoute.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteLocalGatewayRouteMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLocalGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteLocalGatewayRouteTable.go b/service/ec2/api_op_DeleteLocalGatewayRouteTable.go index d9853eb8939..711e1e84d59 100644 --- a/service/ec2/api_op_DeleteLocalGatewayRouteTable.go +++ b/service/ec2/api_op_DeleteLocalGatewayRouteTable.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLocalGatewayRouteTableMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLocalGatewayRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go b/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go index 9291cc6a5d3..4c9d780f68d 100644 --- a/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go +++ b/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLocalGatewayRouteTableVirtualInterfaceGroupAs if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go b/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go index 013a4dbf617..24098f3f69b 100644 --- a/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go +++ b/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLocalGatewayRouteTableVpcAssociationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteManagedPrefixList.go b/service/ec2/api_op_DeleteManagedPrefixList.go index 1dd53aa5593..4960afd05fb 100644 --- a/service/ec2/api_op_DeleteManagedPrefixList.go +++ b/service/ec2/api_op_DeleteManagedPrefixList.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteManagedPrefixListMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteManagedPrefixListValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNatGateway.go b/service/ec2/api_op_DeleteNatGateway.go index 6833e845ed8..fd777a35ce2 100644 --- a/service/ec2/api_op_DeleteNatGateway.go +++ b/service/ec2/api_op_DeleteNatGateway.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteNatGatewayMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNatGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkAcl.go b/service/ec2/api_op_DeleteNetworkAcl.go index 0f40911f0e3..f4082331ab5 100644 --- a/service/ec2/api_op_DeleteNetworkAcl.go +++ b/service/ec2/api_op_DeleteNetworkAcl.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteNetworkAclMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkAclValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkAclEntry.go b/service/ec2/api_op_DeleteNetworkAclEntry.go index 70ec0640464..4852495b402 100644 --- a/service/ec2/api_op_DeleteNetworkAclEntry.go +++ b/service/ec2/api_op_DeleteNetworkAclEntry.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteNetworkAclEntryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkAclEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go b/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go index 91bdfece0ea..863748da1d5 100644 --- a/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go +++ b/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteNetworkInsightsAccessScopeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkInsightsAccessScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go b/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go index ea96dbfdd40..38bf1b4fc30 100644 --- a/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go +++ b/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteNetworkInsightsAccessScopeAnalysisMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkInsightsAccessScopeAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go b/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go index d0603023123..5e0dbf0cc7c 100644 --- a/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go +++ b/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteNetworkInsightsAnalysisMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkInsightsAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkInsightsPath.go b/service/ec2/api_op_DeleteNetworkInsightsPath.go index 268bbb4eb30..048381e57f2 100644 --- a/service/ec2/api_op_DeleteNetworkInsightsPath.go +++ b/service/ec2/api_op_DeleteNetworkInsightsPath.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteNetworkInsightsPathMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkInsightsPathValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkInterface.go b/service/ec2/api_op_DeleteNetworkInterface.go index 2aa59455461..bbbf6794b3b 100644 --- a/service/ec2/api_op_DeleteNetworkInterface.go +++ b/service/ec2/api_op_DeleteNetworkInterface.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteNetworkInterfaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteNetworkInterfacePermission.go b/service/ec2/api_op_DeleteNetworkInterfacePermission.go index fbbb2b11444..a2e2a927bb9 100644 --- a/service/ec2/api_op_DeleteNetworkInterfacePermission.go +++ b/service/ec2/api_op_DeleteNetworkInterfacePermission.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteNetworkInterfacePermissionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkInterfacePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeletePlacementGroup.go b/service/ec2/api_op_DeletePlacementGroup.go index 233d91d3b59..be70d920e19 100644 --- a/service/ec2/api_op_DeletePlacementGroup.go +++ b/service/ec2/api_op_DeletePlacementGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeletePlacementGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePlacementGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeletePublicIpv4Pool.go b/service/ec2/api_op_DeletePublicIpv4Pool.go index 34701a73b97..1aaf34be7ab 100644 --- a/service/ec2/api_op_DeletePublicIpv4Pool.go +++ b/service/ec2/api_op_DeletePublicIpv4Pool.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePublicIpv4PoolMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePublicIpv4PoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteQueuedReservedInstances.go b/service/ec2/api_op_DeleteQueuedReservedInstances.go index 8fc998b2dad..68f35e57076 100644 --- a/service/ec2/api_op_DeleteQueuedReservedInstances.go +++ b/service/ec2/api_op_DeleteQueuedReservedInstances.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteQueuedReservedInstancesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueuedReservedInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteRoute.go b/service/ec2/api_op_DeleteRoute.go index 5b3ff3cc7ef..ed722ed1cdd 100644 --- a/service/ec2/api_op_DeleteRoute.go +++ b/service/ec2/api_op_DeleteRoute.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteRouteTable.go b/service/ec2/api_op_DeleteRouteTable.go index 79a99574c07..ba251b643c5 100644 --- a/service/ec2/api_op_DeleteRouteTable.go +++ b/service/ec2/api_op_DeleteRouteTable.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteRouteTableMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteSecurityGroup.go b/service/ec2/api_op_DeleteSecurityGroup.go index d2de89da443..e2b382a8868 100644 --- a/service/ec2/api_op_DeleteSecurityGroup.go +++ b/service/ec2/api_op_DeleteSecurityGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteSecurityGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSecurityGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DeleteSnapshot.go b/service/ec2/api_op_DeleteSnapshot.go index 2c858178e8a..e71c8c37dc3 100644 --- a/service/ec2/api_op_DeleteSnapshot.go +++ b/service/ec2/api_op_DeleteSnapshot.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteSpotDatafeedSubscription.go b/service/ec2/api_op_DeleteSpotDatafeedSubscription.go index a41ae661d39..87a084c6844 100644 --- a/service/ec2/api_op_DeleteSpotDatafeedSubscription.go +++ b/service/ec2/api_op_DeleteSpotDatafeedSubscription.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteSpotDatafeedSubscriptionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSpotDatafeedSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DeleteSubnet.go b/service/ec2/api_op_DeleteSubnet.go index 18e272d6226..1e8b28038a1 100644 --- a/service/ec2/api_op_DeleteSubnet.go +++ b/service/ec2/api_op_DeleteSubnet.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSubnetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubnetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteSubnetCidrReservation.go b/service/ec2/api_op_DeleteSubnetCidrReservation.go index 1fec1b50759..6f16e009fc2 100644 --- a/service/ec2/api_op_DeleteSubnetCidrReservation.go +++ b/service/ec2/api_op_DeleteSubnetCidrReservation.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteSubnetCidrReservationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubnetCidrReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTags.go b/service/ec2/api_op_DeleteTags.go index 96a539a9fb8..9f98db99200 100644 --- a/service/ec2/api_op_DeleteTags.go +++ b/service/ec2/api_op_DeleteTags.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTrafficMirrorFilter.go b/service/ec2/api_op_DeleteTrafficMirrorFilter.go index 252262df153..c59a67fa04d 100644 --- a/service/ec2/api_op_DeleteTrafficMirrorFilter.go +++ b/service/ec2/api_op_DeleteTrafficMirrorFilter.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteTrafficMirrorFilterMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficMirrorFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go b/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go index 7287b268d93..480b9101497 100644 --- a/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go +++ b/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteTrafficMirrorFilterRuleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTrafficMirrorSession.go b/service/ec2/api_op_DeleteTrafficMirrorSession.go index b7d231cdaae..113061bcc04 100644 --- a/service/ec2/api_op_DeleteTrafficMirrorSession.go +++ b/service/ec2/api_op_DeleteTrafficMirrorSession.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteTrafficMirrorSessionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficMirrorSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTrafficMirrorTarget.go b/service/ec2/api_op_DeleteTrafficMirrorTarget.go index fa1efa01a34..0c09777314e 100644 --- a/service/ec2/api_op_DeleteTrafficMirrorTarget.go +++ b/service/ec2/api_op_DeleteTrafficMirrorTarget.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteTrafficMirrorTargetMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficMirrorTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGateway.go b/service/ec2/api_op_DeleteTransitGateway.go index 06921986741..a76eaa06c72 100644 --- a/service/ec2/api_op_DeleteTransitGateway.go +++ b/service/ec2/api_op_DeleteTransitGateway.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayConnect.go b/service/ec2/api_op_DeleteTransitGatewayConnect.go index 0c23119211e..b0f7f1daab0 100644 --- a/service/ec2/api_op_DeleteTransitGatewayConnect.go +++ b/service/ec2/api_op_DeleteTransitGatewayConnect.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteTransitGatewayConnectMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayConnectValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go b/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go index f6c1787f84d..28c1e721854 100644 --- a/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go +++ b/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayConnectPeerMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go b/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go index a6dd06f2cec..672bbbdc821 100644 --- a/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go +++ b/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayMulticastDomainMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go b/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go index bd49690b6aa..7232c9b8b2d 100644 --- a/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go +++ b/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayPeeringAttachmentMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go b/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go index 9aa6003bc84..1ca30843965 100644 --- a/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go +++ b/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayPolicyTableMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go b/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go index 3c953600506..a482124d348 100644 --- a/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go +++ b/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteTransitGatewayPrefixListReferenceMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayRoute.go b/service/ec2/api_op_DeleteTransitGatewayRoute.go index 29b7a7b8960..7d8024d0971 100644 --- a/service/ec2/api_op_DeleteTransitGatewayRoute.go +++ b/service/ec2/api_op_DeleteTransitGatewayRoute.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteTransitGatewayRouteMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayRouteTable.go b/service/ec2/api_op_DeleteTransitGatewayRouteTable.go index 6ba7e213345..ed956c70726 100644 --- a/service/ec2/api_op_DeleteTransitGatewayRouteTable.go +++ b/service/ec2/api_op_DeleteTransitGatewayRouteTable.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteTransitGatewayRouteTableMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go b/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go index 6845de7be78..481e16b15fc 100644 --- a/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go +++ b/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayRouteTableAnnouncementMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayRouteTableAnnouncementValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go b/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go index 34fc5297f92..f7d6ad5f07a 100644 --- a/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go +++ b/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteTransitGatewayVpcAttachmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go b/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go index b14cab4c313..5c5fd0c14d9 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go +++ b/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteVerifiedAccessEndpointMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteVerifiedAccessEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVerifiedAccessGroup.go b/service/ec2/api_op_DeleteVerifiedAccessGroup.go index b57569185ad..579430aea0b 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessGroup.go +++ b/service/ec2/api_op_DeleteVerifiedAccessGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteVerifiedAccessGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteVerifiedAccessGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVerifiedAccessInstance.go b/service/ec2/api_op_DeleteVerifiedAccessInstance.go index 104087b37d7..cae63129f9d 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessInstance.go +++ b/service/ec2/api_op_DeleteVerifiedAccessInstance.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteVerifiedAccessInstanceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteVerifiedAccessInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go b/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go index c5b5364c1b9..83adf4f0049 100644 --- a/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteVerifiedAccessTrustProviderMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVolume.go b/service/ec2/api_op_DeleteVolume.go index 2799b731a84..4d596f1297f 100644 --- a/service/ec2/api_op_DeleteVolume.go +++ b/service/ec2/api_op_DeleteVolume.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpc.go b/service/ec2/api_op_DeleteVpc.go index 3b52d360c4d..345a916a347 100644 --- a/service/ec2/api_op_DeleteVpc.go +++ b/service/ec2/api_op_DeleteVpc.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteVpcMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go b/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go index 1313f0eb389..f40cfa57a24 100644 --- a/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go +++ b/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteVpcEndpointConnectionNotificationsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcEndpointConnectionNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go b/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go index a89805afb10..9408133cc65 100644 --- a/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go +++ b/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteVpcEndpointServiceConfigurationsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcEndpointServiceConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpcEndpoints.go b/service/ec2/api_op_DeleteVpcEndpoints.go index 42d5076955b..99da28975a9 100644 --- a/service/ec2/api_op_DeleteVpcEndpoints.go +++ b/service/ec2/api_op_DeleteVpcEndpoints.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteVpcEndpointsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpcPeeringConnection.go b/service/ec2/api_op_DeleteVpcPeeringConnection.go index f047cf86bad..e1a2fd82a5f 100644 --- a/service/ec2/api_op_DeleteVpcPeeringConnection.go +++ b/service/ec2/api_op_DeleteVpcPeeringConnection.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteVpcPeeringConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcPeeringConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpnConnection.go b/service/ec2/api_op_DeleteVpnConnection.go index 8ccd3fd7239..a9a37387950 100644 --- a/service/ec2/api_op_DeleteVpnConnection.go +++ b/service/ec2/api_op_DeleteVpnConnection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteVpnConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpnConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpnConnectionRoute.go b/service/ec2/api_op_DeleteVpnConnectionRoute.go index 7ebd937a792..dafcc8e78f0 100644 --- a/service/ec2/api_op_DeleteVpnConnectionRoute.go +++ b/service/ec2/api_op_DeleteVpnConnectionRoute.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteVpnConnectionRouteMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpnConnectionRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeleteVpnGateway.go b/service/ec2/api_op_DeleteVpnGateway.go index 1d206093e60..56d271761ad 100644 --- a/service/ec2/api_op_DeleteVpnGateway.go +++ b/service/ec2/api_op_DeleteVpnGateway.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteVpnGatewayMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpnGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeprovisionByoipCidr.go b/service/ec2/api_op_DeprovisionByoipCidr.go index 528b9e70fe8..4ad750d0985 100644 --- a/service/ec2/api_op_DeprovisionByoipCidr.go +++ b/service/ec2/api_op_DeprovisionByoipCidr.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeprovisionByoipCidrMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprovisionByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeprovisionIpamByoasn.go b/service/ec2/api_op_DeprovisionIpamByoasn.go index cc0fb6094ef..36a5a40e3ec 100644 --- a/service/ec2/api_op_DeprovisionIpamByoasn.go +++ b/service/ec2/api_op_DeprovisionIpamByoasn.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeprovisionIpamByoasnMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprovisionIpamByoasnValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeprovisionIpamPoolCidr.go b/service/ec2/api_op_DeprovisionIpamPoolCidr.go index da77a6fd4af..de70badd2c8 100644 --- a/service/ec2/api_op_DeprovisionIpamPoolCidr.go +++ b/service/ec2/api_op_DeprovisionIpamPoolCidr.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeprovisionIpamPoolCidrMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprovisionIpamPoolCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go b/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go index 900ce111ce7..b3141561cf2 100644 --- a/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go +++ b/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeprovisionPublicIpv4PoolCidrMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprovisionPublicIpv4PoolCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeregisterImage.go b/service/ec2/api_op_DeregisterImage.go index 0f91ec3f888..c53fec2ac41 100644 --- a/service/ec2/api_op_DeregisterImage.go +++ b/service/ec2/api_op_DeregisterImage.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeregisterImageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go b/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go index 32ed484a1cc..5c5e792f47f 100644 --- a/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go +++ b/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeregisterInstanceEventNotificationAttributesMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterInstanceEventNotificationAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go b/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go index 6b839ffb2cb..be6ca4804ce 100644 --- a/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go +++ b/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeregisterTransitGatewayMulticastGroupMembersMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTransitGatewayMulticastGroupMembers(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go b/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go index c409974772a..bc2e36d61db 100644 --- a/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go +++ b/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeregisterTransitGatewayMulticastGroupSourcesMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTransitGatewayMulticastGroupSources(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeAccountAttributes.go b/service/ec2/api_op_DescribeAccountAttributes.go index cc051d4e365..a58a0d2cdcd 100644 --- a/service/ec2/api_op_DescribeAccountAttributes.go +++ b/service/ec2/api_op_DescribeAccountAttributes.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeAddressTransfers.go b/service/ec2/api_op_DescribeAddressTransfers.go index dcb673249f0..667c0ef101a 100644 --- a/service/ec2/api_op_DescribeAddressTransfers.go +++ b/service/ec2/api_op_DescribeAddressTransfers.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeAddressTransfersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddressTransfers(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeAddressTransfersMiddlewares(stack *middlewa return nil } -// DescribeAddressTransfersAPIClient is a client that implements the -// DescribeAddressTransfers operation. -type DescribeAddressTransfersAPIClient interface { - DescribeAddressTransfers(context.Context, *DescribeAddressTransfersInput, ...func(*Options)) (*DescribeAddressTransfersOutput, error) -} - -var _ DescribeAddressTransfersAPIClient = (*Client)(nil) - // DescribeAddressTransfersPaginatorOptions is the paginator options for // DescribeAddressTransfers type DescribeAddressTransfersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeAddressTransfersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAddressTransfers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeAddressTransfersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeAddressTransfersAPIClient is a client that implements the +// DescribeAddressTransfers operation. +type DescribeAddressTransfersAPIClient interface { + DescribeAddressTransfers(context.Context, *DescribeAddressTransfersInput, ...func(*Options)) (*DescribeAddressTransfersOutput, error) +} + +var _ DescribeAddressTransfersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAddressTransfers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeAddresses.go b/service/ec2/api_op_DescribeAddresses.go index 813fe74f176..a7760878aba 100644 --- a/service/ec2/api_op_DescribeAddresses.go +++ b/service/ec2/api_op_DescribeAddresses.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeAddressesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddresses(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeAddressesAttribute.go b/service/ec2/api_op_DescribeAddressesAttribute.go index 3143b21d098..b33cbb29f57 100644 --- a/service/ec2/api_op_DescribeAddressesAttribute.go +++ b/service/ec2/api_op_DescribeAddressesAttribute.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeAddressesAttributeMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddressesAttribute(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeAddressesAttributeMiddlewares(stack *middle return nil } -// DescribeAddressesAttributeAPIClient is a client that implements the -// DescribeAddressesAttribute operation. -type DescribeAddressesAttributeAPIClient interface { - DescribeAddressesAttribute(context.Context, *DescribeAddressesAttributeInput, ...func(*Options)) (*DescribeAddressesAttributeOutput, error) -} - -var _ DescribeAddressesAttributeAPIClient = (*Client)(nil) - // DescribeAddressesAttributePaginatorOptions is the paginator options for // DescribeAddressesAttribute type DescribeAddressesAttributePaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeAddressesAttributePaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAddressesAttribute(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeAddressesAttributePaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeAddressesAttributeAPIClient is a client that implements the +// DescribeAddressesAttribute operation. +type DescribeAddressesAttributeAPIClient interface { + DescribeAddressesAttribute(context.Context, *DescribeAddressesAttributeInput, ...func(*Options)) (*DescribeAddressesAttributeOutput, error) +} + +var _ DescribeAddressesAttributeAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAddressesAttribute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeAggregateIdFormat.go b/service/ec2/api_op_DescribeAggregateIdFormat.go index 0554252a1b4..0ffcb25e0a8 100644 --- a/service/ec2/api_op_DescribeAggregateIdFormat.go +++ b/service/ec2/api_op_DescribeAggregateIdFormat.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeAggregateIdFormatMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAggregateIdFormat(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeAvailabilityZones.go b/service/ec2/api_op_DescribeAvailabilityZones.go index b422933eaf0..b8800294b3c 100644 --- a/service/ec2/api_op_DescribeAvailabilityZones.go +++ b/service/ec2/api_op_DescribeAvailabilityZones.go @@ -166,6 +166,9 @@ func (c *Client) addOperationDescribeAvailabilityZonesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAvailabilityZones(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go b/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go index 22124987dc1..3b7cec46f82 100644 --- a/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go +++ b/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeAwsNetworkPerformanceMetricSubscriptionsMid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAwsNetworkPerformanceMetricSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeAwsNetworkPerformanceMetricSubscriptionsMid return nil } -// DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient is a client that -// implements the DescribeAwsNetworkPerformanceMetricSubscriptions operation. -type DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient interface { - DescribeAwsNetworkPerformanceMetricSubscriptions(context.Context, *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, ...func(*Options)) (*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, error) -} - -var _ DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient = (*Client)(nil) - // DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions is the // paginator options for DescribeAwsNetworkPerformanceMetricSubscriptions type DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator) NextPage(ctx } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAwsNetworkPerformanceMetricSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator) NextPage(ctx return result, nil } +// DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient is a client that +// implements the DescribeAwsNetworkPerformanceMetricSubscriptions operation. +type DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient interface { + DescribeAwsNetworkPerformanceMetricSubscriptions(context.Context, *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, ...func(*Options)) (*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, error) +} + +var _ DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAwsNetworkPerformanceMetricSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeBundleTasks.go b/service/ec2/api_op_DescribeBundleTasks.go index 1510accaba3..1d00d35eabe 100644 --- a/service/ec2/api_op_DescribeBundleTasks.go +++ b/service/ec2/api_op_DescribeBundleTasks.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeBundleTasksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBundleTasks(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeBundleTasksMiddlewares(stack *middleware.St return nil } -// DescribeBundleTasksAPIClient is a client that implements the -// DescribeBundleTasks operation. -type DescribeBundleTasksAPIClient interface { - DescribeBundleTasks(context.Context, *DescribeBundleTasksInput, ...func(*Options)) (*DescribeBundleTasksOutput, error) -} - -var _ DescribeBundleTasksAPIClient = (*Client)(nil) - // BundleTaskCompleteWaiterOptions are waiter options for BundleTaskCompleteWaiter type BundleTaskCompleteWaiterOptions struct { @@ -294,7 +289,13 @@ func (w *BundleTaskCompleteWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeBundleTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -391,6 +392,14 @@ func bundleTaskCompleteStateRetryable(ctx context.Context, input *DescribeBundle return true, nil } +// DescribeBundleTasksAPIClient is a client that implements the +// DescribeBundleTasks operation. +type DescribeBundleTasksAPIClient interface { + DescribeBundleTasks(context.Context, *DescribeBundleTasksInput, ...func(*Options)) (*DescribeBundleTasksOutput, error) +} + +var _ DescribeBundleTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBundleTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeByoipCidrs.go b/service/ec2/api_op_DescribeByoipCidrs.go index f9cc4a7ced5..707408c16d5 100644 --- a/service/ec2/api_op_DescribeByoipCidrs.go +++ b/service/ec2/api_op_DescribeByoipCidrs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeByoipCidrsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeByoipCidrsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeByoipCidrsMiddlewares(stack *middleware.Sta return nil } -// DescribeByoipCidrsAPIClient is a client that implements the DescribeByoipCidrs -// operation. -type DescribeByoipCidrsAPIClient interface { - DescribeByoipCidrs(context.Context, *DescribeByoipCidrsInput, ...func(*Options)) (*DescribeByoipCidrsOutput, error) -} - -var _ DescribeByoipCidrsAPIClient = (*Client)(nil) - // DescribeByoipCidrsPaginatorOptions is the paginator options for // DescribeByoipCidrs type DescribeByoipCidrsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeByoipCidrs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeByoipCidrsAPIClient is a client that implements the DescribeByoipCidrs +// operation. +type DescribeByoipCidrsAPIClient interface { + DescribeByoipCidrs(context.Context, *DescribeByoipCidrsInput, ...func(*Options)) (*DescribeByoipCidrsOutput, error) +} + +var _ DescribeByoipCidrsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeByoipCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeCapacityBlockOfferings.go b/service/ec2/api_op_DescribeCapacityBlockOfferings.go index 7068ac886c8..ff6eb5b5d49 100644 --- a/service/ec2/api_op_DescribeCapacityBlockOfferings.go +++ b/service/ec2/api_op_DescribeCapacityBlockOfferings.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeCapacityBlockOfferingsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCapacityBlockOfferingsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeCapacityBlockOfferingsMiddlewares(stack *mi return nil } -// DescribeCapacityBlockOfferingsAPIClient is a client that implements the -// DescribeCapacityBlockOfferings operation. -type DescribeCapacityBlockOfferingsAPIClient interface { - DescribeCapacityBlockOfferings(context.Context, *DescribeCapacityBlockOfferingsInput, ...func(*Options)) (*DescribeCapacityBlockOfferingsOutput, error) -} - -var _ DescribeCapacityBlockOfferingsAPIClient = (*Client)(nil) - // DescribeCapacityBlockOfferingsPaginatorOptions is the paginator options for // DescribeCapacityBlockOfferings type DescribeCapacityBlockOfferingsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeCapacityBlockOfferingsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCapacityBlockOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeCapacityBlockOfferingsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeCapacityBlockOfferingsAPIClient is a client that implements the +// DescribeCapacityBlockOfferings operation. +type DescribeCapacityBlockOfferingsAPIClient interface { + DescribeCapacityBlockOfferings(context.Context, *DescribeCapacityBlockOfferingsInput, ...func(*Options)) (*DescribeCapacityBlockOfferingsOutput, error) +} + +var _ DescribeCapacityBlockOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCapacityBlockOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeCapacityReservationFleets.go b/service/ec2/api_op_DescribeCapacityReservationFleets.go index 027be253467..beebedd409c 100644 --- a/service/ec2/api_op_DescribeCapacityReservationFleets.go +++ b/service/ec2/api_op_DescribeCapacityReservationFleets.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeCapacityReservationFleetsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityReservationFleets(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeCapacityReservationFleetsMiddlewares(stack return nil } -// DescribeCapacityReservationFleetsAPIClient is a client that implements the -// DescribeCapacityReservationFleets operation. -type DescribeCapacityReservationFleetsAPIClient interface { - DescribeCapacityReservationFleets(context.Context, *DescribeCapacityReservationFleetsInput, ...func(*Options)) (*DescribeCapacityReservationFleetsOutput, error) -} - -var _ DescribeCapacityReservationFleetsAPIClient = (*Client)(nil) - // DescribeCapacityReservationFleetsPaginatorOptions is the paginator options for // DescribeCapacityReservationFleets type DescribeCapacityReservationFleetsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeCapacityReservationFleetsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCapacityReservationFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeCapacityReservationFleetsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeCapacityReservationFleetsAPIClient is a client that implements the +// DescribeCapacityReservationFleets operation. +type DescribeCapacityReservationFleetsAPIClient interface { + DescribeCapacityReservationFleets(context.Context, *DescribeCapacityReservationFleetsInput, ...func(*Options)) (*DescribeCapacityReservationFleetsOutput, error) +} + +var _ DescribeCapacityReservationFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCapacityReservationFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeCapacityReservations.go b/service/ec2/api_op_DescribeCapacityReservations.go index 76c1e89e84b..3a9a08c1f28 100644 --- a/service/ec2/api_op_DescribeCapacityReservations.go +++ b/service/ec2/api_op_DescribeCapacityReservations.go @@ -204,6 +204,9 @@ func (c *Client) addOperationDescribeCapacityReservationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityReservations(options.Region), middleware.Before); err != nil { return err } @@ -225,14 +228,6 @@ func (c *Client) addOperationDescribeCapacityReservationsMiddlewares(stack *midd return nil } -// DescribeCapacityReservationsAPIClient is a client that implements the -// DescribeCapacityReservations operation. -type DescribeCapacityReservationsAPIClient interface { - DescribeCapacityReservations(context.Context, *DescribeCapacityReservationsInput, ...func(*Options)) (*DescribeCapacityReservationsOutput, error) -} - -var _ DescribeCapacityReservationsAPIClient = (*Client)(nil) - // DescribeCapacityReservationsPaginatorOptions is the paginator options for // DescribeCapacityReservations type DescribeCapacityReservationsPaginatorOptions struct { @@ -303,6 +298,9 @@ func (p *DescribeCapacityReservationsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCapacityReservations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -322,6 +320,14 @@ func (p *DescribeCapacityReservationsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeCapacityReservationsAPIClient is a client that implements the +// DescribeCapacityReservations operation. +type DescribeCapacityReservationsAPIClient interface { + DescribeCapacityReservations(context.Context, *DescribeCapacityReservationsInput, ...func(*Options)) (*DescribeCapacityReservationsOutput, error) +} + +var _ DescribeCapacityReservationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCapacityReservations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeCarrierGateways.go b/service/ec2/api_op_DescribeCarrierGateways.go index 02e34c84f7a..634589e3a71 100644 --- a/service/ec2/api_op_DescribeCarrierGateways.go +++ b/service/ec2/api_op_DescribeCarrierGateways.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeCarrierGatewaysMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCarrierGateways(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeCarrierGatewaysMiddlewares(stack *middlewar return nil } -// DescribeCarrierGatewaysAPIClient is a client that implements the -// DescribeCarrierGateways operation. -type DescribeCarrierGatewaysAPIClient interface { - DescribeCarrierGateways(context.Context, *DescribeCarrierGatewaysInput, ...func(*Options)) (*DescribeCarrierGatewaysOutput, error) -} - -var _ DescribeCarrierGatewaysAPIClient = (*Client)(nil) - // DescribeCarrierGatewaysPaginatorOptions is the paginator options for // DescribeCarrierGateways type DescribeCarrierGatewaysPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeCarrierGatewaysPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCarrierGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeCarrierGatewaysPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeCarrierGatewaysAPIClient is a client that implements the +// DescribeCarrierGateways operation. +type DescribeCarrierGatewaysAPIClient interface { + DescribeCarrierGateways(context.Context, *DescribeCarrierGatewaysInput, ...func(*Options)) (*DescribeCarrierGatewaysOutput, error) +} + +var _ DescribeCarrierGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCarrierGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeClassicLinkInstances.go b/service/ec2/api_op_DescribeClassicLinkInstances.go index 8d15cdc03ee..b9ee6ac16f5 100644 --- a/service/ec2/api_op_DescribeClassicLinkInstances.go +++ b/service/ec2/api_op_DescribeClassicLinkInstances.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeClassicLinkInstancesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClassicLinkInstances(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeClassicLinkInstancesMiddlewares(stack *midd return nil } -// DescribeClassicLinkInstancesAPIClient is a client that implements the -// DescribeClassicLinkInstances operation. -type DescribeClassicLinkInstancesAPIClient interface { - DescribeClassicLinkInstances(context.Context, *DescribeClassicLinkInstancesInput, ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error) -} - -var _ DescribeClassicLinkInstancesAPIClient = (*Client)(nil) - // DescribeClassicLinkInstancesPaginatorOptions is the paginator options for // DescribeClassicLinkInstances type DescribeClassicLinkInstancesPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeClassicLinkInstancesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClassicLinkInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeClassicLinkInstancesPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeClassicLinkInstancesAPIClient is a client that implements the +// DescribeClassicLinkInstances operation. +type DescribeClassicLinkInstancesAPIClient interface { + DescribeClassicLinkInstances(context.Context, *DescribeClassicLinkInstancesInput, ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error) +} + +var _ DescribeClassicLinkInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClassicLinkInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go b/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go index eda860d6679..13eb474a168 100644 --- a/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go +++ b/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeClientVpnAuthorizationRulesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientVpnAuthorizationRulesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeClientVpnAuthorizationRulesMiddlewares(stac return nil } -// DescribeClientVpnAuthorizationRulesAPIClient is a client that implements the -// DescribeClientVpnAuthorizationRules operation. -type DescribeClientVpnAuthorizationRulesAPIClient interface { - DescribeClientVpnAuthorizationRules(context.Context, *DescribeClientVpnAuthorizationRulesInput, ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error) -} - -var _ DescribeClientVpnAuthorizationRulesAPIClient = (*Client)(nil) - // DescribeClientVpnAuthorizationRulesPaginatorOptions is the paginator options // for DescribeClientVpnAuthorizationRules type DescribeClientVpnAuthorizationRulesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeClientVpnAuthorizationRulesPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClientVpnAuthorizationRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeClientVpnAuthorizationRulesPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeClientVpnAuthorizationRulesAPIClient is a client that implements the +// DescribeClientVpnAuthorizationRules operation. +type DescribeClientVpnAuthorizationRulesAPIClient interface { + DescribeClientVpnAuthorizationRules(context.Context, *DescribeClientVpnAuthorizationRulesInput, ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error) +} + +var _ DescribeClientVpnAuthorizationRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClientVpnAuthorizationRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeClientVpnConnections.go b/service/ec2/api_op_DescribeClientVpnConnections.go index 9c5926b14d9..d5f49ad5488 100644 --- a/service/ec2/api_op_DescribeClientVpnConnections.go +++ b/service/ec2/api_op_DescribeClientVpnConnections.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeClientVpnConnectionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientVpnConnectionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeClientVpnConnectionsMiddlewares(stack *midd return nil } -// DescribeClientVpnConnectionsAPIClient is a client that implements the -// DescribeClientVpnConnections operation. -type DescribeClientVpnConnectionsAPIClient interface { - DescribeClientVpnConnections(context.Context, *DescribeClientVpnConnectionsInput, ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error) -} - -var _ DescribeClientVpnConnectionsAPIClient = (*Client)(nil) - // DescribeClientVpnConnectionsPaginatorOptions is the paginator options for // DescribeClientVpnConnections type DescribeClientVpnConnectionsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeClientVpnConnectionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClientVpnConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeClientVpnConnectionsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeClientVpnConnectionsAPIClient is a client that implements the +// DescribeClientVpnConnections operation. +type DescribeClientVpnConnectionsAPIClient interface { + DescribeClientVpnConnections(context.Context, *DescribeClientVpnConnectionsInput, ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error) +} + +var _ DescribeClientVpnConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClientVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeClientVpnEndpoints.go b/service/ec2/api_op_DescribeClientVpnEndpoints.go index b73f5c7dd57..ec19e1cd5b5 100644 --- a/service/ec2/api_op_DescribeClientVpnEndpoints.go +++ b/service/ec2/api_op_DescribeClientVpnEndpoints.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeClientVpnEndpointsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeClientVpnEndpointsMiddlewares(stack *middle return nil } -// DescribeClientVpnEndpointsAPIClient is a client that implements the -// DescribeClientVpnEndpoints operation. -type DescribeClientVpnEndpointsAPIClient interface { - DescribeClientVpnEndpoints(context.Context, *DescribeClientVpnEndpointsInput, ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error) -} - -var _ DescribeClientVpnEndpointsAPIClient = (*Client)(nil) - // DescribeClientVpnEndpointsPaginatorOptions is the paginator options for // DescribeClientVpnEndpoints type DescribeClientVpnEndpointsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeClientVpnEndpointsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClientVpnEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeClientVpnEndpointsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeClientVpnEndpointsAPIClient is a client that implements the +// DescribeClientVpnEndpoints operation. +type DescribeClientVpnEndpointsAPIClient interface { + DescribeClientVpnEndpoints(context.Context, *DescribeClientVpnEndpointsInput, ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error) +} + +var _ DescribeClientVpnEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClientVpnEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeClientVpnRoutes.go b/service/ec2/api_op_DescribeClientVpnRoutes.go index 936001cc592..f8ae1ba81d6 100644 --- a/service/ec2/api_op_DescribeClientVpnRoutes.go +++ b/service/ec2/api_op_DescribeClientVpnRoutes.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeClientVpnRoutesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientVpnRoutesValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeClientVpnRoutesMiddlewares(stack *middlewar return nil } -// DescribeClientVpnRoutesAPIClient is a client that implements the -// DescribeClientVpnRoutes operation. -type DescribeClientVpnRoutesAPIClient interface { - DescribeClientVpnRoutes(context.Context, *DescribeClientVpnRoutesInput, ...func(*Options)) (*DescribeClientVpnRoutesOutput, error) -} - -var _ DescribeClientVpnRoutesAPIClient = (*Client)(nil) - // DescribeClientVpnRoutesPaginatorOptions is the paginator options for // DescribeClientVpnRoutes type DescribeClientVpnRoutesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeClientVpnRoutesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClientVpnRoutes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeClientVpnRoutesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeClientVpnRoutesAPIClient is a client that implements the +// DescribeClientVpnRoutes operation. +type DescribeClientVpnRoutesAPIClient interface { + DescribeClientVpnRoutes(context.Context, *DescribeClientVpnRoutesInput, ...func(*Options)) (*DescribeClientVpnRoutesOutput, error) +} + +var _ DescribeClientVpnRoutesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClientVpnRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeClientVpnTargetNetworks.go b/service/ec2/api_op_DescribeClientVpnTargetNetworks.go index c840f7de5f7..805b7909e79 100644 --- a/service/ec2/api_op_DescribeClientVpnTargetNetworks.go +++ b/service/ec2/api_op_DescribeClientVpnTargetNetworks.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeClientVpnTargetNetworksMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientVpnTargetNetworksValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeClientVpnTargetNetworksMiddlewares(stack *m return nil } -// DescribeClientVpnTargetNetworksAPIClient is a client that implements the -// DescribeClientVpnTargetNetworks operation. -type DescribeClientVpnTargetNetworksAPIClient interface { - DescribeClientVpnTargetNetworks(context.Context, *DescribeClientVpnTargetNetworksInput, ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error) -} - -var _ DescribeClientVpnTargetNetworksAPIClient = (*Client)(nil) - // DescribeClientVpnTargetNetworksPaginatorOptions is the paginator options for // DescribeClientVpnTargetNetworks type DescribeClientVpnTargetNetworksPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeClientVpnTargetNetworksPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClientVpnTargetNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeClientVpnTargetNetworksPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeClientVpnTargetNetworksAPIClient is a client that implements the +// DescribeClientVpnTargetNetworks operation. +type DescribeClientVpnTargetNetworksAPIClient interface { + DescribeClientVpnTargetNetworks(context.Context, *DescribeClientVpnTargetNetworksInput, ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error) +} + +var _ DescribeClientVpnTargetNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClientVpnTargetNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeCoipPools.go b/service/ec2/api_op_DescribeCoipPools.go index ae44951ee19..f81da359239 100644 --- a/service/ec2/api_op_DescribeCoipPools.go +++ b/service/ec2/api_op_DescribeCoipPools.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeCoipPoolsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCoipPools(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeCoipPoolsMiddlewares(stack *middleware.Stac return nil } -// DescribeCoipPoolsAPIClient is a client that implements the DescribeCoipPools -// operation. -type DescribeCoipPoolsAPIClient interface { - DescribeCoipPools(context.Context, *DescribeCoipPoolsInput, ...func(*Options)) (*DescribeCoipPoolsOutput, error) -} - -var _ DescribeCoipPoolsAPIClient = (*Client)(nil) - // DescribeCoipPoolsPaginatorOptions is the paginator options for DescribeCoipPools type DescribeCoipPoolsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -223,6 +218,9 @@ func (p *DescribeCoipPoolsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCoipPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeCoipPoolsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeCoipPoolsAPIClient is a client that implements the DescribeCoipPools +// operation. +type DescribeCoipPoolsAPIClient interface { + DescribeCoipPools(context.Context, *DescribeCoipPoolsInput, ...func(*Options)) (*DescribeCoipPoolsOutput, error) +} + +var _ DescribeCoipPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCoipPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeConversionTasks.go b/service/ec2/api_op_DescribeConversionTasks.go index f5fa03019cc..1d38f4f5583 100644 --- a/service/ec2/api_op_DescribeConversionTasks.go +++ b/service/ec2/api_op_DescribeConversionTasks.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeConversionTasksMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConversionTasks(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeConversionTasksMiddlewares(stack *middlewar return nil } -// DescribeConversionTasksAPIClient is a client that implements the -// DescribeConversionTasks operation. -type DescribeConversionTasksAPIClient interface { - DescribeConversionTasks(context.Context, *DescribeConversionTasksInput, ...func(*Options)) (*DescribeConversionTasksOutput, error) -} - -var _ DescribeConversionTasksAPIClient = (*Client)(nil) - // ConversionTaskCancelledWaiterOptions are waiter options for // ConversionTaskCancelledWaiter type ConversionTaskCancelledWaiterOptions struct { @@ -266,7 +261,13 @@ func (w *ConversionTaskCancelledWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeConversionTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -456,7 +457,13 @@ func (w *ConversionTaskCompletedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeConversionTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -694,7 +701,13 @@ func (w *ConversionTaskDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeConversionTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -767,6 +780,14 @@ func conversionTaskDeletedStateRetryable(ctx context.Context, input *DescribeCon return true, nil } +// DescribeConversionTasksAPIClient is a client that implements the +// DescribeConversionTasks operation. +type DescribeConversionTasksAPIClient interface { + DescribeConversionTasks(context.Context, *DescribeConversionTasksInput, ...func(*Options)) (*DescribeConversionTasksOutput, error) +} + +var _ DescribeConversionTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConversionTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeCustomerGateways.go b/service/ec2/api_op_DescribeCustomerGateways.go index 52cbc8425bb..9eba2b49408 100644 --- a/service/ec2/api_op_DescribeCustomerGateways.go +++ b/service/ec2/api_op_DescribeCustomerGateways.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeCustomerGatewaysMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomerGateways(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeCustomerGatewaysMiddlewares(stack *middlewa return nil } -// DescribeCustomerGatewaysAPIClient is a client that implements the -// DescribeCustomerGateways operation. -type DescribeCustomerGatewaysAPIClient interface { - DescribeCustomerGateways(context.Context, *DescribeCustomerGatewaysInput, ...func(*Options)) (*DescribeCustomerGatewaysOutput, error) -} - -var _ DescribeCustomerGatewaysAPIClient = (*Client)(nil) - // CustomerGatewayAvailableWaiterOptions are waiter options for // CustomerGatewayAvailableWaiter type CustomerGatewayAvailableWaiterOptions struct { @@ -294,7 +289,13 @@ func (w *CustomerGatewayAvailableWaiter) WaitForOutput(ctx context.Context, para } out, err := w.client.DescribeCustomerGateways(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -415,6 +416,14 @@ func customerGatewayAvailableStateRetryable(ctx context.Context, input *Describe return true, nil } +// DescribeCustomerGatewaysAPIClient is a client that implements the +// DescribeCustomerGateways operation. +type DescribeCustomerGatewaysAPIClient interface { + DescribeCustomerGateways(context.Context, *DescribeCustomerGatewaysInput, ...func(*Options)) (*DescribeCustomerGatewaysOutput, error) +} + +var _ DescribeCustomerGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCustomerGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeDhcpOptions.go b/service/ec2/api_op_DescribeDhcpOptions.go index 6497a866c8e..ba4ad33f742 100644 --- a/service/ec2/api_op_DescribeDhcpOptions.go +++ b/service/ec2/api_op_DescribeDhcpOptions.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeDhcpOptionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDhcpOptions(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeDhcpOptionsMiddlewares(stack *middleware.St return nil } -// DescribeDhcpOptionsAPIClient is a client that implements the -// DescribeDhcpOptions operation. -type DescribeDhcpOptionsAPIClient interface { - DescribeDhcpOptions(context.Context, *DescribeDhcpOptionsInput, ...func(*Options)) (*DescribeDhcpOptionsOutput, error) -} - -var _ DescribeDhcpOptionsAPIClient = (*Client)(nil) - // DescribeDhcpOptionsPaginatorOptions is the paginator options for // DescribeDhcpOptions type DescribeDhcpOptionsPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *DescribeDhcpOptionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDhcpOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *DescribeDhcpOptionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeDhcpOptionsAPIClient is a client that implements the +// DescribeDhcpOptions operation. +type DescribeDhcpOptionsAPIClient interface { + DescribeDhcpOptions(context.Context, *DescribeDhcpOptionsInput, ...func(*Options)) (*DescribeDhcpOptionsOutput, error) +} + +var _ DescribeDhcpOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go b/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go index 26865e6a711..151d60a71d0 100644 --- a/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go +++ b/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeEgressOnlyInternetGatewaysMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEgressOnlyInternetGateways(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeEgressOnlyInternetGatewaysMiddlewares(stack return nil } -// DescribeEgressOnlyInternetGatewaysAPIClient is a client that implements the -// DescribeEgressOnlyInternetGateways operation. -type DescribeEgressOnlyInternetGatewaysAPIClient interface { - DescribeEgressOnlyInternetGateways(context.Context, *DescribeEgressOnlyInternetGatewaysInput, ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error) -} - -var _ DescribeEgressOnlyInternetGatewaysAPIClient = (*Client)(nil) - // DescribeEgressOnlyInternetGatewaysPaginatorOptions is the paginator options for // DescribeEgressOnlyInternetGateways type DescribeEgressOnlyInternetGatewaysPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeEgressOnlyInternetGatewaysPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEgressOnlyInternetGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeEgressOnlyInternetGatewaysPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeEgressOnlyInternetGatewaysAPIClient is a client that implements the +// DescribeEgressOnlyInternetGateways operation. +type DescribeEgressOnlyInternetGatewaysAPIClient interface { + DescribeEgressOnlyInternetGateways(context.Context, *DescribeEgressOnlyInternetGatewaysInput, ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error) +} + +var _ DescribeEgressOnlyInternetGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEgressOnlyInternetGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeElasticGpus.go b/service/ec2/api_op_DescribeElasticGpus.go index 89260c38e1c..470dabf8a9c 100644 --- a/service/ec2/api_op_DescribeElasticGpus.go +++ b/service/ec2/api_op_DescribeElasticGpus.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeElasticGpusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeElasticGpus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeExportImageTasks.go b/service/ec2/api_op_DescribeExportImageTasks.go index 765d522feee..5284a9705a9 100644 --- a/service/ec2/api_op_DescribeExportImageTasks.go +++ b/service/ec2/api_op_DescribeExportImageTasks.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeExportImageTasksMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportImageTasks(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeExportImageTasksMiddlewares(stack *middlewa return nil } -// DescribeExportImageTasksAPIClient is a client that implements the -// DescribeExportImageTasks operation. -type DescribeExportImageTasksAPIClient interface { - DescribeExportImageTasks(context.Context, *DescribeExportImageTasksInput, ...func(*Options)) (*DescribeExportImageTasksOutput, error) -} - -var _ DescribeExportImageTasksAPIClient = (*Client)(nil) - // DescribeExportImageTasksPaginatorOptions is the paginator options for // DescribeExportImageTasks type DescribeExportImageTasksPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeExportImageTasksPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeExportImageTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeExportImageTasksPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeExportImageTasksAPIClient is a client that implements the +// DescribeExportImageTasks operation. +type DescribeExportImageTasksAPIClient interface { + DescribeExportImageTasks(context.Context, *DescribeExportImageTasksInput, ...func(*Options)) (*DescribeExportImageTasksOutput, error) +} + +var _ DescribeExportImageTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExportImageTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeExportTasks.go b/service/ec2/api_op_DescribeExportTasks.go index b84be32397e..9c2507f9027 100644 --- a/service/ec2/api_op_DescribeExportTasks.go +++ b/service/ec2/api_op_DescribeExportTasks.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportTasks(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St return nil } -// DescribeExportTasksAPIClient is a client that implements the -// DescribeExportTasks operation. -type DescribeExportTasksAPIClient interface { - DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) -} - -var _ DescribeExportTasksAPIClient = (*Client)(nil) - // ExportTaskCancelledWaiterOptions are waiter options for // ExportTaskCancelledWaiter type ExportTaskCancelledWaiterOptions struct { @@ -258,7 +253,13 @@ func (w *ExportTaskCancelledWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeExportTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -448,7 +449,13 @@ func (w *ExportTaskCompletedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeExportTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -521,6 +528,14 @@ func exportTaskCompletedStateRetryable(ctx context.Context, input *DescribeExpor return true, nil } +// DescribeExportTasksAPIClient is a client that implements the +// DescribeExportTasks operation. +type DescribeExportTasksAPIClient interface { + DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) +} + +var _ DescribeExportTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeFastLaunchImages.go b/service/ec2/api_op_DescribeFastLaunchImages.go index d6947cf5111..a81ee79fa3b 100644 --- a/service/ec2/api_op_DescribeFastLaunchImages.go +++ b/service/ec2/api_op_DescribeFastLaunchImages.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeFastLaunchImagesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFastLaunchImages(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeFastLaunchImagesMiddlewares(stack *middlewa return nil } -// DescribeFastLaunchImagesAPIClient is a client that implements the -// DescribeFastLaunchImages operation. -type DescribeFastLaunchImagesAPIClient interface { - DescribeFastLaunchImages(context.Context, *DescribeFastLaunchImagesInput, ...func(*Options)) (*DescribeFastLaunchImagesOutput, error) -} - -var _ DescribeFastLaunchImagesAPIClient = (*Client)(nil) - // DescribeFastLaunchImagesPaginatorOptions is the paginator options for // DescribeFastLaunchImages type DescribeFastLaunchImagesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeFastLaunchImagesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFastLaunchImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeFastLaunchImagesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeFastLaunchImagesAPIClient is a client that implements the +// DescribeFastLaunchImages operation. +type DescribeFastLaunchImagesAPIClient interface { + DescribeFastLaunchImages(context.Context, *DescribeFastLaunchImagesInput, ...func(*Options)) (*DescribeFastLaunchImagesOutput, error) +} + +var _ DescribeFastLaunchImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFastLaunchImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeFastSnapshotRestores.go b/service/ec2/api_op_DescribeFastSnapshotRestores.go index 040c0b6e1e0..9c1a4518965 100644 --- a/service/ec2/api_op_DescribeFastSnapshotRestores.go +++ b/service/ec2/api_op_DescribeFastSnapshotRestores.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeFastSnapshotRestoresMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFastSnapshotRestores(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeFastSnapshotRestoresMiddlewares(stack *midd return nil } -// DescribeFastSnapshotRestoresAPIClient is a client that implements the -// DescribeFastSnapshotRestores operation. -type DescribeFastSnapshotRestoresAPIClient interface { - DescribeFastSnapshotRestores(context.Context, *DescribeFastSnapshotRestoresInput, ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error) -} - -var _ DescribeFastSnapshotRestoresAPIClient = (*Client)(nil) - // DescribeFastSnapshotRestoresPaginatorOptions is the paginator options for // DescribeFastSnapshotRestores type DescribeFastSnapshotRestoresPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeFastSnapshotRestoresPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFastSnapshotRestores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeFastSnapshotRestoresPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeFastSnapshotRestoresAPIClient is a client that implements the +// DescribeFastSnapshotRestores operation. +type DescribeFastSnapshotRestoresAPIClient interface { + DescribeFastSnapshotRestores(context.Context, *DescribeFastSnapshotRestoresInput, ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error) +} + +var _ DescribeFastSnapshotRestoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeFleetHistory.go b/service/ec2/api_op_DescribeFleetHistory.go index e21a50e04cb..cc9a085b287 100644 --- a/service/ec2/api_op_DescribeFleetHistory.go +++ b/service/ec2/api_op_DescribeFleetHistory.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeFleetHistoryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetHistoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeFleetInstances.go b/service/ec2/api_op_DescribeFleetInstances.go index 4cf70389feb..8ba48d27ee1 100644 --- a/service/ec2/api_op_DescribeFleetInstances.go +++ b/service/ec2/api_op_DescribeFleetInstances.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeFleetInstancesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeFleets.go b/service/ec2/api_op_DescribeFleets.go index df943248f75..4ad03d6efae 100644 --- a/service/ec2/api_op_DescribeFleets.go +++ b/service/ec2/api_op_DescribeFleets.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeFleetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleets(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationDescribeFleetsMiddlewares(stack *middleware.Stack, return nil } -// DescribeFleetsAPIClient is a client that implements the DescribeFleets -// operation. -type DescribeFleetsAPIClient interface { - DescribeFleets(context.Context, *DescribeFleetsInput, ...func(*Options)) (*DescribeFleetsOutput, error) -} - -var _ DescribeFleetsAPIClient = (*Client)(nil) - // DescribeFleetsPaginatorOptions is the paginator options for DescribeFleets type DescribeFleetsPaginatorOptions struct { // The maximum number of items to return for this request. To get the next page of @@ -249,6 +244,9 @@ func (p *DescribeFleetsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *DescribeFleetsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeFleetsAPIClient is a client that implements the DescribeFleets +// operation. +type DescribeFleetsAPIClient interface { + DescribeFleets(context.Context, *DescribeFleetsInput, ...func(*Options)) (*DescribeFleetsOutput, error) +} + +var _ DescribeFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeFlowLogs.go b/service/ec2/api_op_DescribeFlowLogs.go index 6aa6e468631..2acbe7f7b96 100644 --- a/service/ec2/api_op_DescribeFlowLogs.go +++ b/service/ec2/api_op_DescribeFlowLogs.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribeFlowLogsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFlowLogs(options.Region), middleware.Before); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationDescribeFlowLogsMiddlewares(stack *middleware.Stack return nil } -// DescribeFlowLogsAPIClient is a client that implements the DescribeFlowLogs -// operation. -type DescribeFlowLogsAPIClient interface { - DescribeFlowLogs(context.Context, *DescribeFlowLogsInput, ...func(*Options)) (*DescribeFlowLogsOutput, error) -} - -var _ DescribeFlowLogsAPIClient = (*Client)(nil) - // DescribeFlowLogsPaginatorOptions is the paginator options for DescribeFlowLogs type DescribeFlowLogsPaginatorOptions struct { // The maximum number of items to return for this request. To get the next page of @@ -251,6 +246,9 @@ func (p *DescribeFlowLogsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFlowLogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *DescribeFlowLogsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeFlowLogsAPIClient is a client that implements the DescribeFlowLogs +// operation. +type DescribeFlowLogsAPIClient interface { + DescribeFlowLogs(context.Context, *DescribeFlowLogsInput, ...func(*Options)) (*DescribeFlowLogsOutput, error) +} + +var _ DescribeFlowLogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeFpgaImageAttribute.go b/service/ec2/api_op_DescribeFpgaImageAttribute.go index 87c1a8488c5..f068091356a 100644 --- a/service/ec2/api_op_DescribeFpgaImageAttribute.go +++ b/service/ec2/api_op_DescribeFpgaImageAttribute.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeFpgaImageAttributeMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFpgaImageAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeFpgaImages.go b/service/ec2/api_op_DescribeFpgaImages.go index 621e82e8daf..7786fe6115b 100644 --- a/service/ec2/api_op_DescribeFpgaImages.go +++ b/service/ec2/api_op_DescribeFpgaImages.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeFpgaImagesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFpgaImages(options.Region), middleware.Before); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationDescribeFpgaImagesMiddlewares(stack *middleware.Sta return nil } -// DescribeFpgaImagesAPIClient is a client that implements the DescribeFpgaImages -// operation. -type DescribeFpgaImagesAPIClient interface { - DescribeFpgaImages(context.Context, *DescribeFpgaImagesInput, ...func(*Options)) (*DescribeFpgaImagesOutput, error) -} - -var _ DescribeFpgaImagesAPIClient = (*Client)(nil) - // DescribeFpgaImagesPaginatorOptions is the paginator options for // DescribeFpgaImages type DescribeFpgaImagesPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeFpgaImagesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFpgaImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeFpgaImagesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeFpgaImagesAPIClient is a client that implements the DescribeFpgaImages +// operation. +type DescribeFpgaImagesAPIClient interface { + DescribeFpgaImages(context.Context, *DescribeFpgaImagesInput, ...func(*Options)) (*DescribeFpgaImagesOutput, error) +} + +var _ DescribeFpgaImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFpgaImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeHostReservationOfferings.go b/service/ec2/api_op_DescribeHostReservationOfferings.go index e7d91356f04..5cacd9977db 100644 --- a/service/ec2/api_op_DescribeHostReservationOfferings.go +++ b/service/ec2/api_op_DescribeHostReservationOfferings.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeHostReservationOfferingsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHostReservationOfferings(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeHostReservationOfferingsMiddlewares(stack * return nil } -// DescribeHostReservationOfferingsAPIClient is a client that implements the -// DescribeHostReservationOfferings operation. -type DescribeHostReservationOfferingsAPIClient interface { - DescribeHostReservationOfferings(context.Context, *DescribeHostReservationOfferingsInput, ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error) -} - -var _ DescribeHostReservationOfferingsAPIClient = (*Client)(nil) - // DescribeHostReservationOfferingsPaginatorOptions is the paginator options for // DescribeHostReservationOfferings type DescribeHostReservationOfferingsPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *DescribeHostReservationOfferingsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeHostReservationOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *DescribeHostReservationOfferingsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeHostReservationOfferingsAPIClient is a client that implements the +// DescribeHostReservationOfferings operation. +type DescribeHostReservationOfferingsAPIClient interface { + DescribeHostReservationOfferings(context.Context, *DescribeHostReservationOfferingsInput, ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error) +} + +var _ DescribeHostReservationOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeHostReservationOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeHostReservations.go b/service/ec2/api_op_DescribeHostReservations.go index 90026bb581a..78e2c2c1745 100644 --- a/service/ec2/api_op_DescribeHostReservations.go +++ b/service/ec2/api_op_DescribeHostReservations.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeHostReservationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHostReservations(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeHostReservationsMiddlewares(stack *middlewa return nil } -// DescribeHostReservationsAPIClient is a client that implements the -// DescribeHostReservations operation. -type DescribeHostReservationsAPIClient interface { - DescribeHostReservations(context.Context, *DescribeHostReservationsInput, ...func(*Options)) (*DescribeHostReservationsOutput, error) -} - -var _ DescribeHostReservationsAPIClient = (*Client)(nil) - // DescribeHostReservationsPaginatorOptions is the paginator options for // DescribeHostReservations type DescribeHostReservationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeHostReservationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeHostReservations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeHostReservationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeHostReservationsAPIClient is a client that implements the +// DescribeHostReservations operation. +type DescribeHostReservationsAPIClient interface { + DescribeHostReservations(context.Context, *DescribeHostReservationsInput, ...func(*Options)) (*DescribeHostReservationsOutput, error) +} + +var _ DescribeHostReservationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeHostReservations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeHosts.go b/service/ec2/api_op_DescribeHosts.go index 9b06f83a145..56a239fce53 100644 --- a/service/ec2/api_op_DescribeHosts.go +++ b/service/ec2/api_op_DescribeHosts.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeHostsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHosts(options.Region), middleware.Before); err != nil { return err } @@ -166,13 +169,6 @@ func (c *Client) addOperationDescribeHostsMiddlewares(stack *middleware.Stack, o return nil } -// DescribeHostsAPIClient is a client that implements the DescribeHosts operation. -type DescribeHostsAPIClient interface { - DescribeHosts(context.Context, *DescribeHostsInput, ...func(*Options)) (*DescribeHostsOutput, error) -} - -var _ DescribeHostsAPIClient = (*Client)(nil) - // DescribeHostsPaginatorOptions is the paginator options for DescribeHosts type DescribeHostsPaginatorOptions struct { // The maximum number of results to return for the request in a single page. The @@ -242,6 +238,9 @@ func (p *DescribeHostsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeHosts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +260,13 @@ func (p *DescribeHostsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeHostsAPIClient is a client that implements the DescribeHosts operation. +type DescribeHostsAPIClient interface { + DescribeHosts(context.Context, *DescribeHostsInput, ...func(*Options)) (*DescribeHostsOutput, error) +} + +var _ DescribeHostsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeHosts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go b/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go index 04926aefdc3..1e511b6c45f 100644 --- a/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go +++ b/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeIamInstanceProfileAssociationsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIamInstanceProfileAssociations(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeIamInstanceProfileAssociationsMiddlewares(s return nil } -// DescribeIamInstanceProfileAssociationsAPIClient is a client that implements the -// DescribeIamInstanceProfileAssociations operation. -type DescribeIamInstanceProfileAssociationsAPIClient interface { - DescribeIamInstanceProfileAssociations(context.Context, *DescribeIamInstanceProfileAssociationsInput, ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error) -} - -var _ DescribeIamInstanceProfileAssociationsAPIClient = (*Client)(nil) - // DescribeIamInstanceProfileAssociationsPaginatorOptions is the paginator options // for DescribeIamInstanceProfileAssociations type DescribeIamInstanceProfileAssociationsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeIamInstanceProfileAssociationsPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIamInstanceProfileAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeIamInstanceProfileAssociationsPaginator) NextPage(ctx context.C return result, nil } +// DescribeIamInstanceProfileAssociationsAPIClient is a client that implements the +// DescribeIamInstanceProfileAssociations operation. +type DescribeIamInstanceProfileAssociationsAPIClient interface { + DescribeIamInstanceProfileAssociations(context.Context, *DescribeIamInstanceProfileAssociationsInput, ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error) +} + +var _ DescribeIamInstanceProfileAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIamInstanceProfileAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIdFormat.go b/service/ec2/api_op_DescribeIdFormat.go index 1890bdb7515..3231b25a393 100644 --- a/service/ec2/api_op_DescribeIdFormat.go +++ b/service/ec2/api_op_DescribeIdFormat.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeIdFormatMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIdFormat(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeIdentityIdFormat.go b/service/ec2/api_op_DescribeIdentityIdFormat.go index 64daff015f2..bbad365711d 100644 --- a/service/ec2/api_op_DescribeIdentityIdFormat.go +++ b/service/ec2/api_op_DescribeIdentityIdFormat.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeIdentityIdFormatMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityIdFormatValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeImageAttribute.go b/service/ec2/api_op_DescribeImageAttribute.go index eaf00e038ce..5cb6afb4a36 100644 --- a/service/ec2/api_op_DescribeImageAttribute.go +++ b/service/ec2/api_op_DescribeImageAttribute.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeImageAttributeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeImages.go b/service/ec2/api_op_DescribeImages.go index e49568987d0..4baf9749886 100644 --- a/service/ec2/api_op_DescribeImages.go +++ b/service/ec2/api_op_DescribeImages.go @@ -280,6 +280,9 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImages(options.Region), middleware.Before); err != nil { return err } @@ -301,100 +304,6 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, return nil } -// DescribeImagesAPIClient is a client that implements the DescribeImages -// operation. -type DescribeImagesAPIClient interface { - DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) -} - -var _ DescribeImagesAPIClient = (*Client)(nil) - -// DescribeImagesPaginatorOptions is the paginator options for DescribeImages -type DescribeImagesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeImagesPaginator is a paginator for DescribeImages -type DescribeImagesPaginator struct { - options DescribeImagesPaginatorOptions - client DescribeImagesAPIClient - params *DescribeImagesInput - nextToken *string - firstPage bool -} - -// NewDescribeImagesPaginator returns a new DescribeImagesPaginator -func NewDescribeImagesPaginator(client DescribeImagesAPIClient, params *DescribeImagesInput, optFns ...func(*DescribeImagesPaginatorOptions)) *DescribeImagesPaginator { - if params == nil { - params = &DescribeImagesInput{} - } - - options := DescribeImagesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeImagesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeImagesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeImages page. -func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImagesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeImages(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ImageAvailableWaiterOptions are waiter options for ImageAvailableWaiter type ImageAvailableWaiterOptions struct { @@ -510,7 +419,13 @@ func (w *ImageAvailableWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeImages(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -721,7 +636,13 @@ func (w *ImageExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeI } out, err := w.client.DescribeImages(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -795,6 +716,103 @@ func imageExistsStateRetryable(ctx context.Context, input *DescribeImagesInput, return true, nil } +// DescribeImagesPaginatorOptions is the paginator options for DescribeImages +type DescribeImagesPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeImagesPaginator is a paginator for DescribeImages +type DescribeImagesPaginator struct { + options DescribeImagesPaginatorOptions + client DescribeImagesAPIClient + params *DescribeImagesInput + nextToken *string + firstPage bool +} + +// NewDescribeImagesPaginator returns a new DescribeImagesPaginator +func NewDescribeImagesPaginator(client DescribeImagesAPIClient, params *DescribeImagesInput, optFns ...func(*DescribeImagesPaginatorOptions)) *DescribeImagesPaginator { + if params == nil { + params = &DescribeImagesInput{} + } + + options := DescribeImagesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeImagesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeImagesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeImages page. +func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImagesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeImages(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeImagesAPIClient is a client that implements the DescribeImages +// operation. +type DescribeImagesAPIClient interface { + DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) +} + +var _ DescribeImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeImportImageTasks.go b/service/ec2/api_op_DescribeImportImageTasks.go index 1379f52dd77..3faa0d43a96 100644 --- a/service/ec2/api_op_DescribeImportImageTasks.go +++ b/service/ec2/api_op_DescribeImportImageTasks.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeImportImageTasksMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportImageTasks(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeImportImageTasksMiddlewares(stack *middlewa return nil } -// DescribeImportImageTasksAPIClient is a client that implements the -// DescribeImportImageTasks operation. -type DescribeImportImageTasksAPIClient interface { - DescribeImportImageTasks(context.Context, *DescribeImportImageTasksInput, ...func(*Options)) (*DescribeImportImageTasksOutput, error) -} - -var _ DescribeImportImageTasksAPIClient = (*Client)(nil) - // DescribeImportImageTasksPaginatorOptions is the paginator options for // DescribeImportImageTasks type DescribeImportImageTasksPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeImportImageTasksPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImportImageTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeImportImageTasksPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeImportImageTasksAPIClient is a client that implements the +// DescribeImportImageTasks operation. +type DescribeImportImageTasksAPIClient interface { + DescribeImportImageTasks(context.Context, *DescribeImportImageTasksInput, ...func(*Options)) (*DescribeImportImageTasksOutput, error) +} + +var _ DescribeImportImageTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImportImageTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeImportSnapshotTasks.go b/service/ec2/api_op_DescribeImportSnapshotTasks.go index 3cd43bc85fb..c27ce77c77e 100644 --- a/service/ec2/api_op_DescribeImportSnapshotTasks.go +++ b/service/ec2/api_op_DescribeImportSnapshotTasks.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeImportSnapshotTasksMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportSnapshotTasks(options.Region), middleware.Before); err != nil { return err } @@ -150,100 +153,6 @@ func (c *Client) addOperationDescribeImportSnapshotTasksMiddlewares(stack *middl return nil } -// DescribeImportSnapshotTasksAPIClient is a client that implements the -// DescribeImportSnapshotTasks operation. -type DescribeImportSnapshotTasksAPIClient interface { - DescribeImportSnapshotTasks(context.Context, *DescribeImportSnapshotTasksInput, ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) -} - -var _ DescribeImportSnapshotTasksAPIClient = (*Client)(nil) - -// DescribeImportSnapshotTasksPaginatorOptions is the paginator options for -// DescribeImportSnapshotTasks -type DescribeImportSnapshotTasksPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeImportSnapshotTasksPaginator is a paginator for -// DescribeImportSnapshotTasks -type DescribeImportSnapshotTasksPaginator struct { - options DescribeImportSnapshotTasksPaginatorOptions - client DescribeImportSnapshotTasksAPIClient - params *DescribeImportSnapshotTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeImportSnapshotTasksPaginator returns a new -// DescribeImportSnapshotTasksPaginator -func NewDescribeImportSnapshotTasksPaginator(client DescribeImportSnapshotTasksAPIClient, params *DescribeImportSnapshotTasksInput, optFns ...func(*DescribeImportSnapshotTasksPaginatorOptions)) *DescribeImportSnapshotTasksPaginator { - if params == nil { - params = &DescribeImportSnapshotTasksInput{} - } - - options := DescribeImportSnapshotTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeImportSnapshotTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeImportSnapshotTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeImportSnapshotTasks page. -func (p *DescribeImportSnapshotTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeImportSnapshotTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // SnapshotImportedWaiterOptions are waiter options for SnapshotImportedWaiter type SnapshotImportedWaiterOptions struct { @@ -359,7 +268,13 @@ func (w *SnapshotImportedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeImportSnapshotTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -456,6 +371,103 @@ func snapshotImportedStateRetryable(ctx context.Context, input *DescribeImportSn return true, nil } +// DescribeImportSnapshotTasksPaginatorOptions is the paginator options for +// DescribeImportSnapshotTasks +type DescribeImportSnapshotTasksPaginatorOptions struct { + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeImportSnapshotTasksPaginator is a paginator for +// DescribeImportSnapshotTasks +type DescribeImportSnapshotTasksPaginator struct { + options DescribeImportSnapshotTasksPaginatorOptions + client DescribeImportSnapshotTasksAPIClient + params *DescribeImportSnapshotTasksInput + nextToken *string + firstPage bool +} + +// NewDescribeImportSnapshotTasksPaginator returns a new +// DescribeImportSnapshotTasksPaginator +func NewDescribeImportSnapshotTasksPaginator(client DescribeImportSnapshotTasksAPIClient, params *DescribeImportSnapshotTasksInput, optFns ...func(*DescribeImportSnapshotTasksPaginatorOptions)) *DescribeImportSnapshotTasksPaginator { + if params == nil { + params = &DescribeImportSnapshotTasksInput{} + } + + options := DescribeImportSnapshotTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeImportSnapshotTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeImportSnapshotTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeImportSnapshotTasks page. +func (p *DescribeImportSnapshotTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeImportSnapshotTasks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeImportSnapshotTasksAPIClient is a client that implements the +// DescribeImportSnapshotTasks operation. +type DescribeImportSnapshotTasksAPIClient interface { + DescribeImportSnapshotTasks(context.Context, *DescribeImportSnapshotTasksInput, ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) +} + +var _ DescribeImportSnapshotTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImportSnapshotTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceAttribute.go b/service/ec2/api_op_DescribeInstanceAttribute.go index 9f3c64ce2b4..f55a4f9aba1 100644 --- a/service/ec2/api_op_DescribeInstanceAttribute.go +++ b/service/ec2/api_op_DescribeInstanceAttribute.go @@ -182,6 +182,9 @@ func (c *Client) addOperationDescribeInstanceAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeInstanceConnectEndpoints.go b/service/ec2/api_op_DescribeInstanceConnectEndpoints.go index 149d13779e6..fae0280c493 100644 --- a/service/ec2/api_op_DescribeInstanceConnectEndpoints.go +++ b/service/ec2/api_op_DescribeInstanceConnectEndpoints.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeInstanceConnectEndpointsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceConnectEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeInstanceConnectEndpointsMiddlewares(stack * return nil } -// DescribeInstanceConnectEndpointsAPIClient is a client that implements the -// DescribeInstanceConnectEndpoints operation. -type DescribeInstanceConnectEndpointsAPIClient interface { - DescribeInstanceConnectEndpoints(context.Context, *DescribeInstanceConnectEndpointsInput, ...func(*Options)) (*DescribeInstanceConnectEndpointsOutput, error) -} - -var _ DescribeInstanceConnectEndpointsAPIClient = (*Client)(nil) - // DescribeInstanceConnectEndpointsPaginatorOptions is the paginator options for // DescribeInstanceConnectEndpoints type DescribeInstanceConnectEndpointsPaginatorOptions struct { @@ -251,6 +246,9 @@ func (p *DescribeInstanceConnectEndpointsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceConnectEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *DescribeInstanceConnectEndpointsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeInstanceConnectEndpointsAPIClient is a client that implements the +// DescribeInstanceConnectEndpoints operation. +type DescribeInstanceConnectEndpointsAPIClient interface { + DescribeInstanceConnectEndpoints(context.Context, *DescribeInstanceConnectEndpointsInput, ...func(*Options)) (*DescribeInstanceConnectEndpointsOutput, error) +} + +var _ DescribeInstanceConnectEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceConnectEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceCreditSpecifications.go b/service/ec2/api_op_DescribeInstanceCreditSpecifications.go index dad71acce4f..7510af53363 100644 --- a/service/ec2/api_op_DescribeInstanceCreditSpecifications.go +++ b/service/ec2/api_op_DescribeInstanceCreditSpecifications.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeInstanceCreditSpecificationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceCreditSpecifications(options.Region), middleware.Before); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationDescribeInstanceCreditSpecificationsMiddlewares(sta return nil } -// DescribeInstanceCreditSpecificationsAPIClient is a client that implements the -// DescribeInstanceCreditSpecifications operation. -type DescribeInstanceCreditSpecificationsAPIClient interface { - DescribeInstanceCreditSpecifications(context.Context, *DescribeInstanceCreditSpecificationsInput, ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error) -} - -var _ DescribeInstanceCreditSpecificationsAPIClient = (*Client)(nil) - // DescribeInstanceCreditSpecificationsPaginatorOptions is the paginator options // for DescribeInstanceCreditSpecifications type DescribeInstanceCreditSpecificationsPaginatorOptions struct { @@ -263,6 +258,9 @@ func (p *DescribeInstanceCreditSpecificationsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceCreditSpecifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -282,6 +280,14 @@ func (p *DescribeInstanceCreditSpecificationsPaginator) NextPage(ctx context.Con return result, nil } +// DescribeInstanceCreditSpecificationsAPIClient is a client that implements the +// DescribeInstanceCreditSpecifications operation. +type DescribeInstanceCreditSpecificationsAPIClient interface { + DescribeInstanceCreditSpecifications(context.Context, *DescribeInstanceCreditSpecificationsInput, ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error) +} + +var _ DescribeInstanceCreditSpecificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceCreditSpecifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go b/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go index 8cad1b4d26f..12ff20441e0 100644 --- a/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go +++ b/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeInstanceEventNotificationAttributesMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceEventNotificationAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeInstanceEventWindows.go b/service/ec2/api_op_DescribeInstanceEventWindows.go index 8286fe342a7..98a62fcba40 100644 --- a/service/ec2/api_op_DescribeInstanceEventWindows.go +++ b/service/ec2/api_op_DescribeInstanceEventWindows.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDescribeInstanceEventWindowsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceEventWindows(options.Region), middleware.Before); err != nil { return err } @@ -188,14 +191,6 @@ func (c *Client) addOperationDescribeInstanceEventWindowsMiddlewares(stack *midd return nil } -// DescribeInstanceEventWindowsAPIClient is a client that implements the -// DescribeInstanceEventWindows operation. -type DescribeInstanceEventWindowsAPIClient interface { - DescribeInstanceEventWindows(context.Context, *DescribeInstanceEventWindowsInput, ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error) -} - -var _ DescribeInstanceEventWindowsAPIClient = (*Client)(nil) - // DescribeInstanceEventWindowsPaginatorOptions is the paginator options for // DescribeInstanceEventWindows type DescribeInstanceEventWindowsPaginatorOptions struct { @@ -265,6 +260,9 @@ func (p *DescribeInstanceEventWindowsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceEventWindows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +282,14 @@ func (p *DescribeInstanceEventWindowsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeInstanceEventWindowsAPIClient is a client that implements the +// DescribeInstanceEventWindows operation. +type DescribeInstanceEventWindowsAPIClient interface { + DescribeInstanceEventWindows(context.Context, *DescribeInstanceEventWindowsInput, ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error) +} + +var _ DescribeInstanceEventWindowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceEventWindows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceStatus.go b/service/ec2/api_op_DescribeInstanceStatus.go index 1b9bd0371e7..0f453aa136a 100644 --- a/service/ec2/api_op_DescribeInstanceStatus.go +++ b/service/ec2/api_op_DescribeInstanceStatus.go @@ -212,6 +212,9 @@ func (c *Client) addOperationDescribeInstanceStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceStatus(options.Region), middleware.Before); err != nil { return err } @@ -233,104 +236,6 @@ func (c *Client) addOperationDescribeInstanceStatusMiddlewares(stack *middleware return nil } -// DescribeInstanceStatusAPIClient is a client that implements the -// DescribeInstanceStatus operation. -type DescribeInstanceStatusAPIClient interface { - DescribeInstanceStatus(context.Context, *DescribeInstanceStatusInput, ...func(*Options)) (*DescribeInstanceStatusOutput, error) -} - -var _ DescribeInstanceStatusAPIClient = (*Client)(nil) - -// DescribeInstanceStatusPaginatorOptions is the paginator options for -// DescribeInstanceStatus -type DescribeInstanceStatusPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // You cannot specify this parameter and the instance IDs parameter in the same - // request. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceStatusPaginator is a paginator for DescribeInstanceStatus -type DescribeInstanceStatusPaginator struct { - options DescribeInstanceStatusPaginatorOptions - client DescribeInstanceStatusAPIClient - params *DescribeInstanceStatusInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceStatusPaginator returns a new DescribeInstanceStatusPaginator -func NewDescribeInstanceStatusPaginator(client DescribeInstanceStatusAPIClient, params *DescribeInstanceStatusInput, optFns ...func(*DescribeInstanceStatusPaginatorOptions)) *DescribeInstanceStatusPaginator { - if params == nil { - params = &DescribeInstanceStatusInput{} - } - - options := DescribeInstanceStatusPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceStatusPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceStatusPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceStatus page. -func (p *DescribeInstanceStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceStatusOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceStatus(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // InstanceStatusOkWaiterOptions are waiter options for InstanceStatusOkWaiter type InstanceStatusOkWaiterOptions struct { @@ -446,7 +351,13 @@ func (w *InstanceStatusOkWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeInstanceStatus(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -646,7 +557,13 @@ func (w *SystemStatusOkWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeInstanceStatus(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -719,6 +636,107 @@ func systemStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceSt return true, nil } +// DescribeInstanceStatusPaginatorOptions is the paginator options for +// DescribeInstanceStatus +type DescribeInstanceStatusPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // You cannot specify this parameter and the instance IDs parameter in the same + // request. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstanceStatusPaginator is a paginator for DescribeInstanceStatus +type DescribeInstanceStatusPaginator struct { + options DescribeInstanceStatusPaginatorOptions + client DescribeInstanceStatusAPIClient + params *DescribeInstanceStatusInput + nextToken *string + firstPage bool +} + +// NewDescribeInstanceStatusPaginator returns a new DescribeInstanceStatusPaginator +func NewDescribeInstanceStatusPaginator(client DescribeInstanceStatusAPIClient, params *DescribeInstanceStatusInput, optFns ...func(*DescribeInstanceStatusPaginatorOptions)) *DescribeInstanceStatusPaginator { + if params == nil { + params = &DescribeInstanceStatusInput{} + } + + options := DescribeInstanceStatusPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstanceStatusPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstanceStatusPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstanceStatus page. +func (p *DescribeInstanceStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceStatusOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstanceStatus(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstanceStatusAPIClient is a client that implements the +// DescribeInstanceStatus operation. +type DescribeInstanceStatusAPIClient interface { + DescribeInstanceStatus(context.Context, *DescribeInstanceStatusInput, ...func(*Options)) (*DescribeInstanceStatusOutput, error) +} + +var _ DescribeInstanceStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceTopology.go b/service/ec2/api_op_DescribeInstanceTopology.go index e9ee457e3d9..dcb94abb004 100644 --- a/service/ec2/api_op_DescribeInstanceTopology.go +++ b/service/ec2/api_op_DescribeInstanceTopology.go @@ -178,6 +178,9 @@ func (c *Client) addOperationDescribeInstanceTopologyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTopology(options.Region), middleware.Before); err != nil { return err } @@ -199,14 +202,6 @@ func (c *Client) addOperationDescribeInstanceTopologyMiddlewares(stack *middlewa return nil } -// DescribeInstanceTopologyAPIClient is a client that implements the -// DescribeInstanceTopology operation. -type DescribeInstanceTopologyAPIClient interface { - DescribeInstanceTopology(context.Context, *DescribeInstanceTopologyInput, ...func(*Options)) (*DescribeInstanceTopologyOutput, error) -} - -var _ DescribeInstanceTopologyAPIClient = (*Client)(nil) - // DescribeInstanceTopologyPaginatorOptions is the paginator options for // DescribeInstanceTopology type DescribeInstanceTopologyPaginatorOptions struct { @@ -281,6 +276,9 @@ func (p *DescribeInstanceTopologyPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceTopology(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -300,6 +298,14 @@ func (p *DescribeInstanceTopologyPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeInstanceTopologyAPIClient is a client that implements the +// DescribeInstanceTopology operation. +type DescribeInstanceTopologyAPIClient interface { + DescribeInstanceTopology(context.Context, *DescribeInstanceTopologyInput, ...func(*Options)) (*DescribeInstanceTopologyOutput, error) +} + +var _ DescribeInstanceTopologyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceTopology(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceTypeOfferings.go b/service/ec2/api_op_DescribeInstanceTypeOfferings.go index 48f5af3f24a..097521f7e62 100644 --- a/service/ec2/api_op_DescribeInstanceTypeOfferings.go +++ b/service/ec2/api_op_DescribeInstanceTypeOfferings.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeInstanceTypeOfferingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTypeOfferings(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeInstanceTypeOfferingsMiddlewares(stack *mid return nil } -// DescribeInstanceTypeOfferingsAPIClient is a client that implements the -// DescribeInstanceTypeOfferings operation. -type DescribeInstanceTypeOfferingsAPIClient interface { - DescribeInstanceTypeOfferings(context.Context, *DescribeInstanceTypeOfferingsInput, ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error) -} - -var _ DescribeInstanceTypeOfferingsAPIClient = (*Client)(nil) - // DescribeInstanceTypeOfferingsPaginatorOptions is the paginator options for // DescribeInstanceTypeOfferings type DescribeInstanceTypeOfferingsPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *DescribeInstanceTypeOfferingsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceTypeOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *DescribeInstanceTypeOfferingsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeInstanceTypeOfferingsAPIClient is a client that implements the +// DescribeInstanceTypeOfferings operation. +type DescribeInstanceTypeOfferingsAPIClient interface { + DescribeInstanceTypeOfferings(context.Context, *DescribeInstanceTypeOfferingsInput, ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error) +} + +var _ DescribeInstanceTypeOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceTypeOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstanceTypes.go b/service/ec2/api_op_DescribeInstanceTypes.go index 8c2c54c487f..6ac15093d49 100644 --- a/service/ec2/api_op_DescribeInstanceTypes.go +++ b/service/ec2/api_op_DescribeInstanceTypes.go @@ -270,6 +270,9 @@ func (c *Client) addOperationDescribeInstanceTypesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTypes(options.Region), middleware.Before); err != nil { return err } @@ -291,14 +294,6 @@ func (c *Client) addOperationDescribeInstanceTypesMiddlewares(stack *middleware. return nil } -// DescribeInstanceTypesAPIClient is a client that implements the -// DescribeInstanceTypes operation. -type DescribeInstanceTypesAPIClient interface { - DescribeInstanceTypes(context.Context, *DescribeInstanceTypesInput, ...func(*Options)) (*DescribeInstanceTypesOutput, error) -} - -var _ DescribeInstanceTypesAPIClient = (*Client)(nil) - // DescribeInstanceTypesPaginatorOptions is the paginator options for // DescribeInstanceTypes type DescribeInstanceTypesPaginatorOptions struct { @@ -367,6 +362,9 @@ func (p *DescribeInstanceTypesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -386,6 +384,14 @@ func (p *DescribeInstanceTypesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeInstanceTypesAPIClient is a client that implements the +// DescribeInstanceTypes operation. +type DescribeInstanceTypesAPIClient interface { + DescribeInstanceTypes(context.Context, *DescribeInstanceTypesInput, ...func(*Options)) (*DescribeInstanceTypesOutput, error) +} + +var _ DescribeInstanceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInstances.go b/service/ec2/api_op_DescribeInstances.go index 859409e84d8..25edbc5b003 100644 --- a/service/ec2/api_op_DescribeInstances.go +++ b/service/ec2/api_op_DescribeInstances.go @@ -553,6 +553,9 @@ func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstances(options.Region), middleware.Before); err != nil { return err } @@ -574,103 +577,6 @@ func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stac return nil } -// DescribeInstancesAPIClient is a client that implements the DescribeInstances -// operation. -type DescribeInstancesAPIClient interface { - DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) -} - -var _ DescribeInstancesAPIClient = (*Client)(nil) - -// DescribeInstancesPaginatorOptions is the paginator options for DescribeInstances -type DescribeInstancesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // You cannot specify this parameter and the instance IDs parameter in the same - // request. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstancesPaginator is a paginator for DescribeInstances -type DescribeInstancesPaginator struct { - options DescribeInstancesPaginatorOptions - client DescribeInstancesAPIClient - params *DescribeInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeInstancesPaginator returns a new DescribeInstancesPaginator -func NewDescribeInstancesPaginator(client DescribeInstancesAPIClient, params *DescribeInstancesInput, optFns ...func(*DescribeInstancesPaginatorOptions)) *DescribeInstancesPaginator { - if params == nil { - params = &DescribeInstancesInput{} - } - - options := DescribeInstancesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstances page. -func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // InstanceExistsWaiterOptions are waiter options for InstanceExistsWaiter type InstanceExistsWaiterOptions struct { @@ -786,7 +692,13 @@ func (w *InstanceExistsWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -975,7 +887,13 @@ func (w *InstanceRunningWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1247,7 +1165,13 @@ func (w *InstanceStoppedWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1483,7 +1407,13 @@ func (w *InstanceTerminatedWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1604,6 +1534,106 @@ func instanceTerminatedStateRetryable(ctx context.Context, input *DescribeInstan return true, nil } +// DescribeInstancesPaginatorOptions is the paginator options for DescribeInstances +type DescribeInstancesPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // You cannot specify this parameter and the instance IDs parameter in the same + // request. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInstancesPaginator is a paginator for DescribeInstances +type DescribeInstancesPaginator struct { + options DescribeInstancesPaginatorOptions + client DescribeInstancesAPIClient + params *DescribeInstancesInput + nextToken *string + firstPage bool +} + +// NewDescribeInstancesPaginator returns a new DescribeInstancesPaginator +func NewDescribeInstancesPaginator(client DescribeInstancesAPIClient, params *DescribeInstancesInput, optFns ...func(*DescribeInstancesPaginatorOptions)) *DescribeInstancesPaginator { + if params == nil { + params = &DescribeInstancesInput{} + } + + options := DescribeInstancesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInstancesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInstances page. +func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInstances(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInstancesAPIClient is a client that implements the DescribeInstances +// operation. +type DescribeInstancesAPIClient interface { + DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) +} + +var _ DescribeInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeInternetGateways.go b/service/ec2/api_op_DescribeInternetGateways.go index 43422c04d0e..2080e42bda0 100644 --- a/service/ec2/api_op_DescribeInternetGateways.go +++ b/service/ec2/api_op_DescribeInternetGateways.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeInternetGatewaysMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInternetGateways(options.Region), middleware.Before); err != nil { return err } @@ -178,102 +181,6 @@ func (c *Client) addOperationDescribeInternetGatewaysMiddlewares(stack *middlewa return nil } -// DescribeInternetGatewaysAPIClient is a client that implements the -// DescribeInternetGateways operation. -type DescribeInternetGatewaysAPIClient interface { - DescribeInternetGateways(context.Context, *DescribeInternetGatewaysInput, ...func(*Options)) (*DescribeInternetGatewaysOutput, error) -} - -var _ DescribeInternetGatewaysAPIClient = (*Client)(nil) - -// DescribeInternetGatewaysPaginatorOptions is the paginator options for -// DescribeInternetGateways -type DescribeInternetGatewaysPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInternetGatewaysPaginator is a paginator for DescribeInternetGateways -type DescribeInternetGatewaysPaginator struct { - options DescribeInternetGatewaysPaginatorOptions - client DescribeInternetGatewaysAPIClient - params *DescribeInternetGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeInternetGatewaysPaginator returns a new -// DescribeInternetGatewaysPaginator -func NewDescribeInternetGatewaysPaginator(client DescribeInternetGatewaysAPIClient, params *DescribeInternetGatewaysInput, optFns ...func(*DescribeInternetGatewaysPaginatorOptions)) *DescribeInternetGatewaysPaginator { - if params == nil { - params = &DescribeInternetGatewaysInput{} - } - - options := DescribeInternetGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInternetGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInternetGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInternetGateways page. -func (p *DescribeInternetGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInternetGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInternetGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // InternetGatewayExistsWaiterOptions are waiter options for // InternetGatewayExistsWaiter type InternetGatewayExistsWaiterOptions struct { @@ -391,7 +298,13 @@ func (w *InternetGatewayExistsWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeInternetGateways(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -465,6 +378,105 @@ func internetGatewayExistsStateRetryable(ctx context.Context, input *DescribeInt return true, nil } +// DescribeInternetGatewaysPaginatorOptions is the paginator options for +// DescribeInternetGateways +type DescribeInternetGatewaysPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeInternetGatewaysPaginator is a paginator for DescribeInternetGateways +type DescribeInternetGatewaysPaginator struct { + options DescribeInternetGatewaysPaginatorOptions + client DescribeInternetGatewaysAPIClient + params *DescribeInternetGatewaysInput + nextToken *string + firstPage bool +} + +// NewDescribeInternetGatewaysPaginator returns a new +// DescribeInternetGatewaysPaginator +func NewDescribeInternetGatewaysPaginator(client DescribeInternetGatewaysAPIClient, params *DescribeInternetGatewaysInput, optFns ...func(*DescribeInternetGatewaysPaginatorOptions)) *DescribeInternetGatewaysPaginator { + if params == nil { + params = &DescribeInternetGatewaysInput{} + } + + options := DescribeInternetGatewaysPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeInternetGatewaysPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeInternetGatewaysPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeInternetGateways page. +func (p *DescribeInternetGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInternetGatewaysOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeInternetGateways(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeInternetGatewaysAPIClient is a client that implements the +// DescribeInternetGateways operation. +type DescribeInternetGatewaysAPIClient interface { + DescribeInternetGateways(context.Context, *DescribeInternetGatewaysInput, ...func(*Options)) (*DescribeInternetGatewaysOutput, error) +} + +var _ DescribeInternetGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInternetGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIpamByoasn.go b/service/ec2/api_op_DescribeIpamByoasn.go index dd70cf56ae8..5defd8f0078 100644 --- a/service/ec2/api_op_DescribeIpamByoasn.go +++ b/service/ec2/api_op_DescribeIpamByoasn.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeIpamByoasnMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamByoasn(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeIpamPools.go b/service/ec2/api_op_DescribeIpamPools.go index 898f6881f09..8e13a325124 100644 --- a/service/ec2/api_op_DescribeIpamPools.go +++ b/service/ec2/api_op_DescribeIpamPools.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeIpamPoolsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamPools(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeIpamPoolsMiddlewares(stack *middleware.Stac return nil } -// DescribeIpamPoolsAPIClient is a client that implements the DescribeIpamPools -// operation. -type DescribeIpamPoolsAPIClient interface { - DescribeIpamPools(context.Context, *DescribeIpamPoolsInput, ...func(*Options)) (*DescribeIpamPoolsOutput, error) -} - -var _ DescribeIpamPoolsAPIClient = (*Client)(nil) - // DescribeIpamPoolsPaginatorOptions is the paginator options for DescribeIpamPools type DescribeIpamPoolsPaginatorOptions struct { // The maximum number of results to return in the request. @@ -217,6 +212,9 @@ func (p *DescribeIpamPoolsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIpamPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeIpamPoolsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeIpamPoolsAPIClient is a client that implements the DescribeIpamPools +// operation. +type DescribeIpamPoolsAPIClient interface { + DescribeIpamPools(context.Context, *DescribeIpamPoolsInput, ...func(*Options)) (*DescribeIpamPoolsOutput, error) +} + +var _ DescribeIpamPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIpamPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIpamResourceDiscoveries.go b/service/ec2/api_op_DescribeIpamResourceDiscoveries.go index d89e07dbb13..379fdb189d1 100644 --- a/service/ec2/api_op_DescribeIpamResourceDiscoveries.go +++ b/service/ec2/api_op_DescribeIpamResourceDiscoveries.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeIpamResourceDiscoveriesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveries(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeIpamResourceDiscoveriesMiddlewares(stack *m return nil } -// DescribeIpamResourceDiscoveriesAPIClient is a client that implements the -// DescribeIpamResourceDiscoveries operation. -type DescribeIpamResourceDiscoveriesAPIClient interface { - DescribeIpamResourceDiscoveries(context.Context, *DescribeIpamResourceDiscoveriesInput, ...func(*Options)) (*DescribeIpamResourceDiscoveriesOutput, error) -} - -var _ DescribeIpamResourceDiscoveriesAPIClient = (*Client)(nil) - // DescribeIpamResourceDiscoveriesPaginatorOptions is the paginator options for // DescribeIpamResourceDiscoveries type DescribeIpamResourceDiscoveriesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeIpamResourceDiscoveriesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIpamResourceDiscoveries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeIpamResourceDiscoveriesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeIpamResourceDiscoveriesAPIClient is a client that implements the +// DescribeIpamResourceDiscoveries operation. +type DescribeIpamResourceDiscoveriesAPIClient interface { + DescribeIpamResourceDiscoveries(context.Context, *DescribeIpamResourceDiscoveriesInput, ...func(*Options)) (*DescribeIpamResourceDiscoveriesOutput, error) +} + +var _ DescribeIpamResourceDiscoveriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go b/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go index 6bb5c9f7b99..081535c1ba3 100644 --- a/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go +++ b/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeIpamResourceDiscoveryAssociationsMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveryAssociations(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeIpamResourceDiscoveryAssociationsMiddleware return nil } -// DescribeIpamResourceDiscoveryAssociationsAPIClient is a client that implements -// the DescribeIpamResourceDiscoveryAssociations operation. -type DescribeIpamResourceDiscoveryAssociationsAPIClient interface { - DescribeIpamResourceDiscoveryAssociations(context.Context, *DescribeIpamResourceDiscoveryAssociationsInput, ...func(*Options)) (*DescribeIpamResourceDiscoveryAssociationsOutput, error) -} - -var _ DescribeIpamResourceDiscoveryAssociationsAPIClient = (*Client)(nil) - // DescribeIpamResourceDiscoveryAssociationsPaginatorOptions is the paginator // options for DescribeIpamResourceDiscoveryAssociations type DescribeIpamResourceDiscoveryAssociationsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeIpamResourceDiscoveryAssociationsPaginator) NextPage(ctx contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIpamResourceDiscoveryAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeIpamResourceDiscoveryAssociationsPaginator) NextPage(ctx contex return result, nil } +// DescribeIpamResourceDiscoveryAssociationsAPIClient is a client that implements +// the DescribeIpamResourceDiscoveryAssociations operation. +type DescribeIpamResourceDiscoveryAssociationsAPIClient interface { + DescribeIpamResourceDiscoveryAssociations(context.Context, *DescribeIpamResourceDiscoveryAssociationsInput, ...func(*Options)) (*DescribeIpamResourceDiscoveryAssociationsOutput, error) +} + +var _ DescribeIpamResourceDiscoveryAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveryAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIpamScopes.go b/service/ec2/api_op_DescribeIpamScopes.go index 625ae2fcf80..9e8fad608cc 100644 --- a/service/ec2/api_op_DescribeIpamScopes.go +++ b/service/ec2/api_op_DescribeIpamScopes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeIpamScopesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamScopes(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeIpamScopesMiddlewares(stack *middleware.Sta return nil } -// DescribeIpamScopesAPIClient is a client that implements the DescribeIpamScopes -// operation. -type DescribeIpamScopesAPIClient interface { - DescribeIpamScopes(context.Context, *DescribeIpamScopesInput, ...func(*Options)) (*DescribeIpamScopesOutput, error) -} - -var _ DescribeIpamScopesAPIClient = (*Client)(nil) - // DescribeIpamScopesPaginatorOptions is the paginator options for // DescribeIpamScopes type DescribeIpamScopesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeIpamScopesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIpamScopes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeIpamScopesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeIpamScopesAPIClient is a client that implements the DescribeIpamScopes +// operation. +type DescribeIpamScopesAPIClient interface { + DescribeIpamScopes(context.Context, *DescribeIpamScopesInput, ...func(*Options)) (*DescribeIpamScopesOutput, error) +} + +var _ DescribeIpamScopesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIpamScopes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIpams.go b/service/ec2/api_op_DescribeIpams.go index 78ae59cb69e..18695c5fff0 100644 --- a/service/ec2/api_op_DescribeIpams.go +++ b/service/ec2/api_op_DescribeIpams.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeIpamsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpams(options.Region), middleware.Before); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationDescribeIpamsMiddlewares(stack *middleware.Stack, o return nil } -// DescribeIpamsAPIClient is a client that implements the DescribeIpams operation. -type DescribeIpamsAPIClient interface { - DescribeIpams(context.Context, *DescribeIpamsInput, ...func(*Options)) (*DescribeIpamsOutput, error) -} - -var _ DescribeIpamsAPIClient = (*Client)(nil) - // DescribeIpamsPaginatorOptions is the paginator options for DescribeIpams type DescribeIpamsPaginatorOptions struct { // The maximum number of results to return in the request. @@ -220,6 +216,9 @@ func (p *DescribeIpamsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIpams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *DescribeIpamsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeIpamsAPIClient is a client that implements the DescribeIpams operation. +type DescribeIpamsAPIClient interface { + DescribeIpams(context.Context, *DescribeIpamsInput, ...func(*Options)) (*DescribeIpamsOutput, error) +} + +var _ DescribeIpamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIpams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeIpv6Pools.go b/service/ec2/api_op_DescribeIpv6Pools.go index a126a2f82e3..2eae87c3014 100644 --- a/service/ec2/api_op_DescribeIpv6Pools.go +++ b/service/ec2/api_op_DescribeIpv6Pools.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeIpv6PoolsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpv6Pools(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeIpv6PoolsMiddlewares(stack *middleware.Stac return nil } -// DescribeIpv6PoolsAPIClient is a client that implements the DescribeIpv6Pools -// operation. -type DescribeIpv6PoolsAPIClient interface { - DescribeIpv6Pools(context.Context, *DescribeIpv6PoolsInput, ...func(*Options)) (*DescribeIpv6PoolsOutput, error) -} - -var _ DescribeIpv6PoolsAPIClient = (*Client)(nil) - // DescribeIpv6PoolsPaginatorOptions is the paginator options for DescribeIpv6Pools type DescribeIpv6PoolsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -225,6 +220,9 @@ func (p *DescribeIpv6PoolsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIpv6Pools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeIpv6PoolsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeIpv6PoolsAPIClient is a client that implements the DescribeIpv6Pools +// operation. +type DescribeIpv6PoolsAPIClient interface { + DescribeIpv6Pools(context.Context, *DescribeIpv6PoolsInput, ...func(*Options)) (*DescribeIpv6PoolsOutput, error) +} + +var _ DescribeIpv6PoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIpv6Pools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeKeyPairs.go b/service/ec2/api_op_DescribeKeyPairs.go index a5d37e4491c..2abccade17c 100644 --- a/service/ec2/api_op_DescribeKeyPairs.go +++ b/service/ec2/api_op_DescribeKeyPairs.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeKeyPairsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeKeyPairs(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeKeyPairsMiddlewares(stack *middleware.Stack return nil } -// DescribeKeyPairsAPIClient is a client that implements the DescribeKeyPairs -// operation. -type DescribeKeyPairsAPIClient interface { - DescribeKeyPairs(context.Context, *DescribeKeyPairsInput, ...func(*Options)) (*DescribeKeyPairsOutput, error) -} - -var _ DescribeKeyPairsAPIClient = (*Client)(nil) - // KeyPairExistsWaiterOptions are waiter options for KeyPairExistsWaiter type KeyPairExistsWaiterOptions struct { @@ -293,7 +288,13 @@ func (w *KeyPairExistsWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeKeyPairs(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -367,6 +368,14 @@ func keyPairExistsStateRetryable(ctx context.Context, input *DescribeKeyPairsInp return true, nil } +// DescribeKeyPairsAPIClient is a client that implements the DescribeKeyPairs +// operation. +type DescribeKeyPairsAPIClient interface { + DescribeKeyPairs(context.Context, *DescribeKeyPairsInput, ...func(*Options)) (*DescribeKeyPairsOutput, error) +} + +var _ DescribeKeyPairsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeKeyPairs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLaunchTemplateVersions.go b/service/ec2/api_op_DescribeLaunchTemplateVersions.go index a174a9e1a64..67f1c1998ac 100644 --- a/service/ec2/api_op_DescribeLaunchTemplateVersions.go +++ b/service/ec2/api_op_DescribeLaunchTemplateVersions.go @@ -210,6 +210,9 @@ func (c *Client) addOperationDescribeLaunchTemplateVersionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchTemplateVersions(options.Region), middleware.Before); err != nil { return err } @@ -231,14 +234,6 @@ func (c *Client) addOperationDescribeLaunchTemplateVersionsMiddlewares(stack *mi return nil } -// DescribeLaunchTemplateVersionsAPIClient is a client that implements the -// DescribeLaunchTemplateVersions operation. -type DescribeLaunchTemplateVersionsAPIClient interface { - DescribeLaunchTemplateVersions(context.Context, *DescribeLaunchTemplateVersionsInput, ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error) -} - -var _ DescribeLaunchTemplateVersionsAPIClient = (*Client)(nil) - // DescribeLaunchTemplateVersionsPaginatorOptions is the paginator options for // DescribeLaunchTemplateVersions type DescribeLaunchTemplateVersionsPaginatorOptions struct { @@ -307,6 +302,9 @@ func (p *DescribeLaunchTemplateVersionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLaunchTemplateVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -326,6 +324,14 @@ func (p *DescribeLaunchTemplateVersionsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeLaunchTemplateVersionsAPIClient is a client that implements the +// DescribeLaunchTemplateVersions operation. +type DescribeLaunchTemplateVersionsAPIClient interface { + DescribeLaunchTemplateVersions(context.Context, *DescribeLaunchTemplateVersionsInput, ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error) +} + +var _ DescribeLaunchTemplateVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLaunchTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLaunchTemplates.go b/service/ec2/api_op_DescribeLaunchTemplates.go index 849ccd9fb14..eb217ddab58 100644 --- a/service/ec2/api_op_DescribeLaunchTemplates.go +++ b/service/ec2/api_op_DescribeLaunchTemplates.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeLaunchTemplatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchTemplates(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeLaunchTemplatesMiddlewares(stack *middlewar return nil } -// DescribeLaunchTemplatesAPIClient is a client that implements the -// DescribeLaunchTemplates operation. -type DescribeLaunchTemplatesAPIClient interface { - DescribeLaunchTemplates(context.Context, *DescribeLaunchTemplatesInput, ...func(*Options)) (*DescribeLaunchTemplatesOutput, error) -} - -var _ DescribeLaunchTemplatesAPIClient = (*Client)(nil) - // DescribeLaunchTemplatesPaginatorOptions is the paginator options for // DescribeLaunchTemplates type DescribeLaunchTemplatesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeLaunchTemplatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLaunchTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeLaunchTemplatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeLaunchTemplatesAPIClient is a client that implements the +// DescribeLaunchTemplates operation. +type DescribeLaunchTemplatesAPIClient interface { + DescribeLaunchTemplates(context.Context, *DescribeLaunchTemplatesInput, ...func(*Options)) (*DescribeLaunchTemplatesOutput, error) +} + +var _ DescribeLaunchTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLaunchTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go b/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go index bdfcbe43b8a..f781f3d84e1 100644 --- a/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go +++ b/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeLocalGatewayRouteTableVirtualInterfaceGroup if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(options.Region), middleware.Before); err != nil { return err } @@ -164,15 +167,6 @@ func (c *Client) addOperationDescribeLocalGatewayRouteTableVirtualInterfaceGroup return nil } -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient is a -// client that implements the -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation. -type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient interface { - DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(context.Context, *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error) -} - -var _ DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient = (*Client)(nil) - // DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions // is the paginator options for // DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations @@ -243,6 +237,9 @@ func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginato } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +259,15 @@ func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginato return result, nil } +// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient is a +// client that implements the +// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation. +type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient interface { + DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(context.Context, *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error) +} + +var _ DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go b/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go index 0122341f690..f84b49123ea 100644 --- a/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go +++ b/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeLocalGatewayRouteTableVpcAssociationsMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVpcAssociations(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationDescribeLocalGatewayRouteTableVpcAssociationsMiddle return nil } -// DescribeLocalGatewayRouteTableVpcAssociationsAPIClient is a client that -// implements the DescribeLocalGatewayRouteTableVpcAssociations operation. -type DescribeLocalGatewayRouteTableVpcAssociationsAPIClient interface { - DescribeLocalGatewayRouteTableVpcAssociations(context.Context, *DescribeLocalGatewayRouteTableVpcAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error) -} - -var _ DescribeLocalGatewayRouteTableVpcAssociationsAPIClient = (*Client)(nil) - // DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions is the paginator // options for DescribeLocalGatewayRouteTableVpcAssociations type DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) NextPage(ctx co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLocalGatewayRouteTableVpcAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) NextPage(ctx co return result, nil } +// DescribeLocalGatewayRouteTableVpcAssociationsAPIClient is a client that +// implements the DescribeLocalGatewayRouteTableVpcAssociations operation. +type DescribeLocalGatewayRouteTableVpcAssociationsAPIClient interface { + DescribeLocalGatewayRouteTableVpcAssociations(context.Context, *DescribeLocalGatewayRouteTableVpcAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error) +} + +var _ DescribeLocalGatewayRouteTableVpcAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVpcAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLocalGatewayRouteTables.go b/service/ec2/api_op_DescribeLocalGatewayRouteTables.go index ac3acf0a496..d1c89ad5847 100644 --- a/service/ec2/api_op_DescribeLocalGatewayRouteTables.go +++ b/service/ec2/api_op_DescribeLocalGatewayRouteTables.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeLocalGatewayRouteTablesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTables(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeLocalGatewayRouteTablesMiddlewares(stack *m return nil } -// DescribeLocalGatewayRouteTablesAPIClient is a client that implements the -// DescribeLocalGatewayRouteTables operation. -type DescribeLocalGatewayRouteTablesAPIClient interface { - DescribeLocalGatewayRouteTables(context.Context, *DescribeLocalGatewayRouteTablesInput, ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error) -} - -var _ DescribeLocalGatewayRouteTablesAPIClient = (*Client)(nil) - // DescribeLocalGatewayRouteTablesPaginatorOptions is the paginator options for // DescribeLocalGatewayRouteTables type DescribeLocalGatewayRouteTablesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeLocalGatewayRouteTablesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLocalGatewayRouteTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeLocalGatewayRouteTablesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeLocalGatewayRouteTablesAPIClient is a client that implements the +// DescribeLocalGatewayRouteTables operation. +type DescribeLocalGatewayRouteTablesAPIClient interface { + DescribeLocalGatewayRouteTables(context.Context, *DescribeLocalGatewayRouteTablesInput, ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error) +} + +var _ DescribeLocalGatewayRouteTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go index aa6a33a8066..70073604947 100644 --- a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go +++ b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeLocalGatewayVirtualInterfaceGroupsMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaceGroups(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeLocalGatewayVirtualInterfaceGroupsMiddlewar return nil } -// DescribeLocalGatewayVirtualInterfaceGroupsAPIClient is a client that implements -// the DescribeLocalGatewayVirtualInterfaceGroups operation. -type DescribeLocalGatewayVirtualInterfaceGroupsAPIClient interface { - DescribeLocalGatewayVirtualInterfaceGroups(context.Context, *DescribeLocalGatewayVirtualInterfaceGroupsInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error) -} - -var _ DescribeLocalGatewayVirtualInterfaceGroupsAPIClient = (*Client)(nil) - // DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions is the paginator // options for DescribeLocalGatewayVirtualInterfaceGroups type DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) NextPage(ctx conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLocalGatewayVirtualInterfaceGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) NextPage(ctx conte return result, nil } +// DescribeLocalGatewayVirtualInterfaceGroupsAPIClient is a client that implements +// the DescribeLocalGatewayVirtualInterfaceGroups operation. +type DescribeLocalGatewayVirtualInterfaceGroupsAPIClient interface { + DescribeLocalGatewayVirtualInterfaceGroups(context.Context, *DescribeLocalGatewayVirtualInterfaceGroupsInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error) +} + +var _ DescribeLocalGatewayVirtualInterfaceGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaceGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go index f6bba6c7f6b..ffd3ae6a12b 100644 --- a/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go +++ b/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeLocalGatewayVirtualInterfacesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaces(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeLocalGatewayVirtualInterfacesMiddlewares(st return nil } -// DescribeLocalGatewayVirtualInterfacesAPIClient is a client that implements the -// DescribeLocalGatewayVirtualInterfaces operation. -type DescribeLocalGatewayVirtualInterfacesAPIClient interface { - DescribeLocalGatewayVirtualInterfaces(context.Context, *DescribeLocalGatewayVirtualInterfacesInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error) -} - -var _ DescribeLocalGatewayVirtualInterfacesAPIClient = (*Client)(nil) - // DescribeLocalGatewayVirtualInterfacesPaginatorOptions is the paginator options // for DescribeLocalGatewayVirtualInterfaces type DescribeLocalGatewayVirtualInterfacesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeLocalGatewayVirtualInterfacesPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLocalGatewayVirtualInterfaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeLocalGatewayVirtualInterfacesPaginator) NextPage(ctx context.Co return result, nil } +// DescribeLocalGatewayVirtualInterfacesAPIClient is a client that implements the +// DescribeLocalGatewayVirtualInterfaces operation. +type DescribeLocalGatewayVirtualInterfacesAPIClient interface { + DescribeLocalGatewayVirtualInterfaces(context.Context, *DescribeLocalGatewayVirtualInterfacesInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error) +} + +var _ DescribeLocalGatewayVirtualInterfacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLocalGateways.go b/service/ec2/api_op_DescribeLocalGateways.go index be740c03e80..8026dc53f64 100644 --- a/service/ec2/api_op_DescribeLocalGateways.go +++ b/service/ec2/api_op_DescribeLocalGateways.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeLocalGatewaysMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGateways(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeLocalGatewaysMiddlewares(stack *middleware. return nil } -// DescribeLocalGatewaysAPIClient is a client that implements the -// DescribeLocalGateways operation. -type DescribeLocalGatewaysAPIClient interface { - DescribeLocalGateways(context.Context, *DescribeLocalGatewaysInput, ...func(*Options)) (*DescribeLocalGatewaysOutput, error) -} - -var _ DescribeLocalGatewaysAPIClient = (*Client)(nil) - // DescribeLocalGatewaysPaginatorOptions is the paginator options for // DescribeLocalGateways type DescribeLocalGatewaysPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeLocalGatewaysPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLocalGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeLocalGatewaysPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeLocalGatewaysAPIClient is a client that implements the +// DescribeLocalGateways operation. +type DescribeLocalGatewaysAPIClient interface { + DescribeLocalGateways(context.Context, *DescribeLocalGatewaysInput, ...func(*Options)) (*DescribeLocalGatewaysOutput, error) +} + +var _ DescribeLocalGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLocalGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeLockedSnapshots.go b/service/ec2/api_op_DescribeLockedSnapshots.go index c41d508892b..8f6e493c404 100644 --- a/service/ec2/api_op_DescribeLockedSnapshots.go +++ b/service/ec2/api_op_DescribeLockedSnapshots.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeLockedSnapshotsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLockedSnapshots(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeMacHosts.go b/service/ec2/api_op_DescribeMacHosts.go index 4a1252dccdb..f11f496d080 100644 --- a/service/ec2/api_op_DescribeMacHosts.go +++ b/service/ec2/api_op_DescribeMacHosts.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeMacHostsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMacHosts(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeMacHostsMiddlewares(stack *middleware.Stack return nil } -// DescribeMacHostsAPIClient is a client that implements the DescribeMacHosts -// operation. -type DescribeMacHostsAPIClient interface { - DescribeMacHosts(context.Context, *DescribeMacHostsInput, ...func(*Options)) (*DescribeMacHostsOutput, error) -} - -var _ DescribeMacHostsAPIClient = (*Client)(nil) - // DescribeMacHostsPaginatorOptions is the paginator options for DescribeMacHosts type DescribeMacHostsPaginatorOptions struct { // The maximum number of results to return for the request in a single page. The @@ -220,6 +215,9 @@ func (p *DescribeMacHostsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMacHosts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeMacHostsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeMacHostsAPIClient is a client that implements the DescribeMacHosts +// operation. +type DescribeMacHostsAPIClient interface { + DescribeMacHosts(context.Context, *DescribeMacHostsInput, ...func(*Options)) (*DescribeMacHostsOutput, error) +} + +var _ DescribeMacHostsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMacHosts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeManagedPrefixLists.go b/service/ec2/api_op_DescribeManagedPrefixLists.go index 866e4ea0868..2ddb067e8d3 100644 --- a/service/ec2/api_op_DescribeManagedPrefixLists.go +++ b/service/ec2/api_op_DescribeManagedPrefixLists.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeManagedPrefixListsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeManagedPrefixLists(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeManagedPrefixListsMiddlewares(stack *middle return nil } -// DescribeManagedPrefixListsAPIClient is a client that implements the -// DescribeManagedPrefixLists operation. -type DescribeManagedPrefixListsAPIClient interface { - DescribeManagedPrefixLists(context.Context, *DescribeManagedPrefixListsInput, ...func(*Options)) (*DescribeManagedPrefixListsOutput, error) -} - -var _ DescribeManagedPrefixListsAPIClient = (*Client)(nil) - // DescribeManagedPrefixListsPaginatorOptions is the paginator options for // DescribeManagedPrefixLists type DescribeManagedPrefixListsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeManagedPrefixListsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeManagedPrefixLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeManagedPrefixListsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeManagedPrefixListsAPIClient is a client that implements the +// DescribeManagedPrefixLists operation. +type DescribeManagedPrefixListsAPIClient interface { + DescribeManagedPrefixLists(context.Context, *DescribeManagedPrefixListsInput, ...func(*Options)) (*DescribeManagedPrefixListsOutput, error) +} + +var _ DescribeManagedPrefixListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeManagedPrefixLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeMovingAddresses.go b/service/ec2/api_op_DescribeMovingAddresses.go index 016247016d1..4bd6d107a71 100644 --- a/service/ec2/api_op_DescribeMovingAddresses.go +++ b/service/ec2/api_op_DescribeMovingAddresses.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeMovingAddressesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMovingAddresses(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeMovingAddressesMiddlewares(stack *middlewar return nil } -// DescribeMovingAddressesAPIClient is a client that implements the -// DescribeMovingAddresses operation. -type DescribeMovingAddressesAPIClient interface { - DescribeMovingAddresses(context.Context, *DescribeMovingAddressesInput, ...func(*Options)) (*DescribeMovingAddressesOutput, error) -} - -var _ DescribeMovingAddressesAPIClient = (*Client)(nil) - // DescribeMovingAddressesPaginatorOptions is the paginator options for // DescribeMovingAddresses type DescribeMovingAddressesPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeMovingAddressesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMovingAddresses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeMovingAddressesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeMovingAddressesAPIClient is a client that implements the +// DescribeMovingAddresses operation. +type DescribeMovingAddressesAPIClient interface { + DescribeMovingAddresses(context.Context, *DescribeMovingAddressesInput, ...func(*Options)) (*DescribeMovingAddressesOutput, error) +} + +var _ DescribeMovingAddressesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMovingAddresses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNatGateways.go b/service/ec2/api_op_DescribeNatGateways.go index 722f45cfd03..c99fb7fabff 100644 --- a/service/ec2/api_op_DescribeNatGateways.go +++ b/service/ec2/api_op_DescribeNatGateways.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeNatGatewaysMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNatGateways(options.Region), middleware.Before); err != nil { return err } @@ -174,101 +177,6 @@ func (c *Client) addOperationDescribeNatGatewaysMiddlewares(stack *middleware.St return nil } -// DescribeNatGatewaysAPIClient is a client that implements the -// DescribeNatGateways operation. -type DescribeNatGatewaysAPIClient interface { - DescribeNatGateways(context.Context, *DescribeNatGatewaysInput, ...func(*Options)) (*DescribeNatGatewaysOutput, error) -} - -var _ DescribeNatGatewaysAPIClient = (*Client)(nil) - -// DescribeNatGatewaysPaginatorOptions is the paginator options for -// DescribeNatGateways -type DescribeNatGatewaysPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNatGatewaysPaginator is a paginator for DescribeNatGateways -type DescribeNatGatewaysPaginator struct { - options DescribeNatGatewaysPaginatorOptions - client DescribeNatGatewaysAPIClient - params *DescribeNatGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeNatGatewaysPaginator returns a new DescribeNatGatewaysPaginator -func NewDescribeNatGatewaysPaginator(client DescribeNatGatewaysAPIClient, params *DescribeNatGatewaysInput, optFns ...func(*DescribeNatGatewaysPaginatorOptions)) *DescribeNatGatewaysPaginator { - if params == nil { - params = &DescribeNatGatewaysInput{} - } - - options := DescribeNatGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNatGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNatGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNatGateways page. -func (p *DescribeNatGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNatGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNatGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // NatGatewayAvailableWaiterOptions are waiter options for // NatGatewayAvailableWaiter type NatGatewayAvailableWaiterOptions struct { @@ -386,7 +294,13 @@ func (w *NatGatewayAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeNatGateways(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -658,7 +572,13 @@ func (w *NatGatewayDeletedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeNatGateways(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -743,6 +663,104 @@ func natGatewayDeletedStateRetryable(ctx context.Context, input *DescribeNatGate return true, nil } +// DescribeNatGatewaysPaginatorOptions is the paginator options for +// DescribeNatGateways +type DescribeNatGatewaysPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeNatGatewaysPaginator is a paginator for DescribeNatGateways +type DescribeNatGatewaysPaginator struct { + options DescribeNatGatewaysPaginatorOptions + client DescribeNatGatewaysAPIClient + params *DescribeNatGatewaysInput + nextToken *string + firstPage bool +} + +// NewDescribeNatGatewaysPaginator returns a new DescribeNatGatewaysPaginator +func NewDescribeNatGatewaysPaginator(client DescribeNatGatewaysAPIClient, params *DescribeNatGatewaysInput, optFns ...func(*DescribeNatGatewaysPaginatorOptions)) *DescribeNatGatewaysPaginator { + if params == nil { + params = &DescribeNatGatewaysInput{} + } + + options := DescribeNatGatewaysPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeNatGatewaysPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeNatGatewaysPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeNatGateways page. +func (p *DescribeNatGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNatGatewaysOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeNatGateways(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeNatGatewaysAPIClient is a client that implements the +// DescribeNatGateways operation. +type DescribeNatGatewaysAPIClient interface { + DescribeNatGateways(context.Context, *DescribeNatGatewaysInput, ...func(*Options)) (*DescribeNatGatewaysOutput, error) +} + +var _ DescribeNatGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNatGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkAcls.go b/service/ec2/api_op_DescribeNetworkAcls.go index 0b2969d1cff..423ec5860b3 100644 --- a/service/ec2/api_op_DescribeNetworkAcls.go +++ b/service/ec2/api_op_DescribeNetworkAcls.go @@ -181,6 +181,9 @@ func (c *Client) addOperationDescribeNetworkAclsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkAcls(options.Region), middleware.Before); err != nil { return err } @@ -202,14 +205,6 @@ func (c *Client) addOperationDescribeNetworkAclsMiddlewares(stack *middleware.St return nil } -// DescribeNetworkAclsAPIClient is a client that implements the -// DescribeNetworkAcls operation. -type DescribeNetworkAclsAPIClient interface { - DescribeNetworkAcls(context.Context, *DescribeNetworkAclsInput, ...func(*Options)) (*DescribeNetworkAclsOutput, error) -} - -var _ DescribeNetworkAclsAPIClient = (*Client)(nil) - // DescribeNetworkAclsPaginatorOptions is the paginator options for // DescribeNetworkAcls type DescribeNetworkAclsPaginatorOptions struct { @@ -278,6 +273,9 @@ func (p *DescribeNetworkAclsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNetworkAcls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -297,6 +295,14 @@ func (p *DescribeNetworkAclsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeNetworkAclsAPIClient is a client that implements the +// DescribeNetworkAcls operation. +type DescribeNetworkAclsAPIClient interface { + DescribeNetworkAcls(context.Context, *DescribeNetworkAclsInput, ...func(*Options)) (*DescribeNetworkAclsOutput, error) +} + +var _ DescribeNetworkAclsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkAcls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go b/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go index fd0c9f386a9..f795a2da37b 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go +++ b/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeNetworkInsightsAccessScopeAnalysesMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopeAnalyses(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeNetworkInsightsAccessScopeAnalysesMiddlewar return nil } -// DescribeNetworkInsightsAccessScopeAnalysesAPIClient is a client that implements -// the DescribeNetworkInsightsAccessScopeAnalyses operation. -type DescribeNetworkInsightsAccessScopeAnalysesAPIClient interface { - DescribeNetworkInsightsAccessScopeAnalyses(context.Context, *DescribeNetworkInsightsAccessScopeAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAccessScopeAnalysesOutput, error) -} - -var _ DescribeNetworkInsightsAccessScopeAnalysesAPIClient = (*Client)(nil) - // DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions is the paginator // options for DescribeNetworkInsightsAccessScopeAnalyses type DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *DescribeNetworkInsightsAccessScopeAnalysesPaginator) NextPage(ctx conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNetworkInsightsAccessScopeAnalyses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *DescribeNetworkInsightsAccessScopeAnalysesPaginator) NextPage(ctx conte return result, nil } +// DescribeNetworkInsightsAccessScopeAnalysesAPIClient is a client that implements +// the DescribeNetworkInsightsAccessScopeAnalyses operation. +type DescribeNetworkInsightsAccessScopeAnalysesAPIClient interface { + DescribeNetworkInsightsAccessScopeAnalyses(context.Context, *DescribeNetworkInsightsAccessScopeAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAccessScopeAnalysesOutput, error) +} + +var _ DescribeNetworkInsightsAccessScopeAnalysesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopeAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go b/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go index 09f202ac0ea..15b8d0001ee 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go +++ b/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeNetworkInsightsAccessScopesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopes(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeNetworkInsightsAccessScopesMiddlewares(stac return nil } -// DescribeNetworkInsightsAccessScopesAPIClient is a client that implements the -// DescribeNetworkInsightsAccessScopes operation. -type DescribeNetworkInsightsAccessScopesAPIClient interface { - DescribeNetworkInsightsAccessScopes(context.Context, *DescribeNetworkInsightsAccessScopesInput, ...func(*Options)) (*DescribeNetworkInsightsAccessScopesOutput, error) -} - -var _ DescribeNetworkInsightsAccessScopesAPIClient = (*Client)(nil) - // DescribeNetworkInsightsAccessScopesPaginatorOptions is the paginator options // for DescribeNetworkInsightsAccessScopes type DescribeNetworkInsightsAccessScopesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeNetworkInsightsAccessScopesPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNetworkInsightsAccessScopes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeNetworkInsightsAccessScopesPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeNetworkInsightsAccessScopesAPIClient is a client that implements the +// DescribeNetworkInsightsAccessScopes operation. +type DescribeNetworkInsightsAccessScopesAPIClient interface { + DescribeNetworkInsightsAccessScopes(context.Context, *DescribeNetworkInsightsAccessScopesInput, ...func(*Options)) (*DescribeNetworkInsightsAccessScopesOutput, error) +} + +var _ DescribeNetworkInsightsAccessScopesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go b/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go index 36d8236ed7a..22213cd8fc8 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go +++ b/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeNetworkInsightsAnalysesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsAnalyses(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeNetworkInsightsAnalysesMiddlewares(stack *m return nil } -// DescribeNetworkInsightsAnalysesAPIClient is a client that implements the -// DescribeNetworkInsightsAnalyses operation. -type DescribeNetworkInsightsAnalysesAPIClient interface { - DescribeNetworkInsightsAnalyses(context.Context, *DescribeNetworkInsightsAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error) -} - -var _ DescribeNetworkInsightsAnalysesAPIClient = (*Client)(nil) - // DescribeNetworkInsightsAnalysesPaginatorOptions is the paginator options for // DescribeNetworkInsightsAnalyses type DescribeNetworkInsightsAnalysesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeNetworkInsightsAnalysesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNetworkInsightsAnalyses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeNetworkInsightsAnalysesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeNetworkInsightsAnalysesAPIClient is a client that implements the +// DescribeNetworkInsightsAnalyses operation. +type DescribeNetworkInsightsAnalysesAPIClient interface { + DescribeNetworkInsightsAnalyses(context.Context, *DescribeNetworkInsightsAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error) +} + +var _ DescribeNetworkInsightsAnalysesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkInsightsAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkInsightsPaths.go b/service/ec2/api_op_DescribeNetworkInsightsPaths.go index d6378fc38a2..5d89ad24859 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsPaths.go +++ b/service/ec2/api_op_DescribeNetworkInsightsPaths.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeNetworkInsightsPathsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsPaths(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeNetworkInsightsPathsMiddlewares(stack *midd return nil } -// DescribeNetworkInsightsPathsAPIClient is a client that implements the -// DescribeNetworkInsightsPaths operation. -type DescribeNetworkInsightsPathsAPIClient interface { - DescribeNetworkInsightsPaths(context.Context, *DescribeNetworkInsightsPathsInput, ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error) -} - -var _ DescribeNetworkInsightsPathsAPIClient = (*Client)(nil) - // DescribeNetworkInsightsPathsPaginatorOptions is the paginator options for // DescribeNetworkInsightsPaths type DescribeNetworkInsightsPathsPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *DescribeNetworkInsightsPathsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNetworkInsightsPaths(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *DescribeNetworkInsightsPathsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeNetworkInsightsPathsAPIClient is a client that implements the +// DescribeNetworkInsightsPaths operation. +type DescribeNetworkInsightsPathsAPIClient interface { + DescribeNetworkInsightsPaths(context.Context, *DescribeNetworkInsightsPathsInput, ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error) +} + +var _ DescribeNetworkInsightsPathsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkInsightsPaths(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go b/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go index efdb44c298c..84e5bce3488 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go +++ b/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeNetworkInterfaceAttributeMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNetworkInterfaceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeNetworkInterfacePermissions.go b/service/ec2/api_op_DescribeNetworkInterfacePermissions.go index d01859ebf45..736733a4c70 100644 --- a/service/ec2/api_op_DescribeNetworkInterfacePermissions.go +++ b/service/ec2/api_op_DescribeNetworkInterfacePermissions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeNetworkInterfacePermissionsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInterfacePermissions(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeNetworkInterfacePermissionsMiddlewares(stac return nil } -// DescribeNetworkInterfacePermissionsAPIClient is a client that implements the -// DescribeNetworkInterfacePermissions operation. -type DescribeNetworkInterfacePermissionsAPIClient interface { - DescribeNetworkInterfacePermissions(context.Context, *DescribeNetworkInterfacePermissionsInput, ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error) -} - -var _ DescribeNetworkInterfacePermissionsAPIClient = (*Client)(nil) - // DescribeNetworkInterfacePermissionsPaginatorOptions is the paginator options // for DescribeNetworkInterfacePermissions type DescribeNetworkInterfacePermissionsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeNetworkInterfacePermissionsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNetworkInterfacePermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeNetworkInterfacePermissionsPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeNetworkInterfacePermissionsAPIClient is a client that implements the +// DescribeNetworkInterfacePermissions operation. +type DescribeNetworkInterfacePermissionsAPIClient interface { + DescribeNetworkInterfacePermissions(context.Context, *DescribeNetworkInterfacePermissionsInput, ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error) +} + +var _ DescribeNetworkInterfacePermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkInterfacePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeNetworkInterfaces.go b/service/ec2/api_op_DescribeNetworkInterfaces.go index 52fcd94fef2..5a0bf337f32 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaces.go +++ b/service/ec2/api_op_DescribeNetworkInterfaces.go @@ -248,6 +248,9 @@ func (c *Client) addOperationDescribeNetworkInterfacesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInterfaces(options.Region), middleware.Before); err != nil { return err } @@ -269,103 +272,6 @@ func (c *Client) addOperationDescribeNetworkInterfacesMiddlewares(stack *middlew return nil } -// DescribeNetworkInterfacesAPIClient is a client that implements the -// DescribeNetworkInterfaces operation. -type DescribeNetworkInterfacesAPIClient interface { - DescribeNetworkInterfaces(context.Context, *DescribeNetworkInterfacesInput, ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) -} - -var _ DescribeNetworkInterfacesAPIClient = (*Client)(nil) - -// DescribeNetworkInterfacesPaginatorOptions is the paginator options for -// DescribeNetworkInterfaces -type DescribeNetworkInterfacesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. You cannot - // specify this parameter and the network interface IDs parameter in the same - // request. For more information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInterfacesPaginator is a paginator for DescribeNetworkInterfaces -type DescribeNetworkInterfacesPaginator struct { - options DescribeNetworkInterfacesPaginatorOptions - client DescribeNetworkInterfacesAPIClient - params *DescribeNetworkInterfacesInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInterfacesPaginator returns a new -// DescribeNetworkInterfacesPaginator -func NewDescribeNetworkInterfacesPaginator(client DescribeNetworkInterfacesAPIClient, params *DescribeNetworkInterfacesInput, optFns ...func(*DescribeNetworkInterfacesPaginatorOptions)) *DescribeNetworkInterfacesPaginator { - if params == nil { - params = &DescribeNetworkInterfacesInput{} - } - - options := DescribeNetworkInterfacesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInterfacesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInterfacesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInterfaces page. -func (p *DescribeNetworkInterfacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInterfaces(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // NetworkInterfaceAvailableWaiterOptions are waiter options for // NetworkInterfaceAvailableWaiter type NetworkInterfaceAvailableWaiterOptions struct { @@ -484,7 +390,13 @@ func (w *NetworkInterfaceAvailableWaiter) WaitForOutput(ctx context.Context, par } out, err := w.client.DescribeNetworkInterfaces(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -569,6 +481,106 @@ func networkInterfaceAvailableStateRetryable(ctx context.Context, input *Describ return true, nil } +// DescribeNetworkInterfacesPaginatorOptions is the paginator options for +// DescribeNetworkInterfaces +type DescribeNetworkInterfacesPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. You cannot + // specify this parameter and the network interface IDs parameter in the same + // request. For more information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeNetworkInterfacesPaginator is a paginator for DescribeNetworkInterfaces +type DescribeNetworkInterfacesPaginator struct { + options DescribeNetworkInterfacesPaginatorOptions + client DescribeNetworkInterfacesAPIClient + params *DescribeNetworkInterfacesInput + nextToken *string + firstPage bool +} + +// NewDescribeNetworkInterfacesPaginator returns a new +// DescribeNetworkInterfacesPaginator +func NewDescribeNetworkInterfacesPaginator(client DescribeNetworkInterfacesAPIClient, params *DescribeNetworkInterfacesInput, optFns ...func(*DescribeNetworkInterfacesPaginatorOptions)) *DescribeNetworkInterfacesPaginator { + if params == nil { + params = &DescribeNetworkInterfacesInput{} + } + + options := DescribeNetworkInterfacesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeNetworkInterfacesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeNetworkInterfacesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeNetworkInterfaces page. +func (p *DescribeNetworkInterfacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeNetworkInterfaces(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeNetworkInterfacesAPIClient is a client that implements the +// DescribeNetworkInterfaces operation. +type DescribeNetworkInterfacesAPIClient interface { + DescribeNetworkInterfaces(context.Context, *DescribeNetworkInterfacesInput, ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) +} + +var _ DescribeNetworkInterfacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNetworkInterfaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribePlacementGroups.go b/service/ec2/api_op_DescribePlacementGroups.go index 6d07c5032f7..03cd6ceffd1 100644 --- a/service/ec2/api_op_DescribePlacementGroups.go +++ b/service/ec2/api_op_DescribePlacementGroups.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribePlacementGroupsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePlacementGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribePrefixLists.go b/service/ec2/api_op_DescribePrefixLists.go index c85ce3c0923..3614143750e 100644 --- a/service/ec2/api_op_DescribePrefixLists.go +++ b/service/ec2/api_op_DescribePrefixLists.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribePrefixListsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePrefixLists(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribePrefixListsMiddlewares(stack *middleware.St return nil } -// DescribePrefixListsAPIClient is a client that implements the -// DescribePrefixLists operation. -type DescribePrefixListsAPIClient interface { - DescribePrefixLists(context.Context, *DescribePrefixListsInput, ...func(*Options)) (*DescribePrefixListsOutput, error) -} - -var _ DescribePrefixListsAPIClient = (*Client)(nil) - // DescribePrefixListsPaginatorOptions is the paginator options for // DescribePrefixLists type DescribePrefixListsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribePrefixListsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePrefixLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribePrefixListsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribePrefixListsAPIClient is a client that implements the +// DescribePrefixLists operation. +type DescribePrefixListsAPIClient interface { + DescribePrefixLists(context.Context, *DescribePrefixListsInput, ...func(*Options)) (*DescribePrefixListsOutput, error) +} + +var _ DescribePrefixListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePrefixLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribePrincipalIdFormat.go b/service/ec2/api_op_DescribePrincipalIdFormat.go index ac1383f0d74..d0c5291cb65 100644 --- a/service/ec2/api_op_DescribePrincipalIdFormat.go +++ b/service/ec2/api_op_DescribePrincipalIdFormat.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribePrincipalIdFormatMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePrincipalIdFormat(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribePrincipalIdFormatMiddlewares(stack *middlew return nil } -// DescribePrincipalIdFormatAPIClient is a client that implements the -// DescribePrincipalIdFormat operation. -type DescribePrincipalIdFormatAPIClient interface { - DescribePrincipalIdFormat(context.Context, *DescribePrincipalIdFormatInput, ...func(*Options)) (*DescribePrincipalIdFormatOutput, error) -} - -var _ DescribePrincipalIdFormatAPIClient = (*Client)(nil) - // DescribePrincipalIdFormatPaginatorOptions is the paginator options for // DescribePrincipalIdFormat type DescribePrincipalIdFormatPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribePrincipalIdFormatPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePrincipalIdFormat(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribePrincipalIdFormatPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribePrincipalIdFormatAPIClient is a client that implements the +// DescribePrincipalIdFormat operation. +type DescribePrincipalIdFormatAPIClient interface { + DescribePrincipalIdFormat(context.Context, *DescribePrincipalIdFormatInput, ...func(*Options)) (*DescribePrincipalIdFormatOutput, error) +} + +var _ DescribePrincipalIdFormatAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePrincipalIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribePublicIpv4Pools.go b/service/ec2/api_op_DescribePublicIpv4Pools.go index 16c74061d52..af1f47d24cc 100644 --- a/service/ec2/api_op_DescribePublicIpv4Pools.go +++ b/service/ec2/api_op_DescribePublicIpv4Pools.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribePublicIpv4PoolsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePublicIpv4Pools(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribePublicIpv4PoolsMiddlewares(stack *middlewar return nil } -// DescribePublicIpv4PoolsAPIClient is a client that implements the -// DescribePublicIpv4Pools operation. -type DescribePublicIpv4PoolsAPIClient interface { - DescribePublicIpv4Pools(context.Context, *DescribePublicIpv4PoolsInput, ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error) -} - -var _ DescribePublicIpv4PoolsAPIClient = (*Client)(nil) - // DescribePublicIpv4PoolsPaginatorOptions is the paginator options for // DescribePublicIpv4Pools type DescribePublicIpv4PoolsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribePublicIpv4PoolsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePublicIpv4Pools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribePublicIpv4PoolsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribePublicIpv4PoolsAPIClient is a client that implements the +// DescribePublicIpv4Pools operation. +type DescribePublicIpv4PoolsAPIClient interface { + DescribePublicIpv4Pools(context.Context, *DescribePublicIpv4PoolsInput, ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error) +} + +var _ DescribePublicIpv4PoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePublicIpv4Pools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeRegions.go b/service/ec2/api_op_DescribeRegions.go index 91613fc6909..078cae1612b 100644 --- a/service/ec2/api_op_DescribeRegions.go +++ b/service/ec2/api_op_DescribeRegions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeRegionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRegions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go b/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go index abd0f35f17b..a359614b451 100644 --- a/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go +++ b/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeReplaceRootVolumeTasksMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplaceRootVolumeTasks(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeReplaceRootVolumeTasksMiddlewares(stack *mi return nil } -// DescribeReplaceRootVolumeTasksAPIClient is a client that implements the -// DescribeReplaceRootVolumeTasks operation. -type DescribeReplaceRootVolumeTasksAPIClient interface { - DescribeReplaceRootVolumeTasks(context.Context, *DescribeReplaceRootVolumeTasksInput, ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error) -} - -var _ DescribeReplaceRootVolumeTasksAPIClient = (*Client)(nil) - // DescribeReplaceRootVolumeTasksPaginatorOptions is the paginator options for // DescribeReplaceRootVolumeTasks type DescribeReplaceRootVolumeTasksPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeReplaceRootVolumeTasksPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplaceRootVolumeTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeReplaceRootVolumeTasksPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeReplaceRootVolumeTasksAPIClient is a client that implements the +// DescribeReplaceRootVolumeTasks operation. +type DescribeReplaceRootVolumeTasksAPIClient interface { + DescribeReplaceRootVolumeTasks(context.Context, *DescribeReplaceRootVolumeTasksInput, ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error) +} + +var _ DescribeReplaceRootVolumeTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplaceRootVolumeTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeReservedInstances.go b/service/ec2/api_op_DescribeReservedInstances.go index 73585d6bbea..9afb10f1b4f 100644 --- a/service/ec2/api_op_DescribeReservedInstances.go +++ b/service/ec2/api_op_DescribeReservedInstances.go @@ -176,6 +176,9 @@ func (c *Client) addOperationDescribeReservedInstancesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstances(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeReservedInstancesListings.go b/service/ec2/api_op_DescribeReservedInstancesListings.go index a47db0646b0..80a1ac18a9e 100644 --- a/service/ec2/api_op_DescribeReservedInstancesListings.go +++ b/service/ec2/api_op_DescribeReservedInstancesListings.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeReservedInstancesListingsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstancesListings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeReservedInstancesModifications.go b/service/ec2/api_op_DescribeReservedInstancesModifications.go index a3df7940b92..29c33e90f92 100644 --- a/service/ec2/api_op_DescribeReservedInstancesModifications.go +++ b/service/ec2/api_op_DescribeReservedInstancesModifications.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeReservedInstancesModificationsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstancesModifications(options.Region), middleware.Before); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationDescribeReservedInstancesModificationsMiddlewares(s return nil } -// DescribeReservedInstancesModificationsAPIClient is a client that implements the -// DescribeReservedInstancesModifications operation. -type DescribeReservedInstancesModificationsAPIClient interface { - DescribeReservedInstancesModifications(context.Context, *DescribeReservedInstancesModificationsInput, ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) -} - -var _ DescribeReservedInstancesModificationsAPIClient = (*Client)(nil) - // DescribeReservedInstancesModificationsPaginatorOptions is the paginator options // for DescribeReservedInstancesModifications type DescribeReservedInstancesModificationsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeReservedInstancesModificationsPaginator) NextPage(ctx context.C params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedInstancesModifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeReservedInstancesModificationsPaginator) NextPage(ctx context.C return result, nil } +// DescribeReservedInstancesModificationsAPIClient is a client that implements the +// DescribeReservedInstancesModifications operation. +type DescribeReservedInstancesModificationsAPIClient interface { + DescribeReservedInstancesModifications(context.Context, *DescribeReservedInstancesModificationsInput, ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) +} + +var _ DescribeReservedInstancesModificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedInstancesModifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeReservedInstancesOfferings.go b/service/ec2/api_op_DescribeReservedInstancesOfferings.go index df577ff6f4a..6dadf8852df 100644 --- a/service/ec2/api_op_DescribeReservedInstancesOfferings.go +++ b/service/ec2/api_op_DescribeReservedInstancesOfferings.go @@ -223,6 +223,9 @@ func (c *Client) addOperationDescribeReservedInstancesOfferingsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstancesOfferings(options.Region), middleware.Before); err != nil { return err } @@ -244,14 +247,6 @@ func (c *Client) addOperationDescribeReservedInstancesOfferingsMiddlewares(stack return nil } -// DescribeReservedInstancesOfferingsAPIClient is a client that implements the -// DescribeReservedInstancesOfferings operation. -type DescribeReservedInstancesOfferingsAPIClient interface { - DescribeReservedInstancesOfferings(context.Context, *DescribeReservedInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) -} - -var _ DescribeReservedInstancesOfferingsAPIClient = (*Client)(nil) - // DescribeReservedInstancesOfferingsPaginatorOptions is the paginator options for // DescribeReservedInstancesOfferings type DescribeReservedInstancesOfferingsPaginatorOptions struct { @@ -322,6 +317,9 @@ func (p *DescribeReservedInstancesOfferingsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedInstancesOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -341,6 +339,14 @@ func (p *DescribeReservedInstancesOfferingsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeReservedInstancesOfferingsAPIClient is a client that implements the +// DescribeReservedInstancesOfferings operation. +type DescribeReservedInstancesOfferingsAPIClient interface { + DescribeReservedInstancesOfferings(context.Context, *DescribeReservedInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) +} + +var _ DescribeReservedInstancesOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedInstancesOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeRouteTables.go b/service/ec2/api_op_DescribeRouteTables.go index 63770e6259b..cb3005334eb 100644 --- a/service/ec2/api_op_DescribeRouteTables.go +++ b/service/ec2/api_op_DescribeRouteTables.go @@ -203,6 +203,9 @@ func (c *Client) addOperationDescribeRouteTablesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRouteTables(options.Region), middleware.Before); err != nil { return err } @@ -224,14 +227,6 @@ func (c *Client) addOperationDescribeRouteTablesMiddlewares(stack *middleware.St return nil } -// DescribeRouteTablesAPIClient is a client that implements the -// DescribeRouteTables operation. -type DescribeRouteTablesAPIClient interface { - DescribeRouteTables(context.Context, *DescribeRouteTablesInput, ...func(*Options)) (*DescribeRouteTablesOutput, error) -} - -var _ DescribeRouteTablesAPIClient = (*Client)(nil) - // DescribeRouteTablesPaginatorOptions is the paginator options for // DescribeRouteTables type DescribeRouteTablesPaginatorOptions struct { @@ -300,6 +295,9 @@ func (p *DescribeRouteTablesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRouteTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -319,6 +317,14 @@ func (p *DescribeRouteTablesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeRouteTablesAPIClient is a client that implements the +// DescribeRouteTables operation. +type DescribeRouteTablesAPIClient interface { + DescribeRouteTables(context.Context, *DescribeRouteTablesInput, ...func(*Options)) (*DescribeRouteTablesOutput, error) +} + +var _ DescribeRouteTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRouteTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeScheduledInstanceAvailability.go b/service/ec2/api_op_DescribeScheduledInstanceAvailability.go index c3632455502..3f60ab00466 100644 --- a/service/ec2/api_op_DescribeScheduledInstanceAvailability.go +++ b/service/ec2/api_op_DescribeScheduledInstanceAvailability.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeScheduledInstanceAvailabilityMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduledInstanceAvailabilityValidationMiddleware(stack); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationDescribeScheduledInstanceAvailabilityMiddlewares(st return nil } -// DescribeScheduledInstanceAvailabilityAPIClient is a client that implements the -// DescribeScheduledInstanceAvailability operation. -type DescribeScheduledInstanceAvailabilityAPIClient interface { - DescribeScheduledInstanceAvailability(context.Context, *DescribeScheduledInstanceAvailabilityInput, ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) -} - -var _ DescribeScheduledInstanceAvailabilityAPIClient = (*Client)(nil) - // DescribeScheduledInstanceAvailabilityPaginatorOptions is the paginator options // for DescribeScheduledInstanceAvailability type DescribeScheduledInstanceAvailabilityPaginatorOptions struct { @@ -258,6 +253,9 @@ func (p *DescribeScheduledInstanceAvailabilityPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScheduledInstanceAvailability(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +275,14 @@ func (p *DescribeScheduledInstanceAvailabilityPaginator) NextPage(ctx context.Co return result, nil } +// DescribeScheduledInstanceAvailabilityAPIClient is a client that implements the +// DescribeScheduledInstanceAvailability operation. +type DescribeScheduledInstanceAvailabilityAPIClient interface { + DescribeScheduledInstanceAvailability(context.Context, *DescribeScheduledInstanceAvailabilityInput, ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) +} + +var _ DescribeScheduledInstanceAvailabilityAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScheduledInstanceAvailability(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeScheduledInstances.go b/service/ec2/api_op_DescribeScheduledInstances.go index 46477129a00..9269fd65c3a 100644 --- a/service/ec2/api_op_DescribeScheduledInstances.go +++ b/service/ec2/api_op_DescribeScheduledInstances.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeScheduledInstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScheduledInstances(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeScheduledInstancesMiddlewares(stack *middle return nil } -// DescribeScheduledInstancesAPIClient is a client that implements the -// DescribeScheduledInstances operation. -type DescribeScheduledInstancesAPIClient interface { - DescribeScheduledInstances(context.Context, *DescribeScheduledInstancesInput, ...func(*Options)) (*DescribeScheduledInstancesOutput, error) -} - -var _ DescribeScheduledInstancesAPIClient = (*Client)(nil) - // DescribeScheduledInstancesPaginatorOptions is the paginator options for // DescribeScheduledInstances type DescribeScheduledInstancesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeScheduledInstancesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScheduledInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeScheduledInstancesPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeScheduledInstancesAPIClient is a client that implements the +// DescribeScheduledInstances operation. +type DescribeScheduledInstancesAPIClient interface { + DescribeScheduledInstances(context.Context, *DescribeScheduledInstancesInput, ...func(*Options)) (*DescribeScheduledInstancesOutput, error) +} + +var _ DescribeScheduledInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSecurityGroupReferences.go b/service/ec2/api_op_DescribeSecurityGroupReferences.go index 42277c73990..58c663c7f53 100644 --- a/service/ec2/api_op_DescribeSecurityGroupReferences.go +++ b/service/ec2/api_op_DescribeSecurityGroupReferences.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeSecurityGroupReferencesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecurityGroupReferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeSecurityGroupRules.go b/service/ec2/api_op_DescribeSecurityGroupRules.go index 22cddd2daa6..cb273e594e8 100644 --- a/service/ec2/api_op_DescribeSecurityGroupRules.go +++ b/service/ec2/api_op_DescribeSecurityGroupRules.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeSecurityGroupRulesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityGroupRules(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeSecurityGroupRulesMiddlewares(stack *middle return nil } -// DescribeSecurityGroupRulesAPIClient is a client that implements the -// DescribeSecurityGroupRules operation. -type DescribeSecurityGroupRulesAPIClient interface { - DescribeSecurityGroupRules(context.Context, *DescribeSecurityGroupRulesInput, ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error) -} - -var _ DescribeSecurityGroupRulesAPIClient = (*Client)(nil) - // DescribeSecurityGroupRulesPaginatorOptions is the paginator options for // DescribeSecurityGroupRules type DescribeSecurityGroupRulesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeSecurityGroupRulesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSecurityGroupRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeSecurityGroupRulesPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeSecurityGroupRulesAPIClient is a client that implements the +// DescribeSecurityGroupRules operation. +type DescribeSecurityGroupRulesAPIClient interface { + DescribeSecurityGroupRules(context.Context, *DescribeSecurityGroupRulesInput, ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error) +} + +var _ DescribeSecurityGroupRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSecurityGroupRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSecurityGroups.go b/service/ec2/api_op_DescribeSecurityGroups.go index aa06d354893..06a2d96c6c5 100644 --- a/service/ec2/api_op_DescribeSecurityGroups.go +++ b/service/ec2/api_op_DescribeSecurityGroups.go @@ -219,6 +219,9 @@ func (c *Client) addOperationDescribeSecurityGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityGroups(options.Region), middleware.Before); err != nil { return err } @@ -240,102 +243,6 @@ func (c *Client) addOperationDescribeSecurityGroupsMiddlewares(stack *middleware return nil } -// DescribeSecurityGroupsAPIClient is a client that implements the -// DescribeSecurityGroups operation. -type DescribeSecurityGroupsAPIClient interface { - DescribeSecurityGroups(context.Context, *DescribeSecurityGroupsInput, ...func(*Options)) (*DescribeSecurityGroupsOutput, error) -} - -var _ DescribeSecurityGroupsAPIClient = (*Client)(nil) - -// DescribeSecurityGroupsPaginatorOptions is the paginator options for -// DescribeSecurityGroups -type DescribeSecurityGroupsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1000. If this parameter is not specified, then all items - // are returned. For more information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSecurityGroupsPaginator is a paginator for DescribeSecurityGroups -type DescribeSecurityGroupsPaginator struct { - options DescribeSecurityGroupsPaginatorOptions - client DescribeSecurityGroupsAPIClient - params *DescribeSecurityGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeSecurityGroupsPaginator returns a new DescribeSecurityGroupsPaginator -func NewDescribeSecurityGroupsPaginator(client DescribeSecurityGroupsAPIClient, params *DescribeSecurityGroupsInput, optFns ...func(*DescribeSecurityGroupsPaginatorOptions)) *DescribeSecurityGroupsPaginator { - if params == nil { - params = &DescribeSecurityGroupsInput{} - } - - options := DescribeSecurityGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSecurityGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSecurityGroups page. -func (p *DescribeSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSecurityGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // SecurityGroupExistsWaiterOptions are waiter options for // SecurityGroupExistsWaiter type SecurityGroupExistsWaiterOptions struct { @@ -453,7 +360,13 @@ func (w *SecurityGroupExistsWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeSecurityGroups(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -527,6 +440,105 @@ func securityGroupExistsStateRetryable(ctx context.Context, input *DescribeSecur return true, nil } +// DescribeSecurityGroupsPaginatorOptions is the paginator options for +// DescribeSecurityGroups +type DescribeSecurityGroupsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. This value + // can be between 5 and 1000. If this parameter is not specified, then all items + // are returned. For more information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSecurityGroupsPaginator is a paginator for DescribeSecurityGroups +type DescribeSecurityGroupsPaginator struct { + options DescribeSecurityGroupsPaginatorOptions + client DescribeSecurityGroupsAPIClient + params *DescribeSecurityGroupsInput + nextToken *string + firstPage bool +} + +// NewDescribeSecurityGroupsPaginator returns a new DescribeSecurityGroupsPaginator +func NewDescribeSecurityGroupsPaginator(client DescribeSecurityGroupsAPIClient, params *DescribeSecurityGroupsInput, optFns ...func(*DescribeSecurityGroupsPaginatorOptions)) *DescribeSecurityGroupsPaginator { + if params == nil { + params = &DescribeSecurityGroupsInput{} + } + + options := DescribeSecurityGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSecurityGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSecurityGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSecurityGroups page. +func (p *DescribeSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSecurityGroups(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeSecurityGroupsAPIClient is a client that implements the +// DescribeSecurityGroups operation. +type DescribeSecurityGroupsAPIClient interface { + DescribeSecurityGroups(context.Context, *DescribeSecurityGroupsInput, ...func(*Options)) (*DescribeSecurityGroupsOutput, error) +} + +var _ DescribeSecurityGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSnapshotAttribute.go b/service/ec2/api_op_DescribeSnapshotAttribute.go index 9c13a9f797b..2446300f352 100644 --- a/service/ec2/api_op_DescribeSnapshotAttribute.go +++ b/service/ec2/api_op_DescribeSnapshotAttribute.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeSnapshotAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeSnapshotTierStatus.go b/service/ec2/api_op_DescribeSnapshotTierStatus.go index cfbcab8ec97..e365396703a 100644 --- a/service/ec2/api_op_DescribeSnapshotTierStatus.go +++ b/service/ec2/api_op_DescribeSnapshotTierStatus.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeSnapshotTierStatusMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotTierStatus(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeSnapshotTierStatusMiddlewares(stack *middle return nil } -// DescribeSnapshotTierStatusAPIClient is a client that implements the -// DescribeSnapshotTierStatus operation. -type DescribeSnapshotTierStatusAPIClient interface { - DescribeSnapshotTierStatus(context.Context, *DescribeSnapshotTierStatusInput, ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) -} - -var _ DescribeSnapshotTierStatusAPIClient = (*Client)(nil) - // DescribeSnapshotTierStatusPaginatorOptions is the paginator options for // DescribeSnapshotTierStatus type DescribeSnapshotTierStatusPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeSnapshotTierStatusPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshotTierStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeSnapshotTierStatusPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeSnapshotTierStatusAPIClient is a client that implements the +// DescribeSnapshotTierStatus operation. +type DescribeSnapshotTierStatusAPIClient interface { + DescribeSnapshotTierStatus(context.Context, *DescribeSnapshotTierStatusInput, ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) +} + +var _ DescribeSnapshotTierStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshotTierStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSnapshots.go b/service/ec2/api_op_DescribeSnapshots.go index 2feb5a2dfe4..c6c9971ee82 100644 --- a/service/ec2/api_op_DescribeSnapshots.go +++ b/service/ec2/api_op_DescribeSnapshots.go @@ -227,6 +227,9 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -248,100 +251,6 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac return nil } -// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots -// operation. -type DescribeSnapshotsAPIClient interface { - DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) -} - -var _ DescribeSnapshotsAPIClient = (*Client)(nil) - -// DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots -type DescribeSnapshotsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSnapshotsPaginator is a paginator for DescribeSnapshots -type DescribeSnapshotsPaginator struct { - options DescribeSnapshotsPaginatorOptions - client DescribeSnapshotsAPIClient - params *DescribeSnapshotsInput - nextToken *string - firstPage bool -} - -// NewDescribeSnapshotsPaginator returns a new DescribeSnapshotsPaginator -func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *DescribeSnapshotsInput, optFns ...func(*DescribeSnapshotsPaginatorOptions)) *DescribeSnapshotsPaginator { - if params == nil { - params = &DescribeSnapshotsInput{} - } - - options := DescribeSnapshotsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSnapshotsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSnapshots page. -func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // SnapshotCompletedWaiterOptions are waiter options for SnapshotCompletedWaiter type SnapshotCompletedWaiterOptions struct { @@ -457,7 +366,13 @@ func (w *SnapshotCompletedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeSnapshots(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -554,6 +469,103 @@ func snapshotCompletedStateRetryable(ctx context.Context, input *DescribeSnapsho return true, nil } +// DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots +type DescribeSnapshotsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSnapshotsPaginator is a paginator for DescribeSnapshots +type DescribeSnapshotsPaginator struct { + options DescribeSnapshotsPaginatorOptions + client DescribeSnapshotsAPIClient + params *DescribeSnapshotsInput + nextToken *string + firstPage bool +} + +// NewDescribeSnapshotsPaginator returns a new DescribeSnapshotsPaginator +func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *DescribeSnapshotsInput, optFns ...func(*DescribeSnapshotsPaginatorOptions)) *DescribeSnapshotsPaginator { + if params == nil { + params = &DescribeSnapshotsInput{} + } + + options := DescribeSnapshotsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSnapshots page. +func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots +// operation. +type DescribeSnapshotsAPIClient interface { + DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) +} + +var _ DescribeSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSpotDatafeedSubscription.go b/service/ec2/api_op_DescribeSpotDatafeedSubscription.go index 5abc67ca083..d1a3de28b69 100644 --- a/service/ec2/api_op_DescribeSpotDatafeedSubscription.go +++ b/service/ec2/api_op_DescribeSpotDatafeedSubscription.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeSpotDatafeedSubscriptionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotDatafeedSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeSpotFleetInstances.go b/service/ec2/api_op_DescribeSpotFleetInstances.go index f64c0557a8f..f20409fd083 100644 --- a/service/ec2/api_op_DescribeSpotFleetInstances.go +++ b/service/ec2/api_op_DescribeSpotFleetInstances.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeSpotFleetInstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSpotFleetInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeSpotFleetRequestHistory.go b/service/ec2/api_op_DescribeSpotFleetRequestHistory.go index a3b92ae7c0f..faf404618de 100644 --- a/service/ec2/api_op_DescribeSpotFleetRequestHistory.go +++ b/service/ec2/api_op_DescribeSpotFleetRequestHistory.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeSpotFleetRequestHistoryMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSpotFleetRequestHistoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeSpotFleetRequests.go b/service/ec2/api_op_DescribeSpotFleetRequests.go index 0a683ceaeca..81ce7755c95 100644 --- a/service/ec2/api_op_DescribeSpotFleetRequests.go +++ b/service/ec2/api_op_DescribeSpotFleetRequests.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeSpotFleetRequestsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotFleetRequests(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeSpotFleetRequestsMiddlewares(stack *middlew return nil } -// DescribeSpotFleetRequestsAPIClient is a client that implements the -// DescribeSpotFleetRequests operation. -type DescribeSpotFleetRequestsAPIClient interface { - DescribeSpotFleetRequests(context.Context, *DescribeSpotFleetRequestsInput, ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error) -} - -var _ DescribeSpotFleetRequestsAPIClient = (*Client)(nil) - // DescribeSpotFleetRequestsPaginatorOptions is the paginator options for // DescribeSpotFleetRequests type DescribeSpotFleetRequestsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeSpotFleetRequestsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSpotFleetRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeSpotFleetRequestsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeSpotFleetRequestsAPIClient is a client that implements the +// DescribeSpotFleetRequests operation. +type DescribeSpotFleetRequestsAPIClient interface { + DescribeSpotFleetRequests(context.Context, *DescribeSpotFleetRequestsInput, ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error) +} + +var _ DescribeSpotFleetRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSpotFleetRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSpotInstanceRequests.go b/service/ec2/api_op_DescribeSpotInstanceRequests.go index f1db645b62f..8345d3bd593 100644 --- a/service/ec2/api_op_DescribeSpotInstanceRequests.go +++ b/service/ec2/api_op_DescribeSpotInstanceRequests.go @@ -257,6 +257,9 @@ func (c *Client) addOperationDescribeSpotInstanceRequestsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotInstanceRequests(options.Region), middleware.Before); err != nil { return err } @@ -278,103 +281,6 @@ func (c *Client) addOperationDescribeSpotInstanceRequestsMiddlewares(stack *midd return nil } -// DescribeSpotInstanceRequestsAPIClient is a client that implements the -// DescribeSpotInstanceRequests operation. -type DescribeSpotInstanceRequestsAPIClient interface { - DescribeSpotInstanceRequests(context.Context, *DescribeSpotInstanceRequestsInput, ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) -} - -var _ DescribeSpotInstanceRequestsAPIClient = (*Client)(nil) - -// DescribeSpotInstanceRequestsPaginatorOptions is the paginator options for -// DescribeSpotInstanceRequests -type DescribeSpotInstanceRequestsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSpotInstanceRequestsPaginator is a paginator for -// DescribeSpotInstanceRequests -type DescribeSpotInstanceRequestsPaginator struct { - options DescribeSpotInstanceRequestsPaginatorOptions - client DescribeSpotInstanceRequestsAPIClient - params *DescribeSpotInstanceRequestsInput - nextToken *string - firstPage bool -} - -// NewDescribeSpotInstanceRequestsPaginator returns a new -// DescribeSpotInstanceRequestsPaginator -func NewDescribeSpotInstanceRequestsPaginator(client DescribeSpotInstanceRequestsAPIClient, params *DescribeSpotInstanceRequestsInput, optFns ...func(*DescribeSpotInstanceRequestsPaginatorOptions)) *DescribeSpotInstanceRequestsPaginator { - if params == nil { - params = &DescribeSpotInstanceRequestsInput{} - } - - options := DescribeSpotInstanceRequestsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSpotInstanceRequestsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSpotInstanceRequestsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSpotInstanceRequests page. -func (p *DescribeSpotInstanceRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSpotInstanceRequests(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // SpotInstanceRequestFulfilledWaiterOptions are waiter options for // SpotInstanceRequestFulfilledWaiter type SpotInstanceRequestFulfilledWaiterOptions struct { @@ -494,7 +400,13 @@ func (w *SpotInstanceRequestFulfilledWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.DescribeSpotInstanceRequests(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -707,6 +619,106 @@ func spotInstanceRequestFulfilledStateRetryable(ctx context.Context, input *Desc return true, nil } +// DescribeSpotInstanceRequestsPaginatorOptions is the paginator options for +// DescribeSpotInstanceRequests +type DescribeSpotInstanceRequestsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSpotInstanceRequestsPaginator is a paginator for +// DescribeSpotInstanceRequests +type DescribeSpotInstanceRequestsPaginator struct { + options DescribeSpotInstanceRequestsPaginatorOptions + client DescribeSpotInstanceRequestsAPIClient + params *DescribeSpotInstanceRequestsInput + nextToken *string + firstPage bool +} + +// NewDescribeSpotInstanceRequestsPaginator returns a new +// DescribeSpotInstanceRequestsPaginator +func NewDescribeSpotInstanceRequestsPaginator(client DescribeSpotInstanceRequestsAPIClient, params *DescribeSpotInstanceRequestsInput, optFns ...func(*DescribeSpotInstanceRequestsPaginatorOptions)) *DescribeSpotInstanceRequestsPaginator { + if params == nil { + params = &DescribeSpotInstanceRequestsInput{} + } + + options := DescribeSpotInstanceRequestsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSpotInstanceRequestsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSpotInstanceRequestsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSpotInstanceRequests page. +func (p *DescribeSpotInstanceRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSpotInstanceRequests(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeSpotInstanceRequestsAPIClient is a client that implements the +// DescribeSpotInstanceRequests operation. +type DescribeSpotInstanceRequestsAPIClient interface { + DescribeSpotInstanceRequests(context.Context, *DescribeSpotInstanceRequestsInput, ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) +} + +var _ DescribeSpotInstanceRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSpotInstanceRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSpotPriceHistory.go b/service/ec2/api_op_DescribeSpotPriceHistory.go index 05139ecde7b..a0bd34528be 100644 --- a/service/ec2/api_op_DescribeSpotPriceHistory.go +++ b/service/ec2/api_op_DescribeSpotPriceHistory.go @@ -169,6 +169,9 @@ func (c *Client) addOperationDescribeSpotPriceHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotPriceHistory(options.Region), middleware.Before); err != nil { return err } @@ -190,14 +193,6 @@ func (c *Client) addOperationDescribeSpotPriceHistoryMiddlewares(stack *middlewa return nil } -// DescribeSpotPriceHistoryAPIClient is a client that implements the -// DescribeSpotPriceHistory operation. -type DescribeSpotPriceHistoryAPIClient interface { - DescribeSpotPriceHistory(context.Context, *DescribeSpotPriceHistoryInput, ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error) -} - -var _ DescribeSpotPriceHistoryAPIClient = (*Client)(nil) - // DescribeSpotPriceHistoryPaginatorOptions is the paginator options for // DescribeSpotPriceHistory type DescribeSpotPriceHistoryPaginatorOptions struct { @@ -267,6 +262,9 @@ func (p *DescribeSpotPriceHistoryPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSpotPriceHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +284,14 @@ func (p *DescribeSpotPriceHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeSpotPriceHistoryAPIClient is a client that implements the +// DescribeSpotPriceHistory operation. +type DescribeSpotPriceHistoryAPIClient interface { + DescribeSpotPriceHistory(context.Context, *DescribeSpotPriceHistoryInput, ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error) +} + +var _ DescribeSpotPriceHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSpotPriceHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeStaleSecurityGroups.go b/service/ec2/api_op_DescribeStaleSecurityGroups.go index 3cfe1e182f7..46313165dae 100644 --- a/service/ec2/api_op_DescribeStaleSecurityGroups.go +++ b/service/ec2/api_op_DescribeStaleSecurityGroups.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeStaleSecurityGroupsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStaleSecurityGroupsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeStaleSecurityGroupsMiddlewares(stack *middl return nil } -// DescribeStaleSecurityGroupsAPIClient is a client that implements the -// DescribeStaleSecurityGroups operation. -type DescribeStaleSecurityGroupsAPIClient interface { - DescribeStaleSecurityGroups(context.Context, *DescribeStaleSecurityGroupsInput, ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) -} - -var _ DescribeStaleSecurityGroupsAPIClient = (*Client)(nil) - // DescribeStaleSecurityGroupsPaginatorOptions is the paginator options for // DescribeStaleSecurityGroups type DescribeStaleSecurityGroupsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *DescribeStaleSecurityGroupsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStaleSecurityGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *DescribeStaleSecurityGroupsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeStaleSecurityGroupsAPIClient is a client that implements the +// DescribeStaleSecurityGroups operation. +type DescribeStaleSecurityGroupsAPIClient interface { + DescribeStaleSecurityGroups(context.Context, *DescribeStaleSecurityGroupsInput, ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) +} + +var _ DescribeStaleSecurityGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStaleSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeStoreImageTasks.go b/service/ec2/api_op_DescribeStoreImageTasks.go index 9bc39946d78..f7cc0b3f749 100644 --- a/service/ec2/api_op_DescribeStoreImageTasks.go +++ b/service/ec2/api_op_DescribeStoreImageTasks.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeStoreImageTasksMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStoreImageTasks(options.Region), middleware.Before); err != nil { return err } @@ -182,104 +185,6 @@ func (c *Client) addOperationDescribeStoreImageTasksMiddlewares(stack *middlewar return nil } -// DescribeStoreImageTasksAPIClient is a client that implements the -// DescribeStoreImageTasks operation. -type DescribeStoreImageTasksAPIClient interface { - DescribeStoreImageTasks(context.Context, *DescribeStoreImageTasksInput, ...func(*Options)) (*DescribeStoreImageTasksOutput, error) -} - -var _ DescribeStoreImageTasksAPIClient = (*Client)(nil) - -// DescribeStoreImageTasksPaginatorOptions is the paginator options for -// DescribeStoreImageTasks -type DescribeStoreImageTasksPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // You cannot specify this parameter and the ImageIds parameter in the same call. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeStoreImageTasksPaginator is a paginator for DescribeStoreImageTasks -type DescribeStoreImageTasksPaginator struct { - options DescribeStoreImageTasksPaginatorOptions - client DescribeStoreImageTasksAPIClient - params *DescribeStoreImageTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeStoreImageTasksPaginator returns a new -// DescribeStoreImageTasksPaginator -func NewDescribeStoreImageTasksPaginator(client DescribeStoreImageTasksAPIClient, params *DescribeStoreImageTasksInput, optFns ...func(*DescribeStoreImageTasksPaginatorOptions)) *DescribeStoreImageTasksPaginator { - if params == nil { - params = &DescribeStoreImageTasksInput{} - } - - options := DescribeStoreImageTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeStoreImageTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeStoreImageTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeStoreImageTasks page. -func (p *DescribeStoreImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeStoreImageTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // StoreImageTaskCompleteWaiterOptions are waiter options for // StoreImageTaskCompleteWaiter type StoreImageTaskCompleteWaiterOptions struct { @@ -397,7 +302,13 @@ func (w *StoreImageTaskCompleteWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeStoreImageTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -518,6 +429,107 @@ func storeImageTaskCompleteStateRetryable(ctx context.Context, input *DescribeSt return true, nil } +// DescribeStoreImageTasksPaginatorOptions is the paginator options for +// DescribeStoreImageTasks +type DescribeStoreImageTasksPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // You cannot specify this parameter and the ImageIds parameter in the same call. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeStoreImageTasksPaginator is a paginator for DescribeStoreImageTasks +type DescribeStoreImageTasksPaginator struct { + options DescribeStoreImageTasksPaginatorOptions + client DescribeStoreImageTasksAPIClient + params *DescribeStoreImageTasksInput + nextToken *string + firstPage bool +} + +// NewDescribeStoreImageTasksPaginator returns a new +// DescribeStoreImageTasksPaginator +func NewDescribeStoreImageTasksPaginator(client DescribeStoreImageTasksAPIClient, params *DescribeStoreImageTasksInput, optFns ...func(*DescribeStoreImageTasksPaginatorOptions)) *DescribeStoreImageTasksPaginator { + if params == nil { + params = &DescribeStoreImageTasksInput{} + } + + options := DescribeStoreImageTasksPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeStoreImageTasksPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeStoreImageTasksPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeStoreImageTasks page. +func (p *DescribeStoreImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeStoreImageTasks(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeStoreImageTasksAPIClient is a client that implements the +// DescribeStoreImageTasks operation. +type DescribeStoreImageTasksAPIClient interface { + DescribeStoreImageTasks(context.Context, *DescribeStoreImageTasksInput, ...func(*Options)) (*DescribeStoreImageTasksOutput, error) +} + +var _ DescribeStoreImageTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStoreImageTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeSubnets.go b/service/ec2/api_op_DescribeSubnets.go index a811fdac3c8..921f4e5d7ca 100644 --- a/service/ec2/api_op_DescribeSubnets.go +++ b/service/ec2/api_op_DescribeSubnets.go @@ -220,6 +220,9 @@ func (c *Client) addOperationDescribeSubnetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSubnets(options.Region), middleware.Before); err != nil { return err } @@ -241,100 +244,6 @@ func (c *Client) addOperationDescribeSubnetsMiddlewares(stack *middleware.Stack, return nil } -// DescribeSubnetsAPIClient is a client that implements the DescribeSubnets -// operation. -type DescribeSubnetsAPIClient interface { - DescribeSubnets(context.Context, *DescribeSubnetsInput, ...func(*Options)) (*DescribeSubnetsOutput, error) -} - -var _ DescribeSubnetsAPIClient = (*Client)(nil) - -// DescribeSubnetsPaginatorOptions is the paginator options for DescribeSubnets -type DescribeSubnetsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSubnetsPaginator is a paginator for DescribeSubnets -type DescribeSubnetsPaginator struct { - options DescribeSubnetsPaginatorOptions - client DescribeSubnetsAPIClient - params *DescribeSubnetsInput - nextToken *string - firstPage bool -} - -// NewDescribeSubnetsPaginator returns a new DescribeSubnetsPaginator -func NewDescribeSubnetsPaginator(client DescribeSubnetsAPIClient, params *DescribeSubnetsInput, optFns ...func(*DescribeSubnetsPaginatorOptions)) *DescribeSubnetsPaginator { - if params == nil { - params = &DescribeSubnetsInput{} - } - - options := DescribeSubnetsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSubnetsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSubnetsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSubnets page. -func (p *DescribeSubnetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSubnetsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSubnets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // SubnetAvailableWaiterOptions are waiter options for SubnetAvailableWaiter type SubnetAvailableWaiterOptions struct { @@ -450,7 +359,13 @@ func (w *SubnetAvailableWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeSubnets(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -523,6 +438,103 @@ func subnetAvailableStateRetryable(ctx context.Context, input *DescribeSubnetsIn return true, nil } +// DescribeSubnetsPaginatorOptions is the paginator options for DescribeSubnets +type DescribeSubnetsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeSubnetsPaginator is a paginator for DescribeSubnets +type DescribeSubnetsPaginator struct { + options DescribeSubnetsPaginatorOptions + client DescribeSubnetsAPIClient + params *DescribeSubnetsInput + nextToken *string + firstPage bool +} + +// NewDescribeSubnetsPaginator returns a new DescribeSubnetsPaginator +func NewDescribeSubnetsPaginator(client DescribeSubnetsAPIClient, params *DescribeSubnetsInput, optFns ...func(*DescribeSubnetsPaginatorOptions)) *DescribeSubnetsPaginator { + if params == nil { + params = &DescribeSubnetsInput{} + } + + options := DescribeSubnetsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeSubnetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeSubnetsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeSubnets page. +func (p *DescribeSubnetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSubnetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeSubnets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeSubnetsAPIClient is a client that implements the DescribeSubnets +// operation. +type DescribeSubnetsAPIClient interface { + DescribeSubnets(context.Context, *DescribeSubnetsInput, ...func(*Options)) (*DescribeSubnetsOutput, error) +} + +var _ DescribeSubnetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSubnets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTags.go b/service/ec2/api_op_DescribeTags.go index 0150ff839f1..cf65f407ef8 100644 --- a/service/ec2/api_op_DescribeTags.go +++ b/service/ec2/api_op_DescribeTags.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTags(options.Region), middleware.Before); err != nil { return err } @@ -172,13 +175,6 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeTagsAPIClient is a client that implements the DescribeTags operation. -type DescribeTagsAPIClient interface { - DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) -} - -var _ DescribeTagsAPIClient = (*Client)(nil) - // DescribeTagsPaginatorOptions is the paginator options for DescribeTags type DescribeTagsPaginatorOptions struct { // The maximum number of items to return for this request. This value can be @@ -246,6 +242,9 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +264,13 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeTagsAPIClient is a client that implements the DescribeTags operation. +type DescribeTagsAPIClient interface { + DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) +} + +var _ DescribeTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTrafficMirrorFilterRules.go b/service/ec2/api_op_DescribeTrafficMirrorFilterRules.go index dd9dee2ea08..8f5b569038e 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorFilterRules.go +++ b/service/ec2/api_op_DescribeTrafficMirrorFilterRules.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeTrafficMirrorFilterRulesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorFilterRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeTrafficMirrorFilters.go b/service/ec2/api_op_DescribeTrafficMirrorFilters.go index 2081c4d737b..5152178bc05 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorFilters.go +++ b/service/ec2/api_op_DescribeTrafficMirrorFilters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeTrafficMirrorFiltersMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorFilters(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeTrafficMirrorFiltersMiddlewares(stack *midd return nil } -// DescribeTrafficMirrorFiltersAPIClient is a client that implements the -// DescribeTrafficMirrorFilters operation. -type DescribeTrafficMirrorFiltersAPIClient interface { - DescribeTrafficMirrorFilters(context.Context, *DescribeTrafficMirrorFiltersInput, ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error) -} - -var _ DescribeTrafficMirrorFiltersAPIClient = (*Client)(nil) - // DescribeTrafficMirrorFiltersPaginatorOptions is the paginator options for // DescribeTrafficMirrorFilters type DescribeTrafficMirrorFiltersPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeTrafficMirrorFiltersPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrafficMirrorFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeTrafficMirrorFiltersPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeTrafficMirrorFiltersAPIClient is a client that implements the +// DescribeTrafficMirrorFilters operation. +type DescribeTrafficMirrorFiltersAPIClient interface { + DescribeTrafficMirrorFilters(context.Context, *DescribeTrafficMirrorFiltersInput, ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error) +} + +var _ DescribeTrafficMirrorFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrafficMirrorFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTrafficMirrorSessions.go b/service/ec2/api_op_DescribeTrafficMirrorSessions.go index 51b62a2f108..44fb08d0346 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorSessions.go +++ b/service/ec2/api_op_DescribeTrafficMirrorSessions.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeTrafficMirrorSessionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorSessions(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationDescribeTrafficMirrorSessionsMiddlewares(stack *mid return nil } -// DescribeTrafficMirrorSessionsAPIClient is a client that implements the -// DescribeTrafficMirrorSessions operation. -type DescribeTrafficMirrorSessionsAPIClient interface { - DescribeTrafficMirrorSessions(context.Context, *DescribeTrafficMirrorSessionsInput, ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error) -} - -var _ DescribeTrafficMirrorSessionsAPIClient = (*Client)(nil) - // DescribeTrafficMirrorSessionsPaginatorOptions is the paginator options for // DescribeTrafficMirrorSessions type DescribeTrafficMirrorSessionsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *DescribeTrafficMirrorSessionsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrafficMirrorSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *DescribeTrafficMirrorSessionsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeTrafficMirrorSessionsAPIClient is a client that implements the +// DescribeTrafficMirrorSessions operation. +type DescribeTrafficMirrorSessionsAPIClient interface { + DescribeTrafficMirrorSessions(context.Context, *DescribeTrafficMirrorSessionsInput, ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error) +} + +var _ DescribeTrafficMirrorSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrafficMirrorSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTrafficMirrorTargets.go b/service/ec2/api_op_DescribeTrafficMirrorTargets.go index 204658f75a8..318b1091b1a 100644 --- a/service/ec2/api_op_DescribeTrafficMirrorTargets.go +++ b/service/ec2/api_op_DescribeTrafficMirrorTargets.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeTrafficMirrorTargetsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorTargets(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeTrafficMirrorTargetsMiddlewares(stack *midd return nil } -// DescribeTrafficMirrorTargetsAPIClient is a client that implements the -// DescribeTrafficMirrorTargets operation. -type DescribeTrafficMirrorTargetsAPIClient interface { - DescribeTrafficMirrorTargets(context.Context, *DescribeTrafficMirrorTargetsInput, ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error) -} - -var _ DescribeTrafficMirrorTargetsAPIClient = (*Client)(nil) - // DescribeTrafficMirrorTargetsPaginatorOptions is the paginator options for // DescribeTrafficMirrorTargets type DescribeTrafficMirrorTargetsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *DescribeTrafficMirrorTargetsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrafficMirrorTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *DescribeTrafficMirrorTargetsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeTrafficMirrorTargetsAPIClient is a client that implements the +// DescribeTrafficMirrorTargets operation. +type DescribeTrafficMirrorTargetsAPIClient interface { + DescribeTrafficMirrorTargets(context.Context, *DescribeTrafficMirrorTargetsInput, ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error) +} + +var _ DescribeTrafficMirrorTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrafficMirrorTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayAttachments.go b/service/ec2/api_op_DescribeTransitGatewayAttachments.go index 9309e7112bd..42945865591 100644 --- a/service/ec2/api_op_DescribeTransitGatewayAttachments.go +++ b/service/ec2/api_op_DescribeTransitGatewayAttachments.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeTransitGatewayAttachmentsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayAttachments(options.Region), middleware.Before); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationDescribeTransitGatewayAttachmentsMiddlewares(stack return nil } -// DescribeTransitGatewayAttachmentsAPIClient is a client that implements the -// DescribeTransitGatewayAttachments operation. -type DescribeTransitGatewayAttachmentsAPIClient interface { - DescribeTransitGatewayAttachments(context.Context, *DescribeTransitGatewayAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error) -} - -var _ DescribeTransitGatewayAttachmentsAPIClient = (*Client)(nil) - // DescribeTransitGatewayAttachmentsPaginatorOptions is the paginator options for // DescribeTransitGatewayAttachments type DescribeTransitGatewayAttachmentsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeTransitGatewayAttachmentsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeTransitGatewayAttachmentsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeTransitGatewayAttachmentsAPIClient is a client that implements the +// DescribeTransitGatewayAttachments operation. +type DescribeTransitGatewayAttachmentsAPIClient interface { + DescribeTransitGatewayAttachments(context.Context, *DescribeTransitGatewayAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error) +} + +var _ DescribeTransitGatewayAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go b/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go index 8616a23d654..05774754e7d 100644 --- a/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go +++ b/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeTransitGatewayConnectPeersMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayConnectPeers(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeTransitGatewayConnectPeersMiddlewares(stack return nil } -// DescribeTransitGatewayConnectPeersAPIClient is a client that implements the -// DescribeTransitGatewayConnectPeers operation. -type DescribeTransitGatewayConnectPeersAPIClient interface { - DescribeTransitGatewayConnectPeers(context.Context, *DescribeTransitGatewayConnectPeersInput, ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error) -} - -var _ DescribeTransitGatewayConnectPeersAPIClient = (*Client)(nil) - // DescribeTransitGatewayConnectPeersPaginatorOptions is the paginator options for // DescribeTransitGatewayConnectPeers type DescribeTransitGatewayConnectPeersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeTransitGatewayConnectPeersPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayConnectPeers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeTransitGatewayConnectPeersPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeTransitGatewayConnectPeersAPIClient is a client that implements the +// DescribeTransitGatewayConnectPeers operation. +type DescribeTransitGatewayConnectPeersAPIClient interface { + DescribeTransitGatewayConnectPeers(context.Context, *DescribeTransitGatewayConnectPeersInput, ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error) +} + +var _ DescribeTransitGatewayConnectPeersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayConnectPeers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayConnects.go b/service/ec2/api_op_DescribeTransitGatewayConnects.go index 7880ca932c4..4e03dcf2725 100644 --- a/service/ec2/api_op_DescribeTransitGatewayConnects.go +++ b/service/ec2/api_op_DescribeTransitGatewayConnects.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeTransitGatewayConnectsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayConnects(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeTransitGatewayConnectsMiddlewares(stack *mi return nil } -// DescribeTransitGatewayConnectsAPIClient is a client that implements the -// DescribeTransitGatewayConnects operation. -type DescribeTransitGatewayConnectsAPIClient interface { - DescribeTransitGatewayConnects(context.Context, *DescribeTransitGatewayConnectsInput, ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error) -} - -var _ DescribeTransitGatewayConnectsAPIClient = (*Client)(nil) - // DescribeTransitGatewayConnectsPaginatorOptions is the paginator options for // DescribeTransitGatewayConnects type DescribeTransitGatewayConnectsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeTransitGatewayConnectsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayConnects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeTransitGatewayConnectsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeTransitGatewayConnectsAPIClient is a client that implements the +// DescribeTransitGatewayConnects operation. +type DescribeTransitGatewayConnectsAPIClient interface { + DescribeTransitGatewayConnects(context.Context, *DescribeTransitGatewayConnectsInput, ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error) +} + +var _ DescribeTransitGatewayConnectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayConnects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go b/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go index 5e00358daaa..c99c966bd74 100644 --- a/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go +++ b/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeTransitGatewayMulticastDomainsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayMulticastDomains(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeTransitGatewayMulticastDomainsMiddlewares(s return nil } -// DescribeTransitGatewayMulticastDomainsAPIClient is a client that implements the -// DescribeTransitGatewayMulticastDomains operation. -type DescribeTransitGatewayMulticastDomainsAPIClient interface { - DescribeTransitGatewayMulticastDomains(context.Context, *DescribeTransitGatewayMulticastDomainsInput, ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error) -} - -var _ DescribeTransitGatewayMulticastDomainsAPIClient = (*Client)(nil) - // DescribeTransitGatewayMulticastDomainsPaginatorOptions is the paginator options // for DescribeTransitGatewayMulticastDomains type DescribeTransitGatewayMulticastDomainsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeTransitGatewayMulticastDomainsPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayMulticastDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeTransitGatewayMulticastDomainsPaginator) NextPage(ctx context.C return result, nil } +// DescribeTransitGatewayMulticastDomainsAPIClient is a client that implements the +// DescribeTransitGatewayMulticastDomains operation. +type DescribeTransitGatewayMulticastDomainsAPIClient interface { + DescribeTransitGatewayMulticastDomains(context.Context, *DescribeTransitGatewayMulticastDomainsInput, ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error) +} + +var _ DescribeTransitGatewayMulticastDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayMulticastDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go b/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go index e94beedf708..f013488ff49 100644 --- a/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go +++ b/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeTransitGatewayPeeringAttachmentsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayPeeringAttachments(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationDescribeTransitGatewayPeeringAttachmentsMiddlewares return nil } -// DescribeTransitGatewayPeeringAttachmentsAPIClient is a client that implements -// the DescribeTransitGatewayPeeringAttachments operation. -type DescribeTransitGatewayPeeringAttachmentsAPIClient interface { - DescribeTransitGatewayPeeringAttachments(context.Context, *DescribeTransitGatewayPeeringAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error) -} - -var _ DescribeTransitGatewayPeeringAttachmentsAPIClient = (*Client)(nil) - // DescribeTransitGatewayPeeringAttachmentsPaginatorOptions is the paginator // options for DescribeTransitGatewayPeeringAttachments type DescribeTransitGatewayPeeringAttachmentsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayPeeringAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) NextPage(ctx context return result, nil } +// DescribeTransitGatewayPeeringAttachmentsAPIClient is a client that implements +// the DescribeTransitGatewayPeeringAttachments operation. +type DescribeTransitGatewayPeeringAttachmentsAPIClient interface { + DescribeTransitGatewayPeeringAttachments(context.Context, *DescribeTransitGatewayPeeringAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error) +} + +var _ DescribeTransitGatewayPeeringAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayPeeringAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go b/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go index df7f3e34896..606375d90fd 100644 --- a/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go +++ b/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeTransitGatewayPolicyTablesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayPolicyTables(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeTransitGatewayPolicyTablesMiddlewares(stack return nil } -// DescribeTransitGatewayPolicyTablesAPIClient is a client that implements the -// DescribeTransitGatewayPolicyTables operation. -type DescribeTransitGatewayPolicyTablesAPIClient interface { - DescribeTransitGatewayPolicyTables(context.Context, *DescribeTransitGatewayPolicyTablesInput, ...func(*Options)) (*DescribeTransitGatewayPolicyTablesOutput, error) -} - -var _ DescribeTransitGatewayPolicyTablesAPIClient = (*Client)(nil) - // DescribeTransitGatewayPolicyTablesPaginatorOptions is the paginator options for // DescribeTransitGatewayPolicyTables type DescribeTransitGatewayPolicyTablesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeTransitGatewayPolicyTablesPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayPolicyTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeTransitGatewayPolicyTablesPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeTransitGatewayPolicyTablesAPIClient is a client that implements the +// DescribeTransitGatewayPolicyTables operation. +type DescribeTransitGatewayPolicyTablesAPIClient interface { + DescribeTransitGatewayPolicyTables(context.Context, *DescribeTransitGatewayPolicyTablesInput, ...func(*Options)) (*DescribeTransitGatewayPolicyTablesOutput, error) +} + +var _ DescribeTransitGatewayPolicyTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayPolicyTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go b/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go index af969e16150..e0fe48fe11b 100644 --- a/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go +++ b/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeTransitGatewayRouteTableAnnouncementsMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTableAnnouncements(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeTransitGatewayRouteTableAnnouncementsMiddle return nil } -// DescribeTransitGatewayRouteTableAnnouncementsAPIClient is a client that -// implements the DescribeTransitGatewayRouteTableAnnouncements operation. -type DescribeTransitGatewayRouteTableAnnouncementsAPIClient interface { - DescribeTransitGatewayRouteTableAnnouncements(context.Context, *DescribeTransitGatewayRouteTableAnnouncementsInput, ...func(*Options)) (*DescribeTransitGatewayRouteTableAnnouncementsOutput, error) -} - -var _ DescribeTransitGatewayRouteTableAnnouncementsAPIClient = (*Client)(nil) - // DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions is the paginator // options for DescribeTransitGatewayRouteTableAnnouncements type DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeTransitGatewayRouteTableAnnouncementsPaginator) NextPage(ctx co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayRouteTableAnnouncements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeTransitGatewayRouteTableAnnouncementsPaginator) NextPage(ctx co return result, nil } +// DescribeTransitGatewayRouteTableAnnouncementsAPIClient is a client that +// implements the DescribeTransitGatewayRouteTableAnnouncements operation. +type DescribeTransitGatewayRouteTableAnnouncementsAPIClient interface { + DescribeTransitGatewayRouteTableAnnouncements(context.Context, *DescribeTransitGatewayRouteTableAnnouncementsInput, ...func(*Options)) (*DescribeTransitGatewayRouteTableAnnouncementsOutput, error) +} + +var _ DescribeTransitGatewayRouteTableAnnouncementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTableAnnouncements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayRouteTables.go b/service/ec2/api_op_DescribeTransitGatewayRouteTables.go index f145ff3399e..9080c9a5ca2 100644 --- a/service/ec2/api_op_DescribeTransitGatewayRouteTables.go +++ b/service/ec2/api_op_DescribeTransitGatewayRouteTables.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeTransitGatewayRouteTablesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTables(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeTransitGatewayRouteTablesMiddlewares(stack return nil } -// DescribeTransitGatewayRouteTablesAPIClient is a client that implements the -// DescribeTransitGatewayRouteTables operation. -type DescribeTransitGatewayRouteTablesAPIClient interface { - DescribeTransitGatewayRouteTables(context.Context, *DescribeTransitGatewayRouteTablesInput, ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error) -} - -var _ DescribeTransitGatewayRouteTablesAPIClient = (*Client)(nil) - // DescribeTransitGatewayRouteTablesPaginatorOptions is the paginator options for // DescribeTransitGatewayRouteTables type DescribeTransitGatewayRouteTablesPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeTransitGatewayRouteTablesPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayRouteTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeTransitGatewayRouteTablesPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeTransitGatewayRouteTablesAPIClient is a client that implements the +// DescribeTransitGatewayRouteTables operation. +type DescribeTransitGatewayRouteTablesAPIClient interface { + DescribeTransitGatewayRouteTables(context.Context, *DescribeTransitGatewayRouteTablesInput, ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error) +} + +var _ DescribeTransitGatewayRouteTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go b/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go index bc500626fb1..889a6ab552a 100644 --- a/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go +++ b/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeTransitGatewayVpcAttachmentsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayVpcAttachments(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeTransitGatewayVpcAttachmentsMiddlewares(sta return nil } -// DescribeTransitGatewayVpcAttachmentsAPIClient is a client that implements the -// DescribeTransitGatewayVpcAttachments operation. -type DescribeTransitGatewayVpcAttachmentsAPIClient interface { - DescribeTransitGatewayVpcAttachments(context.Context, *DescribeTransitGatewayVpcAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error) -} - -var _ DescribeTransitGatewayVpcAttachmentsAPIClient = (*Client)(nil) - // DescribeTransitGatewayVpcAttachmentsPaginatorOptions is the paginator options // for DescribeTransitGatewayVpcAttachments type DescribeTransitGatewayVpcAttachmentsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeTransitGatewayVpcAttachmentsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGatewayVpcAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeTransitGatewayVpcAttachmentsPaginator) NextPage(ctx context.Con return result, nil } +// DescribeTransitGatewayVpcAttachmentsAPIClient is a client that implements the +// DescribeTransitGatewayVpcAttachments operation. +type DescribeTransitGatewayVpcAttachmentsAPIClient interface { + DescribeTransitGatewayVpcAttachments(context.Context, *DescribeTransitGatewayVpcAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error) +} + +var _ DescribeTransitGatewayVpcAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGatewayVpcAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTransitGateways.go b/service/ec2/api_op_DescribeTransitGateways.go index 2329cb5f111..894c502d859 100644 --- a/service/ec2/api_op_DescribeTransitGateways.go +++ b/service/ec2/api_op_DescribeTransitGateways.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeTransitGatewaysMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGateways(options.Region), middleware.Before); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationDescribeTransitGatewaysMiddlewares(stack *middlewar return nil } -// DescribeTransitGatewaysAPIClient is a client that implements the -// DescribeTransitGateways operation. -type DescribeTransitGatewaysAPIClient interface { - DescribeTransitGateways(context.Context, *DescribeTransitGatewaysInput, ...func(*Options)) (*DescribeTransitGatewaysOutput, error) -} - -var _ DescribeTransitGatewaysAPIClient = (*Client)(nil) - // DescribeTransitGatewaysPaginatorOptions is the paginator options for // DescribeTransitGateways type DescribeTransitGatewaysPaginatorOptions struct { @@ -260,6 +255,9 @@ func (p *DescribeTransitGatewaysPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTransitGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *DescribeTransitGatewaysPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeTransitGatewaysAPIClient is a client that implements the +// DescribeTransitGateways operation. +type DescribeTransitGatewaysAPIClient interface { + DescribeTransitGateways(context.Context, *DescribeTransitGatewaysInput, ...func(*Options)) (*DescribeTransitGatewaysOutput, error) +} + +var _ DescribeTransitGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransitGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go b/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go index f1bab3aa71b..1904ced5215 100644 --- a/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go +++ b/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeTrunkInterfaceAssociationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrunkInterfaceAssociations(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeTrunkInterfaceAssociationsMiddlewares(stack return nil } -// DescribeTrunkInterfaceAssociationsAPIClient is a client that implements the -// DescribeTrunkInterfaceAssociations operation. -type DescribeTrunkInterfaceAssociationsAPIClient interface { - DescribeTrunkInterfaceAssociations(context.Context, *DescribeTrunkInterfaceAssociationsInput, ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error) -} - -var _ DescribeTrunkInterfaceAssociationsAPIClient = (*Client)(nil) - // DescribeTrunkInterfaceAssociationsPaginatorOptions is the paginator options for // DescribeTrunkInterfaceAssociations type DescribeTrunkInterfaceAssociationsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeTrunkInterfaceAssociationsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrunkInterfaceAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeTrunkInterfaceAssociationsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeTrunkInterfaceAssociationsAPIClient is a client that implements the +// DescribeTrunkInterfaceAssociations operation. +type DescribeTrunkInterfaceAssociationsAPIClient interface { + DescribeTrunkInterfaceAssociations(context.Context, *DescribeTrunkInterfaceAssociationsInput, ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error) +} + +var _ DescribeTrunkInterfaceAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrunkInterfaceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go b/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go index 08fd84ef533..19e27b25539 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go +++ b/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeVerifiedAccessEndpointsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeVerifiedAccessEndpointsMiddlewares(stack *m return nil } -// DescribeVerifiedAccessEndpointsAPIClient is a client that implements the -// DescribeVerifiedAccessEndpoints operation. -type DescribeVerifiedAccessEndpointsAPIClient interface { - DescribeVerifiedAccessEndpoints(context.Context, *DescribeVerifiedAccessEndpointsInput, ...func(*Options)) (*DescribeVerifiedAccessEndpointsOutput, error) -} - -var _ DescribeVerifiedAccessEndpointsAPIClient = (*Client)(nil) - // DescribeVerifiedAccessEndpointsPaginatorOptions is the paginator options for // DescribeVerifiedAccessEndpoints type DescribeVerifiedAccessEndpointsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeVerifiedAccessEndpointsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVerifiedAccessEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeVerifiedAccessEndpointsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeVerifiedAccessEndpointsAPIClient is a client that implements the +// DescribeVerifiedAccessEndpoints operation. +type DescribeVerifiedAccessEndpointsAPIClient interface { + DescribeVerifiedAccessEndpoints(context.Context, *DescribeVerifiedAccessEndpointsInput, ...func(*Options)) (*DescribeVerifiedAccessEndpointsOutput, error) +} + +var _ DescribeVerifiedAccessEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVerifiedAccessEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVerifiedAccessGroups.go b/service/ec2/api_op_DescribeVerifiedAccessGroups.go index fb10c812f29..17f3aec05ad 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessGroups.go +++ b/service/ec2/api_op_DescribeVerifiedAccessGroups.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeVerifiedAccessGroupsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessGroups(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeVerifiedAccessGroupsMiddlewares(stack *midd return nil } -// DescribeVerifiedAccessGroupsAPIClient is a client that implements the -// DescribeVerifiedAccessGroups operation. -type DescribeVerifiedAccessGroupsAPIClient interface { - DescribeVerifiedAccessGroups(context.Context, *DescribeVerifiedAccessGroupsInput, ...func(*Options)) (*DescribeVerifiedAccessGroupsOutput, error) -} - -var _ DescribeVerifiedAccessGroupsAPIClient = (*Client)(nil) - // DescribeVerifiedAccessGroupsPaginatorOptions is the paginator options for // DescribeVerifiedAccessGroups type DescribeVerifiedAccessGroupsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeVerifiedAccessGroupsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVerifiedAccessGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeVerifiedAccessGroupsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeVerifiedAccessGroupsAPIClient is a client that implements the +// DescribeVerifiedAccessGroups operation. +type DescribeVerifiedAccessGroupsAPIClient interface { + DescribeVerifiedAccessGroups(context.Context, *DescribeVerifiedAccessGroupsInput, ...func(*Options)) (*DescribeVerifiedAccessGroupsOutput, error) +} + +var _ DescribeVerifiedAccessGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVerifiedAccessGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go b/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go index 0ab59edf886..1b795a994db 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go +++ b/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeVerifiedAccessInstanceLoggingConfigurations if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessInstanceLoggingConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeVerifiedAccessInstanceLoggingConfigurations return nil } -// DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient is a client that -// implements the DescribeVerifiedAccessInstanceLoggingConfigurations operation. -type DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient interface { - DescribeVerifiedAccessInstanceLoggingConfigurations(context.Context, *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, ...func(*Options)) (*DescribeVerifiedAccessInstanceLoggingConfigurationsOutput, error) -} - -var _ DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient = (*Client)(nil) - // DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions is the // paginator options for DescribeVerifiedAccessInstanceLoggingConfigurations type DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator) NextPage( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVerifiedAccessInstanceLoggingConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator) NextPage( return result, nil } +// DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient is a client that +// implements the DescribeVerifiedAccessInstanceLoggingConfigurations operation. +type DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient interface { + DescribeVerifiedAccessInstanceLoggingConfigurations(context.Context, *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, ...func(*Options)) (*DescribeVerifiedAccessInstanceLoggingConfigurationsOutput, error) +} + +var _ DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVerifiedAccessInstanceLoggingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVerifiedAccessInstances.go b/service/ec2/api_op_DescribeVerifiedAccessInstances.go index 5f1c7499872..5b858272e60 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessInstances.go +++ b/service/ec2/api_op_DescribeVerifiedAccessInstances.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeVerifiedAccessInstancesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessInstances(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeVerifiedAccessInstancesMiddlewares(stack *m return nil } -// DescribeVerifiedAccessInstancesAPIClient is a client that implements the -// DescribeVerifiedAccessInstances operation. -type DescribeVerifiedAccessInstancesAPIClient interface { - DescribeVerifiedAccessInstances(context.Context, *DescribeVerifiedAccessInstancesInput, ...func(*Options)) (*DescribeVerifiedAccessInstancesOutput, error) -} - -var _ DescribeVerifiedAccessInstancesAPIClient = (*Client)(nil) - // DescribeVerifiedAccessInstancesPaginatorOptions is the paginator options for // DescribeVerifiedAccessInstances type DescribeVerifiedAccessInstancesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeVerifiedAccessInstancesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVerifiedAccessInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeVerifiedAccessInstancesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeVerifiedAccessInstancesAPIClient is a client that implements the +// DescribeVerifiedAccessInstances operation. +type DescribeVerifiedAccessInstancesAPIClient interface { + DescribeVerifiedAccessInstances(context.Context, *DescribeVerifiedAccessInstancesInput, ...func(*Options)) (*DescribeVerifiedAccessInstancesOutput, error) +} + +var _ DescribeVerifiedAccessInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVerifiedAccessInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go b/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go index ea3d6d0d8e3..cb75c56feec 100644 --- a/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go +++ b/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeVerifiedAccessTrustProvidersMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessTrustProviders(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeVerifiedAccessTrustProvidersMiddlewares(sta return nil } -// DescribeVerifiedAccessTrustProvidersAPIClient is a client that implements the -// DescribeVerifiedAccessTrustProviders operation. -type DescribeVerifiedAccessTrustProvidersAPIClient interface { - DescribeVerifiedAccessTrustProviders(context.Context, *DescribeVerifiedAccessTrustProvidersInput, ...func(*Options)) (*DescribeVerifiedAccessTrustProvidersOutput, error) -} - -var _ DescribeVerifiedAccessTrustProvidersAPIClient = (*Client)(nil) - // DescribeVerifiedAccessTrustProvidersPaginatorOptions is the paginator options // for DescribeVerifiedAccessTrustProviders type DescribeVerifiedAccessTrustProvidersPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeVerifiedAccessTrustProvidersPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVerifiedAccessTrustProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeVerifiedAccessTrustProvidersPaginator) NextPage(ctx context.Con return result, nil } +// DescribeVerifiedAccessTrustProvidersAPIClient is a client that implements the +// DescribeVerifiedAccessTrustProviders operation. +type DescribeVerifiedAccessTrustProvidersAPIClient interface { + DescribeVerifiedAccessTrustProviders(context.Context, *DescribeVerifiedAccessTrustProvidersInput, ...func(*Options)) (*DescribeVerifiedAccessTrustProvidersOutput, error) +} + +var _ DescribeVerifiedAccessTrustProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVerifiedAccessTrustProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVolumeAttribute.go b/service/ec2/api_op_DescribeVolumeAttribute.go index b7d87616d6c..1df6a072580 100644 --- a/service/ec2/api_op_DescribeVolumeAttribute.go +++ b/service/ec2/api_op_DescribeVolumeAttribute.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeVolumeAttributeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVolumeAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeVolumeStatus.go b/service/ec2/api_op_DescribeVolumeStatus.go index 944676337a9..9842161de96 100644 --- a/service/ec2/api_op_DescribeVolumeStatus.go +++ b/service/ec2/api_op_DescribeVolumeStatus.go @@ -199,6 +199,9 @@ func (c *Client) addOperationDescribeVolumeStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumeStatus(options.Region), middleware.Before); err != nil { return err } @@ -220,14 +223,6 @@ func (c *Client) addOperationDescribeVolumeStatusMiddlewares(stack *middleware.S return nil } -// DescribeVolumeStatusAPIClient is a client that implements the -// DescribeVolumeStatus operation. -type DescribeVolumeStatusAPIClient interface { - DescribeVolumeStatus(context.Context, *DescribeVolumeStatusInput, ...func(*Options)) (*DescribeVolumeStatusOutput, error) -} - -var _ DescribeVolumeStatusAPIClient = (*Client)(nil) - // DescribeVolumeStatusPaginatorOptions is the paginator options for // DescribeVolumeStatus type DescribeVolumeStatusPaginatorOptions struct { @@ -296,6 +291,9 @@ func (p *DescribeVolumeStatusPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVolumeStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -315,6 +313,14 @@ func (p *DescribeVolumeStatusPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeVolumeStatusAPIClient is a client that implements the +// DescribeVolumeStatus operation. +type DescribeVolumeStatusAPIClient interface { + DescribeVolumeStatus(context.Context, *DescribeVolumeStatusInput, ...func(*Options)) (*DescribeVolumeStatusOutput, error) +} + +var _ DescribeVolumeStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVolumeStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVolumes.go b/service/ec2/api_op_DescribeVolumes.go index 60ee8f02aa4..294a4dfc661 100644 --- a/service/ec2/api_op_DescribeVolumes.go +++ b/service/ec2/api_op_DescribeVolumes.go @@ -194,6 +194,9 @@ func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumes(options.Region), middleware.Before); err != nil { return err } @@ -215,100 +218,6 @@ func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, return nil } -// DescribeVolumesAPIClient is a client that implements the DescribeVolumes -// operation. -type DescribeVolumesAPIClient interface { - DescribeVolumes(context.Context, *DescribeVolumesInput, ...func(*Options)) (*DescribeVolumesOutput, error) -} - -var _ DescribeVolumesAPIClient = (*Client)(nil) - -// DescribeVolumesPaginatorOptions is the paginator options for DescribeVolumes -type DescribeVolumesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVolumesPaginator is a paginator for DescribeVolumes -type DescribeVolumesPaginator struct { - options DescribeVolumesPaginatorOptions - client DescribeVolumesAPIClient - params *DescribeVolumesInput - nextToken *string - firstPage bool -} - -// NewDescribeVolumesPaginator returns a new DescribeVolumesPaginator -func NewDescribeVolumesPaginator(client DescribeVolumesAPIClient, params *DescribeVolumesInput, optFns ...func(*DescribeVolumesPaginatorOptions)) *DescribeVolumesPaginator { - if params == nil { - params = &DescribeVolumesInput{} - } - - options := DescribeVolumesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVolumesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVolumesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVolumes page. -func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVolumes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // VolumeAvailableWaiterOptions are waiter options for VolumeAvailableWaiter type VolumeAvailableWaiterOptions struct { @@ -424,7 +333,13 @@ func (w *VolumeAvailableWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeVolumes(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -636,7 +551,13 @@ func (w *VolumeDeletedWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeVolumes(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -835,7 +756,13 @@ func (w *VolumeInUseWaiter) WaitForOutput(ctx context.Context, params *DescribeV } out, err := w.client.DescribeVolumes(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -932,6 +859,103 @@ func volumeInUseStateRetryable(ctx context.Context, input *DescribeVolumesInput, return true, nil } +// DescribeVolumesPaginatorOptions is the paginator options for DescribeVolumes +type DescribeVolumesPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeVolumesPaginator is a paginator for DescribeVolumes +type DescribeVolumesPaginator struct { + options DescribeVolumesPaginatorOptions + client DescribeVolumesAPIClient + params *DescribeVolumesInput + nextToken *string + firstPage bool +} + +// NewDescribeVolumesPaginator returns a new DescribeVolumesPaginator +func NewDescribeVolumesPaginator(client DescribeVolumesAPIClient, params *DescribeVolumesInput, optFns ...func(*DescribeVolumesPaginatorOptions)) *DescribeVolumesPaginator { + if params == nil { + params = &DescribeVolumesInput{} + } + + options := DescribeVolumesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeVolumesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeVolumesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeVolumes page. +func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeVolumes(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeVolumesAPIClient is a client that implements the DescribeVolumes +// operation. +type DescribeVolumesAPIClient interface { + DescribeVolumes(context.Context, *DescribeVolumesInput, ...func(*Options)) (*DescribeVolumesOutput, error) +} + +var _ DescribeVolumesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVolumes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVolumesModifications.go b/service/ec2/api_op_DescribeVolumesModifications.go index 978d6fe610d..ae8c7a4b5f7 100644 --- a/service/ec2/api_op_DescribeVolumesModifications.go +++ b/service/ec2/api_op_DescribeVolumesModifications.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeVolumesModificationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumesModifications(options.Region), middleware.Before); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationDescribeVolumesModificationsMiddlewares(stack *midd return nil } -// DescribeVolumesModificationsAPIClient is a client that implements the -// DescribeVolumesModifications operation. -type DescribeVolumesModificationsAPIClient interface { - DescribeVolumesModifications(context.Context, *DescribeVolumesModificationsInput, ...func(*Options)) (*DescribeVolumesModificationsOutput, error) -} - -var _ DescribeVolumesModificationsAPIClient = (*Client)(nil) - // DescribeVolumesModificationsPaginatorOptions is the paginator options for // DescribeVolumesModifications type DescribeVolumesModificationsPaginatorOptions struct { @@ -261,6 +256,9 @@ func (p *DescribeVolumesModificationsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVolumesModifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +278,14 @@ func (p *DescribeVolumesModificationsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeVolumesModificationsAPIClient is a client that implements the +// DescribeVolumesModifications operation. +type DescribeVolumesModificationsAPIClient interface { + DescribeVolumesModifications(context.Context, *DescribeVolumesModificationsInput, ...func(*Options)) (*DescribeVolumesModificationsOutput, error) +} + +var _ DescribeVolumesModificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVolumesModifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcAttribute.go b/service/ec2/api_op_DescribeVpcAttribute.go index 6d5802cb8ba..962bd5e3e37 100644 --- a/service/ec2/api_op_DescribeVpcAttribute.go +++ b/service/ec2/api_op_DescribeVpcAttribute.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeVpcAttributeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DescribeVpcClassicLink.go b/service/ec2/api_op_DescribeVpcClassicLink.go index d3c9fcea074..168ab9a9643 100644 --- a/service/ec2/api_op_DescribeVpcClassicLink.go +++ b/service/ec2/api_op_DescribeVpcClassicLink.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeVpcClassicLinkMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcClassicLink(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go b/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go index 45f41f657cc..0a4ffceafae 100644 --- a/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go +++ b/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeVpcClassicLinkDnsSupportMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcClassicLinkDnsSupport(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeVpcClassicLinkDnsSupportMiddlewares(stack * return nil } -// DescribeVpcClassicLinkDnsSupportAPIClient is a client that implements the -// DescribeVpcClassicLinkDnsSupport operation. -type DescribeVpcClassicLinkDnsSupportAPIClient interface { - DescribeVpcClassicLinkDnsSupport(context.Context, *DescribeVpcClassicLinkDnsSupportInput, ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error) -} - -var _ DescribeVpcClassicLinkDnsSupportAPIClient = (*Client)(nil) - // DescribeVpcClassicLinkDnsSupportPaginatorOptions is the paginator options for // DescribeVpcClassicLinkDnsSupport type DescribeVpcClassicLinkDnsSupportPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeVpcClassicLinkDnsSupportPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVpcClassicLinkDnsSupport(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeVpcClassicLinkDnsSupportPaginator) NextPage(ctx context.Context return result, nil } +// DescribeVpcClassicLinkDnsSupportAPIClient is a client that implements the +// DescribeVpcClassicLinkDnsSupport operation. +type DescribeVpcClassicLinkDnsSupportAPIClient interface { + DescribeVpcClassicLinkDnsSupport(context.Context, *DescribeVpcClassicLinkDnsSupportInput, ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error) +} + +var _ DescribeVpcClassicLinkDnsSupportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go b/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go index 63a796610e3..373fd95288c 100644 --- a/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go +++ b/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeVpcEndpointConnectionNotificationsMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointConnectionNotifications(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeVpcEndpointConnectionNotificationsMiddlewar return nil } -// DescribeVpcEndpointConnectionNotificationsAPIClient is a client that implements -// the DescribeVpcEndpointConnectionNotifications operation. -type DescribeVpcEndpointConnectionNotificationsAPIClient interface { - DescribeVpcEndpointConnectionNotifications(context.Context, *DescribeVpcEndpointConnectionNotificationsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error) -} - -var _ DescribeVpcEndpointConnectionNotificationsAPIClient = (*Client)(nil) - // DescribeVpcEndpointConnectionNotificationsPaginatorOptions is the paginator // options for DescribeVpcEndpointConnectionNotifications type DescribeVpcEndpointConnectionNotificationsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeVpcEndpointConnectionNotificationsPaginator) NextPage(ctx conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVpcEndpointConnectionNotifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeVpcEndpointConnectionNotificationsPaginator) NextPage(ctx conte return result, nil } +// DescribeVpcEndpointConnectionNotificationsAPIClient is a client that implements +// the DescribeVpcEndpointConnectionNotifications operation. +type DescribeVpcEndpointConnectionNotificationsAPIClient interface { + DescribeVpcEndpointConnectionNotifications(context.Context, *DescribeVpcEndpointConnectionNotificationsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error) +} + +var _ DescribeVpcEndpointConnectionNotificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcEndpointConnectionNotifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcEndpointConnections.go b/service/ec2/api_op_DescribeVpcEndpointConnections.go index 59cb80f800f..fc7bd41c99f 100644 --- a/service/ec2/api_op_DescribeVpcEndpointConnections.go +++ b/service/ec2/api_op_DescribeVpcEndpointConnections.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeVpcEndpointConnectionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointConnections(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeVpcEndpointConnectionsMiddlewares(stack *mi return nil } -// DescribeVpcEndpointConnectionsAPIClient is a client that implements the -// DescribeVpcEndpointConnections operation. -type DescribeVpcEndpointConnectionsAPIClient interface { - DescribeVpcEndpointConnections(context.Context, *DescribeVpcEndpointConnectionsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error) -} - -var _ DescribeVpcEndpointConnectionsAPIClient = (*Client)(nil) - // DescribeVpcEndpointConnectionsPaginatorOptions is the paginator options for // DescribeVpcEndpointConnections type DescribeVpcEndpointConnectionsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeVpcEndpointConnectionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVpcEndpointConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeVpcEndpointConnectionsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeVpcEndpointConnectionsAPIClient is a client that implements the +// DescribeVpcEndpointConnections operation. +type DescribeVpcEndpointConnectionsAPIClient interface { + DescribeVpcEndpointConnections(context.Context, *DescribeVpcEndpointConnectionsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error) +} + +var _ DescribeVpcEndpointConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go b/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go index e4af1fac573..fa776c7cf3d 100644 --- a/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go +++ b/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeVpcEndpointServiceConfigurationsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServiceConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeVpcEndpointServiceConfigurationsMiddlewares return nil } -// DescribeVpcEndpointServiceConfigurationsAPIClient is a client that implements -// the DescribeVpcEndpointServiceConfigurations operation. -type DescribeVpcEndpointServiceConfigurationsAPIClient interface { - DescribeVpcEndpointServiceConfigurations(context.Context, *DescribeVpcEndpointServiceConfigurationsInput, ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error) -} - -var _ DescribeVpcEndpointServiceConfigurationsAPIClient = (*Client)(nil) - // DescribeVpcEndpointServiceConfigurationsPaginatorOptions is the paginator // options for DescribeVpcEndpointServiceConfigurations type DescribeVpcEndpointServiceConfigurationsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeVpcEndpointServiceConfigurationsPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVpcEndpointServiceConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeVpcEndpointServiceConfigurationsPaginator) NextPage(ctx context return result, nil } +// DescribeVpcEndpointServiceConfigurationsAPIClient is a client that implements +// the DescribeVpcEndpointServiceConfigurations operation. +type DescribeVpcEndpointServiceConfigurationsAPIClient interface { + DescribeVpcEndpointServiceConfigurations(context.Context, *DescribeVpcEndpointServiceConfigurationsInput, ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error) +} + +var _ DescribeVpcEndpointServiceConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcEndpointServiceConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go b/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go index 576ea28b8f5..f841c45469e 100644 --- a/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go +++ b/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeVpcEndpointServicePermissionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcEndpointServicePermissionsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeVpcEndpointServicePermissionsMiddlewares(st return nil } -// DescribeVpcEndpointServicePermissionsAPIClient is a client that implements the -// DescribeVpcEndpointServicePermissions operation. -type DescribeVpcEndpointServicePermissionsAPIClient interface { - DescribeVpcEndpointServicePermissions(context.Context, *DescribeVpcEndpointServicePermissionsInput, ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error) -} - -var _ DescribeVpcEndpointServicePermissionsAPIClient = (*Client)(nil) - // DescribeVpcEndpointServicePermissionsPaginatorOptions is the paginator options // for DescribeVpcEndpointServicePermissions type DescribeVpcEndpointServicePermissionsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeVpcEndpointServicePermissionsPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVpcEndpointServicePermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeVpcEndpointServicePermissionsPaginator) NextPage(ctx context.Co return result, nil } +// DescribeVpcEndpointServicePermissionsAPIClient is a client that implements the +// DescribeVpcEndpointServicePermissions operation. +type DescribeVpcEndpointServicePermissionsAPIClient interface { + DescribeVpcEndpointServicePermissions(context.Context, *DescribeVpcEndpointServicePermissionsInput, ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error) +} + +var _ DescribeVpcEndpointServicePermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcEndpointServicePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcEndpointServices.go b/service/ec2/api_op_DescribeVpcEndpointServices.go index eda9d95ada1..1a4658717dc 100644 --- a/service/ec2/api_op_DescribeVpcEndpointServices.go +++ b/service/ec2/api_op_DescribeVpcEndpointServices.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribeVpcEndpointServicesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServices(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DescribeVpcEndpoints.go b/service/ec2/api_op_DescribeVpcEndpoints.go index 2da93e804ca..4b4e29c08b3 100644 --- a/service/ec2/api_op_DescribeVpcEndpoints.go +++ b/service/ec2/api_op_DescribeVpcEndpoints.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeVpcEndpointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationDescribeVpcEndpointsMiddlewares(stack *middleware.S return nil } -// DescribeVpcEndpointsAPIClient is a client that implements the -// DescribeVpcEndpoints operation. -type DescribeVpcEndpointsAPIClient interface { - DescribeVpcEndpoints(context.Context, *DescribeVpcEndpointsInput, ...func(*Options)) (*DescribeVpcEndpointsOutput, error) -} - -var _ DescribeVpcEndpointsAPIClient = (*Client)(nil) - // DescribeVpcEndpointsPaginatorOptions is the paginator options for // DescribeVpcEndpoints type DescribeVpcEndpointsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVpcEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeVpcEndpointsAPIClient is a client that implements the +// DescribeVpcEndpoints operation. +type DescribeVpcEndpointsAPIClient interface { + DescribeVpcEndpoints(context.Context, *DescribeVpcEndpointsInput, ...func(*Options)) (*DescribeVpcEndpointsOutput, error) +} + +var _ DescribeVpcEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcPeeringConnections.go b/service/ec2/api_op_DescribeVpcPeeringConnections.go index 79247a0b2dc..3289c357e95 100644 --- a/service/ec2/api_op_DescribeVpcPeeringConnections.go +++ b/service/ec2/api_op_DescribeVpcPeeringConnections.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDescribeVpcPeeringConnectionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcPeeringConnections(options.Region), middleware.Before); err != nil { return err } @@ -193,103 +196,6 @@ func (c *Client) addOperationDescribeVpcPeeringConnectionsMiddlewares(stack *mid return nil } -// DescribeVpcPeeringConnectionsAPIClient is a client that implements the -// DescribeVpcPeeringConnections operation. -type DescribeVpcPeeringConnectionsAPIClient interface { - DescribeVpcPeeringConnections(context.Context, *DescribeVpcPeeringConnectionsInput, ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) -} - -var _ DescribeVpcPeeringConnectionsAPIClient = (*Client)(nil) - -// DescribeVpcPeeringConnectionsPaginatorOptions is the paginator options for -// DescribeVpcPeeringConnections -type DescribeVpcPeeringConnectionsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcPeeringConnectionsPaginator is a paginator for -// DescribeVpcPeeringConnections -type DescribeVpcPeeringConnectionsPaginator struct { - options DescribeVpcPeeringConnectionsPaginatorOptions - client DescribeVpcPeeringConnectionsAPIClient - params *DescribeVpcPeeringConnectionsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcPeeringConnectionsPaginator returns a new -// DescribeVpcPeeringConnectionsPaginator -func NewDescribeVpcPeeringConnectionsPaginator(client DescribeVpcPeeringConnectionsAPIClient, params *DescribeVpcPeeringConnectionsInput, optFns ...func(*DescribeVpcPeeringConnectionsPaginatorOptions)) *DescribeVpcPeeringConnectionsPaginator { - if params == nil { - params = &DescribeVpcPeeringConnectionsInput{} - } - - options := DescribeVpcPeeringConnectionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcPeeringConnectionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcPeeringConnectionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcPeeringConnections page. -func (p *DescribeVpcPeeringConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcPeeringConnections(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // VpcPeeringConnectionDeletedWaiterOptions are waiter options for // VpcPeeringConnectionDeletedWaiter type VpcPeeringConnectionDeletedWaiterOptions struct { @@ -409,7 +315,13 @@ func (w *VpcPeeringConnectionDeletedWaiter) WaitForOutput(ctx context.Context, p } out, err := w.client.DescribeVpcPeeringConnections(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -613,7 +525,13 @@ func (w *VpcPeeringConnectionExistsWaiter) WaitForOutput(ctx context.Context, pa } out, err := w.client.DescribeVpcPeeringConnections(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -670,6 +588,106 @@ func vpcPeeringConnectionExistsStateRetryable(ctx context.Context, input *Descri return true, nil } +// DescribeVpcPeeringConnectionsPaginatorOptions is the paginator options for +// DescribeVpcPeeringConnections +type DescribeVpcPeeringConnectionsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeVpcPeeringConnectionsPaginator is a paginator for +// DescribeVpcPeeringConnections +type DescribeVpcPeeringConnectionsPaginator struct { + options DescribeVpcPeeringConnectionsPaginatorOptions + client DescribeVpcPeeringConnectionsAPIClient + params *DescribeVpcPeeringConnectionsInput + nextToken *string + firstPage bool +} + +// NewDescribeVpcPeeringConnectionsPaginator returns a new +// DescribeVpcPeeringConnectionsPaginator +func NewDescribeVpcPeeringConnectionsPaginator(client DescribeVpcPeeringConnectionsAPIClient, params *DescribeVpcPeeringConnectionsInput, optFns ...func(*DescribeVpcPeeringConnectionsPaginatorOptions)) *DescribeVpcPeeringConnectionsPaginator { + if params == nil { + params = &DescribeVpcPeeringConnectionsInput{} + } + + options := DescribeVpcPeeringConnectionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeVpcPeeringConnectionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeVpcPeeringConnectionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeVpcPeeringConnections page. +func (p *DescribeVpcPeeringConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeVpcPeeringConnections(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeVpcPeeringConnectionsAPIClient is a client that implements the +// DescribeVpcPeeringConnections operation. +type DescribeVpcPeeringConnectionsAPIClient interface { + DescribeVpcPeeringConnections(context.Context, *DescribeVpcPeeringConnectionsInput, ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) +} + +var _ DescribeVpcPeeringConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcPeeringConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpcs.go b/service/ec2/api_op_DescribeVpcs.go index 540f8c3e04a..86a0cda2cea 100644 --- a/service/ec2/api_op_DescribeVpcs.go +++ b/service/ec2/api_op_DescribeVpcs.go @@ -179,6 +179,9 @@ func (c *Client) addOperationDescribeVpcsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcs(options.Region), middleware.Before); err != nil { return err } @@ -200,99 +203,6 @@ func (c *Client) addOperationDescribeVpcsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeVpcsAPIClient is a client that implements the DescribeVpcs operation. -type DescribeVpcsAPIClient interface { - DescribeVpcs(context.Context, *DescribeVpcsInput, ...func(*Options)) (*DescribeVpcsOutput, error) -} - -var _ DescribeVpcsAPIClient = (*Client)(nil) - -// DescribeVpcsPaginatorOptions is the paginator options for DescribeVpcs -type DescribeVpcsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see [Pagination]. - // - // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcsPaginator is a paginator for DescribeVpcs -type DescribeVpcsPaginator struct { - options DescribeVpcsPaginatorOptions - client DescribeVpcsAPIClient - params *DescribeVpcsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcsPaginator returns a new DescribeVpcsPaginator -func NewDescribeVpcsPaginator(client DescribeVpcsAPIClient, params *DescribeVpcsInput, optFns ...func(*DescribeVpcsPaginatorOptions)) *DescribeVpcsPaginator { - if params == nil { - params = &DescribeVpcsInput{} - } - - options := DescribeVpcsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcs page. -func (p *DescribeVpcsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // VpcAvailableWaiterOptions are waiter options for VpcAvailableWaiter type VpcAvailableWaiterOptions struct { @@ -407,7 +317,13 @@ func (w *VpcAvailableWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeVpcs(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -594,7 +510,13 @@ func (w *VpcExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeVpc } out, err := w.client.DescribeVpcs(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -651,6 +573,102 @@ func vpcExistsStateRetryable(ctx context.Context, input *DescribeVpcsInput, outp return true, nil } +// DescribeVpcsPaginatorOptions is the paginator options for DescribeVpcs +type DescribeVpcsPaginatorOptions struct { + // The maximum number of items to return for this request. To get the next page of + // items, make another request with the token returned in the output. For more + // information, see [Pagination]. + // + // [Pagination]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeVpcsPaginator is a paginator for DescribeVpcs +type DescribeVpcsPaginator struct { + options DescribeVpcsPaginatorOptions + client DescribeVpcsAPIClient + params *DescribeVpcsInput + nextToken *string + firstPage bool +} + +// NewDescribeVpcsPaginator returns a new DescribeVpcsPaginator +func NewDescribeVpcsPaginator(client DescribeVpcsAPIClient, params *DescribeVpcsInput, optFns ...func(*DescribeVpcsPaginatorOptions)) *DescribeVpcsPaginator { + if params == nil { + params = &DescribeVpcsInput{} + } + + options := DescribeVpcsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeVpcsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeVpcsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeVpcs page. +func (p *DescribeVpcsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeVpcs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeVpcsAPIClient is a client that implements the DescribeVpcs operation. +type DescribeVpcsAPIClient interface { + DescribeVpcs(context.Context, *DescribeVpcsInput, ...func(*Options)) (*DescribeVpcsOutput, error) +} + +var _ DescribeVpcsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpcs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpnConnections.go b/service/ec2/api_op_DescribeVpnConnections.go index d816b6997c9..0615a33dd49 100644 --- a/service/ec2/api_op_DescribeVpnConnections.go +++ b/service/ec2/api_op_DescribeVpnConnections.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeVpnConnectionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpnConnections(options.Region), middleware.Before); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationDescribeVpnConnectionsMiddlewares(stack *middleware return nil } -// DescribeVpnConnectionsAPIClient is a client that implements the -// DescribeVpnConnections operation. -type DescribeVpnConnectionsAPIClient interface { - DescribeVpnConnections(context.Context, *DescribeVpnConnectionsInput, ...func(*Options)) (*DescribeVpnConnectionsOutput, error) -} - -var _ DescribeVpnConnectionsAPIClient = (*Client)(nil) - // VpnConnectionAvailableWaiterOptions are waiter options for // VpnConnectionAvailableWaiter type VpnConnectionAvailableWaiterOptions struct { @@ -309,7 +304,13 @@ func (w *VpnConnectionAvailableWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeVpnConnections(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -547,7 +548,13 @@ func (w *VpnConnectionDeletedWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeVpnConnections(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -644,6 +651,14 @@ func vpnConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpnC return true, nil } +// DescribeVpnConnectionsAPIClient is a client that implements the +// DescribeVpnConnections operation. +type DescribeVpnConnectionsAPIClient interface { + DescribeVpnConnections(context.Context, *DescribeVpnConnectionsInput, ...func(*Options)) (*DescribeVpnConnectionsOutput, error) +} + +var _ DescribeVpnConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_DescribeVpnGateways.go b/service/ec2/api_op_DescribeVpnGateways.go index 71dd60fe550..bb90349a4c5 100644 --- a/service/ec2/api_op_DescribeVpnGateways.go +++ b/service/ec2/api_op_DescribeVpnGateways.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeVpnGatewaysMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpnGateways(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DetachClassicLinkVpc.go b/service/ec2/api_op_DetachClassicLinkVpc.go index 54c63351c62..c82375facc3 100644 --- a/service/ec2/api_op_DetachClassicLinkVpc.go +++ b/service/ec2/api_op_DetachClassicLinkVpc.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDetachClassicLinkVpcMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachClassicLinkVpcValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DetachInternetGateway.go b/service/ec2/api_op_DetachInternetGateway.go index c8649541e63..a307ce611de 100644 --- a/service/ec2/api_op_DetachInternetGateway.go +++ b/service/ec2/api_op_DetachInternetGateway.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDetachInternetGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachInternetGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DetachNetworkInterface.go b/service/ec2/api_op_DetachNetworkInterface.go index c2d14d77c10..6bcd2b5d35e 100644 --- a/service/ec2/api_op_DetachNetworkInterface.go +++ b/service/ec2/api_op_DetachNetworkInterface.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDetachNetworkInterfaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachNetworkInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go b/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go index 7cfbedcc0ad..a219d9ebba9 100644 --- a/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDetachVerifiedAccessTrustProviderMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDetachVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_DetachVolume.go b/service/ec2/api_op_DetachVolume.go index ba85b170545..0dff90446a4 100644 --- a/service/ec2/api_op_DetachVolume.go +++ b/service/ec2/api_op_DetachVolume.go @@ -176,6 +176,9 @@ func (c *Client) addOperationDetachVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DetachVpnGateway.go b/service/ec2/api_op_DetachVpnGateway.go index 17c929df555..0e95d8c9bae 100644 --- a/service/ec2/api_op_DetachVpnGateway.go +++ b/service/ec2/api_op_DetachVpnGateway.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDetachVpnGatewayMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachVpnGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableAddressTransfer.go b/service/ec2/api_op_DisableAddressTransfer.go index 65d577b65e6..c51eab27ed6 100644 --- a/service/ec2/api_op_DisableAddressTransfer.go +++ b/service/ec2/api_op_DisableAddressTransfer.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisableAddressTransferMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableAddressTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go b/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go index 504b324d5de..161d2b66753 100644 --- a/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go +++ b/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisableAwsNetworkPerformanceMetricSubscriptionMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableAwsNetworkPerformanceMetricSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisableEbsEncryptionByDefault.go b/service/ec2/api_op_DisableEbsEncryptionByDefault.go index 4009a5761f7..ac833db3f36 100644 --- a/service/ec2/api_op_DisableEbsEncryptionByDefault.go +++ b/service/ec2/api_op_DisableEbsEncryptionByDefault.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisableEbsEncryptionByDefaultMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableEbsEncryptionByDefault(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisableFastLaunch.go b/service/ec2/api_op_DisableFastLaunch.go index 8c76d1fece0..a359c3f0c20 100644 --- a/service/ec2/api_op_DisableFastLaunch.go +++ b/service/ec2/api_op_DisableFastLaunch.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDisableFastLaunchMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableFastLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableFastSnapshotRestores.go b/service/ec2/api_op_DisableFastSnapshotRestores.go index f877e1bb9de..cbba202a86e 100644 --- a/service/ec2/api_op_DisableFastSnapshotRestores.go +++ b/service/ec2/api_op_DisableFastSnapshotRestores.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDisableFastSnapshotRestoresMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableFastSnapshotRestoresValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableImage.go b/service/ec2/api_op_DisableImage.go index a51fc1f6579..24be3c3e5f5 100644 --- a/service/ec2/api_op_DisableImage.go +++ b/service/ec2/api_op_DisableImage.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDisableImageMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableImageBlockPublicAccess.go b/service/ec2/api_op_DisableImageBlockPublicAccess.go index 3025b2ddf6d..a19bdfb98ea 100644 --- a/service/ec2/api_op_DisableImageBlockPublicAccess.go +++ b/service/ec2/api_op_DisableImageBlockPublicAccess.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDisableImageBlockPublicAccessMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableImageBlockPublicAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisableImageDeprecation.go b/service/ec2/api_op_DisableImageDeprecation.go index 622bc5db17f..c4e92708aed 100644 --- a/service/ec2/api_op_DisableImageDeprecation.go +++ b/service/ec2/api_op_DisableImageDeprecation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisableImageDeprecationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableImageDeprecationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableImageDeregistrationProtection.go b/service/ec2/api_op_DisableImageDeregistrationProtection.go index 02790f7244b..3f414720f84 100644 --- a/service/ec2/api_op_DisableImageDeregistrationProtection.go +++ b/service/ec2/api_op_DisableImageDeregistrationProtection.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDisableImageDeregistrationProtectionMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableImageDeregistrationProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go b/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go index c33dcee2aad..1d1120e1103 100644 --- a/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go +++ b/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisableIpamOrganizationAdminAccountMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableIpamOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableSerialConsoleAccess.go b/service/ec2/api_op_DisableSerialConsoleAccess.go index 62641be8672..d0c349e86ee 100644 --- a/service/ec2/api_op_DisableSerialConsoleAccess.go +++ b/service/ec2/api_op_DisableSerialConsoleAccess.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisableSerialConsoleAccessMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSerialConsoleAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go b/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go index 63d59a751ba..7a1f2ae1c55 100644 --- a/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go +++ b/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisableSnapshotBlockPublicAccessMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSnapshotBlockPublicAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go b/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go index 0d2dd84f72d..f67cb12f8da 100644 --- a/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go +++ b/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDisableTransitGatewayRouteTablePropagationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableTransitGatewayRouteTablePropagationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableVgwRoutePropagation.go b/service/ec2/api_op_DisableVgwRoutePropagation.go index a53c7a024eb..43c13b36041 100644 --- a/service/ec2/api_op_DisableVgwRoutePropagation.go +++ b/service/ec2/api_op_DisableVgwRoutePropagation.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisableVgwRoutePropagationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableVgwRoutePropagationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableVpcClassicLink.go b/service/ec2/api_op_DisableVpcClassicLink.go index b213c2b0ebe..4068dc21308 100644 --- a/service/ec2/api_op_DisableVpcClassicLink.go +++ b/service/ec2/api_op_DisableVpcClassicLink.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisableVpcClassicLinkMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableVpcClassicLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go b/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go index b3c906d9279..640f63fd086 100644 --- a/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go +++ b/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisableVpcClassicLinkDnsSupportMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableVpcClassicLinkDnsSupport(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateAddress.go b/service/ec2/api_op_DisassociateAddress.go index e63f3cc7c37..12e1d6b7f63 100644 --- a/service/ec2/api_op_DisassociateAddress.go +++ b/service/ec2/api_op_DisassociateAddress.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateAddressMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateAddress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go b/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go index 5390fb5675f..8178e25d693 100644 --- a/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go +++ b/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDisassociateClientVpnTargetNetworkMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateClientVpnTargetNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go b/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go index 6a8e9e9de1b..7e071479a42 100644 --- a/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go +++ b/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisassociateEnclaveCertificateIamRoleMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateEnclaveCertificateIamRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateIamInstanceProfile.go b/service/ec2/api_op_DisassociateIamInstanceProfile.go index 47213f7099f..ac52f79cf0e 100644 --- a/service/ec2/api_op_DisassociateIamInstanceProfile.go +++ b/service/ec2/api_op_DisassociateIamInstanceProfile.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisassociateIamInstanceProfileMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateIamInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateInstanceEventWindow.go b/service/ec2/api_op_DisassociateInstanceEventWindow.go index 92c88efa6a8..35edba4d302 100644 --- a/service/ec2/api_op_DisassociateInstanceEventWindow.go +++ b/service/ec2/api_op_DisassociateInstanceEventWindow.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisassociateInstanceEventWindowMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateInstanceEventWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateIpamByoasn.go b/service/ec2/api_op_DisassociateIpamByoasn.go index 10c0c335241..5664413bb34 100644 --- a/service/ec2/api_op_DisassociateIpamByoasn.go +++ b/service/ec2/api_op_DisassociateIpamByoasn.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDisassociateIpamByoasnMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateIpamByoasnValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateIpamResourceDiscovery.go b/service/ec2/api_op_DisassociateIpamResourceDiscovery.go index 29913841cf1..0c19996a825 100644 --- a/service/ec2/api_op_DisassociateIpamResourceDiscovery.go +++ b/service/ec2/api_op_DisassociateIpamResourceDiscovery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisassociateIpamResourceDiscoveryMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateIpamResourceDiscoveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateNatGatewayAddress.go b/service/ec2/api_op_DisassociateNatGatewayAddress.go index b7f35739b1e..9565dc407a0 100644 --- a/service/ec2/api_op_DisassociateNatGatewayAddress.go +++ b/service/ec2/api_op_DisassociateNatGatewayAddress.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDisassociateNatGatewayAddressMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateNatGatewayAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateRouteTable.go b/service/ec2/api_op_DisassociateRouteTable.go index 9ddc3ea30b8..1c9b8e208d6 100644 --- a/service/ec2/api_op_DisassociateRouteTable.go +++ b/service/ec2/api_op_DisassociateRouteTable.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisassociateRouteTableMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateSubnetCidrBlock.go b/service/ec2/api_op_DisassociateSubnetCidrBlock.go index f96ea91c372..2c6219b9495 100644 --- a/service/ec2/api_op_DisassociateSubnetCidrBlock.go +++ b/service/ec2/api_op_DisassociateSubnetCidrBlock.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateSubnetCidrBlockMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateSubnetCidrBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go b/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go index aef11897168..616a4bdb663 100644 --- a/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go +++ b/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDisassociateTransitGatewayMulticastDomainMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go b/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go index cfd2707e8bf..f0ec75c0a0f 100644 --- a/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go +++ b/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateTransitGatewayPolicyTableMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go b/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go index c44bd00dcd6..f22711422d2 100644 --- a/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go +++ b/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateTransitGatewayRouteTableMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTransitGatewayRouteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateTrunkInterface.go b/service/ec2/api_op_DisassociateTrunkInterface.go index 18ce1e787ae..1689feeb254 100644 --- a/service/ec2/api_op_DisassociateTrunkInterface.go +++ b/service/ec2/api_op_DisassociateTrunkInterface.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDisassociateTrunkInterfaceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateTrunkInterfaceMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_DisassociateVpcCidrBlock.go b/service/ec2/api_op_DisassociateVpcCidrBlock.go index 31be76e6cde..410494fa598 100644 --- a/service/ec2/api_op_DisassociateVpcCidrBlock.go +++ b/service/ec2/api_op_DisassociateVpcCidrBlock.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDisassociateVpcCidrBlockMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateVpcCidrBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableAddressTransfer.go b/service/ec2/api_op_EnableAddressTransfer.go index 5a088a43ae3..55d57403973 100644 --- a/service/ec2/api_op_EnableAddressTransfer.go +++ b/service/ec2/api_op_EnableAddressTransfer.go @@ -120,6 +120,9 @@ func (c *Client) addOperationEnableAddressTransferMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableAddressTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go b/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go index 88373843641..3763dcc115c 100644 --- a/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go +++ b/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go @@ -123,6 +123,9 @@ func (c *Client) addOperationEnableAwsNetworkPerformanceMetricSubscriptionMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAwsNetworkPerformanceMetricSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_EnableEbsEncryptionByDefault.go b/service/ec2/api_op_EnableEbsEncryptionByDefault.go index 7576027b745..c611a4d16aa 100644 --- a/service/ec2/api_op_EnableEbsEncryptionByDefault.go +++ b/service/ec2/api_op_EnableEbsEncryptionByDefault.go @@ -122,6 +122,9 @@ func (c *Client) addOperationEnableEbsEncryptionByDefaultMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableEbsEncryptionByDefault(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_EnableFastLaunch.go b/service/ec2/api_op_EnableFastLaunch.go index 42d0092bf3a..c34500a27f1 100644 --- a/service/ec2/api_op_EnableFastLaunch.go +++ b/service/ec2/api_op_EnableFastLaunch.go @@ -170,6 +170,9 @@ func (c *Client) addOperationEnableFastLaunchMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableFastLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableFastSnapshotRestores.go b/service/ec2/api_op_EnableFastSnapshotRestores.go index c7831020968..211a2817c09 100644 --- a/service/ec2/api_op_EnableFastSnapshotRestores.go +++ b/service/ec2/api_op_EnableFastSnapshotRestores.go @@ -133,6 +133,9 @@ func (c *Client) addOperationEnableFastSnapshotRestoresMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableFastSnapshotRestoresValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableImage.go b/service/ec2/api_op_EnableImage.go index 27984e269b0..1a1759bfb9e 100644 --- a/service/ec2/api_op_EnableImage.go +++ b/service/ec2/api_op_EnableImage.go @@ -121,6 +121,9 @@ func (c *Client) addOperationEnableImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableImageBlockPublicAccess.go b/service/ec2/api_op_EnableImageBlockPublicAccess.go index 37aad3f8550..7197aeaaa3b 100644 --- a/service/ec2/api_op_EnableImageBlockPublicAccess.go +++ b/service/ec2/api_op_EnableImageBlockPublicAccess.go @@ -126,6 +126,9 @@ func (c *Client) addOperationEnableImageBlockPublicAccessMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableImageBlockPublicAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableImageDeprecation.go b/service/ec2/api_op_EnableImageDeprecation.go index 35f91767cce..7af38b06b83 100644 --- a/service/ec2/api_op_EnableImageDeprecation.go +++ b/service/ec2/api_op_EnableImageDeprecation.go @@ -127,6 +127,9 @@ func (c *Client) addOperationEnableImageDeprecationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableImageDeprecationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableImageDeregistrationProtection.go b/service/ec2/api_op_EnableImageDeregistrationProtection.go index 6fcef7ac7be..f7221e7fd2b 100644 --- a/service/ec2/api_op_EnableImageDeregistrationProtection.go +++ b/service/ec2/api_op_EnableImageDeregistrationProtection.go @@ -123,6 +123,9 @@ func (c *Client) addOperationEnableImageDeregistrationProtectionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableImageDeregistrationProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go b/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go index ff897b307fe..66bda6d6fe3 100644 --- a/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go +++ b/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go @@ -115,6 +115,9 @@ func (c *Client) addOperationEnableIpamOrganizationAdminAccountMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableIpamOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go b/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go index 4a2cfee5911..108bd57f515 100644 --- a/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go +++ b/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go @@ -112,6 +112,9 @@ func (c *Client) addOperationEnableReachabilityAnalyzerOrganizationSharingMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableReachabilityAnalyzerOrganizationSharing(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_EnableSerialConsoleAccess.go b/service/ec2/api_op_EnableSerialConsoleAccess.go index 91b6973ab36..b6755625870 100644 --- a/service/ec2/api_op_EnableSerialConsoleAccess.go +++ b/service/ec2/api_op_EnableSerialConsoleAccess.go @@ -112,6 +112,9 @@ func (c *Client) addOperationEnableSerialConsoleAccessMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSerialConsoleAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go b/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go index 8b3ac09add7..4cd85874280 100644 --- a/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go +++ b/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go @@ -145,6 +145,9 @@ func (c *Client) addOperationEnableSnapshotBlockPublicAccessMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableSnapshotBlockPublicAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go b/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go index c753fc2176c..174a7e60572 100644 --- a/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go +++ b/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go @@ -119,6 +119,9 @@ func (c *Client) addOperationEnableTransitGatewayRouteTablePropagationMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableTransitGatewayRouteTablePropagationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableVgwRoutePropagation.go b/service/ec2/api_op_EnableVgwRoutePropagation.go index bf1dfa52d49..99fb2f96cb8 100644 --- a/service/ec2/api_op_EnableVgwRoutePropagation.go +++ b/service/ec2/api_op_EnableVgwRoutePropagation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationEnableVgwRoutePropagationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableVgwRoutePropagationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableVolumeIO.go b/service/ec2/api_op_EnableVolumeIO.go index a58b3f6d80a..6eb483a0f8e 100644 --- a/service/ec2/api_op_EnableVolumeIO.go +++ b/service/ec2/api_op_EnableVolumeIO.go @@ -108,6 +108,9 @@ func (c *Client) addOperationEnableVolumeIOMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableVolumeIOValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableVpcClassicLink.go b/service/ec2/api_op_EnableVpcClassicLink.go index 42d029c2cd4..efde66867d9 100644 --- a/service/ec2/api_op_EnableVpcClassicLink.go +++ b/service/ec2/api_op_EnableVpcClassicLink.go @@ -118,6 +118,9 @@ func (c *Client) addOperationEnableVpcClassicLinkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableVpcClassicLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go b/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go index afdbfc05a59..1837596861d 100644 --- a/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go +++ b/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go @@ -111,6 +111,9 @@ func (c *Client) addOperationEnableVpcClassicLinkDnsSupportMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVpcClassicLinkDnsSupport(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go b/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go index b2f1e331802..7e673a8fcd2 100644 --- a/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go +++ b/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go @@ -116,6 +116,9 @@ func (c *Client) addOperationExportClientVpnClientCertificateRevocationListMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportClientVpnClientCertificateRevocationListValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ExportClientVpnClientConfiguration.go b/service/ec2/api_op_ExportClientVpnClientConfiguration.go index 2cbd3cc0d22..ca70d299ac7 100644 --- a/service/ec2/api_op_ExportClientVpnClientConfiguration.go +++ b/service/ec2/api_op_ExportClientVpnClientConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationExportClientVpnClientConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportClientVpnClientConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ExportImage.go b/service/ec2/api_op_ExportImage.go index a436968f130..e9d9a0ee6d3 100644 --- a/service/ec2/api_op_ExportImage.go +++ b/service/ec2/api_op_ExportImage.go @@ -169,6 +169,9 @@ func (c *Client) addOperationExportImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExportImageMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ExportTransitGatewayRoutes.go b/service/ec2/api_op_ExportTransitGatewayRoutes.go index 8cb28e0c4a8..43244f75e0e 100644 --- a/service/ec2/api_op_ExportTransitGatewayRoutes.go +++ b/service/ec2/api_op_ExportTransitGatewayRoutes.go @@ -152,6 +152,9 @@ func (c *Client) addOperationExportTransitGatewayRoutesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportTransitGatewayRoutesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go b/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go index 88cb9e696d0..6b0a420e5b5 100644 --- a/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go +++ b/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetAssociatedEnclaveCertificateIamRolesMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssociatedEnclaveCertificateIamRolesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go b/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go index b284948e31c..f924af45322 100644 --- a/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go +++ b/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetAssociatedIpv6PoolCidrsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssociatedIpv6PoolCidrsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetAssociatedIpv6PoolCidrsMiddlewares(stack *middle return nil } -// GetAssociatedIpv6PoolCidrsAPIClient is a client that implements the -// GetAssociatedIpv6PoolCidrs operation. -type GetAssociatedIpv6PoolCidrsAPIClient interface { - GetAssociatedIpv6PoolCidrs(context.Context, *GetAssociatedIpv6PoolCidrsInput, ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error) -} - -var _ GetAssociatedIpv6PoolCidrsAPIClient = (*Client)(nil) - // GetAssociatedIpv6PoolCidrsPaginatorOptions is the paginator options for // GetAssociatedIpv6PoolCidrs type GetAssociatedIpv6PoolCidrsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *GetAssociatedIpv6PoolCidrsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAssociatedIpv6PoolCidrs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *GetAssociatedIpv6PoolCidrsPaginator) NextPage(ctx context.Context, optF return result, nil } +// GetAssociatedIpv6PoolCidrsAPIClient is a client that implements the +// GetAssociatedIpv6PoolCidrs operation. +type GetAssociatedIpv6PoolCidrsAPIClient interface { + GetAssociatedIpv6PoolCidrs(context.Context, *GetAssociatedIpv6PoolCidrsInput, ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error) +} + +var _ GetAssociatedIpv6PoolCidrsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAssociatedIpv6PoolCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetAwsNetworkPerformanceData.go b/service/ec2/api_op_GetAwsNetworkPerformanceData.go index e89850c8bef..a2cdf80b0e6 100644 --- a/service/ec2/api_op_GetAwsNetworkPerformanceData.go +++ b/service/ec2/api_op_GetAwsNetworkPerformanceData.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetAwsNetworkPerformanceDataMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAwsNetworkPerformanceData(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetAwsNetworkPerformanceDataMiddlewares(stack *midd return nil } -// GetAwsNetworkPerformanceDataAPIClient is a client that implements the -// GetAwsNetworkPerformanceData operation. -type GetAwsNetworkPerformanceDataAPIClient interface { - GetAwsNetworkPerformanceData(context.Context, *GetAwsNetworkPerformanceDataInput, ...func(*Options)) (*GetAwsNetworkPerformanceDataOutput, error) -} - -var _ GetAwsNetworkPerformanceDataAPIClient = (*Client)(nil) - // GetAwsNetworkPerformanceDataPaginatorOptions is the paginator options for // GetAwsNetworkPerformanceData type GetAwsNetworkPerformanceDataPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetAwsNetworkPerformanceDataPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAwsNetworkPerformanceData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetAwsNetworkPerformanceDataPaginator) NextPage(ctx context.Context, op return result, nil } +// GetAwsNetworkPerformanceDataAPIClient is a client that implements the +// GetAwsNetworkPerformanceData operation. +type GetAwsNetworkPerformanceDataAPIClient interface { + GetAwsNetworkPerformanceData(context.Context, *GetAwsNetworkPerformanceDataInput, ...func(*Options)) (*GetAwsNetworkPerformanceDataOutput, error) +} + +var _ GetAwsNetworkPerformanceDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAwsNetworkPerformanceData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetCapacityReservationUsage.go b/service/ec2/api_op_GetCapacityReservationUsage.go index 91aa91fad79..f6b7252b326 100644 --- a/service/ec2/api_op_GetCapacityReservationUsage.go +++ b/service/ec2/api_op_GetCapacityReservationUsage.go @@ -164,6 +164,9 @@ func (c *Client) addOperationGetCapacityReservationUsageMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCapacityReservationUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetCoipPoolUsage.go b/service/ec2/api_op_GetCoipPoolUsage.go index 34d77774c4e..f37258d9be9 100644 --- a/service/ec2/api_op_GetCoipPoolUsage.go +++ b/service/ec2/api_op_GetCoipPoolUsage.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetCoipPoolUsageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoipPoolUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetConsoleOutput.go b/service/ec2/api_op_GetConsoleOutput.go index 0a581326a0f..cf44268611e 100644 --- a/service/ec2/api_op_GetConsoleOutput.go +++ b/service/ec2/api_op_GetConsoleOutput.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetConsoleOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConsoleOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetConsoleScreenshot.go b/service/ec2/api_op_GetConsoleScreenshot.go index 0d208089430..de02a232b02 100644 --- a/service/ec2/api_op_GetConsoleScreenshot.go +++ b/service/ec2/api_op_GetConsoleScreenshot.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetConsoleScreenshotMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConsoleScreenshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetDefaultCreditSpecification.go b/service/ec2/api_op_GetDefaultCreditSpecification.go index 0d85ac4b28b..95446261eef 100644 --- a/service/ec2/api_op_GetDefaultCreditSpecification.go +++ b/service/ec2/api_op_GetDefaultCreditSpecification.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDefaultCreditSpecificationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDefaultCreditSpecificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetEbsDefaultKmsKeyId.go b/service/ec2/api_op_GetEbsDefaultKmsKeyId.go index b45825c0a62..4ea16f25cba 100644 --- a/service/ec2/api_op_GetEbsDefaultKmsKeyId.go +++ b/service/ec2/api_op_GetEbsDefaultKmsKeyId.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetEbsDefaultKmsKeyIdMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEbsDefaultKmsKeyId(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_GetEbsEncryptionByDefault.go b/service/ec2/api_op_GetEbsEncryptionByDefault.go index 5e6e584b72d..2bd746be162 100644 --- a/service/ec2/api_op_GetEbsEncryptionByDefault.go +++ b/service/ec2/api_op_GetEbsEncryptionByDefault.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetEbsEncryptionByDefaultMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEbsEncryptionByDefault(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go b/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go index b87851d69b5..27d399c1b05 100644 --- a/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go +++ b/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetFlowLogsIntegrationTemplateMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFlowLogsIntegrationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetGroupsForCapacityReservation.go b/service/ec2/api_op_GetGroupsForCapacityReservation.go index d8c30e12fda..820a08562df 100644 --- a/service/ec2/api_op_GetGroupsForCapacityReservation.go +++ b/service/ec2/api_op_GetGroupsForCapacityReservation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetGroupsForCapacityReservationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupsForCapacityReservationValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationGetGroupsForCapacityReservationMiddlewares(stack *m return nil } -// GetGroupsForCapacityReservationAPIClient is a client that implements the -// GetGroupsForCapacityReservation operation. -type GetGroupsForCapacityReservationAPIClient interface { - GetGroupsForCapacityReservation(context.Context, *GetGroupsForCapacityReservationInput, ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error) -} - -var _ GetGroupsForCapacityReservationAPIClient = (*Client)(nil) - // GetGroupsForCapacityReservationPaginatorOptions is the paginator options for // GetGroupsForCapacityReservation type GetGroupsForCapacityReservationPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *GetGroupsForCapacityReservationPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetGroupsForCapacityReservation(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *GetGroupsForCapacityReservationPaginator) NextPage(ctx context.Context, return result, nil } +// GetGroupsForCapacityReservationAPIClient is a client that implements the +// GetGroupsForCapacityReservation operation. +type GetGroupsForCapacityReservationAPIClient interface { + GetGroupsForCapacityReservation(context.Context, *GetGroupsForCapacityReservationInput, ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error) +} + +var _ GetGroupsForCapacityReservationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetGroupsForCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetHostReservationPurchasePreview.go b/service/ec2/api_op_GetHostReservationPurchasePreview.go index 9db613da57f..0996c6d4e6a 100644 --- a/service/ec2/api_op_GetHostReservationPurchasePreview.go +++ b/service/ec2/api_op_GetHostReservationPurchasePreview.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetHostReservationPurchasePreviewMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostReservationPurchasePreviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetImageBlockPublicAccessState.go b/service/ec2/api_op_GetImageBlockPublicAccessState.go index 040a7731f27..4bcc3fbd6d4 100644 --- a/service/ec2/api_op_GetImageBlockPublicAccessState.go +++ b/service/ec2/api_op_GetImageBlockPublicAccessState.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetImageBlockPublicAccessStateMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImageBlockPublicAccessState(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_GetInstanceMetadataDefaults.go b/service/ec2/api_op_GetInstanceMetadataDefaults.go index f279701df62..9e0ee456985 100644 --- a/service/ec2/api_op_GetInstanceMetadataDefaults.go +++ b/service/ec2/api_op_GetInstanceMetadataDefaults.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetInstanceMetadataDefaultsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstanceMetadataDefaults(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_GetInstanceTpmEkPub.go b/service/ec2/api_op_GetInstanceTpmEkPub.go index 3348def7319..0e5d3e936d6 100644 --- a/service/ec2/api_op_GetInstanceTpmEkPub.go +++ b/service/ec2/api_op_GetInstanceTpmEkPub.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetInstanceTpmEkPubMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceTpmEkPubValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go b/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go index 59f68506e43..7f77ef454bb 100644 --- a/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go +++ b/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetInstanceTypesFromInstanceRequirementsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceTypesFromInstanceRequirementsValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationGetInstanceTypesFromInstanceRequirementsMiddlewares return nil } -// GetInstanceTypesFromInstanceRequirementsAPIClient is a client that implements -// the GetInstanceTypesFromInstanceRequirements operation. -type GetInstanceTypesFromInstanceRequirementsAPIClient interface { - GetInstanceTypesFromInstanceRequirements(context.Context, *GetInstanceTypesFromInstanceRequirementsInput, ...func(*Options)) (*GetInstanceTypesFromInstanceRequirementsOutput, error) -} - -var _ GetInstanceTypesFromInstanceRequirementsAPIClient = (*Client)(nil) - // GetInstanceTypesFromInstanceRequirementsPaginatorOptions is the paginator // options for GetInstanceTypesFromInstanceRequirements type GetInstanceTypesFromInstanceRequirementsPaginatorOptions struct { @@ -254,6 +249,9 @@ func (p *GetInstanceTypesFromInstanceRequirementsPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInstanceTypesFromInstanceRequirements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +271,14 @@ func (p *GetInstanceTypesFromInstanceRequirementsPaginator) NextPage(ctx context return result, nil } +// GetInstanceTypesFromInstanceRequirementsAPIClient is a client that implements +// the GetInstanceTypesFromInstanceRequirements operation. +type GetInstanceTypesFromInstanceRequirementsAPIClient interface { + GetInstanceTypesFromInstanceRequirements(context.Context, *GetInstanceTypesFromInstanceRequirementsInput, ...func(*Options)) (*GetInstanceTypesFromInstanceRequirementsOutput, error) +} + +var _ GetInstanceTypesFromInstanceRequirementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInstanceTypesFromInstanceRequirements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetInstanceUefiData.go b/service/ec2/api_op_GetInstanceUefiData.go index f740c74ac82..7b59321bf25 100644 --- a/service/ec2/api_op_GetInstanceUefiData.go +++ b/service/ec2/api_op_GetInstanceUefiData.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetInstanceUefiDataMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceUefiDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetIpamAddressHistory.go b/service/ec2/api_op_GetIpamAddressHistory.go index 3781510b54b..ef9a577dd23 100644 --- a/service/ec2/api_op_GetIpamAddressHistory.go +++ b/service/ec2/api_op_GetIpamAddressHistory.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetIpamAddressHistoryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamAddressHistoryValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationGetIpamAddressHistoryMiddlewares(stack *middleware. return nil } -// GetIpamAddressHistoryAPIClient is a client that implements the -// GetIpamAddressHistory operation. -type GetIpamAddressHistoryAPIClient interface { - GetIpamAddressHistory(context.Context, *GetIpamAddressHistoryInput, ...func(*Options)) (*GetIpamAddressHistoryOutput, error) -} - -var _ GetIpamAddressHistoryAPIClient = (*Client)(nil) - // GetIpamAddressHistoryPaginatorOptions is the paginator options for // GetIpamAddressHistory type GetIpamAddressHistoryPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *GetIpamAddressHistoryPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIpamAddressHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *GetIpamAddressHistoryPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// GetIpamAddressHistoryAPIClient is a client that implements the +// GetIpamAddressHistory operation. +type GetIpamAddressHistoryAPIClient interface { + GetIpamAddressHistory(context.Context, *GetIpamAddressHistoryInput, ...func(*Options)) (*GetIpamAddressHistoryOutput, error) +} + +var _ GetIpamAddressHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIpamAddressHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetIpamDiscoveredAccounts.go b/service/ec2/api_op_GetIpamDiscoveredAccounts.go index 95a16beef1f..aa31b89e1b4 100644 --- a/service/ec2/api_op_GetIpamDiscoveredAccounts.go +++ b/service/ec2/api_op_GetIpamDiscoveredAccounts.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetIpamDiscoveredAccountsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamDiscoveredAccountsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationGetIpamDiscoveredAccountsMiddlewares(stack *middlew return nil } -// GetIpamDiscoveredAccountsAPIClient is a client that implements the -// GetIpamDiscoveredAccounts operation. -type GetIpamDiscoveredAccountsAPIClient interface { - GetIpamDiscoveredAccounts(context.Context, *GetIpamDiscoveredAccountsInput, ...func(*Options)) (*GetIpamDiscoveredAccountsOutput, error) -} - -var _ GetIpamDiscoveredAccountsAPIClient = (*Client)(nil) - // GetIpamDiscoveredAccountsPaginatorOptions is the paginator options for // GetIpamDiscoveredAccounts type GetIpamDiscoveredAccountsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *GetIpamDiscoveredAccountsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIpamDiscoveredAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *GetIpamDiscoveredAccountsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// GetIpamDiscoveredAccountsAPIClient is a client that implements the +// GetIpamDiscoveredAccounts operation. +type GetIpamDiscoveredAccountsAPIClient interface { + GetIpamDiscoveredAccounts(context.Context, *GetIpamDiscoveredAccountsInput, ...func(*Options)) (*GetIpamDiscoveredAccountsOutput, error) +} + +var _ GetIpamDiscoveredAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIpamDiscoveredAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go b/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go index 7ca724918ab..d963154adf3 100644 --- a/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go +++ b/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetIpamDiscoveredPublicAddressesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamDiscoveredPublicAddressesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go b/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go index aa9fb176f79..cb1461cbc3f 100644 --- a/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go +++ b/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetIpamDiscoveredResourceCidrsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamDiscoveredResourceCidrsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationGetIpamDiscoveredResourceCidrsMiddlewares(stack *mi return nil } -// GetIpamDiscoveredResourceCidrsAPIClient is a client that implements the -// GetIpamDiscoveredResourceCidrs operation. -type GetIpamDiscoveredResourceCidrsAPIClient interface { - GetIpamDiscoveredResourceCidrs(context.Context, *GetIpamDiscoveredResourceCidrsInput, ...func(*Options)) (*GetIpamDiscoveredResourceCidrsOutput, error) -} - -var _ GetIpamDiscoveredResourceCidrsAPIClient = (*Client)(nil) - // GetIpamDiscoveredResourceCidrsPaginatorOptions is the paginator options for // GetIpamDiscoveredResourceCidrs type GetIpamDiscoveredResourceCidrsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *GetIpamDiscoveredResourceCidrsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIpamDiscoveredResourceCidrs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *GetIpamDiscoveredResourceCidrsPaginator) NextPage(ctx context.Context, return result, nil } +// GetIpamDiscoveredResourceCidrsAPIClient is a client that implements the +// GetIpamDiscoveredResourceCidrs operation. +type GetIpamDiscoveredResourceCidrsAPIClient interface { + GetIpamDiscoveredResourceCidrs(context.Context, *GetIpamDiscoveredResourceCidrsInput, ...func(*Options)) (*GetIpamDiscoveredResourceCidrsOutput, error) +} + +var _ GetIpamDiscoveredResourceCidrsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIpamDiscoveredResourceCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetIpamPoolAllocations.go b/service/ec2/api_op_GetIpamPoolAllocations.go index a89f415214c..8402ef1f376 100644 --- a/service/ec2/api_op_GetIpamPoolAllocations.go +++ b/service/ec2/api_op_GetIpamPoolAllocations.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetIpamPoolAllocationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamPoolAllocationsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationGetIpamPoolAllocationsMiddlewares(stack *middleware return nil } -// GetIpamPoolAllocationsAPIClient is a client that implements the -// GetIpamPoolAllocations operation. -type GetIpamPoolAllocationsAPIClient interface { - GetIpamPoolAllocations(context.Context, *GetIpamPoolAllocationsInput, ...func(*Options)) (*GetIpamPoolAllocationsOutput, error) -} - -var _ GetIpamPoolAllocationsAPIClient = (*Client)(nil) - // GetIpamPoolAllocationsPaginatorOptions is the paginator options for // GetIpamPoolAllocations type GetIpamPoolAllocationsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *GetIpamPoolAllocationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIpamPoolAllocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *GetIpamPoolAllocationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// GetIpamPoolAllocationsAPIClient is a client that implements the +// GetIpamPoolAllocations operation. +type GetIpamPoolAllocationsAPIClient interface { + GetIpamPoolAllocations(context.Context, *GetIpamPoolAllocationsInput, ...func(*Options)) (*GetIpamPoolAllocationsOutput, error) +} + +var _ GetIpamPoolAllocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIpamPoolAllocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetIpamPoolCidrs.go b/service/ec2/api_op_GetIpamPoolCidrs.go index e30444741c1..5293943cdf1 100644 --- a/service/ec2/api_op_GetIpamPoolCidrs.go +++ b/service/ec2/api_op_GetIpamPoolCidrs.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetIpamPoolCidrsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamPoolCidrsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetIpamPoolCidrsMiddlewares(stack *middleware.Stack return nil } -// GetIpamPoolCidrsAPIClient is a client that implements the GetIpamPoolCidrs -// operation. -type GetIpamPoolCidrsAPIClient interface { - GetIpamPoolCidrs(context.Context, *GetIpamPoolCidrsInput, ...func(*Options)) (*GetIpamPoolCidrsOutput, error) -} - -var _ GetIpamPoolCidrsAPIClient = (*Client)(nil) - // GetIpamPoolCidrsPaginatorOptions is the paginator options for GetIpamPoolCidrs type GetIpamPoolCidrsPaginatorOptions struct { // The maximum number of results to return in the request. @@ -222,6 +217,9 @@ func (p *GetIpamPoolCidrsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIpamPoolCidrs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetIpamPoolCidrsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetIpamPoolCidrsAPIClient is a client that implements the GetIpamPoolCidrs +// operation. +type GetIpamPoolCidrsAPIClient interface { + GetIpamPoolCidrs(context.Context, *GetIpamPoolCidrsInput, ...func(*Options)) (*GetIpamPoolCidrsOutput, error) +} + +var _ GetIpamPoolCidrsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIpamPoolCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetIpamResourceCidrs.go b/service/ec2/api_op_GetIpamResourceCidrs.go index 8eedbbd24a7..5c725890da0 100644 --- a/service/ec2/api_op_GetIpamResourceCidrs.go +++ b/service/ec2/api_op_GetIpamResourceCidrs.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetIpamResourceCidrsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpamResourceCidrsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationGetIpamResourceCidrsMiddlewares(stack *middleware.S return nil } -// GetIpamResourceCidrsAPIClient is a client that implements the -// GetIpamResourceCidrs operation. -type GetIpamResourceCidrsAPIClient interface { - GetIpamResourceCidrs(context.Context, *GetIpamResourceCidrsInput, ...func(*Options)) (*GetIpamResourceCidrsOutput, error) -} - -var _ GetIpamResourceCidrsAPIClient = (*Client)(nil) - // GetIpamResourceCidrsPaginatorOptions is the paginator options for // GetIpamResourceCidrs type GetIpamResourceCidrsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *GetIpamResourceCidrsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIpamResourceCidrs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *GetIpamResourceCidrsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// GetIpamResourceCidrsAPIClient is a client that implements the +// GetIpamResourceCidrs operation. +type GetIpamResourceCidrsAPIClient interface { + GetIpamResourceCidrs(context.Context, *GetIpamResourceCidrsInput, ...func(*Options)) (*GetIpamResourceCidrsOutput, error) +} + +var _ GetIpamResourceCidrsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIpamResourceCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetLaunchTemplateData.go b/service/ec2/api_op_GetLaunchTemplateData.go index fca9ba03ca0..5c159043832 100644 --- a/service/ec2/api_op_GetLaunchTemplateData.go +++ b/service/ec2/api_op_GetLaunchTemplateData.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetLaunchTemplateDataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchTemplateDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetManagedPrefixListAssociations.go b/service/ec2/api_op_GetManagedPrefixListAssociations.go index 4f7ac7b3a3f..6c7a63491de 100644 --- a/service/ec2/api_op_GetManagedPrefixListAssociations.go +++ b/service/ec2/api_op_GetManagedPrefixListAssociations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetManagedPrefixListAssociationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetManagedPrefixListAssociationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetManagedPrefixListAssociationsMiddlewares(stack * return nil } -// GetManagedPrefixListAssociationsAPIClient is a client that implements the -// GetManagedPrefixListAssociations operation. -type GetManagedPrefixListAssociationsAPIClient interface { - GetManagedPrefixListAssociations(context.Context, *GetManagedPrefixListAssociationsInput, ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error) -} - -var _ GetManagedPrefixListAssociationsAPIClient = (*Client)(nil) - // GetManagedPrefixListAssociationsPaginatorOptions is the paginator options for // GetManagedPrefixListAssociations type GetManagedPrefixListAssociationsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *GetManagedPrefixListAssociationsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetManagedPrefixListAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *GetManagedPrefixListAssociationsPaginator) NextPage(ctx context.Context return result, nil } +// GetManagedPrefixListAssociationsAPIClient is a client that implements the +// GetManagedPrefixListAssociations operation. +type GetManagedPrefixListAssociationsAPIClient interface { + GetManagedPrefixListAssociations(context.Context, *GetManagedPrefixListAssociationsInput, ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error) +} + +var _ GetManagedPrefixListAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetManagedPrefixListAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetManagedPrefixListEntries.go b/service/ec2/api_op_GetManagedPrefixListEntries.go index a4cfdcc2c22..60d213b6856 100644 --- a/service/ec2/api_op_GetManagedPrefixListEntries.go +++ b/service/ec2/api_op_GetManagedPrefixListEntries.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetManagedPrefixListEntriesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetManagedPrefixListEntriesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetManagedPrefixListEntriesMiddlewares(stack *middl return nil } -// GetManagedPrefixListEntriesAPIClient is a client that implements the -// GetManagedPrefixListEntries operation. -type GetManagedPrefixListEntriesAPIClient interface { - GetManagedPrefixListEntries(context.Context, *GetManagedPrefixListEntriesInput, ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error) -} - -var _ GetManagedPrefixListEntriesAPIClient = (*Client)(nil) - // GetManagedPrefixListEntriesPaginatorOptions is the paginator options for // GetManagedPrefixListEntries type GetManagedPrefixListEntriesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetManagedPrefixListEntriesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetManagedPrefixListEntries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetManagedPrefixListEntriesPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetManagedPrefixListEntriesAPIClient is a client that implements the +// GetManagedPrefixListEntries operation. +type GetManagedPrefixListEntriesAPIClient interface { + GetManagedPrefixListEntries(context.Context, *GetManagedPrefixListEntriesInput, ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error) +} + +var _ GetManagedPrefixListEntriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetManagedPrefixListEntries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go b/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go index 0b645b9085c..bd3c47059b2 100644 --- a/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go +++ b/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetNetworkInsightsAccessScopeAnalysisFindingsMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkInsightsAccessScopeAnalysisFindingsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationGetNetworkInsightsAccessScopeAnalysisFindingsMiddle return nil } -// GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient is a client that -// implements the GetNetworkInsightsAccessScopeAnalysisFindings operation. -type GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient interface { - GetNetworkInsightsAccessScopeAnalysisFindings(context.Context, *GetNetworkInsightsAccessScopeAnalysisFindingsInput, ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, error) -} - -var _ GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient = (*Client)(nil) - // GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions is the paginator // options for GetNetworkInsightsAccessScopeAnalysisFindings type GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator) NextPage(ctx co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetNetworkInsightsAccessScopeAnalysisFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator) NextPage(ctx co return result, nil } +// GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient is a client that +// implements the GetNetworkInsightsAccessScopeAnalysisFindings operation. +type GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient interface { + GetNetworkInsightsAccessScopeAnalysisFindings(context.Context, *GetNetworkInsightsAccessScopeAnalysisFindingsInput, ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, error) +} + +var _ GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetNetworkInsightsAccessScopeAnalysisFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go b/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go index 10789146926..6d23de3936b 100644 --- a/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go +++ b/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetNetworkInsightsAccessScopeContentMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkInsightsAccessScopeContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetPasswordData.go b/service/ec2/api_op_GetPasswordData.go index 158c3448d1e..7d296b07f04 100644 --- a/service/ec2/api_op_GetPasswordData.go +++ b/service/ec2/api_op_GetPasswordData.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetPasswordDataMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPasswordDataValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationGetPasswordDataMiddlewares(stack *middleware.Stack, return nil } -// GetPasswordDataAPIClient is a client that implements the GetPasswordData -// operation. -type GetPasswordDataAPIClient interface { - GetPasswordData(context.Context, *GetPasswordDataInput, ...func(*Options)) (*GetPasswordDataOutput, error) -} - -var _ GetPasswordDataAPIClient = (*Client)(nil) - // PasswordDataAvailableWaiterOptions are waiter options for // PasswordDataAvailableWaiter type PasswordDataAvailableWaiterOptions struct { @@ -291,7 +286,13 @@ func (w *PasswordDataAvailableWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetPasswordData(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -353,6 +354,14 @@ func passwordDataAvailableStateRetryable(ctx context.Context, input *GetPassword return true, nil } +// GetPasswordDataAPIClient is a client that implements the GetPasswordData +// operation. +type GetPasswordDataAPIClient interface { + GetPasswordData(context.Context, *GetPasswordDataInput, ...func(*Options)) (*GetPasswordDataOutput, error) +} + +var _ GetPasswordDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPasswordData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetReservedInstancesExchangeQuote.go b/service/ec2/api_op_GetReservedInstancesExchangeQuote.go index 1b14b224cbc..8bb57c4e44b 100644 --- a/service/ec2/api_op_GetReservedInstancesExchangeQuote.go +++ b/service/ec2/api_op_GetReservedInstancesExchangeQuote.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetReservedInstancesExchangeQuoteMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReservedInstancesExchangeQuoteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetSecurityGroupsForVpc.go b/service/ec2/api_op_GetSecurityGroupsForVpc.go index 90c218ab5bd..f8fac567e72 100644 --- a/service/ec2/api_op_GetSecurityGroupsForVpc.go +++ b/service/ec2/api_op_GetSecurityGroupsForVpc.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetSecurityGroupsForVpcMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSecurityGroupsForVpcValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationGetSecurityGroupsForVpcMiddlewares(stack *middlewar return nil } -// GetSecurityGroupsForVpcAPIClient is a client that implements the -// GetSecurityGroupsForVpc operation. -type GetSecurityGroupsForVpcAPIClient interface { - GetSecurityGroupsForVpc(context.Context, *GetSecurityGroupsForVpcInput, ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) -} - -var _ GetSecurityGroupsForVpcAPIClient = (*Client)(nil) - // GetSecurityGroupsForVpcPaginatorOptions is the paginator options for // GetSecurityGroupsForVpc type GetSecurityGroupsForVpcPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *GetSecurityGroupsForVpcPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSecurityGroupsForVpc(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *GetSecurityGroupsForVpcPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetSecurityGroupsForVpcAPIClient is a client that implements the +// GetSecurityGroupsForVpc operation. +type GetSecurityGroupsForVpcAPIClient interface { + GetSecurityGroupsForVpc(context.Context, *GetSecurityGroupsForVpcInput, ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) +} + +var _ GetSecurityGroupsForVpcAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSecurityGroupsForVpc(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetSerialConsoleAccessStatus.go b/service/ec2/api_op_GetSerialConsoleAccessStatus.go index 727d22773e2..62f4e1dcfc4 100644 --- a/service/ec2/api_op_GetSerialConsoleAccessStatus.go +++ b/service/ec2/api_op_GetSerialConsoleAccessStatus.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetSerialConsoleAccessStatusMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSerialConsoleAccessStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go b/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go index 17d445649ba..c4d326546c8 100644 --- a/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go +++ b/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetSnapshotBlockPublicAccessStateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSnapshotBlockPublicAccessState(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_GetSpotPlacementScores.go b/service/ec2/api_op_GetSpotPlacementScores.go index ec3af981824..71a0f8e70c5 100644 --- a/service/ec2/api_op_GetSpotPlacementScores.go +++ b/service/ec2/api_op_GetSpotPlacementScores.go @@ -184,6 +184,9 @@ func (c *Client) addOperationGetSpotPlacementScoresMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSpotPlacementScoresValidationMiddleware(stack); err != nil { return err } @@ -208,14 +211,6 @@ func (c *Client) addOperationGetSpotPlacementScoresMiddlewares(stack *middleware return nil } -// GetSpotPlacementScoresAPIClient is a client that implements the -// GetSpotPlacementScores operation. -type GetSpotPlacementScoresAPIClient interface { - GetSpotPlacementScores(context.Context, *GetSpotPlacementScoresInput, ...func(*Options)) (*GetSpotPlacementScoresOutput, error) -} - -var _ GetSpotPlacementScoresAPIClient = (*Client)(nil) - // GetSpotPlacementScoresPaginatorOptions is the paginator options for // GetSpotPlacementScores type GetSpotPlacementScoresPaginatorOptions struct { @@ -284,6 +279,9 @@ func (p *GetSpotPlacementScoresPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSpotPlacementScores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -303,6 +301,14 @@ func (p *GetSpotPlacementScoresPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// GetSpotPlacementScoresAPIClient is a client that implements the +// GetSpotPlacementScores operation. +type GetSpotPlacementScoresAPIClient interface { + GetSpotPlacementScores(context.Context, *GetSpotPlacementScoresInput, ...func(*Options)) (*GetSpotPlacementScoresOutput, error) +} + +var _ GetSpotPlacementScoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSpotPlacementScores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetSubnetCidrReservations.go b/service/ec2/api_op_GetSubnetCidrReservations.go index c7d07359e88..4d6c6508e2a 100644 --- a/service/ec2/api_op_GetSubnetCidrReservations.go +++ b/service/ec2/api_op_GetSubnetCidrReservations.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetSubnetCidrReservationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubnetCidrReservationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go b/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go index 0eadaa11e35..60bcb2b8057 100644 --- a/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go +++ b/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetTransitGatewayAttachmentPropagationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayAttachmentPropagationsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationGetTransitGatewayAttachmentPropagationsMiddlewares( return nil } -// GetTransitGatewayAttachmentPropagationsAPIClient is a client that implements -// the GetTransitGatewayAttachmentPropagations operation. -type GetTransitGatewayAttachmentPropagationsAPIClient interface { - GetTransitGatewayAttachmentPropagations(context.Context, *GetTransitGatewayAttachmentPropagationsInput, ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error) -} - -var _ GetTransitGatewayAttachmentPropagationsAPIClient = (*Client)(nil) - // GetTransitGatewayAttachmentPropagationsPaginatorOptions is the paginator // options for GetTransitGatewayAttachmentPropagations type GetTransitGatewayAttachmentPropagationsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *GetTransitGatewayAttachmentPropagationsPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayAttachmentPropagations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *GetTransitGatewayAttachmentPropagationsPaginator) NextPage(ctx context. return result, nil } +// GetTransitGatewayAttachmentPropagationsAPIClient is a client that implements +// the GetTransitGatewayAttachmentPropagations operation. +type GetTransitGatewayAttachmentPropagationsAPIClient interface { + GetTransitGatewayAttachmentPropagations(context.Context, *GetTransitGatewayAttachmentPropagationsInput, ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error) +} + +var _ GetTransitGatewayAttachmentPropagationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayAttachmentPropagations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go b/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go index 8c2b10b5b9f..94c3ad0e12f 100644 --- a/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go +++ b/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetTransitGatewayMulticastDomainAssociationsMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayMulticastDomainAssociationsValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationGetTransitGatewayMulticastDomainAssociationsMiddlew return nil } -// GetTransitGatewayMulticastDomainAssociationsAPIClient is a client that -// implements the GetTransitGatewayMulticastDomainAssociations operation. -type GetTransitGatewayMulticastDomainAssociationsAPIClient interface { - GetTransitGatewayMulticastDomainAssociations(context.Context, *GetTransitGatewayMulticastDomainAssociationsInput, ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error) -} - -var _ GetTransitGatewayMulticastDomainAssociationsAPIClient = (*Client)(nil) - // GetTransitGatewayMulticastDomainAssociationsPaginatorOptions is the paginator // options for GetTransitGatewayMulticastDomainAssociations type GetTransitGatewayMulticastDomainAssociationsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) NextPage(ctx con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayMulticastDomainAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) NextPage(ctx con return result, nil } +// GetTransitGatewayMulticastDomainAssociationsAPIClient is a client that +// implements the GetTransitGatewayMulticastDomainAssociations operation. +type GetTransitGatewayMulticastDomainAssociationsAPIClient interface { + GetTransitGatewayMulticastDomainAssociations(context.Context, *GetTransitGatewayMulticastDomainAssociationsInput, ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error) +} + +var _ GetTransitGatewayMulticastDomainAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go b/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go index 8f553c81533..4468592f88e 100644 --- a/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go +++ b/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetTransitGatewayPolicyTableAssociationsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayPolicyTableAssociationsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetTransitGatewayPolicyTableAssociationsMiddlewares return nil } -// GetTransitGatewayPolicyTableAssociationsAPIClient is a client that implements -// the GetTransitGatewayPolicyTableAssociations operation. -type GetTransitGatewayPolicyTableAssociationsAPIClient interface { - GetTransitGatewayPolicyTableAssociations(context.Context, *GetTransitGatewayPolicyTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayPolicyTableAssociationsOutput, error) -} - -var _ GetTransitGatewayPolicyTableAssociationsAPIClient = (*Client)(nil) - // GetTransitGatewayPolicyTableAssociationsPaginatorOptions is the paginator // options for GetTransitGatewayPolicyTableAssociations type GetTransitGatewayPolicyTableAssociationsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *GetTransitGatewayPolicyTableAssociationsPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayPolicyTableAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *GetTransitGatewayPolicyTableAssociationsPaginator) NextPage(ctx context return result, nil } +// GetTransitGatewayPolicyTableAssociationsAPIClient is a client that implements +// the GetTransitGatewayPolicyTableAssociations operation. +type GetTransitGatewayPolicyTableAssociationsAPIClient interface { + GetTransitGatewayPolicyTableAssociations(context.Context, *GetTransitGatewayPolicyTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayPolicyTableAssociationsOutput, error) +} + +var _ GetTransitGatewayPolicyTableAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayPolicyTableAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go b/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go index 2a794b0dfea..9b944b7596d 100644 --- a/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go +++ b/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetTransitGatewayPolicyTableEntriesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayPolicyTableEntriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go b/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go index f1537e798cd..dc27f45c9e1 100644 --- a/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go +++ b/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetTransitGatewayPrefixListReferencesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayPrefixListReferencesValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationGetTransitGatewayPrefixListReferencesMiddlewares(st return nil } -// GetTransitGatewayPrefixListReferencesAPIClient is a client that implements the -// GetTransitGatewayPrefixListReferences operation. -type GetTransitGatewayPrefixListReferencesAPIClient interface { - GetTransitGatewayPrefixListReferences(context.Context, *GetTransitGatewayPrefixListReferencesInput, ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error) -} - -var _ GetTransitGatewayPrefixListReferencesAPIClient = (*Client)(nil) - // GetTransitGatewayPrefixListReferencesPaginatorOptions is the paginator options // for GetTransitGatewayPrefixListReferences type GetTransitGatewayPrefixListReferencesPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *GetTransitGatewayPrefixListReferencesPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayPrefixListReferences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *GetTransitGatewayPrefixListReferencesPaginator) NextPage(ctx context.Co return result, nil } +// GetTransitGatewayPrefixListReferencesAPIClient is a client that implements the +// GetTransitGatewayPrefixListReferences operation. +type GetTransitGatewayPrefixListReferencesAPIClient interface { + GetTransitGatewayPrefixListReferences(context.Context, *GetTransitGatewayPrefixListReferencesInput, ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error) +} + +var _ GetTransitGatewayPrefixListReferencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayPrefixListReferences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go b/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go index 8652521e5d6..1be1e2fe32e 100644 --- a/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go +++ b/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetTransitGatewayRouteTableAssociationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayRouteTableAssociationsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationGetTransitGatewayRouteTableAssociationsMiddlewares( return nil } -// GetTransitGatewayRouteTableAssociationsAPIClient is a client that implements -// the GetTransitGatewayRouteTableAssociations operation. -type GetTransitGatewayRouteTableAssociationsAPIClient interface { - GetTransitGatewayRouteTableAssociations(context.Context, *GetTransitGatewayRouteTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error) -} - -var _ GetTransitGatewayRouteTableAssociationsAPIClient = (*Client)(nil) - // GetTransitGatewayRouteTableAssociationsPaginatorOptions is the paginator // options for GetTransitGatewayRouteTableAssociations type GetTransitGatewayRouteTableAssociationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *GetTransitGatewayRouteTableAssociationsPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayRouteTableAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *GetTransitGatewayRouteTableAssociationsPaginator) NextPage(ctx context. return result, nil } +// GetTransitGatewayRouteTableAssociationsAPIClient is a client that implements +// the GetTransitGatewayRouteTableAssociations operation. +type GetTransitGatewayRouteTableAssociationsAPIClient interface { + GetTransitGatewayRouteTableAssociations(context.Context, *GetTransitGatewayRouteTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error) +} + +var _ GetTransitGatewayRouteTableAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayRouteTableAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go b/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go index 7205ba9c410..3ac00d4b05e 100644 --- a/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go +++ b/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetTransitGatewayRouteTablePropagationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayRouteTablePropagationsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationGetTransitGatewayRouteTablePropagationsMiddlewares( return nil } -// GetTransitGatewayRouteTablePropagationsAPIClient is a client that implements -// the GetTransitGatewayRouteTablePropagations operation. -type GetTransitGatewayRouteTablePropagationsAPIClient interface { - GetTransitGatewayRouteTablePropagations(context.Context, *GetTransitGatewayRouteTablePropagationsInput, ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error) -} - -var _ GetTransitGatewayRouteTablePropagationsAPIClient = (*Client)(nil) - // GetTransitGatewayRouteTablePropagationsPaginatorOptions is the paginator // options for GetTransitGatewayRouteTablePropagations type GetTransitGatewayRouteTablePropagationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *GetTransitGatewayRouteTablePropagationsPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayRouteTablePropagations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *GetTransitGatewayRouteTablePropagationsPaginator) NextPage(ctx context. return result, nil } +// GetTransitGatewayRouteTablePropagationsAPIClient is a client that implements +// the GetTransitGatewayRouteTablePropagations operation. +type GetTransitGatewayRouteTablePropagationsAPIClient interface { + GetTransitGatewayRouteTablePropagations(context.Context, *GetTransitGatewayRouteTablePropagationsInput, ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error) +} + +var _ GetTransitGatewayRouteTablePropagationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayRouteTablePropagations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go b/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go index bed6273ba09..4a07d07b63b 100644 --- a/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go +++ b/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetVerifiedAccessEndpointPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVerifiedAccessEndpointPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go b/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go index ec72dd039d4..4022a8c6f88 100644 --- a/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go +++ b/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetVerifiedAccessGroupPolicyMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVerifiedAccessGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go b/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go index 090821660dd..2dd4bb3bca8 100644 --- a/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go +++ b/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetVpnConnectionDeviceSampleConfigurationMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVpnConnectionDeviceSampleConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_GetVpnConnectionDeviceTypes.go b/service/ec2/api_op_GetVpnConnectionDeviceTypes.go index 6b82d5d5aca..a55d9916d28 100644 --- a/service/ec2/api_op_GetVpnConnectionDeviceTypes.go +++ b/service/ec2/api_op_GetVpnConnectionDeviceTypes.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetVpnConnectionDeviceTypesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpnConnectionDeviceTypes(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationGetVpnConnectionDeviceTypesMiddlewares(stack *middl return nil } -// GetVpnConnectionDeviceTypesAPIClient is a client that implements the -// GetVpnConnectionDeviceTypes operation. -type GetVpnConnectionDeviceTypesAPIClient interface { - GetVpnConnectionDeviceTypes(context.Context, *GetVpnConnectionDeviceTypesInput, ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error) -} - -var _ GetVpnConnectionDeviceTypesAPIClient = (*Client)(nil) - // GetVpnConnectionDeviceTypesPaginatorOptions is the paginator options for // GetVpnConnectionDeviceTypes type GetVpnConnectionDeviceTypesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *GetVpnConnectionDeviceTypesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetVpnConnectionDeviceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *GetVpnConnectionDeviceTypesPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetVpnConnectionDeviceTypesAPIClient is a client that implements the +// GetVpnConnectionDeviceTypes operation. +type GetVpnConnectionDeviceTypesAPIClient interface { + GetVpnConnectionDeviceTypes(context.Context, *GetVpnConnectionDeviceTypesInput, ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error) +} + +var _ GetVpnConnectionDeviceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetVpnConnectionDeviceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_GetVpnTunnelReplacementStatus.go b/service/ec2/api_op_GetVpnTunnelReplacementStatus.go index c85784baf38..fbd25abd7be 100644 --- a/service/ec2/api_op_GetVpnTunnelReplacementStatus.go +++ b/service/ec2/api_op_GetVpnTunnelReplacementStatus.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetVpnTunnelReplacementStatusMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVpnTunnelReplacementStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go b/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go index 5c67db03fad..14ea8178d2f 100644 --- a/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go +++ b/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go @@ -125,6 +125,9 @@ func (c *Client) addOperationImportClientVpnClientCertificateRevocationListMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportClientVpnClientCertificateRevocationListValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ImportImage.go b/service/ec2/api_op_ImportImage.go index 59c694c58f2..d10a80b1ddc 100644 --- a/service/ec2/api_op_ImportImage.go +++ b/service/ec2/api_op_ImportImage.go @@ -274,6 +274,9 @@ func (c *Client) addOperationImportImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportImage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ImportInstance.go b/service/ec2/api_op_ImportInstance.go index 988a408d43b..23e6f86de09 100644 --- a/service/ec2/api_op_ImportInstance.go +++ b/service/ec2/api_op_ImportInstance.go @@ -138,6 +138,9 @@ func (c *Client) addOperationImportInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ImportKeyPair.go b/service/ec2/api_op_ImportKeyPair.go index 4f5d5344a5d..3ce879ac12a 100644 --- a/service/ec2/api_op_ImportKeyPair.go +++ b/service/ec2/api_op_ImportKeyPair.go @@ -146,6 +146,9 @@ func (c *Client) addOperationImportKeyPairMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ImportSnapshot.go b/service/ec2/api_op_ImportSnapshot.go index 66e07c0f149..6f4bcb9def0 100644 --- a/service/ec2/api_op_ImportSnapshot.go +++ b/service/ec2/api_op_ImportSnapshot.go @@ -177,6 +177,9 @@ func (c *Client) addOperationImportSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportSnapshot(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ImportVolume.go b/service/ec2/api_op_ImportVolume.go index 821d1638303..6faa418a04c 100644 --- a/service/ec2/api_op_ImportVolume.go +++ b/service/ec2/api_op_ImportVolume.go @@ -137,6 +137,9 @@ func (c *Client) addOperationImportVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ListImagesInRecycleBin.go b/service/ec2/api_op_ListImagesInRecycleBin.go index c999845e2ad..88c52bf49c3 100644 --- a/service/ec2/api_op_ListImagesInRecycleBin.go +++ b/service/ec2/api_op_ListImagesInRecycleBin.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListImagesInRecycleBinMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImagesInRecycleBin(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListImagesInRecycleBinMiddlewares(stack *middleware return nil } -// ListImagesInRecycleBinAPIClient is a client that implements the -// ListImagesInRecycleBin operation. -type ListImagesInRecycleBinAPIClient interface { - ListImagesInRecycleBin(context.Context, *ListImagesInRecycleBinInput, ...func(*Options)) (*ListImagesInRecycleBinOutput, error) -} - -var _ ListImagesInRecycleBinAPIClient = (*Client)(nil) - // ListImagesInRecycleBinPaginatorOptions is the paginator options for // ListImagesInRecycleBin type ListImagesInRecycleBinPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListImagesInRecycleBinPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImagesInRecycleBin(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListImagesInRecycleBinPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListImagesInRecycleBinAPIClient is a client that implements the +// ListImagesInRecycleBin operation. +type ListImagesInRecycleBinAPIClient interface { + ListImagesInRecycleBin(context.Context, *ListImagesInRecycleBinInput, ...func(*Options)) (*ListImagesInRecycleBinOutput, error) +} + +var _ ListImagesInRecycleBinAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImagesInRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_ListSnapshotsInRecycleBin.go b/service/ec2/api_op_ListSnapshotsInRecycleBin.go index 5b6138f2106..906667cfb6d 100644 --- a/service/ec2/api_op_ListSnapshotsInRecycleBin.go +++ b/service/ec2/api_op_ListSnapshotsInRecycleBin.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListSnapshotsInRecycleBinMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSnapshotsInRecycleBin(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListSnapshotsInRecycleBinMiddlewares(stack *middlew return nil } -// ListSnapshotsInRecycleBinAPIClient is a client that implements the -// ListSnapshotsInRecycleBin operation. -type ListSnapshotsInRecycleBinAPIClient interface { - ListSnapshotsInRecycleBin(context.Context, *ListSnapshotsInRecycleBinInput, ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) -} - -var _ ListSnapshotsInRecycleBinAPIClient = (*Client)(nil) - // ListSnapshotsInRecycleBinPaginatorOptions is the paginator options for // ListSnapshotsInRecycleBin type ListSnapshotsInRecycleBinPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListSnapshotsInRecycleBinPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSnapshotsInRecycleBin(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListSnapshotsInRecycleBinPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListSnapshotsInRecycleBinAPIClient is a client that implements the +// ListSnapshotsInRecycleBin operation. +type ListSnapshotsInRecycleBinAPIClient interface { + ListSnapshotsInRecycleBin(context.Context, *ListSnapshotsInRecycleBinInput, ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) +} + +var _ ListSnapshotsInRecycleBinAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSnapshotsInRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_LockSnapshot.go b/service/ec2/api_op_LockSnapshot.go index 1ce2a07423d..cf95e1a4b21 100644 --- a/service/ec2/api_op_LockSnapshot.go +++ b/service/ec2/api_op_LockSnapshot.go @@ -230,6 +230,9 @@ func (c *Client) addOperationLockSnapshotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLockSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyAddressAttribute.go b/service/ec2/api_op_ModifyAddressAttribute.go index d75a5f06baf..be03672e3ce 100644 --- a/service/ec2/api_op_ModifyAddressAttribute.go +++ b/service/ec2/api_op_ModifyAddressAttribute.go @@ -118,6 +118,9 @@ func (c *Client) addOperationModifyAddressAttributeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyAddressAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyAvailabilityZoneGroup.go b/service/ec2/api_op_ModifyAvailabilityZoneGroup.go index fd5ea64dc4c..a3c6abeb6c0 100644 --- a/service/ec2/api_op_ModifyAvailabilityZoneGroup.go +++ b/service/ec2/api_op_ModifyAvailabilityZoneGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationModifyAvailabilityZoneGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyAvailabilityZoneGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyCapacityReservation.go b/service/ec2/api_op_ModifyCapacityReservation.go index 43eae43dd40..6d4fb5344aa 100644 --- a/service/ec2/api_op_ModifyCapacityReservation.go +++ b/service/ec2/api_op_ModifyCapacityReservation.go @@ -151,6 +151,9 @@ func (c *Client) addOperationModifyCapacityReservationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCapacityReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyCapacityReservationFleet.go b/service/ec2/api_op_ModifyCapacityReservationFleet.go index d8c79f03524..a484a3e44f4 100644 --- a/service/ec2/api_op_ModifyCapacityReservationFleet.go +++ b/service/ec2/api_op_ModifyCapacityReservationFleet.go @@ -146,6 +146,9 @@ func (c *Client) addOperationModifyCapacityReservationFleetMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCapacityReservationFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyClientVpnEndpoint.go b/service/ec2/api_op_ModifyClientVpnEndpoint.go index 0ec84318b86..fa07d66fe0d 100644 --- a/service/ec2/api_op_ModifyClientVpnEndpoint.go +++ b/service/ec2/api_op_ModifyClientVpnEndpoint.go @@ -176,6 +176,9 @@ func (c *Client) addOperationModifyClientVpnEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClientVpnEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyDefaultCreditSpecification.go b/service/ec2/api_op_ModifyDefaultCreditSpecification.go index 75aebac8b62..4934c4d1296 100644 --- a/service/ec2/api_op_ModifyDefaultCreditSpecification.go +++ b/service/ec2/api_op_ModifyDefaultCreditSpecification.go @@ -134,6 +134,9 @@ func (c *Client) addOperationModifyDefaultCreditSpecificationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDefaultCreditSpecificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go b/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go index 959c9b15fc2..83d86d1716c 100644 --- a/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go +++ b/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go @@ -146,6 +146,9 @@ func (c *Client) addOperationModifyEbsDefaultKmsKeyIdMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEbsDefaultKmsKeyIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyFleet.go b/service/ec2/api_op_ModifyFleet.go index 2239b775d68..d99af058b07 100644 --- a/service/ec2/api_op_ModifyFleet.go +++ b/service/ec2/api_op_ModifyFleet.go @@ -157,6 +157,9 @@ func (c *Client) addOperationModifyFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyFpgaImageAttribute.go b/service/ec2/api_op_ModifyFpgaImageAttribute.go index 7d9376d40c8..006ef287fba 100644 --- a/service/ec2/api_op_ModifyFpgaImageAttribute.go +++ b/service/ec2/api_op_ModifyFpgaImageAttribute.go @@ -139,6 +139,9 @@ func (c *Client) addOperationModifyFpgaImageAttributeMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyFpgaImageAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyHosts.go b/service/ec2/api_op_ModifyHosts.go index dc4869fee08..1e185b153a6 100644 --- a/service/ec2/api_op_ModifyHosts.go +++ b/service/ec2/api_op_ModifyHosts.go @@ -152,6 +152,9 @@ func (c *Client) addOperationModifyHostsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyHostsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIdFormat.go b/service/ec2/api_op_ModifyIdFormat.go index 17e3079b3e7..8d9e9205568 100644 --- a/service/ec2/api_op_ModifyIdFormat.go +++ b/service/ec2/api_op_ModifyIdFormat.go @@ -140,6 +140,9 @@ func (c *Client) addOperationModifyIdFormatMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIdFormatValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIdentityIdFormat.go b/service/ec2/api_op_ModifyIdentityIdFormat.go index 2e694891a15..dd54515ccf8 100644 --- a/service/ec2/api_op_ModifyIdentityIdFormat.go +++ b/service/ec2/api_op_ModifyIdentityIdFormat.go @@ -146,6 +146,9 @@ func (c *Client) addOperationModifyIdentityIdFormatMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIdentityIdFormatValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyImageAttribute.go b/service/ec2/api_op_ModifyImageAttribute.go index 2644faa7514..b8f176612ab 100644 --- a/service/ec2/api_op_ModifyImageAttribute.go +++ b/service/ec2/api_op_ModifyImageAttribute.go @@ -170,6 +170,9 @@ func (c *Client) addOperationModifyImageAttributeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyImageAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceAttribute.go b/service/ec2/api_op_ModifyInstanceAttribute.go index d1e9b968090..5f1cdb7a140 100644 --- a/service/ec2/api_op_ModifyInstanceAttribute.go +++ b/service/ec2/api_op_ModifyInstanceAttribute.go @@ -221,6 +221,9 @@ func (c *Client) addOperationModifyInstanceAttributeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go b/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go index dd70ef96683..dbebe862f0c 100644 --- a/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go +++ b/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationModifyInstanceCapacityReservationAttributesMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceCapacityReservationAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceCreditSpecification.go b/service/ec2/api_op_ModifyInstanceCreditSpecification.go index 87fd12895f2..0ba3301964e 100644 --- a/service/ec2/api_op_ModifyInstanceCreditSpecification.go +++ b/service/ec2/api_op_ModifyInstanceCreditSpecification.go @@ -128,6 +128,9 @@ func (c *Client) addOperationModifyInstanceCreditSpecificationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceCreditSpecificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceEventStartTime.go b/service/ec2/api_op_ModifyInstanceEventStartTime.go index 3b60c0b3b26..4131c730794 100644 --- a/service/ec2/api_op_ModifyInstanceEventStartTime.go +++ b/service/ec2/api_op_ModifyInstanceEventStartTime.go @@ -123,6 +123,9 @@ func (c *Client) addOperationModifyInstanceEventStartTimeMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceEventStartTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceEventWindow.go b/service/ec2/api_op_ModifyInstanceEventWindow.go index 8767db77d6f..1d9d5960a5c 100644 --- a/service/ec2/api_op_ModifyInstanceEventWindow.go +++ b/service/ec2/api_op_ModifyInstanceEventWindow.go @@ -154,6 +154,9 @@ func (c *Client) addOperationModifyInstanceEventWindowMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceEventWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go b/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go index 7b3eefabad3..3fb6f6cd6e3 100644 --- a/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go +++ b/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyInstanceMaintenanceOptionsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceMaintenanceOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceMetadataDefaults.go b/service/ec2/api_op_ModifyInstanceMetadataDefaults.go index 6fd287ed0b9..cc5729edc0d 100644 --- a/service/ec2/api_op_ModifyInstanceMetadataDefaults.go +++ b/service/ec2/api_op_ModifyInstanceMetadataDefaults.go @@ -141,6 +141,9 @@ func (c *Client) addOperationModifyInstanceMetadataDefaultsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceMetadataDefaults(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstanceMetadataOptions.go b/service/ec2/api_op_ModifyInstanceMetadataOptions.go index a9363d4de9b..8c390c29891 100644 --- a/service/ec2/api_op_ModifyInstanceMetadataOptions.go +++ b/service/ec2/api_op_ModifyInstanceMetadataOptions.go @@ -176,6 +176,9 @@ func (c *Client) addOperationModifyInstanceMetadataOptionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceMetadataOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyInstancePlacement.go b/service/ec2/api_op_ModifyInstancePlacement.go index 6c9a834f035..2a5a93cc445 100644 --- a/service/ec2/api_op_ModifyInstancePlacement.go +++ b/service/ec2/api_op_ModifyInstancePlacement.go @@ -165,6 +165,9 @@ func (c *Client) addOperationModifyInstancePlacementMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstancePlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIpam.go b/service/ec2/api_op_ModifyIpam.go index 9ab7660ad4d..e1fea7fca44 100644 --- a/service/ec2/api_op_ModifyIpam.go +++ b/service/ec2/api_op_ModifyIpam.go @@ -136,6 +136,9 @@ func (c *Client) addOperationModifyIpamMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIpamValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIpamPool.go b/service/ec2/api_op_ModifyIpamPool.go index 84293a1649e..6c033fe74be 100644 --- a/service/ec2/api_op_ModifyIpamPool.go +++ b/service/ec2/api_op_ModifyIpamPool.go @@ -161,6 +161,9 @@ func (c *Client) addOperationModifyIpamPoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIpamPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIpamResourceCidr.go b/service/ec2/api_op_ModifyIpamResourceCidr.go index bb23226553d..dd5361181b8 100644 --- a/service/ec2/api_op_ModifyIpamResourceCidr.go +++ b/service/ec2/api_op_ModifyIpamResourceCidr.go @@ -146,6 +146,9 @@ func (c *Client) addOperationModifyIpamResourceCidrMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIpamResourceCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIpamResourceDiscovery.go b/service/ec2/api_op_ModifyIpamResourceDiscovery.go index 1c8087d355d..da1b0f486eb 100644 --- a/service/ec2/api_op_ModifyIpamResourceDiscovery.go +++ b/service/ec2/api_op_ModifyIpamResourceDiscovery.go @@ -125,6 +125,9 @@ func (c *Client) addOperationModifyIpamResourceDiscoveryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIpamResourceDiscoveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyIpamScope.go b/service/ec2/api_op_ModifyIpamScope.go index e89babc6414..3c65cb164e2 100644 --- a/service/ec2/api_op_ModifyIpamScope.go +++ b/service/ec2/api_op_ModifyIpamScope.go @@ -115,6 +115,9 @@ func (c *Client) addOperationModifyIpamScopeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIpamScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyLaunchTemplate.go b/service/ec2/api_op_ModifyLaunchTemplate.go index 02a9774f83f..e4955b630eb 100644 --- a/service/ec2/api_op_ModifyLaunchTemplate.go +++ b/service/ec2/api_op_ModifyLaunchTemplate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationModifyLaunchTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyLaunchTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ModifyLocalGatewayRoute.go b/service/ec2/api_op_ModifyLocalGatewayRoute.go index 3d00b444344..617c5c7e2fc 100644 --- a/service/ec2/api_op_ModifyLocalGatewayRoute.go +++ b/service/ec2/api_op_ModifyLocalGatewayRoute.go @@ -127,6 +127,9 @@ func (c *Client) addOperationModifyLocalGatewayRouteMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyLocalGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyManagedPrefixList.go b/service/ec2/api_op_ModifyManagedPrefixList.go index 40f75230f18..66e6f19eec8 100644 --- a/service/ec2/api_op_ModifyManagedPrefixList.go +++ b/service/ec2/api_op_ModifyManagedPrefixList.go @@ -138,6 +138,9 @@ func (c *Client) addOperationModifyManagedPrefixListMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyManagedPrefixListValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go b/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go index 5f289503bd8..7e568336527 100644 --- a/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go +++ b/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go @@ -159,6 +159,9 @@ func (c *Client) addOperationModifyNetworkInterfaceAttributeMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyNetworkInterfaceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyPrivateDnsNameOptions.go b/service/ec2/api_op_ModifyPrivateDnsNameOptions.go index b89e6f43a54..cba79b3b5b6 100644 --- a/service/ec2/api_op_ModifyPrivateDnsNameOptions.go +++ b/service/ec2/api_op_ModifyPrivateDnsNameOptions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationModifyPrivateDnsNameOptionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyPrivateDnsNameOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyReservedInstances.go b/service/ec2/api_op_ModifyReservedInstances.go index 12bd303f8ce..26015a27870 100644 --- a/service/ec2/api_op_ModifyReservedInstances.go +++ b/service/ec2/api_op_ModifyReservedInstances.go @@ -126,6 +126,9 @@ func (c *Client) addOperationModifyReservedInstancesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReservedInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifySecurityGroupRules.go b/service/ec2/api_op_ModifySecurityGroupRules.go index 3c11690b1dd..9cc7df67fa8 100644 --- a/service/ec2/api_op_ModifySecurityGroupRules.go +++ b/service/ec2/api_op_ModifySecurityGroupRules.go @@ -117,6 +117,9 @@ func (c *Client) addOperationModifySecurityGroupRulesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySecurityGroupRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifySnapshotAttribute.go b/service/ec2/api_op_ModifySnapshotAttribute.go index ec788ead1a6..4aa18d02b69 100644 --- a/service/ec2/api_op_ModifySnapshotAttribute.go +++ b/service/ec2/api_op_ModifySnapshotAttribute.go @@ -138,6 +138,9 @@ func (c *Client) addOperationModifySnapshotAttributeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifySnapshotTier.go b/service/ec2/api_op_ModifySnapshotTier.go index 5d3da97b1e3..5e7c5a5b7d1 100644 --- a/service/ec2/api_op_ModifySnapshotTier.go +++ b/service/ec2/api_op_ModifySnapshotTier.go @@ -125,6 +125,9 @@ func (c *Client) addOperationModifySnapshotTierMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySnapshotTierValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifySpotFleetRequest.go b/service/ec2/api_op_ModifySpotFleetRequest.go index 33a18d2f284..d2d2427afa3 100644 --- a/service/ec2/api_op_ModifySpotFleetRequest.go +++ b/service/ec2/api_op_ModifySpotFleetRequest.go @@ -159,6 +159,9 @@ func (c *Client) addOperationModifySpotFleetRequestMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySpotFleetRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifySubnetAttribute.go b/service/ec2/api_op_ModifySubnetAttribute.go index f5eada38a2c..f56c852223f 100644 --- a/service/ec2/api_op_ModifySubnetAttribute.go +++ b/service/ec2/api_op_ModifySubnetAttribute.go @@ -180,6 +180,9 @@ func (c *Client) addOperationModifySubnetAttributeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySubnetAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go b/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go index aa482cf6968..c9364cae172 100644 --- a/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go +++ b/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go @@ -125,6 +125,9 @@ func (c *Client) addOperationModifyTrafficMirrorFilterNetworkServicesMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTrafficMirrorFilterNetworkServicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go b/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go index c191ce22fcc..efd805f2c5d 100644 --- a/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go +++ b/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go @@ -152,6 +152,9 @@ func (c *Client) addOperationModifyTrafficMirrorFilterRuleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyTrafficMirrorSession.go b/service/ec2/api_op_ModifyTrafficMirrorSession.go index e35917c8a0a..498773798da 100644 --- a/service/ec2/api_op_ModifyTrafficMirrorSession.go +++ b/service/ec2/api_op_ModifyTrafficMirrorSession.go @@ -149,6 +149,9 @@ func (c *Client) addOperationModifyTrafficMirrorSessionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTrafficMirrorSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyTransitGateway.go b/service/ec2/api_op_ModifyTransitGateway.go index 268bbddc8f0..4335ac79e76 100644 --- a/service/ec2/api_op_ModifyTransitGateway.go +++ b/service/ec2/api_op_ModifyTransitGateway.go @@ -120,6 +120,9 @@ func (c *Client) addOperationModifyTransitGatewayMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTransitGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go b/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go index cabc51a5579..bef0ab123e1 100644 --- a/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go +++ b/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyTransitGatewayPrefixListReferenceMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go b/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go index 4f44d06a5ab..fd44bc1e024 100644 --- a/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go +++ b/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationModifyTransitGatewayVpcAttachmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go b/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go index dcb4f31a2a1..62360ab6b7b 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go +++ b/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go @@ -132,6 +132,9 @@ func (c *Client) addOperationModifyVerifiedAccessEndpointMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go b/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go index e147d2ed723..ccf01f60342 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go +++ b/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationModifyVerifiedAccessEndpointPolicyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessEndpointPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessGroup.go b/service/ec2/api_op_ModifyVerifiedAccessGroup.go index 40e1359abdf..46292955f68 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessGroup.go +++ b/service/ec2/api_op_ModifyVerifiedAccessGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyVerifiedAccessGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go b/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go index 3007acdd905..be8a7defef3 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go +++ b/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationModifyVerifiedAccessGroupPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessGroupPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessInstance.go b/service/ec2/api_op_ModifyVerifiedAccessInstance.go index f8fa8eb829f..e54ffa41eb2 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessInstance.go +++ b/service/ec2/api_op_ModifyVerifiedAccessInstance.go @@ -122,6 +122,9 @@ func (c *Client) addOperationModifyVerifiedAccessInstanceMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go b/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go index 25a4b649ca2..00a8afb4e34 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go +++ b/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyVerifiedAccessInstanceLoggingConfigurationMid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessInstanceLoggingConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go b/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go index e084cd35454..b9679199182 100644 --- a/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go +++ b/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go @@ -132,6 +132,9 @@ func (c *Client) addOperationModifyVerifiedAccessTrustProviderMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opModifyVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVolume.go b/service/ec2/api_op_ModifyVolume.go index 0f59b2cf2aa..d15ff9fbdf1 100644 --- a/service/ec2/api_op_ModifyVolume.go +++ b/service/ec2/api_op_ModifyVolume.go @@ -197,6 +197,9 @@ func (c *Client) addOperationModifyVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVolumeAttribute.go b/service/ec2/api_op_ModifyVolumeAttribute.go index df42d57e2b6..27e721409f5 100644 --- a/service/ec2/api_op_ModifyVolumeAttribute.go +++ b/service/ec2/api_op_ModifyVolumeAttribute.go @@ -121,6 +121,9 @@ func (c *Client) addOperationModifyVolumeAttributeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVolumeAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcAttribute.go b/service/ec2/api_op_ModifyVpcAttribute.go index 64d2ececede..edb103fbb62 100644 --- a/service/ec2/api_op_ModifyVpcAttribute.go +++ b/service/ec2/api_op_ModifyVpcAttribute.go @@ -123,6 +123,9 @@ func (c *Client) addOperationModifyVpcAttributeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcEndpoint.go b/service/ec2/api_op_ModifyVpcEndpoint.go index 0dd50e72bc7..6bd80ac5a78 100644 --- a/service/ec2/api_op_ModifyVpcEndpoint.go +++ b/service/ec2/api_op_ModifyVpcEndpoint.go @@ -160,6 +160,9 @@ func (c *Client) addOperationModifyVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go b/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go index 132db072762..231541319ce 100644 --- a/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go +++ b/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go @@ -120,6 +120,9 @@ func (c *Client) addOperationModifyVpcEndpointConnectionNotificationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcEndpointConnectionNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go b/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go index 08102a6705e..ffe65f1c2f4 100644 --- a/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go +++ b/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationModifyVpcEndpointServiceConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcEndpointServiceConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go b/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go index c0f7c0a7fec..f5bba0e85a9 100644 --- a/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go +++ b/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go @@ -119,6 +119,9 @@ func (c *Client) addOperationModifyVpcEndpointServicePayerResponsibilityMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcEndpointServicePayerResponsibilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go b/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go index 4ecd9628d44..85653061591 100644 --- a/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go +++ b/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationModifyVpcEndpointServicePermissionsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcEndpointServicePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go b/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go index 477aeec7b16..3a920d5c83d 100644 --- a/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go +++ b/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationModifyVpcPeeringConnectionOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcPeeringConnectionOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpcTenancy.go b/service/ec2/api_op_ModifyVpcTenancy.go index e46c61f17ca..58d9b1d90ba 100644 --- a/service/ec2/api_op_ModifyVpcTenancy.go +++ b/service/ec2/api_op_ModifyVpcTenancy.go @@ -127,6 +127,9 @@ func (c *Client) addOperationModifyVpcTenancyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpcTenancyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpnConnection.go b/service/ec2/api_op_ModifyVpnConnection.go index 2af7f9a9987..cc65c86d31d 100644 --- a/service/ec2/api_op_ModifyVpnConnection.go +++ b/service/ec2/api_op_ModifyVpnConnection.go @@ -163,6 +163,9 @@ func (c *Client) addOperationModifyVpnConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpnConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpnConnectionOptions.go b/service/ec2/api_op_ModifyVpnConnectionOptions.go index ac2be41ad72..6099a8e224e 100644 --- a/service/ec2/api_op_ModifyVpnConnectionOptions.go +++ b/service/ec2/api_op_ModifyVpnConnectionOptions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationModifyVpnConnectionOptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpnConnectionOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpnTunnelCertificate.go b/service/ec2/api_op_ModifyVpnTunnelCertificate.go index a534bc00c4a..69b1b788403 100644 --- a/service/ec2/api_op_ModifyVpnTunnelCertificate.go +++ b/service/ec2/api_op_ModifyVpnTunnelCertificate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationModifyVpnTunnelCertificateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpnTunnelCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ModifyVpnTunnelOptions.go b/service/ec2/api_op_ModifyVpnTunnelOptions.go index d89c6b29a47..17da8852623 100644 --- a/service/ec2/api_op_ModifyVpnTunnelOptions.go +++ b/service/ec2/api_op_ModifyVpnTunnelOptions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationModifyVpnTunnelOptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyVpnTunnelOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_MonitorInstances.go b/service/ec2/api_op_MonitorInstances.go index f95a0e4e3bd..cc653696083 100644 --- a/service/ec2/api_op_MonitorInstances.go +++ b/service/ec2/api_op_MonitorInstances.go @@ -118,6 +118,9 @@ func (c *Client) addOperationMonitorInstancesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMonitorInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_MoveAddressToVpc.go b/service/ec2/api_op_MoveAddressToVpc.go index 4d51c690dcd..944e9e8f630 100644 --- a/service/ec2/api_op_MoveAddressToVpc.go +++ b/service/ec2/api_op_MoveAddressToVpc.go @@ -123,6 +123,9 @@ func (c *Client) addOperationMoveAddressToVpcMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMoveAddressToVpcValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_MoveByoipCidrToIpam.go b/service/ec2/api_op_MoveByoipCidrToIpam.go index be1c54b33c6..dbb5513cb20 100644 --- a/service/ec2/api_op_MoveByoipCidrToIpam.go +++ b/service/ec2/api_op_MoveByoipCidrToIpam.go @@ -129,6 +129,9 @@ func (c *Client) addOperationMoveByoipCidrToIpamMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMoveByoipCidrToIpamValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ProvisionByoipCidr.go b/service/ec2/api_op_ProvisionByoipCidr.go index 5ee250e3fe0..310934dcab9 100644 --- a/service/ec2/api_op_ProvisionByoipCidr.go +++ b/service/ec2/api_op_ProvisionByoipCidr.go @@ -173,6 +173,9 @@ func (c *Client) addOperationProvisionByoipCidrMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ProvisionIpamByoasn.go b/service/ec2/api_op_ProvisionIpamByoasn.go index 914a22e4d1f..7772890bf58 100644 --- a/service/ec2/api_op_ProvisionIpamByoasn.go +++ b/service/ec2/api_op_ProvisionIpamByoasn.go @@ -127,6 +127,9 @@ func (c *Client) addOperationProvisionIpamByoasnMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionIpamByoasnValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ProvisionIpamPoolCidr.go b/service/ec2/api_op_ProvisionIpamPoolCidr.go index 18c1bcf13c2..0038ac67919 100644 --- a/service/ec2/api_op_ProvisionIpamPoolCidr.go +++ b/service/ec2/api_op_ProvisionIpamPoolCidr.go @@ -139,6 +139,9 @@ func (c *Client) addOperationProvisionIpamPoolCidrMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opProvisionIpamPoolCidrMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go b/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go index 06b0c5e07c4..c8dc09efe34 100644 --- a/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go +++ b/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go @@ -130,6 +130,9 @@ func (c *Client) addOperationProvisionPublicIpv4PoolCidrMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionPublicIpv4PoolCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_PurchaseCapacityBlock.go b/service/ec2/api_op_PurchaseCapacityBlock.go index 460068c84ba..f612287c915 100644 --- a/service/ec2/api_op_PurchaseCapacityBlock.go +++ b/service/ec2/api_op_PurchaseCapacityBlock.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPurchaseCapacityBlockMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseCapacityBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_PurchaseHostReservation.go b/service/ec2/api_op_PurchaseHostReservation.go index aeeef0a19ba..849871a681a 100644 --- a/service/ec2/api_op_PurchaseHostReservation.go +++ b/service/ec2/api_op_PurchaseHostReservation.go @@ -151,6 +151,9 @@ func (c *Client) addOperationPurchaseHostReservationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseHostReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_PurchaseReservedInstancesOffering.go b/service/ec2/api_op_PurchaseReservedInstancesOffering.go index f9930fe766a..d0851223ea0 100644 --- a/service/ec2/api_op_PurchaseReservedInstancesOffering.go +++ b/service/ec2/api_op_PurchaseReservedInstancesOffering.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPurchaseReservedInstancesOfferingMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedInstancesOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_PurchaseScheduledInstances.go b/service/ec2/api_op_PurchaseScheduledInstances.go index baf4be2080c..e02e0ea6ad9 100644 --- a/service/ec2/api_op_PurchaseScheduledInstances.go +++ b/service/ec2/api_op_PurchaseScheduledInstances.go @@ -130,6 +130,9 @@ func (c *Client) addOperationPurchaseScheduledInstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPurchaseScheduledInstancesMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_RebootInstances.go b/service/ec2/api_op_RebootInstances.go index 103ef9feec2..5a26201e8e4 100644 --- a/service/ec2/api_op_RebootInstances.go +++ b/service/ec2/api_op_RebootInstances.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRebootInstancesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RegisterImage.go b/service/ec2/api_op_RegisterImage.go index 0f8d72d8434..4abd2935a12 100644 --- a/service/ec2/api_op_RegisterImage.go +++ b/service/ec2/api_op_RegisterImage.go @@ -292,6 +292,9 @@ func (c *Client) addOperationRegisterImageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go b/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go index 84433694dfd..4c53e80e1bf 100644 --- a/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go +++ b/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRegisterInstanceEventNotificationAttributesMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterInstanceEventNotificationAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go b/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go index 165011d2721..f3a7c5e4611 100644 --- a/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go +++ b/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go @@ -130,6 +130,9 @@ func (c *Client) addOperationRegisterTransitGatewayMulticastGroupMembersMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTransitGatewayMulticastGroupMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go b/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go index b4008b72897..3a46335d329 100644 --- a/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go +++ b/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go @@ -132,6 +132,9 @@ func (c *Client) addOperationRegisterTransitGatewayMulticastGroupSourcesMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTransitGatewayMulticastGroupSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go b/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go index dab91f3f52f..775db6fe95a 100644 --- a/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go +++ b/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRejectTransitGatewayMulticastDomainAssociationsMidd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go b/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go index e06902bf9ae..5cfff25e026 100644 --- a/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go +++ b/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRejectTransitGatewayPeeringAttachmentMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go b/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go index 963b0c213f9..5219827b928 100644 --- a/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go +++ b/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRejectTransitGatewayVpcAttachmentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RejectVpcEndpointConnections.go b/service/ec2/api_op_RejectVpcEndpointConnections.go index f766bb0d67b..f0f99ee89c5 100644 --- a/service/ec2/api_op_RejectVpcEndpointConnections.go +++ b/service/ec2/api_op_RejectVpcEndpointConnections.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRejectVpcEndpointConnectionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectVpcEndpointConnectionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RejectVpcPeeringConnection.go b/service/ec2/api_op_RejectVpcPeeringConnection.go index df76a94b636..99f15897e94 100644 --- a/service/ec2/api_op_RejectVpcPeeringConnection.go +++ b/service/ec2/api_op_RejectVpcPeeringConnection.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRejectVpcPeeringConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectVpcPeeringConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReleaseAddress.go b/service/ec2/api_op_ReleaseAddress.go index addc48ec49f..5122b9d397d 100644 --- a/service/ec2/api_op_ReleaseAddress.go +++ b/service/ec2/api_op_ReleaseAddress.go @@ -132,6 +132,9 @@ func (c *Client) addOperationReleaseAddressMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReleaseAddress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ReleaseHosts.go b/service/ec2/api_op_ReleaseHosts.go index 898175c7ea4..c4a1955b34f 100644 --- a/service/ec2/api_op_ReleaseHosts.go +++ b/service/ec2/api_op_ReleaseHosts.go @@ -120,6 +120,9 @@ func (c *Client) addOperationReleaseHostsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReleaseHostsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReleaseIpamPoolAllocation.go b/service/ec2/api_op_ReleaseIpamPoolAllocation.go index 9283baf5a49..7c5c4ea76fd 100644 --- a/service/ec2/api_op_ReleaseIpamPoolAllocation.go +++ b/service/ec2/api_op_ReleaseIpamPoolAllocation.go @@ -132,6 +132,9 @@ func (c *Client) addOperationReleaseIpamPoolAllocationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReleaseIpamPoolAllocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go b/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go index 162c3b40ce2..c2ad7f7e1bc 100644 --- a/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go +++ b/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationReplaceIamInstanceProfileAssociationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceIamInstanceProfileAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceNetworkAclAssociation.go b/service/ec2/api_op_ReplaceNetworkAclAssociation.go index 2a6caec708a..78c18247850 100644 --- a/service/ec2/api_op_ReplaceNetworkAclAssociation.go +++ b/service/ec2/api_op_ReplaceNetworkAclAssociation.go @@ -123,6 +123,9 @@ func (c *Client) addOperationReplaceNetworkAclAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceNetworkAclAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceNetworkAclEntry.go b/service/ec2/api_op_ReplaceNetworkAclEntry.go index 24631ef681b..7a30b5f6de2 100644 --- a/service/ec2/api_op_ReplaceNetworkAclEntry.go +++ b/service/ec2/api_op_ReplaceNetworkAclEntry.go @@ -155,6 +155,9 @@ func (c *Client) addOperationReplaceNetworkAclEntryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceNetworkAclEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceRoute.go b/service/ec2/api_op_ReplaceRoute.go index a58dce2df23..eaac17632ad 100644 --- a/service/ec2/api_op_ReplaceRoute.go +++ b/service/ec2/api_op_ReplaceRoute.go @@ -162,6 +162,9 @@ func (c *Client) addOperationReplaceRouteMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceRouteTableAssociation.go b/service/ec2/api_op_ReplaceRouteTableAssociation.go index 3400ce98140..44fde10011f 100644 --- a/service/ec2/api_op_ReplaceRouteTableAssociation.go +++ b/service/ec2/api_op_ReplaceRouteTableAssociation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationReplaceRouteTableAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceRouteTableAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceTransitGatewayRoute.go b/service/ec2/api_op_ReplaceTransitGatewayRoute.go index 726b7361eb0..04077752c46 100644 --- a/service/ec2/api_op_ReplaceTransitGatewayRoute.go +++ b/service/ec2/api_op_ReplaceTransitGatewayRoute.go @@ -124,6 +124,9 @@ func (c *Client) addOperationReplaceTransitGatewayRouteMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceTransitGatewayRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReplaceVpnTunnel.go b/service/ec2/api_op_ReplaceVpnTunnel.go index eb904f32668..0a3f8255d5d 100644 --- a/service/ec2/api_op_ReplaceVpnTunnel.go +++ b/service/ec2/api_op_ReplaceVpnTunnel.go @@ -119,6 +119,9 @@ func (c *Client) addOperationReplaceVpnTunnelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceVpnTunnelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ReportInstanceStatus.go b/service/ec2/api_op_ReportInstanceStatus.go index 862f2c352b5..6d7ef72e58e 100644 --- a/service/ec2/api_op_ReportInstanceStatus.go +++ b/service/ec2/api_op_ReportInstanceStatus.go @@ -154,6 +154,9 @@ func (c *Client) addOperationReportInstanceStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReportInstanceStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RequestSpotFleet.go b/service/ec2/api_op_RequestSpotFleet.go index 378561c6010..c49d34d7bb1 100644 --- a/service/ec2/api_op_RequestSpotFleet.go +++ b/service/ec2/api_op_RequestSpotFleet.go @@ -144,6 +144,9 @@ func (c *Client) addOperationRequestSpotFleetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestSpotFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RequestSpotInstances.go b/service/ec2/api_op_RequestSpotInstances.go index 9bddf388f81..660f730a7c3 100644 --- a/service/ec2/api_op_RequestSpotInstances.go +++ b/service/ec2/api_op_RequestSpotInstances.go @@ -212,6 +212,9 @@ func (c *Client) addOperationRequestSpotInstancesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestSpotInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ResetAddressAttribute.go b/service/ec2/api_op_ResetAddressAttribute.go index c7e69defee1..ecf10a49a4b 100644 --- a/service/ec2/api_op_ResetAddressAttribute.go +++ b/service/ec2/api_op_ResetAddressAttribute.go @@ -119,6 +119,9 @@ func (c *Client) addOperationResetAddressAttributeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetAddressAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go b/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go index 31f9bb75e45..4614e264fc2 100644 --- a/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go +++ b/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go @@ -114,6 +114,9 @@ func (c *Client) addOperationResetEbsDefaultKmsKeyIdMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetEbsDefaultKmsKeyId(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_ResetFpgaImageAttribute.go b/service/ec2/api_op_ResetFpgaImageAttribute.go index 9cf609de58d..366b2f128a8 100644 --- a/service/ec2/api_op_ResetFpgaImageAttribute.go +++ b/service/ec2/api_op_ResetFpgaImageAttribute.go @@ -116,6 +116,9 @@ func (c *Client) addOperationResetFpgaImageAttributeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetFpgaImageAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ResetImageAttribute.go b/service/ec2/api_op_ResetImageAttribute.go index 7ec85fb8be9..a8233ab52f5 100644 --- a/service/ec2/api_op_ResetImageAttribute.go +++ b/service/ec2/api_op_ResetImageAttribute.go @@ -115,6 +115,9 @@ func (c *Client) addOperationResetImageAttributeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetImageAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ResetInstanceAttribute.go b/service/ec2/api_op_ResetInstanceAttribute.go index 727e081a652..26454a9e3ad 100644 --- a/service/ec2/api_op_ResetInstanceAttribute.go +++ b/service/ec2/api_op_ResetInstanceAttribute.go @@ -124,6 +124,9 @@ func (c *Client) addOperationResetInstanceAttributeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetInstanceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ResetNetworkInterfaceAttribute.go b/service/ec2/api_op_ResetNetworkInterfaceAttribute.go index 74e13749797..aff3bd702b2 100644 --- a/service/ec2/api_op_ResetNetworkInterfaceAttribute.go +++ b/service/ec2/api_op_ResetNetworkInterfaceAttribute.go @@ -112,6 +112,9 @@ func (c *Client) addOperationResetNetworkInterfaceAttributeMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetNetworkInterfaceAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_ResetSnapshotAttribute.go b/service/ec2/api_op_ResetSnapshotAttribute.go index 715d8e5fdcb..dba62ca6d1b 100644 --- a/service/ec2/api_op_ResetSnapshotAttribute.go +++ b/service/ec2/api_op_ResetSnapshotAttribute.go @@ -119,6 +119,9 @@ func (c *Client) addOperationResetSnapshotAttributeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetSnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RestoreAddressToClassic.go b/service/ec2/api_op_RestoreAddressToClassic.go index dd37372d646..bd56cf80ebb 100644 --- a/service/ec2/api_op_RestoreAddressToClassic.go +++ b/service/ec2/api_op_RestoreAddressToClassic.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRestoreAddressToClassicMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreAddressToClassicValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RestoreImageFromRecycleBin.go b/service/ec2/api_op_RestoreImageFromRecycleBin.go index 1d93a7ef5d4..4e8573bb4af 100644 --- a/service/ec2/api_op_RestoreImageFromRecycleBin.go +++ b/service/ec2/api_op_RestoreImageFromRecycleBin.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRestoreImageFromRecycleBinMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreImageFromRecycleBinValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RestoreManagedPrefixListVersion.go b/service/ec2/api_op_RestoreManagedPrefixListVersion.go index 4568d0cb019..413efa8ad99 100644 --- a/service/ec2/api_op_RestoreManagedPrefixListVersion.go +++ b/service/ec2/api_op_RestoreManagedPrefixListVersion.go @@ -123,6 +123,9 @@ func (c *Client) addOperationRestoreManagedPrefixListVersionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreManagedPrefixListVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go b/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go index c1861234b6a..d233b35b9ce 100644 --- a/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go +++ b/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go @@ -149,6 +149,9 @@ func (c *Client) addOperationRestoreSnapshotFromRecycleBinMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreSnapshotFromRecycleBinValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RestoreSnapshotTier.go b/service/ec2/api_op_RestoreSnapshotTier.go index 0af913be7cf..ba37bedb809 100644 --- a/service/ec2/api_op_RestoreSnapshotTier.go +++ b/service/ec2/api_op_RestoreSnapshotTier.go @@ -143,6 +143,9 @@ func (c *Client) addOperationRestoreSnapshotTierMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreSnapshotTierValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RevokeClientVpnIngress.go b/service/ec2/api_op_RevokeClientVpnIngress.go index b623a71497e..aa1454a92a6 100644 --- a/service/ec2/api_op_RevokeClientVpnIngress.go +++ b/service/ec2/api_op_RevokeClientVpnIngress.go @@ -125,6 +125,9 @@ func (c *Client) addOperationRevokeClientVpnIngressMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeClientVpnIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RevokeSecurityGroupEgress.go b/service/ec2/api_op_RevokeSecurityGroupEgress.go index 54486651013..bf3cc99560f 100644 --- a/service/ec2/api_op_RevokeSecurityGroupEgress.go +++ b/service/ec2/api_op_RevokeSecurityGroupEgress.go @@ -164,6 +164,9 @@ func (c *Client) addOperationRevokeSecurityGroupEgressMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeSecurityGroupEgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_RevokeSecurityGroupIngress.go b/service/ec2/api_op_RevokeSecurityGroupIngress.go index 607ce1a3043..3617effb5af 100644 --- a/service/ec2/api_op_RevokeSecurityGroupIngress.go +++ b/service/ec2/api_op_RevokeSecurityGroupIngress.go @@ -178,6 +178,9 @@ func (c *Client) addOperationRevokeSecurityGroupIngressMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeSecurityGroupIngress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_RunInstances.go b/service/ec2/api_op_RunInstances.go index b3b7da12650..9acea74e609 100644 --- a/service/ec2/api_op_RunInstances.go +++ b/service/ec2/api_op_RunInstances.go @@ -478,6 +478,9 @@ func (c *Client) addOperationRunInstancesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRunInstancesMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_RunScheduledInstances.go b/service/ec2/api_op_RunScheduledInstances.go index 67c06976143..8078075d727 100644 --- a/service/ec2/api_op_RunScheduledInstances.go +++ b/service/ec2/api_op_RunScheduledInstances.go @@ -139,6 +139,9 @@ func (c *Client) addOperationRunScheduledInstancesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRunScheduledInstancesMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_SearchLocalGatewayRoutes.go b/service/ec2/api_op_SearchLocalGatewayRoutes.go index c5d88fb42f7..3d3da096669 100644 --- a/service/ec2/api_op_SearchLocalGatewayRoutes.go +++ b/service/ec2/api_op_SearchLocalGatewayRoutes.go @@ -145,6 +145,9 @@ func (c *Client) addOperationSearchLocalGatewayRoutesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchLocalGatewayRoutesValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationSearchLocalGatewayRoutesMiddlewares(stack *middlewa return nil } -// SearchLocalGatewayRoutesAPIClient is a client that implements the -// SearchLocalGatewayRoutes operation. -type SearchLocalGatewayRoutesAPIClient interface { - SearchLocalGatewayRoutes(context.Context, *SearchLocalGatewayRoutesInput, ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error) -} - -var _ SearchLocalGatewayRoutesAPIClient = (*Client)(nil) - // SearchLocalGatewayRoutesPaginatorOptions is the paginator options for // SearchLocalGatewayRoutes type SearchLocalGatewayRoutesPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *SearchLocalGatewayRoutesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchLocalGatewayRoutes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *SearchLocalGatewayRoutesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// SearchLocalGatewayRoutesAPIClient is a client that implements the +// SearchLocalGatewayRoutes operation. +type SearchLocalGatewayRoutesAPIClient interface { + SearchLocalGatewayRoutes(context.Context, *SearchLocalGatewayRoutesInput, ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error) +} + +var _ SearchLocalGatewayRoutesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchLocalGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go b/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go index 81d30492fd2..32b06eb3149 100644 --- a/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go +++ b/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go @@ -148,6 +148,9 @@ func (c *Client) addOperationSearchTransitGatewayMulticastGroupsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchTransitGatewayMulticastGroupsValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationSearchTransitGatewayMulticastGroupsMiddlewares(stac return nil } -// SearchTransitGatewayMulticastGroupsAPIClient is a client that implements the -// SearchTransitGatewayMulticastGroups operation. -type SearchTransitGatewayMulticastGroupsAPIClient interface { - SearchTransitGatewayMulticastGroups(context.Context, *SearchTransitGatewayMulticastGroupsInput, ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error) -} - -var _ SearchTransitGatewayMulticastGroupsAPIClient = (*Client)(nil) - // SearchTransitGatewayMulticastGroupsPaginatorOptions is the paginator options // for SearchTransitGatewayMulticastGroups type SearchTransitGatewayMulticastGroupsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *SearchTransitGatewayMulticastGroupsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchTransitGatewayMulticastGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *SearchTransitGatewayMulticastGroupsPaginator) NextPage(ctx context.Cont return result, nil } +// SearchTransitGatewayMulticastGroupsAPIClient is a client that implements the +// SearchTransitGatewayMulticastGroups operation. +type SearchTransitGatewayMulticastGroupsAPIClient interface { + SearchTransitGatewayMulticastGroups(context.Context, *SearchTransitGatewayMulticastGroupsInput, ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error) +} + +var _ SearchTransitGatewayMulticastGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchTransitGatewayMulticastGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ec2/api_op_SearchTransitGatewayRoutes.go b/service/ec2/api_op_SearchTransitGatewayRoutes.go index 129cbc0e857..8238b7c305b 100644 --- a/service/ec2/api_op_SearchTransitGatewayRoutes.go +++ b/service/ec2/api_op_SearchTransitGatewayRoutes.go @@ -151,6 +151,9 @@ func (c *Client) addOperationSearchTransitGatewayRoutesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchTransitGatewayRoutesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_SendDiagnosticInterrupt.go b/service/ec2/api_op_SendDiagnosticInterrupt.go index e9604539743..9abdcd3fc58 100644 --- a/service/ec2/api_op_SendDiagnosticInterrupt.go +++ b/service/ec2/api_op_SendDiagnosticInterrupt.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSendDiagnosticInterruptMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendDiagnosticInterruptValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_StartInstances.go b/service/ec2/api_op_StartInstances.go index a9b10bc5e9f..ba6893e63c1 100644 --- a/service/ec2/api_op_StartInstances.go +++ b/service/ec2/api_op_StartInstances.go @@ -138,6 +138,9 @@ func (c *Client) addOperationStartInstancesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go b/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go index 9727674f4b2..d4346d1a895 100644 --- a/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go +++ b/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go @@ -123,6 +123,9 @@ func (c *Client) addOperationStartNetworkInsightsAccessScopeAnalysisMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartNetworkInsightsAccessScopeAnalysisMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_StartNetworkInsightsAnalysis.go b/service/ec2/api_op_StartNetworkInsightsAnalysis.go index 5ef93fdf9cf..7eec368efa9 100644 --- a/service/ec2/api_op_StartNetworkInsightsAnalysis.go +++ b/service/ec2/api_op_StartNetworkInsightsAnalysis.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartNetworkInsightsAnalysisMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartNetworkInsightsAnalysisMiddleware(stack, options); err != nil { return err } diff --git a/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go b/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go index 7ec8feef861..7ff318ea418 100644 --- a/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go +++ b/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStartVpcEndpointServicePrivateDnsVerificationMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartVpcEndpointServicePrivateDnsVerificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_StopInstances.go b/service/ec2/api_op_StopInstances.go index 40ed17d347c..249b4804635 100644 --- a/service/ec2/api_op_StopInstances.go +++ b/service/ec2/api_op_StopInstances.go @@ -172,6 +172,9 @@ func (c *Client) addOperationStopInstancesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_TerminateClientVpnConnections.go b/service/ec2/api_op_TerminateClientVpnConnections.go index 0c633fae4c2..489ff4cad21 100644 --- a/service/ec2/api_op_TerminateClientVpnConnections.go +++ b/service/ec2/api_op_TerminateClientVpnConnections.go @@ -128,6 +128,9 @@ func (c *Client) addOperationTerminateClientVpnConnectionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateClientVpnConnectionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_TerminateInstances.go b/service/ec2/api_op_TerminateInstances.go index 61d78a1e46c..ba9761db835 100644 --- a/service/ec2/api_op_TerminateInstances.go +++ b/service/ec2/api_op_TerminateInstances.go @@ -169,6 +169,9 @@ func (c *Client) addOperationTerminateInstancesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_UnassignIpv6Addresses.go b/service/ec2/api_op_UnassignIpv6Addresses.go index 60a1d5384d1..922d41891d9 100644 --- a/service/ec2/api_op_UnassignIpv6Addresses.go +++ b/service/ec2/api_op_UnassignIpv6Addresses.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUnassignIpv6AddressesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnassignIpv6AddressesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_UnassignPrivateIpAddresses.go b/service/ec2/api_op_UnassignPrivateIpAddresses.go index 6a733e5e6e7..13116ec58a7 100644 --- a/service/ec2/api_op_UnassignPrivateIpAddresses.go +++ b/service/ec2/api_op_UnassignPrivateIpAddresses.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUnassignPrivateIpAddressesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnassignPrivateIpAddressesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go b/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go index 987385daaab..c471070cb3b 100644 --- a/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go +++ b/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUnassignPrivateNatGatewayAddressMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnassignPrivateNatGatewayAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_UnlockSnapshot.go b/service/ec2/api_op_UnlockSnapshot.go index 74401823249..699066d5451 100644 --- a/service/ec2/api_op_UnlockSnapshot.go +++ b/service/ec2/api_op_UnlockSnapshot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUnlockSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnlockSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_UnmonitorInstances.go b/service/ec2/api_op_UnmonitorInstances.go index d52c99303e3..da69c474554 100644 --- a/service/ec2/api_op_UnmonitorInstances.go +++ b/service/ec2/api_op_UnmonitorInstances.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUnmonitorInstancesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnmonitorInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go b/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go index 484c076597b..d056a3449b3 100644 --- a/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go +++ b/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateSecurityGroupRuleDescriptionsEgressMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityGroupRuleDescriptionsEgress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go b/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go index a63b55db18e..567ea1efb7b 100644 --- a/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go +++ b/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateSecurityGroupRuleDescriptionsIngressMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityGroupRuleDescriptionsIngress(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ec2/api_op_WithdrawByoipCidr.go b/service/ec2/api_op_WithdrawByoipCidr.go index a14387133d5..75b7bfd47a2 100644 --- a/service/ec2/api_op_WithdrawByoipCidr.go +++ b/service/ec2/api_op_WithdrawByoipCidr.go @@ -118,6 +118,9 @@ func (c *Client) addOperationWithdrawByoipCidrMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpWithdrawByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2instanceconnect/api_client.go b/service/ec2instanceconnect/api_client.go index aaefdfcddec..e4ae6d494ec 100644 --- a/service/ec2instanceconnect/api_client.go +++ b/service/ec2instanceconnect/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ec2instanceconnect/api_op_SendSSHPublicKey.go b/service/ec2instanceconnect/api_op_SendSSHPublicKey.go index 58cb3f392c5..a14ff354018 100644 --- a/service/ec2instanceconnect/api_op_SendSSHPublicKey.go +++ b/service/ec2instanceconnect/api_op_SendSSHPublicKey.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSendSSHPublicKeyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ec2instanceconnect/api_op_SendSerialConsoleSSHPublicKey.go b/service/ec2instanceconnect/api_op_SendSerialConsoleSSHPublicKey.go index c03ac4d9de9..4ac84838847 100644 --- a/service/ec2instanceconnect/api_op_SendSerialConsoleSSHPublicKey.go +++ b/service/ec2instanceconnect/api_op_SendSerialConsoleSSHPublicKey.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSendSerialConsoleSSHPublicKeyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendSerialConsoleSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_client.go b/service/ecr/api_client.go index 994190d7fbf..b66e9215bd5 100644 --- a/service/ecr/api_client.go +++ b/service/ecr/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ecr/api_op_BatchCheckLayerAvailability.go b/service/ecr/api_op_BatchCheckLayerAvailability.go index 544d2b806f8..f197b765c2c 100644 --- a/service/ecr/api_op_BatchCheckLayerAvailability.go +++ b/service/ecr/api_op_BatchCheckLayerAvailability.go @@ -128,6 +128,9 @@ func (c *Client) addOperationBatchCheckLayerAvailabilityMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCheckLayerAvailabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_BatchDeleteImage.go b/service/ecr/api_op_BatchDeleteImage.go index aa0bc0011af..2ca653ceec8 100644 --- a/service/ecr/api_op_BatchDeleteImage.go +++ b/service/ecr/api_op_BatchDeleteImage.go @@ -130,6 +130,9 @@ func (c *Client) addOperationBatchDeleteImageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_BatchGetImage.go b/service/ecr/api_op_BatchGetImage.go index cfd05290cd9..978d75868ec 100644 --- a/service/ecr/api_op_BatchGetImage.go +++ b/service/ecr/api_op_BatchGetImage.go @@ -131,6 +131,9 @@ func (c *Client) addOperationBatchGetImageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go b/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go index c837397fa20..5ed27f568e9 100644 --- a/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go +++ b/service/ecr/api_op_BatchGetRepositoryScanningConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetRepositoryScanningConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetRepositoryScanningConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_CompleteLayerUpload.go b/service/ecr/api_op_CompleteLayerUpload.go index a7f9d7961d9..9bb4a989eef 100644 --- a/service/ecr/api_op_CompleteLayerUpload.go +++ b/service/ecr/api_op_CompleteLayerUpload.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCompleteLayerUploadMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteLayerUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_CreatePullThroughCacheRule.go b/service/ecr/api_op_CreatePullThroughCacheRule.go index 12271b6c0b1..3fe0410484e 100644 --- a/service/ecr/api_op_CreatePullThroughCacheRule.go +++ b/service/ecr/api_op_CreatePullThroughCacheRule.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreatePullThroughCacheRuleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePullThroughCacheRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_CreateRepository.go b/service/ecr/api_op_CreateRepository.go index 62251af5651..7bcdbd40513 100644 --- a/service/ecr/api_op_CreateRepository.go +++ b/service/ecr/api_op_CreateRepository.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_DeleteLifecyclePolicy.go b/service/ecr/api_op_DeleteLifecyclePolicy.go index 0964a9382e9..d02180e7ef2 100644 --- a/service/ecr/api_op_DeleteLifecyclePolicy.go +++ b/service/ecr/api_op_DeleteLifecyclePolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_DeletePullThroughCacheRule.go b/service/ecr/api_op_DeletePullThroughCacheRule.go index 27ea0beb0fe..c92886046c6 100644 --- a/service/ecr/api_op_DeletePullThroughCacheRule.go +++ b/service/ecr/api_op_DeletePullThroughCacheRule.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeletePullThroughCacheRuleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePullThroughCacheRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_DeleteRegistryPolicy.go b/service/ecr/api_op_DeleteRegistryPolicy.go index 7c700e48b2d..d5bb0343607 100644 --- a/service/ecr/api_op_DeleteRegistryPolicy.go +++ b/service/ecr/api_op_DeleteRegistryPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRegistryPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRegistryPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecr/api_op_DeleteRepository.go b/service/ecr/api_op_DeleteRepository.go index cd571636878..a3409eac7b1 100644 --- a/service/ecr/api_op_DeleteRepository.go +++ b/service/ecr/api_op_DeleteRepository.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_DeleteRepositoryPolicy.go b/service/ecr/api_op_DeleteRepositoryPolicy.go index 1443c456d9a..7b711854ecd 100644 --- a/service/ecr/api_op_DeleteRepositoryPolicy.go +++ b/service/ecr/api_op_DeleteRepositoryPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteRepositoryPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_DescribeImageReplicationStatus.go b/service/ecr/api_op_DescribeImageReplicationStatus.go index 5c0690fddf9..591e61ade58 100644 --- a/service/ecr/api_op_DescribeImageReplicationStatus.go +++ b/service/ecr/api_op_DescribeImageReplicationStatus.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeImageReplicationStatusMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageReplicationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_DescribeImageScanFindings.go b/service/ecr/api_op_DescribeImageScanFindings.go index 45885dd07e1..ad68b261288 100644 --- a/service/ecr/api_op_DescribeImageScanFindings.go +++ b/service/ecr/api_op_DescribeImageScanFindings.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribeImageScanFindingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageScanFindingsValidationMiddleware(stack); err != nil { return err } @@ -179,105 +182,6 @@ func (c *Client) addOperationDescribeImageScanFindingsMiddlewares(stack *middlew return nil } -// DescribeImageScanFindingsAPIClient is a client that implements the -// DescribeImageScanFindings operation. -type DescribeImageScanFindingsAPIClient interface { - DescribeImageScanFindings(context.Context, *DescribeImageScanFindingsInput, ...func(*Options)) (*DescribeImageScanFindingsOutput, error) -} - -var _ DescribeImageScanFindingsAPIClient = (*Client)(nil) - -// DescribeImageScanFindingsPaginatorOptions is the paginator options for -// DescribeImageScanFindings -type DescribeImageScanFindingsPaginatorOptions struct { - // The maximum number of image scan results returned by DescribeImageScanFindings - // in paginated output. When this parameter is used, DescribeImageScanFindings - // only returns maxResults results in a single page along with a nextToken - // response element. The remaining results of the initial request can be seen by - // sending another DescribeImageScanFindings request with the returned nextToken - // value. This value can be between 1 and 1000. If this parameter is not used, then - // DescribeImageScanFindings returns up to 100 results and a nextToken value, if - // applicable. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeImageScanFindingsPaginator is a paginator for DescribeImageScanFindings -type DescribeImageScanFindingsPaginator struct { - options DescribeImageScanFindingsPaginatorOptions - client DescribeImageScanFindingsAPIClient - params *DescribeImageScanFindingsInput - nextToken *string - firstPage bool -} - -// NewDescribeImageScanFindingsPaginator returns a new -// DescribeImageScanFindingsPaginator -func NewDescribeImageScanFindingsPaginator(client DescribeImageScanFindingsAPIClient, params *DescribeImageScanFindingsInput, optFns ...func(*DescribeImageScanFindingsPaginatorOptions)) *DescribeImageScanFindingsPaginator { - if params == nil { - params = &DescribeImageScanFindingsInput{} - } - - options := DescribeImageScanFindingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeImageScanFindingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeImageScanFindingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeImageScanFindings page. -func (p *DescribeImageScanFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImageScanFindingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeImageScanFindings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ImageScanCompleteWaiterOptions are waiter options for ImageScanCompleteWaiter type ImageScanCompleteWaiterOptions struct { @@ -393,7 +297,13 @@ func (w *ImageScanCompleteWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeImageScanFindings(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -468,6 +378,108 @@ func imageScanCompleteStateRetryable(ctx context.Context, input *DescribeImageSc return true, nil } +// DescribeImageScanFindingsPaginatorOptions is the paginator options for +// DescribeImageScanFindings +type DescribeImageScanFindingsPaginatorOptions struct { + // The maximum number of image scan results returned by DescribeImageScanFindings + // in paginated output. When this parameter is used, DescribeImageScanFindings + // only returns maxResults results in a single page along with a nextToken + // response element. The remaining results of the initial request can be seen by + // sending another DescribeImageScanFindings request with the returned nextToken + // value. This value can be between 1 and 1000. If this parameter is not used, then + // DescribeImageScanFindings returns up to 100 results and a nextToken value, if + // applicable. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeImageScanFindingsPaginator is a paginator for DescribeImageScanFindings +type DescribeImageScanFindingsPaginator struct { + options DescribeImageScanFindingsPaginatorOptions + client DescribeImageScanFindingsAPIClient + params *DescribeImageScanFindingsInput + nextToken *string + firstPage bool +} + +// NewDescribeImageScanFindingsPaginator returns a new +// DescribeImageScanFindingsPaginator +func NewDescribeImageScanFindingsPaginator(client DescribeImageScanFindingsAPIClient, params *DescribeImageScanFindingsInput, optFns ...func(*DescribeImageScanFindingsPaginatorOptions)) *DescribeImageScanFindingsPaginator { + if params == nil { + params = &DescribeImageScanFindingsInput{} + } + + options := DescribeImageScanFindingsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeImageScanFindingsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeImageScanFindingsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeImageScanFindings page. +func (p *DescribeImageScanFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImageScanFindingsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeImageScanFindings(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeImageScanFindingsAPIClient is a client that implements the +// DescribeImageScanFindings operation. +type DescribeImageScanFindingsAPIClient interface { + DescribeImageScanFindings(context.Context, *DescribeImageScanFindingsInput, ...func(*Options)) (*DescribeImageScanFindingsOutput, error) +} + +var _ DescribeImageScanFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImageScanFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecr/api_op_DescribeImages.go b/service/ecr/api_op_DescribeImages.go index cdc00fbc790..204468509ab 100644 --- a/service/ecr/api_op_DescribeImages.go +++ b/service/ecr/api_op_DescribeImages.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImagesValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, return nil } -// DescribeImagesAPIClient is a client that implements the DescribeImages -// operation. -type DescribeImagesAPIClient interface { - DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) -} - -var _ DescribeImagesAPIClient = (*Client)(nil) - // DescribeImagesPaginatorOptions is the paginator options for DescribeImages type DescribeImagesPaginatorOptions struct { // The maximum number of repository results returned by DescribeImages in @@ -247,6 +242,9 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeImagesAPIClient is a client that implements the DescribeImages +// operation. +type DescribeImagesAPIClient interface { + DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) +} + +var _ DescribeImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecr/api_op_DescribePullThroughCacheRules.go b/service/ecr/api_op_DescribePullThroughCacheRules.go index 12fe96f9be5..98bfb6f2857 100644 --- a/service/ecr/api_op_DescribePullThroughCacheRules.go +++ b/service/ecr/api_op_DescribePullThroughCacheRules.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribePullThroughCacheRulesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePullThroughCacheRules(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribePullThroughCacheRulesMiddlewares(stack *mid return nil } -// DescribePullThroughCacheRulesAPIClient is a client that implements the -// DescribePullThroughCacheRules operation. -type DescribePullThroughCacheRulesAPIClient interface { - DescribePullThroughCacheRules(context.Context, *DescribePullThroughCacheRulesInput, ...func(*Options)) (*DescribePullThroughCacheRulesOutput, error) -} - -var _ DescribePullThroughCacheRulesAPIClient = (*Client)(nil) - // DescribePullThroughCacheRulesPaginatorOptions is the paginator options for // DescribePullThroughCacheRules type DescribePullThroughCacheRulesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribePullThroughCacheRulesPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePullThroughCacheRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribePullThroughCacheRulesPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribePullThroughCacheRulesAPIClient is a client that implements the +// DescribePullThroughCacheRules operation. +type DescribePullThroughCacheRulesAPIClient interface { + DescribePullThroughCacheRules(context.Context, *DescribePullThroughCacheRulesInput, ...func(*Options)) (*DescribePullThroughCacheRulesOutput, error) +} + +var _ DescribePullThroughCacheRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePullThroughCacheRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecr/api_op_DescribeRegistry.go b/service/ecr/api_op_DescribeRegistry.go index 93f32247c9d..88c0baa5ed6 100644 --- a/service/ecr/api_op_DescribeRegistry.go +++ b/service/ecr/api_op_DescribeRegistry.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeRegistryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRegistry(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecr/api_op_DescribeRepositories.go b/service/ecr/api_op_DescribeRepositories.go index 939f67eb5d3..070f8978ef5 100644 --- a/service/ecr/api_op_DescribeRepositories.go +++ b/service/ecr/api_op_DescribeRepositories.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeRepositoriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRepositories(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeRepositoriesMiddlewares(stack *middleware.S return nil } -// DescribeRepositoriesAPIClient is a client that implements the -// DescribeRepositories operation. -type DescribeRepositoriesAPIClient interface { - DescribeRepositories(context.Context, *DescribeRepositoriesInput, ...func(*Options)) (*DescribeRepositoriesOutput, error) -} - -var _ DescribeRepositoriesAPIClient = (*Client)(nil) - // DescribeRepositoriesPaginatorOptions is the paginator options for // DescribeRepositories type DescribeRepositoriesPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeRepositoriesAPIClient is a client that implements the +// DescribeRepositories operation. +type DescribeRepositoriesAPIClient interface { + DescribeRepositories(context.Context, *DescribeRepositoriesInput, ...func(*Options)) (*DescribeRepositoriesOutput, error) +} + +var _ DescribeRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecr/api_op_GetAuthorizationToken.go b/service/ecr/api_op_GetAuthorizationToken.go index ab3e3747eb6..89de8f91c79 100644 --- a/service/ecr/api_op_GetAuthorizationToken.go +++ b/service/ecr/api_op_GetAuthorizationToken.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetAuthorizationTokenMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAuthorizationToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecr/api_op_GetDownloadUrlForLayer.go b/service/ecr/api_op_GetDownloadUrlForLayer.go index e6652085ad3..5767ff338c2 100644 --- a/service/ecr/api_op_GetDownloadUrlForLayer.go +++ b/service/ecr/api_op_GetDownloadUrlForLayer.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetDownloadUrlForLayerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDownloadUrlForLayerValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_GetLifecyclePolicy.go b/service/ecr/api_op_GetLifecyclePolicy.go index 4984afef6db..52dd4e0b955 100644 --- a/service/ecr/api_op_GetLifecyclePolicy.go +++ b/service/ecr/api_op_GetLifecyclePolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetLifecyclePolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_GetLifecyclePolicyPreview.go b/service/ecr/api_op_GetLifecyclePolicyPreview.go index 1dd4f056b01..f05612814dd 100644 --- a/service/ecr/api_op_GetLifecyclePolicyPreview.go +++ b/service/ecr/api_op_GetLifecyclePolicyPreview.go @@ -164,6 +164,9 @@ func (c *Client) addOperationGetLifecyclePolicyPreviewMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLifecyclePolicyPreviewValidationMiddleware(stack); err != nil { return err } @@ -188,107 +191,6 @@ func (c *Client) addOperationGetLifecyclePolicyPreviewMiddlewares(stack *middlew return nil } -// GetLifecyclePolicyPreviewAPIClient is a client that implements the -// GetLifecyclePolicyPreview operation. -type GetLifecyclePolicyPreviewAPIClient interface { - GetLifecyclePolicyPreview(context.Context, *GetLifecyclePolicyPreviewInput, ...func(*Options)) (*GetLifecyclePolicyPreviewOutput, error) -} - -var _ GetLifecyclePolicyPreviewAPIClient = (*Client)(nil) - -// GetLifecyclePolicyPreviewPaginatorOptions is the paginator options for -// GetLifecyclePolicyPreview -type GetLifecyclePolicyPreviewPaginatorOptions struct { - // The maximum number of repository results returned by - // GetLifecyclePolicyPreviewRequest in
 paginated output. When this parameter is - // used, GetLifecyclePolicyPreviewRequest only returns
 maxResults results in a - // single page along with a nextToken 
 response element. The remaining results of - // the initial request can be seen by sending
 another - // GetLifecyclePolicyPreviewRequest request with the returned nextToken 
 value. - // This value can be between 1 and 1000. If this
 parameter is not used, then - // GetLifecyclePolicyPreviewRequest returns up to
 100 results and a nextToken - // value, if
 applicable. This option cannot be used when you specify images with - // imageIds . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetLifecyclePolicyPreviewPaginator is a paginator for GetLifecyclePolicyPreview -type GetLifecyclePolicyPreviewPaginator struct { - options GetLifecyclePolicyPreviewPaginatorOptions - client GetLifecyclePolicyPreviewAPIClient - params *GetLifecyclePolicyPreviewInput - nextToken *string - firstPage bool -} - -// NewGetLifecyclePolicyPreviewPaginator returns a new -// GetLifecyclePolicyPreviewPaginator -func NewGetLifecyclePolicyPreviewPaginator(client GetLifecyclePolicyPreviewAPIClient, params *GetLifecyclePolicyPreviewInput, optFns ...func(*GetLifecyclePolicyPreviewPaginatorOptions)) *GetLifecyclePolicyPreviewPaginator { - if params == nil { - params = &GetLifecyclePolicyPreviewInput{} - } - - options := GetLifecyclePolicyPreviewPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetLifecyclePolicyPreviewPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetLifecyclePolicyPreviewPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetLifecyclePolicyPreview page. -func (p *GetLifecyclePolicyPreviewPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetLifecyclePolicyPreviewOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetLifecyclePolicyPreview(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // LifecyclePolicyPreviewCompleteWaiterOptions are waiter options for // LifecyclePolicyPreviewCompleteWaiter type LifecyclePolicyPreviewCompleteWaiterOptions struct { @@ -409,7 +311,13 @@ func (w *LifecyclePolicyPreviewCompleteWaiter) WaitForOutput(ctx context.Context } out, err := w.client.GetLifecyclePolicyPreview(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -484,6 +392,110 @@ func lifecyclePolicyPreviewCompleteStateRetryable(ctx context.Context, input *Ge return true, nil } +// GetLifecyclePolicyPreviewPaginatorOptions is the paginator options for +// GetLifecyclePolicyPreview +type GetLifecyclePolicyPreviewPaginatorOptions struct { + // The maximum number of repository results returned by + // GetLifecyclePolicyPreviewRequest in
 paginated output. When this parameter is + // used, GetLifecyclePolicyPreviewRequest only returns
 maxResults results in a + // single page along with a nextToken 
 response element. The remaining results of + // the initial request can be seen by sending
 another + // GetLifecyclePolicyPreviewRequest request with the returned nextToken 
 value. + // This value can be between 1 and 1000. If this
 parameter is not used, then + // GetLifecyclePolicyPreviewRequest returns up to
 100 results and a nextToken + // value, if
 applicable. This option cannot be used when you specify images with + // imageIds . + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// GetLifecyclePolicyPreviewPaginator is a paginator for GetLifecyclePolicyPreview +type GetLifecyclePolicyPreviewPaginator struct { + options GetLifecyclePolicyPreviewPaginatorOptions + client GetLifecyclePolicyPreviewAPIClient + params *GetLifecyclePolicyPreviewInput + nextToken *string + firstPage bool +} + +// NewGetLifecyclePolicyPreviewPaginator returns a new +// GetLifecyclePolicyPreviewPaginator +func NewGetLifecyclePolicyPreviewPaginator(client GetLifecyclePolicyPreviewAPIClient, params *GetLifecyclePolicyPreviewInput, optFns ...func(*GetLifecyclePolicyPreviewPaginatorOptions)) *GetLifecyclePolicyPreviewPaginator { + if params == nil { + params = &GetLifecyclePolicyPreviewInput{} + } + + options := GetLifecyclePolicyPreviewPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &GetLifecyclePolicyPreviewPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *GetLifecyclePolicyPreviewPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next GetLifecyclePolicyPreview page. +func (p *GetLifecyclePolicyPreviewPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetLifecyclePolicyPreviewOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.GetLifecyclePolicyPreview(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// GetLifecyclePolicyPreviewAPIClient is a client that implements the +// GetLifecyclePolicyPreview operation. +type GetLifecyclePolicyPreviewAPIClient interface { + GetLifecyclePolicyPreview(context.Context, *GetLifecyclePolicyPreviewInput, ...func(*Options)) (*GetLifecyclePolicyPreviewOutput, error) +} + +var _ GetLifecyclePolicyPreviewAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLifecyclePolicyPreview(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecr/api_op_GetRegistryPolicy.go b/service/ecr/api_op_GetRegistryPolicy.go index 5438b55e56e..1fdbfd743db 100644 --- a/service/ecr/api_op_GetRegistryPolicy.go +++ b/service/ecr/api_op_GetRegistryPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetRegistryPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegistryPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecr/api_op_GetRegistryScanningConfiguration.go b/service/ecr/api_op_GetRegistryScanningConfiguration.go index 7e583f4221d..743da7f8daf 100644 --- a/service/ecr/api_op_GetRegistryScanningConfiguration.go +++ b/service/ecr/api_op_GetRegistryScanningConfiguration.go @@ -103,6 +103,9 @@ func (c *Client) addOperationGetRegistryScanningConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegistryScanningConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecr/api_op_GetRepositoryPolicy.go b/service/ecr/api_op_GetRepositoryPolicy.go index 6abc8a9c2b4..3a515d6851f 100644 --- a/service/ecr/api_op_GetRepositoryPolicy.go +++ b/service/ecr/api_op_GetRepositoryPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetRepositoryPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_InitiateLayerUpload.go b/service/ecr/api_op_InitiateLayerUpload.go index b5999413eda..ff67fd8b639 100644 --- a/service/ecr/api_op_InitiateLayerUpload.go +++ b/service/ecr/api_op_InitiateLayerUpload.go @@ -122,6 +122,9 @@ func (c *Client) addOperationInitiateLayerUploadMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateLayerUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_ListImages.go b/service/ecr/api_op_ListImages.go index 3bd82c1faef..b6189be242f 100644 --- a/service/ecr/api_op_ListImages.go +++ b/service/ecr/api_op_ListImages.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListImagesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImagesValidationMiddleware(stack); err != nil { return err } @@ -168,13 +171,6 @@ func (c *Client) addOperationListImagesMiddlewares(stack *middleware.Stack, opti return nil } -// ListImagesAPIClient is a client that implements the ListImages operation. -type ListImagesAPIClient interface { - ListImages(context.Context, *ListImagesInput, ...func(*Options)) (*ListImagesOutput, error) -} - -var _ ListImagesAPIClient = (*Client)(nil) - // ListImagesPaginatorOptions is the paginator options for ListImages type ListImagesPaginatorOptions struct { // The maximum number of image results returned by ListImages in paginated output. @@ -244,6 +240,9 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +262,13 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListImagesAPIClient is a client that implements the ListImages operation. +type ListImagesAPIClient interface { + ListImages(context.Context, *ListImagesInput, ...func(*Options)) (*ListImagesOutput, error) +} + +var _ ListImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecr/api_op_ListTagsForResource.go b/service/ecr/api_op_ListTagsForResource.go index c21862665f0..91018b214ef 100644 --- a/service/ecr/api_op_ListTagsForResource.go +++ b/service/ecr/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutImage.go b/service/ecr/api_op_PutImage.go index 8e715a0a405..b3e0408ceb7 100644 --- a/service/ecr/api_op_PutImage.go +++ b/service/ecr/api_op_PutImage.go @@ -137,6 +137,9 @@ func (c *Client) addOperationPutImageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutImageScanningConfiguration.go b/service/ecr/api_op_PutImageScanningConfiguration.go index 8ee2ebf48dd..e938fe67705 100644 --- a/service/ecr/api_op_PutImageScanningConfiguration.go +++ b/service/ecr/api_op_PutImageScanningConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutImageScanningConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutImageScanningConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutImageTagMutability.go b/service/ecr/api_op_PutImageTagMutability.go index e5dd3addae0..56af0f8eef9 100644 --- a/service/ecr/api_op_PutImageTagMutability.go +++ b/service/ecr/api_op_PutImageTagMutability.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutImageTagMutabilityMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutImageTagMutabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutLifecyclePolicy.go b/service/ecr/api_op_PutLifecyclePolicy.go index a0e66428224..f40171a193e 100644 --- a/service/ecr/api_op_PutLifecyclePolicy.go +++ b/service/ecr/api_op_PutLifecyclePolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutLifecyclePolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutRegistryPolicy.go b/service/ecr/api_op_PutRegistryPolicy.go index c7c168d81bb..9cd55177cf6 100644 --- a/service/ecr/api_op_PutRegistryPolicy.go +++ b/service/ecr/api_op_PutRegistryPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutRegistryPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRegistryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutRegistryScanningConfiguration.go b/service/ecr/api_op_PutRegistryScanningConfiguration.go index dfcf5562c30..25297a0b4e9 100644 --- a/service/ecr/api_op_PutRegistryScanningConfiguration.go +++ b/service/ecr/api_op_PutRegistryScanningConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutRegistryScanningConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRegistryScanningConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_PutReplicationConfiguration.go b/service/ecr/api_op_PutReplicationConfiguration.go index 7bfc1f8f69b..ecf1447268b 100644 --- a/service/ecr/api_op_PutReplicationConfiguration.go +++ b/service/ecr/api_op_PutReplicationConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutReplicationConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_SetRepositoryPolicy.go b/service/ecr/api_op_SetRepositoryPolicy.go index 47c417af3f5..ef0e858c941 100644 --- a/service/ecr/api_op_SetRepositoryPolicy.go +++ b/service/ecr/api_op_SetRepositoryPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSetRepositoryPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetRepositoryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_StartImageScan.go b/service/ecr/api_op_StartImageScan.go index 84b53b79fad..4179195b871 100644 --- a/service/ecr/api_op_StartImageScan.go +++ b/service/ecr/api_op_StartImageScan.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartImageScanMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImageScanValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_StartLifecyclePolicyPreview.go b/service/ecr/api_op_StartLifecyclePolicyPreview.go index 14dd5e93468..575e4f4ada5 100644 --- a/service/ecr/api_op_StartLifecyclePolicyPreview.go +++ b/service/ecr/api_op_StartLifecyclePolicyPreview.go @@ -126,6 +126,9 @@ func (c *Client) addOperationStartLifecyclePolicyPreviewMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartLifecyclePolicyPreviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_TagResource.go b/service/ecr/api_op_TagResource.go index 496f38f2132..6e4eaa44ccc 100644 --- a/service/ecr/api_op_TagResource.go +++ b/service/ecr/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_UntagResource.go b/service/ecr/api_op_UntagResource.go index dbad704a47d..75ed6a0829f 100644 --- a/service/ecr/api_op_UntagResource.go +++ b/service/ecr/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_UpdatePullThroughCacheRule.go b/service/ecr/api_op_UpdatePullThroughCacheRule.go index 096958df177..e3ac086c297 100644 --- a/service/ecr/api_op_UpdatePullThroughCacheRule.go +++ b/service/ecr/api_op_UpdatePullThroughCacheRule.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdatePullThroughCacheRuleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePullThroughCacheRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_UploadLayerPart.go b/service/ecr/api_op_UploadLayerPart.go index 56ea327edbc..3af1294e344 100644 --- a/service/ecr/api_op_UploadLayerPart.go +++ b/service/ecr/api_op_UploadLayerPart.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUploadLayerPartMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadLayerPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecr/api_op_ValidatePullThroughCacheRule.go b/service/ecr/api_op_ValidatePullThroughCacheRule.go index eb56a280ac6..54ed6819a37 100644 --- a/service/ecr/api_op_ValidatePullThroughCacheRule.go +++ b/service/ecr/api_op_ValidatePullThroughCacheRule.go @@ -134,6 +134,9 @@ func (c *Client) addOperationValidatePullThroughCacheRuleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidatePullThroughCacheRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_client.go b/service/ecrpublic/api_client.go index 11c5fe46169..2f9cd537f1b 100644 --- a/service/ecrpublic/api_client.go +++ b/service/ecrpublic/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ecrpublic/api_op_BatchCheckLayerAvailability.go b/service/ecrpublic/api_op_BatchCheckLayerAvailability.go index 99671496cb6..04c11629722 100644 --- a/service/ecrpublic/api_op_BatchCheckLayerAvailability.go +++ b/service/ecrpublic/api_op_BatchCheckLayerAvailability.go @@ -127,6 +127,9 @@ func (c *Client) addOperationBatchCheckLayerAvailabilityMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCheckLayerAvailabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_BatchDeleteImage.go b/service/ecrpublic/api_op_BatchDeleteImage.go index f7f24e9b733..c4e5b038f7b 100644 --- a/service/ecrpublic/api_op_BatchDeleteImage.go +++ b/service/ecrpublic/api_op_BatchDeleteImage.go @@ -128,6 +128,9 @@ func (c *Client) addOperationBatchDeleteImageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_CompleteLayerUpload.go b/service/ecrpublic/api_op_CompleteLayerUpload.go index 1936f67daf7..7a84080e506 100644 --- a/service/ecrpublic/api_op_CompleteLayerUpload.go +++ b/service/ecrpublic/api_op_CompleteLayerUpload.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCompleteLayerUploadMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteLayerUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_CreateRepository.go b/service/ecrpublic/api_op_CreateRepository.go index a5eeece3d1a..9b2b6776206 100644 --- a/service/ecrpublic/api_op_CreateRepository.go +++ b/service/ecrpublic/api_op_CreateRepository.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_DeleteRepository.go b/service/ecrpublic/api_op_DeleteRepository.go index c0ece3eee46..e3d3e97b5e3 100644 --- a/service/ecrpublic/api_op_DeleteRepository.go +++ b/service/ecrpublic/api_op_DeleteRepository.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_DeleteRepositoryPolicy.go b/service/ecrpublic/api_op_DeleteRepositoryPolicy.go index 67557430228..af52d148b75 100644 --- a/service/ecrpublic/api_op_DeleteRepositoryPolicy.go +++ b/service/ecrpublic/api_op_DeleteRepositoryPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteRepositoryPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_DescribeImageTags.go b/service/ecrpublic/api_op_DescribeImageTags.go index 788a95f9dcf..959d3abfd73 100644 --- a/service/ecrpublic/api_op_DescribeImageTags.go +++ b/service/ecrpublic/api_op_DescribeImageTags.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeImageTagsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageTagsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeImageTagsMiddlewares(stack *middleware.Stac return nil } -// DescribeImageTagsAPIClient is a client that implements the DescribeImageTags -// operation. -type DescribeImageTagsAPIClient interface { - DescribeImageTags(context.Context, *DescribeImageTagsInput, ...func(*Options)) (*DescribeImageTagsOutput, error) -} - -var _ DescribeImageTagsAPIClient = (*Client)(nil) - // DescribeImageTagsPaginatorOptions is the paginator options for DescribeImageTags type DescribeImageTagsPaginatorOptions struct { // The maximum number of repository results that's returned by DescribeImageTags @@ -236,6 +231,9 @@ func (p *DescribeImageTagsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImageTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeImageTagsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeImageTagsAPIClient is a client that implements the DescribeImageTags +// operation. +type DescribeImageTagsAPIClient interface { + DescribeImageTags(context.Context, *DescribeImageTagsInput, ...func(*Options)) (*DescribeImageTagsOutput, error) +} + +var _ DescribeImageTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImageTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecrpublic/api_op_DescribeImages.go b/service/ecrpublic/api_op_DescribeImages.go index a35e3dddd46..2ffa0b71220 100644 --- a/service/ecrpublic/api_op_DescribeImages.go +++ b/service/ecrpublic/api_op_DescribeImages.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImagesValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, return nil } -// DescribeImagesAPIClient is a client that implements the DescribeImages -// operation. -type DescribeImagesAPIClient interface { - DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) -} - -var _ DescribeImagesAPIClient = (*Client)(nil) - // DescribeImagesPaginatorOptions is the paginator options for DescribeImages type DescribeImagesPaginatorOptions struct { // The maximum number of repository results that's returned by DescribeImages in @@ -245,6 +240,9 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeImagesAPIClient is a client that implements the DescribeImages +// operation. +type DescribeImagesAPIClient interface { + DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) +} + +var _ DescribeImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecrpublic/api_op_DescribeRegistries.go b/service/ecrpublic/api_op_DescribeRegistries.go index a872e433a7f..029d39b57ec 100644 --- a/service/ecrpublic/api_op_DescribeRegistries.go +++ b/service/ecrpublic/api_op_DescribeRegistries.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeRegistriesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRegistries(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeRegistriesMiddlewares(stack *middleware.Sta return nil } -// DescribeRegistriesAPIClient is a client that implements the DescribeRegistries -// operation. -type DescribeRegistriesAPIClient interface { - DescribeRegistries(context.Context, *DescribeRegistriesInput, ...func(*Options)) (*DescribeRegistriesOutput, error) -} - -var _ DescribeRegistriesAPIClient = (*Client)(nil) - // DescribeRegistriesPaginatorOptions is the paginator options for // DescribeRegistries type DescribeRegistriesPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeRegistriesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeRegistriesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeRegistriesAPIClient is a client that implements the DescribeRegistries +// operation. +type DescribeRegistriesAPIClient interface { + DescribeRegistries(context.Context, *DescribeRegistriesInput, ...func(*Options)) (*DescribeRegistriesOutput, error) +} + +var _ DescribeRegistriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecrpublic/api_op_DescribeRepositories.go b/service/ecrpublic/api_op_DescribeRepositories.go index 89869f280ed..8a4da736db9 100644 --- a/service/ecrpublic/api_op_DescribeRepositories.go +++ b/service/ecrpublic/api_op_DescribeRepositories.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeRepositoriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRepositories(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeRepositoriesMiddlewares(stack *middleware.S return nil } -// DescribeRepositoriesAPIClient is a client that implements the -// DescribeRepositories operation. -type DescribeRepositoriesAPIClient interface { - DescribeRepositories(context.Context, *DescribeRepositoriesInput, ...func(*Options)) (*DescribeRepositoriesOutput, error) -} - -var _ DescribeRepositoriesAPIClient = (*Client)(nil) - // DescribeRepositoriesPaginatorOptions is the paginator options for // DescribeRepositories type DescribeRepositoriesPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeRepositoriesAPIClient is a client that implements the +// DescribeRepositories operation. +type DescribeRepositoriesAPIClient interface { + DescribeRepositories(context.Context, *DescribeRepositoriesInput, ...func(*Options)) (*DescribeRepositoriesOutput, error) +} + +var _ DescribeRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecrpublic/api_op_GetAuthorizationToken.go b/service/ecrpublic/api_op_GetAuthorizationToken.go index aa7c70f288c..f7d7be98751 100644 --- a/service/ecrpublic/api_op_GetAuthorizationToken.go +++ b/service/ecrpublic/api_op_GetAuthorizationToken.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAuthorizationTokenMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAuthorizationToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecrpublic/api_op_GetRegistryCatalogData.go b/service/ecrpublic/api_op_GetRegistryCatalogData.go index 2210218c82f..570693600d3 100644 --- a/service/ecrpublic/api_op_GetRegistryCatalogData.go +++ b/service/ecrpublic/api_op_GetRegistryCatalogData.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetRegistryCatalogDataMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegistryCatalogData(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecrpublic/api_op_GetRepositoryCatalogData.go b/service/ecrpublic/api_op_GetRepositoryCatalogData.go index 738be2e1890..53307c7f37e 100644 --- a/service/ecrpublic/api_op_GetRepositoryCatalogData.go +++ b/service/ecrpublic/api_op_GetRepositoryCatalogData.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetRepositoryCatalogDataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryCatalogDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_GetRepositoryPolicy.go b/service/ecrpublic/api_op_GetRepositoryPolicy.go index b0580ab484b..59261d3a4fe 100644 --- a/service/ecrpublic/api_op_GetRepositoryPolicy.go +++ b/service/ecrpublic/api_op_GetRepositoryPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRepositoryPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_InitiateLayerUpload.go b/service/ecrpublic/api_op_InitiateLayerUpload.go index fa3a358a67f..1caa63286b2 100644 --- a/service/ecrpublic/api_op_InitiateLayerUpload.go +++ b/service/ecrpublic/api_op_InitiateLayerUpload.go @@ -122,6 +122,9 @@ func (c *Client) addOperationInitiateLayerUploadMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateLayerUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_ListTagsForResource.go b/service/ecrpublic/api_op_ListTagsForResource.go index 892d1936709..c8009ea6030 100644 --- a/service/ecrpublic/api_op_ListTagsForResource.go +++ b/service/ecrpublic/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_PutImage.go b/service/ecrpublic/api_op_PutImage.go index a166fbe114e..cc873279107 100644 --- a/service/ecrpublic/api_op_PutImage.go +++ b/service/ecrpublic/api_op_PutImage.go @@ -138,6 +138,9 @@ func (c *Client) addOperationPutImageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_PutRegistryCatalogData.go b/service/ecrpublic/api_op_PutRegistryCatalogData.go index f26716b0223..77d7ee7c228 100644 --- a/service/ecrpublic/api_op_PutRegistryCatalogData.go +++ b/service/ecrpublic/api_op_PutRegistryCatalogData.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutRegistryCatalogDataMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutRegistryCatalogData(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecrpublic/api_op_PutRepositoryCatalogData.go b/service/ecrpublic/api_op_PutRepositoryCatalogData.go index e21a3f6bb4a..e26ab748108 100644 --- a/service/ecrpublic/api_op_PutRepositoryCatalogData.go +++ b/service/ecrpublic/api_op_PutRepositoryCatalogData.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutRepositoryCatalogDataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRepositoryCatalogDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_SetRepositoryPolicy.go b/service/ecrpublic/api_op_SetRepositoryPolicy.go index 8b11229b8c6..97ab59c9030 100644 --- a/service/ecrpublic/api_op_SetRepositoryPolicy.go +++ b/service/ecrpublic/api_op_SetRepositoryPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSetRepositoryPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetRepositoryPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_TagResource.go b/service/ecrpublic/api_op_TagResource.go index ed9843a251a..69d5d5b9fcf 100644 --- a/service/ecrpublic/api_op_TagResource.go +++ b/service/ecrpublic/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_UntagResource.go b/service/ecrpublic/api_op_UntagResource.go index 6975faa8d72..447388c6a17 100644 --- a/service/ecrpublic/api_op_UntagResource.go +++ b/service/ecrpublic/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecrpublic/api_op_UploadLayerPart.go b/service/ecrpublic/api_op_UploadLayerPart.go index cd6c820d81b..cc4aa96e767 100644 --- a/service/ecrpublic/api_op_UploadLayerPart.go +++ b/service/ecrpublic/api_op_UploadLayerPart.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUploadLayerPartMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadLayerPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_client.go b/service/ecs/api_client.go index 5400d196adc..07c0763288f 100644 --- a/service/ecs/api_client.go +++ b/service/ecs/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ecs/api_op_CreateCapacityProvider.go b/service/ecs/api_op_CreateCapacityProvider.go index 9c4e68368b1..348eee8e36d 100644 --- a/service/ecs/api_op_CreateCapacityProvider.go +++ b/service/ecs/api_op_CreateCapacityProvider.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateCapacityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCapacityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_CreateCluster.go b/service/ecs/api_op_CreateCluster.go index 7de7592c291..6fb1a21ab95 100644 --- a/service/ecs/api_op_CreateCluster.go +++ b/service/ecs/api_op_CreateCluster.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_CreateService.go b/service/ecs/api_op_CreateService.go index 1d407b60074..b82e1fdbd3b 100644 --- a/service/ecs/api_op_CreateService.go +++ b/service/ecs/api_op_CreateService.go @@ -523,6 +523,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_CreateTaskSet.go b/service/ecs/api_op_CreateTaskSet.go index c9b83ee074b..1719591a74c 100644 --- a/service/ecs/api_op_CreateTaskSet.go +++ b/service/ecs/api_op_CreateTaskSet.go @@ -229,6 +229,9 @@ func (c *Client) addOperationCreateTaskSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTaskSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteAccountSetting.go b/service/ecs/api_op_DeleteAccountSetting.go index aabfc9bfb87..d52f95767f4 100644 --- a/service/ecs/api_op_DeleteAccountSetting.go +++ b/service/ecs/api_op_DeleteAccountSetting.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteAccountSettingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountSettingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteAttributes.go b/service/ecs/api_op_DeleteAttributes.go index 912fa3cbfb0..3cbc6fd3a26 100644 --- a/service/ecs/api_op_DeleteAttributes.go +++ b/service/ecs/api_op_DeleteAttributes.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteAttributesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteCapacityProvider.go b/service/ecs/api_op_DeleteCapacityProvider.go index 40adfd951a9..27ceb9e58f1 100644 --- a/service/ecs/api_op_DeleteCapacityProvider.go +++ b/service/ecs/api_op_DeleteCapacityProvider.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteCapacityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCapacityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteCluster.go b/service/ecs/api_op_DeleteCluster.go index 80f40eebf7b..c81fd5f0a6c 100644 --- a/service/ecs/api_op_DeleteCluster.go +++ b/service/ecs/api_op_DeleteCluster.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteService.go b/service/ecs/api_op_DeleteService.go index d9db5344e6f..36b635b8960 100644 --- a/service/ecs/api_op_DeleteService.go +++ b/service/ecs/api_op_DeleteService.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteTaskDefinitions.go b/service/ecs/api_op_DeleteTaskDefinitions.go index fb99ecef55a..d9c64c2500b 100644 --- a/service/ecs/api_op_DeleteTaskDefinitions.go +++ b/service/ecs/api_op_DeleteTaskDefinitions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteTaskDefinitionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTaskDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeleteTaskSet.go b/service/ecs/api_op_DeleteTaskSet.go index 7ee9c529329..f30ad441c15 100644 --- a/service/ecs/api_op_DeleteTaskSet.go +++ b/service/ecs/api_op_DeleteTaskSet.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteTaskSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTaskSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeregisterContainerInstance.go b/service/ecs/api_op_DeregisterContainerInstance.go index 3023f8fe694..5a9319c0964 100644 --- a/service/ecs/api_op_DeregisterContainerInstance.go +++ b/service/ecs/api_op_DeregisterContainerInstance.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDeregisterContainerInstanceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterContainerInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DeregisterTaskDefinition.go b/service/ecs/api_op_DeregisterTaskDefinition.go index 5d134b3bc03..c49f65c4ee7 100644 --- a/service/ecs/api_op_DeregisterTaskDefinition.go +++ b/service/ecs/api_op_DeregisterTaskDefinition.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeregisterTaskDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterTaskDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DescribeCapacityProviders.go b/service/ecs/api_op_DescribeCapacityProviders.go index 6a074676f8d..e204e8ccd62 100644 --- a/service/ecs/api_op_DescribeCapacityProviders.go +++ b/service/ecs/api_op_DescribeCapacityProviders.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeCapacityProvidersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityProviders(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecs/api_op_DescribeClusters.go b/service/ecs/api_op_DescribeClusters.go index 70532d012b8..26597018d7b 100644 --- a/service/ecs/api_op_DescribeClusters.go +++ b/service/ecs/api_op_DescribeClusters.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusters(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecs/api_op_DescribeContainerInstances.go b/service/ecs/api_op_DescribeContainerInstances.go index 5919aee9ce5..0585399ca63 100644 --- a/service/ecs/api_op_DescribeContainerInstances.go +++ b/service/ecs/api_op_DescribeContainerInstances.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeContainerInstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContainerInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DescribeServices.go b/service/ecs/api_op_DescribeServices.go index 68a99f53cb4..8d6a8a5f6f3 100644 --- a/service/ecs/api_op_DescribeServices.go +++ b/service/ecs/api_op_DescribeServices.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeServicesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeServicesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeServicesMiddlewares(stack *middleware.Stack return nil } -// DescribeServicesAPIClient is a client that implements the DescribeServices -// operation. -type DescribeServicesAPIClient interface { - DescribeServices(context.Context, *DescribeServicesInput, ...func(*Options)) (*DescribeServicesOutput, error) -} - -var _ DescribeServicesAPIClient = (*Client)(nil) - // ServicesInactiveWaiterOptions are waiter options for ServicesInactiveWaiter type ServicesInactiveWaiterOptions struct { @@ -273,7 +268,13 @@ func (w *ServicesInactiveWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeServices(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -477,7 +478,13 @@ func (w *ServicesStableWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeServices(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -611,6 +618,14 @@ func servicesStableStateRetryable(ctx context.Context, input *DescribeServicesIn return true, nil } +// DescribeServicesAPIClient is a client that implements the DescribeServices +// operation. +type DescribeServicesAPIClient interface { + DescribeServices(context.Context, *DescribeServicesInput, ...func(*Options)) (*DescribeServicesOutput, error) +} + +var _ DescribeServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_DescribeTaskDefinition.go b/service/ecs/api_op_DescribeTaskDefinition.go index 3e644457ff9..79cd1373dfe 100644 --- a/service/ecs/api_op_DescribeTaskDefinition.go +++ b/service/ecs/api_op_DescribeTaskDefinition.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeTaskDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTaskDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DescribeTaskSets.go b/service/ecs/api_op_DescribeTaskSets.go index 404cad87583..6dce1221f3e 100644 --- a/service/ecs/api_op_DescribeTaskSets.go +++ b/service/ecs/api_op_DescribeTaskSets.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeTaskSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTaskSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_DescribeTasks.go b/service/ecs/api_op_DescribeTasks.go index d70f9fba3d4..ce9a080694e 100644 --- a/service/ecs/api_op_DescribeTasks.go +++ b/service/ecs/api_op_DescribeTasks.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeTasksMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTasksValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationDescribeTasksMiddlewares(stack *middleware.Stack, o return nil } -// DescribeTasksAPIClient is a client that implements the DescribeTasks operation. -type DescribeTasksAPIClient interface { - DescribeTasks(context.Context, *DescribeTasksInput, ...func(*Options)) (*DescribeTasksOutput, error) -} - -var _ DescribeTasksAPIClient = (*Client)(nil) - // TasksRunningWaiterOptions are waiter options for TasksRunningWaiter type TasksRunningWaiterOptions struct { @@ -275,7 +271,13 @@ func (w *TasksRunningWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -510,7 +512,13 @@ func (w *TasksStoppedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeTasks(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -583,6 +591,13 @@ func tasksStoppedStateRetryable(ctx context.Context, input *DescribeTasksInput, return true, nil } +// DescribeTasksAPIClient is a client that implements the DescribeTasks operation. +type DescribeTasksAPIClient interface { + DescribeTasks(context.Context, *DescribeTasksInput, ...func(*Options)) (*DescribeTasksOutput, error) +} + +var _ DescribeTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_DiscoverPollEndpoint.go b/service/ecs/api_op_DiscoverPollEndpoint.go index dc34fafcb78..e9eec6506b4 100644 --- a/service/ecs/api_op_DiscoverPollEndpoint.go +++ b/service/ecs/api_op_DiscoverPollEndpoint.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDiscoverPollEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDiscoverPollEndpoint(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecs/api_op_ExecuteCommand.go b/service/ecs/api_op_ExecuteCommand.go index e9629d2ae88..5814681b838 100644 --- a/service/ecs/api_op_ExecuteCommand.go +++ b/service/ecs/api_op_ExecuteCommand.go @@ -152,6 +152,9 @@ func (c *Client) addOperationExecuteCommandMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteCommandValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_GetTaskProtection.go b/service/ecs/api_op_GetTaskProtection.go index 9ee64ce1235..dd982ceed23 100644 --- a/service/ecs/api_op_GetTaskProtection.go +++ b/service/ecs/api_op_GetTaskProtection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetTaskProtectionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTaskProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_ListAccountSettings.go b/service/ecs/api_op_ListAccountSettings.go index ea19f0afde4..0949d18b4f4 100644 --- a/service/ecs/api_op_ListAccountSettings.go +++ b/service/ecs/api_op_ListAccountSettings.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListAccountSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountSettings(options.Region), middleware.Before); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListAccountSettingsMiddlewares(stack *middleware.St return nil } -// ListAccountSettingsAPIClient is a client that implements the -// ListAccountSettings operation. -type ListAccountSettingsAPIClient interface { - ListAccountSettings(context.Context, *ListAccountSettingsInput, ...func(*Options)) (*ListAccountSettingsOutput, error) -} - -var _ ListAccountSettingsAPIClient = (*Client)(nil) - // ListAccountSettingsPaginatorOptions is the paginator options for // ListAccountSettings type ListAccountSettingsPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *ListAccountSettingsPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *ListAccountSettingsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAccountSettingsAPIClient is a client that implements the +// ListAccountSettings operation. +type ListAccountSettingsAPIClient interface { + ListAccountSettings(context.Context, *ListAccountSettingsInput, ...func(*Options)) (*ListAccountSettingsOutput, error) +} + +var _ ListAccountSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListAttributes.go b/service/ecs/api_op_ListAttributes.go index 7883282fec7..da2620c2f8a 100644 --- a/service/ecs/api_op_ListAttributes.go +++ b/service/ecs/api_op_ListAttributes.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListAttributesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttributesValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListAttributesMiddlewares(stack *middleware.Stack, return nil } -// ListAttributesAPIClient is a client that implements the ListAttributes -// operation. -type ListAttributesAPIClient interface { - ListAttributes(context.Context, *ListAttributesInput, ...func(*Options)) (*ListAttributesOutput, error) -} - -var _ ListAttributesAPIClient = (*Client)(nil) - // ListAttributesPaginatorOptions is the paginator options for ListAttributes type ListAttributesPaginatorOptions struct { // The maximum number of cluster results that ListAttributes returned in paginated @@ -248,6 +243,9 @@ func (p *ListAttributesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *ListAttributesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAttributesAPIClient is a client that implements the ListAttributes +// operation. +type ListAttributesAPIClient interface { + ListAttributes(context.Context, *ListAttributesInput, ...func(*Options)) (*ListAttributesOutput, error) +} + +var _ ListAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListClusters.go b/service/ecs/api_op_ListClusters.go index ba7639d3c50..b1c47ecaa42 100644 --- a/service/ecs/api_op_ListClusters.go +++ b/service/ecs/api_op_ListClusters.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // The maximum number of cluster results that ListClusters returned in paginated @@ -222,6 +218,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListContainerInstances.go b/service/ecs/api_op_ListContainerInstances.go index b645435bd35..0798d41653b 100644 --- a/service/ecs/api_op_ListContainerInstances.go +++ b/service/ecs/api_op_ListContainerInstances.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListContainerInstancesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContainerInstances(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListContainerInstancesMiddlewares(stack *middleware return nil } -// ListContainerInstancesAPIClient is a client that implements the -// ListContainerInstances operation. -type ListContainerInstancesAPIClient interface { - ListContainerInstances(context.Context, *ListContainerInstancesInput, ...func(*Options)) (*ListContainerInstancesOutput, error) -} - -var _ ListContainerInstancesAPIClient = (*Client)(nil) - // ListContainerInstancesPaginatorOptions is the paginator options for // ListContainerInstances type ListContainerInstancesPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *ListContainerInstancesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContainerInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListContainerInstancesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListContainerInstancesAPIClient is a client that implements the +// ListContainerInstances operation. +type ListContainerInstancesAPIClient interface { + ListContainerInstances(context.Context, *ListContainerInstancesInput, ...func(*Options)) (*ListContainerInstancesOutput, error) +} + +var _ ListContainerInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContainerInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListServices.go b/service/ecs/api_op_ListServices.go index 71db4d35ade..363972652d1 100644 --- a/service/ecs/api_op_ListServices.go +++ b/service/ecs/api_op_ListServices.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServices(options.Region), middleware.Before); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of service results that ListServices returned in paginated @@ -235,6 +231,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +253,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListServicesByNamespace.go b/service/ecs/api_op_ListServicesByNamespace.go index b903abfd00c..7c8275543c5 100644 --- a/service/ecs/api_op_ListServicesByNamespace.go +++ b/service/ecs/api_op_ListServicesByNamespace.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListServicesByNamespaceMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicesByNamespaceValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListServicesByNamespaceMiddlewares(stack *middlewar return nil } -// ListServicesByNamespaceAPIClient is a client that implements the -// ListServicesByNamespace operation. -type ListServicesByNamespaceAPIClient interface { - ListServicesByNamespace(context.Context, *ListServicesByNamespaceInput, ...func(*Options)) (*ListServicesByNamespaceOutput, error) -} - -var _ ListServicesByNamespaceAPIClient = (*Client)(nil) - // ListServicesByNamespacePaginatorOptions is the paginator options for // ListServicesByNamespace type ListServicesByNamespacePaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListServicesByNamespacePaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServicesByNamespace(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListServicesByNamespacePaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListServicesByNamespaceAPIClient is a client that implements the +// ListServicesByNamespace operation. +type ListServicesByNamespaceAPIClient interface { + ListServicesByNamespace(context.Context, *ListServicesByNamespaceInput, ...func(*Options)) (*ListServicesByNamespaceOutput, error) +} + +var _ ListServicesByNamespaceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServicesByNamespace(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListTagsForResource.go b/service/ecs/api_op_ListTagsForResource.go index e73c59875d4..a1ea12a9e20 100644 --- a/service/ecs/api_op_ListTagsForResource.go +++ b/service/ecs/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_ListTaskDefinitionFamilies.go b/service/ecs/api_op_ListTaskDefinitionFamilies.go index 53f4bb51fce..cf0ded1f0ed 100644 --- a/service/ecs/api_op_ListTaskDefinitionFamilies.go +++ b/service/ecs/api_op_ListTaskDefinitionFamilies.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListTaskDefinitionFamiliesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTaskDefinitionFamilies(options.Region), middleware.Before); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListTaskDefinitionFamiliesMiddlewares(stack *middle return nil } -// ListTaskDefinitionFamiliesAPIClient is a client that implements the -// ListTaskDefinitionFamilies operation. -type ListTaskDefinitionFamiliesAPIClient interface { - ListTaskDefinitionFamilies(context.Context, *ListTaskDefinitionFamiliesInput, ...func(*Options)) (*ListTaskDefinitionFamiliesOutput, error) -} - -var _ ListTaskDefinitionFamiliesAPIClient = (*Client)(nil) - // ListTaskDefinitionFamiliesPaginatorOptions is the paginator options for // ListTaskDefinitionFamilies type ListTaskDefinitionFamiliesPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListTaskDefinitionFamiliesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTaskDefinitionFamilies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListTaskDefinitionFamiliesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListTaskDefinitionFamiliesAPIClient is a client that implements the +// ListTaskDefinitionFamilies operation. +type ListTaskDefinitionFamiliesAPIClient interface { + ListTaskDefinitionFamilies(context.Context, *ListTaskDefinitionFamiliesInput, ...func(*Options)) (*ListTaskDefinitionFamiliesOutput, error) +} + +var _ ListTaskDefinitionFamiliesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTaskDefinitionFamilies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListTaskDefinitions.go b/service/ecs/api_op_ListTaskDefinitions.go index 9937917a391..b3722a49ca2 100644 --- a/service/ecs/api_op_ListTaskDefinitions.go +++ b/service/ecs/api_op_ListTaskDefinitions.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListTaskDefinitionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTaskDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListTaskDefinitionsMiddlewares(stack *middleware.St return nil } -// ListTaskDefinitionsAPIClient is a client that implements the -// ListTaskDefinitions operation. -type ListTaskDefinitionsAPIClient interface { - ListTaskDefinitions(context.Context, *ListTaskDefinitionsInput, ...func(*Options)) (*ListTaskDefinitionsOutput, error) -} - -var _ ListTaskDefinitionsAPIClient = (*Client)(nil) - // ListTaskDefinitionsPaginatorOptions is the paginator options for // ListTaskDefinitions type ListTaskDefinitionsPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListTaskDefinitionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTaskDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListTaskDefinitionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTaskDefinitionsAPIClient is a client that implements the +// ListTaskDefinitions operation. +type ListTaskDefinitionsAPIClient interface { + ListTaskDefinitions(context.Context, *ListTaskDefinitionsInput, ...func(*Options)) (*ListTaskDefinitionsOutput, error) +} + +var _ ListTaskDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTaskDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_ListTasks.go b/service/ecs/api_op_ListTasks.go index 0ce29fd0491..860532f3153 100644 --- a/service/ecs/api_op_ListTasks.go +++ b/service/ecs/api_op_ListTasks.go @@ -170,6 +170,9 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTasks(options.Region), middleware.Before); err != nil { return err } @@ -191,13 +194,6 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio return nil } -// ListTasksAPIClient is a client that implements the ListTasks operation. -type ListTasksAPIClient interface { - ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) -} - -var _ ListTasksAPIClient = (*Client)(nil) - // ListTasksPaginatorOptions is the paginator options for ListTasks type ListTasksPaginatorOptions struct { // The maximum number of task results that ListTasks returned in paginated output. @@ -267,6 +263,9 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +285,13 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListTasksAPIClient is a client that implements the ListTasks operation. +type ListTasksAPIClient interface { + ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) +} + +var _ ListTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ecs/api_op_PutAccountSetting.go b/service/ecs/api_op_PutAccountSetting.go index 749c074d54a..e2218e6a5ea 100644 --- a/service/ecs/api_op_PutAccountSetting.go +++ b/service/ecs/api_op_PutAccountSetting.go @@ -217,6 +217,9 @@ func (c *Client) addOperationPutAccountSettingMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountSettingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_PutAccountSettingDefault.go b/service/ecs/api_op_PutAccountSettingDefault.go index a587b942ccf..cbe46168834 100644 --- a/service/ecs/api_op_PutAccountSettingDefault.go +++ b/service/ecs/api_op_PutAccountSettingDefault.go @@ -200,6 +200,9 @@ func (c *Client) addOperationPutAccountSettingDefaultMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountSettingDefaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_PutAttributes.go b/service/ecs/api_op_PutAttributes.go index 3e88bd5fc4f..1ee4df77834 100644 --- a/service/ecs/api_op_PutAttributes.go +++ b/service/ecs/api_op_PutAttributes.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutAttributesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_PutClusterCapacityProviders.go b/service/ecs/api_op_PutClusterCapacityProviders.go index 62378f89389..45933eb8869 100644 --- a/service/ecs/api_op_PutClusterCapacityProviders.go +++ b/service/ecs/api_op_PutClusterCapacityProviders.go @@ -159,6 +159,9 @@ func (c *Client) addOperationPutClusterCapacityProvidersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutClusterCapacityProvidersValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_RegisterContainerInstance.go b/service/ecs/api_op_RegisterContainerInstance.go index c6b7976d8a4..5b487e1a960 100644 --- a/service/ecs/api_op_RegisterContainerInstance.go +++ b/service/ecs/api_op_RegisterContainerInstance.go @@ -165,6 +165,9 @@ func (c *Client) addOperationRegisterContainerInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterContainerInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_RegisterTaskDefinition.go b/service/ecs/api_op_RegisterTaskDefinition.go index b3a5a435e90..ba2ec831029 100644 --- a/service/ecs/api_op_RegisterTaskDefinition.go +++ b/service/ecs/api_op_RegisterTaskDefinition.go @@ -415,6 +415,9 @@ func (c *Client) addOperationRegisterTaskDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTaskDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_RunTask.go b/service/ecs/api_op_RunTask.go index 89ed00306be..9bd20b97508 100644 --- a/service/ecs/api_op_RunTask.go +++ b/service/ecs/api_op_RunTask.go @@ -350,6 +350,9 @@ func (c *Client) addOperationRunTaskMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRunTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/ecs/api_op_StartTask.go b/service/ecs/api_op_StartTask.go index cb542a8a3a2..7e12e624195 100644 --- a/service/ecs/api_op_StartTask.go +++ b/service/ecs/api_op_StartTask.go @@ -229,6 +229,9 @@ func (c *Client) addOperationStartTaskMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_StopTask.go b/service/ecs/api_op_StopTask.go index d0d2c228db8..ec18da77027 100644 --- a/service/ecs/api_op_StopTask.go +++ b/service/ecs/api_op_StopTask.go @@ -133,6 +133,9 @@ func (c *Client) addOperationStopTaskMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_SubmitAttachmentStateChanges.go b/service/ecs/api_op_SubmitAttachmentStateChanges.go index 504c9f9c74d..461e21cf22f 100644 --- a/service/ecs/api_op_SubmitAttachmentStateChanges.go +++ b/service/ecs/api_op_SubmitAttachmentStateChanges.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSubmitAttachmentStateChangesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitAttachmentStateChangesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_SubmitContainerStateChange.go b/service/ecs/api_op_SubmitContainerStateChange.go index 9d86e33e9ff..dc9c1145e2e 100644 --- a/service/ecs/api_op_SubmitContainerStateChange.go +++ b/service/ecs/api_op_SubmitContainerStateChange.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSubmitContainerStateChangeMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSubmitContainerStateChange(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ecs/api_op_SubmitTaskStateChange.go b/service/ecs/api_op_SubmitTaskStateChange.go index 07bbc9c490b..a822028d00c 100644 --- a/service/ecs/api_op_SubmitTaskStateChange.go +++ b/service/ecs/api_op_SubmitTaskStateChange.go @@ -136,6 +136,9 @@ func (c *Client) addOperationSubmitTaskStateChangeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitTaskStateChangeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_TagResource.go b/service/ecs/api_op_TagResource.go index 86dfa535493..5f9cb6b874d 100644 --- a/service/ecs/api_op_TagResource.go +++ b/service/ecs/api_op_TagResource.go @@ -135,6 +135,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UntagResource.go b/service/ecs/api_op_UntagResource.go index f05d4f7b3ad..40ddb851272 100644 --- a/service/ecs/api_op_UntagResource.go +++ b/service/ecs/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateCapacityProvider.go b/service/ecs/api_op_UpdateCapacityProvider.go index 27048112e7a..315ea2b7316 100644 --- a/service/ecs/api_op_UpdateCapacityProvider.go +++ b/service/ecs/api_op_UpdateCapacityProvider.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateCapacityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCapacityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateCluster.go b/service/ecs/api_op_UpdateCluster.go index 9b3fbababc1..9e3cffe09b2 100644 --- a/service/ecs/api_op_UpdateCluster.go +++ b/service/ecs/api_op_UpdateCluster.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateClusterSettings.go b/service/ecs/api_op_UpdateClusterSettings.go index 0be3fe0716b..95d41b222df 100644 --- a/service/ecs/api_op_UpdateClusterSettings.go +++ b/service/ecs/api_op_UpdateClusterSettings.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateClusterSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateContainerAgent.go b/service/ecs/api_op_UpdateContainerAgent.go index b891280c7f8..9606709d9bc 100644 --- a/service/ecs/api_op_UpdateContainerAgent.go +++ b/service/ecs/api_op_UpdateContainerAgent.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateContainerAgentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContainerAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateContainerInstancesState.go b/service/ecs/api_op_UpdateContainerInstancesState.go index 97318f24f39..64596e17471 100644 --- a/service/ecs/api_op_UpdateContainerInstancesState.go +++ b/service/ecs/api_op_UpdateContainerInstancesState.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateContainerInstancesStateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContainerInstancesStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateService.go b/service/ecs/api_op_UpdateService.go index fd8dbabbaec..51865e1abcd 100644 --- a/service/ecs/api_op_UpdateService.go +++ b/service/ecs/api_op_UpdateService.go @@ -412,6 +412,9 @@ func (c *Client) addOperationUpdateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateServicePrimaryTaskSet.go b/service/ecs/api_op_UpdateServicePrimaryTaskSet.go index 7ba9d0be3a8..6a697139c68 100644 --- a/service/ecs/api_op_UpdateServicePrimaryTaskSet.go +++ b/service/ecs/api_op_UpdateServicePrimaryTaskSet.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateServicePrimaryTaskSetMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServicePrimaryTaskSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateTaskProtection.go b/service/ecs/api_op_UpdateTaskProtection.go index ab2f77c4d29..5a10397224d 100644 --- a/service/ecs/api_op_UpdateTaskProtection.go +++ b/service/ecs/api_op_UpdateTaskProtection.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateTaskProtectionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTaskProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ecs/api_op_UpdateTaskSet.go b/service/ecs/api_op_UpdateTaskSet.go index d3b07090eb6..0d7ffa4a9a0 100644 --- a/service/ecs/api_op_UpdateTaskSet.go +++ b/service/ecs/api_op_UpdateTaskSet.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateTaskSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTaskSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_client.go b/service/efs/api_client.go index 1cfbc7c0d70..b3ef761ea55 100644 --- a/service/efs/api_client.go +++ b/service/efs/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/efs/api_op_CreateAccessPoint.go b/service/efs/api_op_CreateAccessPoint.go index b3656d6697b..360542f83ae 100644 --- a/service/efs/api_op_CreateAccessPoint.go +++ b/service/efs/api_op_CreateAccessPoint.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreateAccessPointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessPointMiddleware(stack, options); err != nil { return err } diff --git a/service/efs/api_op_CreateFileSystem.go b/service/efs/api_op_CreateFileSystem.go index 7172185306b..88f1b1862a6 100644 --- a/service/efs/api_op_CreateFileSystem.go +++ b/service/efs/api_op_CreateFileSystem.go @@ -366,6 +366,9 @@ func (c *Client) addOperationCreateFileSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFileSystemMiddleware(stack, options); err != nil { return err } diff --git a/service/efs/api_op_CreateMountTarget.go b/service/efs/api_op_CreateMountTarget.go index cf63eb83f4d..d192f3b6934 100644 --- a/service/efs/api_op_CreateMountTarget.go +++ b/service/efs/api_op_CreateMountTarget.go @@ -268,6 +268,9 @@ func (c *Client) addOperationCreateMountTargetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMountTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_CreateReplicationConfiguration.go b/service/efs/api_op_CreateReplicationConfiguration.go index 19c05d6ba6b..621739068b8 100644 --- a/service/efs/api_op_CreateReplicationConfiguration.go +++ b/service/efs/api_op_CreateReplicationConfiguration.go @@ -206,6 +206,9 @@ func (c *Client) addOperationCreateReplicationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_CreateTags.go b/service/efs/api_op_CreateTags.go index a36e47c535b..0aacccfff2f 100644 --- a/service/efs/api_op_CreateTags.go +++ b/service/efs/api_op_CreateTags.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DeleteAccessPoint.go b/service/efs/api_op_DeleteAccessPoint.go index 64c1c598e67..94d7c43f25e 100644 --- a/service/efs/api_op_DeleteAccessPoint.go +++ b/service/efs/api_op_DeleteAccessPoint.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAccessPointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DeleteFileSystem.go b/service/efs/api_op_DeleteFileSystem.go index 004a7d4c00c..580afb6f3d7 100644 --- a/service/efs/api_op_DeleteFileSystem.go +++ b/service/efs/api_op_DeleteFileSystem.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteFileSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFileSystemValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DeleteFileSystemPolicy.go b/service/efs/api_op_DeleteFileSystemPolicy.go index d0e5462234f..c5751653e30 100644 --- a/service/efs/api_op_DeleteFileSystemPolicy.go +++ b/service/efs/api_op_DeleteFileSystemPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteFileSystemPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFileSystemPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DeleteMountTarget.go b/service/efs/api_op_DeleteMountTarget.go index 1cd2f0e1158..d5d4a62da7d 100644 --- a/service/efs/api_op_DeleteMountTarget.go +++ b/service/efs/api_op_DeleteMountTarget.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteMountTargetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMountTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DeleteReplicationConfiguration.go b/service/efs/api_op_DeleteReplicationConfiguration.go index 5bb5adb64e6..d6da9756e0a 100644 --- a/service/efs/api_op_DeleteReplicationConfiguration.go +++ b/service/efs/api_op_DeleteReplicationConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteReplicationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DeleteTags.go b/service/efs/api_op_DeleteTags.go index 37436e73924..e8c6dfe06ea 100644 --- a/service/efs/api_op_DeleteTags.go +++ b/service/efs/api_op_DeleteTags.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DescribeAccessPoints.go b/service/efs/api_op_DescribeAccessPoints.go index caf5e22925e..e35cf71c0e9 100644 --- a/service/efs/api_op_DescribeAccessPoints.go +++ b/service/efs/api_op_DescribeAccessPoints.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeAccessPointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccessPoints(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeAccessPointsMiddlewares(stack *middleware.S return nil } -// DescribeAccessPointsAPIClient is a client that implements the -// DescribeAccessPoints operation. -type DescribeAccessPointsAPIClient interface { - DescribeAccessPoints(context.Context, *DescribeAccessPointsInput, ...func(*Options)) (*DescribeAccessPointsOutput, error) -} - -var _ DescribeAccessPointsAPIClient = (*Client)(nil) - // DescribeAccessPointsPaginatorOptions is the paginator options for // DescribeAccessPoints type DescribeAccessPointsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeAccessPointsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAccessPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeAccessPointsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeAccessPointsAPIClient is a client that implements the +// DescribeAccessPoints operation. +type DescribeAccessPointsAPIClient interface { + DescribeAccessPoints(context.Context, *DescribeAccessPointsInput, ...func(*Options)) (*DescribeAccessPointsOutput, error) +} + +var _ DescribeAccessPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAccessPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/efs/api_op_DescribeAccountPreferences.go b/service/efs/api_op_DescribeAccountPreferences.go index 9d36f80ce26..71d64a584a5 100644 --- a/service/efs/api_op_DescribeAccountPreferences.go +++ b/service/efs/api_op_DescribeAccountPreferences.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeAccountPreferencesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountPreferences(options.Region), middleware.Before); err != nil { return err } diff --git a/service/efs/api_op_DescribeBackupPolicy.go b/service/efs/api_op_DescribeBackupPolicy.go index a6492417b40..0eab8ba5ca2 100644 --- a/service/efs/api_op_DescribeBackupPolicy.go +++ b/service/efs/api_op_DescribeBackupPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeBackupPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBackupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DescribeFileSystemPolicy.go b/service/efs/api_op_DescribeFileSystemPolicy.go index 7aace8dd3a0..e99cdba6dbc 100644 --- a/service/efs/api_op_DescribeFileSystemPolicy.go +++ b/service/efs/api_op_DescribeFileSystemPolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeFileSystemPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFileSystemPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DescribeFileSystems.go b/service/efs/api_op_DescribeFileSystems.go index e7afa432161..6ec2b2771d0 100644 --- a/service/efs/api_op_DescribeFileSystems.go +++ b/service/efs/api_op_DescribeFileSystems.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeFileSystemsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFileSystems(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeFileSystemsMiddlewares(stack *middleware.St return nil } -// DescribeFileSystemsAPIClient is a client that implements the -// DescribeFileSystems operation. -type DescribeFileSystemsAPIClient interface { - DescribeFileSystems(context.Context, *DescribeFileSystemsInput, ...func(*Options)) (*DescribeFileSystemsOutput, error) -} - -var _ DescribeFileSystemsAPIClient = (*Client)(nil) - // DescribeFileSystemsPaginatorOptions is the paginator options for // DescribeFileSystems type DescribeFileSystemsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFileSystems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeFileSystemsAPIClient is a client that implements the +// DescribeFileSystems operation. +type DescribeFileSystemsAPIClient interface { + DescribeFileSystems(context.Context, *DescribeFileSystemsInput, ...func(*Options)) (*DescribeFileSystemsOutput, error) +} + +var _ DescribeFileSystemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFileSystems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/efs/api_op_DescribeLifecycleConfiguration.go b/service/efs/api_op_DescribeLifecycleConfiguration.go index f94cf488128..2affaf0c86c 100644 --- a/service/efs/api_op_DescribeLifecycleConfiguration.go +++ b/service/efs/api_op_DescribeLifecycleConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeLifecycleConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLifecycleConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DescribeMountTargetSecurityGroups.go b/service/efs/api_op_DescribeMountTargetSecurityGroups.go index 826655106a3..ae591dc951f 100644 --- a/service/efs/api_op_DescribeMountTargetSecurityGroups.go +++ b/service/efs/api_op_DescribeMountTargetSecurityGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeMountTargetSecurityGroupsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMountTargetSecurityGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_DescribeMountTargets.go b/service/efs/api_op_DescribeMountTargets.go index b4bdbc5d500..92bd1d9a835 100644 --- a/service/efs/api_op_DescribeMountTargets.go +++ b/service/efs/api_op_DescribeMountTargets.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeMountTargetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMountTargets(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeMountTargetsMiddlewares(stack *middleware.S return nil } -// DescribeMountTargetsAPIClient is a client that implements the -// DescribeMountTargets operation. -type DescribeMountTargetsAPIClient interface { - DescribeMountTargets(context.Context, *DescribeMountTargetsInput, ...func(*Options)) (*DescribeMountTargetsOutput, error) -} - -var _ DescribeMountTargetsAPIClient = (*Client)(nil) - // DescribeMountTargetsPaginatorOptions is the paginator options for // DescribeMountTargets type DescribeMountTargetsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeMountTargetsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMountTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeMountTargetsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeMountTargetsAPIClient is a client that implements the +// DescribeMountTargets operation. +type DescribeMountTargetsAPIClient interface { + DescribeMountTargets(context.Context, *DescribeMountTargetsInput, ...func(*Options)) (*DescribeMountTargetsOutput, error) +} + +var _ DescribeMountTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMountTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/efs/api_op_DescribeReplicationConfigurations.go b/service/efs/api_op_DescribeReplicationConfigurations.go index 880370506fe..833ac6c52d1 100644 --- a/service/efs/api_op_DescribeReplicationConfigurations.go +++ b/service/efs/api_op_DescribeReplicationConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeReplicationConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplicationConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeReplicationConfigurationsMiddlewares(stack return nil } -// DescribeReplicationConfigurationsAPIClient is a client that implements the -// DescribeReplicationConfigurations operation. -type DescribeReplicationConfigurationsAPIClient interface { - DescribeReplicationConfigurations(context.Context, *DescribeReplicationConfigurationsInput, ...func(*Options)) (*DescribeReplicationConfigurationsOutput, error) -} - -var _ DescribeReplicationConfigurationsAPIClient = (*Client)(nil) - // DescribeReplicationConfigurationsPaginatorOptions is the paginator options for // DescribeReplicationConfigurations type DescribeReplicationConfigurationsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeReplicationConfigurationsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeReplicationConfigurationsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeReplicationConfigurationsAPIClient is a client that implements the +// DescribeReplicationConfigurations operation. +type DescribeReplicationConfigurationsAPIClient interface { + DescribeReplicationConfigurations(context.Context, *DescribeReplicationConfigurationsInput, ...func(*Options)) (*DescribeReplicationConfigurationsOutput, error) +} + +var _ DescribeReplicationConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/efs/api_op_DescribeTags.go b/service/efs/api_op_DescribeTags.go index efdc41780d9..77eb0927ebe 100644 --- a/service/efs/api_op_DescribeTags.go +++ b/service/efs/api_op_DescribeTags.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeTagsAPIClient is a client that implements the DescribeTags operation. -type DescribeTagsAPIClient interface { - DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) -} - -var _ DescribeTagsAPIClient = (*Client)(nil) - // DescribeTagsPaginatorOptions is the paginator options for DescribeTags type DescribeTagsPaginatorOptions struct { // (Optional) The maximum number of file system tags to return in the response. @@ -234,6 +230,9 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeTagsAPIClient is a client that implements the DescribeTags operation. +type DescribeTagsAPIClient interface { + DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) +} + +var _ DescribeTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/efs/api_op_ListTagsForResource.go b/service/efs/api_op_ListTagsForResource.go index 9ff07ac61e5..e6d12a4e052 100644 --- a/service/efs/api_op_ListTagsForResource.go +++ b/service/efs/api_op_ListTagsForResource.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/efs/api_op_ModifyMountTargetSecurityGroups.go b/service/efs/api_op_ModifyMountTargetSecurityGroups.go index b0ad2739835..a75e4b5c541 100644 --- a/service/efs/api_op_ModifyMountTargetSecurityGroups.go +++ b/service/efs/api_op_ModifyMountTargetSecurityGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationModifyMountTargetSecurityGroupsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyMountTargetSecurityGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_PutAccountPreferences.go b/service/efs/api_op_PutAccountPreferences.go index 51689ed34b8..1edf89f1e02 100644 --- a/service/efs/api_op_PutAccountPreferences.go +++ b/service/efs/api_op_PutAccountPreferences.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutAccountPreferencesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_PutBackupPolicy.go b/service/efs/api_op_PutBackupPolicy.go index 3f8c72bb955..9f489fbb3fd 100644 --- a/service/efs/api_op_PutBackupPolicy.go +++ b/service/efs/api_op_PutBackupPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutBackupPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBackupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_PutFileSystemPolicy.go b/service/efs/api_op_PutFileSystemPolicy.go index ade32469c06..580820cf2fb 100644 --- a/service/efs/api_op_PutFileSystemPolicy.go +++ b/service/efs/api_op_PutFileSystemPolicy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutFileSystemPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFileSystemPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_PutLifecycleConfiguration.go b/service/efs/api_op_PutLifecycleConfiguration.go index 391a6f794ba..3d867d53c1f 100644 --- a/service/efs/api_op_PutLifecycleConfiguration.go +++ b/service/efs/api_op_PutLifecycleConfiguration.go @@ -189,6 +189,9 @@ func (c *Client) addOperationPutLifecycleConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLifecycleConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_TagResource.go b/service/efs/api_op_TagResource.go index 1c34ae06fe9..e7849b6aac6 100644 --- a/service/efs/api_op_TagResource.go +++ b/service/efs/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_UntagResource.go b/service/efs/api_op_UntagResource.go index 9c939dd044d..aef4fbe330a 100644 --- a/service/efs/api_op_UntagResource.go +++ b/service/efs/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_UpdateFileSystem.go b/service/efs/api_op_UpdateFileSystem.go index 622f6845cd2..d4a4cdbcbc3 100644 --- a/service/efs/api_op_UpdateFileSystem.go +++ b/service/efs/api_op_UpdateFileSystem.go @@ -219,6 +219,9 @@ func (c *Client) addOperationUpdateFileSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFileSystemValidationMiddleware(stack); err != nil { return err } diff --git a/service/efs/api_op_UpdateFileSystemProtection.go b/service/efs/api_op_UpdateFileSystemProtection.go index bbed9f316d0..1231a74db8a 100644 --- a/service/efs/api_op_UpdateFileSystemProtection.go +++ b/service/efs/api_op_UpdateFileSystemProtection.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateFileSystemProtectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFileSystemProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_client.go b/service/eks/api_client.go index 50fce3b59ca..830fd4f8608 100644 --- a/service/eks/api_client.go +++ b/service/eks/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/eks/api_op_AssociateAccessPolicy.go b/service/eks/api_op_AssociateAccessPolicy.go index 8832e272231..5eac00cdbf0 100644 --- a/service/eks/api_op_AssociateAccessPolicy.go +++ b/service/eks/api_op_AssociateAccessPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationAssociateAccessPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_AssociateEncryptionConfig.go b/service/eks/api_op_AssociateEncryptionConfig.go index fa379930ba5..bc832fb1fcd 100644 --- a/service/eks/api_op_AssociateEncryptionConfig.go +++ b/service/eks/api_op_AssociateEncryptionConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateEncryptionConfigMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateEncryptionConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_AssociateIdentityProviderConfig.go b/service/eks/api_op_AssociateIdentityProviderConfig.go index 2ed7e402830..db6110cccb5 100644 --- a/service/eks/api_op_AssociateIdentityProviderConfig.go +++ b/service/eks/api_op_AssociateIdentityProviderConfig.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAssociateIdentityProviderConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateIdentityProviderConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreateAccessEntry.go b/service/eks/api_op_CreateAccessEntry.go index 7bb23a5611d..d1a536a3c32 100644 --- a/service/eks/api_op_CreateAccessEntry.go +++ b/service/eks/api_op_CreateAccessEntry.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateAccessEntryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessEntryMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreateAddon.go b/service/eks/api_op_CreateAddon.go index 57797c5cb1b..354432bffa6 100644 --- a/service/eks/api_op_CreateAddon.go +++ b/service/eks/api_op_CreateAddon.go @@ -185,6 +185,9 @@ func (c *Client) addOperationCreateAddonMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAddonMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreateCluster.go b/service/eks/api_op_CreateCluster.go index cf6ee91f0c7..825e1deaf8d 100644 --- a/service/eks/api_op_CreateCluster.go +++ b/service/eks/api_op_CreateCluster.go @@ -210,6 +210,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreateEksAnywhereSubscription.go b/service/eks/api_op_CreateEksAnywhereSubscription.go index 469ea402bcf..6f150f8a9bd 100644 --- a/service/eks/api_op_CreateEksAnywhereSubscription.go +++ b/service/eks/api_op_CreateEksAnywhereSubscription.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateEksAnywhereSubscriptionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEksAnywhereSubscriptionMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreateFargateProfile.go b/service/eks/api_op_CreateFargateProfile.go index 9929bef41f9..b727cb34c7d 100644 --- a/service/eks/api_op_CreateFargateProfile.go +++ b/service/eks/api_op_CreateFargateProfile.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateFargateProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFargateProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreateNodegroup.go b/service/eks/api_op_CreateNodegroup.go index 06f1a22a912..ef3207be099 100644 --- a/service/eks/api_op_CreateNodegroup.go +++ b/service/eks/api_op_CreateNodegroup.go @@ -262,6 +262,9 @@ func (c *Client) addOperationCreateNodegroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNodegroupMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_CreatePodIdentityAssociation.go b/service/eks/api_op_CreatePodIdentityAssociation.go index 1788580d4c6..741ba8a6e31 100644 --- a/service/eks/api_op_CreatePodIdentityAssociation.go +++ b/service/eks/api_op_CreatePodIdentityAssociation.go @@ -176,6 +176,9 @@ func (c *Client) addOperationCreatePodIdentityAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePodIdentityAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_DeleteAccessEntry.go b/service/eks/api_op_DeleteAccessEntry.go index 3ca1b639b24..a45f52d7b31 100644 --- a/service/eks/api_op_DeleteAccessEntry.go +++ b/service/eks/api_op_DeleteAccessEntry.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteAccessEntryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeleteAddon.go b/service/eks/api_op_DeleteAddon.go index 4eb3f653816..35cae5724c7 100644 --- a/service/eks/api_op_DeleteAddon.go +++ b/service/eks/api_op_DeleteAddon.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteAddonMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAddonValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeleteCluster.go b/service/eks/api_op_DeleteCluster.go index 675e7696ee0..4491c58b670 100644 --- a/service/eks/api_op_DeleteCluster.go +++ b/service/eks/api_op_DeleteCluster.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeleteEksAnywhereSubscription.go b/service/eks/api_op_DeleteEksAnywhereSubscription.go index a0a0ed8016e..6f420e24830 100644 --- a/service/eks/api_op_DeleteEksAnywhereSubscription.go +++ b/service/eks/api_op_DeleteEksAnywhereSubscription.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteEksAnywhereSubscriptionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEksAnywhereSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeleteFargateProfile.go b/service/eks/api_op_DeleteFargateProfile.go index 1545c850208..e65acfc85c6 100644 --- a/service/eks/api_op_DeleteFargateProfile.go +++ b/service/eks/api_op_DeleteFargateProfile.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteFargateProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFargateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeleteNodegroup.go b/service/eks/api_op_DeleteNodegroup.go index 728aebbcb2a..4e371e7ad6e 100644 --- a/service/eks/api_op_DeleteNodegroup.go +++ b/service/eks/api_op_DeleteNodegroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteNodegroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNodegroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeletePodIdentityAssociation.go b/service/eks/api_op_DeletePodIdentityAssociation.go index 0b67e20b438..c64baafdb34 100644 --- a/service/eks/api_op_DeletePodIdentityAssociation.go +++ b/service/eks/api_op_DeletePodIdentityAssociation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeletePodIdentityAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePodIdentityAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DeregisterCluster.go b/service/eks/api_op_DeregisterCluster.go index 87030f99f7f..0faa4a283ca 100644 --- a/service/eks/api_op_DeregisterCluster.go +++ b/service/eks/api_op_DeregisterCluster.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeregisterClusterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeAccessEntry.go b/service/eks/api_op_DescribeAccessEntry.go index 7161d0d0e48..3bd2700ae42 100644 --- a/service/eks/api_op_DescribeAccessEntry.go +++ b/service/eks/api_op_DescribeAccessEntry.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeAccessEntryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccessEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeAddon.go b/service/eks/api_op_DescribeAddon.go index 17e9b5bda82..e3316a5efa2 100644 --- a/service/eks/api_op_DescribeAddon.go +++ b/service/eks/api_op_DescribeAddon.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeAddonMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAddonValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationDescribeAddonMiddlewares(stack *middleware.Stack, o return nil } -// DescribeAddonAPIClient is a client that implements the DescribeAddon operation. -type DescribeAddonAPIClient interface { - DescribeAddon(context.Context, *DescribeAddonInput, ...func(*Options)) (*DescribeAddonOutput, error) -} - -var _ DescribeAddonAPIClient = (*Client)(nil) - // AddonActiveWaiterOptions are waiter options for AddonActiveWaiter type AddonActiveWaiterOptions struct { @@ -266,7 +262,13 @@ func (w *AddonActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeA } out, err := w.client.DescribeAddon(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -472,7 +474,13 @@ func (w *AddonDeletedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeAddon(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -537,6 +545,13 @@ func addonDeletedStateRetryable(ctx context.Context, input *DescribeAddonInput, return true, nil } +// DescribeAddonAPIClient is a client that implements the DescribeAddon operation. +type DescribeAddonAPIClient interface { + DescribeAddon(context.Context, *DescribeAddonInput, ...func(*Options)) (*DescribeAddonOutput, error) +} + +var _ DescribeAddonAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAddon(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_DescribeAddonConfiguration.go b/service/eks/api_op_DescribeAddonConfiguration.go index 2bd1fbe8b25..1dfec16daf9 100644 --- a/service/eks/api_op_DescribeAddonConfiguration.go +++ b/service/eks/api_op_DescribeAddonConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeAddonConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAddonConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeAddonVersions.go b/service/eks/api_op_DescribeAddonVersions.go index e95f8c77f74..437dca0c38e 100644 --- a/service/eks/api_op_DescribeAddonVersions.go +++ b/service/eks/api_op_DescribeAddonVersions.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeAddonVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddonVersions(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeAddonVersionsMiddlewares(stack *middleware. return nil } -// DescribeAddonVersionsAPIClient is a client that implements the -// DescribeAddonVersions operation. -type DescribeAddonVersionsAPIClient interface { - DescribeAddonVersions(context.Context, *DescribeAddonVersionsInput, ...func(*Options)) (*DescribeAddonVersionsOutput, error) -} - -var _ DescribeAddonVersionsAPIClient = (*Client)(nil) - // DescribeAddonVersionsPaginatorOptions is the paginator options for // DescribeAddonVersions type DescribeAddonVersionsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeAddonVersionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAddonVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeAddonVersionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeAddonVersionsAPIClient is a client that implements the +// DescribeAddonVersions operation. +type DescribeAddonVersionsAPIClient interface { + DescribeAddonVersions(context.Context, *DescribeAddonVersionsInput, ...func(*Options)) (*DescribeAddonVersionsOutput, error) +} + +var _ DescribeAddonVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAddonVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_DescribeCluster.go b/service/eks/api_op_DescribeCluster.go index 9f4e19b595e..ec8bb7ca80f 100644 --- a/service/eks/api_op_DescribeCluster.go +++ b/service/eks/api_op_DescribeCluster.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, return nil } -// DescribeClusterAPIClient is a client that implements the DescribeCluster -// operation. -type DescribeClusterAPIClient interface { - DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error) -} - -var _ DescribeClusterAPIClient = (*Client)(nil) - // ClusterActiveWaiterOptions are waiter options for ClusterActiveWaiter type ClusterActiveWaiterOptions struct { @@ -267,7 +262,13 @@ func (w *ClusterActiveWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeCluster(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -474,7 +475,13 @@ func (w *ClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeCluster(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -573,6 +580,14 @@ func clusterDeletedStateRetryable(ctx context.Context, input *DescribeClusterInp return true, nil } +// DescribeClusterAPIClient is a client that implements the DescribeCluster +// operation. +type DescribeClusterAPIClient interface { + DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error) +} + +var _ DescribeClusterAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_DescribeEksAnywhereSubscription.go b/service/eks/api_op_DescribeEksAnywhereSubscription.go index d31ee8cf6c3..d074320606a 100644 --- a/service/eks/api_op_DescribeEksAnywhereSubscription.go +++ b/service/eks/api_op_DescribeEksAnywhereSubscription.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeEksAnywhereSubscriptionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEksAnywhereSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeFargateProfile.go b/service/eks/api_op_DescribeFargateProfile.go index 0aec97f5327..5ff5f326d69 100644 --- a/service/eks/api_op_DescribeFargateProfile.go +++ b/service/eks/api_op_DescribeFargateProfile.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeFargateProfileMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFargateProfileValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeFargateProfileMiddlewares(stack *middleware return nil } -// DescribeFargateProfileAPIClient is a client that implements the -// DescribeFargateProfile operation. -type DescribeFargateProfileAPIClient interface { - DescribeFargateProfile(context.Context, *DescribeFargateProfileInput, ...func(*Options)) (*DescribeFargateProfileOutput, error) -} - -var _ DescribeFargateProfileAPIClient = (*Client)(nil) - // FargateProfileActiveWaiterOptions are waiter options for // FargateProfileActiveWaiter type FargateProfileActiveWaiterOptions struct { @@ -265,7 +260,13 @@ func (w *FargateProfileActiveWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeFargateProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -457,7 +458,13 @@ func (w *FargateProfileDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeFargateProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -522,6 +529,14 @@ func fargateProfileDeletedStateRetryable(ctx context.Context, input *DescribeFar return true, nil } +// DescribeFargateProfileAPIClient is a client that implements the +// DescribeFargateProfile operation. +type DescribeFargateProfileAPIClient interface { + DescribeFargateProfile(context.Context, *DescribeFargateProfileInput, ...func(*Options)) (*DescribeFargateProfileOutput, error) +} + +var _ DescribeFargateProfileAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFargateProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_DescribeIdentityProviderConfig.go b/service/eks/api_op_DescribeIdentityProviderConfig.go index 7509224f6e9..5213d82b74a 100644 --- a/service/eks/api_op_DescribeIdentityProviderConfig.go +++ b/service/eks/api_op_DescribeIdentityProviderConfig.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeIdentityProviderConfigMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityProviderConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeInsight.go b/service/eks/api_op_DescribeInsight.go index 893bd28b7cd..3421e08c431 100644 --- a/service/eks/api_op_DescribeInsight.go +++ b/service/eks/api_op_DescribeInsight.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeInsightMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeNodegroup.go b/service/eks/api_op_DescribeNodegroup.go index b7e17728d2a..95fc495fc57 100644 --- a/service/eks/api_op_DescribeNodegroup.go +++ b/service/eks/api_op_DescribeNodegroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeNodegroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNodegroupValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeNodegroupMiddlewares(stack *middleware.Stac return nil } -// DescribeNodegroupAPIClient is a client that implements the DescribeNodegroup -// operation. -type DescribeNodegroupAPIClient interface { - DescribeNodegroup(context.Context, *DescribeNodegroupInput, ...func(*Options)) (*DescribeNodegroupOutput, error) -} - -var _ DescribeNodegroupAPIClient = (*Client)(nil) - // NodegroupActiveWaiterOptions are waiter options for NodegroupActiveWaiter type NodegroupActiveWaiterOptions struct { @@ -263,7 +258,13 @@ func (w *NodegroupActiveWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeNodegroup(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -453,7 +454,13 @@ func (w *NodegroupDeletedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeNodegroup(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -518,6 +525,14 @@ func nodegroupDeletedStateRetryable(ctx context.Context, input *DescribeNodegrou return true, nil } +// DescribeNodegroupAPIClient is a client that implements the DescribeNodegroup +// operation. +type DescribeNodegroupAPIClient interface { + DescribeNodegroup(context.Context, *DescribeNodegroupInput, ...func(*Options)) (*DescribeNodegroupOutput, error) +} + +var _ DescribeNodegroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNodegroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_DescribePodIdentityAssociation.go b/service/eks/api_op_DescribePodIdentityAssociation.go index 11b256a29db..571048c824d 100644 --- a/service/eks/api_op_DescribePodIdentityAssociation.go +++ b/service/eks/api_op_DescribePodIdentityAssociation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribePodIdentityAssociationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePodIdentityAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DescribeUpdate.go b/service/eks/api_op_DescribeUpdate.go index c60657a1a37..f73031f1d8e 100644 --- a/service/eks/api_op_DescribeUpdate.go +++ b/service/eks/api_op_DescribeUpdate.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeUpdateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DisassociateAccessPolicy.go b/service/eks/api_op_DisassociateAccessPolicy.go index f136fb4454c..0dbac0b2eb2 100644 --- a/service/eks/api_op_DisassociateAccessPolicy.go +++ b/service/eks/api_op_DisassociateAccessPolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateAccessPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_DisassociateIdentityProviderConfig.go b/service/eks/api_op_DisassociateIdentityProviderConfig.go index 02bf9085240..eb776804902 100644 --- a/service/eks/api_op_DisassociateIdentityProviderConfig.go +++ b/service/eks/api_op_DisassociateIdentityProviderConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDisassociateIdentityProviderConfigMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateIdentityProviderConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_ListAccessEntries.go b/service/eks/api_op_ListAccessEntries.go index 6553bde61f3..f07e8866a57 100644 --- a/service/eks/api_op_ListAccessEntries.go +++ b/service/eks/api_op_ListAccessEntries.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListAccessEntriesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessEntriesValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListAccessEntriesMiddlewares(stack *middleware.Stac return nil } -// ListAccessEntriesAPIClient is a client that implements the ListAccessEntries -// operation. -type ListAccessEntriesAPIClient interface { - ListAccessEntries(context.Context, *ListAccessEntriesInput, ...func(*Options)) (*ListAccessEntriesOutput, error) -} - -var _ ListAccessEntriesAPIClient = (*Client)(nil) - // ListAccessEntriesPaginatorOptions is the paginator options for ListAccessEntries type ListAccessEntriesPaginatorOptions struct { // The maximum number of results, returned in paginated output. You receive @@ -236,6 +231,9 @@ func (p *ListAccessEntriesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessEntries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListAccessEntriesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListAccessEntriesAPIClient is a client that implements the ListAccessEntries +// operation. +type ListAccessEntriesAPIClient interface { + ListAccessEntries(context.Context, *ListAccessEntriesInput, ...func(*Options)) (*ListAccessEntriesOutput, error) +} + +var _ ListAccessEntriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessEntries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListAccessPolicies.go b/service/eks/api_op_ListAccessPolicies.go index d5e51fab372..a6c2eb8d37c 100644 --- a/service/eks/api_op_ListAccessPolicies.go +++ b/service/eks/api_op_ListAccessPolicies.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessPolicies(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Sta return nil } -// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies -// operation. -type ListAccessPoliciesAPIClient interface { - ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) -} - -var _ ListAccessPoliciesAPIClient = (*Client)(nil) - // ListAccessPoliciesPaginatorOptions is the paginator options for // ListAccessPolicies type ListAccessPoliciesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies +// operation. +type ListAccessPoliciesAPIClient interface { + ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) +} + +var _ ListAccessPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListAddons.go b/service/eks/api_op_ListAddons.go index caefccbaae2..186c303ed94 100644 --- a/service/eks/api_op_ListAddons.go +++ b/service/eks/api_op_ListAddons.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListAddonsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAddonsValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListAddonsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAddonsAPIClient is a client that implements the ListAddons operation. -type ListAddonsAPIClient interface { - ListAddons(context.Context, *ListAddonsInput, ...func(*Options)) (*ListAddonsOutput, error) -} - -var _ ListAddonsAPIClient = (*Client)(nil) - // ListAddonsPaginatorOptions is the paginator options for ListAddons type ListAddonsPaginatorOptions struct { // The maximum number of results, returned in paginated output. You receive @@ -230,6 +226,9 @@ func (p *ListAddonsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAddons(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListAddonsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAddonsAPIClient is a client that implements the ListAddons operation. +type ListAddonsAPIClient interface { + ListAddons(context.Context, *ListAddonsInput, ...func(*Options)) (*ListAddonsOutput, error) +} + +var _ ListAddonsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAddons(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListAssociatedAccessPolicies.go b/service/eks/api_op_ListAssociatedAccessPolicies.go index b2a4b511217..55d280a22c7 100644 --- a/service/eks/api_op_ListAssociatedAccessPolicies.go +++ b/service/eks/api_op_ListAssociatedAccessPolicies.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListAssociatedAccessPoliciesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedAccessPoliciesValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListAssociatedAccessPoliciesMiddlewares(stack *midd return nil } -// ListAssociatedAccessPoliciesAPIClient is a client that implements the -// ListAssociatedAccessPolicies operation. -type ListAssociatedAccessPoliciesAPIClient interface { - ListAssociatedAccessPolicies(context.Context, *ListAssociatedAccessPoliciesInput, ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) -} - -var _ ListAssociatedAccessPoliciesAPIClient = (*Client)(nil) - // ListAssociatedAccessPoliciesPaginatorOptions is the paginator options for // ListAssociatedAccessPolicies type ListAssociatedAccessPoliciesPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *ListAssociatedAccessPoliciesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedAccessPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListAssociatedAccessPoliciesPaginator) NextPage(ctx context.Context, op return result, nil } +// ListAssociatedAccessPoliciesAPIClient is a client that implements the +// ListAssociatedAccessPolicies operation. +type ListAssociatedAccessPoliciesAPIClient interface { + ListAssociatedAccessPolicies(context.Context, *ListAssociatedAccessPoliciesInput, ...func(*Options)) (*ListAssociatedAccessPoliciesOutput, error) +} + +var _ ListAssociatedAccessPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListClusters.go b/service/eks/api_op_ListClusters.go index 624eb973446..5ca10530eeb 100644 --- a/service/eks/api_op_ListClusters.go +++ b/service/eks/api_op_ListClusters.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // The maximum number of results, returned in paginated output. You receive @@ -231,6 +227,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +249,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListEksAnywhereSubscriptions.go b/service/eks/api_op_ListEksAnywhereSubscriptions.go index e1dffd4b83a..5f466dc4349 100644 --- a/service/eks/api_op_ListEksAnywhereSubscriptions.go +++ b/service/eks/api_op_ListEksAnywhereSubscriptions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListEksAnywhereSubscriptionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEksAnywhereSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListEksAnywhereSubscriptionsMiddlewares(stack *midd return nil } -// ListEksAnywhereSubscriptionsAPIClient is a client that implements the -// ListEksAnywhereSubscriptions operation. -type ListEksAnywhereSubscriptionsAPIClient interface { - ListEksAnywhereSubscriptions(context.Context, *ListEksAnywhereSubscriptionsInput, ...func(*Options)) (*ListEksAnywhereSubscriptionsOutput, error) -} - -var _ ListEksAnywhereSubscriptionsAPIClient = (*Client)(nil) - // ListEksAnywhereSubscriptionsPaginatorOptions is the paginator options for // ListEksAnywhereSubscriptions type ListEksAnywhereSubscriptionsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListEksAnywhereSubscriptionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEksAnywhereSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListEksAnywhereSubscriptionsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListEksAnywhereSubscriptionsAPIClient is a client that implements the +// ListEksAnywhereSubscriptions operation. +type ListEksAnywhereSubscriptionsAPIClient interface { + ListEksAnywhereSubscriptions(context.Context, *ListEksAnywhereSubscriptionsInput, ...func(*Options)) (*ListEksAnywhereSubscriptionsOutput, error) +} + +var _ ListEksAnywhereSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEksAnywhereSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListFargateProfiles.go b/service/eks/api_op_ListFargateProfiles.go index 1baf2105a2c..bb1ba12c04f 100644 --- a/service/eks/api_op_ListFargateProfiles.go +++ b/service/eks/api_op_ListFargateProfiles.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFargateProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFargateProfilesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListFargateProfilesMiddlewares(stack *middleware.St return nil } -// ListFargateProfilesAPIClient is a client that implements the -// ListFargateProfiles operation. -type ListFargateProfilesAPIClient interface { - ListFargateProfiles(context.Context, *ListFargateProfilesInput, ...func(*Options)) (*ListFargateProfilesOutput, error) -} - -var _ ListFargateProfilesAPIClient = (*Client)(nil) - // ListFargateProfilesPaginatorOptions is the paginator options for // ListFargateProfiles type ListFargateProfilesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListFargateProfilesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFargateProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListFargateProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFargateProfilesAPIClient is a client that implements the +// ListFargateProfiles operation. +type ListFargateProfilesAPIClient interface { + ListFargateProfiles(context.Context, *ListFargateProfilesInput, ...func(*Options)) (*ListFargateProfilesOutput, error) +} + +var _ ListFargateProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFargateProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListIdentityProviderConfigs.go b/service/eks/api_op_ListIdentityProviderConfigs.go index 4f071283b8c..a8d70e91d29 100644 --- a/service/eks/api_op_ListIdentityProviderConfigs.go +++ b/service/eks/api_op_ListIdentityProviderConfigs.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListIdentityProviderConfigsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityProviderConfigsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListIdentityProviderConfigsMiddlewares(stack *middl return nil } -// ListIdentityProviderConfigsAPIClient is a client that implements the -// ListIdentityProviderConfigs operation. -type ListIdentityProviderConfigsAPIClient interface { - ListIdentityProviderConfigs(context.Context, *ListIdentityProviderConfigsInput, ...func(*Options)) (*ListIdentityProviderConfigsOutput, error) -} - -var _ ListIdentityProviderConfigsAPIClient = (*Client)(nil) - // ListIdentityProviderConfigsPaginatorOptions is the paginator options for // ListIdentityProviderConfigs type ListIdentityProviderConfigsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListIdentityProviderConfigsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentityProviderConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListIdentityProviderConfigsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListIdentityProviderConfigsAPIClient is a client that implements the +// ListIdentityProviderConfigs operation. +type ListIdentityProviderConfigsAPIClient interface { + ListIdentityProviderConfigs(context.Context, *ListIdentityProviderConfigsInput, ...func(*Options)) (*ListIdentityProviderConfigsOutput, error) +} + +var _ ListIdentityProviderConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentityProviderConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListInsights.go b/service/eks/api_op_ListInsights.go index 709af5e0841..2df83a99e9f 100644 --- a/service/eks/api_op_ListInsights.go +++ b/service/eks/api_op_ListInsights.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListInsightsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInsightsValidationMiddleware(stack); err != nil { return err } @@ -158,13 +161,6 @@ func (c *Client) addOperationListInsightsMiddlewares(stack *middleware.Stack, op return nil } -// ListInsightsAPIClient is a client that implements the ListInsights operation. -type ListInsightsAPIClient interface { - ListInsights(context.Context, *ListInsightsInput, ...func(*Options)) (*ListInsightsOutput, error) -} - -var _ ListInsightsAPIClient = (*Client)(nil) - // ListInsightsPaginatorOptions is the paginator options for ListInsights type ListInsightsPaginatorOptions struct { // The maximum number of identity provider configurations returned by ListInsights @@ -234,6 +230,9 @@ func (p *ListInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListInsightsAPIClient is a client that implements the ListInsights operation. +type ListInsightsAPIClient interface { + ListInsights(context.Context, *ListInsightsInput, ...func(*Options)) (*ListInsightsOutput, error) +} + +var _ ListInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListNodegroups.go b/service/eks/api_op_ListNodegroups.go index f5262f69d27..abc67a75691 100644 --- a/service/eks/api_op_ListNodegroups.go +++ b/service/eks/api_op_ListNodegroups.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListNodegroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNodegroupsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListNodegroupsMiddlewares(stack *middleware.Stack, return nil } -// ListNodegroupsAPIClient is a client that implements the ListNodegroups -// operation. -type ListNodegroupsAPIClient interface { - ListNodegroups(context.Context, *ListNodegroupsInput, ...func(*Options)) (*ListNodegroupsOutput, error) -} - -var _ ListNodegroupsAPIClient = (*Client)(nil) - // ListNodegroupsPaginatorOptions is the paginator options for ListNodegroups type ListNodegroupsPaginatorOptions struct { // The maximum number of results, returned in paginated output. You receive @@ -233,6 +228,9 @@ func (p *ListNodegroupsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNodegroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListNodegroupsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListNodegroupsAPIClient is a client that implements the ListNodegroups +// operation. +type ListNodegroupsAPIClient interface { + ListNodegroups(context.Context, *ListNodegroupsInput, ...func(*Options)) (*ListNodegroupsOutput, error) +} + +var _ ListNodegroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNodegroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListPodIdentityAssociations.go b/service/eks/api_op_ListPodIdentityAssociations.go index 376f1bac339..37166426fcd 100644 --- a/service/eks/api_op_ListPodIdentityAssociations.go +++ b/service/eks/api_op_ListPodIdentityAssociations.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListPodIdentityAssociationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPodIdentityAssociationsValidationMiddleware(stack); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationListPodIdentityAssociationsMiddlewares(stack *middl return nil } -// ListPodIdentityAssociationsAPIClient is a client that implements the -// ListPodIdentityAssociations operation. -type ListPodIdentityAssociationsAPIClient interface { - ListPodIdentityAssociations(context.Context, *ListPodIdentityAssociationsInput, ...func(*Options)) (*ListPodIdentityAssociationsOutput, error) -} - -var _ ListPodIdentityAssociationsAPIClient = (*Client)(nil) - // ListPodIdentityAssociationsPaginatorOptions is the paginator options for // ListPodIdentityAssociations type ListPodIdentityAssociationsPaginatorOptions struct { @@ -259,6 +254,9 @@ func (p *ListPodIdentityAssociationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPodIdentityAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *ListPodIdentityAssociationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListPodIdentityAssociationsAPIClient is a client that implements the +// ListPodIdentityAssociations operation. +type ListPodIdentityAssociationsAPIClient interface { + ListPodIdentityAssociations(context.Context, *ListPodIdentityAssociationsInput, ...func(*Options)) (*ListPodIdentityAssociationsOutput, error) +} + +var _ ListPodIdentityAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPodIdentityAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_ListTagsForResource.go b/service/eks/api_op_ListTagsForResource.go index c773af8d6e3..9f18ded4a02 100644 --- a/service/eks/api_op_ListTagsForResource.go +++ b/service/eks/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_ListUpdates.go b/service/eks/api_op_ListUpdates.go index 47f2e0eaeb0..85376e26349 100644 --- a/service/eks/api_op_ListUpdates.go +++ b/service/eks/api_op_ListUpdates.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListUpdatesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUpdatesValidationMiddleware(stack); err != nil { return err } @@ -162,13 +165,6 @@ func (c *Client) addOperationListUpdatesMiddlewares(stack *middleware.Stack, opt return nil } -// ListUpdatesAPIClient is a client that implements the ListUpdates operation. -type ListUpdatesAPIClient interface { - ListUpdates(context.Context, *ListUpdatesInput, ...func(*Options)) (*ListUpdatesOutput, error) -} - -var _ ListUpdatesAPIClient = (*Client)(nil) - // ListUpdatesPaginatorOptions is the paginator options for ListUpdates type ListUpdatesPaginatorOptions struct { // The maximum number of results, returned in paginated output. You receive @@ -237,6 +233,9 @@ func (p *ListUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUpdates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +255,13 @@ func (p *ListUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListUpdatesAPIClient is a client that implements the ListUpdates operation. +type ListUpdatesAPIClient interface { + ListUpdates(context.Context, *ListUpdatesInput, ...func(*Options)) (*ListUpdatesOutput, error) +} + +var _ ListUpdatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUpdates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/eks/api_op_RegisterCluster.go b/service/eks/api_op_RegisterCluster.go index 7dff514a5ef..89c3f2c4789 100644 --- a/service/eks/api_op_RegisterCluster.go +++ b/service/eks/api_op_RegisterCluster.go @@ -137,6 +137,9 @@ func (c *Client) addOperationRegisterClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_TagResource.go b/service/eks/api_op_TagResource.go index 96b46023243..93bab0ed9fc 100644 --- a/service/eks/api_op_TagResource.go +++ b/service/eks/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_UntagResource.go b/service/eks/api_op_UntagResource.go index 9ef25806ac9..e9deaabe820 100644 --- a/service/eks/api_op_UntagResource.go +++ b/service/eks/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eks/api_op_UpdateAccessEntry.go b/service/eks/api_op_UpdateAccessEntry.go index 8293aabf155..d85e59a5056 100644 --- a/service/eks/api_op_UpdateAccessEntry.go +++ b/service/eks/api_op_UpdateAccessEntry.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateAccessEntryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateAccessEntryMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdateAddon.go b/service/eks/api_op_UpdateAddon.go index a6360ba85b6..0cfa405bae4 100644 --- a/service/eks/api_op_UpdateAddon.go +++ b/service/eks/api_op_UpdateAddon.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateAddonMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateAddonMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdateClusterConfig.go b/service/eks/api_op_UpdateClusterConfig.go index 64a0c580f9a..965db7c6539 100644 --- a/service/eks/api_op_UpdateClusterConfig.go +++ b/service/eks/api_op_UpdateClusterConfig.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateClusterConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateClusterConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdateClusterVersion.go b/service/eks/api_op_UpdateClusterVersion.go index c7da204bd50..a238ab73fc5 100644 --- a/service/eks/api_op_UpdateClusterVersion.go +++ b/service/eks/api_op_UpdateClusterVersion.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateClusterVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateClusterVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdateEksAnywhereSubscription.go b/service/eks/api_op_UpdateEksAnywhereSubscription.go index 8c1de6d1165..fc6f2219a72 100644 --- a/service/eks/api_op_UpdateEksAnywhereSubscription.go +++ b/service/eks/api_op_UpdateEksAnywhereSubscription.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateEksAnywhereSubscriptionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateEksAnywhereSubscriptionMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdateNodegroupConfig.go b/service/eks/api_op_UpdateNodegroupConfig.go index 1c2b6f89fe8..d206386a558 100644 --- a/service/eks/api_op_UpdateNodegroupConfig.go +++ b/service/eks/api_op_UpdateNodegroupConfig.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateNodegroupConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateNodegroupConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdateNodegroupVersion.go b/service/eks/api_op_UpdateNodegroupVersion.go index 0d609b807fd..17c4f74cf1a 100644 --- a/service/eks/api_op_UpdateNodegroupVersion.go +++ b/service/eks/api_op_UpdateNodegroupVersion.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateNodegroupVersionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateNodegroupVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/eks/api_op_UpdatePodIdentityAssociation.go b/service/eks/api_op_UpdatePodIdentityAssociation.go index 689117e4272..64b125019d7 100644 --- a/service/eks/api_op_UpdatePodIdentityAssociation.go +++ b/service/eks/api_op_UpdatePodIdentityAssociation.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdatePodIdentityAssociationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePodIdentityAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/eksauth/api_client.go b/service/eksauth/api_client.go index 1459d2b82c2..0820e3f1de7 100644 --- a/service/eksauth/api_client.go +++ b/service/eksauth/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/eksauth/api_op_AssumeRoleForPodIdentity.go b/service/eksauth/api_op_AssumeRoleForPodIdentity.go index 7cfefb2595b..299174c497a 100644 --- a/service/eksauth/api_op_AssumeRoleForPodIdentity.go +++ b/service/eksauth/api_op_AssumeRoleForPodIdentity.go @@ -149,6 +149,9 @@ func (c *Client) addOperationAssumeRoleForPodIdentityMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleForPodIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_client.go b/service/elasticache/api_client.go index 95de82281c6..245e0324dde 100644 --- a/service/elasticache/api_client.go +++ b/service/elasticache/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elasticache/api_op_AddTagsToResource.go b/service/elasticache/api_op_AddTagsToResource.go index 3ae0966747b..b65789daae0 100644 --- a/service/elasticache/api_op_AddTagsToResource.go +++ b/service/elasticache/api_op_AddTagsToResource.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_AuthorizeCacheSecurityGroupIngress.go b/service/elasticache/api_op_AuthorizeCacheSecurityGroupIngress.go index 82f391ac1f8..3cf3428b5a6 100644 --- a/service/elasticache/api_op_AuthorizeCacheSecurityGroupIngress.go +++ b/service/elasticache/api_op_AuthorizeCacheSecurityGroupIngress.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAuthorizeCacheSecurityGroupIngressMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeCacheSecurityGroupIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_BatchApplyUpdateAction.go b/service/elasticache/api_op_BatchApplyUpdateAction.go index 209a0f0c363..2156a710c14 100644 --- a/service/elasticache/api_op_BatchApplyUpdateAction.go +++ b/service/elasticache/api_op_BatchApplyUpdateAction.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchApplyUpdateActionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchApplyUpdateActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_BatchStopUpdateAction.go b/service/elasticache/api_op_BatchStopUpdateAction.go index a343ca63ebd..6d9f18ef0e9 100644 --- a/service/elasticache/api_op_BatchStopUpdateAction.go +++ b/service/elasticache/api_op_BatchStopUpdateAction.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchStopUpdateActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchStopUpdateActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CompleteMigration.go b/service/elasticache/api_op_CompleteMigration.go index 76ef23da95e..345c571d98e 100644 --- a/service/elasticache/api_op_CompleteMigration.go +++ b/service/elasticache/api_op_CompleteMigration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCompleteMigrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteMigrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CopyServerlessCacheSnapshot.go b/service/elasticache/api_op_CopyServerlessCacheSnapshot.go index e1c3ef18ee6..2c779a1c3c3 100644 --- a/service/elasticache/api_op_CopyServerlessCacheSnapshot.go +++ b/service/elasticache/api_op_CopyServerlessCacheSnapshot.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCopyServerlessCacheSnapshotMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyServerlessCacheSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CopySnapshot.go b/service/elasticache/api_op_CopySnapshot.go index 7343fbddaec..c02a6ec5bd4 100644 --- a/service/elasticache/api_op_CopySnapshot.go +++ b/service/elasticache/api_op_CopySnapshot.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCopySnapshotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopySnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateCacheCluster.go b/service/elasticache/api_op_CreateCacheCluster.go index def02d582bd..d1b25b92dc9 100644 --- a/service/elasticache/api_op_CreateCacheCluster.go +++ b/service/elasticache/api_op_CreateCacheCluster.go @@ -427,6 +427,9 @@ func (c *Client) addOperationCreateCacheClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCacheClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateCacheParameterGroup.go b/service/elasticache/api_op_CreateCacheParameterGroup.go index 0c1c77438d2..c3cfa81c0a6 100644 --- a/service/elasticache/api_op_CreateCacheParameterGroup.go +++ b/service/elasticache/api_op_CreateCacheParameterGroup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateCacheParameterGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCacheParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateCacheSecurityGroup.go b/service/elasticache/api_op_CreateCacheSecurityGroup.go index 51f9a4022c2..db78de12569 100644 --- a/service/elasticache/api_op_CreateCacheSecurityGroup.go +++ b/service/elasticache/api_op_CreateCacheSecurityGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateCacheSecurityGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCacheSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateCacheSubnetGroup.go b/service/elasticache/api_op_CreateCacheSubnetGroup.go index 04ca54d61ec..0b2bfba924d 100644 --- a/service/elasticache/api_op_CreateCacheSubnetGroup.go +++ b/service/elasticache/api_op_CreateCacheSubnetGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateCacheSubnetGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCacheSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateGlobalReplicationGroup.go b/service/elasticache/api_op_CreateGlobalReplicationGroup.go index b7c9ad76582..87276ebf114 100644 --- a/service/elasticache/api_op_CreateGlobalReplicationGroup.go +++ b/service/elasticache/api_op_CreateGlobalReplicationGroup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateGlobalReplicationGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateReplicationGroup.go b/service/elasticache/api_op_CreateReplicationGroup.go index 6a977546db0..5fbff20d7c5 100644 --- a/service/elasticache/api_op_CreateReplicationGroup.go +++ b/service/elasticache/api_op_CreateReplicationGroup.go @@ -568,6 +568,9 @@ func (c *Client) addOperationCreateReplicationGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateServerlessCache.go b/service/elasticache/api_op_CreateServerlessCache.go index 1bf97f28420..1802df9f86f 100644 --- a/service/elasticache/api_op_CreateServerlessCache.go +++ b/service/elasticache/api_op_CreateServerlessCache.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateServerlessCacheMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServerlessCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateServerlessCacheSnapshot.go b/service/elasticache/api_op_CreateServerlessCacheSnapshot.go index ae0f1c53b9a..cc7b184fcf1 100644 --- a/service/elasticache/api_op_CreateServerlessCacheSnapshot.go +++ b/service/elasticache/api_op_CreateServerlessCacheSnapshot.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateServerlessCacheSnapshotMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServerlessCacheSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateSnapshot.go b/service/elasticache/api_op_CreateSnapshot.go index 947164d5ab6..61787123980 100644 --- a/service/elasticache/api_op_CreateSnapshot.go +++ b/service/elasticache/api_op_CreateSnapshot.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateUser.go b/service/elasticache/api_op_CreateUser.go index 021fd300969..5daef43506e 100644 --- a/service/elasticache/api_op_CreateUser.go +++ b/service/elasticache/api_op_CreateUser.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_CreateUserGroup.go b/service/elasticache/api_op_CreateUserGroup.go index dca542a7720..ccaa380b017 100644 --- a/service/elasticache/api_op_CreateUserGroup.go +++ b/service/elasticache/api_op_CreateUserGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateUserGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DecreaseNodeGroupsInGlobalReplicationGroup.go b/service/elasticache/api_op_DecreaseNodeGroupsInGlobalReplicationGroup.go index 17104f312f8..470898c789f 100644 --- a/service/elasticache/api_op_DecreaseNodeGroupsInGlobalReplicationGroup.go +++ b/service/elasticache/api_op_DecreaseNodeGroupsInGlobalReplicationGroup.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDecreaseNodeGroupsInGlobalReplicationGroupMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecreaseNodeGroupsInGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DecreaseReplicaCount.go b/service/elasticache/api_op_DecreaseReplicaCount.go index a1fbaed37cc..b5ade64803c 100644 --- a/service/elasticache/api_op_DecreaseReplicaCount.go +++ b/service/elasticache/api_op_DecreaseReplicaCount.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDecreaseReplicaCountMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecreaseReplicaCountValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteCacheCluster.go b/service/elasticache/api_op_DeleteCacheCluster.go index 4ff8b4d9027..9d024864fb3 100644 --- a/service/elasticache/api_op_DeleteCacheCluster.go +++ b/service/elasticache/api_op_DeleteCacheCluster.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteCacheClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCacheClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteCacheParameterGroup.go b/service/elasticache/api_op_DeleteCacheParameterGroup.go index df34263c3c5..3d3645b9ebe 100644 --- a/service/elasticache/api_op_DeleteCacheParameterGroup.go +++ b/service/elasticache/api_op_DeleteCacheParameterGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCacheParameterGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCacheParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteCacheSecurityGroup.go b/service/elasticache/api_op_DeleteCacheSecurityGroup.go index a01190f7bc1..ebb234a4aad 100644 --- a/service/elasticache/api_op_DeleteCacheSecurityGroup.go +++ b/service/elasticache/api_op_DeleteCacheSecurityGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCacheSecurityGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCacheSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteCacheSubnetGroup.go b/service/elasticache/api_op_DeleteCacheSubnetGroup.go index f57d3eb8a88..94836348203 100644 --- a/service/elasticache/api_op_DeleteCacheSubnetGroup.go +++ b/service/elasticache/api_op_DeleteCacheSubnetGroup.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteCacheSubnetGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCacheSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteGlobalReplicationGroup.go b/service/elasticache/api_op_DeleteGlobalReplicationGroup.go index ddcf7fb45df..09abc4bd143 100644 --- a/service/elasticache/api_op_DeleteGlobalReplicationGroup.go +++ b/service/elasticache/api_op_DeleteGlobalReplicationGroup.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteGlobalReplicationGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteReplicationGroup.go b/service/elasticache/api_op_DeleteReplicationGroup.go index d4dbb0f9b7f..ea82b15b379 100644 --- a/service/elasticache/api_op_DeleteReplicationGroup.go +++ b/service/elasticache/api_op_DeleteReplicationGroup.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteReplicationGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteServerlessCache.go b/service/elasticache/api_op_DeleteServerlessCache.go index 4a50cd9e5e5..b5e05feec3d 100644 --- a/service/elasticache/api_op_DeleteServerlessCache.go +++ b/service/elasticache/api_op_DeleteServerlessCache.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteServerlessCacheMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServerlessCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteServerlessCacheSnapshot.go b/service/elasticache/api_op_DeleteServerlessCacheSnapshot.go index 9e717d554dc..721fb42f92e 100644 --- a/service/elasticache/api_op_DeleteServerlessCacheSnapshot.go +++ b/service/elasticache/api_op_DeleteServerlessCacheSnapshot.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteServerlessCacheSnapshotMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServerlessCacheSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteSnapshot.go b/service/elasticache/api_op_DeleteSnapshot.go index d6e8ef8bdd9..40e7ed97a1f 100644 --- a/service/elasticache/api_op_DeleteSnapshot.go +++ b/service/elasticache/api_op_DeleteSnapshot.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteUser.go b/service/elasticache/api_op_DeleteUser.go index 794333146af..c8d9c57053c 100644 --- a/service/elasticache/api_op_DeleteUser.go +++ b/service/elasticache/api_op_DeleteUser.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DeleteUserGroup.go b/service/elasticache/api_op_DeleteUserGroup.go index 83d1d76251a..81238f3dd82 100644 --- a/service/elasticache/api_op_DeleteUserGroup.go +++ b/service/elasticache/api_op_DeleteUserGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteUserGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_DescribeCacheClusters.go b/service/elasticache/api_op_DescribeCacheClusters.go index c95cf2d25a2..22b3962abb1 100644 --- a/service/elasticache/api_op_DescribeCacheClusters.go +++ b/service/elasticache/api_op_DescribeCacheClusters.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeCacheClustersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCacheClusters(options.Region), middleware.Before); err != nil { return err } @@ -184,103 +187,6 @@ func (c *Client) addOperationDescribeCacheClustersMiddlewares(stack *middleware. return nil } -// DescribeCacheClustersAPIClient is a client that implements the -// DescribeCacheClusters operation. -type DescribeCacheClustersAPIClient interface { - DescribeCacheClusters(context.Context, *DescribeCacheClustersInput, ...func(*Options)) (*DescribeCacheClustersOutput, error) -} - -var _ DescribeCacheClustersAPIClient = (*Client)(nil) - -// DescribeCacheClustersPaginatorOptions is the paginator options for -// DescribeCacheClusters -type DescribeCacheClustersPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a marker is included in the response so - // that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeCacheClustersPaginator is a paginator for DescribeCacheClusters -type DescribeCacheClustersPaginator struct { - options DescribeCacheClustersPaginatorOptions - client DescribeCacheClustersAPIClient - params *DescribeCacheClustersInput - nextToken *string - firstPage bool -} - -// NewDescribeCacheClustersPaginator returns a new DescribeCacheClustersPaginator -func NewDescribeCacheClustersPaginator(client DescribeCacheClustersAPIClient, params *DescribeCacheClustersInput, optFns ...func(*DescribeCacheClustersPaginatorOptions)) *DescribeCacheClustersPaginator { - if params == nil { - params = &DescribeCacheClustersInput{} - } - - options := DescribeCacheClustersPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeCacheClustersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeCacheClustersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeCacheClusters page. -func (p *DescribeCacheClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCacheClustersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeCacheClusters(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // CacheClusterAvailableWaiterOptions are waiter options for // CacheClusterAvailableWaiter type CacheClusterAvailableWaiterOptions struct { @@ -398,7 +304,13 @@ func (w *CacheClusterAvailableWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeCacheClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -684,7 +596,13 @@ func (w *CacheClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeCacheClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -913,6 +831,106 @@ func cacheClusterDeletedStateRetryable(ctx context.Context, input *DescribeCache return true, nil } +// DescribeCacheClustersPaginatorOptions is the paginator options for +// DescribeCacheClusters +type DescribeCacheClustersPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a marker is included in the response so + // that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeCacheClustersPaginator is a paginator for DescribeCacheClusters +type DescribeCacheClustersPaginator struct { + options DescribeCacheClustersPaginatorOptions + client DescribeCacheClustersAPIClient + params *DescribeCacheClustersInput + nextToken *string + firstPage bool +} + +// NewDescribeCacheClustersPaginator returns a new DescribeCacheClustersPaginator +func NewDescribeCacheClustersPaginator(client DescribeCacheClustersAPIClient, params *DescribeCacheClustersInput, optFns ...func(*DescribeCacheClustersPaginatorOptions)) *DescribeCacheClustersPaginator { + if params == nil { + params = &DescribeCacheClustersInput{} + } + + options := DescribeCacheClustersPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeCacheClustersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeCacheClustersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeCacheClusters page. +func (p *DescribeCacheClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCacheClustersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeCacheClusters(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeCacheClustersAPIClient is a client that implements the +// DescribeCacheClusters operation. +type DescribeCacheClustersAPIClient interface { + DescribeCacheClusters(context.Context, *DescribeCacheClustersInput, ...func(*Options)) (*DescribeCacheClustersOutput, error) +} + +var _ DescribeCacheClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCacheClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeCacheEngineVersions.go b/service/elasticache/api_op_DescribeCacheEngineVersions.go index e2f07da7ec6..f870ef7a6bc 100644 --- a/service/elasticache/api_op_DescribeCacheEngineVersions.go +++ b/service/elasticache/api_op_DescribeCacheEngineVersions.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeCacheEngineVersionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCacheEngineVersions(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeCacheEngineVersionsMiddlewares(stack *middl return nil } -// DescribeCacheEngineVersionsAPIClient is a client that implements the -// DescribeCacheEngineVersions operation. -type DescribeCacheEngineVersionsAPIClient interface { - DescribeCacheEngineVersions(context.Context, *DescribeCacheEngineVersionsInput, ...func(*Options)) (*DescribeCacheEngineVersionsOutput, error) -} - -var _ DescribeCacheEngineVersionsAPIClient = (*Client)(nil) - // DescribeCacheEngineVersionsPaginatorOptions is the paginator options for // DescribeCacheEngineVersions type DescribeCacheEngineVersionsPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *DescribeCacheEngineVersionsPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCacheEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *DescribeCacheEngineVersionsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeCacheEngineVersionsAPIClient is a client that implements the +// DescribeCacheEngineVersions operation. +type DescribeCacheEngineVersionsAPIClient interface { + DescribeCacheEngineVersions(context.Context, *DescribeCacheEngineVersionsInput, ...func(*Options)) (*DescribeCacheEngineVersionsOutput, error) +} + +var _ DescribeCacheEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCacheEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeCacheParameterGroups.go b/service/elasticache/api_op_DescribeCacheParameterGroups.go index e9d009a0584..b1080ae4b84 100644 --- a/service/elasticache/api_op_DescribeCacheParameterGroups.go +++ b/service/elasticache/api_op_DescribeCacheParameterGroups.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeCacheParameterGroupsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCacheParameterGroups(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeCacheParameterGroupsMiddlewares(stack *midd return nil } -// DescribeCacheParameterGroupsAPIClient is a client that implements the -// DescribeCacheParameterGroups operation. -type DescribeCacheParameterGroupsAPIClient interface { - DescribeCacheParameterGroups(context.Context, *DescribeCacheParameterGroupsInput, ...func(*Options)) (*DescribeCacheParameterGroupsOutput, error) -} - -var _ DescribeCacheParameterGroupsAPIClient = (*Client)(nil) - // DescribeCacheParameterGroupsPaginatorOptions is the paginator options for // DescribeCacheParameterGroups type DescribeCacheParameterGroupsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeCacheParameterGroupsPaginator) NextPage(ctx context.Context, op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCacheParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeCacheParameterGroupsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeCacheParameterGroupsAPIClient is a client that implements the +// DescribeCacheParameterGroups operation. +type DescribeCacheParameterGroupsAPIClient interface { + DescribeCacheParameterGroups(context.Context, *DescribeCacheParameterGroupsInput, ...func(*Options)) (*DescribeCacheParameterGroupsOutput, error) +} + +var _ DescribeCacheParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCacheParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeCacheParameters.go b/service/elasticache/api_op_DescribeCacheParameters.go index e174744611e..c45b86bd6ec 100644 --- a/service/elasticache/api_op_DescribeCacheParameters.go +++ b/service/elasticache/api_op_DescribeCacheParameters.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeCacheParametersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCacheParametersValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeCacheParametersMiddlewares(stack *middlewar return nil } -// DescribeCacheParametersAPIClient is a client that implements the -// DescribeCacheParameters operation. -type DescribeCacheParametersAPIClient interface { - DescribeCacheParameters(context.Context, *DescribeCacheParametersInput, ...func(*Options)) (*DescribeCacheParametersOutput, error) -} - -var _ DescribeCacheParametersAPIClient = (*Client)(nil) - // DescribeCacheParametersPaginatorOptions is the paginator options for // DescribeCacheParameters type DescribeCacheParametersPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeCacheParametersPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCacheParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeCacheParametersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeCacheParametersAPIClient is a client that implements the +// DescribeCacheParameters operation. +type DescribeCacheParametersAPIClient interface { + DescribeCacheParameters(context.Context, *DescribeCacheParametersInput, ...func(*Options)) (*DescribeCacheParametersOutput, error) +} + +var _ DescribeCacheParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCacheParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeCacheSecurityGroups.go b/service/elasticache/api_op_DescribeCacheSecurityGroups.go index 1f6c322fdc1..d136439fd89 100644 --- a/service/elasticache/api_op_DescribeCacheSecurityGroups.go +++ b/service/elasticache/api_op_DescribeCacheSecurityGroups.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeCacheSecurityGroupsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCacheSecurityGroups(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeCacheSecurityGroupsMiddlewares(stack *middl return nil } -// DescribeCacheSecurityGroupsAPIClient is a client that implements the -// DescribeCacheSecurityGroups operation. -type DescribeCacheSecurityGroupsAPIClient interface { - DescribeCacheSecurityGroups(context.Context, *DescribeCacheSecurityGroupsInput, ...func(*Options)) (*DescribeCacheSecurityGroupsOutput, error) -} - -var _ DescribeCacheSecurityGroupsAPIClient = (*Client)(nil) - // DescribeCacheSecurityGroupsPaginatorOptions is the paginator options for // DescribeCacheSecurityGroups type DescribeCacheSecurityGroupsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeCacheSecurityGroupsPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCacheSecurityGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeCacheSecurityGroupsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeCacheSecurityGroupsAPIClient is a client that implements the +// DescribeCacheSecurityGroups operation. +type DescribeCacheSecurityGroupsAPIClient interface { + DescribeCacheSecurityGroups(context.Context, *DescribeCacheSecurityGroupsInput, ...func(*Options)) (*DescribeCacheSecurityGroupsOutput, error) +} + +var _ DescribeCacheSecurityGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCacheSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeCacheSubnetGroups.go b/service/elasticache/api_op_DescribeCacheSubnetGroups.go index c75c207889b..8ddad3550c1 100644 --- a/service/elasticache/api_op_DescribeCacheSubnetGroups.go +++ b/service/elasticache/api_op_DescribeCacheSubnetGroups.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeCacheSubnetGroupsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCacheSubnetGroups(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeCacheSubnetGroupsMiddlewares(stack *middlew return nil } -// DescribeCacheSubnetGroupsAPIClient is a client that implements the -// DescribeCacheSubnetGroups operation. -type DescribeCacheSubnetGroupsAPIClient interface { - DescribeCacheSubnetGroups(context.Context, *DescribeCacheSubnetGroupsInput, ...func(*Options)) (*DescribeCacheSubnetGroupsOutput, error) -} - -var _ DescribeCacheSubnetGroupsAPIClient = (*Client)(nil) - // DescribeCacheSubnetGroupsPaginatorOptions is the paginator options for // DescribeCacheSubnetGroups type DescribeCacheSubnetGroupsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeCacheSubnetGroupsPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCacheSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeCacheSubnetGroupsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeCacheSubnetGroupsAPIClient is a client that implements the +// DescribeCacheSubnetGroups operation. +type DescribeCacheSubnetGroupsAPIClient interface { + DescribeCacheSubnetGroups(context.Context, *DescribeCacheSubnetGroupsInput, ...func(*Options)) (*DescribeCacheSubnetGroupsOutput, error) +} + +var _ DescribeCacheSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCacheSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeEngineDefaultParameters.go b/service/elasticache/api_op_DescribeEngineDefaultParameters.go index cfbdb1a3b60..2d6fc1643e1 100644 --- a/service/elasticache/api_op_DescribeEngineDefaultParameters.go +++ b/service/elasticache/api_op_DescribeEngineDefaultParameters.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngineDefaultParametersValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *m return nil } -// DescribeEngineDefaultParametersAPIClient is a client that implements the -// DescribeEngineDefaultParameters operation. -type DescribeEngineDefaultParametersAPIClient interface { - DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) -} - -var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil) - // DescribeEngineDefaultParametersPaginatorOptions is the paginator options for // DescribeEngineDefaultParameters type DescribeEngineDefaultParametersPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEngineDefaultParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeEngineDefaultParametersAPIClient is a client that implements the +// DescribeEngineDefaultParameters operation. +type DescribeEngineDefaultParametersAPIClient interface { + DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) +} + +var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEngineDefaultParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeEvents.go b/service/elasticache/api_op_DescribeEvents.go index dcc309c5c49..90151788943 100644 --- a/service/elasticache/api_op_DescribeEvents.go +++ b/service/elasticache/api_op_DescribeEvents.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(options.Region), middleware.Before); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -249,6 +244,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeGlobalReplicationGroups.go b/service/elasticache/api_op_DescribeGlobalReplicationGroups.go index 92a3e613b89..5c3add681f2 100644 --- a/service/elasticache/api_op_DescribeGlobalReplicationGroups.go +++ b/service/elasticache/api_op_DescribeGlobalReplicationGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeGlobalReplicationGroupsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGlobalReplicationGroups(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeGlobalReplicationGroupsMiddlewares(stack *m return nil } -// DescribeGlobalReplicationGroupsAPIClient is a client that implements the -// DescribeGlobalReplicationGroups operation. -type DescribeGlobalReplicationGroupsAPIClient interface { - DescribeGlobalReplicationGroups(context.Context, *DescribeGlobalReplicationGroupsInput, ...func(*Options)) (*DescribeGlobalReplicationGroupsOutput, error) -} - -var _ DescribeGlobalReplicationGroupsAPIClient = (*Client)(nil) - // DescribeGlobalReplicationGroupsPaginatorOptions is the paginator options for // DescribeGlobalReplicationGroups type DescribeGlobalReplicationGroupsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeGlobalReplicationGroupsPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGlobalReplicationGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeGlobalReplicationGroupsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeGlobalReplicationGroupsAPIClient is a client that implements the +// DescribeGlobalReplicationGroups operation. +type DescribeGlobalReplicationGroupsAPIClient interface { + DescribeGlobalReplicationGroups(context.Context, *DescribeGlobalReplicationGroupsInput, ...func(*Options)) (*DescribeGlobalReplicationGroupsOutput, error) +} + +var _ DescribeGlobalReplicationGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGlobalReplicationGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeReplicationGroups.go b/service/elasticache/api_op_DescribeReplicationGroups.go index 88761660ae3..caafb6a0642 100644 --- a/service/elasticache/api_op_DescribeReplicationGroups.go +++ b/service/elasticache/api_op_DescribeReplicationGroups.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeReplicationGroupsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplicationGroups(options.Region), middleware.Before); err != nil { return err } @@ -159,104 +162,6 @@ func (c *Client) addOperationDescribeReplicationGroupsMiddlewares(stack *middlew return nil } -// DescribeReplicationGroupsAPIClient is a client that implements the -// DescribeReplicationGroups operation. -type DescribeReplicationGroupsAPIClient interface { - DescribeReplicationGroups(context.Context, *DescribeReplicationGroupsInput, ...func(*Options)) (*DescribeReplicationGroupsOutput, error) -} - -var _ DescribeReplicationGroupsAPIClient = (*Client)(nil) - -// DescribeReplicationGroupsPaginatorOptions is the paginator options for -// DescribeReplicationGroups -type DescribeReplicationGroupsPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a marker is included in the response so - // that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: minimum 20; maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeReplicationGroupsPaginator is a paginator for DescribeReplicationGroups -type DescribeReplicationGroupsPaginator struct { - options DescribeReplicationGroupsPaginatorOptions - client DescribeReplicationGroupsAPIClient - params *DescribeReplicationGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeReplicationGroupsPaginator returns a new -// DescribeReplicationGroupsPaginator -func NewDescribeReplicationGroupsPaginator(client DescribeReplicationGroupsAPIClient, params *DescribeReplicationGroupsInput, optFns ...func(*DescribeReplicationGroupsPaginatorOptions)) *DescribeReplicationGroupsPaginator { - if params == nil { - params = &DescribeReplicationGroupsInput{} - } - - options := DescribeReplicationGroupsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeReplicationGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeReplicationGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeReplicationGroups page. -func (p *DescribeReplicationGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeReplicationGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ReplicationGroupAvailableWaiterOptions are waiter options for // ReplicationGroupAvailableWaiter type ReplicationGroupAvailableWaiterOptions struct { @@ -375,7 +280,13 @@ func (w *ReplicationGroupAvailableWaiter) WaitForOutput(ctx context.Context, par } out, err := w.client.DescribeReplicationGroups(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -589,7 +500,13 @@ func (w *ReplicationGroupDeletedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeReplicationGroups(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -693,6 +610,107 @@ func replicationGroupDeletedStateRetryable(ctx context.Context, input *DescribeR return true, nil } +// DescribeReplicationGroupsPaginatorOptions is the paginator options for +// DescribeReplicationGroups +type DescribeReplicationGroupsPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a marker is included in the response so + // that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: minimum 20; maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeReplicationGroupsPaginator is a paginator for DescribeReplicationGroups +type DescribeReplicationGroupsPaginator struct { + options DescribeReplicationGroupsPaginatorOptions + client DescribeReplicationGroupsAPIClient + params *DescribeReplicationGroupsInput + nextToken *string + firstPage bool +} + +// NewDescribeReplicationGroupsPaginator returns a new +// DescribeReplicationGroupsPaginator +func NewDescribeReplicationGroupsPaginator(client DescribeReplicationGroupsAPIClient, params *DescribeReplicationGroupsInput, optFns ...func(*DescribeReplicationGroupsPaginatorOptions)) *DescribeReplicationGroupsPaginator { + if params == nil { + params = &DescribeReplicationGroupsInput{} + } + + options := DescribeReplicationGroupsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReplicationGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReplicationGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeReplicationGroups page. +func (p *DescribeReplicationGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeReplicationGroups(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeReplicationGroupsAPIClient is a client that implements the +// DescribeReplicationGroups operation. +type DescribeReplicationGroupsAPIClient interface { + DescribeReplicationGroups(context.Context, *DescribeReplicationGroupsInput, ...func(*Options)) (*DescribeReplicationGroupsOutput, error) +} + +var _ DescribeReplicationGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeReservedCacheNodes.go b/service/elasticache/api_op_DescribeReservedCacheNodes.go index 25e93cb9fad..359d525d78d 100644 --- a/service/elasticache/api_op_DescribeReservedCacheNodes.go +++ b/service/elasticache/api_op_DescribeReservedCacheNodes.go @@ -247,6 +247,9 @@ func (c *Client) addOperationDescribeReservedCacheNodesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedCacheNodes(options.Region), middleware.Before); err != nil { return err } @@ -268,14 +271,6 @@ func (c *Client) addOperationDescribeReservedCacheNodesMiddlewares(stack *middle return nil } -// DescribeReservedCacheNodesAPIClient is a client that implements the -// DescribeReservedCacheNodes operation. -type DescribeReservedCacheNodesAPIClient interface { - DescribeReservedCacheNodes(context.Context, *DescribeReservedCacheNodesInput, ...func(*Options)) (*DescribeReservedCacheNodesOutput, error) -} - -var _ DescribeReservedCacheNodesAPIClient = (*Client)(nil) - // DescribeReservedCacheNodesPaginatorOptions is the paginator options for // DescribeReservedCacheNodes type DescribeReservedCacheNodesPaginatorOptions struct { @@ -348,6 +343,9 @@ func (p *DescribeReservedCacheNodesPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedCacheNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -367,6 +365,14 @@ func (p *DescribeReservedCacheNodesPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeReservedCacheNodesAPIClient is a client that implements the +// DescribeReservedCacheNodes operation. +type DescribeReservedCacheNodesAPIClient interface { + DescribeReservedCacheNodes(context.Context, *DescribeReservedCacheNodesInput, ...func(*Options)) (*DescribeReservedCacheNodesOutput, error) +} + +var _ DescribeReservedCacheNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedCacheNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go b/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go index d5fe8810233..9dcd28876c0 100644 --- a/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go +++ b/service/elasticache/api_op_DescribeReservedCacheNodesOfferings.go @@ -244,6 +244,9 @@ func (c *Client) addOperationDescribeReservedCacheNodesOfferingsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedCacheNodesOfferings(options.Region), middleware.Before); err != nil { return err } @@ -265,14 +268,6 @@ func (c *Client) addOperationDescribeReservedCacheNodesOfferingsMiddlewares(stac return nil } -// DescribeReservedCacheNodesOfferingsAPIClient is a client that implements the -// DescribeReservedCacheNodesOfferings operation. -type DescribeReservedCacheNodesOfferingsAPIClient interface { - DescribeReservedCacheNodesOfferings(context.Context, *DescribeReservedCacheNodesOfferingsInput, ...func(*Options)) (*DescribeReservedCacheNodesOfferingsOutput, error) -} - -var _ DescribeReservedCacheNodesOfferingsAPIClient = (*Client)(nil) - // DescribeReservedCacheNodesOfferingsPaginatorOptions is the paginator options // for DescribeReservedCacheNodesOfferings type DescribeReservedCacheNodesOfferingsPaginatorOptions struct { @@ -345,6 +340,9 @@ func (p *DescribeReservedCacheNodesOfferingsPaginator) NextPage(ctx context.Cont } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedCacheNodesOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -364,6 +362,14 @@ func (p *DescribeReservedCacheNodesOfferingsPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeReservedCacheNodesOfferingsAPIClient is a client that implements the +// DescribeReservedCacheNodesOfferings operation. +type DescribeReservedCacheNodesOfferingsAPIClient interface { + DescribeReservedCacheNodesOfferings(context.Context, *DescribeReservedCacheNodesOfferingsInput, ...func(*Options)) (*DescribeReservedCacheNodesOfferingsOutput, error) +} + +var _ DescribeReservedCacheNodesOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedCacheNodesOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeServerlessCacheSnapshots.go b/service/elasticache/api_op_DescribeServerlessCacheSnapshots.go index c1df00cad0b..f2091a3b9c6 100644 --- a/service/elasticache/api_op_DescribeServerlessCacheSnapshots.go +++ b/service/elasticache/api_op_DescribeServerlessCacheSnapshots.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeServerlessCacheSnapshotsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServerlessCacheSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeServerlessCacheSnapshotsMiddlewares(stack * return nil } -// DescribeServerlessCacheSnapshotsAPIClient is a client that implements the -// DescribeServerlessCacheSnapshots operation. -type DescribeServerlessCacheSnapshotsAPIClient interface { - DescribeServerlessCacheSnapshots(context.Context, *DescribeServerlessCacheSnapshotsInput, ...func(*Options)) (*DescribeServerlessCacheSnapshotsOutput, error) -} - -var _ DescribeServerlessCacheSnapshotsAPIClient = (*Client)(nil) - // DescribeServerlessCacheSnapshotsPaginatorOptions is the paginator options for // DescribeServerlessCacheSnapshots type DescribeServerlessCacheSnapshotsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeServerlessCacheSnapshotsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeServerlessCacheSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeServerlessCacheSnapshotsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeServerlessCacheSnapshotsAPIClient is a client that implements the +// DescribeServerlessCacheSnapshots operation. +type DescribeServerlessCacheSnapshotsAPIClient interface { + DescribeServerlessCacheSnapshots(context.Context, *DescribeServerlessCacheSnapshotsInput, ...func(*Options)) (*DescribeServerlessCacheSnapshotsOutput, error) +} + +var _ DescribeServerlessCacheSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServerlessCacheSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeServerlessCaches.go b/service/elasticache/api_op_DescribeServerlessCaches.go index e0d670a4a2e..cc4ca50567a 100644 --- a/service/elasticache/api_op_DescribeServerlessCaches.go +++ b/service/elasticache/api_op_DescribeServerlessCaches.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeServerlessCachesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServerlessCaches(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeServerlessCachesMiddlewares(stack *middlewa return nil } -// DescribeServerlessCachesAPIClient is a client that implements the -// DescribeServerlessCaches operation. -type DescribeServerlessCachesAPIClient interface { - DescribeServerlessCaches(context.Context, *DescribeServerlessCachesInput, ...func(*Options)) (*DescribeServerlessCachesOutput, error) -} - -var _ DescribeServerlessCachesAPIClient = (*Client)(nil) - // DescribeServerlessCachesPaginatorOptions is the paginator options for // DescribeServerlessCaches type DescribeServerlessCachesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeServerlessCachesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeServerlessCaches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeServerlessCachesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeServerlessCachesAPIClient is a client that implements the +// DescribeServerlessCaches operation. +type DescribeServerlessCachesAPIClient interface { + DescribeServerlessCaches(context.Context, *DescribeServerlessCachesInput, ...func(*Options)) (*DescribeServerlessCachesOutput, error) +} + +var _ DescribeServerlessCachesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServerlessCaches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeServiceUpdates.go b/service/elasticache/api_op_DescribeServiceUpdates.go index c7e0dd0082b..c398fcbb44b 100644 --- a/service/elasticache/api_op_DescribeServiceUpdates.go +++ b/service/elasticache/api_op_DescribeServiceUpdates.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeServiceUpdatesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServiceUpdates(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationDescribeServiceUpdatesMiddlewares(stack *middleware return nil } -// DescribeServiceUpdatesAPIClient is a client that implements the -// DescribeServiceUpdates operation. -type DescribeServiceUpdatesAPIClient interface { - DescribeServiceUpdates(context.Context, *DescribeServiceUpdatesInput, ...func(*Options)) (*DescribeServiceUpdatesOutput, error) -} - -var _ DescribeServiceUpdatesAPIClient = (*Client)(nil) - // DescribeServiceUpdatesPaginatorOptions is the paginator options for // DescribeServiceUpdates type DescribeServiceUpdatesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeServiceUpdatesPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeServiceUpdates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeServiceUpdatesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeServiceUpdatesAPIClient is a client that implements the +// DescribeServiceUpdates operation. +type DescribeServiceUpdatesAPIClient interface { + DescribeServiceUpdates(context.Context, *DescribeServiceUpdatesInput, ...func(*Options)) (*DescribeServiceUpdatesOutput, error) +} + +var _ DescribeServiceUpdatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServiceUpdates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeSnapshots.go b/service/elasticache/api_op_DescribeSnapshots.go index f3f744638b1..b0acdd3299d 100644 --- a/service/elasticache/api_op_DescribeSnapshots.go +++ b/service/elasticache/api_op_DescribeSnapshots.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac return nil } -// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots -// operation. -type DescribeSnapshotsAPIClient interface { - DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) -} - -var _ DescribeSnapshotsAPIClient = (*Client)(nil) - // DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots type DescribeSnapshotsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -250,6 +245,9 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots +// operation. +type DescribeSnapshotsAPIClient interface { + DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) +} + +var _ DescribeSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeUpdateActions.go b/service/elasticache/api_op_DescribeUpdateActions.go index 7a9e5afc4b2..57d53fc51e7 100644 --- a/service/elasticache/api_op_DescribeUpdateActions.go +++ b/service/elasticache/api_op_DescribeUpdateActions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeUpdateActionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUpdateActions(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationDescribeUpdateActionsMiddlewares(stack *middleware. return nil } -// DescribeUpdateActionsAPIClient is a client that implements the -// DescribeUpdateActions operation. -type DescribeUpdateActionsAPIClient interface { - DescribeUpdateActions(context.Context, *DescribeUpdateActionsInput, ...func(*Options)) (*DescribeUpdateActionsOutput, error) -} - -var _ DescribeUpdateActionsAPIClient = (*Client)(nil) - // DescribeUpdateActionsPaginatorOptions is the paginator options for // DescribeUpdateActions type DescribeUpdateActionsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeUpdateActionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUpdateActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeUpdateActionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeUpdateActionsAPIClient is a client that implements the +// DescribeUpdateActions operation. +type DescribeUpdateActionsAPIClient interface { + DescribeUpdateActions(context.Context, *DescribeUpdateActionsInput, ...func(*Options)) (*DescribeUpdateActionsOutput, error) +} + +var _ DescribeUpdateActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUpdateActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeUserGroups.go b/service/elasticache/api_op_DescribeUserGroups.go index 62a03034649..428a75f47b2 100644 --- a/service/elasticache/api_op_DescribeUserGroups.go +++ b/service/elasticache/api_op_DescribeUserGroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeUserGroupsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUserGroups(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeUserGroupsMiddlewares(stack *middleware.Sta return nil } -// DescribeUserGroupsAPIClient is a client that implements the DescribeUserGroups -// operation. -type DescribeUserGroupsAPIClient interface { - DescribeUserGroups(context.Context, *DescribeUserGroupsInput, ...func(*Options)) (*DescribeUserGroupsOutput, error) -} - -var _ DescribeUserGroupsAPIClient = (*Client)(nil) - // DescribeUserGroupsPaginatorOptions is the paginator options for // DescribeUserGroups type DescribeUserGroupsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeUserGroupsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUserGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeUserGroupsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeUserGroupsAPIClient is a client that implements the DescribeUserGroups +// operation. +type DescribeUserGroupsAPIClient interface { + DescribeUserGroups(context.Context, *DescribeUserGroupsInput, ...func(*Options)) (*DescribeUserGroupsOutput, error) +} + +var _ DescribeUserGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUserGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DescribeUsers.go b/service/elasticache/api_op_DescribeUsers.go index 6285e3c6789..282dc7a9b8b 100644 --- a/service/elasticache/api_op_DescribeUsers.go +++ b/service/elasticache/api_op_DescribeUsers.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUsersValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o return nil } -// DescribeUsersAPIClient is a client that implements the DescribeUsers operation. -type DescribeUsersAPIClient interface { - DescribeUsers(context.Context, *DescribeUsersInput, ...func(*Options)) (*DescribeUsersOutput, error) -} - -var _ DescribeUsersAPIClient = (*Client)(nil) - // DescribeUsersPaginatorOptions is the paginator options for DescribeUsers type DescribeUsersPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -223,6 +219,9 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeUsersAPIClient is a client that implements the DescribeUsers operation. +type DescribeUsersAPIClient interface { + DescribeUsers(context.Context, *DescribeUsersInput, ...func(*Options)) (*DescribeUsersOutput, error) +} + +var _ DescribeUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticache/api_op_DisassociateGlobalReplicationGroup.go b/service/elasticache/api_op_DisassociateGlobalReplicationGroup.go index 3c7a3eb4d5f..8f1232bd6bf 100644 --- a/service/elasticache/api_op_DisassociateGlobalReplicationGroup.go +++ b/service/elasticache/api_op_DisassociateGlobalReplicationGroup.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDisassociateGlobalReplicationGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ExportServerlessCacheSnapshot.go b/service/elasticache/api_op_ExportServerlessCacheSnapshot.go index bfccd73c51a..c2083cfcf8a 100644 --- a/service/elasticache/api_op_ExportServerlessCacheSnapshot.go +++ b/service/elasticache/api_op_ExportServerlessCacheSnapshot.go @@ -115,6 +115,9 @@ func (c *Client) addOperationExportServerlessCacheSnapshotMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportServerlessCacheSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_FailoverGlobalReplicationGroup.go b/service/elasticache/api_op_FailoverGlobalReplicationGroup.go index e2d10896804..fee48301169 100644 --- a/service/elasticache/api_op_FailoverGlobalReplicationGroup.go +++ b/service/elasticache/api_op_FailoverGlobalReplicationGroup.go @@ -123,6 +123,9 @@ func (c *Client) addOperationFailoverGlobalReplicationGroupMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFailoverGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_IncreaseNodeGroupsInGlobalReplicationGroup.go b/service/elasticache/api_op_IncreaseNodeGroupsInGlobalReplicationGroup.go index 96f94923172..5006fac902c 100644 --- a/service/elasticache/api_op_IncreaseNodeGroupsInGlobalReplicationGroup.go +++ b/service/elasticache/api_op_IncreaseNodeGroupsInGlobalReplicationGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationIncreaseNodeGroupsInGlobalReplicationGroupMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIncreaseNodeGroupsInGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_IncreaseReplicaCount.go b/service/elasticache/api_op_IncreaseReplicaCount.go index 2b2d6bb46f3..4d16ec25e9a 100644 --- a/service/elasticache/api_op_IncreaseReplicaCount.go +++ b/service/elasticache/api_op_IncreaseReplicaCount.go @@ -127,6 +127,9 @@ func (c *Client) addOperationIncreaseReplicaCountMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIncreaseReplicaCountValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ListAllowedNodeTypeModifications.go b/service/elasticache/api_op_ListAllowedNodeTypeModifications.go index 485d432962c..c03f3440751 100644 --- a/service/elasticache/api_op_ListAllowedNodeTypeModifications.go +++ b/service/elasticache/api_op_ListAllowedNodeTypeModifications.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListAllowedNodeTypeModificationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAllowedNodeTypeModifications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticache/api_op_ListTagsForResource.go b/service/elasticache/api_op_ListTagsForResource.go index 671f2258bc1..cea798e2174 100644 --- a/service/elasticache/api_op_ListTagsForResource.go +++ b/service/elasticache/api_op_ListTagsForResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyCacheCluster.go b/service/elasticache/api_op_ModifyCacheCluster.go index 5d080db88bf..8c64e1aa1b1 100644 --- a/service/elasticache/api_op_ModifyCacheCluster.go +++ b/service/elasticache/api_op_ModifyCacheCluster.go @@ -381,6 +381,9 @@ func (c *Client) addOperationModifyCacheClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCacheClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyCacheParameterGroup.go b/service/elasticache/api_op_ModifyCacheParameterGroup.go index 5b929ee3372..48d484beefd 100644 --- a/service/elasticache/api_op_ModifyCacheParameterGroup.go +++ b/service/elasticache/api_op_ModifyCacheParameterGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationModifyCacheParameterGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCacheParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyCacheSubnetGroup.go b/service/elasticache/api_op_ModifyCacheSubnetGroup.go index bb6fc3d6b0a..fbd4964a47e 100644 --- a/service/elasticache/api_op_ModifyCacheSubnetGroup.go +++ b/service/elasticache/api_op_ModifyCacheSubnetGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationModifyCacheSubnetGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCacheSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyGlobalReplicationGroup.go b/service/elasticache/api_op_ModifyGlobalReplicationGroup.go index c50db0c1283..b89efe13921 100644 --- a/service/elasticache/api_op_ModifyGlobalReplicationGroup.go +++ b/service/elasticache/api_op_ModifyGlobalReplicationGroup.go @@ -138,6 +138,9 @@ func (c *Client) addOperationModifyGlobalReplicationGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyReplicationGroup.go b/service/elasticache/api_op_ModifyReplicationGroup.go index c03d49e0501..c714db9b60b 100644 --- a/service/elasticache/api_op_ModifyReplicationGroup.go +++ b/service/elasticache/api_op_ModifyReplicationGroup.go @@ -329,6 +329,9 @@ func (c *Client) addOperationModifyReplicationGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyReplicationGroupShardConfiguration.go b/service/elasticache/api_op_ModifyReplicationGroupShardConfiguration.go index 7330ab9033e..b08e94490c4 100644 --- a/service/elasticache/api_op_ModifyReplicationGroupShardConfiguration.go +++ b/service/elasticache/api_op_ModifyReplicationGroupShardConfiguration.go @@ -149,6 +149,9 @@ func (c *Client) addOperationModifyReplicationGroupShardConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyReplicationGroupShardConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyServerlessCache.go b/service/elasticache/api_op_ModifyServerlessCache.go index 69bff410f0e..d6083bd751a 100644 --- a/service/elasticache/api_op_ModifyServerlessCache.go +++ b/service/elasticache/api_op_ModifyServerlessCache.go @@ -141,6 +141,9 @@ func (c *Client) addOperationModifyServerlessCacheMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyServerlessCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyUser.go b/service/elasticache/api_op_ModifyUser.go index c377f6e3ae4..bf50b7e7c96 100644 --- a/service/elasticache/api_op_ModifyUser.go +++ b/service/elasticache/api_op_ModifyUser.go @@ -145,6 +145,9 @@ func (c *Client) addOperationModifyUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ModifyUserGroup.go b/service/elasticache/api_op_ModifyUserGroup.go index 9c70e6d82c5..350027a51c5 100644 --- a/service/elasticache/api_op_ModifyUserGroup.go +++ b/service/elasticache/api_op_ModifyUserGroup.go @@ -138,6 +138,9 @@ func (c *Client) addOperationModifyUserGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyUserGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_PurchaseReservedCacheNodesOffering.go b/service/elasticache/api_op_PurchaseReservedCacheNodesOffering.go index 0ab83d04831..5cae740305d 100644 --- a/service/elasticache/api_op_PurchaseReservedCacheNodesOffering.go +++ b/service/elasticache/api_op_PurchaseReservedCacheNodesOffering.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPurchaseReservedCacheNodesOfferingMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedCacheNodesOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_RebalanceSlotsInGlobalReplicationGroup.go b/service/elasticache/api_op_RebalanceSlotsInGlobalReplicationGroup.go index 4dffee0a7ff..df19b278b78 100644 --- a/service/elasticache/api_op_RebalanceSlotsInGlobalReplicationGroup.go +++ b/service/elasticache/api_op_RebalanceSlotsInGlobalReplicationGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRebalanceSlotsInGlobalReplicationGroupMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebalanceSlotsInGlobalReplicationGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_RebootCacheCluster.go b/service/elasticache/api_op_RebootCacheCluster.go index 33db857e110..c63478e46ad 100644 --- a/service/elasticache/api_op_RebootCacheCluster.go +++ b/service/elasticache/api_op_RebootCacheCluster.go @@ -130,6 +130,9 @@ func (c *Client) addOperationRebootCacheClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootCacheClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_RemoveTagsFromResource.go b/service/elasticache/api_op_RemoveTagsFromResource.go index 001a0148d60..a71ee593e3a 100644 --- a/service/elasticache/api_op_RemoveTagsFromResource.go +++ b/service/elasticache/api_op_RemoveTagsFromResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_ResetCacheParameterGroup.go b/service/elasticache/api_op_ResetCacheParameterGroup.go index e8a6e2438db..18356d4ec6f 100644 --- a/service/elasticache/api_op_ResetCacheParameterGroup.go +++ b/service/elasticache/api_op_ResetCacheParameterGroup.go @@ -128,6 +128,9 @@ func (c *Client) addOperationResetCacheParameterGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetCacheParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_RevokeCacheSecurityGroupIngress.go b/service/elasticache/api_op_RevokeCacheSecurityGroupIngress.go index 26f5acb8379..31d379097e8 100644 --- a/service/elasticache/api_op_RevokeCacheSecurityGroupIngress.go +++ b/service/elasticache/api_op_RevokeCacheSecurityGroupIngress.go @@ -126,6 +126,9 @@ func (c *Client) addOperationRevokeCacheSecurityGroupIngressMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeCacheSecurityGroupIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_StartMigration.go b/service/elasticache/api_op_StartMigration.go index db3c5c3d9c4..4efb58dc64c 100644 --- a/service/elasticache/api_op_StartMigration.go +++ b/service/elasticache/api_op_StartMigration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStartMigrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMigrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_TestFailover.go b/service/elasticache/api_op_TestFailover.go index a5f5588508e..d0a4396242d 100644 --- a/service/elasticache/api_op_TestFailover.go +++ b/service/elasticache/api_op_TestFailover.go @@ -165,6 +165,9 @@ func (c *Client) addOperationTestFailoverMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestFailoverValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticache/api_op_TestMigration.go b/service/elasticache/api_op_TestMigration.go index 282c6e8b44a..73bdf9f9182 100644 --- a/service/elasticache/api_op_TestMigration.go +++ b/service/elasticache/api_op_TestMigration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTestMigrationMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestMigrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_client.go b/service/elasticbeanstalk/api_client.go index acf71d627ad..e2d59f3d098 100644 --- a/service/elasticbeanstalk/api_client.go +++ b/service/elasticbeanstalk/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go b/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go index 36ecd1bf0ce..0bdb0f3d4b3 100644 --- a/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go +++ b/service/elasticbeanstalk/api_op_AbortEnvironmentUpdate.go @@ -105,6 +105,9 @@ func (c *Client) addOperationAbortEnvironmentUpdateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAbortEnvironmentUpdate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_ApplyEnvironmentManagedAction.go b/service/elasticbeanstalk/api_op_ApplyEnvironmentManagedAction.go index e7b1b0b4d6b..bcf11979daa 100644 --- a/service/elasticbeanstalk/api_op_ApplyEnvironmentManagedAction.go +++ b/service/elasticbeanstalk/api_op_ApplyEnvironmentManagedAction.go @@ -125,6 +125,9 @@ func (c *Client) addOperationApplyEnvironmentManagedActionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplyEnvironmentManagedActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_AssociateEnvironmentOperationsRole.go b/service/elasticbeanstalk/api_op_AssociateEnvironmentOperationsRole.go index 347dd18af87..55a2d67eda9 100644 --- a/service/elasticbeanstalk/api_op_AssociateEnvironmentOperationsRole.go +++ b/service/elasticbeanstalk/api_op_AssociateEnvironmentOperationsRole.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssociateEnvironmentOperationsRoleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateEnvironmentOperationsRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CheckDNSAvailability.go b/service/elasticbeanstalk/api_op_CheckDNSAvailability.go index 56808bf7fac..38c2487eb0b 100644 --- a/service/elasticbeanstalk/api_op_CheckDNSAvailability.go +++ b/service/elasticbeanstalk/api_op_CheckDNSAvailability.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCheckDNSAvailabilityMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckDNSAvailabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_ComposeEnvironments.go b/service/elasticbeanstalk/api_op_ComposeEnvironments.go index a23f4d62afd..f133086835d 100644 --- a/service/elasticbeanstalk/api_op_ComposeEnvironments.go +++ b/service/elasticbeanstalk/api_op_ComposeEnvironments.go @@ -130,6 +130,9 @@ func (c *Client) addOperationComposeEnvironmentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opComposeEnvironments(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CreateApplication.go b/service/elasticbeanstalk/api_op_CreateApplication.go index d2cf71a97e0..505b86a5875 100644 --- a/service/elasticbeanstalk/api_op_CreateApplication.go +++ b/service/elasticbeanstalk/api_op_CreateApplication.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CreateApplicationVersion.go b/service/elasticbeanstalk/api_op_CreateApplicationVersion.go index a51db74c1d2..349e9036310 100644 --- a/service/elasticbeanstalk/api_op_CreateApplicationVersion.go +++ b/service/elasticbeanstalk/api_op_CreateApplicationVersion.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCreateApplicationVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CreateConfigurationTemplate.go b/service/elasticbeanstalk/api_op_CreateConfigurationTemplate.go index 648aa18717e..e802cab0bdf 100644 --- a/service/elasticbeanstalk/api_op_CreateConfigurationTemplate.go +++ b/service/elasticbeanstalk/api_op_CreateConfigurationTemplate.go @@ -232,6 +232,9 @@ func (c *Client) addOperationCreateConfigurationTemplateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CreateEnvironment.go b/service/elasticbeanstalk/api_op_CreateEnvironment.go index ed2cf805dc3..a4334283bcb 100644 --- a/service/elasticbeanstalk/api_op_CreateEnvironment.go +++ b/service/elasticbeanstalk/api_op_CreateEnvironment.go @@ -298,6 +298,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CreatePlatformVersion.go b/service/elasticbeanstalk/api_op_CreatePlatformVersion.go index cb1462cec59..e69ad20e408 100644 --- a/service/elasticbeanstalk/api_op_CreatePlatformVersion.go +++ b/service/elasticbeanstalk/api_op_CreatePlatformVersion.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreatePlatformVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePlatformVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_CreateStorageLocation.go b/service/elasticbeanstalk/api_op_CreateStorageLocation.go index ae3792c995f..ed7a47f2a61 100644 --- a/service/elasticbeanstalk/api_op_CreateStorageLocation.go +++ b/service/elasticbeanstalk/api_op_CreateStorageLocation.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCreateStorageLocationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStorageLocation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DeleteApplication.go b/service/elasticbeanstalk/api_op_DeleteApplication.go index 6067674ba66..ade1c4c466c 100644 --- a/service/elasticbeanstalk/api_op_DeleteApplication.go +++ b/service/elasticbeanstalk/api_op_DeleteApplication.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DeleteApplicationVersion.go b/service/elasticbeanstalk/api_op_DeleteApplicationVersion.go index f1f44f7e70e..a217d0abfa6 100644 --- a/service/elasticbeanstalk/api_op_DeleteApplicationVersion.go +++ b/service/elasticbeanstalk/api_op_DeleteApplicationVersion.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteApplicationVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DeleteConfigurationTemplate.go b/service/elasticbeanstalk/api_op_DeleteConfigurationTemplate.go index 390b1da20e3..8f7f8ee6ab1 100644 --- a/service/elasticbeanstalk/api_op_DeleteConfigurationTemplate.go +++ b/service/elasticbeanstalk/api_op_DeleteConfigurationTemplate.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteConfigurationTemplateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DeleteEnvironmentConfiguration.go b/service/elasticbeanstalk/api_op_DeleteEnvironmentConfiguration.go index 104f28009c5..3943c42e84b 100644 --- a/service/elasticbeanstalk/api_op_DeleteEnvironmentConfiguration.go +++ b/service/elasticbeanstalk/api_op_DeleteEnvironmentConfiguration.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteEnvironmentConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DeletePlatformVersion.go b/service/elasticbeanstalk/api_op_DeletePlatformVersion.go index aeb0c4f1593..5a68fd35cc0 100644 --- a/service/elasticbeanstalk/api_op_DeletePlatformVersion.go +++ b/service/elasticbeanstalk/api_op_DeletePlatformVersion.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeletePlatformVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePlatformVersion(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeAccountAttributes.go b/service/elasticbeanstalk/api_op_DescribeAccountAttributes.go index 4761d5998b3..275ae5d9379 100644 --- a/service/elasticbeanstalk/api_op_DescribeAccountAttributes.go +++ b/service/elasticbeanstalk/api_op_DescribeAccountAttributes.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeApplicationVersions.go b/service/elasticbeanstalk/api_op_DescribeApplicationVersions.go index 04276881207..05533107f33 100644 --- a/service/elasticbeanstalk/api_op_DescribeApplicationVersions.go +++ b/service/elasticbeanstalk/api_op_DescribeApplicationVersions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeApplicationVersionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationVersions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeApplications.go b/service/elasticbeanstalk/api_op_DescribeApplications.go index 095f8c86948..7d3a7fbf159 100644 --- a/service/elasticbeanstalk/api_op_DescribeApplications.go +++ b/service/elasticbeanstalk/api_op_DescribeApplications.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeApplicationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeConfigurationOptions.go b/service/elasticbeanstalk/api_op_DescribeConfigurationOptions.go index 48ca47fcad4..ea3bc8563c5 100644 --- a/service/elasticbeanstalk/api_op_DescribeConfigurationOptions.go +++ b/service/elasticbeanstalk/api_op_DescribeConfigurationOptions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeConfigurationOptionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConfigurationOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeConfigurationSettings.go b/service/elasticbeanstalk/api_op_DescribeConfigurationSettings.go index 2958fc68f51..0d29faf13a1 100644 --- a/service/elasticbeanstalk/api_op_DescribeConfigurationSettings.go +++ b/service/elasticbeanstalk/api_op_DescribeConfigurationSettings.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeConfigurationSettingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironmentHealth.go b/service/elasticbeanstalk/api_op_DescribeEnvironmentHealth.go index b8dd2f64c3b..ba7028aa5e4 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironmentHealth.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironmentHealth.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeEnvironmentHealthMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEnvironmentHealth(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go b/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go index 2899670f111..e0710a673ed 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActionHistory.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeEnvironmentManagedActionHistoryMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEnvironmentManagedActionHistory(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeEnvironmentManagedActionHistoryMiddlewares( return nil } -// DescribeEnvironmentManagedActionHistoryAPIClient is a client that implements -// the DescribeEnvironmentManagedActionHistory operation. -type DescribeEnvironmentManagedActionHistoryAPIClient interface { - DescribeEnvironmentManagedActionHistory(context.Context, *DescribeEnvironmentManagedActionHistoryInput, ...func(*Options)) (*DescribeEnvironmentManagedActionHistoryOutput, error) -} - -var _ DescribeEnvironmentManagedActionHistoryAPIClient = (*Client)(nil) - // DescribeEnvironmentManagedActionHistoryPaginatorOptions is the paginator // options for DescribeEnvironmentManagedActionHistory type DescribeEnvironmentManagedActionHistoryPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *DescribeEnvironmentManagedActionHistoryPaginator) NextPage(ctx context. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEnvironmentManagedActionHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *DescribeEnvironmentManagedActionHistoryPaginator) NextPage(ctx context. return result, nil } +// DescribeEnvironmentManagedActionHistoryAPIClient is a client that implements +// the DescribeEnvironmentManagedActionHistory operation. +type DescribeEnvironmentManagedActionHistoryAPIClient interface { + DescribeEnvironmentManagedActionHistory(context.Context, *DescribeEnvironmentManagedActionHistoryInput, ...func(*Options)) (*DescribeEnvironmentManagedActionHistoryOutput, error) +} + +var _ DescribeEnvironmentManagedActionHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEnvironmentManagedActionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActions.go b/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActions.go index e79b96b7892..b70ef117e69 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActions.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironmentManagedActions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeEnvironmentManagedActionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEnvironmentManagedActions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironmentResources.go b/service/elasticbeanstalk/api_op_DescribeEnvironmentResources.go index 3b0a832155d..8f9fdaa6c57 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironmentResources.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironmentResources.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeEnvironmentResourcesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEnvironmentResources(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironments.go b/service/elasticbeanstalk/api_op_DescribeEnvironments.go index 7253f570ef6..93b251b1698 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironments.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironments.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeEnvironmentsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEnvironments(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationDescribeEnvironmentsMiddlewares(stack *middleware.S return nil } -// DescribeEnvironmentsAPIClient is a client that implements the -// DescribeEnvironments operation. -type DescribeEnvironmentsAPIClient interface { - DescribeEnvironments(context.Context, *DescribeEnvironmentsInput, ...func(*Options)) (*DescribeEnvironmentsOutput, error) -} - -var _ DescribeEnvironmentsAPIClient = (*Client)(nil) - // EnvironmentExistsWaiterOptions are waiter options for EnvironmentExistsWaiter type EnvironmentExistsWaiterOptions struct { @@ -297,7 +292,13 @@ func (w *EnvironmentExistsWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeEnvironments(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -519,7 +520,13 @@ func (w *EnvironmentTerminatedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeEnvironments(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -739,7 +746,13 @@ func (w *EnvironmentUpdatedWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeEnvironments(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -844,6 +857,14 @@ func environmentUpdatedStateRetryable(ctx context.Context, input *DescribeEnviro return true, nil } +// DescribeEnvironmentsAPIClient is a client that implements the +// DescribeEnvironments operation. +type DescribeEnvironmentsAPIClient interface { + DescribeEnvironments(context.Context, *DescribeEnvironmentsInput, ...func(*Options)) (*DescribeEnvironmentsOutput, error) +} + +var _ DescribeEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticbeanstalk/api_op_DescribeEvents.go b/service/elasticbeanstalk/api_op_DescribeEvents.go index d9c66da669c..682385809e6 100644 --- a/service/elasticbeanstalk/api_op_DescribeEvents.go +++ b/service/elasticbeanstalk/api_op_DescribeEvents.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(options.Region), middleware.Before); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // Specifies the maximum number of events that can be returned, beginning with the @@ -251,6 +246,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticbeanstalk/api_op_DescribeInstancesHealth.go b/service/elasticbeanstalk/api_op_DescribeInstancesHealth.go index cd490bc94e9..d1b5ea51f91 100644 --- a/service/elasticbeanstalk/api_op_DescribeInstancesHealth.go +++ b/service/elasticbeanstalk/api_op_DescribeInstancesHealth.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeInstancesHealthMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstancesHealth(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DescribePlatformVersion.go b/service/elasticbeanstalk/api_op_DescribePlatformVersion.go index 8dc8d031c5b..de2ad00a563 100644 --- a/service/elasticbeanstalk/api_op_DescribePlatformVersion.go +++ b/service/elasticbeanstalk/api_op_DescribePlatformVersion.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribePlatformVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePlatformVersion(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_DisassociateEnvironmentOperationsRole.go b/service/elasticbeanstalk/api_op_DisassociateEnvironmentOperationsRole.go index 138412e7044..53a4534e988 100644 --- a/service/elasticbeanstalk/api_op_DisassociateEnvironmentOperationsRole.go +++ b/service/elasticbeanstalk/api_op_DisassociateEnvironmentOperationsRole.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateEnvironmentOperationsRoleMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateEnvironmentOperationsRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_ListAvailableSolutionStacks.go b/service/elasticbeanstalk/api_op_ListAvailableSolutionStacks.go index 20a7a270a0e..e6dca2b9616 100644 --- a/service/elasticbeanstalk/api_op_ListAvailableSolutionStacks.go +++ b/service/elasticbeanstalk/api_op_ListAvailableSolutionStacks.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListAvailableSolutionStacksMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAvailableSolutionStacks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_ListPlatformBranches.go b/service/elasticbeanstalk/api_op_ListPlatformBranches.go index 83a38a596bd..aa8c350b0ae 100644 --- a/service/elasticbeanstalk/api_op_ListPlatformBranches.go +++ b/service/elasticbeanstalk/api_op_ListPlatformBranches.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListPlatformBranchesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlatformBranches(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListPlatformBranchesMiddlewares(stack *middleware.S return nil } -// ListPlatformBranchesAPIClient is a client that implements the -// ListPlatformBranches operation. -type ListPlatformBranchesAPIClient interface { - ListPlatformBranches(context.Context, *ListPlatformBranchesInput, ...func(*Options)) (*ListPlatformBranchesOutput, error) -} - -var _ ListPlatformBranchesAPIClient = (*Client)(nil) - // ListPlatformBranchesPaginatorOptions is the paginator options for // ListPlatformBranches type ListPlatformBranchesPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *ListPlatformBranchesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlatformBranches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListPlatformBranchesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListPlatformBranchesAPIClient is a client that implements the +// ListPlatformBranches operation. +type ListPlatformBranchesAPIClient interface { + ListPlatformBranches(context.Context, *ListPlatformBranchesInput, ...func(*Options)) (*ListPlatformBranchesOutput, error) +} + +var _ ListPlatformBranchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlatformBranches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticbeanstalk/api_op_ListPlatformVersions.go b/service/elasticbeanstalk/api_op_ListPlatformVersions.go index 6afee84ae86..83079c4a97a 100644 --- a/service/elasticbeanstalk/api_op_ListPlatformVersions.go +++ b/service/elasticbeanstalk/api_op_ListPlatformVersions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListPlatformVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlatformVersions(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListPlatformVersionsMiddlewares(stack *middleware.S return nil } -// ListPlatformVersionsAPIClient is a client that implements the -// ListPlatformVersions operation. -type ListPlatformVersionsAPIClient interface { - ListPlatformVersions(context.Context, *ListPlatformVersionsInput, ...func(*Options)) (*ListPlatformVersionsOutput, error) -} - -var _ ListPlatformVersionsAPIClient = (*Client)(nil) - // ListPlatformVersionsPaginatorOptions is the paginator options for // ListPlatformVersions type ListPlatformVersionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListPlatformVersionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlatformVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListPlatformVersionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListPlatformVersionsAPIClient is a client that implements the +// ListPlatformVersions operation. +type ListPlatformVersionsAPIClient interface { + ListPlatformVersions(context.Context, *ListPlatformVersionsInput, ...func(*Options)) (*ListPlatformVersionsOutput, error) +} + +var _ ListPlatformVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlatformVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticbeanstalk/api_op_ListTagsForResource.go b/service/elasticbeanstalk/api_op_ListTagsForResource.go index 622fa0baa04..0c2ba326c5f 100644 --- a/service/elasticbeanstalk/api_op_ListTagsForResource.go +++ b/service/elasticbeanstalk/api_op_ListTagsForResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_RebuildEnvironment.go b/service/elasticbeanstalk/api_op_RebuildEnvironment.go index bea6ec6bb11..176d97d8994 100644 --- a/service/elasticbeanstalk/api_op_RebuildEnvironment.go +++ b/service/elasticbeanstalk/api_op_RebuildEnvironment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRebuildEnvironmentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebuildEnvironment(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_RequestEnvironmentInfo.go b/service/elasticbeanstalk/api_op_RequestEnvironmentInfo.go index 60351c9d27b..ba009649cae 100644 --- a/service/elasticbeanstalk/api_op_RequestEnvironmentInfo.go +++ b/service/elasticbeanstalk/api_op_RequestEnvironmentInfo.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRequestEnvironmentInfoMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestEnvironmentInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_RestartAppServer.go b/service/elasticbeanstalk/api_op_RestartAppServer.go index 6272ec96669..50aebcbba02 100644 --- a/service/elasticbeanstalk/api_op_RestartAppServer.go +++ b/service/elasticbeanstalk/api_op_RestartAppServer.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRestartAppServerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestartAppServer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_RetrieveEnvironmentInfo.go b/service/elasticbeanstalk/api_op_RetrieveEnvironmentInfo.go index 1ef945bdaac..8c6c471c34c 100644 --- a/service/elasticbeanstalk/api_op_RetrieveEnvironmentInfo.go +++ b/service/elasticbeanstalk/api_op_RetrieveEnvironmentInfo.go @@ -130,6 +130,9 @@ func (c *Client) addOperationRetrieveEnvironmentInfoMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveEnvironmentInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_SwapEnvironmentCNAMEs.go b/service/elasticbeanstalk/api_op_SwapEnvironmentCNAMEs.go index a1a88947365..6f1c075203a 100644 --- a/service/elasticbeanstalk/api_op_SwapEnvironmentCNAMEs.go +++ b/service/elasticbeanstalk/api_op_SwapEnvironmentCNAMEs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSwapEnvironmentCNAMEsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSwapEnvironmentCNAMEs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_TerminateEnvironment.go b/service/elasticbeanstalk/api_op_TerminateEnvironment.go index a08f6b8a22a..7bd6af4e897 100644 --- a/service/elasticbeanstalk/api_op_TerminateEnvironment.go +++ b/service/elasticbeanstalk/api_op_TerminateEnvironment.go @@ -241,6 +241,9 @@ func (c *Client) addOperationTerminateEnvironmentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateEnvironment(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_UpdateApplication.go b/service/elasticbeanstalk/api_op_UpdateApplication.go index b6a23f9474d..db3a188e68a 100644 --- a/service/elasticbeanstalk/api_op_UpdateApplication.go +++ b/service/elasticbeanstalk/api_op_UpdateApplication.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_UpdateApplicationResourceLifecycle.go b/service/elasticbeanstalk/api_op_UpdateApplicationResourceLifecycle.go index 6b67f4f03f7..c5d6e8c7c83 100644 --- a/service/elasticbeanstalk/api_op_UpdateApplicationResourceLifecycle.go +++ b/service/elasticbeanstalk/api_op_UpdateApplicationResourceLifecycle.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateApplicationResourceLifecycleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationResourceLifecycleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go b/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go index 2511a4dc8f9..308fe35b09b 100644 --- a/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go +++ b/service/elasticbeanstalk/api_op_UpdateApplicationVersion.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateApplicationVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_UpdateConfigurationTemplate.go b/service/elasticbeanstalk/api_op_UpdateConfigurationTemplate.go index 2a04757f55f..c8f30ed64f9 100644 --- a/service/elasticbeanstalk/api_op_UpdateConfigurationTemplate.go +++ b/service/elasticbeanstalk/api_op_UpdateConfigurationTemplate.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateConfigurationTemplateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_UpdateEnvironment.go b/service/elasticbeanstalk/api_op_UpdateEnvironment.go index a660bd02790..86ecff20676 100644 --- a/service/elasticbeanstalk/api_op_UpdateEnvironment.go +++ b/service/elasticbeanstalk/api_op_UpdateEnvironment.go @@ -278,6 +278,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEnvironment(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_UpdateTagsForResource.go b/service/elasticbeanstalk/api_op_UpdateTagsForResource.go index f41ce26b05d..9ca25456b4f 100644 --- a/service/elasticbeanstalk/api_op_UpdateTagsForResource.go +++ b/service/elasticbeanstalk/api_op_UpdateTagsForResource.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateTagsForResourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticbeanstalk/api_op_ValidateConfigurationSettings.go b/service/elasticbeanstalk/api_op_ValidateConfigurationSettings.go index 8e5fa38455a..340826ed5ce 100644 --- a/service/elasticbeanstalk/api_op_ValidateConfigurationSettings.go +++ b/service/elasticbeanstalk/api_op_ValidateConfigurationSettings.go @@ -128,6 +128,9 @@ func (c *Client) addOperationValidateConfigurationSettingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateConfigurationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticinference/api_client.go b/service/elasticinference/api_client.go index f0155c87825..a70e08e87e4 100644 --- a/service/elasticinference/api_client.go +++ b/service/elasticinference/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elasticinference/api_op_DescribeAcceleratorOfferings.go b/service/elasticinference/api_op_DescribeAcceleratorOfferings.go index cf44efe75f0..24bcc1c319f 100644 --- a/service/elasticinference/api_op_DescribeAcceleratorOfferings.go +++ b/service/elasticinference/api_op_DescribeAcceleratorOfferings.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeAcceleratorOfferingsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAcceleratorOfferingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticinference/api_op_DescribeAcceleratorTypes.go b/service/elasticinference/api_op_DescribeAcceleratorTypes.go index 9042b42f50f..e4464a427ff 100644 --- a/service/elasticinference/api_op_DescribeAcceleratorTypes.go +++ b/service/elasticinference/api_op_DescribeAcceleratorTypes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeAcceleratorTypesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAcceleratorTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticinference/api_op_DescribeAccelerators.go b/service/elasticinference/api_op_DescribeAccelerators.go index ae9f6bc7ede..d1ea05a6b1c 100644 --- a/service/elasticinference/api_op_DescribeAccelerators.go +++ b/service/elasticinference/api_op_DescribeAccelerators.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeAcceleratorsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccelerators(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeAcceleratorsMiddlewares(stack *middleware.S return nil } -// DescribeAcceleratorsAPIClient is a client that implements the -// DescribeAccelerators operation. -type DescribeAcceleratorsAPIClient interface { - DescribeAccelerators(context.Context, *DescribeAcceleratorsInput, ...func(*Options)) (*DescribeAcceleratorsOutput, error) -} - -var _ DescribeAcceleratorsAPIClient = (*Client)(nil) - // DescribeAcceleratorsPaginatorOptions is the paginator options for // DescribeAccelerators type DescribeAcceleratorsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeAcceleratorsPaginator) NextPage(ctx context.Context, optFns ... params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAccelerators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeAcceleratorsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeAcceleratorsAPIClient is a client that implements the +// DescribeAccelerators operation. +type DescribeAcceleratorsAPIClient interface { + DescribeAccelerators(context.Context, *DescribeAcceleratorsInput, ...func(*Options)) (*DescribeAcceleratorsOutput, error) +} + +var _ DescribeAcceleratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAccelerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticinference/api_op_ListTagsForResource.go b/service/elasticinference/api_op_ListTagsForResource.go index c3d3042cfcf..8265e9a51c2 100644 --- a/service/elasticinference/api_op_ListTagsForResource.go +++ b/service/elasticinference/api_op_ListTagsForResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticinference/api_op_TagResource.go b/service/elasticinference/api_op_TagResource.go index dd99db4fbba..47cbbdde4a5 100644 --- a/service/elasticinference/api_op_TagResource.go +++ b/service/elasticinference/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticinference/api_op_UntagResource.go b/service/elasticinference/api_op_UntagResource.go index 8f27f934479..4d079286113 100644 --- a/service/elasticinference/api_op_UntagResource.go +++ b/service/elasticinference/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_client.go b/service/elasticloadbalancing/api_client.go index a332f61bdf5..858ceaa4504 100644 --- a/service/elasticloadbalancing/api_client.go +++ b/service/elasticloadbalancing/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elasticloadbalancing/api_op_AddTags.go b/service/elasticloadbalancing/api_op_AddTags.go index c9540c8f28e..688a2a75882 100644 --- a/service/elasticloadbalancing/api_op_AddTags.go +++ b/service/elasticloadbalancing/api_op_AddTags.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_ApplySecurityGroupsToLoadBalancer.go b/service/elasticloadbalancing/api_op_ApplySecurityGroupsToLoadBalancer.go index 3c07dd25758..fe900cab515 100644 --- a/service/elasticloadbalancing/api_op_ApplySecurityGroupsToLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_ApplySecurityGroupsToLoadBalancer.go @@ -119,6 +119,9 @@ func (c *Client) addOperationApplySecurityGroupsToLoadBalancerMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplySecurityGroupsToLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_AttachLoadBalancerToSubnets.go b/service/elasticloadbalancing/api_op_AttachLoadBalancerToSubnets.go index fde85d72a33..340335e3e33 100644 --- a/service/elasticloadbalancing/api_op_AttachLoadBalancerToSubnets.go +++ b/service/elasticloadbalancing/api_op_AttachLoadBalancerToSubnets.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAttachLoadBalancerToSubnetsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachLoadBalancerToSubnetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_ConfigureHealthCheck.go b/service/elasticloadbalancing/api_op_ConfigureHealthCheck.go index adcd82e4692..cf460b1e634 100644 --- a/service/elasticloadbalancing/api_op_ConfigureHealthCheck.go +++ b/service/elasticloadbalancing/api_op_ConfigureHealthCheck.go @@ -118,6 +118,9 @@ func (c *Client) addOperationConfigureHealthCheckMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_CreateAppCookieStickinessPolicy.go b/service/elasticloadbalancing/api_op_CreateAppCookieStickinessPolicy.go index 05ebaac68bb..b3f45b1fd44 100644 --- a/service/elasticloadbalancing/api_op_CreateAppCookieStickinessPolicy.go +++ b/service/elasticloadbalancing/api_op_CreateAppCookieStickinessPolicy.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateAppCookieStickinessPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppCookieStickinessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_CreateLBCookieStickinessPolicy.go b/service/elasticloadbalancing/api_op_CreateLBCookieStickinessPolicy.go index 5c1c2bac63f..82d991d5ba4 100644 --- a/service/elasticloadbalancing/api_op_CreateLBCookieStickinessPolicy.go +++ b/service/elasticloadbalancing/api_op_CreateLBCookieStickinessPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateLBCookieStickinessPolicyMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLBCookieStickinessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_CreateLoadBalancer.go b/service/elasticloadbalancing/api_op_CreateLoadBalancer.go index 3214deb3e0d..d6bc1f553af 100644 --- a/service/elasticloadbalancing/api_op_CreateLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_CreateLoadBalancer.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateLoadBalancerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_CreateLoadBalancerListeners.go b/service/elasticloadbalancing/api_op_CreateLoadBalancerListeners.go index 9e50dfd6ac3..f8b2a17fac8 100644 --- a/service/elasticloadbalancing/api_op_CreateLoadBalancerListeners.go +++ b/service/elasticloadbalancing/api_op_CreateLoadBalancerListeners.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateLoadBalancerListenersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoadBalancerListenersValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_CreateLoadBalancerPolicy.go b/service/elasticloadbalancing/api_op_CreateLoadBalancerPolicy.go index 2b37071c2a5..2235f11a31e 100644 --- a/service/elasticloadbalancing/api_op_CreateLoadBalancerPolicy.go +++ b/service/elasticloadbalancing/api_op_CreateLoadBalancerPolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateLoadBalancerPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoadBalancerPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DeleteLoadBalancer.go b/service/elasticloadbalancing/api_op_DeleteLoadBalancer.go index d286df3eed8..b7c29ee5378 100644 --- a/service/elasticloadbalancing/api_op_DeleteLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_DeleteLoadBalancer.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLoadBalancerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DeleteLoadBalancerListeners.go b/service/elasticloadbalancing/api_op_DeleteLoadBalancerListeners.go index 5e52bcf9f00..69939636324 100644 --- a/service/elasticloadbalancing/api_op_DeleteLoadBalancerListeners.go +++ b/service/elasticloadbalancing/api_op_DeleteLoadBalancerListeners.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteLoadBalancerListenersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoadBalancerListenersValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DeleteLoadBalancerPolicy.go b/service/elasticloadbalancing/api_op_DeleteLoadBalancerPolicy.go index 5d1e5622514..40d02f7a9a6 100644 --- a/service/elasticloadbalancing/api_op_DeleteLoadBalancerPolicy.go +++ b/service/elasticloadbalancing/api_op_DeleteLoadBalancerPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteLoadBalancerPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoadBalancerPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DeregisterInstancesFromLoadBalancer.go b/service/elasticloadbalancing/api_op_DeregisterInstancesFromLoadBalancer.go index 6a974f2179d..27899ed08e3 100644 --- a/service/elasticloadbalancing/api_op_DeregisterInstancesFromLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_DeregisterInstancesFromLoadBalancer.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeregisterInstancesFromLoadBalancerMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterInstancesFromLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DescribeAccountLimits.go b/service/elasticloadbalancing/api_op_DescribeAccountLimits.go index 76551e97e17..54ff3c59472 100644 --- a/service/elasticloadbalancing/api_op_DescribeAccountLimits.go +++ b/service/elasticloadbalancing/api_op_DescribeAccountLimits.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go b/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go index d068087d9f3..377539ee9dd 100644 --- a/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go +++ b/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeInstanceHealthMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceHealthValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeInstanceHealthMiddlewares(stack *middleware return nil } -// DescribeInstanceHealthAPIClient is a client that implements the -// DescribeInstanceHealth operation. -type DescribeInstanceHealthAPIClient interface { - DescribeInstanceHealth(context.Context, *DescribeInstanceHealthInput, ...func(*Options)) (*DescribeInstanceHealthOutput, error) -} - -var _ DescribeInstanceHealthAPIClient = (*Client)(nil) - // AnyInstanceInServiceWaiterOptions are waiter options for // AnyInstanceInServiceWaiter type AnyInstanceInServiceWaiterOptions struct { @@ -270,7 +265,13 @@ func (w *AnyInstanceInServiceWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeInstanceHealth(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -452,7 +453,13 @@ func (w *InstanceDeregisteredWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeInstanceHealth(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -652,7 +659,13 @@ func (w *InstanceInServiceWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeInstanceHealth(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -737,6 +750,14 @@ func instanceInServiceStateRetryable(ctx context.Context, input *DescribeInstanc return true, nil } +// DescribeInstanceHealthAPIClient is a client that implements the +// DescribeInstanceHealth operation. +type DescribeInstanceHealthAPIClient interface { + DescribeInstanceHealth(context.Context, *DescribeInstanceHealthInput, ...func(*Options)) (*DescribeInstanceHealthOutput, error) +} + +var _ DescribeInstanceHealthAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceHealth(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancing/api_op_DescribeLoadBalancerAttributes.go b/service/elasticloadbalancing/api_op_DescribeLoadBalancerAttributes.go index 7b3aae47941..16d1049a42c 100644 --- a/service/elasticloadbalancing/api_op_DescribeLoadBalancerAttributes.go +++ b/service/elasticloadbalancing/api_op_DescribeLoadBalancerAttributes.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeLoadBalancerAttributesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoadBalancerAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicies.go b/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicies.go index ef85cbe0b64..64a170dc559 100644 --- a/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicies.go +++ b/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicies.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeLoadBalancerPoliciesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoadBalancerPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicyTypes.go b/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicyTypes.go index 5cb49bfab27..c733b292682 100644 --- a/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicyTypes.go +++ b/service/elasticloadbalancing/api_op_DescribeLoadBalancerPolicyTypes.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeLoadBalancerPolicyTypesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoadBalancerPolicyTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go b/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go index 9ebab31f5f7..e9a596a1879 100644 --- a/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go +++ b/service/elasticloadbalancing/api_op_DescribeLoadBalancers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoadBalancers(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. return nil } -// DescribeLoadBalancersAPIClient is a client that implements the -// DescribeLoadBalancers operation. -type DescribeLoadBalancersAPIClient interface { - DescribeLoadBalancers(context.Context, *DescribeLoadBalancersInput, ...func(*Options)) (*DescribeLoadBalancersOutput, error) -} - -var _ DescribeLoadBalancersAPIClient = (*Client)(nil) - // DescribeLoadBalancersPaginatorOptions is the paginator options for // DescribeLoadBalancers type DescribeLoadBalancersPaginatorOptions struct { @@ -200,6 +195,9 @@ func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLoadBalancers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeLoadBalancersAPIClient is a client that implements the +// DescribeLoadBalancers operation. +type DescribeLoadBalancersAPIClient interface { + DescribeLoadBalancers(context.Context, *DescribeLoadBalancersInput, ...func(*Options)) (*DescribeLoadBalancersOutput, error) +} + +var _ DescribeLoadBalancersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLoadBalancers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancing/api_op_DescribeTags.go b/service/elasticloadbalancing/api_op_DescribeTags.go index b2afb15ab14..178550d2987 100644 --- a/service/elasticloadbalancing/api_op_DescribeTags.go +++ b/service/elasticloadbalancing/api_op_DescribeTags.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DetachLoadBalancerFromSubnets.go b/service/elasticloadbalancing/api_op_DetachLoadBalancerFromSubnets.go index a9de928baf7..c2747c94222 100644 --- a/service/elasticloadbalancing/api_op_DetachLoadBalancerFromSubnets.go +++ b/service/elasticloadbalancing/api_op_DetachLoadBalancerFromSubnets.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDetachLoadBalancerFromSubnetsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachLoadBalancerFromSubnetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_DisableAvailabilityZonesForLoadBalancer.go b/service/elasticloadbalancing/api_op_DisableAvailabilityZonesForLoadBalancer.go index a60482d8ca0..1f531a61b90 100644 --- a/service/elasticloadbalancing/api_op_DisableAvailabilityZonesForLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_DisableAvailabilityZonesForLoadBalancer.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDisableAvailabilityZonesForLoadBalancerMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableAvailabilityZonesForLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_EnableAvailabilityZonesForLoadBalancer.go b/service/elasticloadbalancing/api_op_EnableAvailabilityZonesForLoadBalancer.go index cea16f24ebb..db5f7bd0dab 100644 --- a/service/elasticloadbalancing/api_op_EnableAvailabilityZonesForLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_EnableAvailabilityZonesForLoadBalancer.go @@ -121,6 +121,9 @@ func (c *Client) addOperationEnableAvailabilityZonesForLoadBalancerMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableAvailabilityZonesForLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_ModifyLoadBalancerAttributes.go b/service/elasticloadbalancing/api_op_ModifyLoadBalancerAttributes.go index 381f78cab06..7f404527ff1 100644 --- a/service/elasticloadbalancing/api_op_ModifyLoadBalancerAttributes.go +++ b/service/elasticloadbalancing/api_op_ModifyLoadBalancerAttributes.go @@ -136,6 +136,9 @@ func (c *Client) addOperationModifyLoadBalancerAttributesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyLoadBalancerAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_RegisterInstancesWithLoadBalancer.go b/service/elasticloadbalancing/api_op_RegisterInstancesWithLoadBalancer.go index bd6630d8de7..3f92981fc27 100644 --- a/service/elasticloadbalancing/api_op_RegisterInstancesWithLoadBalancer.go +++ b/service/elasticloadbalancing/api_op_RegisterInstancesWithLoadBalancer.go @@ -135,6 +135,9 @@ func (c *Client) addOperationRegisterInstancesWithLoadBalancerMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterInstancesWithLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_RemoveTags.go b/service/elasticloadbalancing/api_op_RemoveTags.go index 465d21094e6..7943702a2ec 100644 --- a/service/elasticloadbalancing/api_op_RemoveTags.go +++ b/service/elasticloadbalancing/api_op_RemoveTags.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_SetLoadBalancerListenerSSLCertificate.go b/service/elasticloadbalancing/api_op_SetLoadBalancerListenerSSLCertificate.go index 7c74ca0f49b..cc9ea2856d4 100644 --- a/service/elasticloadbalancing/api_op_SetLoadBalancerListenerSSLCertificate.go +++ b/service/elasticloadbalancing/api_op_SetLoadBalancerListenerSSLCertificate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSetLoadBalancerListenerSSLCertificateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLoadBalancerListenerSSLCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesForBackendServer.go b/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesForBackendServer.go index d930fd342fd..9ca0ea81683 100644 --- a/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesForBackendServer.go +++ b/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesForBackendServer.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSetLoadBalancerPoliciesForBackendServerMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLoadBalancerPoliciesForBackendServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesOfListener.go b/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesOfListener.go index 42eb3ed4aee..cf6d5e68137 100644 --- a/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesOfListener.go +++ b/service/elasticloadbalancing/api_op_SetLoadBalancerPoliciesOfListener.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSetLoadBalancerPoliciesOfListenerMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLoadBalancerPoliciesOfListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_client.go b/service/elasticloadbalancingv2/api_client.go index c7bc0f4c0ba..20651060e0b 100644 --- a/service/elasticloadbalancingv2/api_client.go +++ b/service/elasticloadbalancingv2/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go b/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go index 3cf6f1e968c..001defacb2a 100644 --- a/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go +++ b/service/elasticloadbalancingv2/api_op_AddListenerCertificates.go @@ -122,6 +122,9 @@ func (c *Client) addOperationAddListenerCertificatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddListenerCertificatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_AddTags.go b/service/elasticloadbalancingv2/api_op_AddTags.go index 8cb2e6810c9..ae46ab104cb 100644 --- a/service/elasticloadbalancingv2/api_op_AddTags.go +++ b/service/elasticloadbalancingv2/api_op_AddTags.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go b/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go index c36e02cb27c..3239b60c048 100644 --- a/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go +++ b/service/elasticloadbalancingv2/api_op_AddTrustStoreRevocations.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAddTrustStoreRevocationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTrustStoreRevocationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_CreateListener.go b/service/elasticloadbalancingv2/api_op_CreateListener.go index feffdf330f3..a8c89d46196 100644 --- a/service/elasticloadbalancingv2/api_op_CreateListener.go +++ b/service/elasticloadbalancingv2/api_op_CreateListener.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go b/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go index 15929f68e6a..6251c401893 100644 --- a/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go +++ b/service/elasticloadbalancingv2/api_op_CreateLoadBalancer.go @@ -212,6 +212,9 @@ func (c *Client) addOperationCreateLoadBalancerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_CreateRule.go b/service/elasticloadbalancingv2/api_op_CreateRule.go index 6006abaeeff..fa7faf5f5c8 100644 --- a/service/elasticloadbalancingv2/api_op_CreateRule.go +++ b/service/elasticloadbalancingv2/api_op_CreateRule.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go b/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go index b8926ba8672..08415ffacbe 100644 --- a/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go +++ b/service/elasticloadbalancingv2/api_op_CreateTargetGroup.go @@ -236,6 +236,9 @@ func (c *Client) addOperationCreateTargetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_CreateTrustStore.go b/service/elasticloadbalancingv2/api_op_CreateTrustStore.go index 409a5135366..398c72a1f96 100644 --- a/service/elasticloadbalancingv2/api_op_CreateTrustStore.go +++ b/service/elasticloadbalancingv2/api_op_CreateTrustStore.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateTrustStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DeleteListener.go b/service/elasticloadbalancingv2/api_op_DeleteListener.go index 4be6234dbc5..ea841d28c06 100644 --- a/service/elasticloadbalancingv2/api_op_DeleteListener.go +++ b/service/elasticloadbalancingv2/api_op_DeleteListener.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go b/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go index 5c4015012ed..a2f460bf359 100644 --- a/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go +++ b/service/elasticloadbalancingv2/api_op_DeleteLoadBalancer.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteLoadBalancerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DeleteRule.go b/service/elasticloadbalancingv2/api_op_DeleteRule.go index f8d86733151..43b591d92e3 100644 --- a/service/elasticloadbalancingv2/api_op_DeleteRule.go +++ b/service/elasticloadbalancingv2/api_op_DeleteRule.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go b/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go index a00cfb3d92a..ecce50612f0 100644 --- a/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go +++ b/service/elasticloadbalancingv2/api_op_DeleteTargetGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteTargetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go b/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go index bc35a971632..dec4ddf5d93 100644 --- a/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go +++ b/service/elasticloadbalancingv2/api_op_DeleteTrustStore.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTrustStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DeregisterTargets.go b/service/elasticloadbalancingv2/api_op_DeregisterTargets.go index 4861e7ea66e..27f4d7017e2 100644 --- a/service/elasticloadbalancingv2/api_op_DeregisterTargets.go +++ b/service/elasticloadbalancingv2/api_op_DeregisterTargets.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeregisterTargetsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go b/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go index ec6e467c860..91caab87b1c 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go +++ b/service/elasticloadbalancingv2/api_op_DescribeAccountLimits.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go b/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go index 0a249da17f8..22922c6e2ca 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go +++ b/service/elasticloadbalancingv2/api_op_DescribeListenerCertificates.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeListenerCertificatesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeListenerCertificatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeListeners.go b/service/elasticloadbalancingv2/api_op_DescribeListeners.go index 3ceeb799297..8f45b95990f 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeListeners.go +++ b/service/elasticloadbalancingv2/api_op_DescribeListeners.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeListenersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeListeners(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeListenersMiddlewares(stack *middleware.Stac return nil } -// DescribeListenersAPIClient is a client that implements the DescribeListeners -// operation. -type DescribeListenersAPIClient interface { - DescribeListeners(context.Context, *DescribeListenersInput, ...func(*Options)) (*DescribeListenersOutput, error) -} - -var _ DescribeListenersAPIClient = (*Client)(nil) - // DescribeListenersPaginatorOptions is the paginator options for DescribeListeners type DescribeListenersPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -200,6 +195,9 @@ func (p *DescribeListenersPaginator) NextPage(ctx context.Context, optFns ...fun params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeListeners(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *DescribeListenersPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeListenersAPIClient is a client that implements the DescribeListeners +// operation. +type DescribeListenersAPIClient interface { + DescribeListeners(context.Context, *DescribeListenersInput, ...func(*Options)) (*DescribeListenersOutput, error) +} + +var _ DescribeListenersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeListeners(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go index 4babe68a2fa..a3b8281f808 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go +++ b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancerAttributes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeLoadBalancerAttributesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoadBalancerAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go index 83aca909c58..49e94ee9d51 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go +++ b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoadBalancers(options.Region), middleware.Before); err != nil { return err } @@ -146,85 +149,6 @@ func (c *Client) addOperationDescribeLoadBalancersMiddlewares(stack *middleware. return nil } -// DescribeLoadBalancersAPIClient is a client that implements the -// DescribeLoadBalancers operation. -type DescribeLoadBalancersAPIClient interface { - DescribeLoadBalancers(context.Context, *DescribeLoadBalancersInput, ...func(*Options)) (*DescribeLoadBalancersOutput, error) -} - -var _ DescribeLoadBalancersAPIClient = (*Client)(nil) - -// DescribeLoadBalancersPaginatorOptions is the paginator options for -// DescribeLoadBalancers -type DescribeLoadBalancersPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLoadBalancersPaginator is a paginator for DescribeLoadBalancers -type DescribeLoadBalancersPaginator struct { - options DescribeLoadBalancersPaginatorOptions - client DescribeLoadBalancersAPIClient - params *DescribeLoadBalancersInput - nextToken *string - firstPage bool -} - -// NewDescribeLoadBalancersPaginator returns a new DescribeLoadBalancersPaginator -func NewDescribeLoadBalancersPaginator(client DescribeLoadBalancersAPIClient, params *DescribeLoadBalancersInput, optFns ...func(*DescribeLoadBalancersPaginatorOptions)) *DescribeLoadBalancersPaginator { - if params == nil { - params = &DescribeLoadBalancersInput{} - } - - options := DescribeLoadBalancersPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLoadBalancersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLoadBalancersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLoadBalancers page. -func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLoadBalancersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - result, err := p.client.DescribeLoadBalancers(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextMarker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // LoadBalancerAvailableWaiterOptions are waiter options for // LoadBalancerAvailableWaiter type LoadBalancerAvailableWaiterOptions struct { @@ -342,7 +266,13 @@ func (w *LoadBalancerAvailableWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeLoadBalancers(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -566,7 +496,13 @@ func (w *LoadBalancerExistsWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeLoadBalancers(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -740,7 +676,13 @@ func (w *LoadBalancersDeletedWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeLoadBalancers(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -825,6 +767,88 @@ func loadBalancersDeletedStateRetryable(ctx context.Context, input *DescribeLoad return true, nil } +// DescribeLoadBalancersPaginatorOptions is the paginator options for +// DescribeLoadBalancers +type DescribeLoadBalancersPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeLoadBalancersPaginator is a paginator for DescribeLoadBalancers +type DescribeLoadBalancersPaginator struct { + options DescribeLoadBalancersPaginatorOptions + client DescribeLoadBalancersAPIClient + params *DescribeLoadBalancersInput + nextToken *string + firstPage bool +} + +// NewDescribeLoadBalancersPaginator returns a new DescribeLoadBalancersPaginator +func NewDescribeLoadBalancersPaginator(client DescribeLoadBalancersAPIClient, params *DescribeLoadBalancersInput, optFns ...func(*DescribeLoadBalancersPaginatorOptions)) *DescribeLoadBalancersPaginator { + if params == nil { + params = &DescribeLoadBalancersInput{} + } + + options := DescribeLoadBalancersPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeLoadBalancersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeLoadBalancersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeLoadBalancers page. +func (p *DescribeLoadBalancersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLoadBalancersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeLoadBalancers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeLoadBalancersAPIClient is a client that implements the +// DescribeLoadBalancers operation. +type DescribeLoadBalancersAPIClient interface { + DescribeLoadBalancers(context.Context, *DescribeLoadBalancersInput, ...func(*Options)) (*DescribeLoadBalancersOutput, error) +} + +var _ DescribeLoadBalancersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLoadBalancers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeRules.go b/service/elasticloadbalancingv2/api_op_DescribeRules.go index 12f1c9c4ea2..47e7b410918 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeRules.go +++ b/service/elasticloadbalancingv2/api_op_DescribeRules.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeRulesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go b/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go index 46228a0e3a5..628fa98d0a1 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go +++ b/service/elasticloadbalancingv2/api_op_DescribeSSLPolicies.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeSSLPoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSSLPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeTags.go b/service/elasticloadbalancingv2/api_op_DescribeTags.go index 5edffb60d4b..b899b7d6827 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTags.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTags.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go b/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go index 3927533d16b..53ae8e310d0 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTargetGroupAttributes.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeTargetGroupAttributesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTargetGroupAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go b/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go index 1ca43532070..350c394dfa0 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTargetGroups.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeTargetGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTargetGroups(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeTargetGroupsMiddlewares(stack *middleware.S return nil } -// DescribeTargetGroupsAPIClient is a client that implements the -// DescribeTargetGroups operation. -type DescribeTargetGroupsAPIClient interface { - DescribeTargetGroups(context.Context, *DescribeTargetGroupsInput, ...func(*Options)) (*DescribeTargetGroupsOutput, error) -} - -var _ DescribeTargetGroupsAPIClient = (*Client)(nil) - // DescribeTargetGroupsPaginatorOptions is the paginator options for // DescribeTargetGroups type DescribeTargetGroupsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *DescribeTargetGroupsPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTargetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *DescribeTargetGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeTargetGroupsAPIClient is a client that implements the +// DescribeTargetGroups operation. +type DescribeTargetGroupsAPIClient interface { + DescribeTargetGroups(context.Context, *DescribeTargetGroupsInput, ...func(*Options)) (*DescribeTargetGroupsOutput, error) +} + +var _ DescribeTargetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go b/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go index be35cbb427b..6a7b80a0297 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeTargetHealthMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTargetHealthValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeTargetHealthMiddlewares(stack *middleware.S return nil } -// DescribeTargetHealthAPIClient is a client that implements the -// DescribeTargetHealth operation. -type DescribeTargetHealthAPIClient interface { - DescribeTargetHealth(context.Context, *DescribeTargetHealthInput, ...func(*Options)) (*DescribeTargetHealthOutput, error) -} - -var _ DescribeTargetHealthAPIClient = (*Client)(nil) - // TargetDeregisteredWaiterOptions are waiter options for TargetDeregisteredWaiter type TargetDeregisteredWaiterOptions struct { @@ -265,7 +260,13 @@ func (w *TargetDeregisteredWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeTargetHealth(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -465,7 +466,13 @@ func (w *TargetInServiceWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeTargetHealth(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -550,6 +557,14 @@ func targetInServiceStateRetryable(ctx context.Context, input *DescribeTargetHea return true, nil } +// DescribeTargetHealthAPIClient is a client that implements the +// DescribeTargetHealth operation. +type DescribeTargetHealthAPIClient interface { + DescribeTargetHealth(context.Context, *DescribeTargetHealthInput, ...func(*Options)) (*DescribeTargetHealthOutput, error) +} + +var _ DescribeTargetHealthAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTargetHealth(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go b/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go index 9d3117bfaa9..f875ae6a1b4 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTrustStoreAssociations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeTrustStoreAssociationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustStoreAssociationsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeTrustStoreAssociationsMiddlewares(stack *mi return nil } -// DescribeTrustStoreAssociationsAPIClient is a client that implements the -// DescribeTrustStoreAssociations operation. -type DescribeTrustStoreAssociationsAPIClient interface { - DescribeTrustStoreAssociations(context.Context, *DescribeTrustStoreAssociationsInput, ...func(*Options)) (*DescribeTrustStoreAssociationsOutput, error) -} - -var _ DescribeTrustStoreAssociationsAPIClient = (*Client)(nil) - // DescribeTrustStoreAssociationsPaginatorOptions is the paginator options for // DescribeTrustStoreAssociations type DescribeTrustStoreAssociationsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeTrustStoreAssociationsPaginator) NextPage(ctx context.Context, } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrustStoreAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeTrustStoreAssociationsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeTrustStoreAssociationsAPIClient is a client that implements the +// DescribeTrustStoreAssociations operation. +type DescribeTrustStoreAssociationsAPIClient interface { + DescribeTrustStoreAssociations(context.Context, *DescribeTrustStoreAssociationsInput, ...func(*Options)) (*DescribeTrustStoreAssociationsOutput, error) +} + +var _ DescribeTrustStoreAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrustStoreAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go b/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go index 778f3f698ba..d3bd3466125 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTrustStoreRevocations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeTrustStoreRevocationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustStoreRevocationsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeTrustStoreRevocationsMiddlewares(stack *mid return nil } -// DescribeTrustStoreRevocationsAPIClient is a client that implements the -// DescribeTrustStoreRevocations operation. -type DescribeTrustStoreRevocationsAPIClient interface { - DescribeTrustStoreRevocations(context.Context, *DescribeTrustStoreRevocationsInput, ...func(*Options)) (*DescribeTrustStoreRevocationsOutput, error) -} - -var _ DescribeTrustStoreRevocationsAPIClient = (*Client)(nil) - // DescribeTrustStoreRevocationsPaginatorOptions is the paginator options for // DescribeTrustStoreRevocations type DescribeTrustStoreRevocationsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeTrustStoreRevocationsPaginator) NextPage(ctx context.Context, o } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrustStoreRevocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeTrustStoreRevocationsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeTrustStoreRevocationsAPIClient is a client that implements the +// DescribeTrustStoreRevocations operation. +type DescribeTrustStoreRevocationsAPIClient interface { + DescribeTrustStoreRevocations(context.Context, *DescribeTrustStoreRevocationsInput, ...func(*Options)) (*DescribeTrustStoreRevocationsOutput, error) +} + +var _ DescribeTrustStoreRevocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrustStoreRevocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go b/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go index 7ee23940992..165a6381299 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTrustStores.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeTrustStoresMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrustStores(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeTrustStoresMiddlewares(stack *middleware.St return nil } -// DescribeTrustStoresAPIClient is a client that implements the -// DescribeTrustStores operation. -type DescribeTrustStoresAPIClient interface { - DescribeTrustStores(context.Context, *DescribeTrustStoresInput, ...func(*Options)) (*DescribeTrustStoresOutput, error) -} - -var _ DescribeTrustStoresAPIClient = (*Client)(nil) - // DescribeTrustStoresPaginatorOptions is the paginator options for // DescribeTrustStores type DescribeTrustStoresPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *DescribeTrustStoresPaginator) NextPage(ctx context.Context, optFns ...f } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTrustStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *DescribeTrustStoresPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeTrustStoresAPIClient is a client that implements the +// DescribeTrustStores operation. +type DescribeTrustStoresAPIClient interface { + DescribeTrustStores(context.Context, *DescribeTrustStoresInput, ...func(*Options)) (*DescribeTrustStoresOutput, error) +} + +var _ DescribeTrustStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrustStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go b/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go index 25f30dbbde4..7945f2e36f0 100644 --- a/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go +++ b/service/elasticloadbalancingv2/api_op_GetTrustStoreCaCertificatesBundle.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetTrustStoreCaCertificatesBundleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrustStoreCaCertificatesBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go b/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go index 403f5fae0ab..c577f7fe9ee 100644 --- a/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go +++ b/service/elasticloadbalancingv2/api_op_GetTrustStoreRevocationContent.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetTrustStoreRevocationContentMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrustStoreRevocationContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_ModifyListener.go b/service/elasticloadbalancingv2/api_op_ModifyListener.go index 08015c86e0e..fb156eaf242 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyListener.go +++ b/service/elasticloadbalancingv2/api_op_ModifyListener.go @@ -165,6 +165,9 @@ func (c *Client) addOperationModifyListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go b/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go index e1fdb3654fc..49735b2d97e 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go +++ b/service/elasticloadbalancingv2/api_op_ModifyLoadBalancerAttributes.go @@ -116,6 +116,9 @@ func (c *Client) addOperationModifyLoadBalancerAttributesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyLoadBalancerAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_ModifyRule.go b/service/elasticloadbalancingv2/api_op_ModifyRule.go index e9cfd68d6d9..a28090f91f7 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyRule.go +++ b/service/elasticloadbalancingv2/api_op_ModifyRule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationModifyRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go b/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go index 3b5b55521e0..228156fe247 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go +++ b/service/elasticloadbalancingv2/api_op_ModifyTargetGroup.go @@ -154,6 +154,9 @@ func (c *Client) addOperationModifyTargetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go b/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go index 8fa9b76adad..a1afaaa1905 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go +++ b/service/elasticloadbalancingv2/api_op_ModifyTargetGroupAttributes.go @@ -111,6 +111,9 @@ func (c *Client) addOperationModifyTargetGroupAttributesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTargetGroupAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go b/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go index 2c6499c154a..aab587fafd7 100644 --- a/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go +++ b/service/elasticloadbalancingv2/api_op_ModifyTrustStore.go @@ -120,6 +120,9 @@ func (c *Client) addOperationModifyTrustStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_RegisterTargets.go b/service/elasticloadbalancingv2/api_op_RegisterTargets.go index 7214dc2bcdb..6a0e9f6dff3 100644 --- a/service/elasticloadbalancingv2/api_op_RegisterTargets.go +++ b/service/elasticloadbalancingv2/api_op_RegisterTargets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRegisterTargetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go b/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go index 42df513c8a6..477c65c02fb 100644 --- a/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go +++ b/service/elasticloadbalancingv2/api_op_RemoveListenerCertificates.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRemoveListenerCertificatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveListenerCertificatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_RemoveTags.go b/service/elasticloadbalancingv2/api_op_RemoveTags.go index e7cf915ab24..07ef01d4248 100644 --- a/service/elasticloadbalancingv2/api_op_RemoveTags.go +++ b/service/elasticloadbalancingv2/api_op_RemoveTags.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go b/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go index c25ecc93a0b..bd89e81ae76 100644 --- a/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go +++ b/service/elasticloadbalancingv2/api_op_RemoveTrustStoreRevocations.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRemoveTrustStoreRevocationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTrustStoreRevocationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_SetIpAddressType.go b/service/elasticloadbalancingv2/api_op_SetIpAddressType.go index 5d7f2a1e4cd..5423e5d418d 100644 --- a/service/elasticloadbalancingv2/api_op_SetIpAddressType.go +++ b/service/elasticloadbalancingv2/api_op_SetIpAddressType.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSetIpAddressTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIpAddressTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_SetRulePriorities.go b/service/elasticloadbalancingv2/api_op_SetRulePriorities.go index 018f4073a86..93c603d2ab0 100644 --- a/service/elasticloadbalancingv2/api_op_SetRulePriorities.go +++ b/service/elasticloadbalancingv2/api_op_SetRulePriorities.go @@ -109,6 +109,9 @@ func (c *Client) addOperationSetRulePrioritiesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetRulePrioritiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go b/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go index 84850e8915f..d3ac6e647bd 100644 --- a/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go +++ b/service/elasticloadbalancingv2/api_op_SetSecurityGroups.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSetSecurityGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSecurityGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticloadbalancingv2/api_op_SetSubnets.go b/service/elasticloadbalancingv2/api_op_SetSubnets.go index 4bbdb967781..e87588c5f47 100644 --- a/service/elasticloadbalancingv2/api_op_SetSubnets.go +++ b/service/elasticloadbalancingv2/api_op_SetSubnets.go @@ -174,6 +174,9 @@ func (c *Client) addOperationSetSubnetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSubnetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_client.go b/service/elasticsearchservice/api_client.go index 6a3e3807c5b..26b40dcabfd 100644 --- a/service/elasticsearchservice/api_client.go +++ b/service/elasticsearchservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elasticsearchservice/api_op_AcceptInboundCrossClusterSearchConnection.go b/service/elasticsearchservice/api_op_AcceptInboundCrossClusterSearchConnection.go index 4fdc03cd2ba..2aa25fe0a93 100644 --- a/service/elasticsearchservice/api_op_AcceptInboundCrossClusterSearchConnection.go +++ b/service/elasticsearchservice/api_op_AcceptInboundCrossClusterSearchConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAcceptInboundCrossClusterSearchConnectionMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInboundCrossClusterSearchConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_AddTags.go b/service/elasticsearchservice/api_op_AddTags.go index 22724f67e40..2a2635cb702 100644 --- a/service/elasticsearchservice/api_op_AddTags.go +++ b/service/elasticsearchservice/api_op_AddTags.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_AssociatePackage.go b/service/elasticsearchservice/api_op_AssociatePackage.go index b048bf6fcc5..027f8e1a0fb 100644 --- a/service/elasticsearchservice/api_op_AssociatePackage.go +++ b/service/elasticsearchservice/api_op_AssociatePackage.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssociatePackageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_AuthorizeVpcEndpointAccess.go b/service/elasticsearchservice/api_op_AuthorizeVpcEndpointAccess.go index ce5b22e712c..01272d2d39e 100644 --- a/service/elasticsearchservice/api_op_AuthorizeVpcEndpointAccess.go +++ b/service/elasticsearchservice/api_op_AuthorizeVpcEndpointAccess.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAuthorizeVpcEndpointAccessMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeVpcEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_CancelDomainConfigChange.go b/service/elasticsearchservice/api_op_CancelDomainConfigChange.go index 89089e478de..5edb588dd42 100644 --- a/service/elasticsearchservice/api_op_CancelDomainConfigChange.go +++ b/service/elasticsearchservice/api_op_CancelDomainConfigChange.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCancelDomainConfigChangeMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDomainConfigChangeValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_CancelElasticsearchServiceSoftwareUpdate.go b/service/elasticsearchservice/api_op_CancelElasticsearchServiceSoftwareUpdate.go index 045b763ced1..2d653e2d9e7 100644 --- a/service/elasticsearchservice/api_op_CancelElasticsearchServiceSoftwareUpdate.go +++ b/service/elasticsearchservice/api_op_CancelElasticsearchServiceSoftwareUpdate.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCancelElasticsearchServiceSoftwareUpdateMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelElasticsearchServiceSoftwareUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_CreateElasticsearchDomain.go b/service/elasticsearchservice/api_op_CreateElasticsearchDomain.go index d57bbf105c7..8c99ab7dd26 100644 --- a/service/elasticsearchservice/api_op_CreateElasticsearchDomain.go +++ b/service/elasticsearchservice/api_op_CreateElasticsearchDomain.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateElasticsearchDomainMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateElasticsearchDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_CreateOutboundCrossClusterSearchConnection.go b/service/elasticsearchservice/api_op_CreateOutboundCrossClusterSearchConnection.go index 61ae49b08f0..9c31f548ebb 100644 --- a/service/elasticsearchservice/api_op_CreateOutboundCrossClusterSearchConnection.go +++ b/service/elasticsearchservice/api_op_CreateOutboundCrossClusterSearchConnection.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateOutboundCrossClusterSearchConnectionMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOutboundCrossClusterSearchConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_CreatePackage.go b/service/elasticsearchservice/api_op_CreatePackage.go index 0fc42787975..cde6709f22c 100644 --- a/service/elasticsearchservice/api_op_CreatePackage.go +++ b/service/elasticsearchservice/api_op_CreatePackage.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_CreateVpcEndpoint.go b/service/elasticsearchservice/api_op_CreateVpcEndpoint.go index a4370ca5489..06aabeaebe7 100644 --- a/service/elasticsearchservice/api_op_CreateVpcEndpoint.go +++ b/service/elasticsearchservice/api_op_CreateVpcEndpoint.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DeleteElasticsearchDomain.go b/service/elasticsearchservice/api_op_DeleteElasticsearchDomain.go index 72614ab146a..7256125599c 100644 --- a/service/elasticsearchservice/api_op_DeleteElasticsearchDomain.go +++ b/service/elasticsearchservice/api_op_DeleteElasticsearchDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteElasticsearchDomainMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteElasticsearchDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DeleteElasticsearchServiceRole.go b/service/elasticsearchservice/api_op_DeleteElasticsearchServiceRole.go index a66ebeceb42..8a516fab4ee 100644 --- a/service/elasticsearchservice/api_op_DeleteElasticsearchServiceRole.go +++ b/service/elasticsearchservice/api_op_DeleteElasticsearchServiceRole.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDeleteElasticsearchServiceRoleMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteElasticsearchServiceRole(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DeleteInboundCrossClusterSearchConnection.go b/service/elasticsearchservice/api_op_DeleteInboundCrossClusterSearchConnection.go index 59c92026ef9..1caa79a6747 100644 --- a/service/elasticsearchservice/api_op_DeleteInboundCrossClusterSearchConnection.go +++ b/service/elasticsearchservice/api_op_DeleteInboundCrossClusterSearchConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteInboundCrossClusterSearchConnectionMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInboundCrossClusterSearchConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DeleteOutboundCrossClusterSearchConnection.go b/service/elasticsearchservice/api_op_DeleteOutboundCrossClusterSearchConnection.go index 23b726c406c..061f4bdaf6d 100644 --- a/service/elasticsearchservice/api_op_DeleteOutboundCrossClusterSearchConnection.go +++ b/service/elasticsearchservice/api_op_DeleteOutboundCrossClusterSearchConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteOutboundCrossClusterSearchConnectionMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOutboundCrossClusterSearchConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DeletePackage.go b/service/elasticsearchservice/api_op_DeletePackage.go index 31a779624ff..079ede6c0cd 100644 --- a/service/elasticsearchservice/api_op_DeletePackage.go +++ b/service/elasticsearchservice/api_op_DeletePackage.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeletePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DeleteVpcEndpoint.go b/service/elasticsearchservice/api_op_DeleteVpcEndpoint.go index 27054aec4a0..96b888e4418 100644 --- a/service/elasticsearchservice/api_op_DeleteVpcEndpoint.go +++ b/service/elasticsearchservice/api_op_DeleteVpcEndpoint.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go b/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go index b44027b134d..87328932167 100644 --- a/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go +++ b/service/elasticsearchservice/api_op_DescribeDomainAutoTunes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDomainAutoTunesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainAutoTunesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeDomainAutoTunesMiddlewares(stack *middlewar return nil } -// DescribeDomainAutoTunesAPIClient is a client that implements the -// DescribeDomainAutoTunes operation. -type DescribeDomainAutoTunesAPIClient interface { - DescribeDomainAutoTunes(context.Context, *DescribeDomainAutoTunesInput, ...func(*Options)) (*DescribeDomainAutoTunesOutput, error) -} - -var _ DescribeDomainAutoTunesAPIClient = (*Client)(nil) - // DescribeDomainAutoTunesPaginatorOptions is the paginator options for // DescribeDomainAutoTunes type DescribeDomainAutoTunesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDomainAutoTunes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDomainAutoTunesAPIClient is a client that implements the +// DescribeDomainAutoTunes operation. +type DescribeDomainAutoTunesAPIClient interface { + DescribeDomainAutoTunes(context.Context, *DescribeDomainAutoTunesInput, ...func(*Options)) (*DescribeDomainAutoTunesOutput, error) +} + +var _ DescribeDomainAutoTunesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDomainAutoTunes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_DescribeDomainChangeProgress.go b/service/elasticsearchservice/api_op_DescribeDomainChangeProgress.go index 6b5a7218f05..16ab08a4a4d 100644 --- a/service/elasticsearchservice/api_op_DescribeDomainChangeProgress.go +++ b/service/elasticsearchservice/api_op_DescribeDomainChangeProgress.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDomainChangeProgressMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainChangeProgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DescribeElasticsearchDomain.go b/service/elasticsearchservice/api_op_DescribeElasticsearchDomain.go index 1447cd3c52b..c17768effdf 100644 --- a/service/elasticsearchservice/api_op_DescribeElasticsearchDomain.go +++ b/service/elasticsearchservice/api_op_DescribeElasticsearchDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeElasticsearchDomainMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeElasticsearchDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DescribeElasticsearchDomainConfig.go b/service/elasticsearchservice/api_op_DescribeElasticsearchDomainConfig.go index e419bfc29ac..9e995532110 100644 --- a/service/elasticsearchservice/api_op_DescribeElasticsearchDomainConfig.go +++ b/service/elasticsearchservice/api_op_DescribeElasticsearchDomainConfig.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeElasticsearchDomainConfigMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeElasticsearchDomainConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DescribeElasticsearchDomains.go b/service/elasticsearchservice/api_op_DescribeElasticsearchDomains.go index 6b8feda5aa4..18dd0d9103a 100644 --- a/service/elasticsearchservice/api_op_DescribeElasticsearchDomains.go +++ b/service/elasticsearchservice/api_op_DescribeElasticsearchDomains.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeElasticsearchDomainsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeElasticsearchDomainsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DescribeElasticsearchInstanceTypeLimits.go b/service/elasticsearchservice/api_op_DescribeElasticsearchInstanceTypeLimits.go index 82e75c801f9..9bbf51455da 100644 --- a/service/elasticsearchservice/api_op_DescribeElasticsearchInstanceTypeLimits.go +++ b/service/elasticsearchservice/api_op_DescribeElasticsearchInstanceTypeLimits.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeElasticsearchInstanceTypeLimitsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeElasticsearchInstanceTypeLimitsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go b/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go index 4e692900d50..acc96676632 100644 --- a/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go +++ b/service/elasticsearchservice/api_op_DescribeInboundCrossClusterSearchConnections.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeInboundCrossClusterSearchConnectionsMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInboundCrossClusterSearchConnections(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeInboundCrossClusterSearchConnectionsMiddlew return nil } -// DescribeInboundCrossClusterSearchConnectionsAPIClient is a client that -// implements the DescribeInboundCrossClusterSearchConnections operation. -type DescribeInboundCrossClusterSearchConnectionsAPIClient interface { - DescribeInboundCrossClusterSearchConnections(context.Context, *DescribeInboundCrossClusterSearchConnectionsInput, ...func(*Options)) (*DescribeInboundCrossClusterSearchConnectionsOutput, error) -} - -var _ DescribeInboundCrossClusterSearchConnectionsAPIClient = (*Client)(nil) - // DescribeInboundCrossClusterSearchConnectionsPaginatorOptions is the paginator // options for DescribeInboundCrossClusterSearchConnections type DescribeInboundCrossClusterSearchConnectionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeInboundCrossClusterSearchConnectionsPaginator) NextPage(ctx con params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInboundCrossClusterSearchConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeInboundCrossClusterSearchConnectionsPaginator) NextPage(ctx con return result, nil } +// DescribeInboundCrossClusterSearchConnectionsAPIClient is a client that +// implements the DescribeInboundCrossClusterSearchConnections operation. +type DescribeInboundCrossClusterSearchConnectionsAPIClient interface { + DescribeInboundCrossClusterSearchConnections(context.Context, *DescribeInboundCrossClusterSearchConnectionsInput, ...func(*Options)) (*DescribeInboundCrossClusterSearchConnectionsOutput, error) +} + +var _ DescribeInboundCrossClusterSearchConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInboundCrossClusterSearchConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go b/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go index a899fe8bc24..f88ff482ba7 100644 --- a/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go +++ b/service/elasticsearchservice/api_op_DescribeOutboundCrossClusterSearchConnections.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeOutboundCrossClusterSearchConnectionsMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOutboundCrossClusterSearchConnections(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeOutboundCrossClusterSearchConnectionsMiddle return nil } -// DescribeOutboundCrossClusterSearchConnectionsAPIClient is a client that -// implements the DescribeOutboundCrossClusterSearchConnections operation. -type DescribeOutboundCrossClusterSearchConnectionsAPIClient interface { - DescribeOutboundCrossClusterSearchConnections(context.Context, *DescribeOutboundCrossClusterSearchConnectionsInput, ...func(*Options)) (*DescribeOutboundCrossClusterSearchConnectionsOutput, error) -} - -var _ DescribeOutboundCrossClusterSearchConnectionsAPIClient = (*Client)(nil) - // DescribeOutboundCrossClusterSearchConnectionsPaginatorOptions is the paginator // options for DescribeOutboundCrossClusterSearchConnections type DescribeOutboundCrossClusterSearchConnectionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeOutboundCrossClusterSearchConnectionsPaginator) NextPage(ctx co params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOutboundCrossClusterSearchConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeOutboundCrossClusterSearchConnectionsPaginator) NextPage(ctx co return result, nil } +// DescribeOutboundCrossClusterSearchConnectionsAPIClient is a client that +// implements the DescribeOutboundCrossClusterSearchConnections operation. +type DescribeOutboundCrossClusterSearchConnectionsAPIClient interface { + DescribeOutboundCrossClusterSearchConnections(context.Context, *DescribeOutboundCrossClusterSearchConnectionsInput, ...func(*Options)) (*DescribeOutboundCrossClusterSearchConnectionsOutput, error) +} + +var _ DescribeOutboundCrossClusterSearchConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOutboundCrossClusterSearchConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_DescribePackages.go b/service/elasticsearchservice/api_op_DescribePackages.go index da7558a129d..18082c23da2 100644 --- a/service/elasticsearchservice/api_op_DescribePackages.go +++ b/service/elasticsearchservice/api_op_DescribePackages.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribePackagesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePackages(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribePackagesMiddlewares(stack *middleware.Stack return nil } -// DescribePackagesAPIClient is a client that implements the DescribePackages -// operation. -type DescribePackagesAPIClient interface { - DescribePackages(context.Context, *DescribePackagesInput, ...func(*Options)) (*DescribePackagesOutput, error) -} - -var _ DescribePackagesAPIClient = (*Client)(nil) - // DescribePackagesPaginatorOptions is the paginator options for DescribePackages type DescribePackagesPaginatorOptions struct { // Limits results to a maximum number of packages. @@ -203,6 +198,9 @@ func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribePackagesAPIClient is a client that implements the DescribePackages +// operation. +type DescribePackagesAPIClient interface { + DescribePackages(context.Context, *DescribePackagesInput, ...func(*Options)) (*DescribePackagesOutput, error) +} + +var _ DescribePackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go index efe03405b36..8eadc5cd21a 100644 --- a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go +++ b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstanceOfferings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeReservedElasticsearchInstanceOfferingsMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedElasticsearchInstanceOfferings(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeReservedElasticsearchInstanceOfferingsMiddl return nil } -// DescribeReservedElasticsearchInstanceOfferingsAPIClient is a client that -// implements the DescribeReservedElasticsearchInstanceOfferings operation. -type DescribeReservedElasticsearchInstanceOfferingsAPIClient interface { - DescribeReservedElasticsearchInstanceOfferings(context.Context, *DescribeReservedElasticsearchInstanceOfferingsInput, ...func(*Options)) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) -} - -var _ DescribeReservedElasticsearchInstanceOfferingsAPIClient = (*Client)(nil) - // DescribeReservedElasticsearchInstanceOfferingsPaginatorOptions is the paginator // options for DescribeReservedElasticsearchInstanceOfferings type DescribeReservedElasticsearchInstanceOfferingsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeReservedElasticsearchInstanceOfferingsPaginator) NextPage(ctx c params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedElasticsearchInstanceOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeReservedElasticsearchInstanceOfferingsPaginator) NextPage(ctx c return result, nil } +// DescribeReservedElasticsearchInstanceOfferingsAPIClient is a client that +// implements the DescribeReservedElasticsearchInstanceOfferings operation. +type DescribeReservedElasticsearchInstanceOfferingsAPIClient interface { + DescribeReservedElasticsearchInstanceOfferings(context.Context, *DescribeReservedElasticsearchInstanceOfferingsInput, ...func(*Options)) (*DescribeReservedElasticsearchInstanceOfferingsOutput, error) +} + +var _ DescribeReservedElasticsearchInstanceOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedElasticsearchInstanceOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go index 25950cea0a3..9fca44a9d45 100644 --- a/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go +++ b/service/elasticsearchservice/api_op_DescribeReservedElasticsearchInstances.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeReservedElasticsearchInstancesMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedElasticsearchInstances(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeReservedElasticsearchInstancesMiddlewares(s return nil } -// DescribeReservedElasticsearchInstancesAPIClient is a client that implements the -// DescribeReservedElasticsearchInstances operation. -type DescribeReservedElasticsearchInstancesAPIClient interface { - DescribeReservedElasticsearchInstances(context.Context, *DescribeReservedElasticsearchInstancesInput, ...func(*Options)) (*DescribeReservedElasticsearchInstancesOutput, error) -} - -var _ DescribeReservedElasticsearchInstancesAPIClient = (*Client)(nil) - // DescribeReservedElasticsearchInstancesPaginatorOptions is the paginator options // for DescribeReservedElasticsearchInstances type DescribeReservedElasticsearchInstancesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeReservedElasticsearchInstancesPaginator) NextPage(ctx context.C params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedElasticsearchInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeReservedElasticsearchInstancesPaginator) NextPage(ctx context.C return result, nil } +// DescribeReservedElasticsearchInstancesAPIClient is a client that implements the +// DescribeReservedElasticsearchInstances operation. +type DescribeReservedElasticsearchInstancesAPIClient interface { + DescribeReservedElasticsearchInstances(context.Context, *DescribeReservedElasticsearchInstancesInput, ...func(*Options)) (*DescribeReservedElasticsearchInstancesOutput, error) +} + +var _ DescribeReservedElasticsearchInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedElasticsearchInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_DescribeVpcEndpoints.go b/service/elasticsearchservice/api_op_DescribeVpcEndpoints.go index 6b94945e809..fb1b62f286d 100644 --- a/service/elasticsearchservice/api_op_DescribeVpcEndpoints.go +++ b/service/elasticsearchservice/api_op_DescribeVpcEndpoints.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeVpcEndpointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_DissociatePackage.go b/service/elasticsearchservice/api_op_DissociatePackage.go index d7da404f6af..6190ef0be31 100644 --- a/service/elasticsearchservice/api_op_DissociatePackage.go +++ b/service/elasticsearchservice/api_op_DissociatePackage.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDissociatePackageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDissociatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_GetCompatibleElasticsearchVersions.go b/service/elasticsearchservice/api_op_GetCompatibleElasticsearchVersions.go index 2e583b25e05..e4e40ecd8fa 100644 --- a/service/elasticsearchservice/api_op_GetCompatibleElasticsearchVersions.go +++ b/service/elasticsearchservice/api_op_GetCompatibleElasticsearchVersions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetCompatibleElasticsearchVersionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCompatibleElasticsearchVersions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_GetPackageVersionHistory.go b/service/elasticsearchservice/api_op_GetPackageVersionHistory.go index 40a6e778e21..5a05c664bab 100644 --- a/service/elasticsearchservice/api_op_GetPackageVersionHistory.go +++ b/service/elasticsearchservice/api_op_GetPackageVersionHistory.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetPackageVersionHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPackageVersionHistoryValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationGetPackageVersionHistoryMiddlewares(stack *middlewa return nil } -// GetPackageVersionHistoryAPIClient is a client that implements the -// GetPackageVersionHistory operation. -type GetPackageVersionHistoryAPIClient interface { - GetPackageVersionHistory(context.Context, *GetPackageVersionHistoryInput, ...func(*Options)) (*GetPackageVersionHistoryOutput, error) -} - -var _ GetPackageVersionHistoryAPIClient = (*Client)(nil) - // GetPackageVersionHistoryPaginatorOptions is the paginator options for // GetPackageVersionHistory type GetPackageVersionHistoryPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPackageVersionHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetPackageVersionHistoryAPIClient is a client that implements the +// GetPackageVersionHistory operation. +type GetPackageVersionHistoryAPIClient interface { + GetPackageVersionHistory(context.Context, *GetPackageVersionHistoryInput, ...func(*Options)) (*GetPackageVersionHistoryOutput, error) +} + +var _ GetPackageVersionHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPackageVersionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_GetUpgradeHistory.go b/service/elasticsearchservice/api_op_GetUpgradeHistory.go index 514ca35600f..27bd94d4f43 100644 --- a/service/elasticsearchservice/api_op_GetUpgradeHistory.go +++ b/service/elasticsearchservice/api_op_GetUpgradeHistory.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetUpgradeHistoryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUpgradeHistoryValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetUpgradeHistoryMiddlewares(stack *middleware.Stac return nil } -// GetUpgradeHistoryAPIClient is a client that implements the GetUpgradeHistory -// operation. -type GetUpgradeHistoryAPIClient interface { - GetUpgradeHistory(context.Context, *GetUpgradeHistoryInput, ...func(*Options)) (*GetUpgradeHistoryOutput, error) -} - -var _ GetUpgradeHistoryAPIClient = (*Client)(nil) - // GetUpgradeHistoryPaginatorOptions is the paginator options for GetUpgradeHistory type GetUpgradeHistoryPaginatorOptions struct { // Set this value to limit the number of results returned. @@ -216,6 +211,9 @@ func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUpgradeHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetUpgradeHistoryAPIClient is a client that implements the GetUpgradeHistory +// operation. +type GetUpgradeHistoryAPIClient interface { + GetUpgradeHistory(context.Context, *GetUpgradeHistoryInput, ...func(*Options)) (*GetUpgradeHistoryOutput, error) +} + +var _ GetUpgradeHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUpgradeHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_GetUpgradeStatus.go b/service/elasticsearchservice/api_op_GetUpgradeStatus.go index e3b821f2526..f7c56f8d5d6 100644 --- a/service/elasticsearchservice/api_op_GetUpgradeStatus.go +++ b/service/elasticsearchservice/api_op_GetUpgradeStatus.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetUpgradeStatusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUpgradeStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_ListDomainNames.go b/service/elasticsearchservice/api_op_ListDomainNames.go index 6dbb08a76e6..420bc47934f 100644 --- a/service/elasticsearchservice/api_op_ListDomainNames.go +++ b/service/elasticsearchservice/api_op_ListDomainNames.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListDomainNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_ListDomainsForPackage.go b/service/elasticsearchservice/api_op_ListDomainsForPackage.go index 70eb1132538..061ccb89fb8 100644 --- a/service/elasticsearchservice/api_op_ListDomainsForPackage.go +++ b/service/elasticsearchservice/api_op_ListDomainsForPackage.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDomainsForPackageMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainsForPackageValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListDomainsForPackageMiddlewares(stack *middleware. return nil } -// ListDomainsForPackageAPIClient is a client that implements the -// ListDomainsForPackage operation. -type ListDomainsForPackageAPIClient interface { - ListDomainsForPackage(context.Context, *ListDomainsForPackageInput, ...func(*Options)) (*ListDomainsForPackageOutput, error) -} - -var _ ListDomainsForPackageAPIClient = (*Client)(nil) - // ListDomainsForPackagePaginatorOptions is the paginator options for // ListDomainsForPackage type ListDomainsForPackagePaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns .. params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainsForPackage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDomainsForPackageAPIClient is a client that implements the +// ListDomainsForPackage operation. +type ListDomainsForPackageAPIClient interface { + ListDomainsForPackage(context.Context, *ListDomainsForPackageInput, ...func(*Options)) (*ListDomainsForPackageOutput, error) +} + +var _ ListDomainsForPackageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainsForPackage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go b/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go index db3c350cffa..9d9030d0cce 100644 --- a/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go +++ b/service/elasticsearchservice/api_op_ListElasticsearchInstanceTypes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListElasticsearchInstanceTypesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListElasticsearchInstanceTypesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListElasticsearchInstanceTypesMiddlewares(stack *mi return nil } -// ListElasticsearchInstanceTypesAPIClient is a client that implements the -// ListElasticsearchInstanceTypes operation. -type ListElasticsearchInstanceTypesAPIClient interface { - ListElasticsearchInstanceTypes(context.Context, *ListElasticsearchInstanceTypesInput, ...func(*Options)) (*ListElasticsearchInstanceTypesOutput, error) -} - -var _ ListElasticsearchInstanceTypesAPIClient = (*Client)(nil) - // ListElasticsearchInstanceTypesPaginatorOptions is the paginator options for // ListElasticsearchInstanceTypes type ListElasticsearchInstanceTypesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListElasticsearchInstanceTypesPaginator) NextPage(ctx context.Context, params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListElasticsearchInstanceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListElasticsearchInstanceTypesPaginator) NextPage(ctx context.Context, return result, nil } +// ListElasticsearchInstanceTypesAPIClient is a client that implements the +// ListElasticsearchInstanceTypes operation. +type ListElasticsearchInstanceTypesAPIClient interface { + ListElasticsearchInstanceTypes(context.Context, *ListElasticsearchInstanceTypesInput, ...func(*Options)) (*ListElasticsearchInstanceTypesOutput, error) +} + +var _ ListElasticsearchInstanceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListElasticsearchInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_ListElasticsearchVersions.go b/service/elasticsearchservice/api_op_ListElasticsearchVersions.go index 27e78523027..a20b4a33b9f 100644 --- a/service/elasticsearchservice/api_op_ListElasticsearchVersions.go +++ b/service/elasticsearchservice/api_op_ListElasticsearchVersions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListElasticsearchVersionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListElasticsearchVersions(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListElasticsearchVersionsMiddlewares(stack *middlew return nil } -// ListElasticsearchVersionsAPIClient is a client that implements the -// ListElasticsearchVersions operation. -type ListElasticsearchVersionsAPIClient interface { - ListElasticsearchVersions(context.Context, *ListElasticsearchVersionsInput, ...func(*Options)) (*ListElasticsearchVersionsOutput, error) -} - -var _ ListElasticsearchVersionsAPIClient = (*Client)(nil) - // ListElasticsearchVersionsPaginatorOptions is the paginator options for // ListElasticsearchVersions type ListElasticsearchVersionsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListElasticsearchVersionsPaginator) NextPage(ctx context.Context, optFn params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListElasticsearchVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListElasticsearchVersionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListElasticsearchVersionsAPIClient is a client that implements the +// ListElasticsearchVersions operation. +type ListElasticsearchVersionsAPIClient interface { + ListElasticsearchVersions(context.Context, *ListElasticsearchVersionsInput, ...func(*Options)) (*ListElasticsearchVersionsOutput, error) +} + +var _ ListElasticsearchVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListElasticsearchVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_ListPackagesForDomain.go b/service/elasticsearchservice/api_op_ListPackagesForDomain.go index e902e164ffc..5b3c8d7ac52 100644 --- a/service/elasticsearchservice/api_op_ListPackagesForDomain.go +++ b/service/elasticsearchservice/api_op_ListPackagesForDomain.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPackagesForDomainMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackagesForDomainValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPackagesForDomainMiddlewares(stack *middleware. return nil } -// ListPackagesForDomainAPIClient is a client that implements the -// ListPackagesForDomain operation. -type ListPackagesForDomainAPIClient interface { - ListPackagesForDomain(context.Context, *ListPackagesForDomainInput, ...func(*Options)) (*ListPackagesForDomainOutput, error) -} - -var _ ListPackagesForDomainAPIClient = (*Client)(nil) - // ListPackagesForDomainPaginatorOptions is the paginator options for // ListPackagesForDomain type ListPackagesForDomainPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns .. params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackagesForDomain(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPackagesForDomainAPIClient is a client that implements the +// ListPackagesForDomain operation. +type ListPackagesForDomainAPIClient interface { + ListPackagesForDomain(context.Context, *ListPackagesForDomainInput, ...func(*Options)) (*ListPackagesForDomainOutput, error) +} + +var _ ListPackagesForDomainAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackagesForDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elasticsearchservice/api_op_ListTags.go b/service/elasticsearchservice/api_op_ListTags.go index d3bcfda7ec8..47011a2d00e 100644 --- a/service/elasticsearchservice/api_op_ListTags.go +++ b/service/elasticsearchservice/api_op_ListTags.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_ListVpcEndpointAccess.go b/service/elasticsearchservice/api_op_ListVpcEndpointAccess.go index ec9c0867557..29ef1443ef6 100644 --- a/service/elasticsearchservice/api_op_ListVpcEndpointAccess.go +++ b/service/elasticsearchservice/api_op_ListVpcEndpointAccess.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListVpcEndpointAccessMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVpcEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_ListVpcEndpoints.go b/service/elasticsearchservice/api_op_ListVpcEndpoints.go index 78d1420b453..a0307794b1e 100644 --- a/service/elasticsearchservice/api_op_ListVpcEndpoints.go +++ b/service/elasticsearchservice/api_op_ListVpcEndpoints.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListVpcEndpointsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVpcEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_ListVpcEndpointsForDomain.go b/service/elasticsearchservice/api_op_ListVpcEndpointsForDomain.go index 4e248270a36..978051c9d27 100644 --- a/service/elasticsearchservice/api_op_ListVpcEndpointsForDomain.go +++ b/service/elasticsearchservice/api_op_ListVpcEndpointsForDomain.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListVpcEndpointsForDomainMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVpcEndpointsForDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_PurchaseReservedElasticsearchInstanceOffering.go b/service/elasticsearchservice/api_op_PurchaseReservedElasticsearchInstanceOffering.go index c33febbb9b6..a59ecbb85e4 100644 --- a/service/elasticsearchservice/api_op_PurchaseReservedElasticsearchInstanceOffering.go +++ b/service/elasticsearchservice/api_op_PurchaseReservedElasticsearchInstanceOffering.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPurchaseReservedElasticsearchInstanceOfferingMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedElasticsearchInstanceOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_RejectInboundCrossClusterSearchConnection.go b/service/elasticsearchservice/api_op_RejectInboundCrossClusterSearchConnection.go index 54a24aa08de..1e6c06e4ca6 100644 --- a/service/elasticsearchservice/api_op_RejectInboundCrossClusterSearchConnection.go +++ b/service/elasticsearchservice/api_op_RejectInboundCrossClusterSearchConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRejectInboundCrossClusterSearchConnectionMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectInboundCrossClusterSearchConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_RemoveTags.go b/service/elasticsearchservice/api_op_RemoveTags.go index a9c22b02387..ad0ec8a34ec 100644 --- a/service/elasticsearchservice/api_op_RemoveTags.go +++ b/service/elasticsearchservice/api_op_RemoveTags.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_RevokeVpcEndpointAccess.go b/service/elasticsearchservice/api_op_RevokeVpcEndpointAccess.go index 92960d70002..f3938559aec 100644 --- a/service/elasticsearchservice/api_op_RevokeVpcEndpointAccess.go +++ b/service/elasticsearchservice/api_op_RevokeVpcEndpointAccess.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRevokeVpcEndpointAccessMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeVpcEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_StartElasticsearchServiceSoftwareUpdate.go b/service/elasticsearchservice/api_op_StartElasticsearchServiceSoftwareUpdate.go index 13349b62ff7..9ba8289977c 100644 --- a/service/elasticsearchservice/api_op_StartElasticsearchServiceSoftwareUpdate.go +++ b/service/elasticsearchservice/api_op_StartElasticsearchServiceSoftwareUpdate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStartElasticsearchServiceSoftwareUpdateMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartElasticsearchServiceSoftwareUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go b/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go index a439695b6c8..b9efe0ff122 100644 --- a/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go +++ b/service/elasticsearchservice/api_op_UpdateElasticsearchDomainConfig.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateElasticsearchDomainConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateElasticsearchDomainConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_UpdatePackage.go b/service/elasticsearchservice/api_op_UpdatePackage.go index fd56c274ff9..22bb96db3f2 100644 --- a/service/elasticsearchservice/api_op_UpdatePackage.go +++ b/service/elasticsearchservice/api_op_UpdatePackage.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_UpdateVpcEndpoint.go b/service/elasticsearchservice/api_op_UpdateVpcEndpoint.go index fce15e75c06..427a222894e 100644 --- a/service/elasticsearchservice/api_op_UpdateVpcEndpoint.go +++ b/service/elasticsearchservice/api_op_UpdateVpcEndpoint.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/elasticsearchservice/api_op_UpgradeElasticsearchDomain.go b/service/elasticsearchservice/api_op_UpgradeElasticsearchDomain.go index 0dbc3f00b03..96a8071e2f7 100644 --- a/service/elasticsearchservice/api_op_UpgradeElasticsearchDomain.go +++ b/service/elasticsearchservice/api_op_UpgradeElasticsearchDomain.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpgradeElasticsearchDomainMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpgradeElasticsearchDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_client.go b/service/elastictranscoder/api_client.go index 70c2c1c3f27..a46152ffe3b 100644 --- a/service/elastictranscoder/api_client.go +++ b/service/elastictranscoder/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/elastictranscoder/api_op_CancelJob.go b/service/elastictranscoder/api_op_CancelJob.go index 85da6e115de..b5c9b7da347 100644 --- a/service/elastictranscoder/api_op_CancelJob.go +++ b/service/elastictranscoder/api_op_CancelJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_CreateJob.go b/service/elastictranscoder/api_op_CreateJob.go index 9af795eb81d..09d794aae04 100644 --- a/service/elastictranscoder/api_op_CreateJob.go +++ b/service/elastictranscoder/api_op_CreateJob.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_CreatePipeline.go b/service/elastictranscoder/api_op_CreatePipeline.go index 4fd772a3c61..70576012fc9 100644 --- a/service/elastictranscoder/api_op_CreatePipeline.go +++ b/service/elastictranscoder/api_op_CreatePipeline.go @@ -324,6 +324,9 @@ func (c *Client) addOperationCreatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_CreatePreset.go b/service/elastictranscoder/api_op_CreatePreset.go index 735742e4bce..e334c6a178b 100644 --- a/service/elastictranscoder/api_op_CreatePreset.go +++ b/service/elastictranscoder/api_op_CreatePreset.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreatePresetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_DeletePipeline.go b/service/elastictranscoder/api_op_DeletePipeline.go index 48c8aa9da55..77c9bc90b19 100644 --- a/service/elastictranscoder/api_op_DeletePipeline.go +++ b/service/elastictranscoder/api_op_DeletePipeline.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_DeletePreset.go b/service/elastictranscoder/api_op_DeletePreset.go index f2586939e11..d28ad9250b0 100644 --- a/service/elastictranscoder/api_op_DeletePreset.go +++ b/service/elastictranscoder/api_op_DeletePreset.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeletePresetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_ListJobsByPipeline.go b/service/elastictranscoder/api_op_ListJobsByPipeline.go index 5ac1f2b90b3..32df1d7bb4f 100644 --- a/service/elastictranscoder/api_op_ListJobsByPipeline.go +++ b/service/elastictranscoder/api_op_ListJobsByPipeline.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListJobsByPipelineMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobsByPipelineValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListJobsByPipelineMiddlewares(stack *middleware.Sta return nil } -// ListJobsByPipelineAPIClient is a client that implements the ListJobsByPipeline -// operation. -type ListJobsByPipelineAPIClient interface { - ListJobsByPipeline(context.Context, *ListJobsByPipelineInput, ...func(*Options)) (*ListJobsByPipelineOutput, error) -} - -var _ ListJobsByPipelineAPIClient = (*Client)(nil) - // ListJobsByPipelinePaginatorOptions is the paginator options for // ListJobsByPipeline type ListJobsByPipelinePaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListJobsByPipelinePaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.PageToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobsByPipeline(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListJobsByPipelinePaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListJobsByPipelineAPIClient is a client that implements the ListJobsByPipeline +// operation. +type ListJobsByPipelineAPIClient interface { + ListJobsByPipeline(context.Context, *ListJobsByPipelineInput, ...func(*Options)) (*ListJobsByPipelineOutput, error) +} + +var _ ListJobsByPipelineAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobsByPipeline(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elastictranscoder/api_op_ListJobsByStatus.go b/service/elastictranscoder/api_op_ListJobsByStatus.go index 67fb910f2ea..49361d786ff 100644 --- a/service/elastictranscoder/api_op_ListJobsByStatus.go +++ b/service/elastictranscoder/api_op_ListJobsByStatus.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListJobsByStatusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobsByStatusValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListJobsByStatusMiddlewares(stack *middleware.Stack return nil } -// ListJobsByStatusAPIClient is a client that implements the ListJobsByStatus -// operation. -type ListJobsByStatusAPIClient interface { - ListJobsByStatus(context.Context, *ListJobsByStatusInput, ...func(*Options)) (*ListJobsByStatusOutput, error) -} - -var _ ListJobsByStatusAPIClient = (*Client)(nil) - // ListJobsByStatusPaginatorOptions is the paginator options for ListJobsByStatus type ListJobsByStatusPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -209,6 +204,9 @@ func (p *ListJobsByStatusPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.PageToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobsByStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListJobsByStatusPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListJobsByStatusAPIClient is a client that implements the ListJobsByStatus +// operation. +type ListJobsByStatusAPIClient interface { + ListJobsByStatus(context.Context, *ListJobsByStatusInput, ...func(*Options)) (*ListJobsByStatusOutput, error) +} + +var _ ListJobsByStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobsByStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elastictranscoder/api_op_ListPipelines.go b/service/elastictranscoder/api_op_ListPipelines.go index aa1cc0403ff..d0a2ba098c1 100644 --- a/service/elastictranscoder/api_op_ListPipelines.go +++ b/service/elastictranscoder/api_op_ListPipelines.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelines(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o return nil } -// ListPipelinesAPIClient is a client that implements the ListPipelines operation. -type ListPipelinesAPIClient interface { - ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) -} - -var _ ListPipelinesAPIClient = (*Client)(nil) - // ListPipelinesPaginatorOptions is the paginator options for ListPipelines type ListPipelinesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -197,6 +193,9 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O params := *p.params params.PageToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -216,6 +215,13 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListPipelinesAPIClient is a client that implements the ListPipelines operation. +type ListPipelinesAPIClient interface { + ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) +} + +var _ ListPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elastictranscoder/api_op_ListPresets.go b/service/elastictranscoder/api_op_ListPresets.go index 0fcde27b795..90b096f9959 100644 --- a/service/elastictranscoder/api_op_ListPresets.go +++ b/service/elastictranscoder/api_op_ListPresets.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPresetsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPresets(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListPresetsMiddlewares(stack *middleware.Stack, opt return nil } -// ListPresetsAPIClient is a client that implements the ListPresets operation. -type ListPresetsAPIClient interface { - ListPresets(context.Context, *ListPresetsInput, ...func(*Options)) (*ListPresetsOutput, error) -} - -var _ ListPresetsAPIClient = (*Client)(nil) - // ListPresetsPaginatorOptions is the paginator options for ListPresets type ListPresetsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -197,6 +193,9 @@ func (p *ListPresetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.PageToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPresets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -216,6 +215,13 @@ func (p *ListPresetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListPresetsAPIClient is a client that implements the ListPresets operation. +type ListPresetsAPIClient interface { + ListPresets(context.Context, *ListPresetsInput, ...func(*Options)) (*ListPresetsOutput, error) +} + +var _ ListPresetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPresets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elastictranscoder/api_op_ReadJob.go b/service/elastictranscoder/api_op_ReadJob.go index 421fac25082..3bc6ef67636 100644 --- a/service/elastictranscoder/api_op_ReadJob.go +++ b/service/elastictranscoder/api_op_ReadJob.go @@ -112,6 +112,9 @@ func (c *Client) addOperationReadJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReadJobValidationMiddleware(stack); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationReadJobMiddlewares(stack *middleware.Stack, options return nil } -// ReadJobAPIClient is a client that implements the ReadJob operation. -type ReadJobAPIClient interface { - ReadJob(context.Context, *ReadJobInput, ...func(*Options)) (*ReadJobOutput, error) -} - -var _ ReadJobAPIClient = (*Client)(nil) - // JobCompleteWaiterOptions are waiter options for JobCompleteWaiter type JobCompleteWaiterOptions struct { @@ -257,7 +253,13 @@ func (w *JobCompleteWaiter) WaitForOutput(ctx context.Context, params *ReadJobIn } out, err := w.client.ReadJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -349,6 +351,13 @@ func jobCompleteStateRetryable(ctx context.Context, input *ReadJobInput, output return true, nil } +// ReadJobAPIClient is a client that implements the ReadJob operation. +type ReadJobAPIClient interface { + ReadJob(context.Context, *ReadJobInput, ...func(*Options)) (*ReadJobOutput, error) +} + +var _ ReadJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opReadJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/elastictranscoder/api_op_ReadPipeline.go b/service/elastictranscoder/api_op_ReadPipeline.go index 8b185a5c3c0..7bb385290f7 100644 --- a/service/elastictranscoder/api_op_ReadPipeline.go +++ b/service/elastictranscoder/api_op_ReadPipeline.go @@ -116,6 +116,9 @@ func (c *Client) addOperationReadPipelineMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReadPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_ReadPreset.go b/service/elastictranscoder/api_op_ReadPreset.go index 7ed860722be..69913af73dc 100644 --- a/service/elastictranscoder/api_op_ReadPreset.go +++ b/service/elastictranscoder/api_op_ReadPreset.go @@ -108,6 +108,9 @@ func (c *Client) addOperationReadPresetMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReadPresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_TestRole.go b/service/elastictranscoder/api_op_TestRole.go index 6c83735e838..627a34203f2 100644 --- a/service/elastictranscoder/api_op_TestRole.go +++ b/service/elastictranscoder/api_op_TestRole.go @@ -139,6 +139,9 @@ func (c *Client) addOperationTestRoleMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_UpdatePipeline.go b/service/elastictranscoder/api_op_UpdatePipeline.go index 5172453ca63..93d5af002fd 100644 --- a/service/elastictranscoder/api_op_UpdatePipeline.go +++ b/service/elastictranscoder/api_op_UpdatePipeline.go @@ -295,6 +295,9 @@ func (c *Client) addOperationUpdatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_UpdatePipelineNotifications.go b/service/elastictranscoder/api_op_UpdatePipelineNotifications.go index 9e51bc786be..764b0c6eaee 100644 --- a/service/elastictranscoder/api_op_UpdatePipelineNotifications.go +++ b/service/elastictranscoder/api_op_UpdatePipelineNotifications.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdatePipelineNotificationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/elastictranscoder/api_op_UpdatePipelineStatus.go b/service/elastictranscoder/api_op_UpdatePipelineStatus.go index f0c3734b84a..7f6a0552d76 100644 --- a/service/elastictranscoder/api_op_UpdatePipelineStatus.go +++ b/service/elastictranscoder/api_op_UpdatePipelineStatus.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdatePipelineStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_client.go b/service/emr/api_client.go index c04dc3d0d02..4fde7c83640 100644 --- a/service/emr/api_client.go +++ b/service/emr/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/emr/api_op_AddInstanceFleet.go b/service/emr/api_op_AddInstanceFleet.go index 6ae0f753f3f..8d3c9fbcac1 100644 --- a/service/emr/api_op_AddInstanceFleet.go +++ b/service/emr/api_op_AddInstanceFleet.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAddInstanceFleetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddInstanceFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_AddInstanceGroups.go b/service/emr/api_op_AddInstanceGroups.go index c66583bd9ad..c3075c92348 100644 --- a/service/emr/api_op_AddInstanceGroups.go +++ b/service/emr/api_op_AddInstanceGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAddInstanceGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddInstanceGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_AddJobFlowSteps.go b/service/emr/api_op_AddJobFlowSteps.go index 5e2979e1316..aa929f94cb9 100644 --- a/service/emr/api_op_AddJobFlowSteps.go +++ b/service/emr/api_op_AddJobFlowSteps.go @@ -145,6 +145,9 @@ func (c *Client) addOperationAddJobFlowStepsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddJobFlowStepsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_AddTags.go b/service/emr/api_op_AddTags.go index 6a658efa5bd..b6a74b54521 100644 --- a/service/emr/api_op_AddTags.go +++ b/service/emr/api_op_AddTags.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_CancelSteps.go b/service/emr/api_op_CancelSteps.go index bc521aea073..8774fe93f1b 100644 --- a/service/emr/api_op_CancelSteps.go +++ b/service/emr/api_op_CancelSteps.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCancelStepsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelStepsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_CreateSecurityConfiguration.go b/service/emr/api_op_CreateSecurityConfiguration.go index e47ada57f70..f62f4c62d3f 100644 --- a/service/emr/api_op_CreateSecurityConfiguration.go +++ b/service/emr/api_op_CreateSecurityConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateSecurityConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_CreateStudio.go b/service/emr/api_op_CreateStudio.go index 4cf9996d1d8..3cf28b0d1d0 100644 --- a/service/emr/api_op_CreateStudio.go +++ b/service/emr/api_op_CreateStudio.go @@ -197,6 +197,9 @@ func (c *Client) addOperationCreateStudioMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStudioValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_CreateStudioSessionMapping.go b/service/emr/api_op_CreateStudioSessionMapping.go index f23b4586271..bd74f1cf0fc 100644 --- a/service/emr/api_op_CreateStudioSessionMapping.go +++ b/service/emr/api_op_CreateStudioSessionMapping.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateStudioSessionMappingMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStudioSessionMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_DeleteSecurityConfiguration.go b/service/emr/api_op_DeleteSecurityConfiguration.go index da7d575c568..7519031098a 100644 --- a/service/emr/api_op_DeleteSecurityConfiguration.go +++ b/service/emr/api_op_DeleteSecurityConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSecurityConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_DeleteStudio.go b/service/emr/api_op_DeleteStudio.go index a5511ee88cf..6980980dfb8 100644 --- a/service/emr/api_op_DeleteStudio.go +++ b/service/emr/api_op_DeleteStudio.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteStudioMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStudioValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_DeleteStudioSessionMapping.go b/service/emr/api_op_DeleteStudioSessionMapping.go index b77bce732a9..0f6ce8eff6f 100644 --- a/service/emr/api_op_DeleteStudioSessionMapping.go +++ b/service/emr/api_op_DeleteStudioSessionMapping.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteStudioSessionMappingMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStudioSessionMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_DescribeCluster.go b/service/emr/api_op_DescribeCluster.go index b8204404438..77312a7e422 100644 --- a/service/emr/api_op_DescribeCluster.go +++ b/service/emr/api_op_DescribeCluster.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterValidationMiddleware(stack); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, return nil } -// DescribeClusterAPIClient is a client that implements the DescribeCluster -// operation. -type DescribeClusterAPIClient interface { - DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error) -} - -var _ DescribeClusterAPIClient = (*Client)(nil) - // ClusterRunningWaiterOptions are waiter options for ClusterRunningWaiter type ClusterRunningWaiterOptions struct { @@ -260,7 +255,13 @@ func (w *ClusterRunningWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeCluster(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -501,7 +502,13 @@ func (w *ClusterTerminatedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeCluster(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -576,6 +583,14 @@ func clusterTerminatedStateRetryable(ctx context.Context, input *DescribeCluster return true, nil } +// DescribeClusterAPIClient is a client that implements the DescribeCluster +// operation. +type DescribeClusterAPIClient interface { + DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error) +} + +var _ DescribeClusterAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_DescribeJobFlows.go b/service/emr/api_op_DescribeJobFlows.go index d8f4a73f199..87d630a7116 100644 --- a/service/emr/api_op_DescribeJobFlows.go +++ b/service/emr/api_op_DescribeJobFlows.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeJobFlowsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJobFlows(options.Region), middleware.Before); err != nil { return err } diff --git a/service/emr/api_op_DescribeNotebookExecution.go b/service/emr/api_op_DescribeNotebookExecution.go index 84c42c2047c..4a6562f9d92 100644 --- a/service/emr/api_op_DescribeNotebookExecution.go +++ b/service/emr/api_op_DescribeNotebookExecution.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeNotebookExecutionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNotebookExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_DescribeReleaseLabel.go b/service/emr/api_op_DescribeReleaseLabel.go index b3ccb2326e1..1a7fcb7f2f4 100644 --- a/service/emr/api_op_DescribeReleaseLabel.go +++ b/service/emr/api_op_DescribeReleaseLabel.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeReleaseLabelMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReleaseLabel(options.Region), middleware.Before); err != nil { return err } diff --git a/service/emr/api_op_DescribeSecurityConfiguration.go b/service/emr/api_op_DescribeSecurityConfiguration.go index 92174723116..c5251e7a269 100644 --- a/service/emr/api_op_DescribeSecurityConfiguration.go +++ b/service/emr/api_op_DescribeSecurityConfiguration.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeSecurityConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_DescribeStep.go b/service/emr/api_op_DescribeStep.go index 094ca48ccc8..322d54812bf 100644 --- a/service/emr/api_op_DescribeStep.go +++ b/service/emr/api_op_DescribeStep.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeStepMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStepValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationDescribeStepMiddlewares(stack *middleware.Stack, op return nil } -// DescribeStepAPIClient is a client that implements the DescribeStep operation. -type DescribeStepAPIClient interface { - DescribeStep(context.Context, *DescribeStepInput, ...func(*Options)) (*DescribeStepOutput, error) -} - -var _ DescribeStepAPIClient = (*Client)(nil) - // StepCompleteWaiterOptions are waiter options for StepCompleteWaiter type StepCompleteWaiterOptions struct { @@ -262,7 +258,13 @@ func (w *StepCompleteWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeStep(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -354,6 +356,13 @@ func stepCompleteStateRetryable(ctx context.Context, input *DescribeStepInput, o return true, nil } +// DescribeStepAPIClient is a client that implements the DescribeStep operation. +type DescribeStepAPIClient interface { + DescribeStep(context.Context, *DescribeStepInput, ...func(*Options)) (*DescribeStepOutput, error) +} + +var _ DescribeStepAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStep(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_DescribeStudio.go b/service/emr/api_op_DescribeStudio.go index 263bea6ff06..fa7661574a9 100644 --- a/service/emr/api_op_DescribeStudio.go +++ b/service/emr/api_op_DescribeStudio.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeStudioMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStudioValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_GetAutoTerminationPolicy.go b/service/emr/api_op_GetAutoTerminationPolicy.go index 853779ce704..111f8476d33 100644 --- a/service/emr/api_op_GetAutoTerminationPolicy.go +++ b/service/emr/api_op_GetAutoTerminationPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetAutoTerminationPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAutoTerminationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_GetBlockPublicAccessConfiguration.go b/service/emr/api_op_GetBlockPublicAccessConfiguration.go index 6d9edb4f62d..955ed25d753 100644 --- a/service/emr/api_op_GetBlockPublicAccessConfiguration.go +++ b/service/emr/api_op_GetBlockPublicAccessConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetBlockPublicAccessConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBlockPublicAccessConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/emr/api_op_GetClusterSessionCredentials.go b/service/emr/api_op_GetClusterSessionCredentials.go index 718f668d752..8e897a4a144 100644 --- a/service/emr/api_op_GetClusterSessionCredentials.go +++ b/service/emr/api_op_GetClusterSessionCredentials.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetClusterSessionCredentialsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClusterSessionCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_GetManagedScalingPolicy.go b/service/emr/api_op_GetManagedScalingPolicy.go index 069ed269ff8..8219bb89318 100644 --- a/service/emr/api_op_GetManagedScalingPolicy.go +++ b/service/emr/api_op_GetManagedScalingPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetManagedScalingPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetManagedScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_GetStudioSessionMapping.go b/service/emr/api_op_GetStudioSessionMapping.go index 0bf4dc5681c..ffe36f50bf4 100644 --- a/service/emr/api_op_GetStudioSessionMapping.go +++ b/service/emr/api_op_GetStudioSessionMapping.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetStudioSessionMappingMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStudioSessionMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_ListBootstrapActions.go b/service/emr/api_op_ListBootstrapActions.go index a6b6832062a..40969821deb 100644 --- a/service/emr/api_op_ListBootstrapActions.go +++ b/service/emr/api_op_ListBootstrapActions.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListBootstrapActionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBootstrapActionsValidationMiddleware(stack); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListBootstrapActionsMiddlewares(stack *middleware.S return nil } -// ListBootstrapActionsAPIClient is a client that implements the -// ListBootstrapActions operation. -type ListBootstrapActionsAPIClient interface { - ListBootstrapActions(context.Context, *ListBootstrapActionsInput, ...func(*Options)) (*ListBootstrapActionsOutput, error) -} - -var _ ListBootstrapActionsAPIClient = (*Client)(nil) - // ListBootstrapActionsPaginatorOptions is the paginator options for // ListBootstrapActions type ListBootstrapActionsPaginatorOptions struct { @@ -198,6 +193,9 @@ func (p *ListBootstrapActionsPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBootstrapActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -217,6 +215,14 @@ func (p *ListBootstrapActionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListBootstrapActionsAPIClient is a client that implements the +// ListBootstrapActions operation. +type ListBootstrapActionsAPIClient interface { + ListBootstrapActions(context.Context, *ListBootstrapActionsInput, ...func(*Options)) (*ListBootstrapActionsOutput, error) +} + +var _ ListBootstrapActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBootstrapActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListClusters.go b/service/emr/api_op_ListClusters.go index 502f9e526dd..b07f0dfc36d 100644 --- a/service/emr/api_op_ListClusters.go +++ b/service/emr/api_op_ListClusters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -207,6 +203,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListInstanceFleets.go b/service/emr/api_op_ListInstanceFleets.go index d60230a3e05..72ef4d53c92 100644 --- a/service/emr/api_op_ListInstanceFleets.go +++ b/service/emr/api_op_ListInstanceFleets.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListInstanceFleetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceFleetsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListInstanceFleetsMiddlewares(stack *middleware.Sta return nil } -// ListInstanceFleetsAPIClient is a client that implements the ListInstanceFleets -// operation. -type ListInstanceFleetsAPIClient interface { - ListInstanceFleets(context.Context, *ListInstanceFleetsInput, ...func(*Options)) (*ListInstanceFleetsOutput, error) -} - -var _ ListInstanceFleetsAPIClient = (*Client)(nil) - // ListInstanceFleetsPaginatorOptions is the paginator options for // ListInstanceFleets type ListInstanceFleetsPaginatorOptions struct { @@ -199,6 +194,9 @@ func (p *ListInstanceFleetsPaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +216,14 @@ func (p *ListInstanceFleetsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListInstanceFleetsAPIClient is a client that implements the ListInstanceFleets +// operation. +type ListInstanceFleetsAPIClient interface { + ListInstanceFleets(context.Context, *ListInstanceFleetsInput, ...func(*Options)) (*ListInstanceFleetsOutput, error) +} + +var _ ListInstanceFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListInstanceGroups.go b/service/emr/api_op_ListInstanceGroups.go index 88929014702..eafe42098a5 100644 --- a/service/emr/api_op_ListInstanceGroups.go +++ b/service/emr/api_op_ListInstanceGroups.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListInstanceGroupsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceGroupsValidationMiddleware(stack); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListInstanceGroupsMiddlewares(stack *middleware.Sta return nil } -// ListInstanceGroupsAPIClient is a client that implements the ListInstanceGroups -// operation. -type ListInstanceGroupsAPIClient interface { - ListInstanceGroups(context.Context, *ListInstanceGroupsInput, ...func(*Options)) (*ListInstanceGroupsOutput, error) -} - -var _ ListInstanceGroupsAPIClient = (*Client)(nil) - // ListInstanceGroupsPaginatorOptions is the paginator options for // ListInstanceGroups type ListInstanceGroupsPaginatorOptions struct { @@ -198,6 +193,9 @@ func (p *ListInstanceGroupsPaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -217,6 +215,14 @@ func (p *ListInstanceGroupsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListInstanceGroupsAPIClient is a client that implements the ListInstanceGroups +// operation. +type ListInstanceGroupsAPIClient interface { + ListInstanceGroups(context.Context, *ListInstanceGroupsInput, ...func(*Options)) (*ListInstanceGroupsOutput, error) +} + +var _ ListInstanceGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListInstances.go b/service/emr/api_op_ListInstances.go index a3f3e0792bd..541c2eb2fad 100644 --- a/service/emr/api_op_ListInstances.go +++ b/service/emr/api_op_ListInstances.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstancesValidationMiddleware(stack); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o return nil } -// ListInstancesAPIClient is a client that implements the ListInstances operation. -type ListInstancesAPIClient interface { - ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) -} - -var _ ListInstancesAPIClient = (*Client)(nil) - // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -215,6 +211,9 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListInstancesAPIClient is a client that implements the ListInstances operation. +type ListInstancesAPIClient interface { + ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) +} + +var _ ListInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListNotebookExecutions.go b/service/emr/api_op_ListNotebookExecutions.go index e106bacab60..8fc9bc25983 100644 --- a/service/emr/api_op_ListNotebookExecutions.go +++ b/service/emr/api_op_ListNotebookExecutions.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListNotebookExecutionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNotebookExecutions(options.Region), middleware.Before); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationListNotebookExecutionsMiddlewares(stack *middleware return nil } -// ListNotebookExecutionsAPIClient is a client that implements the -// ListNotebookExecutions operation. -type ListNotebookExecutionsAPIClient interface { - ListNotebookExecutions(context.Context, *ListNotebookExecutionsInput, ...func(*Options)) (*ListNotebookExecutionsOutput, error) -} - -var _ ListNotebookExecutionsAPIClient = (*Client)(nil) - // ListNotebookExecutionsPaginatorOptions is the paginator options for // ListNotebookExecutions type ListNotebookExecutionsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListNotebookExecutionsPaginator) NextPage(ctx context.Context, optFns . params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotebookExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListNotebookExecutionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListNotebookExecutionsAPIClient is a client that implements the +// ListNotebookExecutions operation. +type ListNotebookExecutionsAPIClient interface { + ListNotebookExecutions(context.Context, *ListNotebookExecutionsInput, ...func(*Options)) (*ListNotebookExecutionsOutput, error) +} + +var _ ListNotebookExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotebookExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListReleaseLabels.go b/service/emr/api_op_ListReleaseLabels.go index c4dd24e739f..4d9baf97564 100644 --- a/service/emr/api_op_ListReleaseLabels.go +++ b/service/emr/api_op_ListReleaseLabels.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListReleaseLabelsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReleaseLabels(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListReleaseLabelsMiddlewares(stack *middleware.Stac return nil } -// ListReleaseLabelsAPIClient is a client that implements the ListReleaseLabels -// operation. -type ListReleaseLabelsAPIClient interface { - ListReleaseLabels(context.Context, *ListReleaseLabelsInput, ...func(*Options)) (*ListReleaseLabelsOutput, error) -} - -var _ ListReleaseLabelsAPIClient = (*Client)(nil) - // ListReleaseLabelsPaginatorOptions is the paginator options for ListReleaseLabels type ListReleaseLabelsPaginatorOptions struct { // Defines the maximum number of release labels to return in a single response. @@ -216,6 +211,9 @@ func (p *ListReleaseLabelsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReleaseLabels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListReleaseLabelsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListReleaseLabelsAPIClient is a client that implements the ListReleaseLabels +// operation. +type ListReleaseLabelsAPIClient interface { + ListReleaseLabels(context.Context, *ListReleaseLabelsInput, ...func(*Options)) (*ListReleaseLabelsOutput, error) +} + +var _ ListReleaseLabelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReleaseLabels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListSecurityConfigurations.go b/service/emr/api_op_ListSecurityConfigurations.go index c4e7f57e312..5e2ad4c6f16 100644 --- a/service/emr/api_op_ListSecurityConfigurations.go +++ b/service/emr/api_op_ListSecurityConfigurations.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListSecurityConfigurationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListSecurityConfigurationsMiddlewares(stack *middle return nil } -// ListSecurityConfigurationsAPIClient is a client that implements the -// ListSecurityConfigurations operation. -type ListSecurityConfigurationsAPIClient interface { - ListSecurityConfigurations(context.Context, *ListSecurityConfigurationsInput, ...func(*Options)) (*ListSecurityConfigurationsOutput, error) -} - -var _ ListSecurityConfigurationsAPIClient = (*Client)(nil) - // ListSecurityConfigurationsPaginatorOptions is the paginator options for // ListSecurityConfigurations type ListSecurityConfigurationsPaginatorOptions struct { @@ -195,6 +190,9 @@ func (p *ListSecurityConfigurationsPaginator) NextPage(ctx context.Context, optF params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +212,14 @@ func (p *ListSecurityConfigurationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSecurityConfigurationsAPIClient is a client that implements the +// ListSecurityConfigurations operation. +type ListSecurityConfigurationsAPIClient interface { + ListSecurityConfigurations(context.Context, *ListSecurityConfigurationsInput, ...func(*Options)) (*ListSecurityConfigurationsOutput, error) +} + +var _ ListSecurityConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListSteps.go b/service/emr/api_op_ListSteps.go index b6c130fed59..dd4314cbecb 100644 --- a/service/emr/api_op_ListSteps.go +++ b/service/emr/api_op_ListSteps.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListStepsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStepsValidationMiddleware(stack); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListStepsMiddlewares(stack *middleware.Stack, optio return nil } -// ListStepsAPIClient is a client that implements the ListSteps operation. -type ListStepsAPIClient interface { - ListSteps(context.Context, *ListStepsInput, ...func(*Options)) (*ListStepsOutput, error) -} - -var _ ListStepsAPIClient = (*Client)(nil) - // ListStepsPaginatorOptions is the paginator options for ListSteps type ListStepsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -215,6 +211,9 @@ func (p *ListStepsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListStepsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListStepsAPIClient is a client that implements the ListSteps operation. +type ListStepsAPIClient interface { + ListSteps(context.Context, *ListStepsInput, ...func(*Options)) (*ListStepsOutput, error) +} + +var _ ListStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListStudioSessionMappings.go b/service/emr/api_op_ListStudioSessionMappings.go index 74eb8ab4e39..5d43b7453b8 100644 --- a/service/emr/api_op_ListStudioSessionMappings.go +++ b/service/emr/api_op_ListStudioSessionMappings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListStudioSessionMappingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudioSessionMappings(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListStudioSessionMappingsMiddlewares(stack *middlew return nil } -// ListStudioSessionMappingsAPIClient is a client that implements the -// ListStudioSessionMappings operation. -type ListStudioSessionMappingsAPIClient interface { - ListStudioSessionMappings(context.Context, *ListStudioSessionMappingsInput, ...func(*Options)) (*ListStudioSessionMappingsOutput, error) -} - -var _ ListStudioSessionMappingsAPIClient = (*Client)(nil) - // ListStudioSessionMappingsPaginatorOptions is the paginator options for // ListStudioSessionMappings type ListStudioSessionMappingsPaginatorOptions struct { @@ -200,6 +195,9 @@ func (p *ListStudioSessionMappingsPaginator) NextPage(ctx context.Context, optFn params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStudioSessionMappings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *ListStudioSessionMappingsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListStudioSessionMappingsAPIClient is a client that implements the +// ListStudioSessionMappings operation. +type ListStudioSessionMappingsAPIClient interface { + ListStudioSessionMappings(context.Context, *ListStudioSessionMappingsInput, ...func(*Options)) (*ListStudioSessionMappingsOutput, error) +} + +var _ ListStudioSessionMappingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStudioSessionMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListStudios.go b/service/emr/api_op_ListStudios.go index 2a0d1658f4d..85c41bcd06d 100644 --- a/service/emr/api_op_ListStudios.go +++ b/service/emr/api_op_ListStudios.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListStudiosMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudios(options.Region), middleware.Before); err != nil { return err } @@ -130,13 +133,6 @@ func (c *Client) addOperationListStudiosMiddlewares(stack *middleware.Stack, opt return nil } -// ListStudiosAPIClient is a client that implements the ListStudios operation. -type ListStudiosAPIClient interface { - ListStudios(context.Context, *ListStudiosInput, ...func(*Options)) (*ListStudiosOutput, error) -} - -var _ ListStudiosAPIClient = (*Client)(nil) - // ListStudiosPaginatorOptions is the paginator options for ListStudios type ListStudiosPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -188,6 +184,9 @@ func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStudios(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -207,6 +206,13 @@ func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListStudiosAPIClient is a client that implements the ListStudios operation. +type ListStudiosAPIClient interface { + ListStudios(context.Context, *ListStudiosInput, ...func(*Options)) (*ListStudiosOutput, error) +} + +var _ ListStudiosAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStudios(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ListSupportedInstanceTypes.go b/service/emr/api_op_ListSupportedInstanceTypes.go index aee1139cc1a..c38a2f2c99c 100644 --- a/service/emr/api_op_ListSupportedInstanceTypes.go +++ b/service/emr/api_op_ListSupportedInstanceTypes.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSupportedInstanceTypesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSupportedInstanceTypesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListSupportedInstanceTypesMiddlewares(stack *middle return nil } -// ListSupportedInstanceTypesAPIClient is a client that implements the -// ListSupportedInstanceTypes operation. -type ListSupportedInstanceTypesAPIClient interface { - ListSupportedInstanceTypes(context.Context, *ListSupportedInstanceTypesInput, ...func(*Options)) (*ListSupportedInstanceTypesOutput, error) -} - -var _ ListSupportedInstanceTypesAPIClient = (*Client)(nil) - // ListSupportedInstanceTypesPaginatorOptions is the paginator options for // ListSupportedInstanceTypes type ListSupportedInstanceTypesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListSupportedInstanceTypesPaginator) NextPage(ctx context.Context, optF params := *p.params params.Marker = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSupportedInstanceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListSupportedInstanceTypesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSupportedInstanceTypesAPIClient is a client that implements the +// ListSupportedInstanceTypes operation. +type ListSupportedInstanceTypesAPIClient interface { + ListSupportedInstanceTypes(context.Context, *ListSupportedInstanceTypesInput, ...func(*Options)) (*ListSupportedInstanceTypesOutput, error) +} + +var _ ListSupportedInstanceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSupportedInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emr/api_op_ModifyCluster.go b/service/emr/api_op_ModifyCluster.go index 51f87eda721..4c106b25285 100644 --- a/service/emr/api_op_ModifyCluster.go +++ b/service/emr/api_op_ModifyCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationModifyClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_ModifyInstanceFleet.go b/service/emr/api_op_ModifyInstanceFleet.go index d8e95e03311..c5eee07e74a 100644 --- a/service/emr/api_op_ModifyInstanceFleet.go +++ b/service/emr/api_op_ModifyInstanceFleet.go @@ -112,6 +112,9 @@ func (c *Client) addOperationModifyInstanceFleetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_ModifyInstanceGroups.go b/service/emr/api_op_ModifyInstanceGroups.go index ed57974acad..3e204dc8776 100644 --- a/service/emr/api_op_ModifyInstanceGroups.go +++ b/service/emr/api_op_ModifyInstanceGroups.go @@ -107,6 +107,9 @@ func (c *Client) addOperationModifyInstanceGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyInstanceGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_PutAutoScalingPolicy.go b/service/emr/api_op_PutAutoScalingPolicy.go index 6d42eecb7f2..0259ab8a0aa 100644 --- a/service/emr/api_op_PutAutoScalingPolicy.go +++ b/service/emr/api_op_PutAutoScalingPolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPutAutoScalingPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAutoScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_PutAutoTerminationPolicy.go b/service/emr/api_op_PutAutoTerminationPolicy.go index 61518d9fb2b..9beed9f239b 100644 --- a/service/emr/api_op_PutAutoTerminationPolicy.go +++ b/service/emr/api_op_PutAutoTerminationPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationPutAutoTerminationPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAutoTerminationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_PutBlockPublicAccessConfiguration.go b/service/emr/api_op_PutBlockPublicAccessConfiguration.go index 0fd7f5ad9fb..a45b99a7bc5 100644 --- a/service/emr/api_op_PutBlockPublicAccessConfiguration.go +++ b/service/emr/api_op_PutBlockPublicAccessConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutBlockPublicAccessConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBlockPublicAccessConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_PutManagedScalingPolicy.go b/service/emr/api_op_PutManagedScalingPolicy.go index e5bc620ae00..1bd7f9a3c88 100644 --- a/service/emr/api_op_PutManagedScalingPolicy.go +++ b/service/emr/api_op_PutManagedScalingPolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutManagedScalingPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutManagedScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_RemoveAutoScalingPolicy.go b/service/emr/api_op_RemoveAutoScalingPolicy.go index 4561867a001..3221209d2f4 100644 --- a/service/emr/api_op_RemoveAutoScalingPolicy.go +++ b/service/emr/api_op_RemoveAutoScalingPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRemoveAutoScalingPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAutoScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_RemoveAutoTerminationPolicy.go b/service/emr/api_op_RemoveAutoTerminationPolicy.go index 1cc446d2d8c..bb35ee7a344 100644 --- a/service/emr/api_op_RemoveAutoTerminationPolicy.go +++ b/service/emr/api_op_RemoveAutoTerminationPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationRemoveAutoTerminationPolicyMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAutoTerminationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_RemoveManagedScalingPolicy.go b/service/emr/api_op_RemoveManagedScalingPolicy.go index 18052ecc1a7..767af88a7e8 100644 --- a/service/emr/api_op_RemoveManagedScalingPolicy.go +++ b/service/emr/api_op_RemoveManagedScalingPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationRemoveManagedScalingPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveManagedScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_RemoveTags.go b/service/emr/api_op_RemoveTags.go index 7f403756ef3..9fe69ac8d89 100644 --- a/service/emr/api_op_RemoveTags.go +++ b/service/emr/api_op_RemoveTags.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_RunJobFlow.go b/service/emr/api_op_RunJobFlow.go index 7e4a138620f..51a1a4cdbec 100644 --- a/service/emr/api_op_RunJobFlow.go +++ b/service/emr/api_op_RunJobFlow.go @@ -348,6 +348,9 @@ func (c *Client) addOperationRunJobFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRunJobFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_SetKeepJobFlowAliveWhenNoSteps.go b/service/emr/api_op_SetKeepJobFlowAliveWhenNoSteps.go index 50260c17d55..b13fb61a48a 100644 --- a/service/emr/api_op_SetKeepJobFlowAliveWhenNoSteps.go +++ b/service/emr/api_op_SetKeepJobFlowAliveWhenNoSteps.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSetKeepJobFlowAliveWhenNoStepsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetKeepJobFlowAliveWhenNoStepsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_SetTerminationProtection.go b/service/emr/api_op_SetTerminationProtection.go index c20733280ca..9f4c066bb9f 100644 --- a/service/emr/api_op_SetTerminationProtection.go +++ b/service/emr/api_op_SetTerminationProtection.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSetTerminationProtectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTerminationProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_SetUnhealthyNodeReplacement.go b/service/emr/api_op_SetUnhealthyNodeReplacement.go index 82a3922f459..d0719019d44 100644 --- a/service/emr/api_op_SetUnhealthyNodeReplacement.go +++ b/service/emr/api_op_SetUnhealthyNodeReplacement.go @@ -123,6 +123,9 @@ func (c *Client) addOperationSetUnhealthyNodeReplacementMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetUnhealthyNodeReplacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_SetVisibleToAllUsers.go b/service/emr/api_op_SetVisibleToAllUsers.go index d2bc5f7e8bf..26b58803de7 100644 --- a/service/emr/api_op_SetVisibleToAllUsers.go +++ b/service/emr/api_op_SetVisibleToAllUsers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSetVisibleToAllUsersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetVisibleToAllUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_StartNotebookExecution.go b/service/emr/api_op_StartNotebookExecution.go index d1f2a1be0e5..efd2714f0d3 100644 --- a/service/emr/api_op_StartNotebookExecution.go +++ b/service/emr/api_op_StartNotebookExecution.go @@ -154,6 +154,9 @@ func (c *Client) addOperationStartNotebookExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartNotebookExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_StopNotebookExecution.go b/service/emr/api_op_StopNotebookExecution.go index 46832da94fe..ee8caa20060 100644 --- a/service/emr/api_op_StopNotebookExecution.go +++ b/service/emr/api_op_StopNotebookExecution.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopNotebookExecutionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopNotebookExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_TerminateJobFlows.go b/service/emr/api_op_TerminateJobFlows.go index 8a7872ae0ab..caf445b948b 100644 --- a/service/emr/api_op_TerminateJobFlows.go +++ b/service/emr/api_op_TerminateJobFlows.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTerminateJobFlowsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateJobFlowsValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_UpdateStudio.go b/service/emr/api_op_UpdateStudio.go index 4f747bfbbf3..92f3fb28ff3 100644 --- a/service/emr/api_op_UpdateStudio.go +++ b/service/emr/api_op_UpdateStudio.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateStudioMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStudioValidationMiddleware(stack); err != nil { return err } diff --git a/service/emr/api_op_UpdateStudioSessionMapping.go b/service/emr/api_op_UpdateStudioSessionMapping.go index 1a052ce8b36..08172ab51b7 100644 --- a/service/emr/api_op_UpdateStudioSessionMapping.go +++ b/service/emr/api_op_UpdateStudioSessionMapping.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateStudioSessionMappingMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStudioSessionMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_client.go b/service/emrcontainers/api_client.go index a4da45116f6..1dcbe9b6a5b 100644 --- a/service/emrcontainers/api_client.go +++ b/service/emrcontainers/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/emrcontainers/api_op_CancelJobRun.go b/service/emrcontainers/api_op_CancelJobRun.go index 3f5213478b6..227bfa7bc34 100644 --- a/service/emrcontainers/api_op_CancelJobRun.go +++ b/service/emrcontainers/api_op_CancelJobRun.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelJobRunMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_CreateJobTemplate.go b/service/emrcontainers/api_op_CreateJobTemplate.go index 120ae9a9387..48546c08150 100644 --- a/service/emrcontainers/api_op_CreateJobTemplate.go +++ b/service/emrcontainers/api_op_CreateJobTemplate.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateJobTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/emrcontainers/api_op_CreateManagedEndpoint.go b/service/emrcontainers/api_op_CreateManagedEndpoint.go index 2ca4aa1b6a7..6520b2378ca 100644 --- a/service/emrcontainers/api_op_CreateManagedEndpoint.go +++ b/service/emrcontainers/api_op_CreateManagedEndpoint.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateManagedEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateManagedEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/emrcontainers/api_op_CreateSecurityConfiguration.go b/service/emrcontainers/api_op_CreateSecurityConfiguration.go index 4aedeca2e06..fa3402fd2d3 100644 --- a/service/emrcontainers/api_op_CreateSecurityConfiguration.go +++ b/service/emrcontainers/api_op_CreateSecurityConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateSecurityConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSecurityConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/emrcontainers/api_op_CreateVirtualCluster.go b/service/emrcontainers/api_op_CreateVirtualCluster.go index d46d1e7f881..00fe30e3a24 100644 --- a/service/emrcontainers/api_op_CreateVirtualCluster.go +++ b/service/emrcontainers/api_op_CreateVirtualCluster.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateVirtualClusterMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVirtualClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/emrcontainers/api_op_DeleteJobTemplate.go b/service/emrcontainers/api_op_DeleteJobTemplate.go index 94142a4b85d..0f0508e04d6 100644 --- a/service/emrcontainers/api_op_DeleteJobTemplate.go +++ b/service/emrcontainers/api_op_DeleteJobTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DeleteManagedEndpoint.go b/service/emrcontainers/api_op_DeleteManagedEndpoint.go index 2ee086e32b3..c3b2dbe8f22 100644 --- a/service/emrcontainers/api_op_DeleteManagedEndpoint.go +++ b/service/emrcontainers/api_op_DeleteManagedEndpoint.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteManagedEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteManagedEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DeleteVirtualCluster.go b/service/emrcontainers/api_op_DeleteVirtualCluster.go index 115b18adf65..6c214b167e4 100644 --- a/service/emrcontainers/api_op_DeleteVirtualCluster.go +++ b/service/emrcontainers/api_op_DeleteVirtualCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteVirtualClusterMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DescribeJobRun.go b/service/emrcontainers/api_op_DescribeJobRun.go index c4a128c8210..df64c136f9c 100644 --- a/service/emrcontainers/api_op_DescribeJobRun.go +++ b/service/emrcontainers/api_op_DescribeJobRun.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeJobRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DescribeJobTemplate.go b/service/emrcontainers/api_op_DescribeJobTemplate.go index 549582f2c6b..26b2bad53d8 100644 --- a/service/emrcontainers/api_op_DescribeJobTemplate.go +++ b/service/emrcontainers/api_op_DescribeJobTemplate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeJobTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DescribeManagedEndpoint.go b/service/emrcontainers/api_op_DescribeManagedEndpoint.go index edaacb29dac..ae37e24886e 100644 --- a/service/emrcontainers/api_op_DescribeManagedEndpoint.go +++ b/service/emrcontainers/api_op_DescribeManagedEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeManagedEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeManagedEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DescribeSecurityConfiguration.go b/service/emrcontainers/api_op_DescribeSecurityConfiguration.go index aa5d24e5f2f..ad32c07c0a7 100644 --- a/service/emrcontainers/api_op_DescribeSecurityConfiguration.go +++ b/service/emrcontainers/api_op_DescribeSecurityConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeSecurityConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_DescribeVirtualCluster.go b/service/emrcontainers/api_op_DescribeVirtualCluster.go index 2c851618f84..f8a8ddcd09a 100644 --- a/service/emrcontainers/api_op_DescribeVirtualCluster.go +++ b/service/emrcontainers/api_op_DescribeVirtualCluster.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeVirtualClusterMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVirtualClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_GetManagedEndpointSessionCredentials.go b/service/emrcontainers/api_op_GetManagedEndpointSessionCredentials.go index 6ca31a62d03..819186334ef 100644 --- a/service/emrcontainers/api_op_GetManagedEndpointSessionCredentials.go +++ b/service/emrcontainers/api_op_GetManagedEndpointSessionCredentials.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetManagedEndpointSessionCredentialsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opGetManagedEndpointSessionCredentialsMiddleware(stack, options); err != nil { return err } diff --git a/service/emrcontainers/api_op_ListJobRuns.go b/service/emrcontainers/api_op_ListJobRuns.go index b8012086731..40394c12559 100644 --- a/service/emrcontainers/api_op_ListJobRuns.go +++ b/service/emrcontainers/api_op_ListJobRuns.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListJobRunsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobRunsValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListJobRunsMiddlewares(stack *middleware.Stack, opt return nil } -// ListJobRunsAPIClient is a client that implements the ListJobRuns operation. -type ListJobRunsAPIClient interface { - ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error) -} - -var _ ListJobRunsAPIClient = (*Client)(nil) - // ListJobRunsPaginatorOptions is the paginator options for ListJobRuns type ListJobRunsPaginatorOptions struct { // The maximum number of job runs that can be listed. @@ -224,6 +220,9 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListJobRunsAPIClient is a client that implements the ListJobRuns operation. +type ListJobRunsAPIClient interface { + ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error) +} + +var _ ListJobRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrcontainers/api_op_ListJobTemplates.go b/service/emrcontainers/api_op_ListJobTemplates.go index e90abf4afe4..e334e9b1e5f 100644 --- a/service/emrcontainers/api_op_ListJobTemplates.go +++ b/service/emrcontainers/api_op_ListJobTemplates.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListJobTemplatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobTemplates(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListJobTemplatesMiddlewares(stack *middleware.Stack return nil } -// ListJobTemplatesAPIClient is a client that implements the ListJobTemplates -// operation. -type ListJobTemplatesAPIClient interface { - ListJobTemplates(context.Context, *ListJobTemplatesInput, ...func(*Options)) (*ListJobTemplatesOutput, error) -} - -var _ ListJobTemplatesAPIClient = (*Client)(nil) - // ListJobTemplatesPaginatorOptions is the paginator options for ListJobTemplates type ListJobTemplatesPaginatorOptions struct { // The maximum number of job templates that can be listed. @@ -212,6 +207,9 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListJobTemplatesAPIClient is a client that implements the ListJobTemplates +// operation. +type ListJobTemplatesAPIClient interface { + ListJobTemplates(context.Context, *ListJobTemplatesInput, ...func(*Options)) (*ListJobTemplatesOutput, error) +} + +var _ ListJobTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrcontainers/api_op_ListManagedEndpoints.go b/service/emrcontainers/api_op_ListManagedEndpoints.go index 391245abcda..abcf22eefc8 100644 --- a/service/emrcontainers/api_op_ListManagedEndpoints.go +++ b/service/emrcontainers/api_op_ListManagedEndpoints.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListManagedEndpointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListManagedEndpointsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListManagedEndpointsMiddlewares(stack *middleware.S return nil } -// ListManagedEndpointsAPIClient is a client that implements the -// ListManagedEndpoints operation. -type ListManagedEndpointsAPIClient interface { - ListManagedEndpoints(context.Context, *ListManagedEndpointsInput, ...func(*Options)) (*ListManagedEndpointsOutput, error) -} - -var _ ListManagedEndpointsAPIClient = (*Client)(nil) - // ListManagedEndpointsPaginatorOptions is the paginator options for // ListManagedEndpoints type ListManagedEndpointsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListManagedEndpointsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListManagedEndpointsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListManagedEndpointsAPIClient is a client that implements the +// ListManagedEndpoints operation. +type ListManagedEndpointsAPIClient interface { + ListManagedEndpoints(context.Context, *ListManagedEndpointsInput, ...func(*Options)) (*ListManagedEndpointsOutput, error) +} + +var _ ListManagedEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrcontainers/api_op_ListSecurityConfigurations.go b/service/emrcontainers/api_op_ListSecurityConfigurations.go index 0b517873172..9496ce93a86 100644 --- a/service/emrcontainers/api_op_ListSecurityConfigurations.go +++ b/service/emrcontainers/api_op_ListSecurityConfigurations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSecurityConfigurationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListSecurityConfigurationsMiddlewares(stack *middle return nil } -// ListSecurityConfigurationsAPIClient is a client that implements the -// ListSecurityConfigurations operation. -type ListSecurityConfigurationsAPIClient interface { - ListSecurityConfigurations(context.Context, *ListSecurityConfigurationsInput, ...func(*Options)) (*ListSecurityConfigurationsOutput, error) -} - -var _ ListSecurityConfigurationsAPIClient = (*Client)(nil) - // ListSecurityConfigurationsPaginatorOptions is the paginator options for // ListSecurityConfigurations type ListSecurityConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListSecurityConfigurationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSecurityConfigurationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSecurityConfigurationsAPIClient is a client that implements the +// ListSecurityConfigurations operation. +type ListSecurityConfigurationsAPIClient interface { + ListSecurityConfigurations(context.Context, *ListSecurityConfigurationsInput, ...func(*Options)) (*ListSecurityConfigurationsOutput, error) +} + +var _ ListSecurityConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrcontainers/api_op_ListTagsForResource.go b/service/emrcontainers/api_op_ListTagsForResource.go index 8fa13568fef..096ab4852ee 100644 --- a/service/emrcontainers/api_op_ListTagsForResource.go +++ b/service/emrcontainers/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_ListVirtualClusters.go b/service/emrcontainers/api_op_ListVirtualClusters.go index 7d4c5bbae73..019ee5ae942 100644 --- a/service/emrcontainers/api_op_ListVirtualClusters.go +++ b/service/emrcontainers/api_op_ListVirtualClusters.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListVirtualClustersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualClusters(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListVirtualClustersMiddlewares(stack *middleware.St return nil } -// ListVirtualClustersAPIClient is a client that implements the -// ListVirtualClusters operation. -type ListVirtualClustersAPIClient interface { - ListVirtualClusters(context.Context, *ListVirtualClustersInput, ...func(*Options)) (*ListVirtualClustersOutput, error) -} - -var _ ListVirtualClustersAPIClient = (*Client)(nil) - // ListVirtualClustersPaginatorOptions is the paginator options for // ListVirtualClusters type ListVirtualClustersPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListVirtualClustersPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListVirtualClustersPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVirtualClustersAPIClient is a client that implements the +// ListVirtualClusters operation. +type ListVirtualClustersAPIClient interface { + ListVirtualClusters(context.Context, *ListVirtualClustersInput, ...func(*Options)) (*ListVirtualClustersOutput, error) +} + +var _ ListVirtualClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrcontainers/api_op_StartJobRun.go b/service/emrcontainers/api_op_StartJobRun.go index 43608ed17e7..4c9eb264fcf 100644 --- a/service/emrcontainers/api_op_StartJobRun.go +++ b/service/emrcontainers/api_op_StartJobRun.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStartJobRunMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartJobRunMiddleware(stack, options); err != nil { return err } diff --git a/service/emrcontainers/api_op_TagResource.go b/service/emrcontainers/api_op_TagResource.go index bd3d725e863..09888923b5a 100644 --- a/service/emrcontainers/api_op_TagResource.go +++ b/service/emrcontainers/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrcontainers/api_op_UntagResource.go b/service/emrcontainers/api_op_UntagResource.go index 839b6ab1a9a..cf1e497b684 100644 --- a/service/emrcontainers/api_op_UntagResource.go +++ b/service/emrcontainers/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_client.go b/service/emrserverless/api_client.go index 186fa8640f2..cee7b0fda38 100644 --- a/service/emrserverless/api_client.go +++ b/service/emrserverless/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/emrserverless/api_op_CancelJobRun.go b/service/emrserverless/api_op_CancelJobRun.go index 756af9fae9d..bccd5533d2c 100644 --- a/service/emrserverless/api_op_CancelJobRun.go +++ b/service/emrserverless/api_op_CancelJobRun.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCancelJobRunMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_CreateApplication.go b/service/emrserverless/api_op_CreateApplication.go index 96f59e9352b..f3c591760ae 100644 --- a/service/emrserverless/api_op_CreateApplication.go +++ b/service/emrserverless/api_op_CreateApplication.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/emrserverless/api_op_DeleteApplication.go b/service/emrserverless/api_op_DeleteApplication.go index 779eeb5e94c..1bbdd683516 100644 --- a/service/emrserverless/api_op_DeleteApplication.go +++ b/service/emrserverless/api_op_DeleteApplication.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_GetApplication.go b/service/emrserverless/api_op_GetApplication.go index 85fe3815b98..bb521ec2589 100644 --- a/service/emrserverless/api_op_GetApplication.go +++ b/service/emrserverless/api_op_GetApplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_GetDashboardForJobRun.go b/service/emrserverless/api_op_GetDashboardForJobRun.go index 56a1c841ea2..7e98051991e 100644 --- a/service/emrserverless/api_op_GetDashboardForJobRun.go +++ b/service/emrserverless/api_op_GetDashboardForJobRun.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetDashboardForJobRunMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDashboardForJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_GetJobRun.go b/service/emrserverless/api_op_GetJobRun.go index f13dc500964..1954e3e3fd8 100644 --- a/service/emrserverless/api_op_GetJobRun.go +++ b/service/emrserverless/api_op_GetJobRun.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetJobRunMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_ListApplications.go b/service/emrserverless/api_op_ListApplications.go index b554add9ea4..7655dde4417 100644 --- a/service/emrserverless/api_op_ListApplications.go +++ b/service/emrserverless/api_op_ListApplications.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of applications that can be listed. @@ -209,6 +204,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrserverless/api_op_ListJobRunAttempts.go b/service/emrserverless/api_op_ListJobRunAttempts.go index 410d9f070f9..56d72ffbada 100644 --- a/service/emrserverless/api_op_ListJobRunAttempts.go +++ b/service/emrserverless/api_op_ListJobRunAttempts.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListJobRunAttemptsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobRunAttemptsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListJobRunAttemptsMiddlewares(stack *middleware.Sta return nil } -// ListJobRunAttemptsAPIClient is a client that implements the ListJobRunAttempts -// operation. -type ListJobRunAttemptsAPIClient interface { - ListJobRunAttempts(context.Context, *ListJobRunAttemptsInput, ...func(*Options)) (*ListJobRunAttemptsOutput, error) -} - -var _ ListJobRunAttemptsAPIClient = (*Client)(nil) - // ListJobRunAttemptsPaginatorOptions is the paginator options for // ListJobRunAttempts type ListJobRunAttemptsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListJobRunAttemptsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobRunAttempts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListJobRunAttemptsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListJobRunAttemptsAPIClient is a client that implements the ListJobRunAttempts +// operation. +type ListJobRunAttemptsAPIClient interface { + ListJobRunAttempts(context.Context, *ListJobRunAttemptsInput, ...func(*Options)) (*ListJobRunAttemptsOutput, error) +} + +var _ ListJobRunAttemptsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobRunAttempts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrserverless/api_op_ListJobRuns.go b/service/emrserverless/api_op_ListJobRuns.go index cf3a4c717f6..07a2b7ae92d 100644 --- a/service/emrserverless/api_op_ListJobRuns.go +++ b/service/emrserverless/api_op_ListJobRuns.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListJobRunsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobRunsValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListJobRunsMiddlewares(stack *middleware.Stack, opt return nil } -// ListJobRunsAPIClient is a client that implements the ListJobRuns operation. -type ListJobRunsAPIClient interface { - ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error) -} - -var _ ListJobRunsAPIClient = (*Client)(nil) - // ListJobRunsPaginatorOptions is the paginator options for ListJobRuns type ListJobRunsPaginatorOptions struct { // The maximum number of job runs that can be listed. @@ -226,6 +222,9 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListJobRunsAPIClient is a client that implements the ListJobRuns operation. +type ListJobRunsAPIClient interface { + ListJobRuns(context.Context, *ListJobRunsInput, ...func(*Options)) (*ListJobRunsOutput, error) +} + +var _ ListJobRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/emrserverless/api_op_ListTagsForResource.go b/service/emrserverless/api_op_ListTagsForResource.go index 69afa71ee13..3731f175a34 100644 --- a/service/emrserverless/api_op_ListTagsForResource.go +++ b/service/emrserverless/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_StartApplication.go b/service/emrserverless/api_op_StartApplication.go index 96cd1d326d5..cd7b265aa44 100644 --- a/service/emrserverless/api_op_StartApplication.go +++ b/service/emrserverless/api_op_StartApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStartApplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_StartJobRun.go b/service/emrserverless/api_op_StartJobRun.go index f07268c3156..3bd29263faf 100644 --- a/service/emrserverless/api_op_StartJobRun.go +++ b/service/emrserverless/api_op_StartJobRun.go @@ -151,6 +151,9 @@ func (c *Client) addOperationStartJobRunMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartJobRunMiddleware(stack, options); err != nil { return err } diff --git a/service/emrserverless/api_op_StopApplication.go b/service/emrserverless/api_op_StopApplication.go index 9b10f5d9b80..6b008c0fbed 100644 --- a/service/emrserverless/api_op_StopApplication.go +++ b/service/emrserverless/api_op_StopApplication.go @@ -103,6 +103,9 @@ func (c *Client) addOperationStopApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_TagResource.go b/service/emrserverless/api_op_TagResource.go index 28a09d239c9..b1456b91a70 100644 --- a/service/emrserverless/api_op_TagResource.go +++ b/service/emrserverless/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_UntagResource.go b/service/emrserverless/api_op_UntagResource.go index 861ad02aa0b..c8df3c829ff 100644 --- a/service/emrserverless/api_op_UntagResource.go +++ b/service/emrserverless/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/emrserverless/api_op_UpdateApplication.go b/service/emrserverless/api_op_UpdateApplication.go index 642b8d242df..85b9c06fe3c 100644 --- a/service/emrserverless/api_op_UpdateApplication.go +++ b/service/emrserverless/api_op_UpdateApplication.go @@ -168,6 +168,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/entityresolution/api_client.go b/service/entityresolution/api_client.go index 01d5a511fb8..7b7cbb60525 100644 --- a/service/entityresolution/api_client.go +++ b/service/entityresolution/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/entityresolution/api_op_AddPolicyStatement.go b/service/entityresolution/api_op_AddPolicyStatement.go index efd5c667ad8..68998c50ba5 100644 --- a/service/entityresolution/api_op_AddPolicyStatement.go +++ b/service/entityresolution/api_op_AddPolicyStatement.go @@ -147,6 +147,9 @@ func (c *Client) addOperationAddPolicyStatementMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddPolicyStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_BatchDeleteUniqueId.go b/service/entityresolution/api_op_BatchDeleteUniqueId.go index 65ffad858fe..ae7cbc7de23 100644 --- a/service/entityresolution/api_op_BatchDeleteUniqueId.go +++ b/service/entityresolution/api_op_BatchDeleteUniqueId.go @@ -131,6 +131,9 @@ func (c *Client) addOperationBatchDeleteUniqueIdMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteUniqueIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_CreateIdMappingWorkflow.go b/service/entityresolution/api_op_CreateIdMappingWorkflow.go index e0fe20505a7..9e3e25e6065 100644 --- a/service/entityresolution/api_op_CreateIdMappingWorkflow.go +++ b/service/entityresolution/api_op_CreateIdMappingWorkflow.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateIdMappingWorkflowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIdMappingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_CreateIdNamespace.go b/service/entityresolution/api_op_CreateIdNamespace.go index e856d2d782e..0bc4d82dd11 100644 --- a/service/entityresolution/api_op_CreateIdNamespace.go +++ b/service/entityresolution/api_op_CreateIdNamespace.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateIdNamespaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIdNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_CreateMatchingWorkflow.go b/service/entityresolution/api_op_CreateMatchingWorkflow.go index c0305f3c494..01d59b41483 100644 --- a/service/entityresolution/api_op_CreateMatchingWorkflow.go +++ b/service/entityresolution/api_op_CreateMatchingWorkflow.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateMatchingWorkflowMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMatchingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_CreateSchemaMapping.go b/service/entityresolution/api_op_CreateSchemaMapping.go index e648e679d65..979b193e380 100644 --- a/service/entityresolution/api_op_CreateSchemaMapping.go +++ b/service/entityresolution/api_op_CreateSchemaMapping.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateSchemaMappingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSchemaMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_DeleteIdMappingWorkflow.go b/service/entityresolution/api_op_DeleteIdMappingWorkflow.go index 930dad03886..57873d0d316 100644 --- a/service/entityresolution/api_op_DeleteIdMappingWorkflow.go +++ b/service/entityresolution/api_op_DeleteIdMappingWorkflow.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteIdMappingWorkflowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdMappingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_DeleteIdNamespace.go b/service/entityresolution/api_op_DeleteIdNamespace.go index 2bbaddad8d8..03bc7d8230d 100644 --- a/service/entityresolution/api_op_DeleteIdNamespace.go +++ b/service/entityresolution/api_op_DeleteIdNamespace.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteIdNamespaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_DeleteMatchingWorkflow.go b/service/entityresolution/api_op_DeleteMatchingWorkflow.go index 911e6a5df7a..1260e579654 100644 --- a/service/entityresolution/api_op_DeleteMatchingWorkflow.go +++ b/service/entityresolution/api_op_DeleteMatchingWorkflow.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteMatchingWorkflowMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMatchingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_DeletePolicyStatement.go b/service/entityresolution/api_op_DeletePolicyStatement.go index 034ac12fee0..a54409c3a2f 100644 --- a/service/entityresolution/api_op_DeletePolicyStatement.go +++ b/service/entityresolution/api_op_DeletePolicyStatement.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeletePolicyStatementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_DeleteSchemaMapping.go b/service/entityresolution/api_op_DeleteSchemaMapping.go index 97486e7d5da..67ea1e75114 100644 --- a/service/entityresolution/api_op_DeleteSchemaMapping.go +++ b/service/entityresolution/api_op_DeleteSchemaMapping.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSchemaMappingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetIdMappingJob.go b/service/entityresolution/api_op_GetIdMappingJob.go index 21b09e4b41a..87eae4c0eb7 100644 --- a/service/entityresolution/api_op_GetIdMappingJob.go +++ b/service/entityresolution/api_op_GetIdMappingJob.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetIdMappingJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdMappingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetIdMappingWorkflow.go b/service/entityresolution/api_op_GetIdMappingWorkflow.go index 9fced88caf8..765164c781f 100644 --- a/service/entityresolution/api_op_GetIdMappingWorkflow.go +++ b/service/entityresolution/api_op_GetIdMappingWorkflow.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetIdMappingWorkflowMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdMappingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetIdNamespace.go b/service/entityresolution/api_op_GetIdNamespace.go index 910aecfa12c..8094690a40e 100644 --- a/service/entityresolution/api_op_GetIdNamespace.go +++ b/service/entityresolution/api_op_GetIdNamespace.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetIdNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetMatchId.go b/service/entityresolution/api_op_GetMatchId.go index cd8170be2ba..c979022947c 100644 --- a/service/entityresolution/api_op_GetMatchId.go +++ b/service/entityresolution/api_op_GetMatchId.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetMatchIdMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMatchIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetMatchingJob.go b/service/entityresolution/api_op_GetMatchingJob.go index f0f85d6c5df..eab23df1829 100644 --- a/service/entityresolution/api_op_GetMatchingJob.go +++ b/service/entityresolution/api_op_GetMatchingJob.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetMatchingJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMatchingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetMatchingWorkflow.go b/service/entityresolution/api_op_GetMatchingWorkflow.go index 3d34661d28f..7316de6a602 100644 --- a/service/entityresolution/api_op_GetMatchingWorkflow.go +++ b/service/entityresolution/api_op_GetMatchingWorkflow.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetMatchingWorkflowMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMatchingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetPolicy.go b/service/entityresolution/api_op_GetPolicy.go index 7e3fd86a8f3..9374b597ce3 100644 --- a/service/entityresolution/api_op_GetPolicy.go +++ b/service/entityresolution/api_op_GetPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetProviderService.go b/service/entityresolution/api_op_GetProviderService.go index 5b4acd8e311..e7a753b37f3 100644 --- a/service/entityresolution/api_op_GetProviderService.go +++ b/service/entityresolution/api_op_GetProviderService.go @@ -171,6 +171,9 @@ func (c *Client) addOperationGetProviderServiceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProviderServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_GetSchemaMapping.go b/service/entityresolution/api_op_GetSchemaMapping.go index 697d9e3c4d2..70da0826885 100644 --- a/service/entityresolution/api_op_GetSchemaMapping.go +++ b/service/entityresolution/api_op_GetSchemaMapping.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetSchemaMappingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_ListIdMappingJobs.go b/service/entityresolution/api_op_ListIdMappingJobs.go index 3e26a24d40b..36e88947ee3 100644 --- a/service/entityresolution/api_op_ListIdMappingJobs.go +++ b/service/entityresolution/api_op_ListIdMappingJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListIdMappingJobsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdMappingJobsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListIdMappingJobsMiddlewares(stack *middleware.Stac return nil } -// ListIdMappingJobsAPIClient is a client that implements the ListIdMappingJobs -// operation. -type ListIdMappingJobsAPIClient interface { - ListIdMappingJobs(context.Context, *ListIdMappingJobsInput, ...func(*Options)) (*ListIdMappingJobsOutput, error) -} - -var _ ListIdMappingJobsAPIClient = (*Client)(nil) - // ListIdMappingJobsPaginatorOptions is the paginator options for ListIdMappingJobs type ListIdMappingJobsPaginatorOptions struct { // The maximum number of objects returned per page. @@ -210,6 +205,9 @@ func (p *ListIdMappingJobsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdMappingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListIdMappingJobsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListIdMappingJobsAPIClient is a client that implements the ListIdMappingJobs +// operation. +type ListIdMappingJobsAPIClient interface { + ListIdMappingJobs(context.Context, *ListIdMappingJobsInput, ...func(*Options)) (*ListIdMappingJobsOutput, error) +} + +var _ ListIdMappingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdMappingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListIdMappingWorkflows.go b/service/entityresolution/api_op_ListIdMappingWorkflows.go index 80798c71f0e..1ff6af6a5d6 100644 --- a/service/entityresolution/api_op_ListIdMappingWorkflows.go +++ b/service/entityresolution/api_op_ListIdMappingWorkflows.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListIdMappingWorkflowsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdMappingWorkflows(options.Region), middleware.Before); err != nil { return err } @@ -132,14 +135,6 @@ func (c *Client) addOperationListIdMappingWorkflowsMiddlewares(stack *middleware return nil } -// ListIdMappingWorkflowsAPIClient is a client that implements the -// ListIdMappingWorkflows operation. -type ListIdMappingWorkflowsAPIClient interface { - ListIdMappingWorkflows(context.Context, *ListIdMappingWorkflowsInput, ...func(*Options)) (*ListIdMappingWorkflowsOutput, error) -} - -var _ ListIdMappingWorkflowsAPIClient = (*Client)(nil) - // ListIdMappingWorkflowsPaginatorOptions is the paginator options for // ListIdMappingWorkflows type ListIdMappingWorkflowsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListIdMappingWorkflowsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdMappingWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListIdMappingWorkflowsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListIdMappingWorkflowsAPIClient is a client that implements the +// ListIdMappingWorkflows operation. +type ListIdMappingWorkflowsAPIClient interface { + ListIdMappingWorkflows(context.Context, *ListIdMappingWorkflowsInput, ...func(*Options)) (*ListIdMappingWorkflowsOutput, error) +} + +var _ ListIdMappingWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdMappingWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListIdNamespaces.go b/service/entityresolution/api_op_ListIdNamespaces.go index a777d18d980..134861c44c6 100644 --- a/service/entityresolution/api_op_ListIdNamespaces.go +++ b/service/entityresolution/api_op_ListIdNamespaces.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListIdNamespacesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdNamespaces(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListIdNamespacesMiddlewares(stack *middleware.Stack return nil } -// ListIdNamespacesAPIClient is a client that implements the ListIdNamespaces -// operation. -type ListIdNamespacesAPIClient interface { - ListIdNamespaces(context.Context, *ListIdNamespacesInput, ...func(*Options)) (*ListIdNamespacesOutput, error) -} - -var _ ListIdNamespacesAPIClient = (*Client)(nil) - // ListIdNamespacesPaginatorOptions is the paginator options for ListIdNamespaces type ListIdNamespacesPaginatorOptions struct { // The maximum number of IdNamespace objects returned per page. @@ -202,6 +197,9 @@ func (p *ListIdNamespacesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdNamespaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListIdNamespacesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListIdNamespacesAPIClient is a client that implements the ListIdNamespaces +// operation. +type ListIdNamespacesAPIClient interface { + ListIdNamespaces(context.Context, *ListIdNamespacesInput, ...func(*Options)) (*ListIdNamespacesOutput, error) +} + +var _ ListIdNamespacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListMatchingJobs.go b/service/entityresolution/api_op_ListMatchingJobs.go index e0913a2e928..e2cac5c4c62 100644 --- a/service/entityresolution/api_op_ListMatchingJobs.go +++ b/service/entityresolution/api_op_ListMatchingJobs.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListMatchingJobsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMatchingJobsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListMatchingJobsMiddlewares(stack *middleware.Stack return nil } -// ListMatchingJobsAPIClient is a client that implements the ListMatchingJobs -// operation. -type ListMatchingJobsAPIClient interface { - ListMatchingJobs(context.Context, *ListMatchingJobsInput, ...func(*Options)) (*ListMatchingJobsOutput, error) -} - -var _ ListMatchingJobsAPIClient = (*Client)(nil) - // ListMatchingJobsPaginatorOptions is the paginator options for ListMatchingJobs type ListMatchingJobsPaginatorOptions struct { // The maximum number of objects returned per page. @@ -211,6 +206,9 @@ func (p *ListMatchingJobsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMatchingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListMatchingJobsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListMatchingJobsAPIClient is a client that implements the ListMatchingJobs +// operation. +type ListMatchingJobsAPIClient interface { + ListMatchingJobs(context.Context, *ListMatchingJobsInput, ...func(*Options)) (*ListMatchingJobsOutput, error) +} + +var _ ListMatchingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMatchingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListMatchingWorkflows.go b/service/entityresolution/api_op_ListMatchingWorkflows.go index 525e13762d1..04a897f01c8 100644 --- a/service/entityresolution/api_op_ListMatchingWorkflows.go +++ b/service/entityresolution/api_op_ListMatchingWorkflows.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListMatchingWorkflowsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMatchingWorkflows(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListMatchingWorkflowsMiddlewares(stack *middleware. return nil } -// ListMatchingWorkflowsAPIClient is a client that implements the -// ListMatchingWorkflows operation. -type ListMatchingWorkflowsAPIClient interface { - ListMatchingWorkflows(context.Context, *ListMatchingWorkflowsInput, ...func(*Options)) (*ListMatchingWorkflowsOutput, error) -} - -var _ ListMatchingWorkflowsAPIClient = (*Client)(nil) - // ListMatchingWorkflowsPaginatorOptions is the paginator options for // ListMatchingWorkflows type ListMatchingWorkflowsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListMatchingWorkflowsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMatchingWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListMatchingWorkflowsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListMatchingWorkflowsAPIClient is a client that implements the +// ListMatchingWorkflows operation. +type ListMatchingWorkflowsAPIClient interface { + ListMatchingWorkflows(context.Context, *ListMatchingWorkflowsInput, ...func(*Options)) (*ListMatchingWorkflowsOutput, error) +} + +var _ ListMatchingWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMatchingWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListProviderServices.go b/service/entityresolution/api_op_ListProviderServices.go index 02563849e8c..fd836e29707 100644 --- a/service/entityresolution/api_op_ListProviderServices.go +++ b/service/entityresolution/api_op_ListProviderServices.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListProviderServicesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProviderServices(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListProviderServicesMiddlewares(stack *middleware.S return nil } -// ListProviderServicesAPIClient is a client that implements the -// ListProviderServices operation. -type ListProviderServicesAPIClient interface { - ListProviderServices(context.Context, *ListProviderServicesInput, ...func(*Options)) (*ListProviderServicesOutput, error) -} - -var _ ListProviderServicesAPIClient = (*Client)(nil) - // ListProviderServicesPaginatorOptions is the paginator options for // ListProviderServices type ListProviderServicesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListProviderServicesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProviderServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListProviderServicesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListProviderServicesAPIClient is a client that implements the +// ListProviderServices operation. +type ListProviderServicesAPIClient interface { + ListProviderServices(context.Context, *ListProviderServicesInput, ...func(*Options)) (*ListProviderServicesOutput, error) +} + +var _ ListProviderServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProviderServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListSchemaMappings.go b/service/entityresolution/api_op_ListSchemaMappings.go index 2b2e99572a1..de5bb26521d 100644 --- a/service/entityresolution/api_op_ListSchemaMappings.go +++ b/service/entityresolution/api_op_ListSchemaMappings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListSchemaMappingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchemaMappings(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListSchemaMappingsMiddlewares(stack *middleware.Sta return nil } -// ListSchemaMappingsAPIClient is a client that implements the ListSchemaMappings -// operation. -type ListSchemaMappingsAPIClient interface { - ListSchemaMappings(context.Context, *ListSchemaMappingsInput, ...func(*Options)) (*ListSchemaMappingsOutput, error) -} - -var _ ListSchemaMappingsAPIClient = (*Client)(nil) - // ListSchemaMappingsPaginatorOptions is the paginator options for // ListSchemaMappings type ListSchemaMappingsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListSchemaMappingsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemaMappings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListSchemaMappingsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSchemaMappingsAPIClient is a client that implements the ListSchemaMappings +// operation. +type ListSchemaMappingsAPIClient interface { + ListSchemaMappings(context.Context, *ListSchemaMappingsInput, ...func(*Options)) (*ListSchemaMappingsOutput, error) +} + +var _ ListSchemaMappingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemaMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/entityresolution/api_op_ListTagsForResource.go b/service/entityresolution/api_op_ListTagsForResource.go index 73113a5173d..963d9127408 100644 --- a/service/entityresolution/api_op_ListTagsForResource.go +++ b/service/entityresolution/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_PutPolicy.go b/service/entityresolution/api_op_PutPolicy.go index 0ee651187b3..a8f9bd2c89d 100644 --- a/service/entityresolution/api_op_PutPolicy.go +++ b/service/entityresolution/api_op_PutPolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_StartIdMappingJob.go b/service/entityresolution/api_op_StartIdMappingJob.go index e7d4db8083b..d937ca6cd8b 100644 --- a/service/entityresolution/api_op_StartIdMappingJob.go +++ b/service/entityresolution/api_op_StartIdMappingJob.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartIdMappingJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartIdMappingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_StartMatchingJob.go b/service/entityresolution/api_op_StartMatchingJob.go index b3d7e444296..948aec74d3f 100644 --- a/service/entityresolution/api_op_StartMatchingJob.go +++ b/service/entityresolution/api_op_StartMatchingJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartMatchingJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMatchingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_TagResource.go b/service/entityresolution/api_op_TagResource.go index f06ed4002f2..c11b7a223da 100644 --- a/service/entityresolution/api_op_TagResource.go +++ b/service/entityresolution/api_op_TagResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_UntagResource.go b/service/entityresolution/api_op_UntagResource.go index 9726cc738a1..24ae9cd4e8a 100644 --- a/service/entityresolution/api_op_UntagResource.go +++ b/service/entityresolution/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_UpdateIdMappingWorkflow.go b/service/entityresolution/api_op_UpdateIdMappingWorkflow.go index 1209d8989a3..59713379337 100644 --- a/service/entityresolution/api_op_UpdateIdMappingWorkflow.go +++ b/service/entityresolution/api_op_UpdateIdMappingWorkflow.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdateIdMappingWorkflowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdMappingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_UpdateIdNamespace.go b/service/entityresolution/api_op_UpdateIdNamespace.go index f2362827e86..139e82d5156 100644 --- a/service/entityresolution/api_op_UpdateIdNamespace.go +++ b/service/entityresolution/api_op_UpdateIdNamespace.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateIdNamespaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_UpdateMatchingWorkflow.go b/service/entityresolution/api_op_UpdateMatchingWorkflow.go index dd26189a3d2..754c71398ac 100644 --- a/service/entityresolution/api_op_UpdateMatchingWorkflow.go +++ b/service/entityresolution/api_op_UpdateMatchingWorkflow.go @@ -170,6 +170,9 @@ func (c *Client) addOperationUpdateMatchingWorkflowMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMatchingWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/entityresolution/api_op_UpdateSchemaMapping.go b/service/entityresolution/api_op_UpdateSchemaMapping.go index d6502b8a039..da55386c54a 100644 --- a/service/entityresolution/api_op_UpdateSchemaMapping.go +++ b/service/entityresolution/api_op_UpdateSchemaMapping.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateSchemaMappingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSchemaMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_client.go b/service/eventbridge/api_client.go index bf6a8340e10..e829c4d4639 100644 --- a/service/eventbridge/api_client.go +++ b/service/eventbridge/api_client.go @@ -460,6 +460,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -565,6 +589,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/eventbridge/api_op_ActivateEventSource.go b/service/eventbridge/api_op_ActivateEventSource.go index 026f7477eb0..30fdfa321b0 100644 --- a/service/eventbridge/api_op_ActivateEventSource.go +++ b/service/eventbridge/api_op_ActivateEventSource.go @@ -102,6 +102,9 @@ func (c *Client) addOperationActivateEventSourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CancelReplay.go b/service/eventbridge/api_op_CancelReplay.go index e2bb5de7328..8722ecb369a 100644 --- a/service/eventbridge/api_op_CancelReplay.go +++ b/service/eventbridge/api_op_CancelReplay.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCancelReplayMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelReplayValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CreateApiDestination.go b/service/eventbridge/api_op_CreateApiDestination.go index 7131586dc56..3f6fc0f5de5 100644 --- a/service/eventbridge/api_op_CreateApiDestination.go +++ b/service/eventbridge/api_op_CreateApiDestination.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateApiDestinationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CreateArchive.go b/service/eventbridge/api_op_CreateArchive.go index 8a4afb03507..24ce8a08f3c 100644 --- a/service/eventbridge/api_op_CreateArchive.go +++ b/service/eventbridge/api_op_CreateArchive.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CreateConnection.go b/service/eventbridge/api_op_CreateConnection.go index 98c4c8845de..b042d528fc4 100644 --- a/service/eventbridge/api_op_CreateConnection.go +++ b/service/eventbridge/api_op_CreateConnection.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CreateEndpoint.go b/service/eventbridge/api_op_CreateEndpoint.go index 01169286c2d..6e70c23b96e 100644 --- a/service/eventbridge/api_op_CreateEndpoint.go +++ b/service/eventbridge/api_op_CreateEndpoint.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CreateEventBus.go b/service/eventbridge/api_op_CreateEventBus.go index 2bde514d5fa..a67496b3716 100644 --- a/service/eventbridge/api_op_CreateEventBus.go +++ b/service/eventbridge/api_op_CreateEventBus.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateEventBusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventBusValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_CreatePartnerEventSource.go b/service/eventbridge/api_op_CreatePartnerEventSource.go index 86d23451f07..22c07d3b477 100644 --- a/service/eventbridge/api_op_CreatePartnerEventSource.go +++ b/service/eventbridge/api_op_CreatePartnerEventSource.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreatePartnerEventSourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePartnerEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeactivateEventSource.go b/service/eventbridge/api_op_DeactivateEventSource.go index 2cca6c71147..c0ab914bdb8 100644 --- a/service/eventbridge/api_op_DeactivateEventSource.go +++ b/service/eventbridge/api_op_DeactivateEventSource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeactivateEventSourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeauthorizeConnection.go b/service/eventbridge/api_op_DeauthorizeConnection.go index 7556f145c75..f1685836689 100644 --- a/service/eventbridge/api_op_DeauthorizeConnection.go +++ b/service/eventbridge/api_op_DeauthorizeConnection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeauthorizeConnectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeauthorizeConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeleteApiDestination.go b/service/eventbridge/api_op_DeleteApiDestination.go index 03e87b963a4..940ada1e694 100644 --- a/service/eventbridge/api_op_DeleteApiDestination.go +++ b/service/eventbridge/api_op_DeleteApiDestination.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApiDestinationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeleteArchive.go b/service/eventbridge/api_op_DeleteArchive.go index 3891c9a0c2d..e3534f32c43 100644 --- a/service/eventbridge/api_op_DeleteArchive.go +++ b/service/eventbridge/api_op_DeleteArchive.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeleteConnection.go b/service/eventbridge/api_op_DeleteConnection.go index ad51ef50cb6..8b7eb766d71 100644 --- a/service/eventbridge/api_op_DeleteConnection.go +++ b/service/eventbridge/api_op_DeleteConnection.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeleteEndpoint.go b/service/eventbridge/api_op_DeleteEndpoint.go index 8f4a785c885..7fab7e4574b 100644 --- a/service/eventbridge/api_op_DeleteEndpoint.go +++ b/service/eventbridge/api_op_DeleteEndpoint.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeleteEventBus.go b/service/eventbridge/api_op_DeleteEventBus.go index a87d9ae2b4a..37538091d61 100644 --- a/service/eventbridge/api_op_DeleteEventBus.go +++ b/service/eventbridge/api_op_DeleteEventBus.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteEventBusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventBusValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeletePartnerEventSource.go b/service/eventbridge/api_op_DeletePartnerEventSource.go index b1ce2cb4954..7b786723d63 100644 --- a/service/eventbridge/api_op_DeletePartnerEventSource.go +++ b/service/eventbridge/api_op_DeletePartnerEventSource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeletePartnerEventSourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePartnerEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DeleteRule.go b/service/eventbridge/api_op_DeleteRule.go index 95a35e26132..bd7fb8f8274 100644 --- a/service/eventbridge/api_op_DeleteRule.go +++ b/service/eventbridge/api_op_DeleteRule.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeApiDestination.go b/service/eventbridge/api_op_DescribeApiDestination.go index 3177a291073..7f52d4199df 100644 --- a/service/eventbridge/api_op_DescribeApiDestination.go +++ b/service/eventbridge/api_op_DescribeApiDestination.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeApiDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeArchive.go b/service/eventbridge/api_op_DescribeArchive.go index bb83a60350d..1a3c75255ec 100644 --- a/service/eventbridge/api_op_DescribeArchive.go +++ b/service/eventbridge/api_op_DescribeArchive.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeArchiveMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeConnection.go b/service/eventbridge/api_op_DescribeConnection.go index bc611d956a9..bd9d4839815 100644 --- a/service/eventbridge/api_op_DescribeConnection.go +++ b/service/eventbridge/api_op_DescribeConnection.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeConnectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeEndpoint.go b/service/eventbridge/api_op_DescribeEndpoint.go index 3c511aeba25..6e812b5e4ff 100644 --- a/service/eventbridge/api_op_DescribeEndpoint.go +++ b/service/eventbridge/api_op_DescribeEndpoint.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeEndpointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeEventBus.go b/service/eventbridge/api_op_DescribeEventBus.go index 6e46ad55ad8..3b85c8402f9 100644 --- a/service/eventbridge/api_op_DescribeEventBus.go +++ b/service/eventbridge/api_op_DescribeEventBus.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeEventBusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventBus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeEventSource.go b/service/eventbridge/api_op_DescribeEventSource.go index 554dbcabca8..981b3eb11af 100644 --- a/service/eventbridge/api_op_DescribeEventSource.go +++ b/service/eventbridge/api_op_DescribeEventSource.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeEventSourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribePartnerEventSource.go b/service/eventbridge/api_op_DescribePartnerEventSource.go index 77e52fbc5bf..6f78d1212b2 100644 --- a/service/eventbridge/api_op_DescribePartnerEventSource.go +++ b/service/eventbridge/api_op_DescribePartnerEventSource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribePartnerEventSourceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePartnerEventSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeReplay.go b/service/eventbridge/api_op_DescribeReplay.go index 758374642e3..cb69c9390b7 100644 --- a/service/eventbridge/api_op_DescribeReplay.go +++ b/service/eventbridge/api_op_DescribeReplay.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeReplayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplayValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DescribeRule.go b/service/eventbridge/api_op_DescribeRule.go index d48ffc5d8b7..982d0a6f2ca 100644 --- a/service/eventbridge/api_op_DescribeRule.go +++ b/service/eventbridge/api_op_DescribeRule.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeRuleMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_DisableRule.go b/service/eventbridge/api_op_DisableRule.go index fd47a1be002..46495492c77 100644 --- a/service/eventbridge/api_op_DisableRule.go +++ b/service/eventbridge/api_op_DisableRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisableRuleMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_EnableRule.go b/service/eventbridge/api_op_EnableRule.go index dbe47efc05e..89bad35837c 100644 --- a/service/eventbridge/api_op_EnableRule.go +++ b/service/eventbridge/api_op_EnableRule.go @@ -108,6 +108,9 @@ func (c *Client) addOperationEnableRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_ListApiDestinations.go b/service/eventbridge/api_op_ListApiDestinations.go index c3193f5dc37..fef03ed251c 100644 --- a/service/eventbridge/api_op_ListApiDestinations.go +++ b/service/eventbridge/api_op_ListApiDestinations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListApiDestinationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApiDestinations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListArchives.go b/service/eventbridge/api_op_ListArchives.go index aad8f53cdcf..7d4c8c62162 100644 --- a/service/eventbridge/api_op_ListArchives.go +++ b/service/eventbridge/api_op_ListArchives.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListArchivesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListArchives(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListConnections.go b/service/eventbridge/api_op_ListConnections.go index c0d493a6297..ab542a277bc 100644 --- a/service/eventbridge/api_op_ListConnections.go +++ b/service/eventbridge/api_op_ListConnections.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnections(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListEndpoints.go b/service/eventbridge/api_op_ListEndpoints.go index 437be1f789f..6030b2a2872 100644 --- a/service/eventbridge/api_op_ListEndpoints.go +++ b/service/eventbridge/api_op_ListEndpoints.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListEventBuses.go b/service/eventbridge/api_op_ListEventBuses.go index 6342bbd0280..ad04b678e66 100644 --- a/service/eventbridge/api_op_ListEventBuses.go +++ b/service/eventbridge/api_op_ListEventBuses.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEventBusesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventBuses(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListEventSources.go b/service/eventbridge/api_op_ListEventSources.go index 98d721369a6..22d16130d85 100644 --- a/service/eventbridge/api_op_ListEventSources.go +++ b/service/eventbridge/api_op_ListEventSources.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListEventSourcesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventSources(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListPartnerEventSourceAccounts.go b/service/eventbridge/api_op_ListPartnerEventSourceAccounts.go index a840f5edd34..24f5cc9a737 100644 --- a/service/eventbridge/api_op_ListPartnerEventSourceAccounts.go +++ b/service/eventbridge/api_op_ListPartnerEventSourceAccounts.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListPartnerEventSourceAccountsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPartnerEventSourceAccountsValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_ListPartnerEventSources.go b/service/eventbridge/api_op_ListPartnerEventSources.go index 5e66f6285d9..59f1778eda1 100644 --- a/service/eventbridge/api_op_ListPartnerEventSources.go +++ b/service/eventbridge/api_op_ListPartnerEventSources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPartnerEventSourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPartnerEventSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_ListReplays.go b/service/eventbridge/api_op_ListReplays.go index 88046227489..3551eb17ebc 100644 --- a/service/eventbridge/api_op_ListReplays.go +++ b/service/eventbridge/api_op_ListReplays.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListReplaysMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReplays(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListRuleNamesByTarget.go b/service/eventbridge/api_op_ListRuleNamesByTarget.go index c700a1c58e7..55aec3fda50 100644 --- a/service/eventbridge/api_op_ListRuleNamesByTarget.go +++ b/service/eventbridge/api_op_ListRuleNamesByTarget.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListRuleNamesByTargetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRuleNamesByTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_ListRules.go b/service/eventbridge/api_op_ListRules.go index 3930f1e26e4..6e927a956c2 100644 --- a/service/eventbridge/api_op_ListRules.go +++ b/service/eventbridge/api_op_ListRules.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_ListTagsForResource.go b/service/eventbridge/api_op_ListTagsForResource.go index 400a454a797..5f9d4a473bc 100644 --- a/service/eventbridge/api_op_ListTagsForResource.go +++ b/service/eventbridge/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_ListTargetsByRule.go b/service/eventbridge/api_op_ListTargetsByRule.go index 8463f24162b..2481dd11ad3 100644 --- a/service/eventbridge/api_op_ListTargetsByRule.go +++ b/service/eventbridge/api_op_ListTargetsByRule.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTargetsByRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsByRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_PutEvents.go b/service/eventbridge/api_op_PutEvents.go index 92239058591..1285f6c5e79 100644 --- a/service/eventbridge/api_op_PutEvents.go +++ b/service/eventbridge/api_op_PutEvents.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutEventsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_PutPartnerEvents.go b/service/eventbridge/api_op_PutPartnerEvents.go index ec068753990..b3360ee52a3 100644 --- a/service/eventbridge/api_op_PutPartnerEvents.go +++ b/service/eventbridge/api_op_PutPartnerEvents.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutPartnerEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPartnerEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_PutPermission.go b/service/eventbridge/api_op_PutPermission.go index c2432fcbc52..258c6b0b6ec 100644 --- a/service/eventbridge/api_op_PutPermission.go +++ b/service/eventbridge/api_op_PutPermission.go @@ -165,6 +165,9 @@ func (c *Client) addOperationPutPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_PutRule.go b/service/eventbridge/api_op_PutRule.go index f733d6885a3..d1854e3ded6 100644 --- a/service/eventbridge/api_op_PutRule.go +++ b/service/eventbridge/api_op_PutRule.go @@ -220,6 +220,9 @@ func (c *Client) addOperationPutRuleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_PutTargets.go b/service/eventbridge/api_op_PutTargets.go index b81c8c05b61..8923fc25946 100644 --- a/service/eventbridge/api_op_PutTargets.go +++ b/service/eventbridge/api_op_PutTargets.go @@ -216,6 +216,9 @@ func (c *Client) addOperationPutTargetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_RemovePermission.go b/service/eventbridge/api_op_RemovePermission.go index c042c1ad9b1..aab65dddbe1 100644 --- a/service/eventbridge/api_op_RemovePermission.go +++ b/service/eventbridge/api_op_RemovePermission.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemovePermission(options.Region), middleware.Before); err != nil { return err } diff --git a/service/eventbridge/api_op_RemoveTargets.go b/service/eventbridge/api_op_RemoveTargets.go index b33033b4862..ce4f7e41400 100644 --- a/service/eventbridge/api_op_RemoveTargets.go +++ b/service/eventbridge/api_op_RemoveTargets.go @@ -140,6 +140,9 @@ func (c *Client) addOperationRemoveTargetsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_StartReplay.go b/service/eventbridge/api_op_StartReplay.go index 942e36f5d5f..65af570e9f1 100644 --- a/service/eventbridge/api_op_StartReplay.go +++ b/service/eventbridge/api_op_StartReplay.go @@ -150,6 +150,9 @@ func (c *Client) addOperationStartReplayMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplayValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_TagResource.go b/service/eventbridge/api_op_TagResource.go index 7058bf36ea0..c74fbd63334 100644 --- a/service/eventbridge/api_op_TagResource.go +++ b/service/eventbridge/api_op_TagResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_TestEventPattern.go b/service/eventbridge/api_op_TestEventPattern.go index 28b1ea6f003..4b859300868 100644 --- a/service/eventbridge/api_op_TestEventPattern.go +++ b/service/eventbridge/api_op_TestEventPattern.go @@ -135,6 +135,9 @@ func (c *Client) addOperationTestEventPatternMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestEventPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_UntagResource.go b/service/eventbridge/api_op_UntagResource.go index ee43e8aa821..4d22a358f0c 100644 --- a/service/eventbridge/api_op_UntagResource.go +++ b/service/eventbridge/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_UpdateApiDestination.go b/service/eventbridge/api_op_UpdateApiDestination.go index fe1893eff5b..c279ceed880 100644 --- a/service/eventbridge/api_op_UpdateApiDestination.go +++ b/service/eventbridge/api_op_UpdateApiDestination.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateApiDestinationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApiDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_UpdateArchive.go b/service/eventbridge/api_op_UpdateArchive.go index afb9a4bd3a2..dad52a72860 100644 --- a/service/eventbridge/api_op_UpdateArchive.go +++ b/service/eventbridge/api_op_UpdateArchive.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_UpdateConnection.go b/service/eventbridge/api_op_UpdateConnection.go index 4b57cb343bf..ad0e7083afe 100644 --- a/service/eventbridge/api_op_UpdateConnection.go +++ b/service/eventbridge/api_op_UpdateConnection.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_UpdateEndpoint.go b/service/eventbridge/api_op_UpdateEndpoint.go index 8ded231404c..b04d4a7a602 100644 --- a/service/eventbridge/api_op_UpdateEndpoint.go +++ b/service/eventbridge/api_op_UpdateEndpoint.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/eventbridge/api_op_UpdateEventBus.go b/service/eventbridge/api_op_UpdateEventBus.go index 0de276d8a91..7e8df0ec90c 100644 --- a/service/eventbridge/api_op_UpdateEventBus.go +++ b/service/eventbridge/api_op_UpdateEventBus.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdateEventBusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventBus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/evidently/api_client.go b/service/evidently/api_client.go index 7f60b70b0a1..6bb9b402cfa 100644 --- a/service/evidently/api_client.go +++ b/service/evidently/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/evidently/api_op_BatchEvaluateFeature.go b/service/evidently/api_op_BatchEvaluateFeature.go index c3403d28c72..25e6e4f0510 100644 --- a/service/evidently/api_op_BatchEvaluateFeature.go +++ b/service/evidently/api_op_BatchEvaluateFeature.go @@ -135,6 +135,9 @@ func (c *Client) addOperationBatchEvaluateFeatureMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchEvaluateFeatureMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_CreateExperiment.go b/service/evidently/api_op_CreateExperiment.go index f8b8b4eda46..d065c3b7996 100644 --- a/service/evidently/api_op_CreateExperiment.go +++ b/service/evidently/api_op_CreateExperiment.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateExperimentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_CreateFeature.go b/service/evidently/api_op_CreateFeature.go index 3b02a137cf1..7f5e31c7da6 100644 --- a/service/evidently/api_op_CreateFeature.go +++ b/service/evidently/api_op_CreateFeature.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateFeatureMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFeatureValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_CreateLaunch.go b/service/evidently/api_op_CreateLaunch.go index 5eaa5bb238f..3b248b352cb 100644 --- a/service/evidently/api_op_CreateLaunch.go +++ b/service/evidently/api_op_CreateLaunch.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateLaunchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_CreateProject.go b/service/evidently/api_op_CreateProject.go index ea25f4f37d7..dac8c5eaa6c 100644 --- a/service/evidently/api_op_CreateProject.go +++ b/service/evidently/api_op_CreateProject.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_CreateSegment.go b/service/evidently/api_op_CreateSegment.go index a499ac097f3..3bb419a4ebe 100644 --- a/service/evidently/api_op_CreateSegment.go +++ b/service/evidently/api_op_CreateSegment.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateSegmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_DeleteExperiment.go b/service/evidently/api_op_DeleteExperiment.go index 78cfd004ed3..ed998c14a57 100644 --- a/service/evidently/api_op_DeleteExperiment.go +++ b/service/evidently/api_op_DeleteExperiment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteExperimentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_DeleteFeature.go b/service/evidently/api_op_DeleteFeature.go index c95cd7e2961..928b9986ee2 100644 --- a/service/evidently/api_op_DeleteFeature.go +++ b/service/evidently/api_op_DeleteFeature.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFeatureMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFeatureValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_DeleteLaunch.go b/service/evidently/api_op_DeleteLaunch.go index 5a33486c27f..1f4d889f82e 100644 --- a/service/evidently/api_op_DeleteLaunch.go +++ b/service/evidently/api_op_DeleteLaunch.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteLaunchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_DeleteProject.go b/service/evidently/api_op_DeleteProject.go index 0ce53e47d39..ab83e5b23bb 100644 --- a/service/evidently/api_op_DeleteProject.go +++ b/service/evidently/api_op_DeleteProject.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_DeleteSegment.go b/service/evidently/api_op_DeleteSegment.go index 26b8bdd4a3c..4f3872484f7 100644 --- a/service/evidently/api_op_DeleteSegment.go +++ b/service/evidently/api_op_DeleteSegment.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteSegmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_EvaluateFeature.go b/service/evidently/api_op_EvaluateFeature.go index d3585f44c5e..cd9ea4b5596 100644 --- a/service/evidently/api_op_EvaluateFeature.go +++ b/service/evidently/api_op_EvaluateFeature.go @@ -182,6 +182,9 @@ func (c *Client) addOperationEvaluateFeatureMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opEvaluateFeatureMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_GetExperiment.go b/service/evidently/api_op_GetExperiment.go index d15ba0b31b4..85b1592297a 100644 --- a/service/evidently/api_op_GetExperiment.go +++ b/service/evidently/api_op_GetExperiment.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetExperimentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_GetExperimentResults.go b/service/evidently/api_op_GetExperimentResults.go index a052f540f51..ec33f619547 100644 --- a/service/evidently/api_op_GetExperimentResults.go +++ b/service/evidently/api_op_GetExperimentResults.go @@ -185,6 +185,9 @@ func (c *Client) addOperationGetExperimentResultsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExperimentResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_GetFeature.go b/service/evidently/api_op_GetFeature.go index 735249aafb9..d04f1b9c059 100644 --- a/service/evidently/api_op_GetFeature.go +++ b/service/evidently/api_op_GetFeature.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetFeatureMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFeatureValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_GetLaunch.go b/service/evidently/api_op_GetLaunch.go index 42e7a7363e3..c6fc223ee71 100644 --- a/service/evidently/api_op_GetLaunch.go +++ b/service/evidently/api_op_GetLaunch.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetLaunchMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_GetProject.go b/service/evidently/api_op_GetProject.go index bfe7c14f8e1..6f1a050f124 100644 --- a/service/evidently/api_op_GetProject.go +++ b/service/evidently/api_op_GetProject.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetProjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_GetSegment.go b/service/evidently/api_op_GetSegment.go index 9e3915910b9..5041a4f2f18 100644 --- a/service/evidently/api_op_GetSegment.go +++ b/service/evidently/api_op_GetSegment.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetSegmentMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_ListExperiments.go b/service/evidently/api_op_ListExperiments.go index 220f17ae64a..bf3856136e6 100644 --- a/service/evidently/api_op_ListExperiments.go +++ b/service/evidently/api_op_ListExperiments.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExperimentsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, return nil } -// ListExperimentsAPIClient is a client that implements the ListExperiments -// operation. -type ListExperimentsAPIClient interface { - ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) -} - -var _ ListExperimentsAPIClient = (*Client)(nil) - // ListExperimentsPaginatorOptions is the paginator options for ListExperiments type ListExperimentsPaginatorOptions struct { // The maximum number of results to include in the response. @@ -218,6 +213,9 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperiments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListExperimentsAPIClient is a client that implements the ListExperiments +// operation. +type ListExperimentsAPIClient interface { + ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) +} + +var _ ListExperimentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperiments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_ListFeatures.go b/service/evidently/api_op_ListFeatures.go index 0750bdf04bb..f2b4b8207ed 100644 --- a/service/evidently/api_op_ListFeatures.go +++ b/service/evidently/api_op_ListFeatures.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListFeaturesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFeaturesValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListFeaturesMiddlewares(stack *middleware.Stack, op return nil } -// ListFeaturesAPIClient is a client that implements the ListFeatures operation. -type ListFeaturesAPIClient interface { - ListFeatures(context.Context, *ListFeaturesInput, ...func(*Options)) (*ListFeaturesOutput, error) -} - -var _ ListFeaturesAPIClient = (*Client)(nil) - // ListFeaturesPaginatorOptions is the paginator options for ListFeatures type ListFeaturesPaginatorOptions struct { // The maximum number of results to include in the response. @@ -212,6 +208,9 @@ func (p *ListFeaturesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFeatures(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListFeaturesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListFeaturesAPIClient is a client that implements the ListFeatures operation. +type ListFeaturesAPIClient interface { + ListFeatures(context.Context, *ListFeaturesInput, ...func(*Options)) (*ListFeaturesOutput, error) +} + +var _ ListFeaturesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFeatures(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_ListLaunches.go b/service/evidently/api_op_ListLaunches.go index 8676e60b552..224194673d1 100644 --- a/service/evidently/api_op_ListLaunches.go +++ b/service/evidently/api_op_ListLaunches.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListLaunchesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLaunchesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListLaunchesMiddlewares(stack *middleware.Stack, op return nil } -// ListLaunchesAPIClient is a client that implements the ListLaunches operation. -type ListLaunchesAPIClient interface { - ListLaunches(context.Context, *ListLaunchesInput, ...func(*Options)) (*ListLaunchesOutput, error) -} - -var _ ListLaunchesAPIClient = (*Client)(nil) - // ListLaunchesPaginatorOptions is the paginator options for ListLaunches type ListLaunchesPaginatorOptions struct { // The maximum number of results to include in the response. @@ -216,6 +212,9 @@ func (p *ListLaunchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLaunches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListLaunchesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListLaunchesAPIClient is a client that implements the ListLaunches operation. +type ListLaunchesAPIClient interface { + ListLaunches(context.Context, *ListLaunchesInput, ...func(*Options)) (*ListLaunchesOutput, error) +} + +var _ ListLaunchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLaunches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_ListProjects.go b/service/evidently/api_op_ListProjects.go index 92fceb2f045..8e51293401e 100644 --- a/service/evidently/api_op_ListProjects.go +++ b/service/evidently/api_op_ListProjects.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of results to include in the response. @@ -205,6 +201,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_ListSegmentReferences.go b/service/evidently/api_op_ListSegmentReferences.go index 1ab561168b3..be6217c8cf3 100644 --- a/service/evidently/api_op_ListSegmentReferences.go +++ b/service/evidently/api_op_ListSegmentReferences.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListSegmentReferencesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSegmentReferencesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListSegmentReferencesMiddlewares(stack *middleware. return nil } -// ListSegmentReferencesAPIClient is a client that implements the -// ListSegmentReferences operation. -type ListSegmentReferencesAPIClient interface { - ListSegmentReferences(context.Context, *ListSegmentReferencesInput, ...func(*Options)) (*ListSegmentReferencesOutput, error) -} - -var _ ListSegmentReferencesAPIClient = (*Client)(nil) - // ListSegmentReferencesPaginatorOptions is the paginator options for // ListSegmentReferences type ListSegmentReferencesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListSegmentReferencesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSegmentReferences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListSegmentReferencesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListSegmentReferencesAPIClient is a client that implements the +// ListSegmentReferences operation. +type ListSegmentReferencesAPIClient interface { + ListSegmentReferences(context.Context, *ListSegmentReferencesInput, ...func(*Options)) (*ListSegmentReferencesOutput, error) +} + +var _ ListSegmentReferencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSegmentReferences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_ListSegments.go b/service/evidently/api_op_ListSegments.go index c4334915158..c51b5226b2e 100644 --- a/service/evidently/api_op_ListSegments.go +++ b/service/evidently/api_op_ListSegments.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSegmentsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSegments(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListSegmentsMiddlewares(stack *middleware.Stack, op return nil } -// ListSegmentsAPIClient is a client that implements the ListSegments operation. -type ListSegmentsAPIClient interface { - ListSegments(context.Context, *ListSegmentsInput, ...func(*Options)) (*ListSegmentsOutput, error) -} - -var _ ListSegmentsAPIClient = (*Client)(nil) - // ListSegmentsPaginatorOptions is the paginator options for ListSegments type ListSegmentsPaginatorOptions struct { // The maximum number of results to include in the response. If you omit this, the @@ -207,6 +203,9 @@ func (p *ListSegmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSegments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListSegmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSegmentsAPIClient is a client that implements the ListSegments operation. +type ListSegmentsAPIClient interface { + ListSegments(context.Context, *ListSegmentsInput, ...func(*Options)) (*ListSegmentsOutput, error) +} + +var _ ListSegmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSegments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/evidently/api_op_ListTagsForResource.go b/service/evidently/api_op_ListTagsForResource.go index 38fe4646b28..b6e615e6369 100644 --- a/service/evidently/api_op_ListTagsForResource.go +++ b/service/evidently/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_PutProjectEvents.go b/service/evidently/api_op_PutProjectEvents.go index b154037fd7e..5d70f1d8052 100644 --- a/service/evidently/api_op_PutProjectEvents.go +++ b/service/evidently/api_op_PutProjectEvents.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutProjectEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutProjectEventsMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_StartExperiment.go b/service/evidently/api_op_StartExperiment.go index d092071e2d4..13d67d82715 100644 --- a/service/evidently/api_op_StartExperiment.go +++ b/service/evidently/api_op_StartExperiment.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartExperimentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_StartLaunch.go b/service/evidently/api_op_StartLaunch.go index 0f89a90ab44..72086b9b6fd 100644 --- a/service/evidently/api_op_StartLaunch.go +++ b/service/evidently/api_op_StartLaunch.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartLaunchMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_StopExperiment.go b/service/evidently/api_op_StopExperiment.go index 9eb2e5f4da8..01d23fe7360 100644 --- a/service/evidently/api_op_StopExperiment.go +++ b/service/evidently/api_op_StopExperiment.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStopExperimentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_StopLaunch.go b/service/evidently/api_op_StopLaunch.go index f609b773f1b..a45786edc7c 100644 --- a/service/evidently/api_op_StopLaunch.go +++ b/service/evidently/api_op_StopLaunch.go @@ -122,6 +122,9 @@ func (c *Client) addOperationStopLaunchMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_TagResource.go b/service/evidently/api_op_TagResource.go index 6afb6e534b8..dd60c380462 100644 --- a/service/evidently/api_op_TagResource.go +++ b/service/evidently/api_op_TagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_TestSegmentPattern.go b/service/evidently/api_op_TestSegmentPattern.go index bcbcb9874ef..22025e73223 100644 --- a/service/evidently/api_op_TestSegmentPattern.go +++ b/service/evidently/api_op_TestSegmentPattern.go @@ -119,6 +119,9 @@ func (c *Client) addOperationTestSegmentPatternMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestSegmentPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_UntagResource.go b/service/evidently/api_op_UntagResource.go index 3b1d5592c54..555fc363e6c 100644 --- a/service/evidently/api_op_UntagResource.go +++ b/service/evidently/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_UpdateExperiment.go b/service/evidently/api_op_UpdateExperiment.go index a9f02712ff2..57353fd13e5 100644 --- a/service/evidently/api_op_UpdateExperiment.go +++ b/service/evidently/api_op_UpdateExperiment.go @@ -161,6 +161,9 @@ func (c *Client) addOperationUpdateExperimentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_UpdateFeature.go b/service/evidently/api_op_UpdateFeature.go index 957b981633c..430bf93fe32 100644 --- a/service/evidently/api_op_UpdateFeature.go +++ b/service/evidently/api_op_UpdateFeature.go @@ -154,6 +154,9 @@ func (c *Client) addOperationUpdateFeatureMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFeatureValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_UpdateLaunch.go b/service/evidently/api_op_UpdateLaunch.go index df69aae6c23..dc5ac5b531e 100644 --- a/service/evidently/api_op_UpdateLaunch.go +++ b/service/evidently/api_op_UpdateLaunch.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateLaunchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLaunchValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_UpdateProject.go b/service/evidently/api_op_UpdateProject.go index 6acc5f10e84..2d2b95f0f99 100644 --- a/service/evidently/api_op_UpdateProject.go +++ b/service/evidently/api_op_UpdateProject.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/evidently/api_op_UpdateProjectDataDelivery.go b/service/evidently/api_op_UpdateProjectDataDelivery.go index e02fe534e1d..88a53d67071 100644 --- a/service/evidently/api_op_UpdateProjectDataDelivery.go +++ b/service/evidently/api_op_UpdateProjectDataDelivery.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateProjectDataDeliveryMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectDataDeliveryValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_client.go b/service/finspace/api_client.go index 069fc7225bd..03f7df2960d 100644 --- a/service/finspace/api_client.go +++ b/service/finspace/api_client.go @@ -456,6 +456,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -578,6 +602,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/finspace/api_op_CreateEnvironment.go b/service/finspace/api_op_CreateEnvironment.go index 770084ad0ba..03212379089 100644 --- a/service/finspace/api_op_CreateEnvironment.go +++ b/service/finspace/api_op_CreateEnvironment.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxChangeset.go b/service/finspace/api_op_CreateKxChangeset.go index ea2c4ed076e..3a2b47c0d14 100644 --- a/service/finspace/api_op_CreateKxChangeset.go +++ b/service/finspace/api_op_CreateKxChangeset.go @@ -202,6 +202,9 @@ func (c *Client) addOperationCreateKxChangesetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxChangesetMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxCluster.go b/service/finspace/api_op_CreateKxCluster.go index 25958f9c572..a5746406344 100644 --- a/service/finspace/api_op_CreateKxCluster.go +++ b/service/finspace/api_op_CreateKxCluster.go @@ -370,6 +370,9 @@ func (c *Client) addOperationCreateKxClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxDatabase.go b/service/finspace/api_op_CreateKxDatabase.go index 385da8308fe..f59c9ae3215 100644 --- a/service/finspace/api_op_CreateKxDatabase.go +++ b/service/finspace/api_op_CreateKxDatabase.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateKxDatabaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxDatabaseMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxDataview.go b/service/finspace/api_op_CreateKxDataview.go index 4b1d1476f6a..a40e504af84 100644 --- a/service/finspace/api_op_CreateKxDataview.go +++ b/service/finspace/api_op_CreateKxDataview.go @@ -233,6 +233,9 @@ func (c *Client) addOperationCreateKxDataviewMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxDataviewMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxEnvironment.go b/service/finspace/api_op_CreateKxEnvironment.go index 4fd5e04b1c2..5d2bb5a09df 100644 --- a/service/finspace/api_op_CreateKxEnvironment.go +++ b/service/finspace/api_op_CreateKxEnvironment.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateKxEnvironmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxEnvironmentMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxScalingGroup.go b/service/finspace/api_op_CreateKxScalingGroup.go index 6da8c6564ee..422479d61a0 100644 --- a/service/finspace/api_op_CreateKxScalingGroup.go +++ b/service/finspace/api_op_CreateKxScalingGroup.go @@ -196,6 +196,9 @@ func (c *Client) addOperationCreateKxScalingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxScalingGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxUser.go b/service/finspace/api_op_CreateKxUser.go index d03eaae0445..066ca5c464f 100644 --- a/service/finspace/api_op_CreateKxUser.go +++ b/service/finspace/api_op_CreateKxUser.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateKxUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxUserMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_CreateKxVolume.go b/service/finspace/api_op_CreateKxVolume.go index ebfe66091d9..3680c738e6a 100644 --- a/service/finspace/api_op_CreateKxVolume.go +++ b/service/finspace/api_op_CreateKxVolume.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCreateKxVolumeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKxVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteEnvironment.go b/service/finspace/api_op_DeleteEnvironment.go index 8765153990c..ddf02462f28 100644 --- a/service/finspace/api_op_DeleteEnvironment.go +++ b/service/finspace/api_op_DeleteEnvironment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxCluster.go b/service/finspace/api_op_DeleteKxCluster.go index 51a964781fa..811d9f31221 100644 --- a/service/finspace/api_op_DeleteKxCluster.go +++ b/service/finspace/api_op_DeleteKxCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteKxClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxClusterNode.go b/service/finspace/api_op_DeleteKxClusterNode.go index 286cb3e3464..b60b3523704 100644 --- a/service/finspace/api_op_DeleteKxClusterNode.go +++ b/service/finspace/api_op_DeleteKxClusterNode.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteKxClusterNodeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKxClusterNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxDatabase.go b/service/finspace/api_op_DeleteKxDatabase.go index dbe55f5adbd..a2851459c27 100644 --- a/service/finspace/api_op_DeleteKxDatabase.go +++ b/service/finspace/api_op_DeleteKxDatabase.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteKxDatabaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxDatabaseMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxDataview.go b/service/finspace/api_op_DeleteKxDataview.go index c4744815b2a..e974c905c2b 100644 --- a/service/finspace/api_op_DeleteKxDataview.go +++ b/service/finspace/api_op_DeleteKxDataview.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteKxDataviewMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxDataviewMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxEnvironment.go b/service/finspace/api_op_DeleteKxEnvironment.go index 5ca691e764a..773dd6720ed 100644 --- a/service/finspace/api_op_DeleteKxEnvironment.go +++ b/service/finspace/api_op_DeleteKxEnvironment.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteKxEnvironmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxEnvironmentMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxScalingGroup.go b/service/finspace/api_op_DeleteKxScalingGroup.go index c76c05bed3d..692923d6d15 100644 --- a/service/finspace/api_op_DeleteKxScalingGroup.go +++ b/service/finspace/api_op_DeleteKxScalingGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteKxScalingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxScalingGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxUser.go b/service/finspace/api_op_DeleteKxUser.go index 5aa6b27f59e..f0d613cf54b 100644 --- a/service/finspace/api_op_DeleteKxUser.go +++ b/service/finspace/api_op_DeleteKxUser.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteKxUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxUserMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_DeleteKxVolume.go b/service/finspace/api_op_DeleteKxVolume.go index f1ca3e9a324..4f549aac5cd 100644 --- a/service/finspace/api_op_DeleteKxVolume.go +++ b/service/finspace/api_op_DeleteKxVolume.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteKxVolumeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteKxVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_GetEnvironment.go b/service/finspace/api_op_GetEnvironment.go index 81010b3e2b9..b64583612a1 100644 --- a/service/finspace/api_op_GetEnvironment.go +++ b/service/finspace/api_op_GetEnvironment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxChangeset.go b/service/finspace/api_op_GetKxChangeset.go index b8cbcbd9f8d..3f470e71766 100644 --- a/service/finspace/api_op_GetKxChangeset.go +++ b/service/finspace/api_op_GetKxChangeset.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetKxChangesetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxChangesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxCluster.go b/service/finspace/api_op_GetKxCluster.go index 4f435fcab67..75515421fef 100644 --- a/service/finspace/api_op_GetKxCluster.go +++ b/service/finspace/api_op_GetKxCluster.go @@ -251,6 +251,9 @@ func (c *Client) addOperationGetKxClusterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxConnectionString.go b/service/finspace/api_op_GetKxConnectionString.go index 31499848015..454f0361dfa 100644 --- a/service/finspace/api_op_GetKxConnectionString.go +++ b/service/finspace/api_op_GetKxConnectionString.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetKxConnectionStringMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxConnectionStringValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxDatabase.go b/service/finspace/api_op_GetKxDatabase.go index 367fcc7e153..1556845dc3f 100644 --- a/service/finspace/api_op_GetKxDatabase.go +++ b/service/finspace/api_op_GetKxDatabase.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetKxDatabaseMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxDataview.go b/service/finspace/api_op_GetKxDataview.go index fd2ca1db1f0..7c348a475f9 100644 --- a/service/finspace/api_op_GetKxDataview.go +++ b/service/finspace/api_op_GetKxDataview.go @@ -181,6 +181,9 @@ func (c *Client) addOperationGetKxDataviewMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxDataviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxEnvironment.go b/service/finspace/api_op_GetKxEnvironment.go index a7457f321cd..8e2911d3676 100644 --- a/service/finspace/api_op_GetKxEnvironment.go +++ b/service/finspace/api_op_GetKxEnvironment.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetKxEnvironmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxScalingGroup.go b/service/finspace/api_op_GetKxScalingGroup.go index c85c1424ffa..9b89b55712a 100644 --- a/service/finspace/api_op_GetKxScalingGroup.go +++ b/service/finspace/api_op_GetKxScalingGroup.go @@ -181,6 +181,9 @@ func (c *Client) addOperationGetKxScalingGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxScalingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxUser.go b/service/finspace/api_op_GetKxUser.go index 513de0934f2..484df528cf5 100644 --- a/service/finspace/api_op_GetKxUser.go +++ b/service/finspace/api_op_GetKxUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetKxUserMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_GetKxVolume.go b/service/finspace/api_op_GetKxVolume.go index f93f5e7bb80..f1a1cab6ef5 100644 --- a/service/finspace/api_op_GetKxVolume.go +++ b/service/finspace/api_op_GetKxVolume.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetKxVolumeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKxVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_ListEnvironments.go b/service/finspace/api_op_ListEnvironments.go index fe77ec58a1e..174c408a9de 100644 --- a/service/finspace/api_op_ListEnvironments.go +++ b/service/finspace/api_op_ListEnvironments.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironments(options.Region), middleware.Before); err != nil { return err } diff --git a/service/finspace/api_op_ListKxChangesets.go b/service/finspace/api_op_ListKxChangesets.go index 50f08a84f65..f970f425235 100644 --- a/service/finspace/api_op_ListKxChangesets.go +++ b/service/finspace/api_op_ListKxChangesets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListKxChangesetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxChangesetsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListKxChangesetsMiddlewares(stack *middleware.Stack return nil } -// ListKxChangesetsAPIClient is a client that implements the ListKxChangesets -// operation. -type ListKxChangesetsAPIClient interface { - ListKxChangesets(context.Context, *ListKxChangesetsInput, ...func(*Options)) (*ListKxChangesetsOutput, error) -} - -var _ ListKxChangesetsAPIClient = (*Client)(nil) - // ListKxChangesetsPaginatorOptions is the paginator options for ListKxChangesets type ListKxChangesetsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -214,6 +209,9 @@ func (p *ListKxChangesetsPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKxChangesets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListKxChangesetsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListKxChangesetsAPIClient is a client that implements the ListKxChangesets +// operation. +type ListKxChangesetsAPIClient interface { + ListKxChangesets(context.Context, *ListKxChangesetsInput, ...func(*Options)) (*ListKxChangesetsOutput, error) +} + +var _ ListKxChangesetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKxChangesets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_ListKxClusterNodes.go b/service/finspace/api_op_ListKxClusterNodes.go index f4a7eda352c..6446209b963 100644 --- a/service/finspace/api_op_ListKxClusterNodes.go +++ b/service/finspace/api_op_ListKxClusterNodes.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListKxClusterNodesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxClusterNodesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListKxClusterNodesMiddlewares(stack *middleware.Sta return nil } -// ListKxClusterNodesAPIClient is a client that implements the ListKxClusterNodes -// operation. -type ListKxClusterNodesAPIClient interface { - ListKxClusterNodes(context.Context, *ListKxClusterNodesInput, ...func(*Options)) (*ListKxClusterNodesOutput, error) -} - -var _ ListKxClusterNodesAPIClient = (*Client)(nil) - // ListKxClusterNodesPaginatorOptions is the paginator options for // ListKxClusterNodes type ListKxClusterNodesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListKxClusterNodesPaginator) NextPage(ctx context.Context, optFns ...fu params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKxClusterNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListKxClusterNodesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListKxClusterNodesAPIClient is a client that implements the ListKxClusterNodes +// operation. +type ListKxClusterNodesAPIClient interface { + ListKxClusterNodes(context.Context, *ListKxClusterNodesInput, ...func(*Options)) (*ListKxClusterNodesOutput, error) +} + +var _ ListKxClusterNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKxClusterNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_ListKxClusters.go b/service/finspace/api_op_ListKxClusters.go index b9af4b2a742..b7e4606d953 100644 --- a/service/finspace/api_op_ListKxClusters.go +++ b/service/finspace/api_op_ListKxClusters.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListKxClustersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxClustersValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_ListKxDatabases.go b/service/finspace/api_op_ListKxDatabases.go index 8203cf4ae39..a58a39a497f 100644 --- a/service/finspace/api_op_ListKxDatabases.go +++ b/service/finspace/api_op_ListKxDatabases.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListKxDatabasesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxDatabasesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListKxDatabasesMiddlewares(stack *middleware.Stack, return nil } -// ListKxDatabasesAPIClient is a client that implements the ListKxDatabases -// operation. -type ListKxDatabasesAPIClient interface { - ListKxDatabases(context.Context, *ListKxDatabasesInput, ...func(*Options)) (*ListKxDatabasesOutput, error) -} - -var _ ListKxDatabasesAPIClient = (*Client)(nil) - // ListKxDatabasesPaginatorOptions is the paginator options for ListKxDatabases type ListKxDatabasesPaginatorOptions struct { // The maximum number of results to return in this request. @@ -209,6 +204,9 @@ func (p *ListKxDatabasesPaginator) NextPage(ctx context.Context, optFns ...func( params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKxDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListKxDatabasesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListKxDatabasesAPIClient is a client that implements the ListKxDatabases +// operation. +type ListKxDatabasesAPIClient interface { + ListKxDatabases(context.Context, *ListKxDatabasesInput, ...func(*Options)) (*ListKxDatabasesOutput, error) +} + +var _ ListKxDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKxDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_ListKxDataviews.go b/service/finspace/api_op_ListKxDataviews.go index 25da911ec5d..c6380d29e71 100644 --- a/service/finspace/api_op_ListKxDataviews.go +++ b/service/finspace/api_op_ListKxDataviews.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListKxDataviewsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxDataviewsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListKxDataviewsMiddlewares(stack *middleware.Stack, return nil } -// ListKxDataviewsAPIClient is a client that implements the ListKxDataviews -// operation. -type ListKxDataviewsAPIClient interface { - ListKxDataviews(context.Context, *ListKxDataviewsInput, ...func(*Options)) (*ListKxDataviewsOutput, error) -} - -var _ ListKxDataviewsAPIClient = (*Client)(nil) - // ListKxDataviewsPaginatorOptions is the paginator options for ListKxDataviews type ListKxDataviewsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -215,6 +210,9 @@ func (p *ListKxDataviewsPaginator) NextPage(ctx context.Context, optFns ...func( params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKxDataviews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListKxDataviewsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListKxDataviewsAPIClient is a client that implements the ListKxDataviews +// operation. +type ListKxDataviewsAPIClient interface { + ListKxDataviews(context.Context, *ListKxDataviewsInput, ...func(*Options)) (*ListKxDataviewsOutput, error) +} + +var _ ListKxDataviewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKxDataviews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_ListKxEnvironments.go b/service/finspace/api_op_ListKxEnvironments.go index 8fadcce6967..441eefa0a21 100644 --- a/service/finspace/api_op_ListKxEnvironments.go +++ b/service/finspace/api_op_ListKxEnvironments.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListKxEnvironmentsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKxEnvironments(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListKxEnvironmentsMiddlewares(stack *middleware.Sta return nil } -// ListKxEnvironmentsAPIClient is a client that implements the ListKxEnvironments -// operation. -type ListKxEnvironmentsAPIClient interface { - ListKxEnvironments(context.Context, *ListKxEnvironmentsInput, ...func(*Options)) (*ListKxEnvironmentsOutput, error) -} - -var _ ListKxEnvironmentsAPIClient = (*Client)(nil) - // ListKxEnvironmentsPaginatorOptions is the paginator options for // ListKxEnvironments type ListKxEnvironmentsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListKxEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKxEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListKxEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListKxEnvironmentsAPIClient is a client that implements the ListKxEnvironments +// operation. +type ListKxEnvironmentsAPIClient interface { + ListKxEnvironments(context.Context, *ListKxEnvironmentsInput, ...func(*Options)) (*ListKxEnvironmentsOutput, error) +} + +var _ ListKxEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKxEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_ListKxScalingGroups.go b/service/finspace/api_op_ListKxScalingGroups.go index bcf7ea18a47..a9a93c88db7 100644 --- a/service/finspace/api_op_ListKxScalingGroups.go +++ b/service/finspace/api_op_ListKxScalingGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListKxScalingGroupsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxScalingGroupsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListKxScalingGroupsMiddlewares(stack *middleware.St return nil } -// ListKxScalingGroupsAPIClient is a client that implements the -// ListKxScalingGroups operation. -type ListKxScalingGroupsAPIClient interface { - ListKxScalingGroups(context.Context, *ListKxScalingGroupsInput, ...func(*Options)) (*ListKxScalingGroupsOutput, error) -} - -var _ ListKxScalingGroupsAPIClient = (*Client)(nil) - // ListKxScalingGroupsPaginatorOptions is the paginator options for // ListKxScalingGroups type ListKxScalingGroupsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListKxScalingGroupsPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKxScalingGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListKxScalingGroupsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListKxScalingGroupsAPIClient is a client that implements the +// ListKxScalingGroups operation. +type ListKxScalingGroupsAPIClient interface { + ListKxScalingGroups(context.Context, *ListKxScalingGroupsInput, ...func(*Options)) (*ListKxScalingGroupsOutput, error) +} + +var _ ListKxScalingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKxScalingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspace/api_op_ListKxUsers.go b/service/finspace/api_op_ListKxUsers.go index e62b7c8c153..e462942e352 100644 --- a/service/finspace/api_op_ListKxUsers.go +++ b/service/finspace/api_op_ListKxUsers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListKxUsersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_ListKxVolumes.go b/service/finspace/api_op_ListKxVolumes.go index 0a0e958ccbe..9bd364e2d02 100644 --- a/service/finspace/api_op_ListKxVolumes.go +++ b/service/finspace/api_op_ListKxVolumes.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListKxVolumesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKxVolumesValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_ListTagsForResource.go b/service/finspace/api_op_ListTagsForResource.go index 9d497f84cd4..f35bdc7a1c6 100644 --- a/service/finspace/api_op_ListTagsForResource.go +++ b/service/finspace/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_TagResource.go b/service/finspace/api_op_TagResource.go index f0db2bd3342..86742d79d84 100644 --- a/service/finspace/api_op_TagResource.go +++ b/service/finspace/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_UntagResource.go b/service/finspace/api_op_UntagResource.go index 0098ce749a7..b01bd2cd7d8 100644 --- a/service/finspace/api_op_UntagResource.go +++ b/service/finspace/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_UpdateEnvironment.go b/service/finspace/api_op_UpdateEnvironment.go index 6706c5bee79..4c5706535e8 100644 --- a/service/finspace/api_op_UpdateEnvironment.go +++ b/service/finspace/api_op_UpdateEnvironment.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxClusterCodeConfiguration.go b/service/finspace/api_op_UpdateKxClusterCodeConfiguration.go index fa3d589ad11..d05b0e9eaa0 100644 --- a/service/finspace/api_op_UpdateKxClusterCodeConfiguration.go +++ b/service/finspace/api_op_UpdateKxClusterCodeConfiguration.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateKxClusterCodeConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxClusterCodeConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxClusterDatabases.go b/service/finspace/api_op_UpdateKxClusterDatabases.go index 0cfa7c8eeb7..ee9f1e8bdb1 100644 --- a/service/finspace/api_op_UpdateKxClusterDatabases.go +++ b/service/finspace/api_op_UpdateKxClusterDatabases.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateKxClusterDatabasesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxClusterDatabasesMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxDatabase.go b/service/finspace/api_op_UpdateKxDatabase.go index fa073687b77..a7593adde61 100644 --- a/service/finspace/api_op_UpdateKxDatabase.go +++ b/service/finspace/api_op_UpdateKxDatabase.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateKxDatabaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxDatabaseMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxDataview.go b/service/finspace/api_op_UpdateKxDataview.go index 3c596d222bc..e6941504735 100644 --- a/service/finspace/api_op_UpdateKxDataview.go +++ b/service/finspace/api_op_UpdateKxDataview.go @@ -199,6 +199,9 @@ func (c *Client) addOperationUpdateKxDataviewMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxDataviewMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxEnvironment.go b/service/finspace/api_op_UpdateKxEnvironment.go index cc31242fb52..5b0ae2b0726 100644 --- a/service/finspace/api_op_UpdateKxEnvironment.go +++ b/service/finspace/api_op_UpdateKxEnvironment.go @@ -168,6 +168,9 @@ func (c *Client) addOperationUpdateKxEnvironmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxEnvironmentMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxEnvironmentNetwork.go b/service/finspace/api_op_UpdateKxEnvironmentNetwork.go index 3efae24de97..67d0a704998 100644 --- a/service/finspace/api_op_UpdateKxEnvironmentNetwork.go +++ b/service/finspace/api_op_UpdateKxEnvironmentNetwork.go @@ -177,6 +177,9 @@ func (c *Client) addOperationUpdateKxEnvironmentNetworkMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxEnvironmentNetworkMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxUser.go b/service/finspace/api_op_UpdateKxUser.go index 308abdc35e4..e195aa8c049 100644 --- a/service/finspace/api_op_UpdateKxUser.go +++ b/service/finspace/api_op_UpdateKxUser.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateKxUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxUserMiddleware(stack, options); err != nil { return err } diff --git a/service/finspace/api_op_UpdateKxVolume.go b/service/finspace/api_op_UpdateKxVolume.go index 2077f8cb7d0..2525a5fba79 100644 --- a/service/finspace/api_op_UpdateKxVolume.go +++ b/service/finspace/api_op_UpdateKxVolume.go @@ -191,6 +191,9 @@ func (c *Client) addOperationUpdateKxVolumeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateKxVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_client.go b/service/finspacedata/api_client.go index 277bd4c3253..a2c4e5434bb 100644 --- a/service/finspacedata/api_client.go +++ b/service/finspacedata/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -577,6 +601,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/finspacedata/api_op_AssociateUserToPermissionGroup.go b/service/finspacedata/api_op_AssociateUserToPermissionGroup.go index 83bc38fdff7..0d50d67681d 100644 --- a/service/finspacedata/api_op_AssociateUserToPermissionGroup.go +++ b/service/finspacedata/api_op_AssociateUserToPermissionGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateUserToPermissionGroupMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateUserToPermissionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_CreateChangeset.go b/service/finspacedata/api_op_CreateChangeset.go index 8cdcdf523d8..e04531c7797 100644 --- a/service/finspacedata/api_op_CreateChangeset.go +++ b/service/finspacedata/api_op_CreateChangeset.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateChangesetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChangesetMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_CreateDataView.go b/service/finspacedata/api_op_CreateDataView.go index 31b8c1d4c66..7f7c7e59200 100644 --- a/service/finspacedata/api_op_CreateDataView.go +++ b/service/finspacedata/api_op_CreateDataView.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateDataViewMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataViewMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_CreateDataset.go b/service/finspacedata/api_op_CreateDataset.go index 07c7e2a57d7..a670d103567 100644 --- a/service/finspacedata/api_op_CreateDataset.go +++ b/service/finspacedata/api_op_CreateDataset.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_CreatePermissionGroup.go b/service/finspacedata/api_op_CreatePermissionGroup.go index c5395e816f2..6367bac4006 100644 --- a/service/finspacedata/api_op_CreatePermissionGroup.go +++ b/service/finspacedata/api_op_CreatePermissionGroup.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreatePermissionGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePermissionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_CreateUser.go b/service/finspacedata/api_op_CreateUser.go index f6832b31fec..530c6f13e3e 100644 --- a/service/finspacedata/api_op_CreateUser.go +++ b/service/finspacedata/api_op_CreateUser.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateUserMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_DeleteDataset.go b/service/finspacedata/api_op_DeleteDataset.go index 6fae89674bb..23752424a5f 100644 --- a/service/finspacedata/api_op_DeleteDataset.go +++ b/service/finspacedata/api_op_DeleteDataset.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_DeletePermissionGroup.go b/service/finspacedata/api_op_DeletePermissionGroup.go index 329c42f04ed..0dd74d6c755 100644 --- a/service/finspacedata/api_op_DeletePermissionGroup.go +++ b/service/finspacedata/api_op_DeletePermissionGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeletePermissionGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeletePermissionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_DisableUser.go b/service/finspacedata/api_op_DisableUser.go index 8b2f4e8bca3..6ca79d7266f 100644 --- a/service/finspacedata/api_op_DisableUser.go +++ b/service/finspacedata/api_op_DisableUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisableUserMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisableUserMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_DisassociateUserFromPermissionGroup.go b/service/finspacedata/api_op_DisassociateUserFromPermissionGroup.go index 37630cc59ee..d1900c7edc0 100644 --- a/service/finspacedata/api_op_DisassociateUserFromPermissionGroup.go +++ b/service/finspacedata/api_op_DisassociateUserFromPermissionGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDisassociateUserFromPermissionGroupMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateUserFromPermissionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_EnableUser.go b/service/finspacedata/api_op_EnableUser.go index dae88353515..b08ec4d8014 100644 --- a/service/finspacedata/api_op_EnableUser.go +++ b/service/finspacedata/api_op_EnableUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationEnableUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opEnableUserMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_GetChangeset.go b/service/finspacedata/api_op_GetChangeset.go index a10a44a7832..e10a0f04e34 100644 --- a/service/finspacedata/api_op_GetChangeset.go +++ b/service/finspacedata/api_op_GetChangeset.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetChangesetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChangesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetDataView.go b/service/finspacedata/api_op_GetDataView.go index e7a83ff7675..252388ab501 100644 --- a/service/finspacedata/api_op_GetDataView.go +++ b/service/finspacedata/api_op_GetDataView.go @@ -175,6 +175,9 @@ func (c *Client) addOperationGetDataViewMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetDataset.go b/service/finspacedata/api_op_GetDataset.go index 3056690e777..8aaf24089b0 100644 --- a/service/finspacedata/api_op_GetDataset.go +++ b/service/finspacedata/api_op_GetDataset.go @@ -156,6 +156,9 @@ func (c *Client) addOperationGetDatasetMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go b/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go index 799472d919e..9e7de263b32 100644 --- a/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go +++ b/service/finspacedata/api_op_GetExternalDataViewAccessDetails.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetExternalDataViewAccessDetailsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExternalDataViewAccessDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetPermissionGroup.go b/service/finspacedata/api_op_GetPermissionGroup.go index 002f141d832..51ff5c1ab75 100644 --- a/service/finspacedata/api_op_GetPermissionGroup.go +++ b/service/finspacedata/api_op_GetPermissionGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetPermissionGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go b/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go index 061b7d48255..d838310c46e 100644 --- a/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go +++ b/service/finspacedata/api_op_GetProgrammaticAccessCredentials.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetProgrammaticAccessCredentialsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProgrammaticAccessCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetUser.go b/service/finspacedata/api_op_GetUser.go index fc190b4e07f..a5a3ae6f0c8 100644 --- a/service/finspacedata/api_op_GetUser.go +++ b/service/finspacedata/api_op_GetUser.go @@ -172,6 +172,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_GetWorkingLocation.go b/service/finspacedata/api_op_GetWorkingLocation.go index ae8d40150ff..cdcb862bb9c 100644 --- a/service/finspacedata/api_op_GetWorkingLocation.go +++ b/service/finspacedata/api_op_GetWorkingLocation.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetWorkingLocationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWorkingLocation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/finspacedata/api_op_ListChangesets.go b/service/finspacedata/api_op_ListChangesets.go index 154b112e7d5..af1d2fa281a 100644 --- a/service/finspacedata/api_op_ListChangesets.go +++ b/service/finspacedata/api_op_ListChangesets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListChangesetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChangesetsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListChangesetsMiddlewares(stack *middleware.Stack, return nil } -// ListChangesetsAPIClient is a client that implements the ListChangesets -// operation. -type ListChangesetsAPIClient interface { - ListChangesets(context.Context, *ListChangesetsInput, ...func(*Options)) (*ListChangesetsOutput, error) -} - -var _ ListChangesetsAPIClient = (*Client)(nil) - // ListChangesetsPaginatorOptions is the paginator options for ListChangesets type ListChangesetsPaginatorOptions struct { // The maximum number of results per page. @@ -218,6 +213,9 @@ func (p *ListChangesetsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChangesets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListChangesetsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListChangesetsAPIClient is a client that implements the ListChangesets +// operation. +type ListChangesetsAPIClient interface { + ListChangesets(context.Context, *ListChangesetsInput, ...func(*Options)) (*ListChangesetsOutput, error) +} + +var _ ListChangesetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChangesets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspacedata/api_op_ListDataViews.go b/service/finspacedata/api_op_ListDataViews.go index e9ca7a7cd71..6035dfcdfbb 100644 --- a/service/finspacedata/api_op_ListDataViews.go +++ b/service/finspacedata/api_op_ListDataViews.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDataViewsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataViewsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListDataViewsMiddlewares(stack *middleware.Stack, o return nil } -// ListDataViewsAPIClient is a client that implements the ListDataViews operation. -type ListDataViewsAPIClient interface { - ListDataViews(context.Context, *ListDataViewsInput, ...func(*Options)) (*ListDataViewsOutput, error) -} - -var _ ListDataViewsAPIClient = (*Client)(nil) - // ListDataViewsPaginatorOptions is the paginator options for ListDataViews type ListDataViewsPaginatorOptions struct { // The maximum number of results per page. @@ -215,6 +211,9 @@ func (p *ListDataViewsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataViews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListDataViewsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDataViewsAPIClient is a client that implements the ListDataViews operation. +type ListDataViewsAPIClient interface { + ListDataViews(context.Context, *ListDataViewsInput, ...func(*Options)) (*ListDataViewsOutput, error) +} + +var _ ListDataViewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataViews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspacedata/api_op_ListDatasets.go b/service/finspacedata/api_op_ListDatasets.go index 68368856548..60c84dd9e50 100644 --- a/service/finspacedata/api_op_ListDatasets.go +++ b/service/finspacedata/api_op_ListDatasets.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // The maximum number of results per page. @@ -208,6 +204,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspacedata/api_op_ListPermissionGroups.go b/service/finspacedata/api_op_ListPermissionGroups.go index dcb419f4899..b027366dd10 100644 --- a/service/finspacedata/api_op_ListPermissionGroups.go +++ b/service/finspacedata/api_op_ListPermissionGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListPermissionGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionGroupsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListPermissionGroupsMiddlewares(stack *middleware.S return nil } -// ListPermissionGroupsAPIClient is a client that implements the -// ListPermissionGroups operation. -type ListPermissionGroupsAPIClient interface { - ListPermissionGroups(context.Context, *ListPermissionGroupsInput, ...func(*Options)) (*ListPermissionGroupsOutput, error) -} - -var _ ListPermissionGroupsAPIClient = (*Client)(nil) - // ListPermissionGroupsPaginatorOptions is the paginator options for // ListPermissionGroups type ListPermissionGroupsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListPermissionGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListPermissionGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListPermissionGroupsAPIClient is a client that implements the +// ListPermissionGroups operation. +type ListPermissionGroupsAPIClient interface { + ListPermissionGroups(context.Context, *ListPermissionGroupsInput, ...func(*Options)) (*ListPermissionGroupsOutput, error) +} + +var _ ListPermissionGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspacedata/api_op_ListPermissionGroupsByUser.go b/service/finspacedata/api_op_ListPermissionGroupsByUser.go index 06992f1623f..34f2a66687b 100644 --- a/service/finspacedata/api_op_ListPermissionGroupsByUser.go +++ b/service/finspacedata/api_op_ListPermissionGroupsByUser.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPermissionGroupsByUserMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionGroupsByUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_ListUsers.go b/service/finspacedata/api_op_ListUsers.go index 2746ba91099..2c7dc6d3d31 100644 --- a/service/finspacedata/api_op_ListUsers.go +++ b/service/finspacedata/api_op_ListUsers.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results per page. @@ -211,6 +207,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/finspacedata/api_op_ListUsersByPermissionGroup.go b/service/finspacedata/api_op_ListUsersByPermissionGroup.go index 8e7459c8daf..c95fa1b2f98 100644 --- a/service/finspacedata/api_op_ListUsersByPermissionGroup.go +++ b/service/finspacedata/api_op_ListUsersByPermissionGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListUsersByPermissionGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersByPermissionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/finspacedata/api_op_ResetUserPassword.go b/service/finspacedata/api_op_ResetUserPassword.go index 8a91f7764c0..273a01fd714 100644 --- a/service/finspacedata/api_op_ResetUserPassword.go +++ b/service/finspacedata/api_op_ResetUserPassword.go @@ -119,6 +119,9 @@ func (c *Client) addOperationResetUserPasswordMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opResetUserPasswordMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_UpdateChangeset.go b/service/finspacedata/api_op_UpdateChangeset.go index 96f5fff5c4e..0c62ba0ba5a 100644 --- a/service/finspacedata/api_op_UpdateChangeset.go +++ b/service/finspacedata/api_op_UpdateChangeset.go @@ -177,6 +177,9 @@ func (c *Client) addOperationUpdateChangesetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateChangesetMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_UpdateDataset.go b/service/finspacedata/api_op_UpdateDataset.go index 8a7b2ac4d2c..ac86c49caf3 100644 --- a/service/finspacedata/api_op_UpdateDataset.go +++ b/service/finspacedata/api_op_UpdateDataset.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_UpdatePermissionGroup.go b/service/finspacedata/api_op_UpdatePermissionGroup.go index 3896c47f07c..9a36f53c879 100644 --- a/service/finspacedata/api_op_UpdatePermissionGroup.go +++ b/service/finspacedata/api_op_UpdatePermissionGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdatePermissionGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePermissionGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/finspacedata/api_op_UpdateUser.go b/service/finspacedata/api_op_UpdateUser.go index 8600e23a71b..c19d8198003 100644 --- a/service/finspacedata/api_op_UpdateUser.go +++ b/service/finspacedata/api_op_UpdateUser.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateUserMiddleware(stack, options); err != nil { return err } diff --git a/service/firehose/api_client.go b/service/firehose/api_client.go index 4643101781c..eccef336035 100644 --- a/service/firehose/api_client.go +++ b/service/firehose/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/firehose/api_op_CreateDeliveryStream.go b/service/firehose/api_op_CreateDeliveryStream.go index 7c335ed1b3d..f40617695b3 100644 --- a/service/firehose/api_op_CreateDeliveryStream.go +++ b/service/firehose/api_op_CreateDeliveryStream.go @@ -258,6 +258,9 @@ func (c *Client) addOperationCreateDeliveryStreamMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeliveryStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_DeleteDeliveryStream.go b/service/firehose/api_op_DeleteDeliveryStream.go index 25fc027791a..761ab55e0a8 100644 --- a/service/firehose/api_op_DeleteDeliveryStream.go +++ b/service/firehose/api_op_DeleteDeliveryStream.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteDeliveryStreamMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeliveryStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_DescribeDeliveryStream.go b/service/firehose/api_op_DescribeDeliveryStream.go index 9cda5dc3cbc..7c8267e2363 100644 --- a/service/firehose/api_op_DescribeDeliveryStream.go +++ b/service/firehose/api_op_DescribeDeliveryStream.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeDeliveryStreamMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeliveryStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_ListDeliveryStreams.go b/service/firehose/api_op_ListDeliveryStreams.go index 21ab3e178b7..7aa772176f8 100644 --- a/service/firehose/api_op_ListDeliveryStreams.go +++ b/service/firehose/api_op_ListDeliveryStreams.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListDeliveryStreamsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeliveryStreams(options.Region), middleware.Before); err != nil { return err } diff --git a/service/firehose/api_op_ListTagsForDeliveryStream.go b/service/firehose/api_op_ListTagsForDeliveryStream.go index f74357240d5..6363e65d3d7 100644 --- a/service/firehose/api_op_ListTagsForDeliveryStream.go +++ b/service/firehose/api_op_ListTagsForDeliveryStream.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListTagsForDeliveryStreamMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForDeliveryStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_PutRecord.go b/service/firehose/api_op_PutRecord.go index 02ac469cf78..7fa27924db8 100644 --- a/service/firehose/api_op_PutRecord.go +++ b/service/firehose/api_op_PutRecord.go @@ -163,6 +163,9 @@ func (c *Client) addOperationPutRecordMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_PutRecordBatch.go b/service/firehose/api_op_PutRecordBatch.go index 19ad0929daf..84ab1cd05a5 100644 --- a/service/firehose/api_op_PutRecordBatch.go +++ b/service/firehose/api_op_PutRecordBatch.go @@ -194,6 +194,9 @@ func (c *Client) addOperationPutRecordBatchMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecordBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_StartDeliveryStreamEncryption.go b/service/firehose/api_op_StartDeliveryStreamEncryption.go index 552021cec24..7f34d791280 100644 --- a/service/firehose/api_op_StartDeliveryStreamEncryption.go +++ b/service/firehose/api_op_StartDeliveryStreamEncryption.go @@ -150,6 +150,9 @@ func (c *Client) addOperationStartDeliveryStreamEncryptionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeliveryStreamEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_StopDeliveryStreamEncryption.go b/service/firehose/api_op_StopDeliveryStreamEncryption.go index 305fd7e79e1..4a6a7d6d66d 100644 --- a/service/firehose/api_op_StopDeliveryStreamEncryption.go +++ b/service/firehose/api_op_StopDeliveryStreamEncryption.go @@ -123,6 +123,9 @@ func (c *Client) addOperationStopDeliveryStreamEncryptionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDeliveryStreamEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_TagDeliveryStream.go b/service/firehose/api_op_TagDeliveryStream.go index 6ea4604b35f..6cd95b1f08b 100644 --- a/service/firehose/api_op_TagDeliveryStream.go +++ b/service/firehose/api_op_TagDeliveryStream.go @@ -119,6 +119,9 @@ func (c *Client) addOperationTagDeliveryStreamMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagDeliveryStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_UntagDeliveryStream.go b/service/firehose/api_op_UntagDeliveryStream.go index 94fb5cad2c0..4386132666e 100644 --- a/service/firehose/api_op_UntagDeliveryStream.go +++ b/service/firehose/api_op_UntagDeliveryStream.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagDeliveryStreamMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagDeliveryStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/firehose/api_op_UpdateDestination.go b/service/firehose/api_op_UpdateDestination.go index 7b0ba5e6ad3..69483f89289 100644 --- a/service/firehose/api_op_UpdateDestination.go +++ b/service/firehose/api_op_UpdateDestination.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateDestinationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_client.go b/service/fis/api_client.go index dad7f5e5726..afd5d67c56a 100644 --- a/service/fis/api_client.go +++ b/service/fis/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/fis/api_op_CreateExperimentTemplate.go b/service/fis/api_op_CreateExperimentTemplate.go index ddc5c486e99..6cabc0c6fa6 100644 --- a/service/fis/api_op_CreateExperimentTemplate.go +++ b/service/fis/api_op_CreateExperimentTemplate.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateExperimentTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateExperimentTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/fis/api_op_CreateTargetAccountConfiguration.go b/service/fis/api_op_CreateTargetAccountConfiguration.go index b979368a197..472e1af09c7 100644 --- a/service/fis/api_op_CreateTargetAccountConfiguration.go +++ b/service/fis/api_op_CreateTargetAccountConfiguration.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateTargetAccountConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTargetAccountConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/fis/api_op_DeleteExperimentTemplate.go b/service/fis/api_op_DeleteExperimentTemplate.go index 54e53b6df81..e4140972d57 100644 --- a/service/fis/api_op_DeleteExperimentTemplate.go +++ b/service/fis/api_op_DeleteExperimentTemplate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteExperimentTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExperimentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_DeleteTargetAccountConfiguration.go b/service/fis/api_op_DeleteTargetAccountConfiguration.go index 2907fd3833c..693e9f35361 100644 --- a/service/fis/api_op_DeleteTargetAccountConfiguration.go +++ b/service/fis/api_op_DeleteTargetAccountConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteTargetAccountConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTargetAccountConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_GetAction.go b/service/fis/api_op_GetAction.go index d648e213130..f217cab6542 100644 --- a/service/fis/api_op_GetAction.go +++ b/service/fis/api_op_GetAction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetActionMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_GetExperiment.go b/service/fis/api_op_GetExperiment.go index 08460e5eb9f..94a783bba5f 100644 --- a/service/fis/api_op_GetExperiment.go +++ b/service/fis/api_op_GetExperiment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetExperimentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_GetExperimentTargetAccountConfiguration.go b/service/fis/api_op_GetExperimentTargetAccountConfiguration.go index 5ec64bc0677..cb06595466c 100644 --- a/service/fis/api_op_GetExperimentTargetAccountConfiguration.go +++ b/service/fis/api_op_GetExperimentTargetAccountConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetExperimentTargetAccountConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExperimentTargetAccountConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_GetExperimentTemplate.go b/service/fis/api_op_GetExperimentTemplate.go index ca350f67dce..fb917f9cbda 100644 --- a/service/fis/api_op_GetExperimentTemplate.go +++ b/service/fis/api_op_GetExperimentTemplate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetExperimentTemplateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExperimentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_GetTargetAccountConfiguration.go b/service/fis/api_op_GetTargetAccountConfiguration.go index 7aab7a36216..c69e5d9750a 100644 --- a/service/fis/api_op_GetTargetAccountConfiguration.go +++ b/service/fis/api_op_GetTargetAccountConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetTargetAccountConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTargetAccountConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_GetTargetResourceType.go b/service/fis/api_op_GetTargetResourceType.go index 038cc0d6bb3..3abe02f4a90 100644 --- a/service/fis/api_op_GetTargetResourceType.go +++ b/service/fis/api_op_GetTargetResourceType.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetTargetResourceTypeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTargetResourceTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_ListActions.go b/service/fis/api_op_ListActions.go index 05118a9d1eb..1e5bf6a5513 100644 --- a/service/fis/api_op_ListActions.go +++ b/service/fis/api_op_ListActions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListActionsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActions(options.Region), middleware.Before); err != nil { return err } @@ -133,13 +136,6 @@ func (c *Client) addOperationListActionsMiddlewares(stack *middleware.Stack, opt return nil } -// ListActionsAPIClient is a client that implements the ListActions operation. -type ListActionsAPIClient interface { - ListActions(context.Context, *ListActionsInput, ...func(*Options)) (*ListActionsOutput, error) -} - -var _ ListActionsAPIClient = (*Client)(nil) - // ListActionsPaginatorOptions is the paginator options for ListActions type ListActionsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -204,6 +200,9 @@ func (p *ListActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListActionsAPIClient is a client that implements the ListActions operation. +type ListActionsAPIClient interface { + ListActions(context.Context, *ListActionsInput, ...func(*Options)) (*ListActionsOutput, error) +} + +var _ ListActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fis/api_op_ListExperimentResolvedTargets.go b/service/fis/api_op_ListExperimentResolvedTargets.go index c1646811230..02b6c6edac1 100644 --- a/service/fis/api_op_ListExperimentResolvedTargets.go +++ b/service/fis/api_op_ListExperimentResolvedTargets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListExperimentResolvedTargetsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExperimentResolvedTargetsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListExperimentResolvedTargetsMiddlewares(stack *mid return nil } -// ListExperimentResolvedTargetsAPIClient is a client that implements the -// ListExperimentResolvedTargets operation. -type ListExperimentResolvedTargetsAPIClient interface { - ListExperimentResolvedTargets(context.Context, *ListExperimentResolvedTargetsInput, ...func(*Options)) (*ListExperimentResolvedTargetsOutput, error) -} - -var _ ListExperimentResolvedTargetsAPIClient = (*Client)(nil) - // ListExperimentResolvedTargetsPaginatorOptions is the paginator options for // ListExperimentResolvedTargets type ListExperimentResolvedTargetsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListExperimentResolvedTargetsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperimentResolvedTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListExperimentResolvedTargetsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListExperimentResolvedTargetsAPIClient is a client that implements the +// ListExperimentResolvedTargets operation. +type ListExperimentResolvedTargetsAPIClient interface { + ListExperimentResolvedTargets(context.Context, *ListExperimentResolvedTargetsInput, ...func(*Options)) (*ListExperimentResolvedTargetsOutput, error) +} + +var _ ListExperimentResolvedTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperimentResolvedTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fis/api_op_ListExperimentTargetAccountConfigurations.go b/service/fis/api_op_ListExperimentTargetAccountConfigurations.go index 770b523d1a0..2047540b7a5 100644 --- a/service/fis/api_op_ListExperimentTargetAccountConfigurations.go +++ b/service/fis/api_op_ListExperimentTargetAccountConfigurations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListExperimentTargetAccountConfigurationsMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExperimentTargetAccountConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_ListExperimentTemplates.go b/service/fis/api_op_ListExperimentTemplates.go index 2fd8d4401c4..722d03a6c9a 100644 --- a/service/fis/api_op_ListExperimentTemplates.go +++ b/service/fis/api_op_ListExperimentTemplates.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListExperimentTemplatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExperimentTemplates(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListExperimentTemplatesMiddlewares(stack *middlewar return nil } -// ListExperimentTemplatesAPIClient is a client that implements the -// ListExperimentTemplates operation. -type ListExperimentTemplatesAPIClient interface { - ListExperimentTemplates(context.Context, *ListExperimentTemplatesInput, ...func(*Options)) (*ListExperimentTemplatesOutput, error) -} - -var _ ListExperimentTemplatesAPIClient = (*Client)(nil) - // ListExperimentTemplatesPaginatorOptions is the paginator options for // ListExperimentTemplates type ListExperimentTemplatesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListExperimentTemplatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperimentTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListExperimentTemplatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListExperimentTemplatesAPIClient is a client that implements the +// ListExperimentTemplates operation. +type ListExperimentTemplatesAPIClient interface { + ListExperimentTemplates(context.Context, *ListExperimentTemplatesInput, ...func(*Options)) (*ListExperimentTemplatesOutput, error) +} + +var _ ListExperimentTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperimentTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fis/api_op_ListExperiments.go b/service/fis/api_op_ListExperiments.go index 0cebe52146a..546d2931e69 100644 --- a/service/fis/api_op_ListExperiments.go +++ b/service/fis/api_op_ListExperiments.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExperiments(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, return nil } -// ListExperimentsAPIClient is a client that implements the ListExperiments -// operation. -type ListExperimentsAPIClient interface { - ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) -} - -var _ ListExperimentsAPIClient = (*Client)(nil) - // ListExperimentsPaginatorOptions is the paginator options for ListExperiments type ListExperimentsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -208,6 +203,9 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperiments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListExperimentsAPIClient is a client that implements the ListExperiments +// operation. +type ListExperimentsAPIClient interface { + ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) +} + +var _ ListExperimentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperiments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fis/api_op_ListTagsForResource.go b/service/fis/api_op_ListTagsForResource.go index eb7707565aa..d05d805cd2d 100644 --- a/service/fis/api_op_ListTagsForResource.go +++ b/service/fis/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_ListTargetAccountConfigurations.go b/service/fis/api_op_ListTargetAccountConfigurations.go index c43d85c8241..b83e5cee5fa 100644 --- a/service/fis/api_op_ListTargetAccountConfigurations.go +++ b/service/fis/api_op_ListTargetAccountConfigurations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTargetAccountConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetAccountConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTargetAccountConfigurationsMiddlewares(stack *m return nil } -// ListTargetAccountConfigurationsAPIClient is a client that implements the -// ListTargetAccountConfigurations operation. -type ListTargetAccountConfigurationsAPIClient interface { - ListTargetAccountConfigurations(context.Context, *ListTargetAccountConfigurationsInput, ...func(*Options)) (*ListTargetAccountConfigurationsOutput, error) -} - -var _ ListTargetAccountConfigurationsAPIClient = (*Client)(nil) - // ListTargetAccountConfigurationsPaginatorOptions is the paginator options for // ListTargetAccountConfigurations type ListTargetAccountConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListTargetAccountConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetAccountConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTargetAccountConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListTargetAccountConfigurationsAPIClient is a client that implements the +// ListTargetAccountConfigurations operation. +type ListTargetAccountConfigurationsAPIClient interface { + ListTargetAccountConfigurations(context.Context, *ListTargetAccountConfigurationsInput, ...func(*Options)) (*ListTargetAccountConfigurationsOutput, error) +} + +var _ ListTargetAccountConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetAccountConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fis/api_op_ListTargetResourceTypes.go b/service/fis/api_op_ListTargetResourceTypes.go index 3f2880e289e..19ab6e42ea1 100644 --- a/service/fis/api_op_ListTargetResourceTypes.go +++ b/service/fis/api_op_ListTargetResourceTypes.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTargetResourceTypesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTargetResourceTypes(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListTargetResourceTypesMiddlewares(stack *middlewar return nil } -// ListTargetResourceTypesAPIClient is a client that implements the -// ListTargetResourceTypes operation. -type ListTargetResourceTypesAPIClient interface { - ListTargetResourceTypes(context.Context, *ListTargetResourceTypesInput, ...func(*Options)) (*ListTargetResourceTypesOutput, error) -} - -var _ ListTargetResourceTypesAPIClient = (*Client)(nil) - // ListTargetResourceTypesPaginatorOptions is the paginator options for // ListTargetResourceTypes type ListTargetResourceTypesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListTargetResourceTypesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetResourceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListTargetResourceTypesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTargetResourceTypesAPIClient is a client that implements the +// ListTargetResourceTypes operation. +type ListTargetResourceTypesAPIClient interface { + ListTargetResourceTypes(context.Context, *ListTargetResourceTypesInput, ...func(*Options)) (*ListTargetResourceTypesOutput, error) +} + +var _ ListTargetResourceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetResourceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fis/api_op_StartExperiment.go b/service/fis/api_op_StartExperiment.go index 76758dc3ce6..d8bdd333cd9 100644 --- a/service/fis/api_op_StartExperiment.go +++ b/service/fis/api_op_StartExperiment.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStartExperimentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartExperimentMiddleware(stack, options); err != nil { return err } diff --git a/service/fis/api_op_StopExperiment.go b/service/fis/api_op_StopExperiment.go index 5b94459764a..52916b508ee 100644 --- a/service/fis/api_op_StopExperiment.go +++ b/service/fis/api_op_StopExperiment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopExperimentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_TagResource.go b/service/fis/api_op_TagResource.go index b93735156e8..d14990d54f1 100644 --- a/service/fis/api_op_TagResource.go +++ b/service/fis/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_UntagResource.go b/service/fis/api_op_UntagResource.go index be84b0eb6a2..ae12c51c7ad 100644 --- a/service/fis/api_op_UntagResource.go +++ b/service/fis/api_op_UntagResource.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_UpdateExperimentTemplate.go b/service/fis/api_op_UpdateExperimentTemplate.go index fd3f3bfbfba..3f78be490c2 100644 --- a/service/fis/api_op_UpdateExperimentTemplate.go +++ b/service/fis/api_op_UpdateExperimentTemplate.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateExperimentTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExperimentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/fis/api_op_UpdateTargetAccountConfiguration.go b/service/fis/api_op_UpdateTargetAccountConfiguration.go index 581786853b5..3aa8046383d 100644 --- a/service/fis/api_op_UpdateTargetAccountConfiguration.go +++ b/service/fis/api_op_UpdateTargetAccountConfiguration.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateTargetAccountConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTargetAccountConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_client.go b/service/fms/api_client.go index 58d61e6e8f8..01bcd975e89 100644 --- a/service/fms/api_client.go +++ b/service/fms/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/fms/api_op_AssociateAdminAccount.go b/service/fms/api_op_AssociateAdminAccount.go index ffae71f4bac..5715b099c88 100644 --- a/service/fms/api_op_AssociateAdminAccount.go +++ b/service/fms/api_op_AssociateAdminAccount.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAssociateAdminAccountMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_AssociateThirdPartyFirewall.go b/service/fms/api_op_AssociateThirdPartyFirewall.go index 80444d73dad..87b81b8a04a 100644 --- a/service/fms/api_op_AssociateThirdPartyFirewall.go +++ b/service/fms/api_op_AssociateThirdPartyFirewall.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAssociateThirdPartyFirewallMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateThirdPartyFirewallValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_BatchAssociateResource.go b/service/fms/api_op_BatchAssociateResource.go index 42f1b2f2fd7..0709b22120a 100644 --- a/service/fms/api_op_BatchAssociateResource.go +++ b/service/fms/api_op_BatchAssociateResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationBatchAssociateResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_BatchDisassociateResource.go b/service/fms/api_op_BatchDisassociateResource.go index 727598c5129..ae055436537 100644 --- a/service/fms/api_op_BatchDisassociateResource.go +++ b/service/fms/api_op_BatchDisassociateResource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationBatchDisassociateResourceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_DeleteAppsList.go b/service/fms/api_op_DeleteAppsList.go index 0f6ca5b463d..644dc2c9bd8 100644 --- a/service/fms/api_op_DeleteAppsList.go +++ b/service/fms/api_op_DeleteAppsList.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAppsListMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppsListValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_DeleteNotificationChannel.go b/service/fms/api_op_DeleteNotificationChannel.go index f9a252ce9cd..4f6c0709325 100644 --- a/service/fms/api_op_DeleteNotificationChannel.go +++ b/service/fms/api_op_DeleteNotificationChannel.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteNotificationChannelMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNotificationChannel(options.Region), middleware.Before); err != nil { return err } diff --git a/service/fms/api_op_DeletePolicy.go b/service/fms/api_op_DeletePolicy.go index bfa3c49163f..6db42d3dece 100644 --- a/service/fms/api_op_DeletePolicy.go +++ b/service/fms/api_op_DeletePolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_DeleteProtocolsList.go b/service/fms/api_op_DeleteProtocolsList.go index cd18c812365..672e3a6aafb 100644 --- a/service/fms/api_op_DeleteProtocolsList.go +++ b/service/fms/api_op_DeleteProtocolsList.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteProtocolsListMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProtocolsListValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_DeleteResourceSet.go b/service/fms/api_op_DeleteResourceSet.go index fc6dac3c9e4..8056fc6247a 100644 --- a/service/fms/api_op_DeleteResourceSet.go +++ b/service/fms/api_op_DeleteResourceSet.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteResourceSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_DisassociateAdminAccount.go b/service/fms/api_op_DisassociateAdminAccount.go index 0c478a847ac..719841777f6 100644 --- a/service/fms/api_op_DisassociateAdminAccount.go +++ b/service/fms/api_op_DisassociateAdminAccount.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDisassociateAdminAccountMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateAdminAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/fms/api_op_DisassociateThirdPartyFirewall.go b/service/fms/api_op_DisassociateThirdPartyFirewall.go index f0d9a96ceeb..9389a323392 100644 --- a/service/fms/api_op_DisassociateThirdPartyFirewall.go +++ b/service/fms/api_op_DisassociateThirdPartyFirewall.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisassociateThirdPartyFirewallMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateThirdPartyFirewallValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetAdminAccount.go b/service/fms/api_op_GetAdminAccount.go index 005be9884f3..e03969bb73c 100644 --- a/service/fms/api_op_GetAdminAccount.go +++ b/service/fms/api_op_GetAdminAccount.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetAdminAccountMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAdminAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/fms/api_op_GetAdminScope.go b/service/fms/api_op_GetAdminScope.go index 76c86c3a0fc..3021c13d4c6 100644 --- a/service/fms/api_op_GetAdminScope.go +++ b/service/fms/api_op_GetAdminScope.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetAdminScopeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAdminScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetAppsList.go b/service/fms/api_op_GetAppsList.go index 6961a03acf7..feb4617bf88 100644 --- a/service/fms/api_op_GetAppsList.go +++ b/service/fms/api_op_GetAppsList.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetAppsListMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppsListValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetComplianceDetail.go b/service/fms/api_op_GetComplianceDetail.go index fdf82a08834..2abe42d51c5 100644 --- a/service/fms/api_op_GetComplianceDetail.go +++ b/service/fms/api_op_GetComplianceDetail.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetComplianceDetailMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComplianceDetailValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetNotificationChannel.go b/service/fms/api_op_GetNotificationChannel.go index b13a56caa97..51062df5733 100644 --- a/service/fms/api_op_GetNotificationChannel.go +++ b/service/fms/api_op_GetNotificationChannel.go @@ -103,6 +103,9 @@ func (c *Client) addOperationGetNotificationChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNotificationChannel(options.Region), middleware.Before); err != nil { return err } diff --git a/service/fms/api_op_GetPolicy.go b/service/fms/api_op_GetPolicy.go index 1054a5dbc8c..41abc3f8d4f 100644 --- a/service/fms/api_op_GetPolicy.go +++ b/service/fms/api_op_GetPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetProtectionStatus.go b/service/fms/api_op_GetProtectionStatus.go index 0c40dd8c5f2..ba189048f6e 100644 --- a/service/fms/api_op_GetProtectionStatus.go +++ b/service/fms/api_op_GetProtectionStatus.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetProtectionStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProtectionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetProtocolsList.go b/service/fms/api_op_GetProtocolsList.go index 88a7d3a9f3a..702df1676b1 100644 --- a/service/fms/api_op_GetProtocolsList.go +++ b/service/fms/api_op_GetProtocolsList.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetProtocolsListMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProtocolsListValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetResourceSet.go b/service/fms/api_op_GetResourceSet.go index 2c5fc0fa3ac..08bf9ae03d8 100644 --- a/service/fms/api_op_GetResourceSet.go +++ b/service/fms/api_op_GetResourceSet.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetResourceSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetThirdPartyFirewallAssociationStatus.go b/service/fms/api_op_GetThirdPartyFirewallAssociationStatus.go index 9724ffaf3f2..c576d354226 100644 --- a/service/fms/api_op_GetThirdPartyFirewallAssociationStatus.go +++ b/service/fms/api_op_GetThirdPartyFirewallAssociationStatus.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetThirdPartyFirewallAssociationStatusMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetThirdPartyFirewallAssociationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_GetViolationDetails.go b/service/fms/api_op_GetViolationDetails.go index e57d2c53ecf..f2916f34346 100644 --- a/service/fms/api_op_GetViolationDetails.go +++ b/service/fms/api_op_GetViolationDetails.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetViolationDetailsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetViolationDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_ListAdminAccountsForOrganization.go b/service/fms/api_op_ListAdminAccountsForOrganization.go index 4e71ce17e52..74dfd41b1f2 100644 --- a/service/fms/api_op_ListAdminAccountsForOrganization.go +++ b/service/fms/api_op_ListAdminAccountsForOrganization.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAdminAccountsForOrganizationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAdminAccountsForOrganization(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListAdminAccountsForOrganizationMiddlewares(stack * return nil } -// ListAdminAccountsForOrganizationAPIClient is a client that implements the -// ListAdminAccountsForOrganization operation. -type ListAdminAccountsForOrganizationAPIClient interface { - ListAdminAccountsForOrganization(context.Context, *ListAdminAccountsForOrganizationInput, ...func(*Options)) (*ListAdminAccountsForOrganizationOutput, error) -} - -var _ ListAdminAccountsForOrganizationAPIClient = (*Client)(nil) - // ListAdminAccountsForOrganizationPaginatorOptions is the paginator options for // ListAdminAccountsForOrganization type ListAdminAccountsForOrganizationPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListAdminAccountsForOrganizationPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAdminAccountsForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListAdminAccountsForOrganizationPaginator) NextPage(ctx context.Context return result, nil } +// ListAdminAccountsForOrganizationAPIClient is a client that implements the +// ListAdminAccountsForOrganization operation. +type ListAdminAccountsForOrganizationAPIClient interface { + ListAdminAccountsForOrganization(context.Context, *ListAdminAccountsForOrganizationInput, ...func(*Options)) (*ListAdminAccountsForOrganizationOutput, error) +} + +var _ ListAdminAccountsForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAdminAccountsForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListAdminsManagingAccount.go b/service/fms/api_op_ListAdminsManagingAccount.go index 9e0558843bf..94e9f99ff9b 100644 --- a/service/fms/api_op_ListAdminsManagingAccount.go +++ b/service/fms/api_op_ListAdminsManagingAccount.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListAdminsManagingAccountMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAdminsManagingAccount(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListAdminsManagingAccountMiddlewares(stack *middlew return nil } -// ListAdminsManagingAccountAPIClient is a client that implements the -// ListAdminsManagingAccount operation. -type ListAdminsManagingAccountAPIClient interface { - ListAdminsManagingAccount(context.Context, *ListAdminsManagingAccountInput, ...func(*Options)) (*ListAdminsManagingAccountOutput, error) -} - -var _ ListAdminsManagingAccountAPIClient = (*Client)(nil) - // ListAdminsManagingAccountPaginatorOptions is the paginator options for // ListAdminsManagingAccount type ListAdminsManagingAccountPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListAdminsManagingAccountPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAdminsManagingAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListAdminsManagingAccountPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAdminsManagingAccountAPIClient is a client that implements the +// ListAdminsManagingAccount operation. +type ListAdminsManagingAccountAPIClient interface { + ListAdminsManagingAccount(context.Context, *ListAdminsManagingAccountInput, ...func(*Options)) (*ListAdminsManagingAccountOutput, error) +} + +var _ ListAdminsManagingAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAdminsManagingAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListAppsLists.go b/service/fms/api_op_ListAppsLists.go index b6f170b6360..30bb60260e6 100644 --- a/service/fms/api_op_ListAppsLists.go +++ b/service/fms/api_op_ListAppsLists.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListAppsListsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppsListsValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListAppsListsMiddlewares(stack *middleware.Stack, o return nil } -// ListAppsListsAPIClient is a client that implements the ListAppsLists operation. -type ListAppsListsAPIClient interface { - ListAppsLists(context.Context, *ListAppsListsInput, ...func(*Options)) (*ListAppsListsOutput, error) -} - -var _ ListAppsListsAPIClient = (*Client)(nil) - // ListAppsListsPaginatorOptions is the paginator options for ListAppsLists type ListAppsListsPaginatorOptions struct { // The maximum number of objects that you want Firewall Manager to return for this @@ -226,6 +222,9 @@ func (p *ListAppsListsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppsLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListAppsListsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListAppsListsAPIClient is a client that implements the ListAppsLists operation. +type ListAppsListsAPIClient interface { + ListAppsLists(context.Context, *ListAppsListsInput, ...func(*Options)) (*ListAppsListsOutput, error) +} + +var _ ListAppsListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppsLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListComplianceStatus.go b/service/fms/api_op_ListComplianceStatus.go index 1cab0b950c0..18d68f1d309 100644 --- a/service/fms/api_op_ListComplianceStatus.go +++ b/service/fms/api_op_ListComplianceStatus.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListComplianceStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComplianceStatusValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListComplianceStatusMiddlewares(stack *middleware.S return nil } -// ListComplianceStatusAPIClient is a client that implements the -// ListComplianceStatus operation. -type ListComplianceStatusAPIClient interface { - ListComplianceStatus(context.Context, *ListComplianceStatusInput, ...func(*Options)) (*ListComplianceStatusOutput, error) -} - -var _ ListComplianceStatusAPIClient = (*Client)(nil) - // ListComplianceStatusPaginatorOptions is the paginator options for // ListComplianceStatus type ListComplianceStatusPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListComplianceStatusPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComplianceStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListComplianceStatusPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListComplianceStatusAPIClient is a client that implements the +// ListComplianceStatus operation. +type ListComplianceStatusAPIClient interface { + ListComplianceStatus(context.Context, *ListComplianceStatusInput, ...func(*Options)) (*ListComplianceStatusOutput, error) +} + +var _ ListComplianceStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComplianceStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListDiscoveredResources.go b/service/fms/api_op_ListDiscoveredResources.go index c90b65db2a5..fb84022d146 100644 --- a/service/fms/api_op_ListDiscoveredResources.go +++ b/service/fms/api_op_ListDiscoveredResources.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListDiscoveredResourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDiscoveredResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_ListMemberAccounts.go b/service/fms/api_op_ListMemberAccounts.go index d2c3ff4615a..b1805a8e7aa 100644 --- a/service/fms/api_op_ListMemberAccounts.go +++ b/service/fms/api_op_ListMemberAccounts.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListMemberAccountsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMemberAccounts(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListMemberAccountsMiddlewares(stack *middleware.Sta return nil } -// ListMemberAccountsAPIClient is a client that implements the ListMemberAccounts -// operation. -type ListMemberAccountsAPIClient interface { - ListMemberAccounts(context.Context, *ListMemberAccountsInput, ...func(*Options)) (*ListMemberAccountsOutput, error) -} - -var _ ListMemberAccountsAPIClient = (*Client)(nil) - // ListMemberAccountsPaginatorOptions is the paginator options for // ListMemberAccounts type ListMemberAccountsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListMemberAccountsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMemberAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListMemberAccountsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListMemberAccountsAPIClient is a client that implements the ListMemberAccounts +// operation. +type ListMemberAccountsAPIClient interface { + ListMemberAccounts(context.Context, *ListMemberAccountsInput, ...func(*Options)) (*ListMemberAccountsOutput, error) +} + +var _ ListMemberAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMemberAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListPolicies.go b/service/fms/api_op_ListPolicies.go index b8a33a58f48..95925f0a3c9 100644 --- a/service/fms/api_op_ListPolicies.go +++ b/service/fms/api_op_ListPolicies.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op return nil } -// ListPoliciesAPIClient is a client that implements the ListPolicies operation. -type ListPoliciesAPIClient interface { - ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) -} - -var _ ListPoliciesAPIClient = (*Client)(nil) - // ListPoliciesPaginatorOptions is the paginator options for ListPolicies type ListPoliciesPaginatorOptions struct { // Specifies the number of PolicySummary objects that you want Firewall Manager to @@ -216,6 +212,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListProtocolsLists.go b/service/fms/api_op_ListProtocolsLists.go index b3008ebb435..61f7d83d918 100644 --- a/service/fms/api_op_ListProtocolsLists.go +++ b/service/fms/api_op_ListProtocolsLists.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListProtocolsListsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProtocolsListsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListProtocolsListsMiddlewares(stack *middleware.Sta return nil } -// ListProtocolsListsAPIClient is a client that implements the ListProtocolsLists -// operation. -type ListProtocolsListsAPIClient interface { - ListProtocolsLists(context.Context, *ListProtocolsListsInput, ...func(*Options)) (*ListProtocolsListsOutput, error) -} - -var _ ListProtocolsListsAPIClient = (*Client)(nil) - // ListProtocolsListsPaginatorOptions is the paginator options for // ListProtocolsLists type ListProtocolsListsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListProtocolsListsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProtocolsLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListProtocolsListsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListProtocolsListsAPIClient is a client that implements the ListProtocolsLists +// operation. +type ListProtocolsListsAPIClient interface { + ListProtocolsLists(context.Context, *ListProtocolsListsInput, ...func(*Options)) (*ListProtocolsListsOutput, error) +} + +var _ ListProtocolsListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProtocolsLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_ListResourceSetResources.go b/service/fms/api_op_ListResourceSetResources.go index 146cd94a75d..bcd1417676f 100644 --- a/service/fms/api_op_ListResourceSetResources.go +++ b/service/fms/api_op_ListResourceSetResources.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListResourceSetResourcesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceSetResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_ListResourceSets.go b/service/fms/api_op_ListResourceSets.go index 010a84c2b6b..fe135c43b21 100644 --- a/service/fms/api_op_ListResourceSets.go +++ b/service/fms/api_op_ListResourceSets.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListResourceSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/fms/api_op_ListTagsForResource.go b/service/fms/api_op_ListTagsForResource.go index 5eb99b4e34a..fbc7e0581fa 100644 --- a/service/fms/api_op_ListTagsForResource.go +++ b/service/fms/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_ListThirdPartyFirewallFirewallPolicies.go b/service/fms/api_op_ListThirdPartyFirewallFirewallPolicies.go index ccbeda3e71d..303de74817c 100644 --- a/service/fms/api_op_ListThirdPartyFirewallFirewallPolicies.go +++ b/service/fms/api_op_ListThirdPartyFirewallFirewallPolicies.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListThirdPartyFirewallFirewallPoliciesMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThirdPartyFirewallFirewallPoliciesValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListThirdPartyFirewallFirewallPoliciesMiddlewares(s return nil } -// ListThirdPartyFirewallFirewallPoliciesAPIClient is a client that implements the -// ListThirdPartyFirewallFirewallPolicies operation. -type ListThirdPartyFirewallFirewallPoliciesAPIClient interface { - ListThirdPartyFirewallFirewallPolicies(context.Context, *ListThirdPartyFirewallFirewallPoliciesInput, ...func(*Options)) (*ListThirdPartyFirewallFirewallPoliciesOutput, error) -} - -var _ ListThirdPartyFirewallFirewallPoliciesAPIClient = (*Client)(nil) - // ListThirdPartyFirewallFirewallPoliciesPaginatorOptions is the paginator options // for ListThirdPartyFirewallFirewallPolicies type ListThirdPartyFirewallFirewallPoliciesPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListThirdPartyFirewallFirewallPoliciesPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThirdPartyFirewallFirewallPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListThirdPartyFirewallFirewallPoliciesPaginator) NextPage(ctx context.C return result, nil } +// ListThirdPartyFirewallFirewallPoliciesAPIClient is a client that implements the +// ListThirdPartyFirewallFirewallPolicies operation. +type ListThirdPartyFirewallFirewallPoliciesAPIClient interface { + ListThirdPartyFirewallFirewallPolicies(context.Context, *ListThirdPartyFirewallFirewallPoliciesInput, ...func(*Options)) (*ListThirdPartyFirewallFirewallPoliciesOutput, error) +} + +var _ ListThirdPartyFirewallFirewallPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThirdPartyFirewallFirewallPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fms/api_op_PutAdminAccount.go b/service/fms/api_op_PutAdminAccount.go index 224fc0b9fbf..219656318f6 100644 --- a/service/fms/api_op_PutAdminAccount.go +++ b/service/fms/api_op_PutAdminAccount.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutAdminAccountMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_PutAppsList.go b/service/fms/api_op_PutAppsList.go index 8e179a65dc2..40e28fadb8c 100644 --- a/service/fms/api_op_PutAppsList.go +++ b/service/fms/api_op_PutAppsList.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutAppsListMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAppsListValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_PutNotificationChannel.go b/service/fms/api_op_PutNotificationChannel.go index 7b0a3224f2f..53f02722502 100644 --- a/service/fms/api_op_PutNotificationChannel.go +++ b/service/fms/api_op_PutNotificationChannel.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutNotificationChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutNotificationChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_PutPolicy.go b/service/fms/api_op_PutPolicy.go index 13074713e20..afd8720bf97 100644 --- a/service/fms/api_op_PutPolicy.go +++ b/service/fms/api_op_PutPolicy.go @@ -159,6 +159,9 @@ func (c *Client) addOperationPutPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_PutProtocolsList.go b/service/fms/api_op_PutProtocolsList.go index e3377c6356b..4411e1d6a79 100644 --- a/service/fms/api_op_PutProtocolsList.go +++ b/service/fms/api_op_PutProtocolsList.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutProtocolsListMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutProtocolsListValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_PutResourceSet.go b/service/fms/api_op_PutResourceSet.go index 612649679df..931b5dc481b 100644 --- a/service/fms/api_op_PutResourceSet.go +++ b/service/fms/api_op_PutResourceSet.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutResourceSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_TagResource.go b/service/fms/api_op_TagResource.go index f4067f013b6..6e6a1be1e34 100644 --- a/service/fms/api_op_TagResource.go +++ b/service/fms/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fms/api_op_UntagResource.go b/service/fms/api_op_UntagResource.go index 0f343bef8d0..956ca9416f4 100644 --- a/service/fms/api_op_UntagResource.go +++ b/service/fms/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_client.go b/service/forecast/api_client.go index 52c0912a839..ef2fc8f1e19 100644 --- a/service/forecast/api_client.go +++ b/service/forecast/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/forecast/api_op_CreateAutoPredictor.go b/service/forecast/api_op_CreateAutoPredictor.go index ed4267e153a..7d2345d2d26 100644 --- a/service/forecast/api_op_CreateAutoPredictor.go +++ b/service/forecast/api_op_CreateAutoPredictor.go @@ -262,6 +262,9 @@ func (c *Client) addOperationCreateAutoPredictorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAutoPredictorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateDataset.go b/service/forecast/api_op_CreateDataset.go index 93dede5f934..efcc87da2cf 100644 --- a/service/forecast/api_op_CreateDataset.go +++ b/service/forecast/api_op_CreateDataset.go @@ -226,6 +226,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateDatasetGroup.go b/service/forecast/api_op_CreateDatasetGroup.go index fd320f8bda1..bff4eda2236 100644 --- a/service/forecast/api_op_CreateDatasetGroup.go +++ b/service/forecast/api_op_CreateDatasetGroup.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateDatasetGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateDatasetImportJob.go b/service/forecast/api_op_CreateDatasetImportJob.go index 3daacab7f49..58a3b1577b6 100644 --- a/service/forecast/api_op_CreateDatasetImportJob.go +++ b/service/forecast/api_op_CreateDatasetImportJob.go @@ -234,6 +234,9 @@ func (c *Client) addOperationCreateDatasetImportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateExplainability.go b/service/forecast/api_op_CreateExplainability.go index 9c22b56691f..654de733767 100644 --- a/service/forecast/api_op_CreateExplainability.go +++ b/service/forecast/api_op_CreateExplainability.go @@ -243,6 +243,9 @@ func (c *Client) addOperationCreateExplainabilityMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExplainabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateExplainabilityExport.go b/service/forecast/api_op_CreateExplainabilityExport.go index 87c9d5307d2..0ac92786820 100644 --- a/service/forecast/api_op_CreateExplainabilityExport.go +++ b/service/forecast/api_op_CreateExplainabilityExport.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateExplainabilityExportMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExplainabilityExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateForecast.go b/service/forecast/api_op_CreateForecast.go index 37780d8a675..4b2aee33594 100644 --- a/service/forecast/api_op_CreateForecast.go +++ b/service/forecast/api_op_CreateForecast.go @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateForecastMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateForecastExportJob.go b/service/forecast/api_op_CreateForecastExportJob.go index d5ecdf09cf2..3764a6a3ccf 100644 --- a/service/forecast/api_op_CreateForecastExportJob.go +++ b/service/forecast/api_op_CreateForecastExportJob.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateForecastExportJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateForecastExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateMonitor.go b/service/forecast/api_op_CreateMonitor.go index 1d7810b87d8..38baa6af836 100644 --- a/service/forecast/api_op_CreateMonitor.go +++ b/service/forecast/api_op_CreateMonitor.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreatePredictor.go b/service/forecast/api_op_CreatePredictor.go index f3df621333e..0cac10723dc 100644 --- a/service/forecast/api_op_CreatePredictor.go +++ b/service/forecast/api_op_CreatePredictor.go @@ -307,6 +307,9 @@ func (c *Client) addOperationCreatePredictorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePredictorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreatePredictorBacktestExportJob.go b/service/forecast/api_op_CreatePredictorBacktestExportJob.go index 534e6230be8..d39b0272716 100644 --- a/service/forecast/api_op_CreatePredictorBacktestExportJob.go +++ b/service/forecast/api_op_CreatePredictorBacktestExportJob.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreatePredictorBacktestExportJobMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePredictorBacktestExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateWhatIfAnalysis.go b/service/forecast/api_op_CreateWhatIfAnalysis.go index ad1f68441b0..1484b36f061 100644 --- a/service/forecast/api_op_CreateWhatIfAnalysis.go +++ b/service/forecast/api_op_CreateWhatIfAnalysis.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateWhatIfAnalysisMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWhatIfAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateWhatIfForecast.go b/service/forecast/api_op_CreateWhatIfForecast.go index 2cdee747a51..6651b004b51 100644 --- a/service/forecast/api_op_CreateWhatIfForecast.go +++ b/service/forecast/api_op_CreateWhatIfForecast.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateWhatIfForecastMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWhatIfForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_CreateWhatIfForecastExport.go b/service/forecast/api_op_CreateWhatIfForecastExport.go index a9297818be5..c43930b6d7c 100644 --- a/service/forecast/api_op_CreateWhatIfForecastExport.go +++ b/service/forecast/api_op_CreateWhatIfForecastExport.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateWhatIfForecastExportMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWhatIfForecastExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteDataset.go b/service/forecast/api_op_DeleteDataset.go index 83de60c14ba..85667522e33 100644 --- a/service/forecast/api_op_DeleteDataset.go +++ b/service/forecast/api_op_DeleteDataset.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteDatasetGroup.go b/service/forecast/api_op_DeleteDatasetGroup.go index 74ceb4ac6bc..31f4ccf452f 100644 --- a/service/forecast/api_op_DeleteDatasetGroup.go +++ b/service/forecast/api_op_DeleteDatasetGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDatasetGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteDatasetImportJob.go b/service/forecast/api_op_DeleteDatasetImportJob.go index aabbff2259a..2c8e5a56e0e 100644 --- a/service/forecast/api_op_DeleteDatasetImportJob.go +++ b/service/forecast/api_op_DeleteDatasetImportJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDatasetImportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteExplainability.go b/service/forecast/api_op_DeleteExplainability.go index 5ca57f0e303..c7e94350957 100644 --- a/service/forecast/api_op_DeleteExplainability.go +++ b/service/forecast/api_op_DeleteExplainability.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteExplainabilityMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExplainabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteExplainabilityExport.go b/service/forecast/api_op_DeleteExplainabilityExport.go index 28677c2bfe6..00375469e97 100644 --- a/service/forecast/api_op_DeleteExplainabilityExport.go +++ b/service/forecast/api_op_DeleteExplainabilityExport.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteExplainabilityExportMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExplainabilityExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteForecast.go b/service/forecast/api_op_DeleteForecast.go index 1950a61d95d..c33b5140841 100644 --- a/service/forecast/api_op_DeleteForecast.go +++ b/service/forecast/api_op_DeleteForecast.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteForecastMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteForecastExportJob.go b/service/forecast/api_op_DeleteForecastExportJob.go index 313437e5589..369b4f9900a 100644 --- a/service/forecast/api_op_DeleteForecastExportJob.go +++ b/service/forecast/api_op_DeleteForecastExportJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteForecastExportJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteForecastExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteMonitor.go b/service/forecast/api_op_DeleteMonitor.go index 0a28720ce09..4074666e37b 100644 --- a/service/forecast/api_op_DeleteMonitor.go +++ b/service/forecast/api_op_DeleteMonitor.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeletePredictor.go b/service/forecast/api_op_DeletePredictor.go index 969da9ce331..c9df89d2842 100644 --- a/service/forecast/api_op_DeletePredictor.go +++ b/service/forecast/api_op_DeletePredictor.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeletePredictorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePredictorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeletePredictorBacktestExportJob.go b/service/forecast/api_op_DeletePredictorBacktestExportJob.go index b902df91db0..78d84bdf8c7 100644 --- a/service/forecast/api_op_DeletePredictorBacktestExportJob.go +++ b/service/forecast/api_op_DeletePredictorBacktestExportJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePredictorBacktestExportJobMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePredictorBacktestExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteResourceTree.go b/service/forecast/api_op_DeleteResourceTree.go index cb4407e4ab7..84eea723d6f 100644 --- a/service/forecast/api_op_DeleteResourceTree.go +++ b/service/forecast/api_op_DeleteResourceTree.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteResourceTreeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceTreeValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteWhatIfAnalysis.go b/service/forecast/api_op_DeleteWhatIfAnalysis.go index 4fac5cba0d0..c212e9bce9d 100644 --- a/service/forecast/api_op_DeleteWhatIfAnalysis.go +++ b/service/forecast/api_op_DeleteWhatIfAnalysis.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteWhatIfAnalysisMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWhatIfAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteWhatIfForecast.go b/service/forecast/api_op_DeleteWhatIfForecast.go index c7b268a4de5..6e6a72b069c 100644 --- a/service/forecast/api_op_DeleteWhatIfForecast.go +++ b/service/forecast/api_op_DeleteWhatIfForecast.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteWhatIfForecastMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWhatIfForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DeleteWhatIfForecastExport.go b/service/forecast/api_op_DeleteWhatIfForecastExport.go index d821f0a524b..05c24e2c222 100644 --- a/service/forecast/api_op_DeleteWhatIfForecastExport.go +++ b/service/forecast/api_op_DeleteWhatIfForecastExport.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteWhatIfForecastExportMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWhatIfForecastExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeAutoPredictor.go b/service/forecast/api_op_DescribeAutoPredictor.go index 247ade145b1..0d90a70300e 100644 --- a/service/forecast/api_op_DescribeAutoPredictor.go +++ b/service/forecast/api_op_DescribeAutoPredictor.go @@ -193,6 +193,9 @@ func (c *Client) addOperationDescribeAutoPredictorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAutoPredictorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeDataset.go b/service/forecast/api_op_DescribeDataset.go index 5a61a90f8b3..b0136b5175b 100644 --- a/service/forecast/api_op_DescribeDataset.go +++ b/service/forecast/api_op_DescribeDataset.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeDatasetGroup.go b/service/forecast/api_op_DescribeDatasetGroup.go index e35aeef689a..29b91fbfc8f 100644 --- a/service/forecast/api_op_DescribeDatasetGroup.go +++ b/service/forecast/api_op_DescribeDatasetGroup.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeDatasetGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeDatasetImportJob.go b/service/forecast/api_op_DescribeDatasetImportJob.go index fa768e6af08..34835a5dd21 100644 --- a/service/forecast/api_op_DescribeDatasetImportJob.go +++ b/service/forecast/api_op_DescribeDatasetImportJob.go @@ -207,6 +207,9 @@ func (c *Client) addOperationDescribeDatasetImportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeExplainability.go b/service/forecast/api_op_DescribeExplainability.go index 7be608a177d..648f4b0ea07 100644 --- a/service/forecast/api_op_DescribeExplainability.go +++ b/service/forecast/api_op_DescribeExplainability.go @@ -171,6 +171,9 @@ func (c *Client) addOperationDescribeExplainabilityMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExplainabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeExplainabilityExport.go b/service/forecast/api_op_DescribeExplainabilityExport.go index fe0a3b76cd2..83d90233afb 100644 --- a/service/forecast/api_op_DescribeExplainabilityExport.go +++ b/service/forecast/api_op_DescribeExplainabilityExport.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeExplainabilityExportMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExplainabilityExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeForecast.go b/service/forecast/api_op_DescribeForecast.go index ae8eb594f43..f0792ebbc97 100644 --- a/service/forecast/api_op_DescribeForecast.go +++ b/service/forecast/api_op_DescribeForecast.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDescribeForecastMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeForecastExportJob.go b/service/forecast/api_op_DescribeForecastExportJob.go index 0b93397598d..1df0223d466 100644 --- a/service/forecast/api_op_DescribeForecastExportJob.go +++ b/service/forecast/api_op_DescribeForecastExportJob.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeForecastExportJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeForecastExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeMonitor.go b/service/forecast/api_op_DescribeMonitor.go index a5c1207d439..9cc3d2ef734 100644 --- a/service/forecast/api_op_DescribeMonitor.go +++ b/service/forecast/api_op_DescribeMonitor.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDescribeMonitorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribePredictor.go b/service/forecast/api_op_DescribePredictor.go index e726cb479ec..118c0eeac6f 100644 --- a/service/forecast/api_op_DescribePredictor.go +++ b/service/forecast/api_op_DescribePredictor.go @@ -238,6 +238,9 @@ func (c *Client) addOperationDescribePredictorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePredictorValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribePredictorBacktestExportJob.go b/service/forecast/api_op_DescribePredictorBacktestExportJob.go index e6246012cce..82cc6d13c2a 100644 --- a/service/forecast/api_op_DescribePredictorBacktestExportJob.go +++ b/service/forecast/api_op_DescribePredictorBacktestExportJob.go @@ -164,6 +164,9 @@ func (c *Client) addOperationDescribePredictorBacktestExportJobMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePredictorBacktestExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeWhatIfAnalysis.go b/service/forecast/api_op_DescribeWhatIfAnalysis.go index 3625c4470f3..62fd60b46b9 100644 --- a/service/forecast/api_op_DescribeWhatIfAnalysis.go +++ b/service/forecast/api_op_DescribeWhatIfAnalysis.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeWhatIfAnalysisMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWhatIfAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeWhatIfForecast.go b/service/forecast/api_op_DescribeWhatIfForecast.go index 4221862b43f..defa4af86e1 100644 --- a/service/forecast/api_op_DescribeWhatIfForecast.go +++ b/service/forecast/api_op_DescribeWhatIfForecast.go @@ -176,6 +176,9 @@ func (c *Client) addOperationDescribeWhatIfForecastMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWhatIfForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_DescribeWhatIfForecastExport.go b/service/forecast/api_op_DescribeWhatIfForecastExport.go index 40231d7ce3b..6a8be9b2795 100644 --- a/service/forecast/api_op_DescribeWhatIfForecastExport.go +++ b/service/forecast/api_op_DescribeWhatIfForecastExport.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDescribeWhatIfForecastExportMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWhatIfForecastExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_GetAccuracyMetrics.go b/service/forecast/api_op_GetAccuracyMetrics.go index f541e511648..a2b711cc313 100644 --- a/service/forecast/api_op_GetAccuracyMetrics.go +++ b/service/forecast/api_op_GetAccuracyMetrics.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetAccuracyMetricsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccuracyMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_ListDatasetGroups.go b/service/forecast/api_op_ListDatasetGroups.go index b98d7b7b36d..46d7c593e05 100644 --- a/service/forecast/api_op_ListDatasetGroups.go +++ b/service/forecast/api_op_ListDatasetGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDatasetGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasetGroups(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDatasetGroupsMiddlewares(stack *middleware.Stac return nil } -// ListDatasetGroupsAPIClient is a client that implements the ListDatasetGroups -// operation. -type ListDatasetGroupsAPIClient interface { - ListDatasetGroups(context.Context, *ListDatasetGroupsInput, ...func(*Options)) (*ListDatasetGroupsOutput, error) -} - -var _ ListDatasetGroupsAPIClient = (*Client)(nil) - // ListDatasetGroupsPaginatorOptions is the paginator options for ListDatasetGroups type ListDatasetGroupsPaginatorOptions struct { // The number of items to return in the response. @@ -211,6 +206,9 @@ func (p *ListDatasetGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListDatasetGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListDatasetGroupsAPIClient is a client that implements the ListDatasetGroups +// operation. +type ListDatasetGroupsAPIClient interface { + ListDatasetGroups(context.Context, *ListDatasetGroupsInput, ...func(*Options)) (*ListDatasetGroupsOutput, error) +} + +var _ ListDatasetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListDatasetImportJobs.go b/service/forecast/api_op_ListDatasetImportJobs.go index 8a992e77099..166bd70a492 100644 --- a/service/forecast/api_op_ListDatasetImportJobs.go +++ b/service/forecast/api_op_ListDatasetImportJobs.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListDatasetImportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasetImportJobsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListDatasetImportJobsMiddlewares(stack *middleware. return nil } -// ListDatasetImportJobsAPIClient is a client that implements the -// ListDatasetImportJobs operation. -type ListDatasetImportJobsAPIClient interface { - ListDatasetImportJobs(context.Context, *ListDatasetImportJobsInput, ...func(*Options)) (*ListDatasetImportJobsOutput, error) -} - -var _ ListDatasetImportJobsAPIClient = (*Client)(nil) - // ListDatasetImportJobsPaginatorOptions is the paginator options for // ListDatasetImportJobs type ListDatasetImportJobsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListDatasetImportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListDatasetImportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDatasetImportJobsAPIClient is a client that implements the +// ListDatasetImportJobs operation. +type ListDatasetImportJobsAPIClient interface { + ListDatasetImportJobs(context.Context, *ListDatasetImportJobsInput, ...func(*Options)) (*ListDatasetImportJobsOutput, error) +} + +var _ ListDatasetImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListDatasets.go b/service/forecast/api_op_ListDatasets.go index 43b5197c249..6b2b1d1d9b5 100644 --- a/service/forecast/api_op_ListDatasets.go +++ b/service/forecast/api_op_ListDatasets.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // The number of items to return in the response. @@ -210,6 +206,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListExplainabilities.go b/service/forecast/api_op_ListExplainabilities.go index 3ff31d8c6f7..ed2350bf5dc 100644 --- a/service/forecast/api_op_ListExplainabilities.go +++ b/service/forecast/api_op_ListExplainabilities.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListExplainabilitiesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExplainabilitiesValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListExplainabilitiesMiddlewares(stack *middleware.S return nil } -// ListExplainabilitiesAPIClient is a client that implements the -// ListExplainabilities operation. -type ListExplainabilitiesAPIClient interface { - ListExplainabilities(context.Context, *ListExplainabilitiesInput, ...func(*Options)) (*ListExplainabilitiesOutput, error) -} - -var _ ListExplainabilitiesAPIClient = (*Client)(nil) - // ListExplainabilitiesPaginatorOptions is the paginator options for // ListExplainabilities type ListExplainabilitiesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListExplainabilitiesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExplainabilities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListExplainabilitiesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListExplainabilitiesAPIClient is a client that implements the +// ListExplainabilities operation. +type ListExplainabilitiesAPIClient interface { + ListExplainabilities(context.Context, *ListExplainabilitiesInput, ...func(*Options)) (*ListExplainabilitiesOutput, error) +} + +var _ ListExplainabilitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExplainabilities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListExplainabilityExports.go b/service/forecast/api_op_ListExplainabilityExports.go index 1ed8a99f28d..f1c4275d4ab 100644 --- a/service/forecast/api_op_ListExplainabilityExports.go +++ b/service/forecast/api_op_ListExplainabilityExports.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListExplainabilityExportsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExplainabilityExportsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListExplainabilityExportsMiddlewares(stack *middlew return nil } -// ListExplainabilityExportsAPIClient is a client that implements the -// ListExplainabilityExports operation. -type ListExplainabilityExportsAPIClient interface { - ListExplainabilityExports(context.Context, *ListExplainabilityExportsInput, ...func(*Options)) (*ListExplainabilityExportsOutput, error) -} - -var _ ListExplainabilityExportsAPIClient = (*Client)(nil) - // ListExplainabilityExportsPaginatorOptions is the paginator options for // ListExplainabilityExports type ListExplainabilityExportsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListExplainabilityExportsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExplainabilityExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListExplainabilityExportsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListExplainabilityExportsAPIClient is a client that implements the +// ListExplainabilityExports operation. +type ListExplainabilityExportsAPIClient interface { + ListExplainabilityExports(context.Context, *ListExplainabilityExportsInput, ...func(*Options)) (*ListExplainabilityExportsOutput, error) +} + +var _ ListExplainabilityExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExplainabilityExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListForecastExportJobs.go b/service/forecast/api_op_ListForecastExportJobs.go index 51c57a57588..36ad4e5ddb9 100644 --- a/service/forecast/api_op_ListForecastExportJobs.go +++ b/service/forecast/api_op_ListForecastExportJobs.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListForecastExportJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListForecastExportJobsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListForecastExportJobsMiddlewares(stack *middleware return nil } -// ListForecastExportJobsAPIClient is a client that implements the -// ListForecastExportJobs operation. -type ListForecastExportJobsAPIClient interface { - ListForecastExportJobs(context.Context, *ListForecastExportJobsInput, ...func(*Options)) (*ListForecastExportJobsOutput, error) -} - -var _ ListForecastExportJobsAPIClient = (*Client)(nil) - // ListForecastExportJobsPaginatorOptions is the paginator options for // ListForecastExportJobs type ListForecastExportJobsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListForecastExportJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListForecastExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListForecastExportJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListForecastExportJobsAPIClient is a client that implements the +// ListForecastExportJobs operation. +type ListForecastExportJobsAPIClient interface { + ListForecastExportJobs(context.Context, *ListForecastExportJobsInput, ...func(*Options)) (*ListForecastExportJobsOutput, error) +} + +var _ ListForecastExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListForecastExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListForecasts.go b/service/forecast/api_op_ListForecasts.go index f00aae41164..464457932d6 100644 --- a/service/forecast/api_op_ListForecasts.go +++ b/service/forecast/api_op_ListForecasts.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListForecastsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListForecastsValidationMiddleware(stack); err != nil { return err } @@ -162,13 +165,6 @@ func (c *Client) addOperationListForecastsMiddlewares(stack *middleware.Stack, o return nil } -// ListForecastsAPIClient is a client that implements the ListForecasts operation. -type ListForecastsAPIClient interface { - ListForecasts(context.Context, *ListForecastsInput, ...func(*Options)) (*ListForecastsOutput, error) -} - -var _ ListForecastsAPIClient = (*Client)(nil) - // ListForecastsPaginatorOptions is the paginator options for ListForecasts type ListForecastsPaginatorOptions struct { // The number of items to return in the response. @@ -232,6 +228,9 @@ func (p *ListForecastsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListForecasts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +250,13 @@ func (p *ListForecastsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListForecastsAPIClient is a client that implements the ListForecasts operation. +type ListForecastsAPIClient interface { + ListForecasts(context.Context, *ListForecastsInput, ...func(*Options)) (*ListForecastsOutput, error) +} + +var _ ListForecastsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListForecasts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListMonitorEvaluations.go b/service/forecast/api_op_ListMonitorEvaluations.go index ad4d999b932..06964b460cb 100644 --- a/service/forecast/api_op_ListMonitorEvaluations.go +++ b/service/forecast/api_op_ListMonitorEvaluations.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListMonitorEvaluationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMonitorEvaluationsValidationMiddleware(stack); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationListMonitorEvaluationsMiddlewares(stack *middleware return nil } -// ListMonitorEvaluationsAPIClient is a client that implements the -// ListMonitorEvaluations operation. -type ListMonitorEvaluationsAPIClient interface { - ListMonitorEvaluations(context.Context, *ListMonitorEvaluationsInput, ...func(*Options)) (*ListMonitorEvaluationsOutput, error) -} - -var _ ListMonitorEvaluationsAPIClient = (*Client)(nil) - // ListMonitorEvaluationsPaginatorOptions is the paginator options for // ListMonitorEvaluations type ListMonitorEvaluationsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListMonitorEvaluationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitorEvaluations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListMonitorEvaluationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListMonitorEvaluationsAPIClient is a client that implements the +// ListMonitorEvaluations operation. +type ListMonitorEvaluationsAPIClient interface { + ListMonitorEvaluations(context.Context, *ListMonitorEvaluationsInput, ...func(*Options)) (*ListMonitorEvaluationsOutput, error) +} + +var _ ListMonitorEvaluationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitorEvaluations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListMonitors.go b/service/forecast/api_op_ListMonitors.go index 95c96593aeb..6668cfdb72f 100644 --- a/service/forecast/api_op_ListMonitors.go +++ b/service/forecast/api_op_ListMonitors.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMonitorsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op return nil } -// ListMonitorsAPIClient is a client that implements the ListMonitors operation. -type ListMonitorsAPIClient interface { - ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) -} - -var _ ListMonitorsAPIClient = (*Client)(nil) - // ListMonitorsPaginatorOptions is the paginator options for ListMonitors type ListMonitorsPaginatorOptions struct { // The maximum number of monitors to include in the response. @@ -229,6 +225,9 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListMonitorsAPIClient is a client that implements the ListMonitors operation. +type ListMonitorsAPIClient interface { + ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) +} + +var _ ListMonitorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListPredictorBacktestExportJobs.go b/service/forecast/api_op_ListPredictorBacktestExportJobs.go index e62576a67ce..207c6cf16e0 100644 --- a/service/forecast/api_op_ListPredictorBacktestExportJobs.go +++ b/service/forecast/api_op_ListPredictorBacktestExportJobs.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListPredictorBacktestExportJobsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPredictorBacktestExportJobsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListPredictorBacktestExportJobsMiddlewares(stack *m return nil } -// ListPredictorBacktestExportJobsAPIClient is a client that implements the -// ListPredictorBacktestExportJobs operation. -type ListPredictorBacktestExportJobsAPIClient interface { - ListPredictorBacktestExportJobs(context.Context, *ListPredictorBacktestExportJobsInput, ...func(*Options)) (*ListPredictorBacktestExportJobsOutput, error) -} - -var _ ListPredictorBacktestExportJobsAPIClient = (*Client)(nil) - // ListPredictorBacktestExportJobsPaginatorOptions is the paginator options for // ListPredictorBacktestExportJobs type ListPredictorBacktestExportJobsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListPredictorBacktestExportJobsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPredictorBacktestExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListPredictorBacktestExportJobsPaginator) NextPage(ctx context.Context, return result, nil } +// ListPredictorBacktestExportJobsAPIClient is a client that implements the +// ListPredictorBacktestExportJobs operation. +type ListPredictorBacktestExportJobsAPIClient interface { + ListPredictorBacktestExportJobs(context.Context, *ListPredictorBacktestExportJobsInput, ...func(*Options)) (*ListPredictorBacktestExportJobsOutput, error) +} + +var _ ListPredictorBacktestExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPredictorBacktestExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListPredictors.go b/service/forecast/api_op_ListPredictors.go index df717a8551e..0e47280088f 100644 --- a/service/forecast/api_op_ListPredictors.go +++ b/service/forecast/api_op_ListPredictors.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListPredictorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPredictorsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListPredictorsMiddlewares(stack *middleware.Stack, return nil } -// ListPredictorsAPIClient is a client that implements the ListPredictors -// operation. -type ListPredictorsAPIClient interface { - ListPredictors(context.Context, *ListPredictorsInput, ...func(*Options)) (*ListPredictorsOutput, error) -} - -var _ ListPredictorsAPIClient = (*Client)(nil) - // ListPredictorsPaginatorOptions is the paginator options for ListPredictors type ListPredictorsPaginatorOptions struct { // The number of items to return in the response. @@ -234,6 +229,9 @@ func (p *ListPredictorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPredictors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListPredictorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPredictorsAPIClient is a client that implements the ListPredictors +// operation. +type ListPredictorsAPIClient interface { + ListPredictors(context.Context, *ListPredictorsInput, ...func(*Options)) (*ListPredictorsOutput, error) +} + +var _ ListPredictorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPredictors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListTagsForResource.go b/service/forecast/api_op_ListTagsForResource.go index 695a8aeff36..eb3e57029eb 100644 --- a/service/forecast/api_op_ListTagsForResource.go +++ b/service/forecast/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_ListWhatIfAnalyses.go b/service/forecast/api_op_ListWhatIfAnalyses.go index 55880ff66e1..1d7eaa83a52 100644 --- a/service/forecast/api_op_ListWhatIfAnalyses.go +++ b/service/forecast/api_op_ListWhatIfAnalyses.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListWhatIfAnalysesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWhatIfAnalysesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListWhatIfAnalysesMiddlewares(stack *middleware.Sta return nil } -// ListWhatIfAnalysesAPIClient is a client that implements the ListWhatIfAnalyses -// operation. -type ListWhatIfAnalysesAPIClient interface { - ListWhatIfAnalyses(context.Context, *ListWhatIfAnalysesInput, ...func(*Options)) (*ListWhatIfAnalysesOutput, error) -} - -var _ ListWhatIfAnalysesAPIClient = (*Client)(nil) - // ListWhatIfAnalysesPaginatorOptions is the paginator options for // ListWhatIfAnalyses type ListWhatIfAnalysesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListWhatIfAnalysesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWhatIfAnalyses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListWhatIfAnalysesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListWhatIfAnalysesAPIClient is a client that implements the ListWhatIfAnalyses +// operation. +type ListWhatIfAnalysesAPIClient interface { + ListWhatIfAnalyses(context.Context, *ListWhatIfAnalysesInput, ...func(*Options)) (*ListWhatIfAnalysesOutput, error) +} + +var _ ListWhatIfAnalysesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWhatIfAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListWhatIfForecastExports.go b/service/forecast/api_op_ListWhatIfForecastExports.go index 1b5cd8dd45d..e8218b2d0c8 100644 --- a/service/forecast/api_op_ListWhatIfForecastExports.go +++ b/service/forecast/api_op_ListWhatIfForecastExports.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListWhatIfForecastExportsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWhatIfForecastExportsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListWhatIfForecastExportsMiddlewares(stack *middlew return nil } -// ListWhatIfForecastExportsAPIClient is a client that implements the -// ListWhatIfForecastExports operation. -type ListWhatIfForecastExportsAPIClient interface { - ListWhatIfForecastExports(context.Context, *ListWhatIfForecastExportsInput, ...func(*Options)) (*ListWhatIfForecastExportsOutput, error) -} - -var _ ListWhatIfForecastExportsAPIClient = (*Client)(nil) - // ListWhatIfForecastExportsPaginatorOptions is the paginator options for // ListWhatIfForecastExports type ListWhatIfForecastExportsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListWhatIfForecastExportsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWhatIfForecastExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListWhatIfForecastExportsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListWhatIfForecastExportsAPIClient is a client that implements the +// ListWhatIfForecastExports operation. +type ListWhatIfForecastExportsAPIClient interface { + ListWhatIfForecastExports(context.Context, *ListWhatIfForecastExportsInput, ...func(*Options)) (*ListWhatIfForecastExportsOutput, error) +} + +var _ ListWhatIfForecastExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWhatIfForecastExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ListWhatIfForecasts.go b/service/forecast/api_op_ListWhatIfForecasts.go index a1523a4dce8..1b67c894399 100644 --- a/service/forecast/api_op_ListWhatIfForecasts.go +++ b/service/forecast/api_op_ListWhatIfForecasts.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListWhatIfForecastsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWhatIfForecastsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListWhatIfForecastsMiddlewares(stack *middleware.St return nil } -// ListWhatIfForecastsAPIClient is a client that implements the -// ListWhatIfForecasts operation. -type ListWhatIfForecastsAPIClient interface { - ListWhatIfForecasts(context.Context, *ListWhatIfForecastsInput, ...func(*Options)) (*ListWhatIfForecastsOutput, error) -} - -var _ ListWhatIfForecastsAPIClient = (*Client)(nil) - // ListWhatIfForecastsPaginatorOptions is the paginator options for // ListWhatIfForecasts type ListWhatIfForecastsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListWhatIfForecastsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWhatIfForecasts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListWhatIfForecastsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListWhatIfForecastsAPIClient is a client that implements the +// ListWhatIfForecasts operation. +type ListWhatIfForecastsAPIClient interface { + ListWhatIfForecasts(context.Context, *ListWhatIfForecastsInput, ...func(*Options)) (*ListWhatIfForecastsOutput, error) +} + +var _ ListWhatIfForecastsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWhatIfForecasts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/forecast/api_op_ResumeResource.go b/service/forecast/api_op_ResumeResource.go index 4851b07a416..02d5caf9444 100644 --- a/service/forecast/api_op_ResumeResource.go +++ b/service/forecast/api_op_ResumeResource.go @@ -101,6 +101,9 @@ func (c *Client) addOperationResumeResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_StopResource.go b/service/forecast/api_op_StopResource.go index 5ad116d809f..e4a8148d52c 100644 --- a/service/forecast/api_op_StopResource.go +++ b/service/forecast/api_op_StopResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStopResourceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_TagResource.go b/service/forecast/api_op_TagResource.go index 11a66c9f4d8..dad4fc3eb25 100644 --- a/service/forecast/api_op_TagResource.go +++ b/service/forecast/api_op_TagResource.go @@ -136,6 +136,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_UntagResource.go b/service/forecast/api_op_UntagResource.go index 8b32ecc3e2f..7288e232d41 100644 --- a/service/forecast/api_op_UntagResource.go +++ b/service/forecast/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecast/api_op_UpdateDatasetGroup.go b/service/forecast/api_op_UpdateDatasetGroup.go index 9f008a14df7..81e2499fa74 100644 --- a/service/forecast/api_op_UpdateDatasetGroup.go +++ b/service/forecast/api_op_UpdateDatasetGroup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDatasetGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecastquery/api_client.go b/service/forecastquery/api_client.go index 4ba56d3f816..5f2372bb220 100644 --- a/service/forecastquery/api_client.go +++ b/service/forecastquery/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/forecastquery/api_op_QueryForecast.go b/service/forecastquery/api_op_QueryForecast.go index 24fb8101416..fbffcee1a01 100644 --- a/service/forecastquery/api_op_QueryForecast.go +++ b/service/forecastquery/api_op_QueryForecast.go @@ -146,6 +146,9 @@ func (c *Client) addOperationQueryForecastMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/forecastquery/api_op_QueryWhatIfForecast.go b/service/forecastquery/api_op_QueryWhatIfForecast.go index b2869032bed..e67d0c15c6c 100644 --- a/service/forecastquery/api_op_QueryWhatIfForecast.go +++ b/service/forecastquery/api_op_QueryWhatIfForecast.go @@ -132,6 +132,9 @@ func (c *Client) addOperationQueryWhatIfForecastMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryWhatIfForecastValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_client.go b/service/frauddetector/api_client.go index bb7954faeef..36a439fac06 100644 --- a/service/frauddetector/api_client.go +++ b/service/frauddetector/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/frauddetector/api_op_BatchCreateVariable.go b/service/frauddetector/api_op_BatchCreateVariable.go index a7eccdbe501..8efd6a2f32e 100644 --- a/service/frauddetector/api_op_BatchCreateVariable.go +++ b/service/frauddetector/api_op_BatchCreateVariable.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchCreateVariableMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateVariableValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_BatchGetVariable.go b/service/frauddetector/api_op_BatchGetVariable.go index cfcae5498c8..a620088861e 100644 --- a/service/frauddetector/api_op_BatchGetVariable.go +++ b/service/frauddetector/api_op_BatchGetVariable.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetVariableMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetVariableValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CancelBatchImportJob.go b/service/frauddetector/api_op_CancelBatchImportJob.go index 87aae28ca40..3941feacde6 100644 --- a/service/frauddetector/api_op_CancelBatchImportJob.go +++ b/service/frauddetector/api_op_CancelBatchImportJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCancelBatchImportJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelBatchImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CancelBatchPredictionJob.go b/service/frauddetector/api_op_CancelBatchPredictionJob.go index 69b8924b3c8..79c7557feb4 100644 --- a/service/frauddetector/api_op_CancelBatchPredictionJob.go +++ b/service/frauddetector/api_op_CancelBatchPredictionJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelBatchPredictionJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelBatchPredictionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateBatchImportJob.go b/service/frauddetector/api_op_CreateBatchImportJob.go index 61bac2e7198..50bba625ada 100644 --- a/service/frauddetector/api_op_CreateBatchImportJob.go +++ b/service/frauddetector/api_op_CreateBatchImportJob.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateBatchImportJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBatchImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateBatchPredictionJob.go b/service/frauddetector/api_op_CreateBatchPredictionJob.go index fd9ddc94471..5df0051df52 100644 --- a/service/frauddetector/api_op_CreateBatchPredictionJob.go +++ b/service/frauddetector/api_op_CreateBatchPredictionJob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateBatchPredictionJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBatchPredictionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateDetectorVersion.go b/service/frauddetector/api_op_CreateDetectorVersion.go index ed5c855790a..1689de6daa1 100644 --- a/service/frauddetector/api_op_CreateDetectorVersion.go +++ b/service/frauddetector/api_op_CreateDetectorVersion.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateDetectorVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDetectorVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateList.go b/service/frauddetector/api_op_CreateList.go index d28e75cd831..a10e7b0b84e 100644 --- a/service/frauddetector/api_op_CreateList.go +++ b/service/frauddetector/api_op_CreateList.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateListMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateListValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateModel.go b/service/frauddetector/api_op_CreateModel.go index e9afcb8b17d..8d61890d85b 100644 --- a/service/frauddetector/api_op_CreateModel.go +++ b/service/frauddetector/api_op_CreateModel.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateModelVersion.go b/service/frauddetector/api_op_CreateModelVersion.go index f852b65faca..7fe58c1e426 100644 --- a/service/frauddetector/api_op_CreateModelVersion.go +++ b/service/frauddetector/api_op_CreateModelVersion.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateModelVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateRule.go b/service/frauddetector/api_op_CreateRule.go index f50177b2dae..edc9205409e 100644 --- a/service/frauddetector/api_op_CreateRule.go +++ b/service/frauddetector/api_op_CreateRule.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_CreateVariable.go b/service/frauddetector/api_op_CreateVariable.go index be94014dd7c..b7f50e9ccae 100644 --- a/service/frauddetector/api_op_CreateVariable.go +++ b/service/frauddetector/api_op_CreateVariable.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateVariableMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVariableValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteBatchImportJob.go b/service/frauddetector/api_op_DeleteBatchImportJob.go index 629d77ed37f..ea6f69757f4 100644 --- a/service/frauddetector/api_op_DeleteBatchImportJob.go +++ b/service/frauddetector/api_op_DeleteBatchImportJob.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteBatchImportJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBatchImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteBatchPredictionJob.go b/service/frauddetector/api_op_DeleteBatchPredictionJob.go index 230d1fb66e4..c5b6547473f 100644 --- a/service/frauddetector/api_op_DeleteBatchPredictionJob.go +++ b/service/frauddetector/api_op_DeleteBatchPredictionJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteBatchPredictionJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBatchPredictionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteDetector.go b/service/frauddetector/api_op_DeleteDetector.go index 4a1cbb7c024..614a88a54f9 100644 --- a/service/frauddetector/api_op_DeleteDetector.go +++ b/service/frauddetector/api_op_DeleteDetector.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDetectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteDetectorVersion.go b/service/frauddetector/api_op_DeleteDetectorVersion.go index 8ad316f9b2d..8c13150eb08 100644 --- a/service/frauddetector/api_op_DeleteDetectorVersion.go +++ b/service/frauddetector/api_op_DeleteDetectorVersion.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDetectorVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDetectorVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteEntityType.go b/service/frauddetector/api_op_DeleteEntityType.go index 6e5297e4a52..1ab73db1aae 100644 --- a/service/frauddetector/api_op_DeleteEntityType.go +++ b/service/frauddetector/api_op_DeleteEntityType.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEntityTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEntityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteEvent.go b/service/frauddetector/api_op_DeleteEvent.go index ac7c58cad3e..978ce2fa86d 100644 --- a/service/frauddetector/api_op_DeleteEvent.go +++ b/service/frauddetector/api_op_DeleteEvent.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteEventMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteEventType.go b/service/frauddetector/api_op_DeleteEventType.go index 147d0515d52..1b1638749e3 100644 --- a/service/frauddetector/api_op_DeleteEventType.go +++ b/service/frauddetector/api_op_DeleteEventType.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEventTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteEventsByEventType.go b/service/frauddetector/api_op_DeleteEventsByEventType.go index 4530e14c6d1..5d9f1b3e9bc 100644 --- a/service/frauddetector/api_op_DeleteEventsByEventType.go +++ b/service/frauddetector/api_op_DeleteEventsByEventType.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteEventsByEventTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventsByEventTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteExternalModel.go b/service/frauddetector/api_op_DeleteExternalModel.go index c9aa7f0bf8c..48922925a62 100644 --- a/service/frauddetector/api_op_DeleteExternalModel.go +++ b/service/frauddetector/api_op_DeleteExternalModel.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteExternalModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExternalModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteLabel.go b/service/frauddetector/api_op_DeleteLabel.go index 710178734fa..e1cb55154d6 100644 --- a/service/frauddetector/api_op_DeleteLabel.go +++ b/service/frauddetector/api_op_DeleteLabel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteLabelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteList.go b/service/frauddetector/api_op_DeleteList.go index bcaac8e62db..5b92ca74ae6 100644 --- a/service/frauddetector/api_op_DeleteList.go +++ b/service/frauddetector/api_op_DeleteList.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteListMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteListValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteModel.go b/service/frauddetector/api_op_DeleteModel.go index 2949255377b..d7af9643461 100644 --- a/service/frauddetector/api_op_DeleteModel.go +++ b/service/frauddetector/api_op_DeleteModel.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteModelVersion.go b/service/frauddetector/api_op_DeleteModelVersion.go index 1f520e34823..d98cdb41306 100644 --- a/service/frauddetector/api_op_DeleteModelVersion.go +++ b/service/frauddetector/api_op_DeleteModelVersion.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteModelVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteOutcome.go b/service/frauddetector/api_op_DeleteOutcome.go index f8c78d53fee..ee939191211 100644 --- a/service/frauddetector/api_op_DeleteOutcome.go +++ b/service/frauddetector/api_op_DeleteOutcome.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteOutcomeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOutcomeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteRule.go b/service/frauddetector/api_op_DeleteRule.go index 770e76c54fb..7136a619258 100644 --- a/service/frauddetector/api_op_DeleteRule.go +++ b/service/frauddetector/api_op_DeleteRule.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DeleteVariable.go b/service/frauddetector/api_op_DeleteVariable.go index ab609db523d..657e3b4882a 100644 --- a/service/frauddetector/api_op_DeleteVariable.go +++ b/service/frauddetector/api_op_DeleteVariable.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteVariableMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVariableValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DescribeDetector.go b/service/frauddetector/api_op_DescribeDetector.go index 5d78a1728f3..e4cf7273146 100644 --- a/service/frauddetector/api_op_DescribeDetector.go +++ b/service/frauddetector/api_op_DescribeDetector.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeDetectorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_DescribeModelVersions.go b/service/frauddetector/api_op_DescribeModelVersions.go index e5f9d548f7a..0cd90da3404 100644 --- a/service/frauddetector/api_op_DescribeModelVersions.go +++ b/service/frauddetector/api_op_DescribeModelVersions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeModelVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeModelVersions(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeModelVersionsMiddlewares(stack *middleware. return nil } -// DescribeModelVersionsAPIClient is a client that implements the -// DescribeModelVersions operation. -type DescribeModelVersionsAPIClient interface { - DescribeModelVersions(context.Context, *DescribeModelVersionsInput, ...func(*Options)) (*DescribeModelVersionsOutput, error) -} - -var _ DescribeModelVersionsAPIClient = (*Client)(nil) - // DescribeModelVersionsPaginatorOptions is the paginator options for // DescribeModelVersions type DescribeModelVersionsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *DescribeModelVersionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeModelVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeModelVersionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeModelVersionsAPIClient is a client that implements the +// DescribeModelVersions operation. +type DescribeModelVersionsAPIClient interface { + DescribeModelVersions(context.Context, *DescribeModelVersionsInput, ...func(*Options)) (*DescribeModelVersionsOutput, error) +} + +var _ DescribeModelVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeModelVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetBatchImportJobs.go b/service/frauddetector/api_op_GetBatchImportJobs.go index 8a363545305..58ebb5e96cb 100644 --- a/service/frauddetector/api_op_GetBatchImportJobs.go +++ b/service/frauddetector/api_op_GetBatchImportJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetBatchImportJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBatchImportJobs(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetBatchImportJobsMiddlewares(stack *middleware.Sta return nil } -// GetBatchImportJobsAPIClient is a client that implements the GetBatchImportJobs -// operation. -type GetBatchImportJobsAPIClient interface { - GetBatchImportJobs(context.Context, *GetBatchImportJobsInput, ...func(*Options)) (*GetBatchImportJobsOutput, error) -} - -var _ GetBatchImportJobsAPIClient = (*Client)(nil) - // GetBatchImportJobsPaginatorOptions is the paginator options for // GetBatchImportJobs type GetBatchImportJobsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *GetBatchImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBatchImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *GetBatchImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetBatchImportJobsAPIClient is a client that implements the GetBatchImportJobs +// operation. +type GetBatchImportJobsAPIClient interface { + GetBatchImportJobs(context.Context, *GetBatchImportJobsInput, ...func(*Options)) (*GetBatchImportJobsOutput, error) +} + +var _ GetBatchImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBatchImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetBatchPredictionJobs.go b/service/frauddetector/api_op_GetBatchPredictionJobs.go index 96ef5f9afa4..334208f84fa 100644 --- a/service/frauddetector/api_op_GetBatchPredictionJobs.go +++ b/service/frauddetector/api_op_GetBatchPredictionJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetBatchPredictionJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBatchPredictionJobs(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetBatchPredictionJobsMiddlewares(stack *middleware return nil } -// GetBatchPredictionJobsAPIClient is a client that implements the -// GetBatchPredictionJobs operation. -type GetBatchPredictionJobsAPIClient interface { - GetBatchPredictionJobs(context.Context, *GetBatchPredictionJobsInput, ...func(*Options)) (*GetBatchPredictionJobsOutput, error) -} - -var _ GetBatchPredictionJobsAPIClient = (*Client)(nil) - // GetBatchPredictionJobsPaginatorOptions is the paginator options for // GetBatchPredictionJobs type GetBatchPredictionJobsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *GetBatchPredictionJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBatchPredictionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *GetBatchPredictionJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// GetBatchPredictionJobsAPIClient is a client that implements the +// GetBatchPredictionJobs operation. +type GetBatchPredictionJobsAPIClient interface { + GetBatchPredictionJobs(context.Context, *GetBatchPredictionJobsInput, ...func(*Options)) (*GetBatchPredictionJobsOutput, error) +} + +var _ GetBatchPredictionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBatchPredictionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetDeleteEventsByEventTypeStatus.go b/service/frauddetector/api_op_GetDeleteEventsByEventTypeStatus.go index 9aa1af9419f..f880c9db46f 100644 --- a/service/frauddetector/api_op_GetDeleteEventsByEventTypeStatus.go +++ b/service/frauddetector/api_op_GetDeleteEventsByEventTypeStatus.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetDeleteEventsByEventTypeStatusMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeleteEventsByEventTypeStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_GetDetectorVersion.go b/service/frauddetector/api_op_GetDetectorVersion.go index 73ce5fffa24..c705e1025b4 100644 --- a/service/frauddetector/api_op_GetDetectorVersion.go +++ b/service/frauddetector/api_op_GetDetectorVersion.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetDetectorVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDetectorVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_GetDetectors.go b/service/frauddetector/api_op_GetDetectors.go index 704c9e884ec..a7515c4045b 100644 --- a/service/frauddetector/api_op_GetDetectors.go +++ b/service/frauddetector/api_op_GetDetectors.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDetectorsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDetectors(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetDetectorsMiddlewares(stack *middleware.Stack, op return nil } -// GetDetectorsAPIClient is a client that implements the GetDetectors operation. -type GetDetectorsAPIClient interface { - GetDetectors(context.Context, *GetDetectorsInput, ...func(*Options)) (*GetDetectorsOutput, error) -} - -var _ GetDetectorsAPIClient = (*Client)(nil) - // GetDetectorsPaginatorOptions is the paginator options for GetDetectors type GetDetectorsPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -209,6 +205,9 @@ func (p *GetDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDetectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *GetDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetDetectorsAPIClient is a client that implements the GetDetectors operation. +type GetDetectorsAPIClient interface { + GetDetectors(context.Context, *GetDetectorsInput, ...func(*Options)) (*GetDetectorsOutput, error) +} + +var _ GetDetectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDetectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetEntityTypes.go b/service/frauddetector/api_op_GetEntityTypes.go index 60a0d295cc1..5b5f1133b03 100644 --- a/service/frauddetector/api_op_GetEntityTypes.go +++ b/service/frauddetector/api_op_GetEntityTypes.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetEntityTypesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEntityTypes(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetEntityTypesMiddlewares(stack *middleware.Stack, return nil } -// GetEntityTypesAPIClient is a client that implements the GetEntityTypes -// operation. -type GetEntityTypesAPIClient interface { - GetEntityTypes(context.Context, *GetEntityTypesInput, ...func(*Options)) (*GetEntityTypesOutput, error) -} - -var _ GetEntityTypesAPIClient = (*Client)(nil) - // GetEntityTypesPaginatorOptions is the paginator options for GetEntityTypes type GetEntityTypesPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -210,6 +205,9 @@ func (p *GetEntityTypesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEntityTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *GetEntityTypesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetEntityTypesAPIClient is a client that implements the GetEntityTypes +// operation. +type GetEntityTypesAPIClient interface { + GetEntityTypes(context.Context, *GetEntityTypesInput, ...func(*Options)) (*GetEntityTypesOutput, error) +} + +var _ GetEntityTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEntityTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetEvent.go b/service/frauddetector/api_op_GetEvent.go index 0699626e4a5..69bb9c06376 100644 --- a/service/frauddetector/api_op_GetEvent.go +++ b/service/frauddetector/api_op_GetEvent.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetEventMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_GetEventPrediction.go b/service/frauddetector/api_op_GetEventPrediction.go index 9d7941097b9..7394c69f276 100644 --- a/service/frauddetector/api_op_GetEventPrediction.go +++ b/service/frauddetector/api_op_GetEventPrediction.go @@ -172,6 +172,9 @@ func (c *Client) addOperationGetEventPredictionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventPredictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_GetEventPredictionMetadata.go b/service/frauddetector/api_op_GetEventPredictionMetadata.go index 1e0473136a6..0156094d713 100644 --- a/service/frauddetector/api_op_GetEventPredictionMetadata.go +++ b/service/frauddetector/api_op_GetEventPredictionMetadata.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetEventPredictionMetadataMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventPredictionMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_GetEventTypes.go b/service/frauddetector/api_op_GetEventTypes.go index e1927360a2f..08b91193910 100644 --- a/service/frauddetector/api_op_GetEventTypes.go +++ b/service/frauddetector/api_op_GetEventTypes.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetEventTypesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEventTypes(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetEventTypesMiddlewares(stack *middleware.Stack, o return nil } -// GetEventTypesAPIClient is a client that implements the GetEventTypes operation. -type GetEventTypesAPIClient interface { - GetEventTypes(context.Context, *GetEventTypesInput, ...func(*Options)) (*GetEventTypesOutput, error) -} - -var _ GetEventTypesAPIClient = (*Client)(nil) - // GetEventTypesPaginatorOptions is the paginator options for GetEventTypes type GetEventTypesPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -209,6 +205,9 @@ func (p *GetEventTypesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEventTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *GetEventTypesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetEventTypesAPIClient is a client that implements the GetEventTypes operation. +type GetEventTypesAPIClient interface { + GetEventTypes(context.Context, *GetEventTypesInput, ...func(*Options)) (*GetEventTypesOutput, error) +} + +var _ GetEventTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEventTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetExternalModels.go b/service/frauddetector/api_op_GetExternalModels.go index 7d27ae4be3b..acafe62dd54 100644 --- a/service/frauddetector/api_op_GetExternalModels.go +++ b/service/frauddetector/api_op_GetExternalModels.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetExternalModelsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExternalModels(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetExternalModelsMiddlewares(stack *middleware.Stac return nil } -// GetExternalModelsAPIClient is a client that implements the GetExternalModels -// operation. -type GetExternalModelsAPIClient interface { - GetExternalModels(context.Context, *GetExternalModelsInput, ...func(*Options)) (*GetExternalModelsOutput, error) -} - -var _ GetExternalModelsAPIClient = (*Client)(nil) - // GetExternalModelsPaginatorOptions is the paginator options for GetExternalModels type GetExternalModelsPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -210,6 +205,9 @@ func (p *GetExternalModelsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetExternalModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *GetExternalModelsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetExternalModelsAPIClient is a client that implements the GetExternalModels +// operation. +type GetExternalModelsAPIClient interface { + GetExternalModels(context.Context, *GetExternalModelsInput, ...func(*Options)) (*GetExternalModelsOutput, error) +} + +var _ GetExternalModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetExternalModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetKMSEncryptionKey.go b/service/frauddetector/api_op_GetKMSEncryptionKey.go index 00f6c01b136..4dcc109f9eb 100644 --- a/service/frauddetector/api_op_GetKMSEncryptionKey.go +++ b/service/frauddetector/api_op_GetKMSEncryptionKey.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetKMSEncryptionKeyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKMSEncryptionKey(options.Region), middleware.Before); err != nil { return err } diff --git a/service/frauddetector/api_op_GetLabels.go b/service/frauddetector/api_op_GetLabels.go index 7a14152d603..3b8fa456ace 100644 --- a/service/frauddetector/api_op_GetLabels.go +++ b/service/frauddetector/api_op_GetLabels.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetLabelsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLabels(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetLabelsMiddlewares(stack *middleware.Stack, optio return nil } -// GetLabelsAPIClient is a client that implements the GetLabels operation. -type GetLabelsAPIClient interface { - GetLabels(context.Context, *GetLabelsInput, ...func(*Options)) (*GetLabelsOutput, error) -} - -var _ GetLabelsAPIClient = (*Client)(nil) - // GetLabelsPaginatorOptions is the paginator options for GetLabels type GetLabelsPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -209,6 +205,9 @@ func (p *GetLabelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetLabels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *GetLabelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// GetLabelsAPIClient is a client that implements the GetLabels operation. +type GetLabelsAPIClient interface { + GetLabels(context.Context, *GetLabelsInput, ...func(*Options)) (*GetLabelsOutput, error) +} + +var _ GetLabelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLabels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetListElements.go b/service/frauddetector/api_op_GetListElements.go index 6bdf802baf7..0a94191e835 100644 --- a/service/frauddetector/api_op_GetListElements.go +++ b/service/frauddetector/api_op_GetListElements.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetListElementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetListElementsValidationMiddleware(stack); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationGetListElementsMiddlewares(stack *middleware.Stack, return nil } -// GetListElementsAPIClient is a client that implements the GetListElements -// operation. -type GetListElementsAPIClient interface { - GetListElements(context.Context, *GetListElementsInput, ...func(*Options)) (*GetListElementsOutput, error) -} - -var _ GetListElementsAPIClient = (*Client)(nil) - // GetListElementsPaginatorOptions is the paginator options for GetListElements type GetListElementsPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -209,6 +204,9 @@ func (p *GetListElementsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetListElements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *GetListElementsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetListElementsAPIClient is a client that implements the GetListElements +// operation. +type GetListElementsAPIClient interface { + GetListElements(context.Context, *GetListElementsInput, ...func(*Options)) (*GetListElementsOutput, error) +} + +var _ GetListElementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetListElements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetListsMetadata.go b/service/frauddetector/api_op_GetListsMetadata.go index 4492d032e9a..a71cfdf60c8 100644 --- a/service/frauddetector/api_op_GetListsMetadata.go +++ b/service/frauddetector/api_op_GetListsMetadata.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetListsMetadataMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetListsMetadata(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationGetListsMetadataMiddlewares(stack *middleware.Stack return nil } -// GetListsMetadataAPIClient is a client that implements the GetListsMetadata -// operation. -type GetListsMetadataAPIClient interface { - GetListsMetadata(context.Context, *GetListsMetadataInput, ...func(*Options)) (*GetListsMetadataOutput, error) -} - -var _ GetListsMetadataAPIClient = (*Client)(nil) - // GetListsMetadataPaginatorOptions is the paginator options for GetListsMetadata type GetListsMetadataPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -207,6 +202,9 @@ func (p *GetListsMetadataPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetListsMetadata(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *GetListsMetadataPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetListsMetadataAPIClient is a client that implements the GetListsMetadata +// operation. +type GetListsMetadataAPIClient interface { + GetListsMetadata(context.Context, *GetListsMetadataInput, ...func(*Options)) (*GetListsMetadataOutput, error) +} + +var _ GetListsMetadataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetListsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetModelVersion.go b/service/frauddetector/api_op_GetModelVersion.go index 61ea9e4b8ae..9c7a9820a93 100644 --- a/service/frauddetector/api_op_GetModelVersion.go +++ b/service/frauddetector/api_op_GetModelVersion.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetModelVersionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_GetModels.go b/service/frauddetector/api_op_GetModels.go index 713014590e1..381447e203f 100644 --- a/service/frauddetector/api_op_GetModels.go +++ b/service/frauddetector/api_op_GetModels.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetModelsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetModels(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationGetModelsMiddlewares(stack *middleware.Stack, optio return nil } -// GetModelsAPIClient is a client that implements the GetModels operation. -type GetModelsAPIClient interface { - GetModels(context.Context, *GetModelsInput, ...func(*Options)) (*GetModelsOutput, error) -} - -var _ GetModelsAPIClient = (*Client)(nil) - // GetModelsPaginatorOptions is the paginator options for GetModels type GetModelsPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -217,6 +213,9 @@ func (p *GetModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *GetModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// GetModelsAPIClient is a client that implements the GetModels operation. +type GetModelsAPIClient interface { + GetModels(context.Context, *GetModelsInput, ...func(*Options)) (*GetModelsOutput, error) +} + +var _ GetModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetOutcomes.go b/service/frauddetector/api_op_GetOutcomes.go index acf4e073322..fa7782ad226 100644 --- a/service/frauddetector/api_op_GetOutcomes.go +++ b/service/frauddetector/api_op_GetOutcomes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetOutcomesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOutcomes(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationGetOutcomesMiddlewares(stack *middleware.Stack, opt return nil } -// GetOutcomesAPIClient is a client that implements the GetOutcomes operation. -type GetOutcomesAPIClient interface { - GetOutcomes(context.Context, *GetOutcomesInput, ...func(*Options)) (*GetOutcomesOutput, error) -} - -var _ GetOutcomesAPIClient = (*Client)(nil) - // GetOutcomesPaginatorOptions is the paginator options for GetOutcomes type GetOutcomesPaginatorOptions struct { // The maximum number of objects to return for the request. @@ -208,6 +204,9 @@ func (p *GetOutcomesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOutcomes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *GetOutcomesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetOutcomesAPIClient is a client that implements the GetOutcomes operation. +type GetOutcomesAPIClient interface { + GetOutcomes(context.Context, *GetOutcomesInput, ...func(*Options)) (*GetOutcomesOutput, error) +} + +var _ GetOutcomesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOutcomes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetRules.go b/service/frauddetector/api_op_GetRules.go index afd41e569c6..40c1e6dc75f 100644 --- a/service/frauddetector/api_op_GetRules.go +++ b/service/frauddetector/api_op_GetRules.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetRulesMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRulesValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationGetRulesMiddlewares(stack *middleware.Stack, option return nil } -// GetRulesAPIClient is a client that implements the GetRules operation. -type GetRulesAPIClient interface { - GetRules(context.Context, *GetRulesInput, ...func(*Options)) (*GetRulesOutput, error) -} - -var _ GetRulesAPIClient = (*Client)(nil) - // GetRulesPaginatorOptions is the paginator options for GetRules type GetRulesPaginatorOptions struct { // The maximum number of rules to return for the request. @@ -224,6 +220,9 @@ func (p *GetRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *GetRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// GetRulesAPIClient is a client that implements the GetRules operation. +type GetRulesAPIClient interface { + GetRules(context.Context, *GetRulesInput, ...func(*Options)) (*GetRulesOutput, error) +} + +var _ GetRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_GetVariables.go b/service/frauddetector/api_op_GetVariables.go index e970b1d5cd7..f60bf21af7c 100644 --- a/service/frauddetector/api_op_GetVariables.go +++ b/service/frauddetector/api_op_GetVariables.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetVariablesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVariables(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetVariablesMiddlewares(stack *middleware.Stack, op return nil } -// GetVariablesAPIClient is a client that implements the GetVariables operation. -type GetVariablesAPIClient interface { - GetVariables(context.Context, *GetVariablesInput, ...func(*Options)) (*GetVariablesOutput, error) -} - -var _ GetVariablesAPIClient = (*Client)(nil) - // GetVariablesPaginatorOptions is the paginator options for GetVariables type GetVariablesPaginatorOptions struct { // The max size per page determined for the get variable request. @@ -209,6 +205,9 @@ func (p *GetVariablesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetVariables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *GetVariablesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetVariablesAPIClient is a client that implements the GetVariables operation. +type GetVariablesAPIClient interface { + GetVariables(context.Context, *GetVariablesInput, ...func(*Options)) (*GetVariablesOutput, error) +} + +var _ GetVariablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetVariables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_ListEventPredictions.go b/service/frauddetector/api_op_ListEventPredictions.go index 2639d2ed9f7..3ab095c7e3d 100644 --- a/service/frauddetector/api_op_ListEventPredictions.go +++ b/service/frauddetector/api_op_ListEventPredictions.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListEventPredictionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventPredictionsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListEventPredictionsMiddlewares(stack *middleware.S return nil } -// ListEventPredictionsAPIClient is a client that implements the -// ListEventPredictions operation. -type ListEventPredictionsAPIClient interface { - ListEventPredictions(context.Context, *ListEventPredictionsInput, ...func(*Options)) (*ListEventPredictionsOutput, error) -} - -var _ ListEventPredictionsAPIClient = (*Client)(nil) - // ListEventPredictionsPaginatorOptions is the paginator options for // ListEventPredictions type ListEventPredictionsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListEventPredictionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventPredictions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListEventPredictionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListEventPredictionsAPIClient is a client that implements the +// ListEventPredictions operation. +type ListEventPredictionsAPIClient interface { + ListEventPredictions(context.Context, *ListEventPredictionsInput, ...func(*Options)) (*ListEventPredictionsOutput, error) +} + +var _ ListEventPredictionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventPredictions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_ListTagsForResource.go b/service/frauddetector/api_op_ListTagsForResource.go index 8b640532200..107bd3cc9d7 100644 --- a/service/frauddetector/api_op_ListTagsForResource.go +++ b/service/frauddetector/api_op_ListTagsForResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/frauddetector/api_op_PutDetector.go b/service/frauddetector/api_op_PutDetector.go index b3711e3d9a3..7caeb3f21de 100644 --- a/service/frauddetector/api_op_PutDetector.go +++ b/service/frauddetector/api_op_PutDetector.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutDetectorMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_PutEntityType.go b/service/frauddetector/api_op_PutEntityType.go index fc36bd2caf9..a12ce954978 100644 --- a/service/frauddetector/api_op_PutEntityType.go +++ b/service/frauddetector/api_op_PutEntityType.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutEntityTypeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEntityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_PutEventType.go b/service/frauddetector/api_op_PutEventType.go index 422ea4e9876..9c0dd74b7de 100644 --- a/service/frauddetector/api_op_PutEventType.go +++ b/service/frauddetector/api_op_PutEventType.go @@ -135,6 +135,9 @@ func (c *Client) addOperationPutEventTypeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_PutExternalModel.go b/service/frauddetector/api_op_PutExternalModel.go index a5e834937a1..4d7584bc1f1 100644 --- a/service/frauddetector/api_op_PutExternalModel.go +++ b/service/frauddetector/api_op_PutExternalModel.go @@ -132,6 +132,9 @@ func (c *Client) addOperationPutExternalModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutExternalModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_PutKMSEncryptionKey.go b/service/frauddetector/api_op_PutKMSEncryptionKey.go index 829f588801e..33d5ca23fef 100644 --- a/service/frauddetector/api_op_PutKMSEncryptionKey.go +++ b/service/frauddetector/api_op_PutKMSEncryptionKey.go @@ -104,6 +104,9 @@ func (c *Client) addOperationPutKMSEncryptionKeyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutKMSEncryptionKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_PutLabel.go b/service/frauddetector/api_op_PutLabel.go index 722c8e6e210..d36f7204957 100644 --- a/service/frauddetector/api_op_PutLabel.go +++ b/service/frauddetector/api_op_PutLabel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutLabelMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_PutOutcome.go b/service/frauddetector/api_op_PutOutcome.go index e7cc5eaf05e..7d8d45eec63 100644 --- a/service/frauddetector/api_op_PutOutcome.go +++ b/service/frauddetector/api_op_PutOutcome.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPutOutcomeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutOutcomeValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_SendEvent.go b/service/frauddetector/api_op_SendEvent.go index 8b9ef37308f..47615e5a9a6 100644 --- a/service/frauddetector/api_op_SendEvent.go +++ b/service/frauddetector/api_op_SendEvent.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSendEventMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_TagResource.go b/service/frauddetector/api_op_TagResource.go index 6eef02aec01..3461354e5f8 100644 --- a/service/frauddetector/api_op_TagResource.go +++ b/service/frauddetector/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UntagResource.go b/service/frauddetector/api_op_UntagResource.go index 165f14f79f2..bbd06c35c9c 100644 --- a/service/frauddetector/api_op_UntagResource.go +++ b/service/frauddetector/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateDetectorVersion.go b/service/frauddetector/api_op_UpdateDetectorVersion.go index 12415372eb8..dffeb30b954 100644 --- a/service/frauddetector/api_op_UpdateDetectorVersion.go +++ b/service/frauddetector/api_op_UpdateDetectorVersion.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateDetectorVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDetectorVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateDetectorVersionMetadata.go b/service/frauddetector/api_op_UpdateDetectorVersionMetadata.go index 9fc4d7febd4..5a76569e41d 100644 --- a/service/frauddetector/api_op_UpdateDetectorVersionMetadata.go +++ b/service/frauddetector/api_op_UpdateDetectorVersionMetadata.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDetectorVersionMetadataMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDetectorVersionMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateDetectorVersionStatus.go b/service/frauddetector/api_op_UpdateDetectorVersionStatus.go index b9a691391c4..13000e94334 100644 --- a/service/frauddetector/api_op_UpdateDetectorVersionStatus.go +++ b/service/frauddetector/api_op_UpdateDetectorVersionStatus.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateDetectorVersionStatusMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDetectorVersionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateEventLabel.go b/service/frauddetector/api_op_UpdateEventLabel.go index f960f23af2f..ec12df136d5 100644 --- a/service/frauddetector/api_op_UpdateEventLabel.go +++ b/service/frauddetector/api_op_UpdateEventLabel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateEventLabelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateList.go b/service/frauddetector/api_op_UpdateList.go index 7134cda5821..52bd7c9cfbc 100644 --- a/service/frauddetector/api_op_UpdateList.go +++ b/service/frauddetector/api_op_UpdateList.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateListMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateListValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateModel.go b/service/frauddetector/api_op_UpdateModel.go index 1c9b5f5dd15..786e1d72387 100644 --- a/service/frauddetector/api_op_UpdateModel.go +++ b/service/frauddetector/api_op_UpdateModel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateModelVersion.go b/service/frauddetector/api_op_UpdateModelVersion.go index 35d737e1c8c..070c4920f78 100644 --- a/service/frauddetector/api_op_UpdateModelVersion.go +++ b/service/frauddetector/api_op_UpdateModelVersion.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateModelVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateModelVersionStatus.go b/service/frauddetector/api_op_UpdateModelVersionStatus.go index b65a865de4e..d6bea8caa3d 100644 --- a/service/frauddetector/api_op_UpdateModelVersionStatus.go +++ b/service/frauddetector/api_op_UpdateModelVersionStatus.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateModelVersionStatusMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelVersionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateRuleMetadata.go b/service/frauddetector/api_op_UpdateRuleMetadata.go index ab983fd27af..e6415d43690 100644 --- a/service/frauddetector/api_op_UpdateRuleMetadata.go +++ b/service/frauddetector/api_op_UpdateRuleMetadata.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateRuleMetadataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateRuleVersion.go b/service/frauddetector/api_op_UpdateRuleVersion.go index b3fdac25758..312fe26eed9 100644 --- a/service/frauddetector/api_op_UpdateRuleVersion.go +++ b/service/frauddetector/api_op_UpdateRuleVersion.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateRuleVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/frauddetector/api_op_UpdateVariable.go b/service/frauddetector/api_op_UpdateVariable.go index 18dc750d67a..2f50ce93039 100644 --- a/service/frauddetector/api_op_UpdateVariable.go +++ b/service/frauddetector/api_op_UpdateVariable.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateVariableMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVariableValidationMiddleware(stack); err != nil { return err } diff --git a/service/freetier/api_client.go b/service/freetier/api_client.go index 326cc8b8aeb..152dfcb6683 100644 --- a/service/freetier/api_client.go +++ b/service/freetier/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/freetier/api_op_GetFreeTierUsage.go b/service/freetier/api_op_GetFreeTierUsage.go index 9d32bcf7b67..fb5728e80fd 100644 --- a/service/freetier/api_op_GetFreeTierUsage.go +++ b/service/freetier/api_op_GetFreeTierUsage.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetFreeTierUsageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFreeTierUsageValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetFreeTierUsageMiddlewares(stack *middleware.Stack return nil } -// GetFreeTierUsageAPIClient is a client that implements the GetFreeTierUsage -// operation. -type GetFreeTierUsageAPIClient interface { - GetFreeTierUsage(context.Context, *GetFreeTierUsageInput, ...func(*Options)) (*GetFreeTierUsageOutput, error) -} - -var _ GetFreeTierUsageAPIClient = (*Client)(nil) - // GetFreeTierUsagePaginatorOptions is the paginator options for GetFreeTierUsage type GetFreeTierUsagePaginatorOptions struct { // The maximum number of results to return in the response. MaxResults means that @@ -215,6 +210,9 @@ func (p *GetFreeTierUsagePaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFreeTierUsage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *GetFreeTierUsagePaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetFreeTierUsageAPIClient is a client that implements the GetFreeTierUsage +// operation. +type GetFreeTierUsageAPIClient interface { + GetFreeTierUsage(context.Context, *GetFreeTierUsageInput, ...func(*Options)) (*GetFreeTierUsageOutput, error) +} + +var _ GetFreeTierUsageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFreeTierUsage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_client.go b/service/fsx/api_client.go index 0f076d4b75b..34a6ed1d421 100644 --- a/service/fsx/api_client.go +++ b/service/fsx/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/fsx/api_op_AssociateFileSystemAliases.go b/service/fsx/api_op_AssociateFileSystemAliases.go index 1ee7f7b5c01..2f1edb819d2 100644 --- a/service/fsx/api_op_AssociateFileSystemAliases.go +++ b/service/fsx/api_op_AssociateFileSystemAliases.go @@ -151,6 +151,9 @@ func (c *Client) addOperationAssociateFileSystemAliasesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateFileSystemAliasesMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CancelDataRepositoryTask.go b/service/fsx/api_op_CancelDataRepositoryTask.go index eb2cf262d72..0baec07d64d 100644 --- a/service/fsx/api_op_CancelDataRepositoryTask.go +++ b/service/fsx/api_op_CancelDataRepositoryTask.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCancelDataRepositoryTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDataRepositoryTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/fsx/api_op_CopyBackup.go b/service/fsx/api_op_CopyBackup.go index 78e27f41104..2fd035bf595 100644 --- a/service/fsx/api_op_CopyBackup.go +++ b/service/fsx/api_op_CopyBackup.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCopyBackupMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCopyBackupMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CopySnapshotAndUpdateVolume.go b/service/fsx/api_op_CopySnapshotAndUpdateVolume.go index 075626ddc55..322d1700a3f 100644 --- a/service/fsx/api_op_CopySnapshotAndUpdateVolume.go +++ b/service/fsx/api_op_CopySnapshotAndUpdateVolume.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCopySnapshotAndUpdateVolumeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCopySnapshotAndUpdateVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateBackup.go b/service/fsx/api_op_CreateBackup.go index cf8c38f42db..d7e84947232 100644 --- a/service/fsx/api_op_CreateBackup.go +++ b/service/fsx/api_op_CreateBackup.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateBackupMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateDataRepositoryAssociation.go b/service/fsx/api_op_CreateDataRepositoryAssociation.go index f38e312393f..85d73e42bb9 100644 --- a/service/fsx/api_op_CreateDataRepositoryAssociation.go +++ b/service/fsx/api_op_CreateDataRepositoryAssociation.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateDataRepositoryAssociationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataRepositoryAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateDataRepositoryTask.go b/service/fsx/api_op_CreateDataRepositoryTask.go index aeee35a1979..ee1d161cf93 100644 --- a/service/fsx/api_op_CreateDataRepositoryTask.go +++ b/service/fsx/api_op_CreateDataRepositoryTask.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateDataRepositoryTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataRepositoryTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateFileCache.go b/service/fsx/api_op_CreateFileCache.go index 1daef225859..3143e9b8b24 100644 --- a/service/fsx/api_op_CreateFileCache.go +++ b/service/fsx/api_op_CreateFileCache.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateFileCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFileCacheMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateFileSystem.go b/service/fsx/api_op_CreateFileSystem.go index 01971be583b..58b2e9fed51 100644 --- a/service/fsx/api_op_CreateFileSystem.go +++ b/service/fsx/api_op_CreateFileSystem.go @@ -300,6 +300,9 @@ func (c *Client) addOperationCreateFileSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFileSystemMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateFileSystemFromBackup.go b/service/fsx/api_op_CreateFileSystemFromBackup.go index 53eb55bb1ad..54f77d2911e 100644 --- a/service/fsx/api_op_CreateFileSystemFromBackup.go +++ b/service/fsx/api_op_CreateFileSystemFromBackup.go @@ -246,6 +246,9 @@ func (c *Client) addOperationCreateFileSystemFromBackupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFileSystemFromBackupMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateSnapshot.go b/service/fsx/api_op_CreateSnapshot.go index 4f60e0e6121..b418ade8e44 100644 --- a/service/fsx/api_op_CreateSnapshot.go +++ b/service/fsx/api_op_CreateSnapshot.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSnapshotMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateStorageVirtualMachine.go b/service/fsx/api_op_CreateStorageVirtualMachine.go index 585409287f5..d5e93b78988 100644 --- a/service/fsx/api_op_CreateStorageVirtualMachine.go +++ b/service/fsx/api_op_CreateStorageVirtualMachine.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateStorageVirtualMachineMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStorageVirtualMachineMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateVolume.go b/service/fsx/api_op_CreateVolume.go index c65befcfc98..c2ed6337fc7 100644 --- a/service/fsx/api_op_CreateVolume.go +++ b/service/fsx/api_op_CreateVolume.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_CreateVolumeFromBackup.go b/service/fsx/api_op_CreateVolumeFromBackup.go index 6d0960602a8..2782f115779 100644 --- a/service/fsx/api_op_CreateVolumeFromBackup.go +++ b/service/fsx/api_op_CreateVolumeFromBackup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateVolumeFromBackupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVolumeFromBackupMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteBackup.go b/service/fsx/api_op_DeleteBackup.go index 1aebc45b691..7ba35542e19 100644 --- a/service/fsx/api_op_DeleteBackup.go +++ b/service/fsx/api_op_DeleteBackup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteBackupMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteDataRepositoryAssociation.go b/service/fsx/api_op_DeleteDataRepositoryAssociation.go index 5674907f311..3f814f3309c 100644 --- a/service/fsx/api_op_DeleteDataRepositoryAssociation.go +++ b/service/fsx/api_op_DeleteDataRepositoryAssociation.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteDataRepositoryAssociationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteDataRepositoryAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteFileCache.go b/service/fsx/api_op_DeleteFileCache.go index 03538006fb5..98ab40dc996 100644 --- a/service/fsx/api_op_DeleteFileCache.go +++ b/service/fsx/api_op_DeleteFileCache.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteFileCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteFileCacheMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteFileSystem.go b/service/fsx/api_op_DeleteFileSystem.go index 26af3529bee..e0f919f5bab 100644 --- a/service/fsx/api_op_DeleteFileSystem.go +++ b/service/fsx/api_op_DeleteFileSystem.go @@ -180,6 +180,9 @@ func (c *Client) addOperationDeleteFileSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteFileSystemMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteSnapshot.go b/service/fsx/api_op_DeleteSnapshot.go index 69732de316a..3cebbc4b145 100644 --- a/service/fsx/api_op_DeleteSnapshot.go +++ b/service/fsx/api_op_DeleteSnapshot.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteSnapshotMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteStorageVirtualMachine.go b/service/fsx/api_op_DeleteStorageVirtualMachine.go index 9a51dc994f1..42267fef86f 100644 --- a/service/fsx/api_op_DeleteStorageVirtualMachine.go +++ b/service/fsx/api_op_DeleteStorageVirtualMachine.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteStorageVirtualMachineMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStorageVirtualMachineMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DeleteVolume.go b/service/fsx/api_op_DeleteVolume.go index 0924834e8fd..96ab11734ad 100644 --- a/service/fsx/api_op_DeleteVolume.go +++ b/service/fsx/api_op_DeleteVolume.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_DescribeBackups.go b/service/fsx/api_op_DescribeBackups.go index 8448543e0e0..230d21ef007 100644 --- a/service/fsx/api_op_DescribeBackups.go +++ b/service/fsx/api_op_DescribeBackups.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeBackupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBackups(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeBackupsMiddlewares(stack *middleware.Stack, return nil } -// DescribeBackupsAPIClient is a client that implements the DescribeBackups -// operation. -type DescribeBackupsAPIClient interface { - DescribeBackups(context.Context, *DescribeBackupsInput, ...func(*Options)) (*DescribeBackupsOutput, error) -} - -var _ DescribeBackupsAPIClient = (*Client)(nil) - // DescribeBackupsPaginatorOptions is the paginator options for DescribeBackups type DescribeBackupsPaginatorOptions struct { // Maximum number of backups to return in the response. This parameter value must @@ -245,6 +240,9 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBackups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeBackupsAPIClient is a client that implements the DescribeBackups +// operation. +type DescribeBackupsAPIClient interface { + DescribeBackups(context.Context, *DescribeBackupsInput, ...func(*Options)) (*DescribeBackupsOutput, error) +} + +var _ DescribeBackupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBackups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeDataRepositoryAssociations.go b/service/fsx/api_op_DescribeDataRepositoryAssociations.go index 9343f4dbc1f..7be32937160 100644 --- a/service/fsx/api_op_DescribeDataRepositoryAssociations.go +++ b/service/fsx/api_op_DescribeDataRepositoryAssociations.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeDataRepositoryAssociationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataRepositoryAssociations(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeDataRepositoryAssociationsMiddlewares(stack return nil } -// DescribeDataRepositoryAssociationsAPIClient is a client that implements the -// DescribeDataRepositoryAssociations operation. -type DescribeDataRepositoryAssociationsAPIClient interface { - DescribeDataRepositoryAssociations(context.Context, *DescribeDataRepositoryAssociationsInput, ...func(*Options)) (*DescribeDataRepositoryAssociationsOutput, error) -} - -var _ DescribeDataRepositoryAssociationsAPIClient = (*Client)(nil) - // DescribeDataRepositoryAssociationsPaginatorOptions is the paginator options for // DescribeDataRepositoryAssociations type DescribeDataRepositoryAssociationsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeDataRepositoryAssociationsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDataRepositoryAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeDataRepositoryAssociationsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeDataRepositoryAssociationsAPIClient is a client that implements the +// DescribeDataRepositoryAssociations operation. +type DescribeDataRepositoryAssociationsAPIClient interface { + DescribeDataRepositoryAssociations(context.Context, *DescribeDataRepositoryAssociationsInput, ...func(*Options)) (*DescribeDataRepositoryAssociationsOutput, error) +} + +var _ DescribeDataRepositoryAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataRepositoryAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeDataRepositoryTasks.go b/service/fsx/api_op_DescribeDataRepositoryTasks.go index 9cf51c4f1a2..ae1a9b91aef 100644 --- a/service/fsx/api_op_DescribeDataRepositoryTasks.go +++ b/service/fsx/api_op_DescribeDataRepositoryTasks.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeDataRepositoryTasksMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataRepositoryTasks(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeDataRepositoryTasksMiddlewares(stack *middl return nil } -// DescribeDataRepositoryTasksAPIClient is a client that implements the -// DescribeDataRepositoryTasks operation. -type DescribeDataRepositoryTasksAPIClient interface { - DescribeDataRepositoryTasks(context.Context, *DescribeDataRepositoryTasksInput, ...func(*Options)) (*DescribeDataRepositoryTasksOutput, error) -} - -var _ DescribeDataRepositoryTasksAPIClient = (*Client)(nil) - // DescribeDataRepositoryTasksPaginatorOptions is the paginator options for // DescribeDataRepositoryTasks type DescribeDataRepositoryTasksPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeDataRepositoryTasksPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDataRepositoryTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeDataRepositoryTasksPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeDataRepositoryTasksAPIClient is a client that implements the +// DescribeDataRepositoryTasks operation. +type DescribeDataRepositoryTasksAPIClient interface { + DescribeDataRepositoryTasks(context.Context, *DescribeDataRepositoryTasksInput, ...func(*Options)) (*DescribeDataRepositoryTasksOutput, error) +} + +var _ DescribeDataRepositoryTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataRepositoryTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeFileCaches.go b/service/fsx/api_op_DescribeFileCaches.go index f9df639a86a..a18ee553bcd 100644 --- a/service/fsx/api_op_DescribeFileCaches.go +++ b/service/fsx/api_op_DescribeFileCaches.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeFileCachesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFileCaches(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationDescribeFileCachesMiddlewares(stack *middleware.Sta return nil } -// DescribeFileCachesAPIClient is a client that implements the DescribeFileCaches -// operation. -type DescribeFileCachesAPIClient interface { - DescribeFileCaches(context.Context, *DescribeFileCachesInput, ...func(*Options)) (*DescribeFileCachesOutput, error) -} - -var _ DescribeFileCachesAPIClient = (*Client)(nil) - // DescribeFileCachesPaginatorOptions is the paginator options for // DescribeFileCaches type DescribeFileCachesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeFileCachesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFileCaches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeFileCachesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeFileCachesAPIClient is a client that implements the DescribeFileCaches +// operation. +type DescribeFileCachesAPIClient interface { + DescribeFileCaches(context.Context, *DescribeFileCachesInput, ...func(*Options)) (*DescribeFileCachesOutput, error) +} + +var _ DescribeFileCachesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFileCaches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeFileSystemAliases.go b/service/fsx/api_op_DescribeFileSystemAliases.go index 22c5f9ecd02..8e672057cf1 100644 --- a/service/fsx/api_op_DescribeFileSystemAliases.go +++ b/service/fsx/api_op_DescribeFileSystemAliases.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeFileSystemAliasesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDescribeFileSystemAliasesMiddleware(stack, options); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeFileSystemAliasesMiddlewares(stack *middlew return nil } -// DescribeFileSystemAliasesAPIClient is a client that implements the -// DescribeFileSystemAliases operation. -type DescribeFileSystemAliasesAPIClient interface { - DescribeFileSystemAliases(context.Context, *DescribeFileSystemAliasesInput, ...func(*Options)) (*DescribeFileSystemAliasesOutput, error) -} - -var _ DescribeFileSystemAliasesAPIClient = (*Client)(nil) - // DescribeFileSystemAliasesPaginatorOptions is the paginator options for // DescribeFileSystemAliases type DescribeFileSystemAliasesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeFileSystemAliasesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFileSystemAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeFileSystemAliasesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeFileSystemAliasesAPIClient is a client that implements the +// DescribeFileSystemAliases operation. +type DescribeFileSystemAliasesAPIClient interface { + DescribeFileSystemAliases(context.Context, *DescribeFileSystemAliasesInput, ...func(*Options)) (*DescribeFileSystemAliasesOutput, error) +} + +var _ DescribeFileSystemAliasesAPIClient = (*Client)(nil) + type idempotencyToken_initializeOpDescribeFileSystemAliases struct { tokenProvider IdempotencyTokenProvider } diff --git a/service/fsx/api_op_DescribeFileSystems.go b/service/fsx/api_op_DescribeFileSystems.go index cf06a55c215..8b8a7e37ae8 100644 --- a/service/fsx/api_op_DescribeFileSystems.go +++ b/service/fsx/api_op_DescribeFileSystems.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeFileSystemsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFileSystems(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeFileSystemsMiddlewares(stack *middleware.St return nil } -// DescribeFileSystemsAPIClient is a client that implements the -// DescribeFileSystems operation. -type DescribeFileSystemsAPIClient interface { - DescribeFileSystems(context.Context, *DescribeFileSystemsInput, ...func(*Options)) (*DescribeFileSystemsOutput, error) -} - -var _ DescribeFileSystemsAPIClient = (*Client)(nil) - // DescribeFileSystemsPaginatorOptions is the paginator options for // DescribeFileSystems type DescribeFileSystemsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFileSystems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeFileSystemsAPIClient is a client that implements the +// DescribeFileSystems operation. +type DescribeFileSystemsAPIClient interface { + DescribeFileSystems(context.Context, *DescribeFileSystemsInput, ...func(*Options)) (*DescribeFileSystemsOutput, error) +} + +var _ DescribeFileSystemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFileSystems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeSharedVpcConfiguration.go b/service/fsx/api_op_DescribeSharedVpcConfiguration.go index 5eb29ade015..7878a46489f 100644 --- a/service/fsx/api_op_DescribeSharedVpcConfiguration.go +++ b/service/fsx/api_op_DescribeSharedVpcConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeSharedVpcConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSharedVpcConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/fsx/api_op_DescribeSnapshots.go b/service/fsx/api_op_DescribeSnapshots.go index c31007534fc..85d90b13a2e 100644 --- a/service/fsx/api_op_DescribeSnapshots.go +++ b/service/fsx/api_op_DescribeSnapshots.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac return nil } -// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots -// operation. -type DescribeSnapshotsAPIClient interface { - DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) -} - -var _ DescribeSnapshotsAPIClient = (*Client)(nil) - // DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots type DescribeSnapshotsPaginatorOptions struct { // The maximum number of resources to return in the response. This value must be @@ -243,6 +238,9 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots +// operation. +type DescribeSnapshotsAPIClient interface { + DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) +} + +var _ DescribeSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeStorageVirtualMachines.go b/service/fsx/api_op_DescribeStorageVirtualMachines.go index 0ae0c49e114..bc4671b5a97 100644 --- a/service/fsx/api_op_DescribeStorageVirtualMachines.go +++ b/service/fsx/api_op_DescribeStorageVirtualMachines.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeStorageVirtualMachinesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStorageVirtualMachines(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeStorageVirtualMachinesMiddlewares(stack *mi return nil } -// DescribeStorageVirtualMachinesAPIClient is a client that implements the -// DescribeStorageVirtualMachines operation. -type DescribeStorageVirtualMachinesAPIClient interface { - DescribeStorageVirtualMachines(context.Context, *DescribeStorageVirtualMachinesInput, ...func(*Options)) (*DescribeStorageVirtualMachinesOutput, error) -} - -var _ DescribeStorageVirtualMachinesAPIClient = (*Client)(nil) - // DescribeStorageVirtualMachinesPaginatorOptions is the paginator options for // DescribeStorageVirtualMachines type DescribeStorageVirtualMachinesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeStorageVirtualMachinesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStorageVirtualMachines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeStorageVirtualMachinesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeStorageVirtualMachinesAPIClient is a client that implements the +// DescribeStorageVirtualMachines operation. +type DescribeStorageVirtualMachinesAPIClient interface { + DescribeStorageVirtualMachines(context.Context, *DescribeStorageVirtualMachinesInput, ...func(*Options)) (*DescribeStorageVirtualMachinesOutput, error) +} + +var _ DescribeStorageVirtualMachinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStorageVirtualMachines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DescribeVolumes.go b/service/fsx/api_op_DescribeVolumes.go index 3468b1e0308..ecf295735ee 100644 --- a/service/fsx/api_op_DescribeVolumes.go +++ b/service/fsx/api_op_DescribeVolumes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumes(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, return nil } -// DescribeVolumesAPIClient is a client that implements the DescribeVolumes -// operation. -type DescribeVolumesAPIClient interface { - DescribeVolumes(context.Context, *DescribeVolumesInput, ...func(*Options)) (*DescribeVolumesOutput, error) -} - -var _ DescribeVolumesAPIClient = (*Client)(nil) - // DescribeVolumesPaginatorOptions is the paginator options for DescribeVolumes type DescribeVolumesPaginatorOptions struct { // The maximum number of resources to return in the response. This value must be @@ -215,6 +210,9 @@ func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVolumes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeVolumesAPIClient is a client that implements the DescribeVolumes +// operation. +type DescribeVolumesAPIClient interface { + DescribeVolumes(context.Context, *DescribeVolumesInput, ...func(*Options)) (*DescribeVolumesOutput, error) +} + +var _ DescribeVolumesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVolumes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_DisassociateFileSystemAliases.go b/service/fsx/api_op_DisassociateFileSystemAliases.go index a9591ab613c..5c13480d606 100644 --- a/service/fsx/api_op_DisassociateFileSystemAliases.go +++ b/service/fsx/api_op_DisassociateFileSystemAliases.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDisassociateFileSystemAliasesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateFileSystemAliasesMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_ListTagsForResource.go b/service/fsx/api_op_ListTagsForResource.go index 7e8cd43c6be..5f626c0053f 100644 --- a/service/fsx/api_op_ListTagsForResource.go +++ b/service/fsx/api_op_ListTagsForResource.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go b/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go index b5ce2557b11..b9ab08b7b49 100644 --- a/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go +++ b/service/fsx/api_op_ReleaseFileSystemNfsV3Locks.go @@ -111,6 +111,9 @@ func (c *Client) addOperationReleaseFileSystemNfsV3LocksMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opReleaseFileSystemNfsV3LocksMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_RestoreVolumeFromSnapshot.go b/service/fsx/api_op_RestoreVolumeFromSnapshot.go index 71d54dc1cc8..e7be8b3332c 100644 --- a/service/fsx/api_op_RestoreVolumeFromSnapshot.go +++ b/service/fsx/api_op_RestoreVolumeFromSnapshot.go @@ -137,6 +137,9 @@ func (c *Client) addOperationRestoreVolumeFromSnapshotMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRestoreVolumeFromSnapshotMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_StartMisconfiguredStateRecovery.go b/service/fsx/api_op_StartMisconfiguredStateRecovery.go index ab51b47d193..37d84984926 100644 --- a/service/fsx/api_op_StartMisconfiguredStateRecovery.go +++ b/service/fsx/api_op_StartMisconfiguredStateRecovery.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartMisconfiguredStateRecoveryMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartMisconfiguredStateRecoveryMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_TagResource.go b/service/fsx/api_op_TagResource.go index c2824e85764..ea00bf29db2 100644 --- a/service/fsx/api_op_TagResource.go +++ b/service/fsx/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fsx/api_op_UntagResource.go b/service/fsx/api_op_UntagResource.go index a975cc2b598..798d4e95834 100644 --- a/service/fsx/api_op_UntagResource.go +++ b/service/fsx/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/fsx/api_op_UpdateDataRepositoryAssociation.go b/service/fsx/api_op_UpdateDataRepositoryAssociation.go index 0ef0dfbbc80..54440735b4f 100644 --- a/service/fsx/api_op_UpdateDataRepositoryAssociation.go +++ b/service/fsx/api_op_UpdateDataRepositoryAssociation.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateDataRepositoryAssociationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateDataRepositoryAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_UpdateFileCache.go b/service/fsx/api_op_UpdateFileCache.go index 188a71c2bfd..613ef2aee80 100644 --- a/service/fsx/api_op_UpdateFileCache.go +++ b/service/fsx/api_op_UpdateFileCache.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateFileCacheMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFileCacheMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_UpdateFileSystem.go b/service/fsx/api_op_UpdateFileSystem.go index b6411031a78..f776875de4e 100644 --- a/service/fsx/api_op_UpdateFileSystem.go +++ b/service/fsx/api_op_UpdateFileSystem.go @@ -260,6 +260,9 @@ func (c *Client) addOperationUpdateFileSystemMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFileSystemMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_UpdateSharedVpcConfiguration.go b/service/fsx/api_op_UpdateSharedVpcConfiguration.go index d0d4cd2852e..3bbef230cf9 100644 --- a/service/fsx/api_op_UpdateSharedVpcConfiguration.go +++ b/service/fsx/api_op_UpdateSharedVpcConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateSharedVpcConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateSharedVpcConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_UpdateSnapshot.go b/service/fsx/api_op_UpdateSnapshot.go index 9b9dd560c16..626e125c23b 100644 --- a/service/fsx/api_op_UpdateSnapshot.go +++ b/service/fsx/api_op_UpdateSnapshot.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateSnapshotMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_UpdateStorageVirtualMachine.go b/service/fsx/api_op_UpdateStorageVirtualMachine.go index 5a5b6ce90c0..5be362512c1 100644 --- a/service/fsx/api_op_UpdateStorageVirtualMachine.go +++ b/service/fsx/api_op_UpdateStorageVirtualMachine.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateStorageVirtualMachineMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateStorageVirtualMachineMiddleware(stack, options); err != nil { return err } diff --git a/service/fsx/api_op_UpdateVolume.go b/service/fsx/api_op_UpdateVolume.go index 1ba756ddbec..ada7921e84e 100644 --- a/service/fsx/api_op_UpdateVolume.go +++ b/service/fsx/api_op_UpdateVolume.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateVolumeMiddleware(stack, options); err != nil { return err } diff --git a/service/gamelift/api_client.go b/service/gamelift/api_client.go index 3d726dc71d7..f3111d57143 100644 --- a/service/gamelift/api_client.go +++ b/service/gamelift/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/gamelift/api_op_AcceptMatch.go b/service/gamelift/api_op_AcceptMatch.go index 6963643ad82..725209d973c 100644 --- a/service/gamelift/api_op_AcceptMatch.go +++ b/service/gamelift/api_op_AcceptMatch.go @@ -147,6 +147,9 @@ func (c *Client) addOperationAcceptMatchMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptMatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_ClaimGameServer.go b/service/gamelift/api_op_ClaimGameServer.go index 87f4a850514..774eeaa6d6c 100644 --- a/service/gamelift/api_op_ClaimGameServer.go +++ b/service/gamelift/api_op_ClaimGameServer.go @@ -161,6 +161,9 @@ func (c *Client) addOperationClaimGameServerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpClaimGameServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateAlias.go b/service/gamelift/api_op_CreateAlias.go index 166b1b1d47d..90b1067fe17 100644 --- a/service/gamelift/api_op_CreateAlias.go +++ b/service/gamelift/api_op_CreateAlias.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateBuild.go b/service/gamelift/api_op_CreateBuild.go index fc4d3532ae4..885e4c0a09e 100644 --- a/service/gamelift/api_op_CreateBuild.go +++ b/service/gamelift/api_op_CreateBuild.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCreateBuildMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBuildValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateContainerGroupDefinition.go b/service/gamelift/api_op_CreateContainerGroupDefinition.go index b77bfa10c43..a68eb0a2933 100644 --- a/service/gamelift/api_op_CreateContainerGroupDefinition.go +++ b/service/gamelift/api_op_CreateContainerGroupDefinition.go @@ -206,6 +206,9 @@ func (c *Client) addOperationCreateContainerGroupDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContainerGroupDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateFleet.go b/service/gamelift/api_op_CreateFleet.go index e960f1ff292..6f9a38b111c 100644 --- a/service/gamelift/api_op_CreateFleet.go +++ b/service/gamelift/api_op_CreateFleet.go @@ -411,6 +411,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateFleetLocations.go b/service/gamelift/api_op_CreateFleetLocations.go index 8ac5c5cbda6..9c77f1847c4 100644 --- a/service/gamelift/api_op_CreateFleetLocations.go +++ b/service/gamelift/api_op_CreateFleetLocations.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateFleetLocationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetLocationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateGameServerGroup.go b/service/gamelift/api_op_CreateGameServerGroup.go index 3819f92a342..67b27c1fec6 100644 --- a/service/gamelift/api_op_CreateGameServerGroup.go +++ b/service/gamelift/api_op_CreateGameServerGroup.go @@ -268,6 +268,9 @@ func (c *Client) addOperationCreateGameServerGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGameServerGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateGameSession.go b/service/gamelift/api_op_CreateGameSession.go index aea65bb9455..c97e48520cc 100644 --- a/service/gamelift/api_op_CreateGameSession.go +++ b/service/gamelift/api_op_CreateGameSession.go @@ -216,6 +216,9 @@ func (c *Client) addOperationCreateGameSessionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGameSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateGameSessionQueue.go b/service/gamelift/api_op_CreateGameSessionQueue.go index 445e531a749..e99a170d276 100644 --- a/service/gamelift/api_op_CreateGameSessionQueue.go +++ b/service/gamelift/api_op_CreateGameSessionQueue.go @@ -203,6 +203,9 @@ func (c *Client) addOperationCreateGameSessionQueueMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGameSessionQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateLocation.go b/service/gamelift/api_op_CreateLocation.go index 177a3e04e64..65ff36c82f0 100644 --- a/service/gamelift/api_op_CreateLocation.go +++ b/service/gamelift/api_op_CreateLocation.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateLocationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateMatchmakingConfiguration.go b/service/gamelift/api_op_CreateMatchmakingConfiguration.go index 32cd55fd124..d264af8ff73 100644 --- a/service/gamelift/api_op_CreateMatchmakingConfiguration.go +++ b/service/gamelift/api_op_CreateMatchmakingConfiguration.go @@ -236,6 +236,9 @@ func (c *Client) addOperationCreateMatchmakingConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMatchmakingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateMatchmakingRuleSet.go b/service/gamelift/api_op_CreateMatchmakingRuleSet.go index 5ae79fc7147..a5ea7ab3a10 100644 --- a/service/gamelift/api_op_CreateMatchmakingRuleSet.go +++ b/service/gamelift/api_op_CreateMatchmakingRuleSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateMatchmakingRuleSetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMatchmakingRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreatePlayerSession.go b/service/gamelift/api_op_CreatePlayerSession.go index f110caad6bc..8db7641a08e 100644 --- a/service/gamelift/api_op_CreatePlayerSession.go +++ b/service/gamelift/api_op_CreatePlayerSession.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreatePlayerSessionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePlayerSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreatePlayerSessions.go b/service/gamelift/api_op_CreatePlayerSessions.go index 5730b30fca9..3485cbd825a 100644 --- a/service/gamelift/api_op_CreatePlayerSessions.go +++ b/service/gamelift/api_op_CreatePlayerSessions.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreatePlayerSessionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePlayerSessionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateScript.go b/service/gamelift/api_op_CreateScript.go index e557ddd1ff5..67f504ba445 100644 --- a/service/gamelift/api_op_CreateScript.go +++ b/service/gamelift/api_op_CreateScript.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateScriptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScriptValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateVpcPeeringAuthorization.go b/service/gamelift/api_op_CreateVpcPeeringAuthorization.go index 47e5250742f..46264b54639 100644 --- a/service/gamelift/api_op_CreateVpcPeeringAuthorization.go +++ b/service/gamelift/api_op_CreateVpcPeeringAuthorization.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateVpcPeeringAuthorizationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcPeeringAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_CreateVpcPeeringConnection.go b/service/gamelift/api_op_CreateVpcPeeringConnection.go index 17501f65586..7b0e5fc4589 100644 --- a/service/gamelift/api_op_CreateVpcPeeringConnection.go +++ b/service/gamelift/api_op_CreateVpcPeeringConnection.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateVpcPeeringConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcPeeringConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteAlias.go b/service/gamelift/api_op_DeleteAlias.go index 3c51902e441..8227b573fbe 100644 --- a/service/gamelift/api_op_DeleteAlias.go +++ b/service/gamelift/api_op_DeleteAlias.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteBuild.go b/service/gamelift/api_op_DeleteBuild.go index 5cc2f12f1c0..c8b00e777be 100644 --- a/service/gamelift/api_op_DeleteBuild.go +++ b/service/gamelift/api_op_DeleteBuild.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteBuildMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBuildValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteContainerGroupDefinition.go b/service/gamelift/api_op_DeleteContainerGroupDefinition.go index 65b0708e934..a0a9b90b693 100644 --- a/service/gamelift/api_op_DeleteContainerGroupDefinition.go +++ b/service/gamelift/api_op_DeleteContainerGroupDefinition.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteContainerGroupDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContainerGroupDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteFleet.go b/service/gamelift/api_op_DeleteFleet.go index 9fc41478627..2a9ceffff11 100644 --- a/service/gamelift/api_op_DeleteFleet.go +++ b/service/gamelift/api_op_DeleteFleet.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteFleetLocations.go b/service/gamelift/api_op_DeleteFleetLocations.go index bb5ec3976a5..5496bda1c9b 100644 --- a/service/gamelift/api_op_DeleteFleetLocations.go +++ b/service/gamelift/api_op_DeleteFleetLocations.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDeleteFleetLocationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetLocationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteGameServerGroup.go b/service/gamelift/api_op_DeleteGameServerGroup.go index cc851a3c2e5..230eb956753 100644 --- a/service/gamelift/api_op_DeleteGameServerGroup.go +++ b/service/gamelift/api_op_DeleteGameServerGroup.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDeleteGameServerGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGameServerGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteGameSessionQueue.go b/service/gamelift/api_op_DeleteGameSessionQueue.go index cfe637fca54..56ed513301a 100644 --- a/service/gamelift/api_op_DeleteGameSessionQueue.go +++ b/service/gamelift/api_op_DeleteGameSessionQueue.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteGameSessionQueueMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGameSessionQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteLocation.go b/service/gamelift/api_op_DeleteLocation.go index aee56779e65..a588ac48156 100644 --- a/service/gamelift/api_op_DeleteLocation.go +++ b/service/gamelift/api_op_DeleteLocation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteLocationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteMatchmakingConfiguration.go b/service/gamelift/api_op_DeleteMatchmakingConfiguration.go index c209b1ade2d..f89ebfa7995 100644 --- a/service/gamelift/api_op_DeleteMatchmakingConfiguration.go +++ b/service/gamelift/api_op_DeleteMatchmakingConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMatchmakingConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMatchmakingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteMatchmakingRuleSet.go b/service/gamelift/api_op_DeleteMatchmakingRuleSet.go index cc99b4e8e6c..09de16aae25 100644 --- a/service/gamelift/api_op_DeleteMatchmakingRuleSet.go +++ b/service/gamelift/api_op_DeleteMatchmakingRuleSet.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteMatchmakingRuleSetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMatchmakingRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteScalingPolicy.go b/service/gamelift/api_op_DeleteScalingPolicy.go index 96a845978bc..9b797711132 100644 --- a/service/gamelift/api_op_DeleteScalingPolicy.go +++ b/service/gamelift/api_op_DeleteScalingPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteScalingPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteScript.go b/service/gamelift/api_op_DeleteScript.go index c7c3c83af4e..4ac8ae3ca37 100644 --- a/service/gamelift/api_op_DeleteScript.go +++ b/service/gamelift/api_op_DeleteScript.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteScriptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScriptValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteVpcPeeringAuthorization.go b/service/gamelift/api_op_DeleteVpcPeeringAuthorization.go index 7f135181f5d..a4abebe605e 100644 --- a/service/gamelift/api_op_DeleteVpcPeeringAuthorization.go +++ b/service/gamelift/api_op_DeleteVpcPeeringAuthorization.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteVpcPeeringAuthorizationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcPeeringAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeleteVpcPeeringConnection.go b/service/gamelift/api_op_DeleteVpcPeeringConnection.go index f5de959e32a..806cd109db1 100644 --- a/service/gamelift/api_op_DeleteVpcPeeringConnection.go +++ b/service/gamelift/api_op_DeleteVpcPeeringConnection.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteVpcPeeringConnectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcPeeringConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeregisterCompute.go b/service/gamelift/api_op_DeregisterCompute.go index 59a014d82cf..6de0c35cb3d 100644 --- a/service/gamelift/api_op_DeregisterCompute.go +++ b/service/gamelift/api_op_DeregisterCompute.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeregisterComputeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterComputeValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DeregisterGameServer.go b/service/gamelift/api_op_DeregisterGameServer.go index b4de61fefc9..6c84178f873 100644 --- a/service/gamelift/api_op_DeregisterGameServer.go +++ b/service/gamelift/api_op_DeregisterGameServer.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeregisterGameServerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterGameServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeAlias.go b/service/gamelift/api_op_DescribeAlias.go index 2690ea383d1..1203a4e1f70 100644 --- a/service/gamelift/api_op_DescribeAlias.go +++ b/service/gamelift/api_op_DescribeAlias.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAliasMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeBuild.go b/service/gamelift/api_op_DescribeBuild.go index d0271ffacb4..dad33532289 100644 --- a/service/gamelift/api_op_DescribeBuild.go +++ b/service/gamelift/api_op_DescribeBuild.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeBuildMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBuildValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeCompute.go b/service/gamelift/api_op_DescribeCompute.go index b1fae35543e..3e9f4155f16 100644 --- a/service/gamelift/api_op_DescribeCompute.go +++ b/service/gamelift/api_op_DescribeCompute.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeComputeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeComputeValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeContainerGroupDefinition.go b/service/gamelift/api_op_DescribeContainerGroupDefinition.go index 38653b073f2..9e8ab6f2e42 100644 --- a/service/gamelift/api_op_DescribeContainerGroupDefinition.go +++ b/service/gamelift/api_op_DescribeContainerGroupDefinition.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeContainerGroupDefinitionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContainerGroupDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeEC2InstanceLimits.go b/service/gamelift/api_op_DescribeEC2InstanceLimits.go index 88930435fe8..52ece3636bb 100644 --- a/service/gamelift/api_op_DescribeEC2InstanceLimits.go +++ b/service/gamelift/api_op_DescribeEC2InstanceLimits.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeEC2InstanceLimitsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEC2InstanceLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeFleetAttributes.go b/service/gamelift/api_op_DescribeFleetAttributes.go index d6d2ab378c9..e7a41fc41c1 100644 --- a/service/gamelift/api_op_DescribeFleetAttributes.go +++ b/service/gamelift/api_op_DescribeFleetAttributes.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeFleetAttributesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetAttributes(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeFleetAttributesMiddlewares(stack *middlewar return nil } -// DescribeFleetAttributesAPIClient is a client that implements the -// DescribeFleetAttributes operation. -type DescribeFleetAttributesAPIClient interface { - DescribeFleetAttributes(context.Context, *DescribeFleetAttributesInput, ...func(*Options)) (*DescribeFleetAttributesOutput, error) -} - -var _ DescribeFleetAttributesAPIClient = (*Client)(nil) - // DescribeFleetAttributesPaginatorOptions is the paginator options for // DescribeFleetAttributes type DescribeFleetAttributesPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *DescribeFleetAttributesPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *DescribeFleetAttributesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeFleetAttributesAPIClient is a client that implements the +// DescribeFleetAttributes operation. +type DescribeFleetAttributesAPIClient interface { + DescribeFleetAttributes(context.Context, *DescribeFleetAttributesInput, ...func(*Options)) (*DescribeFleetAttributesOutput, error) +} + +var _ DescribeFleetAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeFleetCapacity.go b/service/gamelift/api_op_DescribeFleetCapacity.go index 2450156159b..e5bfdbdecd5 100644 --- a/service/gamelift/api_op_DescribeFleetCapacity.go +++ b/service/gamelift/api_op_DescribeFleetCapacity.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeFleetCapacityMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetCapacity(options.Region), middleware.Before); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationDescribeFleetCapacityMiddlewares(stack *middleware. return nil } -// DescribeFleetCapacityAPIClient is a client that implements the -// DescribeFleetCapacity operation. -type DescribeFleetCapacityAPIClient interface { - DescribeFleetCapacity(context.Context, *DescribeFleetCapacityInput, ...func(*Options)) (*DescribeFleetCapacityOutput, error) -} - -var _ DescribeFleetCapacityAPIClient = (*Client)(nil) - // DescribeFleetCapacityPaginatorOptions is the paginator options for // DescribeFleetCapacity type DescribeFleetCapacityPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *DescribeFleetCapacityPaginator) NextPage(ctx context.Context, optFns .. } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetCapacity(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *DescribeFleetCapacityPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeFleetCapacityAPIClient is a client that implements the +// DescribeFleetCapacity operation. +type DescribeFleetCapacityAPIClient interface { + DescribeFleetCapacity(context.Context, *DescribeFleetCapacityInput, ...func(*Options)) (*DescribeFleetCapacityOutput, error) +} + +var _ DescribeFleetCapacityAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetCapacity(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeFleetEvents.go b/service/gamelift/api_op_DescribeFleetEvents.go index 17872fcc883..dbb1d01e7b1 100644 --- a/service/gamelift/api_op_DescribeFleetEvents.go +++ b/service/gamelift/api_op_DescribeFleetEvents.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeFleetEventsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetEventsValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeFleetEventsMiddlewares(stack *middleware.St return nil } -// DescribeFleetEventsAPIClient is a client that implements the -// DescribeFleetEvents operation. -type DescribeFleetEventsAPIClient interface { - DescribeFleetEvents(context.Context, *DescribeFleetEventsInput, ...func(*Options)) (*DescribeFleetEventsOutput, error) -} - -var _ DescribeFleetEventsAPIClient = (*Client)(nil) - // DescribeFleetEventsPaginatorOptions is the paginator options for // DescribeFleetEvents type DescribeFleetEventsPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *DescribeFleetEventsPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *DescribeFleetEventsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeFleetEventsAPIClient is a client that implements the +// DescribeFleetEvents operation. +type DescribeFleetEventsAPIClient interface { + DescribeFleetEvents(context.Context, *DescribeFleetEventsInput, ...func(*Options)) (*DescribeFleetEventsOutput, error) +} + +var _ DescribeFleetEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeFleetLocationAttributes.go b/service/gamelift/api_op_DescribeFleetLocationAttributes.go index 1e9a175fe21..03a1e70642a 100644 --- a/service/gamelift/api_op_DescribeFleetLocationAttributes.go +++ b/service/gamelift/api_op_DescribeFleetLocationAttributes.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeFleetLocationAttributesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetLocationAttributesValidationMiddleware(stack); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationDescribeFleetLocationAttributesMiddlewares(stack *m return nil } -// DescribeFleetLocationAttributesAPIClient is a client that implements the -// DescribeFleetLocationAttributes operation. -type DescribeFleetLocationAttributesAPIClient interface { - DescribeFleetLocationAttributes(context.Context, *DescribeFleetLocationAttributesInput, ...func(*Options)) (*DescribeFleetLocationAttributesOutput, error) -} - -var _ DescribeFleetLocationAttributesAPIClient = (*Client)(nil) - // DescribeFleetLocationAttributesPaginatorOptions is the paginator options for // DescribeFleetLocationAttributes type DescribeFleetLocationAttributesPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *DescribeFleetLocationAttributesPaginator) NextPage(ctx context.Context, } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetLocationAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *DescribeFleetLocationAttributesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeFleetLocationAttributesAPIClient is a client that implements the +// DescribeFleetLocationAttributes operation. +type DescribeFleetLocationAttributesAPIClient interface { + DescribeFleetLocationAttributes(context.Context, *DescribeFleetLocationAttributesInput, ...func(*Options)) (*DescribeFleetLocationAttributesOutput, error) +} + +var _ DescribeFleetLocationAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetLocationAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeFleetLocationCapacity.go b/service/gamelift/api_op_DescribeFleetLocationCapacity.go index 5d048b70fc0..ee5e23e4345 100644 --- a/service/gamelift/api_op_DescribeFleetLocationCapacity.go +++ b/service/gamelift/api_op_DescribeFleetLocationCapacity.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeFleetLocationCapacityMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetLocationCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeFleetLocationUtilization.go b/service/gamelift/api_op_DescribeFleetLocationUtilization.go index 7c8651412f6..e75e604a96e 100644 --- a/service/gamelift/api_op_DescribeFleetLocationUtilization.go +++ b/service/gamelift/api_op_DescribeFleetLocationUtilization.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeFleetLocationUtilizationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetLocationUtilizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeFleetPortSettings.go b/service/gamelift/api_op_DescribeFleetPortSettings.go index e85a022f6f8..278826855c6 100644 --- a/service/gamelift/api_op_DescribeFleetPortSettings.go +++ b/service/gamelift/api_op_DescribeFleetPortSettings.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDescribeFleetPortSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetPortSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeFleetUtilization.go b/service/gamelift/api_op_DescribeFleetUtilization.go index 28f46a5d4c4..b1f27db2e8a 100644 --- a/service/gamelift/api_op_DescribeFleetUtilization.go +++ b/service/gamelift/api_op_DescribeFleetUtilization.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeFleetUtilizationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetUtilization(options.Region), middleware.Before); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationDescribeFleetUtilizationMiddlewares(stack *middlewa return nil } -// DescribeFleetUtilizationAPIClient is a client that implements the -// DescribeFleetUtilization operation. -type DescribeFleetUtilizationAPIClient interface { - DescribeFleetUtilization(context.Context, *DescribeFleetUtilizationInput, ...func(*Options)) (*DescribeFleetUtilizationOutput, error) -} - -var _ DescribeFleetUtilizationAPIClient = (*Client)(nil) - // DescribeFleetUtilizationPaginatorOptions is the paginator options for // DescribeFleetUtilization type DescribeFleetUtilizationPaginatorOptions struct { @@ -252,6 +247,9 @@ func (p *DescribeFleetUtilizationPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFleetUtilization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *DescribeFleetUtilizationPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeFleetUtilizationAPIClient is a client that implements the +// DescribeFleetUtilization operation. +type DescribeFleetUtilizationAPIClient interface { + DescribeFleetUtilization(context.Context, *DescribeFleetUtilizationInput, ...func(*Options)) (*DescribeFleetUtilizationOutput, error) +} + +var _ DescribeFleetUtilizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFleetUtilization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeGameServer.go b/service/gamelift/api_op_DescribeGameServer.go index 900b8035d8e..a43ab0ef2de 100644 --- a/service/gamelift/api_op_DescribeGameServer.go +++ b/service/gamelift/api_op_DescribeGameServer.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeGameServerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGameServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeGameServerGroup.go b/service/gamelift/api_op_DescribeGameServerGroup.go index 004041dbb59..611f14f3b54 100644 --- a/service/gamelift/api_op_DescribeGameServerGroup.go +++ b/service/gamelift/api_op_DescribeGameServerGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeGameServerGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGameServerGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeGameServerInstances.go b/service/gamelift/api_op_DescribeGameServerInstances.go index 000a3773b3c..9e53dc64526 100644 --- a/service/gamelift/api_op_DescribeGameServerInstances.go +++ b/service/gamelift/api_op_DescribeGameServerInstances.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeGameServerInstancesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGameServerInstancesValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationDescribeGameServerInstancesMiddlewares(stack *middl return nil } -// DescribeGameServerInstancesAPIClient is a client that implements the -// DescribeGameServerInstances operation. -type DescribeGameServerInstancesAPIClient interface { - DescribeGameServerInstances(context.Context, *DescribeGameServerInstancesInput, ...func(*Options)) (*DescribeGameServerInstancesOutput, error) -} - -var _ DescribeGameServerInstancesAPIClient = (*Client)(nil) - // DescribeGameServerInstancesPaginatorOptions is the paginator options for // DescribeGameServerInstances type DescribeGameServerInstancesPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeGameServerInstancesPaginator) NextPage(ctx context.Context, opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGameServerInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeGameServerInstancesPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeGameServerInstancesAPIClient is a client that implements the +// DescribeGameServerInstances operation. +type DescribeGameServerInstancesAPIClient interface { + DescribeGameServerInstances(context.Context, *DescribeGameServerInstancesInput, ...func(*Options)) (*DescribeGameServerInstancesOutput, error) +} + +var _ DescribeGameServerInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGameServerInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeGameSessionDetails.go b/service/gamelift/api_op_DescribeGameSessionDetails.go index 37f1b5b03a6..c9abfc6e43b 100644 --- a/service/gamelift/api_op_DescribeGameSessionDetails.go +++ b/service/gamelift/api_op_DescribeGameSessionDetails.go @@ -169,6 +169,9 @@ func (c *Client) addOperationDescribeGameSessionDetailsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGameSessionDetails(options.Region), middleware.Before); err != nil { return err } @@ -190,14 +193,6 @@ func (c *Client) addOperationDescribeGameSessionDetailsMiddlewares(stack *middle return nil } -// DescribeGameSessionDetailsAPIClient is a client that implements the -// DescribeGameSessionDetails operation. -type DescribeGameSessionDetailsAPIClient interface { - DescribeGameSessionDetails(context.Context, *DescribeGameSessionDetailsInput, ...func(*Options)) (*DescribeGameSessionDetailsOutput, error) -} - -var _ DescribeGameSessionDetailsAPIClient = (*Client)(nil) - // DescribeGameSessionDetailsPaginatorOptions is the paginator options for // DescribeGameSessionDetails type DescribeGameSessionDetailsPaginatorOptions struct { @@ -265,6 +260,9 @@ func (p *DescribeGameSessionDetailsPaginator) NextPage(ctx context.Context, optF } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGameSessionDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +282,14 @@ func (p *DescribeGameSessionDetailsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeGameSessionDetailsAPIClient is a client that implements the +// DescribeGameSessionDetails operation. +type DescribeGameSessionDetailsAPIClient interface { + DescribeGameSessionDetails(context.Context, *DescribeGameSessionDetailsInput, ...func(*Options)) (*DescribeGameSessionDetailsOutput, error) +} + +var _ DescribeGameSessionDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGameSessionDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeGameSessionPlacement.go b/service/gamelift/api_op_DescribeGameSessionPlacement.go index 048a78e0a5c..115414063cc 100644 --- a/service/gamelift/api_op_DescribeGameSessionPlacement.go +++ b/service/gamelift/api_op_DescribeGameSessionPlacement.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeGameSessionPlacementMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGameSessionPlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeGameSessionQueues.go b/service/gamelift/api_op_DescribeGameSessionQueues.go index bf26a5b337f..02bc8c6c26e 100644 --- a/service/gamelift/api_op_DescribeGameSessionQueues.go +++ b/service/gamelift/api_op_DescribeGameSessionQueues.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeGameSessionQueuesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGameSessionQueues(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeGameSessionQueuesMiddlewares(stack *middlew return nil } -// DescribeGameSessionQueuesAPIClient is a client that implements the -// DescribeGameSessionQueues operation. -type DescribeGameSessionQueuesAPIClient interface { - DescribeGameSessionQueues(context.Context, *DescribeGameSessionQueuesInput, ...func(*Options)) (*DescribeGameSessionQueuesOutput, error) -} - -var _ DescribeGameSessionQueuesAPIClient = (*Client)(nil) - // DescribeGameSessionQueuesPaginatorOptions is the paginator options for // DescribeGameSessionQueues type DescribeGameSessionQueuesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeGameSessionQueuesPaginator) NextPage(ctx context.Context, optFn } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGameSessionQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeGameSessionQueuesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeGameSessionQueuesAPIClient is a client that implements the +// DescribeGameSessionQueues operation. +type DescribeGameSessionQueuesAPIClient interface { + DescribeGameSessionQueues(context.Context, *DescribeGameSessionQueuesInput, ...func(*Options)) (*DescribeGameSessionQueuesOutput, error) +} + +var _ DescribeGameSessionQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGameSessionQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeGameSessions.go b/service/gamelift/api_op_DescribeGameSessions.go index 19562154e1c..21d90f78118 100644 --- a/service/gamelift/api_op_DescribeGameSessions.go +++ b/service/gamelift/api_op_DescribeGameSessions.go @@ -176,6 +176,9 @@ func (c *Client) addOperationDescribeGameSessionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGameSessions(options.Region), middleware.Before); err != nil { return err } @@ -197,14 +200,6 @@ func (c *Client) addOperationDescribeGameSessionsMiddlewares(stack *middleware.S return nil } -// DescribeGameSessionsAPIClient is a client that implements the -// DescribeGameSessions operation. -type DescribeGameSessionsAPIClient interface { - DescribeGameSessions(context.Context, *DescribeGameSessionsInput, ...func(*Options)) (*DescribeGameSessionsOutput, error) -} - -var _ DescribeGameSessionsAPIClient = (*Client)(nil) - // DescribeGameSessionsPaginatorOptions is the paginator options for // DescribeGameSessions type DescribeGameSessionsPaginatorOptions struct { @@ -270,6 +265,9 @@ func (p *DescribeGameSessionsPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGameSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -289,6 +287,14 @@ func (p *DescribeGameSessionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeGameSessionsAPIClient is a client that implements the +// DescribeGameSessions operation. +type DescribeGameSessionsAPIClient interface { + DescribeGameSessions(context.Context, *DescribeGameSessionsInput, ...func(*Options)) (*DescribeGameSessionsOutput, error) +} + +var _ DescribeGameSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGameSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeInstances.go b/service/gamelift/api_op_DescribeInstances.go index a3e49c8d592..242e8e1f68f 100644 --- a/service/gamelift/api_op_DescribeInstances.go +++ b/service/gamelift/api_op_DescribeInstances.go @@ -164,6 +164,9 @@ func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstancesValidationMiddleware(stack); err != nil { return err } @@ -188,14 +191,6 @@ func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stac return nil } -// DescribeInstancesAPIClient is a client that implements the DescribeInstances -// operation. -type DescribeInstancesAPIClient interface { - DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) -} - -var _ DescribeInstancesAPIClient = (*Client)(nil) - // DescribeInstancesPaginatorOptions is the paginator options for DescribeInstances type DescribeInstancesPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -260,6 +255,9 @@ func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...fun } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeInstancesAPIClient is a client that implements the DescribeInstances +// operation. +type DescribeInstancesAPIClient interface { + DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) +} + +var _ DescribeInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeMatchmaking.go b/service/gamelift/api_op_DescribeMatchmaking.go index 35f6487f23a..029cd7f211d 100644 --- a/service/gamelift/api_op_DescribeMatchmaking.go +++ b/service/gamelift/api_op_DescribeMatchmaking.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeMatchmakingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMatchmakingValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeMatchmakingConfigurations.go b/service/gamelift/api_op_DescribeMatchmakingConfigurations.go index a4c889a61df..a5b80620ca2 100644 --- a/service/gamelift/api_op_DescribeMatchmakingConfigurations.go +++ b/service/gamelift/api_op_DescribeMatchmakingConfigurations.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeMatchmakingConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMatchmakingConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationDescribeMatchmakingConfigurationsMiddlewares(stack return nil } -// DescribeMatchmakingConfigurationsAPIClient is a client that implements the -// DescribeMatchmakingConfigurations operation. -type DescribeMatchmakingConfigurationsAPIClient interface { - DescribeMatchmakingConfigurations(context.Context, *DescribeMatchmakingConfigurationsInput, ...func(*Options)) (*DescribeMatchmakingConfigurationsOutput, error) -} - -var _ DescribeMatchmakingConfigurationsAPIClient = (*Client)(nil) - // DescribeMatchmakingConfigurationsPaginatorOptions is the paginator options for // DescribeMatchmakingConfigurations type DescribeMatchmakingConfigurationsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeMatchmakingConfigurationsPaginator) NextPage(ctx context.Contex } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMatchmakingConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeMatchmakingConfigurationsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeMatchmakingConfigurationsAPIClient is a client that implements the +// DescribeMatchmakingConfigurations operation. +type DescribeMatchmakingConfigurationsAPIClient interface { + DescribeMatchmakingConfigurations(context.Context, *DescribeMatchmakingConfigurationsInput, ...func(*Options)) (*DescribeMatchmakingConfigurationsOutput, error) +} + +var _ DescribeMatchmakingConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMatchmakingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeMatchmakingRuleSets.go b/service/gamelift/api_op_DescribeMatchmakingRuleSets.go index 2a742c1aa71..d0bc5170218 100644 --- a/service/gamelift/api_op_DescribeMatchmakingRuleSets.go +++ b/service/gamelift/api_op_DescribeMatchmakingRuleSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeMatchmakingRuleSetsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMatchmakingRuleSets(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribeMatchmakingRuleSetsMiddlewares(stack *middl return nil } -// DescribeMatchmakingRuleSetsAPIClient is a client that implements the -// DescribeMatchmakingRuleSets operation. -type DescribeMatchmakingRuleSetsAPIClient interface { - DescribeMatchmakingRuleSets(context.Context, *DescribeMatchmakingRuleSetsInput, ...func(*Options)) (*DescribeMatchmakingRuleSetsOutput, error) -} - -var _ DescribeMatchmakingRuleSetsAPIClient = (*Client)(nil) - // DescribeMatchmakingRuleSetsPaginatorOptions is the paginator options for // DescribeMatchmakingRuleSets type DescribeMatchmakingRuleSetsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeMatchmakingRuleSetsPaginator) NextPage(ctx context.Context, opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMatchmakingRuleSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeMatchmakingRuleSetsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeMatchmakingRuleSetsAPIClient is a client that implements the +// DescribeMatchmakingRuleSets operation. +type DescribeMatchmakingRuleSetsAPIClient interface { + DescribeMatchmakingRuleSets(context.Context, *DescribeMatchmakingRuleSetsInput, ...func(*Options)) (*DescribeMatchmakingRuleSetsOutput, error) +} + +var _ DescribeMatchmakingRuleSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMatchmakingRuleSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribePlayerSessions.go b/service/gamelift/api_op_DescribePlayerSessions.go index 0ae6c484169..2250bc6623a 100644 --- a/service/gamelift/api_op_DescribePlayerSessions.go +++ b/service/gamelift/api_op_DescribePlayerSessions.go @@ -170,6 +170,9 @@ func (c *Client) addOperationDescribePlayerSessionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePlayerSessions(options.Region), middleware.Before); err != nil { return err } @@ -191,14 +194,6 @@ func (c *Client) addOperationDescribePlayerSessionsMiddlewares(stack *middleware return nil } -// DescribePlayerSessionsAPIClient is a client that implements the -// DescribePlayerSessions operation. -type DescribePlayerSessionsAPIClient interface { - DescribePlayerSessions(context.Context, *DescribePlayerSessionsInput, ...func(*Options)) (*DescribePlayerSessionsOutput, error) -} - -var _ DescribePlayerSessionsAPIClient = (*Client)(nil) - // DescribePlayerSessionsPaginatorOptions is the paginator options for // DescribePlayerSessions type DescribePlayerSessionsPaginatorOptions struct { @@ -265,6 +260,9 @@ func (p *DescribePlayerSessionsPaginator) NextPage(ctx context.Context, optFns . } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePlayerSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +282,14 @@ func (p *DescribePlayerSessionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribePlayerSessionsAPIClient is a client that implements the +// DescribePlayerSessions operation. +type DescribePlayerSessionsAPIClient interface { + DescribePlayerSessions(context.Context, *DescribePlayerSessionsInput, ...func(*Options)) (*DescribePlayerSessionsOutput, error) +} + +var _ DescribePlayerSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePlayerSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeRuntimeConfiguration.go b/service/gamelift/api_op_DescribeRuntimeConfiguration.go index f76e4de9ca2..fd745d47359 100644 --- a/service/gamelift/api_op_DescribeRuntimeConfiguration.go +++ b/service/gamelift/api_op_DescribeRuntimeConfiguration.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeRuntimeConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRuntimeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeScalingPolicies.go b/service/gamelift/api_op_DescribeScalingPolicies.go index c94dd5f5851..82b6a3fc948 100644 --- a/service/gamelift/api_op_DescribeScalingPolicies.go +++ b/service/gamelift/api_op_DescribeScalingPolicies.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeScalingPoliciesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScalingPoliciesValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationDescribeScalingPoliciesMiddlewares(stack *middlewar return nil } -// DescribeScalingPoliciesAPIClient is a client that implements the -// DescribeScalingPolicies operation. -type DescribeScalingPoliciesAPIClient interface { - DescribeScalingPolicies(context.Context, *DescribeScalingPoliciesInput, ...func(*Options)) (*DescribeScalingPoliciesOutput, error) -} - -var _ DescribeScalingPoliciesAPIClient = (*Client)(nil) - // DescribeScalingPoliciesPaginatorOptions is the paginator options for // DescribeScalingPolicies type DescribeScalingPoliciesPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeScalingPoliciesPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScalingPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeScalingPoliciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeScalingPoliciesAPIClient is a client that implements the +// DescribeScalingPolicies operation. +type DescribeScalingPoliciesAPIClient interface { + DescribeScalingPolicies(context.Context, *DescribeScalingPoliciesInput, ...func(*Options)) (*DescribeScalingPoliciesOutput, error) +} + +var _ DescribeScalingPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScalingPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_DescribeScript.go b/service/gamelift/api_op_DescribeScript.go index 92871c5d3ab..baae36f010c 100644 --- a/service/gamelift/api_op_DescribeScript.go +++ b/service/gamelift/api_op_DescribeScript.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeScriptMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScriptValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeVpcPeeringAuthorizations.go b/service/gamelift/api_op_DescribeVpcPeeringAuthorizations.go index 7231ce28a20..0cfa12f8efe 100644 --- a/service/gamelift/api_op_DescribeVpcPeeringAuthorizations.go +++ b/service/gamelift/api_op_DescribeVpcPeeringAuthorizations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeVpcPeeringAuthorizationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcPeeringAuthorizations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/gamelift/api_op_DescribeVpcPeeringConnections.go b/service/gamelift/api_op_DescribeVpcPeeringConnections.go index adf92c1c886..31211b83120 100644 --- a/service/gamelift/api_op_DescribeVpcPeeringConnections.go +++ b/service/gamelift/api_op_DescribeVpcPeeringConnections.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeVpcPeeringConnectionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcPeeringConnections(options.Region), middleware.Before); err != nil { return err } diff --git a/service/gamelift/api_op_GetComputeAccess.go b/service/gamelift/api_op_GetComputeAccess.go index 538f08975bc..4ce327739dc 100644 --- a/service/gamelift/api_op_GetComputeAccess.go +++ b/service/gamelift/api_op_GetComputeAccess.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetComputeAccessMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComputeAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_GetComputeAuthToken.go b/service/gamelift/api_op_GetComputeAuthToken.go index 261af1302cc..26e8ac0381b 100644 --- a/service/gamelift/api_op_GetComputeAuthToken.go +++ b/service/gamelift/api_op_GetComputeAuthToken.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetComputeAuthTokenMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComputeAuthTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_GetGameSessionLogUrl.go b/service/gamelift/api_op_GetGameSessionLogUrl.go index 40ac1fb3686..0c3d67b0f2a 100644 --- a/service/gamelift/api_op_GetGameSessionLogUrl.go +++ b/service/gamelift/api_op_GetGameSessionLogUrl.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetGameSessionLogUrlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGameSessionLogUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_GetInstanceAccess.go b/service/gamelift/api_op_GetInstanceAccess.go index 743c0aee723..2d9bbb0ca39 100644 --- a/service/gamelift/api_op_GetInstanceAccess.go +++ b/service/gamelift/api_op_GetInstanceAccess.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetInstanceAccessMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_ListAliases.go b/service/gamelift/api_op_ListAliases.go index c0eee3e9bee..c6ccd1ae21e 100644 --- a/service/gamelift/api_op_ListAliases.go +++ b/service/gamelift/api_op_ListAliases.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(options.Region), middleware.Before); err != nil { return err } @@ -166,13 +169,6 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt return nil } -// ListAliasesAPIClient is a client that implements the ListAliases operation. -type ListAliasesAPIClient interface { - ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) -} - -var _ ListAliasesAPIClient = (*Client)(nil) - // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -237,6 +233,9 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +255,13 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListBuilds.go b/service/gamelift/api_op_ListBuilds.go index 5d029bffd76..2739245a0e2 100644 --- a/service/gamelift/api_op_ListBuilds.go +++ b/service/gamelift/api_op_ListBuilds.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListBuildsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuilds(options.Region), middleware.Before); err != nil { return err } @@ -166,13 +169,6 @@ func (c *Client) addOperationListBuildsMiddlewares(stack *middleware.Stack, opti return nil } -// ListBuildsAPIClient is a client that implements the ListBuilds operation. -type ListBuildsAPIClient interface { - ListBuilds(context.Context, *ListBuildsInput, ...func(*Options)) (*ListBuildsOutput, error) -} - -var _ ListBuildsAPIClient = (*Client)(nil) - // ListBuildsPaginatorOptions is the paginator options for ListBuilds type ListBuildsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -237,6 +233,9 @@ func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuilds(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +255,13 @@ func (p *ListBuildsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListBuildsAPIClient is a client that implements the ListBuilds operation. +type ListBuildsAPIClient interface { + ListBuilds(context.Context, *ListBuildsInput, ...func(*Options)) (*ListBuildsOutput, error) +} + +var _ ListBuildsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuilds(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListCompute.go b/service/gamelift/api_op_ListCompute.go index de4adb4c4b1..fbef13d587e 100644 --- a/service/gamelift/api_op_ListCompute.go +++ b/service/gamelift/api_op_ListCompute.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListComputeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComputeValidationMiddleware(stack); err != nil { return err } @@ -174,13 +177,6 @@ func (c *Client) addOperationListComputeMiddlewares(stack *middleware.Stack, opt return nil } -// ListComputeAPIClient is a client that implements the ListCompute operation. -type ListComputeAPIClient interface { - ListCompute(context.Context, *ListComputeInput, ...func(*Options)) (*ListComputeOutput, error) -} - -var _ ListComputeAPIClient = (*Client)(nil) - // ListComputePaginatorOptions is the paginator options for ListCompute type ListComputePaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -245,6 +241,9 @@ func (p *ListComputePaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCompute(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +263,13 @@ func (p *ListComputePaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListComputeAPIClient is a client that implements the ListCompute operation. +type ListComputeAPIClient interface { + ListCompute(context.Context, *ListComputeInput, ...func(*Options)) (*ListComputeOutput, error) +} + +var _ ListComputeAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCompute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListContainerGroupDefinitions.go b/service/gamelift/api_op_ListContainerGroupDefinitions.go index dd0b8821bc4..6327bf5ffcd 100644 --- a/service/gamelift/api_op_ListContainerGroupDefinitions.go +++ b/service/gamelift/api_op_ListContainerGroupDefinitions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListContainerGroupDefinitionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContainerGroupDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListContainerGroupDefinitionsMiddlewares(stack *mid return nil } -// ListContainerGroupDefinitionsAPIClient is a client that implements the -// ListContainerGroupDefinitions operation. -type ListContainerGroupDefinitionsAPIClient interface { - ListContainerGroupDefinitions(context.Context, *ListContainerGroupDefinitionsInput, ...func(*Options)) (*ListContainerGroupDefinitionsOutput, error) -} - -var _ ListContainerGroupDefinitionsAPIClient = (*Client)(nil) - // ListContainerGroupDefinitionsPaginatorOptions is the paginator options for // ListContainerGroupDefinitions type ListContainerGroupDefinitionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListContainerGroupDefinitionsPaginator) NextPage(ctx context.Context, o } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContainerGroupDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListContainerGroupDefinitionsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListContainerGroupDefinitionsAPIClient is a client that implements the +// ListContainerGroupDefinitions operation. +type ListContainerGroupDefinitionsAPIClient interface { + ListContainerGroupDefinitions(context.Context, *ListContainerGroupDefinitionsInput, ...func(*Options)) (*ListContainerGroupDefinitionsOutput, error) +} + +var _ ListContainerGroupDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContainerGroupDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListFleets.go b/service/gamelift/api_op_ListFleets.go index 9ecedf7025d..e3844957cb5 100644 --- a/service/gamelift/api_op_ListFleets.go +++ b/service/gamelift/api_op_ListFleets.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleets(options.Region), middleware.Before); err != nil { return err } @@ -179,13 +182,6 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListFleetsAPIClient is a client that implements the ListFleets operation. -type ListFleetsAPIClient interface { - ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) -} - -var _ ListFleetsAPIClient = (*Client)(nil) - // ListFleetsPaginatorOptions is the paginator options for ListFleets type ListFleetsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -250,6 +246,9 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +268,13 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListGameServerGroups.go b/service/gamelift/api_op_ListGameServerGroups.go index 2bb6d7b5b5c..42008b0e40e 100644 --- a/service/gamelift/api_op_ListGameServerGroups.go +++ b/service/gamelift/api_op_ListGameServerGroups.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListGameServerGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGameServerGroups(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListGameServerGroupsMiddlewares(stack *middleware.S return nil } -// ListGameServerGroupsAPIClient is a client that implements the -// ListGameServerGroups operation. -type ListGameServerGroupsAPIClient interface { - ListGameServerGroups(context.Context, *ListGameServerGroupsInput, ...func(*Options)) (*ListGameServerGroupsOutput, error) -} - -var _ ListGameServerGroupsAPIClient = (*Client)(nil) - // ListGameServerGroupsPaginatorOptions is the paginator options for // ListGameServerGroups type ListGameServerGroupsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListGameServerGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGameServerGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListGameServerGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListGameServerGroupsAPIClient is a client that implements the +// ListGameServerGroups operation. +type ListGameServerGroupsAPIClient interface { + ListGameServerGroups(context.Context, *ListGameServerGroupsInput, ...func(*Options)) (*ListGameServerGroupsOutput, error) +} + +var _ ListGameServerGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGameServerGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListGameServers.go b/service/gamelift/api_op_ListGameServers.go index 2e077e0f37e..0f492ec58e7 100644 --- a/service/gamelift/api_op_ListGameServers.go +++ b/service/gamelift/api_op_ListGameServers.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListGameServersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGameServersValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListGameServersMiddlewares(stack *middleware.Stack, return nil } -// ListGameServersAPIClient is a client that implements the ListGameServers -// operation. -type ListGameServersAPIClient interface { - ListGameServers(context.Context, *ListGameServersInput, ...func(*Options)) (*ListGameServersOutput, error) -} - -var _ ListGameServersAPIClient = (*Client)(nil) - // ListGameServersPaginatorOptions is the paginator options for ListGameServers type ListGameServersPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -236,6 +231,9 @@ func (p *ListGameServersPaginator) NextPage(ctx context.Context, optFns ...func( } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGameServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListGameServersPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListGameServersAPIClient is a client that implements the ListGameServers +// operation. +type ListGameServersAPIClient interface { + ListGameServers(context.Context, *ListGameServersInput, ...func(*Options)) (*ListGameServersOutput, error) +} + +var _ ListGameServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGameServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListLocations.go b/service/gamelift/api_op_ListLocations.go index 1c4608712e7..f9ef39cddbd 100644 --- a/service/gamelift/api_op_ListLocations.go +++ b/service/gamelift/api_op_ListLocations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListLocationsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLocations(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListLocationsMiddlewares(stack *middleware.Stack, o return nil } -// ListLocationsAPIClient is a client that implements the ListLocations operation. -type ListLocationsAPIClient interface { - ListLocations(context.Context, *ListLocationsInput, ...func(*Options)) (*ListLocationsOutput, error) -} - -var _ ListLocationsAPIClient = (*Client)(nil) - // ListLocationsPaginatorOptions is the paginator options for ListLocations type ListLocationsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -210,6 +206,9 @@ func (p *ListLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListLocationsAPIClient is a client that implements the ListLocations operation. +type ListLocationsAPIClient interface { + ListLocations(context.Context, *ListLocationsInput, ...func(*Options)) (*ListLocationsOutput, error) +} + +var _ ListLocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListScripts.go b/service/gamelift/api_op_ListScripts.go index 7a9d99b5965..a97a993409a 100644 --- a/service/gamelift/api_op_ListScripts.go +++ b/service/gamelift/api_op_ListScripts.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListScriptsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScripts(options.Region), middleware.Before); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListScriptsMiddlewares(stack *middleware.Stack, opt return nil } -// ListScriptsAPIClient is a client that implements the ListScripts operation. -type ListScriptsAPIClient interface { - ListScripts(context.Context, *ListScriptsInput, ...func(*Options)) (*ListScriptsOutput, error) -} - -var _ ListScriptsAPIClient = (*Client)(nil) - // ListScriptsPaginatorOptions is the paginator options for ListScripts type ListScriptsPaginatorOptions struct { // The maximum number of results to return. Use this parameter with NextToken to @@ -219,6 +215,9 @@ func (p *ListScriptsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScripts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListScriptsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListScriptsAPIClient is a client that implements the ListScripts operation. +type ListScriptsAPIClient interface { + ListScripts(context.Context, *ListScriptsInput, ...func(*Options)) (*ListScriptsOutput, error) +} + +var _ ListScriptsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScripts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_ListTagsForResource.go b/service/gamelift/api_op_ListTagsForResource.go index 275afc9b068..f8c10371a21 100644 --- a/service/gamelift/api_op_ListTagsForResource.go +++ b/service/gamelift/api_op_ListTagsForResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_PutScalingPolicy.go b/service/gamelift/api_op_PutScalingPolicy.go index bf883c3ba4c..5da50878969 100644 --- a/service/gamelift/api_op_PutScalingPolicy.go +++ b/service/gamelift/api_op_PutScalingPolicy.go @@ -264,6 +264,9 @@ func (c *Client) addOperationPutScalingPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutScalingPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_RegisterCompute.go b/service/gamelift/api_op_RegisterCompute.go index 07146ce5f02..bf7a6471eef 100644 --- a/service/gamelift/api_op_RegisterCompute.go +++ b/service/gamelift/api_op_RegisterCompute.go @@ -166,6 +166,9 @@ func (c *Client) addOperationRegisterComputeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterComputeValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_RegisterGameServer.go b/service/gamelift/api_op_RegisterGameServer.go index 1bb877c8a5b..35022df0008 100644 --- a/service/gamelift/api_op_RegisterGameServer.go +++ b/service/gamelift/api_op_RegisterGameServer.go @@ -154,6 +154,9 @@ func (c *Client) addOperationRegisterGameServerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterGameServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_RequestUploadCredentials.go b/service/gamelift/api_op_RequestUploadCredentials.go index c5671fafbc8..1151f6629ff 100644 --- a/service/gamelift/api_op_RequestUploadCredentials.go +++ b/service/gamelift/api_op_RequestUploadCredentials.go @@ -128,6 +128,9 @@ func (c *Client) addOperationRequestUploadCredentialsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestUploadCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_ResolveAlias.go b/service/gamelift/api_op_ResolveAlias.go index 8bb131b412c..8db38b4f1c6 100644 --- a/service/gamelift/api_op_ResolveAlias.go +++ b/service/gamelift/api_op_ResolveAlias.go @@ -123,6 +123,9 @@ func (c *Client) addOperationResolveAliasMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResolveAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_ResumeGameServerGroup.go b/service/gamelift/api_op_ResumeGameServerGroup.go index 96ba60fee7c..30b2abd7355 100644 --- a/service/gamelift/api_op_ResumeGameServerGroup.go +++ b/service/gamelift/api_op_ResumeGameServerGroup.go @@ -131,6 +131,9 @@ func (c *Client) addOperationResumeGameServerGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeGameServerGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_SearchGameSessions.go b/service/gamelift/api_op_SearchGameSessions.go index 3f93a1ebfe3..a289bff1602 100644 --- a/service/gamelift/api_op_SearchGameSessions.go +++ b/service/gamelift/api_op_SearchGameSessions.go @@ -262,6 +262,9 @@ func (c *Client) addOperationSearchGameSessionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchGameSessions(options.Region), middleware.Before); err != nil { return err } @@ -283,14 +286,6 @@ func (c *Client) addOperationSearchGameSessionsMiddlewares(stack *middleware.Sta return nil } -// SearchGameSessionsAPIClient is a client that implements the SearchGameSessions -// operation. -type SearchGameSessionsAPIClient interface { - SearchGameSessions(context.Context, *SearchGameSessionsInput, ...func(*Options)) (*SearchGameSessionsOutput, error) -} - -var _ SearchGameSessionsAPIClient = (*Client)(nil) - // SearchGameSessionsPaginatorOptions is the paginator options for // SearchGameSessions type SearchGameSessionsPaginatorOptions struct { @@ -357,6 +352,9 @@ func (p *SearchGameSessionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchGameSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -376,6 +374,14 @@ func (p *SearchGameSessionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// SearchGameSessionsAPIClient is a client that implements the SearchGameSessions +// operation. +type SearchGameSessionsAPIClient interface { + SearchGameSessions(context.Context, *SearchGameSessionsInput, ...func(*Options)) (*SearchGameSessionsOutput, error) +} + +var _ SearchGameSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchGameSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/gamelift/api_op_StartFleetActions.go b/service/gamelift/api_op_StartFleetActions.go index 05a9f55009a..7d3ce9420b6 100644 --- a/service/gamelift/api_op_StartFleetActions.go +++ b/service/gamelift/api_op_StartFleetActions.go @@ -145,6 +145,9 @@ func (c *Client) addOperationStartFleetActionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFleetActionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_StartGameSessionPlacement.go b/service/gamelift/api_op_StartGameSessionPlacement.go index e911573d86e..77f8b26dcb3 100644 --- a/service/gamelift/api_op_StartGameSessionPlacement.go +++ b/service/gamelift/api_op_StartGameSessionPlacement.go @@ -188,6 +188,9 @@ func (c *Client) addOperationStartGameSessionPlacementMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartGameSessionPlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_StartMatchBackfill.go b/service/gamelift/api_op_StartMatchBackfill.go index f017fd627ff..ca323ddbe92 100644 --- a/service/gamelift/api_op_StartMatchBackfill.go +++ b/service/gamelift/api_op_StartMatchBackfill.go @@ -184,6 +184,9 @@ func (c *Client) addOperationStartMatchBackfillMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMatchBackfillValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_StartMatchmaking.go b/service/gamelift/api_op_StartMatchmaking.go index 45e6851ff5b..8c53692b257 100644 --- a/service/gamelift/api_op_StartMatchmaking.go +++ b/service/gamelift/api_op_StartMatchmaking.go @@ -154,6 +154,9 @@ func (c *Client) addOperationStartMatchmakingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMatchmakingValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_StopFleetActions.go b/service/gamelift/api_op_StopFleetActions.go index 645bdbad872..e36d1fa5384 100644 --- a/service/gamelift/api_op_StopFleetActions.go +++ b/service/gamelift/api_op_StopFleetActions.go @@ -149,6 +149,9 @@ func (c *Client) addOperationStopFleetActionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopFleetActionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_StopGameSessionPlacement.go b/service/gamelift/api_op_StopGameSessionPlacement.go index 5ad348088d8..13a48fd9238 100644 --- a/service/gamelift/api_op_StopGameSessionPlacement.go +++ b/service/gamelift/api_op_StopGameSessionPlacement.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopGameSessionPlacementMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopGameSessionPlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_StopMatchmaking.go b/service/gamelift/api_op_StopMatchmaking.go index d30593cf47e..22edf988951 100644 --- a/service/gamelift/api_op_StopMatchmaking.go +++ b/service/gamelift/api_op_StopMatchmaking.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStopMatchmakingMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMatchmakingValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_SuspendGameServerGroup.go b/service/gamelift/api_op_SuspendGameServerGroup.go index 05ba5563312..4629e6965e7 100644 --- a/service/gamelift/api_op_SuspendGameServerGroup.go +++ b/service/gamelift/api_op_SuspendGameServerGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationSuspendGameServerGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSuspendGameServerGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_TagResource.go b/service/gamelift/api_op_TagResource.go index 27fb9871ea3..595cbb62337 100644 --- a/service/gamelift/api_op_TagResource.go +++ b/service/gamelift/api_op_TagResource.go @@ -138,6 +138,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UntagResource.go b/service/gamelift/api_op_UntagResource.go index c4396c415e4..fdd27027cf0 100644 --- a/service/gamelift/api_op_UntagResource.go +++ b/service/gamelift/api_op_UntagResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateAlias.go b/service/gamelift/api_op_UpdateAlias.go index bb89c88f018..458a2f37bad 100644 --- a/service/gamelift/api_op_UpdateAlias.go +++ b/service/gamelift/api_op_UpdateAlias.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateBuild.go b/service/gamelift/api_op_UpdateBuild.go index 1961dd39238..fd3fc3260bf 100644 --- a/service/gamelift/api_op_UpdateBuild.go +++ b/service/gamelift/api_op_UpdateBuild.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateBuildMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBuildValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateFleetAttributes.go b/service/gamelift/api_op_UpdateFleetAttributes.go index 275dab36f07..8c222da992d 100644 --- a/service/gamelift/api_op_UpdateFleetAttributes.go +++ b/service/gamelift/api_op_UpdateFleetAttributes.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateFleetAttributesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateFleetCapacity.go b/service/gamelift/api_op_UpdateFleetCapacity.go index 52ed1750da9..eb1734cc12c 100644 --- a/service/gamelift/api_op_UpdateFleetCapacity.go +++ b/service/gamelift/api_op_UpdateFleetCapacity.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateFleetCapacityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateFleetPortSettings.go b/service/gamelift/api_op_UpdateFleetPortSettings.go index 809660b8666..24a7daa171b 100644 --- a/service/gamelift/api_op_UpdateFleetPortSettings.go +++ b/service/gamelift/api_op_UpdateFleetPortSettings.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateFleetPortSettingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetPortSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateGameServer.go b/service/gamelift/api_op_UpdateGameServer.go index 3bac5e06bd0..c5c7038348e 100644 --- a/service/gamelift/api_op_UpdateGameServer.go +++ b/service/gamelift/api_op_UpdateGameServer.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateGameServerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGameServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateGameServerGroup.go b/service/gamelift/api_op_UpdateGameServerGroup.go index 28f940c48b0..9e69439b301 100644 --- a/service/gamelift/api_op_UpdateGameServerGroup.go +++ b/service/gamelift/api_op_UpdateGameServerGroup.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateGameServerGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGameServerGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateGameSession.go b/service/gamelift/api_op_UpdateGameSession.go index f680fa68e76..f953b2e6810 100644 --- a/service/gamelift/api_op_UpdateGameSession.go +++ b/service/gamelift/api_op_UpdateGameSession.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateGameSessionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGameSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateGameSessionQueue.go b/service/gamelift/api_op_UpdateGameSessionQueue.go index 0e1f2414167..2aa1491780f 100644 --- a/service/gamelift/api_op_UpdateGameSessionQueue.go +++ b/service/gamelift/api_op_UpdateGameSessionQueue.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateGameSessionQueueMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGameSessionQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateMatchmakingConfiguration.go b/service/gamelift/api_op_UpdateMatchmakingConfiguration.go index 9fadaba09b8..39df36206fe 100644 --- a/service/gamelift/api_op_UpdateMatchmakingConfiguration.go +++ b/service/gamelift/api_op_UpdateMatchmakingConfiguration.go @@ -202,6 +202,9 @@ func (c *Client) addOperationUpdateMatchmakingConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMatchmakingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateRuntimeConfiguration.go b/service/gamelift/api_op_UpdateRuntimeConfiguration.go index 671b689fe30..67f38c7f311 100644 --- a/service/gamelift/api_op_UpdateRuntimeConfiguration.go +++ b/service/gamelift/api_op_UpdateRuntimeConfiguration.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateRuntimeConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuntimeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_UpdateScript.go b/service/gamelift/api_op_UpdateScript.go index 4e86c8825ea..e101f6b45da 100644 --- a/service/gamelift/api_op_UpdateScript.go +++ b/service/gamelift/api_op_UpdateScript.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateScriptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScriptValidationMiddleware(stack); err != nil { return err } diff --git a/service/gamelift/api_op_ValidateMatchmakingRuleSet.go b/service/gamelift/api_op_ValidateMatchmakingRuleSet.go index c4ea0de2f2f..bed572381bb 100644 --- a/service/gamelift/api_op_ValidateMatchmakingRuleSet.go +++ b/service/gamelift/api_op_ValidateMatchmakingRuleSet.go @@ -114,6 +114,9 @@ func (c *Client) addOperationValidateMatchmakingRuleSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateMatchmakingRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_client.go b/service/glacier/api_client.go index 0e2c9086e31..0229f09d524 100644 --- a/service/glacier/api_client.go +++ b/service/glacier/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/glacier/api_op_AbortMultipartUpload.go b/service/glacier/api_op_AbortMultipartUpload.go index e4840eb1165..61880fbd17b 100644 --- a/service/glacier/api_op_AbortMultipartUpload.go +++ b/service/glacier/api_op_AbortMultipartUpload.go @@ -143,6 +143,9 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAbortMultipartUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_AbortVaultLock.go b/service/glacier/api_op_AbortVaultLock.go index 86d7b35101f..7c68b7e2f05 100644 --- a/service/glacier/api_op_AbortVaultLock.go +++ b/service/glacier/api_op_AbortVaultLock.go @@ -128,6 +128,9 @@ func (c *Client) addOperationAbortVaultLockMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAbortVaultLockValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_AddTagsToVault.go b/service/glacier/api_op_AddTagsToVault.go index 0688a598297..1767d07574c 100644 --- a/service/glacier/api_op_AddTagsToVault.go +++ b/service/glacier/api_op_AddTagsToVault.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAddTagsToVaultMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_CompleteMultipartUpload.go b/service/glacier/api_op_CompleteMultipartUpload.go index 0bc9002d489..2637af5f6bb 100644 --- a/service/glacier/api_op_CompleteMultipartUpload.go +++ b/service/glacier/api_op_CompleteMultipartUpload.go @@ -192,6 +192,9 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteMultipartUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_CompleteVaultLock.go b/service/glacier/api_op_CompleteVaultLock.go index bdbcc39e70e..7a6776c2326 100644 --- a/service/glacier/api_op_CompleteVaultLock.go +++ b/service/glacier/api_op_CompleteVaultLock.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCompleteVaultLockMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompleteVaultLockValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_CreateVault.go b/service/glacier/api_op_CreateVault.go index 94cba41070b..81543784b9b 100644 --- a/service/glacier/api_op_CreateVault.go +++ b/service/glacier/api_op_CreateVault.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateVaultMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_DeleteArchive.go b/service/glacier/api_op_DeleteArchive.go index a74e4fd1385..678d2c5215a 100644 --- a/service/glacier/api_op_DeleteArchive.go +++ b/service/glacier/api_op_DeleteArchive.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeleteArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_DeleteVault.go b/service/glacier/api_op_DeleteVault.go index dc0c5f5cb00..52f18c2caea 100644 --- a/service/glacier/api_op_DeleteVault.go +++ b/service/glacier/api_op_DeleteVault.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteVaultMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_DeleteVaultAccessPolicy.go b/service/glacier/api_op_DeleteVaultAccessPolicy.go index e36e245b8c2..05698a437ba 100644 --- a/service/glacier/api_op_DeleteVaultAccessPolicy.go +++ b/service/glacier/api_op_DeleteVaultAccessPolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteVaultAccessPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVaultAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_DeleteVaultNotifications.go b/service/glacier/api_op_DeleteVaultNotifications.go index c042175ad7e..b59f84ea10c 100644 --- a/service/glacier/api_op_DeleteVaultNotifications.go +++ b/service/glacier/api_op_DeleteVaultNotifications.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteVaultNotificationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVaultNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_DescribeJob.go b/service/glacier/api_op_DescribeJob.go index f89f82607b9..1b4ed47f875 100644 --- a/service/glacier/api_op_DescribeJob.go +++ b/service/glacier/api_op_DescribeJob.go @@ -240,6 +240,9 @@ func (c *Client) addOperationDescribeJobMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_DescribeVault.go b/service/glacier/api_op_DescribeVault.go index ccf4d529b1c..44a210e1781 100644 --- a/service/glacier/api_op_DescribeVault.go +++ b/service/glacier/api_op_DescribeVault.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeVaultMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVaultValidationMiddleware(stack); err != nil { return err } @@ -198,13 +201,6 @@ func (c *Client) addOperationDescribeVaultMiddlewares(stack *middleware.Stack, o return nil } -// DescribeVaultAPIClient is a client that implements the DescribeVault operation. -type DescribeVaultAPIClient interface { - DescribeVault(context.Context, *DescribeVaultInput, ...func(*Options)) (*DescribeVaultOutput, error) -} - -var _ DescribeVaultAPIClient = (*Client)(nil) - // VaultExistsWaiterOptions are waiter options for VaultExistsWaiter type VaultExistsWaiterOptions struct { @@ -319,7 +315,13 @@ func (w *VaultExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeV } out, err := w.client.DescribeVault(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -486,7 +488,13 @@ func (w *VaultNotExistsWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeVault(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -538,6 +546,13 @@ func vaultNotExistsStateRetryable(ctx context.Context, input *DescribeVaultInput return true, nil } +// DescribeVaultAPIClient is a client that implements the DescribeVault operation. +type DescribeVaultAPIClient interface { + DescribeVault(context.Context, *DescribeVaultInput, ...func(*Options)) (*DescribeVaultOutput, error) +} + +var _ DescribeVaultAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVault(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glacier/api_op_GetDataRetrievalPolicy.go b/service/glacier/api_op_GetDataRetrievalPolicy.go index eb18517dcff..a7d241db96c 100644 --- a/service/glacier/api_op_GetDataRetrievalPolicy.go +++ b/service/glacier/api_op_GetDataRetrievalPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDataRetrievalPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataRetrievalPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_GetJobOutput.go b/service/glacier/api_op_GetJobOutput.go index f832e3ff9a7..e39f4900008 100644 --- a/service/glacier/api_op_GetJobOutput.go +++ b/service/glacier/api_op_GetJobOutput.go @@ -234,6 +234,9 @@ func (c *Client) addOperationGetJobOutputMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_GetVaultAccessPolicy.go b/service/glacier/api_op_GetVaultAccessPolicy.go index 1b42bf2cbea..6e4f6bf94db 100644 --- a/service/glacier/api_op_GetVaultAccessPolicy.go +++ b/service/glacier/api_op_GetVaultAccessPolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetVaultAccessPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVaultAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_GetVaultLock.go b/service/glacier/api_op_GetVaultLock.go index 23ae9782fe6..8d6441b2eb0 100644 --- a/service/glacier/api_op_GetVaultLock.go +++ b/service/glacier/api_op_GetVaultLock.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetVaultLockMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVaultLockValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_GetVaultNotifications.go b/service/glacier/api_op_GetVaultNotifications.go index f2cd828a124..612d363e33e 100644 --- a/service/glacier/api_op_GetVaultNotifications.go +++ b/service/glacier/api_op_GetVaultNotifications.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetVaultNotificationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVaultNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_InitiateJob.go b/service/glacier/api_op_InitiateJob.go index 3f15ec530cc..33d8ed69eb6 100644 --- a/service/glacier/api_op_InitiateJob.go +++ b/service/glacier/api_op_InitiateJob.go @@ -131,6 +131,9 @@ func (c *Client) addOperationInitiateJobMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_InitiateMultipartUpload.go b/service/glacier/api_op_InitiateMultipartUpload.go index d4d48cee4e7..1dc20d3f4c4 100644 --- a/service/glacier/api_op_InitiateMultipartUpload.go +++ b/service/glacier/api_op_InitiateMultipartUpload.go @@ -167,6 +167,9 @@ func (c *Client) addOperationInitiateMultipartUploadMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateMultipartUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_InitiateVaultLock.go b/service/glacier/api_op_InitiateVaultLock.go index 7654d83ee21..007520f5b40 100644 --- a/service/glacier/api_op_InitiateVaultLock.go +++ b/service/glacier/api_op_InitiateVaultLock.go @@ -152,6 +152,9 @@ func (c *Client) addOperationInitiateVaultLockMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateVaultLockValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_ListJobs.go b/service/glacier/api_op_ListJobs.go index 9cbea16b00b..2194a315655 100644 --- a/service/glacier/api_op_ListJobs.go +++ b/service/glacier/api_op_ListJobs.go @@ -178,6 +178,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobsValidationMiddleware(stack); err != nil { return err } @@ -211,13 +214,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of jobs to be returned. The default limit is 50. The number @@ -283,6 +279,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -302,6 +301,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glacier/api_op_ListMultipartUploads.go b/service/glacier/api_op_ListMultipartUploads.go index 1ff63aa5c41..e4902149dc2 100644 --- a/service/glacier/api_op_ListMultipartUploads.go +++ b/service/glacier/api_op_ListMultipartUploads.go @@ -163,6 +163,9 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMultipartUploadsValidationMiddleware(stack); err != nil { return err } @@ -196,14 +199,6 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S return nil } -// ListMultipartUploadsAPIClient is a client that implements the -// ListMultipartUploads operation. -type ListMultipartUploadsAPIClient interface { - ListMultipartUploads(context.Context, *ListMultipartUploadsInput, ...func(*Options)) (*ListMultipartUploadsOutput, error) -} - -var _ ListMultipartUploadsAPIClient = (*Client)(nil) - // ListMultipartUploadsPaginatorOptions is the paginator options for // ListMultipartUploads type ListMultipartUploadsPaginatorOptions struct { @@ -269,6 +264,9 @@ func (p *ListMultipartUploadsPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMultipartUploads(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +286,14 @@ func (p *ListMultipartUploadsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListMultipartUploadsAPIClient is a client that implements the +// ListMultipartUploads operation. +type ListMultipartUploadsAPIClient interface { + ListMultipartUploads(context.Context, *ListMultipartUploadsInput, ...func(*Options)) (*ListMultipartUploadsOutput, error) +} + +var _ ListMultipartUploadsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMultipartUploads(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glacier/api_op_ListParts.go b/service/glacier/api_op_ListParts.go index 41d1d232502..06101f8dd3c 100644 --- a/service/glacier/api_op_ListParts.go +++ b/service/glacier/api_op_ListParts.go @@ -183,6 +183,9 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPartsValidationMiddleware(stack); err != nil { return err } @@ -216,13 +219,6 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio return nil } -// ListPartsAPIClient is a client that implements the ListParts operation. -type ListPartsAPIClient interface { - ListParts(context.Context, *ListPartsInput, ...func(*Options)) (*ListPartsOutput, error) -} - -var _ ListPartsAPIClient = (*Client)(nil) - // ListPartsPaginatorOptions is the paginator options for ListParts type ListPartsPaginatorOptions struct { // The maximum number of parts to be returned. The default limit is 50. The number @@ -288,6 +284,9 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -307,6 +306,13 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListPartsAPIClient is a client that implements the ListParts operation. +type ListPartsAPIClient interface { + ListParts(context.Context, *ListPartsInput, ...func(*Options)) (*ListPartsOutput, error) +} + +var _ ListPartsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glacier/api_op_ListProvisionedCapacity.go b/service/glacier/api_op_ListProvisionedCapacity.go index 528c16b29d3..2a470d2dd1e 100644 --- a/service/glacier/api_op_ListProvisionedCapacity.go +++ b/service/glacier/api_op_ListProvisionedCapacity.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListProvisionedCapacityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProvisionedCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_ListTagsForVault.go b/service/glacier/api_op_ListTagsForVault.go index a3141a4bb57..b87bf39917f 100644 --- a/service/glacier/api_op_ListTagsForVault.go +++ b/service/glacier/api_op_ListTagsForVault.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTagsForVaultMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_ListVaults.go b/service/glacier/api_op_ListVaults.go index b3a3067e511..0dead435e38 100644 --- a/service/glacier/api_op_ListVaults.go +++ b/service/glacier/api_op_ListVaults.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListVaultsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVaultsValidationMiddleware(stack); err != nil { return err } @@ -182,13 +185,6 @@ func (c *Client) addOperationListVaultsMiddlewares(stack *middleware.Stack, opti return nil } -// ListVaultsAPIClient is a client that implements the ListVaults operation. -type ListVaultsAPIClient interface { - ListVaults(context.Context, *ListVaultsInput, ...func(*Options)) (*ListVaultsOutput, error) -} - -var _ ListVaultsAPIClient = (*Client)(nil) - // ListVaultsPaginatorOptions is the paginator options for ListVaults type ListVaultsPaginatorOptions struct { // The maximum number of vaults to be returned. The default limit is 10. The @@ -254,6 +250,9 @@ func (p *ListVaultsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVaults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +272,13 @@ func (p *ListVaultsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListVaultsAPIClient is a client that implements the ListVaults operation. +type ListVaultsAPIClient interface { + ListVaults(context.Context, *ListVaultsInput, ...func(*Options)) (*ListVaultsOutput, error) +} + +var _ ListVaultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVaults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glacier/api_op_PurchaseProvisionedCapacity.go b/service/glacier/api_op_PurchaseProvisionedCapacity.go index 69007366764..e1f215c181c 100644 --- a/service/glacier/api_op_PurchaseProvisionedCapacity.go +++ b/service/glacier/api_op_PurchaseProvisionedCapacity.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPurchaseProvisionedCapacityMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseProvisionedCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_RemoveTagsFromVault.go b/service/glacier/api_op_RemoveTagsFromVault.go index 3c62d894a8e..2b190b8588e 100644 --- a/service/glacier/api_op_RemoveTagsFromVault.go +++ b/service/glacier/api_op_RemoveTagsFromVault.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRemoveTagsFromVaultMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromVaultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_SetDataRetrievalPolicy.go b/service/glacier/api_op_SetDataRetrievalPolicy.go index 42897282791..60e15a6b8b7 100644 --- a/service/glacier/api_op_SetDataRetrievalPolicy.go +++ b/service/glacier/api_op_SetDataRetrievalPolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationSetDataRetrievalPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDataRetrievalPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_SetVaultAccessPolicy.go b/service/glacier/api_op_SetVaultAccessPolicy.go index 18982da292a..f706551f921 100644 --- a/service/glacier/api_op_SetVaultAccessPolicy.go +++ b/service/glacier/api_op_SetVaultAccessPolicy.go @@ -123,6 +123,9 @@ func (c *Client) addOperationSetVaultAccessPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetVaultAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_SetVaultNotifications.go b/service/glacier/api_op_SetVaultNotifications.go index b5dca6e1f99..168930d7171 100644 --- a/service/glacier/api_op_SetVaultNotifications.go +++ b/service/glacier/api_op_SetVaultNotifications.go @@ -149,6 +149,9 @@ func (c *Client) addOperationSetVaultNotificationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetVaultNotificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_UploadArchive.go b/service/glacier/api_op_UploadArchive.go index a900bdabf8a..a9fe93bc588 100644 --- a/service/glacier/api_op_UploadArchive.go +++ b/service/glacier/api_op_UploadArchive.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUploadArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/glacier/api_op_UploadMultipartPart.go b/service/glacier/api_op_UploadMultipartPart.go index 4335073c886..32a8956c55d 100644 --- a/service/glacier/api_op_UploadMultipartPart.go +++ b/service/glacier/api_op_UploadMultipartPart.go @@ -180,6 +180,9 @@ func (c *Client) addOperationUploadMultipartPartMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadMultipartPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_client.go b/service/globalaccelerator/api_client.go index 2c1deb5f51e..81865a8d1c6 100644 --- a/service/globalaccelerator/api_client.go +++ b/service/globalaccelerator/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/globalaccelerator/api_op_AddCustomRoutingEndpoints.go b/service/globalaccelerator/api_op_AddCustomRoutingEndpoints.go index c68696c9d3a..bf62b94c3ee 100644 --- a/service/globalaccelerator/api_op_AddCustomRoutingEndpoints.go +++ b/service/globalaccelerator/api_op_AddCustomRoutingEndpoints.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAddCustomRoutingEndpointsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddCustomRoutingEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_AddEndpoints.go b/service/globalaccelerator/api_op_AddEndpoints.go index 499af8abcb0..8f41c584556 100644 --- a/service/globalaccelerator/api_op_AddEndpoints.go +++ b/service/globalaccelerator/api_op_AddEndpoints.go @@ -134,6 +134,9 @@ func (c *Client) addOperationAddEndpointsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_AdvertiseByoipCidr.go b/service/globalaccelerator/api_op_AdvertiseByoipCidr.go index c5af816fd14..f26294408d4 100644 --- a/service/globalaccelerator/api_op_AdvertiseByoipCidr.go +++ b/service/globalaccelerator/api_op_AdvertiseByoipCidr.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAdvertiseByoipCidrMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAdvertiseByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_AllowCustomRoutingTraffic.go b/service/globalaccelerator/api_op_AllowCustomRoutingTraffic.go index c635b9cb5d9..8063c007fee 100644 --- a/service/globalaccelerator/api_op_AllowCustomRoutingTraffic.go +++ b/service/globalaccelerator/api_op_AllowCustomRoutingTraffic.go @@ -144,6 +144,9 @@ func (c *Client) addOperationAllowCustomRoutingTrafficMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllowCustomRoutingTrafficValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateAccelerator.go b/service/globalaccelerator/api_op_CreateAccelerator.go index 910273b14d5..8677f208c33 100644 --- a/service/globalaccelerator/api_op_CreateAccelerator.go +++ b/service/globalaccelerator/api_op_CreateAccelerator.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateAcceleratorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAcceleratorMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateCrossAccountAttachment.go b/service/globalaccelerator/api_op_CreateCrossAccountAttachment.go index 256f165df30..7c230c17049 100644 --- a/service/globalaccelerator/api_op_CreateCrossAccountAttachment.go +++ b/service/globalaccelerator/api_op_CreateCrossAccountAttachment.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateCrossAccountAttachmentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCrossAccountAttachmentMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateCustomRoutingAccelerator.go b/service/globalaccelerator/api_op_CreateCustomRoutingAccelerator.go index fa19b858246..0314bceccdc 100644 --- a/service/globalaccelerator/api_op_CreateCustomRoutingAccelerator.go +++ b/service/globalaccelerator/api_op_CreateCustomRoutingAccelerator.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateCustomRoutingAcceleratorMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCustomRoutingAcceleratorMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateCustomRoutingEndpointGroup.go b/service/globalaccelerator/api_op_CreateCustomRoutingEndpointGroup.go index 35422cc384e..1e851db51ca 100644 --- a/service/globalaccelerator/api_op_CreateCustomRoutingEndpointGroup.go +++ b/service/globalaccelerator/api_op_CreateCustomRoutingEndpointGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateCustomRoutingEndpointGroupMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCustomRoutingEndpointGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateCustomRoutingListener.go b/service/globalaccelerator/api_op_CreateCustomRoutingListener.go index 743b40ab74e..d04b0148c75 100644 --- a/service/globalaccelerator/api_op_CreateCustomRoutingListener.go +++ b/service/globalaccelerator/api_op_CreateCustomRoutingListener.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateCustomRoutingListenerMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCustomRoutingListenerMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateEndpointGroup.go b/service/globalaccelerator/api_op_CreateEndpointGroup.go index 700b524b4fa..53c8a3b2400 100644 --- a/service/globalaccelerator/api_op_CreateEndpointGroup.go +++ b/service/globalaccelerator/api_op_CreateEndpointGroup.go @@ -173,6 +173,9 @@ func (c *Client) addOperationCreateEndpointGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEndpointGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_CreateListener.go b/service/globalaccelerator/api_op_CreateListener.go index 6f8174249ee..1310fb9771d 100644 --- a/service/globalaccelerator/api_op_CreateListener.go +++ b/service/globalaccelerator/api_op_CreateListener.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateListenerMiddleware(stack, options); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteAccelerator.go b/service/globalaccelerator/api_op_DeleteAccelerator.go index a88fed2fe4b..c02a8ed52d9 100644 --- a/service/globalaccelerator/api_op_DeleteAccelerator.go +++ b/service/globalaccelerator/api_op_DeleteAccelerator.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteAcceleratorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAcceleratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteCrossAccountAttachment.go b/service/globalaccelerator/api_op_DeleteCrossAccountAttachment.go index adac06f3abb..c759b84127c 100644 --- a/service/globalaccelerator/api_op_DeleteCrossAccountAttachment.go +++ b/service/globalaccelerator/api_op_DeleteCrossAccountAttachment.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteCrossAccountAttachmentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCrossAccountAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteCustomRoutingAccelerator.go b/service/globalaccelerator/api_op_DeleteCustomRoutingAccelerator.go index 98891614cca..780f7fb1b94 100644 --- a/service/globalaccelerator/api_op_DeleteCustomRoutingAccelerator.go +++ b/service/globalaccelerator/api_op_DeleteCustomRoutingAccelerator.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteCustomRoutingAcceleratorMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteCustomRoutingEndpointGroup.go b/service/globalaccelerator/api_op_DeleteCustomRoutingEndpointGroup.go index f4c74e27777..043310d58d7 100644 --- a/service/globalaccelerator/api_op_DeleteCustomRoutingEndpointGroup.go +++ b/service/globalaccelerator/api_op_DeleteCustomRoutingEndpointGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCustomRoutingEndpointGroupMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomRoutingEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteCustomRoutingListener.go b/service/globalaccelerator/api_op_DeleteCustomRoutingListener.go index 81563955905..a5ebcbc0ee7 100644 --- a/service/globalaccelerator/api_op_DeleteCustomRoutingListener.go +++ b/service/globalaccelerator/api_op_DeleteCustomRoutingListener.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCustomRoutingListenerMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteEndpointGroup.go b/service/globalaccelerator/api_op_DeleteEndpointGroup.go index b3819cdf8c0..4c5d2a70557 100644 --- a/service/globalaccelerator/api_op_DeleteEndpointGroup.go +++ b/service/globalaccelerator/api_op_DeleteEndpointGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteEndpointGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeleteListener.go b/service/globalaccelerator/api_op_DeleteListener.go index 0e12773415f..0dcf88e027c 100644 --- a/service/globalaccelerator/api_op_DeleteListener.go +++ b/service/globalaccelerator/api_op_DeleteListener.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DenyCustomRoutingTraffic.go b/service/globalaccelerator/api_op_DenyCustomRoutingTraffic.go index 7494d64a01e..6f308b85491 100644 --- a/service/globalaccelerator/api_op_DenyCustomRoutingTraffic.go +++ b/service/globalaccelerator/api_op_DenyCustomRoutingTraffic.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDenyCustomRoutingTrafficMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDenyCustomRoutingTrafficValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DeprovisionByoipCidr.go b/service/globalaccelerator/api_op_DeprovisionByoipCidr.go index 394fdc7c75e..5c7a3224841 100644 --- a/service/globalaccelerator/api_op_DeprovisionByoipCidr.go +++ b/service/globalaccelerator/api_op_DeprovisionByoipCidr.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeprovisionByoipCidrMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprovisionByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeAccelerator.go b/service/globalaccelerator/api_op_DescribeAccelerator.go index 3ee1c47ee61..cc186dfb769 100644 --- a/service/globalaccelerator/api_op_DescribeAccelerator.go +++ b/service/globalaccelerator/api_op_DescribeAccelerator.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeAcceleratorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAcceleratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeAcceleratorAttributes.go b/service/globalaccelerator/api_op_DescribeAcceleratorAttributes.go index 708b58adb52..f0ab7264a17 100644 --- a/service/globalaccelerator/api_op_DescribeAcceleratorAttributes.go +++ b/service/globalaccelerator/api_op_DescribeAcceleratorAttributes.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeAcceleratorAttributesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeCrossAccountAttachment.go b/service/globalaccelerator/api_op_DescribeCrossAccountAttachment.go index 35c2162496a..fd7c780b28f 100644 --- a/service/globalaccelerator/api_op_DescribeCrossAccountAttachment.go +++ b/service/globalaccelerator/api_op_DescribeCrossAccountAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeCrossAccountAttachmentMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCrossAccountAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeCustomRoutingAccelerator.go b/service/globalaccelerator/api_op_DescribeCustomRoutingAccelerator.go index a971d615b54..80d663003d6 100644 --- a/service/globalaccelerator/api_op_DescribeCustomRoutingAccelerator.go +++ b/service/globalaccelerator/api_op_DescribeCustomRoutingAccelerator.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeCustomRoutingAcceleratorMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeCustomRoutingAcceleratorAttributes.go b/service/globalaccelerator/api_op_DescribeCustomRoutingAcceleratorAttributes.go index 9b26e1b77b9..e679a53134f 100644 --- a/service/globalaccelerator/api_op_DescribeCustomRoutingAcceleratorAttributes.go +++ b/service/globalaccelerator/api_op_DescribeCustomRoutingAcceleratorAttributes.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeCustomRoutingAcceleratorAttributesMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomRoutingAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeCustomRoutingEndpointGroup.go b/service/globalaccelerator/api_op_DescribeCustomRoutingEndpointGroup.go index 270e06b5f21..8a1f69fe285 100644 --- a/service/globalaccelerator/api_op_DescribeCustomRoutingEndpointGroup.go +++ b/service/globalaccelerator/api_op_DescribeCustomRoutingEndpointGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeCustomRoutingEndpointGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomRoutingEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeCustomRoutingListener.go b/service/globalaccelerator/api_op_DescribeCustomRoutingListener.go index d1cb4899fa9..dcb7a187d89 100644 --- a/service/globalaccelerator/api_op_DescribeCustomRoutingListener.go +++ b/service/globalaccelerator/api_op_DescribeCustomRoutingListener.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeCustomRoutingListenerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeEndpointGroup.go b/service/globalaccelerator/api_op_DescribeEndpointGroup.go index 548ef43a363..661031e349b 100644 --- a/service/globalaccelerator/api_op_DescribeEndpointGroup.go +++ b/service/globalaccelerator/api_op_DescribeEndpointGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeEndpointGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_DescribeListener.go b/service/globalaccelerator/api_op_DescribeListener.go index f81a1f9eac8..bbcab8011e7 100644 --- a/service/globalaccelerator/api_op_DescribeListener.go +++ b/service/globalaccelerator/api_op_DescribeListener.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeListenerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_ListAccelerators.go b/service/globalaccelerator/api_op_ListAccelerators.go index 21a576659b5..1cfdff784e0 100644 --- a/service/globalaccelerator/api_op_ListAccelerators.go +++ b/service/globalaccelerator/api_op_ListAccelerators.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAcceleratorsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccelerators(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListAcceleratorsMiddlewares(stack *middleware.Stack return nil } -// ListAcceleratorsAPIClient is a client that implements the ListAccelerators -// operation. -type ListAcceleratorsAPIClient interface { - ListAccelerators(context.Context, *ListAcceleratorsInput, ...func(*Options)) (*ListAcceleratorsOutput, error) -} - -var _ ListAcceleratorsAPIClient = (*Client)(nil) - // ListAcceleratorsPaginatorOptions is the paginator options for ListAccelerators type ListAcceleratorsPaginatorOptions struct { // The number of Global Accelerator objects that you want to return with this @@ -206,6 +201,9 @@ func (p *ListAcceleratorsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccelerators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListAcceleratorsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAcceleratorsAPIClient is a client that implements the ListAccelerators +// operation. +type ListAcceleratorsAPIClient interface { + ListAccelerators(context.Context, *ListAcceleratorsInput, ...func(*Options)) (*ListAcceleratorsOutput, error) +} + +var _ ListAcceleratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccelerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListByoipCidrs.go b/service/globalaccelerator/api_op_ListByoipCidrs.go index 4d2af240bad..3ed3c79e5e8 100644 --- a/service/globalaccelerator/api_op_ListByoipCidrs.go +++ b/service/globalaccelerator/api_op_ListByoipCidrs.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListByoipCidrsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListByoipCidrs(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListByoipCidrsMiddlewares(stack *middleware.Stack, return nil } -// ListByoipCidrsAPIClient is a client that implements the ListByoipCidrs -// operation. -type ListByoipCidrsAPIClient interface { - ListByoipCidrs(context.Context, *ListByoipCidrsInput, ...func(*Options)) (*ListByoipCidrsOutput, error) -} - -var _ ListByoipCidrsAPIClient = (*Client)(nil) - // ListByoipCidrsPaginatorOptions is the paginator options for ListByoipCidrs type ListByoipCidrsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -207,6 +202,9 @@ func (p *ListByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListByoipCidrs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListByoipCidrsAPIClient is a client that implements the ListByoipCidrs +// operation. +type ListByoipCidrsAPIClient interface { + ListByoipCidrs(context.Context, *ListByoipCidrsInput, ...func(*Options)) (*ListByoipCidrsOutput, error) +} + +var _ ListByoipCidrsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListByoipCidrs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCrossAccountAttachments.go b/service/globalaccelerator/api_op_ListCrossAccountAttachments.go index 1cd7014c524..36903f0b296 100644 --- a/service/globalaccelerator/api_op_ListCrossAccountAttachments.go +++ b/service/globalaccelerator/api_op_ListCrossAccountAttachments.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListCrossAccountAttachmentsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCrossAccountAttachments(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListCrossAccountAttachmentsMiddlewares(stack *middl return nil } -// ListCrossAccountAttachmentsAPIClient is a client that implements the -// ListCrossAccountAttachments operation. -type ListCrossAccountAttachmentsAPIClient interface { - ListCrossAccountAttachments(context.Context, *ListCrossAccountAttachmentsInput, ...func(*Options)) (*ListCrossAccountAttachmentsOutput, error) -} - -var _ ListCrossAccountAttachmentsAPIClient = (*Client)(nil) - // ListCrossAccountAttachmentsPaginatorOptions is the paginator options for // ListCrossAccountAttachments type ListCrossAccountAttachmentsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListCrossAccountAttachmentsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCrossAccountAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListCrossAccountAttachmentsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListCrossAccountAttachmentsAPIClient is a client that implements the +// ListCrossAccountAttachments operation. +type ListCrossAccountAttachmentsAPIClient interface { + ListCrossAccountAttachments(context.Context, *ListCrossAccountAttachmentsInput, ...func(*Options)) (*ListCrossAccountAttachmentsOutput, error) +} + +var _ ListCrossAccountAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCrossAccountAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCrossAccountResourceAccounts.go b/service/globalaccelerator/api_op_ListCrossAccountResourceAccounts.go index f6700c22af4..3d78fc32578 100644 --- a/service/globalaccelerator/api_op_ListCrossAccountResourceAccounts.go +++ b/service/globalaccelerator/api_op_ListCrossAccountResourceAccounts.go @@ -104,6 +104,9 @@ func (c *Client) addOperationListCrossAccountResourceAccountsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCrossAccountResourceAccounts(options.Region), middleware.Before); err != nil { return err } diff --git a/service/globalaccelerator/api_op_ListCrossAccountResources.go b/service/globalaccelerator/api_op_ListCrossAccountResources.go index f53cd9cc719..ce209d28be0 100644 --- a/service/globalaccelerator/api_op_ListCrossAccountResources.go +++ b/service/globalaccelerator/api_op_ListCrossAccountResources.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListCrossAccountResourcesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCrossAccountResourcesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCrossAccountResourcesMiddlewares(stack *middlew return nil } -// ListCrossAccountResourcesAPIClient is a client that implements the -// ListCrossAccountResources operation. -type ListCrossAccountResourcesAPIClient interface { - ListCrossAccountResources(context.Context, *ListCrossAccountResourcesInput, ...func(*Options)) (*ListCrossAccountResourcesOutput, error) -} - -var _ ListCrossAccountResourcesAPIClient = (*Client)(nil) - // ListCrossAccountResourcesPaginatorOptions is the paginator options for // ListCrossAccountResources type ListCrossAccountResourcesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListCrossAccountResourcesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCrossAccountResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListCrossAccountResourcesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListCrossAccountResourcesAPIClient is a client that implements the +// ListCrossAccountResources operation. +type ListCrossAccountResourcesAPIClient interface { + ListCrossAccountResources(context.Context, *ListCrossAccountResourcesInput, ...func(*Options)) (*ListCrossAccountResourcesOutput, error) +} + +var _ ListCrossAccountResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCrossAccountResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go b/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go index d271afe0500..a18d2597d1a 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingAccelerators.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListCustomRoutingAcceleratorsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomRoutingAccelerators(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListCustomRoutingAcceleratorsMiddlewares(stack *mid return nil } -// ListCustomRoutingAcceleratorsAPIClient is a client that implements the -// ListCustomRoutingAccelerators operation. -type ListCustomRoutingAcceleratorsAPIClient interface { - ListCustomRoutingAccelerators(context.Context, *ListCustomRoutingAcceleratorsInput, ...func(*Options)) (*ListCustomRoutingAcceleratorsOutput, error) -} - -var _ ListCustomRoutingAcceleratorsAPIClient = (*Client)(nil) - // ListCustomRoutingAcceleratorsPaginatorOptions is the paginator options for // ListCustomRoutingAccelerators type ListCustomRoutingAcceleratorsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListCustomRoutingAcceleratorsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomRoutingAccelerators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListCustomRoutingAcceleratorsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListCustomRoutingAcceleratorsAPIClient is a client that implements the +// ListCustomRoutingAccelerators operation. +type ListCustomRoutingAcceleratorsAPIClient interface { + ListCustomRoutingAccelerators(context.Context, *ListCustomRoutingAcceleratorsInput, ...func(*Options)) (*ListCustomRoutingAcceleratorsOutput, error) +} + +var _ ListCustomRoutingAcceleratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomRoutingAccelerators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go b/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go index 3f986f9664a..92c5526004a 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingEndpointGroups.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListCustomRoutingEndpointGroupsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomRoutingEndpointGroupsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListCustomRoutingEndpointGroupsMiddlewares(stack *m return nil } -// ListCustomRoutingEndpointGroupsAPIClient is a client that implements the -// ListCustomRoutingEndpointGroups operation. -type ListCustomRoutingEndpointGroupsAPIClient interface { - ListCustomRoutingEndpointGroups(context.Context, *ListCustomRoutingEndpointGroupsInput, ...func(*Options)) (*ListCustomRoutingEndpointGroupsOutput, error) -} - -var _ ListCustomRoutingEndpointGroupsAPIClient = (*Client)(nil) - // ListCustomRoutingEndpointGroupsPaginatorOptions is the paginator options for // ListCustomRoutingEndpointGroups type ListCustomRoutingEndpointGroupsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListCustomRoutingEndpointGroupsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomRoutingEndpointGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListCustomRoutingEndpointGroupsPaginator) NextPage(ctx context.Context, return result, nil } +// ListCustomRoutingEndpointGroupsAPIClient is a client that implements the +// ListCustomRoutingEndpointGroups operation. +type ListCustomRoutingEndpointGroupsAPIClient interface { + ListCustomRoutingEndpointGroups(context.Context, *ListCustomRoutingEndpointGroupsInput, ...func(*Options)) (*ListCustomRoutingEndpointGroupsOutput, error) +} + +var _ ListCustomRoutingEndpointGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomRoutingEndpointGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCustomRoutingListeners.go b/service/globalaccelerator/api_op_ListCustomRoutingListeners.go index 4af6d2d6e96..2de15471793 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingListeners.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingListeners.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListCustomRoutingListenersMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomRoutingListenersValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListCustomRoutingListenersMiddlewares(stack *middle return nil } -// ListCustomRoutingListenersAPIClient is a client that implements the -// ListCustomRoutingListeners operation. -type ListCustomRoutingListenersAPIClient interface { - ListCustomRoutingListeners(context.Context, *ListCustomRoutingListenersInput, ...func(*Options)) (*ListCustomRoutingListenersOutput, error) -} - -var _ ListCustomRoutingListenersAPIClient = (*Client)(nil) - // ListCustomRoutingListenersPaginatorOptions is the paginator options for // ListCustomRoutingListeners type ListCustomRoutingListenersPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListCustomRoutingListenersPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomRoutingListeners(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListCustomRoutingListenersPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListCustomRoutingListenersAPIClient is a client that implements the +// ListCustomRoutingListeners operation. +type ListCustomRoutingListenersAPIClient interface { + ListCustomRoutingListeners(context.Context, *ListCustomRoutingListenersInput, ...func(*Options)) (*ListCustomRoutingListenersOutput, error) +} + +var _ ListCustomRoutingListenersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomRoutingListeners(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go b/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go index 0f27a655d70..e908e670f30 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingPortMappings.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListCustomRoutingPortMappingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomRoutingPortMappingsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListCustomRoutingPortMappingsMiddlewares(stack *mid return nil } -// ListCustomRoutingPortMappingsAPIClient is a client that implements the -// ListCustomRoutingPortMappings operation. -type ListCustomRoutingPortMappingsAPIClient interface { - ListCustomRoutingPortMappings(context.Context, *ListCustomRoutingPortMappingsInput, ...func(*Options)) (*ListCustomRoutingPortMappingsOutput, error) -} - -var _ ListCustomRoutingPortMappingsAPIClient = (*Client)(nil) - // ListCustomRoutingPortMappingsPaginatorOptions is the paginator options for // ListCustomRoutingPortMappings type ListCustomRoutingPortMappingsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListCustomRoutingPortMappingsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomRoutingPortMappings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListCustomRoutingPortMappingsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListCustomRoutingPortMappingsAPIClient is a client that implements the +// ListCustomRoutingPortMappings operation. +type ListCustomRoutingPortMappingsAPIClient interface { + ListCustomRoutingPortMappings(context.Context, *ListCustomRoutingPortMappingsInput, ...func(*Options)) (*ListCustomRoutingPortMappingsOutput, error) +} + +var _ ListCustomRoutingPortMappingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomRoutingPortMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go b/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go index a406c27a890..d4710fbda84 100644 --- a/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go +++ b/service/globalaccelerator/api_op_ListCustomRoutingPortMappingsByDestination.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListCustomRoutingPortMappingsByDestinationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomRoutingPortMappingsByDestinationValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListCustomRoutingPortMappingsByDestinationMiddlewar return nil } -// ListCustomRoutingPortMappingsByDestinationAPIClient is a client that implements -// the ListCustomRoutingPortMappingsByDestination operation. -type ListCustomRoutingPortMappingsByDestinationAPIClient interface { - ListCustomRoutingPortMappingsByDestination(context.Context, *ListCustomRoutingPortMappingsByDestinationInput, ...func(*Options)) (*ListCustomRoutingPortMappingsByDestinationOutput, error) -} - -var _ ListCustomRoutingPortMappingsByDestinationAPIClient = (*Client)(nil) - // ListCustomRoutingPortMappingsByDestinationPaginatorOptions is the paginator // options for ListCustomRoutingPortMappingsByDestination type ListCustomRoutingPortMappingsByDestinationPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListCustomRoutingPortMappingsByDestinationPaginator) NextPage(ctx conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomRoutingPortMappingsByDestination(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListCustomRoutingPortMappingsByDestinationPaginator) NextPage(ctx conte return result, nil } +// ListCustomRoutingPortMappingsByDestinationAPIClient is a client that implements +// the ListCustomRoutingPortMappingsByDestination operation. +type ListCustomRoutingPortMappingsByDestinationAPIClient interface { + ListCustomRoutingPortMappingsByDestination(context.Context, *ListCustomRoutingPortMappingsByDestinationInput, ...func(*Options)) (*ListCustomRoutingPortMappingsByDestinationOutput, error) +} + +var _ ListCustomRoutingPortMappingsByDestinationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomRoutingPortMappingsByDestination(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListEndpointGroups.go b/service/globalaccelerator/api_op_ListEndpointGroups.go index 0e46d47a70b..35838880560 100644 --- a/service/globalaccelerator/api_op_ListEndpointGroups.go +++ b/service/globalaccelerator/api_op_ListEndpointGroups.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEndpointGroupsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEndpointGroupsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListEndpointGroupsMiddlewares(stack *middleware.Sta return nil } -// ListEndpointGroupsAPIClient is a client that implements the ListEndpointGroups -// operation. -type ListEndpointGroupsAPIClient interface { - ListEndpointGroups(context.Context, *ListEndpointGroupsInput, ...func(*Options)) (*ListEndpointGroupsOutput, error) -} - -var _ ListEndpointGroupsAPIClient = (*Client)(nil) - // ListEndpointGroupsPaginatorOptions is the paginator options for // ListEndpointGroups type ListEndpointGroupsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListEndpointGroupsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpointGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListEndpointGroupsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEndpointGroupsAPIClient is a client that implements the ListEndpointGroups +// operation. +type ListEndpointGroupsAPIClient interface { + ListEndpointGroups(context.Context, *ListEndpointGroupsInput, ...func(*Options)) (*ListEndpointGroupsOutput, error) +} + +var _ ListEndpointGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpointGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListListeners.go b/service/globalaccelerator/api_op_ListListeners.go index 810855d9cd4..67a28a1d0be 100644 --- a/service/globalaccelerator/api_op_ListListeners.go +++ b/service/globalaccelerator/api_op_ListListeners.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListListenersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListListenersValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListListenersMiddlewares(stack *middleware.Stack, o return nil } -// ListListenersAPIClient is a client that implements the ListListeners operation. -type ListListenersAPIClient interface { - ListListeners(context.Context, *ListListenersInput, ...func(*Options)) (*ListListenersOutput, error) -} - -var _ ListListenersAPIClient = (*Client)(nil) - // ListListenersPaginatorOptions is the paginator options for ListListeners type ListListenersPaginatorOptions struct { // The number of listener objects that you want to return with this call. The @@ -214,6 +210,9 @@ func (p *ListListenersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListListeners(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListListenersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListListenersAPIClient is a client that implements the ListListeners operation. +type ListListenersAPIClient interface { + ListListeners(context.Context, *ListListenersInput, ...func(*Options)) (*ListListenersOutput, error) +} + +var _ ListListenersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListListeners(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/globalaccelerator/api_op_ListTagsForResource.go b/service/globalaccelerator/api_op_ListTagsForResource.go index 5cb1b24b137..2ce261e8cd9 100644 --- a/service/globalaccelerator/api_op_ListTagsForResource.go +++ b/service/globalaccelerator/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_ProvisionByoipCidr.go b/service/globalaccelerator/api_op_ProvisionByoipCidr.go index fea899a83eb..fc03f6e70e0 100644 --- a/service/globalaccelerator/api_op_ProvisionByoipCidr.go +++ b/service/globalaccelerator/api_op_ProvisionByoipCidr.go @@ -127,6 +127,9 @@ func (c *Client) addOperationProvisionByoipCidrMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_RemoveCustomRoutingEndpoints.go b/service/globalaccelerator/api_op_RemoveCustomRoutingEndpoints.go index 544cc4b18db..07d30560ccf 100644 --- a/service/globalaccelerator/api_op_RemoveCustomRoutingEndpoints.go +++ b/service/globalaccelerator/api_op_RemoveCustomRoutingEndpoints.go @@ -107,6 +107,9 @@ func (c *Client) addOperationRemoveCustomRoutingEndpointsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveCustomRoutingEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_RemoveEndpoints.go b/service/globalaccelerator/api_op_RemoveEndpoints.go index ed83a63113a..adbb4b37d71 100644 --- a/service/globalaccelerator/api_op_RemoveEndpoints.go +++ b/service/globalaccelerator/api_op_RemoveEndpoints.go @@ -123,6 +123,9 @@ func (c *Client) addOperationRemoveEndpointsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_TagResource.go b/service/globalaccelerator/api_op_TagResource.go index 9c3c778bc87..33e3c01289c 100644 --- a/service/globalaccelerator/api_op_TagResource.go +++ b/service/globalaccelerator/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UntagResource.go b/service/globalaccelerator/api_op_UntagResource.go index cde5ad809a9..4a44bd123ca 100644 --- a/service/globalaccelerator/api_op_UntagResource.go +++ b/service/globalaccelerator/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateAccelerator.go b/service/globalaccelerator/api_op_UpdateAccelerator.go index 3b07faab1fe..903196a1feb 100644 --- a/service/globalaccelerator/api_op_UpdateAccelerator.go +++ b/service/globalaccelerator/api_op_UpdateAccelerator.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateAcceleratorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAcceleratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateAcceleratorAttributes.go b/service/globalaccelerator/api_op_UpdateAcceleratorAttributes.go index 34fcfc03e91..975b26c7351 100644 --- a/service/globalaccelerator/api_op_UpdateAcceleratorAttributes.go +++ b/service/globalaccelerator/api_op_UpdateAcceleratorAttributes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateAcceleratorAttributesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateCrossAccountAttachment.go b/service/globalaccelerator/api_op_UpdateCrossAccountAttachment.go index b10adeeb2f6..5efbd963563 100644 --- a/service/globalaccelerator/api_op_UpdateCrossAccountAttachment.go +++ b/service/globalaccelerator/api_op_UpdateCrossAccountAttachment.go @@ -147,6 +147,9 @@ func (c *Client) addOperationUpdateCrossAccountAttachmentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCrossAccountAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go b/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go index 37aa5ba4d13..6388498a140 100644 --- a/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go +++ b/service/globalaccelerator/api_op_UpdateCustomRoutingAccelerator.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateCustomRoutingAcceleratorMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomRoutingAcceleratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateCustomRoutingAcceleratorAttributes.go b/service/globalaccelerator/api_op_UpdateCustomRoutingAcceleratorAttributes.go index 968a09d8737..2f6a6ea38a9 100644 --- a/service/globalaccelerator/api_op_UpdateCustomRoutingAcceleratorAttributes.go +++ b/service/globalaccelerator/api_op_UpdateCustomRoutingAcceleratorAttributes.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateCustomRoutingAcceleratorAttributesMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomRoutingAcceleratorAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateCustomRoutingListener.go b/service/globalaccelerator/api_op_UpdateCustomRoutingListener.go index ca28bb1a509..562bc47f971 100644 --- a/service/globalaccelerator/api_op_UpdateCustomRoutingListener.go +++ b/service/globalaccelerator/api_op_UpdateCustomRoutingListener.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateCustomRoutingListenerMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomRoutingListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateEndpointGroup.go b/service/globalaccelerator/api_op_UpdateEndpointGroup.go index 4636c2e1eb6..e7adbf6ee4a 100644 --- a/service/globalaccelerator/api_op_UpdateEndpointGroup.go +++ b/service/globalaccelerator/api_op_UpdateEndpointGroup.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateEndpointGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_UpdateListener.go b/service/globalaccelerator/api_op_UpdateListener.go index b6814a0dd1b..9d7e6cddcc3 100644 --- a/service/globalaccelerator/api_op_UpdateListener.go +++ b/service/globalaccelerator/api_op_UpdateListener.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/globalaccelerator/api_op_WithdrawByoipCidr.go b/service/globalaccelerator/api_op_WithdrawByoipCidr.go index 1091a13a4d4..e5a3e901855 100644 --- a/service/globalaccelerator/api_op_WithdrawByoipCidr.go +++ b/service/globalaccelerator/api_op_WithdrawByoipCidr.go @@ -119,6 +119,9 @@ func (c *Client) addOperationWithdrawByoipCidrMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpWithdrawByoipCidrValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_client.go b/service/glue/api_client.go index b66e4346838..0eaaa08c93c 100644 --- a/service/glue/api_client.go +++ b/service/glue/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/glue/api_op_BatchCreatePartition.go b/service/glue/api_op_BatchCreatePartition.go index a0974634ff2..f73d05b790f 100644 --- a/service/glue/api_op_BatchCreatePartition.go +++ b/service/glue/api_op_BatchCreatePartition.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchCreatePartitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreatePartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchDeleteConnection.go b/service/glue/api_op_BatchDeleteConnection.go index 9e0dc9ebf06..03ea7a104a0 100644 --- a/service/glue/api_op_BatchDeleteConnection.go +++ b/service/glue/api_op_BatchDeleteConnection.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchDeleteConnectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchDeletePartition.go b/service/glue/api_op_BatchDeletePartition.go index c459429de6a..c39348cbe77 100644 --- a/service/glue/api_op_BatchDeletePartition.go +++ b/service/glue/api_op_BatchDeletePartition.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchDeletePartitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeletePartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchDeleteTable.go b/service/glue/api_op_BatchDeleteTable.go index 5e82b6fe699..00456d4b13b 100644 --- a/service/glue/api_op_BatchDeleteTable.go +++ b/service/glue/api_op_BatchDeleteTable.go @@ -129,6 +129,9 @@ func (c *Client) addOperationBatchDeleteTableMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchDeleteTableVersion.go b/service/glue/api_op_BatchDeleteTableVersion.go index 8a3e057eeac..4239a52eedb 100644 --- a/service/glue/api_op_BatchDeleteTableVersion.go +++ b/service/glue/api_op_BatchDeleteTableVersion.go @@ -123,6 +123,9 @@ func (c *Client) addOperationBatchDeleteTableVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteTableVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetBlueprints.go b/service/glue/api_op_BatchGetBlueprints.go index e6ec63237fc..759377d69da 100644 --- a/service/glue/api_op_BatchGetBlueprints.go +++ b/service/glue/api_op_BatchGetBlueprints.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchGetBlueprintsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetBlueprintsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetCrawlers.go b/service/glue/api_op_BatchGetCrawlers.go index da0685126b7..b89c47b7fa3 100644 --- a/service/glue/api_op_BatchGetCrawlers.go +++ b/service/glue/api_op_BatchGetCrawlers.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchGetCrawlersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetCrawlersValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetCustomEntityTypes.go b/service/glue/api_op_BatchGetCustomEntityTypes.go index b2181c87ded..772fd1c1380 100644 --- a/service/glue/api_op_BatchGetCustomEntityTypes.go +++ b/service/glue/api_op_BatchGetCustomEntityTypes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetCustomEntityTypesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetCustomEntityTypesValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetDataQualityResult.go b/service/glue/api_op_BatchGetDataQualityResult.go index c6c78e5531b..c075958ba44 100644 --- a/service/glue/api_op_BatchGetDataQualityResult.go +++ b/service/glue/api_op_BatchGetDataQualityResult.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchGetDataQualityResultMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDataQualityResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetDevEndpoints.go b/service/glue/api_op_BatchGetDevEndpoints.go index 48813e50374..b606b2d3358 100644 --- a/service/glue/api_op_BatchGetDevEndpoints.go +++ b/service/glue/api_op_BatchGetDevEndpoints.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchGetDevEndpointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDevEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetJobs.go b/service/glue/api_op_BatchGetJobs.go index d5fa8e25ddc..b11afdc6225 100644 --- a/service/glue/api_op_BatchGetJobs.go +++ b/service/glue/api_op_BatchGetJobs.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchGetJobsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetPartition.go b/service/glue/api_op_BatchGetPartition.go index 528b68e4702..2e6069d9af3 100644 --- a/service/glue/api_op_BatchGetPartition.go +++ b/service/glue/api_op_BatchGetPartition.go @@ -124,6 +124,9 @@ func (c *Client) addOperationBatchGetPartitionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetPartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetTableOptimizer.go b/service/glue/api_op_BatchGetTableOptimizer.go index c86e5e529a5..de75b254540 100644 --- a/service/glue/api_op_BatchGetTableOptimizer.go +++ b/service/glue/api_op_BatchGetTableOptimizer.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetTableOptimizerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetTableOptimizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetTriggers.go b/service/glue/api_op_BatchGetTriggers.go index a0bd282d8a8..a273969b32b 100644 --- a/service/glue/api_op_BatchGetTriggers.go +++ b/service/glue/api_op_BatchGetTriggers.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchGetTriggersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetTriggersValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchGetWorkflows.go b/service/glue/api_op_BatchGetWorkflows.go index 4c317b99f3a..16df8afff1c 100644 --- a/service/glue/api_op_BatchGetWorkflows.go +++ b/service/glue/api_op_BatchGetWorkflows.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchGetWorkflowsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetWorkflowsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchStopJobRun.go b/service/glue/api_op_BatchStopJobRun.go index a1270430e35..bddd8548a0d 100644 --- a/service/glue/api_op_BatchStopJobRun.go +++ b/service/glue/api_op_BatchStopJobRun.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchStopJobRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchStopJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_BatchUpdatePartition.go b/service/glue/api_op_BatchUpdatePartition.go index 19b93f3c38c..ceccae9825c 100644 --- a/service/glue/api_op_BatchUpdatePartition.go +++ b/service/glue/api_op_BatchUpdatePartition.go @@ -121,6 +121,9 @@ func (c *Client) addOperationBatchUpdatePartitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdatePartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CancelDataQualityRuleRecommendationRun.go b/service/glue/api_op_CancelDataQualityRuleRecommendationRun.go index caaa9515316..48a9440960d 100644 --- a/service/glue/api_op_CancelDataQualityRuleRecommendationRun.go +++ b/service/glue/api_op_CancelDataQualityRuleRecommendationRun.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelDataQualityRuleRecommendationRunMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDataQualityRuleRecommendationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CancelDataQualityRulesetEvaluationRun.go b/service/glue/api_op_CancelDataQualityRulesetEvaluationRun.go index f655c7c17ba..b22b4841512 100644 --- a/service/glue/api_op_CancelDataQualityRulesetEvaluationRun.go +++ b/service/glue/api_op_CancelDataQualityRulesetEvaluationRun.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelDataQualityRulesetEvaluationRunMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDataQualityRulesetEvaluationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CancelMLTaskRun.go b/service/glue/api_op_CancelMLTaskRun.go index 90d5ea63c9b..ced7f20385c 100644 --- a/service/glue/api_op_CancelMLTaskRun.go +++ b/service/glue/api_op_CancelMLTaskRun.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCancelMLTaskRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMLTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CancelStatement.go b/service/glue/api_op_CancelStatement.go index 947523533e1..afddbf222c7 100644 --- a/service/glue/api_op_CancelStatement.go +++ b/service/glue/api_op_CancelStatement.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCancelStatementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CheckSchemaVersionValidity.go b/service/glue/api_op_CheckSchemaVersionValidity.go index b1c5f4bd131..a247b0833da 100644 --- a/service/glue/api_op_CheckSchemaVersionValidity.go +++ b/service/glue/api_op_CheckSchemaVersionValidity.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCheckSchemaVersionValidityMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckSchemaVersionValidityValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateBlueprint.go b/service/glue/api_op_CreateBlueprint.go index 9208d1cf065..3bf821cc34a 100644 --- a/service/glue/api_op_CreateBlueprint.go +++ b/service/glue/api_op_CreateBlueprint.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateBlueprintMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBlueprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateClassifier.go b/service/glue/api_op_CreateClassifier.go index 9204e8a261a..3936b1cb726 100644 --- a/service/glue/api_op_CreateClassifier.go +++ b/service/glue/api_op_CreateClassifier.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateClassifierMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateConnection.go b/service/glue/api_op_CreateConnection.go index 9cfd711d0dd..2ea88b09169 100644 --- a/service/glue/api_op_CreateConnection.go +++ b/service/glue/api_op_CreateConnection.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateCrawler.go b/service/glue/api_op_CreateCrawler.go index 780bc63c9af..84ef4076d0c 100644 --- a/service/glue/api_op_CreateCrawler.go +++ b/service/glue/api_op_CreateCrawler.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateCrawlerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCrawlerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateCustomEntityType.go b/service/glue/api_op_CreateCustomEntityType.go index bf2d4c07798..84bfbe5a9ff 100644 --- a/service/glue/api_op_CreateCustomEntityType.go +++ b/service/glue/api_op_CreateCustomEntityType.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateCustomEntityTypeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomEntityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateDataQualityRuleset.go b/service/glue/api_op_CreateDataQualityRuleset.go index c048bd67f00..d8c4b7843bd 100644 --- a/service/glue/api_op_CreateDataQualityRuleset.go +++ b/service/glue/api_op_CreateDataQualityRuleset.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateDataQualityRulesetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataQualityRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateDatabase.go b/service/glue/api_op_CreateDatabase.go index 79ca1e44987..30be9aaed38 100644 --- a/service/glue/api_op_CreateDatabase.go +++ b/service/glue/api_op_CreateDatabase.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateDatabaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateDevEndpoint.go b/service/glue/api_op_CreateDevEndpoint.go index a3ad4a8a34a..0916a9fc62d 100644 --- a/service/glue/api_op_CreateDevEndpoint.go +++ b/service/glue/api_op_CreateDevEndpoint.go @@ -282,6 +282,9 @@ func (c *Client) addOperationCreateDevEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDevEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateJob.go b/service/glue/api_op_CreateJob.go index b9d6998ce7a..f2296c835c6 100644 --- a/service/glue/api_op_CreateJob.go +++ b/service/glue/api_op_CreateJob.go @@ -321,6 +321,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateMLTransform.go b/service/glue/api_op_CreateMLTransform.go index afcaf064f23..d833406b86a 100644 --- a/service/glue/api_op_CreateMLTransform.go +++ b/service/glue/api_op_CreateMLTransform.go @@ -234,6 +234,9 @@ func (c *Client) addOperationCreateMLTransformMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMLTransformValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreatePartition.go b/service/glue/api_op_CreatePartition.go index f23e57c278f..0e27f59b8c5 100644 --- a/service/glue/api_op_CreatePartition.go +++ b/service/glue/api_op_CreatePartition.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreatePartitionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreatePartitionIndex.go b/service/glue/api_op_CreatePartitionIndex.go index 17af0ee1dd9..e827b37c039 100644 --- a/service/glue/api_op_CreatePartitionIndex.go +++ b/service/glue/api_op_CreatePartitionIndex.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreatePartitionIndexMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePartitionIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateRegistry.go b/service/glue/api_op_CreateRegistry.go index 3b749aabbd3..5264b85031b 100644 --- a/service/glue/api_op_CreateRegistry.go +++ b/service/glue/api_op_CreateRegistry.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateRegistryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateSchema.go b/service/glue/api_op_CreateSchema.go index e3b5a6d7014..a453f550edb 100644 --- a/service/glue/api_op_CreateSchema.go +++ b/service/glue/api_op_CreateSchema.go @@ -225,6 +225,9 @@ func (c *Client) addOperationCreateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateScript.go b/service/glue/api_op_CreateScript.go index cf8203fcf66..01f423262e5 100644 --- a/service/glue/api_op_CreateScript.go +++ b/service/glue/api_op_CreateScript.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateScriptMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScriptValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateSecurityConfiguration.go b/service/glue/api_op_CreateSecurityConfiguration.go index 9292c6de58d..b32e6b4e9cb 100644 --- a/service/glue/api_op_CreateSecurityConfiguration.go +++ b/service/glue/api_op_CreateSecurityConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateSecurityConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateSession.go b/service/glue/api_op_CreateSession.go index 26c4435d666..3a1693ad615 100644 --- a/service/glue/api_op_CreateSession.go +++ b/service/glue/api_op_CreateSession.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateTable.go b/service/glue/api_op_CreateTable.go index e84ce1128aa..2081e190b5b 100644 --- a/service/glue/api_op_CreateTable.go +++ b/service/glue/api_op_CreateTable.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateTableOptimizer.go b/service/glue/api_op_CreateTableOptimizer.go index 7d4583731db..86ccf3b8d11 100644 --- a/service/glue/api_op_CreateTableOptimizer.go +++ b/service/glue/api_op_CreateTableOptimizer.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateTableOptimizerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTableOptimizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateTrigger.go b/service/glue/api_op_CreateTrigger.go index 5c443d66363..7e32561e382 100644 --- a/service/glue/api_op_CreateTrigger.go +++ b/service/glue/api_op_CreateTrigger.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateTriggerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTriggerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateUsageProfile.go b/service/glue/api_op_CreateUsageProfile.go index 5ecf57db792..68d5a72b621 100644 --- a/service/glue/api_op_CreateUsageProfile.go +++ b/service/glue/api_op_CreateUsageProfile.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateUsageProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUsageProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateUserDefinedFunction.go b/service/glue/api_op_CreateUserDefinedFunction.go index a208face177..aa9cbebc042 100644 --- a/service/glue/api_op_CreateUserDefinedFunction.go +++ b/service/glue/api_op_CreateUserDefinedFunction.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateUserDefinedFunctionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserDefinedFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_CreateWorkflow.go b/service/glue/api_op_CreateWorkflow.go index 254793f34fe..841db62b126 100644 --- a/service/glue/api_op_CreateWorkflow.go +++ b/service/glue/api_op_CreateWorkflow.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteBlueprint.go b/service/glue/api_op_DeleteBlueprint.go index 410c248a285..444293e3690 100644 --- a/service/glue/api_op_DeleteBlueprint.go +++ b/service/glue/api_op_DeleteBlueprint.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteBlueprintMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBlueprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteClassifier.go b/service/glue/api_op_DeleteClassifier.go index ec43740d780..2e7771523fe 100644 --- a/service/glue/api_op_DeleteClassifier.go +++ b/service/glue/api_op_DeleteClassifier.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteClassifierMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteColumnStatisticsForPartition.go b/service/glue/api_op_DeleteColumnStatisticsForPartition.go index a07c31cc5a2..dabeb4c5aed 100644 --- a/service/glue/api_op_DeleteColumnStatisticsForPartition.go +++ b/service/glue/api_op_DeleteColumnStatisticsForPartition.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteColumnStatisticsForPartitionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteColumnStatisticsForPartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteColumnStatisticsForTable.go b/service/glue/api_op_DeleteColumnStatisticsForTable.go index 0103bed5452..1b42d9dfee8 100644 --- a/service/glue/api_op_DeleteColumnStatisticsForTable.go +++ b/service/glue/api_op_DeleteColumnStatisticsForTable.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteColumnStatisticsForTableMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteColumnStatisticsForTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteConnection.go b/service/glue/api_op_DeleteConnection.go index 7a8d648a6a8..46dfa3543ac 100644 --- a/service/glue/api_op_DeleteConnection.go +++ b/service/glue/api_op_DeleteConnection.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteCrawler.go b/service/glue/api_op_DeleteCrawler.go index 0ad4b2ca1a8..99677f5de26 100644 --- a/service/glue/api_op_DeleteCrawler.go +++ b/service/glue/api_op_DeleteCrawler.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteCrawlerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCrawlerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteCustomEntityType.go b/service/glue/api_op_DeleteCustomEntityType.go index 40791109f6a..83389ec83b1 100644 --- a/service/glue/api_op_DeleteCustomEntityType.go +++ b/service/glue/api_op_DeleteCustomEntityType.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteCustomEntityTypeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomEntityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteDataQualityRuleset.go b/service/glue/api_op_DeleteDataQualityRuleset.go index b82b3f8482f..1993119446f 100644 --- a/service/glue/api_op_DeleteDataQualityRuleset.go +++ b/service/glue/api_op_DeleteDataQualityRuleset.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDataQualityRulesetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataQualityRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteDatabase.go b/service/glue/api_op_DeleteDatabase.go index c82ff391b3a..68356be9dca 100644 --- a/service/glue/api_op_DeleteDatabase.go +++ b/service/glue/api_op_DeleteDatabase.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteDatabaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteDevEndpoint.go b/service/glue/api_op_DeleteDevEndpoint.go index f01ed22941b..3a61ad33b9b 100644 --- a/service/glue/api_op_DeleteDevEndpoint.go +++ b/service/glue/api_op_DeleteDevEndpoint.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDevEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDevEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteJob.go b/service/glue/api_op_DeleteJob.go index 0ec61bc11d8..363b44b19fa 100644 --- a/service/glue/api_op_DeleteJob.go +++ b/service/glue/api_op_DeleteJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteMLTransform.go b/service/glue/api_op_DeleteMLTransform.go index dbebebb032d..2569bdb0be8 100644 --- a/service/glue/api_op_DeleteMLTransform.go +++ b/service/glue/api_op_DeleteMLTransform.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteMLTransformMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMLTransformValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeletePartition.go b/service/glue/api_op_DeletePartition.go index a0e44164765..7fda2f62ba2 100644 --- a/service/glue/api_op_DeletePartition.go +++ b/service/glue/api_op_DeletePartition.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeletePartitionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeletePartitionIndex.go b/service/glue/api_op_DeletePartitionIndex.go index 1f68c378289..036936c88c1 100644 --- a/service/glue/api_op_DeletePartitionIndex.go +++ b/service/glue/api_op_DeletePartitionIndex.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeletePartitionIndexMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePartitionIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteRegistry.go b/service/glue/api_op_DeleteRegistry.go index 87f1dc2cbf9..6e8203d25f4 100644 --- a/service/glue/api_op_DeleteRegistry.go +++ b/service/glue/api_op_DeleteRegistry.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteRegistryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteResourcePolicy.go b/service/glue/api_op_DeleteResourcePolicy.go index cf5720d7c54..a68dc96737e 100644 --- a/service/glue/api_op_DeleteResourcePolicy.go +++ b/service/glue/api_op_DeleteResourcePolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_DeleteSchema.go b/service/glue/api_op_DeleteSchema.go index f56e1045263..4e136aac106 100644 --- a/service/glue/api_op_DeleteSchema.go +++ b/service/glue/api_op_DeleteSchema.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteSchemaVersions.go b/service/glue/api_op_DeleteSchemaVersions.go index 64b0f0ec617..6cdfa5ef1ad 100644 --- a/service/glue/api_op_DeleteSchemaVersions.go +++ b/service/glue/api_op_DeleteSchemaVersions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteSchemaVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteSecurityConfiguration.go b/service/glue/api_op_DeleteSecurityConfiguration.go index bd6b95b017e..db785450661 100644 --- a/service/glue/api_op_DeleteSecurityConfiguration.go +++ b/service/glue/api_op_DeleteSecurityConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSecurityConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteSession.go b/service/glue/api_op_DeleteSession.go index 7a3a5894e95..bd0c65f3232 100644 --- a/service/glue/api_op_DeleteSession.go +++ b/service/glue/api_op_DeleteSession.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteTable.go b/service/glue/api_op_DeleteTable.go index 1cc21da0263..38aeddd30de 100644 --- a/service/glue/api_op_DeleteTable.go +++ b/service/glue/api_op_DeleteTable.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteTableOptimizer.go b/service/glue/api_op_DeleteTableOptimizer.go index 52be705c997..75787e12cdd 100644 --- a/service/glue/api_op_DeleteTableOptimizer.go +++ b/service/glue/api_op_DeleteTableOptimizer.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteTableOptimizerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTableOptimizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteTableVersion.go b/service/glue/api_op_DeleteTableVersion.go index 10fd4af407f..22b7eef7830 100644 --- a/service/glue/api_op_DeleteTableVersion.go +++ b/service/glue/api_op_DeleteTableVersion.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteTableVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTableVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteTrigger.go b/service/glue/api_op_DeleteTrigger.go index 40e0dc5a9e2..56a0baa2d6c 100644 --- a/service/glue/api_op_DeleteTrigger.go +++ b/service/glue/api_op_DeleteTrigger.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteTriggerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTriggerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteUsageProfile.go b/service/glue/api_op_DeleteUsageProfile.go index a2ff3f86895..1abd0ec5208 100644 --- a/service/glue/api_op_DeleteUsageProfile.go +++ b/service/glue/api_op_DeleteUsageProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteUsageProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUsageProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteUserDefinedFunction.go b/service/glue/api_op_DeleteUserDefinedFunction.go index 4f26d362d4c..904e3089aab 100644 --- a/service/glue/api_op_DeleteUserDefinedFunction.go +++ b/service/glue/api_op_DeleteUserDefinedFunction.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteUserDefinedFunctionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserDefinedFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_DeleteWorkflow.go b/service/glue/api_op_DeleteWorkflow.go index c7ae87280a6..4b0ff146d7b 100644 --- a/service/glue/api_op_DeleteWorkflow.go +++ b/service/glue/api_op_DeleteWorkflow.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetBlueprint.go b/service/glue/api_op_GetBlueprint.go index 0f8f75ab1f7..80024b97841 100644 --- a/service/glue/api_op_GetBlueprint.go +++ b/service/glue/api_op_GetBlueprint.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetBlueprintMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlueprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetBlueprintRun.go b/service/glue/api_op_GetBlueprintRun.go index 483e029c0d4..d8723f73b63 100644 --- a/service/glue/api_op_GetBlueprintRun.go +++ b/service/glue/api_op_GetBlueprintRun.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetBlueprintRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlueprintRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetBlueprintRuns.go b/service/glue/api_op_GetBlueprintRuns.go index af5489ca640..7934fa58830 100644 --- a/service/glue/api_op_GetBlueprintRuns.go +++ b/service/glue/api_op_GetBlueprintRuns.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetBlueprintRunsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlueprintRunsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetBlueprintRunsMiddlewares(stack *middleware.Stack return nil } -// GetBlueprintRunsAPIClient is a client that implements the GetBlueprintRuns -// operation. -type GetBlueprintRunsAPIClient interface { - GetBlueprintRuns(context.Context, *GetBlueprintRunsInput, ...func(*Options)) (*GetBlueprintRunsOutput, error) -} - -var _ GetBlueprintRunsAPIClient = (*Client)(nil) - // GetBlueprintRunsPaginatorOptions is the paginator options for GetBlueprintRuns type GetBlueprintRunsPaginatorOptions struct { // The maximum size of a list to return. @@ -210,6 +205,9 @@ func (p *GetBlueprintRunsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBlueprintRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *GetBlueprintRunsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetBlueprintRunsAPIClient is a client that implements the GetBlueprintRuns +// operation. +type GetBlueprintRunsAPIClient interface { + GetBlueprintRuns(context.Context, *GetBlueprintRunsInput, ...func(*Options)) (*GetBlueprintRunsOutput, error) +} + +var _ GetBlueprintRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBlueprintRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetCatalogImportStatus.go b/service/glue/api_op_GetCatalogImportStatus.go index 354198873c1..d19bf8d3d1a 100644 --- a/service/glue/api_op_GetCatalogImportStatus.go +++ b/service/glue/api_op_GetCatalogImportStatus.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetCatalogImportStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCatalogImportStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_GetClassifier.go b/service/glue/api_op_GetClassifier.go index 620fcf179d3..b066fd2a63b 100644 --- a/service/glue/api_op_GetClassifier.go +++ b/service/glue/api_op_GetClassifier.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetClassifierMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetClassifiers.go b/service/glue/api_op_GetClassifiers.go index 54f2942628b..940421563e9 100644 --- a/service/glue/api_op_GetClassifiers.go +++ b/service/glue/api_op_GetClassifiers.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetClassifiersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetClassifiers(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationGetClassifiersMiddlewares(stack *middleware.Stack, return nil } -// GetClassifiersAPIClient is a client that implements the GetClassifiers -// operation. -type GetClassifiersAPIClient interface { - GetClassifiers(context.Context, *GetClassifiersInput, ...func(*Options)) (*GetClassifiersOutput, error) -} - -var _ GetClassifiersAPIClient = (*Client)(nil) - // GetClassifiersPaginatorOptions is the paginator options for GetClassifiers type GetClassifiersPaginatorOptions struct { // The size of the list to return (optional). @@ -202,6 +197,9 @@ func (p *GetClassifiersPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetClassifiers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *GetClassifiersPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetClassifiersAPIClient is a client that implements the GetClassifiers +// operation. +type GetClassifiersAPIClient interface { + GetClassifiers(context.Context, *GetClassifiersInput, ...func(*Options)) (*GetClassifiersOutput, error) +} + +var _ GetClassifiersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetClassifiers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetColumnStatisticsForPartition.go b/service/glue/api_op_GetColumnStatisticsForPartition.go index 7aa8dfc96f2..5c76570d574 100644 --- a/service/glue/api_op_GetColumnStatisticsForPartition.go +++ b/service/glue/api_op_GetColumnStatisticsForPartition.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetColumnStatisticsForPartitionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetColumnStatisticsForPartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetColumnStatisticsForTable.go b/service/glue/api_op_GetColumnStatisticsForTable.go index 3395040071b..be91cc0bf04 100644 --- a/service/glue/api_op_GetColumnStatisticsForTable.go +++ b/service/glue/api_op_GetColumnStatisticsForTable.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetColumnStatisticsForTableMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetColumnStatisticsForTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetColumnStatisticsTaskRun.go b/service/glue/api_op_GetColumnStatisticsTaskRun.go index ef86f235213..554e9c1b39c 100644 --- a/service/glue/api_op_GetColumnStatisticsTaskRun.go +++ b/service/glue/api_op_GetColumnStatisticsTaskRun.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetColumnStatisticsTaskRunMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetColumnStatisticsTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetColumnStatisticsTaskRuns.go b/service/glue/api_op_GetColumnStatisticsTaskRuns.go index cf08c02a20c..195611b438c 100644 --- a/service/glue/api_op_GetColumnStatisticsTaskRuns.go +++ b/service/glue/api_op_GetColumnStatisticsTaskRuns.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetColumnStatisticsTaskRunsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetColumnStatisticsTaskRunsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationGetColumnStatisticsTaskRunsMiddlewares(stack *middl return nil } -// GetColumnStatisticsTaskRunsAPIClient is a client that implements the -// GetColumnStatisticsTaskRuns operation. -type GetColumnStatisticsTaskRunsAPIClient interface { - GetColumnStatisticsTaskRuns(context.Context, *GetColumnStatisticsTaskRunsInput, ...func(*Options)) (*GetColumnStatisticsTaskRunsOutput, error) -} - -var _ GetColumnStatisticsTaskRunsAPIClient = (*Client)(nil) - // GetColumnStatisticsTaskRunsPaginatorOptions is the paginator options for // GetColumnStatisticsTaskRuns type GetColumnStatisticsTaskRunsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetColumnStatisticsTaskRunsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetColumnStatisticsTaskRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetColumnStatisticsTaskRunsPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetColumnStatisticsTaskRunsAPIClient is a client that implements the +// GetColumnStatisticsTaskRuns operation. +type GetColumnStatisticsTaskRunsAPIClient interface { + GetColumnStatisticsTaskRuns(context.Context, *GetColumnStatisticsTaskRunsInput, ...func(*Options)) (*GetColumnStatisticsTaskRunsOutput, error) +} + +var _ GetColumnStatisticsTaskRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetColumnStatisticsTaskRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetConnection.go b/service/glue/api_op_GetConnection.go index f19b15b9f9a..24bc6780c7f 100644 --- a/service/glue/api_op_GetConnection.go +++ b/service/glue/api_op_GetConnection.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetConnectionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetConnections.go b/service/glue/api_op_GetConnections.go index b07848da99b..47f405e2400 100644 --- a/service/glue/api_op_GetConnections.go +++ b/service/glue/api_op_GetConnections.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnections(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetConnectionsMiddlewares(stack *middleware.Stack, return nil } -// GetConnectionsAPIClient is a client that implements the GetConnections -// operation. -type GetConnectionsAPIClient interface { - GetConnections(context.Context, *GetConnectionsInput, ...func(*Options)) (*GetConnectionsOutput, error) -} - -var _ GetConnectionsAPIClient = (*Client)(nil) - // GetConnectionsPaginatorOptions is the paginator options for GetConnections type GetConnectionsPaginatorOptions struct { // The maximum number of connections to return in one response. @@ -217,6 +212,9 @@ func (p *GetConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *GetConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetConnectionsAPIClient is a client that implements the GetConnections +// operation. +type GetConnectionsAPIClient interface { + GetConnections(context.Context, *GetConnectionsInput, ...func(*Options)) (*GetConnectionsOutput, error) +} + +var _ GetConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetCrawler.go b/service/glue/api_op_GetCrawler.go index cc3e4f6fd92..0d58e74f4f9 100644 --- a/service/glue/api_op_GetCrawler.go +++ b/service/glue/api_op_GetCrawler.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetCrawlerMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCrawlerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetCrawlerMetrics.go b/service/glue/api_op_GetCrawlerMetrics.go index d4d733a8007..c5d3d2be399 100644 --- a/service/glue/api_op_GetCrawlerMetrics.go +++ b/service/glue/api_op_GetCrawlerMetrics.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetCrawlerMetricsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCrawlerMetrics(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationGetCrawlerMetricsMiddlewares(stack *middleware.Stac return nil } -// GetCrawlerMetricsAPIClient is a client that implements the GetCrawlerMetrics -// operation. -type GetCrawlerMetricsAPIClient interface { - GetCrawlerMetrics(context.Context, *GetCrawlerMetricsInput, ...func(*Options)) (*GetCrawlerMetricsOutput, error) -} - -var _ GetCrawlerMetricsAPIClient = (*Client)(nil) - // GetCrawlerMetricsPaginatorOptions is the paginator options for GetCrawlerMetrics type GetCrawlerMetricsPaginatorOptions struct { // The maximum size of a list to return. @@ -206,6 +201,9 @@ func (p *GetCrawlerMetricsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCrawlerMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *GetCrawlerMetricsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetCrawlerMetricsAPIClient is a client that implements the GetCrawlerMetrics +// operation. +type GetCrawlerMetricsAPIClient interface { + GetCrawlerMetrics(context.Context, *GetCrawlerMetricsInput, ...func(*Options)) (*GetCrawlerMetricsOutput, error) +} + +var _ GetCrawlerMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCrawlerMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetCrawlers.go b/service/glue/api_op_GetCrawlers.go index 075be42ec79..23fe25210c2 100644 --- a/service/glue/api_op_GetCrawlers.go +++ b/service/glue/api_op_GetCrawlers.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCrawlersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCrawlers(options.Region), middleware.Before); err != nil { return err } @@ -132,13 +135,6 @@ func (c *Client) addOperationGetCrawlersMiddlewares(stack *middleware.Stack, opt return nil } -// GetCrawlersAPIClient is a client that implements the GetCrawlers operation. -type GetCrawlersAPIClient interface { - GetCrawlers(context.Context, *GetCrawlersInput, ...func(*Options)) (*GetCrawlersOutput, error) -} - -var _ GetCrawlersAPIClient = (*Client)(nil) - // GetCrawlersPaginatorOptions is the paginator options for GetCrawlers type GetCrawlersPaginatorOptions struct { // The number of crawlers to return on each call. @@ -202,6 +198,9 @@ func (p *GetCrawlersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCrawlers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +220,13 @@ func (p *GetCrawlersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetCrawlersAPIClient is a client that implements the GetCrawlers operation. +type GetCrawlersAPIClient interface { + GetCrawlers(context.Context, *GetCrawlersInput, ...func(*Options)) (*GetCrawlersOutput, error) +} + +var _ GetCrawlersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCrawlers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetCustomEntityType.go b/service/glue/api_op_GetCustomEntityType.go index 86513163468..11ec81c58f3 100644 --- a/service/glue/api_op_GetCustomEntityType.go +++ b/service/glue/api_op_GetCustomEntityType.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetCustomEntityTypeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomEntityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDataCatalogEncryptionSettings.go b/service/glue/api_op_GetDataCatalogEncryptionSettings.go index 6801c72c0d4..5b3bf39cb5a 100644 --- a/service/glue/api_op_GetDataCatalogEncryptionSettings.go +++ b/service/glue/api_op_GetDataCatalogEncryptionSettings.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetDataCatalogEncryptionSettingsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataCatalogEncryptionSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_GetDataQualityResult.go b/service/glue/api_op_GetDataQualityResult.go index 3b41a08f037..088237eb923 100644 --- a/service/glue/api_op_GetDataQualityResult.go +++ b/service/glue/api_op_GetDataQualityResult.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetDataQualityResultMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataQualityResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDataQualityRuleRecommendationRun.go b/service/glue/api_op_GetDataQualityRuleRecommendationRun.go index d9d707a6980..b5bde36eca3 100644 --- a/service/glue/api_op_GetDataQualityRuleRecommendationRun.go +++ b/service/glue/api_op_GetDataQualityRuleRecommendationRun.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetDataQualityRuleRecommendationRunMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataQualityRuleRecommendationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDataQualityRuleset.go b/service/glue/api_op_GetDataQualityRuleset.go index 15c10fa53cf..a9b95ee11eb 100644 --- a/service/glue/api_op_GetDataQualityRuleset.go +++ b/service/glue/api_op_GetDataQualityRuleset.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetDataQualityRulesetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataQualityRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDataQualityRulesetEvaluationRun.go b/service/glue/api_op_GetDataQualityRulesetEvaluationRun.go index 5c9b921df03..22d75225942 100644 --- a/service/glue/api_op_GetDataQualityRulesetEvaluationRun.go +++ b/service/glue/api_op_GetDataQualityRulesetEvaluationRun.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetDataQualityRulesetEvaluationRunMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataQualityRulesetEvaluationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDatabase.go b/service/glue/api_op_GetDatabase.go index b185aeb5a4f..d94378c8f8e 100644 --- a/service/glue/api_op_GetDatabase.go +++ b/service/glue/api_op_GetDatabase.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetDatabaseMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDatabases.go b/service/glue/api_op_GetDatabases.go index 1ee746c9a93..cdb3b64eada 100644 --- a/service/glue/api_op_GetDatabases.go +++ b/service/glue/api_op_GetDatabases.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetDatabasesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDatabases(options.Region), middleware.Before); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationGetDatabasesMiddlewares(stack *middleware.Stack, op return nil } -// GetDatabasesAPIClient is a client that implements the GetDatabases operation. -type GetDatabasesAPIClient interface { - GetDatabases(context.Context, *GetDatabasesInput, ...func(*Options)) (*GetDatabasesOutput, error) -} - -var _ GetDatabasesAPIClient = (*Client)(nil) - // GetDatabasesPaginatorOptions is the paginator options for GetDatabases type GetDatabasesPaginatorOptions struct { // The maximum number of databases to return in one response. @@ -220,6 +216,9 @@ func (p *GetDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *GetDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetDatabasesAPIClient is a client that implements the GetDatabases operation. +type GetDatabasesAPIClient interface { + GetDatabases(context.Context, *GetDatabasesInput, ...func(*Options)) (*GetDatabasesOutput, error) +} + +var _ GetDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetDataflowGraph.go b/service/glue/api_op_GetDataflowGraph.go index 63a271f02b9..13d19c09c84 100644 --- a/service/glue/api_op_GetDataflowGraph.go +++ b/service/glue/api_op_GetDataflowGraph.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetDataflowGraphMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataflowGraph(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_GetDevEndpoint.go b/service/glue/api_op_GetDevEndpoint.go index 115f8522850..8c99b68f199 100644 --- a/service/glue/api_op_GetDevEndpoint.go +++ b/service/glue/api_op_GetDevEndpoint.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetDevEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDevEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetDevEndpoints.go b/service/glue/api_op_GetDevEndpoints.go index 9993c0c5729..789466aeee3 100644 --- a/service/glue/api_op_GetDevEndpoints.go +++ b/service/glue/api_op_GetDevEndpoints.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetDevEndpointsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDevEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationGetDevEndpointsMiddlewares(stack *middleware.Stack, return nil } -// GetDevEndpointsAPIClient is a client that implements the GetDevEndpoints -// operation. -type GetDevEndpointsAPIClient interface { - GetDevEndpoints(context.Context, *GetDevEndpointsInput, ...func(*Options)) (*GetDevEndpointsOutput, error) -} - -var _ GetDevEndpointsAPIClient = (*Client)(nil) - // GetDevEndpointsPaginatorOptions is the paginator options for GetDevEndpoints type GetDevEndpointsPaginatorOptions struct { // The maximum size of information to return. @@ -207,6 +202,9 @@ func (p *GetDevEndpointsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDevEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *GetDevEndpointsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetDevEndpointsAPIClient is a client that implements the GetDevEndpoints +// operation. +type GetDevEndpointsAPIClient interface { + GetDevEndpoints(context.Context, *GetDevEndpointsInput, ...func(*Options)) (*GetDevEndpointsOutput, error) +} + +var _ GetDevEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDevEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetJob.go b/service/glue/api_op_GetJob.go index a47a2810828..45cf4affae5 100644 --- a/service/glue/api_op_GetJob.go +++ b/service/glue/api_op_GetJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetJobBookmark.go b/service/glue/api_op_GetJobBookmark.go index dcd8ec15de5..30a57708e6d 100644 --- a/service/glue/api_op_GetJobBookmark.go +++ b/service/glue/api_op_GetJobBookmark.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetJobBookmarkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobBookmarkValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetJobRun.go b/service/glue/api_op_GetJobRun.go index 05b74278f67..f03b3f9affd 100644 --- a/service/glue/api_op_GetJobRun.go +++ b/service/glue/api_op_GetJobRun.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetJobRunMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetJobRuns.go b/service/glue/api_op_GetJobRuns.go index c196ac13b53..3c180b7bb1e 100644 --- a/service/glue/api_op_GetJobRuns.go +++ b/service/glue/api_op_GetJobRuns.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetJobRunsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobRunsValidationMiddleware(stack); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetJobRunsMiddlewares(stack *middleware.Stack, opti return nil } -// GetJobRunsAPIClient is a client that implements the GetJobRuns operation. -type GetJobRunsAPIClient interface { - GetJobRuns(context.Context, *GetJobRunsInput, ...func(*Options)) (*GetJobRunsOutput, error) -} - -var _ GetJobRunsAPIClient = (*Client)(nil) - // GetJobRunsPaginatorOptions is the paginator options for GetJobRuns type GetJobRunsPaginatorOptions struct { // The maximum size of the response. @@ -209,6 +205,9 @@ func (p *GetJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetJobRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *GetJobRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// GetJobRunsAPIClient is a client that implements the GetJobRuns operation. +type GetJobRunsAPIClient interface { + GetJobRuns(context.Context, *GetJobRunsInput, ...func(*Options)) (*GetJobRunsOutput, error) +} + +var _ GetJobRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetJobRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetJobs.go b/service/glue/api_op_GetJobs.go index 80f562de67e..1322950d205 100644 --- a/service/glue/api_op_GetJobs.go +++ b/service/glue/api_op_GetJobs.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetJobsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetJobs(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationGetJobsMiddlewares(stack *middleware.Stack, options return nil } -// GetJobsAPIClient is a client that implements the GetJobs operation. -type GetJobsAPIClient interface { - GetJobs(context.Context, *GetJobsInput, ...func(*Options)) (*GetJobsOutput, error) -} - -var _ GetJobsAPIClient = (*Client)(nil) - // GetJobsPaginatorOptions is the paginator options for GetJobs type GetJobsPaginatorOptions struct { // The maximum size of the response. @@ -201,6 +197,9 @@ func (p *GetJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *GetJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Options return result, nil } +// GetJobsAPIClient is a client that implements the GetJobs operation. +type GetJobsAPIClient interface { + GetJobs(context.Context, *GetJobsInput, ...func(*Options)) (*GetJobsOutput, error) +} + +var _ GetJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetMLTaskRun.go b/service/glue/api_op_GetMLTaskRun.go index 401b82f9bdc..4d6b715fcc5 100644 --- a/service/glue/api_op_GetMLTaskRun.go +++ b/service/glue/api_op_GetMLTaskRun.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetMLTaskRunMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetMLTaskRuns.go b/service/glue/api_op_GetMLTaskRuns.go index e1a8e693490..153dc5891bb 100644 --- a/service/glue/api_op_GetMLTaskRuns.go +++ b/service/glue/api_op_GetMLTaskRuns.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetMLTaskRunsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLTaskRunsValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationGetMLTaskRunsMiddlewares(stack *middleware.Stack, o return nil } -// GetMLTaskRunsAPIClient is a client that implements the GetMLTaskRuns operation. -type GetMLTaskRunsAPIClient interface { - GetMLTaskRuns(context.Context, *GetMLTaskRunsInput, ...func(*Options)) (*GetMLTaskRunsOutput, error) -} - -var _ GetMLTaskRunsAPIClient = (*Client)(nil) - // GetMLTaskRunsPaginatorOptions is the paginator options for GetMLTaskRuns type GetMLTaskRunsPaginatorOptions struct { // The maximum number of results to return. @@ -221,6 +217,9 @@ func (p *GetMLTaskRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMLTaskRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *GetMLTaskRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetMLTaskRunsAPIClient is a client that implements the GetMLTaskRuns operation. +type GetMLTaskRunsAPIClient interface { + GetMLTaskRuns(context.Context, *GetMLTaskRunsInput, ...func(*Options)) (*GetMLTaskRunsOutput, error) +} + +var _ GetMLTaskRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMLTaskRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetMLTransform.go b/service/glue/api_op_GetMLTransform.go index 58351145389..a5d189972fb 100644 --- a/service/glue/api_op_GetMLTransform.go +++ b/service/glue/api_op_GetMLTransform.go @@ -199,6 +199,9 @@ func (c *Client) addOperationGetMLTransformMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLTransformValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetMLTransforms.go b/service/glue/api_op_GetMLTransforms.go index fef13f54cfe..7d40b0886fc 100644 --- a/service/glue/api_op_GetMLTransforms.go +++ b/service/glue/api_op_GetMLTransforms.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetMLTransformsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLTransformsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetMLTransformsMiddlewares(stack *middleware.Stack, return nil } -// GetMLTransformsAPIClient is a client that implements the GetMLTransforms -// operation. -type GetMLTransformsAPIClient interface { - GetMLTransforms(context.Context, *GetMLTransformsInput, ...func(*Options)) (*GetMLTransformsOutput, error) -} - -var _ GetMLTransformsAPIClient = (*Client)(nil) - // GetMLTransformsPaginatorOptions is the paginator options for GetMLTransforms type GetMLTransformsPaginatorOptions struct { // The maximum number of results to return. @@ -217,6 +212,9 @@ func (p *GetMLTransformsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMLTransforms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *GetMLTransformsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetMLTransformsAPIClient is a client that implements the GetMLTransforms +// operation. +type GetMLTransformsAPIClient interface { + GetMLTransforms(context.Context, *GetMLTransformsInput, ...func(*Options)) (*GetMLTransformsOutput, error) +} + +var _ GetMLTransformsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMLTransforms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetMapping.go b/service/glue/api_op_GetMapping.go index 2519289a31c..7ae97b158cc 100644 --- a/service/glue/api_op_GetMapping.go +++ b/service/glue/api_op_GetMapping.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetMappingMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetPartition.go b/service/glue/api_op_GetPartition.go index a25f55cae26..4a853b21499 100644 --- a/service/glue/api_op_GetPartition.go +++ b/service/glue/api_op_GetPartition.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetPartitionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetPartitionIndexes.go b/service/glue/api_op_GetPartitionIndexes.go index 3ac0f930b2f..f82d5c9e5b4 100644 --- a/service/glue/api_op_GetPartitionIndexes.go +++ b/service/glue/api_op_GetPartitionIndexes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetPartitionIndexesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPartitionIndexesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetPartitionIndexesMiddlewares(stack *middleware.St return nil } -// GetPartitionIndexesAPIClient is a client that implements the -// GetPartitionIndexes operation. -type GetPartitionIndexesAPIClient interface { - GetPartitionIndexes(context.Context, *GetPartitionIndexesInput, ...func(*Options)) (*GetPartitionIndexesOutput, error) -} - -var _ GetPartitionIndexesAPIClient = (*Client)(nil) - // GetPartitionIndexesPaginatorOptions is the paginator options for // GetPartitionIndexes type GetPartitionIndexesPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *GetPartitionIndexesPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPartitionIndexes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *GetPartitionIndexesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetPartitionIndexesAPIClient is a client that implements the +// GetPartitionIndexes operation. +type GetPartitionIndexesAPIClient interface { + GetPartitionIndexes(context.Context, *GetPartitionIndexesInput, ...func(*Options)) (*GetPartitionIndexesOutput, error) +} + +var _ GetPartitionIndexesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPartitionIndexes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetPartitions.go b/service/glue/api_op_GetPartitions.go index ff71905bdac..70b307ea14e 100644 --- a/service/glue/api_op_GetPartitions.go +++ b/service/glue/api_op_GetPartitions.go @@ -217,6 +217,9 @@ func (c *Client) addOperationGetPartitionsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPartitionsValidationMiddleware(stack); err != nil { return err } @@ -241,13 +244,6 @@ func (c *Client) addOperationGetPartitionsMiddlewares(stack *middleware.Stack, o return nil } -// GetPartitionsAPIClient is a client that implements the GetPartitions operation. -type GetPartitionsAPIClient interface { - GetPartitions(context.Context, *GetPartitionsInput, ...func(*Options)) (*GetPartitionsOutput, error) -} - -var _ GetPartitionsAPIClient = (*Client)(nil) - // GetPartitionsPaginatorOptions is the paginator options for GetPartitions type GetPartitionsPaginatorOptions struct { // The maximum number of partitions to return in a single response. @@ -311,6 +307,9 @@ func (p *GetPartitionsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPartitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -330,6 +329,13 @@ func (p *GetPartitionsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetPartitionsAPIClient is a client that implements the GetPartitions operation. +type GetPartitionsAPIClient interface { + GetPartitions(context.Context, *GetPartitionsInput, ...func(*Options)) (*GetPartitionsOutput, error) +} + +var _ GetPartitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPartitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetPlan.go b/service/glue/api_op_GetPlan.go index edec98b83dc..f17857c500c 100644 --- a/service/glue/api_op_GetPlan.go +++ b/service/glue/api_op_GetPlan.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetPlanMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetRegistry.go b/service/glue/api_op_GetRegistry.go index 79c928d0eb3..d62a41a4fdb 100644 --- a/service/glue/api_op_GetRegistry.go +++ b/service/glue/api_op_GetRegistry.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetRegistryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetResourcePolicies.go b/service/glue/api_op_GetResourcePolicies.go index 1ea5a275168..71deb65ceda 100644 --- a/service/glue/api_op_GetResourcePolicies.go +++ b/service/glue/api_op_GetResourcePolicies.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicies(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St return nil } -// GetResourcePoliciesAPIClient is a client that implements the -// GetResourcePolicies operation. -type GetResourcePoliciesAPIClient interface { - GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) -} - -var _ GetResourcePoliciesAPIClient = (*Client)(nil) - // GetResourcePoliciesPaginatorOptions is the paginator options for // GetResourcePolicies type GetResourcePoliciesPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetResourcePoliciesAPIClient is a client that implements the +// GetResourcePolicies operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetResourcePolicy.go b/service/glue/api_op_GetResourcePolicy.go index e7b91afea24..1d54023b351 100644 --- a/service/glue/api_op_GetResourcePolicy.go +++ b/service/glue/api_op_GetResourcePolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_GetSchema.go b/service/glue/api_op_GetSchema.go index ca3aaf91af2..e3936b99b93 100644 --- a/service/glue/api_op_GetSchema.go +++ b/service/glue/api_op_GetSchema.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetSchemaMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetSchemaByDefinition.go b/service/glue/api_op_GetSchemaByDefinition.go index d08e044f4aa..66c151aef3f 100644 --- a/service/glue/api_op_GetSchemaByDefinition.go +++ b/service/glue/api_op_GetSchemaByDefinition.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetSchemaByDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaByDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetSchemaVersion.go b/service/glue/api_op_GetSchemaVersion.go index e51c86b1f66..110adb929ff 100644 --- a/service/glue/api_op_GetSchemaVersion.go +++ b/service/glue/api_op_GetSchemaVersion.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetSchemaVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSchemaVersion(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_GetSchemaVersionsDiff.go b/service/glue/api_op_GetSchemaVersionsDiff.go index 0d8690e4de6..1e567a6b32e 100644 --- a/service/glue/api_op_GetSchemaVersionsDiff.go +++ b/service/glue/api_op_GetSchemaVersionsDiff.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetSchemaVersionsDiffMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaVersionsDiffValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetSecurityConfiguration.go b/service/glue/api_op_GetSecurityConfiguration.go index 4747a5e7b40..ac3a399d509 100644 --- a/service/glue/api_op_GetSecurityConfiguration.go +++ b/service/glue/api_op_GetSecurityConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetSecurityConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSecurityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetSecurityConfigurations.go b/service/glue/api_op_GetSecurityConfigurations.go index 7bd02e98707..a22b8d79266 100644 --- a/service/glue/api_op_GetSecurityConfigurations.go +++ b/service/glue/api_op_GetSecurityConfigurations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSecurityConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSecurityConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationGetSecurityConfigurationsMiddlewares(stack *middlew return nil } -// GetSecurityConfigurationsAPIClient is a client that implements the -// GetSecurityConfigurations operation. -type GetSecurityConfigurationsAPIClient interface { - GetSecurityConfigurations(context.Context, *GetSecurityConfigurationsInput, ...func(*Options)) (*GetSecurityConfigurationsOutput, error) -} - -var _ GetSecurityConfigurationsAPIClient = (*Client)(nil) - // GetSecurityConfigurationsPaginatorOptions is the paginator options for // GetSecurityConfigurations type GetSecurityConfigurationsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *GetSecurityConfigurationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSecurityConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *GetSecurityConfigurationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// GetSecurityConfigurationsAPIClient is a client that implements the +// GetSecurityConfigurations operation. +type GetSecurityConfigurationsAPIClient interface { + GetSecurityConfigurations(context.Context, *GetSecurityConfigurationsInput, ...func(*Options)) (*GetSecurityConfigurationsOutput, error) +} + +var _ GetSecurityConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSecurityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetSession.go b/service/glue/api_op_GetSession.go index 303c7fc16b3..68966c56368 100644 --- a/service/glue/api_op_GetSession.go +++ b/service/glue/api_op_GetSession.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetStatement.go b/service/glue/api_op_GetStatement.go index 6c6f9e1eca9..6ead6341137 100644 --- a/service/glue/api_op_GetStatement.go +++ b/service/glue/api_op_GetStatement.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetStatementMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetTable.go b/service/glue/api_op_GetTable.go index 20d63c08dbc..a14b3d70466 100644 --- a/service/glue/api_op_GetTable.go +++ b/service/glue/api_op_GetTable.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetTableMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetTableOptimizer.go b/service/glue/api_op_GetTableOptimizer.go index 106b4530365..197a279aaac 100644 --- a/service/glue/api_op_GetTableOptimizer.go +++ b/service/glue/api_op_GetTableOptimizer.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetTableOptimizerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableOptimizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetTableVersion.go b/service/glue/api_op_GetTableVersion.go index e12341caab9..ff72d4473f5 100644 --- a/service/glue/api_op_GetTableVersion.go +++ b/service/glue/api_op_GetTableVersion.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetTableVersionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetTableVersions.go b/service/glue/api_op_GetTableVersions.go index fdc8bde06b4..5eed55ce2cb 100644 --- a/service/glue/api_op_GetTableVersions.go +++ b/service/glue/api_op_GetTableVersions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetTableVersionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableVersionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetTableVersionsMiddlewares(stack *middleware.Stack return nil } -// GetTableVersionsAPIClient is a client that implements the GetTableVersions -// operation. -type GetTableVersionsAPIClient interface { - GetTableVersions(context.Context, *GetTableVersionsInput, ...func(*Options)) (*GetTableVersionsOutput, error) -} - -var _ GetTableVersionsAPIClient = (*Client)(nil) - // GetTableVersionsPaginatorOptions is the paginator options for GetTableVersions type GetTableVersionsPaginatorOptions struct { // The maximum number of table versions to return in one response. @@ -222,6 +217,9 @@ func (p *GetTableVersionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTableVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetTableVersionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetTableVersionsAPIClient is a client that implements the GetTableVersions +// operation. +type GetTableVersionsAPIClient interface { + GetTableVersions(context.Context, *GetTableVersionsInput, ...func(*Options)) (*GetTableVersionsOutput, error) +} + +var _ GetTableVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTableVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetTables.go b/service/glue/api_op_GetTables.go index 9858cf34845..92475554053 100644 --- a/service/glue/api_op_GetTables.go +++ b/service/glue/api_op_GetTables.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetTablesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTablesValidationMiddleware(stack); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationGetTablesMiddlewares(stack *middleware.Stack, optio return nil } -// GetTablesAPIClient is a client that implements the GetTables operation. -type GetTablesAPIClient interface { - GetTables(context.Context, *GetTablesInput, ...func(*Options)) (*GetTablesOutput, error) -} - -var _ GetTablesAPIClient = (*Client)(nil) - // GetTablesPaginatorOptions is the paginator options for GetTables type GetTablesPaginatorOptions struct { // The maximum number of tables to return in a single response. @@ -227,6 +223,9 @@ func (p *GetTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *GetTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// GetTablesAPIClient is a client that implements the GetTables operation. +type GetTablesAPIClient interface { + GetTables(context.Context, *GetTablesInput, ...func(*Options)) (*GetTablesOutput, error) +} + +var _ GetTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetTags.go b/service/glue/api_op_GetTags.go index 48c10a6aa1a..b304b7db2fc 100644 --- a/service/glue/api_op_GetTags.go +++ b/service/glue/api_op_GetTags.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetTrigger.go b/service/glue/api_op_GetTrigger.go index ba92958fe0d..3b17ce4c8ec 100644 --- a/service/glue/api_op_GetTrigger.go +++ b/service/glue/api_op_GetTrigger.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetTriggerMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTriggerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetTriggers.go b/service/glue/api_op_GetTriggers.go index d89c96ee16b..f64527cfc59 100644 --- a/service/glue/api_op_GetTriggers.go +++ b/service/glue/api_op_GetTriggers.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetTriggersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTriggers(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationGetTriggersMiddlewares(stack *middleware.Stack, opt return nil } -// GetTriggersAPIClient is a client that implements the GetTriggers operation. -type GetTriggersAPIClient interface { - GetTriggers(context.Context, *GetTriggersInput, ...func(*Options)) (*GetTriggersOutput, error) -} - -var _ GetTriggersAPIClient = (*Client)(nil) - // GetTriggersPaginatorOptions is the paginator options for GetTriggers type GetTriggersPaginatorOptions struct { // The maximum size of the response. @@ -205,6 +201,9 @@ func (p *GetTriggersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTriggers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *GetTriggersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetTriggersAPIClient is a client that implements the GetTriggers operation. +type GetTriggersAPIClient interface { + GetTriggers(context.Context, *GetTriggersInput, ...func(*Options)) (*GetTriggersOutput, error) +} + +var _ GetTriggersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTriggers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetUnfilteredPartitionMetadata.go b/service/glue/api_op_GetUnfilteredPartitionMetadata.go index 823ff838059..ef0a1e55f9e 100644 --- a/service/glue/api_op_GetUnfilteredPartitionMetadata.go +++ b/service/glue/api_op_GetUnfilteredPartitionMetadata.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetUnfilteredPartitionMetadataMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUnfilteredPartitionMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetUnfilteredPartitionsMetadata.go b/service/glue/api_op_GetUnfilteredPartitionsMetadata.go index a45fbcd492e..c746eb8911a 100644 --- a/service/glue/api_op_GetUnfilteredPartitionsMetadata.go +++ b/service/glue/api_op_GetUnfilteredPartitionsMetadata.go @@ -219,6 +219,9 @@ func (c *Client) addOperationGetUnfilteredPartitionsMetadataMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUnfilteredPartitionsMetadataValidationMiddleware(stack); err != nil { return err } @@ -243,14 +246,6 @@ func (c *Client) addOperationGetUnfilteredPartitionsMetadataMiddlewares(stack *m return nil } -// GetUnfilteredPartitionsMetadataAPIClient is a client that implements the -// GetUnfilteredPartitionsMetadata operation. -type GetUnfilteredPartitionsMetadataAPIClient interface { - GetUnfilteredPartitionsMetadata(context.Context, *GetUnfilteredPartitionsMetadataInput, ...func(*Options)) (*GetUnfilteredPartitionsMetadataOutput, error) -} - -var _ GetUnfilteredPartitionsMetadataAPIClient = (*Client)(nil) - // GetUnfilteredPartitionsMetadataPaginatorOptions is the paginator options for // GetUnfilteredPartitionsMetadata type GetUnfilteredPartitionsMetadataPaginatorOptions struct { @@ -317,6 +312,9 @@ func (p *GetUnfilteredPartitionsMetadataPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUnfilteredPartitionsMetadata(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -336,6 +334,14 @@ func (p *GetUnfilteredPartitionsMetadataPaginator) NextPage(ctx context.Context, return result, nil } +// GetUnfilteredPartitionsMetadataAPIClient is a client that implements the +// GetUnfilteredPartitionsMetadata operation. +type GetUnfilteredPartitionsMetadataAPIClient interface { + GetUnfilteredPartitionsMetadata(context.Context, *GetUnfilteredPartitionsMetadataInput, ...func(*Options)) (*GetUnfilteredPartitionsMetadataOutput, error) +} + +var _ GetUnfilteredPartitionsMetadataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUnfilteredPartitionsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetUnfilteredTableMetadata.go b/service/glue/api_op_GetUnfilteredTableMetadata.go index 4cc1cb9c617..4aaff4417c0 100644 --- a/service/glue/api_op_GetUnfilteredTableMetadata.go +++ b/service/glue/api_op_GetUnfilteredTableMetadata.go @@ -216,6 +216,9 @@ func (c *Client) addOperationGetUnfilteredTableMetadataMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUnfilteredTableMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetUsageProfile.go b/service/glue/api_op_GetUsageProfile.go index 8fe65797db1..8132d3cac75 100644 --- a/service/glue/api_op_GetUsageProfile.go +++ b/service/glue/api_op_GetUsageProfile.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetUsageProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsageProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetUserDefinedFunction.go b/service/glue/api_op_GetUserDefinedFunction.go index e5ddb61ecbd..06244855e02 100644 --- a/service/glue/api_op_GetUserDefinedFunction.go +++ b/service/glue/api_op_GetUserDefinedFunction.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetUserDefinedFunctionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserDefinedFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetUserDefinedFunctions.go b/service/glue/api_op_GetUserDefinedFunctions.go index b0656cc90e0..f86230ae965 100644 --- a/service/glue/api_op_GetUserDefinedFunctions.go +++ b/service/glue/api_op_GetUserDefinedFunctions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetUserDefinedFunctionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserDefinedFunctionsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetUserDefinedFunctionsMiddlewares(stack *middlewar return nil } -// GetUserDefinedFunctionsAPIClient is a client that implements the -// GetUserDefinedFunctions operation. -type GetUserDefinedFunctionsAPIClient interface { - GetUserDefinedFunctions(context.Context, *GetUserDefinedFunctionsInput, ...func(*Options)) (*GetUserDefinedFunctionsOutput, error) -} - -var _ GetUserDefinedFunctionsAPIClient = (*Client)(nil) - // GetUserDefinedFunctionsPaginatorOptions is the paginator options for // GetUserDefinedFunctions type GetUserDefinedFunctionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *GetUserDefinedFunctionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUserDefinedFunctions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetUserDefinedFunctionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetUserDefinedFunctionsAPIClient is a client that implements the +// GetUserDefinedFunctions operation. +type GetUserDefinedFunctionsAPIClient interface { + GetUserDefinedFunctions(context.Context, *GetUserDefinedFunctionsInput, ...func(*Options)) (*GetUserDefinedFunctionsOutput, error) +} + +var _ GetUserDefinedFunctionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUserDefinedFunctions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_GetWorkflow.go b/service/glue/api_op_GetWorkflow.go index c3500fcf847..21a525c5706 100644 --- a/service/glue/api_op_GetWorkflow.go +++ b/service/glue/api_op_GetWorkflow.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetWorkflowRun.go b/service/glue/api_op_GetWorkflowRun.go index d08be2e6be8..4ef9a3e9eb9 100644 --- a/service/glue/api_op_GetWorkflowRun.go +++ b/service/glue/api_op_GetWorkflowRun.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetWorkflowRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetWorkflowRunProperties.go b/service/glue/api_op_GetWorkflowRunProperties.go index 7a8a9852362..19b5240f264 100644 --- a/service/glue/api_op_GetWorkflowRunProperties.go +++ b/service/glue/api_op_GetWorkflowRunProperties.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetWorkflowRunPropertiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowRunPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_GetWorkflowRuns.go b/service/glue/api_op_GetWorkflowRuns.go index 08300400434..200a9c02a60 100644 --- a/service/glue/api_op_GetWorkflowRuns.go +++ b/service/glue/api_op_GetWorkflowRuns.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetWorkflowRunsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowRunsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetWorkflowRunsMiddlewares(stack *middleware.Stack, return nil } -// GetWorkflowRunsAPIClient is a client that implements the GetWorkflowRuns -// operation. -type GetWorkflowRunsAPIClient interface { - GetWorkflowRuns(context.Context, *GetWorkflowRunsInput, ...func(*Options)) (*GetWorkflowRunsOutput, error) -} - -var _ GetWorkflowRunsAPIClient = (*Client)(nil) - // GetWorkflowRunsPaginatorOptions is the paginator options for GetWorkflowRuns type GetWorkflowRunsPaginatorOptions struct { // The maximum number of workflow runs to be included in the response. @@ -213,6 +208,9 @@ func (p *GetWorkflowRunsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetWorkflowRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *GetWorkflowRunsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetWorkflowRunsAPIClient is a client that implements the GetWorkflowRuns +// operation. +type GetWorkflowRunsAPIClient interface { + GetWorkflowRuns(context.Context, *GetWorkflowRunsInput, ...func(*Options)) (*GetWorkflowRunsOutput, error) +} + +var _ GetWorkflowRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetWorkflowRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ImportCatalogToGlue.go b/service/glue/api_op_ImportCatalogToGlue.go index 653bef820d3..e0c2eca74da 100644 --- a/service/glue/api_op_ImportCatalogToGlue.go +++ b/service/glue/api_op_ImportCatalogToGlue.go @@ -100,6 +100,9 @@ func (c *Client) addOperationImportCatalogToGlueMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportCatalogToGlue(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_ListBlueprints.go b/service/glue/api_op_ListBlueprints.go index 46e24b32f7c..7d8d2be0dd7 100644 --- a/service/glue/api_op_ListBlueprints.go +++ b/service/glue/api_op_ListBlueprints.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListBlueprintsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBlueprints(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListBlueprintsMiddlewares(stack *middleware.Stack, return nil } -// ListBlueprintsAPIClient is a client that implements the ListBlueprints -// operation. -type ListBlueprintsAPIClient interface { - ListBlueprints(context.Context, *ListBlueprintsInput, ...func(*Options)) (*ListBlueprintsOutput, error) -} - -var _ ListBlueprintsAPIClient = (*Client)(nil) - // ListBlueprintsPaginatorOptions is the paginator options for ListBlueprints type ListBlueprintsPaginatorOptions struct { // The maximum size of a list to return. @@ -204,6 +199,9 @@ func (p *ListBlueprintsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBlueprints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListBlueprintsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListBlueprintsAPIClient is a client that implements the ListBlueprints +// operation. +type ListBlueprintsAPIClient interface { + ListBlueprints(context.Context, *ListBlueprintsInput, ...func(*Options)) (*ListBlueprintsOutput, error) +} + +var _ ListBlueprintsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBlueprints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListColumnStatisticsTaskRuns.go b/service/glue/api_op_ListColumnStatisticsTaskRuns.go index 03a3e1fa7b8..4a233b8ad15 100644 --- a/service/glue/api_op_ListColumnStatisticsTaskRuns.go +++ b/service/glue/api_op_ListColumnStatisticsTaskRuns.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListColumnStatisticsTaskRunsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListColumnStatisticsTaskRuns(options.Region), middleware.Before); err != nil { return err } @@ -130,14 +133,6 @@ func (c *Client) addOperationListColumnStatisticsTaskRunsMiddlewares(stack *midd return nil } -// ListColumnStatisticsTaskRunsAPIClient is a client that implements the -// ListColumnStatisticsTaskRuns operation. -type ListColumnStatisticsTaskRunsAPIClient interface { - ListColumnStatisticsTaskRuns(context.Context, *ListColumnStatisticsTaskRunsInput, ...func(*Options)) (*ListColumnStatisticsTaskRunsOutput, error) -} - -var _ ListColumnStatisticsTaskRunsAPIClient = (*Client)(nil) - // ListColumnStatisticsTaskRunsPaginatorOptions is the paginator options for // ListColumnStatisticsTaskRuns type ListColumnStatisticsTaskRunsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListColumnStatisticsTaskRunsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListColumnStatisticsTaskRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListColumnStatisticsTaskRunsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListColumnStatisticsTaskRunsAPIClient is a client that implements the +// ListColumnStatisticsTaskRuns operation. +type ListColumnStatisticsTaskRunsAPIClient interface { + ListColumnStatisticsTaskRuns(context.Context, *ListColumnStatisticsTaskRunsInput, ...func(*Options)) (*ListColumnStatisticsTaskRunsOutput, error) +} + +var _ ListColumnStatisticsTaskRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListColumnStatisticsTaskRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListCrawlers.go b/service/glue/api_op_ListCrawlers.go index d14c69f221c..a90fefe09a1 100644 --- a/service/glue/api_op_ListCrawlers.go +++ b/service/glue/api_op_ListCrawlers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListCrawlersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCrawlers(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListCrawlersMiddlewares(stack *middleware.Stack, op return nil } -// ListCrawlersAPIClient is a client that implements the ListCrawlers operation. -type ListCrawlersAPIClient interface { - ListCrawlers(context.Context, *ListCrawlersInput, ...func(*Options)) (*ListCrawlersOutput, error) -} - -var _ ListCrawlersAPIClient = (*Client)(nil) - // ListCrawlersPaginatorOptions is the paginator options for ListCrawlers type ListCrawlersPaginatorOptions struct { // The maximum size of a list to return. @@ -211,6 +207,9 @@ func (p *ListCrawlersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCrawlers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListCrawlersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListCrawlersAPIClient is a client that implements the ListCrawlers operation. +type ListCrawlersAPIClient interface { + ListCrawlers(context.Context, *ListCrawlersInput, ...func(*Options)) (*ListCrawlersOutput, error) +} + +var _ ListCrawlersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCrawlers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListCrawls.go b/service/glue/api_op_ListCrawls.go index 87b3833fc73..873be7367b5 100644 --- a/service/glue/api_op_ListCrawls.go +++ b/service/glue/api_op_ListCrawls.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListCrawlsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCrawlsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_ListCustomEntityTypes.go b/service/glue/api_op_ListCustomEntityTypes.go index 70435faaa25..6fcf8c90dab 100644 --- a/service/glue/api_op_ListCustomEntityTypes.go +++ b/service/glue/api_op_ListCustomEntityTypes.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListCustomEntityTypesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomEntityTypes(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListCustomEntityTypesMiddlewares(stack *middleware. return nil } -// ListCustomEntityTypesAPIClient is a client that implements the -// ListCustomEntityTypes operation. -type ListCustomEntityTypesAPIClient interface { - ListCustomEntityTypes(context.Context, *ListCustomEntityTypesInput, ...func(*Options)) (*ListCustomEntityTypesOutput, error) -} - -var _ ListCustomEntityTypesAPIClient = (*Client)(nil) - // ListCustomEntityTypesPaginatorOptions is the paginator options for // ListCustomEntityTypes type ListCustomEntityTypesPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListCustomEntityTypesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomEntityTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListCustomEntityTypesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListCustomEntityTypesAPIClient is a client that implements the +// ListCustomEntityTypes operation. +type ListCustomEntityTypesAPIClient interface { + ListCustomEntityTypes(context.Context, *ListCustomEntityTypesInput, ...func(*Options)) (*ListCustomEntityTypesOutput, error) +} + +var _ ListCustomEntityTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomEntityTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListDataQualityResults.go b/service/glue/api_op_ListDataQualityResults.go index 9d219c98f31..b008f4e0a14 100644 --- a/service/glue/api_op_ListDataQualityResults.go +++ b/service/glue/api_op_ListDataQualityResults.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDataQualityResultsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataQualityResultsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListDataQualityResultsMiddlewares(stack *middleware return nil } -// ListDataQualityResultsAPIClient is a client that implements the -// ListDataQualityResults operation. -type ListDataQualityResultsAPIClient interface { - ListDataQualityResults(context.Context, *ListDataQualityResultsInput, ...func(*Options)) (*ListDataQualityResultsOutput, error) -} - -var _ ListDataQualityResultsAPIClient = (*Client)(nil) - // ListDataQualityResultsPaginatorOptions is the paginator options for // ListDataQualityResults type ListDataQualityResultsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListDataQualityResultsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataQualityResults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListDataQualityResultsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDataQualityResultsAPIClient is a client that implements the +// ListDataQualityResults operation. +type ListDataQualityResultsAPIClient interface { + ListDataQualityResults(context.Context, *ListDataQualityResultsInput, ...func(*Options)) (*ListDataQualityResultsOutput, error) +} + +var _ ListDataQualityResultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataQualityResults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListDataQualityRuleRecommendationRuns.go b/service/glue/api_op_ListDataQualityRuleRecommendationRuns.go index 4f1095d14f1..12b511bbaaf 100644 --- a/service/glue/api_op_ListDataQualityRuleRecommendationRuns.go +++ b/service/glue/api_op_ListDataQualityRuleRecommendationRuns.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDataQualityRuleRecommendationRunsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataQualityRuleRecommendationRunsValidationMiddleware(stack); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListDataQualityRuleRecommendationRunsMiddlewares(st return nil } -// ListDataQualityRuleRecommendationRunsAPIClient is a client that implements the -// ListDataQualityRuleRecommendationRuns operation. -type ListDataQualityRuleRecommendationRunsAPIClient interface { - ListDataQualityRuleRecommendationRuns(context.Context, *ListDataQualityRuleRecommendationRunsInput, ...func(*Options)) (*ListDataQualityRuleRecommendationRunsOutput, error) -} - -var _ ListDataQualityRuleRecommendationRunsAPIClient = (*Client)(nil) - // ListDataQualityRuleRecommendationRunsPaginatorOptions is the paginator options // for ListDataQualityRuleRecommendationRuns type ListDataQualityRuleRecommendationRunsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListDataQualityRuleRecommendationRunsPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataQualityRuleRecommendationRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListDataQualityRuleRecommendationRunsPaginator) NextPage(ctx context.Co return result, nil } +// ListDataQualityRuleRecommendationRunsAPIClient is a client that implements the +// ListDataQualityRuleRecommendationRuns operation. +type ListDataQualityRuleRecommendationRunsAPIClient interface { + ListDataQualityRuleRecommendationRuns(context.Context, *ListDataQualityRuleRecommendationRunsInput, ...func(*Options)) (*ListDataQualityRuleRecommendationRunsOutput, error) +} + +var _ ListDataQualityRuleRecommendationRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataQualityRuleRecommendationRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListDataQualityRulesetEvaluationRuns.go b/service/glue/api_op_ListDataQualityRulesetEvaluationRuns.go index 300d134e924..a33ea74fda4 100644 --- a/service/glue/api_op_ListDataQualityRulesetEvaluationRuns.go +++ b/service/glue/api_op_ListDataQualityRulesetEvaluationRuns.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDataQualityRulesetEvaluationRunsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataQualityRulesetEvaluationRunsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListDataQualityRulesetEvaluationRunsMiddlewares(sta return nil } -// ListDataQualityRulesetEvaluationRunsAPIClient is a client that implements the -// ListDataQualityRulesetEvaluationRuns operation. -type ListDataQualityRulesetEvaluationRunsAPIClient interface { - ListDataQualityRulesetEvaluationRuns(context.Context, *ListDataQualityRulesetEvaluationRunsInput, ...func(*Options)) (*ListDataQualityRulesetEvaluationRunsOutput, error) -} - -var _ ListDataQualityRulesetEvaluationRunsAPIClient = (*Client)(nil) - // ListDataQualityRulesetEvaluationRunsPaginatorOptions is the paginator options // for ListDataQualityRulesetEvaluationRuns type ListDataQualityRulesetEvaluationRunsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListDataQualityRulesetEvaluationRunsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataQualityRulesetEvaluationRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListDataQualityRulesetEvaluationRunsPaginator) NextPage(ctx context.Con return result, nil } +// ListDataQualityRulesetEvaluationRunsAPIClient is a client that implements the +// ListDataQualityRulesetEvaluationRuns operation. +type ListDataQualityRulesetEvaluationRunsAPIClient interface { + ListDataQualityRulesetEvaluationRuns(context.Context, *ListDataQualityRulesetEvaluationRunsInput, ...func(*Options)) (*ListDataQualityRulesetEvaluationRunsOutput, error) +} + +var _ ListDataQualityRulesetEvaluationRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataQualityRulesetEvaluationRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListDataQualityRulesets.go b/service/glue/api_op_ListDataQualityRulesets.go index 442ff15d4dd..25591db243c 100644 --- a/service/glue/api_op_ListDataQualityRulesets.go +++ b/service/glue/api_op_ListDataQualityRulesets.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListDataQualityRulesetsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataQualityRulesetsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDataQualityRulesetsMiddlewares(stack *middlewar return nil } -// ListDataQualityRulesetsAPIClient is a client that implements the -// ListDataQualityRulesets operation. -type ListDataQualityRulesetsAPIClient interface { - ListDataQualityRulesets(context.Context, *ListDataQualityRulesetsInput, ...func(*Options)) (*ListDataQualityRulesetsOutput, error) -} - -var _ ListDataQualityRulesetsAPIClient = (*Client)(nil) - // ListDataQualityRulesetsPaginatorOptions is the paginator options for // ListDataQualityRulesets type ListDataQualityRulesetsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListDataQualityRulesetsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataQualityRulesets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListDataQualityRulesetsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDataQualityRulesetsAPIClient is a client that implements the +// ListDataQualityRulesets operation. +type ListDataQualityRulesetsAPIClient interface { + ListDataQualityRulesets(context.Context, *ListDataQualityRulesetsInput, ...func(*Options)) (*ListDataQualityRulesetsOutput, error) +} + +var _ ListDataQualityRulesetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataQualityRulesets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListDevEndpoints.go b/service/glue/api_op_ListDevEndpoints.go index c1e5bf438cb..6684d38092b 100644 --- a/service/glue/api_op_ListDevEndpoints.go +++ b/service/glue/api_op_ListDevEndpoints.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDevEndpointsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListDevEndpointsMiddlewares(stack *middleware.Stack return nil } -// ListDevEndpointsAPIClient is a client that implements the ListDevEndpoints -// operation. -type ListDevEndpointsAPIClient interface { - ListDevEndpoints(context.Context, *ListDevEndpointsInput, ...func(*Options)) (*ListDevEndpointsOutput, error) -} - -var _ ListDevEndpointsAPIClient = (*Client)(nil) - // ListDevEndpointsPaginatorOptions is the paginator options for ListDevEndpoints type ListDevEndpointsPaginatorOptions struct { // The maximum size of a list to return. @@ -212,6 +207,9 @@ func (p *ListDevEndpointsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListDevEndpointsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListDevEndpointsAPIClient is a client that implements the ListDevEndpoints +// operation. +type ListDevEndpointsAPIClient interface { + ListDevEndpoints(context.Context, *ListDevEndpointsInput, ...func(*Options)) (*ListDevEndpointsOutput, error) +} + +var _ ListDevEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListJobs.go b/service/glue/api_op_ListJobs.go index 679fd5bde63..22d33082086 100644 --- a/service/glue/api_op_ListJobs.go +++ b/service/glue/api_op_ListJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum size of a list to return. @@ -210,6 +206,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListMLTransforms.go b/service/glue/api_op_ListMLTransforms.go index dbedb2aeba0..c2e7680c4ea 100644 --- a/service/glue/api_op_ListMLTransforms.go +++ b/service/glue/api_op_ListMLTransforms.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListMLTransformsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMLTransformsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListMLTransformsMiddlewares(stack *middleware.Stack return nil } -// ListMLTransformsAPIClient is a client that implements the ListMLTransforms -// operation. -type ListMLTransformsAPIClient interface { - ListMLTransforms(context.Context, *ListMLTransformsInput, ...func(*Options)) (*ListMLTransformsOutput, error) -} - -var _ ListMLTransformsAPIClient = (*Client)(nil) - // ListMLTransformsPaginatorOptions is the paginator options for ListMLTransforms type ListMLTransformsPaginatorOptions struct { // The maximum size of a list to return. @@ -224,6 +219,9 @@ func (p *ListMLTransformsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMLTransforms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListMLTransformsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListMLTransformsAPIClient is a client that implements the ListMLTransforms +// operation. +type ListMLTransformsAPIClient interface { + ListMLTransforms(context.Context, *ListMLTransformsInput, ...func(*Options)) (*ListMLTransformsOutput, error) +} + +var _ ListMLTransformsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMLTransforms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListRegistries.go b/service/glue/api_op_ListRegistries.go index 0b7add60231..e994857c35e 100644 --- a/service/glue/api_op_ListRegistries.go +++ b/service/glue/api_op_ListRegistries.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListRegistriesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegistries(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListRegistriesMiddlewares(stack *middleware.Stack, return nil } -// ListRegistriesAPIClient is a client that implements the ListRegistries -// operation. -type ListRegistriesAPIClient interface { - ListRegistries(context.Context, *ListRegistriesInput, ...func(*Options)) (*ListRegistriesOutput, error) -} - -var _ ListRegistriesAPIClient = (*Client)(nil) - // ListRegistriesPaginatorOptions is the paginator options for ListRegistries type ListRegistriesPaginatorOptions struct { // Maximum number of results required per page. If the value is not supplied, this @@ -208,6 +203,9 @@ func (p *ListRegistriesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRegistries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListRegistriesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListRegistriesAPIClient is a client that implements the ListRegistries +// operation. +type ListRegistriesAPIClient interface { + ListRegistries(context.Context, *ListRegistriesInput, ...func(*Options)) (*ListRegistriesOutput, error) +} + +var _ ListRegistriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRegistries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListSchemaVersions.go b/service/glue/api_op_ListSchemaVersions.go index 910a1b8d86a..efed3b81933 100644 --- a/service/glue/api_op_ListSchemaVersions.go +++ b/service/glue/api_op_ListSchemaVersions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListSchemaVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSchemaVersionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListSchemaVersionsMiddlewares(stack *middleware.Sta return nil } -// ListSchemaVersionsAPIClient is a client that implements the ListSchemaVersions -// operation. -type ListSchemaVersionsAPIClient interface { - ListSchemaVersions(context.Context, *ListSchemaVersionsInput, ...func(*Options)) (*ListSchemaVersionsOutput, error) -} - -var _ ListSchemaVersionsAPIClient = (*Client)(nil) - // ListSchemaVersionsPaginatorOptions is the paginator options for // ListSchemaVersions type ListSchemaVersionsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListSchemaVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemaVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListSchemaVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSchemaVersionsAPIClient is a client that implements the ListSchemaVersions +// operation. +type ListSchemaVersionsAPIClient interface { + ListSchemaVersions(context.Context, *ListSchemaVersionsInput, ...func(*Options)) (*ListSchemaVersionsOutput, error) +} + +var _ ListSchemaVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemaVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListSchemas.go b/service/glue/api_op_ListSchemas.go index f51bab4f4da..b19544dd242 100644 --- a/service/glue/api_op_ListSchemas.go +++ b/service/glue/api_op_ListSchemas.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchemas(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt return nil } -// ListSchemasAPIClient is a client that implements the ListSchemas operation. -type ListSchemasAPIClient interface { - ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) -} - -var _ ListSchemasAPIClient = (*Client)(nil) - // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { // Maximum number of results required per page. If the value is not supplied, this @@ -213,6 +209,9 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSchemasAPIClient is a client that implements the ListSchemas operation. +type ListSchemasAPIClient interface { + ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) +} + +var _ ListSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListSessions.go b/service/glue/api_op_ListSessions.go index b43b4254298..87902c3b518 100644 --- a/service/glue/api_op_ListSessions.go +++ b/service/glue/api_op_ListSessions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSessions(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListSessionsMiddlewares(stack *middleware.Stack, op return nil } -// ListSessionsAPIClient is a client that implements the ListSessions operation. -type ListSessionsAPIClient interface { - ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) -} - -var _ ListSessionsAPIClient = (*Client)(nil) - // ListSessionsPaginatorOptions is the paginator options for ListSessions type ListSessionsPaginatorOptions struct { // The maximum number of results. @@ -210,6 +206,9 @@ func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSessionsAPIClient is a client that implements the ListSessions operation. +type ListSessionsAPIClient interface { + ListSessions(context.Context, *ListSessionsInput, ...func(*Options)) (*ListSessionsOutput, error) +} + +var _ ListSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListStatements.go b/service/glue/api_op_ListStatements.go index 105fe247b38..eeae7ee3ea6 100644 --- a/service/glue/api_op_ListStatements.go +++ b/service/glue/api_op_ListStatements.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListStatementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStatementsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_ListTableOptimizerRuns.go b/service/glue/api_op_ListTableOptimizerRuns.go index 03a98ea572e..f4921bb74ec 100644 --- a/service/glue/api_op_ListTableOptimizerRuns.go +++ b/service/glue/api_op_ListTableOptimizerRuns.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListTableOptimizerRunsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTableOptimizerRunsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListTableOptimizerRunsMiddlewares(stack *middleware return nil } -// ListTableOptimizerRunsAPIClient is a client that implements the -// ListTableOptimizerRuns operation. -type ListTableOptimizerRunsAPIClient interface { - ListTableOptimizerRuns(context.Context, *ListTableOptimizerRunsInput, ...func(*Options)) (*ListTableOptimizerRunsOutput, error) -} - -var _ ListTableOptimizerRunsAPIClient = (*Client)(nil) - // ListTableOptimizerRunsPaginatorOptions is the paginator options for // ListTableOptimizerRuns type ListTableOptimizerRunsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListTableOptimizerRunsPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTableOptimizerRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListTableOptimizerRunsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListTableOptimizerRunsAPIClient is a client that implements the +// ListTableOptimizerRuns operation. +type ListTableOptimizerRunsAPIClient interface { + ListTableOptimizerRuns(context.Context, *ListTableOptimizerRunsInput, ...func(*Options)) (*ListTableOptimizerRunsOutput, error) +} + +var _ ListTableOptimizerRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTableOptimizerRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListTriggers.go b/service/glue/api_op_ListTriggers.go index 4a3ca02fe60..df48625682a 100644 --- a/service/glue/api_op_ListTriggers.go +++ b/service/glue/api_op_ListTriggers.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTriggersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTriggers(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListTriggersMiddlewares(stack *middleware.Stack, op return nil } -// ListTriggersAPIClient is a client that implements the ListTriggers operation. -type ListTriggersAPIClient interface { - ListTriggers(context.Context, *ListTriggersInput, ...func(*Options)) (*ListTriggersOutput, error) -} - -var _ ListTriggersAPIClient = (*Client)(nil) - // ListTriggersPaginatorOptions is the paginator options for ListTriggers type ListTriggersPaginatorOptions struct { // The maximum size of a list to return. @@ -215,6 +211,9 @@ func (p *ListTriggersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTriggers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListTriggersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListTriggersAPIClient is a client that implements the ListTriggers operation. +type ListTriggersAPIClient interface { + ListTriggers(context.Context, *ListTriggersInput, ...func(*Options)) (*ListTriggersOutput, error) +} + +var _ ListTriggersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTriggers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListUsageProfiles.go b/service/glue/api_op_ListUsageProfiles.go index da1a754a0ee..ecd8febf105 100644 --- a/service/glue/api_op_ListUsageProfiles.go +++ b/service/glue/api_op_ListUsageProfiles.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListUsageProfilesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsageProfiles(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListUsageProfilesMiddlewares(stack *middleware.Stac return nil } -// ListUsageProfilesAPIClient is a client that implements the ListUsageProfiles -// operation. -type ListUsageProfilesAPIClient interface { - ListUsageProfiles(context.Context, *ListUsageProfilesInput, ...func(*Options)) (*ListUsageProfilesOutput, error) -} - -var _ ListUsageProfilesAPIClient = (*Client)(nil) - // ListUsageProfilesPaginatorOptions is the paginator options for ListUsageProfiles type ListUsageProfilesPaginatorOptions struct { // The maximum number of usage profiles to return in a single response. @@ -202,6 +197,9 @@ func (p *ListUsageProfilesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsageProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListUsageProfilesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListUsageProfilesAPIClient is a client that implements the ListUsageProfiles +// operation. +type ListUsageProfilesAPIClient interface { + ListUsageProfiles(context.Context, *ListUsageProfilesInput, ...func(*Options)) (*ListUsageProfilesOutput, error) +} + +var _ ListUsageProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsageProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_ListWorkflows.go b/service/glue/api_op_ListWorkflows.go index 765e4ee2ba9..bec3ead19fe 100644 --- a/service/glue/api_op_ListWorkflows.go +++ b/service/glue/api_op_ListWorkflows.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkflows(options.Region), middleware.Before); err != nil { return err } @@ -130,13 +133,6 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. -type ListWorkflowsAPIClient interface { - ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) -} - -var _ ListWorkflowsAPIClient = (*Client)(nil) - // ListWorkflowsPaginatorOptions is the paginator options for ListWorkflows type ListWorkflowsPaginatorOptions struct { // The maximum size of a list to return. @@ -200,6 +196,9 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +218,13 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. +type ListWorkflowsAPIClient interface { + ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) +} + +var _ ListWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_PutDataCatalogEncryptionSettings.go b/service/glue/api_op_PutDataCatalogEncryptionSettings.go index cb504c589d4..ea72289f340 100644 --- a/service/glue/api_op_PutDataCatalogEncryptionSettings.go +++ b/service/glue/api_op_PutDataCatalogEncryptionSettings.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPutDataCatalogEncryptionSettingsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDataCatalogEncryptionSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_PutResourcePolicy.go b/service/glue/api_op_PutResourcePolicy.go index 181583a05b1..c2690033563 100644 --- a/service/glue/api_op_PutResourcePolicy.go +++ b/service/glue/api_op_PutResourcePolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_PutSchemaVersionMetadata.go b/service/glue/api_op_PutSchemaVersionMetadata.go index 5fd90b79654..a7cff48b750 100644 --- a/service/glue/api_op_PutSchemaVersionMetadata.go +++ b/service/glue/api_op_PutSchemaVersionMetadata.go @@ -138,6 +138,9 @@ func (c *Client) addOperationPutSchemaVersionMetadataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSchemaVersionMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_PutWorkflowRunProperties.go b/service/glue/api_op_PutWorkflowRunProperties.go index 9bf3c7aec0b..0f1de49262a 100644 --- a/service/glue/api_op_PutWorkflowRunProperties.go +++ b/service/glue/api_op_PutWorkflowRunProperties.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutWorkflowRunPropertiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutWorkflowRunPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_QuerySchemaVersionMetadata.go b/service/glue/api_op_QuerySchemaVersionMetadata.go index 8fe1113d091..bff80134290 100644 --- a/service/glue/api_op_QuerySchemaVersionMetadata.go +++ b/service/glue/api_op_QuerySchemaVersionMetadata.go @@ -129,6 +129,9 @@ func (c *Client) addOperationQuerySchemaVersionMetadataMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQuerySchemaVersionMetadata(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_RegisterSchemaVersion.go b/service/glue/api_op_RegisterSchemaVersion.go index aeca9117a61..5bd94b37b5b 100644 --- a/service/glue/api_op_RegisterSchemaVersion.go +++ b/service/glue/api_op_RegisterSchemaVersion.go @@ -137,6 +137,9 @@ func (c *Client) addOperationRegisterSchemaVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterSchemaVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_RemoveSchemaVersionMetadata.go b/service/glue/api_op_RemoveSchemaVersionMetadata.go index 7a2f24dd23b..a6a070c30cb 100644 --- a/service/glue/api_op_RemoveSchemaVersionMetadata.go +++ b/service/glue/api_op_RemoveSchemaVersionMetadata.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRemoveSchemaVersionMetadataMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveSchemaVersionMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_ResetJobBookmark.go b/service/glue/api_op_ResetJobBookmark.go index 3f2ba0db8e8..9a1eaa4e681 100644 --- a/service/glue/api_op_ResetJobBookmark.go +++ b/service/glue/api_op_ResetJobBookmark.go @@ -121,6 +121,9 @@ func (c *Client) addOperationResetJobBookmarkMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetJobBookmarkValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_ResumeWorkflowRun.go b/service/glue/api_op_ResumeWorkflowRun.go index fab4950c44b..5025f78653b 100644 --- a/service/glue/api_op_ResumeWorkflowRun.go +++ b/service/glue/api_op_ResumeWorkflowRun.go @@ -122,6 +122,9 @@ func (c *Client) addOperationResumeWorkflowRunMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeWorkflowRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_RunStatement.go b/service/glue/api_op_RunStatement.go index c21265fecbd..19a990a2148 100644 --- a/service/glue/api_op_RunStatement.go +++ b/service/glue/api_op_RunStatement.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRunStatementMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRunStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_SearchTables.go b/service/glue/api_op_SearchTables.go index 6b286b7e0cd..ffb2a6eec1c 100644 --- a/service/glue/api_op_SearchTables.go +++ b/service/glue/api_op_SearchTables.go @@ -154,6 +154,9 @@ func (c *Client) addOperationSearchTablesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchTables(options.Region), middleware.Before); err != nil { return err } @@ -175,13 +178,6 @@ func (c *Client) addOperationSearchTablesMiddlewares(stack *middleware.Stack, op return nil } -// SearchTablesAPIClient is a client that implements the SearchTables operation. -type SearchTablesAPIClient interface { - SearchTables(context.Context, *SearchTablesInput, ...func(*Options)) (*SearchTablesOutput, error) -} - -var _ SearchTablesAPIClient = (*Client)(nil) - // SearchTablesPaginatorOptions is the paginator options for SearchTables type SearchTablesPaginatorOptions struct { // The maximum number of tables to return in a single response. @@ -245,6 +241,9 @@ func (p *SearchTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +263,13 @@ func (p *SearchTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// SearchTablesAPIClient is a client that implements the SearchTables operation. +type SearchTablesAPIClient interface { + SearchTables(context.Context, *SearchTablesInput, ...func(*Options)) (*SearchTablesOutput, error) +} + +var _ SearchTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/glue/api_op_StartBlueprintRun.go b/service/glue/api_op_StartBlueprintRun.go index 7798be62297..36ad995784c 100644 --- a/service/glue/api_op_StartBlueprintRun.go +++ b/service/glue/api_op_StartBlueprintRun.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartBlueprintRunMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBlueprintRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartColumnStatisticsTaskRun.go b/service/glue/api_op_StartColumnStatisticsTaskRun.go index e0d379de7b9..e6d34b3a97e 100644 --- a/service/glue/api_op_StartColumnStatisticsTaskRun.go +++ b/service/glue/api_op_StartColumnStatisticsTaskRun.go @@ -131,6 +131,9 @@ func (c *Client) addOperationStartColumnStatisticsTaskRunMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartColumnStatisticsTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartCrawler.go b/service/glue/api_op_StartCrawler.go index e460866b9ee..295fffc7a4f 100644 --- a/service/glue/api_op_StartCrawler.go +++ b/service/glue/api_op_StartCrawler.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStartCrawlerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCrawlerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartCrawlerSchedule.go b/service/glue/api_op_StartCrawlerSchedule.go index 32ffaf0356e..521db9fe53f 100644 --- a/service/glue/api_op_StartCrawlerSchedule.go +++ b/service/glue/api_op_StartCrawlerSchedule.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStartCrawlerScheduleMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCrawlerScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartDataQualityRuleRecommendationRun.go b/service/glue/api_op_StartDataQualityRuleRecommendationRun.go index b235e99b9ca..4b2c09d3561 100644 --- a/service/glue/api_op_StartDataQualityRuleRecommendationRun.go +++ b/service/glue/api_op_StartDataQualityRuleRecommendationRun.go @@ -131,6 +131,9 @@ func (c *Client) addOperationStartDataQualityRuleRecommendationRunMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDataQualityRuleRecommendationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartDataQualityRulesetEvaluationRun.go b/service/glue/api_op_StartDataQualityRulesetEvaluationRun.go index c6940730206..8f29fbde6fd 100644 --- a/service/glue/api_op_StartDataQualityRulesetEvaluationRun.go +++ b/service/glue/api_op_StartDataQualityRulesetEvaluationRun.go @@ -138,6 +138,9 @@ func (c *Client) addOperationStartDataQualityRulesetEvaluationRunMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDataQualityRulesetEvaluationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartExportLabelsTaskRun.go b/service/glue/api_op_StartExportLabelsTaskRun.go index cfda347d91f..ff2036932c3 100644 --- a/service/glue/api_op_StartExportLabelsTaskRun.go +++ b/service/glue/api_op_StartExportLabelsTaskRun.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStartExportLabelsTaskRunMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExportLabelsTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartImportLabelsTaskRun.go b/service/glue/api_op_StartImportLabelsTaskRun.go index fbdc2364db1..e84152bf6fe 100644 --- a/service/glue/api_op_StartImportLabelsTaskRun.go +++ b/service/glue/api_op_StartImportLabelsTaskRun.go @@ -140,6 +140,9 @@ func (c *Client) addOperationStartImportLabelsTaskRunMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImportLabelsTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartJobRun.go b/service/glue/api_op_StartJobRun.go index 892f26fca93..df10feba07d 100644 --- a/service/glue/api_op_StartJobRun.go +++ b/service/glue/api_op_StartJobRun.go @@ -244,6 +244,9 @@ func (c *Client) addOperationStartJobRunMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartJobRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartMLEvaluationTaskRun.go b/service/glue/api_op_StartMLEvaluationTaskRun.go index 3cdf336c4b8..51a541e78f2 100644 --- a/service/glue/api_op_StartMLEvaluationTaskRun.go +++ b/service/glue/api_op_StartMLEvaluationTaskRun.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStartMLEvaluationTaskRunMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMLEvaluationTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartMLLabelingSetGenerationTaskRun.go b/service/glue/api_op_StartMLLabelingSetGenerationTaskRun.go index eab2479c388..614f22b2e23 100644 --- a/service/glue/api_op_StartMLLabelingSetGenerationTaskRun.go +++ b/service/glue/api_op_StartMLLabelingSetGenerationTaskRun.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStartMLLabelingSetGenerationTaskRunMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMLLabelingSetGenerationTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartTrigger.go b/service/glue/api_op_StartTrigger.go index ea15702eae4..997485be4ce 100644 --- a/service/glue/api_op_StartTrigger.go +++ b/service/glue/api_op_StartTrigger.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartTriggerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTriggerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StartWorkflowRun.go b/service/glue/api_op_StartWorkflowRun.go index 1bd707608fe..0ff986b7a55 100644 --- a/service/glue/api_op_StartWorkflowRun.go +++ b/service/glue/api_op_StartWorkflowRun.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartWorkflowRunMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartWorkflowRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StopColumnStatisticsTaskRun.go b/service/glue/api_op_StopColumnStatisticsTaskRun.go index 23396195657..4464e226959 100644 --- a/service/glue/api_op_StopColumnStatisticsTaskRun.go +++ b/service/glue/api_op_StopColumnStatisticsTaskRun.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopColumnStatisticsTaskRunMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopColumnStatisticsTaskRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StopCrawler.go b/service/glue/api_op_StopCrawler.go index 3f22bb54beb..fc5dfae71eb 100644 --- a/service/glue/api_op_StopCrawler.go +++ b/service/glue/api_op_StopCrawler.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopCrawlerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCrawlerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StopCrawlerSchedule.go b/service/glue/api_op_StopCrawlerSchedule.go index 112979894db..4aca447f328 100644 --- a/service/glue/api_op_StopCrawlerSchedule.go +++ b/service/glue/api_op_StopCrawlerSchedule.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStopCrawlerScheduleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCrawlerScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StopSession.go b/service/glue/api_op_StopSession.go index 64eb152240c..715409ed8ca 100644 --- a/service/glue/api_op_StopSession.go +++ b/service/glue/api_op_StopSession.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopSessionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StopTrigger.go b/service/glue/api_op_StopTrigger.go index 47db06ceb92..849fc33d3fd 100644 --- a/service/glue/api_op_StopTrigger.go +++ b/service/glue/api_op_StopTrigger.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopTriggerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTriggerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_StopWorkflowRun.go b/service/glue/api_op_StopWorkflowRun.go index ae53ea6455a..bc58a4328fa 100644 --- a/service/glue/api_op_StopWorkflowRun.go +++ b/service/glue/api_op_StopWorkflowRun.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopWorkflowRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopWorkflowRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_TagResource.go b/service/glue/api_op_TagResource.go index 9d0918d48f9..975f590ed50 100644 --- a/service/glue/api_op_TagResource.go +++ b/service/glue/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UntagResource.go b/service/glue/api_op_UntagResource.go index b9ae738b4b3..32dc13875c9 100644 --- a/service/glue/api_op_UntagResource.go +++ b/service/glue/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateBlueprint.go b/service/glue/api_op_UpdateBlueprint.go index 5edc4219ad3..d3d46b922f3 100644 --- a/service/glue/api_op_UpdateBlueprint.go +++ b/service/glue/api_op_UpdateBlueprint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateBlueprintMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBlueprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateClassifier.go b/service/glue/api_op_UpdateClassifier.go index 5d895f81087..cda7fd09532 100644 --- a/service/glue/api_op_UpdateClassifier.go +++ b/service/glue/api_op_UpdateClassifier.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateClassifierMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClassifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateColumnStatisticsForPartition.go b/service/glue/api_op_UpdateColumnStatisticsForPartition.go index 6b6273fe9d0..d2974fcbb33 100644 --- a/service/glue/api_op_UpdateColumnStatisticsForPartition.go +++ b/service/glue/api_op_UpdateColumnStatisticsForPartition.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateColumnStatisticsForPartitionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateColumnStatisticsForPartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateColumnStatisticsForTable.go b/service/glue/api_op_UpdateColumnStatisticsForTable.go index fe1e85421d1..471ed5be61b 100644 --- a/service/glue/api_op_UpdateColumnStatisticsForTable.go +++ b/service/glue/api_op_UpdateColumnStatisticsForTable.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateColumnStatisticsForTableMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateColumnStatisticsForTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateConnection.go b/service/glue/api_op_UpdateConnection.go index b4c0879431a..4a553190176 100644 --- a/service/glue/api_op_UpdateConnection.go +++ b/service/glue/api_op_UpdateConnection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateCrawler.go b/service/glue/api_op_UpdateCrawler.go index e2b2dcbdc07..dc3f0d1eaa6 100644 --- a/service/glue/api_op_UpdateCrawler.go +++ b/service/glue/api_op_UpdateCrawler.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateCrawlerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCrawlerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateCrawlerSchedule.go b/service/glue/api_op_UpdateCrawlerSchedule.go index b1fa151c692..ec03997a920 100644 --- a/service/glue/api_op_UpdateCrawlerSchedule.go +++ b/service/glue/api_op_UpdateCrawlerSchedule.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateCrawlerScheduleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCrawlerScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateDataQualityRuleset.go b/service/glue/api_op_UpdateDataQualityRuleset.go index 8ad4c3ec1be..bc6040b719d 100644 --- a/service/glue/api_op_UpdateDataQualityRuleset.go +++ b/service/glue/api_op_UpdateDataQualityRuleset.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateDataQualityRulesetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataQualityRulesetValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateDatabase.go b/service/glue/api_op_UpdateDatabase.go index 5d1e4906a52..0b752f3cbef 100644 --- a/service/glue/api_op_UpdateDatabase.go +++ b/service/glue/api_op_UpdateDatabase.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateDatabaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateDevEndpoint.go b/service/glue/api_op_UpdateDevEndpoint.go index fba4c70af99..2929db86a56 100644 --- a/service/glue/api_op_UpdateDevEndpoint.go +++ b/service/glue/api_op_UpdateDevEndpoint.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateDevEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDevEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateJob.go b/service/glue/api_op_UpdateJob.go index aa833c4f6f1..11f6700b533 100644 --- a/service/glue/api_op_UpdateJob.go +++ b/service/glue/api_op_UpdateJob.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateJobFromSourceControl.go b/service/glue/api_op_UpdateJobFromSourceControl.go index 0ec01ba27b0..bd7ad516366 100644 --- a/service/glue/api_op_UpdateJobFromSourceControl.go +++ b/service/glue/api_op_UpdateJobFromSourceControl.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateJobFromSourceControlMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateJobFromSourceControl(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_UpdateMLTransform.go b/service/glue/api_op_UpdateMLTransform.go index 535fa2972cb..4f51a10f2a5 100644 --- a/service/glue/api_op_UpdateMLTransform.go +++ b/service/glue/api_op_UpdateMLTransform.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateMLTransformMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMLTransformValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdatePartition.go b/service/glue/api_op_UpdatePartition.go index c0be54e8401..d841fb9b352 100644 --- a/service/glue/api_op_UpdatePartition.go +++ b/service/glue/api_op_UpdatePartition.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdatePartitionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePartitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateRegistry.go b/service/glue/api_op_UpdateRegistry.go index aa97f6946a7..a5e71e47353 100644 --- a/service/glue/api_op_UpdateRegistry.go +++ b/service/glue/api_op_UpdateRegistry.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateRegistryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateSchema.go b/service/glue/api_op_UpdateSchema.go index a66e5faee0b..680bab7258f 100644 --- a/service/glue/api_op_UpdateSchema.go +++ b/service/glue/api_op_UpdateSchema.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateSourceControlFromJob.go b/service/glue/api_op_UpdateSourceControlFromJob.go index 7e377e2d7f8..cf3a2565bb9 100644 --- a/service/glue/api_op_UpdateSourceControlFromJob.go +++ b/service/glue/api_op_UpdateSourceControlFromJob.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateSourceControlFromJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSourceControlFromJob(options.Region), middleware.Before); err != nil { return err } diff --git a/service/glue/api_op_UpdateTable.go b/service/glue/api_op_UpdateTable.go index 5010abc9e6a..eaca24cbf49 100644 --- a/service/glue/api_op_UpdateTable.go +++ b/service/glue/api_op_UpdateTable.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateTableOptimizer.go b/service/glue/api_op_UpdateTableOptimizer.go index 93664de30c2..c7641fbd915 100644 --- a/service/glue/api_op_UpdateTableOptimizer.go +++ b/service/glue/api_op_UpdateTableOptimizer.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateTableOptimizerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableOptimizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateTrigger.go b/service/glue/api_op_UpdateTrigger.go index 630d7294c12..a11ffe1a8d0 100644 --- a/service/glue/api_op_UpdateTrigger.go +++ b/service/glue/api_op_UpdateTrigger.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateTriggerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTriggerValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateUsageProfile.go b/service/glue/api_op_UpdateUsageProfile.go index abcae22b879..9a0d8430538 100644 --- a/service/glue/api_op_UpdateUsageProfile.go +++ b/service/glue/api_op_UpdateUsageProfile.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateUsageProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUsageProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateUserDefinedFunction.go b/service/glue/api_op_UpdateUserDefinedFunction.go index 83c74b195ad..3720938bc8a 100644 --- a/service/glue/api_op_UpdateUserDefinedFunction.go +++ b/service/glue/api_op_UpdateUserDefinedFunction.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateUserDefinedFunctionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserDefinedFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/glue/api_op_UpdateWorkflow.go b/service/glue/api_op_UpdateWorkflow.go index c829a69f184..918128071c8 100644 --- a/service/glue/api_op_UpdateWorkflow.go +++ b/service/glue/api_op_UpdateWorkflow.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_client.go b/service/grafana/api_client.go index dfb125eddee..cf3696ccd41 100644 --- a/service/grafana/api_client.go +++ b/service/grafana/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/grafana/api_op_AssociateLicense.go b/service/grafana/api_op_AssociateLicense.go index 31063028915..130c6156f00 100644 --- a/service/grafana/api_op_AssociateLicense.go +++ b/service/grafana/api_op_AssociateLicense.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAssociateLicenseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_CreateWorkspace.go b/service/grafana/api_op_CreateWorkspace.go index a2eb0e5aefd..2bdc87d7d9d 100644 --- a/service/grafana/api_op_CreateWorkspace.go +++ b/service/grafana/api_op_CreateWorkspace.go @@ -226,6 +226,9 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorkspaceMiddleware(stack, options); err != nil { return err } diff --git a/service/grafana/api_op_CreateWorkspaceApiKey.go b/service/grafana/api_op_CreateWorkspaceApiKey.go index 6f2596db7ca..176c889d96b 100644 --- a/service/grafana/api_op_CreateWorkspaceApiKey.go +++ b/service/grafana/api_op_CreateWorkspaceApiKey.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateWorkspaceApiKeyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkspaceApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_CreateWorkspaceServiceAccount.go b/service/grafana/api_op_CreateWorkspaceServiceAccount.go index fb1b7696a84..2f8b94030d3 100644 --- a/service/grafana/api_op_CreateWorkspaceServiceAccount.go +++ b/service/grafana/api_op_CreateWorkspaceServiceAccount.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateWorkspaceServiceAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkspaceServiceAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_CreateWorkspaceServiceAccountToken.go b/service/grafana/api_op_CreateWorkspaceServiceAccountToken.go index fdac3088c2f..a8564a72ed1 100644 --- a/service/grafana/api_op_CreateWorkspaceServiceAccountToken.go +++ b/service/grafana/api_op_CreateWorkspaceServiceAccountToken.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateWorkspaceServiceAccountTokenMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkspaceServiceAccountTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DeleteWorkspace.go b/service/grafana/api_op_DeleteWorkspace.go index d14dbe327ee..3168d7389f8 100644 --- a/service/grafana/api_op_DeleteWorkspace.go +++ b/service/grafana/api_op_DeleteWorkspace.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DeleteWorkspaceApiKey.go b/service/grafana/api_op_DeleteWorkspaceApiKey.go index 6ec23650e52..73d4af88387 100644 --- a/service/grafana/api_op_DeleteWorkspaceApiKey.go +++ b/service/grafana/api_op_DeleteWorkspaceApiKey.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteWorkspaceApiKeyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkspaceApiKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DeleteWorkspaceServiceAccount.go b/service/grafana/api_op_DeleteWorkspaceServiceAccount.go index 7e94a2b1c18..6a6753feaa5 100644 --- a/service/grafana/api_op_DeleteWorkspaceServiceAccount.go +++ b/service/grafana/api_op_DeleteWorkspaceServiceAccount.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteWorkspaceServiceAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkspaceServiceAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DeleteWorkspaceServiceAccountToken.go b/service/grafana/api_op_DeleteWorkspaceServiceAccountToken.go index 9ccaad8dd0d..4a007631adf 100644 --- a/service/grafana/api_op_DeleteWorkspaceServiceAccountToken.go +++ b/service/grafana/api_op_DeleteWorkspaceServiceAccountToken.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteWorkspaceServiceAccountTokenMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkspaceServiceAccountTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DescribeWorkspace.go b/service/grafana/api_op_DescribeWorkspace.go index 3437ff65e76..3e05230a818 100644 --- a/service/grafana/api_op_DescribeWorkspace.go +++ b/service/grafana/api_op_DescribeWorkspace.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeWorkspaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DescribeWorkspaceAuthentication.go b/service/grafana/api_op_DescribeWorkspaceAuthentication.go index 2f2cf5e01ca..1976e51e33e 100644 --- a/service/grafana/api_op_DescribeWorkspaceAuthentication.go +++ b/service/grafana/api_op_DescribeWorkspaceAuthentication.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeWorkspaceAuthenticationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceAuthenticationValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DescribeWorkspaceConfiguration.go b/service/grafana/api_op_DescribeWorkspaceConfiguration.go index 454313e6266..da0fec2accf 100644 --- a/service/grafana/api_op_DescribeWorkspaceConfiguration.go +++ b/service/grafana/api_op_DescribeWorkspaceConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeWorkspaceConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_DisassociateLicense.go b/service/grafana/api_op_DisassociateLicense.go index 0dd154ccb0f..b1b27976113 100644 --- a/service/grafana/api_op_DisassociateLicense.go +++ b/service/grafana/api_op_DisassociateLicense.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociateLicenseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_ListPermissions.go b/service/grafana/api_op_ListPermissions.go index 6235961465c..ba0d1db7c2a 100644 --- a/service/grafana/api_op_ListPermissions.go +++ b/service/grafana/api_op_ListPermissions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, return nil } -// ListPermissionsAPIClient is a client that implements the ListPermissions -// operation. -type ListPermissionsAPIClient interface { - ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) -} - -var _ ListPermissionsAPIClient = (*Client)(nil) - // ListPermissionsPaginatorOptions is the paginator options for ListPermissions type ListPermissionsPaginatorOptions struct { // The maximum number of results to include in the response. @@ -229,6 +224,9 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListPermissionsAPIClient is a client that implements the ListPermissions +// operation. +type ListPermissionsAPIClient interface { + ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) +} + +var _ ListPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/grafana/api_op_ListTagsForResource.go b/service/grafana/api_op_ListTagsForResource.go index 877ea29ad27..0d8f5bd3920 100644 --- a/service/grafana/api_op_ListTagsForResource.go +++ b/service/grafana/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_ListVersions.go b/service/grafana/api_op_ListVersions.go index 14ea53ad8de..550ba2ea5d1 100644 --- a/service/grafana/api_op_ListVersions.go +++ b/service/grafana/api_op_ListVersions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListVersionsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVersions(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListVersionsMiddlewares(stack *middleware.Stack, op return nil } -// ListVersionsAPIClient is a client that implements the ListVersions operation. -type ListVersionsAPIClient interface { - ListVersions(context.Context, *ListVersionsInput, ...func(*Options)) (*ListVersionsOutput, error) -} - -var _ ListVersionsAPIClient = (*Client)(nil) - // ListVersionsPaginatorOptions is the paginator options for ListVersions type ListVersionsPaginatorOptions struct { // The maximum number of results to include in the response. @@ -209,6 +205,9 @@ func (p *ListVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListVersionsAPIClient is a client that implements the ListVersions operation. +type ListVersionsAPIClient interface { + ListVersions(context.Context, *ListVersionsInput, ...func(*Options)) (*ListVersionsOutput, error) +} + +var _ ListVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/grafana/api_op_ListWorkspaceServiceAccountTokens.go b/service/grafana/api_op_ListWorkspaceServiceAccountTokens.go index 132760966bf..a3b5f72e767 100644 --- a/service/grafana/api_op_ListWorkspaceServiceAccountTokens.go +++ b/service/grafana/api_op_ListWorkspaceServiceAccountTokens.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListWorkspaceServiceAccountTokensMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkspaceServiceAccountTokensValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListWorkspaceServiceAccountTokensMiddlewares(stack return nil } -// ListWorkspaceServiceAccountTokensAPIClient is a client that implements the -// ListWorkspaceServiceAccountTokens operation. -type ListWorkspaceServiceAccountTokensAPIClient interface { - ListWorkspaceServiceAccountTokens(context.Context, *ListWorkspaceServiceAccountTokensInput, ...func(*Options)) (*ListWorkspaceServiceAccountTokensOutput, error) -} - -var _ ListWorkspaceServiceAccountTokensAPIClient = (*Client)(nil) - // ListWorkspaceServiceAccountTokensPaginatorOptions is the paginator options for // ListWorkspaceServiceAccountTokens type ListWorkspaceServiceAccountTokensPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListWorkspaceServiceAccountTokensPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkspaceServiceAccountTokens(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListWorkspaceServiceAccountTokensPaginator) NextPage(ctx context.Contex return result, nil } +// ListWorkspaceServiceAccountTokensAPIClient is a client that implements the +// ListWorkspaceServiceAccountTokens operation. +type ListWorkspaceServiceAccountTokensAPIClient interface { + ListWorkspaceServiceAccountTokens(context.Context, *ListWorkspaceServiceAccountTokensInput, ...func(*Options)) (*ListWorkspaceServiceAccountTokensOutput, error) +} + +var _ ListWorkspaceServiceAccountTokensAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkspaceServiceAccountTokens(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/grafana/api_op_ListWorkspaceServiceAccounts.go b/service/grafana/api_op_ListWorkspaceServiceAccounts.go index 524df50cf2e..7c1f6d366dd 100644 --- a/service/grafana/api_op_ListWorkspaceServiceAccounts.go +++ b/service/grafana/api_op_ListWorkspaceServiceAccounts.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListWorkspaceServiceAccountsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkspaceServiceAccountsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListWorkspaceServiceAccountsMiddlewares(stack *midd return nil } -// ListWorkspaceServiceAccountsAPIClient is a client that implements the -// ListWorkspaceServiceAccounts operation. -type ListWorkspaceServiceAccountsAPIClient interface { - ListWorkspaceServiceAccounts(context.Context, *ListWorkspaceServiceAccountsInput, ...func(*Options)) (*ListWorkspaceServiceAccountsOutput, error) -} - -var _ ListWorkspaceServiceAccountsAPIClient = (*Client)(nil) - // ListWorkspaceServiceAccountsPaginatorOptions is the paginator options for // ListWorkspaceServiceAccounts type ListWorkspaceServiceAccountsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListWorkspaceServiceAccountsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkspaceServiceAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListWorkspaceServiceAccountsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListWorkspaceServiceAccountsAPIClient is a client that implements the +// ListWorkspaceServiceAccounts operation. +type ListWorkspaceServiceAccountsAPIClient interface { + ListWorkspaceServiceAccounts(context.Context, *ListWorkspaceServiceAccountsInput, ...func(*Options)) (*ListWorkspaceServiceAccountsOutput, error) +} + +var _ ListWorkspaceServiceAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkspaceServiceAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/grafana/api_op_ListWorkspaces.go b/service/grafana/api_op_ListWorkspaces.go index 2f226a05a56..d1c9815f517 100644 --- a/service/grafana/api_op_ListWorkspaces.go +++ b/service/grafana/api_op_ListWorkspaces.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListWorkspacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkspaces(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListWorkspacesMiddlewares(stack *middleware.Stack, return nil } -// ListWorkspacesAPIClient is a client that implements the ListWorkspaces -// operation. -type ListWorkspacesAPIClient interface { - ListWorkspaces(context.Context, *ListWorkspacesInput, ...func(*Options)) (*ListWorkspacesOutput, error) -} - -var _ ListWorkspacesAPIClient = (*Client)(nil) - // ListWorkspacesPaginatorOptions is the paginator options for ListWorkspaces type ListWorkspacesPaginatorOptions struct { // The maximum number of workspaces to include in the results. @@ -210,6 +205,9 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkspaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListWorkspacesAPIClient is a client that implements the ListWorkspaces +// operation. +type ListWorkspacesAPIClient interface { + ListWorkspaces(context.Context, *ListWorkspacesInput, ...func(*Options)) (*ListWorkspacesOutput, error) +} + +var _ ListWorkspacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/grafana/api_op_TagResource.go b/service/grafana/api_op_TagResource.go index 08fd529a91e..3bf95ae28a5 100644 --- a/service/grafana/api_op_TagResource.go +++ b/service/grafana/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_UntagResource.go b/service/grafana/api_op_UntagResource.go index e31e958ac75..9bcb235ebf8 100644 --- a/service/grafana/api_op_UntagResource.go +++ b/service/grafana/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_UpdatePermissions.go b/service/grafana/api_op_UpdatePermissions.go index e7f17da5714..b7da2178dfe 100644 --- a/service/grafana/api_op_UpdatePermissions.go +++ b/service/grafana/api_op_UpdatePermissions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdatePermissionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_UpdateWorkspace.go b/service/grafana/api_op_UpdateWorkspace.go index b413ed7feba..c1cbfa76f94 100644 --- a/service/grafana/api_op_UpdateWorkspace.go +++ b/service/grafana/api_op_UpdateWorkspace.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdateWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_UpdateWorkspaceAuthentication.go b/service/grafana/api_op_UpdateWorkspaceAuthentication.go index ae0be7fe710..361d490e89e 100644 --- a/service/grafana/api_op_UpdateWorkspaceAuthentication.go +++ b/service/grafana/api_op_UpdateWorkspaceAuthentication.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateWorkspaceAuthenticationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkspaceAuthenticationValidationMiddleware(stack); err != nil { return err } diff --git a/service/grafana/api_op_UpdateWorkspaceConfiguration.go b/service/grafana/api_op_UpdateWorkspaceConfiguration.go index b2dcbda1b20..3592ea162e3 100644 --- a/service/grafana/api_op_UpdateWorkspaceConfiguration.go +++ b/service/grafana/api_op_UpdateWorkspaceConfiguration.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateWorkspaceConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkspaceConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_client.go b/service/greengrass/api_client.go index bb375c022b3..a2ad4697c58 100644 --- a/service/greengrass/api_client.go +++ b/service/greengrass/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/greengrass/api_op_AssociateRoleToGroup.go b/service/greengrass/api_op_AssociateRoleToGroup.go index c12db52ff89..7bbb75bb7ae 100644 --- a/service/greengrass/api_op_AssociateRoleToGroup.go +++ b/service/greengrass/api_op_AssociateRoleToGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssociateRoleToGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateRoleToGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_AssociateServiceRoleToAccount.go b/service/greengrass/api_op_AssociateServiceRoleToAccount.go index e08b2abe17e..c11ab4b34d1 100644 --- a/service/greengrass/api_op_AssociateServiceRoleToAccount.go +++ b/service/greengrass/api_op_AssociateServiceRoleToAccount.go @@ -108,6 +108,9 @@ func (c *Client) addOperationAssociateServiceRoleToAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateServiceRoleToAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateConnectorDefinition.go b/service/greengrass/api_op_CreateConnectorDefinition.go index 40ddc3529ef..923ee510597 100644 --- a/service/greengrass/api_op_CreateConnectorDefinition.go +++ b/service/greengrass/api_op_CreateConnectorDefinition.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateConnectorDefinitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectorDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateConnectorDefinitionVersion.go b/service/greengrass/api_op_CreateConnectorDefinitionVersion.go index 3028caa97fa..058f9c971b8 100644 --- a/service/greengrass/api_op_CreateConnectorDefinitionVersion.go +++ b/service/greengrass/api_op_CreateConnectorDefinitionVersion.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateConnectorDefinitionVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectorDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateCoreDefinition.go b/service/greengrass/api_op_CreateCoreDefinition.go index 29aab8b086a..522013ea4e8 100644 --- a/service/greengrass/api_op_CreateCoreDefinition.go +++ b/service/greengrass/api_op_CreateCoreDefinition.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateCoreDefinitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCoreDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateCoreDefinitionVersion.go b/service/greengrass/api_op_CreateCoreDefinitionVersion.go index 051611b8d3d..fff1679839c 100644 --- a/service/greengrass/api_op_CreateCoreDefinitionVersion.go +++ b/service/greengrass/api_op_CreateCoreDefinitionVersion.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateCoreDefinitionVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCoreDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateDeployment.go b/service/greengrass/api_op_CreateDeployment.go index 225bcc1d694..089ac1a8e2b 100644 --- a/service/greengrass/api_op_CreateDeployment.go +++ b/service/greengrass/api_op_CreateDeployment.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateDeviceDefinition.go b/service/greengrass/api_op_CreateDeviceDefinition.go index c9d0d86011b..34185ba4bfd 100644 --- a/service/greengrass/api_op_CreateDeviceDefinition.go +++ b/service/greengrass/api_op_CreateDeviceDefinition.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateDeviceDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeviceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateDeviceDefinitionVersion.go b/service/greengrass/api_op_CreateDeviceDefinitionVersion.go index 16768390bd4..cc79b28b786 100644 --- a/service/greengrass/api_op_CreateDeviceDefinitionVersion.go +++ b/service/greengrass/api_op_CreateDeviceDefinitionVersion.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateDeviceDefinitionVersionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeviceDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateFunctionDefinition.go b/service/greengrass/api_op_CreateFunctionDefinition.go index 62b1013d63a..f98916e9de9 100644 --- a/service/greengrass/api_op_CreateFunctionDefinition.go +++ b/service/greengrass/api_op_CreateFunctionDefinition.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateFunctionDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFunctionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateFunctionDefinitionVersion.go b/service/greengrass/api_op_CreateFunctionDefinitionVersion.go index 0dcdd19be0c..61b8dea02bb 100644 --- a/service/greengrass/api_op_CreateFunctionDefinitionVersion.go +++ b/service/greengrass/api_op_CreateFunctionDefinitionVersion.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateFunctionDefinitionVersionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFunctionDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateGroup.go b/service/greengrass/api_op_CreateGroup.go index a4112dc9018..f9cffd4f9bf 100644 --- a/service/greengrass/api_op_CreateGroup.go +++ b/service/greengrass/api_op_CreateGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateGroupCertificateAuthority.go b/service/greengrass/api_op_CreateGroupCertificateAuthority.go index ed4b1d17535..3e7f5f53443 100644 --- a/service/greengrass/api_op_CreateGroupCertificateAuthority.go +++ b/service/greengrass/api_op_CreateGroupCertificateAuthority.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateGroupCertificateAuthorityMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateGroupVersion.go b/service/greengrass/api_op_CreateGroupVersion.go index b02363bb782..ad1809f8005 100644 --- a/service/greengrass/api_op_CreateGroupVersion.go +++ b/service/greengrass/api_op_CreateGroupVersion.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateGroupVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateLoggerDefinition.go b/service/greengrass/api_op_CreateLoggerDefinition.go index dc4bd3b5866..0b0f7534915 100644 --- a/service/greengrass/api_op_CreateLoggerDefinition.go +++ b/service/greengrass/api_op_CreateLoggerDefinition.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateLoggerDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoggerDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateLoggerDefinitionVersion.go b/service/greengrass/api_op_CreateLoggerDefinitionVersion.go index 046bdc2e77f..6e6c8eae313 100644 --- a/service/greengrass/api_op_CreateLoggerDefinitionVersion.go +++ b/service/greengrass/api_op_CreateLoggerDefinitionVersion.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateLoggerDefinitionVersionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoggerDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateResourceDefinition.go b/service/greengrass/api_op_CreateResourceDefinition.go index edb9e193fc5..1aec6472008 100644 --- a/service/greengrass/api_op_CreateResourceDefinition.go +++ b/service/greengrass/api_op_CreateResourceDefinition.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateResourceDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateResourceDefinitionVersion.go b/service/greengrass/api_op_CreateResourceDefinitionVersion.go index 92ea907012b..5b1a10c45d1 100644 --- a/service/greengrass/api_op_CreateResourceDefinitionVersion.go +++ b/service/greengrass/api_op_CreateResourceDefinitionVersion.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateResourceDefinitionVersionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateSoftwareUpdateJob.go b/service/greengrass/api_op_CreateSoftwareUpdateJob.go index f9aae7bef55..ca14cc65a80 100644 --- a/service/greengrass/api_op_CreateSoftwareUpdateJob.go +++ b/service/greengrass/api_op_CreateSoftwareUpdateJob.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateSoftwareUpdateJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSoftwareUpdateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateSubscriptionDefinition.go b/service/greengrass/api_op_CreateSubscriptionDefinition.go index 072c5346431..5477c0e3b77 100644 --- a/service/greengrass/api_op_CreateSubscriptionDefinition.go +++ b/service/greengrass/api_op_CreateSubscriptionDefinition.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateSubscriptionDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubscriptionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_CreateSubscriptionDefinitionVersion.go b/service/greengrass/api_op_CreateSubscriptionDefinitionVersion.go index a8677d53046..2495e063f99 100644 --- a/service/greengrass/api_op_CreateSubscriptionDefinitionVersion.go +++ b/service/greengrass/api_op_CreateSubscriptionDefinitionVersion.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateSubscriptionDefinitionVersionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubscriptionDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteConnectorDefinition.go b/service/greengrass/api_op_DeleteConnectorDefinition.go index 4f8cbe561d9..6d640686d48 100644 --- a/service/greengrass/api_op_DeleteConnectorDefinition.go +++ b/service/greengrass/api_op_DeleteConnectorDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteConnectorDefinitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteCoreDefinition.go b/service/greengrass/api_op_DeleteCoreDefinition.go index 3124e0f9793..34bb831e5e9 100644 --- a/service/greengrass/api_op_DeleteCoreDefinition.go +++ b/service/greengrass/api_op_DeleteCoreDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCoreDefinitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCoreDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteDeviceDefinition.go b/service/greengrass/api_op_DeleteDeviceDefinition.go index 51f2d2bfde2..ba51daf5b20 100644 --- a/service/greengrass/api_op_DeleteDeviceDefinition.go +++ b/service/greengrass/api_op_DeleteDeviceDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDeviceDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeviceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteFunctionDefinition.go b/service/greengrass/api_op_DeleteFunctionDefinition.go index 3ac0a3641d6..0549bf9683c 100644 --- a/service/greengrass/api_op_DeleteFunctionDefinition.go +++ b/service/greengrass/api_op_DeleteFunctionDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFunctionDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteGroup.go b/service/greengrass/api_op_DeleteGroup.go index 2b3c299d564..f975e31d7c8 100644 --- a/service/greengrass/api_op_DeleteGroup.go +++ b/service/greengrass/api_op_DeleteGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteLoggerDefinition.go b/service/greengrass/api_op_DeleteLoggerDefinition.go index 7640a9d9fd6..d7d0b41108f 100644 --- a/service/greengrass/api_op_DeleteLoggerDefinition.go +++ b/service/greengrass/api_op_DeleteLoggerDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteLoggerDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoggerDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteResourceDefinition.go b/service/greengrass/api_op_DeleteResourceDefinition.go index c6b1ca863f3..847e23d7312 100644 --- a/service/greengrass/api_op_DeleteResourceDefinition.go +++ b/service/greengrass/api_op_DeleteResourceDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteResourceDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DeleteSubscriptionDefinition.go b/service/greengrass/api_op_DeleteSubscriptionDefinition.go index 0012d1e1287..38759dd4b66 100644 --- a/service/greengrass/api_op_DeleteSubscriptionDefinition.go +++ b/service/greengrass/api_op_DeleteSubscriptionDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSubscriptionDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriptionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DisassociateRoleFromGroup.go b/service/greengrass/api_op_DisassociateRoleFromGroup.go index aab7e07c9f3..8c871fcb207 100644 --- a/service/greengrass/api_op_DisassociateRoleFromGroup.go +++ b/service/greengrass/api_op_DisassociateRoleFromGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateRoleFromGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateRoleFromGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_DisassociateServiceRoleFromAccount.go b/service/greengrass/api_op_DisassociateServiceRoleFromAccount.go index dd7703371e8..b1952219401 100644 --- a/service/greengrass/api_op_DisassociateServiceRoleFromAccount.go +++ b/service/greengrass/api_op_DisassociateServiceRoleFromAccount.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDisassociateServiceRoleFromAccountMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateServiceRoleFromAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_GetAssociatedRole.go b/service/greengrass/api_op_GetAssociatedRole.go index 37857798e5b..491fb9baf6f 100644 --- a/service/greengrass/api_op_GetAssociatedRole.go +++ b/service/greengrass/api_op_GetAssociatedRole.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetAssociatedRoleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssociatedRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetBulkDeploymentStatus.go b/service/greengrass/api_op_GetBulkDeploymentStatus.go index e4e7764f029..55b85882fd0 100644 --- a/service/greengrass/api_op_GetBulkDeploymentStatus.go +++ b/service/greengrass/api_op_GetBulkDeploymentStatus.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetBulkDeploymentStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBulkDeploymentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetConnectivityInfo.go b/service/greengrass/api_op_GetConnectivityInfo.go index a103c2b3768..94402ab9cac 100644 --- a/service/greengrass/api_op_GetConnectivityInfo.go +++ b/service/greengrass/api_op_GetConnectivityInfo.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetConnectivityInfoMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectivityInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetConnectorDefinition.go b/service/greengrass/api_op_GetConnectorDefinition.go index e2c21486a71..bf7eb7054de 100644 --- a/service/greengrass/api_op_GetConnectorDefinition.go +++ b/service/greengrass/api_op_GetConnectorDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetConnectorDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectorDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetConnectorDefinitionVersion.go b/service/greengrass/api_op_GetConnectorDefinitionVersion.go index b6f0c7b3e1d..7f7b48d7638 100644 --- a/service/greengrass/api_op_GetConnectorDefinitionVersion.go +++ b/service/greengrass/api_op_GetConnectorDefinitionVersion.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetConnectorDefinitionVersionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectorDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetCoreDefinition.go b/service/greengrass/api_op_GetCoreDefinition.go index 18e31f4c868..f8e5e42efc7 100644 --- a/service/greengrass/api_op_GetCoreDefinition.go +++ b/service/greengrass/api_op_GetCoreDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetCoreDefinitionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetCoreDefinitionVersion.go b/service/greengrass/api_op_GetCoreDefinitionVersion.go index 028f0389921..547881269ce 100644 --- a/service/greengrass/api_op_GetCoreDefinitionVersion.go +++ b/service/greengrass/api_op_GetCoreDefinitionVersion.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetCoreDefinitionVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetDeploymentStatus.go b/service/greengrass/api_op_GetDeploymentStatus.go index e58eacf9a6d..52256102144 100644 --- a/service/greengrass/api_op_GetDeploymentStatus.go +++ b/service/greengrass/api_op_GetDeploymentStatus.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetDeploymentStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetDeviceDefinition.go b/service/greengrass/api_op_GetDeviceDefinition.go index 78cf4042556..a5ec077ada5 100644 --- a/service/greengrass/api_op_GetDeviceDefinition.go +++ b/service/greengrass/api_op_GetDeviceDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetDeviceDefinitionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetDeviceDefinitionVersion.go b/service/greengrass/api_op_GetDeviceDefinitionVersion.go index ee52e32428a..276009e0e77 100644 --- a/service/greengrass/api_op_GetDeviceDefinitionVersion.go +++ b/service/greengrass/api_op_GetDeviceDefinitionVersion.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetDeviceDefinitionVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetFunctionDefinition.go b/service/greengrass/api_op_GetFunctionDefinition.go index 0a4d01f0a28..d503d0491b7 100644 --- a/service/greengrass/api_op_GetFunctionDefinition.go +++ b/service/greengrass/api_op_GetFunctionDefinition.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetFunctionDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetFunctionDefinitionVersion.go b/service/greengrass/api_op_GetFunctionDefinitionVersion.go index 418c5debaec..1d710f9be59 100644 --- a/service/greengrass/api_op_GetFunctionDefinitionVersion.go +++ b/service/greengrass/api_op_GetFunctionDefinitionVersion.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetFunctionDefinitionVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetGroup.go b/service/greengrass/api_op_GetGroup.go index b10ca6a679e..8c743c9d5a8 100644 --- a/service/greengrass/api_op_GetGroup.go +++ b/service/greengrass/api_op_GetGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetGroupCertificateAuthority.go b/service/greengrass/api_op_GetGroupCertificateAuthority.go index 2716783185b..347b9ef072e 100644 --- a/service/greengrass/api_op_GetGroupCertificateAuthority.go +++ b/service/greengrass/api_op_GetGroupCertificateAuthority.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetGroupCertificateAuthorityMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetGroupCertificateConfiguration.go b/service/greengrass/api_op_GetGroupCertificateConfiguration.go index bf89af75a6d..1b71874e95e 100644 --- a/service/greengrass/api_op_GetGroupCertificateConfiguration.go +++ b/service/greengrass/api_op_GetGroupCertificateConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetGroupCertificateConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupCertificateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetGroupVersion.go b/service/greengrass/api_op_GetGroupVersion.go index 0bfdd467367..5f55a4c620c 100644 --- a/service/greengrass/api_op_GetGroupVersion.go +++ b/service/greengrass/api_op_GetGroupVersion.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetGroupVersionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetLoggerDefinition.go b/service/greengrass/api_op_GetLoggerDefinition.go index cc0a9fd2628..879f3fe9e7f 100644 --- a/service/greengrass/api_op_GetLoggerDefinition.go +++ b/service/greengrass/api_op_GetLoggerDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetLoggerDefinitionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoggerDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetLoggerDefinitionVersion.go b/service/greengrass/api_op_GetLoggerDefinitionVersion.go index 002ce218518..2d48c2b52e9 100644 --- a/service/greengrass/api_op_GetLoggerDefinitionVersion.go +++ b/service/greengrass/api_op_GetLoggerDefinitionVersion.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetLoggerDefinitionVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoggerDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetResourceDefinition.go b/service/greengrass/api_op_GetResourceDefinition.go index b5c1e989a2b..e04ff93d650 100644 --- a/service/greengrass/api_op_GetResourceDefinition.go +++ b/service/greengrass/api_op_GetResourceDefinition.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetResourceDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetResourceDefinitionVersion.go b/service/greengrass/api_op_GetResourceDefinitionVersion.go index 71242367af5..67d7a96990f 100644 --- a/service/greengrass/api_op_GetResourceDefinitionVersion.go +++ b/service/greengrass/api_op_GetResourceDefinitionVersion.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetResourceDefinitionVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetServiceRoleForAccount.go b/service/greengrass/api_op_GetServiceRoleForAccount.go index 93d3f5649c9..c1951ec2e49 100644 --- a/service/greengrass/api_op_GetServiceRoleForAccount.go +++ b/service/greengrass/api_op_GetServiceRoleForAccount.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetServiceRoleForAccountMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceRoleForAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_GetSubscriptionDefinition.go b/service/greengrass/api_op_GetSubscriptionDefinition.go index 092f8af3fbe..c09f0ece9c4 100644 --- a/service/greengrass/api_op_GetSubscriptionDefinition.go +++ b/service/greengrass/api_op_GetSubscriptionDefinition.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetSubscriptionDefinitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetSubscriptionDefinitionVersion.go b/service/greengrass/api_op_GetSubscriptionDefinitionVersion.go index 9009b742e2e..4e123087b35 100644 --- a/service/greengrass/api_op_GetSubscriptionDefinitionVersion.go +++ b/service/greengrass/api_op_GetSubscriptionDefinitionVersion.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetSubscriptionDefinitionVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionDefinitionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_GetThingRuntimeConfiguration.go b/service/greengrass/api_op_GetThingRuntimeConfiguration.go index e5b0d00bb61..09acac3d2a6 100644 --- a/service/greengrass/api_op_GetThingRuntimeConfiguration.go +++ b/service/greengrass/api_op_GetThingRuntimeConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetThingRuntimeConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetThingRuntimeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListBulkDeploymentDetailedReports.go b/service/greengrass/api_op_ListBulkDeploymentDetailedReports.go index 2d5e0fcafa1..70b2562456e 100644 --- a/service/greengrass/api_op_ListBulkDeploymentDetailedReports.go +++ b/service/greengrass/api_op_ListBulkDeploymentDetailedReports.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListBulkDeploymentDetailedReportsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBulkDeploymentDetailedReportsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListBulkDeployments.go b/service/greengrass/api_op_ListBulkDeployments.go index 1c7122420c1..e2cb22171e0 100644 --- a/service/greengrass/api_op_ListBulkDeployments.go +++ b/service/greengrass/api_op_ListBulkDeployments.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListBulkDeploymentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBulkDeployments(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListConnectorDefinitionVersions.go b/service/greengrass/api_op_ListConnectorDefinitionVersions.go index a082e513b9f..c9fc4095329 100644 --- a/service/greengrass/api_op_ListConnectorDefinitionVersions.go +++ b/service/greengrass/api_op_ListConnectorDefinitionVersions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListConnectorDefinitionVersionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConnectorDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListConnectorDefinitions.go b/service/greengrass/api_op_ListConnectorDefinitions.go index 95f9bccebe5..a2061f1172a 100644 --- a/service/greengrass/api_op_ListConnectorDefinitions.go +++ b/service/greengrass/api_op_ListConnectorDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListConnectorDefinitionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectorDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListCoreDefinitionVersions.go b/service/greengrass/api_op_ListCoreDefinitionVersions.go index 10c7dc01fab..539198279f9 100644 --- a/service/greengrass/api_op_ListCoreDefinitionVersions.go +++ b/service/greengrass/api_op_ListCoreDefinitionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCoreDefinitionVersionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCoreDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListCoreDefinitions.go b/service/greengrass/api_op_ListCoreDefinitions.go index 9a91a537859..13052a9ae32 100644 --- a/service/greengrass/api_op_ListCoreDefinitions.go +++ b/service/greengrass/api_op_ListCoreDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListCoreDefinitionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoreDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListDeployments.go b/service/greengrass/api_op_ListDeployments.go index 68c74db1453..46167f82180 100644 --- a/service/greengrass/api_op_ListDeployments.go +++ b/service/greengrass/api_op_ListDeployments.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListDeviceDefinitionVersions.go b/service/greengrass/api_op_ListDeviceDefinitionVersions.go index abdd7fc6a1b..5c6f67a9934 100644 --- a/service/greengrass/api_op_ListDeviceDefinitionVersions.go +++ b/service/greengrass/api_op_ListDeviceDefinitionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDeviceDefinitionVersionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeviceDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListDeviceDefinitions.go b/service/greengrass/api_op_ListDeviceDefinitions.go index 86f358c0013..716e7c80b6a 100644 --- a/service/greengrass/api_op_ListDeviceDefinitions.go +++ b/service/greengrass/api_op_ListDeviceDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListDeviceDefinitionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListFunctionDefinitionVersions.go b/service/greengrass/api_op_ListFunctionDefinitionVersions.go index ce35b4d7757..b7fdc69a8f3 100644 --- a/service/greengrass/api_op_ListFunctionDefinitionVersions.go +++ b/service/greengrass/api_op_ListFunctionDefinitionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListFunctionDefinitionVersionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFunctionDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListFunctionDefinitions.go b/service/greengrass/api_op_ListFunctionDefinitions.go index 345b6655dc4..7e19e6c2a6f 100644 --- a/service/greengrass/api_op_ListFunctionDefinitions.go +++ b/service/greengrass/api_op_ListFunctionDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListFunctionDefinitionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctionDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListGroupCertificateAuthorities.go b/service/greengrass/api_op_ListGroupCertificateAuthorities.go index 7636f67b4ca..927f55edd0c 100644 --- a/service/greengrass/api_op_ListGroupCertificateAuthorities.go +++ b/service/greengrass/api_op_ListGroupCertificateAuthorities.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListGroupCertificateAuthoritiesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupCertificateAuthoritiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListGroupVersions.go b/service/greengrass/api_op_ListGroupVersions.go index b11b852f864..21be308e819 100644 --- a/service/greengrass/api_op_ListGroupVersions.go +++ b/service/greengrass/api_op_ListGroupVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListGroupVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListGroups.go b/service/greengrass/api_op_ListGroups.go index 7f18c3e361e..8c234a0e67b 100644 --- a/service/greengrass/api_op_ListGroups.go +++ b/service/greengrass/api_op_ListGroups.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListLoggerDefinitionVersions.go b/service/greengrass/api_op_ListLoggerDefinitionVersions.go index f967e691cd2..a3c07c3b282 100644 --- a/service/greengrass/api_op_ListLoggerDefinitionVersions.go +++ b/service/greengrass/api_op_ListLoggerDefinitionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListLoggerDefinitionVersionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLoggerDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListLoggerDefinitions.go b/service/greengrass/api_op_ListLoggerDefinitions.go index d71fbfb54f4..dccd2354b5c 100644 --- a/service/greengrass/api_op_ListLoggerDefinitions.go +++ b/service/greengrass/api_op_ListLoggerDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListLoggerDefinitionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggerDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListResourceDefinitionVersions.go b/service/greengrass/api_op_ListResourceDefinitionVersions.go index f4ba8779187..15a5c030b30 100644 --- a/service/greengrass/api_op_ListResourceDefinitionVersions.go +++ b/service/greengrass/api_op_ListResourceDefinitionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListResourceDefinitionVersionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListResourceDefinitions.go b/service/greengrass/api_op_ListResourceDefinitions.go index 5e61bdb1d07..7bc03233083 100644 --- a/service/greengrass/api_op_ListResourceDefinitions.go +++ b/service/greengrass/api_op_ListResourceDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListResourceDefinitionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListSubscriptionDefinitionVersions.go b/service/greengrass/api_op_ListSubscriptionDefinitionVersions.go index 3d5fc529c0c..bccc39886a6 100644 --- a/service/greengrass/api_op_ListSubscriptionDefinitionVersions.go +++ b/service/greengrass/api_op_ListSubscriptionDefinitionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListSubscriptionDefinitionVersionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubscriptionDefinitionVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ListSubscriptionDefinitions.go b/service/greengrass/api_op_ListSubscriptionDefinitions.go index 76aba5de0e7..56c190c3846 100644 --- a/service/greengrass/api_op_ListSubscriptionDefinitions.go +++ b/service/greengrass/api_op_ListSubscriptionDefinitions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListSubscriptionDefinitionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscriptionDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrass/api_op_ListTagsForResource.go b/service/greengrass/api_op_ListTagsForResource.go index 5509dd93684..f30b6471730 100644 --- a/service/greengrass/api_op_ListTagsForResource.go +++ b/service/greengrass/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_ResetDeployments.go b/service/greengrass/api_op_ResetDeployments.go index ae1702deb38..a936b0c7321 100644 --- a/service/greengrass/api_op_ResetDeployments.go +++ b/service/greengrass/api_op_ResetDeployments.go @@ -115,6 +115,9 @@ func (c *Client) addOperationResetDeploymentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetDeploymentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_StartBulkDeployment.go b/service/greengrass/api_op_StartBulkDeployment.go index 374c6164287..a0c4b46eddc 100644 --- a/service/greengrass/api_op_StartBulkDeployment.go +++ b/service/greengrass/api_op_StartBulkDeployment.go @@ -132,6 +132,9 @@ func (c *Client) addOperationStartBulkDeploymentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBulkDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_StopBulkDeployment.go b/service/greengrass/api_op_StopBulkDeployment.go index b5f2210fc60..e576b31df0b 100644 --- a/service/greengrass/api_op_StopBulkDeployment.go +++ b/service/greengrass/api_op_StopBulkDeployment.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStopBulkDeploymentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopBulkDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_TagResource.go b/service/greengrass/api_op_TagResource.go index 86766c895c3..ff2e21bbf3b 100644 --- a/service/greengrass/api_op_TagResource.go +++ b/service/greengrass/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UntagResource.go b/service/greengrass/api_op_UntagResource.go index 0d6cb907aa9..fc38ad3e947 100644 --- a/service/greengrass/api_op_UntagResource.go +++ b/service/greengrass/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateConnectivityInfo.go b/service/greengrass/api_op_UpdateConnectivityInfo.go index d22735536c6..e50d576e8cb 100644 --- a/service/greengrass/api_op_UpdateConnectivityInfo.go +++ b/service/greengrass/api_op_UpdateConnectivityInfo.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateConnectivityInfoMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectivityInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateConnectorDefinition.go b/service/greengrass/api_op_UpdateConnectorDefinition.go index 34b0bf2370b..052520558f6 100644 --- a/service/greengrass/api_op_UpdateConnectorDefinition.go +++ b/service/greengrass/api_op_UpdateConnectorDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateConnectorDefinitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectorDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateCoreDefinition.go b/service/greengrass/api_op_UpdateCoreDefinition.go index 1ab8b9d3c60..92beed17d42 100644 --- a/service/greengrass/api_op_UpdateCoreDefinition.go +++ b/service/greengrass/api_op_UpdateCoreDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateCoreDefinitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCoreDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateDeviceDefinition.go b/service/greengrass/api_op_UpdateDeviceDefinition.go index 331c295f25b..dc63cd52e61 100644 --- a/service/greengrass/api_op_UpdateDeviceDefinition.go +++ b/service/greengrass/api_op_UpdateDeviceDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateDeviceDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateFunctionDefinition.go b/service/greengrass/api_op_UpdateFunctionDefinition.go index c24439f0d41..5a24c96c010 100644 --- a/service/greengrass/api_op_UpdateFunctionDefinition.go +++ b/service/greengrass/api_op_UpdateFunctionDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateFunctionDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateGroup.go b/service/greengrass/api_op_UpdateGroup.go index 9a72097c8d1..640e07da666 100644 --- a/service/greengrass/api_op_UpdateGroup.go +++ b/service/greengrass/api_op_UpdateGroup.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateGroupCertificateConfiguration.go b/service/greengrass/api_op_UpdateGroupCertificateConfiguration.go index a2544ef8302..c9963aa60eb 100644 --- a/service/greengrass/api_op_UpdateGroupCertificateConfiguration.go +++ b/service/greengrass/api_op_UpdateGroupCertificateConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateGroupCertificateConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupCertificateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateLoggerDefinition.go b/service/greengrass/api_op_UpdateLoggerDefinition.go index 713d80984c0..de872823583 100644 --- a/service/greengrass/api_op_UpdateLoggerDefinition.go +++ b/service/greengrass/api_op_UpdateLoggerDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateLoggerDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLoggerDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateResourceDefinition.go b/service/greengrass/api_op_UpdateResourceDefinition.go index 2cac4f1eeb7..1b5325af774 100644 --- a/service/greengrass/api_op_UpdateResourceDefinition.go +++ b/service/greengrass/api_op_UpdateResourceDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateResourceDefinitionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateSubscriptionDefinition.go b/service/greengrass/api_op_UpdateSubscriptionDefinition.go index 1a03113f458..f083452d43a 100644 --- a/service/greengrass/api_op_UpdateSubscriptionDefinition.go +++ b/service/greengrass/api_op_UpdateSubscriptionDefinition.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateSubscriptionDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriptionDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrass/api_op_UpdateThingRuntimeConfiguration.go b/service/greengrass/api_op_UpdateThingRuntimeConfiguration.go index 57bba43a3c7..62747fe1477 100644 --- a/service/greengrass/api_op_UpdateThingRuntimeConfiguration.go +++ b/service/greengrass/api_op_UpdateThingRuntimeConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateThingRuntimeConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThingRuntimeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_client.go b/service/greengrassv2/api_client.go index f72f1b60fff..2420b46c525 100644 --- a/service/greengrassv2/api_client.go +++ b/service/greengrassv2/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/greengrassv2/api_op_AssociateServiceRoleToAccount.go b/service/greengrassv2/api_op_AssociateServiceRoleToAccount.go index 988e5a67978..0bc75f05f1f 100644 --- a/service/greengrassv2/api_op_AssociateServiceRoleToAccount.go +++ b/service/greengrassv2/api_op_AssociateServiceRoleToAccount.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateServiceRoleToAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateServiceRoleToAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_BatchAssociateClientDeviceWithCoreDevice.go b/service/greengrassv2/api_op_BatchAssociateClientDeviceWithCoreDevice.go index 332ea58c571..5d69de91580 100644 --- a/service/greengrassv2/api_op_BatchAssociateClientDeviceWithCoreDevice.go +++ b/service/greengrassv2/api_op_BatchAssociateClientDeviceWithCoreDevice.go @@ -123,6 +123,9 @@ func (c *Client) addOperationBatchAssociateClientDeviceWithCoreDeviceMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateClientDeviceWithCoreDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_BatchDisassociateClientDeviceFromCoreDevice.go b/service/greengrassv2/api_op_BatchDisassociateClientDeviceFromCoreDevice.go index 824df41df63..6aa8b2400d5 100644 --- a/service/greengrassv2/api_op_BatchDisassociateClientDeviceFromCoreDevice.go +++ b/service/greengrassv2/api_op_BatchDisassociateClientDeviceFromCoreDevice.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchDisassociateClientDeviceFromCoreDeviceMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateClientDeviceFromCoreDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_CancelDeployment.go b/service/greengrassv2/api_op_CancelDeployment.go index 027ce1cd0fc..0427c23877f 100644 --- a/service/greengrassv2/api_op_CancelDeployment.go +++ b/service/greengrassv2/api_op_CancelDeployment.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCancelDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_CreateComponentVersion.go b/service/greengrassv2/api_op_CreateComponentVersion.go index 7f38c41501a..849d2dec894 100644 --- a/service/greengrassv2/api_op_CreateComponentVersion.go +++ b/service/greengrassv2/api_op_CreateComponentVersion.go @@ -190,6 +190,9 @@ func (c *Client) addOperationCreateComponentVersionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateComponentVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/greengrassv2/api_op_CreateDeployment.go b/service/greengrassv2/api_op_CreateDeployment.go index b664098afe7..27b9698c8e0 100644 --- a/service/greengrassv2/api_op_CreateDeployment.go +++ b/service/greengrassv2/api_op_CreateDeployment.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDeploymentMiddleware(stack, options); err != nil { return err } diff --git a/service/greengrassv2/api_op_DeleteComponent.go b/service/greengrassv2/api_op_DeleteComponent.go index 6ff1e2474a4..1b44a9a6bb1 100644 --- a/service/greengrassv2/api_op_DeleteComponent.go +++ b/service/greengrassv2/api_op_DeleteComponent.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_DeleteCoreDevice.go b/service/greengrassv2/api_op_DeleteCoreDevice.go index 62673c2e7d1..afd4c251b76 100644 --- a/service/greengrassv2/api_op_DeleteCoreDevice.go +++ b/service/greengrassv2/api_op_DeleteCoreDevice.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCoreDeviceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCoreDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_DeleteDeployment.go b/service/greengrassv2/api_op_DeleteDeployment.go index 10b53c4d53a..de480be2efa 100644 --- a/service/greengrassv2/api_op_DeleteDeployment.go +++ b/service/greengrassv2/api_op_DeleteDeployment.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_DescribeComponent.go b/service/greengrassv2/api_op_DescribeComponent.go index df39867fc51..9f8537fb430 100644 --- a/service/greengrassv2/api_op_DescribeComponent.go +++ b/service/greengrassv2/api_op_DescribeComponent.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeComponentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_DisassociateServiceRoleFromAccount.go b/service/greengrassv2/api_op_DisassociateServiceRoleFromAccount.go index ea4d45d4c8b..49dfe55b0e4 100644 --- a/service/greengrassv2/api_op_DisassociateServiceRoleFromAccount.go +++ b/service/greengrassv2/api_op_DisassociateServiceRoleFromAccount.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateServiceRoleFromAccountMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateServiceRoleFromAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrassv2/api_op_GetComponent.go b/service/greengrassv2/api_op_GetComponent.go index 99459703e10..efcdb027dea 100644 --- a/service/greengrassv2/api_op_GetComponent.go +++ b/service/greengrassv2/api_op_GetComponent.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_GetComponentVersionArtifact.go b/service/greengrassv2/api_op_GetComponentVersionArtifact.go index 8eb4c0146f0..2084d497f49 100644 --- a/service/greengrassv2/api_op_GetComponentVersionArtifact.go +++ b/service/greengrassv2/api_op_GetComponentVersionArtifact.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetComponentVersionArtifactMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentVersionArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_GetConnectivityInfo.go b/service/greengrassv2/api_op_GetConnectivityInfo.go index 206af51c05f..f08d0670898 100644 --- a/service/greengrassv2/api_op_GetConnectivityInfo.go +++ b/service/greengrassv2/api_op_GetConnectivityInfo.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetConnectivityInfoMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectivityInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_GetCoreDevice.go b/service/greengrassv2/api_op_GetCoreDevice.go index 70e693bd217..6ccc19ad302 100644 --- a/service/greengrassv2/api_op_GetCoreDevice.go +++ b/service/greengrassv2/api_op_GetCoreDevice.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetCoreDeviceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_GetDeployment.go b/service/greengrassv2/api_op_GetDeployment.go index a4b8e2d2df5..651ed045b36 100644 --- a/service/greengrassv2/api_op_GetDeployment.go +++ b/service/greengrassv2/api_op_GetDeployment.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_GetServiceRoleForAccount.go b/service/greengrassv2/api_op_GetServiceRoleForAccount.go index 1c3565f20fd..f5cdb9c7891 100644 --- a/service/greengrassv2/api_op_GetServiceRoleForAccount.go +++ b/service/greengrassv2/api_op_GetServiceRoleForAccount.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetServiceRoleForAccountMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceRoleForAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go b/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go index 3aa5776613e..1548c188dc9 100644 --- a/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go +++ b/service/greengrassv2/api_op_ListClientDevicesAssociatedWithCoreDevice.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListClientDevicesAssociatedWithCoreDeviceMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClientDevicesAssociatedWithCoreDeviceValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListClientDevicesAssociatedWithCoreDeviceMiddleware return nil } -// ListClientDevicesAssociatedWithCoreDeviceAPIClient is a client that implements -// the ListClientDevicesAssociatedWithCoreDevice operation. -type ListClientDevicesAssociatedWithCoreDeviceAPIClient interface { - ListClientDevicesAssociatedWithCoreDevice(context.Context, *ListClientDevicesAssociatedWithCoreDeviceInput, ...func(*Options)) (*ListClientDevicesAssociatedWithCoreDeviceOutput, error) -} - -var _ ListClientDevicesAssociatedWithCoreDeviceAPIClient = (*Client)(nil) - // ListClientDevicesAssociatedWithCoreDevicePaginatorOptions is the paginator // options for ListClientDevicesAssociatedWithCoreDevice type ListClientDevicesAssociatedWithCoreDevicePaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListClientDevicesAssociatedWithCoreDevicePaginator) NextPage(ctx contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClientDevicesAssociatedWithCoreDevice(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListClientDevicesAssociatedWithCoreDevicePaginator) NextPage(ctx contex return result, nil } +// ListClientDevicesAssociatedWithCoreDeviceAPIClient is a client that implements +// the ListClientDevicesAssociatedWithCoreDevice operation. +type ListClientDevicesAssociatedWithCoreDeviceAPIClient interface { + ListClientDevicesAssociatedWithCoreDevice(context.Context, *ListClientDevicesAssociatedWithCoreDeviceInput, ...func(*Options)) (*ListClientDevicesAssociatedWithCoreDeviceOutput, error) +} + +var _ ListClientDevicesAssociatedWithCoreDeviceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClientDevicesAssociatedWithCoreDevice(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListComponentVersions.go b/service/greengrassv2/api_op_ListComponentVersions.go index 1a7e01b00cd..f7de0c5f215 100644 --- a/service/greengrassv2/api_op_ListComponentVersions.go +++ b/service/greengrassv2/api_op_ListComponentVersions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListComponentVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComponentVersionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListComponentVersionsMiddlewares(stack *middleware. return nil } -// ListComponentVersionsAPIClient is a client that implements the -// ListComponentVersions operation. -type ListComponentVersionsAPIClient interface { - ListComponentVersions(context.Context, *ListComponentVersionsInput, ...func(*Options)) (*ListComponentVersionsOutput, error) -} - -var _ ListComponentVersionsAPIClient = (*Client)(nil) - // ListComponentVersionsPaginatorOptions is the paginator options for // ListComponentVersions type ListComponentVersionsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListComponentVersionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponentVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListComponentVersionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListComponentVersionsAPIClient is a client that implements the +// ListComponentVersions operation. +type ListComponentVersionsAPIClient interface { + ListComponentVersions(context.Context, *ListComponentVersionsInput, ...func(*Options)) (*ListComponentVersionsOutput, error) +} + +var _ ListComponentVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponentVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListComponents.go b/service/greengrassv2/api_op_ListComponents.go index 1fdcdce3475..3a9ca10d7fb 100644 --- a/service/greengrassv2/api_op_ListComponents.go +++ b/service/greengrassv2/api_op_ListComponents.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponents(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum number of results to be returned per paginated request. @@ -209,6 +204,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListCoreDevices.go b/service/greengrassv2/api_op_ListCoreDevices.go index 7b0c127f89d..55e78d84065 100644 --- a/service/greengrassv2/api_op_ListCoreDevices.go +++ b/service/greengrassv2/api_op_ListCoreDevices.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListCoreDevicesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoreDevices(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListCoreDevicesMiddlewares(stack *middleware.Stack, return nil } -// ListCoreDevicesAPIClient is a client that implements the ListCoreDevices -// operation. -type ListCoreDevicesAPIClient interface { - ListCoreDevices(context.Context, *ListCoreDevicesInput, ...func(*Options)) (*ListCoreDevicesOutput, error) -} - -var _ ListCoreDevicesAPIClient = (*Client)(nil) - // ListCoreDevicesPaginatorOptions is the paginator options for ListCoreDevices type ListCoreDevicesPaginatorOptions struct { // The maximum number of results to be returned per paginated request. @@ -244,6 +239,9 @@ func (p *ListCoreDevicesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCoreDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *ListCoreDevicesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListCoreDevicesAPIClient is a client that implements the ListCoreDevices +// operation. +type ListCoreDevicesAPIClient interface { + ListCoreDevices(context.Context, *ListCoreDevicesInput, ...func(*Options)) (*ListCoreDevicesOutput, error) +} + +var _ ListCoreDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCoreDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListDeployments.go b/service/greengrassv2/api_op_ListDeployments.go index db46398e0f3..5162adbbc81 100644 --- a/service/greengrassv2/api_op_ListDeployments.go +++ b/service/greengrassv2/api_op_ListDeployments.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeployments(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// ListDeploymentsAPIClient is a client that implements the ListDeployments -// operation. -type ListDeploymentsAPIClient interface { - ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) -} - -var _ ListDeploymentsAPIClient = (*Client)(nil) - // ListDeploymentsPaginatorOptions is the paginator options for ListDeployments type ListDeploymentsPaginatorOptions struct { // The maximum number of results to be returned per paginated request. @@ -226,6 +221,9 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDeploymentsAPIClient is a client that implements the ListDeployments +// operation. +type ListDeploymentsAPIClient interface { + ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) +} + +var _ ListDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListEffectiveDeployments.go b/service/greengrassv2/api_op_ListEffectiveDeployments.go index 9eb4d5c47ed..ed51ef9fb74 100644 --- a/service/greengrassv2/api_op_ListEffectiveDeployments.go +++ b/service/greengrassv2/api_op_ListEffectiveDeployments.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListEffectiveDeploymentsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEffectiveDeploymentsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListEffectiveDeploymentsMiddlewares(stack *middlewa return nil } -// ListEffectiveDeploymentsAPIClient is a client that implements the -// ListEffectiveDeployments operation. -type ListEffectiveDeploymentsAPIClient interface { - ListEffectiveDeployments(context.Context, *ListEffectiveDeploymentsInput, ...func(*Options)) (*ListEffectiveDeploymentsOutput, error) -} - -var _ ListEffectiveDeploymentsAPIClient = (*Client)(nil) - // ListEffectiveDeploymentsPaginatorOptions is the paginator options for // ListEffectiveDeployments type ListEffectiveDeploymentsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListEffectiveDeploymentsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEffectiveDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEffectiveDeploymentsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEffectiveDeploymentsAPIClient is a client that implements the +// ListEffectiveDeployments operation. +type ListEffectiveDeploymentsAPIClient interface { + ListEffectiveDeployments(context.Context, *ListEffectiveDeploymentsInput, ...func(*Options)) (*ListEffectiveDeploymentsOutput, error) +} + +var _ ListEffectiveDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEffectiveDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListInstalledComponents.go b/service/greengrassv2/api_op_ListInstalledComponents.go index af58d673de6..19e1b811d38 100644 --- a/service/greengrassv2/api_op_ListInstalledComponents.go +++ b/service/greengrassv2/api_op_ListInstalledComponents.go @@ -160,6 +160,9 @@ func (c *Client) addOperationListInstalledComponentsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstalledComponentsValidationMiddleware(stack); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationListInstalledComponentsMiddlewares(stack *middlewar return nil } -// ListInstalledComponentsAPIClient is a client that implements the -// ListInstalledComponents operation. -type ListInstalledComponentsAPIClient interface { - ListInstalledComponents(context.Context, *ListInstalledComponentsInput, ...func(*Options)) (*ListInstalledComponentsOutput, error) -} - -var _ ListInstalledComponentsAPIClient = (*Client)(nil) - // ListInstalledComponentsPaginatorOptions is the paginator options for // ListInstalledComponents type ListInstalledComponentsPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *ListInstalledComponentsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstalledComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *ListInstalledComponentsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInstalledComponentsAPIClient is a client that implements the +// ListInstalledComponents operation. +type ListInstalledComponentsAPIClient interface { + ListInstalledComponents(context.Context, *ListInstalledComponentsInput, ...func(*Options)) (*ListInstalledComponentsOutput, error) +} + +var _ ListInstalledComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstalledComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/greengrassv2/api_op_ListTagsForResource.go b/service/greengrassv2/api_op_ListTagsForResource.go index fa4243a7a60..5bdf728adbc 100644 --- a/service/greengrassv2/api_op_ListTagsForResource.go +++ b/service/greengrassv2/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_ResolveComponentCandidates.go b/service/greengrassv2/api_op_ResolveComponentCandidates.go index 0fa793206eb..389563fb82c 100644 --- a/service/greengrassv2/api_op_ResolveComponentCandidates.go +++ b/service/greengrassv2/api_op_ResolveComponentCandidates.go @@ -127,6 +127,9 @@ func (c *Client) addOperationResolveComponentCandidatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResolveComponentCandidates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/greengrassv2/api_op_TagResource.go b/service/greengrassv2/api_op_TagResource.go index 250bbfe59bd..9f5a886f6d4 100644 --- a/service/greengrassv2/api_op_TagResource.go +++ b/service/greengrassv2/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_UntagResource.go b/service/greengrassv2/api_op_UntagResource.go index 65bf82aed2c..5fae704355a 100644 --- a/service/greengrassv2/api_op_UntagResource.go +++ b/service/greengrassv2/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/greengrassv2/api_op_UpdateConnectivityInfo.go b/service/greengrassv2/api_op_UpdateConnectivityInfo.go index 843298c730a..6bd858b1cff 100644 --- a/service/greengrassv2/api_op_UpdateConnectivityInfo.go +++ b/service/greengrassv2/api_op_UpdateConnectivityInfo.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateConnectivityInfoMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectivityInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_client.go b/service/groundstation/api_client.go index 16e639c7678..5f92741181a 100644 --- a/service/groundstation/api_client.go +++ b/service/groundstation/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/groundstation/api_op_CancelContact.go b/service/groundstation/api_op_CancelContact.go index 48850cd112e..24b294c528b 100644 --- a/service/groundstation/api_op_CancelContact.go +++ b/service/groundstation/api_op_CancelContact.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCancelContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_CreateConfig.go b/service/groundstation/api_op_CreateConfig.go index 1510518b071..7aa29f0079d 100644 --- a/service/groundstation/api_op_CreateConfig.go +++ b/service/groundstation/api_op_CreateConfig.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateConfigMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_CreateDataflowEndpointGroup.go b/service/groundstation/api_op_CreateDataflowEndpointGroup.go index b4b9bf359b8..ce40141de50 100644 --- a/service/groundstation/api_op_CreateDataflowEndpointGroup.go +++ b/service/groundstation/api_op_CreateDataflowEndpointGroup.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateDataflowEndpointGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataflowEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_CreateEphemeris.go b/service/groundstation/api_op_CreateEphemeris.go index c250b9bcb43..64285c63927 100644 --- a/service/groundstation/api_op_CreateEphemeris.go +++ b/service/groundstation/api_op_CreateEphemeris.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateEphemerisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEphemerisValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_CreateMissionProfile.go b/service/groundstation/api_op_CreateMissionProfile.go index daf58a441f2..b85b5a3cf0f 100644 --- a/service/groundstation/api_op_CreateMissionProfile.go +++ b/service/groundstation/api_op_CreateMissionProfile.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateMissionProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMissionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_DeleteConfig.go b/service/groundstation/api_op_DeleteConfig.go index 84a933f8df4..78728ac8baf 100644 --- a/service/groundstation/api_op_DeleteConfig.go +++ b/service/groundstation/api_op_DeleteConfig.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteConfigMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_DeleteDataflowEndpointGroup.go b/service/groundstation/api_op_DeleteDataflowEndpointGroup.go index 354f2a164e9..4fcb4257e8f 100644 --- a/service/groundstation/api_op_DeleteDataflowEndpointGroup.go +++ b/service/groundstation/api_op_DeleteDataflowEndpointGroup.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDataflowEndpointGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataflowEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_DeleteEphemeris.go b/service/groundstation/api_op_DeleteEphemeris.go index 3619a231392..c9146b843f3 100644 --- a/service/groundstation/api_op_DeleteEphemeris.go +++ b/service/groundstation/api_op_DeleteEphemeris.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteEphemerisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEphemerisValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_DeleteMissionProfile.go b/service/groundstation/api_op_DeleteMissionProfile.go index 2da75acafcb..1202639802f 100644 --- a/service/groundstation/api_op_DeleteMissionProfile.go +++ b/service/groundstation/api_op_DeleteMissionProfile.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteMissionProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMissionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_DescribeContact.go b/service/groundstation/api_op_DescribeContact.go index 6c0a0cdb14e..c59cfe77f4f 100644 --- a/service/groundstation/api_op_DescribeContact.go +++ b/service/groundstation/api_op_DescribeContact.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeContactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContactValidationMiddleware(stack); err != nil { return err } @@ -189,14 +192,6 @@ func (c *Client) addOperationDescribeContactMiddlewares(stack *middleware.Stack, return nil } -// DescribeContactAPIClient is a client that implements the DescribeContact -// operation. -type DescribeContactAPIClient interface { - DescribeContact(context.Context, *DescribeContactInput, ...func(*Options)) (*DescribeContactOutput, error) -} - -var _ DescribeContactAPIClient = (*Client)(nil) - // ContactScheduledWaiterOptions are waiter options for ContactScheduledWaiter type ContactScheduledWaiterOptions struct { @@ -312,7 +307,13 @@ func (w *ContactScheduledWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeContact(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -387,6 +388,14 @@ func contactScheduledStateRetryable(ctx context.Context, input *DescribeContactI return true, nil } +// DescribeContactAPIClient is a client that implements the DescribeContact +// operation. +type DescribeContactAPIClient interface { + DescribeContact(context.Context, *DescribeContactInput, ...func(*Options)) (*DescribeContactOutput, error) +} + +var _ DescribeContactAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeContact(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_DescribeEphemeris.go b/service/groundstation/api_op_DescribeEphemeris.go index d7a10c82db2..866710b4b99 100644 --- a/service/groundstation/api_op_DescribeEphemeris.go +++ b/service/groundstation/api_op_DescribeEphemeris.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeEphemerisMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEphemerisValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_GetAgentConfiguration.go b/service/groundstation/api_op_GetAgentConfiguration.go index d7b22643d4b..9d2cf1b24b6 100644 --- a/service/groundstation/api_op_GetAgentConfiguration.go +++ b/service/groundstation/api_op_GetAgentConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetAgentConfigurationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_GetConfig.go b/service/groundstation/api_op_GetConfig.go index 3a265cb7472..73a74976384 100644 --- a/service/groundstation/api_op_GetConfig.go +++ b/service/groundstation/api_op_GetConfig.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetConfigMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_GetDataflowEndpointGroup.go b/service/groundstation/api_op_GetDataflowEndpointGroup.go index ee854aebbca..f699cd9e472 100644 --- a/service/groundstation/api_op_GetDataflowEndpointGroup.go +++ b/service/groundstation/api_op_GetDataflowEndpointGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetDataflowEndpointGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataflowEndpointGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_GetMinuteUsage.go b/service/groundstation/api_op_GetMinuteUsage.go index ee15cc7853e..cfc93d6c3a2 100644 --- a/service/groundstation/api_op_GetMinuteUsage.go +++ b/service/groundstation/api_op_GetMinuteUsage.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetMinuteUsageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMinuteUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_GetMissionProfile.go b/service/groundstation/api_op_GetMissionProfile.go index ea3616f433b..6ce25306665 100644 --- a/service/groundstation/api_op_GetMissionProfile.go +++ b/service/groundstation/api_op_GetMissionProfile.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetMissionProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMissionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_GetSatellite.go b/service/groundstation/api_op_GetSatellite.go index 1822b3840e9..67f746a0329 100644 --- a/service/groundstation/api_op_GetSatellite.go +++ b/service/groundstation/api_op_GetSatellite.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetSatelliteMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSatelliteValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_ListConfigs.go b/service/groundstation/api_op_ListConfigs.go index 515059980c4..b48860bfb94 100644 --- a/service/groundstation/api_op_ListConfigs.go +++ b/service/groundstation/api_op_ListConfigs.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListConfigsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigs(options.Region), middleware.Before); err != nil { return err } @@ -133,13 +136,6 @@ func (c *Client) addOperationListConfigsMiddlewares(stack *middleware.Stack, opt return nil } -// ListConfigsAPIClient is a client that implements the ListConfigs operation. -type ListConfigsAPIClient interface { - ListConfigs(context.Context, *ListConfigsInput, ...func(*Options)) (*ListConfigsOutput, error) -} - -var _ ListConfigsAPIClient = (*Client)(nil) - // ListConfigsPaginatorOptions is the paginator options for ListConfigs type ListConfigsPaginatorOptions struct { // Maximum number of Configs returned. @@ -203,6 +199,9 @@ func (p *ListConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListConfigsAPIClient is a client that implements the ListConfigs operation. +type ListConfigsAPIClient interface { + ListConfigs(context.Context, *ListConfigsInput, ...func(*Options)) (*ListConfigsOutput, error) +} + +var _ ListConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListContacts.go b/service/groundstation/api_op_ListContacts.go index ffaddd19bb9..52b26b041a3 100644 --- a/service/groundstation/api_op_ListContacts.go +++ b/service/groundstation/api_op_ListContacts.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListContactsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactsValidationMiddleware(stack); err != nil { return err } @@ -164,13 +167,6 @@ func (c *Client) addOperationListContactsMiddlewares(stack *middleware.Stack, op return nil } -// ListContactsAPIClient is a client that implements the ListContacts operation. -type ListContactsAPIClient interface { - ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) -} - -var _ ListContactsAPIClient = (*Client)(nil) - // ListContactsPaginatorOptions is the paginator options for ListContacts type ListContactsPaginatorOptions struct { // Maximum number of contacts returned. @@ -234,6 +230,9 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListContactsAPIClient is a client that implements the ListContacts operation. +type ListContactsAPIClient interface { + ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) +} + +var _ ListContactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListDataflowEndpointGroups.go b/service/groundstation/api_op_ListDataflowEndpointGroups.go index 0848b83e146..4faf85f889b 100644 --- a/service/groundstation/api_op_ListDataflowEndpointGroups.go +++ b/service/groundstation/api_op_ListDataflowEndpointGroups.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListDataflowEndpointGroupsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataflowEndpointGroups(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListDataflowEndpointGroupsMiddlewares(stack *middle return nil } -// ListDataflowEndpointGroupsAPIClient is a client that implements the -// ListDataflowEndpointGroups operation. -type ListDataflowEndpointGroupsAPIClient interface { - ListDataflowEndpointGroups(context.Context, *ListDataflowEndpointGroupsInput, ...func(*Options)) (*ListDataflowEndpointGroupsOutput, error) -} - -var _ ListDataflowEndpointGroupsAPIClient = (*Client)(nil) - // ListDataflowEndpointGroupsPaginatorOptions is the paginator options for // ListDataflowEndpointGroups type ListDataflowEndpointGroupsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListDataflowEndpointGroupsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataflowEndpointGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListDataflowEndpointGroupsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListDataflowEndpointGroupsAPIClient is a client that implements the +// ListDataflowEndpointGroups operation. +type ListDataflowEndpointGroupsAPIClient interface { + ListDataflowEndpointGroups(context.Context, *ListDataflowEndpointGroupsInput, ...func(*Options)) (*ListDataflowEndpointGroupsOutput, error) +} + +var _ ListDataflowEndpointGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataflowEndpointGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListEphemerides.go b/service/groundstation/api_op_ListEphemerides.go index 88f396804c0..af4d374afcf 100644 --- a/service/groundstation/api_op_ListEphemerides.go +++ b/service/groundstation/api_op_ListEphemerides.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListEphemeridesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEphemeridesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListEphemeridesMiddlewares(stack *middleware.Stack, return nil } -// ListEphemeridesAPIClient is a client that implements the ListEphemerides -// operation. -type ListEphemeridesAPIClient interface { - ListEphemerides(context.Context, *ListEphemeridesInput, ...func(*Options)) (*ListEphemeridesOutput, error) -} - -var _ ListEphemeridesAPIClient = (*Client)(nil) - // ListEphemeridesPaginatorOptions is the paginator options for ListEphemerides type ListEphemeridesPaginatorOptions struct { // Maximum number of ephemerides to return. @@ -226,6 +221,9 @@ func (p *ListEphemeridesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEphemerides(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListEphemeridesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListEphemeridesAPIClient is a client that implements the ListEphemerides +// operation. +type ListEphemeridesAPIClient interface { + ListEphemerides(context.Context, *ListEphemeridesInput, ...func(*Options)) (*ListEphemeridesOutput, error) +} + +var _ ListEphemeridesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEphemerides(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListGroundStations.go b/service/groundstation/api_op_ListGroundStations.go index 2db7dcd9f0c..a3c5768975b 100644 --- a/service/groundstation/api_op_ListGroundStations.go +++ b/service/groundstation/api_op_ListGroundStations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListGroundStationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroundStations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListGroundStationsMiddlewares(stack *middleware.Sta return nil } -// ListGroundStationsAPIClient is a client that implements the ListGroundStations -// operation. -type ListGroundStationsAPIClient interface { - ListGroundStations(context.Context, *ListGroundStationsInput, ...func(*Options)) (*ListGroundStationsOutput, error) -} - -var _ ListGroundStationsAPIClient = (*Client)(nil) - // ListGroundStationsPaginatorOptions is the paginator options for // ListGroundStations type ListGroundStationsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListGroundStationsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroundStations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListGroundStationsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListGroundStationsAPIClient is a client that implements the ListGroundStations +// operation. +type ListGroundStationsAPIClient interface { + ListGroundStations(context.Context, *ListGroundStationsInput, ...func(*Options)) (*ListGroundStationsOutput, error) +} + +var _ ListGroundStationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroundStations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListMissionProfiles.go b/service/groundstation/api_op_ListMissionProfiles.go index ce79842d834..5cac57d61d2 100644 --- a/service/groundstation/api_op_ListMissionProfiles.go +++ b/service/groundstation/api_op_ListMissionProfiles.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListMissionProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMissionProfiles(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListMissionProfilesMiddlewares(stack *middleware.St return nil } -// ListMissionProfilesAPIClient is a client that implements the -// ListMissionProfiles operation. -type ListMissionProfilesAPIClient interface { - ListMissionProfiles(context.Context, *ListMissionProfilesInput, ...func(*Options)) (*ListMissionProfilesOutput, error) -} - -var _ ListMissionProfilesAPIClient = (*Client)(nil) - // ListMissionProfilesPaginatorOptions is the paginator options for // ListMissionProfiles type ListMissionProfilesPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListMissionProfilesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMissionProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListMissionProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListMissionProfilesAPIClient is a client that implements the +// ListMissionProfiles operation. +type ListMissionProfilesAPIClient interface { + ListMissionProfiles(context.Context, *ListMissionProfilesInput, ...func(*Options)) (*ListMissionProfilesOutput, error) +} + +var _ ListMissionProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMissionProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListSatellites.go b/service/groundstation/api_op_ListSatellites.go index 808c2a629c3..7800da239c1 100644 --- a/service/groundstation/api_op_ListSatellites.go +++ b/service/groundstation/api_op_ListSatellites.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListSatellitesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSatellites(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListSatellitesMiddlewares(stack *middleware.Stack, return nil } -// ListSatellitesAPIClient is a client that implements the ListSatellites -// operation. -type ListSatellitesAPIClient interface { - ListSatellites(context.Context, *ListSatellitesInput, ...func(*Options)) (*ListSatellitesOutput, error) -} - -var _ ListSatellitesAPIClient = (*Client)(nil) - // ListSatellitesPaginatorOptions is the paginator options for ListSatellites type ListSatellitesPaginatorOptions struct { // Maximum number of satellites returned. @@ -204,6 +199,9 @@ func (p *ListSatellitesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSatellites(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListSatellitesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListSatellitesAPIClient is a client that implements the ListSatellites +// operation. +type ListSatellitesAPIClient interface { + ListSatellites(context.Context, *ListSatellitesInput, ...func(*Options)) (*ListSatellitesOutput, error) +} + +var _ ListSatellitesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSatellites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/groundstation/api_op_ListTagsForResource.go b/service/groundstation/api_op_ListTagsForResource.go index 2b5662bffd8..d2768aa5a24 100644 --- a/service/groundstation/api_op_ListTagsForResource.go +++ b/service/groundstation/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_RegisterAgent.go b/service/groundstation/api_op_RegisterAgent.go index 9d21ce68b82..4371f8c6e55 100644 --- a/service/groundstation/api_op_RegisterAgent.go +++ b/service/groundstation/api_op_RegisterAgent.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRegisterAgentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterAgentValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_ReserveContact.go b/service/groundstation/api_op_ReserveContact.go index e34ed1ee4e0..ea1e6ea4179 100644 --- a/service/groundstation/api_op_ReserveContact.go +++ b/service/groundstation/api_op_ReserveContact.go @@ -129,6 +129,9 @@ func (c *Client) addOperationReserveContactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReserveContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_TagResource.go b/service/groundstation/api_op_TagResource.go index 405eeca53f1..3540717d6ec 100644 --- a/service/groundstation/api_op_TagResource.go +++ b/service/groundstation/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_UntagResource.go b/service/groundstation/api_op_UntagResource.go index cb945d99659..be2ed205055 100644 --- a/service/groundstation/api_op_UntagResource.go +++ b/service/groundstation/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_UpdateAgentStatus.go b/service/groundstation/api_op_UpdateAgentStatus.go index 325706e6916..9ea245b40e7 100644 --- a/service/groundstation/api_op_UpdateAgentStatus.go +++ b/service/groundstation/api_op_UpdateAgentStatus.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateAgentStatusMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_UpdateConfig.go b/service/groundstation/api_op_UpdateConfig.go index 4b16b0af316..cbc2ef092b2 100644 --- a/service/groundstation/api_op_UpdateConfig.go +++ b/service/groundstation/api_op_UpdateConfig.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateConfigMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_UpdateEphemeris.go b/service/groundstation/api_op_UpdateEphemeris.go index b7a8f4a4bff..ba62ac965cc 100644 --- a/service/groundstation/api_op_UpdateEphemeris.go +++ b/service/groundstation/api_op_UpdateEphemeris.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateEphemerisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEphemerisValidationMiddleware(stack); err != nil { return err } diff --git a/service/groundstation/api_op_UpdateMissionProfile.go b/service/groundstation/api_op_UpdateMissionProfile.go index 58b7f33f1f2..661c7f7bad3 100644 --- a/service/groundstation/api_op_UpdateMissionProfile.go +++ b/service/groundstation/api_op_UpdateMissionProfile.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateMissionProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMissionProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_client.go b/service/guardduty/api_client.go index c2929cead5e..7d99de1a810 100644 --- a/service/guardduty/api_client.go +++ b/service/guardduty/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/guardduty/api_op_AcceptAdministratorInvitation.go b/service/guardduty/api_op_AcceptAdministratorInvitation.go index eacde78dfb1..c3c421f7a91 100644 --- a/service/guardduty/api_op_AcceptAdministratorInvitation.go +++ b/service/guardduty/api_op_AcceptAdministratorInvitation.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAcceptAdministratorInvitationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptAdministratorInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_AcceptInvitation.go b/service/guardduty/api_op_AcceptInvitation.go index 0f1682adf8d..0b0f5307f3c 100644 --- a/service/guardduty/api_op_AcceptInvitation.go +++ b/service/guardduty/api_op_AcceptInvitation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAcceptInvitationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_ArchiveFindings.go b/service/guardduty/api_op_ArchiveFindings.go index 7f3eccec0f8..e398b30edfd 100644 --- a/service/guardduty/api_op_ArchiveFindings.go +++ b/service/guardduty/api_op_ArchiveFindings.go @@ -110,6 +110,9 @@ func (c *Client) addOperationArchiveFindingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpArchiveFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_CreateDetector.go b/service/guardduty/api_op_CreateDetector.go index c8f148eb4dc..390d3a3a086 100644 --- a/service/guardduty/api_op_CreateDetector.go +++ b/service/guardduty/api_op_CreateDetector.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateDetectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDetectorMiddleware(stack, options); err != nil { return err } diff --git a/service/guardduty/api_op_CreateFilter.go b/service/guardduty/api_op_CreateFilter.go index 1718d94334f..fba70d1bc68 100644 --- a/service/guardduty/api_op_CreateFilter.go +++ b/service/guardduty/api_op_CreateFilter.go @@ -358,6 +358,9 @@ func (c *Client) addOperationCreateFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFilterMiddleware(stack, options); err != nil { return err } diff --git a/service/guardduty/api_op_CreateIPSet.go b/service/guardduty/api_op_CreateIPSet.go index c8ba3e81b8d..9843b8cf72f 100644 --- a/service/guardduty/api_op_CreateIPSet.go +++ b/service/guardduty/api_op_CreateIPSet.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIPSetMiddleware(stack, options); err != nil { return err } diff --git a/service/guardduty/api_op_CreateMalwareProtectionPlan.go b/service/guardduty/api_op_CreateMalwareProtectionPlan.go index 17077d31ed0..af8c57b0a25 100644 --- a/service/guardduty/api_op_CreateMalwareProtectionPlan.go +++ b/service/guardduty/api_op_CreateMalwareProtectionPlan.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateMalwareProtectionPlanMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMalwareProtectionPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/guardduty/api_op_CreateMembers.go b/service/guardduty/api_op_CreateMembers.go index a9042009578..47b222f3e59 100644 --- a/service/guardduty/api_op_CreateMembers.go +++ b/service/guardduty/api_op_CreateMembers.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_CreatePublishingDestination.go b/service/guardduty/api_op_CreatePublishingDestination.go index 7bdf7bdadf8..a429cef4922 100644 --- a/service/guardduty/api_op_CreatePublishingDestination.go +++ b/service/guardduty/api_op_CreatePublishingDestination.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreatePublishingDestinationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePublishingDestinationMiddleware(stack, options); err != nil { return err } diff --git a/service/guardduty/api_op_CreateSampleFindings.go b/service/guardduty/api_op_CreateSampleFindings.go index 031d606538c..fce59059e98 100644 --- a/service/guardduty/api_op_CreateSampleFindings.go +++ b/service/guardduty/api_op_CreateSampleFindings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationCreateSampleFindingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSampleFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_CreateThreatIntelSet.go b/service/guardduty/api_op_CreateThreatIntelSet.go index 825d9d160d8..087f10b4093 100644 --- a/service/guardduty/api_op_CreateThreatIntelSet.go +++ b/service/guardduty/api_op_CreateThreatIntelSet.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateThreatIntelSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateThreatIntelSetMiddleware(stack, options); err != nil { return err } diff --git a/service/guardduty/api_op_DeclineInvitations.go b/service/guardduty/api_op_DeclineInvitations.go index f28d7ad9b64..856b872ed98 100644 --- a/service/guardduty/api_op_DeclineInvitations.go +++ b/service/guardduty/api_op_DeclineInvitations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeclineInvitationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeclineInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteDetector.go b/service/guardduty/api_op_DeleteDetector.go index 3fc06ace243..1d0ca51da94 100644 --- a/service/guardduty/api_op_DeleteDetector.go +++ b/service/guardduty/api_op_DeleteDetector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDetectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteFilter.go b/service/guardduty/api_op_DeleteFilter.go index 5bdecc5dfe9..225a18538e7 100644 --- a/service/guardduty/api_op_DeleteFilter.go +++ b/service/guardduty/api_op_DeleteFilter.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteIPSet.go b/service/guardduty/api_op_DeleteIPSet.go index 80a1a43acd4..faa630bb98d 100644 --- a/service/guardduty/api_op_DeleteIPSet.go +++ b/service/guardduty/api_op_DeleteIPSet.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteInvitations.go b/service/guardduty/api_op_DeleteInvitations.go index daecb50cc95..bbdd62e609b 100644 --- a/service/guardduty/api_op_DeleteInvitations.go +++ b/service/guardduty/api_op_DeleteInvitations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteInvitationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteMalwareProtectionPlan.go b/service/guardduty/api_op_DeleteMalwareProtectionPlan.go index b0deec80fb6..dbef7551aa3 100644 --- a/service/guardduty/api_op_DeleteMalwareProtectionPlan.go +++ b/service/guardduty/api_op_DeleteMalwareProtectionPlan.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteMalwareProtectionPlanMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMalwareProtectionPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteMembers.go b/service/guardduty/api_op_DeleteMembers.go index 9dab123b8b4..cfa07ed4d7d 100644 --- a/service/guardduty/api_op_DeleteMembers.go +++ b/service/guardduty/api_op_DeleteMembers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeletePublishingDestination.go b/service/guardduty/api_op_DeletePublishingDestination.go index 7f3bb377d5f..1a4c3733325 100644 --- a/service/guardduty/api_op_DeletePublishingDestination.go +++ b/service/guardduty/api_op_DeletePublishingDestination.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePublishingDestinationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePublishingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DeleteThreatIntelSet.go b/service/guardduty/api_op_DeleteThreatIntelSet.go index 9e22f98a44c..ae4ea4453e7 100644 --- a/service/guardduty/api_op_DeleteThreatIntelSet.go +++ b/service/guardduty/api_op_DeleteThreatIntelSet.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteThreatIntelSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThreatIntelSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DescribeMalwareScans.go b/service/guardduty/api_op_DescribeMalwareScans.go index 03622232460..1207feda804 100644 --- a/service/guardduty/api_op_DescribeMalwareScans.go +++ b/service/guardduty/api_op_DescribeMalwareScans.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeMalwareScansMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMalwareScansValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeMalwareScansMiddlewares(stack *middleware.S return nil } -// DescribeMalwareScansAPIClient is a client that implements the -// DescribeMalwareScans operation. -type DescribeMalwareScansAPIClient interface { - DescribeMalwareScans(context.Context, *DescribeMalwareScansInput, ...func(*Options)) (*DescribeMalwareScansOutput, error) -} - -var _ DescribeMalwareScansAPIClient = (*Client)(nil) - // DescribeMalwareScansPaginatorOptions is the paginator options for // DescribeMalwareScans type DescribeMalwareScansPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeMalwareScansPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMalwareScans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeMalwareScansPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeMalwareScansAPIClient is a client that implements the +// DescribeMalwareScans operation. +type DescribeMalwareScansAPIClient interface { + DescribeMalwareScans(context.Context, *DescribeMalwareScansInput, ...func(*Options)) (*DescribeMalwareScansOutput, error) +} + +var _ DescribeMalwareScansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMalwareScans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_DescribeOrganizationConfiguration.go b/service/guardduty/api_op_DescribeOrganizationConfiguration.go index 9e5c5d701ce..ab4d36cb78c 100644 --- a/service/guardduty/api_op_DescribeOrganizationConfiguration.go +++ b/service/guardduty/api_op_DescribeOrganizationConfiguration.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } @@ -196,14 +199,6 @@ func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack return nil } -// DescribeOrganizationConfigurationAPIClient is a client that implements the -// DescribeOrganizationConfiguration operation. -type DescribeOrganizationConfigurationAPIClient interface { - DescribeOrganizationConfiguration(context.Context, *DescribeOrganizationConfigurationInput, ...func(*Options)) (*DescribeOrganizationConfigurationOutput, error) -} - -var _ DescribeOrganizationConfigurationAPIClient = (*Client)(nil) - // DescribeOrganizationConfigurationPaginatorOptions is the paginator options for // DescribeOrganizationConfiguration type DescribeOrganizationConfigurationPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *DescribeOrganizationConfigurationPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrganizationConfiguration(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *DescribeOrganizationConfigurationPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeOrganizationConfigurationAPIClient is a client that implements the +// DescribeOrganizationConfiguration operation. +type DescribeOrganizationConfigurationAPIClient interface { + DescribeOrganizationConfiguration(context.Context, *DescribeOrganizationConfigurationInput, ...func(*Options)) (*DescribeOrganizationConfigurationOutput, error) +} + +var _ DescribeOrganizationConfigurationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrganizationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_DescribePublishingDestination.go b/service/guardduty/api_op_DescribePublishingDestination.go index 6eda498b93d..291e421faf9 100644 --- a/service/guardduty/api_op_DescribePublishingDestination.go +++ b/service/guardduty/api_op_DescribePublishingDestination.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribePublishingDestinationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePublishingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DisableOrganizationAdminAccount.go b/service/guardduty/api_op_DisableOrganizationAdminAccount.go index f0dc8cfacf2..12d7b5bf620 100644 --- a/service/guardduty/api_op_DisableOrganizationAdminAccount.go +++ b/service/guardduty/api_op_DisableOrganizationAdminAccount.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDisableOrganizationAdminAccountMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DisassociateFromAdministratorAccount.go b/service/guardduty/api_op_DisassociateFromAdministratorAccount.go index df914b6c227..003b5e9243a 100644 --- a/service/guardduty/api_op_DisassociateFromAdministratorAccount.go +++ b/service/guardduty/api_op_DisassociateFromAdministratorAccount.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateFromAdministratorAccountMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFromAdministratorAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DisassociateFromMasterAccount.go b/service/guardduty/api_op_DisassociateFromMasterAccount.go index f4231b2b6f4..76e29e807bf 100644 --- a/service/guardduty/api_op_DisassociateFromMasterAccount.go +++ b/service/guardduty/api_op_DisassociateFromMasterAccount.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateFromMasterAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFromMasterAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_DisassociateMembers.go b/service/guardduty/api_op_DisassociateMembers.go index 1a28e5d884e..e3d89b74ad3 100644 --- a/service/guardduty/api_op_DisassociateMembers.go +++ b/service/guardduty/api_op_DisassociateMembers.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDisassociateMembersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_EnableOrganizationAdminAccount.go b/service/guardduty/api_op_EnableOrganizationAdminAccount.go index b8d320028da..600954d9dbb 100644 --- a/service/guardduty/api_op_EnableOrganizationAdminAccount.go +++ b/service/guardduty/api_op_EnableOrganizationAdminAccount.go @@ -104,6 +104,9 @@ func (c *Client) addOperationEnableOrganizationAdminAccountMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetAdministratorAccount.go b/service/guardduty/api_op_GetAdministratorAccount.go index d2f6e78b857..5c353be015c 100644 --- a/service/guardduty/api_op_GetAdministratorAccount.go +++ b/service/guardduty/api_op_GetAdministratorAccount.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAdministratorAccountMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAdministratorAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetCoverageStatistics.go b/service/guardduty/api_op_GetCoverageStatistics.go index 31d3d2e6636..cbbcb5f12d3 100644 --- a/service/guardduty/api_op_GetCoverageStatistics.go +++ b/service/guardduty/api_op_GetCoverageStatistics.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetCoverageStatisticsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoverageStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetDetector.go b/service/guardduty/api_op_GetDetector.go index 76640f1ea79..2dcc21f4192 100644 --- a/service/guardduty/api_op_GetDetector.go +++ b/service/guardduty/api_op_GetDetector.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetDetectorMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetFilter.go b/service/guardduty/api_op_GetFilter.go index 535f9ac4177..d09a7fffd83 100644 --- a/service/guardduty/api_op_GetFilter.go +++ b/service/guardduty/api_op_GetFilter.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetFilterMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetFindings.go b/service/guardduty/api_op_GetFindings.go index 4979e9ea2f3..b7b8b2f6f3d 100644 --- a/service/guardduty/api_op_GetFindings.go +++ b/service/guardduty/api_op_GetFindings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetFindingsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetFindingsStatistics.go b/service/guardduty/api_op_GetFindingsStatistics.go index 414e97c5127..d5337640fea 100644 --- a/service/guardduty/api_op_GetFindingsStatistics.go +++ b/service/guardduty/api_op_GetFindingsStatistics.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetFindingsStatisticsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingsStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetIPSet.go b/service/guardduty/api_op_GetIPSet.go index cbb8bb666c2..f6b57c33814 100644 --- a/service/guardduty/api_op_GetIPSet.go +++ b/service/guardduty/api_op_GetIPSet.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetIPSetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetInvitationsCount.go b/service/guardduty/api_op_GetInvitationsCount.go index cc82fb5d8bd..a0d46379ced 100644 --- a/service/guardduty/api_op_GetInvitationsCount.go +++ b/service/guardduty/api_op_GetInvitationsCount.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetInvitationsCountMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInvitationsCount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/guardduty/api_op_GetMalwareProtectionPlan.go b/service/guardduty/api_op_GetMalwareProtectionPlan.go index 1fe44b5abce..c677f4e144a 100644 --- a/service/guardduty/api_op_GetMalwareProtectionPlan.go +++ b/service/guardduty/api_op_GetMalwareProtectionPlan.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetMalwareProtectionPlanMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMalwareProtectionPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetMalwareScanSettings.go b/service/guardduty/api_op_GetMalwareScanSettings.go index 7f3808223d7..b0267efa2df 100644 --- a/service/guardduty/api_op_GetMalwareScanSettings.go +++ b/service/guardduty/api_op_GetMalwareScanSettings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetMalwareScanSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMalwareScanSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetMasterAccount.go b/service/guardduty/api_op_GetMasterAccount.go index 72b9f26116c..8399df8d11a 100644 --- a/service/guardduty/api_op_GetMasterAccount.go +++ b/service/guardduty/api_op_GetMasterAccount.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetMasterAccountMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMasterAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetMemberDetectors.go b/service/guardduty/api_op_GetMemberDetectors.go index a5329673900..41ea040e3f1 100644 --- a/service/guardduty/api_op_GetMemberDetectors.go +++ b/service/guardduty/api_op_GetMemberDetectors.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetMemberDetectorsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMemberDetectorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetMembers.go b/service/guardduty/api_op_GetMembers.go index 19e581a21b4..381b8796175 100644 --- a/service/guardduty/api_op_GetMembers.go +++ b/service/guardduty/api_op_GetMembers.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetMembersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetOrganizationStatistics.go b/service/guardduty/api_op_GetOrganizationStatistics.go index 72f6a259ec5..e046892f4aa 100644 --- a/service/guardduty/api_op_GetOrganizationStatistics.go +++ b/service/guardduty/api_op_GetOrganizationStatistics.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetOrganizationStatisticsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOrganizationStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/guardduty/api_op_GetRemainingFreeTrialDays.go b/service/guardduty/api_op_GetRemainingFreeTrialDays.go index a29158b18fe..46d648c0266 100644 --- a/service/guardduty/api_op_GetRemainingFreeTrialDays.go +++ b/service/guardduty/api_op_GetRemainingFreeTrialDays.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetRemainingFreeTrialDaysMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRemainingFreeTrialDaysValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetThreatIntelSet.go b/service/guardduty/api_op_GetThreatIntelSet.go index 42213f72e9d..25e17a76b27 100644 --- a/service/guardduty/api_op_GetThreatIntelSet.go +++ b/service/guardduty/api_op_GetThreatIntelSet.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetThreatIntelSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetThreatIntelSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_GetUsageStatistics.go b/service/guardduty/api_op_GetUsageStatistics.go index 9c7d3389589..f37b53611c2 100644 --- a/service/guardduty/api_op_GetUsageStatistics.go +++ b/service/guardduty/api_op_GetUsageStatistics.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetUsageStatisticsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsageStatisticsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationGetUsageStatisticsMiddlewares(stack *middleware.Sta return nil } -// GetUsageStatisticsAPIClient is a client that implements the GetUsageStatistics -// operation. -type GetUsageStatisticsAPIClient interface { - GetUsageStatistics(context.Context, *GetUsageStatisticsInput, ...func(*Options)) (*GetUsageStatisticsOutput, error) -} - -var _ GetUsageStatisticsAPIClient = (*Client)(nil) - // GetUsageStatisticsPaginatorOptions is the paginator options for // GetUsageStatistics type GetUsageStatisticsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *GetUsageStatisticsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUsageStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *GetUsageStatisticsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetUsageStatisticsAPIClient is a client that implements the GetUsageStatistics +// operation. +type GetUsageStatisticsAPIClient interface { + GetUsageStatistics(context.Context, *GetUsageStatisticsInput, ...func(*Options)) (*GetUsageStatisticsOutput, error) +} + +var _ GetUsageStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUsageStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_InviteMembers.go b/service/guardduty/api_op_InviteMembers.go index 1a9ca8ab5c1..3a92fee228f 100644 --- a/service/guardduty/api_op_InviteMembers.go +++ b/service/guardduty/api_op_InviteMembers.go @@ -160,6 +160,9 @@ func (c *Client) addOperationInviteMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInviteMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_ListCoverage.go b/service/guardduty/api_op_ListCoverage.go index f16ed2294a5..537c00188f8 100644 --- a/service/guardduty/api_op_ListCoverage.go +++ b/service/guardduty/api_op_ListCoverage.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListCoverageMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCoverageValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListCoverageMiddlewares(stack *middleware.Stack, op return nil } -// ListCoverageAPIClient is a client that implements the ListCoverage operation. -type ListCoverageAPIClient interface { - ListCoverage(context.Context, *ListCoverageInput, ...func(*Options)) (*ListCoverageOutput, error) -} - -var _ ListCoverageAPIClient = (*Client)(nil) - // ListCoveragePaginatorOptions is the paginator options for ListCoverage type ListCoveragePaginatorOptions struct { // The maximum number of results to return in the response. @@ -226,6 +222,9 @@ func (p *ListCoveragePaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCoverage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListCoveragePaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListCoverageAPIClient is a client that implements the ListCoverage operation. +type ListCoverageAPIClient interface { + ListCoverage(context.Context, *ListCoverageInput, ...func(*Options)) (*ListCoverageOutput, error) +} + +var _ ListCoverageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCoverage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListDetectors.go b/service/guardduty/api_op_ListDetectors.go index 879bf0aa9c7..464f69eec99 100644 --- a/service/guardduty/api_op_ListDetectors.go +++ b/service/guardduty/api_op_ListDetectors.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListDetectorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDetectors(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListDetectorsMiddlewares(stack *middleware.Stack, o return nil } -// ListDetectorsAPIClient is a client that implements the ListDetectors operation. -type ListDetectorsAPIClient interface { - ListDetectors(context.Context, *ListDetectorsInput, ...func(*Options)) (*ListDetectorsOutput, error) -} - -var _ ListDetectorsAPIClient = (*Client)(nil) - // ListDetectorsPaginatorOptions is the paginator options for ListDetectors type ListDetectorsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items that you @@ -208,6 +204,9 @@ func (p *ListDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDetectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListDetectorsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDetectorsAPIClient is a client that implements the ListDetectors operation. +type ListDetectorsAPIClient interface { + ListDetectors(context.Context, *ListDetectorsInput, ...func(*Options)) (*ListDetectorsOutput, error) +} + +var _ ListDetectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDetectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListFilters.go b/service/guardduty/api_op_ListFilters.go index 82dcaca924a..606f7b9f882 100644 --- a/service/guardduty/api_op_ListFilters.go +++ b/service/guardduty/api_op_ListFilters.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFiltersValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, opt return nil } -// ListFiltersAPIClient is a client that implements the ListFilters operation. -type ListFiltersAPIClient interface { - ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) -} - -var _ ListFiltersAPIClient = (*Client)(nil) - // ListFiltersPaginatorOptions is the paginator options for ListFilters type ListFiltersPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items that you @@ -216,6 +212,9 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListFiltersAPIClient is a client that implements the ListFilters operation. +type ListFiltersAPIClient interface { + ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) +} + +var _ ListFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListFindings.go b/service/guardduty/api_op_ListFindings.go index 4ec357293ca..16425441597 100644 --- a/service/guardduty/api_op_ListFindings.go +++ b/service/guardduty/api_op_ListFindings.go @@ -240,6 +240,9 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsValidationMiddleware(stack); err != nil { return err } @@ -264,13 +267,6 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op return nil } -// ListFindingsAPIClient is a client that implements the ListFindings operation. -type ListFindingsAPIClient interface { - ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) -} - -var _ ListFindingsAPIClient = (*Client)(nil) - // ListFindingsPaginatorOptions is the paginator options for ListFindings type ListFindingsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -335,6 +331,9 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -354,6 +353,13 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListFindingsAPIClient is a client that implements the ListFindings operation. +type ListFindingsAPIClient interface { + ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) +} + +var _ ListFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListIPSets.go b/service/guardduty/api_op_ListIPSets.go index 8d54ac27db4..0cbeba85252 100644 --- a/service/guardduty/api_op_ListIPSets.go +++ b/service/guardduty/api_op_ListIPSets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListIPSetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIPSetsValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListIPSetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListIPSetsAPIClient is a client that implements the ListIPSets operation. -type ListIPSetsAPIClient interface { - ListIPSets(context.Context, *ListIPSetsInput, ...func(*Options)) (*ListIPSetsOutput, error) -} - -var _ ListIPSetsAPIClient = (*Client)(nil) - // ListIPSetsPaginatorOptions is the paginator options for ListIPSets type ListIPSetsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -218,6 +214,9 @@ func (p *ListIPSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIPSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListIPSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListIPSetsAPIClient is a client that implements the ListIPSets operation. +type ListIPSetsAPIClient interface { + ListIPSets(context.Context, *ListIPSetsInput, ...func(*Options)) (*ListIPSetsOutput, error) +} + +var _ ListIPSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIPSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListInvitations.go b/service/guardduty/api_op_ListInvitations.go index f7145a9b61c..9b128581b5d 100644 --- a/service/guardduty/api_op_ListInvitations.go +++ b/service/guardduty/api_op_ListInvitations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInvitations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, return nil } -// ListInvitationsAPIClient is a client that implements the ListInvitations -// operation. -type ListInvitationsAPIClient interface { - ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) -} - -var _ ListInvitationsAPIClient = (*Client)(nil) - // ListInvitationsPaginatorOptions is the paginator options for ListInvitations type ListInvitationsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items that you @@ -209,6 +204,9 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListInvitationsAPIClient is a client that implements the ListInvitations +// operation. +type ListInvitationsAPIClient interface { + ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) +} + +var _ ListInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListMalwareProtectionPlans.go b/service/guardduty/api_op_ListMalwareProtectionPlans.go index 64d25b7d013..611ffe3e0b5 100644 --- a/service/guardduty/api_op_ListMalwareProtectionPlans.go +++ b/service/guardduty/api_op_ListMalwareProtectionPlans.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListMalwareProtectionPlansMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMalwareProtectionPlans(options.Region), middleware.Before); err != nil { return err } diff --git a/service/guardduty/api_op_ListMembers.go b/service/guardduty/api_op_ListMembers.go index c80118a4f87..3f70f8d1390 100644 --- a/service/guardduty/api_op_ListMembers.go +++ b/service/guardduty/api_op_ListMembers.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMembersValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -227,6 +223,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListOrganizationAdminAccounts.go b/service/guardduty/api_op_ListOrganizationAdminAccounts.go index b363b6c86cc..98e5aaeb47c 100644 --- a/service/guardduty/api_op_ListOrganizationAdminAccounts.go +++ b/service/guardduty/api_op_ListOrganizationAdminAccounts.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationAdminAccounts(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid return nil } -// ListOrganizationAdminAccountsAPIClient is a client that implements the -// ListOrganizationAdminAccounts operation. -type ListOrganizationAdminAccountsAPIClient interface { - ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) -} - -var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) - // ListOrganizationAdminAccountsPaginatorOptions is the paginator options for // ListOrganizationAdminAccounts type ListOrganizationAdminAccountsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationAdminAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListOrganizationAdminAccountsAPIClient is a client that implements the +// ListOrganizationAdminAccounts operation. +type ListOrganizationAdminAccountsAPIClient interface { + ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) +} + +var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationAdminAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListPublishingDestinations.go b/service/guardduty/api_op_ListPublishingDestinations.go index d05a846944a..bb4d6070bcd 100644 --- a/service/guardduty/api_op_ListPublishingDestinations.go +++ b/service/guardduty/api_op_ListPublishingDestinations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListPublishingDestinationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPublishingDestinationsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListPublishingDestinationsMiddlewares(stack *middle return nil } -// ListPublishingDestinationsAPIClient is a client that implements the -// ListPublishingDestinations operation. -type ListPublishingDestinationsAPIClient interface { - ListPublishingDestinations(context.Context, *ListPublishingDestinationsInput, ...func(*Options)) (*ListPublishingDestinationsOutput, error) -} - -var _ ListPublishingDestinationsAPIClient = (*Client)(nil) - // ListPublishingDestinationsPaginatorOptions is the paginator options for // ListPublishingDestinations type ListPublishingDestinationsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListPublishingDestinationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPublishingDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListPublishingDestinationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPublishingDestinationsAPIClient is a client that implements the +// ListPublishingDestinations operation. +type ListPublishingDestinationsAPIClient interface { + ListPublishingDestinations(context.Context, *ListPublishingDestinationsInput, ...func(*Options)) (*ListPublishingDestinationsOutput, error) +} + +var _ ListPublishingDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPublishingDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_ListTagsForResource.go b/service/guardduty/api_op_ListTagsForResource.go index 4321fd85986..215a9e0e147 100644 --- a/service/guardduty/api_op_ListTagsForResource.go +++ b/service/guardduty/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_ListThreatIntelSets.go b/service/guardduty/api_op_ListThreatIntelSets.go index 44a71650c3b..318184ca33e 100644 --- a/service/guardduty/api_op_ListThreatIntelSets.go +++ b/service/guardduty/api_op_ListThreatIntelSets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListThreatIntelSetsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThreatIntelSetsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListThreatIntelSetsMiddlewares(stack *middleware.St return nil } -// ListThreatIntelSetsAPIClient is a client that implements the -// ListThreatIntelSets operation. -type ListThreatIntelSetsAPIClient interface { - ListThreatIntelSets(context.Context, *ListThreatIntelSetsInput, ...func(*Options)) (*ListThreatIntelSetsOutput, error) -} - -var _ ListThreatIntelSetsAPIClient = (*Client)(nil) - // ListThreatIntelSetsPaginatorOptions is the paginator options for // ListThreatIntelSets type ListThreatIntelSetsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListThreatIntelSetsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThreatIntelSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListThreatIntelSetsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListThreatIntelSetsAPIClient is a client that implements the +// ListThreatIntelSets operation. +type ListThreatIntelSetsAPIClient interface { + ListThreatIntelSets(context.Context, *ListThreatIntelSetsInput, ...func(*Options)) (*ListThreatIntelSetsOutput, error) +} + +var _ ListThreatIntelSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThreatIntelSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/guardduty/api_op_StartMalwareScan.go b/service/guardduty/api_op_StartMalwareScan.go index 9a97d1104ae..dc6457afbc4 100644 --- a/service/guardduty/api_op_StartMalwareScan.go +++ b/service/guardduty/api_op_StartMalwareScan.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartMalwareScanMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMalwareScanValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_StartMonitoringMembers.go b/service/guardduty/api_op_StartMonitoringMembers.go index 2b1bf4817bd..fdb47114936 100644 --- a/service/guardduty/api_op_StartMonitoringMembers.go +++ b/service/guardduty/api_op_StartMonitoringMembers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartMonitoringMembersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMonitoringMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_StopMonitoringMembers.go b/service/guardduty/api_op_StopMonitoringMembers.go index a539a87b87c..8aa3ec23988 100644 --- a/service/guardduty/api_op_StopMonitoringMembers.go +++ b/service/guardduty/api_op_StopMonitoringMembers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStopMonitoringMembersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMonitoringMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_TagResource.go b/service/guardduty/api_op_TagResource.go index d9451c53815..e9649db7191 100644 --- a/service/guardduty/api_op_TagResource.go +++ b/service/guardduty/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UnarchiveFindings.go b/service/guardduty/api_op_UnarchiveFindings.go index 3017a00537b..547e261fb60 100644 --- a/service/guardduty/api_op_UnarchiveFindings.go +++ b/service/guardduty/api_op_UnarchiveFindings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUnarchiveFindingsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnarchiveFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UntagResource.go b/service/guardduty/api_op_UntagResource.go index 49768469602..651dd572834 100644 --- a/service/guardduty/api_op_UntagResource.go +++ b/service/guardduty/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateDetector.go b/service/guardduty/api_op_UpdateDetector.go index a0ff4012321..f819fdd4472 100644 --- a/service/guardduty/api_op_UpdateDetector.go +++ b/service/guardduty/api_op_UpdateDetector.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateDetectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateFilter.go b/service/guardduty/api_op_UpdateFilter.go index f8719bc6251..c64fc155a27 100644 --- a/service/guardduty/api_op_UpdateFilter.go +++ b/service/guardduty/api_op_UpdateFilter.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateFindingsFeedback.go b/service/guardduty/api_op_UpdateFindingsFeedback.go index 94e11841322..e9ea5080402 100644 --- a/service/guardduty/api_op_UpdateFindingsFeedback.go +++ b/service/guardduty/api_op_UpdateFindingsFeedback.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateFindingsFeedbackMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFindingsFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateIPSet.go b/service/guardduty/api_op_UpdateIPSet.go index ce384da4e42..36fd534b300 100644 --- a/service/guardduty/api_op_UpdateIPSet.go +++ b/service/guardduty/api_op_UpdateIPSet.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateMalwareProtectionPlan.go b/service/guardduty/api_op_UpdateMalwareProtectionPlan.go index acaa2460cad..e0ffc764cbb 100644 --- a/service/guardduty/api_op_UpdateMalwareProtectionPlan.go +++ b/service/guardduty/api_op_UpdateMalwareProtectionPlan.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateMalwareProtectionPlanMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMalwareProtectionPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateMalwareScanSettings.go b/service/guardduty/api_op_UpdateMalwareScanSettings.go index 1c3ab3b72de..3d20f2f6bea 100644 --- a/service/guardduty/api_op_UpdateMalwareScanSettings.go +++ b/service/guardduty/api_op_UpdateMalwareScanSettings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateMalwareScanSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMalwareScanSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateMemberDetectors.go b/service/guardduty/api_op_UpdateMemberDetectors.go index f0c7fa3dbea..1b7805b3ec7 100644 --- a/service/guardduty/api_op_UpdateMemberDetectors.go +++ b/service/guardduty/api_op_UpdateMemberDetectors.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateMemberDetectorsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMemberDetectorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateOrganizationConfiguration.go b/service/guardduty/api_op_UpdateOrganizationConfiguration.go index 85659de3989..f177deac162 100644 --- a/service/guardduty/api_op_UpdateOrganizationConfiguration.go +++ b/service/guardduty/api_op_UpdateOrganizationConfiguration.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdateOrganizationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdatePublishingDestination.go b/service/guardduty/api_op_UpdatePublishingDestination.go index d4b8585ea9f..7ee3f8186e2 100644 --- a/service/guardduty/api_op_UpdatePublishingDestination.go +++ b/service/guardduty/api_op_UpdatePublishingDestination.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdatePublishingDestinationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePublishingDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/guardduty/api_op_UpdateThreatIntelSet.go b/service/guardduty/api_op_UpdateThreatIntelSet.go index b897ce86e86..7ad17bf9b43 100644 --- a/service/guardduty/api_op_UpdateThreatIntelSet.go +++ b/service/guardduty/api_op_UpdateThreatIntelSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateThreatIntelSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThreatIntelSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/health/api_client.go b/service/health/api_client.go index d6bf6ce9f0e..57aacb3d020 100644 --- a/service/health/api_client.go +++ b/service/health/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/health/api_op_DescribeAffectedAccountsForOrganization.go b/service/health/api_op_DescribeAffectedAccountsForOrganization.go index e377d132ff7..eaf6f989e1b 100644 --- a/service/health/api_op_DescribeAffectedAccountsForOrganization.go +++ b/service/health/api_op_DescribeAffectedAccountsForOrganization.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeAffectedAccountsForOrganizationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAffectedAccountsForOrganizationValidationMiddleware(stack); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationDescribeAffectedAccountsForOrganizationMiddlewares( return nil } -// DescribeAffectedAccountsForOrganizationAPIClient is a client that implements -// the DescribeAffectedAccountsForOrganization operation. -type DescribeAffectedAccountsForOrganizationAPIClient interface { - DescribeAffectedAccountsForOrganization(context.Context, *DescribeAffectedAccountsForOrganizationInput, ...func(*Options)) (*DescribeAffectedAccountsForOrganizationOutput, error) -} - -var _ DescribeAffectedAccountsForOrganizationAPIClient = (*Client)(nil) - // DescribeAffectedAccountsForOrganizationPaginatorOptions is the paginator // options for DescribeAffectedAccountsForOrganization type DescribeAffectedAccountsForOrganizationPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *DescribeAffectedAccountsForOrganizationPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAffectedAccountsForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *DescribeAffectedAccountsForOrganizationPaginator) NextPage(ctx context. return result, nil } +// DescribeAffectedAccountsForOrganizationAPIClient is a client that implements +// the DescribeAffectedAccountsForOrganization operation. +type DescribeAffectedAccountsForOrganizationAPIClient interface { + DescribeAffectedAccountsForOrganization(context.Context, *DescribeAffectedAccountsForOrganizationInput, ...func(*Options)) (*DescribeAffectedAccountsForOrganizationOutput, error) +} + +var _ DescribeAffectedAccountsForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAffectedAccountsForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeAffectedEntities.go b/service/health/api_op_DescribeAffectedEntities.go index 8fc449d2045..aa6a8689953 100644 --- a/service/health/api_op_DescribeAffectedEntities.go +++ b/service/health/api_op_DescribeAffectedEntities.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeAffectedEntitiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAffectedEntitiesValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationDescribeAffectedEntitiesMiddlewares(stack *middlewa return nil } -// DescribeAffectedEntitiesAPIClient is a client that implements the -// DescribeAffectedEntities operation. -type DescribeAffectedEntitiesAPIClient interface { - DescribeAffectedEntities(context.Context, *DescribeAffectedEntitiesInput, ...func(*Options)) (*DescribeAffectedEntitiesOutput, error) -} - -var _ DescribeAffectedEntitiesAPIClient = (*Client)(nil) - // DescribeAffectedEntitiesPaginatorOptions is the paginator options for // DescribeAffectedEntities type DescribeAffectedEntitiesPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeAffectedEntitiesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAffectedEntities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeAffectedEntitiesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeAffectedEntitiesAPIClient is a client that implements the +// DescribeAffectedEntities operation. +type DescribeAffectedEntitiesAPIClient interface { + DescribeAffectedEntities(context.Context, *DescribeAffectedEntitiesInput, ...func(*Options)) (*DescribeAffectedEntitiesOutput, error) +} + +var _ DescribeAffectedEntitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAffectedEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeAffectedEntitiesForOrganization.go b/service/health/api_op_DescribeAffectedEntitiesForOrganization.go index 31aea39e5db..22905b7df6b 100644 --- a/service/health/api_op_DescribeAffectedEntitiesForOrganization.go +++ b/service/health/api_op_DescribeAffectedEntitiesForOrganization.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeAffectedEntitiesForOrganizationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAffectedEntitiesForOrganizationValidationMiddleware(stack); err != nil { return err } @@ -181,14 +184,6 @@ func (c *Client) addOperationDescribeAffectedEntitiesForOrganizationMiddlewares( return nil } -// DescribeAffectedEntitiesForOrganizationAPIClient is a client that implements -// the DescribeAffectedEntitiesForOrganization operation. -type DescribeAffectedEntitiesForOrganizationAPIClient interface { - DescribeAffectedEntitiesForOrganization(context.Context, *DescribeAffectedEntitiesForOrganizationInput, ...func(*Options)) (*DescribeAffectedEntitiesForOrganizationOutput, error) -} - -var _ DescribeAffectedEntitiesForOrganizationAPIClient = (*Client)(nil) - // DescribeAffectedEntitiesForOrganizationPaginatorOptions is the paginator // options for DescribeAffectedEntitiesForOrganization type DescribeAffectedEntitiesForOrganizationPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *DescribeAffectedEntitiesForOrganizationPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAffectedEntitiesForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *DescribeAffectedEntitiesForOrganizationPaginator) NextPage(ctx context. return result, nil } +// DescribeAffectedEntitiesForOrganizationAPIClient is a client that implements +// the DescribeAffectedEntitiesForOrganization operation. +type DescribeAffectedEntitiesForOrganizationAPIClient interface { + DescribeAffectedEntitiesForOrganization(context.Context, *DescribeAffectedEntitiesForOrganizationInput, ...func(*Options)) (*DescribeAffectedEntitiesForOrganizationOutput, error) +} + +var _ DescribeAffectedEntitiesForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAffectedEntitiesForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeEntityAggregates.go b/service/health/api_op_DescribeEntityAggregates.go index 50bd8392cad..2cc7e7c83d0 100644 --- a/service/health/api_op_DescribeEntityAggregates.go +++ b/service/health/api_op_DescribeEntityAggregates.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeEntityAggregatesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEntityAggregates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/health/api_op_DescribeEntityAggregatesForOrganization.go b/service/health/api_op_DescribeEntityAggregatesForOrganization.go index ab0f8693164..30c7e58d663 100644 --- a/service/health/api_op_DescribeEntityAggregatesForOrganization.go +++ b/service/health/api_op_DescribeEntityAggregatesForOrganization.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeEntityAggregatesForOrganizationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntityAggregatesForOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/health/api_op_DescribeEventAggregates.go b/service/health/api_op_DescribeEventAggregates.go index 4018ba9e947..042b60c89cf 100644 --- a/service/health/api_op_DescribeEventAggregates.go +++ b/service/health/api_op_DescribeEventAggregates.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeEventAggregatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventAggregatesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeEventAggregatesMiddlewares(stack *middlewar return nil } -// DescribeEventAggregatesAPIClient is a client that implements the -// DescribeEventAggregates operation. -type DescribeEventAggregatesAPIClient interface { - DescribeEventAggregates(context.Context, *DescribeEventAggregatesInput, ...func(*Options)) (*DescribeEventAggregatesOutput, error) -} - -var _ DescribeEventAggregatesAPIClient = (*Client)(nil) - // DescribeEventAggregatesPaginatorOptions is the paginator options for // DescribeEventAggregates type DescribeEventAggregatesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeEventAggregatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventAggregates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeEventAggregatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeEventAggregatesAPIClient is a client that implements the +// DescribeEventAggregates operation. +type DescribeEventAggregatesAPIClient interface { + DescribeEventAggregates(context.Context, *DescribeEventAggregatesInput, ...func(*Options)) (*DescribeEventAggregatesOutput, error) +} + +var _ DescribeEventAggregatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventAggregates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeEventDetails.go b/service/health/api_op_DescribeEventDetails.go index 0a898265c31..383796e27fd 100644 --- a/service/health/api_op_DescribeEventDetails.go +++ b/service/health/api_op_DescribeEventDetails.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeEventDetailsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/health/api_op_DescribeEventDetailsForOrganization.go b/service/health/api_op_DescribeEventDetailsForOrganization.go index 9a0b78f03f4..2c560ab9808 100644 --- a/service/health/api_op_DescribeEventDetailsForOrganization.go +++ b/service/health/api_op_DescribeEventDetailsForOrganization.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeEventDetailsForOrganizationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventDetailsForOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/health/api_op_DescribeEventTypes.go b/service/health/api_op_DescribeEventTypes.go index 8c2ecf14703..5a7a058287f 100644 --- a/service/health/api_op_DescribeEventTypes.go +++ b/service/health/api_op_DescribeEventTypes.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeEventTypesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventTypes(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeEventTypesMiddlewares(stack *middleware.Sta return nil } -// DescribeEventTypesAPIClient is a client that implements the DescribeEventTypes -// operation. -type DescribeEventTypesAPIClient interface { - DescribeEventTypes(context.Context, *DescribeEventTypesInput, ...func(*Options)) (*DescribeEventTypesOutput, error) -} - -var _ DescribeEventTypesAPIClient = (*Client)(nil) - // DescribeEventTypesPaginatorOptions is the paginator options for // DescribeEventTypes type DescribeEventTypesPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeEventTypesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeEventTypesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeEventTypesAPIClient is a client that implements the DescribeEventTypes +// operation. +type DescribeEventTypesAPIClient interface { + DescribeEventTypes(context.Context, *DescribeEventTypesInput, ...func(*Options)) (*DescribeEventTypesOutput, error) +} + +var _ DescribeEventTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeEvents.go b/service/health/api_op_DescribeEvents.go index b8984fd21e3..42147708e6f 100644 --- a/service/health/api_op_DescribeEvents.go +++ b/service/health/api_op_DescribeEvents.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of items to return in one batch, between 10 and 100, @@ -241,6 +236,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeEventsForOrganization.go b/service/health/api_op_DescribeEventsForOrganization.go index f61da5885c9..5294a2b2317 100644 --- a/service/health/api_op_DescribeEventsForOrganization.go +++ b/service/health/api_op_DescribeEventsForOrganization.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeEventsForOrganizationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventsForOrganization(options.Region), middleware.Before); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationDescribeEventsForOrganizationMiddlewares(stack *mid return nil } -// DescribeEventsForOrganizationAPIClient is a client that implements the -// DescribeEventsForOrganization operation. -type DescribeEventsForOrganizationAPIClient interface { - DescribeEventsForOrganization(context.Context, *DescribeEventsForOrganizationInput, ...func(*Options)) (*DescribeEventsForOrganizationOutput, error) -} - -var _ DescribeEventsForOrganizationAPIClient = (*Client)(nil) - // DescribeEventsForOrganizationPaginatorOptions is the paginator options for // DescribeEventsForOrganization type DescribeEventsForOrganizationPaginatorOptions struct { @@ -252,6 +247,9 @@ func (p *DescribeEventsForOrganizationPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventsForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *DescribeEventsForOrganizationPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeEventsForOrganizationAPIClient is a client that implements the +// DescribeEventsForOrganization operation. +type DescribeEventsForOrganizationAPIClient interface { + DescribeEventsForOrganization(context.Context, *DescribeEventsForOrganizationInput, ...func(*Options)) (*DescribeEventsForOrganizationOutput, error) +} + +var _ DescribeEventsForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventsForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/health/api_op_DescribeHealthServiceStatusForOrganization.go b/service/health/api_op_DescribeHealthServiceStatusForOrganization.go index fbb55ce8f2f..3648a886015 100644 --- a/service/health/api_op_DescribeHealthServiceStatusForOrganization.go +++ b/service/health/api_op_DescribeHealthServiceStatusForOrganization.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeHealthServiceStatusForOrganizationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHealthServiceStatusForOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/health/api_op_DisableHealthServiceAccessForOrganization.go b/service/health/api_op_DisableHealthServiceAccessForOrganization.go index f7fdf14e2b6..bb0391814a2 100644 --- a/service/health/api_op_DisableHealthServiceAccessForOrganization.go +++ b/service/health/api_op_DisableHealthServiceAccessForOrganization.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisableHealthServiceAccessForOrganizationMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableHealthServiceAccessForOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/health/api_op_EnableHealthServiceAccessForOrganization.go b/service/health/api_op_EnableHealthServiceAccessForOrganization.go index d593d1a65b2..189b0258b2d 100644 --- a/service/health/api_op_EnableHealthServiceAccessForOrganization.go +++ b/service/health/api_op_EnableHealthServiceAccessForOrganization.go @@ -118,6 +118,9 @@ func (c *Client) addOperationEnableHealthServiceAccessForOrganizationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableHealthServiceAccessForOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/healthlake/api_client.go b/service/healthlake/api_client.go index 488fade90bc..e337e329a37 100644 --- a/service/healthlake/api_client.go +++ b/service/healthlake/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/healthlake/api_op_CreateFHIRDatastore.go b/service/healthlake/api_op_CreateFHIRDatastore.go index 2265d2f9753..f27c3f630d7 100644 --- a/service/healthlake/api_op_CreateFHIRDatastore.go +++ b/service/healthlake/api_op_CreateFHIRDatastore.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateFHIRDatastoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFHIRDatastoreMiddleware(stack, options); err != nil { return err } diff --git a/service/healthlake/api_op_DeleteFHIRDatastore.go b/service/healthlake/api_op_DeleteFHIRDatastore.go index d228844c943..8e5f081a82a 100644 --- a/service/healthlake/api_op_DeleteFHIRDatastore.go +++ b/service/healthlake/api_op_DeleteFHIRDatastore.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteFHIRDatastoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFHIRDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/healthlake/api_op_DescribeFHIRDatastore.go b/service/healthlake/api_op_DescribeFHIRDatastore.go index fe8d1a93261..73e7839c0d7 100644 --- a/service/healthlake/api_op_DescribeFHIRDatastore.go +++ b/service/healthlake/api_op_DescribeFHIRDatastore.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeFHIRDatastoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFHIRDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/healthlake/api_op_DescribeFHIRExportJob.go b/service/healthlake/api_op_DescribeFHIRExportJob.go index 9b8d259edda..91139d8576b 100644 --- a/service/healthlake/api_op_DescribeFHIRExportJob.go +++ b/service/healthlake/api_op_DescribeFHIRExportJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeFHIRExportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFHIRExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/healthlake/api_op_DescribeFHIRImportJob.go b/service/healthlake/api_op_DescribeFHIRImportJob.go index 469c6797b9a..02d44aab8c2 100644 --- a/service/healthlake/api_op_DescribeFHIRImportJob.go +++ b/service/healthlake/api_op_DescribeFHIRImportJob.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeFHIRImportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFHIRImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/healthlake/api_op_ListFHIRDatastores.go b/service/healthlake/api_op_ListFHIRDatastores.go index 838fc396bbb..aeb41241611 100644 --- a/service/healthlake/api_op_ListFHIRDatastores.go +++ b/service/healthlake/api_op_ListFHIRDatastores.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListFHIRDatastoresMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFHIRDatastores(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListFHIRDatastoresMiddlewares(stack *middleware.Sta return nil } -// ListFHIRDatastoresAPIClient is a client that implements the ListFHIRDatastores -// operation. -type ListFHIRDatastoresAPIClient interface { - ListFHIRDatastores(context.Context, *ListFHIRDatastoresInput, ...func(*Options)) (*ListFHIRDatastoresOutput, error) -} - -var _ ListFHIRDatastoresAPIClient = (*Client)(nil) - // ListFHIRDatastoresPaginatorOptions is the paginator options for // ListFHIRDatastores type ListFHIRDatastoresPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListFHIRDatastoresPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFHIRDatastores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListFHIRDatastoresPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListFHIRDatastoresAPIClient is a client that implements the ListFHIRDatastores +// operation. +type ListFHIRDatastoresAPIClient interface { + ListFHIRDatastores(context.Context, *ListFHIRDatastoresInput, ...func(*Options)) (*ListFHIRDatastoresOutput, error) +} + +var _ ListFHIRDatastoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFHIRDatastores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/healthlake/api_op_ListFHIRExportJobs.go b/service/healthlake/api_op_ListFHIRExportJobs.go index 39d089edea4..9522f18220a 100644 --- a/service/healthlake/api_op_ListFHIRExportJobs.go +++ b/service/healthlake/api_op_ListFHIRExportJobs.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListFHIRExportJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFHIRExportJobsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListFHIRExportJobsMiddlewares(stack *middleware.Sta return nil } -// ListFHIRExportJobsAPIClient is a client that implements the ListFHIRExportJobs -// operation. -type ListFHIRExportJobsAPIClient interface { - ListFHIRExportJobs(context.Context, *ListFHIRExportJobsInput, ...func(*Options)) (*ListFHIRExportJobsOutput, error) -} - -var _ ListFHIRExportJobsAPIClient = (*Client)(nil) - // ListFHIRExportJobsPaginatorOptions is the paginator options for // ListFHIRExportJobs type ListFHIRExportJobsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListFHIRExportJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFHIRExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListFHIRExportJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListFHIRExportJobsAPIClient is a client that implements the ListFHIRExportJobs +// operation. +type ListFHIRExportJobsAPIClient interface { + ListFHIRExportJobs(context.Context, *ListFHIRExportJobsInput, ...func(*Options)) (*ListFHIRExportJobsOutput, error) +} + +var _ ListFHIRExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFHIRExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/healthlake/api_op_ListFHIRImportJobs.go b/service/healthlake/api_op_ListFHIRImportJobs.go index f49cbadb333..902f8bf32d2 100644 --- a/service/healthlake/api_op_ListFHIRImportJobs.go +++ b/service/healthlake/api_op_ListFHIRImportJobs.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListFHIRImportJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFHIRImportJobsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListFHIRImportJobsMiddlewares(stack *middleware.Sta return nil } -// ListFHIRImportJobsAPIClient is a client that implements the ListFHIRImportJobs -// operation. -type ListFHIRImportJobsAPIClient interface { - ListFHIRImportJobs(context.Context, *ListFHIRImportJobsInput, ...func(*Options)) (*ListFHIRImportJobsOutput, error) -} - -var _ ListFHIRImportJobsAPIClient = (*Client)(nil) - // ListFHIRImportJobsPaginatorOptions is the paginator options for // ListFHIRImportJobs type ListFHIRImportJobsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListFHIRImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFHIRImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListFHIRImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListFHIRImportJobsAPIClient is a client that implements the ListFHIRImportJobs +// operation. +type ListFHIRImportJobsAPIClient interface { + ListFHIRImportJobs(context.Context, *ListFHIRImportJobsInput, ...func(*Options)) (*ListFHIRImportJobsOutput, error) +} + +var _ ListFHIRImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFHIRImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/healthlake/api_op_ListTagsForResource.go b/service/healthlake/api_op_ListTagsForResource.go index 6827e9dd45a..3cce16e4eba 100644 --- a/service/healthlake/api_op_ListTagsForResource.go +++ b/service/healthlake/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/healthlake/api_op_StartFHIRExportJob.go b/service/healthlake/api_op_StartFHIRExportJob.go index 3388fd53013..544320f0947 100644 --- a/service/healthlake/api_op_StartFHIRExportJob.go +++ b/service/healthlake/api_op_StartFHIRExportJob.go @@ -137,6 +137,9 @@ func (c *Client) addOperationStartFHIRExportJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartFHIRExportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/healthlake/api_op_StartFHIRImportJob.go b/service/healthlake/api_op_StartFHIRImportJob.go index 5b11ef94108..9440aeb7046 100644 --- a/service/healthlake/api_op_StartFHIRImportJob.go +++ b/service/healthlake/api_op_StartFHIRImportJob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationStartFHIRImportJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartFHIRImportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/healthlake/api_op_TagResource.go b/service/healthlake/api_op_TagResource.go index 3ed5965227c..1db786a9fd8 100644 --- a/service/healthlake/api_op_TagResource.go +++ b/service/healthlake/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/healthlake/api_op_UntagResource.go b/service/healthlake/api_op_UntagResource.go index 86e9f87fde2..eee23a2fc1a 100644 --- a/service/healthlake/api_op_UntagResource.go +++ b/service/healthlake/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_client.go b/service/iam/api_client.go index 10ab6b13b7b..17e2f3a13bd 100644 --- a/service/iam/api_client.go +++ b/service/iam/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go b/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go index 12c8ab8d345..ab2ac881a81 100644 --- a/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go +++ b/service/iam/api_op_AddClientIDToOpenIDConnectProvider.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAddClientIDToOpenIDConnectProviderMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddClientIDToOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_AddRoleToInstanceProfile.go b/service/iam/api_op_AddRoleToInstanceProfile.go index 024f620f4a9..a7e2951d6f3 100644 --- a/service/iam/api_op_AddRoleToInstanceProfile.go +++ b/service/iam/api_op_AddRoleToInstanceProfile.go @@ -135,6 +135,9 @@ func (c *Client) addOperationAddRoleToInstanceProfileMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddRoleToInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_AddUserToGroup.go b/service/iam/api_op_AddUserToGroup.go index ca2c48ace90..48fa5fe0e7b 100644 --- a/service/iam/api_op_AddUserToGroup.go +++ b/service/iam/api_op_AddUserToGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAddUserToGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddUserToGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_AttachGroupPolicy.go b/service/iam/api_op_AttachGroupPolicy.go index 38c22568ba5..ed638d95d55 100644 --- a/service/iam/api_op_AttachGroupPolicy.go +++ b/service/iam/api_op_AttachGroupPolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAttachGroupPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_AttachRolePolicy.go b/service/iam/api_op_AttachRolePolicy.go index b0f04d003ed..4e7573272f1 100644 --- a/service/iam/api_op_AttachRolePolicy.go +++ b/service/iam/api_op_AttachRolePolicy.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAttachRolePolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_AttachUserPolicy.go b/service/iam/api_op_AttachUserPolicy.go index 43d712fbf72..9791f0fbf4c 100644 --- a/service/iam/api_op_AttachUserPolicy.go +++ b/service/iam/api_op_AttachUserPolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAttachUserPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_ChangePassword.go b/service/iam/api_op_ChangePassword.go index 4bcb449c90b..ef04c7499a3 100644 --- a/service/iam/api_op_ChangePassword.go +++ b/service/iam/api_op_ChangePassword.go @@ -128,6 +128,9 @@ func (c *Client) addOperationChangePasswordMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangePasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateAccessKey.go b/service/iam/api_op_CreateAccessKey.go index 2c48e431aa8..1d3f96c7d75 100644 --- a/service/iam/api_op_CreateAccessKey.go +++ b/service/iam/api_op_CreateAccessKey.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateAccessKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessKey(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_CreateAccountAlias.go b/service/iam/api_op_CreateAccountAlias.go index 4556de41e8a..f36dd0f4ead 100644 --- a/service/iam/api_op_CreateAccountAlias.go +++ b/service/iam/api_op_CreateAccountAlias.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateAccountAliasMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateGroup.go b/service/iam/api_op_CreateGroup.go index da2f92031ca..d289c042259 100644 --- a/service/iam/api_op_CreateGroup.go +++ b/service/iam/api_op_CreateGroup.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateInstanceProfile.go b/service/iam/api_op_CreateInstanceProfile.go index 520355d1e6e..c3b199c1dad 100644 --- a/service/iam/api_op_CreateInstanceProfile.go +++ b/service/iam/api_op_CreateInstanceProfile.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateLoginProfile.go b/service/iam/api_op_CreateLoginProfile.go index 470e2518dad..66dbdb03873 100644 --- a/service/iam/api_op_CreateLoginProfile.go +++ b/service/iam/api_op_CreateLoginProfile.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateLoginProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateOpenIDConnectProvider.go b/service/iam/api_op_CreateOpenIDConnectProvider.go index a9b3c3722e4..59f9a148110 100644 --- a/service/iam/api_op_CreateOpenIDConnectProvider.go +++ b/service/iam/api_op_CreateOpenIDConnectProvider.go @@ -212,6 +212,9 @@ func (c *Client) addOperationCreateOpenIDConnectProviderMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreatePolicy.go b/service/iam/api_op_CreatePolicy.go index 206a0c11553..79962acdc89 100644 --- a/service/iam/api_op_CreatePolicy.go +++ b/service/iam/api_op_CreatePolicy.go @@ -194,6 +194,9 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreatePolicyVersion.go b/service/iam/api_op_CreatePolicyVersion.go index e7a996d3388..a4f8aafc469 100644 --- a/service/iam/api_op_CreatePolicyVersion.go +++ b/service/iam/api_op_CreatePolicyVersion.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateRole.go b/service/iam/api_op_CreateRole.go index 65d5825bb27..3105cd87552 100644 --- a/service/iam/api_op_CreateRole.go +++ b/service/iam/api_op_CreateRole.go @@ -214,6 +214,9 @@ func (c *Client) addOperationCreateRoleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateSAMLProvider.go b/service/iam/api_op_CreateSAMLProvider.go index c7b001ace7e..b807221a95b 100644 --- a/service/iam/api_op_CreateSAMLProvider.go +++ b/service/iam/api_op_CreateSAMLProvider.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateSAMLProviderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateServiceLinkedRole.go b/service/iam/api_op_CreateServiceLinkedRole.go index b8d04be7b24..b3d3f15411e 100644 --- a/service/iam/api_op_CreateServiceLinkedRole.go +++ b/service/iam/api_op_CreateServiceLinkedRole.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateServiceLinkedRoleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceLinkedRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateServiceSpecificCredential.go b/service/iam/api_op_CreateServiceSpecificCredential.go index 397f33e4878..a5290f0ef86 100644 --- a/service/iam/api_op_CreateServiceSpecificCredential.go +++ b/service/iam/api_op_CreateServiceSpecificCredential.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateServiceSpecificCredentialMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateUser.go b/service/iam/api_op_CreateUser.go index 81200cb8f2f..8c40fb899f7 100644 --- a/service/iam/api_op_CreateUser.go +++ b/service/iam/api_op_CreateUser.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_CreateVirtualMFADevice.go b/service/iam/api_op_CreateVirtualMFADevice.go index 38731d49b8d..512e34d74b6 100644 --- a/service/iam/api_op_CreateVirtualMFADevice.go +++ b/service/iam/api_op_CreateVirtualMFADevice.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateVirtualMFADeviceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVirtualMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeactivateMFADevice.go b/service/iam/api_op_DeactivateMFADevice.go index d4e34102680..390dc81e574 100644 --- a/service/iam/api_op_DeactivateMFADevice.go +++ b/service/iam/api_op_DeactivateMFADevice.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeactivateMFADeviceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteAccessKey.go b/service/iam/api_op_DeleteAccessKey.go index 95e020ecc5a..0441f5be7ce 100644 --- a/service/iam/api_op_DeleteAccessKey.go +++ b/service/iam/api_op_DeleteAccessKey.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteAccessKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteAccountAlias.go b/service/iam/api_op_DeleteAccountAlias.go index 9bea5be18b5..d84bc422b52 100644 --- a/service/iam/api_op_DeleteAccountAlias.go +++ b/service/iam/api_op_DeleteAccountAlias.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteAccountPasswordPolicy.go b/service/iam/api_op_DeleteAccountPasswordPolicy.go index e8226ff5c49..3095a5acea8 100644 --- a/service/iam/api_op_DeleteAccountPasswordPolicy.go +++ b/service/iam/api_op_DeleteAccountPasswordPolicy.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDeleteAccountPasswordPolicyMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_DeleteGroup.go b/service/iam/api_op_DeleteGroup.go index de72dae22b2..a1dde6d64c6 100644 --- a/service/iam/api_op_DeleteGroup.go +++ b/service/iam/api_op_DeleteGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteGroupPolicy.go b/service/iam/api_op_DeleteGroupPolicy.go index c171563cef5..746693c40b0 100644 --- a/service/iam/api_op_DeleteGroupPolicy.go +++ b/service/iam/api_op_DeleteGroupPolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteGroupPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteInstanceProfile.go b/service/iam/api_op_DeleteInstanceProfile.go index a9b030f1ebe..fc18e6b9d42 100644 --- a/service/iam/api_op_DeleteInstanceProfile.go +++ b/service/iam/api_op_DeleteInstanceProfile.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteInstanceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteLoginProfile.go b/service/iam/api_op_DeleteLoginProfile.go index a8fa19be83b..d1061e58891 100644 --- a/service/iam/api_op_DeleteLoginProfile.go +++ b/service/iam/api_op_DeleteLoginProfile.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteLoginProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteOpenIDConnectProvider.go b/service/iam/api_op_DeleteOpenIDConnectProvider.go index aeeb7311823..38c6dc8c7c4 100644 --- a/service/iam/api_op_DeleteOpenIDConnectProvider.go +++ b/service/iam/api_op_DeleteOpenIDConnectProvider.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteOpenIDConnectProviderMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeletePolicy.go b/service/iam/api_op_DeletePolicy.go index fd3044f7e21..4a9cf7fc33c 100644 --- a/service/iam/api_op_DeletePolicy.go +++ b/service/iam/api_op_DeletePolicy.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeletePolicyVersion.go b/service/iam/api_op_DeletePolicyVersion.go index be4cea760ac..a136ef86d6f 100644 --- a/service/iam/api_op_DeletePolicyVersion.go +++ b/service/iam/api_op_DeletePolicyVersion.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteRole.go b/service/iam/api_op_DeleteRole.go index f28227ea6f9..cae15f3c081 100644 --- a/service/iam/api_op_DeleteRole.go +++ b/service/iam/api_op_DeleteRole.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteRoleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteRolePermissionsBoundary.go b/service/iam/api_op_DeleteRolePermissionsBoundary.go index 1f5e044f9a6..7f172b1ca2d 100644 --- a/service/iam/api_op_DeleteRolePermissionsBoundary.go +++ b/service/iam/api_op_DeleteRolePermissionsBoundary.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteRolePermissionsBoundaryMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRolePermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteRolePolicy.go b/service/iam/api_op_DeleteRolePolicy.go index 7b0eb264cee..85fdf9e1e42 100644 --- a/service/iam/api_op_DeleteRolePolicy.go +++ b/service/iam/api_op_DeleteRolePolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteRolePolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteSAMLProvider.go b/service/iam/api_op_DeleteSAMLProvider.go index 075ae5b82ea..d76a02183fb 100644 --- a/service/iam/api_op_DeleteSAMLProvider.go +++ b/service/iam/api_op_DeleteSAMLProvider.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSAMLProviderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteSSHPublicKey.go b/service/iam/api_op_DeleteSSHPublicKey.go index e7ae27999d8..08f4f66c655 100644 --- a/service/iam/api_op_DeleteSSHPublicKey.go +++ b/service/iam/api_op_DeleteSSHPublicKey.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteServerCertificate.go b/service/iam/api_op_DeleteServerCertificate.go index 6b8a6968baf..b576da97d34 100644 --- a/service/iam/api_op_DeleteServerCertificate.go +++ b/service/iam/api_op_DeleteServerCertificate.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteServerCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteServiceLinkedRole.go b/service/iam/api_op_DeleteServiceLinkedRole.go index 51afa482092..6ce0f1a020e 100644 --- a/service/iam/api_op_DeleteServiceLinkedRole.go +++ b/service/iam/api_op_DeleteServiceLinkedRole.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteServiceLinkedRoleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceLinkedRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteServiceSpecificCredential.go b/service/iam/api_op_DeleteServiceSpecificCredential.go index 0cc141520e4..5e8ede90f97 100644 --- a/service/iam/api_op_DeleteServiceSpecificCredential.go +++ b/service/iam/api_op_DeleteServiceSpecificCredential.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteServiceSpecificCredentialMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteSigningCertificate.go b/service/iam/api_op_DeleteSigningCertificate.go index d3cc49c0221..3a0f71a7834 100644 --- a/service/iam/api_op_DeleteSigningCertificate.go +++ b/service/iam/api_op_DeleteSigningCertificate.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteSigningCertificateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteUser.go b/service/iam/api_op_DeleteUser.go index 26df8e75113..753e9a8a15f 100644 --- a/service/iam/api_op_DeleteUser.go +++ b/service/iam/api_op_DeleteUser.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteUserPermissionsBoundary.go b/service/iam/api_op_DeleteUserPermissionsBoundary.go index 122c1c6ed39..c5a082c2e34 100644 --- a/service/iam/api_op_DeleteUserPermissionsBoundary.go +++ b/service/iam/api_op_DeleteUserPermissionsBoundary.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteUserPermissionsBoundaryMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteUserPolicy.go b/service/iam/api_op_DeleteUserPolicy.go index b7d2a33d936..4adfc7d51b2 100644 --- a/service/iam/api_op_DeleteUserPolicy.go +++ b/service/iam/api_op_DeleteUserPolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteUserPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DeleteVirtualMFADevice.go b/service/iam/api_op_DeleteVirtualMFADevice.go index 456873dd4f2..1298b29f9dc 100644 --- a/service/iam/api_op_DeleteVirtualMFADevice.go +++ b/service/iam/api_op_DeleteVirtualMFADevice.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteVirtualMFADeviceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVirtualMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DetachGroupPolicy.go b/service/iam/api_op_DetachGroupPolicy.go index ef7c2f9f801..5d2456b2417 100644 --- a/service/iam/api_op_DetachGroupPolicy.go +++ b/service/iam/api_op_DetachGroupPolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDetachGroupPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DetachRolePolicy.go b/service/iam/api_op_DetachRolePolicy.go index 43ea45bac30..1450d9826f3 100644 --- a/service/iam/api_op_DetachRolePolicy.go +++ b/service/iam/api_op_DetachRolePolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDetachRolePolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_DetachUserPolicy.go b/service/iam/api_op_DetachUserPolicy.go index 4ab97d30c30..067db8a4b5e 100644 --- a/service/iam/api_op_DetachUserPolicy.go +++ b/service/iam/api_op_DetachUserPolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDetachUserPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_EnableMFADevice.go b/service/iam/api_op_EnableMFADevice.go index 7d41bc40796..20054bc484f 100644 --- a/service/iam/api_op_EnableMFADevice.go +++ b/service/iam/api_op_EnableMFADevice.go @@ -151,6 +151,9 @@ func (c *Client) addOperationEnableMFADeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GenerateCredentialReport.go b/service/iam/api_op_GenerateCredentialReport.go index cd2a4309472..96296dc3320 100644 --- a/service/iam/api_op_GenerateCredentialReport.go +++ b/service/iam/api_op_GenerateCredentialReport.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGenerateCredentialReportMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateCredentialReport(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_GenerateOrganizationsAccessReport.go b/service/iam/api_op_GenerateOrganizationsAccessReport.go index 1d37fdc5a8e..6b3ce12fc37 100644 --- a/service/iam/api_op_GenerateOrganizationsAccessReport.go +++ b/service/iam/api_op_GenerateOrganizationsAccessReport.go @@ -228,6 +228,9 @@ func (c *Client) addOperationGenerateOrganizationsAccessReportMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateOrganizationsAccessReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GenerateServiceLastAccessedDetails.go b/service/iam/api_op_GenerateServiceLastAccessedDetails.go index e3cd87e8923..9dec730af0f 100644 --- a/service/iam/api_op_GenerateServiceLastAccessedDetails.go +++ b/service/iam/api_op_GenerateServiceLastAccessedDetails.go @@ -177,6 +177,9 @@ func (c *Client) addOperationGenerateServiceLastAccessedDetailsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetAccessKeyLastUsed.go b/service/iam/api_op_GetAccessKeyLastUsed.go index 04786ccced4..e39438c41f7 100644 --- a/service/iam/api_op_GetAccessKeyLastUsed.go +++ b/service/iam/api_op_GetAccessKeyLastUsed.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetAccessKeyLastUsedMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessKeyLastUsedValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetAccountAuthorizationDetails.go b/service/iam/api_op_GetAccountAuthorizationDetails.go index 9b73033ac59..c55c15ca4f9 100644 --- a/service/iam/api_op_GetAccountAuthorizationDetails.go +++ b/service/iam/api_op_GetAccountAuthorizationDetails.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(options.Region), middleware.Before); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationGetAccountAuthorizationDetailsMiddlewares(stack *mi return nil } -// GetAccountAuthorizationDetailsAPIClient is a client that implements the -// GetAccountAuthorizationDetails operation. -type GetAccountAuthorizationDetailsAPIClient interface { - GetAccountAuthorizationDetails(context.Context, *GetAccountAuthorizationDetailsInput, ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) -} - -var _ GetAccountAuthorizationDetailsAPIClient = (*Client)(nil) - // GetAccountAuthorizationDetailsPaginatorOptions is the paginator options for // GetAccountAuthorizationDetails type GetAccountAuthorizationDetailsPaginatorOptions struct { @@ -266,6 +261,9 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAccountAuthorizationDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +283,14 @@ func (p *GetAccountAuthorizationDetailsPaginator) NextPage(ctx context.Context, return result, nil } +// GetAccountAuthorizationDetailsAPIClient is a client that implements the +// GetAccountAuthorizationDetails operation. +type GetAccountAuthorizationDetailsAPIClient interface { + GetAccountAuthorizationDetails(context.Context, *GetAccountAuthorizationDetailsInput, ...func(*Options)) (*GetAccountAuthorizationDetailsOutput, error) +} + +var _ GetAccountAuthorizationDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAccountAuthorizationDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_GetAccountPasswordPolicy.go b/service/iam/api_op_GetAccountPasswordPolicy.go index fc9a92e3820..effb87235f0 100644 --- a/service/iam/api_op_GetAccountPasswordPolicy.go +++ b/service/iam/api_op_GetAccountPasswordPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetAccountPasswordPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_GetAccountSummary.go b/service/iam/api_op_GetAccountSummary.go index 569d4a0b61d..3ea716970dc 100644 --- a/service/iam/api_op_GetAccountSummary.go +++ b/service/iam/api_op_GetAccountSummary.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAccountSummaryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_GetContextKeysForCustomPolicy.go b/service/iam/api_op_GetContextKeysForCustomPolicy.go index 05d60293025..7dc7c48527b 100644 --- a/service/iam/api_op_GetContextKeysForCustomPolicy.go +++ b/service/iam/api_op_GetContextKeysForCustomPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetContextKeysForCustomPolicyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContextKeysForCustomPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetContextKeysForPrincipalPolicy.go b/service/iam/api_op_GetContextKeysForPrincipalPolicy.go index 9654e9934c2..5d47169dc80 100644 --- a/service/iam/api_op_GetContextKeysForPrincipalPolicy.go +++ b/service/iam/api_op_GetContextKeysForPrincipalPolicy.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetContextKeysForPrincipalPolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContextKeysForPrincipalPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetCredentialReport.go b/service/iam/api_op_GetCredentialReport.go index b8e825c1c38..abf7df46497 100644 --- a/service/iam/api_op_GetCredentialReport.go +++ b/service/iam/api_op_GetCredentialReport.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetCredentialReportMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCredentialReport(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_GetGroup.go b/service/iam/api_op_GetGroup.go index 119f74f7e3c..ab844d00234 100644 --- a/service/iam/api_op_GetGroup.go +++ b/service/iam/api_op_GetGroup.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupValidationMiddleware(stack); err != nil { return err } @@ -175,13 +178,6 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option return nil } -// GetGroupAPIClient is a client that implements the GetGroup operation. -type GetGroupAPIClient interface { - GetGroup(context.Context, *GetGroupInput, ...func(*Options)) (*GetGroupOutput, error) -} - -var _ GetGroupAPIClient = (*Client)(nil) - // GetGroupPaginatorOptions is the paginator options for GetGroup type GetGroupPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -253,6 +249,9 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +271,13 @@ func (p *GetGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// GetGroupAPIClient is a client that implements the GetGroup operation. +type GetGroupAPIClient interface { + GetGroup(context.Context, *GetGroupInput, ...func(*Options)) (*GetGroupOutput, error) +} + +var _ GetGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_GetGroupPolicy.go b/service/iam/api_op_GetGroupPolicy.go index 0eefac5527d..fd01808e8a3 100644 --- a/service/iam/api_op_GetGroupPolicy.go +++ b/service/iam/api_op_GetGroupPolicy.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetGroupPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetInstanceProfile.go b/service/iam/api_op_GetInstanceProfile.go index 28f3e532b49..618689e8e87 100644 --- a/service/iam/api_op_GetInstanceProfile.go +++ b/service/iam/api_op_GetInstanceProfile.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceProfileValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetInstanceProfileMiddlewares(stack *middleware.Sta return nil } -// GetInstanceProfileAPIClient is a client that implements the GetInstanceProfile -// operation. -type GetInstanceProfileAPIClient interface { - GetInstanceProfile(context.Context, *GetInstanceProfileInput, ...func(*Options)) (*GetInstanceProfileOutput, error) -} - -var _ GetInstanceProfileAPIClient = (*Client)(nil) - // InstanceProfileExistsWaiterOptions are waiter options for // InstanceProfileExistsWaiter type InstanceProfileExistsWaiterOptions struct { @@ -273,7 +268,13 @@ func (w *InstanceProfileExistsWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetInstanceProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -325,6 +326,14 @@ func instanceProfileExistsStateRetryable(ctx context.Context, input *GetInstance return true, nil } +// GetInstanceProfileAPIClient is a client that implements the GetInstanceProfile +// operation. +type GetInstanceProfileAPIClient interface { + GetInstanceProfile(context.Context, *GetInstanceProfileInput, ...func(*Options)) (*GetInstanceProfileOutput, error) +} + +var _ GetInstanceProfileAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_GetLoginProfile.go b/service/iam/api_op_GetLoginProfile.go index 833bdb8daf3..a67e9852c2b 100644 --- a/service/iam/api_op_GetLoginProfile.go +++ b/service/iam/api_op_GetLoginProfile.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetLoginProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetMFADevice.go b/service/iam/api_op_GetMFADevice.go index 51b6030bd8b..45d7723491f 100644 --- a/service/iam/api_op_GetMFADevice.go +++ b/service/iam/api_op_GetMFADevice.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetMFADeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetOpenIDConnectProvider.go b/service/iam/api_op_GetOpenIDConnectProvider.go index a0998f3aeeb..4f5cf7480ba 100644 --- a/service/iam/api_op_GetOpenIDConnectProvider.go +++ b/service/iam/api_op_GetOpenIDConnectProvider.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetOpenIDConnectProviderMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetOrganizationsAccessReport.go b/service/iam/api_op_GetOrganizationsAccessReport.go index 9e49a43d679..60e6b989d59 100644 --- a/service/iam/api_op_GetOrganizationsAccessReport.go +++ b/service/iam/api_op_GetOrganizationsAccessReport.go @@ -195,6 +195,9 @@ func (c *Client) addOperationGetOrganizationsAccessReportMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrganizationsAccessReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetPolicy.go b/service/iam/api_op_GetPolicy.go index acdefb21462..97bb0a52bb4 100644 --- a/service/iam/api_op_GetPolicy.go +++ b/service/iam/api_op_GetPolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio return nil } -// GetPolicyAPIClient is a client that implements the GetPolicy operation. -type GetPolicyAPIClient interface { - GetPolicy(context.Context, *GetPolicyInput, ...func(*Options)) (*GetPolicyOutput, error) -} - -var _ GetPolicyAPIClient = (*Client)(nil) - // PolicyExistsWaiterOptions are waiter options for PolicyExistsWaiter type PolicyExistsWaiterOptions struct { @@ -276,7 +272,13 @@ func (w *PolicyExistsWaiter) WaitForOutput(ctx context.Context, params *GetPolic } out, err := w.client.GetPolicy(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -333,6 +335,13 @@ func policyExistsStateRetryable(ctx context.Context, input *GetPolicyInput, outp return true, nil } +// GetPolicyAPIClient is a client that implements the GetPolicy operation. +type GetPolicyAPIClient interface { + GetPolicy(context.Context, *GetPolicyInput, ...func(*Options)) (*GetPolicyOutput, error) +} + +var _ GetPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_GetPolicyVersion.go b/service/iam/api_op_GetPolicyVersion.go index b3ba7145aaf..a61c2803377 100644 --- a/service/iam/api_op_GetPolicyVersion.go +++ b/service/iam/api_op_GetPolicyVersion.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetRole.go b/service/iam/api_op_GetRole.go index 89ce57a2ac3..6d2312d71b3 100644 --- a/service/iam/api_op_GetRole.go +++ b/service/iam/api_op_GetRole.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoleValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationGetRoleMiddlewares(stack *middleware.Stack, options return nil } -// GetRoleAPIClient is a client that implements the GetRole operation. -type GetRoleAPIClient interface { - GetRole(context.Context, *GetRoleInput, ...func(*Options)) (*GetRoleOutput, error) -} - -var _ GetRoleAPIClient = (*Client)(nil) - // RoleExistsWaiterOptions are waiter options for RoleExistsWaiter type RoleExistsWaiterOptions struct { @@ -276,7 +272,13 @@ func (w *RoleExistsWaiter) WaitForOutput(ctx context.Context, params *GetRoleInp } out, err := w.client.GetRole(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -333,6 +335,13 @@ func roleExistsStateRetryable(ctx context.Context, input *GetRoleInput, output * return true, nil } +// GetRoleAPIClient is a client that implements the GetRole operation. +type GetRoleAPIClient interface { + GetRole(context.Context, *GetRoleInput, ...func(*Options)) (*GetRoleOutput, error) +} + +var _ GetRoleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_GetRolePolicy.go b/service/iam/api_op_GetRolePolicy.go index 78e80ea0eeb..d3cd2878ae8 100644 --- a/service/iam/api_op_GetRolePolicy.go +++ b/service/iam/api_op_GetRolePolicy.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetRolePolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetSAMLProvider.go b/service/iam/api_op_GetSAMLProvider.go index 3822d1d01f4..08fa99e4aa6 100644 --- a/service/iam/api_op_GetSAMLProvider.go +++ b/service/iam/api_op_GetSAMLProvider.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetSAMLProviderMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetSSHPublicKey.go b/service/iam/api_op_GetSSHPublicKey.go index abd90e2fb9b..7bc9673d0b1 100644 --- a/service/iam/api_op_GetSSHPublicKey.go +++ b/service/iam/api_op_GetSSHPublicKey.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetSSHPublicKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetServerCertificate.go b/service/iam/api_op_GetServerCertificate.go index d66664e8b44..22cb7b8cc1e 100644 --- a/service/iam/api_op_GetServerCertificate.go +++ b/service/iam/api_op_GetServerCertificate.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetServerCertificateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetServiceLastAccessedDetails.go b/service/iam/api_op_GetServiceLastAccessedDetails.go index 8fe433e0b2b..f16423db6ed 100644 --- a/service/iam/api_op_GetServiceLastAccessedDetails.go +++ b/service/iam/api_op_GetServiceLastAccessedDetails.go @@ -218,6 +218,9 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLastAccessedDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go b/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go index 927e3a4ccdd..3fa77e9ecea 100644 --- a/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go +++ b/service/iam/api_op_GetServiceLastAccessedDetailsWithEntities.go @@ -203,6 +203,9 @@ func (c *Client) addOperationGetServiceLastAccessedDetailsWithEntitiesMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLastAccessedDetailsWithEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go b/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go index 756e16c73e9..59a4503cfa2 100644 --- a/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go +++ b/service/iam/api_op_GetServiceLinkedRoleDeletionStatus.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetServiceLinkedRoleDeletionStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceLinkedRoleDeletionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_GetUser.go b/service/iam/api_op_GetUser.go index 378c959cbf2..f4d8b71216e 100644 --- a/service/iam/api_op_GetUser.go +++ b/service/iam/api_op_GetUser.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUser(options.Region), middleware.Before); err != nil { return err } @@ -164,13 +167,6 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options return nil } -// GetUserAPIClient is a client that implements the GetUser operation. -type GetUserAPIClient interface { - GetUser(context.Context, *GetUserInput, ...func(*Options)) (*GetUserOutput, error) -} - -var _ GetUserAPIClient = (*Client)(nil) - // UserExistsWaiterOptions are waiter options for UserExistsWaiter type UserExistsWaiterOptions struct { @@ -285,7 +281,13 @@ func (w *UserExistsWaiter) WaitForOutput(ctx context.Context, params *GetUserInp } out, err := w.client.GetUser(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -342,6 +344,13 @@ func userExistsStateRetryable(ctx context.Context, input *GetUserInput, output * return true, nil } +// GetUserAPIClient is a client that implements the GetUser operation. +type GetUserAPIClient interface { + GetUser(context.Context, *GetUserInput, ...func(*Options)) (*GetUserOutput, error) +} + +var _ GetUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_GetUserPolicy.go b/service/iam/api_op_GetUserPolicy.go index fd63c76cdca..05d46d641a6 100644 --- a/service/iam/api_op_GetUserPolicy.go +++ b/service/iam/api_op_GetUserPolicy.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetUserPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_ListAccessKeys.go b/service/iam/api_op_ListAccessKeys.go index 8487d551d71..5b5f619aa73 100644 --- a/service/iam/api_op_ListAccessKeys.go +++ b/service/iam/api_op_ListAccessKeys.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessKeys(options.Region), middleware.Before); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListAccessKeysMiddlewares(stack *middleware.Stack, return nil } -// ListAccessKeysAPIClient is a client that implements the ListAccessKeys -// operation. -type ListAccessKeysAPIClient interface { - ListAccessKeys(context.Context, *ListAccessKeysInput, ...func(*Options)) (*ListAccessKeysOutput, error) -} - -var _ ListAccessKeysAPIClient = (*Client)(nil) - // ListAccessKeysPaginatorOptions is the paginator options for ListAccessKeys type ListAccessKeysPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -258,6 +253,9 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +275,14 @@ func (p *ListAccessKeysPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAccessKeysAPIClient is a client that implements the ListAccessKeys +// operation. +type ListAccessKeysAPIClient interface { + ListAccessKeys(context.Context, *ListAccessKeysInput, ...func(*Options)) (*ListAccessKeysOutput, error) +} + +var _ ListAccessKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListAccountAliases.go b/service/iam/api_op_ListAccountAliases.go index 05b4d9eedcb..af5c0d42106 100644 --- a/service/iam/api_op_ListAccountAliases.go +++ b/service/iam/api_op_ListAccountAliases.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountAliases(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListAccountAliasesMiddlewares(stack *middleware.Sta return nil } -// ListAccountAliasesAPIClient is a client that implements the ListAccountAliases -// operation. -type ListAccountAliasesAPIClient interface { - ListAccountAliases(context.Context, *ListAccountAliasesInput, ...func(*Options)) (*ListAccountAliasesOutput, error) -} - -var _ ListAccountAliasesAPIClient = (*Client)(nil) - // ListAccountAliasesPaginatorOptions is the paginator options for // ListAccountAliases type ListAccountAliasesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListAccountAliasesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAccountAliasesAPIClient is a client that implements the ListAccountAliases +// operation. +type ListAccountAliasesAPIClient interface { + ListAccountAliases(context.Context, *ListAccountAliasesInput, ...func(*Options)) (*ListAccountAliasesOutput, error) +} + +var _ ListAccountAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListAttachedGroupPolicies.go b/service/iam/api_op_ListAttachedGroupPolicies.go index 8178cfa423f..1be507e5deb 100644 --- a/service/iam/api_op_ListAttachedGroupPolicies.go +++ b/service/iam/api_op_ListAttachedGroupPolicies.go @@ -166,6 +166,9 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedGroupPoliciesValidationMiddleware(stack); err != nil { return err } @@ -190,14 +193,6 @@ func (c *Client) addOperationListAttachedGroupPoliciesMiddlewares(stack *middlew return nil } -// ListAttachedGroupPoliciesAPIClient is a client that implements the -// ListAttachedGroupPolicies operation. -type ListAttachedGroupPoliciesAPIClient interface { - ListAttachedGroupPolicies(context.Context, *ListAttachedGroupPoliciesInput, ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) -} - -var _ ListAttachedGroupPoliciesAPIClient = (*Client)(nil) - // ListAttachedGroupPoliciesPaginatorOptions is the paginator options for // ListAttachedGroupPolicies type ListAttachedGroupPoliciesPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedGroupPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *ListAttachedGroupPoliciesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAttachedGroupPoliciesAPIClient is a client that implements the +// ListAttachedGroupPolicies operation. +type ListAttachedGroupPoliciesAPIClient interface { + ListAttachedGroupPolicies(context.Context, *ListAttachedGroupPoliciesInput, ...func(*Options)) (*ListAttachedGroupPoliciesOutput, error) +} + +var _ ListAttachedGroupPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListAttachedRolePolicies.go b/service/iam/api_op_ListAttachedRolePolicies.go index a6162b7a026..ed7f5a5fa3d 100644 --- a/service/iam/api_op_ListAttachedRolePolicies.go +++ b/service/iam/api_op_ListAttachedRolePolicies.go @@ -166,6 +166,9 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedRolePoliciesValidationMiddleware(stack); err != nil { return err } @@ -190,14 +193,6 @@ func (c *Client) addOperationListAttachedRolePoliciesMiddlewares(stack *middlewa return nil } -// ListAttachedRolePoliciesAPIClient is a client that implements the -// ListAttachedRolePolicies operation. -type ListAttachedRolePoliciesAPIClient interface { - ListAttachedRolePolicies(context.Context, *ListAttachedRolePoliciesInput, ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) -} - -var _ ListAttachedRolePoliciesAPIClient = (*Client)(nil) - // ListAttachedRolePoliciesPaginatorOptions is the paginator options for // ListAttachedRolePolicies type ListAttachedRolePoliciesPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedRolePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *ListAttachedRolePoliciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAttachedRolePoliciesAPIClient is a client that implements the +// ListAttachedRolePolicies operation. +type ListAttachedRolePoliciesAPIClient interface { + ListAttachedRolePolicies(context.Context, *ListAttachedRolePoliciesInput, ...func(*Options)) (*ListAttachedRolePoliciesOutput, error) +} + +var _ ListAttachedRolePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListAttachedUserPolicies.go b/service/iam/api_op_ListAttachedUserPolicies.go index a32b88c053f..b71e0341c4b 100644 --- a/service/iam/api_op_ListAttachedUserPolicies.go +++ b/service/iam/api_op_ListAttachedUserPolicies.go @@ -166,6 +166,9 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedUserPoliciesValidationMiddleware(stack); err != nil { return err } @@ -190,14 +193,6 @@ func (c *Client) addOperationListAttachedUserPoliciesMiddlewares(stack *middlewa return nil } -// ListAttachedUserPoliciesAPIClient is a client that implements the -// ListAttachedUserPolicies operation. -type ListAttachedUserPoliciesAPIClient interface { - ListAttachedUserPolicies(context.Context, *ListAttachedUserPoliciesInput, ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) -} - -var _ ListAttachedUserPoliciesAPIClient = (*Client)(nil) - // ListAttachedUserPoliciesPaginatorOptions is the paginator options for // ListAttachedUserPolicies type ListAttachedUserPoliciesPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedUserPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *ListAttachedUserPoliciesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAttachedUserPoliciesAPIClient is a client that implements the +// ListAttachedUserPolicies operation. +type ListAttachedUserPoliciesAPIClient interface { + ListAttachedUserPolicies(context.Context, *ListAttachedUserPoliciesInput, ...func(*Options)) (*ListAttachedUserPoliciesOutput, error) +} + +var _ ListAttachedUserPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListEntitiesForPolicy.go b/service/iam/api_op_ListEntitiesForPolicy.go index 149abc34185..17a4bac71e8 100644 --- a/service/iam/api_op_ListEntitiesForPolicy.go +++ b/service/iam/api_op_ListEntitiesForPolicy.go @@ -184,6 +184,9 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEntitiesForPolicyValidationMiddleware(stack); err != nil { return err } @@ -208,14 +211,6 @@ func (c *Client) addOperationListEntitiesForPolicyMiddlewares(stack *middleware. return nil } -// ListEntitiesForPolicyAPIClient is a client that implements the -// ListEntitiesForPolicy operation. -type ListEntitiesForPolicyAPIClient interface { - ListEntitiesForPolicy(context.Context, *ListEntitiesForPolicyInput, ...func(*Options)) (*ListEntitiesForPolicyOutput, error) -} - -var _ ListEntitiesForPolicyAPIClient = (*Client)(nil) - // ListEntitiesForPolicyPaginatorOptions is the paginator options for // ListEntitiesForPolicy type ListEntitiesForPolicyPaginatorOptions struct { @@ -288,6 +283,9 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntitiesForPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -307,6 +305,14 @@ func (p *ListEntitiesForPolicyPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListEntitiesForPolicyAPIClient is a client that implements the +// ListEntitiesForPolicy operation. +type ListEntitiesForPolicyAPIClient interface { + ListEntitiesForPolicy(context.Context, *ListEntitiesForPolicyInput, ...func(*Options)) (*ListEntitiesForPolicyOutput, error) +} + +var _ ListEntitiesForPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntitiesForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListGroupPolicies.go b/service/iam/api_op_ListGroupPolicies.go index 33e3653f038..1949a118de6 100644 --- a/service/iam/api_op_ListGroupPolicies.go +++ b/service/iam/api_op_ListGroupPolicies.go @@ -160,6 +160,9 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupPoliciesValidationMiddleware(stack); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationListGroupPoliciesMiddlewares(stack *middleware.Stac return nil } -// ListGroupPoliciesAPIClient is a client that implements the ListGroupPolicies -// operation. -type ListGroupPoliciesAPIClient interface { - ListGroupPolicies(context.Context, *ListGroupPoliciesInput, ...func(*Options)) (*ListGroupPoliciesOutput, error) -} - -var _ ListGroupPoliciesAPIClient = (*Client)(nil) - // ListGroupPoliciesPaginatorOptions is the paginator options for ListGroupPolicies type ListGroupPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -263,6 +258,9 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -282,6 +280,14 @@ func (p *ListGroupPoliciesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListGroupPoliciesAPIClient is a client that implements the ListGroupPolicies +// operation. +type ListGroupPoliciesAPIClient interface { + ListGroupPolicies(context.Context, *ListGroupPoliciesInput, ...func(*Options)) (*ListGroupPoliciesOutput, error) +} + +var _ ListGroupPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListGroups.go b/service/iam/api_op_ListGroups.go index 46f4a7c77fd..74bfed37351 100644 --- a/service/iam/api_op_ListGroups.go +++ b/service/iam/api_op_ListGroups.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } @@ -170,13 +173,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -248,6 +244,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +266,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListGroupsForUser.go b/service/iam/api_op_ListGroupsForUser.go index 743269c6e9d..50d270229ec 100644 --- a/service/iam/api_op_ListGroupsForUser.go +++ b/service/iam/api_op_ListGroupsForUser.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsForUserValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListGroupsForUserMiddlewares(stack *middleware.Stac return nil } -// ListGroupsForUserAPIClient is a client that implements the ListGroupsForUser -// operation. -type ListGroupsForUserAPIClient interface { - ListGroupsForUser(context.Context, *ListGroupsForUserInput, ...func(*Options)) (*ListGroupsForUserOutput, error) -} - -var _ ListGroupsForUserAPIClient = (*Client)(nil) - // ListGroupsForUserPaginatorOptions is the paginator options for ListGroupsForUser type ListGroupsForUserPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -249,6 +244,9 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupsForUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListGroupsForUserPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListGroupsForUserAPIClient is a client that implements the ListGroupsForUser +// operation. +type ListGroupsForUserAPIClient interface { + ListGroupsForUser(context.Context, *ListGroupsForUserInput, ...func(*Options)) (*ListGroupsForUserOutput, error) +} + +var _ ListGroupsForUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupsForUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListInstanceProfileTags.go b/service/iam/api_op_ListInstanceProfileTags.go index bb7be343a7e..8f20f6b1e97 100644 --- a/service/iam/api_op_ListInstanceProfileTags.go +++ b/service/iam/api_op_ListInstanceProfileTags.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceProfileTagsValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListInstanceProfileTagsMiddlewares(stack *middlewar return nil } -// ListInstanceProfileTagsAPIClient is a client that implements the -// ListInstanceProfileTags operation. -type ListInstanceProfileTagsAPIClient interface { - ListInstanceProfileTags(context.Context, *ListInstanceProfileTagsInput, ...func(*Options)) (*ListInstanceProfileTagsOutput, error) -} - -var _ ListInstanceProfileTagsAPIClient = (*Client)(nil) - // ListInstanceProfileTagsPaginatorOptions is the paginator options for // ListInstanceProfileTags type ListInstanceProfileTagsPaginatorOptions struct { @@ -254,6 +249,9 @@ func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfileTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +271,14 @@ func (p *ListInstanceProfileTagsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInstanceProfileTagsAPIClient is a client that implements the +// ListInstanceProfileTags operation. +type ListInstanceProfileTagsAPIClient interface { + ListInstanceProfileTags(context.Context, *ListInstanceProfileTagsInput, ...func(*Options)) (*ListInstanceProfileTagsOutput, error) +} + +var _ ListInstanceProfileTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceProfileTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListInstanceProfiles.go b/service/iam/api_op_ListInstanceProfiles.go index ea117d58345..939b1a13f00 100644 --- a/service/iam/api_op_ListInstanceProfiles.go +++ b/service/iam/api_op_ListInstanceProfiles.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstanceProfiles(options.Region), middleware.Before); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListInstanceProfilesMiddlewares(stack *middleware.S return nil } -// ListInstanceProfilesAPIClient is a client that implements the -// ListInstanceProfiles operation. -type ListInstanceProfilesAPIClient interface { - ListInstanceProfiles(context.Context, *ListInstanceProfilesInput, ...func(*Options)) (*ListInstanceProfilesOutput, error) -} - -var _ ListInstanceProfilesAPIClient = (*Client)(nil) - // ListInstanceProfilesPaginatorOptions is the paginator options for // ListInstanceProfiles type ListInstanceProfilesPaginatorOptions struct { @@ -259,6 +254,9 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *ListInstanceProfilesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListInstanceProfilesAPIClient is a client that implements the +// ListInstanceProfiles operation. +type ListInstanceProfilesAPIClient interface { + ListInstanceProfiles(context.Context, *ListInstanceProfilesInput, ...func(*Options)) (*ListInstanceProfilesOutput, error) +} + +var _ ListInstanceProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListInstanceProfilesForRole.go b/service/iam/api_op_ListInstanceProfilesForRole.go index 40d425cbd1f..83237fafd63 100644 --- a/service/iam/api_op_ListInstanceProfilesForRole.go +++ b/service/iam/api_op_ListInstanceProfilesForRole.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceProfilesForRoleValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListInstanceProfilesForRoleMiddlewares(stack *middl return nil } -// ListInstanceProfilesForRoleAPIClient is a client that implements the -// ListInstanceProfilesForRole operation. -type ListInstanceProfilesForRoleAPIClient interface { - ListInstanceProfilesForRole(context.Context, *ListInstanceProfilesForRoleInput, ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) -} - -var _ ListInstanceProfilesForRoleAPIClient = (*Client)(nil) - // ListInstanceProfilesForRolePaginatorOptions is the paginator options for // ListInstanceProfilesForRole type ListInstanceProfilesForRolePaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceProfilesForRole(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *ListInstanceProfilesForRolePaginator) NextPage(ctx context.Context, opt return result, nil } +// ListInstanceProfilesForRoleAPIClient is a client that implements the +// ListInstanceProfilesForRole operation. +type ListInstanceProfilesForRoleAPIClient interface { + ListInstanceProfilesForRole(context.Context, *ListInstanceProfilesForRoleInput, ...func(*Options)) (*ListInstanceProfilesForRoleOutput, error) +} + +var _ ListInstanceProfilesForRoleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceProfilesForRole(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListMFADeviceTags.go b/service/iam/api_op_ListMFADeviceTags.go index 594c6e10f45..3807505d5cf 100644 --- a/service/iam/api_op_ListMFADeviceTags.go +++ b/service/iam/api_op_ListMFADeviceTags.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMFADeviceTagsValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListMFADeviceTagsMiddlewares(stack *middleware.Stac return nil } -// ListMFADeviceTagsAPIClient is a client that implements the ListMFADeviceTags -// operation. -type ListMFADeviceTagsAPIClient interface { - ListMFADeviceTags(context.Context, *ListMFADeviceTagsInput, ...func(*Options)) (*ListMFADeviceTagsOutput, error) -} - -var _ ListMFADeviceTagsAPIClient = (*Client)(nil) - // ListMFADeviceTagsPaginatorOptions is the paginator options for ListMFADeviceTags type ListMFADeviceTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -253,6 +248,9 @@ func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMFADeviceTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +270,14 @@ func (p *ListMFADeviceTagsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListMFADeviceTagsAPIClient is a client that implements the ListMFADeviceTags +// operation. +type ListMFADeviceTagsAPIClient interface { + ListMFADeviceTags(context.Context, *ListMFADeviceTagsInput, ...func(*Options)) (*ListMFADeviceTagsOutput, error) +} + +var _ ListMFADeviceTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMFADeviceTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListMFADevices.go b/service/iam/api_op_ListMFADevices.go index a16622b7ebb..7a4ed1eaf82 100644 --- a/service/iam/api_op_ListMFADevices.go +++ b/service/iam/api_op_ListMFADevices.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMFADevices(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListMFADevicesMiddlewares(stack *middleware.Stack, return nil } -// ListMFADevicesAPIClient is a client that implements the ListMFADevices -// operation. -type ListMFADevicesAPIClient interface { - ListMFADevices(context.Context, *ListMFADevicesInput, ...func(*Options)) (*ListMFADevicesOutput, error) -} - -var _ ListMFADevicesAPIClient = (*Client)(nil) - // ListMFADevicesPaginatorOptions is the paginator options for ListMFADevices type ListMFADevicesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -248,6 +243,9 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMFADevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *ListMFADevicesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListMFADevicesAPIClient is a client that implements the ListMFADevices +// operation. +type ListMFADevicesAPIClient interface { + ListMFADevices(context.Context, *ListMFADevicesInput, ...func(*Options)) (*ListMFADevicesOutput, error) +} + +var _ ListMFADevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListOpenIDConnectProviderTags.go b/service/iam/api_op_ListOpenIDConnectProviderTags.go index 1d5c4dabace..2deb644f0aa 100644 --- a/service/iam/api_op_ListOpenIDConnectProviderTags.go +++ b/service/iam/api_op_ListOpenIDConnectProviderTags.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOpenIDConnectProviderTagsValidationMiddleware(stack); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationListOpenIDConnectProviderTagsMiddlewares(stack *mid return nil } -// ListOpenIDConnectProviderTagsAPIClient is a client that implements the -// ListOpenIDConnectProviderTags operation. -type ListOpenIDConnectProviderTagsAPIClient interface { - ListOpenIDConnectProviderTags(context.Context, *ListOpenIDConnectProviderTagsInput, ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) -} - -var _ ListOpenIDConnectProviderTagsAPIClient = (*Client)(nil) - // ListOpenIDConnectProviderTagsPaginatorOptions is the paginator options for // ListOpenIDConnectProviderTags type ListOpenIDConnectProviderTagsPaginatorOptions struct { @@ -260,6 +255,9 @@ func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, o } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpenIDConnectProviderTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *ListOpenIDConnectProviderTagsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListOpenIDConnectProviderTagsAPIClient is a client that implements the +// ListOpenIDConnectProviderTags operation. +type ListOpenIDConnectProviderTagsAPIClient interface { + ListOpenIDConnectProviderTags(context.Context, *ListOpenIDConnectProviderTagsInput, ...func(*Options)) (*ListOpenIDConnectProviderTagsOutput, error) +} + +var _ ListOpenIDConnectProviderTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOpenIDConnectProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListOpenIDConnectProviders.go b/service/iam/api_op_ListOpenIDConnectProviders.go index b9da2902c73..54fc86505d2 100644 --- a/service/iam/api_op_ListOpenIDConnectProviders.go +++ b/service/iam/api_op_ListOpenIDConnectProviders.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListOpenIDConnectProvidersMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenIDConnectProviders(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_ListPolicies.go b/service/iam/api_op_ListPolicies.go index 47e5049a89a..10b13b1e983 100644 --- a/service/iam/api_op_ListPolicies.go +++ b/service/iam/api_op_ListPolicies.go @@ -186,6 +186,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil { return err } @@ -207,13 +210,6 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op return nil } -// ListPoliciesAPIClient is a client that implements the ListPolicies operation. -type ListPoliciesAPIClient interface { - ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) -} - -var _ ListPoliciesAPIClient = (*Client)(nil) - // ListPoliciesPaginatorOptions is the paginator options for ListPolicies type ListPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -285,6 +281,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -304,6 +303,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListPoliciesGrantingServiceAccess.go b/service/iam/api_op_ListPoliciesGrantingServiceAccess.go index 6d7d425b761..4fd6f3ac567 100644 --- a/service/iam/api_op_ListPoliciesGrantingServiceAccess.go +++ b/service/iam/api_op_ListPoliciesGrantingServiceAccess.go @@ -174,6 +174,9 @@ func (c *Client) addOperationListPoliciesGrantingServiceAccessMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesGrantingServiceAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_ListPolicyTags.go b/service/iam/api_op_ListPolicyTags.go index b7bc8808859..c1f0a559557 100644 --- a/service/iam/api_op_ListPolicyTags.go +++ b/service/iam/api_op_ListPolicyTags.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyTagsValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListPolicyTagsMiddlewares(stack *middleware.Stack, return nil } -// ListPolicyTagsAPIClient is a client that implements the ListPolicyTags -// operation. -type ListPolicyTagsAPIClient interface { - ListPolicyTags(context.Context, *ListPolicyTagsInput, ...func(*Options)) (*ListPolicyTagsOutput, error) -} - -var _ ListPolicyTagsAPIClient = (*Client)(nil) - // ListPolicyTagsPaginatorOptions is the paginator options for ListPolicyTags type ListPolicyTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -252,6 +247,9 @@ func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *ListPolicyTagsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPolicyTagsAPIClient is a client that implements the ListPolicyTags +// operation. +type ListPolicyTagsAPIClient interface { + ListPolicyTags(context.Context, *ListPolicyTagsInput, ...func(*Options)) (*ListPolicyTagsOutput, error) +} + +var _ ListPolicyTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListPolicyVersions.go b/service/iam/api_op_ListPolicyVersions.go index 1231dd81155..f4f5ef14edd 100644 --- a/service/iam/api_op_ListPolicyVersions.go +++ b/service/iam/api_op_ListPolicyVersions.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyVersionsValidationMiddleware(stack); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta return nil } -// ListPolicyVersionsAPIClient is a client that implements the ListPolicyVersions -// operation. -type ListPolicyVersionsAPIClient interface { - ListPolicyVersions(context.Context, *ListPolicyVersionsInput, ...func(*Options)) (*ListPolicyVersionsOutput, error) -} - -var _ ListPolicyVersionsAPIClient = (*Client)(nil) - // ListPolicyVersionsPaginatorOptions is the paginator options for // ListPolicyVersions type ListPolicyVersionsPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *ListPolicyVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPolicyVersionsAPIClient is a client that implements the ListPolicyVersions +// operation. +type ListPolicyVersionsAPIClient interface { + ListPolicyVersions(context.Context, *ListPolicyVersionsInput, ...func(*Options)) (*ListPolicyVersionsOutput, error) +} + +var _ ListPolicyVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListRolePolicies.go b/service/iam/api_op_ListRolePolicies.go index 1296cfed048..15a17eb9165 100644 --- a/service/iam/api_op_ListRolePolicies.go +++ b/service/iam/api_op_ListRolePolicies.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRolePoliciesValidationMiddleware(stack); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationListRolePoliciesMiddlewares(stack *middleware.Stack return nil } -// ListRolePoliciesAPIClient is a client that implements the ListRolePolicies -// operation. -type ListRolePoliciesAPIClient interface { - ListRolePolicies(context.Context, *ListRolePoliciesInput, ...func(*Options)) (*ListRolePoliciesOutput, error) -} - -var _ ListRolePoliciesAPIClient = (*Client)(nil) - // ListRolePoliciesPaginatorOptions is the paginator options for ListRolePolicies type ListRolePoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -257,6 +252,9 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRolePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *ListRolePoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRolePoliciesAPIClient is a client that implements the ListRolePolicies +// operation. +type ListRolePoliciesAPIClient interface { + ListRolePolicies(context.Context, *ListRolePoliciesInput, ...func(*Options)) (*ListRolePoliciesOutput, error) +} + +var _ ListRolePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRolePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListRoleTags.go b/service/iam/api_op_ListRoleTags.go index caee0c948a7..e24e37ebd6e 100644 --- a/service/iam/api_op_ListRoleTags.go +++ b/service/iam/api_op_ListRoleTags.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoleTagsValidationMiddleware(stack); err != nil { return err } @@ -173,13 +176,6 @@ func (c *Client) addOperationListRoleTagsMiddlewares(stack *middleware.Stack, op return nil } -// ListRoleTagsAPIClient is a client that implements the ListRoleTags operation. -type ListRoleTagsAPIClient interface { - ListRoleTags(context.Context, *ListRoleTagsInput, ...func(*Options)) (*ListRoleTagsOutput, error) -} - -var _ ListRoleTagsAPIClient = (*Client)(nil) - // ListRoleTagsPaginatorOptions is the paginator options for ListRoleTags type ListRoleTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -251,6 +247,9 @@ func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoleTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +269,13 @@ func (p *ListRoleTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListRoleTagsAPIClient is a client that implements the ListRoleTags operation. +type ListRoleTagsAPIClient interface { + ListRoleTags(context.Context, *ListRoleTagsInput, ...func(*Options)) (*ListRoleTagsOutput, error) +} + +var _ ListRoleTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoleTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListRoles.go b/service/iam/api_op_ListRoles.go index 2dc4881b60c..6aea245cfa2 100644 --- a/service/iam/api_op_ListRoles.go +++ b/service/iam/api_op_ListRoles.go @@ -165,6 +165,9 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoles(options.Region), middleware.Before); err != nil { return err } @@ -186,13 +189,6 @@ func (c *Client) addOperationListRolesMiddlewares(stack *middleware.Stack, optio return nil } -// ListRolesAPIClient is a client that implements the ListRoles operation. -type ListRolesAPIClient interface { - ListRoles(context.Context, *ListRolesInput, ...func(*Options)) (*ListRolesOutput, error) -} - -var _ ListRolesAPIClient = (*Client)(nil) - // ListRolesPaginatorOptions is the paginator options for ListRoles type ListRolesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -264,6 +260,9 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +282,13 @@ func (p *ListRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRolesAPIClient is a client that implements the ListRoles operation. +type ListRolesAPIClient interface { + ListRoles(context.Context, *ListRolesInput, ...func(*Options)) (*ListRolesOutput, error) +} + +var _ ListRolesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListSAMLProviderTags.go b/service/iam/api_op_ListSAMLProviderTags.go index 1beea158962..4bc8b0ded5e 100644 --- a/service/iam/api_op_ListSAMLProviderTags.go +++ b/service/iam/api_op_ListSAMLProviderTags.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSAMLProviderTagsValidationMiddleware(stack); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationListSAMLProviderTagsMiddlewares(stack *middleware.S return nil } -// ListSAMLProviderTagsAPIClient is a client that implements the -// ListSAMLProviderTags operation. -type ListSAMLProviderTagsAPIClient interface { - ListSAMLProviderTags(context.Context, *ListSAMLProviderTagsInput, ...func(*Options)) (*ListSAMLProviderTagsOutput, error) -} - -var _ ListSAMLProviderTagsAPIClient = (*Client)(nil) - // ListSAMLProviderTagsPaginatorOptions is the paginator options for // ListSAMLProviderTags type ListSAMLProviderTagsPaginatorOptions struct { @@ -258,6 +253,9 @@ func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSAMLProviderTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +275,14 @@ func (p *ListSAMLProviderTagsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSAMLProviderTagsAPIClient is a client that implements the +// ListSAMLProviderTags operation. +type ListSAMLProviderTagsAPIClient interface { + ListSAMLProviderTags(context.Context, *ListSAMLProviderTagsInput, ...func(*Options)) (*ListSAMLProviderTagsOutput, error) +} + +var _ ListSAMLProviderTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSAMLProviderTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListSAMLProviders.go b/service/iam/api_op_ListSAMLProviders.go index 65691313567..6fa3322abf0 100644 --- a/service/iam/api_op_ListSAMLProviders.go +++ b/service/iam/api_op_ListSAMLProviders.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListSAMLProvidersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSAMLProviders(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_ListSSHPublicKeys.go b/service/iam/api_op_ListSSHPublicKeys.go index 84ab63da8ea..5fbd400a36d 100644 --- a/service/iam/api_op_ListSSHPublicKeys.go +++ b/service/iam/api_op_ListSSHPublicKeys.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSSHPublicKeys(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListSSHPublicKeysMiddlewares(stack *middleware.Stac return nil } -// ListSSHPublicKeysAPIClient is a client that implements the ListSSHPublicKeys -// operation. -type ListSSHPublicKeysAPIClient interface { - ListSSHPublicKeys(context.Context, *ListSSHPublicKeysInput, ...func(*Options)) (*ListSSHPublicKeysOutput, error) -} - -var _ ListSSHPublicKeysAPIClient = (*Client)(nil) - // ListSSHPublicKeysPaginatorOptions is the paginator options for ListSSHPublicKeys type ListSSHPublicKeysPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -253,6 +248,9 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSSHPublicKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +270,14 @@ func (p *ListSSHPublicKeysPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListSSHPublicKeysAPIClient is a client that implements the ListSSHPublicKeys +// operation. +type ListSSHPublicKeysAPIClient interface { + ListSSHPublicKeys(context.Context, *ListSSHPublicKeysInput, ...func(*Options)) (*ListSSHPublicKeysOutput, error) +} + +var _ ListSSHPublicKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSSHPublicKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListServerCertificateTags.go b/service/iam/api_op_ListServerCertificateTags.go index e7e3ddf2b08..fd09b36a87f 100644 --- a/service/iam/api_op_ListServerCertificateTags.go +++ b/service/iam/api_op_ListServerCertificateTags.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServerCertificateTagsValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListServerCertificateTagsMiddlewares(stack *middlew return nil } -// ListServerCertificateTagsAPIClient is a client that implements the -// ListServerCertificateTags operation. -type ListServerCertificateTagsAPIClient interface { - ListServerCertificateTags(context.Context, *ListServerCertificateTagsInput, ...func(*Options)) (*ListServerCertificateTagsOutput, error) -} - -var _ ListServerCertificateTagsAPIClient = (*Client)(nil) - // ListServerCertificateTagsPaginatorOptions is the paginator options for // ListServerCertificateTags type ListServerCertificateTagsPaginatorOptions struct { @@ -260,6 +255,9 @@ func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFn } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServerCertificateTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *ListServerCertificateTagsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListServerCertificateTagsAPIClient is a client that implements the +// ListServerCertificateTags operation. +type ListServerCertificateTagsAPIClient interface { + ListServerCertificateTags(context.Context, *ListServerCertificateTagsInput, ...func(*Options)) (*ListServerCertificateTagsOutput, error) +} + +var _ ListServerCertificateTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServerCertificateTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListServerCertificates.go b/service/iam/api_op_ListServerCertificates.go index 32b05461bae..76fec0e13bd 100644 --- a/service/iam/api_op_ListServerCertificates.go +++ b/service/iam/api_op_ListServerCertificates.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServerCertificates(options.Region), middleware.Before); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationListServerCertificatesMiddlewares(stack *middleware return nil } -// ListServerCertificatesAPIClient is a client that implements the -// ListServerCertificates operation. -type ListServerCertificatesAPIClient interface { - ListServerCertificates(context.Context, *ListServerCertificatesInput, ...func(*Options)) (*ListServerCertificatesOutput, error) -} - -var _ ListServerCertificatesAPIClient = (*Client)(nil) - // ListServerCertificatesPaginatorOptions is the paginator options for // ListServerCertificates type ListServerCertificatesPaginatorOptions struct { @@ -262,6 +257,9 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServerCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -281,6 +279,14 @@ func (p *ListServerCertificatesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListServerCertificatesAPIClient is a client that implements the +// ListServerCertificates operation. +type ListServerCertificatesAPIClient interface { + ListServerCertificates(context.Context, *ListServerCertificatesInput, ...func(*Options)) (*ListServerCertificatesOutput, error) +} + +var _ ListServerCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServerCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListServiceSpecificCredentials.go b/service/iam/api_op_ListServiceSpecificCredentials.go index 92a3f2615e2..74d617e06bc 100644 --- a/service/iam/api_op_ListServiceSpecificCredentials.go +++ b/service/iam/api_op_ListServiceSpecificCredentials.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListServiceSpecificCredentialsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceSpecificCredentials(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_ListSigningCertificates.go b/service/iam/api_op_ListSigningCertificates.go index ae6dfc8e7ce..b5ae2b2145a 100644 --- a/service/iam/api_op_ListSigningCertificates.go +++ b/service/iam/api_op_ListSigningCertificates.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningCertificates(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListSigningCertificatesMiddlewares(stack *middlewar return nil } -// ListSigningCertificatesAPIClient is a client that implements the -// ListSigningCertificates operation. -type ListSigningCertificatesAPIClient interface { - ListSigningCertificates(context.Context, *ListSigningCertificatesInput, ...func(*Options)) (*ListSigningCertificatesOutput, error) -} - -var _ ListSigningCertificatesAPIClient = (*Client)(nil) - // ListSigningCertificatesPaginatorOptions is the paginator options for // ListSigningCertificates type ListSigningCertificatesPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSigningCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *ListSigningCertificatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSigningCertificatesAPIClient is a client that implements the +// ListSigningCertificates operation. +type ListSigningCertificatesAPIClient interface { + ListSigningCertificates(context.Context, *ListSigningCertificatesInput, ...func(*Options)) (*ListSigningCertificatesOutput, error) +} + +var _ ListSigningCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSigningCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListUserPolicies.go b/service/iam/api_op_ListUserPolicies.go index 9d845523a73..11b7db9b730 100644 --- a/service/iam/api_op_ListUserPolicies.go +++ b/service/iam/api_op_ListUserPolicies.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserPoliciesValidationMiddleware(stack); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationListUserPoliciesMiddlewares(stack *middleware.Stack return nil } -// ListUserPoliciesAPIClient is a client that implements the ListUserPolicies -// operation. -type ListUserPoliciesAPIClient interface { - ListUserPolicies(context.Context, *ListUserPoliciesInput, ...func(*Options)) (*ListUserPoliciesOutput, error) -} - -var _ ListUserPoliciesAPIClient = (*Client)(nil) - // ListUserPoliciesPaginatorOptions is the paginator options for ListUserPolicies type ListUserPoliciesPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -256,6 +251,9 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *ListUserPoliciesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListUserPoliciesAPIClient is a client that implements the ListUserPolicies +// operation. +type ListUserPoliciesAPIClient interface { + ListUserPolicies(context.Context, *ListUserPoliciesInput, ...func(*Options)) (*ListUserPoliciesOutput, error) +} + +var _ ListUserPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListUserTags.go b/service/iam/api_op_ListUserTags.go index 8506d8c3ac6..7dc9c05e0b7 100644 --- a/service/iam/api_op_ListUserTags.go +++ b/service/iam/api_op_ListUserTags.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserTagsValidationMiddleware(stack); err != nil { return err } @@ -173,13 +176,6 @@ func (c *Client) addOperationListUserTagsMiddlewares(stack *middleware.Stack, op return nil } -// ListUserTagsAPIClient is a client that implements the ListUserTags operation. -type ListUserTagsAPIClient interface { - ListUserTags(context.Context, *ListUserTagsInput, ...func(*Options)) (*ListUserTagsOutput, error) -} - -var _ ListUserTagsAPIClient = (*Client)(nil) - // ListUserTagsPaginatorOptions is the paginator options for ListUserTags type ListUserTagsPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -251,6 +247,9 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +269,13 @@ func (p *ListUserTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListUserTagsAPIClient is a client that implements the ListUserTags operation. +type ListUserTagsAPIClient interface { + ListUserTags(context.Context, *ListUserTagsInput, ...func(*Options)) (*ListUserTagsOutput, error) +} + +var _ ListUserTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListUsers.go b/service/iam/api_op_ListUsers.go index b2b567dc3e3..f6366f9442a 100644 --- a/service/iam/api_op_ListUsers.go +++ b/service/iam/api_op_ListUsers.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsers(options.Region), middleware.Before); err != nil { return err } @@ -182,13 +185,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // Use this only when paginating results to indicate the maximum number of items @@ -260,6 +256,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +278,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_ListVirtualMFADevices.go b/service/iam/api_op_ListVirtualMFADevices.go index c19dcc7aa3a..299fafffa4d 100644 --- a/service/iam/api_op_ListVirtualMFADevices.go +++ b/service/iam/api_op_ListVirtualMFADevices.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVirtualMFADevices(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListVirtualMFADevicesMiddlewares(stack *middleware. return nil } -// ListVirtualMFADevicesAPIClient is a client that implements the -// ListVirtualMFADevices operation. -type ListVirtualMFADevicesAPIClient interface { - ListVirtualMFADevices(context.Context, *ListVirtualMFADevicesInput, ...func(*Options)) (*ListVirtualMFADevicesOutput, error) -} - -var _ ListVirtualMFADevicesAPIClient = (*Client)(nil) - // ListVirtualMFADevicesPaginatorOptions is the paginator options for // ListVirtualMFADevices type ListVirtualMFADevicesPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVirtualMFADevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListVirtualMFADevicesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListVirtualMFADevicesAPIClient is a client that implements the +// ListVirtualMFADevices operation. +type ListVirtualMFADevicesAPIClient interface { + ListVirtualMFADevices(context.Context, *ListVirtualMFADevicesInput, ...func(*Options)) (*ListVirtualMFADevicesOutput, error) +} + +var _ ListVirtualMFADevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVirtualMFADevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_PutGroupPolicy.go b/service/iam/api_op_PutGroupPolicy.go index 32b6039b5b4..2f1e8c598e8 100644 --- a/service/iam/api_op_PutGroupPolicy.go +++ b/service/iam/api_op_PutGroupPolicy.go @@ -160,6 +160,9 @@ func (c *Client) addOperationPutGroupPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_PutRolePermissionsBoundary.go b/service/iam/api_op_PutRolePermissionsBoundary.go index ddf059896c7..a6065574503 100644 --- a/service/iam/api_op_PutRolePermissionsBoundary.go +++ b/service/iam/api_op_PutRolePermissionsBoundary.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPutRolePermissionsBoundaryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRolePermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_PutRolePolicy.go b/service/iam/api_op_PutRolePolicy.go index 83155f34133..7977a8f714a 100644 --- a/service/iam/api_op_PutRolePolicy.go +++ b/service/iam/api_op_PutRolePolicy.go @@ -169,6 +169,9 @@ func (c *Client) addOperationPutRolePolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_PutUserPermissionsBoundary.go b/service/iam/api_op_PutUserPermissionsBoundary.go index 1c671b9df8d..b076030bcdd 100644 --- a/service/iam/api_op_PutUserPermissionsBoundary.go +++ b/service/iam/api_op_PutUserPermissionsBoundary.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutUserPermissionsBoundaryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutUserPermissionsBoundaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_PutUserPolicy.go b/service/iam/api_op_PutUserPolicy.go index 9d2048034d0..eb2e1376ca0 100644 --- a/service/iam/api_op_PutUserPolicy.go +++ b/service/iam/api_op_PutUserPolicy.go @@ -160,6 +160,9 @@ func (c *Client) addOperationPutUserPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutUserPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go b/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go index 92c5d043a1e..71975b0a61f 100644 --- a/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go +++ b/service/iam/api_op_RemoveClientIDFromOpenIDConnectProvider.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRemoveClientIDFromOpenIDConnectProviderMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveClientIDFromOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_RemoveRoleFromInstanceProfile.go b/service/iam/api_op_RemoveRoleFromInstanceProfile.go index e7baf3b98b5..02ee3aa99b4 100644 --- a/service/iam/api_op_RemoveRoleFromInstanceProfile.go +++ b/service/iam/api_op_RemoveRoleFromInstanceProfile.go @@ -129,6 +129,9 @@ func (c *Client) addOperationRemoveRoleFromInstanceProfileMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRoleFromInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_RemoveUserFromGroup.go b/service/iam/api_op_RemoveUserFromGroup.go index 8e5dff6c06d..0640669b4c0 100644 --- a/service/iam/api_op_RemoveUserFromGroup.go +++ b/service/iam/api_op_RemoveUserFromGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRemoveUserFromGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveUserFromGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_ResetServiceSpecificCredential.go b/service/iam/api_op_ResetServiceSpecificCredential.go index ac1cd9cf304..85f0710ef5e 100644 --- a/service/iam/api_op_ResetServiceSpecificCredential.go +++ b/service/iam/api_op_ResetServiceSpecificCredential.go @@ -129,6 +129,9 @@ func (c *Client) addOperationResetServiceSpecificCredentialMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_ResyncMFADevice.go b/service/iam/api_op_ResyncMFADevice.go index d73e33dbccc..bd53a03b98e 100644 --- a/service/iam/api_op_ResyncMFADevice.go +++ b/service/iam/api_op_ResyncMFADevice.go @@ -138,6 +138,9 @@ func (c *Client) addOperationResyncMFADeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResyncMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_SetDefaultPolicyVersion.go b/service/iam/api_op_SetDefaultPolicyVersion.go index 325e4d1a541..5aa954a949c 100644 --- a/service/iam/api_op_SetDefaultPolicyVersion.go +++ b/service/iam/api_op_SetDefaultPolicyVersion.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_SetSecurityTokenServicePreferences.go b/service/iam/api_op_SetSecurityTokenServicePreferences.go index bb24759b1d8..e0ffc10ed9b 100644 --- a/service/iam/api_op_SetSecurityTokenServicePreferences.go +++ b/service/iam/api_op_SetSecurityTokenServicePreferences.go @@ -131,6 +131,9 @@ func (c *Client) addOperationSetSecurityTokenServicePreferencesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSecurityTokenServicePreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_SimulateCustomPolicy.go b/service/iam/api_op_SimulateCustomPolicy.go index a5146e866dd..dc49d9b1ea2 100644 --- a/service/iam/api_op_SimulateCustomPolicy.go +++ b/service/iam/api_op_SimulateCustomPolicy.go @@ -337,6 +337,9 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSimulateCustomPolicyValidationMiddleware(stack); err != nil { return err } @@ -361,14 +364,6 @@ func (c *Client) addOperationSimulateCustomPolicyMiddlewares(stack *middleware.S return nil } -// SimulateCustomPolicyAPIClient is a client that implements the -// SimulateCustomPolicy operation. -type SimulateCustomPolicyAPIClient interface { - SimulateCustomPolicy(context.Context, *SimulateCustomPolicyInput, ...func(*Options)) (*SimulateCustomPolicyOutput, error) -} - -var _ SimulateCustomPolicyAPIClient = (*Client)(nil) - // SimulateCustomPolicyPaginatorOptions is the paginator options for // SimulateCustomPolicy type SimulateCustomPolicyPaginatorOptions struct { @@ -441,6 +436,9 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SimulateCustomPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -460,6 +458,14 @@ func (p *SimulateCustomPolicyPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SimulateCustomPolicyAPIClient is a client that implements the +// SimulateCustomPolicy operation. +type SimulateCustomPolicyAPIClient interface { + SimulateCustomPolicy(context.Context, *SimulateCustomPolicyInput, ...func(*Options)) (*SimulateCustomPolicyOutput, error) +} + +var _ SimulateCustomPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSimulateCustomPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_SimulatePrincipalPolicy.go b/service/iam/api_op_SimulatePrincipalPolicy.go index a7abf8bf049..af3a3fe662c 100644 --- a/service/iam/api_op_SimulatePrincipalPolicy.go +++ b/service/iam/api_op_SimulatePrincipalPolicy.go @@ -362,6 +362,9 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSimulatePrincipalPolicyValidationMiddleware(stack); err != nil { return err } @@ -386,14 +389,6 @@ func (c *Client) addOperationSimulatePrincipalPolicyMiddlewares(stack *middlewar return nil } -// SimulatePrincipalPolicyAPIClient is a client that implements the -// SimulatePrincipalPolicy operation. -type SimulatePrincipalPolicyAPIClient interface { - SimulatePrincipalPolicy(context.Context, *SimulatePrincipalPolicyInput, ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) -} - -var _ SimulatePrincipalPolicyAPIClient = (*Client)(nil) - // SimulatePrincipalPolicyPaginatorOptions is the paginator options for // SimulatePrincipalPolicy type SimulatePrincipalPolicyPaginatorOptions struct { @@ -467,6 +462,9 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SimulatePrincipalPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -486,6 +484,14 @@ func (p *SimulatePrincipalPolicyPaginator) NextPage(ctx context.Context, optFns return result, nil } +// SimulatePrincipalPolicyAPIClient is a client that implements the +// SimulatePrincipalPolicy operation. +type SimulatePrincipalPolicyAPIClient interface { + SimulatePrincipalPolicy(context.Context, *SimulatePrincipalPolicyInput, ...func(*Options)) (*SimulatePrincipalPolicyOutput, error) +} + +var _ SimulatePrincipalPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSimulatePrincipalPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iam/api_op_TagInstanceProfile.go b/service/iam/api_op_TagInstanceProfile.go index 70e099b27c7..d191802edd4 100644 --- a/service/iam/api_op_TagInstanceProfile.go +++ b/service/iam/api_op_TagInstanceProfile.go @@ -139,6 +139,9 @@ func (c *Client) addOperationTagInstanceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagMFADevice.go b/service/iam/api_op_TagMFADevice.go index b218b9db482..9a41c6839bf 100644 --- a/service/iam/api_op_TagMFADevice.go +++ b/service/iam/api_op_TagMFADevice.go @@ -141,6 +141,9 @@ func (c *Client) addOperationTagMFADeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagOpenIDConnectProvider.go b/service/iam/api_op_TagOpenIDConnectProvider.go index 22c07029d20..6a98eaf4888 100644 --- a/service/iam/api_op_TagOpenIDConnectProvider.go +++ b/service/iam/api_op_TagOpenIDConnectProvider.go @@ -141,6 +141,9 @@ func (c *Client) addOperationTagOpenIDConnectProviderMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagPolicy.go b/service/iam/api_op_TagPolicy.go index 1281350b4e6..5a012efeeeb 100644 --- a/service/iam/api_op_TagPolicy.go +++ b/service/iam/api_op_TagPolicy.go @@ -139,6 +139,9 @@ func (c *Client) addOperationTagPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagRole.go b/service/iam/api_op_TagRole.go index c09c04acb2f..6ed2bacc420 100644 --- a/service/iam/api_op_TagRole.go +++ b/service/iam/api_op_TagRole.go @@ -147,6 +147,9 @@ func (c *Client) addOperationTagRoleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagSAMLProvider.go b/service/iam/api_op_TagSAMLProvider.go index ab49f23f6a4..797d4af1c16 100644 --- a/service/iam/api_op_TagSAMLProvider.go +++ b/service/iam/api_op_TagSAMLProvider.go @@ -141,6 +141,9 @@ func (c *Client) addOperationTagSAMLProviderMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagServerCertificate.go b/service/iam/api_op_TagServerCertificate.go index f0abda8b0c8..c23d2347c64 100644 --- a/service/iam/api_op_TagServerCertificate.go +++ b/service/iam/api_op_TagServerCertificate.go @@ -148,6 +148,9 @@ func (c *Client) addOperationTagServerCertificateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_TagUser.go b/service/iam/api_op_TagUser.go index ea32de717ee..a7286044af7 100644 --- a/service/iam/api_op_TagUser.go +++ b/service/iam/api_op_TagUser.go @@ -146,6 +146,9 @@ func (c *Client) addOperationTagUserMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagInstanceProfile.go b/service/iam/api_op_UntagInstanceProfile.go index 36749053db1..37e60957fc1 100644 --- a/service/iam/api_op_UntagInstanceProfile.go +++ b/service/iam/api_op_UntagInstanceProfile.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUntagInstanceProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagInstanceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagMFADevice.go b/service/iam/api_op_UntagMFADevice.go index 13581d0a0b3..1c69ae33274 100644 --- a/service/iam/api_op_UntagMFADevice.go +++ b/service/iam/api_op_UntagMFADevice.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUntagMFADeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagMFADeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagOpenIDConnectProvider.go b/service/iam/api_op_UntagOpenIDConnectProvider.go index aec4f18e8c4..4797c501db3 100644 --- a/service/iam/api_op_UntagOpenIDConnectProvider.go +++ b/service/iam/api_op_UntagOpenIDConnectProvider.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUntagOpenIDConnectProviderMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagOpenIDConnectProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagPolicy.go b/service/iam/api_op_UntagPolicy.go index fd72d1ee5f0..5e2f22527e6 100644 --- a/service/iam/api_op_UntagPolicy.go +++ b/service/iam/api_op_UntagPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUntagPolicyMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagRole.go b/service/iam/api_op_UntagRole.go index c1c4379bc86..ce486e00f46 100644 --- a/service/iam/api_op_UntagRole.go +++ b/service/iam/api_op_UntagRole.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUntagRoleMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagSAMLProvider.go b/service/iam/api_op_UntagSAMLProvider.go index 0ae7c1df6b8..bbd0d11ea4c 100644 --- a/service/iam/api_op_UntagSAMLProvider.go +++ b/service/iam/api_op_UntagSAMLProvider.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUntagSAMLProviderMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagServerCertificate.go b/service/iam/api_op_UntagServerCertificate.go index 4417710f286..f0b2edcfead 100644 --- a/service/iam/api_op_UntagServerCertificate.go +++ b/service/iam/api_op_UntagServerCertificate.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUntagServerCertificateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UntagUser.go b/service/iam/api_op_UntagUser.go index dad6fca1955..718b9d309b0 100644 --- a/service/iam/api_op_UntagUser.go +++ b/service/iam/api_op_UntagUser.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUntagUserMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateAccessKey.go b/service/iam/api_op_UpdateAccessKey.go index 1f4319d0eaf..20bab543e37 100644 --- a/service/iam/api_op_UpdateAccessKey.go +++ b/service/iam/api_op_UpdateAccessKey.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateAccessKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccessKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateAccountPasswordPolicy.go b/service/iam/api_op_UpdateAccountPasswordPolicy.go index 0b6de050534..b386b6ea957 100644 --- a/service/iam/api_op_UpdateAccountPasswordPolicy.go +++ b/service/iam/api_op_UpdateAccountPasswordPolicy.go @@ -190,6 +190,9 @@ func (c *Client) addOperationUpdateAccountPasswordPolicyMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountPasswordPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iam/api_op_UpdateAssumeRolePolicy.go b/service/iam/api_op_UpdateAssumeRolePolicy.go index 781da83ff70..d02c0d8531b 100644 --- a/service/iam/api_op_UpdateAssumeRolePolicy.go +++ b/service/iam/api_op_UpdateAssumeRolePolicy.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateAssumeRolePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssumeRolePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateGroup.go b/service/iam/api_op_UpdateGroup.go index a27c441a157..a5ca9f0b3ed 100644 --- a/service/iam/api_op_UpdateGroup.go +++ b/service/iam/api_op_UpdateGroup.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateLoginProfile.go b/service/iam/api_op_UpdateLoginProfile.go index 3fb786f75f0..406fa0a4e25 100644 --- a/service/iam/api_op_UpdateLoginProfile.go +++ b/service/iam/api_op_UpdateLoginProfile.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateLoginProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLoginProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go b/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go index e7af73a02e2..2b34f750ff6 100644 --- a/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go +++ b/service/iam/api_op_UpdateOpenIDConnectProviderThumbprint.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateOpenIDConnectProviderThumbprintMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOpenIDConnectProviderThumbprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateRole.go b/service/iam/api_op_UpdateRole.go index c64cef70196..ce439ad0fdd 100644 --- a/service/iam/api_op_UpdateRole.go +++ b/service/iam/api_op_UpdateRole.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateRoleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateRoleDescription.go b/service/iam/api_op_UpdateRoleDescription.go index 2e07f5c73df..afff26bb566 100644 --- a/service/iam/api_op_UpdateRoleDescription.go +++ b/service/iam/api_op_UpdateRoleDescription.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateRoleDescriptionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoleDescriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateSAMLProvider.go b/service/iam/api_op_UpdateSAMLProvider.go index 8abb341d857..a7e713549c4 100644 --- a/service/iam/api_op_UpdateSAMLProvider.go +++ b/service/iam/api_op_UpdateSAMLProvider.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateSAMLProviderMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSAMLProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateSSHPublicKey.go b/service/iam/api_op_UpdateSSHPublicKey.go index ccc132fd489..eee0fd4978e 100644 --- a/service/iam/api_op_UpdateSSHPublicKey.go +++ b/service/iam/api_op_UpdateSSHPublicKey.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateServerCertificate.go b/service/iam/api_op_UpdateServerCertificate.go index 73eed15f103..587c233281d 100644 --- a/service/iam/api_op_UpdateServerCertificate.go +++ b/service/iam/api_op_UpdateServerCertificate.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateServerCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateServiceSpecificCredential.go b/service/iam/api_op_UpdateServiceSpecificCredential.go index 180b3216e2c..251aa831c6e 100644 --- a/service/iam/api_op_UpdateServiceSpecificCredential.go +++ b/service/iam/api_op_UpdateServiceSpecificCredential.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateServiceSpecificCredentialMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSpecificCredentialValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateSigningCertificate.go b/service/iam/api_op_UpdateSigningCertificate.go index b8a2fdafc19..7f670417c30 100644 --- a/service/iam/api_op_UpdateSigningCertificate.go +++ b/service/iam/api_op_UpdateSigningCertificate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateSigningCertificateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UpdateUser.go b/service/iam/api_op_UpdateUser.go index 3080c7f3454..fc494f2f6e3 100644 --- a/service/iam/api_op_UpdateUser.go +++ b/service/iam/api_op_UpdateUser.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UploadSSHPublicKey.go b/service/iam/api_op_UploadSSHPublicKey.go index 512e80695ed..f15c7265c6d 100644 --- a/service/iam/api_op_UploadSSHPublicKey.go +++ b/service/iam/api_op_UploadSSHPublicKey.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUploadSSHPublicKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadSSHPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UploadServerCertificate.go b/service/iam/api_op_UploadServerCertificate.go index c4592d1aa28..c3a9eb090ee 100644 --- a/service/iam/api_op_UploadServerCertificate.go +++ b/service/iam/api_op_UploadServerCertificate.go @@ -236,6 +236,9 @@ func (c *Client) addOperationUploadServerCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadServerCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iam/api_op_UploadSigningCertificate.go b/service/iam/api_op_UploadSigningCertificate.go index 2906595f6cf..db7f07b5516 100644 --- a/service/iam/api_op_UploadSigningCertificate.go +++ b/service/iam/api_op_UploadSigningCertificate.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUploadSigningCertificateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadSigningCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_client.go b/service/identitystore/api_client.go index 9f3bb269cde..fbf199701b0 100644 --- a/service/identitystore/api_client.go +++ b/service/identitystore/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/identitystore/api_op_CreateGroup.go b/service/identitystore/api_op_CreateGroup.go index 3384454fdc2..7b1ef095413 100644 --- a/service/identitystore/api_op_CreateGroup.go +++ b/service/identitystore/api_op_CreateGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_CreateGroupMembership.go b/service/identitystore/api_op_CreateGroupMembership.go index 3f003f70a43..a4074ae59da 100644 --- a/service/identitystore/api_op_CreateGroupMembership.go +++ b/service/identitystore/api_op_CreateGroupMembership.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_CreateUser.go b/service/identitystore/api_op_CreateUser.go index 0697c5bbf5c..0fb60f7467a 100644 --- a/service/identitystore/api_op_CreateUser.go +++ b/service/identitystore/api_op_CreateUser.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_DeleteGroup.go b/service/identitystore/api_op_DeleteGroup.go index 8434b7fc317..fc2403c15f4 100644 --- a/service/identitystore/api_op_DeleteGroup.go +++ b/service/identitystore/api_op_DeleteGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_DeleteGroupMembership.go b/service/identitystore/api_op_DeleteGroupMembership.go index 3eaf5cca841..f68986a2437 100644 --- a/service/identitystore/api_op_DeleteGroupMembership.go +++ b/service/identitystore/api_op_DeleteGroupMembership.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_DeleteUser.go b/service/identitystore/api_op_DeleteUser.go index ee6c335c370..3539c014fad 100644 --- a/service/identitystore/api_op_DeleteUser.go +++ b/service/identitystore/api_op_DeleteUser.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_DescribeGroup.go b/service/identitystore/api_op_DescribeGroup.go index 903cc8c39d1..1a2bbddd268 100644 --- a/service/identitystore/api_op_DescribeGroup.go +++ b/service/identitystore/api_op_DescribeGroup.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_DescribeGroupMembership.go b/service/identitystore/api_op_DescribeGroupMembership.go index 2f9e6e78a82..50a1dd064a3 100644 --- a/service/identitystore/api_op_DescribeGroupMembership.go +++ b/service/identitystore/api_op_DescribeGroupMembership.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_DescribeUser.go b/service/identitystore/api_op_DescribeUser.go index c4e6b33bbed..b1bd56e376c 100644 --- a/service/identitystore/api_op_DescribeUser.go +++ b/service/identitystore/api_op_DescribeUser.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_GetGroupId.go b/service/identitystore/api_op_GetGroupId.go index 8420bcfeeb1..b733bbf97b8 100644 --- a/service/identitystore/api_op_GetGroupId.go +++ b/service/identitystore/api_op_GetGroupId.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetGroupIdMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_GetGroupMembershipId.go b/service/identitystore/api_op_GetGroupMembershipId.go index f3dad9c9139..46503a7fffe 100644 --- a/service/identitystore/api_op_GetGroupMembershipId.go +++ b/service/identitystore/api_op_GetGroupMembershipId.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetGroupMembershipIdMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupMembershipIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_GetUserId.go b/service/identitystore/api_op_GetUserId.go index 6066ae9d3bd..d57b2a93360 100644 --- a/service/identitystore/api_op_GetUserId.go +++ b/service/identitystore/api_op_GetUserId.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetUserIdMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_IsMemberInGroups.go b/service/identitystore/api_op_IsMemberInGroups.go index 459e700c5ef..44e00287091 100644 --- a/service/identitystore/api_op_IsMemberInGroups.go +++ b/service/identitystore/api_op_IsMemberInGroups.go @@ -124,6 +124,9 @@ func (c *Client) addOperationIsMemberInGroupsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIsMemberInGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_ListGroupMemberships.go b/service/identitystore/api_op_ListGroupMemberships.go index 46aa5fe4612..b0507f52527 100644 --- a/service/identitystore/api_op_ListGroupMemberships.go +++ b/service/identitystore/api_op_ListGroupMemberships.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S return nil } -// ListGroupMembershipsAPIClient is a client that implements the -// ListGroupMemberships operation. -type ListGroupMembershipsAPIClient interface { - ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) -} - -var _ ListGroupMembershipsAPIClient = (*Client)(nil) - // ListGroupMembershipsPaginatorOptions is the paginator options for // ListGroupMemberships type ListGroupMembershipsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListGroupMembershipsAPIClient is a client that implements the +// ListGroupMemberships operation. +type ListGroupMembershipsAPIClient interface { + ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) +} + +var _ ListGroupMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/identitystore/api_op_ListGroupMembershipsForMember.go b/service/identitystore/api_op_ListGroupMembershipsForMember.go index 8a9df682a16..535efab663c 100644 --- a/service/identitystore/api_op_ListGroupMembershipsForMember.go +++ b/service/identitystore/api_op_ListGroupMembershipsForMember.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsForMemberValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListGroupMembershipsForMemberMiddlewares(stack *mid return nil } -// ListGroupMembershipsForMemberAPIClient is a client that implements the -// ListGroupMembershipsForMember operation. -type ListGroupMembershipsForMemberAPIClient interface { - ListGroupMembershipsForMember(context.Context, *ListGroupMembershipsForMemberInput, ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) -} - -var _ ListGroupMembershipsForMemberAPIClient = (*Client)(nil) - // ListGroupMembershipsForMemberPaginatorOptions is the paginator options for // ListGroupMembershipsForMember type ListGroupMembershipsForMemberPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListGroupMembershipsForMemberPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupMembershipsForMember(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListGroupMembershipsForMemberPaginator) NextPage(ctx context.Context, o return result, nil } +// ListGroupMembershipsForMemberAPIClient is a client that implements the +// ListGroupMembershipsForMember operation. +type ListGroupMembershipsForMemberAPIClient interface { + ListGroupMembershipsForMember(context.Context, *ListGroupMembershipsForMemberInput, ...func(*Options)) (*ListGroupMembershipsForMemberOutput, error) +} + +var _ ListGroupMembershipsForMemberAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupMembershipsForMember(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/identitystore/api_op_ListGroups.go b/service/identitystore/api_op_ListGroups.go index 97fa2b2a903..ccdaec598d1 100644 --- a/service/identitystore/api_op_ListGroups.go +++ b/service/identitystore/api_op_ListGroups.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -166,13 +169,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The maximum number of results to be returned per request. This parameter is @@ -238,6 +234,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +256,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/identitystore/api_op_ListUsers.go b/service/identitystore/api_op_ListUsers.go index dc23d145048..0421d72fd03 100644 --- a/service/identitystore/api_op_ListUsers.go +++ b/service/identitystore/api_op_ListUsers.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -166,13 +169,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to be returned per request. This parameter is @@ -238,6 +234,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +256,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/identitystore/api_op_UpdateGroup.go b/service/identitystore/api_op_UpdateGroup.go index 9c957ab0305..56a1da3be05 100644 --- a/service/identitystore/api_op_UpdateGroup.go +++ b/service/identitystore/api_op_UpdateGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/identitystore/api_op_UpdateUser.go b/service/identitystore/api_op_UpdateUser.go index 92645924641..3d8cdcb2fe3 100644 --- a/service/identitystore/api_op_UpdateUser.go +++ b/service/identitystore/api_op_UpdateUser.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_client.go b/service/imagebuilder/api_client.go index b067ec98781..766925446c3 100644 --- a/service/imagebuilder/api_client.go +++ b/service/imagebuilder/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/imagebuilder/api_op_CancelImageCreation.go b/service/imagebuilder/api_op_CancelImageCreation.go index 8ab35886808..f33aad0fa0f 100644 --- a/service/imagebuilder/api_op_CancelImageCreation.go +++ b/service/imagebuilder/api_op_CancelImageCreation.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCancelImageCreationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCancelImageCreationMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CancelLifecycleExecution.go b/service/imagebuilder/api_op_CancelLifecycleExecution.go index 68512112570..23369107a96 100644 --- a/service/imagebuilder/api_op_CancelLifecycleExecution.go +++ b/service/imagebuilder/api_op_CancelLifecycleExecution.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelLifecycleExecutionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCancelLifecycleExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateComponent.go b/service/imagebuilder/api_op_CreateComponent.go index b0dccdd1e38..b045538b1b3 100644 --- a/service/imagebuilder/api_op_CreateComponent.go +++ b/service/imagebuilder/api_op_CreateComponent.go @@ -182,6 +182,9 @@ func (c *Client) addOperationCreateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateContainerRecipe.go b/service/imagebuilder/api_op_CreateContainerRecipe.go index 617d9b343c6..4126c6fd059 100644 --- a/service/imagebuilder/api_op_CreateContainerRecipe.go +++ b/service/imagebuilder/api_op_CreateContainerRecipe.go @@ -190,6 +190,9 @@ func (c *Client) addOperationCreateContainerRecipeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateContainerRecipeMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateDistributionConfiguration.go b/service/imagebuilder/api_op_CreateDistributionConfiguration.go index 8ce5861db8e..a3ed9a9485e 100644 --- a/service/imagebuilder/api_op_CreateDistributionConfiguration.go +++ b/service/imagebuilder/api_op_CreateDistributionConfiguration.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateDistributionConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDistributionConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateImage.go b/service/imagebuilder/api_op_CreateImage.go index 50257fb4181..2f2e5c3dd50 100644 --- a/service/imagebuilder/api_op_CreateImage.go +++ b/service/imagebuilder/api_op_CreateImage.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateImageMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateImagePipeline.go b/service/imagebuilder/api_op_CreateImagePipeline.go index f35ee3a29c2..9d90d764d48 100644 --- a/service/imagebuilder/api_op_CreateImagePipeline.go +++ b/service/imagebuilder/api_op_CreateImagePipeline.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateImagePipelineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateImagePipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateImageRecipe.go b/service/imagebuilder/api_op_CreateImageRecipe.go index dbf82096bce..d50feb61621 100644 --- a/service/imagebuilder/api_op_CreateImageRecipe.go +++ b/service/imagebuilder/api_op_CreateImageRecipe.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateImageRecipeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateImageRecipeMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateInfrastructureConfiguration.go b/service/imagebuilder/api_op_CreateInfrastructureConfiguration.go index 7e1dd4b92c0..f14541843ef 100644 --- a/service/imagebuilder/api_op_CreateInfrastructureConfiguration.go +++ b/service/imagebuilder/api_op_CreateInfrastructureConfiguration.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateInfrastructureConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateInfrastructureConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateLifecyclePolicy.go b/service/imagebuilder/api_op_CreateLifecyclePolicy.go index 9cdf9815f56..f9e8ab3e2e2 100644 --- a/service/imagebuilder/api_op_CreateLifecyclePolicy.go +++ b/service/imagebuilder/api_op_CreateLifecyclePolicy.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLifecyclePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_CreateWorkflow.go b/service/imagebuilder/api_op_CreateWorkflow.go index 3728eeb18f5..ea8e7d7fbff 100644 --- a/service/imagebuilder/api_op_CreateWorkflow.go +++ b/service/imagebuilder/api_op_CreateWorkflow.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorkflowMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteComponent.go b/service/imagebuilder/api_op_DeleteComponent.go index c8384036791..3264da2afde 100644 --- a/service/imagebuilder/api_op_DeleteComponent.go +++ b/service/imagebuilder/api_op_DeleteComponent.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteContainerRecipe.go b/service/imagebuilder/api_op_DeleteContainerRecipe.go index 7da23b9b200..167f22819c0 100644 --- a/service/imagebuilder/api_op_DeleteContainerRecipe.go +++ b/service/imagebuilder/api_op_DeleteContainerRecipe.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteContainerRecipeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContainerRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteDistributionConfiguration.go b/service/imagebuilder/api_op_DeleteDistributionConfiguration.go index f62d9bf2b2f..33249d43af2 100644 --- a/service/imagebuilder/api_op_DeleteDistributionConfiguration.go +++ b/service/imagebuilder/api_op_DeleteDistributionConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDistributionConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDistributionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteImage.go b/service/imagebuilder/api_op_DeleteImage.go index b74ef0ffc9e..c2e9674ecca 100644 --- a/service/imagebuilder/api_op_DeleteImage.go +++ b/service/imagebuilder/api_op_DeleteImage.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteImagePipeline.go b/service/imagebuilder/api_op_DeleteImagePipeline.go index 5296102e181..8e968e03e83 100644 --- a/service/imagebuilder/api_op_DeleteImagePipeline.go +++ b/service/imagebuilder/api_op_DeleteImagePipeline.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteImagePipelineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImagePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteImageRecipe.go b/service/imagebuilder/api_op_DeleteImageRecipe.go index e6dac4eb3e0..5865037020c 100644 --- a/service/imagebuilder/api_op_DeleteImageRecipe.go +++ b/service/imagebuilder/api_op_DeleteImageRecipe.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteImageRecipeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImageRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteInfrastructureConfiguration.go b/service/imagebuilder/api_op_DeleteInfrastructureConfiguration.go index 5ae75c6cf36..6282c7f415c 100644 --- a/service/imagebuilder/api_op_DeleteInfrastructureConfiguration.go +++ b/service/imagebuilder/api_op_DeleteInfrastructureConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteInfrastructureConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInfrastructureConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteLifecyclePolicy.go b/service/imagebuilder/api_op_DeleteLifecyclePolicy.go index 288e1132be1..122760fb205 100644 --- a/service/imagebuilder/api_op_DeleteLifecyclePolicy.go +++ b/service/imagebuilder/api_op_DeleteLifecyclePolicy.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_DeleteWorkflow.go b/service/imagebuilder/api_op_DeleteWorkflow.go index 87da4a2a4f5..1a958c0ca6e 100644 --- a/service/imagebuilder/api_op_DeleteWorkflow.go +++ b/service/imagebuilder/api_op_DeleteWorkflow.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetComponent.go b/service/imagebuilder/api_op_GetComponent.go index f4e3832dd0a..3fc0bf756f9 100644 --- a/service/imagebuilder/api_op_GetComponent.go +++ b/service/imagebuilder/api_op_GetComponent.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetComponentPolicy.go b/service/imagebuilder/api_op_GetComponentPolicy.go index 1db92cfdd6f..efedd862529 100644 --- a/service/imagebuilder/api_op_GetComponentPolicy.go +++ b/service/imagebuilder/api_op_GetComponentPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetComponentPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetContainerRecipe.go b/service/imagebuilder/api_op_GetContainerRecipe.go index d0fa00eb1b5..88f2ee94bdc 100644 --- a/service/imagebuilder/api_op_GetContainerRecipe.go +++ b/service/imagebuilder/api_op_GetContainerRecipe.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetContainerRecipeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetContainerRecipePolicy.go b/service/imagebuilder/api_op_GetContainerRecipePolicy.go index a0a44739e06..fb43e4cad5b 100644 --- a/service/imagebuilder/api_op_GetContainerRecipePolicy.go +++ b/service/imagebuilder/api_op_GetContainerRecipePolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetContainerRecipePolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerRecipePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetDistributionConfiguration.go b/service/imagebuilder/api_op_GetDistributionConfiguration.go index 6129c5e47e0..112d44be0ec 100644 --- a/service/imagebuilder/api_op_GetDistributionConfiguration.go +++ b/service/imagebuilder/api_op_GetDistributionConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetDistributionConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDistributionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetImage.go b/service/imagebuilder/api_op_GetImage.go index 1e6303eacdf..d2e3ca25d5e 100644 --- a/service/imagebuilder/api_op_GetImage.go +++ b/service/imagebuilder/api_op_GetImage.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetImageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetImagePipeline.go b/service/imagebuilder/api_op_GetImagePipeline.go index 33633900121..4006dded424 100644 --- a/service/imagebuilder/api_op_GetImagePipeline.go +++ b/service/imagebuilder/api_op_GetImagePipeline.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetImagePipelineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImagePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetImagePolicy.go b/service/imagebuilder/api_op_GetImagePolicy.go index d274d9abae9..c078d3aef7b 100644 --- a/service/imagebuilder/api_op_GetImagePolicy.go +++ b/service/imagebuilder/api_op_GetImagePolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetImagePolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImagePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetImageRecipe.go b/service/imagebuilder/api_op_GetImageRecipe.go index afb2fc05524..8c921f15378 100644 --- a/service/imagebuilder/api_op_GetImageRecipe.go +++ b/service/imagebuilder/api_op_GetImageRecipe.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetImageRecipeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImageRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetImageRecipePolicy.go b/service/imagebuilder/api_op_GetImageRecipePolicy.go index 8d7a3cb1109..b8e7b493864 100644 --- a/service/imagebuilder/api_op_GetImageRecipePolicy.go +++ b/service/imagebuilder/api_op_GetImageRecipePolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetImageRecipePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImageRecipePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetInfrastructureConfiguration.go b/service/imagebuilder/api_op_GetInfrastructureConfiguration.go index 732d8e3e39c..d7858819bdd 100644 --- a/service/imagebuilder/api_op_GetInfrastructureConfiguration.go +++ b/service/imagebuilder/api_op_GetInfrastructureConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetInfrastructureConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInfrastructureConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetLifecycleExecution.go b/service/imagebuilder/api_op_GetLifecycleExecution.go index 350d8ea64fc..6b0b4bab23c 100644 --- a/service/imagebuilder/api_op_GetLifecycleExecution.go +++ b/service/imagebuilder/api_op_GetLifecycleExecution.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetLifecycleExecutionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLifecycleExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetLifecyclePolicy.go b/service/imagebuilder/api_op_GetLifecyclePolicy.go index 353ac4b8c01..5b6d4ef96d6 100644 --- a/service/imagebuilder/api_op_GetLifecyclePolicy.go +++ b/service/imagebuilder/api_op_GetLifecyclePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetLifecyclePolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetWorkflow.go b/service/imagebuilder/api_op_GetWorkflow.go index 5068ed9f87e..42a6b16a8b2 100644 --- a/service/imagebuilder/api_op_GetWorkflow.go +++ b/service/imagebuilder/api_op_GetWorkflow.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetWorkflowExecution.go b/service/imagebuilder/api_op_GetWorkflowExecution.go index 28069286555..f08ee64304f 100644 --- a/service/imagebuilder/api_op_GetWorkflowExecution.go +++ b/service/imagebuilder/api_op_GetWorkflowExecution.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetWorkflowExecutionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_GetWorkflowStepExecution.go b/service/imagebuilder/api_op_GetWorkflowStepExecution.go index 782c0f5545d..e60bd3b135d 100644 --- a/service/imagebuilder/api_op_GetWorkflowStepExecution.go +++ b/service/imagebuilder/api_op_GetWorkflowStepExecution.go @@ -164,6 +164,9 @@ func (c *Client) addOperationGetWorkflowStepExecutionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowStepExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_ImportComponent.go b/service/imagebuilder/api_op_ImportComponent.go index 18d5b91c6c6..c925b330296 100644 --- a/service/imagebuilder/api_op_ImportComponent.go +++ b/service/imagebuilder/api_op_ImportComponent.go @@ -174,6 +174,9 @@ func (c *Client) addOperationImportComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_ImportVmImage.go b/service/imagebuilder/api_op_ImportVmImage.go index 12232a940d5..2f129d4f221 100644 --- a/service/imagebuilder/api_op_ImportVmImage.go +++ b/service/imagebuilder/api_op_ImportVmImage.go @@ -169,6 +169,9 @@ func (c *Client) addOperationImportVmImageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportVmImageMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_ListComponentBuildVersions.go b/service/imagebuilder/api_op_ListComponentBuildVersions.go index 9b4ae9b04d3..5c05c650a77 100644 --- a/service/imagebuilder/api_op_ListComponentBuildVersions.go +++ b/service/imagebuilder/api_op_ListComponentBuildVersions.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListComponentBuildVersionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComponentBuildVersionsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListComponentBuildVersionsMiddlewares(stack *middle return nil } -// ListComponentBuildVersionsAPIClient is a client that implements the -// ListComponentBuildVersions operation. -type ListComponentBuildVersionsAPIClient interface { - ListComponentBuildVersions(context.Context, *ListComponentBuildVersionsInput, ...func(*Options)) (*ListComponentBuildVersionsOutput, error) -} - -var _ ListComponentBuildVersionsAPIClient = (*Client)(nil) - // ListComponentBuildVersionsPaginatorOptions is the paginator options for // ListComponentBuildVersions type ListComponentBuildVersionsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListComponentBuildVersionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponentBuildVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListComponentBuildVersionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListComponentBuildVersionsAPIClient is a client that implements the +// ListComponentBuildVersions operation. +type ListComponentBuildVersionsAPIClient interface { + ListComponentBuildVersions(context.Context, *ListComponentBuildVersionsInput, ...func(*Options)) (*ListComponentBuildVersionsOutput, error) +} + +var _ ListComponentBuildVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponentBuildVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListComponents.go b/service/imagebuilder/api_op_ListComponents.go index c89a7729223..93f928398d7 100644 --- a/service/imagebuilder/api_op_ListComponents.go +++ b/service/imagebuilder/api_op_ListComponents.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponents(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum items to return in a request. @@ -245,6 +240,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListContainerRecipes.go b/service/imagebuilder/api_op_ListContainerRecipes.go index 91988b8bc89..5b7760cda1c 100644 --- a/service/imagebuilder/api_op_ListContainerRecipes.go +++ b/service/imagebuilder/api_op_ListContainerRecipes.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListContainerRecipesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContainerRecipes(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListContainerRecipesMiddlewares(stack *middleware.S return nil } -// ListContainerRecipesAPIClient is a client that implements the -// ListContainerRecipes operation. -type ListContainerRecipesAPIClient interface { - ListContainerRecipes(context.Context, *ListContainerRecipesInput, ...func(*Options)) (*ListContainerRecipesOutput, error) -} - -var _ ListContainerRecipesAPIClient = (*Client)(nil) - // ListContainerRecipesPaginatorOptions is the paginator options for // ListContainerRecipes type ListContainerRecipesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListContainerRecipesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContainerRecipes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListContainerRecipesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListContainerRecipesAPIClient is a client that implements the +// ListContainerRecipes operation. +type ListContainerRecipesAPIClient interface { + ListContainerRecipes(context.Context, *ListContainerRecipesInput, ...func(*Options)) (*ListContainerRecipesOutput, error) +} + +var _ ListContainerRecipesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContainerRecipes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListDistributionConfigurations.go b/service/imagebuilder/api_op_ListDistributionConfigurations.go index 20321851921..50b9e258005 100644 --- a/service/imagebuilder/api_op_ListDistributionConfigurations.go +++ b/service/imagebuilder/api_op_ListDistributionConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDistributionConfigurationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributionConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDistributionConfigurationsMiddlewares(stack *mi return nil } -// ListDistributionConfigurationsAPIClient is a client that implements the -// ListDistributionConfigurations operation. -type ListDistributionConfigurationsAPIClient interface { - ListDistributionConfigurations(context.Context, *ListDistributionConfigurationsInput, ...func(*Options)) (*ListDistributionConfigurationsOutput, error) -} - -var _ ListDistributionConfigurationsAPIClient = (*Client)(nil) - // ListDistributionConfigurationsPaginatorOptions is the paginator options for // ListDistributionConfigurations type ListDistributionConfigurationsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListDistributionConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDistributionConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListDistributionConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListDistributionConfigurationsAPIClient is a client that implements the +// ListDistributionConfigurations operation. +type ListDistributionConfigurationsAPIClient interface { + ListDistributionConfigurations(context.Context, *ListDistributionConfigurationsInput, ...func(*Options)) (*ListDistributionConfigurationsOutput, error) +} + +var _ ListDistributionConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDistributionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImageBuildVersions.go b/service/imagebuilder/api_op_ListImageBuildVersions.go index 2e76b448b1d..beac112ccc8 100644 --- a/service/imagebuilder/api_op_ListImageBuildVersions.go +++ b/service/imagebuilder/api_op_ListImageBuildVersions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListImageBuildVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImageBuildVersionsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListImageBuildVersionsMiddlewares(stack *middleware return nil } -// ListImageBuildVersionsAPIClient is a client that implements the -// ListImageBuildVersions operation. -type ListImageBuildVersionsAPIClient interface { - ListImageBuildVersions(context.Context, *ListImageBuildVersionsInput, ...func(*Options)) (*ListImageBuildVersionsOutput, error) -} - -var _ ListImageBuildVersionsAPIClient = (*Client)(nil) - // ListImageBuildVersionsPaginatorOptions is the paginator options for // ListImageBuildVersions type ListImageBuildVersionsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListImageBuildVersionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImageBuildVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListImageBuildVersionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListImageBuildVersionsAPIClient is a client that implements the +// ListImageBuildVersions operation. +type ListImageBuildVersionsAPIClient interface { + ListImageBuildVersions(context.Context, *ListImageBuildVersionsInput, ...func(*Options)) (*ListImageBuildVersionsOutput, error) +} + +var _ ListImageBuildVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImageBuildVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImagePackages.go b/service/imagebuilder/api_op_ListImagePackages.go index 6dda53576bf..2b67b85838f 100644 --- a/service/imagebuilder/api_op_ListImagePackages.go +++ b/service/imagebuilder/api_op_ListImagePackages.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListImagePackagesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImagePackagesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListImagePackagesMiddlewares(stack *middleware.Stac return nil } -// ListImagePackagesAPIClient is a client that implements the ListImagePackages -// operation. -type ListImagePackagesAPIClient interface { - ListImagePackages(context.Context, *ListImagePackagesInput, ...func(*Options)) (*ListImagePackagesOutput, error) -} - -var _ ListImagePackagesAPIClient = (*Client)(nil) - // ListImagePackagesPaginatorOptions is the paginator options for ListImagePackages type ListImagePackagesPaginatorOptions struct { // The maximum items to return in a request. @@ -217,6 +212,9 @@ func (p *ListImagePackagesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImagePackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListImagePackagesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListImagePackagesAPIClient is a client that implements the ListImagePackages +// operation. +type ListImagePackagesAPIClient interface { + ListImagePackages(context.Context, *ListImagePackagesInput, ...func(*Options)) (*ListImagePackagesOutput, error) +} + +var _ ListImagePackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImagePackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImagePipelineImages.go b/service/imagebuilder/api_op_ListImagePipelineImages.go index 9932b8743f2..bfc36faf0ba 100644 --- a/service/imagebuilder/api_op_ListImagePipelineImages.go +++ b/service/imagebuilder/api_op_ListImagePipelineImages.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListImagePipelineImagesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImagePipelineImagesValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListImagePipelineImagesMiddlewares(stack *middlewar return nil } -// ListImagePipelineImagesAPIClient is a client that implements the -// ListImagePipelineImages operation. -type ListImagePipelineImagesAPIClient interface { - ListImagePipelineImages(context.Context, *ListImagePipelineImagesInput, ...func(*Options)) (*ListImagePipelineImagesOutput, error) -} - -var _ ListImagePipelineImagesAPIClient = (*Client)(nil) - // ListImagePipelineImagesPaginatorOptions is the paginator options for // ListImagePipelineImages type ListImagePipelineImagesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListImagePipelineImagesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImagePipelineImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListImagePipelineImagesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListImagePipelineImagesAPIClient is a client that implements the +// ListImagePipelineImages operation. +type ListImagePipelineImagesAPIClient interface { + ListImagePipelineImages(context.Context, *ListImagePipelineImagesInput, ...func(*Options)) (*ListImagePipelineImagesOutput, error) +} + +var _ ListImagePipelineImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImagePipelineImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImagePipelines.go b/service/imagebuilder/api_op_ListImagePipelines.go index 637e33b2ac6..451101e8cf7 100644 --- a/service/imagebuilder/api_op_ListImagePipelines.go +++ b/service/imagebuilder/api_op_ListImagePipelines.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListImagePipelinesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImagePipelines(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListImagePipelinesMiddlewares(stack *middleware.Sta return nil } -// ListImagePipelinesAPIClient is a client that implements the ListImagePipelines -// operation. -type ListImagePipelinesAPIClient interface { - ListImagePipelines(context.Context, *ListImagePipelinesInput, ...func(*Options)) (*ListImagePipelinesOutput, error) -} - -var _ ListImagePipelinesAPIClient = (*Client)(nil) - // ListImagePipelinesPaginatorOptions is the paginator options for // ListImagePipelines type ListImagePipelinesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListImagePipelinesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImagePipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListImagePipelinesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListImagePipelinesAPIClient is a client that implements the ListImagePipelines +// operation. +type ListImagePipelinesAPIClient interface { + ListImagePipelines(context.Context, *ListImagePipelinesInput, ...func(*Options)) (*ListImagePipelinesOutput, error) +} + +var _ ListImagePipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImagePipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImageRecipes.go b/service/imagebuilder/api_op_ListImageRecipes.go index cf8d45703d6..513d04248f3 100644 --- a/service/imagebuilder/api_op_ListImageRecipes.go +++ b/service/imagebuilder/api_op_ListImageRecipes.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListImageRecipesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImageRecipes(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListImageRecipesMiddlewares(stack *middleware.Stack return nil } -// ListImageRecipesAPIClient is a client that implements the ListImageRecipes -// operation. -type ListImageRecipesAPIClient interface { - ListImageRecipes(context.Context, *ListImageRecipesInput, ...func(*Options)) (*ListImageRecipesOutput, error) -} - -var _ ListImageRecipesAPIClient = (*Client)(nil) - // ListImageRecipesPaginatorOptions is the paginator options for ListImageRecipes type ListImageRecipesPaginatorOptions struct { // The maximum items to return in a request. @@ -223,6 +218,9 @@ func (p *ListImageRecipesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImageRecipes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListImageRecipesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListImageRecipesAPIClient is a client that implements the ListImageRecipes +// operation. +type ListImageRecipesAPIClient interface { + ListImageRecipes(context.Context, *ListImageRecipesInput, ...func(*Options)) (*ListImageRecipesOutput, error) +} + +var _ ListImageRecipesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImageRecipes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImageScanFindingAggregations.go b/service/imagebuilder/api_op_ListImageScanFindingAggregations.go index 00a46a8de4b..6a5df7f8ecb 100644 --- a/service/imagebuilder/api_op_ListImageScanFindingAggregations.go +++ b/service/imagebuilder/api_op_ListImageScanFindingAggregations.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListImageScanFindingAggregationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImageScanFindingAggregations(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListImageScanFindingAggregationsMiddlewares(stack * return nil } -// ListImageScanFindingAggregationsAPIClient is a client that implements the -// ListImageScanFindingAggregations operation. -type ListImageScanFindingAggregationsAPIClient interface { - ListImageScanFindingAggregations(context.Context, *ListImageScanFindingAggregationsInput, ...func(*Options)) (*ListImageScanFindingAggregationsOutput, error) -} - -var _ ListImageScanFindingAggregationsAPIClient = (*Client)(nil) - // ListImageScanFindingAggregationsPaginatorOptions is the paginator options for // ListImageScanFindingAggregations type ListImageScanFindingAggregationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListImageScanFindingAggregationsPaginator) NextPage(ctx context.Context params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImageScanFindingAggregations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListImageScanFindingAggregationsPaginator) NextPage(ctx context.Context return result, nil } +// ListImageScanFindingAggregationsAPIClient is a client that implements the +// ListImageScanFindingAggregations operation. +type ListImageScanFindingAggregationsAPIClient interface { + ListImageScanFindingAggregations(context.Context, *ListImageScanFindingAggregationsInput, ...func(*Options)) (*ListImageScanFindingAggregationsOutput, error) +} + +var _ ListImageScanFindingAggregationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImageScanFindingAggregations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImageScanFindings.go b/service/imagebuilder/api_op_ListImageScanFindings.go index 632e3c6a903..92e682ada2b 100644 --- a/service/imagebuilder/api_op_ListImageScanFindings.go +++ b/service/imagebuilder/api_op_ListImageScanFindings.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListImageScanFindingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImageScanFindings(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListImageScanFindingsMiddlewares(stack *middleware. return nil } -// ListImageScanFindingsAPIClient is a client that implements the -// ListImageScanFindings operation. -type ListImageScanFindingsAPIClient interface { - ListImageScanFindings(context.Context, *ListImageScanFindingsInput, ...func(*Options)) (*ListImageScanFindingsOutput, error) -} - -var _ ListImageScanFindingsAPIClient = (*Client)(nil) - // ListImageScanFindingsPaginatorOptions is the paginator options for // ListImageScanFindings type ListImageScanFindingsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListImageScanFindingsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImageScanFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListImageScanFindingsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListImageScanFindingsAPIClient is a client that implements the +// ListImageScanFindings operation. +type ListImageScanFindingsAPIClient interface { + ListImageScanFindings(context.Context, *ListImageScanFindingsInput, ...func(*Options)) (*ListImageScanFindingsOutput, error) +} + +var _ ListImageScanFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImageScanFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListImages.go b/service/imagebuilder/api_op_ListImages.go index b66cf0b5c48..45d4aa44232 100644 --- a/service/imagebuilder/api_op_ListImages.go +++ b/service/imagebuilder/api_op_ListImages.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListImagesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImages(options.Region), middleware.Before); err != nil { return err } @@ -171,13 +174,6 @@ func (c *Client) addOperationListImagesMiddlewares(stack *middleware.Stack, opti return nil } -// ListImagesAPIClient is a client that implements the ListImages operation. -type ListImagesAPIClient interface { - ListImages(context.Context, *ListImagesInput, ...func(*Options)) (*ListImagesOutput, error) -} - -var _ ListImagesAPIClient = (*Client)(nil) - // ListImagesPaginatorOptions is the paginator options for ListImages type ListImagesPaginatorOptions struct { // The maximum items to return in a request. @@ -241,6 +237,9 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +259,13 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListImagesAPIClient is a client that implements the ListImages operation. +type ListImagesAPIClient interface { + ListImages(context.Context, *ListImagesInput, ...func(*Options)) (*ListImagesOutput, error) +} + +var _ ListImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListInfrastructureConfigurations.go b/service/imagebuilder/api_op_ListInfrastructureConfigurations.go index 48cc4b69f51..97ec3410ed4 100644 --- a/service/imagebuilder/api_op_ListInfrastructureConfigurations.go +++ b/service/imagebuilder/api_op_ListInfrastructureConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListInfrastructureConfigurationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInfrastructureConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListInfrastructureConfigurationsMiddlewares(stack * return nil } -// ListInfrastructureConfigurationsAPIClient is a client that implements the -// ListInfrastructureConfigurations operation. -type ListInfrastructureConfigurationsAPIClient interface { - ListInfrastructureConfigurations(context.Context, *ListInfrastructureConfigurationsInput, ...func(*Options)) (*ListInfrastructureConfigurationsOutput, error) -} - -var _ ListInfrastructureConfigurationsAPIClient = (*Client)(nil) - // ListInfrastructureConfigurationsPaginatorOptions is the paginator options for // ListInfrastructureConfigurations type ListInfrastructureConfigurationsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListInfrastructureConfigurationsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInfrastructureConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListInfrastructureConfigurationsPaginator) NextPage(ctx context.Context return result, nil } +// ListInfrastructureConfigurationsAPIClient is a client that implements the +// ListInfrastructureConfigurations operation. +type ListInfrastructureConfigurationsAPIClient interface { + ListInfrastructureConfigurations(context.Context, *ListInfrastructureConfigurationsInput, ...func(*Options)) (*ListInfrastructureConfigurationsOutput, error) +} + +var _ ListInfrastructureConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInfrastructureConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListLifecycleExecutionResources.go b/service/imagebuilder/api_op_ListLifecycleExecutionResources.go index ae0164c81ef..c7f0da0ff76 100644 --- a/service/imagebuilder/api_op_ListLifecycleExecutionResources.go +++ b/service/imagebuilder/api_op_ListLifecycleExecutionResources.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListLifecycleExecutionResourcesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLifecycleExecutionResourcesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListLifecycleExecutionResourcesMiddlewares(stack *m return nil } -// ListLifecycleExecutionResourcesAPIClient is a client that implements the -// ListLifecycleExecutionResources operation. -type ListLifecycleExecutionResourcesAPIClient interface { - ListLifecycleExecutionResources(context.Context, *ListLifecycleExecutionResourcesInput, ...func(*Options)) (*ListLifecycleExecutionResourcesOutput, error) -} - -var _ ListLifecycleExecutionResourcesAPIClient = (*Client)(nil) - // ListLifecycleExecutionResourcesPaginatorOptions is the paginator options for // ListLifecycleExecutionResources type ListLifecycleExecutionResourcesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListLifecycleExecutionResourcesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLifecycleExecutionResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListLifecycleExecutionResourcesPaginator) NextPage(ctx context.Context, return result, nil } +// ListLifecycleExecutionResourcesAPIClient is a client that implements the +// ListLifecycleExecutionResources operation. +type ListLifecycleExecutionResourcesAPIClient interface { + ListLifecycleExecutionResources(context.Context, *ListLifecycleExecutionResourcesInput, ...func(*Options)) (*ListLifecycleExecutionResourcesOutput, error) +} + +var _ ListLifecycleExecutionResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLifecycleExecutionResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListLifecycleExecutions.go b/service/imagebuilder/api_op_ListLifecycleExecutions.go index 915c553d99d..44fc03e0b69 100644 --- a/service/imagebuilder/api_op_ListLifecycleExecutions.go +++ b/service/imagebuilder/api_op_ListLifecycleExecutions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListLifecycleExecutionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLifecycleExecutionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListLifecycleExecutionsMiddlewares(stack *middlewar return nil } -// ListLifecycleExecutionsAPIClient is a client that implements the -// ListLifecycleExecutions operation. -type ListLifecycleExecutionsAPIClient interface { - ListLifecycleExecutions(context.Context, *ListLifecycleExecutionsInput, ...func(*Options)) (*ListLifecycleExecutionsOutput, error) -} - -var _ ListLifecycleExecutionsAPIClient = (*Client)(nil) - // ListLifecycleExecutionsPaginatorOptions is the paginator options for // ListLifecycleExecutions type ListLifecycleExecutionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListLifecycleExecutionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLifecycleExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListLifecycleExecutionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListLifecycleExecutionsAPIClient is a client that implements the +// ListLifecycleExecutions operation. +type ListLifecycleExecutionsAPIClient interface { + ListLifecycleExecutions(context.Context, *ListLifecycleExecutionsInput, ...func(*Options)) (*ListLifecycleExecutionsOutput, error) +} + +var _ ListLifecycleExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLifecycleExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListLifecyclePolicies.go b/service/imagebuilder/api_op_ListLifecyclePolicies.go index 053d3822c67..b271f78ce79 100644 --- a/service/imagebuilder/api_op_ListLifecyclePolicies.go +++ b/service/imagebuilder/api_op_ListLifecyclePolicies.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListLifecyclePoliciesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLifecyclePolicies(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListLifecyclePoliciesMiddlewares(stack *middleware. return nil } -// ListLifecyclePoliciesAPIClient is a client that implements the -// ListLifecyclePolicies operation. -type ListLifecyclePoliciesAPIClient interface { - ListLifecyclePolicies(context.Context, *ListLifecyclePoliciesInput, ...func(*Options)) (*ListLifecyclePoliciesOutput, error) -} - -var _ ListLifecyclePoliciesAPIClient = (*Client)(nil) - // ListLifecyclePoliciesPaginatorOptions is the paginator options for // ListLifecyclePolicies type ListLifecyclePoliciesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListLifecyclePoliciesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLifecyclePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListLifecyclePoliciesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListLifecyclePoliciesAPIClient is a client that implements the +// ListLifecyclePolicies operation. +type ListLifecyclePoliciesAPIClient interface { + ListLifecyclePolicies(context.Context, *ListLifecyclePoliciesInput, ...func(*Options)) (*ListLifecyclePoliciesOutput, error) +} + +var _ ListLifecyclePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLifecyclePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListTagsForResource.go b/service/imagebuilder/api_op_ListTagsForResource.go index 0fbcd84c321..e82b3026793 100644 --- a/service/imagebuilder/api_op_ListTagsForResource.go +++ b/service/imagebuilder/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_ListWaitingWorkflowSteps.go b/service/imagebuilder/api_op_ListWaitingWorkflowSteps.go index c738223dfd3..df56abf1cc1 100644 --- a/service/imagebuilder/api_op_ListWaitingWorkflowSteps.go +++ b/service/imagebuilder/api_op_ListWaitingWorkflowSteps.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListWaitingWorkflowStepsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWaitingWorkflowSteps(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListWaitingWorkflowStepsMiddlewares(stack *middlewa return nil } -// ListWaitingWorkflowStepsAPIClient is a client that implements the -// ListWaitingWorkflowSteps operation. -type ListWaitingWorkflowStepsAPIClient interface { - ListWaitingWorkflowSteps(context.Context, *ListWaitingWorkflowStepsInput, ...func(*Options)) (*ListWaitingWorkflowStepsOutput, error) -} - -var _ ListWaitingWorkflowStepsAPIClient = (*Client)(nil) - // ListWaitingWorkflowStepsPaginatorOptions is the paginator options for // ListWaitingWorkflowSteps type ListWaitingWorkflowStepsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListWaitingWorkflowStepsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWaitingWorkflowSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListWaitingWorkflowStepsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListWaitingWorkflowStepsAPIClient is a client that implements the +// ListWaitingWorkflowSteps operation. +type ListWaitingWorkflowStepsAPIClient interface { + ListWaitingWorkflowSteps(context.Context, *ListWaitingWorkflowStepsInput, ...func(*Options)) (*ListWaitingWorkflowStepsOutput, error) +} + +var _ ListWaitingWorkflowStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWaitingWorkflowSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListWorkflowBuildVersions.go b/service/imagebuilder/api_op_ListWorkflowBuildVersions.go index 060009d42c0..039e29fd605 100644 --- a/service/imagebuilder/api_op_ListWorkflowBuildVersions.go +++ b/service/imagebuilder/api_op_ListWorkflowBuildVersions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListWorkflowBuildVersionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowBuildVersionsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListWorkflowBuildVersionsMiddlewares(stack *middlew return nil } -// ListWorkflowBuildVersionsAPIClient is a client that implements the -// ListWorkflowBuildVersions operation. -type ListWorkflowBuildVersionsAPIClient interface { - ListWorkflowBuildVersions(context.Context, *ListWorkflowBuildVersionsInput, ...func(*Options)) (*ListWorkflowBuildVersionsOutput, error) -} - -var _ ListWorkflowBuildVersionsAPIClient = (*Client)(nil) - // ListWorkflowBuildVersionsPaginatorOptions is the paginator options for // ListWorkflowBuildVersions type ListWorkflowBuildVersionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListWorkflowBuildVersionsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowBuildVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListWorkflowBuildVersionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListWorkflowBuildVersionsAPIClient is a client that implements the +// ListWorkflowBuildVersions operation. +type ListWorkflowBuildVersionsAPIClient interface { + ListWorkflowBuildVersions(context.Context, *ListWorkflowBuildVersionsInput, ...func(*Options)) (*ListWorkflowBuildVersionsOutput, error) +} + +var _ ListWorkflowBuildVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowBuildVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListWorkflowExecutions.go b/service/imagebuilder/api_op_ListWorkflowExecutions.go index 86b8511e721..b81fe8280e4 100644 --- a/service/imagebuilder/api_op_ListWorkflowExecutions.go +++ b/service/imagebuilder/api_op_ListWorkflowExecutions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListWorkflowExecutionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowExecutionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListWorkflowExecutionsMiddlewares(stack *middleware return nil } -// ListWorkflowExecutionsAPIClient is a client that implements the -// ListWorkflowExecutions operation. -type ListWorkflowExecutionsAPIClient interface { - ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsInput, ...func(*Options)) (*ListWorkflowExecutionsOutput, error) -} - -var _ ListWorkflowExecutionsAPIClient = (*Client)(nil) - // ListWorkflowExecutionsPaginatorOptions is the paginator options for // ListWorkflowExecutions type ListWorkflowExecutionsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListWorkflowExecutionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListWorkflowExecutionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListWorkflowExecutionsAPIClient is a client that implements the +// ListWorkflowExecutions operation. +type ListWorkflowExecutionsAPIClient interface { + ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsInput, ...func(*Options)) (*ListWorkflowExecutionsOutput, error) +} + +var _ ListWorkflowExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListWorkflowStepExecutions.go b/service/imagebuilder/api_op_ListWorkflowStepExecutions.go index 6b509c53156..eb61f6f193f 100644 --- a/service/imagebuilder/api_op_ListWorkflowStepExecutions.go +++ b/service/imagebuilder/api_op_ListWorkflowStepExecutions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListWorkflowStepExecutionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowStepExecutionsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListWorkflowStepExecutionsMiddlewares(stack *middle return nil } -// ListWorkflowStepExecutionsAPIClient is a client that implements the -// ListWorkflowStepExecutions operation. -type ListWorkflowStepExecutionsAPIClient interface { - ListWorkflowStepExecutions(context.Context, *ListWorkflowStepExecutionsInput, ...func(*Options)) (*ListWorkflowStepExecutionsOutput, error) -} - -var _ ListWorkflowStepExecutionsAPIClient = (*Client)(nil) - // ListWorkflowStepExecutionsPaginatorOptions is the paginator options for // ListWorkflowStepExecutions type ListWorkflowStepExecutionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListWorkflowStepExecutionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowStepExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListWorkflowStepExecutionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListWorkflowStepExecutionsAPIClient is a client that implements the +// ListWorkflowStepExecutions operation. +type ListWorkflowStepExecutionsAPIClient interface { + ListWorkflowStepExecutions(context.Context, *ListWorkflowStepExecutionsInput, ...func(*Options)) (*ListWorkflowStepExecutionsOutput, error) +} + +var _ ListWorkflowStepExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowStepExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_ListWorkflows.go b/service/imagebuilder/api_op_ListWorkflows.go index 50157a31e28..4b72dd64640 100644 --- a/service/imagebuilder/api_op_ListWorkflows.go +++ b/service/imagebuilder/api_op_ListWorkflows.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkflows(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. -type ListWorkflowsAPIClient interface { - ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) -} - -var _ ListWorkflowsAPIClient = (*Client)(nil) - // ListWorkflowsPaginatorOptions is the paginator options for ListWorkflows type ListWorkflowsPaginatorOptions struct { // The maximum items to return in a request. @@ -214,6 +210,9 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. +type ListWorkflowsAPIClient interface { + ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) +} + +var _ ListWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/imagebuilder/api_op_PutComponentPolicy.go b/service/imagebuilder/api_op_PutComponentPolicy.go index 5d8dd93b0c3..c2a2b7133ac 100644 --- a/service/imagebuilder/api_op_PutComponentPolicy.go +++ b/service/imagebuilder/api_op_PutComponentPolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutComponentPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutComponentPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_PutContainerRecipePolicy.go b/service/imagebuilder/api_op_PutContainerRecipePolicy.go index 8b4007eaf1a..ecccf99bec0 100644 --- a/service/imagebuilder/api_op_PutContainerRecipePolicy.go +++ b/service/imagebuilder/api_op_PutContainerRecipePolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutContainerRecipePolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutContainerRecipePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_PutImagePolicy.go b/service/imagebuilder/api_op_PutImagePolicy.go index 2e32cd0702e..1e948620790 100644 --- a/service/imagebuilder/api_op_PutImagePolicy.go +++ b/service/imagebuilder/api_op_PutImagePolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutImagePolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutImagePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_PutImageRecipePolicy.go b/service/imagebuilder/api_op_PutImageRecipePolicy.go index 85f45407b10..28716447335 100644 --- a/service/imagebuilder/api_op_PutImageRecipePolicy.go +++ b/service/imagebuilder/api_op_PutImageRecipePolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPutImageRecipePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutImageRecipePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_SendWorkflowStepAction.go b/service/imagebuilder/api_op_SendWorkflowStepAction.go index f3df59b34e6..15872f26a45 100644 --- a/service/imagebuilder/api_op_SendWorkflowStepAction.go +++ b/service/imagebuilder/api_op_SendWorkflowStepAction.go @@ -136,6 +136,9 @@ func (c *Client) addOperationSendWorkflowStepActionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendWorkflowStepActionMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_StartImagePipelineExecution.go b/service/imagebuilder/api_op_StartImagePipelineExecution.go index 88fa754b46c..5788e745b13 100644 --- a/service/imagebuilder/api_op_StartImagePipelineExecution.go +++ b/service/imagebuilder/api_op_StartImagePipelineExecution.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStartImagePipelineExecutionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartImagePipelineExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_StartResourceStateUpdate.go b/service/imagebuilder/api_op_StartResourceStateUpdate.go index 07b4f709316..a5d4197e3df 100644 --- a/service/imagebuilder/api_op_StartResourceStateUpdate.go +++ b/service/imagebuilder/api_op_StartResourceStateUpdate.go @@ -140,6 +140,9 @@ func (c *Client) addOperationStartResourceStateUpdateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartResourceStateUpdateMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_TagResource.go b/service/imagebuilder/api_op_TagResource.go index 9454c72b5d0..2e37fe81172 100644 --- a/service/imagebuilder/api_op_TagResource.go +++ b/service/imagebuilder/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_UntagResource.go b/service/imagebuilder/api_op_UntagResource.go index bb179e03e7b..49952c877aa 100644 --- a/service/imagebuilder/api_op_UntagResource.go +++ b/service/imagebuilder/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/imagebuilder/api_op_UpdateDistributionConfiguration.go b/service/imagebuilder/api_op_UpdateDistributionConfiguration.go index c93709939b6..05e7dbd3cb3 100644 --- a/service/imagebuilder/api_op_UpdateDistributionConfiguration.go +++ b/service/imagebuilder/api_op_UpdateDistributionConfiguration.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateDistributionConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateDistributionConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_UpdateImagePipeline.go b/service/imagebuilder/api_op_UpdateImagePipeline.go index 5095e8e9906..f77fc09abbd 100644 --- a/service/imagebuilder/api_op_UpdateImagePipeline.go +++ b/service/imagebuilder/api_op_UpdateImagePipeline.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdateImagePipelineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateImagePipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_UpdateInfrastructureConfiguration.go b/service/imagebuilder/api_op_UpdateInfrastructureConfiguration.go index 50eb59da897..3aa8ad38e88 100644 --- a/service/imagebuilder/api_op_UpdateInfrastructureConfiguration.go +++ b/service/imagebuilder/api_op_UpdateInfrastructureConfiguration.go @@ -180,6 +180,9 @@ func (c *Client) addOperationUpdateInfrastructureConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateInfrastructureConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/imagebuilder/api_op_UpdateLifecyclePolicy.go b/service/imagebuilder/api_op_UpdateLifecyclePolicy.go index 42177556aa6..c0b4eef74d5 100644 --- a/service/imagebuilder/api_op_UpdateLifecyclePolicy.go +++ b/service/imagebuilder/api_op_UpdateLifecyclePolicy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateLifecyclePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/inspector/api_client.go b/service/inspector/api_client.go index 20084b6623e..e6c46e6aa3a 100644 --- a/service/inspector/api_client.go +++ b/service/inspector/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/inspector/api_op_AddAttributesToFindings.go b/service/inspector/api_op_AddAttributesToFindings.go index 6679d276901..d80081b6174 100644 --- a/service/inspector/api_op_AddAttributesToFindings.go +++ b/service/inspector/api_op_AddAttributesToFindings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddAttributesToFindingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddAttributesToFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_CreateAssessmentTarget.go b/service/inspector/api_op_CreateAssessmentTarget.go index d4097705892..e7a2daa8660 100644 --- a/service/inspector/api_op_CreateAssessmentTarget.go +++ b/service/inspector/api_op_CreateAssessmentTarget.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateAssessmentTargetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssessmentTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_CreateAssessmentTemplate.go b/service/inspector/api_op_CreateAssessmentTemplate.go index 01744d68e80..eee8681b22d 100644 --- a/service/inspector/api_op_CreateAssessmentTemplate.go +++ b/service/inspector/api_op_CreateAssessmentTemplate.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateAssessmentTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssessmentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_CreateExclusionsPreview.go b/service/inspector/api_op_CreateExclusionsPreview.go index f9545506332..2b310a903cb 100644 --- a/service/inspector/api_op_CreateExclusionsPreview.go +++ b/service/inspector/api_op_CreateExclusionsPreview.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCreateExclusionsPreviewMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExclusionsPreviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_CreateResourceGroup.go b/service/inspector/api_op_CreateResourceGroup.go index c92f238f738..74af1e5e9c3 100644 --- a/service/inspector/api_op_CreateResourceGroup.go +++ b/service/inspector/api_op_CreateResourceGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateResourceGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DeleteAssessmentRun.go b/service/inspector/api_op_DeleteAssessmentRun.go index 7376738a274..2bb45bea5e7 100644 --- a/service/inspector/api_op_DeleteAssessmentRun.go +++ b/service/inspector/api_op_DeleteAssessmentRun.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAssessmentRunMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DeleteAssessmentTarget.go b/service/inspector/api_op_DeleteAssessmentTarget.go index 1edb4351472..3ce572f3a14 100644 --- a/service/inspector/api_op_DeleteAssessmentTarget.go +++ b/service/inspector/api_op_DeleteAssessmentTarget.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAssessmentTargetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DeleteAssessmentTemplate.go b/service/inspector/api_op_DeleteAssessmentTemplate.go index c2dc44a1399..afe9ead6c24 100644 --- a/service/inspector/api_op_DeleteAssessmentTemplate.go +++ b/service/inspector/api_op_DeleteAssessmentTemplate.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAssessmentTemplateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssessmentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeAssessmentRuns.go b/service/inspector/api_op_DescribeAssessmentRuns.go index 1ce927e6707..49c56ce8a54 100644 --- a/service/inspector/api_op_DescribeAssessmentRuns.go +++ b/service/inspector/api_op_DescribeAssessmentRuns.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAssessmentRunsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssessmentRunsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeAssessmentTargets.go b/service/inspector/api_op_DescribeAssessmentTargets.go index e6e76ef96e3..98d312f3275 100644 --- a/service/inspector/api_op_DescribeAssessmentTargets.go +++ b/service/inspector/api_op_DescribeAssessmentTargets.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAssessmentTargetsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssessmentTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeAssessmentTemplates.go b/service/inspector/api_op_DescribeAssessmentTemplates.go index 56546080302..e4fca1eecf0 100644 --- a/service/inspector/api_op_DescribeAssessmentTemplates.go +++ b/service/inspector/api_op_DescribeAssessmentTemplates.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAssessmentTemplatesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssessmentTemplatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeCrossAccountAccessRole.go b/service/inspector/api_op_DescribeCrossAccountAccessRole.go index 985b6192a54..dda0a753855 100644 --- a/service/inspector/api_op_DescribeCrossAccountAccessRole.go +++ b/service/inspector/api_op_DescribeCrossAccountAccessRole.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeCrossAccountAccessRoleMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCrossAccountAccessRole(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector/api_op_DescribeExclusions.go b/service/inspector/api_op_DescribeExclusions.go index 3d80c73aa89..944df6e7966 100644 --- a/service/inspector/api_op_DescribeExclusions.go +++ b/service/inspector/api_op_DescribeExclusions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeExclusionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExclusionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeFindings.go b/service/inspector/api_op_DescribeFindings.go index 52b32861d71..6f9d3e02473 100644 --- a/service/inspector/api_op_DescribeFindings.go +++ b/service/inspector/api_op_DescribeFindings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeFindingsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeResourceGroups.go b/service/inspector/api_op_DescribeResourceGroups.go index 6a979b3b0cd..f8df6ae112a 100644 --- a/service/inspector/api_op_DescribeResourceGroups.go +++ b/service/inspector/api_op_DescribeResourceGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeResourceGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourceGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_DescribeRulesPackages.go b/service/inspector/api_op_DescribeRulesPackages.go index cc762fe3d8f..7f241394999 100644 --- a/service/inspector/api_op_DescribeRulesPackages.go +++ b/service/inspector/api_op_DescribeRulesPackages.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeRulesPackagesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRulesPackagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_GetAssessmentReport.go b/service/inspector/api_op_GetAssessmentReport.go index 7b14d420a63..b9a6055017d 100644 --- a/service/inspector/api_op_GetAssessmentReport.go +++ b/service/inspector/api_op_GetAssessmentReport.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetAssessmentReportMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssessmentReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_GetExclusionsPreview.go b/service/inspector/api_op_GetExclusionsPreview.go index ae26e2d9b5a..966355c92fc 100644 --- a/service/inspector/api_op_GetExclusionsPreview.go +++ b/service/inspector/api_op_GetExclusionsPreview.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetExclusionsPreviewMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExclusionsPreviewValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationGetExclusionsPreviewMiddlewares(stack *middleware.S return nil } -// GetExclusionsPreviewAPIClient is a client that implements the -// GetExclusionsPreview operation. -type GetExclusionsPreviewAPIClient interface { - GetExclusionsPreview(context.Context, *GetExclusionsPreviewInput, ...func(*Options)) (*GetExclusionsPreviewOutput, error) -} - -var _ GetExclusionsPreviewAPIClient = (*Client)(nil) - // GetExclusionsPreviewPaginatorOptions is the paginator options for // GetExclusionsPreview type GetExclusionsPreviewPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *GetExclusionsPreviewPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetExclusionsPreview(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *GetExclusionsPreviewPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// GetExclusionsPreviewAPIClient is a client that implements the +// GetExclusionsPreview operation. +type GetExclusionsPreviewAPIClient interface { + GetExclusionsPreview(context.Context, *GetExclusionsPreviewInput, ...func(*Options)) (*GetExclusionsPreviewOutput, error) +} + +var _ GetExclusionsPreviewAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetExclusionsPreview(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_GetTelemetryMetadata.go b/service/inspector/api_op_GetTelemetryMetadata.go index 082ff146ccc..7506b184f6f 100644 --- a/service/inspector/api_op_GetTelemetryMetadata.go +++ b/service/inspector/api_op_GetTelemetryMetadata.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetTelemetryMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTelemetryMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_ListAssessmentRunAgents.go b/service/inspector/api_op_ListAssessmentRunAgents.go index 31f0d7649d3..0ee6d4a179d 100644 --- a/service/inspector/api_op_ListAssessmentRunAgents.go +++ b/service/inspector/api_op_ListAssessmentRunAgents.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListAssessmentRunAgentsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssessmentRunAgentsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListAssessmentRunAgentsMiddlewares(stack *middlewar return nil } -// ListAssessmentRunAgentsAPIClient is a client that implements the -// ListAssessmentRunAgents operation. -type ListAssessmentRunAgentsAPIClient interface { - ListAssessmentRunAgents(context.Context, *ListAssessmentRunAgentsInput, ...func(*Options)) (*ListAssessmentRunAgentsOutput, error) -} - -var _ ListAssessmentRunAgentsAPIClient = (*Client)(nil) - // ListAssessmentRunAgentsPaginatorOptions is the paginator options for // ListAssessmentRunAgents type ListAssessmentRunAgentsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListAssessmentRunAgentsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentRunAgents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListAssessmentRunAgentsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAssessmentRunAgentsAPIClient is a client that implements the +// ListAssessmentRunAgents operation. +type ListAssessmentRunAgentsAPIClient interface { + ListAssessmentRunAgents(context.Context, *ListAssessmentRunAgentsInput, ...func(*Options)) (*ListAssessmentRunAgentsOutput, error) +} + +var _ ListAssessmentRunAgentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentRunAgents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListAssessmentRuns.go b/service/inspector/api_op_ListAssessmentRuns.go index 9878fd791ce..0adddcc3c33 100644 --- a/service/inspector/api_op_ListAssessmentRuns.go +++ b/service/inspector/api_op_ListAssessmentRuns.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListAssessmentRunsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssessmentRuns(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListAssessmentRunsMiddlewares(stack *middleware.Sta return nil } -// ListAssessmentRunsAPIClient is a client that implements the ListAssessmentRuns -// operation. -type ListAssessmentRunsAPIClient interface { - ListAssessmentRuns(context.Context, *ListAssessmentRunsInput, ...func(*Options)) (*ListAssessmentRunsOutput, error) -} - -var _ ListAssessmentRunsAPIClient = (*Client)(nil) - // ListAssessmentRunsPaginatorOptions is the paginator options for // ListAssessmentRuns type ListAssessmentRunsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListAssessmentRunsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListAssessmentRunsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAssessmentRunsAPIClient is a client that implements the ListAssessmentRuns +// operation. +type ListAssessmentRunsAPIClient interface { + ListAssessmentRuns(context.Context, *ListAssessmentRunsInput, ...func(*Options)) (*ListAssessmentRunsOutput, error) +} + +var _ ListAssessmentRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListAssessmentTargets.go b/service/inspector/api_op_ListAssessmentTargets.go index ce14e206eef..56ac38f1757 100644 --- a/service/inspector/api_op_ListAssessmentTargets.go +++ b/service/inspector/api_op_ListAssessmentTargets.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListAssessmentTargetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssessmentTargets(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListAssessmentTargetsMiddlewares(stack *middleware. return nil } -// ListAssessmentTargetsAPIClient is a client that implements the -// ListAssessmentTargets operation. -type ListAssessmentTargetsAPIClient interface { - ListAssessmentTargets(context.Context, *ListAssessmentTargetsInput, ...func(*Options)) (*ListAssessmentTargetsOutput, error) -} - -var _ ListAssessmentTargetsAPIClient = (*Client)(nil) - // ListAssessmentTargetsPaginatorOptions is the paginator options for // ListAssessmentTargets type ListAssessmentTargetsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAssessmentTargetsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAssessmentTargetsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAssessmentTargetsAPIClient is a client that implements the +// ListAssessmentTargets operation. +type ListAssessmentTargetsAPIClient interface { + ListAssessmentTargets(context.Context, *ListAssessmentTargetsInput, ...func(*Options)) (*ListAssessmentTargetsOutput, error) +} + +var _ ListAssessmentTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListAssessmentTemplates.go b/service/inspector/api_op_ListAssessmentTemplates.go index e0f0da87ed1..58c75c14ac5 100644 --- a/service/inspector/api_op_ListAssessmentTemplates.go +++ b/service/inspector/api_op_ListAssessmentTemplates.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListAssessmentTemplatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssessmentTemplates(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListAssessmentTemplatesMiddlewares(stack *middlewar return nil } -// ListAssessmentTemplatesAPIClient is a client that implements the -// ListAssessmentTemplates operation. -type ListAssessmentTemplatesAPIClient interface { - ListAssessmentTemplates(context.Context, *ListAssessmentTemplatesInput, ...func(*Options)) (*ListAssessmentTemplatesOutput, error) -} - -var _ ListAssessmentTemplatesAPIClient = (*Client)(nil) - // ListAssessmentTemplatesPaginatorOptions is the paginator options for // ListAssessmentTemplates type ListAssessmentTemplatesPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListAssessmentTemplatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssessmentTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListAssessmentTemplatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAssessmentTemplatesAPIClient is a client that implements the +// ListAssessmentTemplates operation. +type ListAssessmentTemplatesAPIClient interface { + ListAssessmentTemplates(context.Context, *ListAssessmentTemplatesInput, ...func(*Options)) (*ListAssessmentTemplatesOutput, error) +} + +var _ ListAssessmentTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssessmentTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListEventSubscriptions.go b/service/inspector/api_op_ListEventSubscriptions.go index b8806ae25fa..eb8735964e9 100644 --- a/service/inspector/api_op_ListEventSubscriptions.go +++ b/service/inspector/api_op_ListEventSubscriptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListEventSubscriptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListEventSubscriptionsMiddlewares(stack *middleware return nil } -// ListEventSubscriptionsAPIClient is a client that implements the -// ListEventSubscriptions operation. -type ListEventSubscriptionsAPIClient interface { - ListEventSubscriptions(context.Context, *ListEventSubscriptionsInput, ...func(*Options)) (*ListEventSubscriptionsOutput, error) -} - -var _ ListEventSubscriptionsAPIClient = (*Client)(nil) - // ListEventSubscriptionsPaginatorOptions is the paginator options for // ListEventSubscriptions type ListEventSubscriptionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListEventSubscriptionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListEventSubscriptionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListEventSubscriptionsAPIClient is a client that implements the +// ListEventSubscriptions operation. +type ListEventSubscriptionsAPIClient interface { + ListEventSubscriptions(context.Context, *ListEventSubscriptionsInput, ...func(*Options)) (*ListEventSubscriptionsOutput, error) +} + +var _ ListEventSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListExclusions.go b/service/inspector/api_op_ListExclusions.go index 61ce7238cc7..026951fa9d5 100644 --- a/service/inspector/api_op_ListExclusions.go +++ b/service/inspector/api_op_ListExclusions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListExclusionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExclusionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListExclusionsMiddlewares(stack *middleware.Stack, return nil } -// ListExclusionsAPIClient is a client that implements the ListExclusions -// operation. -type ListExclusionsAPIClient interface { - ListExclusions(context.Context, *ListExclusionsInput, ...func(*Options)) (*ListExclusionsOutput, error) -} - -var _ ListExclusionsAPIClient = (*Client)(nil) - // ListExclusionsPaginatorOptions is the paginator options for ListExclusions type ListExclusionsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -220,6 +215,9 @@ func (p *ListExclusionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExclusions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListExclusionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExclusionsAPIClient is a client that implements the ListExclusions +// operation. +type ListExclusionsAPIClient interface { + ListExclusions(context.Context, *ListExclusionsInput, ...func(*Options)) (*ListExclusionsOutput, error) +} + +var _ ListExclusionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExclusions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListFindings.go b/service/inspector/api_op_ListFindings.go index 6e02f3f41bd..dcf52a8dd6a 100644 --- a/service/inspector/api_op_ListFindings.go +++ b/service/inspector/api_op_ListFindings.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op return nil } -// ListFindingsAPIClient is a client that implements the ListFindings operation. -type ListFindingsAPIClient interface { - ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) -} - -var _ ListFindingsAPIClient = (*Client)(nil) - // ListFindingsPaginatorOptions is the paginator options for ListFindings type ListFindingsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -227,6 +223,9 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListFindingsAPIClient is a client that implements the ListFindings operation. +type ListFindingsAPIClient interface { + ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) +} + +var _ ListFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListRulesPackages.go b/service/inspector/api_op_ListRulesPackages.go index d2929595ad6..a06b3f07f69 100644 --- a/service/inspector/api_op_ListRulesPackages.go +++ b/service/inspector/api_op_ListRulesPackages.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRulesPackagesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRulesPackages(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListRulesPackagesMiddlewares(stack *middleware.Stac return nil } -// ListRulesPackagesAPIClient is a client that implements the ListRulesPackages -// operation. -type ListRulesPackagesAPIClient interface { - ListRulesPackages(context.Context, *ListRulesPackagesInput, ...func(*Options)) (*ListRulesPackagesOutput, error) -} - -var _ ListRulesPackagesAPIClient = (*Client)(nil) - // ListRulesPackagesPaginatorOptions is the paginator options for ListRulesPackages type ListRulesPackagesPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -211,6 +206,9 @@ func (p *ListRulesPackagesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRulesPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListRulesPackagesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListRulesPackagesAPIClient is a client that implements the ListRulesPackages +// operation. +type ListRulesPackagesAPIClient interface { + ListRulesPackages(context.Context, *ListRulesPackagesInput, ...func(*Options)) (*ListRulesPackagesOutput, error) +} + +var _ ListRulesPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRulesPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_ListTagsForResource.go b/service/inspector/api_op_ListTagsForResource.go index 1b434037618..38734511661 100644 --- a/service/inspector/api_op_ListTagsForResource.go +++ b/service/inspector/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_PreviewAgents.go b/service/inspector/api_op_PreviewAgents.go index 8f6fb768714..189bcd14bd3 100644 --- a/service/inspector/api_op_PreviewAgents.go +++ b/service/inspector/api_op_PreviewAgents.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPreviewAgentsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPreviewAgentsValidationMiddleware(stack); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationPreviewAgentsMiddlewares(stack *middleware.Stack, o return nil } -// PreviewAgentsAPIClient is a client that implements the PreviewAgents operation. -type PreviewAgentsAPIClient interface { - PreviewAgents(context.Context, *PreviewAgentsInput, ...func(*Options)) (*PreviewAgentsOutput, error) -} - -var _ PreviewAgentsAPIClient = (*Client)(nil) - // PreviewAgentsPaginatorOptions is the paginator options for PreviewAgents type PreviewAgentsPaginatorOptions struct { // You can use this parameter to indicate the maximum number of items you want in @@ -220,6 +216,9 @@ func (p *PreviewAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.PreviewAgents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *PreviewAgentsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// PreviewAgentsAPIClient is a client that implements the PreviewAgents operation. +type PreviewAgentsAPIClient interface { + PreviewAgents(context.Context, *PreviewAgentsInput, ...func(*Options)) (*PreviewAgentsOutput, error) +} + +var _ PreviewAgentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opPreviewAgents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector/api_op_RegisterCrossAccountAccessRole.go b/service/inspector/api_op_RegisterCrossAccountAccessRole.go index 46c276ba519..d50aa0db6e4 100644 --- a/service/inspector/api_op_RegisterCrossAccountAccessRole.go +++ b/service/inspector/api_op_RegisterCrossAccountAccessRole.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRegisterCrossAccountAccessRoleMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterCrossAccountAccessRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_RemoveAttributesFromFindings.go b/service/inspector/api_op_RemoveAttributesFromFindings.go index 2c5452d4088..2ad4873ee61 100644 --- a/service/inspector/api_op_RemoveAttributesFromFindings.go +++ b/service/inspector/api_op_RemoveAttributesFromFindings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRemoveAttributesFromFindingsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAttributesFromFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_SetTagsForResource.go b/service/inspector/api_op_SetTagsForResource.go index a107fd53901..c4ce9e54bb4 100644 --- a/service/inspector/api_op_SetTagsForResource.go +++ b/service/inspector/api_op_SetTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationSetTagsForResourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_StartAssessmentRun.go b/service/inspector/api_op_StartAssessmentRun.go index 9abc8135854..3f982127f33 100644 --- a/service/inspector/api_op_StartAssessmentRun.go +++ b/service/inspector/api_op_StartAssessmentRun.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartAssessmentRunMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAssessmentRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_StopAssessmentRun.go b/service/inspector/api_op_StopAssessmentRun.go index 9e89448c178..ca24c83525b 100644 --- a/service/inspector/api_op_StopAssessmentRun.go +++ b/service/inspector/api_op_StopAssessmentRun.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopAssessmentRunMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAssessmentRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_SubscribeToEvent.go b/service/inspector/api_op_SubscribeToEvent.go index 40a16cf7d2e..28e8395b7d8 100644 --- a/service/inspector/api_op_SubscribeToEvent.go +++ b/service/inspector/api_op_SubscribeToEvent.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSubscribeToEventMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubscribeToEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_UnsubscribeFromEvent.go b/service/inspector/api_op_UnsubscribeFromEvent.go index b747e0a7ba0..4b2defa4e89 100644 --- a/service/inspector/api_op_UnsubscribeFromEvent.go +++ b/service/inspector/api_op_UnsubscribeFromEvent.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUnsubscribeFromEventMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnsubscribeFromEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector/api_op_UpdateAssessmentTarget.go b/service/inspector/api_op_UpdateAssessmentTarget.go index 22784f57415..a6f948e3b34 100644 --- a/service/inspector/api_op_UpdateAssessmentTarget.go +++ b/service/inspector/api_op_UpdateAssessmentTarget.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateAssessmentTargetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssessmentTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_client.go b/service/inspector2/api_client.go index 5d861825d5f..0a232ed5c61 100644 --- a/service/inspector2/api_client.go +++ b/service/inspector2/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/inspector2/api_op_AssociateMember.go b/service/inspector2/api_op_AssociateMember.go index 4d4e2197f14..7bf8e1311a7 100644 --- a/service/inspector2/api_op_AssociateMember.go +++ b/service/inspector2/api_op_AssociateMember.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssociateMemberMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_BatchGetAccountStatus.go b/service/inspector2/api_op_BatchGetAccountStatus.go index 0397a910e34..0c91c2d3236 100644 --- a/service/inspector2/api_op_BatchGetAccountStatus.go +++ b/service/inspector2/api_op_BatchGetAccountStatus.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchGetAccountStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetAccountStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_BatchGetCodeSnippet.go b/service/inspector2/api_op_BatchGetCodeSnippet.go index aeb5d1a6690..8e87a945f9b 100644 --- a/service/inspector2/api_op_BatchGetCodeSnippet.go +++ b/service/inspector2/api_op_BatchGetCodeSnippet.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchGetCodeSnippetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetCodeSnippetValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_BatchGetFindingDetails.go b/service/inspector2/api_op_BatchGetFindingDetails.go index 0f8cf46b279..379882737b7 100644 --- a/service/inspector2/api_op_BatchGetFindingDetails.go +++ b/service/inspector2/api_op_BatchGetFindingDetails.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetFindingDetailsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFindingDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_BatchGetFreeTrialInfo.go b/service/inspector2/api_op_BatchGetFreeTrialInfo.go index f71d57fd3d1..b156059a33e 100644 --- a/service/inspector2/api_op_BatchGetFreeTrialInfo.go +++ b/service/inspector2/api_op_BatchGetFreeTrialInfo.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchGetFreeTrialInfoMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetFreeTrialInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go b/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go index dc6c2f68073..9a33d052ae9 100644 --- a/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go +++ b/service/inspector2/api_op_BatchGetMemberEc2DeepInspectionStatus.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchGetMemberEc2DeepInspectionStatusMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetMemberEc2DeepInspectionStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go b/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go index fea108bb840..a56b5acabf8 100644 --- a/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go +++ b/service/inspector2/api_op_BatchUpdateMemberEc2DeepInspectionStatus.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchUpdateMemberEc2DeepInspectionStatusMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateMemberEc2DeepInspectionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_CancelFindingsReport.go b/service/inspector2/api_op_CancelFindingsReport.go index 2dc0b5e8be8..9cb85c18d54 100644 --- a/service/inspector2/api_op_CancelFindingsReport.go +++ b/service/inspector2/api_op_CancelFindingsReport.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCancelFindingsReportMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelFindingsReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_CancelSbomExport.go b/service/inspector2/api_op_CancelSbomExport.go index e1b79756f77..69890656a8b 100644 --- a/service/inspector2/api_op_CancelSbomExport.go +++ b/service/inspector2/api_op_CancelSbomExport.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCancelSbomExportMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSbomExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_CreateCisScanConfiguration.go b/service/inspector2/api_op_CreateCisScanConfiguration.go index d3b1d0b895f..07d677b78aa 100644 --- a/service/inspector2/api_op_CreateCisScanConfiguration.go +++ b/service/inspector2/api_op_CreateCisScanConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateCisScanConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCisScanConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_CreateFilter.go b/service/inspector2/api_op_CreateFilter.go index c23033792b4..421477bc099 100644 --- a/service/inspector2/api_op_CreateFilter.go +++ b/service/inspector2/api_op_CreateFilter.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_CreateFindingsReport.go b/service/inspector2/api_op_CreateFindingsReport.go index 1115fb66e97..9e89bf6d804 100644 --- a/service/inspector2/api_op_CreateFindingsReport.go +++ b/service/inspector2/api_op_CreateFindingsReport.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateFindingsReportMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFindingsReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_CreateSbomExport.go b/service/inspector2/api_op_CreateSbomExport.go index 18da6f9e7dc..6bb0b2a08fb 100644 --- a/service/inspector2/api_op_CreateSbomExport.go +++ b/service/inspector2/api_op_CreateSbomExport.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateSbomExportMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSbomExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_DeleteCisScanConfiguration.go b/service/inspector2/api_op_DeleteCisScanConfiguration.go index 7c9e885fe90..c4d550d8052 100644 --- a/service/inspector2/api_op_DeleteCisScanConfiguration.go +++ b/service/inspector2/api_op_DeleteCisScanConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteCisScanConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCisScanConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_DeleteFilter.go b/service/inspector2/api_op_DeleteFilter.go index 7ab61710241..fb692d925ef 100644 --- a/service/inspector2/api_op_DeleteFilter.go +++ b/service/inspector2/api_op_DeleteFilter.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_DescribeOrganizationConfiguration.go b/service/inspector2/api_op_DescribeOrganizationConfiguration.go index 685c47e4712..120012c0cc0 100644 --- a/service/inspector2/api_op_DescribeOrganizationConfiguration.go +++ b/service/inspector2/api_op_DescribeOrganizationConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_Disable.go b/service/inspector2/api_op_Disable.go index 886dde063b5..80e1221e3ad 100644 --- a/service/inspector2/api_op_Disable.go +++ b/service/inspector2/api_op_Disable.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisableMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisable(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_DisableDelegatedAdminAccount.go b/service/inspector2/api_op_DisableDelegatedAdminAccount.go index cafeac865c6..76c22bdea23 100644 --- a/service/inspector2/api_op_DisableDelegatedAdminAccount.go +++ b/service/inspector2/api_op_DisableDelegatedAdminAccount.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisableDelegatedAdminAccountMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableDelegatedAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_DisassociateMember.go b/service/inspector2/api_op_DisassociateMember.go index 6bbb4e0faba..8a3407b5719 100644 --- a/service/inspector2/api_op_DisassociateMember.go +++ b/service/inspector2/api_op_DisassociateMember.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateMemberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_Enable.go b/service/inspector2/api_op_Enable.go index 54100eb144a..6e5e72d93b6 100644 --- a/service/inspector2/api_op_Enable.go +++ b/service/inspector2/api_op_Enable.go @@ -119,6 +119,9 @@ func (c *Client) addOperationEnableMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opEnableMiddleware(stack, options); err != nil { return err } diff --git a/service/inspector2/api_op_EnableDelegatedAdminAccount.go b/service/inspector2/api_op_EnableDelegatedAdminAccount.go index f2fa0a5d923..fc1c99568c5 100644 --- a/service/inspector2/api_op_EnableDelegatedAdminAccount.go +++ b/service/inspector2/api_op_EnableDelegatedAdminAccount.go @@ -113,6 +113,9 @@ func (c *Client) addOperationEnableDelegatedAdminAccountMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opEnableDelegatedAdminAccountMiddleware(stack, options); err != nil { return err } diff --git a/service/inspector2/api_op_GetCisScanReport.go b/service/inspector2/api_op_GetCisScanReport.go index 4aaf0078c58..6d86d5b1922 100644 --- a/service/inspector2/api_op_GetCisScanReport.go +++ b/service/inspector2/api_op_GetCisScanReport.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetCisScanReportMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCisScanReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_GetCisScanResultDetails.go b/service/inspector2/api_op_GetCisScanResultDetails.go index 2c002532e96..d04a58dc5ce 100644 --- a/service/inspector2/api_op_GetCisScanResultDetails.go +++ b/service/inspector2/api_op_GetCisScanResultDetails.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetCisScanResultDetailsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCisScanResultDetailsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationGetCisScanResultDetailsMiddlewares(stack *middlewar return nil } -// GetCisScanResultDetailsAPIClient is a client that implements the -// GetCisScanResultDetails operation. -type GetCisScanResultDetailsAPIClient interface { - GetCisScanResultDetails(context.Context, *GetCisScanResultDetailsInput, ...func(*Options)) (*GetCisScanResultDetailsOutput, error) -} - -var _ GetCisScanResultDetailsAPIClient = (*Client)(nil) - // GetCisScanResultDetailsPaginatorOptions is the paginator options for // GetCisScanResultDetails type GetCisScanResultDetailsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *GetCisScanResultDetailsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCisScanResultDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *GetCisScanResultDetailsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetCisScanResultDetailsAPIClient is a client that implements the +// GetCisScanResultDetails operation. +type GetCisScanResultDetailsAPIClient interface { + GetCisScanResultDetails(context.Context, *GetCisScanResultDetailsInput, ...func(*Options)) (*GetCisScanResultDetailsOutput, error) +} + +var _ GetCisScanResultDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCisScanResultDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_GetConfiguration.go b/service/inspector2/api_op_GetConfiguration.go index 7acc812b334..8e6fd9da4c2 100644 --- a/service/inspector2/api_op_GetConfiguration.go +++ b/service/inspector2/api_op_GetConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetConfigurationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_GetDelegatedAdminAccount.go b/service/inspector2/api_op_GetDelegatedAdminAccount.go index 7d322dd3025..3a2a8340345 100644 --- a/service/inspector2/api_op_GetDelegatedAdminAccount.go +++ b/service/inspector2/api_op_GetDelegatedAdminAccount.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetDelegatedAdminAccountMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDelegatedAdminAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go b/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go index 91f33fe711d..f22caad68bb 100644 --- a/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go +++ b/service/inspector2/api_op_GetEc2DeepInspectionConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetEc2DeepInspectionConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEc2DeepInspectionConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_GetEncryptionKey.go b/service/inspector2/api_op_GetEncryptionKey.go index 29ce9ba2dc8..52c07e02388 100644 --- a/service/inspector2/api_op_GetEncryptionKey.go +++ b/service/inspector2/api_op_GetEncryptionKey.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetEncryptionKeyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEncryptionKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_GetFindingsReportStatus.go b/service/inspector2/api_op_GetFindingsReportStatus.go index f3e2bec5171..1dd9b5cdcbc 100644 --- a/service/inspector2/api_op_GetFindingsReportStatus.go +++ b/service/inspector2/api_op_GetFindingsReportStatus.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetFindingsReportStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFindingsReportStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_GetMember.go b/service/inspector2/api_op_GetMember.go index b354947ced0..cf4cbe8039c 100644 --- a/service/inspector2/api_op_GetMember.go +++ b/service/inspector2/api_op_GetMember.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetMemberMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_GetSbomExport.go b/service/inspector2/api_op_GetSbomExport.go index e1d7c87a78d..daa56e6673d 100644 --- a/service/inspector2/api_op_GetSbomExport.go +++ b/service/inspector2/api_op_GetSbomExport.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetSbomExportMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSbomExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_ListAccountPermissions.go b/service/inspector2/api_op_ListAccountPermissions.go index eb7ccd85c8b..9b6ba777d0f 100644 --- a/service/inspector2/api_op_ListAccountPermissions.go +++ b/service/inspector2/api_op_ListAccountPermissions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAccountPermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountPermissions(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListAccountPermissionsMiddlewares(stack *middleware return nil } -// ListAccountPermissionsAPIClient is a client that implements the -// ListAccountPermissions operation. -type ListAccountPermissionsAPIClient interface { - ListAccountPermissions(context.Context, *ListAccountPermissionsInput, ...func(*Options)) (*ListAccountPermissionsOutput, error) -} - -var _ ListAccountPermissionsAPIClient = (*Client)(nil) - // ListAccountPermissionsPaginatorOptions is the paginator options for // ListAccountPermissions type ListAccountPermissionsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListAccountPermissionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListAccountPermissionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAccountPermissionsAPIClient is a client that implements the +// ListAccountPermissions operation. +type ListAccountPermissionsAPIClient interface { + ListAccountPermissions(context.Context, *ListAccountPermissionsInput, ...func(*Options)) (*ListAccountPermissionsOutput, error) +} + +var _ ListAccountPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListCisScanConfigurations.go b/service/inspector2/api_op_ListCisScanConfigurations.go index 5561a37ed33..6c261b4e10d 100644 --- a/service/inspector2/api_op_ListCisScanConfigurations.go +++ b/service/inspector2/api_op_ListCisScanConfigurations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCisScanConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCisScanConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListCisScanConfigurationsMiddlewares(stack *middlew return nil } -// ListCisScanConfigurationsAPIClient is a client that implements the -// ListCisScanConfigurations operation. -type ListCisScanConfigurationsAPIClient interface { - ListCisScanConfigurations(context.Context, *ListCisScanConfigurationsInput, ...func(*Options)) (*ListCisScanConfigurationsOutput, error) -} - -var _ ListCisScanConfigurationsAPIClient = (*Client)(nil) - // ListCisScanConfigurationsPaginatorOptions is the paginator options for // ListCisScanConfigurations type ListCisScanConfigurationsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListCisScanConfigurationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCisScanConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListCisScanConfigurationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListCisScanConfigurationsAPIClient is a client that implements the +// ListCisScanConfigurations operation. +type ListCisScanConfigurationsAPIClient interface { + ListCisScanConfigurations(context.Context, *ListCisScanConfigurationsInput, ...func(*Options)) (*ListCisScanConfigurationsOutput, error) +} + +var _ ListCisScanConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCisScanConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListCisScanResultsAggregatedByChecks.go b/service/inspector2/api_op_ListCisScanResultsAggregatedByChecks.go index b0551a98c8b..633be4759ef 100644 --- a/service/inspector2/api_op_ListCisScanResultsAggregatedByChecks.go +++ b/service/inspector2/api_op_ListCisScanResultsAggregatedByChecks.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListCisScanResultsAggregatedByChecksMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCisScanResultsAggregatedByChecksValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListCisScanResultsAggregatedByChecksMiddlewares(sta return nil } -// ListCisScanResultsAggregatedByChecksAPIClient is a client that implements the -// ListCisScanResultsAggregatedByChecks operation. -type ListCisScanResultsAggregatedByChecksAPIClient interface { - ListCisScanResultsAggregatedByChecks(context.Context, *ListCisScanResultsAggregatedByChecksInput, ...func(*Options)) (*ListCisScanResultsAggregatedByChecksOutput, error) -} - -var _ ListCisScanResultsAggregatedByChecksAPIClient = (*Client)(nil) - // ListCisScanResultsAggregatedByChecksPaginatorOptions is the paginator options // for ListCisScanResultsAggregatedByChecks type ListCisScanResultsAggregatedByChecksPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListCisScanResultsAggregatedByChecksPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCisScanResultsAggregatedByChecks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListCisScanResultsAggregatedByChecksPaginator) NextPage(ctx context.Con return result, nil } +// ListCisScanResultsAggregatedByChecksAPIClient is a client that implements the +// ListCisScanResultsAggregatedByChecks operation. +type ListCisScanResultsAggregatedByChecksAPIClient interface { + ListCisScanResultsAggregatedByChecks(context.Context, *ListCisScanResultsAggregatedByChecksInput, ...func(*Options)) (*ListCisScanResultsAggregatedByChecksOutput, error) +} + +var _ ListCisScanResultsAggregatedByChecksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCisScanResultsAggregatedByChecks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListCisScanResultsAggregatedByTargetResource.go b/service/inspector2/api_op_ListCisScanResultsAggregatedByTargetResource.go index 70176cca727..b222a132b96 100644 --- a/service/inspector2/api_op_ListCisScanResultsAggregatedByTargetResource.go +++ b/service/inspector2/api_op_ListCisScanResultsAggregatedByTargetResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListCisScanResultsAggregatedByTargetResourceMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCisScanResultsAggregatedByTargetResourceValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListCisScanResultsAggregatedByTargetResourceMiddlew return nil } -// ListCisScanResultsAggregatedByTargetResourceAPIClient is a client that -// implements the ListCisScanResultsAggregatedByTargetResource operation. -type ListCisScanResultsAggregatedByTargetResourceAPIClient interface { - ListCisScanResultsAggregatedByTargetResource(context.Context, *ListCisScanResultsAggregatedByTargetResourceInput, ...func(*Options)) (*ListCisScanResultsAggregatedByTargetResourceOutput, error) -} - -var _ ListCisScanResultsAggregatedByTargetResourceAPIClient = (*Client)(nil) - // ListCisScanResultsAggregatedByTargetResourcePaginatorOptions is the paginator // options for ListCisScanResultsAggregatedByTargetResource type ListCisScanResultsAggregatedByTargetResourcePaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListCisScanResultsAggregatedByTargetResourcePaginator) NextPage(ctx con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCisScanResultsAggregatedByTargetResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListCisScanResultsAggregatedByTargetResourcePaginator) NextPage(ctx con return result, nil } +// ListCisScanResultsAggregatedByTargetResourceAPIClient is a client that +// implements the ListCisScanResultsAggregatedByTargetResource operation. +type ListCisScanResultsAggregatedByTargetResourceAPIClient interface { + ListCisScanResultsAggregatedByTargetResource(context.Context, *ListCisScanResultsAggregatedByTargetResourceInput, ...func(*Options)) (*ListCisScanResultsAggregatedByTargetResourceOutput, error) +} + +var _ ListCisScanResultsAggregatedByTargetResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCisScanResultsAggregatedByTargetResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListCisScans.go b/service/inspector2/api_op_ListCisScans.go index 9360c2abcda..855c0c948db 100644 --- a/service/inspector2/api_op_ListCisScans.go +++ b/service/inspector2/api_op_ListCisScans.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCisScansMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCisScansValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListCisScansMiddlewares(stack *middleware.Stack, op return nil } -// ListCisScansAPIClient is a client that implements the ListCisScans operation. -type ListCisScansAPIClient interface { - ListCisScans(context.Context, *ListCisScansInput, ...func(*Options)) (*ListCisScansOutput, error) -} - -var _ ListCisScansAPIClient = (*Client)(nil) - // ListCisScansPaginatorOptions is the paginator options for ListCisScans type ListCisScansPaginatorOptions struct { // The maximum number of results to be returned. @@ -218,6 +214,9 @@ func (p *ListCisScansPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCisScans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListCisScansPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListCisScansAPIClient is a client that implements the ListCisScans operation. +type ListCisScansAPIClient interface { + ListCisScans(context.Context, *ListCisScansInput, ...func(*Options)) (*ListCisScansOutput, error) +} + +var _ ListCisScansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCisScans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListCoverage.go b/service/inspector2/api_op_ListCoverage.go index 7fe45947fdc..d8e10b5c859 100644 --- a/service/inspector2/api_op_ListCoverage.go +++ b/service/inspector2/api_op_ListCoverage.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCoverageMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCoverageValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListCoverageMiddlewares(stack *middleware.Stack, op return nil } -// ListCoverageAPIClient is a client that implements the ListCoverage operation. -type ListCoverageAPIClient interface { - ListCoverage(context.Context, *ListCoverageInput, ...func(*Options)) (*ListCoverageOutput, error) -} - -var _ ListCoverageAPIClient = (*Client)(nil) - // ListCoveragePaginatorOptions is the paginator options for ListCoverage type ListCoveragePaginatorOptions struct { // The maximum number of results the response can return. If your request would @@ -220,6 +216,9 @@ func (p *ListCoveragePaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCoverage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListCoveragePaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListCoverageAPIClient is a client that implements the ListCoverage operation. +type ListCoverageAPIClient interface { + ListCoverage(context.Context, *ListCoverageInput, ...func(*Options)) (*ListCoverageOutput, error) +} + +var _ ListCoverageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCoverage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListCoverageStatistics.go b/service/inspector2/api_op_ListCoverageStatistics.go index caa7e2a39a8..b36a0ffa71e 100644 --- a/service/inspector2/api_op_ListCoverageStatistics.go +++ b/service/inspector2/api_op_ListCoverageStatistics.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListCoverageStatisticsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCoverageStatisticsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListCoverageStatisticsMiddlewares(stack *middleware return nil } -// ListCoverageStatisticsAPIClient is a client that implements the -// ListCoverageStatistics operation. -type ListCoverageStatisticsAPIClient interface { - ListCoverageStatistics(context.Context, *ListCoverageStatisticsInput, ...func(*Options)) (*ListCoverageStatisticsOutput, error) -} - -var _ ListCoverageStatisticsAPIClient = (*Client)(nil) - // ListCoverageStatisticsPaginatorOptions is the paginator options for // ListCoverageStatistics type ListCoverageStatisticsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListCoverageStatisticsPaginator) NextPage(ctx context.Context, optFns . params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCoverageStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListCoverageStatisticsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListCoverageStatisticsAPIClient is a client that implements the +// ListCoverageStatistics operation. +type ListCoverageStatisticsAPIClient interface { + ListCoverageStatistics(context.Context, *ListCoverageStatisticsInput, ...func(*Options)) (*ListCoverageStatisticsOutput, error) +} + +var _ ListCoverageStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCoverageStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListDelegatedAdminAccounts.go b/service/inspector2/api_op_ListDelegatedAdminAccounts.go index 593bb96f883..5a7fee8bed4 100644 --- a/service/inspector2/api_op_ListDelegatedAdminAccounts.go +++ b/service/inspector2/api_op_ListDelegatedAdminAccounts.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDelegatedAdminAccountsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedAdminAccounts(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListDelegatedAdminAccountsMiddlewares(stack *middle return nil } -// ListDelegatedAdminAccountsAPIClient is a client that implements the -// ListDelegatedAdminAccounts operation. -type ListDelegatedAdminAccountsAPIClient interface { - ListDelegatedAdminAccounts(context.Context, *ListDelegatedAdminAccountsInput, ...func(*Options)) (*ListDelegatedAdminAccountsOutput, error) -} - -var _ ListDelegatedAdminAccountsAPIClient = (*Client)(nil) - // ListDelegatedAdminAccountsPaginatorOptions is the paginator options for // ListDelegatedAdminAccounts type ListDelegatedAdminAccountsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListDelegatedAdminAccountsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDelegatedAdminAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListDelegatedAdminAccountsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListDelegatedAdminAccountsAPIClient is a client that implements the +// ListDelegatedAdminAccounts operation. +type ListDelegatedAdminAccountsAPIClient interface { + ListDelegatedAdminAccounts(context.Context, *ListDelegatedAdminAccountsInput, ...func(*Options)) (*ListDelegatedAdminAccountsOutput, error) +} + +var _ ListDelegatedAdminAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDelegatedAdminAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListFilters.go b/service/inspector2/api_op_ListFilters.go index 60dbc539851..14eb3a278f8 100644 --- a/service/inspector2/api_op_ListFilters.go +++ b/service/inspector2/api_op_ListFilters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFilters(options.Region), middleware.Before); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, opt return nil } -// ListFiltersAPIClient is a client that implements the ListFilters operation. -type ListFiltersAPIClient interface { - ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) -} - -var _ ListFiltersAPIClient = (*Client)(nil) - // ListFiltersPaginatorOptions is the paginator options for ListFilters type ListFiltersPaginatorOptions struct { // The maximum number of results the response can return. If your request would @@ -221,6 +217,9 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListFiltersAPIClient is a client that implements the ListFilters operation. +type ListFiltersAPIClient interface { + ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) +} + +var _ ListFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListFindingAggregations.go b/service/inspector2/api_op_ListFindingAggregations.go index de981e9045f..b39b3b7fce5 100644 --- a/service/inspector2/api_op_ListFindingAggregations.go +++ b/service/inspector2/api_op_ListFindingAggregations.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListFindingAggregationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingAggregationsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListFindingAggregationsMiddlewares(stack *middlewar return nil } -// ListFindingAggregationsAPIClient is a client that implements the -// ListFindingAggregations operation. -type ListFindingAggregationsAPIClient interface { - ListFindingAggregations(context.Context, *ListFindingAggregationsInput, ...func(*Options)) (*ListFindingAggregationsOutput, error) -} - -var _ ListFindingAggregationsAPIClient = (*Client)(nil) - // ListFindingAggregationsPaginatorOptions is the paginator options for // ListFindingAggregations type ListFindingAggregationsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListFindingAggregationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindingAggregations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListFindingAggregationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListFindingAggregationsAPIClient is a client that implements the +// ListFindingAggregations operation. +type ListFindingAggregationsAPIClient interface { + ListFindingAggregations(context.Context, *ListFindingAggregationsInput, ...func(*Options)) (*ListFindingAggregationsOutput, error) +} + +var _ ListFindingAggregationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindingAggregations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListFindings.go b/service/inspector2/api_op_ListFindings.go index f1b430ab500..dd2abfd4b93 100644 --- a/service/inspector2/api_op_ListFindings.go +++ b/service/inspector2/api_op_ListFindings.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFindingsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op return nil } -// ListFindingsAPIClient is a client that implements the ListFindings operation. -type ListFindingsAPIClient interface { - ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) -} - -var _ ListFindingsAPIClient = (*Client)(nil) - // ListFindingsPaginatorOptions is the paginator options for ListFindings type ListFindingsPaginatorOptions struct { // The maximum number of results the response can return. If your request would @@ -222,6 +218,9 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListFindingsAPIClient is a client that implements the ListFindings operation. +type ListFindingsAPIClient interface { + ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) +} + +var _ ListFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListMembers.go b/service/inspector2/api_op_ListMembers.go index ed72113f563..4430458ae30 100644 --- a/service/inspector2/api_op_ListMembers.go +++ b/service/inspector2/api_op_ListMembers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMembers(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // The maximum number of results the response can return. If your request would @@ -216,6 +212,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ListTagsForResource.go b/service/inspector2/api_op_ListTagsForResource.go index 418401c45d4..856e9e66a3d 100644 --- a/service/inspector2/api_op_ListTagsForResource.go +++ b/service/inspector2/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_ListUsageTotals.go b/service/inspector2/api_op_ListUsageTotals.go index 208e3d537d2..91b950ab610 100644 --- a/service/inspector2/api_op_ListUsageTotals.go +++ b/service/inspector2/api_op_ListUsageTotals.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListUsageTotalsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsageTotals(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListUsageTotalsMiddlewares(stack *middleware.Stack, return nil } -// ListUsageTotalsAPIClient is a client that implements the ListUsageTotals -// operation. -type ListUsageTotalsAPIClient interface { - ListUsageTotals(context.Context, *ListUsageTotalsInput, ...func(*Options)) (*ListUsageTotalsOutput, error) -} - -var _ ListUsageTotalsAPIClient = (*Client)(nil) - // ListUsageTotalsPaginatorOptions is the paginator options for ListUsageTotals type ListUsageTotalsPaginatorOptions struct { // The maximum number of results the response can return. If your request would @@ -215,6 +210,9 @@ func (p *ListUsageTotalsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsageTotals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListUsageTotalsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListUsageTotalsAPIClient is a client that implements the ListUsageTotals +// operation. +type ListUsageTotalsAPIClient interface { + ListUsageTotals(context.Context, *ListUsageTotalsInput, ...func(*Options)) (*ListUsageTotalsOutput, error) +} + +var _ ListUsageTotalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsageTotals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_ResetEncryptionKey.go b/service/inspector2/api_op_ResetEncryptionKey.go index 8f4fcfcb519..f6044607d80 100644 --- a/service/inspector2/api_op_ResetEncryptionKey.go +++ b/service/inspector2/api_op_ResetEncryptionKey.go @@ -108,6 +108,9 @@ func (c *Client) addOperationResetEncryptionKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetEncryptionKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_SearchVulnerabilities.go b/service/inspector2/api_op_SearchVulnerabilities.go index ab4d777691e..6e4c6325791 100644 --- a/service/inspector2/api_op_SearchVulnerabilities.go +++ b/service/inspector2/api_op_SearchVulnerabilities.go @@ -118,6 +118,9 @@ func (c *Client) addOperationSearchVulnerabilitiesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchVulnerabilitiesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationSearchVulnerabilitiesMiddlewares(stack *middleware. return nil } -// SearchVulnerabilitiesAPIClient is a client that implements the -// SearchVulnerabilities operation. -type SearchVulnerabilitiesAPIClient interface { - SearchVulnerabilities(context.Context, *SearchVulnerabilitiesInput, ...func(*Options)) (*SearchVulnerabilitiesOutput, error) -} - -var _ SearchVulnerabilitiesAPIClient = (*Client)(nil) - // SearchVulnerabilitiesPaginatorOptions is the paginator options for // SearchVulnerabilities type SearchVulnerabilitiesPaginatorOptions struct { @@ -202,6 +197,9 @@ func (p *SearchVulnerabilitiesPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchVulnerabilities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *SearchVulnerabilitiesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// SearchVulnerabilitiesAPIClient is a client that implements the +// SearchVulnerabilities operation. +type SearchVulnerabilitiesAPIClient interface { + SearchVulnerabilities(context.Context, *SearchVulnerabilitiesInput, ...func(*Options)) (*SearchVulnerabilitiesOutput, error) +} + +var _ SearchVulnerabilitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchVulnerabilities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/inspector2/api_op_SendCisSessionHealth.go b/service/inspector2/api_op_SendCisSessionHealth.go index b09e0390aca..aae4a88d209 100644 --- a/service/inspector2/api_op_SendCisSessionHealth.go +++ b/service/inspector2/api_op_SendCisSessionHealth.go @@ -110,6 +110,9 @@ func (c *Client) addOperationSendCisSessionHealthMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendCisSessionHealthValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_SendCisSessionTelemetry.go b/service/inspector2/api_op_SendCisSessionTelemetry.go index 7a43f18cc8e..3bc4ec8c487 100644 --- a/service/inspector2/api_op_SendCisSessionTelemetry.go +++ b/service/inspector2/api_op_SendCisSessionTelemetry.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSendCisSessionTelemetryMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendCisSessionTelemetryValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_StartCisSession.go b/service/inspector2/api_op_StartCisSession.go index fac674e16fc..6d600c130bd 100644 --- a/service/inspector2/api_op_StartCisSession.go +++ b/service/inspector2/api_op_StartCisSession.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartCisSessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCisSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_StopCisSession.go b/service/inspector2/api_op_StopCisSession.go index 15a03721ab9..2d2d0f1aea2 100644 --- a/service/inspector2/api_op_StopCisSession.go +++ b/service/inspector2/api_op_StopCisSession.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStopCisSessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCisSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_TagResource.go b/service/inspector2/api_op_TagResource.go index 8acab3bdc07..aab585a9084 100644 --- a/service/inspector2/api_op_TagResource.go +++ b/service/inspector2/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UntagResource.go b/service/inspector2/api_op_UntagResource.go index 9156cb89e31..97fcf9c499d 100644 --- a/service/inspector2/api_op_UntagResource.go +++ b/service/inspector2/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateCisScanConfiguration.go b/service/inspector2/api_op_UpdateCisScanConfiguration.go index c4aa89206dd..41a5600910c 100644 --- a/service/inspector2/api_op_UpdateCisScanConfiguration.go +++ b/service/inspector2/api_op_UpdateCisScanConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateCisScanConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCisScanConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateConfiguration.go b/service/inspector2/api_op_UpdateConfiguration.go index 7461f2d2445..3c22f6c4a76 100644 --- a/service/inspector2/api_op_UpdateConfiguration.go +++ b/service/inspector2/api_op_UpdateConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateConfigurationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go b/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go index 4197a39bdeb..2404be48852 100644 --- a/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go +++ b/service/inspector2/api_op_UpdateEc2DeepInspectionConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateEc2DeepInspectionConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEc2DeepInspectionConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateEncryptionKey.go b/service/inspector2/api_op_UpdateEncryptionKey.go index 54e19d0539a..7fd3b7b53e6 100644 --- a/service/inspector2/api_op_UpdateEncryptionKey.go +++ b/service/inspector2/api_op_UpdateEncryptionKey.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateEncryptionKeyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEncryptionKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateFilter.go b/service/inspector2/api_op_UpdateFilter.go index ea0b3b917d6..7ebf80f69ec 100644 --- a/service/inspector2/api_op_UpdateFilter.go +++ b/service/inspector2/api_op_UpdateFilter.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go b/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go index 9b964c65d7f..bac94272fcc 100644 --- a/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go +++ b/service/inspector2/api_op_UpdateOrgEc2DeepInspectionConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateOrgEc2DeepInspectionConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrgEc2DeepInspectionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspector2/api_op_UpdateOrganizationConfiguration.go b/service/inspector2/api_op_UpdateOrganizationConfiguration.go index d40f2c37979..039310f5336 100644 --- a/service/inspector2/api_op_UpdateOrganizationConfiguration.go +++ b/service/inspector2/api_op_UpdateOrganizationConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateOrganizationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/inspectorscan/api_client.go b/service/inspectorscan/api_client.go index 6d2cd98a3ff..b2103f32b15 100644 --- a/service/inspectorscan/api_client.go +++ b/service/inspectorscan/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/inspectorscan/api_op_ScanSbom.go b/service/inspectorscan/api_op_ScanSbom.go index 78812936084..3f1a57b12aa 100644 --- a/service/inspectorscan/api_op_ScanSbom.go +++ b/service/inspectorscan/api_op_ScanSbom.go @@ -113,6 +113,9 @@ func (c *Client) addOperationScanSbomMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpScanSbomValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_client.go b/service/internetmonitor/api_client.go index 2b8db039c18..caabd0c105e 100644 --- a/service/internetmonitor/api_client.go +++ b/service/internetmonitor/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/internetmonitor/api_op_CreateMonitor.go b/service/internetmonitor/api_op_CreateMonitor.go index 46e2adf7f29..0a5922130dd 100644 --- a/service/internetmonitor/api_op_CreateMonitor.go +++ b/service/internetmonitor/api_op_CreateMonitor.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMonitorMiddleware(stack, options); err != nil { return err } diff --git a/service/internetmonitor/api_op_DeleteMonitor.go b/service/internetmonitor/api_op_DeleteMonitor.go index 602ea0e181a..a02a50578fb 100644 --- a/service/internetmonitor/api_op_DeleteMonitor.go +++ b/service/internetmonitor/api_op_DeleteMonitor.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_GetHealthEvent.go b/service/internetmonitor/api_op_GetHealthEvent.go index b78f25a38e1..f72d7543854 100644 --- a/service/internetmonitor/api_op_GetHealthEvent.go +++ b/service/internetmonitor/api_op_GetHealthEvent.go @@ -182,6 +182,9 @@ func (c *Client) addOperationGetHealthEventMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHealthEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_GetInternetEvent.go b/service/internetmonitor/api_op_GetInternetEvent.go index 0dd37430d6b..e9d3807eb3f 100644 --- a/service/internetmonitor/api_op_GetInternetEvent.go +++ b/service/internetmonitor/api_op_GetInternetEvent.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetInternetEventMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInternetEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_GetMonitor.go b/service/internetmonitor/api_op_GetMonitor.go index 9bcc4e4d058..c39bb5fe21f 100644 --- a/service/internetmonitor/api_op_GetMonitor.go +++ b/service/internetmonitor/api_op_GetMonitor.go @@ -193,6 +193,9 @@ func (c *Client) addOperationGetMonitorMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_GetQueryResults.go b/service/internetmonitor/api_op_GetQueryResults.go index a04889ea5ae..bb9e5392a2e 100644 --- a/service/internetmonitor/api_op_GetQueryResults.go +++ b/service/internetmonitor/api_op_GetQueryResults.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryResultsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationGetQueryResultsMiddlewares(stack *middleware.Stack, return nil } -// GetQueryResultsAPIClient is a client that implements the GetQueryResults -// operation. -type GetQueryResultsAPIClient interface { - GetQueryResults(context.Context, *GetQueryResultsInput, ...func(*Options)) (*GetQueryResultsOutput, error) -} - -var _ GetQueryResultsAPIClient = (*Client)(nil) - // GetQueryResultsPaginatorOptions is the paginator options for GetQueryResults type GetQueryResultsPaginatorOptions struct { // The number of query results that you want to return with this call. @@ -236,6 +231,9 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetQueryResults(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *GetQueryResultsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetQueryResultsAPIClient is a client that implements the GetQueryResults +// operation. +type GetQueryResultsAPIClient interface { + GetQueryResults(context.Context, *GetQueryResultsInput, ...func(*Options)) (*GetQueryResultsOutput, error) +} + +var _ GetQueryResultsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetQueryResults(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/internetmonitor/api_op_GetQueryStatus.go b/service/internetmonitor/api_op_GetQueryStatus.go index d36198c0293..ab4c0873886 100644 --- a/service/internetmonitor/api_op_GetQueryStatus.go +++ b/service/internetmonitor/api_op_GetQueryStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetQueryStatusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_ListHealthEvents.go b/service/internetmonitor/api_op_ListHealthEvents.go index a1bbb8fcd99..b30558644db 100644 --- a/service/internetmonitor/api_op_ListHealthEvents.go +++ b/service/internetmonitor/api_op_ListHealthEvents.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListHealthEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHealthEventsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListHealthEventsMiddlewares(stack *middleware.Stack return nil } -// ListHealthEventsAPIClient is a client that implements the ListHealthEvents -// operation. -type ListHealthEventsAPIClient interface { - ListHealthEvents(context.Context, *ListHealthEventsInput, ...func(*Options)) (*ListHealthEventsOutput, error) -} - -var _ ListHealthEventsAPIClient = (*Client)(nil) - // ListHealthEventsPaginatorOptions is the paginator options for ListHealthEvents type ListHealthEventsPaginatorOptions struct { // The number of health event objects that you want to return with this call. @@ -238,6 +233,9 @@ func (p *ListHealthEventsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHealthEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListHealthEventsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListHealthEventsAPIClient is a client that implements the ListHealthEvents +// operation. +type ListHealthEventsAPIClient interface { + ListHealthEvents(context.Context, *ListHealthEventsInput, ...func(*Options)) (*ListHealthEventsOutput, error) +} + +var _ ListHealthEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHealthEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/internetmonitor/api_op_ListInternetEvents.go b/service/internetmonitor/api_op_ListInternetEvents.go index addd429a505..304da33fadf 100644 --- a/service/internetmonitor/api_op_ListInternetEvents.go +++ b/service/internetmonitor/api_op_ListInternetEvents.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListInternetEventsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInternetEvents(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListInternetEventsMiddlewares(stack *middleware.Sta return nil } -// ListInternetEventsAPIClient is a client that implements the ListInternetEvents -// operation. -type ListInternetEventsAPIClient interface { - ListInternetEvents(context.Context, *ListInternetEventsInput, ...func(*Options)) (*ListInternetEventsOutput, error) -} - -var _ ListInternetEventsAPIClient = (*Client)(nil) - // ListInternetEventsPaginatorOptions is the paginator options for // ListInternetEvents type ListInternetEventsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListInternetEventsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInternetEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListInternetEventsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListInternetEventsAPIClient is a client that implements the ListInternetEvents +// operation. +type ListInternetEventsAPIClient interface { + ListInternetEvents(context.Context, *ListInternetEventsInput, ...func(*Options)) (*ListInternetEventsOutput, error) +} + +var _ ListInternetEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInternetEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/internetmonitor/api_op_ListMonitors.go b/service/internetmonitor/api_op_ListMonitors.go index 249c5d62fda..7e6faf60e5e 100644 --- a/service/internetmonitor/api_op_ListMonitors.go +++ b/service/internetmonitor/api_op_ListMonitors.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMonitors(options.Region), middleware.Before); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op return nil } -// ListMonitorsAPIClient is a client that implements the ListMonitors operation. -type ListMonitorsAPIClient interface { - ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) -} - -var _ ListMonitorsAPIClient = (*Client)(nil) - // ListMonitorsPaginatorOptions is the paginator options for ListMonitors type ListMonitorsPaginatorOptions struct { // The number of monitor objects that you want to return with this call. @@ -223,6 +219,9 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListMonitorsAPIClient is a client that implements the ListMonitors operation. +type ListMonitorsAPIClient interface { + ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) +} + +var _ ListMonitorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/internetmonitor/api_op_ListTagsForResource.go b/service/internetmonitor/api_op_ListTagsForResource.go index 74d140359e2..df9487ea6d1 100644 --- a/service/internetmonitor/api_op_ListTagsForResource.go +++ b/service/internetmonitor/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_StartQuery.go b/service/internetmonitor/api_op_StartQuery.go index 86e0a571fdc..f1bb11e1037 100644 --- a/service/internetmonitor/api_op_StartQuery.go +++ b/service/internetmonitor/api_op_StartQuery.go @@ -171,6 +171,9 @@ func (c *Client) addOperationStartQueryMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_StopQuery.go b/service/internetmonitor/api_op_StopQuery.go index 745e5eb3be1..881352fd6b2 100644 --- a/service/internetmonitor/api_op_StopQuery.go +++ b/service/internetmonitor/api_op_StopQuery.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopQueryMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_TagResource.go b/service/internetmonitor/api_op_TagResource.go index 5581dd140da..025926f07ca 100644 --- a/service/internetmonitor/api_op_TagResource.go +++ b/service/internetmonitor/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_UntagResource.go b/service/internetmonitor/api_op_UntagResource.go index 19e9cae7589..8133f4b5b5f 100644 --- a/service/internetmonitor/api_op_UntagResource.go +++ b/service/internetmonitor/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/internetmonitor/api_op_UpdateMonitor.go b/service/internetmonitor/api_op_UpdateMonitor.go index a9bd5c0496a..00b62a6f451 100644 --- a/service/internetmonitor/api_op_UpdateMonitor.go +++ b/service/internetmonitor/api_op_UpdateMonitor.go @@ -182,6 +182,9 @@ func (c *Client) addOperationUpdateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateMonitorMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_client.go b/service/iot/api_client.go index adc0ea18890..2d84bcabe14 100644 --- a/service/iot/api_client.go +++ b/service/iot/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/iot/api_op_AcceptCertificateTransfer.go b/service/iot/api_op_AcceptCertificateTransfer.go index 134cce2b625..6bcbb06b53a 100644 --- a/service/iot/api_op_AcceptCertificateTransfer.go +++ b/service/iot/api_op_AcceptCertificateTransfer.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAcceptCertificateTransferMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptCertificateTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_AddThingToBillingGroup.go b/service/iot/api_op_AddThingToBillingGroup.go index 987e220b867..23d97a98230 100644 --- a/service/iot/api_op_AddThingToBillingGroup.go +++ b/service/iot/api_op_AddThingToBillingGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddThingToBillingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddThingToBillingGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_AddThingToThingGroup.go b/service/iot/api_op_AddThingToThingGroup.go index 2d9fd75030d..be96b330006 100644 --- a/service/iot/api_op_AddThingToThingGroup.go +++ b/service/iot/api_op_AddThingToThingGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAddThingToThingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddThingToThingGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_AssociateTargetsWithJob.go b/service/iot/api_op_AssociateTargetsWithJob.go index 842d23ff717..899ed43d031 100644 --- a/service/iot/api_op_AssociateTargetsWithJob.go +++ b/service/iot/api_op_AssociateTargetsWithJob.go @@ -145,6 +145,9 @@ func (c *Client) addOperationAssociateTargetsWithJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTargetsWithJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_AttachPolicy.go b/service/iot/api_op_AttachPolicy.go index 40bf9ed8f9c..87cd28835e7 100644 --- a/service/iot/api_op_AttachPolicy.go +++ b/service/iot/api_op_AttachPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_AttachPrincipalPolicy.go b/service/iot/api_op_AttachPrincipalPolicy.go index 0039322d162..c96d04a1679 100644 --- a/service/iot/api_op_AttachPrincipalPolicy.go +++ b/service/iot/api_op_AttachPrincipalPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAttachPrincipalPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachPrincipalPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_AttachSecurityProfile.go b/service/iot/api_op_AttachSecurityProfile.go index b81d27eb444..15dfc46a18a 100644 --- a/service/iot/api_op_AttachSecurityProfile.go +++ b/service/iot/api_op_AttachSecurityProfile.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAttachSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_AttachThingPrincipal.go b/service/iot/api_op_AttachThingPrincipal.go index 926b0210c9d..00cf4455908 100644 --- a/service/iot/api_op_AttachThingPrincipal.go +++ b/service/iot/api_op_AttachThingPrincipal.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAttachThingPrincipalMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachThingPrincipalValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CancelAuditMitigationActionsTask.go b/service/iot/api_op_CancelAuditMitigationActionsTask.go index b6468fcc0b5..ff004e407a3 100644 --- a/service/iot/api_op_CancelAuditMitigationActionsTask.go +++ b/service/iot/api_op_CancelAuditMitigationActionsTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationCancelAuditMitigationActionsTaskMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelAuditMitigationActionsTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CancelAuditTask.go b/service/iot/api_op_CancelAuditTask.go index bd1d89fdc9b..5a52b7944b2 100644 --- a/service/iot/api_op_CancelAuditTask.go +++ b/service/iot/api_op_CancelAuditTask.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCancelAuditTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelAuditTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CancelCertificateTransfer.go b/service/iot/api_op_CancelCertificateTransfer.go index 0941d9e7ee1..bdd6f9d0d0c 100644 --- a/service/iot/api_op_CancelCertificateTransfer.go +++ b/service/iot/api_op_CancelCertificateTransfer.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCancelCertificateTransferMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelCertificateTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CancelDetectMitigationActionsTask.go b/service/iot/api_op_CancelDetectMitigationActionsTask.go index f4bf2d30120..df4070d03be 100644 --- a/service/iot/api_op_CancelDetectMitigationActionsTask.go +++ b/service/iot/api_op_CancelDetectMitigationActionsTask.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCancelDetectMitigationActionsTaskMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDetectMitigationActionsTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CancelJob.go b/service/iot/api_op_CancelJob.go index d4f29c9b226..cc51ab73f84 100644 --- a/service/iot/api_op_CancelJob.go +++ b/service/iot/api_op_CancelJob.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CancelJobExecution.go b/service/iot/api_op_CancelJobExecution.go index 6293c337a6a..ab9941075c3 100644 --- a/service/iot/api_op_CancelJobExecution.go +++ b/service/iot/api_op_CancelJobExecution.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCancelJobExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_ClearDefaultAuthorizer.go b/service/iot/api_op_ClearDefaultAuthorizer.go index 3e5dfa7a17b..4eccb524838 100644 --- a/service/iot/api_op_ClearDefaultAuthorizer.go +++ b/service/iot/api_op_ClearDefaultAuthorizer.go @@ -99,6 +99,9 @@ func (c *Client) addOperationClearDefaultAuthorizerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opClearDefaultAuthorizer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_ConfirmTopicRuleDestination.go b/service/iot/api_op_ConfirmTopicRuleDestination.go index 14f7f16674c..778801811ab 100644 --- a/service/iot/api_op_ConfirmTopicRuleDestination.go +++ b/service/iot/api_op_ConfirmTopicRuleDestination.go @@ -110,6 +110,9 @@ func (c *Client) addOperationConfirmTopicRuleDestinationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmTopicRuleDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateAuditSuppression.go b/service/iot/api_op_CreateAuditSuppression.go index 7c7a7d18a98..afc5841ba54 100644 --- a/service/iot/api_op_CreateAuditSuppression.go +++ b/service/iot/api_op_CreateAuditSuppression.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateAuditSuppressionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAuditSuppressionMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_CreateAuthorizer.go b/service/iot/api_op_CreateAuthorizer.go index dc5837f2fcd..2932a059ef2 100644 --- a/service/iot/api_op_CreateAuthorizer.go +++ b/service/iot/api_op_CreateAuthorizer.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateBillingGroup.go b/service/iot/api_op_CreateBillingGroup.go index 02b647720a6..5852ca69768 100644 --- a/service/iot/api_op_CreateBillingGroup.go +++ b/service/iot/api_op_CreateBillingGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateBillingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBillingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateCertificateFromCsr.go b/service/iot/api_op_CreateCertificateFromCsr.go index 94bcf8a9332..09ab9922859 100644 --- a/service/iot/api_op_CreateCertificateFromCsr.go +++ b/service/iot/api_op_CreateCertificateFromCsr.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateCertificateFromCsrMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCertificateFromCsrValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateCertificateProvider.go b/service/iot/api_op_CreateCertificateProvider.go index 992b085ae76..d4111d39817 100644 --- a/service/iot/api_op_CreateCertificateProvider.go +++ b/service/iot/api_op_CreateCertificateProvider.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateCertificateProviderMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCertificateProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_CreateCustomMetric.go b/service/iot/api_op_CreateCustomMetric.go index 8376b668aac..b9c371303d3 100644 --- a/service/iot/api_op_CreateCustomMetric.go +++ b/service/iot/api_op_CreateCustomMetric.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateCustomMetricMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCustomMetricMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_CreateDimension.go b/service/iot/api_op_CreateDimension.go index e017e351c8f..c6770bf192d 100644 --- a/service/iot/api_op_CreateDimension.go +++ b/service/iot/api_op_CreateDimension.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateDimensionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDimensionMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_CreateDomainConfiguration.go b/service/iot/api_op_CreateDomainConfiguration.go index 648f4c3f5ed..1ff07c7ca2a 100644 --- a/service/iot/api_op_CreateDomainConfiguration.go +++ b/service/iot/api_op_CreateDomainConfiguration.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateDomainConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateDynamicThingGroup.go b/service/iot/api_op_CreateDynamicThingGroup.go index 25c594c19b9..72aab0e4f76 100644 --- a/service/iot/api_op_CreateDynamicThingGroup.go +++ b/service/iot/api_op_CreateDynamicThingGroup.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateDynamicThingGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDynamicThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateFleetMetric.go b/service/iot/api_op_CreateFleetMetric.go index 48a2c798ab2..2c623fe5a45 100644 --- a/service/iot/api_op_CreateFleetMetric.go +++ b/service/iot/api_op_CreateFleetMetric.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateFleetMetricMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateJob.go b/service/iot/api_op_CreateJob.go index c103b44253a..c54e17970b1 100644 --- a/service/iot/api_op_CreateJob.go +++ b/service/iot/api_op_CreateJob.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateJobTemplate.go b/service/iot/api_op_CreateJobTemplate.go index 156b57a8655..e60fc3fcca7 100644 --- a/service/iot/api_op_CreateJobTemplate.go +++ b/service/iot/api_op_CreateJobTemplate.go @@ -172,6 +172,9 @@ func (c *Client) addOperationCreateJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateKeysAndCertificate.go b/service/iot/api_op_CreateKeysAndCertificate.go index f1cb455b7b4..26b33de0b90 100644 --- a/service/iot/api_op_CreateKeysAndCertificate.go +++ b/service/iot/api_op_CreateKeysAndCertificate.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateKeysAndCertificateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeysAndCertificate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_CreateMitigationAction.go b/service/iot/api_op_CreateMitigationAction.go index 474800ef40f..f217fa2293a 100644 --- a/service/iot/api_op_CreateMitigationAction.go +++ b/service/iot/api_op_CreateMitigationAction.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateMitigationActionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMitigationActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateOTAUpdate.go b/service/iot/api_op_CreateOTAUpdate.go index 8b96be27e0b..f3245452561 100644 --- a/service/iot/api_op_CreateOTAUpdate.go +++ b/service/iot/api_op_CreateOTAUpdate.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateOTAUpdateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOTAUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreatePackage.go b/service/iot/api_op_CreatePackage.go index 0f2fe7e0a21..b12ece5a5fb 100644 --- a/service/iot/api_op_CreatePackage.go +++ b/service/iot/api_op_CreatePackage.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePackageMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_CreatePackageVersion.go b/service/iot/api_op_CreatePackageVersion.go index e408fa4d8a6..a7c43ffd44e 100644 --- a/service/iot/api_op_CreatePackageVersion.go +++ b/service/iot/api_op_CreatePackageVersion.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreatePackageVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePackageVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_CreatePolicy.go b/service/iot/api_op_CreatePolicy.go index 2fa23f9736f..3422e22a9b5 100644 --- a/service/iot/api_op_CreatePolicy.go +++ b/service/iot/api_op_CreatePolicy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreatePolicyVersion.go b/service/iot/api_op_CreatePolicyVersion.go index 7a1d32aba2f..7941b421960 100644 --- a/service/iot/api_op_CreatePolicyVersion.go +++ b/service/iot/api_op_CreatePolicyVersion.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreatePolicyVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateProvisioningClaim.go b/service/iot/api_op_CreateProvisioningClaim.go index cd3c0c8294b..c839777ef68 100644 --- a/service/iot/api_op_CreateProvisioningClaim.go +++ b/service/iot/api_op_CreateProvisioningClaim.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateProvisioningClaimMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProvisioningClaimValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateProvisioningTemplate.go b/service/iot/api_op_CreateProvisioningTemplate.go index 6ba396745a4..b6e52a7e14a 100644 --- a/service/iot/api_op_CreateProvisioningTemplate.go +++ b/service/iot/api_op_CreateProvisioningTemplate.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateProvisioningTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProvisioningTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateProvisioningTemplateVersion.go b/service/iot/api_op_CreateProvisioningTemplateVersion.go index 506ead7dd56..f1a771d8108 100644 --- a/service/iot/api_op_CreateProvisioningTemplateVersion.go +++ b/service/iot/api_op_CreateProvisioningTemplateVersion.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateProvisioningTemplateVersionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProvisioningTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateRoleAlias.go b/service/iot/api_op_CreateRoleAlias.go index 4582b918cce..edfccd32127 100644 --- a/service/iot/api_op_CreateRoleAlias.go +++ b/service/iot/api_op_CreateRoleAlias.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateRoleAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRoleAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateScheduledAudit.go b/service/iot/api_op_CreateScheduledAudit.go index 69a1e37a690..ba77554bc95 100644 --- a/service/iot/api_op_CreateScheduledAudit.go +++ b/service/iot/api_op_CreateScheduledAudit.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateScheduledAuditMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScheduledAuditValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateSecurityProfile.go b/service/iot/api_op_CreateSecurityProfile.go index 40c39712d57..1ef56ec4e73 100644 --- a/service/iot/api_op_CreateSecurityProfile.go +++ b/service/iot/api_op_CreateSecurityProfile.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateStream.go b/service/iot/api_op_CreateStream.go index 629881247d2..8e0cd68fa24 100644 --- a/service/iot/api_op_CreateStream.go +++ b/service/iot/api_op_CreateStream.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateThing.go b/service/iot/api_op_CreateThing.go index 48674431a90..1afaec269a7 100644 --- a/service/iot/api_op_CreateThing.go +++ b/service/iot/api_op_CreateThing.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateThingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateThingGroup.go b/service/iot/api_op_CreateThingGroup.go index c420e24882b..7c362259cf1 100644 --- a/service/iot/api_op_CreateThingGroup.go +++ b/service/iot/api_op_CreateThingGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateThingGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateThingType.go b/service/iot/api_op_CreateThingType.go index 08783157021..1d7040a8c37 100644 --- a/service/iot/api_op_CreateThingType.go +++ b/service/iot/api_op_CreateThingType.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateThingTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateThingTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateTopicRule.go b/service/iot/api_op_CreateTopicRule.go index 25904225781..1e49dbffb67 100644 --- a/service/iot/api_op_CreateTopicRule.go +++ b/service/iot/api_op_CreateTopicRule.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateTopicRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTopicRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_CreateTopicRuleDestination.go b/service/iot/api_op_CreateTopicRuleDestination.go index 9de8f65483a..3bcd2a65c97 100644 --- a/service/iot/api_op_CreateTopicRuleDestination.go +++ b/service/iot/api_op_CreateTopicRuleDestination.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateTopicRuleDestinationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTopicRuleDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteAccountAuditConfiguration.go b/service/iot/api_op_DeleteAccountAuditConfiguration.go index 178d235b1c7..d40d5ebece9 100644 --- a/service/iot/api_op_DeleteAccountAuditConfiguration.go +++ b/service/iot/api_op_DeleteAccountAuditConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteAccountAuditConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountAuditConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_DeleteAuditSuppression.go b/service/iot/api_op_DeleteAuditSuppression.go index 7e1792ea7bc..90a7ebd1be2 100644 --- a/service/iot/api_op_DeleteAuditSuppression.go +++ b/service/iot/api_op_DeleteAuditSuppression.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteAuditSuppressionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAuditSuppressionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteAuthorizer.go b/service/iot/api_op_DeleteAuthorizer.go index 61c8b2f50df..05f07d9c383 100644 --- a/service/iot/api_op_DeleteAuthorizer.go +++ b/service/iot/api_op_DeleteAuthorizer.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteBillingGroup.go b/service/iot/api_op_DeleteBillingGroup.go index d7d5028e4e9..6a7df83bd3a 100644 --- a/service/iot/api_op_DeleteBillingGroup.go +++ b/service/iot/api_op_DeleteBillingGroup.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteBillingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBillingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteCACertificate.go b/service/iot/api_op_DeleteCACertificate.go index 120eea0ab4e..fe2759e3f46 100644 --- a/service/iot/api_op_DeleteCACertificate.go +++ b/service/iot/api_op_DeleteCACertificate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteCACertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCACertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteCertificate.go b/service/iot/api_op_DeleteCertificate.go index 5269937cc7d..f9fcbece1f7 100644 --- a/service/iot/api_op_DeleteCertificate.go +++ b/service/iot/api_op_DeleteCertificate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteCertificateProvider.go b/service/iot/api_op_DeleteCertificateProvider.go index 767d0ca8bbb..bbe2c96c107 100644 --- a/service/iot/api_op_DeleteCertificateProvider.go +++ b/service/iot/api_op_DeleteCertificateProvider.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteCertificateProviderMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteCustomMetric.go b/service/iot/api_op_DeleteCustomMetric.go index 171bb5027c1..2adb98b745f 100644 --- a/service/iot/api_op_DeleteCustomMetric.go +++ b/service/iot/api_op_DeleteCustomMetric.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteCustomMetricMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteDimension.go b/service/iot/api_op_DeleteDimension.go index b79a2049817..abd74826f19 100644 --- a/service/iot/api_op_DeleteDimension.go +++ b/service/iot/api_op_DeleteDimension.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDimensionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDimensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteDomainConfiguration.go b/service/iot/api_op_DeleteDomainConfiguration.go index bc47bd828d7..d2d637ce4d4 100644 --- a/service/iot/api_op_DeleteDomainConfiguration.go +++ b/service/iot/api_op_DeleteDomainConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDomainConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteDynamicThingGroup.go b/service/iot/api_op_DeleteDynamicThingGroup.go index b3dade568d1..56da3efb0a4 100644 --- a/service/iot/api_op_DeleteDynamicThingGroup.go +++ b/service/iot/api_op_DeleteDynamicThingGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDynamicThingGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDynamicThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteFleetMetric.go b/service/iot/api_op_DeleteFleetMetric.go index 518a4d2cadb..d4a7756e45f 100644 --- a/service/iot/api_op_DeleteFleetMetric.go +++ b/service/iot/api_op_DeleteFleetMetric.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteFleetMetricMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteJob.go b/service/iot/api_op_DeleteJob.go index 6df40c71981..6ba082290af 100644 --- a/service/iot/api_op_DeleteJob.go +++ b/service/iot/api_op_DeleteJob.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeleteJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteJobExecution.go b/service/iot/api_op_DeleteJobExecution.go index eb33559a53a..7f2671327a7 100644 --- a/service/iot/api_op_DeleteJobExecution.go +++ b/service/iot/api_op_DeleteJobExecution.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDeleteJobExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteJobTemplate.go b/service/iot/api_op_DeleteJobTemplate.go index 98238aaf4b8..8b4dd29ca99 100644 --- a/service/iot/api_op_DeleteJobTemplate.go +++ b/service/iot/api_op_DeleteJobTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteMitigationAction.go b/service/iot/api_op_DeleteMitigationAction.go index 84e00f7e583..28070fa922c 100644 --- a/service/iot/api_op_DeleteMitigationAction.go +++ b/service/iot/api_op_DeleteMitigationAction.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteMitigationActionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMitigationActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteOTAUpdate.go b/service/iot/api_op_DeleteOTAUpdate.go index 15c2ae11ee4..af8a226715d 100644 --- a/service/iot/api_op_DeleteOTAUpdate.go +++ b/service/iot/api_op_DeleteOTAUpdate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteOTAUpdateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOTAUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeletePackage.go b/service/iot/api_op_DeletePackage.go index 42fbc302a18..abcfb5d7bb0 100644 --- a/service/iot/api_op_DeletePackage.go +++ b/service/iot/api_op_DeletePackage.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeletePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeletePackageMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_DeletePackageVersion.go b/service/iot/api_op_DeletePackageVersion.go index 676783afa5c..22042f5ccdb 100644 --- a/service/iot/api_op_DeletePackageVersion.go +++ b/service/iot/api_op_DeletePackageVersion.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePackageVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeletePackageVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_DeletePolicy.go b/service/iot/api_op_DeletePolicy.go index a9a47af49e1..b14090f4701 100644 --- a/service/iot/api_op_DeletePolicy.go +++ b/service/iot/api_op_DeletePolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeletePolicyVersion.go b/service/iot/api_op_DeletePolicyVersion.go index 4b6da5b0625..438f69fca31 100644 --- a/service/iot/api_op_DeletePolicyVersion.go +++ b/service/iot/api_op_DeletePolicyVersion.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePolicyVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteProvisioningTemplate.go b/service/iot/api_op_DeleteProvisioningTemplate.go index 8345bc3c140..44dd134514e 100644 --- a/service/iot/api_op_DeleteProvisioningTemplate.go +++ b/service/iot/api_op_DeleteProvisioningTemplate.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteProvisioningTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProvisioningTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteProvisioningTemplateVersion.go b/service/iot/api_op_DeleteProvisioningTemplateVersion.go index d47a720beed..48f05332042 100644 --- a/service/iot/api_op_DeleteProvisioningTemplateVersion.go +++ b/service/iot/api_op_DeleteProvisioningTemplateVersion.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteProvisioningTemplateVersionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProvisioningTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteRegistrationCode.go b/service/iot/api_op_DeleteRegistrationCode.go index 64cf3aefac3..f6723ba9af9 100644 --- a/service/iot/api_op_DeleteRegistrationCode.go +++ b/service/iot/api_op_DeleteRegistrationCode.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRegistrationCodeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRegistrationCode(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_DeleteRoleAlias.go b/service/iot/api_op_DeleteRoleAlias.go index 9863d662f44..e0de86e39ee 100644 --- a/service/iot/api_op_DeleteRoleAlias.go +++ b/service/iot/api_op_DeleteRoleAlias.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteRoleAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoleAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteScheduledAudit.go b/service/iot/api_op_DeleteScheduledAudit.go index 50d59506baf..13fd6ea6d4a 100644 --- a/service/iot/api_op_DeleteScheduledAudit.go +++ b/service/iot/api_op_DeleteScheduledAudit.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteScheduledAuditMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduledAuditValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteSecurityProfile.go b/service/iot/api_op_DeleteSecurityProfile.go index d59b03d5fbe..406df0c2a0c 100644 --- a/service/iot/api_op_DeleteSecurityProfile.go +++ b/service/iot/api_op_DeleteSecurityProfile.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteStream.go b/service/iot/api_op_DeleteStream.go index 8b5cf8aea44..cf8c53738da 100644 --- a/service/iot/api_op_DeleteStream.go +++ b/service/iot/api_op_DeleteStream.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteThing.go b/service/iot/api_op_DeleteThing.go index 5525709c8d5..63a04208435 100644 --- a/service/iot/api_op_DeleteThing.go +++ b/service/iot/api_op_DeleteThing.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteThingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteThingGroup.go b/service/iot/api_op_DeleteThingGroup.go index a9993aa8cf2..acc98586f35 100644 --- a/service/iot/api_op_DeleteThingGroup.go +++ b/service/iot/api_op_DeleteThingGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteThingGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteThingType.go b/service/iot/api_op_DeleteThingType.go index d592e898819..bf8b749e716 100644 --- a/service/iot/api_op_DeleteThingType.go +++ b/service/iot/api_op_DeleteThingType.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteThingTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThingTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteTopicRule.go b/service/iot/api_op_DeleteTopicRule.go index 5566884f227..95265a789e1 100644 --- a/service/iot/api_op_DeleteTopicRule.go +++ b/service/iot/api_op_DeleteTopicRule.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteTopicRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTopicRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteTopicRuleDestination.go b/service/iot/api_op_DeleteTopicRuleDestination.go index d023eebe4f3..5430baf5dc1 100644 --- a/service/iot/api_op_DeleteTopicRuleDestination.go +++ b/service/iot/api_op_DeleteTopicRuleDestination.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteTopicRuleDestinationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTopicRuleDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeleteV2LoggingLevel.go b/service/iot/api_op_DeleteV2LoggingLevel.go index af853f35a8c..e7870b94bdc 100644 --- a/service/iot/api_op_DeleteV2LoggingLevel.go +++ b/service/iot/api_op_DeleteV2LoggingLevel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteV2LoggingLevelMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteV2LoggingLevelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DeprecateThingType.go b/service/iot/api_op_DeprecateThingType.go index e907efe28f4..f50bf23ed7d 100644 --- a/service/iot/api_op_DeprecateThingType.go +++ b/service/iot/api_op_DeprecateThingType.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeprecateThingTypeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprecateThingTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeAccountAuditConfiguration.go b/service/iot/api_op_DescribeAccountAuditConfiguration.go index bc6c0cbef07..0cce651d03a 100644 --- a/service/iot/api_op_DescribeAccountAuditConfiguration.go +++ b/service/iot/api_op_DescribeAccountAuditConfiguration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeAccountAuditConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAuditConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_DescribeAuditFinding.go b/service/iot/api_op_DescribeAuditFinding.go index 6d359e89715..0290fbb6fe8 100644 --- a/service/iot/api_op_DescribeAuditFinding.go +++ b/service/iot/api_op_DescribeAuditFinding.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAuditFindingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAuditFindingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeAuditMitigationActionsTask.go b/service/iot/api_op_DescribeAuditMitigationActionsTask.go index 5616960a47f..f41c6a7f86a 100644 --- a/service/iot/api_op_DescribeAuditMitigationActionsTask.go +++ b/service/iot/api_op_DescribeAuditMitigationActionsTask.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeAuditMitigationActionsTaskMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAuditMitigationActionsTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeAuditSuppression.go b/service/iot/api_op_DescribeAuditSuppression.go index e7a7281a9fd..5c5c6aa8ec4 100644 --- a/service/iot/api_op_DescribeAuditSuppression.go +++ b/service/iot/api_op_DescribeAuditSuppression.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeAuditSuppressionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAuditSuppressionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeAuditTask.go b/service/iot/api_op_DescribeAuditTask.go index 4f38fd6de07..f7f3fe7b9bd 100644 --- a/service/iot/api_op_DescribeAuditTask.go +++ b/service/iot/api_op_DescribeAuditTask.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeAuditTaskMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAuditTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeAuthorizer.go b/service/iot/api_op_DescribeAuthorizer.go index cef8b75edf8..fc69cd727e3 100644 --- a/service/iot/api_op_DescribeAuthorizer.go +++ b/service/iot/api_op_DescribeAuthorizer.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeAuthorizerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeBillingGroup.go b/service/iot/api_op_DescribeBillingGroup.go index 4b764e4a678..fa2a1b3dc14 100644 --- a/service/iot/api_op_DescribeBillingGroup.go +++ b/service/iot/api_op_DescribeBillingGroup.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeBillingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBillingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeCACertificate.go b/service/iot/api_op_DescribeCACertificate.go index 439259b991d..74c61248244 100644 --- a/service/iot/api_op_DescribeCACertificate.go +++ b/service/iot/api_op_DescribeCACertificate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeCACertificateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCACertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeCertificate.go b/service/iot/api_op_DescribeCertificate.go index 1dcc78f8c30..b0a85555236 100644 --- a/service/iot/api_op_DescribeCertificate.go +++ b/service/iot/api_op_DescribeCertificate.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeCertificateProvider.go b/service/iot/api_op_DescribeCertificateProvider.go index 8838cb03375..5dc01ed0cbf 100644 --- a/service/iot/api_op_DescribeCertificateProvider.go +++ b/service/iot/api_op_DescribeCertificateProvider.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeCertificateProviderMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeCustomMetric.go b/service/iot/api_op_DescribeCustomMetric.go index c7ebf10b888..0e00911a045 100644 --- a/service/iot/api_op_DescribeCustomMetric.go +++ b/service/iot/api_op_DescribeCustomMetric.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeCustomMetricMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeDefaultAuthorizer.go b/service/iot/api_op_DescribeDefaultAuthorizer.go index 3aa01c3a52d..5d2c2ca23a8 100644 --- a/service/iot/api_op_DescribeDefaultAuthorizer.go +++ b/service/iot/api_op_DescribeDefaultAuthorizer.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeDefaultAuthorizerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDefaultAuthorizer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_DescribeDetectMitigationActionsTask.go b/service/iot/api_op_DescribeDetectMitigationActionsTask.go index 3e5d3824ba0..1d6e750e437 100644 --- a/service/iot/api_op_DescribeDetectMitigationActionsTask.go +++ b/service/iot/api_op_DescribeDetectMitigationActionsTask.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeDetectMitigationActionsTaskMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDetectMitigationActionsTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeDimension.go b/service/iot/api_op_DescribeDimension.go index d40c4d6cbc3..148e285fd77 100644 --- a/service/iot/api_op_DescribeDimension.go +++ b/service/iot/api_op_DescribeDimension.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeDimensionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDimensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeDomainConfiguration.go b/service/iot/api_op_DescribeDomainConfiguration.go index 5e4a71e5c1b..f8b5e0fb469 100644 --- a/service/iot/api_op_DescribeDomainConfiguration.go +++ b/service/iot/api_op_DescribeDomainConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeDomainConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeEndpoint.go b/service/iot/api_op_DescribeEndpoint.go index 8f3b21c9cf4..561007f9663 100644 --- a/service/iot/api_op_DescribeEndpoint.go +++ b/service/iot/api_op_DescribeEndpoint.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeEndpointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpoint(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_DescribeEventConfigurations.go b/service/iot/api_op_DescribeEventConfigurations.go index f82598a28c8..568982e722a 100644 --- a/service/iot/api_op_DescribeEventConfigurations.go +++ b/service/iot/api_op_DescribeEventConfigurations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeEventConfigurationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_DescribeFleetMetric.go b/service/iot/api_op_DescribeFleetMetric.go index fde805cd282..905bd6972b3 100644 --- a/service/iot/api_op_DescribeFleetMetric.go +++ b/service/iot/api_op_DescribeFleetMetric.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeFleetMetricMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeIndex.go b/service/iot/api_op_DescribeIndex.go index 606d8b2b432..f6d0920a8db 100644 --- a/service/iot/api_op_DescribeIndex.go +++ b/service/iot/api_op_DescribeIndex.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeIndexMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeJob.go b/service/iot/api_op_DescribeJob.go index 6b610754750..627f9492191 100644 --- a/service/iot/api_op_DescribeJob.go +++ b/service/iot/api_op_DescribeJob.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeJobMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeJobExecution.go b/service/iot/api_op_DescribeJobExecution.go index d58b7b22fd6..00e76733aae 100644 --- a/service/iot/api_op_DescribeJobExecution.go +++ b/service/iot/api_op_DescribeJobExecution.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeJobExecutionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeJobTemplate.go b/service/iot/api_op_DescribeJobTemplate.go index 630fd16ea57..f82d94fb063 100644 --- a/service/iot/api_op_DescribeJobTemplate.go +++ b/service/iot/api_op_DescribeJobTemplate.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeJobTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeManagedJobTemplate.go b/service/iot/api_op_DescribeManagedJobTemplate.go index 63e307e6d76..2259dc29485 100644 --- a/service/iot/api_op_DescribeManagedJobTemplate.go +++ b/service/iot/api_op_DescribeManagedJobTemplate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeManagedJobTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeManagedJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeMitigationAction.go b/service/iot/api_op_DescribeMitigationAction.go index 346035ef2e0..b2515747c91 100644 --- a/service/iot/api_op_DescribeMitigationAction.go +++ b/service/iot/api_op_DescribeMitigationAction.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeMitigationActionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMitigationActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeProvisioningTemplate.go b/service/iot/api_op_DescribeProvisioningTemplate.go index 23bda7b0e57..3bc466a3c3a 100644 --- a/service/iot/api_op_DescribeProvisioningTemplate.go +++ b/service/iot/api_op_DescribeProvisioningTemplate.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeProvisioningTemplateMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProvisioningTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeProvisioningTemplateVersion.go b/service/iot/api_op_DescribeProvisioningTemplateVersion.go index 83e3e066e58..efda3732187 100644 --- a/service/iot/api_op_DescribeProvisioningTemplateVersion.go +++ b/service/iot/api_op_DescribeProvisioningTemplateVersion.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeProvisioningTemplateVersionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProvisioningTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeRoleAlias.go b/service/iot/api_op_DescribeRoleAlias.go index 65952675fae..afd4a2796d5 100644 --- a/service/iot/api_op_DescribeRoleAlias.go +++ b/service/iot/api_op_DescribeRoleAlias.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeRoleAliasMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRoleAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeScheduledAudit.go b/service/iot/api_op_DescribeScheduledAudit.go index 1209368588b..159cf3ec611 100644 --- a/service/iot/api_op_DescribeScheduledAudit.go +++ b/service/iot/api_op_DescribeScheduledAudit.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeScheduledAuditMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduledAuditValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeSecurityProfile.go b/service/iot/api_op_DescribeSecurityProfile.go index 9f59ae6fe0b..39b03fe84ac 100644 --- a/service/iot/api_op_DescribeSecurityProfile.go +++ b/service/iot/api_op_DescribeSecurityProfile.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeSecurityProfileMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeStream.go b/service/iot/api_op_DescribeStream.go index d518db401db..fa1ac0db754 100644 --- a/service/iot/api_op_DescribeStream.go +++ b/service/iot/api_op_DescribeStream.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeThing.go b/service/iot/api_op_DescribeThing.go index 37679eacbad..a319fec8690 100644 --- a/service/iot/api_op_DescribeThing.go +++ b/service/iot/api_op_DescribeThing.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeThingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeThingGroup.go b/service/iot/api_op_DescribeThingGroup.go index 57e0b890ed4..b9a8b25b7e4 100644 --- a/service/iot/api_op_DescribeThingGroup.go +++ b/service/iot/api_op_DescribeThingGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeThingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeThingRegistrationTask.go b/service/iot/api_op_DescribeThingRegistrationTask.go index d292af688d8..15f26975361 100644 --- a/service/iot/api_op_DescribeThingRegistrationTask.go +++ b/service/iot/api_op_DescribeThingRegistrationTask.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeThingRegistrationTaskMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThingRegistrationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DescribeThingType.go b/service/iot/api_op_DescribeThingType.go index 6e3c05d8c16..305d4f86731 100644 --- a/service/iot/api_op_DescribeThingType.go +++ b/service/iot/api_op_DescribeThingType.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeThingTypeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThingTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DetachPolicy.go b/service/iot/api_op_DetachPolicy.go index 405603eba89..acf697fe827 100644 --- a/service/iot/api_op_DetachPolicy.go +++ b/service/iot/api_op_DetachPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDetachPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DetachPrincipalPolicy.go b/service/iot/api_op_DetachPrincipalPolicy.go index 40ac230cc88..748542e7034 100644 --- a/service/iot/api_op_DetachPrincipalPolicy.go +++ b/service/iot/api_op_DetachPrincipalPolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDetachPrincipalPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachPrincipalPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DetachSecurityProfile.go b/service/iot/api_op_DetachSecurityProfile.go index 68980b8dcde..c8a37d3d65b 100644 --- a/service/iot/api_op_DetachSecurityProfile.go +++ b/service/iot/api_op_DetachSecurityProfile.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDetachSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DetachThingPrincipal.go b/service/iot/api_op_DetachThingPrincipal.go index 95a1ff15fef..e6329c08f83 100644 --- a/service/iot/api_op_DetachThingPrincipal.go +++ b/service/iot/api_op_DetachThingPrincipal.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDetachThingPrincipalMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachThingPrincipalValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_DisableTopicRule.go b/service/iot/api_op_DisableTopicRule.go index 45b128b4e37..75f8d8c16c3 100644 --- a/service/iot/api_op_DisableTopicRule.go +++ b/service/iot/api_op_DisableTopicRule.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisableTopicRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableTopicRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_EnableTopicRule.go b/service/iot/api_op_EnableTopicRule.go index df28f5f27f3..104a7c1629d 100644 --- a/service/iot/api_op_EnableTopicRule.go +++ b/service/iot/api_op_EnableTopicRule.go @@ -106,6 +106,9 @@ func (c *Client) addOperationEnableTopicRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableTopicRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetBehaviorModelTrainingSummaries.go b/service/iot/api_op_GetBehaviorModelTrainingSummaries.go index 5e792169f53..49da41dc858 100644 --- a/service/iot/api_op_GetBehaviorModelTrainingSummaries.go +++ b/service/iot/api_op_GetBehaviorModelTrainingSummaries.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetBehaviorModelTrainingSummariesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBehaviorModelTrainingSummaries(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetBehaviorModelTrainingSummariesMiddlewares(stack return nil } -// GetBehaviorModelTrainingSummariesAPIClient is a client that implements the -// GetBehaviorModelTrainingSummaries operation. -type GetBehaviorModelTrainingSummariesAPIClient interface { - GetBehaviorModelTrainingSummaries(context.Context, *GetBehaviorModelTrainingSummariesInput, ...func(*Options)) (*GetBehaviorModelTrainingSummariesOutput, error) -} - -var _ GetBehaviorModelTrainingSummariesAPIClient = (*Client)(nil) - // GetBehaviorModelTrainingSummariesPaginatorOptions is the paginator options for // GetBehaviorModelTrainingSummaries type GetBehaviorModelTrainingSummariesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *GetBehaviorModelTrainingSummariesPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBehaviorModelTrainingSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetBehaviorModelTrainingSummariesPaginator) NextPage(ctx context.Contex return result, nil } +// GetBehaviorModelTrainingSummariesAPIClient is a client that implements the +// GetBehaviorModelTrainingSummaries operation. +type GetBehaviorModelTrainingSummariesAPIClient interface { + GetBehaviorModelTrainingSummaries(context.Context, *GetBehaviorModelTrainingSummariesInput, ...func(*Options)) (*GetBehaviorModelTrainingSummariesOutput, error) +} + +var _ GetBehaviorModelTrainingSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBehaviorModelTrainingSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_GetBucketsAggregation.go b/service/iot/api_op_GetBucketsAggregation.go index 557a43629f0..a6d830a0ec0 100644 --- a/service/iot/api_op_GetBucketsAggregation.go +++ b/service/iot/api_op_GetBucketsAggregation.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetBucketsAggregationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBucketsAggregationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetCardinality.go b/service/iot/api_op_GetCardinality.go index 96ba80d90d1..fb37449a8fe 100644 --- a/service/iot/api_op_GetCardinality.go +++ b/service/iot/api_op_GetCardinality.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetCardinalityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCardinalityValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetEffectivePolicies.go b/service/iot/api_op_GetEffectivePolicies.go index e7ce75e9080..ccb3e8636a8 100644 --- a/service/iot/api_op_GetEffectivePolicies.go +++ b/service/iot/api_op_GetEffectivePolicies.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetEffectivePoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEffectivePolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_GetIndexingConfiguration.go b/service/iot/api_op_GetIndexingConfiguration.go index 0ea00128c99..e321525f40c 100644 --- a/service/iot/api_op_GetIndexingConfiguration.go +++ b/service/iot/api_op_GetIndexingConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetIndexingConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIndexingConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_GetJobDocument.go b/service/iot/api_op_GetJobDocument.go index 2fa47e10dc9..a2073fcd70f 100644 --- a/service/iot/api_op_GetJobDocument.go +++ b/service/iot/api_op_GetJobDocument.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetJobDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetLoggingOptions.go b/service/iot/api_op_GetLoggingOptions.go index 374b20603b0..a27ee316266 100644 --- a/service/iot/api_op_GetLoggingOptions.go +++ b/service/iot/api_op_GetLoggingOptions.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoggingOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_GetOTAUpdate.go b/service/iot/api_op_GetOTAUpdate.go index 209cba91e9e..07e034ec7ab 100644 --- a/service/iot/api_op_GetOTAUpdate.go +++ b/service/iot/api_op_GetOTAUpdate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetOTAUpdateMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOTAUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetPackage.go b/service/iot/api_op_GetPackage.go index 8145914b535..c518971257a 100644 --- a/service/iot/api_op_GetPackage.go +++ b/service/iot/api_op_GetPackage.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetPackageMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetPackageConfiguration.go b/service/iot/api_op_GetPackageConfiguration.go index 5cdc34a17cd..1a283746199 100644 --- a/service/iot/api_op_GetPackageConfiguration.go +++ b/service/iot/api_op_GetPackageConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetPackageConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPackageConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_GetPackageVersion.go b/service/iot/api_op_GetPackageVersion.go index a9b6b982f69..71297b7abc6 100644 --- a/service/iot/api_op_GetPackageVersion.go +++ b/service/iot/api_op_GetPackageVersion.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetPackageVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPackageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetPercentiles.go b/service/iot/api_op_GetPercentiles.go index a4b83f3c1e8..30090b79d07 100644 --- a/service/iot/api_op_GetPercentiles.go +++ b/service/iot/api_op_GetPercentiles.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetPercentilesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPercentilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetPolicy.go b/service/iot/api_op_GetPolicy.go index 7b5c6fc661e..cb6ec0088df 100644 --- a/service/iot/api_op_GetPolicy.go +++ b/service/iot/api_op_GetPolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetPolicyVersion.go b/service/iot/api_op_GetPolicyVersion.go index 2de70187ec5..834d426ff93 100644 --- a/service/iot/api_op_GetPolicyVersion.go +++ b/service/iot/api_op_GetPolicyVersion.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetPolicyVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetRegistrationCode.go b/service/iot/api_op_GetRegistrationCode.go index df10ac1b82b..ed2b62988c4 100644 --- a/service/iot/api_op_GetRegistrationCode.go +++ b/service/iot/api_op_GetRegistrationCode.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetRegistrationCodeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegistrationCode(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_GetStatistics.go b/service/iot/api_op_GetStatistics.go index 64b184ebbe1..30cc6ebace9 100644 --- a/service/iot/api_op_GetStatistics.go +++ b/service/iot/api_op_GetStatistics.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetStatisticsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetTopicRule.go b/service/iot/api_op_GetTopicRule.go index 2649172fff6..e98313a82c1 100644 --- a/service/iot/api_op_GetTopicRule.go +++ b/service/iot/api_op_GetTopicRule.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetTopicRuleMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTopicRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetTopicRuleDestination.go b/service/iot/api_op_GetTopicRuleDestination.go index 385029daab8..ba7f692f605 100644 --- a/service/iot/api_op_GetTopicRuleDestination.go +++ b/service/iot/api_op_GetTopicRuleDestination.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetTopicRuleDestinationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTopicRuleDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_GetV2LoggingOptions.go b/service/iot/api_op_GetV2LoggingOptions.go index 0d6bdd55a73..6c907882f14 100644 --- a/service/iot/api_op_GetV2LoggingOptions.go +++ b/service/iot/api_op_GetV2LoggingOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetV2LoggingOptionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetV2LoggingOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_ListActiveViolations.go b/service/iot/api_op_ListActiveViolations.go index 08365f81462..92b0c7491eb 100644 --- a/service/iot/api_op_ListActiveViolations.go +++ b/service/iot/api_op_ListActiveViolations.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListActiveViolationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActiveViolations(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListActiveViolationsMiddlewares(stack *middleware.S return nil } -// ListActiveViolationsAPIClient is a client that implements the -// ListActiveViolations operation. -type ListActiveViolationsAPIClient interface { - ListActiveViolations(context.Context, *ListActiveViolationsInput, ...func(*Options)) (*ListActiveViolationsOutput, error) -} - -var _ ListActiveViolationsAPIClient = (*Client)(nil) - // ListActiveViolationsPaginatorOptions is the paginator options for // ListActiveViolations type ListActiveViolationsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListActiveViolationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActiveViolations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListActiveViolationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListActiveViolationsAPIClient is a client that implements the +// ListActiveViolations operation. +type ListActiveViolationsAPIClient interface { + ListActiveViolations(context.Context, *ListActiveViolationsInput, ...func(*Options)) (*ListActiveViolationsOutput, error) +} + +var _ ListActiveViolationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActiveViolations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAttachedPolicies.go b/service/iot/api_op_ListAttachedPolicies.go index 2a25ca86059..c67cf61a0bb 100644 --- a/service/iot/api_op_ListAttachedPolicies.go +++ b/service/iot/api_op_ListAttachedPolicies.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAttachedPoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedPoliciesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListAttachedPoliciesMiddlewares(stack *middleware.S return nil } -// ListAttachedPoliciesAPIClient is a client that implements the -// ListAttachedPolicies operation. -type ListAttachedPoliciesAPIClient interface { - ListAttachedPolicies(context.Context, *ListAttachedPoliciesInput, ...func(*Options)) (*ListAttachedPoliciesOutput, error) -} - -var _ ListAttachedPoliciesAPIClient = (*Client)(nil) - // ListAttachedPoliciesPaginatorOptions is the paginator options for // ListAttachedPolicies type ListAttachedPoliciesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListAttachedPoliciesPaginator) NextPage(ctx context.Context, optFns ... } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListAttachedPoliciesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListAttachedPoliciesAPIClient is a client that implements the +// ListAttachedPolicies operation. +type ListAttachedPoliciesAPIClient interface { + ListAttachedPolicies(context.Context, *ListAttachedPoliciesInput, ...func(*Options)) (*ListAttachedPoliciesOutput, error) +} + +var _ ListAttachedPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAuditFindings.go b/service/iot/api_op_ListAuditFindings.go index ac0fd7db3b6..833ae8dd62e 100644 --- a/service/iot/api_op_ListAuditFindings.go +++ b/service/iot/api_op_ListAuditFindings.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListAuditFindingsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAuditFindings(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListAuditFindingsMiddlewares(stack *middleware.Stac return nil } -// ListAuditFindingsAPIClient is a client that implements the ListAuditFindings -// operation. -type ListAuditFindingsAPIClient interface { - ListAuditFindings(context.Context, *ListAuditFindingsInput, ...func(*Options)) (*ListAuditFindingsOutput, error) -} - -var _ ListAuditFindingsAPIClient = (*Client)(nil) - // ListAuditFindingsPaginatorOptions is the paginator options for ListAuditFindings type ListAuditFindingsPaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -232,6 +227,9 @@ func (p *ListAuditFindingsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAuditFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListAuditFindingsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListAuditFindingsAPIClient is a client that implements the ListAuditFindings +// operation. +type ListAuditFindingsAPIClient interface { + ListAuditFindings(context.Context, *ListAuditFindingsInput, ...func(*Options)) (*ListAuditFindingsOutput, error) +} + +var _ ListAuditFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAuditFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAuditMitigationActionsExecutions.go b/service/iot/api_op_ListAuditMitigationActionsExecutions.go index ed4e397d864..549f1e81a4e 100644 --- a/service/iot/api_op_ListAuditMitigationActionsExecutions.go +++ b/service/iot/api_op_ListAuditMitigationActionsExecutions.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListAuditMitigationActionsExecutionsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAuditMitigationActionsExecutionsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListAuditMitigationActionsExecutionsMiddlewares(sta return nil } -// ListAuditMitigationActionsExecutionsAPIClient is a client that implements the -// ListAuditMitigationActionsExecutions operation. -type ListAuditMitigationActionsExecutionsAPIClient interface { - ListAuditMitigationActionsExecutions(context.Context, *ListAuditMitigationActionsExecutionsInput, ...func(*Options)) (*ListAuditMitigationActionsExecutionsOutput, error) -} - -var _ ListAuditMitigationActionsExecutionsAPIClient = (*Client)(nil) - // ListAuditMitigationActionsExecutionsPaginatorOptions is the paginator options // for ListAuditMitigationActionsExecutions type ListAuditMitigationActionsExecutionsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListAuditMitigationActionsExecutionsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAuditMitigationActionsExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListAuditMitigationActionsExecutionsPaginator) NextPage(ctx context.Con return result, nil } +// ListAuditMitigationActionsExecutionsAPIClient is a client that implements the +// ListAuditMitigationActionsExecutions operation. +type ListAuditMitigationActionsExecutionsAPIClient interface { + ListAuditMitigationActionsExecutions(context.Context, *ListAuditMitigationActionsExecutionsInput, ...func(*Options)) (*ListAuditMitigationActionsExecutionsOutput, error) +} + +var _ ListAuditMitigationActionsExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAuditMitigationActionsExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAuditMitigationActionsTasks.go b/service/iot/api_op_ListAuditMitigationActionsTasks.go index b8ecf86071d..eab4a145aff 100644 --- a/service/iot/api_op_ListAuditMitigationActionsTasks.go +++ b/service/iot/api_op_ListAuditMitigationActionsTasks.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListAuditMitigationActionsTasksMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAuditMitigationActionsTasksValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListAuditMitigationActionsTasksMiddlewares(stack *m return nil } -// ListAuditMitigationActionsTasksAPIClient is a client that implements the -// ListAuditMitigationActionsTasks operation. -type ListAuditMitigationActionsTasksAPIClient interface { - ListAuditMitigationActionsTasks(context.Context, *ListAuditMitigationActionsTasksInput, ...func(*Options)) (*ListAuditMitigationActionsTasksOutput, error) -} - -var _ ListAuditMitigationActionsTasksAPIClient = (*Client)(nil) - // ListAuditMitigationActionsTasksPaginatorOptions is the paginator options for // ListAuditMitigationActionsTasks type ListAuditMitigationActionsTasksPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListAuditMitigationActionsTasksPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAuditMitigationActionsTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListAuditMitigationActionsTasksPaginator) NextPage(ctx context.Context, return result, nil } +// ListAuditMitigationActionsTasksAPIClient is a client that implements the +// ListAuditMitigationActionsTasks operation. +type ListAuditMitigationActionsTasksAPIClient interface { + ListAuditMitigationActionsTasks(context.Context, *ListAuditMitigationActionsTasksInput, ...func(*Options)) (*ListAuditMitigationActionsTasksOutput, error) +} + +var _ ListAuditMitigationActionsTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAuditMitigationActionsTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAuditSuppressions.go b/service/iot/api_op_ListAuditSuppressions.go index 6b648747099..a0fd6d40202 100644 --- a/service/iot/api_op_ListAuditSuppressions.go +++ b/service/iot/api_op_ListAuditSuppressions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListAuditSuppressionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAuditSuppressions(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListAuditSuppressionsMiddlewares(stack *middleware. return nil } -// ListAuditSuppressionsAPIClient is a client that implements the -// ListAuditSuppressions operation. -type ListAuditSuppressionsAPIClient interface { - ListAuditSuppressions(context.Context, *ListAuditSuppressionsInput, ...func(*Options)) (*ListAuditSuppressionsOutput, error) -} - -var _ ListAuditSuppressionsAPIClient = (*Client)(nil) - // ListAuditSuppressionsPaginatorOptions is the paginator options for // ListAuditSuppressions type ListAuditSuppressionsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListAuditSuppressionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAuditSuppressions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListAuditSuppressionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAuditSuppressionsAPIClient is a client that implements the +// ListAuditSuppressions operation. +type ListAuditSuppressionsAPIClient interface { + ListAuditSuppressions(context.Context, *ListAuditSuppressionsInput, ...func(*Options)) (*ListAuditSuppressionsOutput, error) +} + +var _ ListAuditSuppressionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAuditSuppressions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAuditTasks.go b/service/iot/api_op_ListAuditTasks.go index 80921bfc312..1d4ebb1ac07 100644 --- a/service/iot/api_op_ListAuditTasks.go +++ b/service/iot/api_op_ListAuditTasks.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListAuditTasksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAuditTasksValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListAuditTasksMiddlewares(stack *middleware.Stack, return nil } -// ListAuditTasksAPIClient is a client that implements the ListAuditTasks -// operation. -type ListAuditTasksAPIClient interface { - ListAuditTasks(context.Context, *ListAuditTasksInput, ...func(*Options)) (*ListAuditTasksOutput, error) -} - -var _ ListAuditTasksAPIClient = (*Client)(nil) - // ListAuditTasksPaginatorOptions is the paginator options for ListAuditTasks type ListAuditTasksPaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -232,6 +227,9 @@ func (p *ListAuditTasksPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAuditTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListAuditTasksPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAuditTasksAPIClient is a client that implements the ListAuditTasks +// operation. +type ListAuditTasksAPIClient interface { + ListAuditTasks(context.Context, *ListAuditTasksInput, ...func(*Options)) (*ListAuditTasksOutput, error) +} + +var _ ListAuditTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAuditTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListAuthorizers.go b/service/iot/api_op_ListAuthorizers.go index 649b22297c9..2e87a27d67b 100644 --- a/service/iot/api_op_ListAuthorizers.go +++ b/service/iot/api_op_ListAuthorizers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListAuthorizersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAuthorizers(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListAuthorizersMiddlewares(stack *middleware.Stack, return nil } -// ListAuthorizersAPIClient is a client that implements the ListAuthorizers -// operation. -type ListAuthorizersAPIClient interface { - ListAuthorizers(context.Context, *ListAuthorizersInput, ...func(*Options)) (*ListAuthorizersOutput, error) -} - -var _ ListAuthorizersAPIClient = (*Client)(nil) - // ListAuthorizersPaginatorOptions is the paginator options for ListAuthorizers type ListAuthorizersPaginatorOptions struct { // The maximum number of results to return at one time. @@ -212,6 +207,9 @@ func (p *ListAuthorizersPaginator) NextPage(ctx context.Context, optFns ...func( } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAuthorizers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListAuthorizersPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListAuthorizersAPIClient is a client that implements the ListAuthorizers +// operation. +type ListAuthorizersAPIClient interface { + ListAuthorizers(context.Context, *ListAuthorizersInput, ...func(*Options)) (*ListAuthorizersOutput, error) +} + +var _ ListAuthorizersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAuthorizers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListBillingGroups.go b/service/iot/api_op_ListBillingGroups.go index ed916417e5f..05cef11e603 100644 --- a/service/iot/api_op_ListBillingGroups.go +++ b/service/iot/api_op_ListBillingGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListBillingGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBillingGroups(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListBillingGroupsMiddlewares(stack *middleware.Stac return nil } -// ListBillingGroupsAPIClient is a client that implements the ListBillingGroups -// operation. -type ListBillingGroupsAPIClient interface { - ListBillingGroups(context.Context, *ListBillingGroupsInput, ...func(*Options)) (*ListBillingGroupsOutput, error) -} - -var _ ListBillingGroupsAPIClient = (*Client)(nil) - // ListBillingGroupsPaginatorOptions is the paginator options for ListBillingGroups type ListBillingGroupsPaginatorOptions struct { // The maximum number of results to return per request. @@ -211,6 +206,9 @@ func (p *ListBillingGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBillingGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListBillingGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListBillingGroupsAPIClient is a client that implements the ListBillingGroups +// operation. +type ListBillingGroupsAPIClient interface { + ListBillingGroups(context.Context, *ListBillingGroupsInput, ...func(*Options)) (*ListBillingGroupsOutput, error) +} + +var _ ListBillingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBillingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListCACertificates.go b/service/iot/api_op_ListCACertificates.go index 7232c381111..15e5214e258 100644 --- a/service/iot/api_op_ListCACertificates.go +++ b/service/iot/api_op_ListCACertificates.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListCACertificatesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCACertificates(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListCACertificatesMiddlewares(stack *middleware.Sta return nil } -// ListCACertificatesAPIClient is a client that implements the ListCACertificates -// operation. -type ListCACertificatesAPIClient interface { - ListCACertificates(context.Context, *ListCACertificatesInput, ...func(*Options)) (*ListCACertificatesOutput, error) -} - -var _ ListCACertificatesAPIClient = (*Client)(nil) - // ListCACertificatesPaginatorOptions is the paginator options for // ListCACertificates type ListCACertificatesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListCACertificatesPaginator) NextPage(ctx context.Context, optFns ...fu } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCACertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListCACertificatesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListCACertificatesAPIClient is a client that implements the ListCACertificates +// operation. +type ListCACertificatesAPIClient interface { + ListCACertificates(context.Context, *ListCACertificatesInput, ...func(*Options)) (*ListCACertificatesOutput, error) +} + +var _ ListCACertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCACertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListCertificateProviders.go b/service/iot/api_op_ListCertificateProviders.go index 4649b22da8a..3d1ce14a3fb 100644 --- a/service/iot/api_op_ListCertificateProviders.go +++ b/service/iot/api_op_ListCertificateProviders.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListCertificateProvidersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCertificateProviders(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_ListCertificates.go b/service/iot/api_op_ListCertificates.go index c8c3d6e82ee..0311f5fb2a5 100644 --- a/service/iot/api_op_ListCertificates.go +++ b/service/iot/api_op_ListCertificates.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCertificates(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack return nil } -// ListCertificatesAPIClient is a client that implements the ListCertificates -// operation. -type ListCertificatesAPIClient interface { - ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) -} - -var _ ListCertificatesAPIClient = (*Client)(nil) - // ListCertificatesPaginatorOptions is the paginator options for ListCertificates type ListCertificatesPaginatorOptions struct { // The result page size. @@ -216,6 +211,9 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCertificatesAPIClient is a client that implements the ListCertificates +// operation. +type ListCertificatesAPIClient interface { + ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) +} + +var _ ListCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListCertificatesByCA.go b/service/iot/api_op_ListCertificatesByCA.go index ffe2dfaee7b..6a5fc9b15cc 100644 --- a/service/iot/api_op_ListCertificatesByCA.go +++ b/service/iot/api_op_ListCertificatesByCA.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListCertificatesByCAMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCertificatesByCAValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListCertificatesByCAMiddlewares(stack *middleware.S return nil } -// ListCertificatesByCAAPIClient is a client that implements the -// ListCertificatesByCA operation. -type ListCertificatesByCAAPIClient interface { - ListCertificatesByCA(context.Context, *ListCertificatesByCAInput, ...func(*Options)) (*ListCertificatesByCAOutput, error) -} - -var _ ListCertificatesByCAAPIClient = (*Client)(nil) - // ListCertificatesByCAPaginatorOptions is the paginator options for // ListCertificatesByCA type ListCertificatesByCAPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListCertificatesByCAPaginator) NextPage(ctx context.Context, optFns ... } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCertificatesByCA(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListCertificatesByCAPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListCertificatesByCAAPIClient is a client that implements the +// ListCertificatesByCA operation. +type ListCertificatesByCAAPIClient interface { + ListCertificatesByCA(context.Context, *ListCertificatesByCAInput, ...func(*Options)) (*ListCertificatesByCAOutput, error) +} + +var _ ListCertificatesByCAAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCertificatesByCA(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListCustomMetrics.go b/service/iot/api_op_ListCustomMetrics.go index 79dfe8f7803..7dd45000b6a 100644 --- a/service/iot/api_op_ListCustomMetrics.go +++ b/service/iot/api_op_ListCustomMetrics.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListCustomMetricsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomMetrics(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListCustomMetricsMiddlewares(stack *middleware.Stac return nil } -// ListCustomMetricsAPIClient is a client that implements the ListCustomMetrics -// operation. -type ListCustomMetricsAPIClient interface { - ListCustomMetrics(context.Context, *ListCustomMetricsInput, ...func(*Options)) (*ListCustomMetricsOutput, error) -} - -var _ ListCustomMetricsAPIClient = (*Client)(nil) - // ListCustomMetricsPaginatorOptions is the paginator options for ListCustomMetrics type ListCustomMetricsPaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -206,6 +201,9 @@ func (p *ListCustomMetricsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListCustomMetricsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListCustomMetricsAPIClient is a client that implements the ListCustomMetrics +// operation. +type ListCustomMetricsAPIClient interface { + ListCustomMetrics(context.Context, *ListCustomMetricsInput, ...func(*Options)) (*ListCustomMetricsOutput, error) +} + +var _ ListCustomMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListDetectMitigationActionsExecutions.go b/service/iot/api_op_ListDetectMitigationActionsExecutions.go index 73447d21099..a24acb5e196 100644 --- a/service/iot/api_op_ListDetectMitigationActionsExecutions.go +++ b/service/iot/api_op_ListDetectMitigationActionsExecutions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListDetectMitigationActionsExecutionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDetectMitigationActionsExecutions(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListDetectMitigationActionsExecutionsMiddlewares(st return nil } -// ListDetectMitigationActionsExecutionsAPIClient is a client that implements the -// ListDetectMitigationActionsExecutions operation. -type ListDetectMitigationActionsExecutionsAPIClient interface { - ListDetectMitigationActionsExecutions(context.Context, *ListDetectMitigationActionsExecutionsInput, ...func(*Options)) (*ListDetectMitigationActionsExecutionsOutput, error) -} - -var _ ListDetectMitigationActionsExecutionsAPIClient = (*Client)(nil) - // ListDetectMitigationActionsExecutionsPaginatorOptions is the paginator options // for ListDetectMitigationActionsExecutions type ListDetectMitigationActionsExecutionsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListDetectMitigationActionsExecutionsPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDetectMitigationActionsExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListDetectMitigationActionsExecutionsPaginator) NextPage(ctx context.Co return result, nil } +// ListDetectMitigationActionsExecutionsAPIClient is a client that implements the +// ListDetectMitigationActionsExecutions operation. +type ListDetectMitigationActionsExecutionsAPIClient interface { + ListDetectMitigationActionsExecutions(context.Context, *ListDetectMitigationActionsExecutionsInput, ...func(*Options)) (*ListDetectMitigationActionsExecutionsOutput, error) +} + +var _ ListDetectMitigationActionsExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDetectMitigationActionsExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListDetectMitigationActionsTasks.go b/service/iot/api_op_ListDetectMitigationActionsTasks.go index 87e164fcfcd..234da4dc60d 100644 --- a/service/iot/api_op_ListDetectMitigationActionsTasks.go +++ b/service/iot/api_op_ListDetectMitigationActionsTasks.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListDetectMitigationActionsTasksMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDetectMitigationActionsTasksValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListDetectMitigationActionsTasksMiddlewares(stack * return nil } -// ListDetectMitigationActionsTasksAPIClient is a client that implements the -// ListDetectMitigationActionsTasks operation. -type ListDetectMitigationActionsTasksAPIClient interface { - ListDetectMitigationActionsTasks(context.Context, *ListDetectMitigationActionsTasksInput, ...func(*Options)) (*ListDetectMitigationActionsTasksOutput, error) -} - -var _ ListDetectMitigationActionsTasksAPIClient = (*Client)(nil) - // ListDetectMitigationActionsTasksPaginatorOptions is the paginator options for // ListDetectMitigationActionsTasks type ListDetectMitigationActionsTasksPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListDetectMitigationActionsTasksPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDetectMitigationActionsTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListDetectMitigationActionsTasksPaginator) NextPage(ctx context.Context return result, nil } +// ListDetectMitigationActionsTasksAPIClient is a client that implements the +// ListDetectMitigationActionsTasks operation. +type ListDetectMitigationActionsTasksAPIClient interface { + ListDetectMitigationActionsTasks(context.Context, *ListDetectMitigationActionsTasksInput, ...func(*Options)) (*ListDetectMitigationActionsTasksOutput, error) +} + +var _ ListDetectMitigationActionsTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDetectMitigationActionsTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListDimensions.go b/service/iot/api_op_ListDimensions.go index a0bd260cb06..30566ee1340 100644 --- a/service/iot/api_op_ListDimensions.go +++ b/service/iot/api_op_ListDimensions.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListDimensionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDimensions(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListDimensionsMiddlewares(stack *middleware.Stack, return nil } -// ListDimensionsAPIClient is a client that implements the ListDimensions -// operation. -type ListDimensionsAPIClient interface { - ListDimensions(context.Context, *ListDimensionsInput, ...func(*Options)) (*ListDimensionsOutput, error) -} - -var _ ListDimensionsAPIClient = (*Client)(nil) - // ListDimensionsPaginatorOptions is the paginator options for ListDimensions type ListDimensionsPaginatorOptions struct { // The maximum number of results to retrieve at one time. @@ -208,6 +203,9 @@ func (p *ListDimensionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDimensions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListDimensionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListDimensionsAPIClient is a client that implements the ListDimensions +// operation. +type ListDimensionsAPIClient interface { + ListDimensions(context.Context, *ListDimensionsInput, ...func(*Options)) (*ListDimensionsOutput, error) +} + +var _ ListDimensionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDimensions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListDomainConfigurations.go b/service/iot/api_op_ListDomainConfigurations.go index 1d930601575..c240c1ef051 100644 --- a/service/iot/api_op_ListDomainConfigurations.go +++ b/service/iot/api_op_ListDomainConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDomainConfigurationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDomainConfigurationsMiddlewares(stack *middlewa return nil } -// ListDomainConfigurationsAPIClient is a client that implements the -// ListDomainConfigurations operation. -type ListDomainConfigurationsAPIClient interface { - ListDomainConfigurations(context.Context, *ListDomainConfigurationsInput, ...func(*Options)) (*ListDomainConfigurationsOutput, error) -} - -var _ ListDomainConfigurationsAPIClient = (*Client)(nil) - // ListDomainConfigurationsPaginatorOptions is the paginator options for // ListDomainConfigurations type ListDomainConfigurationsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListDomainConfigurationsPaginator) NextPage(ctx context.Context, optFns } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListDomainConfigurationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDomainConfigurationsAPIClient is a client that implements the +// ListDomainConfigurations operation. +type ListDomainConfigurationsAPIClient interface { + ListDomainConfigurations(context.Context, *ListDomainConfigurationsInput, ...func(*Options)) (*ListDomainConfigurationsOutput, error) +} + +var _ ListDomainConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListFleetMetrics.go b/service/iot/api_op_ListFleetMetrics.go index 72246b83948..09d5f56e182 100644 --- a/service/iot/api_op_ListFleetMetrics.go +++ b/service/iot/api_op_ListFleetMetrics.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListFleetMetricsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleetMetrics(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListFleetMetricsMiddlewares(stack *middleware.Stack return nil } -// ListFleetMetricsAPIClient is a client that implements the ListFleetMetrics -// operation. -type ListFleetMetricsAPIClient interface { - ListFleetMetrics(context.Context, *ListFleetMetricsInput, ...func(*Options)) (*ListFleetMetricsOutput, error) -} - -var _ ListFleetMetricsAPIClient = (*Client)(nil) - // ListFleetMetricsPaginatorOptions is the paginator options for ListFleetMetrics type ListFleetMetricsPaginatorOptions struct { // The maximum number of results to return in this operation. @@ -208,6 +203,9 @@ func (p *ListFleetMetricsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleetMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListFleetMetricsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListFleetMetricsAPIClient is a client that implements the ListFleetMetrics +// operation. +type ListFleetMetricsAPIClient interface { + ListFleetMetrics(context.Context, *ListFleetMetricsInput, ...func(*Options)) (*ListFleetMetricsOutput, error) +} + +var _ ListFleetMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleetMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListIndices.go b/service/iot/api_op_ListIndices.go index a57f6856882..29351476055 100644 --- a/service/iot/api_op_ListIndices.go +++ b/service/iot/api_op_ListIndices.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIndices(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListIndicesAPIClient is a client that implements the ListIndices operation. -type ListIndicesAPIClient interface { - ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) -} - -var _ ListIndicesAPIClient = (*Client)(nil) - // ListIndicesPaginatorOptions is the paginator options for ListIndices type ListIndicesPaginatorOptions struct { // The maximum number of results to return at one time. @@ -206,6 +202,9 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIndices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListIndicesAPIClient is a client that implements the ListIndices operation. +type ListIndicesAPIClient interface { + ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) +} + +var _ ListIndicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIndices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListJobExecutionsForJob.go b/service/iot/api_op_ListJobExecutionsForJob.go index 3df7e118e59..7d20a689983 100644 --- a/service/iot/api_op_ListJobExecutionsForJob.go +++ b/service/iot/api_op_ListJobExecutionsForJob.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListJobExecutionsForJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobExecutionsForJobValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListJobExecutionsForJobMiddlewares(stack *middlewar return nil } -// ListJobExecutionsForJobAPIClient is a client that implements the -// ListJobExecutionsForJob operation. -type ListJobExecutionsForJobAPIClient interface { - ListJobExecutionsForJob(context.Context, *ListJobExecutionsForJobInput, ...func(*Options)) (*ListJobExecutionsForJobOutput, error) -} - -var _ ListJobExecutionsForJobAPIClient = (*Client)(nil) - // ListJobExecutionsForJobPaginatorOptions is the paginator options for // ListJobExecutionsForJob type ListJobExecutionsForJobPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListJobExecutionsForJobPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobExecutionsForJob(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListJobExecutionsForJobPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListJobExecutionsForJobAPIClient is a client that implements the +// ListJobExecutionsForJob operation. +type ListJobExecutionsForJobAPIClient interface { + ListJobExecutionsForJob(context.Context, *ListJobExecutionsForJobInput, ...func(*Options)) (*ListJobExecutionsForJobOutput, error) +} + +var _ ListJobExecutionsForJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobExecutionsForJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListJobExecutionsForThing.go b/service/iot/api_op_ListJobExecutionsForThing.go index 11572f6743e..aad60c868f7 100644 --- a/service/iot/api_op_ListJobExecutionsForThing.go +++ b/service/iot/api_op_ListJobExecutionsForThing.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListJobExecutionsForThingMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJobExecutionsForThingValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListJobExecutionsForThingMiddlewares(stack *middlew return nil } -// ListJobExecutionsForThingAPIClient is a client that implements the -// ListJobExecutionsForThing operation. -type ListJobExecutionsForThingAPIClient interface { - ListJobExecutionsForThing(context.Context, *ListJobExecutionsForThingInput, ...func(*Options)) (*ListJobExecutionsForThingOutput, error) -} - -var _ ListJobExecutionsForThingAPIClient = (*Client)(nil) - // ListJobExecutionsForThingPaginatorOptions is the paginator options for // ListJobExecutionsForThing type ListJobExecutionsForThingPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListJobExecutionsForThingPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobExecutionsForThing(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListJobExecutionsForThingPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListJobExecutionsForThingAPIClient is a client that implements the +// ListJobExecutionsForThing operation. +type ListJobExecutionsForThingAPIClient interface { + ListJobExecutionsForThing(context.Context, *ListJobExecutionsForThingInput, ...func(*Options)) (*ListJobExecutionsForThingOutput, error) +} + +var _ ListJobExecutionsForThingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobExecutionsForThing(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListJobTemplates.go b/service/iot/api_op_ListJobTemplates.go index 8136fd1a3ca..f4ef24d2f63 100644 --- a/service/iot/api_op_ListJobTemplates.go +++ b/service/iot/api_op_ListJobTemplates.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListJobTemplatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobTemplates(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListJobTemplatesMiddlewares(stack *middleware.Stack return nil } -// ListJobTemplatesAPIClient is a client that implements the ListJobTemplates -// operation. -type ListJobTemplatesAPIClient interface { - ListJobTemplates(context.Context, *ListJobTemplatesInput, ...func(*Options)) (*ListJobTemplatesOutput, error) -} - -var _ ListJobTemplatesAPIClient = (*Client)(nil) - // ListJobTemplatesPaginatorOptions is the paginator options for ListJobTemplates type ListJobTemplatesPaginatorOptions struct { // The maximum number of results to return in the list. @@ -207,6 +202,9 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListJobTemplatesAPIClient is a client that implements the ListJobTemplates +// operation. +type ListJobTemplatesAPIClient interface { + ListJobTemplates(context.Context, *ListJobTemplatesInput, ...func(*Options)) (*ListJobTemplatesOutput, error) +} + +var _ ListJobTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListJobs.go b/service/iot/api_op_ListJobs.go index 8bfcee6f916..0e6e2d03307 100644 --- a/service/iot/api_op_ListJobs.go +++ b/service/iot/api_op_ListJobs.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -171,13 +174,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of results to return per request. @@ -241,6 +237,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +259,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListManagedJobTemplates.go b/service/iot/api_op_ListManagedJobTemplates.go index 3ae5df252f2..00bd2e4b289 100644 --- a/service/iot/api_op_ListManagedJobTemplates.go +++ b/service/iot/api_op_ListManagedJobTemplates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListManagedJobTemplatesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedJobTemplates(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListManagedJobTemplatesMiddlewares(stack *middlewar return nil } -// ListManagedJobTemplatesAPIClient is a client that implements the -// ListManagedJobTemplates operation. -type ListManagedJobTemplatesAPIClient interface { - ListManagedJobTemplates(context.Context, *ListManagedJobTemplatesInput, ...func(*Options)) (*ListManagedJobTemplatesOutput, error) -} - -var _ ListManagedJobTemplatesAPIClient = (*Client)(nil) - // ListManagedJobTemplatesPaginatorOptions is the paginator options for // ListManagedJobTemplates type ListManagedJobTemplatesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListManagedJobTemplatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedJobTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListManagedJobTemplatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListManagedJobTemplatesAPIClient is a client that implements the +// ListManagedJobTemplates operation. +type ListManagedJobTemplatesAPIClient interface { + ListManagedJobTemplates(context.Context, *ListManagedJobTemplatesInput, ...func(*Options)) (*ListManagedJobTemplatesOutput, error) +} + +var _ ListManagedJobTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedJobTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListMetricValues.go b/service/iot/api_op_ListMetricValues.go index e79c880bb65..db84e3eecfb 100644 --- a/service/iot/api_op_ListMetricValues.go +++ b/service/iot/api_op_ListMetricValues.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListMetricValuesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMetricValuesValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListMetricValuesMiddlewares(stack *middleware.Stack return nil } -// ListMetricValuesAPIClient is a client that implements the ListMetricValues -// operation. -type ListMetricValuesAPIClient interface { - ListMetricValues(context.Context, *ListMetricValuesInput, ...func(*Options)) (*ListMetricValuesOutput, error) -} - -var _ ListMetricValuesAPIClient = (*Client)(nil) - // ListMetricValuesPaginatorOptions is the paginator options for ListMetricValues type ListMetricValuesPaginatorOptions struct { // The maximum number of results to return at one time. @@ -235,6 +230,9 @@ func (p *ListMetricValuesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetricValues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListMetricValuesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListMetricValuesAPIClient is a client that implements the ListMetricValues +// operation. +type ListMetricValuesAPIClient interface { + ListMetricValues(context.Context, *ListMetricValuesInput, ...func(*Options)) (*ListMetricValuesOutput, error) +} + +var _ ListMetricValuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetricValues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListMitigationActions.go b/service/iot/api_op_ListMitigationActions.go index 2517e752d44..c4b9fa4671c 100644 --- a/service/iot/api_op_ListMitigationActions.go +++ b/service/iot/api_op_ListMitigationActions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListMitigationActionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMitigationActions(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListMitigationActionsMiddlewares(stack *middleware. return nil } -// ListMitigationActionsAPIClient is a client that implements the -// ListMitigationActions operation. -type ListMitigationActionsAPIClient interface { - ListMitigationActions(context.Context, *ListMitigationActionsInput, ...func(*Options)) (*ListMitigationActionsOutput, error) -} - -var _ ListMitigationActionsAPIClient = (*Client)(nil) - // ListMitigationActionsPaginatorOptions is the paginator options for // ListMitigationActions type ListMitigationActionsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListMitigationActionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMitigationActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListMitigationActionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListMitigationActionsAPIClient is a client that implements the +// ListMitigationActions operation. +type ListMitigationActionsAPIClient interface { + ListMitigationActions(context.Context, *ListMitigationActionsInput, ...func(*Options)) (*ListMitigationActionsOutput, error) +} + +var _ ListMitigationActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMitigationActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListOTAUpdates.go b/service/iot/api_op_ListOTAUpdates.go index 96874131be0..adbdae22e60 100644 --- a/service/iot/api_op_ListOTAUpdates.go +++ b/service/iot/api_op_ListOTAUpdates.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListOTAUpdatesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOTAUpdates(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListOTAUpdatesMiddlewares(stack *middleware.Stack, return nil } -// ListOTAUpdatesAPIClient is a client that implements the ListOTAUpdates -// operation. -type ListOTAUpdatesAPIClient interface { - ListOTAUpdates(context.Context, *ListOTAUpdatesInput, ...func(*Options)) (*ListOTAUpdatesOutput, error) -} - -var _ ListOTAUpdatesAPIClient = (*Client)(nil) - // ListOTAUpdatesPaginatorOptions is the paginator options for ListOTAUpdates type ListOTAUpdatesPaginatorOptions struct { // The maximum number of results to return at one time. @@ -209,6 +204,9 @@ func (p *ListOTAUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOTAUpdates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListOTAUpdatesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListOTAUpdatesAPIClient is a client that implements the ListOTAUpdates +// operation. +type ListOTAUpdatesAPIClient interface { + ListOTAUpdates(context.Context, *ListOTAUpdatesInput, ...func(*Options)) (*ListOTAUpdatesOutput, error) +} + +var _ ListOTAUpdatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOTAUpdates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListOutgoingCertificates.go b/service/iot/api_op_ListOutgoingCertificates.go index 5a598b82c95..97c35719d5a 100644 --- a/service/iot/api_op_ListOutgoingCertificates.go +++ b/service/iot/api_op_ListOutgoingCertificates.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListOutgoingCertificatesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOutgoingCertificates(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListOutgoingCertificatesMiddlewares(stack *middlewa return nil } -// ListOutgoingCertificatesAPIClient is a client that implements the -// ListOutgoingCertificates operation. -type ListOutgoingCertificatesAPIClient interface { - ListOutgoingCertificates(context.Context, *ListOutgoingCertificatesInput, ...func(*Options)) (*ListOutgoingCertificatesOutput, error) -} - -var _ ListOutgoingCertificatesAPIClient = (*Client)(nil) - // ListOutgoingCertificatesPaginatorOptions is the paginator options for // ListOutgoingCertificates type ListOutgoingCertificatesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListOutgoingCertificatesPaginator) NextPage(ctx context.Context, optFns } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOutgoingCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListOutgoingCertificatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListOutgoingCertificatesAPIClient is a client that implements the +// ListOutgoingCertificates operation. +type ListOutgoingCertificatesAPIClient interface { + ListOutgoingCertificates(context.Context, *ListOutgoingCertificatesInput, ...func(*Options)) (*ListOutgoingCertificatesOutput, error) +} + +var _ ListOutgoingCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOutgoingCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListPackageVersions.go b/service/iot/api_op_ListPackageVersions.go index 50f0cbf532a..65f6f93d8a2 100644 --- a/service/iot/api_op_ListPackageVersions.go +++ b/service/iot/api_op_ListPackageVersions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListPackageVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackageVersionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListPackageVersionsMiddlewares(stack *middleware.St return nil } -// ListPackageVersionsAPIClient is a client that implements the -// ListPackageVersions operation. -type ListPackageVersionsAPIClient interface { - ListPackageVersions(context.Context, *ListPackageVersionsInput, ...func(*Options)) (*ListPackageVersionsOutput, error) -} - -var _ ListPackageVersionsAPIClient = (*Client)(nil) - // ListPackageVersionsPaginatorOptions is the paginator options for // ListPackageVersions type ListPackageVersionsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListPackageVersionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackageVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListPackageVersionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPackageVersionsAPIClient is a client that implements the +// ListPackageVersions operation. +type ListPackageVersionsAPIClient interface { + ListPackageVersions(context.Context, *ListPackageVersionsInput, ...func(*Options)) (*ListPackageVersionsOutput, error) +} + +var _ ListPackageVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackageVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListPackages.go b/service/iot/api_op_ListPackages.go index 19035d04d3f..6f88d0daf3f 100644 --- a/service/iot/api_op_ListPackages.go +++ b/service/iot/api_op_ListPackages.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListPackagesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackages(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListPackagesMiddlewares(stack *middleware.Stack, op return nil } -// ListPackagesAPIClient is a client that implements the ListPackages operation. -type ListPackagesAPIClient interface { - ListPackages(context.Context, *ListPackagesInput, ...func(*Options)) (*ListPackagesOutput, error) -} - -var _ ListPackagesAPIClient = (*Client)(nil) - // ListPackagesPaginatorOptions is the paginator options for ListPackages type ListPackagesPaginatorOptions struct { // The maximum number of results returned at one time. @@ -205,6 +201,9 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPackagesAPIClient is a client that implements the ListPackages operation. +type ListPackagesAPIClient interface { + ListPackages(context.Context, *ListPackagesInput, ...func(*Options)) (*ListPackagesOutput, error) +} + +var _ ListPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListPolicies.go b/service/iot/api_op_ListPolicies.go index d3d753a672c..4ddd104a28a 100644 --- a/service/iot/api_op_ListPolicies.go +++ b/service/iot/api_op_ListPolicies.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op return nil } -// ListPoliciesAPIClient is a client that implements the ListPolicies operation. -type ListPoliciesAPIClient interface { - ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) -} - -var _ ListPoliciesAPIClient = (*Client)(nil) - // ListPoliciesPaginatorOptions is the paginator options for ListPolicies type ListPoliciesPaginatorOptions struct { // The result page size. @@ -212,6 +208,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListPolicyPrincipals.go b/service/iot/api_op_ListPolicyPrincipals.go index 087f24180dd..a75bcd37258 100644 --- a/service/iot/api_op_ListPolicyPrincipals.go +++ b/service/iot/api_op_ListPolicyPrincipals.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListPolicyPrincipalsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyPrincipalsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListPolicyPrincipalsMiddlewares(stack *middleware.S return nil } -// ListPolicyPrincipalsAPIClient is a client that implements the -// ListPolicyPrincipals operation. -type ListPolicyPrincipalsAPIClient interface { - ListPolicyPrincipals(context.Context, *ListPolicyPrincipalsInput, ...func(*Options)) (*ListPolicyPrincipalsOutput, error) -} - -var _ ListPolicyPrincipalsAPIClient = (*Client)(nil) - // ListPolicyPrincipalsPaginatorOptions is the paginator options for // ListPolicyPrincipals type ListPolicyPrincipalsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListPolicyPrincipalsPaginator) NextPage(ctx context.Context, optFns ... } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyPrincipals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListPolicyPrincipalsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListPolicyPrincipalsAPIClient is a client that implements the +// ListPolicyPrincipals operation. +type ListPolicyPrincipalsAPIClient interface { + ListPolicyPrincipals(context.Context, *ListPolicyPrincipalsInput, ...func(*Options)) (*ListPolicyPrincipalsOutput, error) +} + +var _ ListPolicyPrincipalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyPrincipals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListPolicyVersions.go b/service/iot/api_op_ListPolicyVersions.go index b0dda59b450..0dcca40390d 100644 --- a/service/iot/api_op_ListPolicyVersions.go +++ b/service/iot/api_op_ListPolicyVersions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListPolicyVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_ListPrincipalPolicies.go b/service/iot/api_op_ListPrincipalPolicies.go index e70c9deb9ce..4447f4282b8 100644 --- a/service/iot/api_op_ListPrincipalPolicies.go +++ b/service/iot/api_op_ListPrincipalPolicies.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListPrincipalPoliciesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrincipalPoliciesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListPrincipalPoliciesMiddlewares(stack *middleware. return nil } -// ListPrincipalPoliciesAPIClient is a client that implements the -// ListPrincipalPolicies operation. -type ListPrincipalPoliciesAPIClient interface { - ListPrincipalPolicies(context.Context, *ListPrincipalPoliciesInput, ...func(*Options)) (*ListPrincipalPoliciesOutput, error) -} - -var _ ListPrincipalPoliciesAPIClient = (*Client)(nil) - // ListPrincipalPoliciesPaginatorOptions is the paginator options for // ListPrincipalPolicies type ListPrincipalPoliciesPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListPrincipalPoliciesPaginator) NextPage(ctx context.Context, optFns .. } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrincipalPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListPrincipalPoliciesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPrincipalPoliciesAPIClient is a client that implements the +// ListPrincipalPolicies operation. +type ListPrincipalPoliciesAPIClient interface { + ListPrincipalPolicies(context.Context, *ListPrincipalPoliciesInput, ...func(*Options)) (*ListPrincipalPoliciesOutput, error) +} + +var _ ListPrincipalPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrincipalPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListPrincipalThings.go b/service/iot/api_op_ListPrincipalThings.go index 992d76c57b1..79d00572eac 100644 --- a/service/iot/api_op_ListPrincipalThings.go +++ b/service/iot/api_op_ListPrincipalThings.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListPrincipalThingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrincipalThingsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListPrincipalThingsMiddlewares(stack *middleware.St return nil } -// ListPrincipalThingsAPIClient is a client that implements the -// ListPrincipalThings operation. -type ListPrincipalThingsAPIClient interface { - ListPrincipalThings(context.Context, *ListPrincipalThingsInput, ...func(*Options)) (*ListPrincipalThingsOutput, error) -} - -var _ ListPrincipalThingsAPIClient = (*Client)(nil) - // ListPrincipalThingsPaginatorOptions is the paginator options for // ListPrincipalThings type ListPrincipalThingsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListPrincipalThingsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrincipalThings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListPrincipalThingsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPrincipalThingsAPIClient is a client that implements the +// ListPrincipalThings operation. +type ListPrincipalThingsAPIClient interface { + ListPrincipalThings(context.Context, *ListPrincipalThingsInput, ...func(*Options)) (*ListPrincipalThingsOutput, error) +} + +var _ ListPrincipalThingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrincipalThings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListProvisioningTemplateVersions.go b/service/iot/api_op_ListProvisioningTemplateVersions.go index 6d6a711d91b..df1a4cf029a 100644 --- a/service/iot/api_op_ListProvisioningTemplateVersions.go +++ b/service/iot/api_op_ListProvisioningTemplateVersions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListProvisioningTemplateVersionsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProvisioningTemplateVersionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListProvisioningTemplateVersionsMiddlewares(stack * return nil } -// ListProvisioningTemplateVersionsAPIClient is a client that implements the -// ListProvisioningTemplateVersions operation. -type ListProvisioningTemplateVersionsAPIClient interface { - ListProvisioningTemplateVersions(context.Context, *ListProvisioningTemplateVersionsInput, ...func(*Options)) (*ListProvisioningTemplateVersionsOutput, error) -} - -var _ ListProvisioningTemplateVersionsAPIClient = (*Client)(nil) - // ListProvisioningTemplateVersionsPaginatorOptions is the paginator options for // ListProvisioningTemplateVersions type ListProvisioningTemplateVersionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListProvisioningTemplateVersionsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProvisioningTemplateVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListProvisioningTemplateVersionsPaginator) NextPage(ctx context.Context return result, nil } +// ListProvisioningTemplateVersionsAPIClient is a client that implements the +// ListProvisioningTemplateVersions operation. +type ListProvisioningTemplateVersionsAPIClient interface { + ListProvisioningTemplateVersions(context.Context, *ListProvisioningTemplateVersionsInput, ...func(*Options)) (*ListProvisioningTemplateVersionsOutput, error) +} + +var _ ListProvisioningTemplateVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProvisioningTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListProvisioningTemplates.go b/service/iot/api_op_ListProvisioningTemplates.go index 4af6f301a48..5a506ef8ddf 100644 --- a/service/iot/api_op_ListProvisioningTemplates.go +++ b/service/iot/api_op_ListProvisioningTemplates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListProvisioningTemplatesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProvisioningTemplates(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListProvisioningTemplatesMiddlewares(stack *middlew return nil } -// ListProvisioningTemplatesAPIClient is a client that implements the -// ListProvisioningTemplates operation. -type ListProvisioningTemplatesAPIClient interface { - ListProvisioningTemplates(context.Context, *ListProvisioningTemplatesInput, ...func(*Options)) (*ListProvisioningTemplatesOutput, error) -} - -var _ ListProvisioningTemplatesAPIClient = (*Client)(nil) - // ListProvisioningTemplatesPaginatorOptions is the paginator options for // ListProvisioningTemplates type ListProvisioningTemplatesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListProvisioningTemplatesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProvisioningTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListProvisioningTemplatesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListProvisioningTemplatesAPIClient is a client that implements the +// ListProvisioningTemplates operation. +type ListProvisioningTemplatesAPIClient interface { + ListProvisioningTemplates(context.Context, *ListProvisioningTemplatesInput, ...func(*Options)) (*ListProvisioningTemplatesOutput, error) +} + +var _ ListProvisioningTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProvisioningTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListRelatedResourcesForAuditFinding.go b/service/iot/api_op_ListRelatedResourcesForAuditFinding.go index 4aaf0e51887..153d5b47b7f 100644 --- a/service/iot/api_op_ListRelatedResourcesForAuditFinding.go +++ b/service/iot/api_op_ListRelatedResourcesForAuditFinding.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListRelatedResourcesForAuditFindingMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRelatedResourcesForAuditFindingValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListRelatedResourcesForAuditFindingMiddlewares(stac return nil } -// ListRelatedResourcesForAuditFindingAPIClient is a client that implements the -// ListRelatedResourcesForAuditFinding operation. -type ListRelatedResourcesForAuditFindingAPIClient interface { - ListRelatedResourcesForAuditFinding(context.Context, *ListRelatedResourcesForAuditFindingInput, ...func(*Options)) (*ListRelatedResourcesForAuditFindingOutput, error) -} - -var _ ListRelatedResourcesForAuditFindingAPIClient = (*Client)(nil) - // ListRelatedResourcesForAuditFindingPaginatorOptions is the paginator options // for ListRelatedResourcesForAuditFinding type ListRelatedResourcesForAuditFindingPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *ListRelatedResourcesForAuditFindingPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRelatedResourcesForAuditFinding(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *ListRelatedResourcesForAuditFindingPaginator) NextPage(ctx context.Cont return result, nil } +// ListRelatedResourcesForAuditFindingAPIClient is a client that implements the +// ListRelatedResourcesForAuditFinding operation. +type ListRelatedResourcesForAuditFindingAPIClient interface { + ListRelatedResourcesForAuditFinding(context.Context, *ListRelatedResourcesForAuditFindingInput, ...func(*Options)) (*ListRelatedResourcesForAuditFindingOutput, error) +} + +var _ ListRelatedResourcesForAuditFindingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRelatedResourcesForAuditFinding(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListRoleAliases.go b/service/iot/api_op_ListRoleAliases.go index 3487cc6a4f3..20a61826540 100644 --- a/service/iot/api_op_ListRoleAliases.go +++ b/service/iot/api_op_ListRoleAliases.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListRoleAliasesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoleAliases(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListRoleAliasesMiddlewares(stack *middleware.Stack, return nil } -// ListRoleAliasesAPIClient is a client that implements the ListRoleAliases -// operation. -type ListRoleAliasesAPIClient interface { - ListRoleAliases(context.Context, *ListRoleAliasesInput, ...func(*Options)) (*ListRoleAliasesOutput, error) -} - -var _ ListRoleAliasesAPIClient = (*Client)(nil) - // ListRoleAliasesPaginatorOptions is the paginator options for ListRoleAliases type ListRoleAliasesPaginatorOptions struct { // The maximum number of results to return at one time. @@ -208,6 +203,9 @@ func (p *ListRoleAliasesPaginator) NextPage(ctx context.Context, optFns ...func( } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoleAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListRoleAliasesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListRoleAliasesAPIClient is a client that implements the ListRoleAliases +// operation. +type ListRoleAliasesAPIClient interface { + ListRoleAliases(context.Context, *ListRoleAliasesInput, ...func(*Options)) (*ListRoleAliasesOutput, error) +} + +var _ ListRoleAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoleAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListScheduledAudits.go b/service/iot/api_op_ListScheduledAudits.go index 33e6ca6637a..d6deb613556 100644 --- a/service/iot/api_op_ListScheduledAudits.go +++ b/service/iot/api_op_ListScheduledAudits.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListScheduledAuditsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledAudits(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListScheduledAuditsMiddlewares(stack *middleware.St return nil } -// ListScheduledAuditsAPIClient is a client that implements the -// ListScheduledAudits operation. -type ListScheduledAuditsAPIClient interface { - ListScheduledAudits(context.Context, *ListScheduledAuditsInput, ...func(*Options)) (*ListScheduledAuditsOutput, error) -} - -var _ ListScheduledAuditsAPIClient = (*Client)(nil) - // ListScheduledAuditsPaginatorOptions is the paginator options for // ListScheduledAudits type ListScheduledAuditsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListScheduledAuditsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScheduledAudits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListScheduledAuditsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListScheduledAuditsAPIClient is a client that implements the +// ListScheduledAudits operation. +type ListScheduledAuditsAPIClient interface { + ListScheduledAudits(context.Context, *ListScheduledAuditsInput, ...func(*Options)) (*ListScheduledAuditsOutput, error) +} + +var _ ListScheduledAuditsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScheduledAudits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListSecurityProfiles.go b/service/iot/api_op_ListSecurityProfiles.go index 8712583bbed..9979d4cbcbe 100644 --- a/service/iot/api_op_ListSecurityProfiles.go +++ b/service/iot/api_op_ListSecurityProfiles.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListSecurityProfilesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityProfiles(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListSecurityProfilesMiddlewares(stack *middleware.S return nil } -// ListSecurityProfilesAPIClient is a client that implements the -// ListSecurityProfiles operation. -type ListSecurityProfilesAPIClient interface { - ListSecurityProfiles(context.Context, *ListSecurityProfilesInput, ...func(*Options)) (*ListSecurityProfilesOutput, error) -} - -var _ ListSecurityProfilesAPIClient = (*Client)(nil) - // ListSecurityProfilesPaginatorOptions is the paginator options for // ListSecurityProfiles type ListSecurityProfilesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSecurityProfilesAPIClient is a client that implements the +// ListSecurityProfiles operation. +type ListSecurityProfilesAPIClient interface { + ListSecurityProfiles(context.Context, *ListSecurityProfilesInput, ...func(*Options)) (*ListSecurityProfilesOutput, error) +} + +var _ ListSecurityProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListSecurityProfilesForTarget.go b/service/iot/api_op_ListSecurityProfilesForTarget.go index 59f414f41d2..f1dd88ba0dc 100644 --- a/service/iot/api_op_ListSecurityProfilesForTarget.go +++ b/service/iot/api_op_ListSecurityProfilesForTarget.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSecurityProfilesForTargetMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityProfilesForTargetValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListSecurityProfilesForTargetMiddlewares(stack *mid return nil } -// ListSecurityProfilesForTargetAPIClient is a client that implements the -// ListSecurityProfilesForTarget operation. -type ListSecurityProfilesForTargetAPIClient interface { - ListSecurityProfilesForTarget(context.Context, *ListSecurityProfilesForTargetInput, ...func(*Options)) (*ListSecurityProfilesForTargetOutput, error) -} - -var _ ListSecurityProfilesForTargetAPIClient = (*Client)(nil) - // ListSecurityProfilesForTargetPaginatorOptions is the paginator options for // ListSecurityProfilesForTarget type ListSecurityProfilesForTargetPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListSecurityProfilesForTargetPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityProfilesForTarget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListSecurityProfilesForTargetPaginator) NextPage(ctx context.Context, o return result, nil } +// ListSecurityProfilesForTargetAPIClient is a client that implements the +// ListSecurityProfilesForTarget operation. +type ListSecurityProfilesForTargetAPIClient interface { + ListSecurityProfilesForTarget(context.Context, *ListSecurityProfilesForTargetInput, ...func(*Options)) (*ListSecurityProfilesForTargetOutput, error) +} + +var _ ListSecurityProfilesForTargetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityProfilesForTarget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListStreams.go b/service/iot/api_op_ListStreams.go index 43f0797b302..66cdaefaee2 100644 --- a/service/iot/api_op_ListStreams.go +++ b/service/iot/api_op_ListStreams.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt return nil } -// ListStreamsAPIClient is a client that implements the ListStreams operation. -type ListStreamsAPIClient interface { - ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) -} - -var _ ListStreamsAPIClient = (*Client)(nil) - // ListStreamsPaginatorOptions is the paginator options for ListStreams type ListStreamsPaginatorOptions struct { // The maximum number of results to return at a time. @@ -208,6 +204,9 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListStreamsAPIClient is a client that implements the ListStreams operation. +type ListStreamsAPIClient interface { + ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) +} + +var _ ListStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListTagsForResource.go b/service/iot/api_op_ListTagsForResource.go index 2e730d92e6e..02f8735b1ae 100644 --- a/service/iot/api_op_ListTagsForResource.go +++ b/service/iot/api_op_ListTagsForResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -202,6 +197,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListTargetsForPolicy.go b/service/iot/api_op_ListTargetsForPolicy.go index 7a534ecc920..3a41d829c1c 100644 --- a/service/iot/api_op_ListTargetsForPolicy.go +++ b/service/iot/api_op_ListTargetsForPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsForPolicyValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S return nil } -// ListTargetsForPolicyAPIClient is a client that implements the -// ListTargetsForPolicy operation. -type ListTargetsForPolicyAPIClient interface { - ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error) -} - -var _ ListTargetsForPolicyAPIClient = (*Client)(nil) - // ListTargetsForPolicyPaginatorOptions is the paginator options for // ListTargetsForPolicy type ListTargetsForPolicyPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetsForPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTargetsForPolicyAPIClient is a client that implements the +// ListTargetsForPolicy operation. +type ListTargetsForPolicyAPIClient interface { + ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error) +} + +var _ ListTargetsForPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetsForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListTargetsForSecurityProfile.go b/service/iot/api_op_ListTargetsForSecurityProfile.go index 3490ceffb4a..441b957e6ef 100644 --- a/service/iot/api_op_ListTargetsForSecurityProfile.go +++ b/service/iot/api_op_ListTargetsForSecurityProfile.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTargetsForSecurityProfileMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsForSecurityProfileValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTargetsForSecurityProfileMiddlewares(stack *mid return nil } -// ListTargetsForSecurityProfileAPIClient is a client that implements the -// ListTargetsForSecurityProfile operation. -type ListTargetsForSecurityProfileAPIClient interface { - ListTargetsForSecurityProfile(context.Context, *ListTargetsForSecurityProfileInput, ...func(*Options)) (*ListTargetsForSecurityProfileOutput, error) -} - -var _ ListTargetsForSecurityProfileAPIClient = (*Client)(nil) - // ListTargetsForSecurityProfilePaginatorOptions is the paginator options for // ListTargetsForSecurityProfile type ListTargetsForSecurityProfilePaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListTargetsForSecurityProfilePaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetsForSecurityProfile(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListTargetsForSecurityProfilePaginator) NextPage(ctx context.Context, o return result, nil } +// ListTargetsForSecurityProfileAPIClient is a client that implements the +// ListTargetsForSecurityProfile operation. +type ListTargetsForSecurityProfileAPIClient interface { + ListTargetsForSecurityProfile(context.Context, *ListTargetsForSecurityProfileInput, ...func(*Options)) (*ListTargetsForSecurityProfileOutput, error) +} + +var _ ListTargetsForSecurityProfileAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetsForSecurityProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingGroups.go b/service/iot/api_op_ListThingGroups.go index aa1a35f80f9..f90f093e07c 100644 --- a/service/iot/api_op_ListThingGroups.go +++ b/service/iot/api_op_ListThingGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListThingGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingGroups(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListThingGroupsMiddlewares(stack *middleware.Stack, return nil } -// ListThingGroupsAPIClient is a client that implements the ListThingGroups -// operation. -type ListThingGroupsAPIClient interface { - ListThingGroups(context.Context, *ListThingGroupsInput, ...func(*Options)) (*ListThingGroupsOutput, error) -} - -var _ ListThingGroupsAPIClient = (*Client)(nil) - // ListThingGroupsPaginatorOptions is the paginator options for ListThingGroups type ListThingGroupsPaginatorOptions struct { // The maximum number of results to return at one time. @@ -217,6 +212,9 @@ func (p *ListThingGroupsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListThingGroupsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListThingGroupsAPIClient is a client that implements the ListThingGroups +// operation. +type ListThingGroupsAPIClient interface { + ListThingGroups(context.Context, *ListThingGroupsInput, ...func(*Options)) (*ListThingGroupsOutput, error) +} + +var _ ListThingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingGroupsForThing.go b/service/iot/api_op_ListThingGroupsForThing.go index 20829df7166..d510b32786d 100644 --- a/service/iot/api_op_ListThingGroupsForThing.go +++ b/service/iot/api_op_ListThingGroupsForThing.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListThingGroupsForThingMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThingGroupsForThingValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListThingGroupsForThingMiddlewares(stack *middlewar return nil } -// ListThingGroupsForThingAPIClient is a client that implements the -// ListThingGroupsForThing operation. -type ListThingGroupsForThingAPIClient interface { - ListThingGroupsForThing(context.Context, *ListThingGroupsForThingInput, ...func(*Options)) (*ListThingGroupsForThingOutput, error) -} - -var _ ListThingGroupsForThingAPIClient = (*Client)(nil) - // ListThingGroupsForThingPaginatorOptions is the paginator options for // ListThingGroupsForThing type ListThingGroupsForThingPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListThingGroupsForThingPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingGroupsForThing(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListThingGroupsForThingPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListThingGroupsForThingAPIClient is a client that implements the +// ListThingGroupsForThing operation. +type ListThingGroupsForThingAPIClient interface { + ListThingGroupsForThing(context.Context, *ListThingGroupsForThingInput, ...func(*Options)) (*ListThingGroupsForThingOutput, error) +} + +var _ ListThingGroupsForThingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingGroupsForThing(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingPrincipals.go b/service/iot/api_op_ListThingPrincipals.go index 58ab24a5d2a..7656fd65c16 100644 --- a/service/iot/api_op_ListThingPrincipals.go +++ b/service/iot/api_op_ListThingPrincipals.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListThingPrincipalsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThingPrincipalsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListThingPrincipalsMiddlewares(stack *middleware.St return nil } -// ListThingPrincipalsAPIClient is a client that implements the -// ListThingPrincipals operation. -type ListThingPrincipalsAPIClient interface { - ListThingPrincipals(context.Context, *ListThingPrincipalsInput, ...func(*Options)) (*ListThingPrincipalsOutput, error) -} - -var _ ListThingPrincipalsAPIClient = (*Client)(nil) - // ListThingPrincipalsPaginatorOptions is the paginator options for // ListThingPrincipals type ListThingPrincipalsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListThingPrincipalsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingPrincipals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListThingPrincipalsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListThingPrincipalsAPIClient is a client that implements the +// ListThingPrincipals operation. +type ListThingPrincipalsAPIClient interface { + ListThingPrincipals(context.Context, *ListThingPrincipalsInput, ...func(*Options)) (*ListThingPrincipalsOutput, error) +} + +var _ ListThingPrincipalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingPrincipals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingRegistrationTaskReports.go b/service/iot/api_op_ListThingRegistrationTaskReports.go index bc7d58d79a4..a49a2157ff0 100644 --- a/service/iot/api_op_ListThingRegistrationTaskReports.go +++ b/service/iot/api_op_ListThingRegistrationTaskReports.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListThingRegistrationTaskReportsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThingRegistrationTaskReportsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListThingRegistrationTaskReportsMiddlewares(stack * return nil } -// ListThingRegistrationTaskReportsAPIClient is a client that implements the -// ListThingRegistrationTaskReports operation. -type ListThingRegistrationTaskReportsAPIClient interface { - ListThingRegistrationTaskReports(context.Context, *ListThingRegistrationTaskReportsInput, ...func(*Options)) (*ListThingRegistrationTaskReportsOutput, error) -} - -var _ ListThingRegistrationTaskReportsAPIClient = (*Client)(nil) - // ListThingRegistrationTaskReportsPaginatorOptions is the paginator options for // ListThingRegistrationTaskReports type ListThingRegistrationTaskReportsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListThingRegistrationTaskReportsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingRegistrationTaskReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListThingRegistrationTaskReportsPaginator) NextPage(ctx context.Context return result, nil } +// ListThingRegistrationTaskReportsAPIClient is a client that implements the +// ListThingRegistrationTaskReports operation. +type ListThingRegistrationTaskReportsAPIClient interface { + ListThingRegistrationTaskReports(context.Context, *ListThingRegistrationTaskReportsInput, ...func(*Options)) (*ListThingRegistrationTaskReportsOutput, error) +} + +var _ ListThingRegistrationTaskReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingRegistrationTaskReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingRegistrationTasks.go b/service/iot/api_op_ListThingRegistrationTasks.go index ef78b4b9c1c..d22c1b459f6 100644 --- a/service/iot/api_op_ListThingRegistrationTasks.go +++ b/service/iot/api_op_ListThingRegistrationTasks.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListThingRegistrationTasksMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingRegistrationTasks(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListThingRegistrationTasksMiddlewares(stack *middle return nil } -// ListThingRegistrationTasksAPIClient is a client that implements the -// ListThingRegistrationTasks operation. -type ListThingRegistrationTasksAPIClient interface { - ListThingRegistrationTasks(context.Context, *ListThingRegistrationTasksInput, ...func(*Options)) (*ListThingRegistrationTasksOutput, error) -} - -var _ ListThingRegistrationTasksAPIClient = (*Client)(nil) - // ListThingRegistrationTasksPaginatorOptions is the paginator options for // ListThingRegistrationTasks type ListThingRegistrationTasksPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListThingRegistrationTasksPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingRegistrationTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListThingRegistrationTasksPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListThingRegistrationTasksAPIClient is a client that implements the +// ListThingRegistrationTasks operation. +type ListThingRegistrationTasksAPIClient interface { + ListThingRegistrationTasks(context.Context, *ListThingRegistrationTasksInput, ...func(*Options)) (*ListThingRegistrationTasksOutput, error) +} + +var _ ListThingRegistrationTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingRegistrationTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingTypes.go b/service/iot/api_op_ListThingTypes.go index 7261a19b8e7..c020454b38d 100644 --- a/service/iot/api_op_ListThingTypes.go +++ b/service/iot/api_op_ListThingTypes.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListThingTypesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingTypes(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListThingTypesMiddlewares(stack *middleware.Stack, return nil } -// ListThingTypesAPIClient is a client that implements the ListThingTypes -// operation. -type ListThingTypesAPIClient interface { - ListThingTypes(context.Context, *ListThingTypesInput, ...func(*Options)) (*ListThingTypesOutput, error) -} - -var _ ListThingTypesAPIClient = (*Client)(nil) - // ListThingTypesPaginatorOptions is the paginator options for ListThingTypes type ListThingTypesPaginatorOptions struct { // The maximum number of results to return in this operation. @@ -213,6 +208,9 @@ func (p *ListThingTypesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListThingTypesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListThingTypesAPIClient is a client that implements the ListThingTypes +// operation. +type ListThingTypesAPIClient interface { + ListThingTypes(context.Context, *ListThingTypesInput, ...func(*Options)) (*ListThingTypesOutput, error) +} + +var _ ListThingTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThings.go b/service/iot/api_op_ListThings.go index 7b8c4b14c64..0c5a506ae33 100644 --- a/service/iot/api_op_ListThings.go +++ b/service/iot/api_op_ListThings.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListThingsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThings(options.Region), middleware.Before); err != nil { return err } @@ -164,13 +167,6 @@ func (c *Client) addOperationListThingsMiddlewares(stack *middleware.Stack, opti return nil } -// ListThingsAPIClient is a client that implements the ListThings operation. -type ListThingsAPIClient interface { - ListThings(context.Context, *ListThingsInput, ...func(*Options)) (*ListThingsOutput, error) -} - -var _ ListThingsAPIClient = (*Client)(nil) - // ListThingsPaginatorOptions is the paginator options for ListThings type ListThingsPaginatorOptions struct { // The maximum number of results to return in this operation. @@ -234,6 +230,9 @@ func (p *ListThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListThingsAPIClient is a client that implements the ListThings operation. +type ListThingsAPIClient interface { + ListThings(context.Context, *ListThingsInput, ...func(*Options)) (*ListThingsOutput, error) +} + +var _ ListThingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingsInBillingGroup.go b/service/iot/api_op_ListThingsInBillingGroup.go index d6a066e805b..ba9ceb31c04 100644 --- a/service/iot/api_op_ListThingsInBillingGroup.go +++ b/service/iot/api_op_ListThingsInBillingGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListThingsInBillingGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThingsInBillingGroupValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListThingsInBillingGroupMiddlewares(stack *middlewa return nil } -// ListThingsInBillingGroupAPIClient is a client that implements the -// ListThingsInBillingGroup operation. -type ListThingsInBillingGroupAPIClient interface { - ListThingsInBillingGroup(context.Context, *ListThingsInBillingGroupInput, ...func(*Options)) (*ListThingsInBillingGroupOutput, error) -} - -var _ ListThingsInBillingGroupAPIClient = (*Client)(nil) - // ListThingsInBillingGroupPaginatorOptions is the paginator options for // ListThingsInBillingGroup type ListThingsInBillingGroupPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListThingsInBillingGroupPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingsInBillingGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListThingsInBillingGroupPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListThingsInBillingGroupAPIClient is a client that implements the +// ListThingsInBillingGroup operation. +type ListThingsInBillingGroupAPIClient interface { + ListThingsInBillingGroup(context.Context, *ListThingsInBillingGroupInput, ...func(*Options)) (*ListThingsInBillingGroupOutput, error) +} + +var _ ListThingsInBillingGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingsInBillingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListThingsInThingGroup.go b/service/iot/api_op_ListThingsInThingGroup.go index 86343436ffd..8a08be3a9b5 100644 --- a/service/iot/api_op_ListThingsInThingGroup.go +++ b/service/iot/api_op_ListThingsInThingGroup.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListThingsInThingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThingsInThingGroupValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListThingsInThingGroupMiddlewares(stack *middleware return nil } -// ListThingsInThingGroupAPIClient is a client that implements the -// ListThingsInThingGroup operation. -type ListThingsInThingGroupAPIClient interface { - ListThingsInThingGroup(context.Context, *ListThingsInThingGroupInput, ...func(*Options)) (*ListThingsInThingGroupOutput, error) -} - -var _ ListThingsInThingGroupAPIClient = (*Client)(nil) - // ListThingsInThingGroupPaginatorOptions is the paginator options for // ListThingsInThingGroup type ListThingsInThingGroupPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListThingsInThingGroupPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThingsInThingGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListThingsInThingGroupPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListThingsInThingGroupAPIClient is a client that implements the +// ListThingsInThingGroup operation. +type ListThingsInThingGroupAPIClient interface { + ListThingsInThingGroup(context.Context, *ListThingsInThingGroupInput, ...func(*Options)) (*ListThingsInThingGroupOutput, error) +} + +var _ ListThingsInThingGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThingsInThingGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListTopicRuleDestinations.go b/service/iot/api_op_ListTopicRuleDestinations.go index 6a60499299a..d59bfbd1188 100644 --- a/service/iot/api_op_ListTopicRuleDestinations.go +++ b/service/iot/api_op_ListTopicRuleDestinations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTopicRuleDestinationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTopicRuleDestinations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListTopicRuleDestinationsMiddlewares(stack *middlew return nil } -// ListTopicRuleDestinationsAPIClient is a client that implements the -// ListTopicRuleDestinations operation. -type ListTopicRuleDestinationsAPIClient interface { - ListTopicRuleDestinations(context.Context, *ListTopicRuleDestinationsInput, ...func(*Options)) (*ListTopicRuleDestinationsOutput, error) -} - -var _ ListTopicRuleDestinationsAPIClient = (*Client)(nil) - // ListTopicRuleDestinationsPaginatorOptions is the paginator options for // ListTopicRuleDestinations type ListTopicRuleDestinationsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListTopicRuleDestinationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTopicRuleDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListTopicRuleDestinationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListTopicRuleDestinationsAPIClient is a client that implements the +// ListTopicRuleDestinations operation. +type ListTopicRuleDestinationsAPIClient interface { + ListTopicRuleDestinations(context.Context, *ListTopicRuleDestinationsInput, ...func(*Options)) (*ListTopicRuleDestinationsOutput, error) +} + +var _ ListTopicRuleDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTopicRuleDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListTopicRules.go b/service/iot/api_op_ListTopicRules.go index 154f908b800..58f67116f2e 100644 --- a/service/iot/api_op_ListTopicRules.go +++ b/service/iot/api_op_ListTopicRules.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTopicRulesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTopicRules(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTopicRulesMiddlewares(stack *middleware.Stack, return nil } -// ListTopicRulesAPIClient is a client that implements the ListTopicRules -// operation. -type ListTopicRulesAPIClient interface { - ListTopicRules(context.Context, *ListTopicRulesInput, ...func(*Options)) (*ListTopicRulesOutput, error) -} - -var _ ListTopicRulesAPIClient = (*Client)(nil) - // ListTopicRulesPaginatorOptions is the paginator options for ListTopicRules type ListTopicRulesPaginatorOptions struct { // The maximum number of results to return. @@ -216,6 +211,9 @@ func (p *ListTopicRulesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTopicRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTopicRulesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListTopicRulesAPIClient is a client that implements the ListTopicRules +// operation. +type ListTopicRulesAPIClient interface { + ListTopicRules(context.Context, *ListTopicRulesInput, ...func(*Options)) (*ListTopicRulesOutput, error) +} + +var _ ListTopicRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTopicRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListV2LoggingLevels.go b/service/iot/api_op_ListV2LoggingLevels.go index 304b85344c5..9391f63a242 100644 --- a/service/iot/api_op_ListV2LoggingLevels.go +++ b/service/iot/api_op_ListV2LoggingLevels.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListV2LoggingLevelsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListV2LoggingLevels(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListV2LoggingLevelsMiddlewares(stack *middleware.St return nil } -// ListV2LoggingLevelsAPIClient is a client that implements the -// ListV2LoggingLevels operation. -type ListV2LoggingLevelsAPIClient interface { - ListV2LoggingLevels(context.Context, *ListV2LoggingLevelsInput, ...func(*Options)) (*ListV2LoggingLevelsOutput, error) -} - -var _ ListV2LoggingLevelsAPIClient = (*Client)(nil) - // ListV2LoggingLevelsPaginatorOptions is the paginator options for // ListV2LoggingLevels type ListV2LoggingLevelsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListV2LoggingLevelsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListV2LoggingLevels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListV2LoggingLevelsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListV2LoggingLevelsAPIClient is a client that implements the +// ListV2LoggingLevels operation. +type ListV2LoggingLevelsAPIClient interface { + ListV2LoggingLevels(context.Context, *ListV2LoggingLevelsInput, ...func(*Options)) (*ListV2LoggingLevelsOutput, error) +} + +var _ ListV2LoggingLevelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListV2LoggingLevels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_ListViolationEvents.go b/service/iot/api_op_ListViolationEvents.go index b75c846c44c..fab075127bd 100644 --- a/service/iot/api_op_ListViolationEvents.go +++ b/service/iot/api_op_ListViolationEvents.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListViolationEventsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListViolationEventsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListViolationEventsMiddlewares(stack *middleware.St return nil } -// ListViolationEventsAPIClient is a client that implements the -// ListViolationEvents operation. -type ListViolationEventsAPIClient interface { - ListViolationEvents(context.Context, *ListViolationEventsInput, ...func(*Options)) (*ListViolationEventsOutput, error) -} - -var _ ListViolationEventsAPIClient = (*Client)(nil) - // ListViolationEventsPaginatorOptions is the paginator options for // ListViolationEvents type ListViolationEventsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListViolationEventsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListViolationEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListViolationEventsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListViolationEventsAPIClient is a client that implements the +// ListViolationEvents operation. +type ListViolationEventsAPIClient interface { + ListViolationEvents(context.Context, *ListViolationEventsInput, ...func(*Options)) (*ListViolationEventsOutput, error) +} + +var _ ListViolationEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListViolationEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot/api_op_PutVerificationStateOnViolation.go b/service/iot/api_op_PutVerificationStateOnViolation.go index 826ffafbede..4cf796c0022 100644 --- a/service/iot/api_op_PutVerificationStateOnViolation.go +++ b/service/iot/api_op_PutVerificationStateOnViolation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutVerificationStateOnViolationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutVerificationStateOnViolationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_RegisterCACertificate.go b/service/iot/api_op_RegisterCACertificate.go index fe66cfc8d85..c44943bc396 100644 --- a/service/iot/api_op_RegisterCACertificate.go +++ b/service/iot/api_op_RegisterCACertificate.go @@ -156,6 +156,9 @@ func (c *Client) addOperationRegisterCACertificateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterCACertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_RegisterCertificate.go b/service/iot/api_op_RegisterCertificate.go index 8a4a506f4ad..8c1fdb19faa 100644 --- a/service/iot/api_op_RegisterCertificate.go +++ b/service/iot/api_op_RegisterCertificate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationRegisterCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_RegisterCertificateWithoutCA.go b/service/iot/api_op_RegisterCertificateWithoutCA.go index 311869d821a..339db009cfe 100644 --- a/service/iot/api_op_RegisterCertificateWithoutCA.go +++ b/service/iot/api_op_RegisterCertificateWithoutCA.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRegisterCertificateWithoutCAMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterCertificateWithoutCAValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_RegisterThing.go b/service/iot/api_op_RegisterThing.go index ad0f7ce2358..c9171b7bf1c 100644 --- a/service/iot/api_op_RegisterThing.go +++ b/service/iot/api_op_RegisterThing.go @@ -123,6 +123,9 @@ func (c *Client) addOperationRegisterThingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_RejectCertificateTransfer.go b/service/iot/api_op_RejectCertificateTransfer.go index 780974f6d25..b24652f1f22 100644 --- a/service/iot/api_op_RejectCertificateTransfer.go +++ b/service/iot/api_op_RejectCertificateTransfer.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRejectCertificateTransferMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectCertificateTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_RemoveThingFromBillingGroup.go b/service/iot/api_op_RemoveThingFromBillingGroup.go index f079f3c3564..4ea92b56684 100644 --- a/service/iot/api_op_RemoveThingFromBillingGroup.go +++ b/service/iot/api_op_RemoveThingFromBillingGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRemoveThingFromBillingGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveThingFromBillingGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_RemoveThingFromThingGroup.go b/service/iot/api_op_RemoveThingFromThingGroup.go index f291ae801e7..8fdfc910077 100644 --- a/service/iot/api_op_RemoveThingFromThingGroup.go +++ b/service/iot/api_op_RemoveThingFromThingGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRemoveThingFromThingGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveThingFromThingGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_ReplaceTopicRule.go b/service/iot/api_op_ReplaceTopicRule.go index db245ebe5ff..14b9dc534a9 100644 --- a/service/iot/api_op_ReplaceTopicRule.go +++ b/service/iot/api_op_ReplaceTopicRule.go @@ -114,6 +114,9 @@ func (c *Client) addOperationReplaceTopicRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplaceTopicRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_SearchIndex.go b/service/iot/api_op_SearchIndex.go index 21f08d2d685..904765f1d5a 100644 --- a/service/iot/api_op_SearchIndex.go +++ b/service/iot/api_op_SearchIndex.go @@ -138,6 +138,9 @@ func (c *Client) addOperationSearchIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_SetDefaultAuthorizer.go b/service/iot/api_op_SetDefaultAuthorizer.go index fec228a85a2..5c592896e7a 100644 --- a/service/iot/api_op_SetDefaultAuthorizer.go +++ b/service/iot/api_op_SetDefaultAuthorizer.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSetDefaultAuthorizerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_SetDefaultPolicyVersion.go b/service/iot/api_op_SetDefaultPolicyVersion.go index 997cf38c9f3..91430ee36c9 100644 --- a/service/iot/api_op_SetDefaultPolicyVersion.go +++ b/service/iot/api_op_SetDefaultPolicyVersion.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_SetLoggingOptions.go b/service/iot/api_op_SetLoggingOptions.go index 15eb8879f9b..d215d7ca5ad 100644 --- a/service/iot/api_op_SetLoggingOptions.go +++ b/service/iot/api_op_SetLoggingOptions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationSetLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLoggingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_SetV2LoggingLevel.go b/service/iot/api_op_SetV2LoggingLevel.go index 74d58c2eea7..57f369d6828 100644 --- a/service/iot/api_op_SetV2LoggingLevel.go +++ b/service/iot/api_op_SetV2LoggingLevel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationSetV2LoggingLevelMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetV2LoggingLevelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_SetV2LoggingOptions.go b/service/iot/api_op_SetV2LoggingOptions.go index 0e8296acd14..cfee3252610 100644 --- a/service/iot/api_op_SetV2LoggingOptions.go +++ b/service/iot/api_op_SetV2LoggingOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationSetV2LoggingOptionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetV2LoggingOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_StartAuditMitigationActionsTask.go b/service/iot/api_op_StartAuditMitigationActionsTask.go index 10881089267..c1111543a40 100644 --- a/service/iot/api_op_StartAuditMitigationActionsTask.go +++ b/service/iot/api_op_StartAuditMitigationActionsTask.go @@ -133,6 +133,9 @@ func (c *Client) addOperationStartAuditMitigationActionsTaskMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartAuditMitigationActionsTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_StartDetectMitigationActionsTask.go b/service/iot/api_op_StartDetectMitigationActionsTask.go index cd0b58f6f53..aa41e3727a8 100644 --- a/service/iot/api_op_StartDetectMitigationActionsTask.go +++ b/service/iot/api_op_StartDetectMitigationActionsTask.go @@ -137,6 +137,9 @@ func (c *Client) addOperationStartDetectMitigationActionsTaskMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartDetectMitigationActionsTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_StartOnDemandAuditTask.go b/service/iot/api_op_StartOnDemandAuditTask.go index ae1862a2c7f..7fc051c976c 100644 --- a/service/iot/api_op_StartOnDemandAuditTask.go +++ b/service/iot/api_op_StartOnDemandAuditTask.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartOnDemandAuditTaskMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartOnDemandAuditTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_StartThingRegistrationTask.go b/service/iot/api_op_StartThingRegistrationTask.go index a5283eda340..d1df5f4f5ea 100644 --- a/service/iot/api_op_StartThingRegistrationTask.go +++ b/service/iot/api_op_StartThingRegistrationTask.go @@ -126,6 +126,9 @@ func (c *Client) addOperationStartThingRegistrationTaskMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartThingRegistrationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_StopThingRegistrationTask.go b/service/iot/api_op_StopThingRegistrationTask.go index 987162be980..a4747234083 100644 --- a/service/iot/api_op_StopThingRegistrationTask.go +++ b/service/iot/api_op_StopThingRegistrationTask.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopThingRegistrationTaskMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopThingRegistrationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_TagResource.go b/service/iot/api_op_TagResource.go index c29a370bb6b..a210d0cead1 100644 --- a/service/iot/api_op_TagResource.go +++ b/service/iot/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_TestAuthorization.go b/service/iot/api_op_TestAuthorization.go index 2e175568c62..6f91f6e9d12 100644 --- a/service/iot/api_op_TestAuthorization.go +++ b/service/iot/api_op_TestAuthorization.go @@ -132,6 +132,9 @@ func (c *Client) addOperationTestAuthorizationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_TestInvokeAuthorizer.go b/service/iot/api_op_TestInvokeAuthorizer.go index 10dd216956b..1ecd993c2f2 100644 --- a/service/iot/api_op_TestInvokeAuthorizer.go +++ b/service/iot/api_op_TestInvokeAuthorizer.go @@ -140,6 +140,9 @@ func (c *Client) addOperationTestInvokeAuthorizerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestInvokeAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_TransferCertificate.go b/service/iot/api_op_TransferCertificate.go index badde0c5ba1..81bbacda2b1 100644 --- a/service/iot/api_op_TransferCertificate.go +++ b/service/iot/api_op_TransferCertificate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationTransferCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTransferCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UntagResource.go b/service/iot/api_op_UntagResource.go index 05f5cb8bda9..001923acdcc 100644 --- a/service/iot/api_op_UntagResource.go +++ b/service/iot/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateAccountAuditConfiguration.go b/service/iot/api_op_UpdateAccountAuditConfiguration.go index 5091d1e89c0..04b7e83ac98 100644 --- a/service/iot/api_op_UpdateAccountAuditConfiguration.go +++ b/service/iot/api_op_UpdateAccountAuditConfiguration.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateAccountAuditConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountAuditConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_UpdateAuditSuppression.go b/service/iot/api_op_UpdateAuditSuppression.go index 76f2aa96e1d..85cb2c8bb46 100644 --- a/service/iot/api_op_UpdateAuditSuppression.go +++ b/service/iot/api_op_UpdateAuditSuppression.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateAuditSuppressionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAuditSuppressionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateAuthorizer.go b/service/iot/api_op_UpdateAuthorizer.go index 7cef6305e5a..2f347e13015 100644 --- a/service/iot/api_op_UpdateAuthorizer.go +++ b/service/iot/api_op_UpdateAuthorizer.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateAuthorizerMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAuthorizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateBillingGroup.go b/service/iot/api_op_UpdateBillingGroup.go index 4bd6f76db25..e8d3a834654 100644 --- a/service/iot/api_op_UpdateBillingGroup.go +++ b/service/iot/api_op_UpdateBillingGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateBillingGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBillingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateCACertificate.go b/service/iot/api_op_UpdateCACertificate.go index 57fa2c534ad..f2260f42c13 100644 --- a/service/iot/api_op_UpdateCACertificate.go +++ b/service/iot/api_op_UpdateCACertificate.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateCACertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCACertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateCertificate.go b/service/iot/api_op_UpdateCertificate.go index bc1d0001ef0..b074b83b76c 100644 --- a/service/iot/api_op_UpdateCertificate.go +++ b/service/iot/api_op_UpdateCertificate.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateCertificateProvider.go b/service/iot/api_op_UpdateCertificateProvider.go index d6e6ba67da8..db4303e48fb 100644 --- a/service/iot/api_op_UpdateCertificateProvider.go +++ b/service/iot/api_op_UpdateCertificateProvider.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateCertificateProviderMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCertificateProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateCustomMetric.go b/service/iot/api_op_UpdateCustomMetric.go index 5273cc09640..d0ed393dab9 100644 --- a/service/iot/api_op_UpdateCustomMetric.go +++ b/service/iot/api_op_UpdateCustomMetric.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateCustomMetricMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateDimension.go b/service/iot/api_op_UpdateDimension.go index 553f2bbe91c..e8ad4d0782a 100644 --- a/service/iot/api_op_UpdateDimension.go +++ b/service/iot/api_op_UpdateDimension.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateDimensionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDimensionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateDomainConfiguration.go b/service/iot/api_op_UpdateDomainConfiguration.go index b50f65b8b01..b0e67b3c7b7 100644 --- a/service/iot/api_op_UpdateDomainConfiguration.go +++ b/service/iot/api_op_UpdateDomainConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateDomainConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateDynamicThingGroup.go b/service/iot/api_op_UpdateDynamicThingGroup.go index 83cfede123c..6df8c197602 100644 --- a/service/iot/api_op_UpdateDynamicThingGroup.go +++ b/service/iot/api_op_UpdateDynamicThingGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateDynamicThingGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDynamicThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateEventConfigurations.go b/service/iot/api_op_UpdateEventConfigurations.go index 61fb4b8bf7b..b507321a00c 100644 --- a/service/iot/api_op_UpdateEventConfigurations.go +++ b/service/iot/api_op_UpdateEventConfigurations.go @@ -104,6 +104,9 @@ func (c *Client) addOperationUpdateEventConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_UpdateFleetMetric.go b/service/iot/api_op_UpdateFleetMetric.go index f7367c95369..9936dc9f420 100644 --- a/service/iot/api_op_UpdateFleetMetric.go +++ b/service/iot/api_op_UpdateFleetMetric.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateFleetMetricMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetMetricValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateIndexingConfiguration.go b/service/iot/api_op_UpdateIndexingConfiguration.go index bbc39623fa4..7183fb36b41 100644 --- a/service/iot/api_op_UpdateIndexingConfiguration.go +++ b/service/iot/api_op_UpdateIndexingConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateIndexingConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIndexingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateJob.go b/service/iot/api_op_UpdateJob.go index f35e7c392d7..22448156271 100644 --- a/service/iot/api_op_UpdateJob.go +++ b/service/iot/api_op_UpdateJob.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateMitigationAction.go b/service/iot/api_op_UpdateMitigationAction.go index e2a4ab37664..f07320ae9ca 100644 --- a/service/iot/api_op_UpdateMitigationAction.go +++ b/service/iot/api_op_UpdateMitigationAction.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateMitigationActionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMitigationActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdatePackage.go b/service/iot/api_op_UpdatePackage.go index d028242c214..aaaef2d5b48 100644 --- a/service/iot/api_op_UpdatePackage.go +++ b/service/iot/api_op_UpdatePackage.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePackageMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_UpdatePackageConfiguration.go b/service/iot/api_op_UpdatePackageConfiguration.go index d655fe53ed7..8a8eef70df9 100644 --- a/service/iot/api_op_UpdatePackageConfiguration.go +++ b/service/iot/api_op_UpdatePackageConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdatePackageConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePackageConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_UpdatePackageVersion.go b/service/iot/api_op_UpdatePackageVersion.go index 3e520d4e945..344dfdaa755 100644 --- a/service/iot/api_op_UpdatePackageVersion.go +++ b/service/iot/api_op_UpdatePackageVersion.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdatePackageVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePackageVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/iot/api_op_UpdateProvisioningTemplate.go b/service/iot/api_op_UpdateProvisioningTemplate.go index 83c7f4da7bb..13c9badb9cc 100644 --- a/service/iot/api_op_UpdateProvisioningTemplate.go +++ b/service/iot/api_op_UpdateProvisioningTemplate.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateProvisioningTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProvisioningTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateRoleAlias.go b/service/iot/api_op_UpdateRoleAlias.go index 1d32bf46081..3c522597670 100644 --- a/service/iot/api_op_UpdateRoleAlias.go +++ b/service/iot/api_op_UpdateRoleAlias.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateRoleAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoleAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateScheduledAudit.go b/service/iot/api_op_UpdateScheduledAudit.go index f122fb29a33..7a5b1ac8635 100644 --- a/service/iot/api_op_UpdateScheduledAudit.go +++ b/service/iot/api_op_UpdateScheduledAudit.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateScheduledAuditMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScheduledAuditValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateSecurityProfile.go b/service/iot/api_op_UpdateSecurityProfile.go index 94282c3b426..dda125c5201 100644 --- a/service/iot/api_op_UpdateSecurityProfile.go +++ b/service/iot/api_op_UpdateSecurityProfile.go @@ -199,6 +199,9 @@ func (c *Client) addOperationUpdateSecurityProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSecurityProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateStream.go b/service/iot/api_op_UpdateStream.go index 7d5354d2dbb..22f14f90bb5 100644 --- a/service/iot/api_op_UpdateStream.go +++ b/service/iot/api_op_UpdateStream.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateThing.go b/service/iot/api_op_UpdateThing.go index f37f1913eca..3b6008f9da4 100644 --- a/service/iot/api_op_UpdateThing.go +++ b/service/iot/api_op_UpdateThing.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateThingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateThingGroup.go b/service/iot/api_op_UpdateThingGroup.go index aa685e1bfba..270cc83f289 100644 --- a/service/iot/api_op_UpdateThingGroup.go +++ b/service/iot/api_op_UpdateThingGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateThingGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_UpdateThingGroupsForThing.go b/service/iot/api_op_UpdateThingGroupsForThing.go index e0b216684fc..ce9b3d02d5e 100644 --- a/service/iot/api_op_UpdateThingGroupsForThing.go +++ b/service/iot/api_op_UpdateThingGroupsForThing.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateThingGroupsForThingMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateThingGroupsForThing(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot/api_op_UpdateTopicRuleDestination.go b/service/iot/api_op_UpdateTopicRuleDestination.go index 8b6dca0f5fa..18c3f248891 100644 --- a/service/iot/api_op_UpdateTopicRuleDestination.go +++ b/service/iot/api_op_UpdateTopicRuleDestination.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateTopicRuleDestinationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTopicRuleDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot/api_op_ValidateSecurityProfileBehaviors.go b/service/iot/api_op_ValidateSecurityProfileBehaviors.go index 6ee2b7f5a97..eec9c3bba7e 100644 --- a/service/iot/api_op_ValidateSecurityProfileBehaviors.go +++ b/service/iot/api_op_ValidateSecurityProfileBehaviors.go @@ -113,6 +113,9 @@ func (c *Client) addOperationValidateSecurityProfileBehaviorsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateSecurityProfileBehaviorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_client.go b/service/iot1clickdevicesservice/api_client.go index 8e750f78639..c185639fe96 100644 --- a/service/iot1clickdevicesservice/api_client.go +++ b/service/iot1clickdevicesservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iot1clickdevicesservice/api_op_ClaimDevicesByClaimCode.go b/service/iot1clickdevicesservice/api_op_ClaimDevicesByClaimCode.go index f6a82d98a5c..5ea9f4c4f0c 100644 --- a/service/iot1clickdevicesservice/api_op_ClaimDevicesByClaimCode.go +++ b/service/iot1clickdevicesservice/api_op_ClaimDevicesByClaimCode.go @@ -110,6 +110,9 @@ func (c *Client) addOperationClaimDevicesByClaimCodeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpClaimDevicesByClaimCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_DescribeDevice.go b/service/iot1clickdevicesservice/api_op_DescribeDevice.go index d90984e0815..8f81016481a 100644 --- a/service/iot1clickdevicesservice/api_op_DescribeDevice.go +++ b/service/iot1clickdevicesservice/api_op_DescribeDevice.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_FinalizeDeviceClaim.go b/service/iot1clickdevicesservice/api_op_FinalizeDeviceClaim.go index a100f07ef24..b65cde10060 100644 --- a/service/iot1clickdevicesservice/api_op_FinalizeDeviceClaim.go +++ b/service/iot1clickdevicesservice/api_op_FinalizeDeviceClaim.go @@ -115,6 +115,9 @@ func (c *Client) addOperationFinalizeDeviceClaimMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFinalizeDeviceClaimValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_GetDeviceMethods.go b/service/iot1clickdevicesservice/api_op_GetDeviceMethods.go index 49fa5ceb5bb..acefb09d8c6 100644 --- a/service/iot1clickdevicesservice/api_op_GetDeviceMethods.go +++ b/service/iot1clickdevicesservice/api_op_GetDeviceMethods.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDeviceMethodsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceMethodsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_InitiateDeviceClaim.go b/service/iot1clickdevicesservice/api_op_InitiateDeviceClaim.go index be136f6aad1..c851095dd7f 100644 --- a/service/iot1clickdevicesservice/api_op_InitiateDeviceClaim.go +++ b/service/iot1clickdevicesservice/api_op_InitiateDeviceClaim.go @@ -109,6 +109,9 @@ func (c *Client) addOperationInitiateDeviceClaimMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInitiateDeviceClaimValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_InvokeDeviceMethod.go b/service/iot1clickdevicesservice/api_op_InvokeDeviceMethod.go index 9695eb402b5..e4520621787 100644 --- a/service/iot1clickdevicesservice/api_op_InvokeDeviceMethod.go +++ b/service/iot1clickdevicesservice/api_op_InvokeDeviceMethod.go @@ -113,6 +113,9 @@ func (c *Client) addOperationInvokeDeviceMethodMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeDeviceMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_ListDeviceEvents.go b/service/iot1clickdevicesservice/api_op_ListDeviceEvents.go index e4fbbdb4ca2..25a0b0a54b2 100644 --- a/service/iot1clickdevicesservice/api_op_ListDeviceEvents.go +++ b/service/iot1clickdevicesservice/api_op_ListDeviceEvents.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListDeviceEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeviceEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_ListDevices.go b/service/iot1clickdevicesservice/api_op_ListDevices.go index b040fee15ea..a17375fabd6 100644 --- a/service/iot1clickdevicesservice/api_op_ListDevices.go +++ b/service/iot1clickdevicesservice/api_op_ListDevices.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevices(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_ListTagsForResource.go b/service/iot1clickdevicesservice/api_op_ListTagsForResource.go index 37d7905ba27..9edbc13db18 100644 --- a/service/iot1clickdevicesservice/api_op_ListTagsForResource.go +++ b/service/iot1clickdevicesservice/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_TagResource.go b/service/iot1clickdevicesservice/api_op_TagResource.go index 84d1391687e..4dcd7b7293b 100644 --- a/service/iot1clickdevicesservice/api_op_TagResource.go +++ b/service/iot1clickdevicesservice/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_UnclaimDevice.go b/service/iot1clickdevicesservice/api_op_UnclaimDevice.go index 0df60fb13c8..127969e95ea 100644 --- a/service/iot1clickdevicesservice/api_op_UnclaimDevice.go +++ b/service/iot1clickdevicesservice/api_op_UnclaimDevice.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUnclaimDeviceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnclaimDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_UntagResource.go b/service/iot1clickdevicesservice/api_op_UntagResource.go index a726ff58a02..a2aaf6885b1 100644 --- a/service/iot1clickdevicesservice/api_op_UntagResource.go +++ b/service/iot1clickdevicesservice/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickdevicesservice/api_op_UpdateDeviceState.go b/service/iot1clickdevicesservice/api_op_UpdateDeviceState.go index 430150fdea0..18d5c9b7d32 100644 --- a/service/iot1clickdevicesservice/api_op_UpdateDeviceState.go +++ b/service/iot1clickdevicesservice/api_op_UpdateDeviceState.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateDeviceStateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_client.go b/service/iot1clickprojects/api_client.go index e0abe1a7b3e..ce42be0cd1b 100644 --- a/service/iot1clickprojects/api_client.go +++ b/service/iot1clickprojects/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iot1clickprojects/api_op_AssociateDeviceWithPlacement.go b/service/iot1clickprojects/api_op_AssociateDeviceWithPlacement.go index 99fd87ef50f..53a9a71e057 100644 --- a/service/iot1clickprojects/api_op_AssociateDeviceWithPlacement.go +++ b/service/iot1clickprojects/api_op_AssociateDeviceWithPlacement.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateDeviceWithPlacementMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDeviceWithPlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_CreatePlacement.go b/service/iot1clickprojects/api_op_CreatePlacement.go index dd6eb07ac4a..a8507e451e7 100644 --- a/service/iot1clickprojects/api_op_CreatePlacement.go +++ b/service/iot1clickprojects/api_op_CreatePlacement.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreatePlacementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_CreateProject.go b/service/iot1clickprojects/api_op_CreateProject.go index 20f2ba99b16..31f609ca9d5 100644 --- a/service/iot1clickprojects/api_op_CreateProject.go +++ b/service/iot1clickprojects/api_op_CreateProject.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_DeletePlacement.go b/service/iot1clickprojects/api_op_DeletePlacement.go index f515beab625..9f86e7d4aed 100644 --- a/service/iot1clickprojects/api_op_DeletePlacement.go +++ b/service/iot1clickprojects/api_op_DeletePlacement.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeletePlacementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_DeleteProject.go b/service/iot1clickprojects/api_op_DeleteProject.go index 8d74cce80fa..bd9dc1ecc92 100644 --- a/service/iot1clickprojects/api_op_DeleteProject.go +++ b/service/iot1clickprojects/api_op_DeleteProject.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_DescribePlacement.go b/service/iot1clickprojects/api_op_DescribePlacement.go index aa5409f58ad..63acb7245c5 100644 --- a/service/iot1clickprojects/api_op_DescribePlacement.go +++ b/service/iot1clickprojects/api_op_DescribePlacement.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribePlacementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_DescribeProject.go b/service/iot1clickprojects/api_op_DescribeProject.go index 0ab16239ff5..b372fd0e799 100644 --- a/service/iot1clickprojects/api_op_DescribeProject.go +++ b/service/iot1clickprojects/api_op_DescribeProject.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_DisassociateDeviceFromPlacement.go b/service/iot1clickprojects/api_op_DisassociateDeviceFromPlacement.go index c96c42863d2..39f681ce20c 100644 --- a/service/iot1clickprojects/api_op_DisassociateDeviceFromPlacement.go +++ b/service/iot1clickprojects/api_op_DisassociateDeviceFromPlacement.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateDeviceFromPlacementMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDeviceFromPlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_GetDevicesInPlacement.go b/service/iot1clickprojects/api_op_GetDevicesInPlacement.go index 6e291fdf6db..2f4561fea55 100644 --- a/service/iot1clickprojects/api_op_GetDevicesInPlacement.go +++ b/service/iot1clickprojects/api_op_GetDevicesInPlacement.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDevicesInPlacementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDevicesInPlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_ListPlacements.go b/service/iot1clickprojects/api_op_ListPlacements.go index d1c6af5f38a..ab19fb065f6 100644 --- a/service/iot1clickprojects/api_op_ListPlacements.go +++ b/service/iot1clickprojects/api_op_ListPlacements.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPlacementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPlacementsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPlacementsMiddlewares(stack *middleware.Stack, return nil } -// ListPlacementsAPIClient is a client that implements the ListPlacements -// operation. -type ListPlacementsAPIClient interface { - ListPlacements(context.Context, *ListPlacementsInput, ...func(*Options)) (*ListPlacementsOutput, error) -} - -var _ ListPlacementsAPIClient = (*Client)(nil) - // ListPlacementsPaginatorOptions is the paginator options for ListPlacements type ListPlacementsPaginatorOptions struct { // The maximum number of results to return per request. If not set, a default @@ -215,6 +210,9 @@ func (p *ListPlacementsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlacements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListPlacementsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPlacementsAPIClient is a client that implements the ListPlacements +// operation. +type ListPlacementsAPIClient interface { + ListPlacements(context.Context, *ListPlacementsInput, ...func(*Options)) (*ListPlacementsOutput, error) +} + +var _ ListPlacementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlacements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot1clickprojects/api_op_ListProjects.go b/service/iot1clickprojects/api_op_ListProjects.go index 472564f2648..cc81df86285 100644 --- a/service/iot1clickprojects/api_op_ListProjects.go +++ b/service/iot1clickprojects/api_op_ListProjects.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of results to return per request. If not set, a default @@ -207,6 +203,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iot1clickprojects/api_op_ListTagsForResource.go b/service/iot1clickprojects/api_op_ListTagsForResource.go index a13f43a3dac..c58c23fbaca 100644 --- a/service/iot1clickprojects/api_op_ListTagsForResource.go +++ b/service/iot1clickprojects/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_TagResource.go b/service/iot1clickprojects/api_op_TagResource.go index 6320aa1928e..536f375fc89 100644 --- a/service/iot1clickprojects/api_op_TagResource.go +++ b/service/iot1clickprojects/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_UntagResource.go b/service/iot1clickprojects/api_op_UntagResource.go index 375c1cb293e..b265e2220f2 100644 --- a/service/iot1clickprojects/api_op_UntagResource.go +++ b/service/iot1clickprojects/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_UpdatePlacement.go b/service/iot1clickprojects/api_op_UpdatePlacement.go index 4dcfbda3a14..2c8fca81aae 100644 --- a/service/iot1clickprojects/api_op_UpdatePlacement.go +++ b/service/iot1clickprojects/api_op_UpdatePlacement.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdatePlacementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePlacementValidationMiddleware(stack); err != nil { return err } diff --git a/service/iot1clickprojects/api_op_UpdateProject.go b/service/iot1clickprojects/api_op_UpdateProject.go index 6b767ab118f..8d5db52cdf9 100644 --- a/service/iot1clickprojects/api_op_UpdateProject.go +++ b/service/iot1clickprojects/api_op_UpdateProject.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_client.go b/service/iotanalytics/api_client.go index 9bd4469da23..ff3fd2f630e 100644 --- a/service/iotanalytics/api_client.go +++ b/service/iotanalytics/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotanalytics/api_op_BatchPutMessage.go b/service/iotanalytics/api_op_BatchPutMessage.go index 7b8713dd90e..31cec90c9b8 100644 --- a/service/iotanalytics/api_op_BatchPutMessage.go +++ b/service/iotanalytics/api_op_BatchPutMessage.go @@ -132,6 +132,9 @@ func (c *Client) addOperationBatchPutMessageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_CancelPipelineReprocessing.go b/service/iotanalytics/api_op_CancelPipelineReprocessing.go index d4baf2b122d..265b3fee0a1 100644 --- a/service/iotanalytics/api_op_CancelPipelineReprocessing.go +++ b/service/iotanalytics/api_op_CancelPipelineReprocessing.go @@ -106,6 +106,9 @@ func (c *Client) addOperationCancelPipelineReprocessingMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelPipelineReprocessingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_CreateChannel.go b/service/iotanalytics/api_op_CreateChannel.go index bfa74eed2b3..3dbc64f36f9 100644 --- a/service/iotanalytics/api_op_CreateChannel.go +++ b/service/iotanalytics/api_op_CreateChannel.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_CreateDataset.go b/service/iotanalytics/api_op_CreateDataset.go index fd65a07df89..6c0a5addd75 100644 --- a/service/iotanalytics/api_op_CreateDataset.go +++ b/service/iotanalytics/api_op_CreateDataset.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_CreateDatasetContent.go b/service/iotanalytics/api_op_CreateDatasetContent.go index 3bc51294194..71f1abdbd06 100644 --- a/service/iotanalytics/api_op_CreateDatasetContent.go +++ b/service/iotanalytics/api_op_CreateDatasetContent.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCreateDatasetContentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_CreateDatastore.go b/service/iotanalytics/api_op_CreateDatastore.go index 4667fc8c29c..b25c32d423b 100644 --- a/service/iotanalytics/api_op_CreateDatastore.go +++ b/service/iotanalytics/api_op_CreateDatastore.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateDatastoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_CreatePipeline.go b/service/iotanalytics/api_op_CreatePipeline.go index 16dcef060ef..90cf1ed4ff9 100644 --- a/service/iotanalytics/api_op_CreatePipeline.go +++ b/service/iotanalytics/api_op_CreatePipeline.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DeleteChannel.go b/service/iotanalytics/api_op_DeleteChannel.go index 38ac73e3b9e..868ee2e4969 100644 --- a/service/iotanalytics/api_op_DeleteChannel.go +++ b/service/iotanalytics/api_op_DeleteChannel.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DeleteDataset.go b/service/iotanalytics/api_op_DeleteDataset.go index e97625d2ccd..cef97ccef51 100644 --- a/service/iotanalytics/api_op_DeleteDataset.go +++ b/service/iotanalytics/api_op_DeleteDataset.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DeleteDatasetContent.go b/service/iotanalytics/api_op_DeleteDatasetContent.go index 1279604f8e7..4d7d6014bd7 100644 --- a/service/iotanalytics/api_op_DeleteDatasetContent.go +++ b/service/iotanalytics/api_op_DeleteDatasetContent.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteDatasetContentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DeleteDatastore.go b/service/iotanalytics/api_op_DeleteDatastore.go index 87ad6287e8c..5e5bcd231b7 100644 --- a/service/iotanalytics/api_op_DeleteDatastore.go +++ b/service/iotanalytics/api_op_DeleteDatastore.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDatastoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DeletePipeline.go b/service/iotanalytics/api_op_DeletePipeline.go index 0c7bc13a16b..dbd8b1cde49 100644 --- a/service/iotanalytics/api_op_DeletePipeline.go +++ b/service/iotanalytics/api_op_DeletePipeline.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DescribeChannel.go b/service/iotanalytics/api_op_DescribeChannel.go index 4fc7835b95c..3c3d95a6071 100644 --- a/service/iotanalytics/api_op_DescribeChannel.go +++ b/service/iotanalytics/api_op_DescribeChannel.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DescribeDataset.go b/service/iotanalytics/api_op_DescribeDataset.go index 048f325a654..dfab20ba526 100644 --- a/service/iotanalytics/api_op_DescribeDataset.go +++ b/service/iotanalytics/api_op_DescribeDataset.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DescribeDatastore.go b/service/iotanalytics/api_op_DescribeDatastore.go index 442dba2b842..bb870eac512 100644 --- a/service/iotanalytics/api_op_DescribeDatastore.go +++ b/service/iotanalytics/api_op_DescribeDatastore.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeDatastoreMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_DescribeLoggingOptions.go b/service/iotanalytics/api_op_DescribeLoggingOptions.go index b7c18282ecd..2f136778294 100644 --- a/service/iotanalytics/api_op_DescribeLoggingOptions.go +++ b/service/iotanalytics/api_op_DescribeLoggingOptions.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDescribeLoggingOptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoggingOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotanalytics/api_op_DescribePipeline.go b/service/iotanalytics/api_op_DescribePipeline.go index 0a9dc36b195..c52289597bf 100644 --- a/service/iotanalytics/api_op_DescribePipeline.go +++ b/service/iotanalytics/api_op_DescribePipeline.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribePipelineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_GetDatasetContent.go b/service/iotanalytics/api_op_GetDatasetContent.go index 72cd5476abe..da179a22cae 100644 --- a/service/iotanalytics/api_op_GetDatasetContent.go +++ b/service/iotanalytics/api_op_GetDatasetContent.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetDatasetContentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDatasetContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_ListChannels.go b/service/iotanalytics/api_op_ListChannels.go index f3307537e70..d963916339e 100644 --- a/service/iotanalytics/api_op_ListChannels.go +++ b/service/iotanalytics/api_op_ListChannels.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -206,6 +202,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotanalytics/api_op_ListDatasetContents.go b/service/iotanalytics/api_op_ListDatasetContents.go index 3163002144d..a1192025a6d 100644 --- a/service/iotanalytics/api_op_ListDatasetContents.go +++ b/service/iotanalytics/api_op_ListDatasetContents.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListDatasetContentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasetContentsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListDatasetContentsMiddlewares(stack *middleware.St return nil } -// ListDatasetContentsAPIClient is a client that implements the -// ListDatasetContents operation. -type ListDatasetContentsAPIClient interface { - ListDatasetContents(context.Context, *ListDatasetContentsInput, ...func(*Options)) (*ListDatasetContentsOutput, error) -} - -var _ ListDatasetContentsAPIClient = (*Client)(nil) - // ListDatasetContentsPaginatorOptions is the paginator options for // ListDatasetContents type ListDatasetContentsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListDatasetContentsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetContents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListDatasetContentsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListDatasetContentsAPIClient is a client that implements the +// ListDatasetContents operation. +type ListDatasetContentsAPIClient interface { + ListDatasetContents(context.Context, *ListDatasetContentsInput, ...func(*Options)) (*ListDatasetContentsOutput, error) +} + +var _ ListDatasetContentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetContents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotanalytics/api_op_ListDatasets.go b/service/iotanalytics/api_op_ListDatasets.go index 01c03776fbf..5d87b6e461a 100644 --- a/service/iotanalytics/api_op_ListDatasets.go +++ b/service/iotanalytics/api_op_ListDatasets.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // The maximum number of results to return in this request. @@ -206,6 +202,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotanalytics/api_op_ListDatastores.go b/service/iotanalytics/api_op_ListDatastores.go index 1cf8de43258..9696ce37b9a 100644 --- a/service/iotanalytics/api_op_ListDatastores.go +++ b/service/iotanalytics/api_op_ListDatastores.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDatastoresMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatastores(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListDatastoresMiddlewares(stack *middleware.Stack, return nil } -// ListDatastoresAPIClient is a client that implements the ListDatastores -// operation. -type ListDatastoresAPIClient interface { - ListDatastores(context.Context, *ListDatastoresInput, ...func(*Options)) (*ListDatastoresOutput, error) -} - -var _ ListDatastoresAPIClient = (*Client)(nil) - // ListDatastoresPaginatorOptions is the paginator options for ListDatastores type ListDatastoresPaginatorOptions struct { // The maximum number of results to return in this request. @@ -207,6 +202,9 @@ func (p *ListDatastoresPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatastores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListDatastoresPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListDatastoresAPIClient is a client that implements the ListDatastores +// operation. +type ListDatastoresAPIClient interface { + ListDatastores(context.Context, *ListDatastoresInput, ...func(*Options)) (*ListDatastoresOutput, error) +} + +var _ ListDatastoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatastores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotanalytics/api_op_ListPipelines.go b/service/iotanalytics/api_op_ListPipelines.go index ed43eb28f4c..43251b658c5 100644 --- a/service/iotanalytics/api_op_ListPipelines.go +++ b/service/iotanalytics/api_op_ListPipelines.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelines(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o return nil } -// ListPipelinesAPIClient is a client that implements the ListPipelines operation. -type ListPipelinesAPIClient interface { - ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) -} - -var _ ListPipelinesAPIClient = (*Client)(nil) - // ListPipelinesPaginatorOptions is the paginator options for ListPipelines type ListPipelinesPaginatorOptions struct { // The maximum number of results to return in this request. @@ -206,6 +202,9 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListPipelinesAPIClient is a client that implements the ListPipelines operation. +type ListPipelinesAPIClient interface { + ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) +} + +var _ ListPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotanalytics/api_op_ListTagsForResource.go b/service/iotanalytics/api_op_ListTagsForResource.go index d8a438a9fae..0ceb2a114ee 100644 --- a/service/iotanalytics/api_op_ListTagsForResource.go +++ b/service/iotanalytics/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_PutLoggingOptions.go b/service/iotanalytics/api_op_PutLoggingOptions.go index 60c4eafe375..8b60e27780b 100644 --- a/service/iotanalytics/api_op_PutLoggingOptions.go +++ b/service/iotanalytics/api_op_PutLoggingOptions.go @@ -107,6 +107,9 @@ func (c *Client) addOperationPutLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLoggingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_RunPipelineActivity.go b/service/iotanalytics/api_op_RunPipelineActivity.go index aea3c1f478a..51244f56066 100644 --- a/service/iotanalytics/api_op_RunPipelineActivity.go +++ b/service/iotanalytics/api_op_RunPipelineActivity.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRunPipelineActivityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRunPipelineActivityValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_SampleChannelData.go b/service/iotanalytics/api_op_SampleChannelData.go index a9f8c2d7320..508104326ef 100644 --- a/service/iotanalytics/api_op_SampleChannelData.go +++ b/service/iotanalytics/api_op_SampleChannelData.go @@ -118,6 +118,9 @@ func (c *Client) addOperationSampleChannelDataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSampleChannelDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_StartPipelineReprocessing.go b/service/iotanalytics/api_op_StartPipelineReprocessing.go index 4ba014515b6..8e38c4d79df 100644 --- a/service/iotanalytics/api_op_StartPipelineReprocessing.go +++ b/service/iotanalytics/api_op_StartPipelineReprocessing.go @@ -125,6 +125,9 @@ func (c *Client) addOperationStartPipelineReprocessingMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartPipelineReprocessingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_TagResource.go b/service/iotanalytics/api_op_TagResource.go index 17c2dfe29d4..2046bf3b0a4 100644 --- a/service/iotanalytics/api_op_TagResource.go +++ b/service/iotanalytics/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_UntagResource.go b/service/iotanalytics/api_op_UntagResource.go index 00284aec7a8..d636361935c 100644 --- a/service/iotanalytics/api_op_UntagResource.go +++ b/service/iotanalytics/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_UpdateChannel.go b/service/iotanalytics/api_op_UpdateChannel.go index be740536436..96aed255655 100644 --- a/service/iotanalytics/api_op_UpdateChannel.go +++ b/service/iotanalytics/api_op_UpdateChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_UpdateDataset.go b/service/iotanalytics/api_op_UpdateDataset.go index 09b728b13fe..6306031de29 100644 --- a/service/iotanalytics/api_op_UpdateDataset.go +++ b/service/iotanalytics/api_op_UpdateDataset.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_UpdateDatastore.go b/service/iotanalytics/api_op_UpdateDatastore.go index 5ee6cb77005..df7ed878fd6 100644 --- a/service/iotanalytics/api_op_UpdateDatastore.go +++ b/service/iotanalytics/api_op_UpdateDatastore.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateDatastoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotanalytics/api_op_UpdatePipeline.go b/service/iotanalytics/api_op_UpdatePipeline.go index ce50825fc7d..4f4e1658285 100644 --- a/service/iotanalytics/api_op_UpdatePipeline.go +++ b/service/iotanalytics/api_op_UpdatePipeline.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdataplane/api_client.go b/service/iotdataplane/api_client.go index 208765863cd..4ff9e37a4c1 100644 --- a/service/iotdataplane/api_client.go +++ b/service/iotdataplane/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotdataplane/api_op_DeleteThingShadow.go b/service/iotdataplane/api_op_DeleteThingShadow.go index 2b331cfa7d8..5e24e40313b 100644 --- a/service/iotdataplane/api_op_DeleteThingShadow.go +++ b/service/iotdataplane/api_op_DeleteThingShadow.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteThingShadowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThingShadowValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdataplane/api_op_GetRetainedMessage.go b/service/iotdataplane/api_op_GetRetainedMessage.go index 9919e9d9e8f..036b547ea2e 100644 --- a/service/iotdataplane/api_op_GetRetainedMessage.go +++ b/service/iotdataplane/api_op_GetRetainedMessage.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetRetainedMessageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRetainedMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdataplane/api_op_GetThingShadow.go b/service/iotdataplane/api_op_GetThingShadow.go index f3f35a1d685..b85a94597c8 100644 --- a/service/iotdataplane/api_op_GetThingShadow.go +++ b/service/iotdataplane/api_op_GetThingShadow.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetThingShadowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetThingShadowValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdataplane/api_op_ListNamedShadowsForThing.go b/service/iotdataplane/api_op_ListNamedShadowsForThing.go index bc65aa05773..e726f5870f1 100644 --- a/service/iotdataplane/api_op_ListNamedShadowsForThing.go +++ b/service/iotdataplane/api_op_ListNamedShadowsForThing.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListNamedShadowsForThingMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNamedShadowsForThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdataplane/api_op_ListRetainedMessages.go b/service/iotdataplane/api_op_ListRetainedMessages.go index cb3aec3c072..2b3193f4496 100644 --- a/service/iotdataplane/api_op_ListRetainedMessages.go +++ b/service/iotdataplane/api_op_ListRetainedMessages.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListRetainedMessagesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRetainedMessages(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListRetainedMessagesMiddlewares(stack *middleware.S return nil } -// ListRetainedMessagesAPIClient is a client that implements the -// ListRetainedMessages operation. -type ListRetainedMessagesAPIClient interface { - ListRetainedMessages(context.Context, *ListRetainedMessagesInput, ...func(*Options)) (*ListRetainedMessagesOutput, error) -} - -var _ ListRetainedMessagesAPIClient = (*Client)(nil) - // ListRetainedMessagesPaginatorOptions is the paginator options for // ListRetainedMessages type ListRetainedMessagesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListRetainedMessagesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRetainedMessages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListRetainedMessagesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListRetainedMessagesAPIClient is a client that implements the +// ListRetainedMessages operation. +type ListRetainedMessagesAPIClient interface { + ListRetainedMessages(context.Context, *ListRetainedMessagesInput, ...func(*Options)) (*ListRetainedMessagesOutput, error) +} + +var _ ListRetainedMessagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRetainedMessages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotdataplane/api_op_Publish.go b/service/iotdataplane/api_op_Publish.go index 4644a0e89bc..c6dc8a372fd 100644 --- a/service/iotdataplane/api_op_Publish.go +++ b/service/iotdataplane/api_op_Publish.go @@ -170,6 +170,9 @@ func (c *Client) addOperationPublishMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdataplane/api_op_UpdateThingShadow.go b/service/iotdataplane/api_op_UpdateThingShadow.go index e9f5bcb3f8a..53a3b206ce9 100644 --- a/service/iotdataplane/api_op_UpdateThingShadow.go +++ b/service/iotdataplane/api_op_UpdateThingShadow.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateThingShadowMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThingShadowValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_client.go b/service/iotdeviceadvisor/api_client.go index 585b5f56a48..eaa55283004 100644 --- a/service/iotdeviceadvisor/api_client.go +++ b/service/iotdeviceadvisor/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go b/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go index 4f222d75b59..8782689ae11 100644 --- a/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateSuiteDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSuiteDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go b/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go index 5b45564649b..4ddeaa21bf1 100644 --- a/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_DeleteSuiteDefinition.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteSuiteDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSuiteDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_GetEndpoint.go b/service/iotdeviceadvisor/api_op_GetEndpoint.go index 1ed4953c40c..a055d96ba98 100644 --- a/service/iotdeviceadvisor/api_op_GetEndpoint.go +++ b/service/iotdeviceadvisor/api_op_GetEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetEndpointMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEndpoint(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go b/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go index ea386f36acd..bd71b4b9dce 100644 --- a/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_GetSuiteDefinition.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetSuiteDefinitionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSuiteDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_GetSuiteRun.go b/service/iotdeviceadvisor/api_op_GetSuiteRun.go index 81abf6f87bb..9bd65d2ea43 100644 --- a/service/iotdeviceadvisor/api_op_GetSuiteRun.go +++ b/service/iotdeviceadvisor/api_op_GetSuiteRun.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetSuiteRunMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSuiteRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go b/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go index e8a15c258e4..bd0184af5e8 100644 --- a/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go +++ b/service/iotdeviceadvisor/api_op_GetSuiteRunReport.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSuiteRunReportMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSuiteRunReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go b/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go index 41872039c65..8bdb32c5ada 100644 --- a/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go +++ b/service/iotdeviceadvisor/api_op_ListSuiteDefinitions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSuiteDefinitionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSuiteDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListSuiteDefinitionsMiddlewares(stack *middleware.S return nil } -// ListSuiteDefinitionsAPIClient is a client that implements the -// ListSuiteDefinitions operation. -type ListSuiteDefinitionsAPIClient interface { - ListSuiteDefinitions(context.Context, *ListSuiteDefinitionsInput, ...func(*Options)) (*ListSuiteDefinitionsOutput, error) -} - -var _ ListSuiteDefinitionsAPIClient = (*Client)(nil) - // ListSuiteDefinitionsPaginatorOptions is the paginator options for // ListSuiteDefinitions type ListSuiteDefinitionsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListSuiteDefinitionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSuiteDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListSuiteDefinitionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSuiteDefinitionsAPIClient is a client that implements the +// ListSuiteDefinitions operation. +type ListSuiteDefinitionsAPIClient interface { + ListSuiteDefinitions(context.Context, *ListSuiteDefinitionsInput, ...func(*Options)) (*ListSuiteDefinitionsOutput, error) +} + +var _ ListSuiteDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSuiteDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotdeviceadvisor/api_op_ListSuiteRuns.go b/service/iotdeviceadvisor/api_op_ListSuiteRuns.go index b534e0a1f18..ac6109570db 100644 --- a/service/iotdeviceadvisor/api_op_ListSuiteRuns.go +++ b/service/iotdeviceadvisor/api_op_ListSuiteRuns.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSuiteRunsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSuiteRuns(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListSuiteRunsMiddlewares(stack *middleware.Stack, o return nil } -// ListSuiteRunsAPIClient is a client that implements the ListSuiteRuns operation. -type ListSuiteRunsAPIClient interface { - ListSuiteRuns(context.Context, *ListSuiteRunsInput, ...func(*Options)) (*ListSuiteRunsOutput, error) -} - -var _ ListSuiteRunsAPIClient = (*Client)(nil) - // ListSuiteRunsPaginatorOptions is the paginator options for ListSuiteRuns type ListSuiteRunsPaginatorOptions struct { // The maximum number of results to return at once. @@ -215,6 +211,9 @@ func (p *ListSuiteRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSuiteRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListSuiteRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListSuiteRunsAPIClient is a client that implements the ListSuiteRuns operation. +type ListSuiteRunsAPIClient interface { + ListSuiteRuns(context.Context, *ListSuiteRunsInput, ...func(*Options)) (*ListSuiteRunsOutput, error) +} + +var _ ListSuiteRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSuiteRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotdeviceadvisor/api_op_ListTagsForResource.go b/service/iotdeviceadvisor/api_op_ListTagsForResource.go index a78a39cf2b9..44f2efb9396 100644 --- a/service/iotdeviceadvisor/api_op_ListTagsForResource.go +++ b/service/iotdeviceadvisor/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_StartSuiteRun.go b/service/iotdeviceadvisor/api_op_StartSuiteRun.go index 1c702d6036e..3abb80300c9 100644 --- a/service/iotdeviceadvisor/api_op_StartSuiteRun.go +++ b/service/iotdeviceadvisor/api_op_StartSuiteRun.go @@ -131,6 +131,9 @@ func (c *Client) addOperationStartSuiteRunMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSuiteRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_StopSuiteRun.go b/service/iotdeviceadvisor/api_op_StopSuiteRun.go index f533a8aed70..2a488596334 100644 --- a/service/iotdeviceadvisor/api_op_StopSuiteRun.go +++ b/service/iotdeviceadvisor/api_op_StopSuiteRun.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStopSuiteRunMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSuiteRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_TagResource.go b/service/iotdeviceadvisor/api_op_TagResource.go index d2d866bb441..50ffb549983 100644 --- a/service/iotdeviceadvisor/api_op_TagResource.go +++ b/service/iotdeviceadvisor/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_UntagResource.go b/service/iotdeviceadvisor/api_op_UntagResource.go index 46126aea6a5..05c812cbef4 100644 --- a/service/iotdeviceadvisor/api_op_UntagResource.go +++ b/service/iotdeviceadvisor/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go b/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go index 9e21129bc62..b035ec2cc69 100644 --- a/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_UpdateSuiteDefinition.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateSuiteDefinitionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSuiteDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_client.go b/service/iotevents/api_client.go index a4f225d9a5f..2a62131e2a2 100644 --- a/service/iotevents/api_client.go +++ b/service/iotevents/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotevents/api_op_CreateAlarmModel.go b/service/iotevents/api_op_CreateAlarmModel.go index 5ed58a26aae..42ad977ca33 100644 --- a/service/iotevents/api_op_CreateAlarmModel.go +++ b/service/iotevents/api_op_CreateAlarmModel.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateAlarmModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAlarmModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_CreateDetectorModel.go b/service/iotevents/api_op_CreateDetectorModel.go index adda7454d8f..c55716cff46 100644 --- a/service/iotevents/api_op_CreateDetectorModel.go +++ b/service/iotevents/api_op_CreateDetectorModel.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateDetectorModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDetectorModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_CreateInput.go b/service/iotevents/api_op_CreateInput.go index 44d0eeaf745..81d23ee9095 100644 --- a/service/iotevents/api_op_CreateInput.go +++ b/service/iotevents/api_op_CreateInput.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateInputMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DeleteAlarmModel.go b/service/iotevents/api_op_DeleteAlarmModel.go index 3998ec03e93..9d5f62a84c2 100644 --- a/service/iotevents/api_op_DeleteAlarmModel.go +++ b/service/iotevents/api_op_DeleteAlarmModel.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAlarmModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAlarmModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DeleteDetectorModel.go b/service/iotevents/api_op_DeleteDetectorModel.go index d05c44871db..a453ad902d2 100644 --- a/service/iotevents/api_op_DeleteDetectorModel.go +++ b/service/iotevents/api_op_DeleteDetectorModel.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteDetectorModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDetectorModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DeleteInput.go b/service/iotevents/api_op_DeleteInput.go index 0263eff8f34..fb5c09b2b19 100644 --- a/service/iotevents/api_op_DeleteInput.go +++ b/service/iotevents/api_op_DeleteInput.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteInputMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DescribeAlarmModel.go b/service/iotevents/api_op_DescribeAlarmModel.go index c9d760bf0a1..4d08971123b 100644 --- a/service/iotevents/api_op_DescribeAlarmModel.go +++ b/service/iotevents/api_op_DescribeAlarmModel.go @@ -173,6 +173,9 @@ func (c *Client) addOperationDescribeAlarmModelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlarmModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DescribeDetectorModel.go b/service/iotevents/api_op_DescribeDetectorModel.go index 2efd7f2bfc4..998db2f51cd 100644 --- a/service/iotevents/api_op_DescribeDetectorModel.go +++ b/service/iotevents/api_op_DescribeDetectorModel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeDetectorModelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDetectorModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DescribeDetectorModelAnalysis.go b/service/iotevents/api_op_DescribeDetectorModelAnalysis.go index 5fa6b85b590..b9cb430977f 100644 --- a/service/iotevents/api_op_DescribeDetectorModelAnalysis.go +++ b/service/iotevents/api_op_DescribeDetectorModelAnalysis.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDetectorModelAnalysisMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDetectorModelAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DescribeInput.go b/service/iotevents/api_op_DescribeInput.go index f727c5b655c..efb15782076 100644 --- a/service/iotevents/api_op_DescribeInput.go +++ b/service/iotevents/api_op_DescribeInput.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeInputMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_DescribeLoggingOptions.go b/service/iotevents/api_op_DescribeLoggingOptions.go index 8e3125d4bdf..e72dd571267 100644 --- a/service/iotevents/api_op_DescribeLoggingOptions.go +++ b/service/iotevents/api_op_DescribeLoggingOptions.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDescribeLoggingOptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoggingOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotevents/api_op_GetDetectorModelAnalysisResults.go b/service/iotevents/api_op_GetDetectorModelAnalysisResults.go index ab1665799c7..50fff6d025b 100644 --- a/service/iotevents/api_op_GetDetectorModelAnalysisResults.go +++ b/service/iotevents/api_op_GetDetectorModelAnalysisResults.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetDetectorModelAnalysisResultsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDetectorModelAnalysisResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_ListAlarmModelVersions.go b/service/iotevents/api_op_ListAlarmModelVersions.go index eef1ec5545b..9ad41e6857c 100644 --- a/service/iotevents/api_op_ListAlarmModelVersions.go +++ b/service/iotevents/api_op_ListAlarmModelVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAlarmModelVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAlarmModelVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_ListAlarmModels.go b/service/iotevents/api_op_ListAlarmModels.go index 9cb8abd4f2f..4ada64aa35b 100644 --- a/service/iotevents/api_op_ListAlarmModels.go +++ b/service/iotevents/api_op_ListAlarmModels.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListAlarmModelsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAlarmModels(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotevents/api_op_ListDetectorModelVersions.go b/service/iotevents/api_op_ListDetectorModelVersions.go index d47c856acbc..1a65bc24610 100644 --- a/service/iotevents/api_op_ListDetectorModelVersions.go +++ b/service/iotevents/api_op_ListDetectorModelVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDetectorModelVersionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDetectorModelVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_ListDetectorModels.go b/service/iotevents/api_op_ListDetectorModels.go index 184d12e984d..c4f9f32d76e 100644 --- a/service/iotevents/api_op_ListDetectorModels.go +++ b/service/iotevents/api_op_ListDetectorModels.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListDetectorModelsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDetectorModels(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotevents/api_op_ListInputRoutings.go b/service/iotevents/api_op_ListInputRoutings.go index ed2c6177727..4b24b934364 100644 --- a/service/iotevents/api_op_ListInputRoutings.go +++ b/service/iotevents/api_op_ListInputRoutings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListInputRoutingsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInputRoutingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_ListInputs.go b/service/iotevents/api_op_ListInputs.go index bf02acf2b47..d849218ade9 100644 --- a/service/iotevents/api_op_ListInputs.go +++ b/service/iotevents/api_op_ListInputs.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListInputsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInputs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotevents/api_op_ListTagsForResource.go b/service/iotevents/api_op_ListTagsForResource.go index 9619d3d6b67..30fdd502301 100644 --- a/service/iotevents/api_op_ListTagsForResource.go +++ b/service/iotevents/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_PutLoggingOptions.go b/service/iotevents/api_op_PutLoggingOptions.go index 1e6ac865560..ea3f99db175 100644 --- a/service/iotevents/api_op_PutLoggingOptions.go +++ b/service/iotevents/api_op_PutLoggingOptions.go @@ -107,6 +107,9 @@ func (c *Client) addOperationPutLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLoggingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_StartDetectorModelAnalysis.go b/service/iotevents/api_op_StartDetectorModelAnalysis.go index 19a1978a4d8..2a4577f81a1 100644 --- a/service/iotevents/api_op_StartDetectorModelAnalysis.go +++ b/service/iotevents/api_op_StartDetectorModelAnalysis.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStartDetectorModelAnalysisMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDetectorModelAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_TagResource.go b/service/iotevents/api_op_TagResource.go index fa9c387592e..9e16dbd5f09 100644 --- a/service/iotevents/api_op_TagResource.go +++ b/service/iotevents/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_UntagResource.go b/service/iotevents/api_op_UntagResource.go index 13a5510f6cf..fc9108e9d54 100644 --- a/service/iotevents/api_op_UntagResource.go +++ b/service/iotevents/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_UpdateAlarmModel.go b/service/iotevents/api_op_UpdateAlarmModel.go index 6db8965dfaf..eb3654349e7 100644 --- a/service/iotevents/api_op_UpdateAlarmModel.go +++ b/service/iotevents/api_op_UpdateAlarmModel.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdateAlarmModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAlarmModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_UpdateDetectorModel.go b/service/iotevents/api_op_UpdateDetectorModel.go index 3762b97b9c8..40c0ed48fb4 100644 --- a/service/iotevents/api_op_UpdateDetectorModel.go +++ b/service/iotevents/api_op_UpdateDetectorModel.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateDetectorModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDetectorModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotevents/api_op_UpdateInput.go b/service/iotevents/api_op_UpdateInput.go index 3695d2edbda..94eaa9026a3 100644 --- a/service/iotevents/api_op_UpdateInput.go +++ b/service/iotevents/api_op_UpdateInput.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateInputMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_client.go b/service/ioteventsdata/api_client.go index 3a90b8aa459..f84d36728db 100644 --- a/service/ioteventsdata/api_client.go +++ b/service/ioteventsdata/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ioteventsdata/api_op_BatchAcknowledgeAlarm.go b/service/ioteventsdata/api_op_BatchAcknowledgeAlarm.go index 3d1eb81cd44..8b37be65c35 100644 --- a/service/ioteventsdata/api_op_BatchAcknowledgeAlarm.go +++ b/service/ioteventsdata/api_op_BatchAcknowledgeAlarm.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchAcknowledgeAlarmMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAcknowledgeAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchDeleteDetector.go b/service/ioteventsdata/api_op_BatchDeleteDetector.go index de7a5fe1d2f..f353428c53f 100644 --- a/service/ioteventsdata/api_op_BatchDeleteDetector.go +++ b/service/ioteventsdata/api_op_BatchDeleteDetector.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchDeleteDetectorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchDisableAlarm.go b/service/ioteventsdata/api_op_BatchDisableAlarm.go index 02982738b0d..735d6a7f313 100644 --- a/service/ioteventsdata/api_op_BatchDisableAlarm.go +++ b/service/ioteventsdata/api_op_BatchDisableAlarm.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchDisableAlarmMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisableAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchEnableAlarm.go b/service/ioteventsdata/api_op_BatchEnableAlarm.go index 1bb5cd25ec3..40f22b6db14 100644 --- a/service/ioteventsdata/api_op_BatchEnableAlarm.go +++ b/service/ioteventsdata/api_op_BatchEnableAlarm.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchEnableAlarmMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchEnableAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchPutMessage.go b/service/ioteventsdata/api_op_BatchPutMessage.go index b5a9f9a7ec0..bd726439c90 100644 --- a/service/ioteventsdata/api_op_BatchPutMessage.go +++ b/service/ioteventsdata/api_op_BatchPutMessage.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchPutMessageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchResetAlarm.go b/service/ioteventsdata/api_op_BatchResetAlarm.go index 4b3b030f17f..4e4059a2d86 100644 --- a/service/ioteventsdata/api_op_BatchResetAlarm.go +++ b/service/ioteventsdata/api_op_BatchResetAlarm.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchResetAlarmMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchResetAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchSnoozeAlarm.go b/service/ioteventsdata/api_op_BatchSnoozeAlarm.go index 0222769e31c..bdee18009e5 100644 --- a/service/ioteventsdata/api_op_BatchSnoozeAlarm.go +++ b/service/ioteventsdata/api_op_BatchSnoozeAlarm.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchSnoozeAlarmMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchSnoozeAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_BatchUpdateDetector.go b/service/ioteventsdata/api_op_BatchUpdateDetector.go index e4c53c1ae68..1f62f27cf1f 100644 --- a/service/ioteventsdata/api_op_BatchUpdateDetector.go +++ b/service/ioteventsdata/api_op_BatchUpdateDetector.go @@ -108,6 +108,9 @@ func (c *Client) addOperationBatchUpdateDetectorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_DescribeAlarm.go b/service/ioteventsdata/api_op_DescribeAlarm.go index ebb38d38aca..1506eae0709 100644 --- a/service/ioteventsdata/api_op_DescribeAlarm.go +++ b/service/ioteventsdata/api_op_DescribeAlarm.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeAlarmMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_DescribeDetector.go b/service/ioteventsdata/api_op_DescribeDetector.go index 9316f4ec3e6..4fd57ea31ed 100644 --- a/service/ioteventsdata/api_op_DescribeDetector.go +++ b/service/ioteventsdata/api_op_DescribeDetector.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeDetectorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_ListAlarms.go b/service/ioteventsdata/api_op_ListAlarms.go index 5ad3b0ce150..2c46ec70ad9 100644 --- a/service/ioteventsdata/api_op_ListAlarms.go +++ b/service/ioteventsdata/api_op_ListAlarms.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAlarmsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAlarmsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ioteventsdata/api_op_ListDetectors.go b/service/ioteventsdata/api_op_ListDetectors.go index ac7061eb1e3..64c0dc4fbb8 100644 --- a/service/ioteventsdata/api_op_ListDetectors.go +++ b/service/ioteventsdata/api_op_ListDetectors.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDetectorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDetectorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleethub/api_client.go b/service/iotfleethub/api_client.go index 6622569c22f..f3695360e85 100644 --- a/service/iotfleethub/api_client.go +++ b/service/iotfleethub/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/iotfleethub/api_op_CreateApplication.go b/service/iotfleethub/api_op_CreateApplication.go index 715527020a3..41a10f2a3bc 100644 --- a/service/iotfleethub/api_op_CreateApplication.go +++ b/service/iotfleethub/api_op_CreateApplication.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/iotfleethub/api_op_DeleteApplication.go b/service/iotfleethub/api_op_DeleteApplication.go index 4e4a017bb97..8a1dd261e3e 100644 --- a/service/iotfleethub/api_op_DeleteApplication.go +++ b/service/iotfleethub/api_op_DeleteApplication.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/iotfleethub/api_op_DescribeApplication.go b/service/iotfleethub/api_op_DescribeApplication.go index b413be28047..8e3047cbd71 100644 --- a/service/iotfleethub/api_op_DescribeApplication.go +++ b/service/iotfleethub/api_op_DescribeApplication.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleethub/api_op_ListApplications.go b/service/iotfleethub/api_op_ListApplications.go index 30a456e4755..f728dbf077c 100644 --- a/service/iotfleethub/api_op_ListApplications.go +++ b/service/iotfleethub/api_op_ListApplications.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -130,14 +133,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -189,6 +184,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -208,6 +206,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleethub/api_op_ListTagsForResource.go b/service/iotfleethub/api_op_ListTagsForResource.go index 21f60db052d..cdfc6c2c8f3 100644 --- a/service/iotfleethub/api_op_ListTagsForResource.go +++ b/service/iotfleethub/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleethub/api_op_TagResource.go b/service/iotfleethub/api_op_TagResource.go index 8fec651c558..adcfa72fab7 100644 --- a/service/iotfleethub/api_op_TagResource.go +++ b/service/iotfleethub/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleethub/api_op_UntagResource.go b/service/iotfleethub/api_op_UntagResource.go index 2ce82a6b43c..c2be801a250 100644 --- a/service/iotfleethub/api_op_UntagResource.go +++ b/service/iotfleethub/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleethub/api_op_UpdateApplication.go b/service/iotfleethub/api_op_UpdateApplication.go index a8d54e24c6f..40a70863a88 100644 --- a/service/iotfleethub/api_op_UpdateApplication.go +++ b/service/iotfleethub/api_op_UpdateApplication.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/iotfleetwise/api_client.go b/service/iotfleetwise/api_client.go index 8a69dff53ee..75930507a9f 100644 --- a/service/iotfleetwise/api_client.go +++ b/service/iotfleetwise/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotfleetwise/api_op_AssociateVehicleFleet.go b/service/iotfleetwise/api_op_AssociateVehicleFleet.go index 300d41a4eeb..53bf19249b5 100644 --- a/service/iotfleetwise/api_op_AssociateVehicleFleet.go +++ b/service/iotfleetwise/api_op_AssociateVehicleFleet.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateVehicleFleetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateVehicleFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_BatchCreateVehicle.go b/service/iotfleetwise/api_op_BatchCreateVehicle.go index b51f38552a2..12a00d3460d 100644 --- a/service/iotfleetwise/api_op_BatchCreateVehicle.go +++ b/service/iotfleetwise/api_op_BatchCreateVehicle.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchCreateVehicleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateVehicleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_BatchUpdateVehicle.go b/service/iotfleetwise/api_op_BatchUpdateVehicle.go index e68843a7d12..869c62532b2 100644 --- a/service/iotfleetwise/api_op_BatchUpdateVehicle.go +++ b/service/iotfleetwise/api_op_BatchUpdateVehicle.go @@ -121,6 +121,9 @@ func (c *Client) addOperationBatchUpdateVehicleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateVehicleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_CreateCampaign.go b/service/iotfleetwise/api_op_CreateCampaign.go index 85898013c92..097db5ad296 100644 --- a/service/iotfleetwise/api_op_CreateCampaign.go +++ b/service/iotfleetwise/api_op_CreateCampaign.go @@ -218,6 +218,9 @@ func (c *Client) addOperationCreateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_CreateDecoderManifest.go b/service/iotfleetwise/api_op_CreateDecoderManifest.go index d77f926661c..c7a83d2079c 100644 --- a/service/iotfleetwise/api_op_CreateDecoderManifest.go +++ b/service/iotfleetwise/api_op_CreateDecoderManifest.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateDecoderManifestMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDecoderManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_CreateFleet.go b/service/iotfleetwise/api_op_CreateFleet.go index d1277f52067..865d6330b5d 100644 --- a/service/iotfleetwise/api_op_CreateFleet.go +++ b/service/iotfleetwise/api_op_CreateFleet.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_CreateModelManifest.go b/service/iotfleetwise/api_op_CreateModelManifest.go index 6c71ea6205a..8e2c42c28d6 100644 --- a/service/iotfleetwise/api_op_CreateModelManifest.go +++ b/service/iotfleetwise/api_op_CreateModelManifest.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateModelManifestMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_CreateSignalCatalog.go b/service/iotfleetwise/api_op_CreateSignalCatalog.go index 2a6417d321a..7de7ebb6caf 100644 --- a/service/iotfleetwise/api_op_CreateSignalCatalog.go +++ b/service/iotfleetwise/api_op_CreateSignalCatalog.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateSignalCatalogMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSignalCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_CreateVehicle.go b/service/iotfleetwise/api_op_CreateVehicle.go index 65d77ac9618..0051cfbfe86 100644 --- a/service/iotfleetwise/api_op_CreateVehicle.go +++ b/service/iotfleetwise/api_op_CreateVehicle.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateVehicleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVehicleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DeleteCampaign.go b/service/iotfleetwise/api_op_DeleteCampaign.go index 46e95c40aeb..0f87d4d9431 100644 --- a/service/iotfleetwise/api_op_DeleteCampaign.go +++ b/service/iotfleetwise/api_op_DeleteCampaign.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DeleteDecoderManifest.go b/service/iotfleetwise/api_op_DeleteDecoderManifest.go index ded50cfa361..329f1764504 100644 --- a/service/iotfleetwise/api_op_DeleteDecoderManifest.go +++ b/service/iotfleetwise/api_op_DeleteDecoderManifest.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteDecoderManifestMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDecoderManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DeleteFleet.go b/service/iotfleetwise/api_op_DeleteFleet.go index 7832c1987f6..26a57f2f2ef 100644 --- a/service/iotfleetwise/api_op_DeleteFleet.go +++ b/service/iotfleetwise/api_op_DeleteFleet.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DeleteModelManifest.go b/service/iotfleetwise/api_op_DeleteModelManifest.go index 1da776641ad..e9d8aceb214 100644 --- a/service/iotfleetwise/api_op_DeleteModelManifest.go +++ b/service/iotfleetwise/api_op_DeleteModelManifest.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteModelManifestMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DeleteSignalCatalog.go b/service/iotfleetwise/api_op_DeleteSignalCatalog.go index 20d0dd64fc6..f9cc82a2be5 100644 --- a/service/iotfleetwise/api_op_DeleteSignalCatalog.go +++ b/service/iotfleetwise/api_op_DeleteSignalCatalog.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteSignalCatalogMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSignalCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DeleteVehicle.go b/service/iotfleetwise/api_op_DeleteVehicle.go index cae17385fd0..2f8b8b1645d 100644 --- a/service/iotfleetwise/api_op_DeleteVehicle.go +++ b/service/iotfleetwise/api_op_DeleteVehicle.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteVehicleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVehicleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_DisassociateVehicleFleet.go b/service/iotfleetwise/api_op_DisassociateVehicleFleet.go index 67ef722f22a..0f84779658d 100644 --- a/service/iotfleetwise/api_op_DisassociateVehicleFleet.go +++ b/service/iotfleetwise/api_op_DisassociateVehicleFleet.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisassociateVehicleFleetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateVehicleFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetCampaign.go b/service/iotfleetwise/api_op_GetCampaign.go index 91ea4fab4e8..0cf0902d897 100644 --- a/service/iotfleetwise/api_op_GetCampaign.go +++ b/service/iotfleetwise/api_op_GetCampaign.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetCampaignMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetDecoderManifest.go b/service/iotfleetwise/api_op_GetDecoderManifest.go index 3710d8f89a1..e2933d9904c 100644 --- a/service/iotfleetwise/api_op_GetDecoderManifest.go +++ b/service/iotfleetwise/api_op_GetDecoderManifest.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetDecoderManifestMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDecoderManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetEncryptionConfiguration.go b/service/iotfleetwise/api_op_GetEncryptionConfiguration.go index 418fe2f9052..4d9db451500 100644 --- a/service/iotfleetwise/api_op_GetEncryptionConfiguration.go +++ b/service/iotfleetwise/api_op_GetEncryptionConfiguration.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetEncryptionConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEncryptionConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetFleet.go b/service/iotfleetwise/api_op_GetFleet.go index c3526988dc8..f270401a238 100644 --- a/service/iotfleetwise/api_op_GetFleet.go +++ b/service/iotfleetwise/api_op_GetFleet.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetFleetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetLoggingOptions.go b/service/iotfleetwise/api_op_GetLoggingOptions.go index dfdb4eb96b9..302aaedd694 100644 --- a/service/iotfleetwise/api_op_GetLoggingOptions.go +++ b/service/iotfleetwise/api_op_GetLoggingOptions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoggingOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetModelManifest.go b/service/iotfleetwise/api_op_GetModelManifest.go index b095b744a7c..d0724954161 100644 --- a/service/iotfleetwise/api_op_GetModelManifest.go +++ b/service/iotfleetwise/api_op_GetModelManifest.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetModelManifestMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetRegisterAccountStatus.go b/service/iotfleetwise/api_op_GetRegisterAccountStatus.go index f2176923524..3eda6bb73d5 100644 --- a/service/iotfleetwise/api_op_GetRegisterAccountStatus.go +++ b/service/iotfleetwise/api_op_GetRegisterAccountStatus.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetRegisterAccountStatusMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegisterAccountStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetSignalCatalog.go b/service/iotfleetwise/api_op_GetSignalCatalog.go index 398cf16e152..3222a182698 100644 --- a/service/iotfleetwise/api_op_GetSignalCatalog.go +++ b/service/iotfleetwise/api_op_GetSignalCatalog.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetSignalCatalogMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSignalCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetVehicle.go b/service/iotfleetwise/api_op_GetVehicle.go index 6bdaf1b064d..7d451ac2f80 100644 --- a/service/iotfleetwise/api_op_GetVehicle.go +++ b/service/iotfleetwise/api_op_GetVehicle.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetVehicleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVehicleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_GetVehicleStatus.go b/service/iotfleetwise/api_op_GetVehicleStatus.go index f73c8ac2151..85b32584d5e 100644 --- a/service/iotfleetwise/api_op_GetVehicleStatus.go +++ b/service/iotfleetwise/api_op_GetVehicleStatus.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetVehicleStatusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVehicleStatusValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetVehicleStatusMiddlewares(stack *middleware.Stack return nil } -// GetVehicleStatusAPIClient is a client that implements the GetVehicleStatus -// operation. -type GetVehicleStatusAPIClient interface { - GetVehicleStatus(context.Context, *GetVehicleStatusInput, ...func(*Options)) (*GetVehicleStatusOutput, error) -} - -var _ GetVehicleStatusAPIClient = (*Client)(nil) - // GetVehicleStatusPaginatorOptions is the paginator options for GetVehicleStatus type GetVehicleStatusPaginatorOptions struct { // The maximum number of items to return, between 1 and 100, inclusive. @@ -219,6 +214,9 @@ func (p *GetVehicleStatusPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetVehicleStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *GetVehicleStatusPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetVehicleStatusAPIClient is a client that implements the GetVehicleStatus +// operation. +type GetVehicleStatusAPIClient interface { + GetVehicleStatus(context.Context, *GetVehicleStatusInput, ...func(*Options)) (*GetVehicleStatusOutput, error) +} + +var _ GetVehicleStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetVehicleStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ImportDecoderManifest.go b/service/iotfleetwise/api_op_ImportDecoderManifest.go index 4c30e0767f5..5582a3f6a67 100644 --- a/service/iotfleetwise/api_op_ImportDecoderManifest.go +++ b/service/iotfleetwise/api_op_ImportDecoderManifest.go @@ -120,6 +120,9 @@ func (c *Client) addOperationImportDecoderManifestMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportDecoderManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_ImportSignalCatalog.go b/service/iotfleetwise/api_op_ImportSignalCatalog.go index e8747dab5c9..0cff7c841f5 100644 --- a/service/iotfleetwise/api_op_ImportSignalCatalog.go +++ b/service/iotfleetwise/api_op_ImportSignalCatalog.go @@ -125,6 +125,9 @@ func (c *Client) addOperationImportSignalCatalogMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportSignalCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_ListCampaigns.go b/service/iotfleetwise/api_op_ListCampaigns.go index 9d38f38aa91..f184b6990d2 100644 --- a/service/iotfleetwise/api_op_ListCampaigns.go +++ b/service/iotfleetwise/api_op_ListCampaigns.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListCampaignsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCampaigns(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListCampaignsMiddlewares(stack *middleware.Stack, o return nil } -// ListCampaignsAPIClient is a client that implements the ListCampaigns operation. -type ListCampaignsAPIClient interface { - ListCampaigns(context.Context, *ListCampaignsInput, ...func(*Options)) (*ListCampaignsOutput, error) -} - -var _ ListCampaignsAPIClient = (*Client)(nil) - // ListCampaignsPaginatorOptions is the paginator options for ListCampaigns type ListCampaignsPaginatorOptions struct { // The maximum number of items to return, between 1 and 100, inclusive. @@ -216,6 +212,9 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCampaigns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListCampaignsAPIClient is a client that implements the ListCampaigns operation. +type ListCampaignsAPIClient interface { + ListCampaigns(context.Context, *ListCampaignsInput, ...func(*Options)) (*ListCampaignsOutput, error) +} + +var _ ListCampaignsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCampaigns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListDecoderManifestNetworkInterfaces.go b/service/iotfleetwise/api_op_ListDecoderManifestNetworkInterfaces.go index 5b4b5dbd02f..ca6588c038a 100644 --- a/service/iotfleetwise/api_op_ListDecoderManifestNetworkInterfaces.go +++ b/service/iotfleetwise/api_op_ListDecoderManifestNetworkInterfaces.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListDecoderManifestNetworkInterfacesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDecoderManifestNetworkInterfacesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListDecoderManifestNetworkInterfacesMiddlewares(sta return nil } -// ListDecoderManifestNetworkInterfacesAPIClient is a client that implements the -// ListDecoderManifestNetworkInterfaces operation. -type ListDecoderManifestNetworkInterfacesAPIClient interface { - ListDecoderManifestNetworkInterfaces(context.Context, *ListDecoderManifestNetworkInterfacesInput, ...func(*Options)) (*ListDecoderManifestNetworkInterfacesOutput, error) -} - -var _ ListDecoderManifestNetworkInterfacesAPIClient = (*Client)(nil) - // ListDecoderManifestNetworkInterfacesPaginatorOptions is the paginator options // for ListDecoderManifestNetworkInterfaces type ListDecoderManifestNetworkInterfacesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListDecoderManifestNetworkInterfacesPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDecoderManifestNetworkInterfaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListDecoderManifestNetworkInterfacesPaginator) NextPage(ctx context.Con return result, nil } +// ListDecoderManifestNetworkInterfacesAPIClient is a client that implements the +// ListDecoderManifestNetworkInterfaces operation. +type ListDecoderManifestNetworkInterfacesAPIClient interface { + ListDecoderManifestNetworkInterfaces(context.Context, *ListDecoderManifestNetworkInterfacesInput, ...func(*Options)) (*ListDecoderManifestNetworkInterfacesOutput, error) +} + +var _ ListDecoderManifestNetworkInterfacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDecoderManifestNetworkInterfaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListDecoderManifestSignals.go b/service/iotfleetwise/api_op_ListDecoderManifestSignals.go index 9f23f92fd36..a22462f4ce8 100644 --- a/service/iotfleetwise/api_op_ListDecoderManifestSignals.go +++ b/service/iotfleetwise/api_op_ListDecoderManifestSignals.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListDecoderManifestSignalsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDecoderManifestSignalsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListDecoderManifestSignalsMiddlewares(stack *middle return nil } -// ListDecoderManifestSignalsAPIClient is a client that implements the -// ListDecoderManifestSignals operation. -type ListDecoderManifestSignalsAPIClient interface { - ListDecoderManifestSignals(context.Context, *ListDecoderManifestSignalsInput, ...func(*Options)) (*ListDecoderManifestSignalsOutput, error) -} - -var _ ListDecoderManifestSignalsAPIClient = (*Client)(nil) - // ListDecoderManifestSignalsPaginatorOptions is the paginator options for // ListDecoderManifestSignals type ListDecoderManifestSignalsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListDecoderManifestSignalsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDecoderManifestSignals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListDecoderManifestSignalsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListDecoderManifestSignalsAPIClient is a client that implements the +// ListDecoderManifestSignals operation. +type ListDecoderManifestSignalsAPIClient interface { + ListDecoderManifestSignals(context.Context, *ListDecoderManifestSignalsInput, ...func(*Options)) (*ListDecoderManifestSignalsOutput, error) +} + +var _ ListDecoderManifestSignalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDecoderManifestSignals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListDecoderManifests.go b/service/iotfleetwise/api_op_ListDecoderManifests.go index 89cbd823cdc..e14de1f34e3 100644 --- a/service/iotfleetwise/api_op_ListDecoderManifests.go +++ b/service/iotfleetwise/api_op_ListDecoderManifests.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListDecoderManifestsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDecoderManifests(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListDecoderManifestsMiddlewares(stack *middleware.S return nil } -// ListDecoderManifestsAPIClient is a client that implements the -// ListDecoderManifests operation. -type ListDecoderManifestsAPIClient interface { - ListDecoderManifests(context.Context, *ListDecoderManifestsInput, ...func(*Options)) (*ListDecoderManifestsOutput, error) -} - -var _ ListDecoderManifestsAPIClient = (*Client)(nil) - // ListDecoderManifestsPaginatorOptions is the paginator options for // ListDecoderManifests type ListDecoderManifestsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListDecoderManifestsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDecoderManifests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListDecoderManifestsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDecoderManifestsAPIClient is a client that implements the +// ListDecoderManifests operation. +type ListDecoderManifestsAPIClient interface { + ListDecoderManifests(context.Context, *ListDecoderManifestsInput, ...func(*Options)) (*ListDecoderManifestsOutput, error) +} + +var _ ListDecoderManifestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDecoderManifests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListFleets.go b/service/iotfleetwise/api_op_ListFleets.go index cb894b4bf36..e3769b070d8 100644 --- a/service/iotfleetwise/api_op_ListFleets.go +++ b/service/iotfleetwise/api_op_ListFleets.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleets(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListFleetsAPIClient is a client that implements the ListFleets operation. -type ListFleetsAPIClient interface { - ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) -} - -var _ ListFleetsAPIClient = (*Client)(nil) - // ListFleetsPaginatorOptions is the paginator options for ListFleets type ListFleetsPaginatorOptions struct { // The maximum number of items to return, between 1 and 100, inclusive. @@ -213,6 +209,9 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListFleetsForVehicle.go b/service/iotfleetwise/api_op_ListFleetsForVehicle.go index 70cfb92a42d..8294497a366 100644 --- a/service/iotfleetwise/api_op_ListFleetsForVehicle.go +++ b/service/iotfleetwise/api_op_ListFleetsForVehicle.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListFleetsForVehicleMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFleetsForVehicleValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListFleetsForVehicleMiddlewares(stack *middleware.S return nil } -// ListFleetsForVehicleAPIClient is a client that implements the -// ListFleetsForVehicle operation. -type ListFleetsForVehicleAPIClient interface { - ListFleetsForVehicle(context.Context, *ListFleetsForVehicleInput, ...func(*Options)) (*ListFleetsForVehicleOutput, error) -} - -var _ ListFleetsForVehicleAPIClient = (*Client)(nil) - // ListFleetsForVehiclePaginatorOptions is the paginator options for // ListFleetsForVehicle type ListFleetsForVehiclePaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListFleetsForVehiclePaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleetsForVehicle(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListFleetsForVehiclePaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListFleetsForVehicleAPIClient is a client that implements the +// ListFleetsForVehicle operation. +type ListFleetsForVehicleAPIClient interface { + ListFleetsForVehicle(context.Context, *ListFleetsForVehicleInput, ...func(*Options)) (*ListFleetsForVehicleOutput, error) +} + +var _ ListFleetsForVehicleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleetsForVehicle(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListModelManifestNodes.go b/service/iotfleetwise/api_op_ListModelManifestNodes.go index 88f673acc0b..769e1fa4df3 100644 --- a/service/iotfleetwise/api_op_ListModelManifestNodes.go +++ b/service/iotfleetwise/api_op_ListModelManifestNodes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListModelManifestNodesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelManifestNodesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListModelManifestNodesMiddlewares(stack *middleware return nil } -// ListModelManifestNodesAPIClient is a client that implements the -// ListModelManifestNodes operation. -type ListModelManifestNodesAPIClient interface { - ListModelManifestNodes(context.Context, *ListModelManifestNodesInput, ...func(*Options)) (*ListModelManifestNodesOutput, error) -} - -var _ ListModelManifestNodesAPIClient = (*Client)(nil) - // ListModelManifestNodesPaginatorOptions is the paginator options for // ListModelManifestNodes type ListModelManifestNodesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListModelManifestNodesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelManifestNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListModelManifestNodesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListModelManifestNodesAPIClient is a client that implements the +// ListModelManifestNodes operation. +type ListModelManifestNodesAPIClient interface { + ListModelManifestNodes(context.Context, *ListModelManifestNodesInput, ...func(*Options)) (*ListModelManifestNodesOutput, error) +} + +var _ ListModelManifestNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelManifestNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListModelManifests.go b/service/iotfleetwise/api_op_ListModelManifests.go index e528a609f14..96bca68d04b 100644 --- a/service/iotfleetwise/api_op_ListModelManifests.go +++ b/service/iotfleetwise/api_op_ListModelManifests.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListModelManifestsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelManifests(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListModelManifestsMiddlewares(stack *middleware.Sta return nil } -// ListModelManifestsAPIClient is a client that implements the ListModelManifests -// operation. -type ListModelManifestsAPIClient interface { - ListModelManifests(context.Context, *ListModelManifestsInput, ...func(*Options)) (*ListModelManifestsOutput, error) -} - -var _ ListModelManifestsAPIClient = (*Client)(nil) - // ListModelManifestsPaginatorOptions is the paginator options for // ListModelManifests type ListModelManifestsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListModelManifestsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelManifests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListModelManifestsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListModelManifestsAPIClient is a client that implements the ListModelManifests +// operation. +type ListModelManifestsAPIClient interface { + ListModelManifests(context.Context, *ListModelManifestsInput, ...func(*Options)) (*ListModelManifestsOutput, error) +} + +var _ ListModelManifestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelManifests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListSignalCatalogNodes.go b/service/iotfleetwise/api_op_ListSignalCatalogNodes.go index 422f2710f81..8fa1473bf1d 100644 --- a/service/iotfleetwise/api_op_ListSignalCatalogNodes.go +++ b/service/iotfleetwise/api_op_ListSignalCatalogNodes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListSignalCatalogNodesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSignalCatalogNodesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListSignalCatalogNodesMiddlewares(stack *middleware return nil } -// ListSignalCatalogNodesAPIClient is a client that implements the -// ListSignalCatalogNodes operation. -type ListSignalCatalogNodesAPIClient interface { - ListSignalCatalogNodes(context.Context, *ListSignalCatalogNodesInput, ...func(*Options)) (*ListSignalCatalogNodesOutput, error) -} - -var _ ListSignalCatalogNodesAPIClient = (*Client)(nil) - // ListSignalCatalogNodesPaginatorOptions is the paginator options for // ListSignalCatalogNodes type ListSignalCatalogNodesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListSignalCatalogNodesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSignalCatalogNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListSignalCatalogNodesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSignalCatalogNodesAPIClient is a client that implements the +// ListSignalCatalogNodes operation. +type ListSignalCatalogNodesAPIClient interface { + ListSignalCatalogNodes(context.Context, *ListSignalCatalogNodesInput, ...func(*Options)) (*ListSignalCatalogNodesOutput, error) +} + +var _ ListSignalCatalogNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSignalCatalogNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListSignalCatalogs.go b/service/iotfleetwise/api_op_ListSignalCatalogs.go index 4a33dca07cf..6c407a84719 100644 --- a/service/iotfleetwise/api_op_ListSignalCatalogs.go +++ b/service/iotfleetwise/api_op_ListSignalCatalogs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListSignalCatalogsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSignalCatalogs(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListSignalCatalogsMiddlewares(stack *middleware.Sta return nil } -// ListSignalCatalogsAPIClient is a client that implements the ListSignalCatalogs -// operation. -type ListSignalCatalogsAPIClient interface { - ListSignalCatalogs(context.Context, *ListSignalCatalogsInput, ...func(*Options)) (*ListSignalCatalogsOutput, error) -} - -var _ ListSignalCatalogsAPIClient = (*Client)(nil) - // ListSignalCatalogsPaginatorOptions is the paginator options for // ListSignalCatalogs type ListSignalCatalogsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListSignalCatalogsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSignalCatalogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSignalCatalogsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSignalCatalogsAPIClient is a client that implements the ListSignalCatalogs +// operation. +type ListSignalCatalogsAPIClient interface { + ListSignalCatalogs(context.Context, *ListSignalCatalogsInput, ...func(*Options)) (*ListSignalCatalogsOutput, error) +} + +var _ ListSignalCatalogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSignalCatalogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListTagsForResource.go b/service/iotfleetwise/api_op_ListTagsForResource.go index 0922ab20c9b..dd7d1370c85 100644 --- a/service/iotfleetwise/api_op_ListTagsForResource.go +++ b/service/iotfleetwise/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_ListVehicles.go b/service/iotfleetwise/api_op_ListVehicles.go index 4f00066d1ce..4553e9f0812 100644 --- a/service/iotfleetwise/api_op_ListVehicles.go +++ b/service/iotfleetwise/api_op_ListVehicles.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListVehiclesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVehicles(options.Region), middleware.Before); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListVehiclesMiddlewares(stack *middleware.Stack, op return nil } -// ListVehiclesAPIClient is a client that implements the ListVehicles operation. -type ListVehiclesAPIClient interface { - ListVehicles(context.Context, *ListVehiclesInput, ...func(*Options)) (*ListVehiclesOutput, error) -} - -var _ ListVehiclesAPIClient = (*Client)(nil) - // ListVehiclesPaginatorOptions is the paginator options for ListVehicles type ListVehiclesPaginatorOptions struct { // The maximum number of items to return, between 1 and 100, inclusive. @@ -226,6 +222,9 @@ func (p *ListVehiclesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVehicles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListVehiclesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListVehiclesAPIClient is a client that implements the ListVehicles operation. +type ListVehiclesAPIClient interface { + ListVehicles(context.Context, *ListVehiclesInput, ...func(*Options)) (*ListVehiclesOutput, error) +} + +var _ ListVehiclesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVehicles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_ListVehiclesInFleet.go b/service/iotfleetwise/api_op_ListVehiclesInFleet.go index 96ffddae28e..ec52f898a20 100644 --- a/service/iotfleetwise/api_op_ListVehiclesInFleet.go +++ b/service/iotfleetwise/api_op_ListVehiclesInFleet.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListVehiclesInFleetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVehiclesInFleetValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListVehiclesInFleetMiddlewares(stack *middleware.St return nil } -// ListVehiclesInFleetAPIClient is a client that implements the -// ListVehiclesInFleet operation. -type ListVehiclesInFleetAPIClient interface { - ListVehiclesInFleet(context.Context, *ListVehiclesInFleetInput, ...func(*Options)) (*ListVehiclesInFleetOutput, error) -} - -var _ ListVehiclesInFleetAPIClient = (*Client)(nil) - // ListVehiclesInFleetPaginatorOptions is the paginator options for // ListVehiclesInFleet type ListVehiclesInFleetPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListVehiclesInFleetPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVehiclesInFleet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListVehiclesInFleetPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListVehiclesInFleetAPIClient is a client that implements the +// ListVehiclesInFleet operation. +type ListVehiclesInFleetAPIClient interface { + ListVehiclesInFleet(context.Context, *ListVehiclesInFleetInput, ...func(*Options)) (*ListVehiclesInFleetOutput, error) +} + +var _ ListVehiclesInFleetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVehiclesInFleet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotfleetwise/api_op_PutEncryptionConfiguration.go b/service/iotfleetwise/api_op_PutEncryptionConfiguration.go index 8113832b103..009842bb151 100644 --- a/service/iotfleetwise/api_op_PutEncryptionConfiguration.go +++ b/service/iotfleetwise/api_op_PutEncryptionConfiguration.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPutEncryptionConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEncryptionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_PutLoggingOptions.go b/service/iotfleetwise/api_op_PutLoggingOptions.go index 3a361b412c4..6a202565d54 100644 --- a/service/iotfleetwise/api_op_PutLoggingOptions.go +++ b/service/iotfleetwise/api_op_PutLoggingOptions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPutLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLoggingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_RegisterAccount.go b/service/iotfleetwise/api_op_RegisterAccount.go index c8674cf355f..92d876eea31 100644 --- a/service/iotfleetwise/api_op_RegisterAccount.go +++ b/service/iotfleetwise/api_op_RegisterAccount.go @@ -170,6 +170,9 @@ func (c *Client) addOperationRegisterAccountMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_TagResource.go b/service/iotfleetwise/api_op_TagResource.go index 42fe7cb60f6..d8aa6a7302a 100644 --- a/service/iotfleetwise/api_op_TagResource.go +++ b/service/iotfleetwise/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UntagResource.go b/service/iotfleetwise/api_op_UntagResource.go index 8d5c352dbf3..76d224dd9b3 100644 --- a/service/iotfleetwise/api_op_UntagResource.go +++ b/service/iotfleetwise/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UpdateCampaign.go b/service/iotfleetwise/api_op_UpdateCampaign.go index eda1cb8e60e..8a64e866d95 100644 --- a/service/iotfleetwise/api_op_UpdateCampaign.go +++ b/service/iotfleetwise/api_op_UpdateCampaign.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UpdateDecoderManifest.go b/service/iotfleetwise/api_op_UpdateDecoderManifest.go index 8e8c47a93ac..9caee8a6450 100644 --- a/service/iotfleetwise/api_op_UpdateDecoderManifest.go +++ b/service/iotfleetwise/api_op_UpdateDecoderManifest.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateDecoderManifestMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDecoderManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UpdateFleet.go b/service/iotfleetwise/api_op_UpdateFleet.go index 35c9802ec1e..f1f5fbd49d4 100644 --- a/service/iotfleetwise/api_op_UpdateFleet.go +++ b/service/iotfleetwise/api_op_UpdateFleet.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UpdateModelManifest.go b/service/iotfleetwise/api_op_UpdateModelManifest.go index 42790bd554b..1a0f027dd63 100644 --- a/service/iotfleetwise/api_op_UpdateModelManifest.go +++ b/service/iotfleetwise/api_op_UpdateModelManifest.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateModelManifestMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UpdateSignalCatalog.go b/service/iotfleetwise/api_op_UpdateSignalCatalog.go index e24e5318fb4..9df07bbf340 100644 --- a/service/iotfleetwise/api_op_UpdateSignalCatalog.go +++ b/service/iotfleetwise/api_op_UpdateSignalCatalog.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSignalCatalogMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSignalCatalogValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotfleetwise/api_op_UpdateVehicle.go b/service/iotfleetwise/api_op_UpdateVehicle.go index 78a186b64ee..fe8974f58a7 100644 --- a/service/iotfleetwise/api_op_UpdateVehicle.go +++ b/service/iotfleetwise/api_op_UpdateVehicle.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateVehicleMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVehicleValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotjobsdataplane/api_client.go b/service/iotjobsdataplane/api_client.go index 1b7e65331e2..5cc3c38faae 100644 --- a/service/iotjobsdataplane/api_client.go +++ b/service/iotjobsdataplane/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotjobsdataplane/api_op_DescribeJobExecution.go b/service/iotjobsdataplane/api_op_DescribeJobExecution.go index 4283b35a86d..8b41284d0d1 100644 --- a/service/iotjobsdataplane/api_op_DescribeJobExecution.go +++ b/service/iotjobsdataplane/api_op_DescribeJobExecution.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeJobExecutionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotjobsdataplane/api_op_GetPendingJobExecutions.go b/service/iotjobsdataplane/api_op_GetPendingJobExecutions.go index 8d95f55eb8e..bb68e0bba51 100644 --- a/service/iotjobsdataplane/api_op_GetPendingJobExecutions.go +++ b/service/iotjobsdataplane/api_op_GetPendingJobExecutions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetPendingJobExecutionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPendingJobExecutionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotjobsdataplane/api_op_StartNextPendingJobExecution.go b/service/iotjobsdataplane/api_op_StartNextPendingJobExecution.go index 6927839be23..e189221f24a 100644 --- a/service/iotjobsdataplane/api_op_StartNextPendingJobExecution.go +++ b/service/iotjobsdataplane/api_op_StartNextPendingJobExecution.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStartNextPendingJobExecutionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartNextPendingJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotjobsdataplane/api_op_UpdateJobExecution.go b/service/iotjobsdataplane/api_op_UpdateJobExecution.go index c7420382586..2942f25e99a 100644 --- a/service/iotjobsdataplane/api_op_UpdateJobExecution.go +++ b/service/iotjobsdataplane/api_op_UpdateJobExecution.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateJobExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_client.go b/service/iotsecuretunneling/api_client.go index 66d08f2037e..fcf0cd1b6ba 100644 --- a/service/iotsecuretunneling/api_client.go +++ b/service/iotsecuretunneling/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotsecuretunneling/api_op_CloseTunnel.go b/service/iotsecuretunneling/api_op_CloseTunnel.go index bb1826cd55d..f0c88b8f89a 100644 --- a/service/iotsecuretunneling/api_op_CloseTunnel.go +++ b/service/iotsecuretunneling/api_op_CloseTunnel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCloseTunnelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloseTunnelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_op_DescribeTunnel.go b/service/iotsecuretunneling/api_op_DescribeTunnel.go index 9cb42162ea4..8b30782db56 100644 --- a/service/iotsecuretunneling/api_op_DescribeTunnel.go +++ b/service/iotsecuretunneling/api_op_DescribeTunnel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeTunnelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTunnelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_op_ListTagsForResource.go b/service/iotsecuretunneling/api_op_ListTagsForResource.go index e5707340b9f..bd357940bf9 100644 --- a/service/iotsecuretunneling/api_op_ListTagsForResource.go +++ b/service/iotsecuretunneling/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_op_ListTunnels.go b/service/iotsecuretunneling/api_op_ListTunnels.go index b498e59e055..4e97829780b 100644 --- a/service/iotsecuretunneling/api_op_ListTunnels.go +++ b/service/iotsecuretunneling/api_op_ListTunnels.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTunnelsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTunnels(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListTunnelsMiddlewares(stack *middleware.Stack, opt return nil } -// ListTunnelsAPIClient is a client that implements the ListTunnels operation. -type ListTunnelsAPIClient interface { - ListTunnels(context.Context, *ListTunnelsInput, ...func(*Options)) (*ListTunnelsOutput, error) -} - -var _ ListTunnelsAPIClient = (*Client)(nil) - // ListTunnelsPaginatorOptions is the paginator options for ListTunnels type ListTunnelsPaginatorOptions struct { // The maximum number of results to return at once. @@ -212,6 +208,9 @@ func (p *ListTunnelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTunnels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListTunnelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListTunnelsAPIClient is a client that implements the ListTunnels operation. +type ListTunnelsAPIClient interface { + ListTunnels(context.Context, *ListTunnelsInput, ...func(*Options)) (*ListTunnelsOutput, error) +} + +var _ ListTunnelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTunnels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsecuretunneling/api_op_OpenTunnel.go b/service/iotsecuretunneling/api_op_OpenTunnel.go index 28bffd349cc..378da518502 100644 --- a/service/iotsecuretunneling/api_op_OpenTunnel.go +++ b/service/iotsecuretunneling/api_op_OpenTunnel.go @@ -128,6 +128,9 @@ func (c *Client) addOperationOpenTunnelMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpOpenTunnelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_op_RotateTunnelAccessToken.go b/service/iotsecuretunneling/api_op_RotateTunnelAccessToken.go index 64b764ba60f..51445eaccc8 100644 --- a/service/iotsecuretunneling/api_op_RotateTunnelAccessToken.go +++ b/service/iotsecuretunneling/api_op_RotateTunnelAccessToken.go @@ -133,6 +133,9 @@ func (c *Client) addOperationRotateTunnelAccessTokenMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRotateTunnelAccessTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_op_TagResource.go b/service/iotsecuretunneling/api_op_TagResource.go index efb9ce2fcc6..066837ab9d4 100644 --- a/service/iotsecuretunneling/api_op_TagResource.go +++ b/service/iotsecuretunneling/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsecuretunneling/api_op_UntagResource.go b/service/iotsecuretunneling/api_op_UntagResource.go index 00100520486..7c62133a723 100644 --- a/service/iotsecuretunneling/api_op_UntagResource.go +++ b/service/iotsecuretunneling/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_client.go b/service/iotsitewise/api_client.go index 5868a7bef95..6f64ad10646 100644 --- a/service/iotsitewise/api_client.go +++ b/service/iotsitewise/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/iotsitewise/api_op_AssociateAssets.go b/service/iotsitewise/api_op_AssociateAssets.go index 94bb295b017..4fe27590ec3 100644 --- a/service/iotsitewise/api_op_AssociateAssets.go +++ b/service/iotsitewise/api_op_AssociateAssets.go @@ -135,6 +135,9 @@ func (c *Client) addOperationAssociateAssetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateAssetsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go b/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go index 97ffd3ce55c..34f3664bb11 100644 --- a/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go +++ b/service/iotsitewise/api_op_AssociateTimeSeriesToAssetProperty.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAssociateTimeSeriesToAssetPropertyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateTimeSeriesToAssetPropertyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_BatchAssociateProjectAssets.go b/service/iotsitewise/api_op_BatchAssociateProjectAssets.go index 299fe7b47d6..7252b4572d2 100644 --- a/service/iotsitewise/api_op_BatchAssociateProjectAssets.go +++ b/service/iotsitewise/api_op_BatchAssociateProjectAssets.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchAssociateProjectAssetsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchAssociateProjectAssetsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_BatchDisassociateProjectAssets.go b/service/iotsitewise/api_op_BatchDisassociateProjectAssets.go index 6cc9d773eec..0508ae1b920 100644 --- a/service/iotsitewise/api_op_BatchDisassociateProjectAssets.go +++ b/service/iotsitewise/api_op_BatchDisassociateProjectAssets.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchDisassociateProjectAssetsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchDisassociateProjectAssetsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_BatchGetAssetPropertyAggregates.go b/service/iotsitewise/api_op_BatchGetAssetPropertyAggregates.go index b1edbd45e65..49341364207 100644 --- a/service/iotsitewise/api_op_BatchGetAssetPropertyAggregates.go +++ b/service/iotsitewise/api_op_BatchGetAssetPropertyAggregates.go @@ -143,6 +143,9 @@ func (c *Client) addOperationBatchGetAssetPropertyAggregatesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware(stack); err != nil { return err } @@ -170,41 +173,6 @@ func (c *Client) addOperationBatchGetAssetPropertyAggregatesMiddlewares(stack *m return nil } -type endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware struct { -} - -func (*endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// BatchGetAssetPropertyAggregatesAPIClient is a client that implements the -// BatchGetAssetPropertyAggregates operation. -type BatchGetAssetPropertyAggregatesAPIClient interface { - BatchGetAssetPropertyAggregates(context.Context, *BatchGetAssetPropertyAggregatesInput, ...func(*Options)) (*BatchGetAssetPropertyAggregatesOutput, error) -} - -var _ BatchGetAssetPropertyAggregatesAPIClient = (*Client)(nil) - // BatchGetAssetPropertyAggregatesPaginatorOptions is the paginator options for // BatchGetAssetPropertyAggregates type BatchGetAssetPropertyAggregatesPaginatorOptions struct { @@ -277,6 +245,9 @@ func (p *BatchGetAssetPropertyAggregatesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.BatchGetAssetPropertyAggregates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -296,6 +267,41 @@ func (p *BatchGetAssetPropertyAggregatesPaginator) NextPage(ctx context.Context, return result, nil } +type endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware struct { +} + +func (*endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opBatchGetAssetPropertyAggregatesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// BatchGetAssetPropertyAggregatesAPIClient is a client that implements the +// BatchGetAssetPropertyAggregates operation. +type BatchGetAssetPropertyAggregatesAPIClient interface { + BatchGetAssetPropertyAggregates(context.Context, *BatchGetAssetPropertyAggregatesInput, ...func(*Options)) (*BatchGetAssetPropertyAggregatesOutput, error) +} + +var _ BatchGetAssetPropertyAggregatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opBatchGetAssetPropertyAggregates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go b/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go index c63f017becc..266fde20657 100644 --- a/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go +++ b/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go @@ -134,6 +134,9 @@ func (c *Client) addOperationBatchGetAssetPropertyValueMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchGetAssetPropertyValueMiddleware(stack); err != nil { return err } @@ -161,41 +164,6 @@ func (c *Client) addOperationBatchGetAssetPropertyValueMiddlewares(stack *middle return nil } -type endpointPrefix_opBatchGetAssetPropertyValueMiddleware struct { -} - -func (*endpointPrefix_opBatchGetAssetPropertyValueMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchGetAssetPropertyValueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opBatchGetAssetPropertyValueMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opBatchGetAssetPropertyValueMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// BatchGetAssetPropertyValueAPIClient is a client that implements the -// BatchGetAssetPropertyValue operation. -type BatchGetAssetPropertyValueAPIClient interface { - BatchGetAssetPropertyValue(context.Context, *BatchGetAssetPropertyValueInput, ...func(*Options)) (*BatchGetAssetPropertyValueOutput, error) -} - -var _ BatchGetAssetPropertyValueAPIClient = (*Client)(nil) - // BatchGetAssetPropertyValuePaginatorOptions is the paginator options for // BatchGetAssetPropertyValue type BatchGetAssetPropertyValuePaginatorOptions struct { @@ -250,6 +218,9 @@ func (p *BatchGetAssetPropertyValuePaginator) NextPage(ctx context.Context, optF params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.BatchGetAssetPropertyValue(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +240,41 @@ func (p *BatchGetAssetPropertyValuePaginator) NextPage(ctx context.Context, optF return result, nil } +type endpointPrefix_opBatchGetAssetPropertyValueMiddleware struct { +} + +func (*endpointPrefix_opBatchGetAssetPropertyValueMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opBatchGetAssetPropertyValueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opBatchGetAssetPropertyValueMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opBatchGetAssetPropertyValueMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// BatchGetAssetPropertyValueAPIClient is a client that implements the +// BatchGetAssetPropertyValue operation. +type BatchGetAssetPropertyValueAPIClient interface { + BatchGetAssetPropertyValue(context.Context, *BatchGetAssetPropertyValueInput, ...func(*Options)) (*BatchGetAssetPropertyValueOutput, error) +} + +var _ BatchGetAssetPropertyValueAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opBatchGetAssetPropertyValue(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_BatchGetAssetPropertyValueHistory.go b/service/iotsitewise/api_op_BatchGetAssetPropertyValueHistory.go index df04316f457..07e8488e61a 100644 --- a/service/iotsitewise/api_op_BatchGetAssetPropertyValueHistory.go +++ b/service/iotsitewise/api_op_BatchGetAssetPropertyValueHistory.go @@ -143,6 +143,9 @@ func (c *Client) addOperationBatchGetAssetPropertyValueHistoryMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware(stack); err != nil { return err } @@ -170,41 +173,6 @@ func (c *Client) addOperationBatchGetAssetPropertyValueHistoryMiddlewares(stack return nil } -type endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware struct { -} - -func (*endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// BatchGetAssetPropertyValueHistoryAPIClient is a client that implements the -// BatchGetAssetPropertyValueHistory operation. -type BatchGetAssetPropertyValueHistoryAPIClient interface { - BatchGetAssetPropertyValueHistory(context.Context, *BatchGetAssetPropertyValueHistoryInput, ...func(*Options)) (*BatchGetAssetPropertyValueHistoryOutput, error) -} - -var _ BatchGetAssetPropertyValueHistoryAPIClient = (*Client)(nil) - // BatchGetAssetPropertyValueHistoryPaginatorOptions is the paginator options for // BatchGetAssetPropertyValueHistory type BatchGetAssetPropertyValueHistoryPaginatorOptions struct { @@ -277,6 +245,9 @@ func (p *BatchGetAssetPropertyValueHistoryPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.BatchGetAssetPropertyValueHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -296,6 +267,41 @@ func (p *BatchGetAssetPropertyValueHistoryPaginator) NextPage(ctx context.Contex return result, nil } +type endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware struct { +} + +func (*endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opBatchGetAssetPropertyValueHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// BatchGetAssetPropertyValueHistoryAPIClient is a client that implements the +// BatchGetAssetPropertyValueHistory operation. +type BatchGetAssetPropertyValueHistoryAPIClient interface { + BatchGetAssetPropertyValueHistory(context.Context, *BatchGetAssetPropertyValueHistoryInput, ...func(*Options)) (*BatchGetAssetPropertyValueHistoryOutput, error) +} + +var _ BatchGetAssetPropertyValueHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opBatchGetAssetPropertyValueHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_BatchPutAssetPropertyValue.go b/service/iotsitewise/api_op_BatchPutAssetPropertyValue.go index 7650c3999d4..ff5627a15d6 100644 --- a/service/iotsitewise/api_op_BatchPutAssetPropertyValue.go +++ b/service/iotsitewise/api_op_BatchPutAssetPropertyValue.go @@ -136,6 +136,9 @@ func (c *Client) addOperationBatchPutAssetPropertyValueMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchPutAssetPropertyValueMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateAccessPolicy.go b/service/iotsitewise/api_op_CreateAccessPolicy.go index 3619f43472f..247dbc23ea3 100644 --- a/service/iotsitewise/api_op_CreateAccessPolicy.go +++ b/service/iotsitewise/api_op_CreateAccessPolicy.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateAccessPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAccessPolicyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateAsset.go b/service/iotsitewise/api_op_CreateAsset.go index a78f7b721fe..fbbe30b7e52 100644 --- a/service/iotsitewise/api_op_CreateAsset.go +++ b/service/iotsitewise/api_op_CreateAsset.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAssetMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateAssetModel.go b/service/iotsitewise/api_op_CreateAssetModel.go index 5f939c16cdd..5a163fa4908 100644 --- a/service/iotsitewise/api_op_CreateAssetModel.go +++ b/service/iotsitewise/api_op_CreateAssetModel.go @@ -209,6 +209,9 @@ func (c *Client) addOperationCreateAssetModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAssetModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go b/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go index 70d75915b50..5c5f9d49e17 100644 --- a/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_CreateAssetModelCompositeModel.go @@ -190,6 +190,9 @@ func (c *Client) addOperationCreateAssetModelCompositeModelMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAssetModelCompositeModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateBulkImportJob.go b/service/iotsitewise/api_op_CreateBulkImportJob.go index c9b60ae5844..bb944e5ff0f 100644 --- a/service/iotsitewise/api_op_CreateBulkImportJob.go +++ b/service/iotsitewise/api_op_CreateBulkImportJob.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateBulkImportJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateBulkImportJobMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateDashboard.go b/service/iotsitewise/api_op_CreateDashboard.go index d7e0eee47a1..84460a34a20 100644 --- a/service/iotsitewise/api_op_CreateDashboard.go +++ b/service/iotsitewise/api_op_CreateDashboard.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateDashboardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateDashboardMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateGateway.go b/service/iotsitewise/api_op_CreateGateway.go index b63913e9fde..40b3ed210f9 100644 --- a/service/iotsitewise/api_op_CreateGateway.go +++ b/service/iotsitewise/api_op_CreateGateway.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateGatewayMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreatePortal.go b/service/iotsitewise/api_op_CreatePortal.go index e7f0aac8ffc..1392b0938d0 100644 --- a/service/iotsitewise/api_op_CreatePortal.go +++ b/service/iotsitewise/api_op_CreatePortal.go @@ -212,6 +212,9 @@ func (c *Client) addOperationCreatePortalMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreatePortalMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_CreateProject.go b/service/iotsitewise/api_op_CreateProject.go index 209ebec975e..75d0d20a3c9 100644 --- a/service/iotsitewise/api_op_CreateProject.go +++ b/service/iotsitewise/api_op_CreateProject.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateProjectMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteAccessPolicy.go b/service/iotsitewise/api_op_DeleteAccessPolicy.go index 9b3d5add8f0..779b1f71e6b 100644 --- a/service/iotsitewise/api_op_DeleteAccessPolicy.go +++ b/service/iotsitewise/api_op_DeleteAccessPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAccessPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAccessPolicyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteAsset.go b/service/iotsitewise/api_op_DeleteAsset.go index 187a6c77965..b63836e8d01 100644 --- a/service/iotsitewise/api_op_DeleteAsset.go +++ b/service/iotsitewise/api_op_DeleteAsset.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAssetMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteAssetModel.go b/service/iotsitewise/api_op_DeleteAssetModel.go index 81500f9578c..c0508c5f157 100644 --- a/service/iotsitewise/api_op_DeleteAssetModel.go +++ b/service/iotsitewise/api_op_DeleteAssetModel.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteAssetModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAssetModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go b/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go index a5ae7add260..71095191850 100644 --- a/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_DeleteAssetModelCompositeModel.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteAssetModelCompositeModelMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAssetModelCompositeModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteDashboard.go b/service/iotsitewise/api_op_DeleteDashboard.go index da21b58bbbe..277dd2d8f5f 100644 --- a/service/iotsitewise/api_op_DeleteDashboard.go +++ b/service/iotsitewise/api_op_DeleteDashboard.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDashboardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteDashboardMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteGateway.go b/service/iotsitewise/api_op_DeleteGateway.go index e663bdc75dd..34071c2b871 100644 --- a/service/iotsitewise/api_op_DeleteGateway.go +++ b/service/iotsitewise/api_op_DeleteGateway.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteGatewayMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeletePortal.go b/service/iotsitewise/api_op_DeletePortal.go index fbccb616c81..b71263c4aab 100644 --- a/service/iotsitewise/api_op_DeletePortal.go +++ b/service/iotsitewise/api_op_DeletePortal.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePortalMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeletePortalMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteProject.go b/service/iotsitewise/api_op_DeleteProject.go index adb297bce2a..5e2a6d3bb85 100644 --- a/service/iotsitewise/api_op_DeleteProject.go +++ b/service/iotsitewise/api_op_DeleteProject.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteProjectMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DeleteTimeSeries.go b/service/iotsitewise/api_op_DeleteTimeSeries.go index d68fb9c4c64..f5c2c81966e 100644 --- a/service/iotsitewise/api_op_DeleteTimeSeries.go +++ b/service/iotsitewise/api_op_DeleteTimeSeries.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteTimeSeriesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteTimeSeriesMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeAccessPolicy.go b/service/iotsitewise/api_op_DescribeAccessPolicy.go index cb24df7dc28..e9eb6ef68a4 100644 --- a/service/iotsitewise/api_op_DescribeAccessPolicy.go +++ b/service/iotsitewise/api_op_DescribeAccessPolicy.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeAccessPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAccessPolicyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeAction.go b/service/iotsitewise/api_op_DescribeAction.go index 5489abc23e3..5daef51c793 100644 --- a/service/iotsitewise/api_op_DescribeAction.go +++ b/service/iotsitewise/api_op_DescribeAction.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeActionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeActionMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeAsset.go b/service/iotsitewise/api_op_DescribeAsset.go index 7df8279dde2..46a3483701a 100644 --- a/service/iotsitewise/api_op_DescribeAsset.go +++ b/service/iotsitewise/api_op_DescribeAsset.go @@ -180,6 +180,9 @@ func (c *Client) addOperationDescribeAssetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAssetMiddleware(stack); err != nil { return err } @@ -207,40 +210,6 @@ func (c *Client) addOperationDescribeAssetMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opDescribeAssetMiddleware struct { -} - -func (*endpointPrefix_opDescribeAssetMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeAssetMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeAssetMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeAssetMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// DescribeAssetAPIClient is a client that implements the DescribeAsset operation. -type DescribeAssetAPIClient interface { - DescribeAsset(context.Context, *DescribeAssetInput, ...func(*Options)) (*DescribeAssetOutput, error) -} - -var _ DescribeAssetAPIClient = (*Client)(nil) - // AssetActiveWaiterOptions are waiter options for AssetActiveWaiter type AssetActiveWaiterOptions struct { @@ -355,7 +324,13 @@ func (w *AssetActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeA } out, err := w.client.DescribeAsset(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -545,7 +520,13 @@ func (w *AssetNotExistsWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeAsset(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -593,6 +574,40 @@ func assetNotExistsStateRetryable(ctx context.Context, input *DescribeAssetInput return true, nil } +type endpointPrefix_opDescribeAssetMiddleware struct { +} + +func (*endpointPrefix_opDescribeAssetMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDescribeAssetMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDescribeAssetMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDescribeAssetMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// DescribeAssetAPIClient is a client that implements the DescribeAsset operation. +type DescribeAssetAPIClient interface { + DescribeAsset(context.Context, *DescribeAssetInput, ...func(*Options)) (*DescribeAssetOutput, error) +} + +var _ DescribeAssetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAsset(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_DescribeAssetCompositeModel.go b/service/iotsitewise/api_op_DescribeAssetCompositeModel.go index 80fe2aa6938..45c8e9984e6 100644 --- a/service/iotsitewise/api_op_DescribeAssetCompositeModel.go +++ b/service/iotsitewise/api_op_DescribeAssetCompositeModel.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeAssetCompositeModelMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAssetCompositeModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeAssetModel.go b/service/iotsitewise/api_op_DescribeAssetModel.go index 0607d99ef64..fa632d6157b 100644 --- a/service/iotsitewise/api_op_DescribeAssetModel.go +++ b/service/iotsitewise/api_op_DescribeAssetModel.go @@ -191,6 +191,9 @@ func (c *Client) addOperationDescribeAssetModelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAssetModelMiddleware(stack); err != nil { return err } @@ -218,41 +221,6 @@ func (c *Client) addOperationDescribeAssetModelMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opDescribeAssetModelMiddleware struct { -} - -func (*endpointPrefix_opDescribeAssetModelMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeAssetModelMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeAssetModelMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeAssetModelMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// DescribeAssetModelAPIClient is a client that implements the DescribeAssetModel -// operation. -type DescribeAssetModelAPIClient interface { - DescribeAssetModel(context.Context, *DescribeAssetModelInput, ...func(*Options)) (*DescribeAssetModelOutput, error) -} - -var _ DescribeAssetModelAPIClient = (*Client)(nil) - // AssetModelActiveWaiterOptions are waiter options for AssetModelActiveWaiter type AssetModelActiveWaiterOptions struct { @@ -368,7 +336,13 @@ func (w *AssetModelActiveWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeAssetModel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -560,7 +534,13 @@ func (w *AssetModelNotExistsWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeAssetModel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -608,6 +588,41 @@ func assetModelNotExistsStateRetryable(ctx context.Context, input *DescribeAsset return true, nil } +type endpointPrefix_opDescribeAssetModelMiddleware struct { +} + +func (*endpointPrefix_opDescribeAssetModelMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDescribeAssetModelMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDescribeAssetModelMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDescribeAssetModelMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// DescribeAssetModelAPIClient is a client that implements the DescribeAssetModel +// operation. +type DescribeAssetModelAPIClient interface { + DescribeAssetModel(context.Context, *DescribeAssetModelInput, ...func(*Options)) (*DescribeAssetModelOutput, error) +} + +var _ DescribeAssetModelAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAssetModel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go b/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go index b53f409a207..87288fb18d2 100644 --- a/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_DescribeAssetModelCompositeModel.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeAssetModelCompositeModelMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAssetModelCompositeModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeAssetProperty.go b/service/iotsitewise/api_op_DescribeAssetProperty.go index fdc52cedcb2..f220cf2948e 100644 --- a/service/iotsitewise/api_op_DescribeAssetProperty.go +++ b/service/iotsitewise/api_op_DescribeAssetProperty.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeAssetPropertyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeAssetPropertyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeBulkImportJob.go b/service/iotsitewise/api_op_DescribeBulkImportJob.go index e3de29bcba1..28ae583bb04 100644 --- a/service/iotsitewise/api_op_DescribeBulkImportJob.go +++ b/service/iotsitewise/api_op_DescribeBulkImportJob.go @@ -183,6 +183,9 @@ func (c *Client) addOperationDescribeBulkImportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeBulkImportJobMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeDashboard.go b/service/iotsitewise/api_op_DescribeDashboard.go index f1bdcb7201f..167ac0b2bd5 100644 --- a/service/iotsitewise/api_op_DescribeDashboard.go +++ b/service/iotsitewise/api_op_DescribeDashboard.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeDashboardMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeDashboardMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go b/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go index 845ef1178b8..6f448f4d6c5 100644 --- a/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go +++ b/service/iotsitewise/api_op_DescribeDefaultEncryptionConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDefaultEncryptionConfigurationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeDefaultEncryptionConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeGateway.go b/service/iotsitewise/api_op_DescribeGateway.go index c31718b4601..56ac1d56559 100644 --- a/service/iotsitewise/api_op_DescribeGateway.go +++ b/service/iotsitewise/api_op_DescribeGateway.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeGatewayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeGatewayMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeGatewayCapabilityConfiguration.go b/service/iotsitewise/api_op_DescribeGatewayCapabilityConfiguration.go index 957d3d22359..0eb93b6fa8f 100644 --- a/service/iotsitewise/api_op_DescribeGatewayCapabilityConfiguration.go +++ b/service/iotsitewise/api_op_DescribeGatewayCapabilityConfiguration.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeGatewayCapabilityConfigurationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeGatewayCapabilityConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeLoggingOptions.go b/service/iotsitewise/api_op_DescribeLoggingOptions.go index 204fb7661fb..eab240f9b31 100644 --- a/service/iotsitewise/api_op_DescribeLoggingOptions.go +++ b/service/iotsitewise/api_op_DescribeLoggingOptions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDescribeLoggingOptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeLoggingOptionsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribePortal.go b/service/iotsitewise/api_op_DescribePortal.go index 381f5e0eba7..97a6d90d4f7 100644 --- a/service/iotsitewise/api_op_DescribePortal.go +++ b/service/iotsitewise/api_op_DescribePortal.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribePortalMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribePortalMiddleware(stack); err != nil { return err } @@ -213,41 +216,6 @@ func (c *Client) addOperationDescribePortalMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opDescribePortalMiddleware struct { -} - -func (*endpointPrefix_opDescribePortalMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribePortalMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "monitor." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribePortalMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribePortalMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// DescribePortalAPIClient is a client that implements the DescribePortal -// operation. -type DescribePortalAPIClient interface { - DescribePortal(context.Context, *DescribePortalInput, ...func(*Options)) (*DescribePortalOutput, error) -} - -var _ DescribePortalAPIClient = (*Client)(nil) - // PortalActiveWaiterOptions are waiter options for PortalActiveWaiter type PortalActiveWaiterOptions struct { @@ -362,7 +330,13 @@ func (w *PortalActiveWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribePortal(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -535,7 +509,13 @@ func (w *PortalNotExistsWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribePortal(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -583,6 +563,41 @@ func portalNotExistsStateRetryable(ctx context.Context, input *DescribePortalInp return true, nil } +type endpointPrefix_opDescribePortalMiddleware struct { +} + +func (*endpointPrefix_opDescribePortalMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDescribePortalMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "monitor." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opDescribePortalMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opDescribePortalMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// DescribePortalAPIClient is a client that implements the DescribePortal +// operation. +type DescribePortalAPIClient interface { + DescribePortal(context.Context, *DescribePortalInput, ...func(*Options)) (*DescribePortalOutput, error) +} + +var _ DescribePortalAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePortal(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_DescribeProject.go b/service/iotsitewise/api_op_DescribeProject.go index dfd777c1e71..3f3595534cf 100644 --- a/service/iotsitewise/api_op_DescribeProject.go +++ b/service/iotsitewise/api_op_DescribeProject.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeProjectMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeStorageConfiguration.go b/service/iotsitewise/api_op_DescribeStorageConfiguration.go index 6fef2a6f6f2..20da7061c74 100644 --- a/service/iotsitewise/api_op_DescribeStorageConfiguration.go +++ b/service/iotsitewise/api_op_DescribeStorageConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeStorageConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeStorageConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DescribeTimeSeries.go b/service/iotsitewise/api_op_DescribeTimeSeries.go index 9926217da22..365b510375d 100644 --- a/service/iotsitewise/api_op_DescribeTimeSeries.go +++ b/service/iotsitewise/api_op_DescribeTimeSeries.go @@ -177,6 +177,9 @@ func (c *Client) addOperationDescribeTimeSeriesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeTimeSeriesMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DisassociateAssets.go b/service/iotsitewise/api_op_DisassociateAssets.go index 3192c70d7f4..69409db3b2c 100644 --- a/service/iotsitewise/api_op_DisassociateAssets.go +++ b/service/iotsitewise/api_op_DisassociateAssets.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDisassociateAssetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateAssetsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go b/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go index 4de63483ad2..0b9eafa7e9c 100644 --- a/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go +++ b/service/iotsitewise/api_op_DisassociateTimeSeriesFromAssetProperty.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDisassociateTimeSeriesFromAssetPropertyMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateTimeSeriesFromAssetPropertyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_ExecuteAction.go b/service/iotsitewise/api_op_ExecuteAction.go index c18cf92761b..91c3e8390cb 100644 --- a/service/iotsitewise/api_op_ExecuteAction.go +++ b/service/iotsitewise/api_op_ExecuteAction.go @@ -123,6 +123,9 @@ func (c *Client) addOperationExecuteActionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opExecuteActionMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_ExecuteQuery.go b/service/iotsitewise/api_op_ExecuteQuery.go index d5659ccb047..ecf8a11495b 100644 --- a/service/iotsitewise/api_op_ExecuteQuery.go +++ b/service/iotsitewise/api_op_ExecuteQuery.go @@ -119,6 +119,9 @@ func (c *Client) addOperationExecuteQueryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opExecuteQueryMiddleware(stack); err != nil { return err } @@ -146,40 +149,6 @@ func (c *Client) addOperationExecuteQueryMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opExecuteQueryMiddleware struct { -} - -func (*endpointPrefix_opExecuteQueryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opExecuteQueryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opExecuteQueryMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opExecuteQueryMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ExecuteQueryAPIClient is a client that implements the ExecuteQuery operation. -type ExecuteQueryAPIClient interface { - ExecuteQuery(context.Context, *ExecuteQueryInput, ...func(*Options)) (*ExecuteQueryOutput, error) -} - -var _ ExecuteQueryAPIClient = (*Client)(nil) - // ExecuteQueryPaginatorOptions is the paginator options for ExecuteQuery type ExecuteQueryPaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -243,6 +212,9 @@ func (p *ExecuteQueryPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ExecuteQuery(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +234,40 @@ func (p *ExecuteQueryPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opExecuteQueryMiddleware struct { +} + +func (*endpointPrefix_opExecuteQueryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opExecuteQueryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opExecuteQueryMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opExecuteQueryMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ExecuteQueryAPIClient is a client that implements the ExecuteQuery operation. +type ExecuteQueryAPIClient interface { + ExecuteQuery(context.Context, *ExecuteQueryInput, ...func(*Options)) (*ExecuteQueryOutput, error) +} + +var _ ExecuteQueryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opExecuteQuery(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_GetAssetPropertyAggregates.go b/service/iotsitewise/api_op_GetAssetPropertyAggregates.go index 151e776fc85..08e70a280b9 100644 --- a/service/iotsitewise/api_op_GetAssetPropertyAggregates.go +++ b/service/iotsitewise/api_op_GetAssetPropertyAggregates.go @@ -175,6 +175,9 @@ func (c *Client) addOperationGetAssetPropertyAggregatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAssetPropertyAggregatesMiddleware(stack); err != nil { return err } @@ -202,41 +205,6 @@ func (c *Client) addOperationGetAssetPropertyAggregatesMiddlewares(stack *middle return nil } -type endpointPrefix_opGetAssetPropertyAggregatesMiddleware struct { -} - -func (*endpointPrefix_opGetAssetPropertyAggregatesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetAssetPropertyAggregatesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetAssetPropertyAggregatesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetAssetPropertyAggregatesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetAssetPropertyAggregatesAPIClient is a client that implements the -// GetAssetPropertyAggregates operation. -type GetAssetPropertyAggregatesAPIClient interface { - GetAssetPropertyAggregates(context.Context, *GetAssetPropertyAggregatesInput, ...func(*Options)) (*GetAssetPropertyAggregatesOutput, error) -} - -var _ GetAssetPropertyAggregatesAPIClient = (*Client)(nil) - // GetAssetPropertyAggregatesPaginatorOptions is the paginator options for // GetAssetPropertyAggregates type GetAssetPropertyAggregatesPaginatorOptions struct { @@ -309,6 +277,9 @@ func (p *GetAssetPropertyAggregatesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAssetPropertyAggregates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -328,6 +299,41 @@ func (p *GetAssetPropertyAggregatesPaginator) NextPage(ctx context.Context, optF return result, nil } +type endpointPrefix_opGetAssetPropertyAggregatesMiddleware struct { +} + +func (*endpointPrefix_opGetAssetPropertyAggregatesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetAssetPropertyAggregatesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetAssetPropertyAggregatesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetAssetPropertyAggregatesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetAssetPropertyAggregatesAPIClient is a client that implements the +// GetAssetPropertyAggregates operation. +type GetAssetPropertyAggregatesAPIClient interface { + GetAssetPropertyAggregates(context.Context, *GetAssetPropertyAggregatesInput, ...func(*Options)) (*GetAssetPropertyAggregatesOutput, error) +} + +var _ GetAssetPropertyAggregatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAssetPropertyAggregates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_GetAssetPropertyValue.go b/service/iotsitewise/api_op_GetAssetPropertyValue.go index 13e8a3ad121..19a0dfc3db2 100644 --- a/service/iotsitewise/api_op_GetAssetPropertyValue.go +++ b/service/iotsitewise/api_op_GetAssetPropertyValue.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetAssetPropertyValueMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAssetPropertyValueMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go b/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go index b89a478f498..aa4d6083933 100644 --- a/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go +++ b/service/iotsitewise/api_op_GetAssetPropertyValueHistory.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetAssetPropertyValueHistoryMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAssetPropertyValueHistoryMiddleware(stack); err != nil { return err } @@ -185,41 +188,6 @@ func (c *Client) addOperationGetAssetPropertyValueHistoryMiddlewares(stack *midd return nil } -type endpointPrefix_opGetAssetPropertyValueHistoryMiddleware struct { -} - -func (*endpointPrefix_opGetAssetPropertyValueHistoryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetAssetPropertyValueHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetAssetPropertyValueHistoryMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetAssetPropertyValueHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetAssetPropertyValueHistoryAPIClient is a client that implements the -// GetAssetPropertyValueHistory operation. -type GetAssetPropertyValueHistoryAPIClient interface { - GetAssetPropertyValueHistory(context.Context, *GetAssetPropertyValueHistoryInput, ...func(*Options)) (*GetAssetPropertyValueHistoryOutput, error) -} - -var _ GetAssetPropertyValueHistoryAPIClient = (*Client)(nil) - // GetAssetPropertyValueHistoryPaginatorOptions is the paginator options for // GetAssetPropertyValueHistory type GetAssetPropertyValueHistoryPaginatorOptions struct { @@ -292,6 +260,9 @@ func (p *GetAssetPropertyValueHistoryPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAssetPropertyValueHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -311,6 +282,41 @@ func (p *GetAssetPropertyValueHistoryPaginator) NextPage(ctx context.Context, op return result, nil } +type endpointPrefix_opGetAssetPropertyValueHistoryMiddleware struct { +} + +func (*endpointPrefix_opGetAssetPropertyValueHistoryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetAssetPropertyValueHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetAssetPropertyValueHistoryMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetAssetPropertyValueHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetAssetPropertyValueHistoryAPIClient is a client that implements the +// GetAssetPropertyValueHistory operation. +type GetAssetPropertyValueHistoryAPIClient interface { + GetAssetPropertyValueHistory(context.Context, *GetAssetPropertyValueHistoryInput, ...func(*Options)) (*GetAssetPropertyValueHistoryOutput, error) +} + +var _ GetAssetPropertyValueHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAssetPropertyValueHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go b/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go index 0047b3e0d4a..e83e7083829 100644 --- a/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go +++ b/service/iotsitewise/api_op_GetInterpolatedAssetPropertyValues.go @@ -225,6 +225,9 @@ func (c *Client) addOperationGetInterpolatedAssetPropertyValuesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware(stack); err != nil { return err } @@ -252,41 +255,6 @@ func (c *Client) addOperationGetInterpolatedAssetPropertyValuesMiddlewares(stack return nil } -type endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware struct { -} - -func (*endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetInterpolatedAssetPropertyValuesAPIClient is a client that implements the -// GetInterpolatedAssetPropertyValues operation. -type GetInterpolatedAssetPropertyValuesAPIClient interface { - GetInterpolatedAssetPropertyValues(context.Context, *GetInterpolatedAssetPropertyValuesInput, ...func(*Options)) (*GetInterpolatedAssetPropertyValuesOutput, error) -} - -var _ GetInterpolatedAssetPropertyValuesAPIClient = (*Client)(nil) - // GetInterpolatedAssetPropertyValuesPaginatorOptions is the paginator options for // GetInterpolatedAssetPropertyValues type GetInterpolatedAssetPropertyValuesPaginatorOptions struct { @@ -354,6 +322,9 @@ func (p *GetInterpolatedAssetPropertyValuesPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInterpolatedAssetPropertyValues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -373,6 +344,41 @@ func (p *GetInterpolatedAssetPropertyValuesPaginator) NextPage(ctx context.Conte return result, nil } +type endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware struct { +} + +func (*endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetInterpolatedAssetPropertyValuesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetInterpolatedAssetPropertyValuesAPIClient is a client that implements the +// GetInterpolatedAssetPropertyValues operation. +type GetInterpolatedAssetPropertyValuesAPIClient interface { + GetInterpolatedAssetPropertyValues(context.Context, *GetInterpolatedAssetPropertyValuesInput, ...func(*Options)) (*GetInterpolatedAssetPropertyValuesOutput, error) +} + +var _ GetInterpolatedAssetPropertyValuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInterpolatedAssetPropertyValues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAccessPolicies.go b/service/iotsitewise/api_op_ListAccessPolicies.go index 809e9d24ab6..ae00e7d5de3 100644 --- a/service/iotsitewise/api_op_ListAccessPolicies.go +++ b/service/iotsitewise/api_op_ListAccessPolicies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAccessPoliciesMiddleware(stack); err != nil { return err } @@ -162,41 +165,6 @@ func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opListAccessPoliciesMiddleware struct { -} - -func (*endpointPrefix_opListAccessPoliciesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAccessPoliciesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "monitor." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAccessPoliciesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAccessPoliciesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies -// operation. -type ListAccessPoliciesAPIClient interface { - ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) -} - -var _ ListAccessPoliciesAPIClient = (*Client)(nil) - // ListAccessPoliciesPaginatorOptions is the paginator options for // ListAccessPolicies type ListAccessPoliciesPaginatorOptions struct { @@ -263,6 +231,9 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -282,6 +253,41 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +type endpointPrefix_opListAccessPoliciesMiddleware struct { +} + +func (*endpointPrefix_opListAccessPoliciesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAccessPoliciesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "monitor." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAccessPoliciesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAccessPoliciesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies +// operation. +type ListAccessPoliciesAPIClient interface { + ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) +} + +var _ ListAccessPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListActions.go b/service/iotsitewise/api_op_ListActions.go index 3d73c33dce5..c43e8e9dd12 100644 --- a/service/iotsitewise/api_op_ListActions.go +++ b/service/iotsitewise/api_op_ListActions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListActionsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListActionsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_ListAssetModelCompositeModels.go b/service/iotsitewise/api_op_ListAssetModelCompositeModels.go index a4750462cd3..3bacd3fb20c 100644 --- a/service/iotsitewise/api_op_ListAssetModelCompositeModels.go +++ b/service/iotsitewise/api_op_ListAssetModelCompositeModels.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAssetModelCompositeModelsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssetModelCompositeModelsMiddleware(stack); err != nil { return err } @@ -151,41 +154,6 @@ func (c *Client) addOperationListAssetModelCompositeModelsMiddlewares(stack *mid return nil } -type endpointPrefix_opListAssetModelCompositeModelsMiddleware struct { -} - -func (*endpointPrefix_opListAssetModelCompositeModelsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssetModelCompositeModelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssetModelCompositeModelsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssetModelCompositeModelsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssetModelCompositeModelsAPIClient is a client that implements the -// ListAssetModelCompositeModels operation. -type ListAssetModelCompositeModelsAPIClient interface { - ListAssetModelCompositeModels(context.Context, *ListAssetModelCompositeModelsInput, ...func(*Options)) (*ListAssetModelCompositeModelsOutput, error) -} - -var _ ListAssetModelCompositeModelsAPIClient = (*Client)(nil) - // ListAssetModelCompositeModelsPaginatorOptions is the paginator options for // ListAssetModelCompositeModels type ListAssetModelCompositeModelsPaginatorOptions struct { @@ -254,6 +222,9 @@ func (p *ListAssetModelCompositeModelsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetModelCompositeModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +244,41 @@ func (p *ListAssetModelCompositeModelsPaginator) NextPage(ctx context.Context, o return result, nil } +type endpointPrefix_opListAssetModelCompositeModelsMiddleware struct { +} + +func (*endpointPrefix_opListAssetModelCompositeModelsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssetModelCompositeModelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssetModelCompositeModelsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssetModelCompositeModelsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssetModelCompositeModelsAPIClient is a client that implements the +// ListAssetModelCompositeModels operation. +type ListAssetModelCompositeModelsAPIClient interface { + ListAssetModelCompositeModels(context.Context, *ListAssetModelCompositeModelsInput, ...func(*Options)) (*ListAssetModelCompositeModelsOutput, error) +} + +var _ ListAssetModelCompositeModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetModelCompositeModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAssetModelProperties.go b/service/iotsitewise/api_op_ListAssetModelProperties.go index 4e95ed8a67f..86c6a2a48c0 100644 --- a/service/iotsitewise/api_op_ListAssetModelProperties.go +++ b/service/iotsitewise/api_op_ListAssetModelProperties.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListAssetModelPropertiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssetModelPropertiesMiddleware(stack); err != nil { return err } @@ -164,41 +167,6 @@ func (c *Client) addOperationListAssetModelPropertiesMiddlewares(stack *middlewa return nil } -type endpointPrefix_opListAssetModelPropertiesMiddleware struct { -} - -func (*endpointPrefix_opListAssetModelPropertiesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssetModelPropertiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssetModelPropertiesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssetModelPropertiesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssetModelPropertiesAPIClient is a client that implements the -// ListAssetModelProperties operation. -type ListAssetModelPropertiesAPIClient interface { - ListAssetModelProperties(context.Context, *ListAssetModelPropertiesInput, ...func(*Options)) (*ListAssetModelPropertiesOutput, error) -} - -var _ ListAssetModelPropertiesAPIClient = (*Client)(nil) - // ListAssetModelPropertiesPaginatorOptions is the paginator options for // ListAssetModelProperties type ListAssetModelPropertiesPaginatorOptions struct { @@ -265,6 +233,9 @@ func (p *ListAssetModelPropertiesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetModelProperties(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +255,41 @@ func (p *ListAssetModelPropertiesPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opListAssetModelPropertiesMiddleware struct { +} + +func (*endpointPrefix_opListAssetModelPropertiesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssetModelPropertiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssetModelPropertiesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssetModelPropertiesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssetModelPropertiesAPIClient is a client that implements the +// ListAssetModelProperties operation. +type ListAssetModelPropertiesAPIClient interface { + ListAssetModelProperties(context.Context, *ListAssetModelPropertiesInput, ...func(*Options)) (*ListAssetModelPropertiesOutput, error) +} + +var _ ListAssetModelPropertiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetModelProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAssetModels.go b/service/iotsitewise/api_op_ListAssetModels.go index 6cbb13f7e38..b4d1a526275 100644 --- a/service/iotsitewise/api_op_ListAssetModels.go +++ b/service/iotsitewise/api_op_ListAssetModels.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAssetModelsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssetModelsMiddleware(stack); err != nil { return err } @@ -149,41 +152,6 @@ func (c *Client) addOperationListAssetModelsMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListAssetModelsMiddleware struct { -} - -func (*endpointPrefix_opListAssetModelsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssetModelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssetModelsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssetModelsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssetModelsAPIClient is a client that implements the ListAssetModels -// operation. -type ListAssetModelsAPIClient interface { - ListAssetModels(context.Context, *ListAssetModelsInput, ...func(*Options)) (*ListAssetModelsOutput, error) -} - -var _ ListAssetModelsAPIClient = (*Client)(nil) - // ListAssetModelsPaginatorOptions is the paginator options for ListAssetModels type ListAssetModelsPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -249,6 +217,9 @@ func (p *ListAssetModelsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +239,41 @@ func (p *ListAssetModelsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +type endpointPrefix_opListAssetModelsMiddleware struct { +} + +func (*endpointPrefix_opListAssetModelsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssetModelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssetModelsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssetModelsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssetModelsAPIClient is a client that implements the ListAssetModels +// operation. +type ListAssetModelsAPIClient interface { + ListAssetModels(context.Context, *ListAssetModelsInput, ...func(*Options)) (*ListAssetModelsOutput, error) +} + +var _ ListAssetModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAssetProperties.go b/service/iotsitewise/api_op_ListAssetProperties.go index 15ee828ec4e..b48d40118a5 100644 --- a/service/iotsitewise/api_op_ListAssetProperties.go +++ b/service/iotsitewise/api_op_ListAssetProperties.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListAssetPropertiesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssetPropertiesMiddleware(stack); err != nil { return err } @@ -163,41 +166,6 @@ func (c *Client) addOperationListAssetPropertiesMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListAssetPropertiesMiddleware struct { -} - -func (*endpointPrefix_opListAssetPropertiesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssetPropertiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssetPropertiesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssetPropertiesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssetPropertiesAPIClient is a client that implements the -// ListAssetProperties operation. -type ListAssetPropertiesAPIClient interface { - ListAssetProperties(context.Context, *ListAssetPropertiesInput, ...func(*Options)) (*ListAssetPropertiesOutput, error) -} - -var _ ListAssetPropertiesAPIClient = (*Client)(nil) - // ListAssetPropertiesPaginatorOptions is the paginator options for // ListAssetProperties type ListAssetPropertiesPaginatorOptions struct { @@ -263,6 +231,9 @@ func (p *ListAssetPropertiesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetProperties(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -282,6 +253,41 @@ func (p *ListAssetPropertiesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListAssetPropertiesMiddleware struct { +} + +func (*endpointPrefix_opListAssetPropertiesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssetPropertiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssetPropertiesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssetPropertiesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssetPropertiesAPIClient is a client that implements the +// ListAssetProperties operation. +type ListAssetPropertiesAPIClient interface { + ListAssetProperties(context.Context, *ListAssetPropertiesInput, ...func(*Options)) (*ListAssetPropertiesOutput, error) +} + +var _ ListAssetPropertiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAssetRelationships.go b/service/iotsitewise/api_op_ListAssetRelationships.go index 4d216e3d01d..1c67b5d8d13 100644 --- a/service/iotsitewise/api_op_ListAssetRelationships.go +++ b/service/iotsitewise/api_op_ListAssetRelationships.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListAssetRelationshipsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssetRelationshipsMiddleware(stack); err != nil { return err } @@ -161,41 +164,6 @@ func (c *Client) addOperationListAssetRelationshipsMiddlewares(stack *middleware return nil } -type endpointPrefix_opListAssetRelationshipsMiddleware struct { -} - -func (*endpointPrefix_opListAssetRelationshipsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssetRelationshipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssetRelationshipsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssetRelationshipsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssetRelationshipsAPIClient is a client that implements the -// ListAssetRelationships operation. -type ListAssetRelationshipsAPIClient interface { - ListAssetRelationships(context.Context, *ListAssetRelationshipsInput, ...func(*Options)) (*ListAssetRelationshipsOutput, error) -} - -var _ ListAssetRelationshipsAPIClient = (*Client)(nil) - // ListAssetRelationshipsPaginatorOptions is the paginator options for // ListAssetRelationships type ListAssetRelationshipsPaginatorOptions struct { @@ -260,6 +228,9 @@ func (p *ListAssetRelationshipsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetRelationships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +250,41 @@ func (p *ListAssetRelationshipsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +type endpointPrefix_opListAssetRelationshipsMiddleware struct { +} + +func (*endpointPrefix_opListAssetRelationshipsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssetRelationshipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssetRelationshipsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssetRelationshipsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssetRelationshipsAPIClient is a client that implements the +// ListAssetRelationships operation. +type ListAssetRelationshipsAPIClient interface { + ListAssetRelationships(context.Context, *ListAssetRelationshipsInput, ...func(*Options)) (*ListAssetRelationshipsOutput, error) +} + +var _ ListAssetRelationshipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetRelationships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAssets.go b/service/iotsitewise/api_op_ListAssets.go index 83c5457e1aa..9ddf41b3734 100644 --- a/service/iotsitewise/api_op_ListAssets.go +++ b/service/iotsitewise/api_op_ListAssets.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssetsMiddleware(stack); err != nil { return err } @@ -171,40 +174,6 @@ func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opListAssetsMiddleware struct { -} - -func (*endpointPrefix_opListAssetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssetsAPIClient is a client that implements the ListAssets operation. -type ListAssetsAPIClient interface { - ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) -} - -var _ ListAssetsAPIClient = (*Client)(nil) - // ListAssetsPaginatorOptions is the paginator options for ListAssets type ListAssetsPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -270,6 +239,9 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -289,6 +261,40 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +type endpointPrefix_opListAssetsMiddleware struct { +} + +func (*endpointPrefix_opListAssetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssetsAPIClient is a client that implements the ListAssets operation. +type ListAssetsAPIClient interface { + ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) +} + +var _ ListAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListAssociatedAssets.go b/service/iotsitewise/api_op_ListAssociatedAssets.go index 5fc0c256f07..38de29cf841 100644 --- a/service/iotsitewise/api_op_ListAssociatedAssets.go +++ b/service/iotsitewise/api_op_ListAssociatedAssets.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListAssociatedAssetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAssociatedAssetsMiddleware(stack); err != nil { return err } @@ -182,41 +185,6 @@ func (c *Client) addOperationListAssociatedAssetsMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListAssociatedAssetsMiddleware struct { -} - -func (*endpointPrefix_opListAssociatedAssetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAssociatedAssetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAssociatedAssetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAssociatedAssetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAssociatedAssetsAPIClient is a client that implements the -// ListAssociatedAssets operation. -type ListAssociatedAssetsAPIClient interface { - ListAssociatedAssets(context.Context, *ListAssociatedAssetsInput, ...func(*Options)) (*ListAssociatedAssetsOutput, error) -} - -var _ ListAssociatedAssetsAPIClient = (*Client)(nil) - // ListAssociatedAssetsPaginatorOptions is the paginator options for // ListAssociatedAssets type ListAssociatedAssetsPaginatorOptions struct { @@ -283,6 +251,9 @@ func (p *ListAssociatedAssetsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -302,6 +273,41 @@ func (p *ListAssociatedAssetsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListAssociatedAssetsMiddleware struct { +} + +func (*endpointPrefix_opListAssociatedAssetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAssociatedAssetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAssociatedAssetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAssociatedAssetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAssociatedAssetsAPIClient is a client that implements the +// ListAssociatedAssets operation. +type ListAssociatedAssetsAPIClient interface { + ListAssociatedAssets(context.Context, *ListAssociatedAssetsInput, ...func(*Options)) (*ListAssociatedAssetsOutput, error) +} + +var _ ListAssociatedAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListBulkImportJobs.go b/service/iotsitewise/api_op_ListBulkImportJobs.go index f40ecb49b72..be5c82fc8ad 100644 --- a/service/iotsitewise/api_op_ListBulkImportJobs.go +++ b/service/iotsitewise/api_op_ListBulkImportJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListBulkImportJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListBulkImportJobsMiddleware(stack); err != nil { return err } @@ -143,41 +146,6 @@ func (c *Client) addOperationListBulkImportJobsMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opListBulkImportJobsMiddleware struct { -} - -func (*endpointPrefix_opListBulkImportJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListBulkImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListBulkImportJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListBulkImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListBulkImportJobsAPIClient is a client that implements the ListBulkImportJobs -// operation. -type ListBulkImportJobsAPIClient interface { - ListBulkImportJobs(context.Context, *ListBulkImportJobsInput, ...func(*Options)) (*ListBulkImportJobsOutput, error) -} - -var _ ListBulkImportJobsAPIClient = (*Client)(nil) - // ListBulkImportJobsPaginatorOptions is the paginator options for // ListBulkImportJobs type ListBulkImportJobsPaginatorOptions struct { @@ -242,6 +210,9 @@ func (p *ListBulkImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBulkImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +232,41 @@ func (p *ListBulkImportJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +type endpointPrefix_opListBulkImportJobsMiddleware struct { +} + +func (*endpointPrefix_opListBulkImportJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListBulkImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListBulkImportJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListBulkImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListBulkImportJobsAPIClient is a client that implements the ListBulkImportJobs +// operation. +type ListBulkImportJobsAPIClient interface { + ListBulkImportJobs(context.Context, *ListBulkImportJobsInput, ...func(*Options)) (*ListBulkImportJobsOutput, error) +} + +var _ ListBulkImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBulkImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListCompositionRelationships.go b/service/iotsitewise/api_op_ListCompositionRelationships.go index b5536bff30f..8a638d26459 100644 --- a/service/iotsitewise/api_op_ListCompositionRelationships.go +++ b/service/iotsitewise/api_op_ListCompositionRelationships.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListCompositionRelationshipsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListCompositionRelationshipsMiddleware(stack); err != nil { return err } @@ -152,41 +155,6 @@ func (c *Client) addOperationListCompositionRelationshipsMiddlewares(stack *midd return nil } -type endpointPrefix_opListCompositionRelationshipsMiddleware struct { -} - -func (*endpointPrefix_opListCompositionRelationshipsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListCompositionRelationshipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListCompositionRelationshipsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListCompositionRelationshipsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListCompositionRelationshipsAPIClient is a client that implements the -// ListCompositionRelationships operation. -type ListCompositionRelationshipsAPIClient interface { - ListCompositionRelationships(context.Context, *ListCompositionRelationshipsInput, ...func(*Options)) (*ListCompositionRelationshipsOutput, error) -} - -var _ ListCompositionRelationshipsAPIClient = (*Client)(nil) - // ListCompositionRelationshipsPaginatorOptions is the paginator options for // ListCompositionRelationships type ListCompositionRelationshipsPaginatorOptions struct { @@ -255,6 +223,9 @@ func (p *ListCompositionRelationshipsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCompositionRelationships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +245,41 @@ func (p *ListCompositionRelationshipsPaginator) NextPage(ctx context.Context, op return result, nil } +type endpointPrefix_opListCompositionRelationshipsMiddleware struct { +} + +func (*endpointPrefix_opListCompositionRelationshipsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListCompositionRelationshipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListCompositionRelationshipsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListCompositionRelationshipsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListCompositionRelationshipsAPIClient is a client that implements the +// ListCompositionRelationships operation. +type ListCompositionRelationshipsAPIClient interface { + ListCompositionRelationships(context.Context, *ListCompositionRelationshipsInput, ...func(*Options)) (*ListCompositionRelationshipsOutput, error) +} + +var _ ListCompositionRelationshipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCompositionRelationships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListDashboards.go b/service/iotsitewise/api_op_ListDashboards.go index 523a244b1a8..ff715fa95bf 100644 --- a/service/iotsitewise/api_op_ListDashboards.go +++ b/service/iotsitewise/api_op_ListDashboards.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDashboardsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListDashboardsMiddleware(stack); err != nil { return err } @@ -147,41 +150,6 @@ func (c *Client) addOperationListDashboardsMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListDashboardsMiddleware struct { -} - -func (*endpointPrefix_opListDashboardsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListDashboardsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "monitor." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListDashboardsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListDashboardsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListDashboardsAPIClient is a client that implements the ListDashboards -// operation. -type ListDashboardsAPIClient interface { - ListDashboards(context.Context, *ListDashboardsInput, ...func(*Options)) (*ListDashboardsOutput, error) -} - -var _ ListDashboardsAPIClient = (*Client)(nil) - // ListDashboardsPaginatorOptions is the paginator options for ListDashboards type ListDashboardsPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -247,6 +215,9 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDashboards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +237,41 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListDashboardsMiddleware struct { +} + +func (*endpointPrefix_opListDashboardsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListDashboardsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "monitor." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListDashboardsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListDashboardsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListDashboardsAPIClient is a client that implements the ListDashboards +// operation. +type ListDashboardsAPIClient interface { + ListDashboards(context.Context, *ListDashboardsInput, ...func(*Options)) (*ListDashboardsOutput, error) +} + +var _ ListDashboardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDashboards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListGateways.go b/service/iotsitewise/api_op_ListGateways.go index d28c5a9010b..eeb6c9df929 100644 --- a/service/iotsitewise/api_op_ListGateways.go +++ b/service/iotsitewise/api_op_ListGateways.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListGatewaysMiddleware(stack); err != nil { return err } @@ -139,40 +142,6 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListGatewaysMiddleware struct { -} - -func (*endpointPrefix_opListGatewaysMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListGatewaysMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListGatewaysMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListGatewaysMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListGatewaysAPIClient is a client that implements the ListGateways operation. -type ListGatewaysAPIClient interface { - ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) -} - -var _ ListGatewaysAPIClient = (*Client)(nil) - // ListGatewaysPaginatorOptions is the paginator options for ListGateways type ListGatewaysPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -238,6 +207,9 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +229,40 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListGatewaysMiddleware struct { +} + +func (*endpointPrefix_opListGatewaysMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListGatewaysMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListGatewaysMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListGatewaysMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListGatewaysAPIClient is a client that implements the ListGateways operation. +type ListGatewaysAPIClient interface { + ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) +} + +var _ ListGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListPortals.go b/service/iotsitewise/api_op_ListPortals.go index 78dca385e96..24f74f5b214 100644 --- a/service/iotsitewise/api_op_ListPortals.go +++ b/service/iotsitewise/api_op_ListPortals.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListPortalsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListPortalsMiddleware(stack); err != nil { return err } @@ -137,40 +140,6 @@ func (c *Client) addOperationListPortalsMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opListPortalsMiddleware struct { -} - -func (*endpointPrefix_opListPortalsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListPortalsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "monitor." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListPortalsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListPortalsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListPortalsAPIClient is a client that implements the ListPortals operation. -type ListPortalsAPIClient interface { - ListPortals(context.Context, *ListPortalsInput, ...func(*Options)) (*ListPortalsOutput, error) -} - -var _ ListPortalsAPIClient = (*Client)(nil) - // ListPortalsPaginatorOptions is the paginator options for ListPortals type ListPortalsPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -236,6 +205,9 @@ func (p *ListPortalsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPortals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +227,40 @@ func (p *ListPortalsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +type endpointPrefix_opListPortalsMiddleware struct { +} + +func (*endpointPrefix_opListPortalsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListPortalsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "monitor." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListPortalsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListPortalsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListPortalsAPIClient is a client that implements the ListPortals operation. +type ListPortalsAPIClient interface { + ListPortals(context.Context, *ListPortalsInput, ...func(*Options)) (*ListPortalsOutput, error) +} + +var _ ListPortalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPortals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListProjectAssets.go b/service/iotsitewise/api_op_ListProjectAssets.go index f3192182ccd..2a731e8ce54 100644 --- a/service/iotsitewise/api_op_ListProjectAssets.go +++ b/service/iotsitewise/api_op_ListProjectAssets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListProjectAssetsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListProjectAssetsMiddleware(stack); err != nil { return err } @@ -147,41 +150,6 @@ func (c *Client) addOperationListProjectAssetsMiddlewares(stack *middleware.Stac return nil } -type endpointPrefix_opListProjectAssetsMiddleware struct { -} - -func (*endpointPrefix_opListProjectAssetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListProjectAssetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "monitor." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListProjectAssetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListProjectAssetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListProjectAssetsAPIClient is a client that implements the ListProjectAssets -// operation. -type ListProjectAssetsAPIClient interface { - ListProjectAssets(context.Context, *ListProjectAssetsInput, ...func(*Options)) (*ListProjectAssetsOutput, error) -} - -var _ ListProjectAssetsAPIClient = (*Client)(nil) - // ListProjectAssetsPaginatorOptions is the paginator options for ListProjectAssets type ListProjectAssetsPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -247,6 +215,9 @@ func (p *ListProjectAssetsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjectAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +237,41 @@ func (p *ListProjectAssetsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +type endpointPrefix_opListProjectAssetsMiddleware struct { +} + +func (*endpointPrefix_opListProjectAssetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListProjectAssetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "monitor." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListProjectAssetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListProjectAssetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListProjectAssetsAPIClient is a client that implements the ListProjectAssets +// operation. +type ListProjectAssetsAPIClient interface { + ListProjectAssets(context.Context, *ListProjectAssetsInput, ...func(*Options)) (*ListProjectAssetsOutput, error) +} + +var _ ListProjectAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjectAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListProjects.go b/service/iotsitewise/api_op_ListProjects.go index 989d35fd173..d062879564a 100644 --- a/service/iotsitewise/api_op_ListProjects.go +++ b/service/iotsitewise/api_op_ListProjects.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListProjectsMiddleware(stack); err != nil { return err } @@ -147,40 +150,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListProjectsMiddleware struct { -} - -func (*endpointPrefix_opListProjectsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListProjectsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "monitor." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListProjectsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListProjectsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -246,6 +215,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +237,40 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListProjectsMiddleware struct { +} + +func (*endpointPrefix_opListProjectsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListProjectsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "monitor." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListProjectsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListProjectsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_ListTagsForResource.go b/service/iotsitewise/api_op_ListTagsForResource.go index b81bacceb3d..33c910384b3 100644 --- a/service/iotsitewise/api_op_ListTagsForResource.go +++ b/service/iotsitewise/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_ListTimeSeries.go b/service/iotsitewise/api_op_ListTimeSeries.go index 9b345c1749d..9d39f42b712 100644 --- a/service/iotsitewise/api_op_ListTimeSeries.go +++ b/service/iotsitewise/api_op_ListTimeSeries.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListTimeSeriesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTimeSeriesMiddleware(stack); err != nil { return err } @@ -155,41 +158,6 @@ func (c *Client) addOperationListTimeSeriesMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListTimeSeriesMiddleware struct { -} - -func (*endpointPrefix_opListTimeSeriesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTimeSeriesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListTimeSeriesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListTimeSeriesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListTimeSeriesAPIClient is a client that implements the ListTimeSeries -// operation. -type ListTimeSeriesAPIClient interface { - ListTimeSeries(context.Context, *ListTimeSeriesInput, ...func(*Options)) (*ListTimeSeriesOutput, error) -} - -var _ ListTimeSeriesAPIClient = (*Client)(nil) - // ListTimeSeriesPaginatorOptions is the paginator options for ListTimeSeries type ListTimeSeriesPaginatorOptions struct { // The maximum number of results to return for each paginated request. @@ -253,6 +221,9 @@ func (p *ListTimeSeriesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTimeSeries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +243,41 @@ func (p *ListTimeSeriesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListTimeSeriesMiddleware struct { +} + +func (*endpointPrefix_opListTimeSeriesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListTimeSeriesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListTimeSeriesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListTimeSeriesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListTimeSeriesAPIClient is a client that implements the ListTimeSeries +// operation. +type ListTimeSeriesAPIClient interface { + ListTimeSeries(context.Context, *ListTimeSeriesInput, ...func(*Options)) (*ListTimeSeriesOutput, error) +} + +var _ ListTimeSeriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTimeSeries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go b/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go index 4d9691079b4..ceb95c79ca5 100644 --- a/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go +++ b/service/iotsitewise/api_op_PutDefaultEncryptionConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutDefaultEncryptionConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutDefaultEncryptionConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_PutLoggingOptions.go b/service/iotsitewise/api_op_PutLoggingOptions.go index 048fe96de60..5cc41f863fe 100644 --- a/service/iotsitewise/api_op_PutLoggingOptions.go +++ b/service/iotsitewise/api_op_PutLoggingOptions.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPutLoggingOptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutLoggingOptionsMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_PutStorageConfiguration.go b/service/iotsitewise/api_op_PutStorageConfiguration.go index 56619ccbe82..146115145c3 100644 --- a/service/iotsitewise/api_op_PutStorageConfiguration.go +++ b/service/iotsitewise/api_op_PutStorageConfiguration.go @@ -194,6 +194,9 @@ func (c *Client) addOperationPutStorageConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutStorageConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_TagResource.go b/service/iotsitewise/api_op_TagResource.go index e190fe5fb30..e543e339196 100644 --- a/service/iotsitewise/api_op_TagResource.go +++ b/service/iotsitewise/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UntagResource.go b/service/iotsitewise/api_op_UntagResource.go index e9d715846c1..cef1ffa0559 100644 --- a/service/iotsitewise/api_op_UntagResource.go +++ b/service/iotsitewise/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateAccessPolicy.go b/service/iotsitewise/api_op_UpdateAccessPolicy.go index 37fa9493e61..26069fa9855 100644 --- a/service/iotsitewise/api_op_UpdateAccessPolicy.go +++ b/service/iotsitewise/api_op_UpdateAccessPolicy.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateAccessPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAccessPolicyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateAsset.go b/service/iotsitewise/api_op_UpdateAsset.go index 03eaa7019fa..4146c092838 100644 --- a/service/iotsitewise/api_op_UpdateAsset.go +++ b/service/iotsitewise/api_op_UpdateAsset.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAssetMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateAssetModel.go b/service/iotsitewise/api_op_UpdateAssetModel.go index ef114b76276..b690d86a1ee 100644 --- a/service/iotsitewise/api_op_UpdateAssetModel.go +++ b/service/iotsitewise/api_op_UpdateAssetModel.go @@ -182,6 +182,9 @@ func (c *Client) addOperationUpdateAssetModelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAssetModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go b/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go index 87263842d22..02396ebe06d 100644 --- a/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go +++ b/service/iotsitewise/api_op_UpdateAssetModelCompositeModel.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateAssetModelCompositeModelMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAssetModelCompositeModelMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateAssetProperty.go b/service/iotsitewise/api_op_UpdateAssetProperty.go index a078269e65f..0804d77197e 100644 --- a/service/iotsitewise/api_op_UpdateAssetProperty.go +++ b/service/iotsitewise/api_op_UpdateAssetProperty.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateAssetPropertyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAssetPropertyMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateDashboard.go b/service/iotsitewise/api_op_UpdateDashboard.go index a14dba8aa3b..5bb4c7c3aa2 100644 --- a/service/iotsitewise/api_op_UpdateDashboard.go +++ b/service/iotsitewise/api_op_UpdateDashboard.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateDashboardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateDashboardMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateGateway.go b/service/iotsitewise/api_op_UpdateGateway.go index 2555cc9e11e..577517c33c4 100644 --- a/service/iotsitewise/api_op_UpdateGateway.go +++ b/service/iotsitewise/api_op_UpdateGateway.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateGatewayMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateGatewayCapabilityConfiguration.go b/service/iotsitewise/api_op_UpdateGatewayCapabilityConfiguration.go index b617200345e..18d127c0101 100644 --- a/service/iotsitewise/api_op_UpdateGatewayCapabilityConfiguration.go +++ b/service/iotsitewise/api_op_UpdateGatewayCapabilityConfiguration.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateGatewayCapabilityConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateGatewayCapabilityConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdatePortal.go b/service/iotsitewise/api_op_UpdatePortal.go index 46072bd84ef..d668fd5770e 100644 --- a/service/iotsitewise/api_op_UpdatePortal.go +++ b/service/iotsitewise/api_op_UpdatePortal.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdatePortalMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdatePortalMiddleware(stack); err != nil { return err } diff --git a/service/iotsitewise/api_op_UpdateProject.go b/service/iotsitewise/api_op_UpdateProject.go index f7053b34d0f..82284a0c4a0 100644 --- a/service/iotsitewise/api_op_UpdateProject.go +++ b/service/iotsitewise/api_op_UpdateProject.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateProjectMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_client.go b/service/iotthingsgraph/api_client.go index 20f43089d54..5d4c2810f50 100644 --- a/service/iotthingsgraph/api_client.go +++ b/service/iotthingsgraph/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotthingsgraph/api_op_AssociateEntityToThing.go b/service/iotthingsgraph/api_op_AssociateEntityToThing.go index 82cb0f2bf5d..5c012a668cf 100644 --- a/service/iotthingsgraph/api_op_AssociateEntityToThing.go +++ b/service/iotthingsgraph/api_op_AssociateEntityToThing.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateEntityToThingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateEntityToThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_CreateFlowTemplate.go b/service/iotthingsgraph/api_op_CreateFlowTemplate.go index 31aaf5475a9..0f2d858384c 100644 --- a/service/iotthingsgraph/api_op_CreateFlowTemplate.go +++ b/service/iotthingsgraph/api_op_CreateFlowTemplate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateFlowTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFlowTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_CreateSystemInstance.go b/service/iotthingsgraph/api_op_CreateSystemInstance.go index fde627b7037..d511ac34b44 100644 --- a/service/iotthingsgraph/api_op_CreateSystemInstance.go +++ b/service/iotthingsgraph/api_op_CreateSystemInstance.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateSystemInstanceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSystemInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_CreateSystemTemplate.go b/service/iotthingsgraph/api_op_CreateSystemTemplate.go index 0d6908a7920..2332311fef7 100644 --- a/service/iotthingsgraph/api_op_CreateSystemTemplate.go +++ b/service/iotthingsgraph/api_op_CreateSystemTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateSystemTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSystemTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeleteFlowTemplate.go b/service/iotthingsgraph/api_op_DeleteFlowTemplate.go index 57ffa28b53c..09bff246a5e 100644 --- a/service/iotthingsgraph/api_op_DeleteFlowTemplate.go +++ b/service/iotthingsgraph/api_op_DeleteFlowTemplate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteFlowTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFlowTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeleteNamespace.go b/service/iotthingsgraph/api_op_DeleteNamespace.go index 84ea5860f57..81625ca3eff 100644 --- a/service/iotthingsgraph/api_op_DeleteNamespace.go +++ b/service/iotthingsgraph/api_op_DeleteNamespace.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNamespace(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeleteSystemInstance.go b/service/iotthingsgraph/api_op_DeleteSystemInstance.go index 689d0b10368..0a63a909ab3 100644 --- a/service/iotthingsgraph/api_op_DeleteSystemInstance.go +++ b/service/iotthingsgraph/api_op_DeleteSystemInstance.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteSystemInstanceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSystemInstance(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeleteSystemTemplate.go b/service/iotthingsgraph/api_op_DeleteSystemTemplate.go index 5c88be84663..74b92906487 100644 --- a/service/iotthingsgraph/api_op_DeleteSystemTemplate.go +++ b/service/iotthingsgraph/api_op_DeleteSystemTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteSystemTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSystemTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeploySystemInstance.go b/service/iotthingsgraph/api_op_DeploySystemInstance.go index 070f47f1b6b..6505d73605f 100644 --- a/service/iotthingsgraph/api_op_DeploySystemInstance.go +++ b/service/iotthingsgraph/api_op_DeploySystemInstance.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeploySystemInstanceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeploySystemInstance(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeprecateFlowTemplate.go b/service/iotthingsgraph/api_op_DeprecateFlowTemplate.go index 0bfe821f877..2e3a1ead3ef 100644 --- a/service/iotthingsgraph/api_op_DeprecateFlowTemplate.go +++ b/service/iotthingsgraph/api_op_DeprecateFlowTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeprecateFlowTemplateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprecateFlowTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DeprecateSystemTemplate.go b/service/iotthingsgraph/api_op_DeprecateSystemTemplate.go index feeefe62e94..1a417b55ffc 100644 --- a/service/iotthingsgraph/api_op_DeprecateSystemTemplate.go +++ b/service/iotthingsgraph/api_op_DeprecateSystemTemplate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeprecateSystemTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprecateSystemTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DescribeNamespace.go b/service/iotthingsgraph/api_op_DescribeNamespace.go index db0e24fcb04..f056585a840 100644 --- a/service/iotthingsgraph/api_op_DescribeNamespace.go +++ b/service/iotthingsgraph/api_op_DescribeNamespace.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeNamespaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNamespace(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_DissociateEntityFromThing.go b/service/iotthingsgraph/api_op_DissociateEntityFromThing.go index ae5041ef3ce..a088031aff1 100644 --- a/service/iotthingsgraph/api_op_DissociateEntityFromThing.go +++ b/service/iotthingsgraph/api_op_DissociateEntityFromThing.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDissociateEntityFromThingMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDissociateEntityFromThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_GetEntities.go b/service/iotthingsgraph/api_op_GetEntities.go index 50d75e2bf75..3962fa18f97 100644 --- a/service/iotthingsgraph/api_op_GetEntities.go +++ b/service/iotthingsgraph/api_op_GetEntities.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetEntitiesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_GetFlowTemplate.go b/service/iotthingsgraph/api_op_GetFlowTemplate.go index bb9173846c8..5dd57ae3d75 100644 --- a/service/iotthingsgraph/api_op_GetFlowTemplate.go +++ b/service/iotthingsgraph/api_op_GetFlowTemplate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetFlowTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFlowTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go b/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go index 74d8a0d2685..2b4157e535c 100644 --- a/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go +++ b/service/iotthingsgraph/api_op_GetFlowTemplateRevisions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetFlowTemplateRevisionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFlowTemplateRevisionsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetFlowTemplateRevisionsMiddlewares(stack *middlewa return nil } -// GetFlowTemplateRevisionsAPIClient is a client that implements the -// GetFlowTemplateRevisions operation. -type GetFlowTemplateRevisionsAPIClient interface { - GetFlowTemplateRevisions(context.Context, *GetFlowTemplateRevisionsInput, ...func(*Options)) (*GetFlowTemplateRevisionsOutput, error) -} - -var _ GetFlowTemplateRevisionsAPIClient = (*Client)(nil) - // GetFlowTemplateRevisionsPaginatorOptions is the paginator options for // GetFlowTemplateRevisions type GetFlowTemplateRevisionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *GetFlowTemplateRevisionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFlowTemplateRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetFlowTemplateRevisionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetFlowTemplateRevisionsAPIClient is a client that implements the +// GetFlowTemplateRevisions operation. +type GetFlowTemplateRevisionsAPIClient interface { + GetFlowTemplateRevisions(context.Context, *GetFlowTemplateRevisionsInput, ...func(*Options)) (*GetFlowTemplateRevisionsOutput, error) +} + +var _ GetFlowTemplateRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFlowTemplateRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_GetNamespaceDeletionStatus.go b/service/iotthingsgraph/api_op_GetNamespaceDeletionStatus.go index ad172579880..0576b79a208 100644 --- a/service/iotthingsgraph/api_op_GetNamespaceDeletionStatus.go +++ b/service/iotthingsgraph/api_op_GetNamespaceDeletionStatus.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetNamespaceDeletionStatusMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNamespaceDeletionStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_GetSystemInstance.go b/service/iotthingsgraph/api_op_GetSystemInstance.go index fb66ab05baa..3f5f678e9b2 100644 --- a/service/iotthingsgraph/api_op_GetSystemInstance.go +++ b/service/iotthingsgraph/api_op_GetSystemInstance.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetSystemInstanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSystemInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_GetSystemTemplate.go b/service/iotthingsgraph/api_op_GetSystemTemplate.go index 4eaab0d8af1..df057792885 100644 --- a/service/iotthingsgraph/api_op_GetSystemTemplate.go +++ b/service/iotthingsgraph/api_op_GetSystemTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSystemTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSystemTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go b/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go index 65fdd00a387..677d1f67698 100644 --- a/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go +++ b/service/iotthingsgraph/api_op_GetSystemTemplateRevisions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetSystemTemplateRevisionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSystemTemplateRevisionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationGetSystemTemplateRevisionsMiddlewares(stack *middle return nil } -// GetSystemTemplateRevisionsAPIClient is a client that implements the -// GetSystemTemplateRevisions operation. -type GetSystemTemplateRevisionsAPIClient interface { - GetSystemTemplateRevisions(context.Context, *GetSystemTemplateRevisionsInput, ...func(*Options)) (*GetSystemTemplateRevisionsOutput, error) -} - -var _ GetSystemTemplateRevisionsAPIClient = (*Client)(nil) - // GetSystemTemplateRevisionsPaginatorOptions is the paginator options for // GetSystemTemplateRevisions type GetSystemTemplateRevisionsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *GetSystemTemplateRevisionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSystemTemplateRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *GetSystemTemplateRevisionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// GetSystemTemplateRevisionsAPIClient is a client that implements the +// GetSystemTemplateRevisions operation. +type GetSystemTemplateRevisionsAPIClient interface { + GetSystemTemplateRevisions(context.Context, *GetSystemTemplateRevisionsInput, ...func(*Options)) (*GetSystemTemplateRevisionsOutput, error) +} + +var _ GetSystemTemplateRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSystemTemplateRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_GetUploadStatus.go b/service/iotthingsgraph/api_op_GetUploadStatus.go index efda9959086..9410ac2f44d 100644 --- a/service/iotthingsgraph/api_op_GetUploadStatus.go +++ b/service/iotthingsgraph/api_op_GetUploadStatus.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetUploadStatusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUploadStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go b/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go index 058e81ccf45..663b2a45d15 100644 --- a/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go +++ b/service/iotthingsgraph/api_op_ListFlowExecutionMessages.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListFlowExecutionMessagesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFlowExecutionMessagesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListFlowExecutionMessagesMiddlewares(stack *middlew return nil } -// ListFlowExecutionMessagesAPIClient is a client that implements the -// ListFlowExecutionMessages operation. -type ListFlowExecutionMessagesAPIClient interface { - ListFlowExecutionMessages(context.Context, *ListFlowExecutionMessagesInput, ...func(*Options)) (*ListFlowExecutionMessagesOutput, error) -} - -var _ ListFlowExecutionMessagesAPIClient = (*Client)(nil) - // ListFlowExecutionMessagesPaginatorOptions is the paginator options for // ListFlowExecutionMessages type ListFlowExecutionMessagesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListFlowExecutionMessagesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlowExecutionMessages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListFlowExecutionMessagesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListFlowExecutionMessagesAPIClient is a client that implements the +// ListFlowExecutionMessages operation. +type ListFlowExecutionMessagesAPIClient interface { + ListFlowExecutionMessages(context.Context, *ListFlowExecutionMessagesInput, ...func(*Options)) (*ListFlowExecutionMessagesOutput, error) +} + +var _ ListFlowExecutionMessagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlowExecutionMessages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_ListTagsForResource.go b/service/iotthingsgraph/api_op_ListTagsForResource.go index 4f59be09682..0bba91f2330 100644 --- a/service/iotthingsgraph/api_op_ListTagsForResource.go +++ b/service/iotthingsgraph/api_op_ListTagsForResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_SearchEntities.go b/service/iotthingsgraph/api_op_SearchEntities.go index 4a809a56e43..1a03087d311 100644 --- a/service/iotthingsgraph/api_op_SearchEntities.go +++ b/service/iotthingsgraph/api_op_SearchEntities.go @@ -132,6 +132,9 @@ func (c *Client) addOperationSearchEntitiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchEntitiesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationSearchEntitiesMiddlewares(stack *middleware.Stack, return nil } -// SearchEntitiesAPIClient is a client that implements the SearchEntities -// operation. -type SearchEntitiesAPIClient interface { - SearchEntities(context.Context, *SearchEntitiesInput, ...func(*Options)) (*SearchEntitiesOutput, error) -} - -var _ SearchEntitiesAPIClient = (*Client)(nil) - // SearchEntitiesPaginatorOptions is the paginator options for SearchEntities type SearchEntitiesPaginatorOptions struct { // The maximum number of results to return in the response. @@ -227,6 +222,9 @@ func (p *SearchEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchEntities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *SearchEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchEntitiesAPIClient is a client that implements the SearchEntities +// operation. +type SearchEntitiesAPIClient interface { + SearchEntities(context.Context, *SearchEntitiesInput, ...func(*Options)) (*SearchEntitiesOutput, error) +} + +var _ SearchEntitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_SearchFlowExecutions.go b/service/iotthingsgraph/api_op_SearchFlowExecutions.go index 0601fa7dab5..df4d5ec39e2 100644 --- a/service/iotthingsgraph/api_op_SearchFlowExecutions.go +++ b/service/iotthingsgraph/api_op_SearchFlowExecutions.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSearchFlowExecutionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchFlowExecutionsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationSearchFlowExecutionsMiddlewares(stack *middleware.S return nil } -// SearchFlowExecutionsAPIClient is a client that implements the -// SearchFlowExecutions operation. -type SearchFlowExecutionsAPIClient interface { - SearchFlowExecutions(context.Context, *SearchFlowExecutionsInput, ...func(*Options)) (*SearchFlowExecutionsOutput, error) -} - -var _ SearchFlowExecutionsAPIClient = (*Client)(nil) - // SearchFlowExecutionsPaginatorOptions is the paginator options for // SearchFlowExecutions type SearchFlowExecutionsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *SearchFlowExecutionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchFlowExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *SearchFlowExecutionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SearchFlowExecutionsAPIClient is a client that implements the +// SearchFlowExecutions operation. +type SearchFlowExecutionsAPIClient interface { + SearchFlowExecutions(context.Context, *SearchFlowExecutionsInput, ...func(*Options)) (*SearchFlowExecutionsOutput, error) +} + +var _ SearchFlowExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchFlowExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_SearchFlowTemplates.go b/service/iotthingsgraph/api_op_SearchFlowTemplates.go index c96966fb605..742e9759662 100644 --- a/service/iotthingsgraph/api_op_SearchFlowTemplates.go +++ b/service/iotthingsgraph/api_op_SearchFlowTemplates.go @@ -118,6 +118,9 @@ func (c *Client) addOperationSearchFlowTemplatesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchFlowTemplatesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationSearchFlowTemplatesMiddlewares(stack *middleware.St return nil } -// SearchFlowTemplatesAPIClient is a client that implements the -// SearchFlowTemplates operation. -type SearchFlowTemplatesAPIClient interface { - SearchFlowTemplates(context.Context, *SearchFlowTemplatesInput, ...func(*Options)) (*SearchFlowTemplatesOutput, error) -} - -var _ SearchFlowTemplatesAPIClient = (*Client)(nil) - // SearchFlowTemplatesPaginatorOptions is the paginator options for // SearchFlowTemplates type SearchFlowTemplatesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *SearchFlowTemplatesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchFlowTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *SearchFlowTemplatesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// SearchFlowTemplatesAPIClient is a client that implements the +// SearchFlowTemplates operation. +type SearchFlowTemplatesAPIClient interface { + SearchFlowTemplates(context.Context, *SearchFlowTemplatesInput, ...func(*Options)) (*SearchFlowTemplatesOutput, error) +} + +var _ SearchFlowTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchFlowTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_SearchSystemInstances.go b/service/iotthingsgraph/api_op_SearchSystemInstances.go index f6bcb8a19b0..d166380f883 100644 --- a/service/iotthingsgraph/api_op_SearchSystemInstances.go +++ b/service/iotthingsgraph/api_op_SearchSystemInstances.go @@ -121,6 +121,9 @@ func (c *Client) addOperationSearchSystemInstancesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchSystemInstances(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationSearchSystemInstancesMiddlewares(stack *middleware. return nil } -// SearchSystemInstancesAPIClient is a client that implements the -// SearchSystemInstances operation. -type SearchSystemInstancesAPIClient interface { - SearchSystemInstances(context.Context, *SearchSystemInstancesInput, ...func(*Options)) (*SearchSystemInstancesOutput, error) -} - -var _ SearchSystemInstancesAPIClient = (*Client)(nil) - // SearchSystemInstancesPaginatorOptions is the paginator options for // SearchSystemInstances type SearchSystemInstancesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *SearchSystemInstancesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchSystemInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *SearchSystemInstancesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// SearchSystemInstancesAPIClient is a client that implements the +// SearchSystemInstances operation. +type SearchSystemInstancesAPIClient interface { + SearchSystemInstances(context.Context, *SearchSystemInstancesInput, ...func(*Options)) (*SearchSystemInstancesOutput, error) +} + +var _ SearchSystemInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchSystemInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_SearchSystemTemplates.go b/service/iotthingsgraph/api_op_SearchSystemTemplates.go index 6d2af65fd78..92ac6ba0b70 100644 --- a/service/iotthingsgraph/api_op_SearchSystemTemplates.go +++ b/service/iotthingsgraph/api_op_SearchSystemTemplates.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSearchSystemTemplatesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchSystemTemplatesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationSearchSystemTemplatesMiddlewares(stack *middleware. return nil } -// SearchSystemTemplatesAPIClient is a client that implements the -// SearchSystemTemplates operation. -type SearchSystemTemplatesAPIClient interface { - SearchSystemTemplates(context.Context, *SearchSystemTemplatesInput, ...func(*Options)) (*SearchSystemTemplatesOutput, error) -} - -var _ SearchSystemTemplatesAPIClient = (*Client)(nil) - // SearchSystemTemplatesPaginatorOptions is the paginator options for // SearchSystemTemplates type SearchSystemTemplatesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *SearchSystemTemplatesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchSystemTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *SearchSystemTemplatesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// SearchSystemTemplatesAPIClient is a client that implements the +// SearchSystemTemplates operation. +type SearchSystemTemplatesAPIClient interface { + SearchSystemTemplates(context.Context, *SearchSystemTemplatesInput, ...func(*Options)) (*SearchSystemTemplatesOutput, error) +} + +var _ SearchSystemTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchSystemTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_SearchThings.go b/service/iotthingsgraph/api_op_SearchThings.go index 8199233852c..a0e971f750d 100644 --- a/service/iotthingsgraph/api_op_SearchThings.go +++ b/service/iotthingsgraph/api_op_SearchThings.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSearchThingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchThingsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationSearchThingsMiddlewares(stack *middleware.Stack, op return nil } -// SearchThingsAPIClient is a client that implements the SearchThings operation. -type SearchThingsAPIClient interface { - SearchThings(context.Context, *SearchThingsInput, ...func(*Options)) (*SearchThingsOutput, error) -} - -var _ SearchThingsAPIClient = (*Client)(nil) - // SearchThingsPaginatorOptions is the paginator options for SearchThings type SearchThingsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -229,6 +225,9 @@ func (p *SearchThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchThings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *SearchThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// SearchThingsAPIClient is a client that implements the SearchThings operation. +type SearchThingsAPIClient interface { + SearchThings(context.Context, *SearchThingsInput, ...func(*Options)) (*SearchThingsOutput, error) +} + +var _ SearchThingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchThings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotthingsgraph/api_op_TagResource.go b/service/iotthingsgraph/api_op_TagResource.go index f67482a4d89..ee5be689eed 100644 --- a/service/iotthingsgraph/api_op_TagResource.go +++ b/service/iotthingsgraph/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_UndeploySystemInstance.go b/service/iotthingsgraph/api_op_UndeploySystemInstance.go index 4b49006f6c7..1b5c91a074b 100644 --- a/service/iotthingsgraph/api_op_UndeploySystemInstance.go +++ b/service/iotthingsgraph/api_op_UndeploySystemInstance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUndeploySystemInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUndeploySystemInstance(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_UntagResource.go b/service/iotthingsgraph/api_op_UntagResource.go index e9cc15a6103..1402359f63e 100644 --- a/service/iotthingsgraph/api_op_UntagResource.go +++ b/service/iotthingsgraph/api_op_UntagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_UpdateFlowTemplate.go b/service/iotthingsgraph/api_op_UpdateFlowTemplate.go index 7d145a75a45..57c31a46e8d 100644 --- a/service/iotthingsgraph/api_op_UpdateFlowTemplate.go +++ b/service/iotthingsgraph/api_op_UpdateFlowTemplate.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateFlowTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlowTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_UpdateSystemTemplate.go b/service/iotthingsgraph/api_op_UpdateSystemTemplate.go index 43a536fdd0c..07a12ad4de1 100644 --- a/service/iotthingsgraph/api_op_UpdateSystemTemplate.go +++ b/service/iotthingsgraph/api_op_UpdateSystemTemplate.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSystemTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSystemTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotthingsgraph/api_op_UploadEntityDefinitions.go b/service/iotthingsgraph/api_op_UploadEntityDefinitions.go index bd57753d1b9..fdfc1068a02 100644 --- a/service/iotthingsgraph/api_op_UploadEntityDefinitions.go +++ b/service/iotthingsgraph/api_op_UploadEntityDefinitions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUploadEntityDefinitionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUploadEntityDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_client.go b/service/iottwinmaker/api_client.go index b0c9a5a5465..4711fc3cd87 100644 --- a/service/iottwinmaker/api_client.go +++ b/service/iottwinmaker/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iottwinmaker/api_op_BatchPutPropertyValues.go b/service/iottwinmaker/api_op_BatchPutPropertyValues.go index ebc5c3dc016..d4ab7f24b06 100644 --- a/service/iottwinmaker/api_op_BatchPutPropertyValues.go +++ b/service/iottwinmaker/api_op_BatchPutPropertyValues.go @@ -114,6 +114,9 @@ func (c *Client) addOperationBatchPutPropertyValuesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchPutPropertyValuesMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CancelMetadataTransferJob.go b/service/iottwinmaker/api_op_CancelMetadataTransferJob.go index 923d9ecd1f9..9991919ce47 100644 --- a/service/iottwinmaker/api_op_CancelMetadataTransferJob.go +++ b/service/iottwinmaker/api_op_CancelMetadataTransferJob.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCancelMetadataTransferJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCancelMetadataTransferJobMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CreateComponentType.go b/service/iottwinmaker/api_op_CreateComponentType.go index 38f82465774..7f6430b710c 100644 --- a/service/iottwinmaker/api_op_CreateComponentType.go +++ b/service/iottwinmaker/api_op_CreateComponentType.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateComponentTypeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateComponentTypeMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CreateEntity.go b/service/iottwinmaker/api_op_CreateEntity.go index a2a9a66fbab..53a035da74f 100644 --- a/service/iottwinmaker/api_op_CreateEntity.go +++ b/service/iottwinmaker/api_op_CreateEntity.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateEntityMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateEntityMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CreateMetadataTransferJob.go b/service/iottwinmaker/api_op_CreateMetadataTransferJob.go index 15aedb6fec9..5f905cf2d65 100644 --- a/service/iottwinmaker/api_op_CreateMetadataTransferJob.go +++ b/service/iottwinmaker/api_op_CreateMetadataTransferJob.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateMetadataTransferJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateMetadataTransferJobMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CreateScene.go b/service/iottwinmaker/api_op_CreateScene.go index 445017a9edd..59f83a88ba9 100644 --- a/service/iottwinmaker/api_op_CreateScene.go +++ b/service/iottwinmaker/api_op_CreateScene.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateSceneMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateSceneMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CreateSyncJob.go b/service/iottwinmaker/api_op_CreateSyncJob.go index bcd40ed4bd6..4d47ee50c75 100644 --- a/service/iottwinmaker/api_op_CreateSyncJob.go +++ b/service/iottwinmaker/api_op_CreateSyncJob.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateSyncJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateSyncJobMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_CreateWorkspace.go b/service/iottwinmaker/api_op_CreateWorkspace.go index 373777356b4..aa01d19dc28 100644 --- a/service/iottwinmaker/api_op_CreateWorkspace.go +++ b/service/iottwinmaker/api_op_CreateWorkspace.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateWorkspaceMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_DeleteComponentType.go b/service/iottwinmaker/api_op_DeleteComponentType.go index 2a7da27f1f4..17bb9252394 100644 --- a/service/iottwinmaker/api_op_DeleteComponentType.go +++ b/service/iottwinmaker/api_op_DeleteComponentType.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteComponentTypeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteComponentTypeMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_DeleteEntity.go b/service/iottwinmaker/api_op_DeleteEntity.go index dbd83a25ced..3cb33800693 100644 --- a/service/iottwinmaker/api_op_DeleteEntity.go +++ b/service/iottwinmaker/api_op_DeleteEntity.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteEntityMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteEntityMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_DeleteScene.go b/service/iottwinmaker/api_op_DeleteScene.go index dd6b113defc..ecdfd254197 100644 --- a/service/iottwinmaker/api_op_DeleteScene.go +++ b/service/iottwinmaker/api_op_DeleteScene.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSceneMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteSceneMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_DeleteSyncJob.go b/service/iottwinmaker/api_op_DeleteSyncJob.go index 591ed34b48d..514907fa835 100644 --- a/service/iottwinmaker/api_op_DeleteSyncJob.go +++ b/service/iottwinmaker/api_op_DeleteSyncJob.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteSyncJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteSyncJobMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_DeleteWorkspace.go b/service/iottwinmaker/api_op_DeleteWorkspace.go index 59592553cb9..d6386636fbf 100644 --- a/service/iottwinmaker/api_op_DeleteWorkspace.go +++ b/service/iottwinmaker/api_op_DeleteWorkspace.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteWorkspaceMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_ExecuteQuery.go b/service/iottwinmaker/api_op_ExecuteQuery.go index f2374ab1cf4..49d2e6a8feb 100644 --- a/service/iottwinmaker/api_op_ExecuteQuery.go +++ b/service/iottwinmaker/api_op_ExecuteQuery.go @@ -129,6 +129,9 @@ func (c *Client) addOperationExecuteQueryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opExecuteQueryMiddleware(stack); err != nil { return err } @@ -156,40 +159,6 @@ func (c *Client) addOperationExecuteQueryMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opExecuteQueryMiddleware struct { -} - -func (*endpointPrefix_opExecuteQueryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opExecuteQueryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opExecuteQueryMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opExecuteQueryMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ExecuteQueryAPIClient is a client that implements the ExecuteQuery operation. -type ExecuteQueryAPIClient interface { - ExecuteQuery(context.Context, *ExecuteQueryInput, ...func(*Options)) (*ExecuteQueryOutput, error) -} - -var _ ExecuteQueryAPIClient = (*Client)(nil) - // ExecuteQueryPaginatorOptions is the paginator options for ExecuteQuery type ExecuteQueryPaginatorOptions struct { // The maximum number of results to return at one time. The default is 50. @@ -253,6 +222,9 @@ func (p *ExecuteQueryPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ExecuteQuery(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +244,40 @@ func (p *ExecuteQueryPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opExecuteQueryMiddleware struct { +} + +func (*endpointPrefix_opExecuteQueryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opExecuteQueryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opExecuteQueryMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opExecuteQueryMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ExecuteQueryAPIClient is a client that implements the ExecuteQuery operation. +type ExecuteQueryAPIClient interface { + ExecuteQuery(context.Context, *ExecuteQueryInput, ...func(*Options)) (*ExecuteQueryOutput, error) +} + +var _ ExecuteQueryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opExecuteQuery(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_GetComponentType.go b/service/iottwinmaker/api_op_GetComponentType.go index 3a23e30bc40..f50f4d837cf 100644 --- a/service/iottwinmaker/api_op_GetComponentType.go +++ b/service/iottwinmaker/api_op_GetComponentType.go @@ -177,6 +177,9 @@ func (c *Client) addOperationGetComponentTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetComponentTypeMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_GetEntity.go b/service/iottwinmaker/api_op_GetEntity.go index 7c8ff4dfad2..2c13378c23e 100644 --- a/service/iottwinmaker/api_op_GetEntity.go +++ b/service/iottwinmaker/api_op_GetEntity.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetEntityMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetEntityMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_GetMetadataTransferJob.go b/service/iottwinmaker/api_op_GetMetadataTransferJob.go index 8eaf502463d..b79e0fdf2d2 100644 --- a/service/iottwinmaker/api_op_GetMetadataTransferJob.go +++ b/service/iottwinmaker/api_op_GetMetadataTransferJob.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetMetadataTransferJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMetadataTransferJobMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_GetPricingPlan.go b/service/iottwinmaker/api_op_GetPricingPlan.go index 072bdcfb8d0..4fda4c09432 100644 --- a/service/iottwinmaker/api_op_GetPricingPlan.go +++ b/service/iottwinmaker/api_op_GetPricingPlan.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetPricingPlanMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetPricingPlanMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_GetPropertyValue.go b/service/iottwinmaker/api_op_GetPropertyValue.go index 0cefba5fd32..d4bf8d050eb 100644 --- a/service/iottwinmaker/api_op_GetPropertyValue.go +++ b/service/iottwinmaker/api_op_GetPropertyValue.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetPropertyValueMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetPropertyValueMiddleware(stack); err != nil { return err } @@ -175,41 +178,6 @@ func (c *Client) addOperationGetPropertyValueMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opGetPropertyValueMiddleware struct { -} - -func (*endpointPrefix_opGetPropertyValueMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetPropertyValueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetPropertyValueMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetPropertyValueMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetPropertyValueAPIClient is a client that implements the GetPropertyValue -// operation. -type GetPropertyValueAPIClient interface { - GetPropertyValue(context.Context, *GetPropertyValueInput, ...func(*Options)) (*GetPropertyValueOutput, error) -} - -var _ GetPropertyValueAPIClient = (*Client)(nil) - // GetPropertyValuePaginatorOptions is the paginator options for GetPropertyValue type GetPropertyValuePaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -275,6 +243,9 @@ func (p *GetPropertyValuePaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPropertyValue(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -294,6 +265,41 @@ func (p *GetPropertyValuePaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opGetPropertyValueMiddleware struct { +} + +func (*endpointPrefix_opGetPropertyValueMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetPropertyValueMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetPropertyValueMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetPropertyValueMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetPropertyValueAPIClient is a client that implements the GetPropertyValue +// operation. +type GetPropertyValueAPIClient interface { + GetPropertyValue(context.Context, *GetPropertyValueInput, ...func(*Options)) (*GetPropertyValueOutput, error) +} + +var _ GetPropertyValueAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPropertyValue(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_GetPropertyValueHistory.go b/service/iottwinmaker/api_op_GetPropertyValueHistory.go index def82189efe..a57d7476250 100644 --- a/service/iottwinmaker/api_op_GetPropertyValueHistory.go +++ b/service/iottwinmaker/api_op_GetPropertyValueHistory.go @@ -180,6 +180,9 @@ func (c *Client) addOperationGetPropertyValueHistoryMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetPropertyValueHistoryMiddleware(stack); err != nil { return err } @@ -207,41 +210,6 @@ func (c *Client) addOperationGetPropertyValueHistoryMiddlewares(stack *middlewar return nil } -type endpointPrefix_opGetPropertyValueHistoryMiddleware struct { -} - -func (*endpointPrefix_opGetPropertyValueHistoryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetPropertyValueHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "data." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetPropertyValueHistoryMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetPropertyValueHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetPropertyValueHistoryAPIClient is a client that implements the -// GetPropertyValueHistory operation. -type GetPropertyValueHistoryAPIClient interface { - GetPropertyValueHistory(context.Context, *GetPropertyValueHistoryInput, ...func(*Options)) (*GetPropertyValueHistoryOutput, error) -} - -var _ GetPropertyValueHistoryAPIClient = (*Client)(nil) - // GetPropertyValueHistoryPaginatorOptions is the paginator options for // GetPropertyValueHistory type GetPropertyValueHistoryPaginatorOptions struct { @@ -309,6 +277,9 @@ func (p *GetPropertyValueHistoryPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPropertyValueHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -328,6 +299,41 @@ func (p *GetPropertyValueHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opGetPropertyValueHistoryMiddleware struct { +} + +func (*endpointPrefix_opGetPropertyValueHistoryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetPropertyValueHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "data." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetPropertyValueHistoryMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetPropertyValueHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetPropertyValueHistoryAPIClient is a client that implements the +// GetPropertyValueHistory operation. +type GetPropertyValueHistoryAPIClient interface { + GetPropertyValueHistory(context.Context, *GetPropertyValueHistoryInput, ...func(*Options)) (*GetPropertyValueHistoryOutput, error) +} + +var _ GetPropertyValueHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPropertyValueHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_GetScene.go b/service/iottwinmaker/api_op_GetScene.go index b388fff4b4e..9a527937503 100644 --- a/service/iottwinmaker/api_op_GetScene.go +++ b/service/iottwinmaker/api_op_GetScene.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetSceneMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSceneMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_GetSyncJob.go b/service/iottwinmaker/api_op_GetSyncJob.go index 3fde1060b8f..bae675298bd 100644 --- a/service/iottwinmaker/api_op_GetSyncJob.go +++ b/service/iottwinmaker/api_op_GetSyncJob.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetSyncJobMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSyncJobMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_GetWorkspace.go b/service/iottwinmaker/api_op_GetWorkspace.go index 18a5c1f7242..2c1b080d188 100644 --- a/service/iottwinmaker/api_op_GetWorkspace.go +++ b/service/iottwinmaker/api_op_GetWorkspace.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetWorkspaceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetWorkspaceMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_ListComponentTypes.go b/service/iottwinmaker/api_op_ListComponentTypes.go index 2aa57e0eed6..7c42895f989 100644 --- a/service/iottwinmaker/api_op_ListComponentTypes.go +++ b/service/iottwinmaker/api_op_ListComponentTypes.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListComponentTypesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListComponentTypesMiddleware(stack); err != nil { return err } @@ -157,41 +160,6 @@ func (c *Client) addOperationListComponentTypesMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opListComponentTypesMiddleware struct { -} - -func (*endpointPrefix_opListComponentTypesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListComponentTypesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListComponentTypesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListComponentTypesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListComponentTypesAPIClient is a client that implements the ListComponentTypes -// operation. -type ListComponentTypesAPIClient interface { - ListComponentTypes(context.Context, *ListComponentTypesInput, ...func(*Options)) (*ListComponentTypesOutput, error) -} - -var _ ListComponentTypesAPIClient = (*Client)(nil) - // ListComponentTypesPaginatorOptions is the paginator options for // ListComponentTypes type ListComponentTypesPaginatorOptions struct { @@ -258,6 +226,9 @@ func (p *ListComponentTypesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponentTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +248,41 @@ func (p *ListComponentTypesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +type endpointPrefix_opListComponentTypesMiddleware struct { +} + +func (*endpointPrefix_opListComponentTypesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListComponentTypesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListComponentTypesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListComponentTypesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListComponentTypesAPIClient is a client that implements the ListComponentTypes +// operation. +type ListComponentTypesAPIClient interface { + ListComponentTypes(context.Context, *ListComponentTypesInput, ...func(*Options)) (*ListComponentTypesOutput, error) +} + +var _ ListComponentTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponentTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListComponents.go b/service/iottwinmaker/api_op_ListComponents.go index 9cc207a104d..df7a3048a88 100644 --- a/service/iottwinmaker/api_op_ListComponents.go +++ b/service/iottwinmaker/api_op_ListComponents.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListComponentsMiddleware(stack); err != nil { return err } @@ -154,41 +157,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListComponentsMiddleware struct { -} - -func (*endpointPrefix_opListComponentsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListComponentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListComponentsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListComponentsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum number of results returned at one time. The default is 25. @@ -252,6 +220,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +242,41 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListComponentsMiddleware struct { +} + +func (*endpointPrefix_opListComponentsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListComponentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListComponentsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListComponentsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListEntities.go b/service/iottwinmaker/api_op_ListEntities.go index 3bbdca232f5..aace789e8c2 100644 --- a/service/iottwinmaker/api_op_ListEntities.go +++ b/service/iottwinmaker/api_op_ListEntities.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListEntitiesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListEntitiesMiddleware(stack); err != nil { return err } @@ -149,40 +152,6 @@ func (c *Client) addOperationListEntitiesMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListEntitiesMiddleware struct { -} - -func (*endpointPrefix_opListEntitiesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListEntitiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListEntitiesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListEntitiesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListEntitiesAPIClient is a client that implements the ListEntities operation. -type ListEntitiesAPIClient interface { - ListEntities(context.Context, *ListEntitiesInput, ...func(*Options)) (*ListEntitiesOutput, error) -} - -var _ ListEntitiesAPIClient = (*Client)(nil) - // ListEntitiesPaginatorOptions is the paginator options for ListEntities type ListEntitiesPaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -248,6 +217,9 @@ func (p *ListEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +239,40 @@ func (p *ListEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListEntitiesMiddleware struct { +} + +func (*endpointPrefix_opListEntitiesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListEntitiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListEntitiesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListEntitiesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListEntitiesAPIClient is a client that implements the ListEntities operation. +type ListEntitiesAPIClient interface { + ListEntities(context.Context, *ListEntitiesInput, ...func(*Options)) (*ListEntitiesOutput, error) +} + +var _ ListEntitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListMetadataTransferJobs.go b/service/iottwinmaker/api_op_ListMetadataTransferJobs.go index e1d256356c9..624c357db8d 100644 --- a/service/iottwinmaker/api_op_ListMetadataTransferJobs.go +++ b/service/iottwinmaker/api_op_ListMetadataTransferJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListMetadataTransferJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListMetadataTransferJobsMiddleware(stack); err != nil { return err } @@ -152,41 +155,6 @@ func (c *Client) addOperationListMetadataTransferJobsMiddlewares(stack *middlewa return nil } -type endpointPrefix_opListMetadataTransferJobsMiddleware struct { -} - -func (*endpointPrefix_opListMetadataTransferJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMetadataTransferJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListMetadataTransferJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListMetadataTransferJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListMetadataTransferJobsAPIClient is a client that implements the -// ListMetadataTransferJobs operation. -type ListMetadataTransferJobsAPIClient interface { - ListMetadataTransferJobs(context.Context, *ListMetadataTransferJobsInput, ...func(*Options)) (*ListMetadataTransferJobsOutput, error) -} - -var _ ListMetadataTransferJobsAPIClient = (*Client)(nil) - // ListMetadataTransferJobsPaginatorOptions is the paginator options for // ListMetadataTransferJobs type ListMetadataTransferJobsPaginatorOptions struct { @@ -252,6 +220,9 @@ func (p *ListMetadataTransferJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetadataTransferJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +242,41 @@ func (p *ListMetadataTransferJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opListMetadataTransferJobsMiddleware struct { +} + +func (*endpointPrefix_opListMetadataTransferJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListMetadataTransferJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListMetadataTransferJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListMetadataTransferJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListMetadataTransferJobsAPIClient is a client that implements the +// ListMetadataTransferJobs operation. +type ListMetadataTransferJobsAPIClient interface { + ListMetadataTransferJobs(context.Context, *ListMetadataTransferJobsInput, ...func(*Options)) (*ListMetadataTransferJobsOutput, error) +} + +var _ ListMetadataTransferJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetadataTransferJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListProperties.go b/service/iottwinmaker/api_op_ListProperties.go index 2cbeb4d7ca3..324bc47c51f 100644 --- a/service/iottwinmaker/api_op_ListProperties.go +++ b/service/iottwinmaker/api_op_ListProperties.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListPropertiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListPropertiesMiddleware(stack); err != nil { return err } @@ -157,41 +160,6 @@ func (c *Client) addOperationListPropertiesMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListPropertiesMiddleware struct { -} - -func (*endpointPrefix_opListPropertiesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListPropertiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListPropertiesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListPropertiesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListPropertiesAPIClient is a client that implements the ListProperties -// operation. -type ListPropertiesAPIClient interface { - ListProperties(context.Context, *ListPropertiesInput, ...func(*Options)) (*ListPropertiesOutput, error) -} - -var _ ListPropertiesAPIClient = (*Client)(nil) - // ListPropertiesPaginatorOptions is the paginator options for ListProperties type ListPropertiesPaginatorOptions struct { // The maximum number of results returned at one time. The default is 25. @@ -255,6 +223,9 @@ func (p *ListPropertiesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProperties(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +245,41 @@ func (p *ListPropertiesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListPropertiesMiddleware struct { +} + +func (*endpointPrefix_opListPropertiesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListPropertiesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListPropertiesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListPropertiesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListPropertiesAPIClient is a client that implements the ListProperties +// operation. +type ListPropertiesAPIClient interface { + ListProperties(context.Context, *ListPropertiesInput, ...func(*Options)) (*ListPropertiesOutput, error) +} + +var _ ListPropertiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListScenes.go b/service/iottwinmaker/api_op_ListScenes.go index 115c00baacf..8677bac52cc 100644 --- a/service/iottwinmaker/api_op_ListScenes.go +++ b/service/iottwinmaker/api_op_ListScenes.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListScenesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListScenesMiddleware(stack); err != nil { return err } @@ -142,40 +145,6 @@ func (c *Client) addOperationListScenesMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opListScenesMiddleware struct { -} - -func (*endpointPrefix_opListScenesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListScenesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListScenesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListScenesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListScenesAPIClient is a client that implements the ListScenes operation. -type ListScenesAPIClient interface { - ListScenes(context.Context, *ListScenesInput, ...func(*Options)) (*ListScenesOutput, error) -} - -var _ ListScenesAPIClient = (*Client)(nil) - // ListScenesPaginatorOptions is the paginator options for ListScenes type ListScenesPaginatorOptions struct { // Specifies the maximum number of results to display. @@ -239,6 +208,9 @@ func (p *ListScenesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScenes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +230,40 @@ func (p *ListScenesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +type endpointPrefix_opListScenesMiddleware struct { +} + +func (*endpointPrefix_opListScenesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListScenesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListScenesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListScenesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListScenesAPIClient is a client that implements the ListScenes operation. +type ListScenesAPIClient interface { + ListScenes(context.Context, *ListScenesInput, ...func(*Options)) (*ListScenesOutput, error) +} + +var _ ListScenesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScenes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListSyncJobs.go b/service/iottwinmaker/api_op_ListSyncJobs.go index 2f72767f92a..16f46bf9bef 100644 --- a/service/iottwinmaker/api_op_ListSyncJobs.go +++ b/service/iottwinmaker/api_op_ListSyncJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListSyncJobsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSyncJobsMiddleware(stack); err != nil { return err } @@ -144,40 +147,6 @@ func (c *Client) addOperationListSyncJobsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListSyncJobsMiddleware struct { -} - -func (*endpointPrefix_opListSyncJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSyncJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSyncJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSyncJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSyncJobsAPIClient is a client that implements the ListSyncJobs operation. -type ListSyncJobsAPIClient interface { - ListSyncJobs(context.Context, *ListSyncJobsInput, ...func(*Options)) (*ListSyncJobsOutput, error) -} - -var _ ListSyncJobsAPIClient = (*Client)(nil) - // ListSyncJobsPaginatorOptions is the paginator options for ListSyncJobs type ListSyncJobsPaginatorOptions struct { // The maximum number of results to return at one time. The default is 50. @@ -243,6 +212,9 @@ func (p *ListSyncJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSyncJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +234,40 @@ func (p *ListSyncJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListSyncJobsMiddleware struct { +} + +func (*endpointPrefix_opListSyncJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSyncJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSyncJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSyncJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSyncJobsAPIClient is a client that implements the ListSyncJobs operation. +type ListSyncJobsAPIClient interface { + ListSyncJobs(context.Context, *ListSyncJobsInput, ...func(*Options)) (*ListSyncJobsOutput, error) +} + +var _ ListSyncJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSyncJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListSyncResources.go b/service/iottwinmaker/api_op_ListSyncResources.go index ce2460379b0..6dd47060ae7 100644 --- a/service/iottwinmaker/api_op_ListSyncResources.go +++ b/service/iottwinmaker/api_op_ListSyncResources.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListSyncResourcesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSyncResourcesMiddleware(stack); err != nil { return err } @@ -162,41 +165,6 @@ func (c *Client) addOperationListSyncResourcesMiddlewares(stack *middleware.Stac return nil } -type endpointPrefix_opListSyncResourcesMiddleware struct { -} - -func (*endpointPrefix_opListSyncResourcesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSyncResourcesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSyncResourcesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSyncResourcesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSyncResourcesAPIClient is a client that implements the ListSyncResources -// operation. -type ListSyncResourcesAPIClient interface { - ListSyncResources(context.Context, *ListSyncResourcesInput, ...func(*Options)) (*ListSyncResourcesOutput, error) -} - -var _ ListSyncResourcesAPIClient = (*Client)(nil) - // ListSyncResourcesPaginatorOptions is the paginator options for ListSyncResources type ListSyncResourcesPaginatorOptions struct { // The maximum number of results to return at one time. The default is 50. @@ -262,6 +230,9 @@ func (p *ListSyncResourcesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSyncResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -281,6 +252,41 @@ func (p *ListSyncResourcesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +type endpointPrefix_opListSyncResourcesMiddleware struct { +} + +func (*endpointPrefix_opListSyncResourcesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSyncResourcesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSyncResourcesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSyncResourcesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSyncResourcesAPIClient is a client that implements the ListSyncResources +// operation. +type ListSyncResourcesAPIClient interface { + ListSyncResources(context.Context, *ListSyncResourcesInput, ...func(*Options)) (*ListSyncResourcesOutput, error) +} + +var _ ListSyncResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSyncResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_ListTagsForResource.go b/service/iottwinmaker/api_op_ListTagsForResource.go index acbbfddbcf2..717c1deb808 100644 --- a/service/iottwinmaker/api_op_ListTagsForResource.go +++ b/service/iottwinmaker/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_ListWorkspaces.go b/service/iottwinmaker/api_op_ListWorkspaces.go index c4ed96ff22c..da092f4f2d0 100644 --- a/service/iottwinmaker/api_op_ListWorkspaces.go +++ b/service/iottwinmaker/api_op_ListWorkspaces.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListWorkspacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListWorkspacesMiddleware(stack); err != nil { return err } @@ -136,41 +139,6 @@ func (c *Client) addOperationListWorkspacesMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListWorkspacesMiddleware struct { -} - -func (*endpointPrefix_opListWorkspacesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListWorkspacesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListWorkspacesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListWorkspacesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListWorkspacesAPIClient is a client that implements the ListWorkspaces -// operation. -type ListWorkspacesAPIClient interface { - ListWorkspaces(context.Context, *ListWorkspacesInput, ...func(*Options)) (*ListWorkspacesOutput, error) -} - -var _ ListWorkspacesAPIClient = (*Client)(nil) - // ListWorkspacesPaginatorOptions is the paginator options for ListWorkspaces type ListWorkspacesPaginatorOptions struct { // The maximum number of results to return at one time. The default is 25. @@ -236,6 +204,9 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkspaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +226,41 @@ func (p *ListWorkspacesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListWorkspacesMiddleware struct { +} + +func (*endpointPrefix_opListWorkspacesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListWorkspacesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListWorkspacesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListWorkspacesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListWorkspacesAPIClient is a client that implements the ListWorkspaces +// operation. +type ListWorkspacesAPIClient interface { + ListWorkspaces(context.Context, *ListWorkspacesInput, ...func(*Options)) (*ListWorkspacesOutput, error) +} + +var _ ListWorkspacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iottwinmaker/api_op_TagResource.go b/service/iottwinmaker/api_op_TagResource.go index d6b4b9d61b1..fa5fcace753 100644 --- a/service/iottwinmaker/api_op_TagResource.go +++ b/service/iottwinmaker/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_UntagResource.go b/service/iottwinmaker/api_op_UntagResource.go index 403541d2fee..bea427ed0f5 100644 --- a/service/iottwinmaker/api_op_UntagResource.go +++ b/service/iottwinmaker/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_UpdateComponentType.go b/service/iottwinmaker/api_op_UpdateComponentType.go index 7aec3e56e7e..a0599439356 100644 --- a/service/iottwinmaker/api_op_UpdateComponentType.go +++ b/service/iottwinmaker/api_op_UpdateComponentType.go @@ -156,6 +156,9 @@ func (c *Client) addOperationUpdateComponentTypeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateComponentTypeMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_UpdateEntity.go b/service/iottwinmaker/api_op_UpdateEntity.go index 3b74e4e6139..330f2f90564 100644 --- a/service/iottwinmaker/api_op_UpdateEntity.go +++ b/service/iottwinmaker/api_op_UpdateEntity.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateEntityMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateEntityMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_UpdatePricingPlan.go b/service/iottwinmaker/api_op_UpdatePricingPlan.go index f091127b74c..318c30332a0 100644 --- a/service/iottwinmaker/api_op_UpdatePricingPlan.go +++ b/service/iottwinmaker/api_op_UpdatePricingPlan.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdatePricingPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdatePricingPlanMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_UpdateScene.go b/service/iottwinmaker/api_op_UpdateScene.go index d69032d8997..e2d3c1eb411 100644 --- a/service/iottwinmaker/api_op_UpdateScene.go +++ b/service/iottwinmaker/api_op_UpdateScene.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSceneMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateSceneMiddleware(stack); err != nil { return err } diff --git a/service/iottwinmaker/api_op_UpdateWorkspace.go b/service/iottwinmaker/api_op_UpdateWorkspace.go index 40beb237215..d0909a31129 100644 --- a/service/iottwinmaker/api_op_UpdateWorkspace.go +++ b/service/iottwinmaker/api_op_UpdateWorkspace.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateWorkspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateWorkspaceMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_client.go b/service/iotwireless/api_client.go index 7c385491168..32780facf7f 100644 --- a/service/iotwireless/api_client.go +++ b/service/iotwireless/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go b/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go index c521a4bc0a8..199bbfcb5fb 100644 --- a/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go +++ b/service/iotwireless/api_op_AssociateAwsAccountWithPartnerAccount.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAssociateAwsAccountWithPartnerAccountMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateAwsAccountWithPartnerAccountMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_AssociateMulticastGroupWithFuotaTask.go b/service/iotwireless/api_op_AssociateMulticastGroupWithFuotaTask.go index 7ecf35c8a54..e4ec9aee22e 100644 --- a/service/iotwireless/api_op_AssociateMulticastGroupWithFuotaTask.go +++ b/service/iotwireless/api_op_AssociateMulticastGroupWithFuotaTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateMulticastGroupWithFuotaTaskMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateMulticastGroupWithFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_AssociateWirelessDeviceWithFuotaTask.go b/service/iotwireless/api_op_AssociateWirelessDeviceWithFuotaTask.go index 9d5b5f93350..78062e0cd24 100644 --- a/service/iotwireless/api_op_AssociateWirelessDeviceWithFuotaTask.go +++ b/service/iotwireless/api_op_AssociateWirelessDeviceWithFuotaTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateWirelessDeviceWithFuotaTaskMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWirelessDeviceWithFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_AssociateWirelessDeviceWithMulticastGroup.go b/service/iotwireless/api_op_AssociateWirelessDeviceWithMulticastGroup.go index 256c040dc78..a2eba64f533 100644 --- a/service/iotwireless/api_op_AssociateWirelessDeviceWithMulticastGroup.go +++ b/service/iotwireless/api_op_AssociateWirelessDeviceWithMulticastGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateWirelessDeviceWithMulticastGroupMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWirelessDeviceWithMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_AssociateWirelessDeviceWithThing.go b/service/iotwireless/api_op_AssociateWirelessDeviceWithThing.go index 1aecba0d71f..d5e84c2ed4b 100644 --- a/service/iotwireless/api_op_AssociateWirelessDeviceWithThing.go +++ b/service/iotwireless/api_op_AssociateWirelessDeviceWithThing.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateWirelessDeviceWithThingMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWirelessDeviceWithThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_AssociateWirelessGatewayWithCertificate.go b/service/iotwireless/api_op_AssociateWirelessGatewayWithCertificate.go index ffa66ddf96b..f28a98a0484 100644 --- a/service/iotwireless/api_op_AssociateWirelessGatewayWithCertificate.go +++ b/service/iotwireless/api_op_AssociateWirelessGatewayWithCertificate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationAssociateWirelessGatewayWithCertificateMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWirelessGatewayWithCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_AssociateWirelessGatewayWithThing.go b/service/iotwireless/api_op_AssociateWirelessGatewayWithThing.go index 6c58381e332..c6fb5989228 100644 --- a/service/iotwireless/api_op_AssociateWirelessGatewayWithThing.go +++ b/service/iotwireless/api_op_AssociateWirelessGatewayWithThing.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateWirelessGatewayWithThingMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWirelessGatewayWithThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_CancelMulticastGroupSession.go b/service/iotwireless/api_op_CancelMulticastGroupSession.go index 26ef2cfa49a..055a805f4eb 100644 --- a/service/iotwireless/api_op_CancelMulticastGroupSession.go +++ b/service/iotwireless/api_op_CancelMulticastGroupSession.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelMulticastGroupSessionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMulticastGroupSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateDestination.go b/service/iotwireless/api_op_CreateDestination.go index 57a5c5745df..e9f591703b7 100644 --- a/service/iotwireless/api_op_CreateDestination.go +++ b/service/iotwireless/api_op_CreateDestination.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateDestinationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDestinationMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateDeviceProfile.go b/service/iotwireless/api_op_CreateDeviceProfile.go index f0194daa4fd..bf599b2d44a 100644 --- a/service/iotwireless/api_op_CreateDeviceProfile.go +++ b/service/iotwireless/api_op_CreateDeviceProfile.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateDeviceProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDeviceProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateFuotaTask.go b/service/iotwireless/api_op_CreateFuotaTask.go index 41ac694cbb6..3a9bf2472aa 100644 --- a/service/iotwireless/api_op_CreateFuotaTask.go +++ b/service/iotwireless/api_op_CreateFuotaTask.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateFuotaTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFuotaTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateMulticastGroup.go b/service/iotwireless/api_op_CreateMulticastGroup.go index 5178a4a1fab..ab70a9960a7 100644 --- a/service/iotwireless/api_op_CreateMulticastGroup.go +++ b/service/iotwireless/api_op_CreateMulticastGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateMulticastGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMulticastGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go index 49af2409aac..b4ba299fea7 100644 --- a/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go +++ b/service/iotwireless/api_op_CreateNetworkAnalyzerConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateNetworkAnalyzerConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkAnalyzerConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateServiceProfile.go b/service/iotwireless/api_op_CreateServiceProfile.go index 3a7a444e3ae..ee7627a259a 100644 --- a/service/iotwireless/api_op_CreateServiceProfile.go +++ b/service/iotwireless/api_op_CreateServiceProfile.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateServiceProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateWirelessDevice.go b/service/iotwireless/api_op_CreateWirelessDevice.go index facad93fc7f..38d9d7835f4 100644 --- a/service/iotwireless/api_op_CreateWirelessDevice.go +++ b/service/iotwireless/api_op_CreateWirelessDevice.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateWirelessDeviceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWirelessDeviceMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateWirelessGateway.go b/service/iotwireless/api_op_CreateWirelessGateway.go index 0ac18685b31..2be60a98878 100644 --- a/service/iotwireless/api_op_CreateWirelessGateway.go +++ b/service/iotwireless/api_op_CreateWirelessGateway.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateWirelessGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWirelessGatewayMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateWirelessGatewayTask.go b/service/iotwireless/api_op_CreateWirelessGatewayTask.go index 7bbd5ef771e..0f84fabaf5b 100644 --- a/service/iotwireless/api_op_CreateWirelessGatewayTask.go +++ b/service/iotwireless/api_op_CreateWirelessGatewayTask.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateWirelessGatewayTaskMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWirelessGatewayTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go b/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go index acf75ce94f7..931167e5d58 100644 --- a/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go +++ b/service/iotwireless/api_op_CreateWirelessGatewayTaskDefinition.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateWirelessGatewayTaskDefinitionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWirelessGatewayTaskDefinitionMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteDestination.go b/service/iotwireless/api_op_DeleteDestination.go index 9b35f0a854a..b10b36213bb 100644 --- a/service/iotwireless/api_op_DeleteDestination.go +++ b/service/iotwireless/api_op_DeleteDestination.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDestinationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteDeviceProfile.go b/service/iotwireless/api_op_DeleteDeviceProfile.go index 90d5b3fb563..3edf98b1303 100644 --- a/service/iotwireless/api_op_DeleteDeviceProfile.go +++ b/service/iotwireless/api_op_DeleteDeviceProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDeviceProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeviceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteFuotaTask.go b/service/iotwireless/api_op_DeleteFuotaTask.go index 9d22820d0f8..63e4790226e 100644 --- a/service/iotwireless/api_op_DeleteFuotaTask.go +++ b/service/iotwireless/api_op_DeleteFuotaTask.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFuotaTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteMulticastGroup.go b/service/iotwireless/api_op_DeleteMulticastGroup.go index ca0346851c3..4abad3a6daa 100644 --- a/service/iotwireless/api_op_DeleteMulticastGroup.go +++ b/service/iotwireless/api_op_DeleteMulticastGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMulticastGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_DeleteNetworkAnalyzerConfiguration.go index ae75f259ca4..03d2d50b025 100644 --- a/service/iotwireless/api_op_DeleteNetworkAnalyzerConfiguration.go +++ b/service/iotwireless/api_op_DeleteNetworkAnalyzerConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteNetworkAnalyzerConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkAnalyzerConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteQueuedMessages.go b/service/iotwireless/api_op_DeleteQueuedMessages.go index 93bd3bddb5d..2dacdf59b4d 100644 --- a/service/iotwireless/api_op_DeleteQueuedMessages.go +++ b/service/iotwireless/api_op_DeleteQueuedMessages.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteQueuedMessagesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueuedMessagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteServiceProfile.go b/service/iotwireless/api_op_DeleteServiceProfile.go index fcc05505a7e..31e377fecd2 100644 --- a/service/iotwireless/api_op_DeleteServiceProfile.go +++ b/service/iotwireless/api_op_DeleteServiceProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteServiceProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteWirelessDevice.go b/service/iotwireless/api_op_DeleteWirelessDevice.go index 456ab9b70b6..1200e29cf0b 100644 --- a/service/iotwireless/api_op_DeleteWirelessDevice.go +++ b/service/iotwireless/api_op_DeleteWirelessDevice.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteWirelessDeviceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWirelessDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteWirelessDeviceImportTask.go b/service/iotwireless/api_op_DeleteWirelessDeviceImportTask.go index fa559de0b99..8c7b0c414c0 100644 --- a/service/iotwireless/api_op_DeleteWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_DeleteWirelessDeviceImportTask.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteWirelessDeviceImportTaskMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWirelessDeviceImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteWirelessGateway.go b/service/iotwireless/api_op_DeleteWirelessGateway.go index 87bbaf19234..a400a6c6785 100644 --- a/service/iotwireless/api_op_DeleteWirelessGateway.go +++ b/service/iotwireless/api_op_DeleteWirelessGateway.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteWirelessGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWirelessGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteWirelessGatewayTask.go b/service/iotwireless/api_op_DeleteWirelessGatewayTask.go index 162121e0d7a..5c42a45a7b8 100644 --- a/service/iotwireless/api_op_DeleteWirelessGatewayTask.go +++ b/service/iotwireless/api_op_DeleteWirelessGatewayTask.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteWirelessGatewayTaskMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWirelessGatewayTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeleteWirelessGatewayTaskDefinition.go b/service/iotwireless/api_op_DeleteWirelessGatewayTaskDefinition.go index e134787d09a..ebf712a2263 100644 --- a/service/iotwireless/api_op_DeleteWirelessGatewayTaskDefinition.go +++ b/service/iotwireless/api_op_DeleteWirelessGatewayTaskDefinition.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteWirelessGatewayTaskDefinitionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWirelessGatewayTaskDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DeregisterWirelessDevice.go b/service/iotwireless/api_op_DeregisterWirelessDevice.go index 217ca5a5b5c..96f1185e948 100644 --- a/service/iotwireless/api_op_DeregisterWirelessDevice.go +++ b/service/iotwireless/api_op_DeregisterWirelessDevice.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeregisterWirelessDeviceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterWirelessDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateAwsAccountFromPartnerAccount.go b/service/iotwireless/api_op_DisassociateAwsAccountFromPartnerAccount.go index 8f583eec267..f40a00791ca 100644 --- a/service/iotwireless/api_op_DisassociateAwsAccountFromPartnerAccount.go +++ b/service/iotwireless/api_op_DisassociateAwsAccountFromPartnerAccount.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisassociateAwsAccountFromPartnerAccountMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAwsAccountFromPartnerAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateMulticastGroupFromFuotaTask.go b/service/iotwireless/api_op_DisassociateMulticastGroupFromFuotaTask.go index c44f8ca0160..605f70dd41a 100644 --- a/service/iotwireless/api_op_DisassociateMulticastGroupFromFuotaTask.go +++ b/service/iotwireless/api_op_DisassociateMulticastGroupFromFuotaTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateMulticastGroupFromFuotaTaskMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMulticastGroupFromFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateWirelessDeviceFromFuotaTask.go b/service/iotwireless/api_op_DisassociateWirelessDeviceFromFuotaTask.go index 7baffe8990e..2989071181a 100644 --- a/service/iotwireless/api_op_DisassociateWirelessDeviceFromFuotaTask.go +++ b/service/iotwireless/api_op_DisassociateWirelessDeviceFromFuotaTask.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateWirelessDeviceFromFuotaTaskMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWirelessDeviceFromFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateWirelessDeviceFromMulticastGroup.go b/service/iotwireless/api_op_DisassociateWirelessDeviceFromMulticastGroup.go index 3d68828f09f..0fbc919c0bd 100644 --- a/service/iotwireless/api_op_DisassociateWirelessDeviceFromMulticastGroup.go +++ b/service/iotwireless/api_op_DisassociateWirelessDeviceFromMulticastGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateWirelessDeviceFromMulticastGroupMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWirelessDeviceFromMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateWirelessDeviceFromThing.go b/service/iotwireless/api_op_DisassociateWirelessDeviceFromThing.go index b4b0c1f20bb..bfa5dd6eaa2 100644 --- a/service/iotwireless/api_op_DisassociateWirelessDeviceFromThing.go +++ b/service/iotwireless/api_op_DisassociateWirelessDeviceFromThing.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateWirelessDeviceFromThingMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWirelessDeviceFromThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateWirelessGatewayFromCertificate.go b/service/iotwireless/api_op_DisassociateWirelessGatewayFromCertificate.go index 1744f4278d6..3c5e647c977 100644 --- a/service/iotwireless/api_op_DisassociateWirelessGatewayFromCertificate.go +++ b/service/iotwireless/api_op_DisassociateWirelessGatewayFromCertificate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateWirelessGatewayFromCertificateMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWirelessGatewayFromCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_DisassociateWirelessGatewayFromThing.go b/service/iotwireless/api_op_DisassociateWirelessGatewayFromThing.go index 88368d9506f..5534c12e22a 100644 --- a/service/iotwireless/api_op_DisassociateWirelessGatewayFromThing.go +++ b/service/iotwireless/api_op_DisassociateWirelessGatewayFromThing.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateWirelessGatewayFromThingMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWirelessGatewayFromThingValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetDestination.go b/service/iotwireless/api_op_GetDestination.go index bbc586fae06..c97784ce48f 100644 --- a/service/iotwireless/api_op_GetDestination.go +++ b/service/iotwireless/api_op_GetDestination.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetDestinationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetDeviceProfile.go b/service/iotwireless/api_op_GetDeviceProfile.go index f16a93307b6..841503c6323 100644 --- a/service/iotwireless/api_op_GetDeviceProfile.go +++ b/service/iotwireless/api_op_GetDeviceProfile.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDeviceProfileMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetEventConfigurationByResourceTypes.go b/service/iotwireless/api_op_GetEventConfigurationByResourceTypes.go index 9dcaeb6a270..913b1f14608 100644 --- a/service/iotwireless/api_op_GetEventConfigurationByResourceTypes.go +++ b/service/iotwireless/api_op_GetEventConfigurationByResourceTypes.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetEventConfigurationByResourceTypesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEventConfigurationByResourceTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_GetFuotaTask.go b/service/iotwireless/api_op_GetFuotaTask.go index 38bc18afbd5..4d440f71165 100644 --- a/service/iotwireless/api_op_GetFuotaTask.go +++ b/service/iotwireless/api_op_GetFuotaTask.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetFuotaTaskMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go b/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go index 83809c1c3f6..040eba239b0 100644 --- a/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go +++ b/service/iotwireless/api_op_GetLogLevelsByResourceTypes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetLogLevelsByResourceTypesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLogLevelsByResourceTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_GetMetricConfiguration.go b/service/iotwireless/api_op_GetMetricConfiguration.go index 4fa288d78d8..164b2a3539b 100644 --- a/service/iotwireless/api_op_GetMetricConfiguration.go +++ b/service/iotwireless/api_op_GetMetricConfiguration.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetMetricConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMetricConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_GetMetrics.go b/service/iotwireless/api_op_GetMetrics.go index 4db0efe184f..e90545fc833 100644 --- a/service/iotwireless/api_op_GetMetrics.go +++ b/service/iotwireless/api_op_GetMetrics.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetMetricsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMetrics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_GetMulticastGroup.go b/service/iotwireless/api_op_GetMulticastGroup.go index f462f0cee7f..f3febeb9194 100644 --- a/service/iotwireless/api_op_GetMulticastGroup.go +++ b/service/iotwireless/api_op_GetMulticastGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetMulticastGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetMulticastGroupSession.go b/service/iotwireless/api_op_GetMulticastGroupSession.go index 5207455c5be..f6e61a4aecb 100644 --- a/service/iotwireless/api_op_GetMulticastGroupSession.go +++ b/service/iotwireless/api_op_GetMulticastGroupSession.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetMulticastGroupSessionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMulticastGroupSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go index cbd0088c62b..2cb762d293c 100644 --- a/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go +++ b/service/iotwireless/api_op_GetNetworkAnalyzerConfiguration.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetNetworkAnalyzerConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkAnalyzerConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetPartnerAccount.go b/service/iotwireless/api_op_GetPartnerAccount.go index a4b497114a3..dbc0666111a 100644 --- a/service/iotwireless/api_op_GetPartnerAccount.go +++ b/service/iotwireless/api_op_GetPartnerAccount.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetPartnerAccountMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPartnerAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetPosition.go b/service/iotwireless/api_op_GetPosition.go index 525b482ce31..339802f403e 100644 --- a/service/iotwireless/api_op_GetPosition.go +++ b/service/iotwireless/api_op_GetPosition.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetPositionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetPositionConfiguration.go b/service/iotwireless/api_op_GetPositionConfiguration.go index 2e5f65fc9e5..178aab75867 100644 --- a/service/iotwireless/api_op_GetPositionConfiguration.go +++ b/service/iotwireless/api_op_GetPositionConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetPositionConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPositionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetPositionEstimate.go b/service/iotwireless/api_op_GetPositionEstimate.go index 56f48129fed..6beaf48bd88 100644 --- a/service/iotwireless/api_op_GetPositionEstimate.go +++ b/service/iotwireless/api_op_GetPositionEstimate.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetPositionEstimateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPositionEstimateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetResourceEventConfiguration.go b/service/iotwireless/api_op_GetResourceEventConfiguration.go index dc5d1918871..70b093c094b 100644 --- a/service/iotwireless/api_op_GetResourceEventConfiguration.go +++ b/service/iotwireless/api_op_GetResourceEventConfiguration.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetResourceEventConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceEventConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetResourceLogLevel.go b/service/iotwireless/api_op_GetResourceLogLevel.go index cc2876e49ee..f6d7e9fe46a 100644 --- a/service/iotwireless/api_op_GetResourceLogLevel.go +++ b/service/iotwireless/api_op_GetResourceLogLevel.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetResourceLogLevelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceLogLevelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetResourcePosition.go b/service/iotwireless/api_op_GetResourcePosition.go index 0a7225d72f7..6a3a957d220 100644 --- a/service/iotwireless/api_op_GetResourcePosition.go +++ b/service/iotwireless/api_op_GetResourcePosition.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetResourcePositionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetServiceEndpoint.go b/service/iotwireless/api_op_GetServiceEndpoint.go index a732e60ddbc..6907c041772 100644 --- a/service/iotwireless/api_op_GetServiceEndpoint.go +++ b/service/iotwireless/api_op_GetServiceEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetServiceEndpointMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceEndpoint(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_GetServiceProfile.go b/service/iotwireless/api_op_GetServiceProfile.go index b5aa4cf5482..82c81778faf 100644 --- a/service/iotwireless/api_op_GetServiceProfile.go +++ b/service/iotwireless/api_op_GetServiceProfile.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetServiceProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessDevice.go b/service/iotwireless/api_op_GetWirelessDevice.go index b0876e3889f..e43d0f3f3e4 100644 --- a/service/iotwireless/api_op_GetWirelessDevice.go +++ b/service/iotwireless/api_op_GetWirelessDevice.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetWirelessDeviceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessDeviceImportTask.go b/service/iotwireless/api_op_GetWirelessDeviceImportTask.go index 5b63882f309..590618b75dc 100644 --- a/service/iotwireless/api_op_GetWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_GetWirelessDeviceImportTask.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetWirelessDeviceImportTaskMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessDeviceImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessDeviceStatistics.go b/service/iotwireless/api_op_GetWirelessDeviceStatistics.go index e84735e8148..847012c5b30 100644 --- a/service/iotwireless/api_op_GetWirelessDeviceStatistics.go +++ b/service/iotwireless/api_op_GetWirelessDeviceStatistics.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetWirelessDeviceStatisticsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessDeviceStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessGateway.go b/service/iotwireless/api_op_GetWirelessGateway.go index 86821ec3549..2829b7107fa 100644 --- a/service/iotwireless/api_op_GetWirelessGateway.go +++ b/service/iotwireless/api_op_GetWirelessGateway.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetWirelessGatewayMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessGatewayCertificate.go b/service/iotwireless/api_op_GetWirelessGatewayCertificate.go index 36eeb4c1a36..c2dbb5cd5af 100644 --- a/service/iotwireless/api_op_GetWirelessGatewayCertificate.go +++ b/service/iotwireless/api_op_GetWirelessGatewayCertificate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetWirelessGatewayCertificateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessGatewayCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessGatewayFirmwareInformation.go b/service/iotwireless/api_op_GetWirelessGatewayFirmwareInformation.go index c17a5047c9b..2032f1fec5c 100644 --- a/service/iotwireless/api_op_GetWirelessGatewayFirmwareInformation.go +++ b/service/iotwireless/api_op_GetWirelessGatewayFirmwareInformation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetWirelessGatewayFirmwareInformationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessGatewayFirmwareInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessGatewayStatistics.go b/service/iotwireless/api_op_GetWirelessGatewayStatistics.go index 72c30914a24..22c469fbc99 100644 --- a/service/iotwireless/api_op_GetWirelessGatewayStatistics.go +++ b/service/iotwireless/api_op_GetWirelessGatewayStatistics.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetWirelessGatewayStatisticsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessGatewayStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessGatewayTask.go b/service/iotwireless/api_op_GetWirelessGatewayTask.go index 4418cd787d5..272d01dba88 100644 --- a/service/iotwireless/api_op_GetWirelessGatewayTask.go +++ b/service/iotwireless/api_op_GetWirelessGatewayTask.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetWirelessGatewayTaskMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessGatewayTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_GetWirelessGatewayTaskDefinition.go b/service/iotwireless/api_op_GetWirelessGatewayTaskDefinition.go index 712540feaf1..b9a16728299 100644 --- a/service/iotwireless/api_op_GetWirelessGatewayTaskDefinition.go +++ b/service/iotwireless/api_op_GetWirelessGatewayTaskDefinition.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetWirelessGatewayTaskDefinitionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWirelessGatewayTaskDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_ListDestinations.go b/service/iotwireless/api_op_ListDestinations.go index 303a1dcc9e1..808205e7c1a 100644 --- a/service/iotwireless/api_op_ListDestinations.go +++ b/service/iotwireless/api_op_ListDestinations.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListDestinationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDestinations(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListDestinationsMiddlewares(stack *middleware.Stack return nil } -// ListDestinationsAPIClient is a client that implements the ListDestinations -// operation. -type ListDestinationsAPIClient interface { - ListDestinations(context.Context, *ListDestinationsInput, ...func(*Options)) (*ListDestinationsOutput, error) -} - -var _ ListDestinationsAPIClient = (*Client)(nil) - // ListDestinationsPaginatorOptions is the paginator options for ListDestinations type ListDestinationsPaginatorOptions struct { // The maximum number of results to return in this operation. @@ -200,6 +195,9 @@ func (p *ListDestinationsPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *ListDestinationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListDestinationsAPIClient is a client that implements the ListDestinations +// operation. +type ListDestinationsAPIClient interface { + ListDestinations(context.Context, *ListDestinationsInput, ...func(*Options)) (*ListDestinationsOutput, error) +} + +var _ ListDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListDeviceProfiles.go b/service/iotwireless/api_op_ListDeviceProfiles.go index 7d031057aae..155ccab6f60 100644 --- a/service/iotwireless/api_op_ListDeviceProfiles.go +++ b/service/iotwireless/api_op_ListDeviceProfiles.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListDeviceProfilesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceProfiles(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListDeviceProfilesMiddlewares(stack *middleware.Sta return nil } -// ListDeviceProfilesAPIClient is a client that implements the ListDeviceProfiles -// operation. -type ListDeviceProfilesAPIClient interface { - ListDeviceProfiles(context.Context, *ListDeviceProfilesInput, ...func(*Options)) (*ListDeviceProfilesOutput, error) -} - -var _ ListDeviceProfilesAPIClient = (*Client)(nil) - // ListDeviceProfilesPaginatorOptions is the paginator options for // ListDeviceProfiles type ListDeviceProfilesPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListDeviceProfilesPaginator) NextPage(ctx context.Context, optFns ...fu params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeviceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListDeviceProfilesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListDeviceProfilesAPIClient is a client that implements the ListDeviceProfiles +// operation. +type ListDeviceProfilesAPIClient interface { + ListDeviceProfiles(context.Context, *ListDeviceProfilesInput, ...func(*Options)) (*ListDeviceProfilesOutput, error) +} + +var _ ListDeviceProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeviceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListDevicesForWirelessDeviceImportTask.go b/service/iotwireless/api_op_ListDevicesForWirelessDeviceImportTask.go index 7eaf786c0ed..de74ca14760 100644 --- a/service/iotwireless/api_op_ListDevicesForWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_ListDevicesForWirelessDeviceImportTask.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListDevicesForWirelessDeviceImportTaskMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevicesForWirelessDeviceImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_ListEventConfigurations.go b/service/iotwireless/api_op_ListEventConfigurations.go index ab8c38f9b2f..dc95aa63ab7 100644 --- a/service/iotwireless/api_op_ListEventConfigurations.go +++ b/service/iotwireless/api_op_ListEventConfigurations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListEventConfigurationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEventConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_ListFuotaTasks.go b/service/iotwireless/api_op_ListFuotaTasks.go index aca0b09b568..f733af50295 100644 --- a/service/iotwireless/api_op_ListFuotaTasks.go +++ b/service/iotwireless/api_op_ListFuotaTasks.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListFuotaTasksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFuotaTasks(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListFuotaTasksMiddlewares(stack *middleware.Stack, return nil } -// ListFuotaTasksAPIClient is a client that implements the ListFuotaTasks -// operation. -type ListFuotaTasksAPIClient interface { - ListFuotaTasks(context.Context, *ListFuotaTasksInput, ...func(*Options)) (*ListFuotaTasksOutput, error) -} - -var _ ListFuotaTasksAPIClient = (*Client)(nil) - // ListFuotaTasksPaginatorOptions is the paginator options for ListFuotaTasks type ListFuotaTasksPaginatorOptions struct { // The maximum number of results to return in this operation. @@ -200,6 +195,9 @@ func (p *ListFuotaTasksPaginator) NextPage(ctx context.Context, optFns ...func(* params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFuotaTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *ListFuotaTasksPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListFuotaTasksAPIClient is a client that implements the ListFuotaTasks +// operation. +type ListFuotaTasksAPIClient interface { + ListFuotaTasks(context.Context, *ListFuotaTasksInput, ...func(*Options)) (*ListFuotaTasksOutput, error) +} + +var _ ListFuotaTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFuotaTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListMulticastGroups.go b/service/iotwireless/api_op_ListMulticastGroups.go index 208d376ccb8..83e359dc6ac 100644 --- a/service/iotwireless/api_op_ListMulticastGroups.go +++ b/service/iotwireless/api_op_ListMulticastGroups.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListMulticastGroupsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMulticastGroups(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListMulticastGroupsMiddlewares(stack *middleware.St return nil } -// ListMulticastGroupsAPIClient is a client that implements the -// ListMulticastGroups operation. -type ListMulticastGroupsAPIClient interface { - ListMulticastGroups(context.Context, *ListMulticastGroupsInput, ...func(*Options)) (*ListMulticastGroupsOutput, error) -} - -var _ ListMulticastGroupsAPIClient = (*Client)(nil) - // ListMulticastGroupsPaginatorOptions is the paginator options for // ListMulticastGroups type ListMulticastGroupsPaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *ListMulticastGroupsPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMulticastGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *ListMulticastGroupsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListMulticastGroupsAPIClient is a client that implements the +// ListMulticastGroups operation. +type ListMulticastGroupsAPIClient interface { + ListMulticastGroups(context.Context, *ListMulticastGroupsInput, ...func(*Options)) (*ListMulticastGroupsOutput, error) +} + +var _ ListMulticastGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMulticastGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go b/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go index 8331cc79776..284f19a4dfa 100644 --- a/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go +++ b/service/iotwireless/api_op_ListMulticastGroupsByFuotaTask.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListMulticastGroupsByFuotaTaskMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMulticastGroupsByFuotaTaskValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListMulticastGroupsByFuotaTaskMiddlewares(stack *mi return nil } -// ListMulticastGroupsByFuotaTaskAPIClient is a client that implements the -// ListMulticastGroupsByFuotaTask operation. -type ListMulticastGroupsByFuotaTaskAPIClient interface { - ListMulticastGroupsByFuotaTask(context.Context, *ListMulticastGroupsByFuotaTaskInput, ...func(*Options)) (*ListMulticastGroupsByFuotaTaskOutput, error) -} - -var _ ListMulticastGroupsByFuotaTaskAPIClient = (*Client)(nil) - // ListMulticastGroupsByFuotaTaskPaginatorOptions is the paginator options for // ListMulticastGroupsByFuotaTask type ListMulticastGroupsByFuotaTaskPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListMulticastGroupsByFuotaTaskPaginator) NextPage(ctx context.Context, params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMulticastGroupsByFuotaTask(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListMulticastGroupsByFuotaTaskPaginator) NextPage(ctx context.Context, return result, nil } +// ListMulticastGroupsByFuotaTaskAPIClient is a client that implements the +// ListMulticastGroupsByFuotaTask operation. +type ListMulticastGroupsByFuotaTaskAPIClient interface { + ListMulticastGroupsByFuotaTask(context.Context, *ListMulticastGroupsByFuotaTaskInput, ...func(*Options)) (*ListMulticastGroupsByFuotaTaskOutput, error) +} + +var _ ListMulticastGroupsByFuotaTaskAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMulticastGroupsByFuotaTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListNetworkAnalyzerConfigurations.go b/service/iotwireless/api_op_ListNetworkAnalyzerConfigurations.go index ad83279b94d..89c3e15871f 100644 --- a/service/iotwireless/api_op_ListNetworkAnalyzerConfigurations.go +++ b/service/iotwireless/api_op_ListNetworkAnalyzerConfigurations.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListNetworkAnalyzerConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworkAnalyzerConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListNetworkAnalyzerConfigurationsMiddlewares(stack return nil } -// ListNetworkAnalyzerConfigurationsAPIClient is a client that implements the -// ListNetworkAnalyzerConfigurations operation. -type ListNetworkAnalyzerConfigurationsAPIClient interface { - ListNetworkAnalyzerConfigurations(context.Context, *ListNetworkAnalyzerConfigurationsInput, ...func(*Options)) (*ListNetworkAnalyzerConfigurationsOutput, error) -} - -var _ ListNetworkAnalyzerConfigurationsAPIClient = (*Client)(nil) - // ListNetworkAnalyzerConfigurationsPaginatorOptions is the paginator options for // ListNetworkAnalyzerConfigurations type ListNetworkAnalyzerConfigurationsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListNetworkAnalyzerConfigurationsPaginator) NextPage(ctx context.Contex params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNetworkAnalyzerConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListNetworkAnalyzerConfigurationsPaginator) NextPage(ctx context.Contex return result, nil } +// ListNetworkAnalyzerConfigurationsAPIClient is a client that implements the +// ListNetworkAnalyzerConfigurations operation. +type ListNetworkAnalyzerConfigurationsAPIClient interface { + ListNetworkAnalyzerConfigurations(context.Context, *ListNetworkAnalyzerConfigurationsInput, ...func(*Options)) (*ListNetworkAnalyzerConfigurationsOutput, error) +} + +var _ ListNetworkAnalyzerConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNetworkAnalyzerConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListPartnerAccounts.go b/service/iotwireless/api_op_ListPartnerAccounts.go index 9d5c032b351..9bd057749ce 100644 --- a/service/iotwireless/api_op_ListPartnerAccounts.go +++ b/service/iotwireless/api_op_ListPartnerAccounts.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListPartnerAccountsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPartnerAccounts(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_ListPositionConfigurations.go b/service/iotwireless/api_op_ListPositionConfigurations.go index 6898cc3c756..00f20822588 100644 --- a/service/iotwireless/api_op_ListPositionConfigurations.go +++ b/service/iotwireless/api_op_ListPositionConfigurations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPositionConfigurationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPositionConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPositionConfigurationsMiddlewares(stack *middle return nil } -// ListPositionConfigurationsAPIClient is a client that implements the -// ListPositionConfigurations operation. -type ListPositionConfigurationsAPIClient interface { - ListPositionConfigurations(context.Context, *ListPositionConfigurationsInput, ...func(*Options)) (*ListPositionConfigurationsOutput, error) -} - -var _ ListPositionConfigurationsAPIClient = (*Client)(nil) - // ListPositionConfigurationsPaginatorOptions is the paginator options for // ListPositionConfigurations type ListPositionConfigurationsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListPositionConfigurationsPaginator) NextPage(ctx context.Context, optF params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPositionConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListPositionConfigurationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPositionConfigurationsAPIClient is a client that implements the +// ListPositionConfigurations operation. +type ListPositionConfigurationsAPIClient interface { + ListPositionConfigurations(context.Context, *ListPositionConfigurationsInput, ...func(*Options)) (*ListPositionConfigurationsOutput, error) +} + +var _ ListPositionConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPositionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListQueuedMessages.go b/service/iotwireless/api_op_ListQueuedMessages.go index 66e83e8718c..1acaeabbb25 100644 --- a/service/iotwireless/api_op_ListQueuedMessages.go +++ b/service/iotwireless/api_op_ListQueuedMessages.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListQueuedMessagesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQueuedMessagesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListQueuedMessagesMiddlewares(stack *middleware.Sta return nil } -// ListQueuedMessagesAPIClient is a client that implements the ListQueuedMessages -// operation. -type ListQueuedMessagesAPIClient interface { - ListQueuedMessages(context.Context, *ListQueuedMessagesInput, ...func(*Options)) (*ListQueuedMessagesOutput, error) -} - -var _ ListQueuedMessagesAPIClient = (*Client)(nil) - // ListQueuedMessagesPaginatorOptions is the paginator options for // ListQueuedMessages type ListQueuedMessagesPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListQueuedMessagesPaginator) NextPage(ctx context.Context, optFns ...fu params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueuedMessages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListQueuedMessagesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListQueuedMessagesAPIClient is a client that implements the ListQueuedMessages +// operation. +type ListQueuedMessagesAPIClient interface { + ListQueuedMessages(context.Context, *ListQueuedMessagesInput, ...func(*Options)) (*ListQueuedMessagesOutput, error) +} + +var _ ListQueuedMessagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueuedMessages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListServiceProfiles.go b/service/iotwireless/api_op_ListServiceProfiles.go index 404e2126da9..6facb75e1cc 100644 --- a/service/iotwireless/api_op_ListServiceProfiles.go +++ b/service/iotwireless/api_op_ListServiceProfiles.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListServiceProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceProfiles(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListServiceProfilesMiddlewares(stack *middleware.St return nil } -// ListServiceProfilesAPIClient is a client that implements the -// ListServiceProfiles operation. -type ListServiceProfilesAPIClient interface { - ListServiceProfiles(context.Context, *ListServiceProfilesInput, ...func(*Options)) (*ListServiceProfilesOutput, error) -} - -var _ ListServiceProfilesAPIClient = (*Client)(nil) - // ListServiceProfilesPaginatorOptions is the paginator options for // ListServiceProfiles type ListServiceProfilesPaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *ListServiceProfilesPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *ListServiceProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListServiceProfilesAPIClient is a client that implements the +// ListServiceProfiles operation. +type ListServiceProfilesAPIClient interface { + ListServiceProfiles(context.Context, *ListServiceProfilesInput, ...func(*Options)) (*ListServiceProfilesOutput, error) +} + +var _ ListServiceProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListTagsForResource.go b/service/iotwireless/api_op_ListTagsForResource.go index ad2384606f0..d753a797ffa 100644 --- a/service/iotwireless/api_op_ListTagsForResource.go +++ b/service/iotwireless/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_ListWirelessDeviceImportTasks.go b/service/iotwireless/api_op_ListWirelessDeviceImportTasks.go index 90ac4fad833..6316ea70072 100644 --- a/service/iotwireless/api_op_ListWirelessDeviceImportTasks.go +++ b/service/iotwireless/api_op_ListWirelessDeviceImportTasks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListWirelessDeviceImportTasksMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWirelessDeviceImportTasks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_ListWirelessDevices.go b/service/iotwireless/api_op_ListWirelessDevices.go index 11b0ef44df6..ff38f2fbfd9 100644 --- a/service/iotwireless/api_op_ListWirelessDevices.go +++ b/service/iotwireless/api_op_ListWirelessDevices.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListWirelessDevicesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWirelessDevices(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListWirelessDevicesMiddlewares(stack *middleware.St return nil } -// ListWirelessDevicesAPIClient is a client that implements the -// ListWirelessDevices operation. -type ListWirelessDevicesAPIClient interface { - ListWirelessDevices(context.Context, *ListWirelessDevicesInput, ...func(*Options)) (*ListWirelessDevicesOutput, error) -} - -var _ ListWirelessDevicesAPIClient = (*Client)(nil) - // ListWirelessDevicesPaginatorOptions is the paginator options for // ListWirelessDevices type ListWirelessDevicesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListWirelessDevicesPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWirelessDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListWirelessDevicesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListWirelessDevicesAPIClient is a client that implements the +// ListWirelessDevices operation. +type ListWirelessDevicesAPIClient interface { + ListWirelessDevices(context.Context, *ListWirelessDevicesInput, ...func(*Options)) (*ListWirelessDevicesOutput, error) +} + +var _ ListWirelessDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWirelessDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_ListWirelessGatewayTaskDefinitions.go b/service/iotwireless/api_op_ListWirelessGatewayTaskDefinitions.go index 3fe13ea983f..433cdcf3914 100644 --- a/service/iotwireless/api_op_ListWirelessGatewayTaskDefinitions.go +++ b/service/iotwireless/api_op_ListWirelessGatewayTaskDefinitions.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListWirelessGatewayTaskDefinitionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWirelessGatewayTaskDefinitions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_ListWirelessGateways.go b/service/iotwireless/api_op_ListWirelessGateways.go index 1d8b8060183..67ca9382720 100644 --- a/service/iotwireless/api_op_ListWirelessGateways.go +++ b/service/iotwireless/api_op_ListWirelessGateways.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListWirelessGatewaysMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWirelessGateways(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListWirelessGatewaysMiddlewares(stack *middleware.S return nil } -// ListWirelessGatewaysAPIClient is a client that implements the -// ListWirelessGateways operation. -type ListWirelessGatewaysAPIClient interface { - ListWirelessGateways(context.Context, *ListWirelessGatewaysInput, ...func(*Options)) (*ListWirelessGatewaysOutput, error) -} - -var _ ListWirelessGatewaysAPIClient = (*Client)(nil) - // ListWirelessGatewaysPaginatorOptions is the paginator options for // ListWirelessGateways type ListWirelessGatewaysPaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *ListWirelessGatewaysPaginator) NextPage(ctx context.Context, optFns ... params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWirelessGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *ListWirelessGatewaysPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListWirelessGatewaysAPIClient is a client that implements the +// ListWirelessGateways operation. +type ListWirelessGatewaysAPIClient interface { + ListWirelessGateways(context.Context, *ListWirelessGatewaysInput, ...func(*Options)) (*ListWirelessGatewaysOutput, error) +} + +var _ ListWirelessGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWirelessGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotwireless/api_op_PutPositionConfiguration.go b/service/iotwireless/api_op_PutPositionConfiguration.go index b578b4a079b..8db359ec827 100644 --- a/service/iotwireless/api_op_PutPositionConfiguration.go +++ b/service/iotwireless/api_op_PutPositionConfiguration.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutPositionConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPositionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_PutResourceLogLevel.go b/service/iotwireless/api_op_PutResourceLogLevel.go index 15e260dd171..40316e0a7c6 100644 --- a/service/iotwireless/api_op_PutResourceLogLevel.go +++ b/service/iotwireless/api_op_PutResourceLogLevel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutResourceLogLevelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourceLogLevelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_ResetAllResourceLogLevels.go b/service/iotwireless/api_op_ResetAllResourceLogLevels.go index 04aa32891f6..31ebd93b87f 100644 --- a/service/iotwireless/api_op_ResetAllResourceLogLevels.go +++ b/service/iotwireless/api_op_ResetAllResourceLogLevels.go @@ -96,6 +96,9 @@ func (c *Client) addOperationResetAllResourceLogLevelsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetAllResourceLogLevels(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_ResetResourceLogLevel.go b/service/iotwireless/api_op_ResetResourceLogLevel.go index e46575a50d3..f42881fa9b8 100644 --- a/service/iotwireless/api_op_ResetResourceLogLevel.go +++ b/service/iotwireless/api_op_ResetResourceLogLevel.go @@ -108,6 +108,9 @@ func (c *Client) addOperationResetResourceLogLevelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetResourceLogLevelValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_SendDataToMulticastGroup.go b/service/iotwireless/api_op_SendDataToMulticastGroup.go index 4c6df9ea5be..034b87c337f 100644 --- a/service/iotwireless/api_op_SendDataToMulticastGroup.go +++ b/service/iotwireless/api_op_SendDataToMulticastGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSendDataToMulticastGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendDataToMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_SendDataToWirelessDevice.go b/service/iotwireless/api_op_SendDataToWirelessDevice.go index 407ee532069..c95497a4a90 100644 --- a/service/iotwireless/api_op_SendDataToWirelessDevice.go +++ b/service/iotwireless/api_op_SendDataToWirelessDevice.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSendDataToWirelessDeviceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendDataToWirelessDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_StartBulkAssociateWirelessDeviceWithMulticastGroup.go b/service/iotwireless/api_op_StartBulkAssociateWirelessDeviceWithMulticastGroup.go index 4922027b6b4..98c1e0b3b2c 100644 --- a/service/iotwireless/api_op_StartBulkAssociateWirelessDeviceWithMulticastGroup.go +++ b/service/iotwireless/api_op_StartBulkAssociateWirelessDeviceWithMulticastGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartBulkAssociateWirelessDeviceWithMulticastGroupM if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBulkAssociateWirelessDeviceWithMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_StartBulkDisassociateWirelessDeviceFromMulticastGroup.go b/service/iotwireless/api_op_StartBulkDisassociateWirelessDeviceFromMulticastGroup.go index f19327f176b..a87cacc8d6b 100644 --- a/service/iotwireless/api_op_StartBulkDisassociateWirelessDeviceFromMulticastGroup.go +++ b/service/iotwireless/api_op_StartBulkDisassociateWirelessDeviceFromMulticastGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartBulkDisassociateWirelessDeviceFromMulticastGro if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBulkDisassociateWirelessDeviceFromMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_StartFuotaTask.go b/service/iotwireless/api_op_StartFuotaTask.go index e68f82d8855..0a387a214ba 100644 --- a/service/iotwireless/api_op_StartFuotaTask.go +++ b/service/iotwireless/api_op_StartFuotaTask.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStartFuotaTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_StartMulticastGroupSession.go b/service/iotwireless/api_op_StartMulticastGroupSession.go index aea4466c4b6..64e6adc90c1 100644 --- a/service/iotwireless/api_op_StartMulticastGroupSession.go +++ b/service/iotwireless/api_op_StartMulticastGroupSession.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartMulticastGroupSessionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMulticastGroupSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go b/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go index 3fc9a8e4200..a70fc5a5aff 100644 --- a/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_StartSingleWirelessDeviceImportTask.go @@ -134,6 +134,9 @@ func (c *Client) addOperationStartSingleWirelessDeviceImportTaskMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSingleWirelessDeviceImportTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_StartWirelessDeviceImportTask.go b/service/iotwireless/api_op_StartWirelessDeviceImportTask.go index d6183f3b3af..3a7a3591cc3 100644 --- a/service/iotwireless/api_op_StartWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_StartWirelessDeviceImportTask.go @@ -133,6 +133,9 @@ func (c *Client) addOperationStartWirelessDeviceImportTaskMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartWirelessDeviceImportTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/iotwireless/api_op_TagResource.go b/service/iotwireless/api_op_TagResource.go index e52d5d60888..a37996b15d6 100644 --- a/service/iotwireless/api_op_TagResource.go +++ b/service/iotwireless/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_TestWirelessDevice.go b/service/iotwireless/api_op_TestWirelessDevice.go index 28732c94a79..1705b740f7e 100644 --- a/service/iotwireless/api_op_TestWirelessDevice.go +++ b/service/iotwireless/api_op_TestWirelessDevice.go @@ -105,6 +105,9 @@ func (c *Client) addOperationTestWirelessDeviceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestWirelessDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UntagResource.go b/service/iotwireless/api_op_UntagResource.go index f92c1a38cc1..3decedbad01 100644 --- a/service/iotwireless/api_op_UntagResource.go +++ b/service/iotwireless/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateDestination.go b/service/iotwireless/api_op_UpdateDestination.go index 682fc7aa81f..6975b4bce6b 100644 --- a/service/iotwireless/api_op_UpdateDestination.go +++ b/service/iotwireless/api_op_UpdateDestination.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateDestinationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateEventConfigurationByResourceTypes.go b/service/iotwireless/api_op_UpdateEventConfigurationByResourceTypes.go index c39243ffcb2..340bffd7914 100644 --- a/service/iotwireless/api_op_UpdateEventConfigurationByResourceTypes.go +++ b/service/iotwireless/api_op_UpdateEventConfigurationByResourceTypes.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateEventConfigurationByResourceTypesMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventConfigurationByResourceTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateFuotaTask.go b/service/iotwireless/api_op_UpdateFuotaTask.go index f10e48bc5a8..a93dfd1b436 100644 --- a/service/iotwireless/api_op_UpdateFuotaTask.go +++ b/service/iotwireless/api_op_UpdateFuotaTask.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateFuotaTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFuotaTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go b/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go index 288c53a4f28..0478fe09826 100644 --- a/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go +++ b/service/iotwireless/api_op_UpdateLogLevelsByResourceTypes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateLogLevelsByResourceTypesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLogLevelsByResourceTypesValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateMetricConfiguration.go b/service/iotwireless/api_op_UpdateMetricConfiguration.go index 20f265c8f3e..57381c60772 100644 --- a/service/iotwireless/api_op_UpdateMetricConfiguration.go +++ b/service/iotwireless/api_op_UpdateMetricConfiguration.go @@ -100,6 +100,9 @@ func (c *Client) addOperationUpdateMetricConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMetricConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateMulticastGroup.go b/service/iotwireless/api_op_UpdateMulticastGroup.go index 820a28eba6d..b9824c51202 100644 --- a/service/iotwireless/api_op_UpdateMulticastGroup.go +++ b/service/iotwireless/api_op_UpdateMulticastGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateMulticastGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMulticastGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go b/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go index 1a91d9cdc9f..a04b8543dfb 100644 --- a/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go +++ b/service/iotwireless/api_op_UpdateNetworkAnalyzerConfiguration.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateNetworkAnalyzerConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNetworkAnalyzerConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdatePartnerAccount.go b/service/iotwireless/api_op_UpdatePartnerAccount.go index ac4ea4c7396..8c7fc54ea6c 100644 --- a/service/iotwireless/api_op_UpdatePartnerAccount.go +++ b/service/iotwireless/api_op_UpdatePartnerAccount.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdatePartnerAccountMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePartnerAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdatePosition.go b/service/iotwireless/api_op_UpdatePosition.go index 75e62cb80e6..712b0fe6902 100644 --- a/service/iotwireless/api_op_UpdatePosition.go +++ b/service/iotwireless/api_op_UpdatePosition.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdatePositionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateResourceEventConfiguration.go b/service/iotwireless/api_op_UpdateResourceEventConfiguration.go index 9f008fbd3ef..c2f8bd09b90 100644 --- a/service/iotwireless/api_op_UpdateResourceEventConfiguration.go +++ b/service/iotwireless/api_op_UpdateResourceEventConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateResourceEventConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceEventConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateResourcePosition.go b/service/iotwireless/api_op_UpdateResourcePosition.go index 7fdda26e91c..c0f010b55da 100644 --- a/service/iotwireless/api_op_UpdateResourcePosition.go +++ b/service/iotwireless/api_op_UpdateResourcePosition.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateResourcePositionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourcePositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateWirelessDevice.go b/service/iotwireless/api_op_UpdateWirelessDevice.go index fee32cd895a..0ecf5ca18ea 100644 --- a/service/iotwireless/api_op_UpdateWirelessDevice.go +++ b/service/iotwireless/api_op_UpdateWirelessDevice.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateWirelessDeviceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWirelessDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateWirelessDeviceImportTask.go b/service/iotwireless/api_op_UpdateWirelessDeviceImportTask.go index 26b8bc05f1b..25b5798d1cc 100644 --- a/service/iotwireless/api_op_UpdateWirelessDeviceImportTask.go +++ b/service/iotwireless/api_op_UpdateWirelessDeviceImportTask.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateWirelessDeviceImportTaskMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWirelessDeviceImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/iotwireless/api_op_UpdateWirelessGateway.go b/service/iotwireless/api_op_UpdateWirelessGateway.go index 6168e946515..6069d89b82e 100644 --- a/service/iotwireless/api_op_UpdateWirelessGateway.go +++ b/service/iotwireless/api_op_UpdateWirelessGateway.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateWirelessGatewayMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWirelessGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_client.go b/service/ivs/api_client.go index 9942d9d58a0..bc7072bd450 100644 --- a/service/ivs/api_client.go +++ b/service/ivs/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ivs/api_op_BatchGetChannel.go b/service/ivs/api_op_BatchGetChannel.go index 79bd32b2f56..1053f33f303 100644 --- a/service/ivs/api_op_BatchGetChannel.go +++ b/service/ivs/api_op_BatchGetChannel.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_BatchGetStreamKey.go b/service/ivs/api_op_BatchGetStreamKey.go index d794a0ce734..e1df1d15a67 100644 --- a/service/ivs/api_op_BatchGetStreamKey.go +++ b/service/ivs/api_op_BatchGetStreamKey.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchGetStreamKeyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetStreamKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_BatchStartViewerSessionRevocation.go b/service/ivs/api_op_BatchStartViewerSessionRevocation.go index 692d3982dca..7ed45e897c3 100644 --- a/service/ivs/api_op_BatchStartViewerSessionRevocation.go +++ b/service/ivs/api_op_BatchStartViewerSessionRevocation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationBatchStartViewerSessionRevocationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchStartViewerSessionRevocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_CreateChannel.go b/service/ivs/api_op_CreateChannel.go index 929738ad063..b1f4f3ded89 100644 --- a/service/ivs/api_op_CreateChannel.go +++ b/service/ivs/api_op_CreateChannel.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannel(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ivs/api_op_CreatePlaybackRestrictionPolicy.go b/service/ivs/api_op_CreatePlaybackRestrictionPolicy.go index dd1e1927329..6c871190ee3 100644 --- a/service/ivs/api_op_CreatePlaybackRestrictionPolicy.go +++ b/service/ivs/api_op_CreatePlaybackRestrictionPolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreatePlaybackRestrictionPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePlaybackRestrictionPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ivs/api_op_CreateRecordingConfiguration.go b/service/ivs/api_op_CreateRecordingConfiguration.go index 2580081f6b0..5f9686dcc29 100644 --- a/service/ivs/api_op_CreateRecordingConfiguration.go +++ b/service/ivs/api_op_CreateRecordingConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateRecordingConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRecordingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_CreateStreamKey.go b/service/ivs/api_op_CreateStreamKey.go index d044d6f7e31..dfe52bab7af 100644 --- a/service/ivs/api_op_CreateStreamKey.go +++ b/service/ivs/api_op_CreateStreamKey.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateStreamKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_DeleteChannel.go b/service/ivs/api_op_DeleteChannel.go index 287a0ecba4d..c00fc7bbab2 100644 --- a/service/ivs/api_op_DeleteChannel.go +++ b/service/ivs/api_op_DeleteChannel.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_DeletePlaybackKeyPair.go b/service/ivs/api_op_DeletePlaybackKeyPair.go index 75f4d0d8d52..860aaff2f12 100644 --- a/service/ivs/api_op_DeletePlaybackKeyPair.go +++ b/service/ivs/api_op_DeletePlaybackKeyPair.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeletePlaybackKeyPairMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePlaybackKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_DeletePlaybackRestrictionPolicy.go b/service/ivs/api_op_DeletePlaybackRestrictionPolicy.go index b05e584a403..2c076aae3a3 100644 --- a/service/ivs/api_op_DeletePlaybackRestrictionPolicy.go +++ b/service/ivs/api_op_DeletePlaybackRestrictionPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePlaybackRestrictionPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePlaybackRestrictionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_DeleteRecordingConfiguration.go b/service/ivs/api_op_DeleteRecordingConfiguration.go index e0dda89217d..4cf36f173f4 100644 --- a/service/ivs/api_op_DeleteRecordingConfiguration.go +++ b/service/ivs/api_op_DeleteRecordingConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteRecordingConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecordingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_DeleteStreamKey.go b/service/ivs/api_op_DeleteStreamKey.go index 3c5d8c2e250..a3706d5af3b 100644 --- a/service/ivs/api_op_DeleteStreamKey.go +++ b/service/ivs/api_op_DeleteStreamKey.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteStreamKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStreamKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetChannel.go b/service/ivs/api_op_GetChannel.go index 56a5eab53c0..adb673b7558 100644 --- a/service/ivs/api_op_GetChannel.go +++ b/service/ivs/api_op_GetChannel.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetChannelMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetPlaybackKeyPair.go b/service/ivs/api_op_GetPlaybackKeyPair.go index 6363736e4dd..52f616a115a 100644 --- a/service/ivs/api_op_GetPlaybackKeyPair.go +++ b/service/ivs/api_op_GetPlaybackKeyPair.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetPlaybackKeyPairMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPlaybackKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetPlaybackRestrictionPolicy.go b/service/ivs/api_op_GetPlaybackRestrictionPolicy.go index 149b56bc535..1a46a3e425c 100644 --- a/service/ivs/api_op_GetPlaybackRestrictionPolicy.go +++ b/service/ivs/api_op_GetPlaybackRestrictionPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetPlaybackRestrictionPolicyMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPlaybackRestrictionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetRecordingConfiguration.go b/service/ivs/api_op_GetRecordingConfiguration.go index f45fb54c01b..51eb901da8b 100644 --- a/service/ivs/api_op_GetRecordingConfiguration.go +++ b/service/ivs/api_op_GetRecordingConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetRecordingConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecordingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetStream.go b/service/ivs/api_op_GetStream.go index 2e0d3b492da..2b8cb488fa7 100644 --- a/service/ivs/api_op_GetStream.go +++ b/service/ivs/api_op_GetStream.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetStreamMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetStreamKey.go b/service/ivs/api_op_GetStreamKey.go index ba6c6c73485..3ba5b2720be 100644 --- a/service/ivs/api_op_GetStreamKey.go +++ b/service/ivs/api_op_GetStreamKey.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetStreamKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_GetStreamSession.go b/service/ivs/api_op_GetStreamSession.go index f1e4f0fbc37..7db012d907d 100644 --- a/service/ivs/api_op_GetStreamSession.go +++ b/service/ivs/api_op_GetStreamSession.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetStreamSessionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_ImportPlaybackKeyPair.go b/service/ivs/api_op_ImportPlaybackKeyPair.go index f1422c5b2a0..600ad6c4043 100644 --- a/service/ivs/api_op_ImportPlaybackKeyPair.go +++ b/service/ivs/api_op_ImportPlaybackKeyPair.go @@ -122,6 +122,9 @@ func (c *Client) addOperationImportPlaybackKeyPairMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportPlaybackKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_ListChannels.go b/service/ivs/api_op_ListChannels.go index 99f59b8f906..3ea2dbe6ef8 100644 --- a/service/ivs/api_op_ListChannels.go +++ b/service/ivs/api_op_ListChannels.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // Maximum number of channels to return. Default: 100. @@ -218,6 +214,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListPlaybackKeyPairs.go b/service/ivs/api_op_ListPlaybackKeyPairs.go index ad022314b59..f0b1d64b245 100644 --- a/service/ivs/api_op_ListPlaybackKeyPairs.go +++ b/service/ivs/api_op_ListPlaybackKeyPairs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPlaybackKeyPairsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlaybackKeyPairs(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListPlaybackKeyPairsMiddlewares(stack *middleware.S return nil } -// ListPlaybackKeyPairsAPIClient is a client that implements the -// ListPlaybackKeyPairs operation. -type ListPlaybackKeyPairsAPIClient interface { - ListPlaybackKeyPairs(context.Context, *ListPlaybackKeyPairsInput, ...func(*Options)) (*ListPlaybackKeyPairsOutput, error) -} - -var _ ListPlaybackKeyPairsAPIClient = (*Client)(nil) - // ListPlaybackKeyPairsPaginatorOptions is the paginator options for // ListPlaybackKeyPairs type ListPlaybackKeyPairsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListPlaybackKeyPairsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlaybackKeyPairs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListPlaybackKeyPairsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListPlaybackKeyPairsAPIClient is a client that implements the +// ListPlaybackKeyPairs operation. +type ListPlaybackKeyPairsAPIClient interface { + ListPlaybackKeyPairs(context.Context, *ListPlaybackKeyPairsInput, ...func(*Options)) (*ListPlaybackKeyPairsOutput, error) +} + +var _ ListPlaybackKeyPairsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlaybackKeyPairs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListPlaybackRestrictionPolicies.go b/service/ivs/api_op_ListPlaybackRestrictionPolicies.go index e91dd9f307f..d5277c59881 100644 --- a/service/ivs/api_op_ListPlaybackRestrictionPolicies.go +++ b/service/ivs/api_op_ListPlaybackRestrictionPolicies.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListPlaybackRestrictionPoliciesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlaybackRestrictionPolicies(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListPlaybackRestrictionPoliciesMiddlewares(stack *m return nil } -// ListPlaybackRestrictionPoliciesAPIClient is a client that implements the -// ListPlaybackRestrictionPolicies operation. -type ListPlaybackRestrictionPoliciesAPIClient interface { - ListPlaybackRestrictionPolicies(context.Context, *ListPlaybackRestrictionPoliciesInput, ...func(*Options)) (*ListPlaybackRestrictionPoliciesOutput, error) -} - -var _ ListPlaybackRestrictionPoliciesAPIClient = (*Client)(nil) - // ListPlaybackRestrictionPoliciesPaginatorOptions is the paginator options for // ListPlaybackRestrictionPolicies type ListPlaybackRestrictionPoliciesPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListPlaybackRestrictionPoliciesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlaybackRestrictionPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListPlaybackRestrictionPoliciesPaginator) NextPage(ctx context.Context, return result, nil } +// ListPlaybackRestrictionPoliciesAPIClient is a client that implements the +// ListPlaybackRestrictionPolicies operation. +type ListPlaybackRestrictionPoliciesAPIClient interface { + ListPlaybackRestrictionPolicies(context.Context, *ListPlaybackRestrictionPoliciesInput, ...func(*Options)) (*ListPlaybackRestrictionPoliciesOutput, error) +} + +var _ ListPlaybackRestrictionPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlaybackRestrictionPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListRecordingConfigurations.go b/service/ivs/api_op_ListRecordingConfigurations.go index 3dddc6f8c53..946ef4f836a 100644 --- a/service/ivs/api_op_ListRecordingConfigurations.go +++ b/service/ivs/api_op_ListRecordingConfigurations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListRecordingConfigurationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecordingConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListRecordingConfigurationsMiddlewares(stack *middl return nil } -// ListRecordingConfigurationsAPIClient is a client that implements the -// ListRecordingConfigurations operation. -type ListRecordingConfigurationsAPIClient interface { - ListRecordingConfigurations(context.Context, *ListRecordingConfigurationsInput, ...func(*Options)) (*ListRecordingConfigurationsOutput, error) -} - -var _ ListRecordingConfigurationsAPIClient = (*Client)(nil) - // ListRecordingConfigurationsPaginatorOptions is the paginator options for // ListRecordingConfigurations type ListRecordingConfigurationsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListRecordingConfigurationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecordingConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListRecordingConfigurationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListRecordingConfigurationsAPIClient is a client that implements the +// ListRecordingConfigurations operation. +type ListRecordingConfigurationsAPIClient interface { + ListRecordingConfigurations(context.Context, *ListRecordingConfigurationsInput, ...func(*Options)) (*ListRecordingConfigurationsOutput, error) +} + +var _ ListRecordingConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecordingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListStreamKeys.go b/service/ivs/api_op_ListStreamKeys.go index b547c2fad4e..8001fe41a2b 100644 --- a/service/ivs/api_op_ListStreamKeys.go +++ b/service/ivs/api_op_ListStreamKeys.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListStreamKeysMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStreamKeysValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListStreamKeysMiddlewares(stack *middleware.Stack, return nil } -// ListStreamKeysAPIClient is a client that implements the ListStreamKeys -// operation. -type ListStreamKeysAPIClient interface { - ListStreamKeys(context.Context, *ListStreamKeysInput, ...func(*Options)) (*ListStreamKeysOutput, error) -} - -var _ ListStreamKeysAPIClient = (*Client)(nil) - // ListStreamKeysPaginatorOptions is the paginator options for ListStreamKeys type ListStreamKeysPaginatorOptions struct { // Maximum number of streamKeys to return. Default: 1. @@ -214,6 +209,9 @@ func (p *ListStreamKeysPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListStreamKeysPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListStreamKeysAPIClient is a client that implements the ListStreamKeys +// operation. +type ListStreamKeysAPIClient interface { + ListStreamKeys(context.Context, *ListStreamKeysInput, ...func(*Options)) (*ListStreamKeysOutput, error) +} + +var _ ListStreamKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListStreamSessions.go b/service/ivs/api_op_ListStreamSessions.go index cab4a0488c0..490931c3e48 100644 --- a/service/ivs/api_op_ListStreamSessions.go +++ b/service/ivs/api_op_ListStreamSessions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListStreamSessionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStreamSessionsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListStreamSessionsMiddlewares(stack *middleware.Sta return nil } -// ListStreamSessionsAPIClient is a client that implements the ListStreamSessions -// operation. -type ListStreamSessionsAPIClient interface { - ListStreamSessions(context.Context, *ListStreamSessionsInput, ...func(*Options)) (*ListStreamSessionsOutput, error) -} - -var _ ListStreamSessionsAPIClient = (*Client)(nil) - // ListStreamSessionsPaginatorOptions is the paginator options for // ListStreamSessions type ListStreamSessionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListStreamSessionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListStreamSessionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListStreamSessionsAPIClient is a client that implements the ListStreamSessions +// operation. +type ListStreamSessionsAPIClient interface { + ListStreamSessions(context.Context, *ListStreamSessionsInput, ...func(*Options)) (*ListStreamSessionsOutput, error) +} + +var _ ListStreamSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListStreams.go b/service/ivs/api_op_ListStreams.go index 38906ab064b..9ab8e1cd6e4 100644 --- a/service/ivs/api_op_ListStreams.go +++ b/service/ivs/api_op_ListStreams.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt return nil } -// ListStreamsAPIClient is a client that implements the ListStreams operation. -type ListStreamsAPIClient interface { - ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) -} - -var _ ListStreamsAPIClient = (*Client)(nil) - // ListStreamsPaginatorOptions is the paginator options for ListStreams type ListStreamsPaginatorOptions struct { // Maximum number of streams to return. Default: 100. @@ -209,6 +205,9 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListStreamsAPIClient is a client that implements the ListStreams operation. +type ListStreamsAPIClient interface { + ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) +} + +var _ ListStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivs/api_op_ListTagsForResource.go b/service/ivs/api_op_ListTagsForResource.go index ff302dae671..1d2a484d61c 100644 --- a/service/ivs/api_op_ListTagsForResource.go +++ b/service/ivs/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_PutMetadata.go b/service/ivs/api_op_PutMetadata.go index 3141a084db3..0549de25adc 100644 --- a/service/ivs/api_op_PutMetadata.go +++ b/service/ivs/api_op_PutMetadata.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutMetadataMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_StartViewerSessionRevocation.go b/service/ivs/api_op_StartViewerSessionRevocation.go index ac9368f30d6..65ce243a62e 100644 --- a/service/ivs/api_op_StartViewerSessionRevocation.go +++ b/service/ivs/api_op_StartViewerSessionRevocation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationStartViewerSessionRevocationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartViewerSessionRevocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_StopStream.go b/service/ivs/api_op_StopStream.go index 78bd073b43e..82f10ebe420 100644 --- a/service/ivs/api_op_StopStream.go +++ b/service/ivs/api_op_StopStream.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopStreamMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_TagResource.go b/service/ivs/api_op_TagResource.go index d394883df81..2893249cef7 100644 --- a/service/ivs/api_op_TagResource.go +++ b/service/ivs/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_UntagResource.go b/service/ivs/api_op_UntagResource.go index de5c07cbc84..ac9b5312dc3 100644 --- a/service/ivs/api_op_UntagResource.go +++ b/service/ivs/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_UpdateChannel.go b/service/ivs/api_op_UpdateChannel.go index ebbd0679cbd..80ce677c67c 100644 --- a/service/ivs/api_op_UpdateChannel.go +++ b/service/ivs/api_op_UpdateChannel.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivs/api_op_UpdatePlaybackRestrictionPolicy.go b/service/ivs/api_op_UpdatePlaybackRestrictionPolicy.go index 4bab3287b19..e3e417d042a 100644 --- a/service/ivs/api_op_UpdatePlaybackRestrictionPolicy.go +++ b/service/ivs/api_op_UpdatePlaybackRestrictionPolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdatePlaybackRestrictionPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePlaybackRestrictionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_client.go b/service/ivschat/api_client.go index 49aac61bb24..6d66ea194a6 100644 --- a/service/ivschat/api_client.go +++ b/service/ivschat/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ivschat/api_op_CreateChatToken.go b/service/ivschat/api_op_CreateChatToken.go index d96e2da774a..306e9205f65 100644 --- a/service/ivschat/api_op_CreateChatToken.go +++ b/service/ivschat/api_op_CreateChatToken.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateChatTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChatTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_CreateLoggingConfiguration.go b/service/ivschat/api_op_CreateLoggingConfiguration.go index 5e24f19735c..295cca8455e 100644 --- a/service/ivschat/api_op_CreateLoggingConfiguration.go +++ b/service/ivschat/api_op_CreateLoggingConfiguration.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_CreateRoom.go b/service/ivschat/api_op_CreateRoom.go index cd383ffe63a..6f729841eba 100644 --- a/service/ivschat/api_op_CreateRoom.go +++ b/service/ivschat/api_op_CreateRoom.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateRoomMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRoom(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ivschat/api_op_DeleteLoggingConfiguration.go b/service/ivschat/api_op_DeleteLoggingConfiguration.go index 42c1fad83cd..969d15e7a8c 100644 --- a/service/ivschat/api_op_DeleteLoggingConfiguration.go +++ b/service/ivschat/api_op_DeleteLoggingConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_DeleteMessage.go b/service/ivschat/api_op_DeleteMessage.go index 9ce7f45e0b8..5525d3b98ce 100644 --- a/service/ivschat/api_op_DeleteMessage.go +++ b/service/ivschat/api_op_DeleteMessage.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_DeleteRoom.go b/service/ivschat/api_op_DeleteRoom.go index bc1d15a0679..66e24c25239 100644 --- a/service/ivschat/api_op_DeleteRoom.go +++ b/service/ivschat/api_op_DeleteRoom.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRoomMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoomValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_DisconnectUser.go b/service/ivschat/api_op_DisconnectUser.go index f5fba36eb76..eda346b9e92 100644 --- a/service/ivschat/api_op_DisconnectUser.go +++ b/service/ivschat/api_op_DisconnectUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisconnectUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisconnectUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_GetLoggingConfiguration.go b/service/ivschat/api_op_GetLoggingConfiguration.go index aee7c1e1863..deb81e0488e 100644 --- a/service/ivschat/api_op_GetLoggingConfiguration.go +++ b/service/ivschat/api_op_GetLoggingConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_GetRoom.go b/service/ivschat/api_op_GetRoom.go index cd6d98f6f81..ffeb2193936 100644 --- a/service/ivschat/api_op_GetRoom.go +++ b/service/ivschat/api_op_GetRoom.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetRoomMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoomValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_ListLoggingConfigurations.go b/service/ivschat/api_op_ListLoggingConfigurations.go index 1d6b5e24481..f0351ccc2b6 100644 --- a/service/ivschat/api_op_ListLoggingConfigurations.go +++ b/service/ivschat/api_op_ListLoggingConfigurations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggingConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middlew return nil } -// ListLoggingConfigurationsAPIClient is a client that implements the -// ListLoggingConfigurations operation. -type ListLoggingConfigurationsAPIClient interface { - ListLoggingConfigurations(context.Context, *ListLoggingConfigurationsInput, ...func(*Options)) (*ListLoggingConfigurationsOutput, error) -} - -var _ ListLoggingConfigurationsAPIClient = (*Client)(nil) - // ListLoggingConfigurationsPaginatorOptions is the paginator options for // ListLoggingConfigurations type ListLoggingConfigurationsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListLoggingConfigurationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLoggingConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListLoggingConfigurationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListLoggingConfigurationsAPIClient is a client that implements the +// ListLoggingConfigurations operation. +type ListLoggingConfigurationsAPIClient interface { + ListLoggingConfigurations(context.Context, *ListLoggingConfigurationsInput, ...func(*Options)) (*ListLoggingConfigurationsOutput, error) +} + +var _ ListLoggingConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLoggingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivschat/api_op_ListRooms.go b/service/ivschat/api_op_ListRooms.go index 0e3f08a7155..dbd5bcf6e3e 100644 --- a/service/ivschat/api_op_ListRooms.go +++ b/service/ivschat/api_op_ListRooms.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListRoomsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRooms(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListRoomsMiddlewares(stack *middleware.Stack, optio return nil } -// ListRoomsAPIClient is a client that implements the ListRooms operation. -type ListRoomsAPIClient interface { - ListRooms(context.Context, *ListRoomsInput, ...func(*Options)) (*ListRoomsOutput, error) -} - -var _ ListRoomsAPIClient = (*Client)(nil) - // ListRoomsPaginatorOptions is the paginator options for ListRooms type ListRoomsPaginatorOptions struct { // Maximum number of rooms to return. Default: 50. @@ -215,6 +211,9 @@ func (p *ListRoomsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRooms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListRoomsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRoomsAPIClient is a client that implements the ListRooms operation. +type ListRoomsAPIClient interface { + ListRooms(context.Context, *ListRoomsInput, ...func(*Options)) (*ListRoomsOutput, error) +} + +var _ ListRoomsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRooms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivschat/api_op_ListTagsForResource.go b/service/ivschat/api_op_ListTagsForResource.go index 7a10e683c70..362e9a910f3 100644 --- a/service/ivschat/api_op_ListTagsForResource.go +++ b/service/ivschat/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_SendEvent.go b/service/ivschat/api_op_SendEvent.go index 3ac58415ec2..7c74c83ac32 100644 --- a/service/ivschat/api_op_SendEvent.go +++ b/service/ivschat/api_op_SendEvent.go @@ -118,6 +118,9 @@ func (c *Client) addOperationSendEventMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_TagResource.go b/service/ivschat/api_op_TagResource.go index 1b8174ad2ed..07eabcb41de 100644 --- a/service/ivschat/api_op_TagResource.go +++ b/service/ivschat/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_UntagResource.go b/service/ivschat/api_op_UntagResource.go index f7187b490c4..2bc15d887ce 100644 --- a/service/ivschat/api_op_UntagResource.go +++ b/service/ivschat/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_UpdateLoggingConfiguration.go b/service/ivschat/api_op_UpdateLoggingConfiguration.go index e9f702e3c23..3cb6ee67ec9 100644 --- a/service/ivschat/api_op_UpdateLoggingConfiguration.go +++ b/service/ivschat/api_op_UpdateLoggingConfiguration.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivschat/api_op_UpdateRoom.go b/service/ivschat/api_op_UpdateRoom.go index 3ae47069f40..bc89d82b771 100644 --- a/service/ivschat/api_op_UpdateRoom.go +++ b/service/ivschat/api_op_UpdateRoom.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateRoomMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoomValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_client.go b/service/ivsrealtime/api_client.go index 6e93c653c5e..0f391d9b1f5 100644 --- a/service/ivsrealtime/api_client.go +++ b/service/ivsrealtime/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ivsrealtime/api_op_CreateEncoderConfiguration.go b/service/ivsrealtime/api_op_CreateEncoderConfiguration.go index 56f13943fae..f46501e9945 100644 --- a/service/ivsrealtime/api_op_CreateEncoderConfiguration.go +++ b/service/ivsrealtime/api_op_CreateEncoderConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateEncoderConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEncoderConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ivsrealtime/api_op_CreateParticipantToken.go b/service/ivsrealtime/api_op_CreateParticipantToken.go index 739684d6fb6..8c50aa5bbd5 100644 --- a/service/ivsrealtime/api_op_CreateParticipantToken.go +++ b/service/ivsrealtime/api_op_CreateParticipantToken.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateParticipantTokenMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateParticipantTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_CreateStage.go b/service/ivsrealtime/api_op_CreateStage.go index 7adb1cc2f32..8bd22cf455b 100644 --- a/service/ivsrealtime/api_op_CreateStage.go +++ b/service/ivsrealtime/api_op_CreateStage.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ivsrealtime/api_op_CreateStorageConfiguration.go b/service/ivsrealtime/api_op_CreateStorageConfiguration.go index 5bdcd16da65..0064ea3a3f0 100644 --- a/service/ivsrealtime/api_op_CreateStorageConfiguration.go +++ b/service/ivsrealtime/api_op_CreateStorageConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateStorageConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStorageConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_DeleteEncoderConfiguration.go b/service/ivsrealtime/api_op_DeleteEncoderConfiguration.go index c6485abe9ef..445dfff648b 100644 --- a/service/ivsrealtime/api_op_DeleteEncoderConfiguration.go +++ b/service/ivsrealtime/api_op_DeleteEncoderConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteEncoderConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEncoderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_DeleteStage.go b/service/ivsrealtime/api_op_DeleteStage.go index b1ab0b34fed..3dd161631ec 100644 --- a/service/ivsrealtime/api_op_DeleteStage.go +++ b/service/ivsrealtime/api_op_DeleteStage.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_DeleteStorageConfiguration.go b/service/ivsrealtime/api_op_DeleteStorageConfiguration.go index 367ee5f3d21..07dfd3dc2b2 100644 --- a/service/ivsrealtime/api_op_DeleteStorageConfiguration.go +++ b/service/ivsrealtime/api_op_DeleteStorageConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteStorageConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStorageConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_DisconnectParticipant.go b/service/ivsrealtime/api_op_DisconnectParticipant.go index 8542b774354..d7409b5d1b5 100644 --- a/service/ivsrealtime/api_op_DisconnectParticipant.go +++ b/service/ivsrealtime/api_op_DisconnectParticipant.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisconnectParticipantMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisconnectParticipantValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_GetComposition.go b/service/ivsrealtime/api_op_GetComposition.go index 63bb1a5a1b2..b7a586fff1a 100644 --- a/service/ivsrealtime/api_op_GetComposition.go +++ b/service/ivsrealtime/api_op_GetComposition.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetCompositionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCompositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_GetEncoderConfiguration.go b/service/ivsrealtime/api_op_GetEncoderConfiguration.go index 9d8b8d9dda6..63ebf9ff53b 100644 --- a/service/ivsrealtime/api_op_GetEncoderConfiguration.go +++ b/service/ivsrealtime/api_op_GetEncoderConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetEncoderConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEncoderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_GetParticipant.go b/service/ivsrealtime/api_op_GetParticipant.go index 431da4b1de3..a889e9e52a8 100644 --- a/service/ivsrealtime/api_op_GetParticipant.go +++ b/service/ivsrealtime/api_op_GetParticipant.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetParticipantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParticipantValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_GetStage.go b/service/ivsrealtime/api_op_GetStage.go index 8bd847a4d97..28bbc1eba25 100644 --- a/service/ivsrealtime/api_op_GetStage.go +++ b/service/ivsrealtime/api_op_GetStage.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetStageMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_GetStageSession.go b/service/ivsrealtime/api_op_GetStageSession.go index fda5b92e993..8af4ccaf26f 100644 --- a/service/ivsrealtime/api_op_GetStageSession.go +++ b/service/ivsrealtime/api_op_GetStageSession.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetStageSessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStageSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_GetStorageConfiguration.go b/service/ivsrealtime/api_op_GetStorageConfiguration.go index ff751044776..a38776d034b 100644 --- a/service/ivsrealtime/api_op_GetStorageConfiguration.go +++ b/service/ivsrealtime/api_op_GetStorageConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetStorageConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStorageConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_ListCompositions.go b/service/ivsrealtime/api_op_ListCompositions.go index f38962d70ee..1ebc879f2a8 100644 --- a/service/ivsrealtime/api_op_ListCompositions.go +++ b/service/ivsrealtime/api_op_ListCompositions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCompositionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCompositions(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListCompositionsMiddlewares(stack *middleware.Stack return nil } -// ListCompositionsAPIClient is a client that implements the ListCompositions -// operation. -type ListCompositionsAPIClient interface { - ListCompositions(context.Context, *ListCompositionsInput, ...func(*Options)) (*ListCompositionsOutput, error) -} - -var _ ListCompositionsAPIClient = (*Client)(nil) - // ListCompositionsPaginatorOptions is the paginator options for ListCompositions type ListCompositionsPaginatorOptions struct { // Maximum number of results to return. Default: 100. @@ -214,6 +209,9 @@ func (p *ListCompositionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCompositions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListCompositionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCompositionsAPIClient is a client that implements the ListCompositions +// operation. +type ListCompositionsAPIClient interface { + ListCompositions(context.Context, *ListCompositionsInput, ...func(*Options)) (*ListCompositionsOutput, error) +} + +var _ ListCompositionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCompositions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListEncoderConfigurations.go b/service/ivsrealtime/api_op_ListEncoderConfigurations.go index be1602fe72f..2b2b1598f08 100644 --- a/service/ivsrealtime/api_op_ListEncoderConfigurations.go +++ b/service/ivsrealtime/api_op_ListEncoderConfigurations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEncoderConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEncoderConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEncoderConfigurationsMiddlewares(stack *middlew return nil } -// ListEncoderConfigurationsAPIClient is a client that implements the -// ListEncoderConfigurations operation. -type ListEncoderConfigurationsAPIClient interface { - ListEncoderConfigurations(context.Context, *ListEncoderConfigurationsInput, ...func(*Options)) (*ListEncoderConfigurationsOutput, error) -} - -var _ ListEncoderConfigurationsAPIClient = (*Client)(nil) - // ListEncoderConfigurationsPaginatorOptions is the paginator options for // ListEncoderConfigurations type ListEncoderConfigurationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListEncoderConfigurationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEncoderConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListEncoderConfigurationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListEncoderConfigurationsAPIClient is a client that implements the +// ListEncoderConfigurations operation. +type ListEncoderConfigurationsAPIClient interface { + ListEncoderConfigurations(context.Context, *ListEncoderConfigurationsInput, ...func(*Options)) (*ListEncoderConfigurationsOutput, error) +} + +var _ ListEncoderConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEncoderConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListParticipantEvents.go b/service/ivsrealtime/api_op_ListParticipantEvents.go index f4c2ff38d00..effd700d76c 100644 --- a/service/ivsrealtime/api_op_ListParticipantEvents.go +++ b/service/ivsrealtime/api_op_ListParticipantEvents.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListParticipantEventsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListParticipantEventsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListParticipantEventsMiddlewares(stack *middleware. return nil } -// ListParticipantEventsAPIClient is a client that implements the -// ListParticipantEvents operation. -type ListParticipantEventsAPIClient interface { - ListParticipantEvents(context.Context, *ListParticipantEventsInput, ...func(*Options)) (*ListParticipantEventsOutput, error) -} - -var _ ListParticipantEventsAPIClient = (*Client)(nil) - // ListParticipantEventsPaginatorOptions is the paginator options for // ListParticipantEvents type ListParticipantEventsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListParticipantEventsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParticipantEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListParticipantEventsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListParticipantEventsAPIClient is a client that implements the +// ListParticipantEvents operation. +type ListParticipantEventsAPIClient interface { + ListParticipantEvents(context.Context, *ListParticipantEventsInput, ...func(*Options)) (*ListParticipantEventsOutput, error) +} + +var _ ListParticipantEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParticipantEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListParticipants.go b/service/ivsrealtime/api_op_ListParticipants.go index 95897df2bc7..d91626261b5 100644 --- a/service/ivsrealtime/api_op_ListParticipants.go +++ b/service/ivsrealtime/api_op_ListParticipants.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListParticipantsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListParticipantsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListParticipantsMiddlewares(stack *middleware.Stack return nil } -// ListParticipantsAPIClient is a client that implements the ListParticipants -// operation. -type ListParticipantsAPIClient interface { - ListParticipants(context.Context, *ListParticipantsInput, ...func(*Options)) (*ListParticipantsOutput, error) -} - -var _ ListParticipantsAPIClient = (*Client)(nil) - // ListParticipantsPaginatorOptions is the paginator options for ListParticipants type ListParticipantsPaginatorOptions struct { // Maximum number of results to return. Default: 50. @@ -235,6 +230,9 @@ func (p *ListParticipantsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParticipants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListParticipantsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListParticipantsAPIClient is a client that implements the ListParticipants +// operation. +type ListParticipantsAPIClient interface { + ListParticipants(context.Context, *ListParticipantsInput, ...func(*Options)) (*ListParticipantsOutput, error) +} + +var _ ListParticipantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParticipants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListStageSessions.go b/service/ivsrealtime/api_op_ListStageSessions.go index 1692da73b4b..a4421d4e311 100644 --- a/service/ivsrealtime/api_op_ListStageSessions.go +++ b/service/ivsrealtime/api_op_ListStageSessions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListStageSessionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStageSessionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListStageSessionsMiddlewares(stack *middleware.Stac return nil } -// ListStageSessionsAPIClient is a client that implements the ListStageSessions -// operation. -type ListStageSessionsAPIClient interface { - ListStageSessions(context.Context, *ListStageSessionsInput, ...func(*Options)) (*ListStageSessionsOutput, error) -} - -var _ ListStageSessionsAPIClient = (*Client)(nil) - // ListStageSessionsPaginatorOptions is the paginator options for ListStageSessions type ListStageSessionsPaginatorOptions struct { // Maximum number of results to return. Default: 50. @@ -214,6 +209,9 @@ func (p *ListStageSessionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStageSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListStageSessionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListStageSessionsAPIClient is a client that implements the ListStageSessions +// operation. +type ListStageSessionsAPIClient interface { + ListStageSessions(context.Context, *ListStageSessionsInput, ...func(*Options)) (*ListStageSessionsOutput, error) +} + +var _ ListStageSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStageSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListStages.go b/service/ivsrealtime/api_op_ListStages.go index 5a2aab0df31..2e4d269d148 100644 --- a/service/ivsrealtime/api_op_ListStages.go +++ b/service/ivsrealtime/api_op_ListStages.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListStagesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStages(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListStagesMiddlewares(stack *middleware.Stack, opti return nil } -// ListStagesAPIClient is a client that implements the ListStages operation. -type ListStagesAPIClient interface { - ListStages(context.Context, *ListStagesInput, ...func(*Options)) (*ListStagesOutput, error) -} - -var _ ListStagesAPIClient = (*Client)(nil) - // ListStagesPaginatorOptions is the paginator options for ListStages type ListStagesPaginatorOptions struct { // Maximum number of results to return. Default: 50. @@ -206,6 +202,9 @@ func (p *ListStagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListStagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListStagesAPIClient is a client that implements the ListStages operation. +type ListStagesAPIClient interface { + ListStages(context.Context, *ListStagesInput, ...func(*Options)) (*ListStagesOutput, error) +} + +var _ ListStagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListStorageConfigurations.go b/service/ivsrealtime/api_op_ListStorageConfigurations.go index f45ec8c2324..023c3c68989 100644 --- a/service/ivsrealtime/api_op_ListStorageConfigurations.go +++ b/service/ivsrealtime/api_op_ListStorageConfigurations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListStorageConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStorageConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListStorageConfigurationsMiddlewares(stack *middlew return nil } -// ListStorageConfigurationsAPIClient is a client that implements the -// ListStorageConfigurations operation. -type ListStorageConfigurationsAPIClient interface { - ListStorageConfigurations(context.Context, *ListStorageConfigurationsInput, ...func(*Options)) (*ListStorageConfigurationsOutput, error) -} - -var _ ListStorageConfigurationsAPIClient = (*Client)(nil) - // ListStorageConfigurationsPaginatorOptions is the paginator options for // ListStorageConfigurations type ListStorageConfigurationsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListStorageConfigurationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStorageConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListStorageConfigurationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListStorageConfigurationsAPIClient is a client that implements the +// ListStorageConfigurations operation. +type ListStorageConfigurationsAPIClient interface { + ListStorageConfigurations(context.Context, *ListStorageConfigurationsInput, ...func(*Options)) (*ListStorageConfigurationsOutput, error) +} + +var _ ListStorageConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStorageConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ivsrealtime/api_op_ListTagsForResource.go b/service/ivsrealtime/api_op_ListTagsForResource.go index 27592494eac..8d7e0097222 100644 --- a/service/ivsrealtime/api_op_ListTagsForResource.go +++ b/service/ivsrealtime/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_StartComposition.go b/service/ivsrealtime/api_op_StartComposition.go index d27a59d9f19..1bc2e213f71 100644 --- a/service/ivsrealtime/api_op_StartComposition.go +++ b/service/ivsrealtime/api_op_StartComposition.go @@ -142,6 +142,9 @@ func (c *Client) addOperationStartCompositionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartCompositionMiddleware(stack, options); err != nil { return err } diff --git a/service/ivsrealtime/api_op_StopComposition.go b/service/ivsrealtime/api_op_StopComposition.go index c7a63b9b9fa..8932c6ff20a 100644 --- a/service/ivsrealtime/api_op_StopComposition.go +++ b/service/ivsrealtime/api_op_StopComposition.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStopCompositionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCompositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_TagResource.go b/service/ivsrealtime/api_op_TagResource.go index 2259eb4bb84..729df3e4c45 100644 --- a/service/ivsrealtime/api_op_TagResource.go +++ b/service/ivsrealtime/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_UntagResource.go b/service/ivsrealtime/api_op_UntagResource.go index 9e681880d00..4f47e9fed32 100644 --- a/service/ivsrealtime/api_op_UntagResource.go +++ b/service/ivsrealtime/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ivsrealtime/api_op_UpdateStage.go b/service/ivsrealtime/api_op_UpdateStage.go index f89b360232d..cc2a80b51be 100644 --- a/service/ivsrealtime/api_op_UpdateStage.go +++ b/service/ivsrealtime/api_op_UpdateStage.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateStageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_client.go b/service/kafka/api_client.go index a21785e5875..b7e49b14c87 100644 --- a/service/kafka/api_client.go +++ b/service/kafka/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kafka/api_op_BatchAssociateScramSecret.go b/service/kafka/api_op_BatchAssociateScramSecret.go index 377866c79a3..2d5f931cce9 100644 --- a/service/kafka/api_op_BatchAssociateScramSecret.go +++ b/service/kafka/api_op_BatchAssociateScramSecret.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchAssociateScramSecretMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateScramSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_BatchDisassociateScramSecret.go b/service/kafka/api_op_BatchDisassociateScramSecret.go index c8b2787e2ba..729ed430e8a 100644 --- a/service/kafka/api_op_BatchDisassociateScramSecret.go +++ b/service/kafka/api_op_BatchDisassociateScramSecret.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchDisassociateScramSecretMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateScramSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_CreateCluster.go b/service/kafka/api_op_CreateCluster.go index 88836fe6426..25610fe4935 100644 --- a/service/kafka/api_op_CreateCluster.go +++ b/service/kafka/api_op_CreateCluster.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_CreateClusterV2.go b/service/kafka/api_op_CreateClusterV2.go index aab5f00c338..388ed416d67 100644 --- a/service/kafka/api_op_CreateClusterV2.go +++ b/service/kafka/api_op_CreateClusterV2.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateClusterV2Middlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterV2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_CreateConfiguration.go b/service/kafka/api_op_CreateConfiguration.go index 3290ba1b18b..d0c6bee4fe4 100644 --- a/service/kafka/api_op_CreateConfiguration.go +++ b/service/kafka/api_op_CreateConfiguration.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateConfigurationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_CreateReplicator.go b/service/kafka/api_op_CreateReplicator.go index 72501b150fc..e895c849f77 100644 --- a/service/kafka/api_op_CreateReplicator.go +++ b/service/kafka/api_op_CreateReplicator.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateReplicatorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_CreateVpcConnection.go b/service/kafka/api_op_CreateVpcConnection.go index bd554d5a793..d8eace510b5 100644 --- a/service/kafka/api_op_CreateVpcConnection.go +++ b/service/kafka/api_op_CreateVpcConnection.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateVpcConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DeleteCluster.go b/service/kafka/api_op_DeleteCluster.go index 070aa707d99..3dbb76d50c3 100644 --- a/service/kafka/api_op_DeleteCluster.go +++ b/service/kafka/api_op_DeleteCluster.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DeleteClusterPolicy.go b/service/kafka/api_op_DeleteClusterPolicy.go index 9290ba6be45..fcc8361ac4e 100644 --- a/service/kafka/api_op_DeleteClusterPolicy.go +++ b/service/kafka/api_op_DeleteClusterPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteClusterPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DeleteConfiguration.go b/service/kafka/api_op_DeleteConfiguration.go index 81e56ae8bb2..bd468caa3cd 100644 --- a/service/kafka/api_op_DeleteConfiguration.go +++ b/service/kafka/api_op_DeleteConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConfigurationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DeleteReplicator.go b/service/kafka/api_op_DeleteReplicator.go index e7bc179519f..37ec42232e3 100644 --- a/service/kafka/api_op_DeleteReplicator.go +++ b/service/kafka/api_op_DeleteReplicator.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteReplicatorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DeleteVpcConnection.go b/service/kafka/api_op_DeleteVpcConnection.go index 028349d7605..092bfc60a4f 100644 --- a/service/kafka/api_op_DeleteVpcConnection.go +++ b/service/kafka/api_op_DeleteVpcConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteVpcConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeCluster.go b/service/kafka/api_op_DescribeCluster.go index 46768719485..1ee987f734b 100644 --- a/service/kafka/api_op_DescribeCluster.go +++ b/service/kafka/api_op_DescribeCluster.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeClusterOperation.go b/service/kafka/api_op_DescribeClusterOperation.go index deb9e4b84d0..130f795178d 100644 --- a/service/kafka/api_op_DescribeClusterOperation.go +++ b/service/kafka/api_op_DescribeClusterOperation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeClusterOperationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeClusterOperationV2.go b/service/kafka/api_op_DescribeClusterOperationV2.go index f406021ede6..4646cfe1315 100644 --- a/service/kafka/api_op_DescribeClusterOperationV2.go +++ b/service/kafka/api_op_DescribeClusterOperationV2.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeClusterOperationV2Middlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterOperationV2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeClusterV2.go b/service/kafka/api_op_DescribeClusterV2.go index 0a1f705a6db..2b7fa93d0fe 100644 --- a/service/kafka/api_op_DescribeClusterV2.go +++ b/service/kafka/api_op_DescribeClusterV2.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeClusterV2Middlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterV2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeConfiguration.go b/service/kafka/api_op_DescribeConfiguration.go index 5c37936aa3a..adfd417ac93 100644 --- a/service/kafka/api_op_DescribeConfiguration.go +++ b/service/kafka/api_op_DescribeConfiguration.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeConfigurationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeConfigurationRevision.go b/service/kafka/api_op_DescribeConfigurationRevision.go index 1461d28d78c..4bc7584e00e 100644 --- a/service/kafka/api_op_DescribeConfigurationRevision.go +++ b/service/kafka/api_op_DescribeConfigurationRevision.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeConfigurationRevisionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeReplicator.go b/service/kafka/api_op_DescribeReplicator.go index 63664f64e0e..9287d7900a1 100644 --- a/service/kafka/api_op_DescribeReplicator.go +++ b/service/kafka/api_op_DescribeReplicator.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeReplicatorMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReplicatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_DescribeVpcConnection.go b/service/kafka/api_op_DescribeVpcConnection.go index 4d7cd29e6b0..1b3fcdfea98 100644 --- a/service/kafka/api_op_DescribeVpcConnection.go +++ b/service/kafka/api_op_DescribeVpcConnection.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeVpcConnectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_GetBootstrapBrokers.go b/service/kafka/api_op_GetBootstrapBrokers.go index 71c74bc9434..d0aa935a5f3 100644 --- a/service/kafka/api_op_GetBootstrapBrokers.go +++ b/service/kafka/api_op_GetBootstrapBrokers.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetBootstrapBrokersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBootstrapBrokersValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_GetClusterPolicy.go b/service/kafka/api_op_GetClusterPolicy.go index 689a2147c59..1a5cd6ac47c 100644 --- a/service/kafka/api_op_GetClusterPolicy.go +++ b/service/kafka/api_op_GetClusterPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetClusterPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClusterPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_GetCompatibleKafkaVersions.go b/service/kafka/api_op_GetCompatibleKafkaVersions.go index aa873edd922..c56c138287b 100644 --- a/service/kafka/api_op_GetCompatibleKafkaVersions.go +++ b/service/kafka/api_op_GetCompatibleKafkaVersions.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetCompatibleKafkaVersionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCompatibleKafkaVersions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kafka/api_op_ListClientVpcConnections.go b/service/kafka/api_op_ListClientVpcConnections.go index a5b3f5fa276..02f61607682 100644 --- a/service/kafka/api_op_ListClientVpcConnections.go +++ b/service/kafka/api_op_ListClientVpcConnections.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListClientVpcConnectionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClientVpcConnectionsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListClientVpcConnectionsMiddlewares(stack *middlewa return nil } -// ListClientVpcConnectionsAPIClient is a client that implements the -// ListClientVpcConnections operation. -type ListClientVpcConnectionsAPIClient interface { - ListClientVpcConnections(context.Context, *ListClientVpcConnectionsInput, ...func(*Options)) (*ListClientVpcConnectionsOutput, error) -} - -var _ ListClientVpcConnectionsAPIClient = (*Client)(nil) - // ListClientVpcConnectionsPaginatorOptions is the paginator options for // ListClientVpcConnections type ListClientVpcConnectionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListClientVpcConnectionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClientVpcConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListClientVpcConnectionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListClientVpcConnectionsAPIClient is a client that implements the +// ListClientVpcConnections operation. +type ListClientVpcConnectionsAPIClient interface { + ListClientVpcConnections(context.Context, *ListClientVpcConnectionsInput, ...func(*Options)) (*ListClientVpcConnectionsOutput, error) +} + +var _ ListClientVpcConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClientVpcConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListClusterOperations.go b/service/kafka/api_op_ListClusterOperations.go index 3f5acee6048..b907c005168 100644 --- a/service/kafka/api_op_ListClusterOperations.go +++ b/service/kafka/api_op_ListClusterOperations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListClusterOperationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClusterOperationsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListClusterOperationsMiddlewares(stack *middleware. return nil } -// ListClusterOperationsAPIClient is a client that implements the -// ListClusterOperations operation. -type ListClusterOperationsAPIClient interface { - ListClusterOperations(context.Context, *ListClusterOperationsInput, ...func(*Options)) (*ListClusterOperationsOutput, error) -} - -var _ ListClusterOperationsAPIClient = (*Client)(nil) - // ListClusterOperationsPaginatorOptions is the paginator options for // ListClusterOperations type ListClusterOperationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListClusterOperationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusterOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListClusterOperationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListClusterOperationsAPIClient is a client that implements the +// ListClusterOperations operation. +type ListClusterOperationsAPIClient interface { + ListClusterOperations(context.Context, *ListClusterOperationsInput, ...func(*Options)) (*ListClusterOperationsOutput, error) +} + +var _ ListClusterOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusterOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListClusterOperationsV2.go b/service/kafka/api_op_ListClusterOperationsV2.go index b96dd5ee2bd..5840cfa13ad 100644 --- a/service/kafka/api_op_ListClusterOperationsV2.go +++ b/service/kafka/api_op_ListClusterOperationsV2.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListClusterOperationsV2Middlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClusterOperationsV2ValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListClusterOperationsV2Middlewares(stack *middlewar return nil } -// ListClusterOperationsV2APIClient is a client that implements the -// ListClusterOperationsV2 operation. -type ListClusterOperationsV2APIClient interface { - ListClusterOperationsV2(context.Context, *ListClusterOperationsV2Input, ...func(*Options)) (*ListClusterOperationsV2Output, error) -} - -var _ ListClusterOperationsV2APIClient = (*Client)(nil) - // ListClusterOperationsV2PaginatorOptions is the paginator options for // ListClusterOperationsV2 type ListClusterOperationsV2PaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListClusterOperationsV2Paginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusterOperationsV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListClusterOperationsV2Paginator) NextPage(ctx context.Context, optFns return result, nil } +// ListClusterOperationsV2APIClient is a client that implements the +// ListClusterOperationsV2 operation. +type ListClusterOperationsV2APIClient interface { + ListClusterOperationsV2(context.Context, *ListClusterOperationsV2Input, ...func(*Options)) (*ListClusterOperationsV2Output, error) +} + +var _ ListClusterOperationsV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusterOperationsV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListClusters.go b/service/kafka/api_op_ListClusters.go index b7cbd994da1..0c950374740 100644 --- a/service/kafka/api_op_ListClusters.go +++ b/service/kafka/api_op_ListClusters.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // The maximum number of results to return in the response. If there are more @@ -211,6 +207,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListClustersV2.go b/service/kafka/api_op_ListClustersV2.go index a3c16eef873..870e4c54348 100644 --- a/service/kafka/api_op_ListClustersV2.go +++ b/service/kafka/api_op_ListClustersV2.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListClustersV2Middlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClustersV2(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListClustersV2Middlewares(stack *middleware.Stack, return nil } -// ListClustersV2APIClient is a client that implements the ListClustersV2 -// operation. -type ListClustersV2APIClient interface { - ListClustersV2(context.Context, *ListClustersV2Input, ...func(*Options)) (*ListClustersV2Output, error) -} - -var _ ListClustersV2APIClient = (*Client)(nil) - // ListClustersV2PaginatorOptions is the paginator options for ListClustersV2 type ListClustersV2PaginatorOptions struct { // The maximum number of results to return in the response. If there are more @@ -215,6 +210,9 @@ func (p *ListClustersV2Paginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClustersV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListClustersV2Paginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListClustersV2APIClient is a client that implements the ListClustersV2 +// operation. +type ListClustersV2APIClient interface { + ListClustersV2(context.Context, *ListClustersV2Input, ...func(*Options)) (*ListClustersV2Output, error) +} + +var _ ListClustersV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClustersV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListConfigurationRevisions.go b/service/kafka/api_op_ListConfigurationRevisions.go index b69eaa2aed4..b14ad72efe2 100644 --- a/service/kafka/api_op_ListConfigurationRevisions.go +++ b/service/kafka/api_op_ListConfigurationRevisions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListConfigurationRevisionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConfigurationRevisionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListConfigurationRevisionsMiddlewares(stack *middle return nil } -// ListConfigurationRevisionsAPIClient is a client that implements the -// ListConfigurationRevisions operation. -type ListConfigurationRevisionsAPIClient interface { - ListConfigurationRevisions(context.Context, *ListConfigurationRevisionsInput, ...func(*Options)) (*ListConfigurationRevisionsOutput, error) -} - -var _ ListConfigurationRevisionsAPIClient = (*Client)(nil) - // ListConfigurationRevisionsPaginatorOptions is the paginator options for // ListConfigurationRevisions type ListConfigurationRevisionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListConfigurationRevisionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListConfigurationRevisionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListConfigurationRevisionsAPIClient is a client that implements the +// ListConfigurationRevisions operation. +type ListConfigurationRevisionsAPIClient interface { + ListConfigurationRevisions(context.Context, *ListConfigurationRevisionsInput, ...func(*Options)) (*ListConfigurationRevisionsOutput, error) +} + +var _ ListConfigurationRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListConfigurations.go b/service/kafka/api_op_ListConfigurations.go index 4cd66622254..1267282920d 100644 --- a/service/kafka/api_op_ListConfigurations.go +++ b/service/kafka/api_op_ListConfigurations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListConfigurationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListConfigurationsMiddlewares(stack *middleware.Sta return nil } -// ListConfigurationsAPIClient is a client that implements the ListConfigurations -// operation. -type ListConfigurationsAPIClient interface { - ListConfigurations(context.Context, *ListConfigurationsInput, ...func(*Options)) (*ListConfigurationsOutput, error) -} - -var _ ListConfigurationsAPIClient = (*Client)(nil) - // ListConfigurationsPaginatorOptions is the paginator options for // ListConfigurations type ListConfigurationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListConfigurationsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListConfigurationsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListConfigurationsAPIClient is a client that implements the ListConfigurations +// operation. +type ListConfigurationsAPIClient interface { + ListConfigurations(context.Context, *ListConfigurationsInput, ...func(*Options)) (*ListConfigurationsOutput, error) +} + +var _ ListConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListKafkaVersions.go b/service/kafka/api_op_ListKafkaVersions.go index 5db78a03cda..d00e698919e 100644 --- a/service/kafka/api_op_ListKafkaVersions.go +++ b/service/kafka/api_op_ListKafkaVersions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListKafkaVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKafkaVersions(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListKafkaVersionsMiddlewares(stack *middleware.Stac return nil } -// ListKafkaVersionsAPIClient is a client that implements the ListKafkaVersions -// operation. -type ListKafkaVersionsAPIClient interface { - ListKafkaVersions(context.Context, *ListKafkaVersionsInput, ...func(*Options)) (*ListKafkaVersionsOutput, error) -} - -var _ ListKafkaVersionsAPIClient = (*Client)(nil) - // ListKafkaVersionsPaginatorOptions is the paginator options for ListKafkaVersions type ListKafkaVersionsPaginatorOptions struct { // The maximum number of results to return in the response. If there are more @@ -203,6 +198,9 @@ func (p *ListKafkaVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKafkaVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListKafkaVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListKafkaVersionsAPIClient is a client that implements the ListKafkaVersions +// operation. +type ListKafkaVersionsAPIClient interface { + ListKafkaVersions(context.Context, *ListKafkaVersionsInput, ...func(*Options)) (*ListKafkaVersionsOutput, error) +} + +var _ ListKafkaVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKafkaVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListNodes.go b/service/kafka/api_op_ListNodes.go index 3e3c8771884..bdbcb0af56a 100644 --- a/service/kafka/api_op_ListNodes.go +++ b/service/kafka/api_op_ListNodes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNodesValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, optio return nil } -// ListNodesAPIClient is a client that implements the ListNodes operation. -type ListNodesAPIClient interface { - ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) -} - -var _ ListNodesAPIClient = (*Client)(nil) - // ListNodesPaginatorOptions is the paginator options for ListNodes type ListNodesPaginatorOptions struct { // The maximum number of results to return in the response. If there are more @@ -215,6 +211,9 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListNodesAPIClient is a client that implements the ListNodes operation. +type ListNodesAPIClient interface { + ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) +} + +var _ ListNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListReplicators.go b/service/kafka/api_op_ListReplicators.go index 8f8b16a9365..f3d4bde2286 100644 --- a/service/kafka/api_op_ListReplicators.go +++ b/service/kafka/api_op_ListReplicators.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListReplicatorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReplicators(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListReplicatorsMiddlewares(stack *middleware.Stack, return nil } -// ListReplicatorsAPIClient is a client that implements the ListReplicators -// operation. -type ListReplicatorsAPIClient interface { - ListReplicators(context.Context, *ListReplicatorsInput, ...func(*Options)) (*ListReplicatorsOutput, error) -} - -var _ ListReplicatorsAPIClient = (*Client)(nil) - // ListReplicatorsPaginatorOptions is the paginator options for ListReplicators type ListReplicatorsPaginatorOptions struct { // The maximum number of results to return in the response. If there are more @@ -211,6 +206,9 @@ func (p *ListReplicatorsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReplicators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListReplicatorsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListReplicatorsAPIClient is a client that implements the ListReplicators +// operation. +type ListReplicatorsAPIClient interface { + ListReplicators(context.Context, *ListReplicatorsInput, ...func(*Options)) (*ListReplicatorsOutput, error) +} + +var _ ListReplicatorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReplicators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListScramSecrets.go b/service/kafka/api_op_ListScramSecrets.go index b839e68e6a6..1925c4301a2 100644 --- a/service/kafka/api_op_ListScramSecrets.go +++ b/service/kafka/api_op_ListScramSecrets.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListScramSecretsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListScramSecretsValidationMiddleware(stack); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListScramSecretsMiddlewares(stack *middleware.Stack return nil } -// ListScramSecretsAPIClient is a client that implements the ListScramSecrets -// operation. -type ListScramSecretsAPIClient interface { - ListScramSecrets(context.Context, *ListScramSecretsInput, ...func(*Options)) (*ListScramSecretsOutput, error) -} - -var _ ListScramSecretsAPIClient = (*Client)(nil) - // ListScramSecretsPaginatorOptions is the paginator options for ListScramSecrets type ListScramSecretsPaginatorOptions struct { // The maxResults of the query. @@ -209,6 +204,9 @@ func (p *ListScramSecretsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScramSecrets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListScramSecretsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListScramSecretsAPIClient is a client that implements the ListScramSecrets +// operation. +type ListScramSecretsAPIClient interface { + ListScramSecrets(context.Context, *ListScramSecretsInput, ...func(*Options)) (*ListScramSecretsOutput, error) +} + +var _ ListScramSecretsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScramSecrets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_ListTagsForResource.go b/service/kafka/api_op_ListTagsForResource.go index ccd802589f8..23c400fb078 100644 --- a/service/kafka/api_op_ListTagsForResource.go +++ b/service/kafka/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_ListVpcConnections.go b/service/kafka/api_op_ListVpcConnections.go index 23759d12b58..9d4f84b9f26 100644 --- a/service/kafka/api_op_ListVpcConnections.go +++ b/service/kafka/api_op_ListVpcConnections.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListVpcConnectionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVpcConnections(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListVpcConnectionsMiddlewares(stack *middleware.Sta return nil } -// ListVpcConnectionsAPIClient is a client that implements the ListVpcConnections -// operation. -type ListVpcConnectionsAPIClient interface { - ListVpcConnections(context.Context, *ListVpcConnectionsInput, ...func(*Options)) (*ListVpcConnectionsOutput, error) -} - -var _ ListVpcConnectionsAPIClient = (*Client)(nil) - // ListVpcConnectionsPaginatorOptions is the paginator options for // ListVpcConnections type ListVpcConnectionsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListVpcConnectionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVpcConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListVpcConnectionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListVpcConnectionsAPIClient is a client that implements the ListVpcConnections +// operation. +type ListVpcConnectionsAPIClient interface { + ListVpcConnections(context.Context, *ListVpcConnectionsInput, ...func(*Options)) (*ListVpcConnectionsOutput, error) +} + +var _ ListVpcConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVpcConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafka/api_op_PutClusterPolicy.go b/service/kafka/api_op_PutClusterPolicy.go index 1875b0e0611..29580b8f8ba 100644 --- a/service/kafka/api_op_PutClusterPolicy.go +++ b/service/kafka/api_op_PutClusterPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutClusterPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutClusterPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_RebootBroker.go b/service/kafka/api_op_RebootBroker.go index 6c206dbb99d..8bae8e7fb9e 100644 --- a/service/kafka/api_op_RebootBroker.go +++ b/service/kafka/api_op_RebootBroker.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRebootBrokerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootBrokerValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_RejectClientVpcConnection.go b/service/kafka/api_op_RejectClientVpcConnection.go index 6858fce4e38..892a28cbb9d 100644 --- a/service/kafka/api_op_RejectClientVpcConnection.go +++ b/service/kafka/api_op_RejectClientVpcConnection.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRejectClientVpcConnectionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectClientVpcConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_TagResource.go b/service/kafka/api_op_TagResource.go index 1f4ce81e98f..aa1290f030a 100644 --- a/service/kafka/api_op_TagResource.go +++ b/service/kafka/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UntagResource.go b/service/kafka/api_op_UntagResource.go index 12b61ed28ef..8de2f0802d9 100644 --- a/service/kafka/api_op_UntagResource.go +++ b/service/kafka/api_op_UntagResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateBrokerCount.go b/service/kafka/api_op_UpdateBrokerCount.go index 1cffa85f04c..a856772e5c8 100644 --- a/service/kafka/api_op_UpdateBrokerCount.go +++ b/service/kafka/api_op_UpdateBrokerCount.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateBrokerCountMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBrokerCountValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateBrokerStorage.go b/service/kafka/api_op_UpdateBrokerStorage.go index 2db884f57b9..2a3b62d54dc 100644 --- a/service/kafka/api_op_UpdateBrokerStorage.go +++ b/service/kafka/api_op_UpdateBrokerStorage.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateBrokerStorageMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBrokerStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateBrokerType.go b/service/kafka/api_op_UpdateBrokerType.go index dcee6c12bdd..79bda91838e 100644 --- a/service/kafka/api_op_UpdateBrokerType.go +++ b/service/kafka/api_op_UpdateBrokerType.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateBrokerTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBrokerTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateClusterConfiguration.go b/service/kafka/api_op_UpdateClusterConfiguration.go index ae1bfa4a2dc..b9dd5b69520 100644 --- a/service/kafka/api_op_UpdateClusterConfiguration.go +++ b/service/kafka/api_op_UpdateClusterConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateClusterConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateClusterKafkaVersion.go b/service/kafka/api_op_UpdateClusterKafkaVersion.go index d7fe4beb995..0ca957ddbc4 100644 --- a/service/kafka/api_op_UpdateClusterKafkaVersion.go +++ b/service/kafka/api_op_UpdateClusterKafkaVersion.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateClusterKafkaVersionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterKafkaVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateConfiguration.go b/service/kafka/api_op_UpdateConfiguration.go index c8a49a704ad..db76e3cc06d 100644 --- a/service/kafka/api_op_UpdateConfiguration.go +++ b/service/kafka/api_op_UpdateConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateConfigurationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateConnectivity.go b/service/kafka/api_op_UpdateConnectivity.go index b3a63791438..a380f94bf8c 100644 --- a/service/kafka/api_op_UpdateConnectivity.go +++ b/service/kafka/api_op_UpdateConnectivity.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateConnectivityMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectivityValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateMonitoring.go b/service/kafka/api_op_UpdateMonitoring.go index d41af8bdd0f..97eff5dd492 100644 --- a/service/kafka/api_op_UpdateMonitoring.go +++ b/service/kafka/api_op_UpdateMonitoring.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateMonitoringMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMonitoringValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateReplicationInfo.go b/service/kafka/api_op_UpdateReplicationInfo.go index 07e02ea3616..656ba8c061d 100644 --- a/service/kafka/api_op_UpdateReplicationInfo.go +++ b/service/kafka/api_op_UpdateReplicationInfo.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateReplicationInfoMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReplicationInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateSecurity.go b/service/kafka/api_op_UpdateSecurity.go index 2142425989c..ba83d218f36 100644 --- a/service/kafka/api_op_UpdateSecurity.go +++ b/service/kafka/api_op_UpdateSecurity.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateSecurityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSecurityValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafka/api_op_UpdateStorage.go b/service/kafka/api_op_UpdateStorage.go index 9dd620761b8..85ffe36d137 100644 --- a/service/kafka/api_op_UpdateStorage.go +++ b/service/kafka/api_op_UpdateStorage.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateStorageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_client.go b/service/kafkaconnect/api_client.go index 6d436e6849d..5592e295d48 100644 --- a/service/kafkaconnect/api_client.go +++ b/service/kafkaconnect/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kafkaconnect/api_op_CreateConnector.go b/service/kafkaconnect/api_op_CreateConnector.go index 7b7fdbb32ce..88c78c3e0ef 100644 --- a/service/kafkaconnect/api_op_CreateConnector.go +++ b/service/kafkaconnect/api_op_CreateConnector.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_CreateCustomPlugin.go b/service/kafkaconnect/api_op_CreateCustomPlugin.go index 027380ea71c..dd3305d3d7c 100644 --- a/service/kafkaconnect/api_op_CreateCustomPlugin.go +++ b/service/kafkaconnect/api_op_CreateCustomPlugin.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateCustomPluginMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomPluginValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_CreateWorkerConfiguration.go b/service/kafkaconnect/api_op_CreateWorkerConfiguration.go index f23f1837fd6..d2e3c74e97a 100644 --- a/service/kafkaconnect/api_op_CreateWorkerConfiguration.go +++ b/service/kafkaconnect/api_op_CreateWorkerConfiguration.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateWorkerConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkerConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_DeleteConnector.go b/service/kafkaconnect/api_op_DeleteConnector.go index ff729c98532..e85c15575a0 100644 --- a/service/kafkaconnect/api_op_DeleteConnector.go +++ b/service/kafkaconnect/api_op_DeleteConnector.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_DeleteCustomPlugin.go b/service/kafkaconnect/api_op_DeleteCustomPlugin.go index 78ebf8e8147..f9addb997af 100644 --- a/service/kafkaconnect/api_op_DeleteCustomPlugin.go +++ b/service/kafkaconnect/api_op_DeleteCustomPlugin.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteCustomPluginMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomPluginValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_DeleteWorkerConfiguration.go b/service/kafkaconnect/api_op_DeleteWorkerConfiguration.go index 2f51aabfec7..aac4d5e1c32 100644 --- a/service/kafkaconnect/api_op_DeleteWorkerConfiguration.go +++ b/service/kafkaconnect/api_op_DeleteWorkerConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteWorkerConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkerConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_DescribeConnector.go b/service/kafkaconnect/api_op_DescribeConnector.go index e6cc61ef5e7..48b114feb07 100644 --- a/service/kafkaconnect/api_op_DescribeConnector.go +++ b/service/kafkaconnect/api_op_DescribeConnector.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDescribeConnectorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_DescribeCustomPlugin.go b/service/kafkaconnect/api_op_DescribeCustomPlugin.go index 545d4ede81f..86ab08a45d7 100644 --- a/service/kafkaconnect/api_op_DescribeCustomPlugin.go +++ b/service/kafkaconnect/api_op_DescribeCustomPlugin.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeCustomPluginMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomPluginValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_DescribeWorkerConfiguration.go b/service/kafkaconnect/api_op_DescribeWorkerConfiguration.go index f85e873eb09..be4d4bf65a7 100644 --- a/service/kafkaconnect/api_op_DescribeWorkerConfiguration.go +++ b/service/kafkaconnect/api_op_DescribeWorkerConfiguration.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeWorkerConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkerConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_ListConnectors.go b/service/kafkaconnect/api_op_ListConnectors.go index 2e22a904246..7eb122d5976 100644 --- a/service/kafkaconnect/api_op_ListConnectors.go +++ b/service/kafkaconnect/api_op_ListConnectors.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectors(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectorsAPIClient is a client that implements the ListConnectors -// operation. -type ListConnectorsAPIClient interface { - ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) -} - -var _ ListConnectorsAPIClient = (*Client)(nil) - // ListConnectorsPaginatorOptions is the paginator options for ListConnectors type ListConnectorsPaginatorOptions struct { // The maximum number of connectors to list in one response. @@ -207,6 +202,9 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListConnectorsAPIClient is a client that implements the ListConnectors +// operation. +type ListConnectorsAPIClient interface { + ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) +} + +var _ ListConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafkaconnect/api_op_ListCustomPlugins.go b/service/kafkaconnect/api_op_ListCustomPlugins.go index 71bc8effb32..9967996702c 100644 --- a/service/kafkaconnect/api_op_ListCustomPlugins.go +++ b/service/kafkaconnect/api_op_ListCustomPlugins.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCustomPluginsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomPlugins(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListCustomPluginsMiddlewares(stack *middleware.Stac return nil } -// ListCustomPluginsAPIClient is a client that implements the ListCustomPlugins -// operation. -type ListCustomPluginsAPIClient interface { - ListCustomPlugins(context.Context, *ListCustomPluginsInput, ...func(*Options)) (*ListCustomPluginsOutput, error) -} - -var _ ListCustomPluginsAPIClient = (*Client)(nil) - // ListCustomPluginsPaginatorOptions is the paginator options for ListCustomPlugins type ListCustomPluginsPaginatorOptions struct { // The maximum number of custom plugins to list in one response. @@ -205,6 +200,9 @@ func (p *ListCustomPluginsPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomPlugins(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListCustomPluginsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListCustomPluginsAPIClient is a client that implements the ListCustomPlugins +// operation. +type ListCustomPluginsAPIClient interface { + ListCustomPlugins(context.Context, *ListCustomPluginsInput, ...func(*Options)) (*ListCustomPluginsOutput, error) +} + +var _ ListCustomPluginsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomPlugins(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafkaconnect/api_op_ListTagsForResource.go b/service/kafkaconnect/api_op_ListTagsForResource.go index aca0d65247b..6483f520de2 100644 --- a/service/kafkaconnect/api_op_ListTagsForResource.go +++ b/service/kafkaconnect/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_ListWorkerConfigurations.go b/service/kafkaconnect/api_op_ListWorkerConfigurations.go index d52eaf8893f..714e0a18347 100644 --- a/service/kafkaconnect/api_op_ListWorkerConfigurations.go +++ b/service/kafkaconnect/api_op_ListWorkerConfigurations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListWorkerConfigurationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkerConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListWorkerConfigurationsMiddlewares(stack *middlewa return nil } -// ListWorkerConfigurationsAPIClient is a client that implements the -// ListWorkerConfigurations operation. -type ListWorkerConfigurationsAPIClient interface { - ListWorkerConfigurations(context.Context, *ListWorkerConfigurationsInput, ...func(*Options)) (*ListWorkerConfigurationsOutput, error) -} - -var _ ListWorkerConfigurationsAPIClient = (*Client)(nil) - // ListWorkerConfigurationsPaginatorOptions is the paginator options for // ListWorkerConfigurations type ListWorkerConfigurationsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListWorkerConfigurationsPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkerConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListWorkerConfigurationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListWorkerConfigurationsAPIClient is a client that implements the +// ListWorkerConfigurations operation. +type ListWorkerConfigurationsAPIClient interface { + ListWorkerConfigurations(context.Context, *ListWorkerConfigurationsInput, ...func(*Options)) (*ListWorkerConfigurationsOutput, error) +} + +var _ ListWorkerConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkerConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kafkaconnect/api_op_TagResource.go b/service/kafkaconnect/api_op_TagResource.go index 1bbe600c871..8a4ea2d14a0 100644 --- a/service/kafkaconnect/api_op_TagResource.go +++ b/service/kafkaconnect/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_UntagResource.go b/service/kafkaconnect/api_op_UntagResource.go index 2bcd2e89e7f..66ac2b20045 100644 --- a/service/kafkaconnect/api_op_UntagResource.go +++ b/service/kafkaconnect/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kafkaconnect/api_op_UpdateConnector.go b/service/kafkaconnect/api_op_UpdateConnector.go index 108fb5062ea..4eb5eb19d79 100644 --- a/service/kafkaconnect/api_op_UpdateConnector.go +++ b/service/kafkaconnect/api_op_UpdateConnector.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_client.go b/service/kendra/api_client.go index 1f7f4bdec15..4fb6f8e52ed 100644 --- a/service/kendra/api_client.go +++ b/service/kendra/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/kendra/api_op_AssociateEntitiesToExperience.go b/service/kendra/api_op_AssociateEntitiesToExperience.go index e0e9eb08c37..30ee9ac2d65 100644 --- a/service/kendra/api_op_AssociateEntitiesToExperience.go +++ b/service/kendra/api_op_AssociateEntitiesToExperience.go @@ -122,6 +122,9 @@ func (c *Client) addOperationAssociateEntitiesToExperienceMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateEntitiesToExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_AssociatePersonasToEntities.go b/service/kendra/api_op_AssociatePersonasToEntities.go index 0d7af516bd9..84b3d56db6e 100644 --- a/service/kendra/api_op_AssociatePersonasToEntities.go +++ b/service/kendra/api_op_AssociatePersonasToEntities.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociatePersonasToEntitiesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePersonasToEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_BatchDeleteDocument.go b/service/kendra/api_op_BatchDeleteDocument.go index 62700ae4500..e204de8eec3 100644 --- a/service/kendra/api_op_BatchDeleteDocument.go +++ b/service/kendra/api_op_BatchDeleteDocument.go @@ -126,6 +126,9 @@ func (c *Client) addOperationBatchDeleteDocumentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_BatchDeleteFeaturedResultsSet.go b/service/kendra/api_op_BatchDeleteFeaturedResultsSet.go index 398093d041e..632c3c5f7f9 100644 --- a/service/kendra/api_op_BatchDeleteFeaturedResultsSet.go +++ b/service/kendra/api_op_BatchDeleteFeaturedResultsSet.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchDeleteFeaturedResultsSetMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteFeaturedResultsSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_BatchGetDocumentStatus.go b/service/kendra/api_op_BatchGetDocumentStatus.go index 404cc70c3a1..e4a217ba936 100644 --- a/service/kendra/api_op_BatchGetDocumentStatus.go +++ b/service/kendra/api_op_BatchGetDocumentStatus.go @@ -133,6 +133,9 @@ func (c *Client) addOperationBatchGetDocumentStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetDocumentStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_BatchPutDocument.go b/service/kendra/api_op_BatchPutDocument.go index 4782c6b9be7..95f7d0730cf 100644 --- a/service/kendra/api_op_BatchPutDocument.go +++ b/service/kendra/api_op_BatchPutDocument.go @@ -160,6 +160,9 @@ func (c *Client) addOperationBatchPutDocumentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_ClearQuerySuggestions.go b/service/kendra/api_op_ClearQuerySuggestions.go index ddd9ea371dd..66327b003a3 100644 --- a/service/kendra/api_op_ClearQuerySuggestions.go +++ b/service/kendra/api_op_ClearQuerySuggestions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationClearQuerySuggestionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpClearQuerySuggestionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_CreateAccessControlConfiguration.go b/service/kendra/api_op_CreateAccessControlConfiguration.go index a885c4b7c17..2e895f35788 100644 --- a/service/kendra/api_op_CreateAccessControlConfiguration.go +++ b/service/kendra/api_op_CreateAccessControlConfiguration.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateAccessControlConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessControlConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_CreateDataSource.go b/service/kendra/api_op_CreateDataSource.go index 33f8d922e09..adcf4ef1846 100644 --- a/service/kendra/api_op_CreateDataSource.go +++ b/service/kendra/api_op_CreateDataSource.go @@ -201,6 +201,9 @@ func (c *Client) addOperationCreateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataSourceMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_CreateExperience.go b/service/kendra/api_op_CreateExperience.go index 84ab9f3f511..a3ca2d48947 100644 --- a/service/kendra/api_op_CreateExperience.go +++ b/service/kendra/api_op_CreateExperience.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateExperienceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateExperienceMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_CreateFaq.go b/service/kendra/api_op_CreateFaq.go index 5f523360521..88f1b55e80a 100644 --- a/service/kendra/api_op_CreateFaq.go +++ b/service/kendra/api_op_CreateFaq.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateFaqMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFaqMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_CreateFeaturedResultsSet.go b/service/kendra/api_op_CreateFeaturedResultsSet.go index 76a4e39afe0..54378d202d4 100644 --- a/service/kendra/api_op_CreateFeaturedResultsSet.go +++ b/service/kendra/api_op_CreateFeaturedResultsSet.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateFeaturedResultsSetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFeaturedResultsSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_CreateIndex.go b/service/kendra/api_op_CreateIndex.go index bb7903a929c..22c514eceb3 100644 --- a/service/kendra/api_op_CreateIndex.go +++ b/service/kendra/api_op_CreateIndex.go @@ -182,6 +182,9 @@ func (c *Client) addOperationCreateIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIndexMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_CreateQuerySuggestionsBlockList.go b/service/kendra/api_op_CreateQuerySuggestionsBlockList.go index a2c9b7d6b49..6ad6a3825b7 100644 --- a/service/kendra/api_op_CreateQuerySuggestionsBlockList.go +++ b/service/kendra/api_op_CreateQuerySuggestionsBlockList.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateQuerySuggestionsBlockListMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateQuerySuggestionsBlockListMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_CreateThesaurus.go b/service/kendra/api_op_CreateThesaurus.go index f3a02687230..08ba890352d 100644 --- a/service/kendra/api_op_CreateThesaurus.go +++ b/service/kendra/api_op_CreateThesaurus.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateThesaurusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateThesaurusMiddleware(stack, options); err != nil { return err } diff --git a/service/kendra/api_op_DeleteAccessControlConfiguration.go b/service/kendra/api_op_DeleteAccessControlConfiguration.go index 1978772bb49..d8f279d3437 100644 --- a/service/kendra/api_op_DeleteAccessControlConfiguration.go +++ b/service/kendra/api_op_DeleteAccessControlConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteAccessControlConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessControlConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeleteDataSource.go b/service/kendra/api_op_DeleteDataSource.go index 06a46376fd8..f7f2481a392 100644 --- a/service/kendra/api_op_DeleteDataSource.go +++ b/service/kendra/api_op_DeleteDataSource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeleteExperience.go b/service/kendra/api_op_DeleteExperience.go index 03f4c86be3c..38573c4a1cf 100644 --- a/service/kendra/api_op_DeleteExperience.go +++ b/service/kendra/api_op_DeleteExperience.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteExperienceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeleteFaq.go b/service/kendra/api_op_DeleteFaq.go index a9f11031428..a3aa68f81a7 100644 --- a/service/kendra/api_op_DeleteFaq.go +++ b/service/kendra/api_op_DeleteFaq.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFaqMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFaqValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeleteIndex.go b/service/kendra/api_op_DeleteIndex.go index 6d880c4fa0e..cf60b20b526 100644 --- a/service/kendra/api_op_DeleteIndex.go +++ b/service/kendra/api_op_DeleteIndex.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeletePrincipalMapping.go b/service/kendra/api_op_DeletePrincipalMapping.go index 2753a39a72a..92bef38d23c 100644 --- a/service/kendra/api_op_DeletePrincipalMapping.go +++ b/service/kendra/api_op_DeletePrincipalMapping.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDeletePrincipalMappingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePrincipalMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeleteQuerySuggestionsBlockList.go b/service/kendra/api_op_DeleteQuerySuggestionsBlockList.go index eda70dbab0f..5d5d717aeca 100644 --- a/service/kendra/api_op_DeleteQuerySuggestionsBlockList.go +++ b/service/kendra/api_op_DeleteQuerySuggestionsBlockList.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteQuerySuggestionsBlockListMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQuerySuggestionsBlockListValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DeleteThesaurus.go b/service/kendra/api_op_DeleteThesaurus.go index 80042a41a64..30713331f4e 100644 --- a/service/kendra/api_op_DeleteThesaurus.go +++ b/service/kendra/api_op_DeleteThesaurus.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteThesaurusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThesaurusValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeAccessControlConfiguration.go b/service/kendra/api_op_DescribeAccessControlConfiguration.go index aa57c800839..f21dba6a544 100644 --- a/service/kendra/api_op_DescribeAccessControlConfiguration.go +++ b/service/kendra/api_op_DescribeAccessControlConfiguration.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeAccessControlConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccessControlConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeDataSource.go b/service/kendra/api_op_DescribeDataSource.go index 5331eca50b8..14d187b0da4 100644 --- a/service/kendra/api_op_DescribeDataSource.go +++ b/service/kendra/api_op_DescribeDataSource.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeDataSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeExperience.go b/service/kendra/api_op_DescribeExperience.go index 161ef6a251b..f8b9edc0edd 100644 --- a/service/kendra/api_op_DescribeExperience.go +++ b/service/kendra/api_op_DescribeExperience.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDescribeExperienceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeFaq.go b/service/kendra/api_op_DescribeFaq.go index c8fd968bd0d..2557d50f467 100644 --- a/service/kendra/api_op_DescribeFaq.go +++ b/service/kendra/api_op_DescribeFaq.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeFaqMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFaqValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeFeaturedResultsSet.go b/service/kendra/api_op_DescribeFeaturedResultsSet.go index 29fe1fefaa1..7919f69c0d9 100644 --- a/service/kendra/api_op_DescribeFeaturedResultsSet.go +++ b/service/kendra/api_op_DescribeFeaturedResultsSet.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeFeaturedResultsSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFeaturedResultsSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeIndex.go b/service/kendra/api_op_DescribeIndex.go index c7c6a0f5f06..6a718073ca2 100644 --- a/service/kendra/api_op_DescribeIndex.go +++ b/service/kendra/api_op_DescribeIndex.go @@ -169,6 +169,9 @@ func (c *Client) addOperationDescribeIndexMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribePrincipalMapping.go b/service/kendra/api_op_DescribePrincipalMapping.go index 6ce6d18c6e9..02b3d35e940 100644 --- a/service/kendra/api_op_DescribePrincipalMapping.go +++ b/service/kendra/api_op_DescribePrincipalMapping.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribePrincipalMappingMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePrincipalMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeQuerySuggestionsBlockList.go b/service/kendra/api_op_DescribeQuerySuggestionsBlockList.go index ca8c3476305..b0b76693bce 100644 --- a/service/kendra/api_op_DescribeQuerySuggestionsBlockList.go +++ b/service/kendra/api_op_DescribeQuerySuggestionsBlockList.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeQuerySuggestionsBlockListMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeQuerySuggestionsBlockListValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeQuerySuggestionsConfig.go b/service/kendra/api_op_DescribeQuerySuggestionsConfig.go index 2dc22b3750c..cb0440e0668 100644 --- a/service/kendra/api_op_DescribeQuerySuggestionsConfig.go +++ b/service/kendra/api_op_DescribeQuerySuggestionsConfig.go @@ -171,6 +171,9 @@ func (c *Client) addOperationDescribeQuerySuggestionsConfigMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeQuerySuggestionsConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DescribeThesaurus.go b/service/kendra/api_op_DescribeThesaurus.go index e95081adb90..6d1cdfead1d 100644 --- a/service/kendra/api_op_DescribeThesaurus.go +++ b/service/kendra/api_op_DescribeThesaurus.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeThesaurusMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThesaurusValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DisassociateEntitiesFromExperience.go b/service/kendra/api_op_DisassociateEntitiesFromExperience.go index c7c84674392..e3e7f1a0858 100644 --- a/service/kendra/api_op_DisassociateEntitiesFromExperience.go +++ b/service/kendra/api_op_DisassociateEntitiesFromExperience.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDisassociateEntitiesFromExperienceMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateEntitiesFromExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_DisassociatePersonasFromEntities.go b/service/kendra/api_op_DisassociatePersonasFromEntities.go index 2a119036b9b..643920f55ba 100644 --- a/service/kendra/api_op_DisassociatePersonasFromEntities.go +++ b/service/kendra/api_op_DisassociatePersonasFromEntities.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDisassociatePersonasFromEntitiesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePersonasFromEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_GetQuerySuggestions.go b/service/kendra/api_op_GetQuerySuggestions.go index 3aa63c2d4c3..b4286618c8c 100644 --- a/service/kendra/api_op_GetQuerySuggestions.go +++ b/service/kendra/api_op_GetQuerySuggestions.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetQuerySuggestionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQuerySuggestionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_GetSnapshots.go b/service/kendra/api_op_GetSnapshots.go index d4e969f682b..a52b8fa04a5 100644 --- a/service/kendra/api_op_GetSnapshots.go +++ b/service/kendra/api_op_GetSnapshots.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetSnapshotsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSnapshotsValidationMiddleware(stack); err != nil { return err } @@ -185,13 +188,6 @@ func (c *Client) addOperationGetSnapshotsMiddlewares(stack *middleware.Stack, op return nil } -// GetSnapshotsAPIClient is a client that implements the GetSnapshots operation. -type GetSnapshotsAPIClient interface { - GetSnapshots(context.Context, *GetSnapshotsInput, ...func(*Options)) (*GetSnapshotsOutput, error) -} - -var _ GetSnapshotsAPIClient = (*Client)(nil) - // GetSnapshotsPaginatorOptions is the paginator options for GetSnapshots type GetSnapshotsPaginatorOptions struct { // The maximum number of returned data for the metric. @@ -255,6 +251,9 @@ func (p *GetSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +273,13 @@ func (p *GetSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetSnapshotsAPIClient is a client that implements the GetSnapshots operation. +type GetSnapshotsAPIClient interface { + GetSnapshots(context.Context, *GetSnapshotsInput, ...func(*Options)) (*GetSnapshotsOutput, error) +} + +var _ GetSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListAccessControlConfigurations.go b/service/kendra/api_op_ListAccessControlConfigurations.go index 582afbc9afe..5eec2199ca3 100644 --- a/service/kendra/api_op_ListAccessControlConfigurations.go +++ b/service/kendra/api_op_ListAccessControlConfigurations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAccessControlConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessControlConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAccessControlConfigurationsMiddlewares(stack *m return nil } -// ListAccessControlConfigurationsAPIClient is a client that implements the -// ListAccessControlConfigurations operation. -type ListAccessControlConfigurationsAPIClient interface { - ListAccessControlConfigurations(context.Context, *ListAccessControlConfigurationsInput, ...func(*Options)) (*ListAccessControlConfigurationsOutput, error) -} - -var _ ListAccessControlConfigurationsAPIClient = (*Client)(nil) - // ListAccessControlConfigurationsPaginatorOptions is the paginator options for // ListAccessControlConfigurations type ListAccessControlConfigurationsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListAccessControlConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessControlConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListAccessControlConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAccessControlConfigurationsAPIClient is a client that implements the +// ListAccessControlConfigurations operation. +type ListAccessControlConfigurationsAPIClient interface { + ListAccessControlConfigurations(context.Context, *ListAccessControlConfigurationsInput, ...func(*Options)) (*ListAccessControlConfigurationsOutput, error) +} + +var _ ListAccessControlConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessControlConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListDataSourceSyncJobs.go b/service/kendra/api_op_ListDataSourceSyncJobs.go index 1b6d374dcc6..e4a57945540 100644 --- a/service/kendra/api_op_ListDataSourceSyncJobs.go +++ b/service/kendra/api_op_ListDataSourceSyncJobs.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListDataSourceSyncJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourceSyncJobsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListDataSourceSyncJobsMiddlewares(stack *middleware return nil } -// ListDataSourceSyncJobsAPIClient is a client that implements the -// ListDataSourceSyncJobs operation. -type ListDataSourceSyncJobsAPIClient interface { - ListDataSourceSyncJobs(context.Context, *ListDataSourceSyncJobsInput, ...func(*Options)) (*ListDataSourceSyncJobsOutput, error) -} - -var _ ListDataSourceSyncJobsAPIClient = (*Client)(nil) - // ListDataSourceSyncJobsPaginatorOptions is the paginator options for // ListDataSourceSyncJobs type ListDataSourceSyncJobsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListDataSourceSyncJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSourceSyncJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListDataSourceSyncJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDataSourceSyncJobsAPIClient is a client that implements the +// ListDataSourceSyncJobs operation. +type ListDataSourceSyncJobsAPIClient interface { + ListDataSourceSyncJobs(context.Context, *ListDataSourceSyncJobsInput, ...func(*Options)) (*ListDataSourceSyncJobsOutput, error) +} + +var _ ListDataSourceSyncJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSourceSyncJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListDataSources.go b/service/kendra/api_op_ListDataSources.go index b1e13021a8c..f75bcb4a5b6 100644 --- a/service/kendra/api_op_ListDataSources.go +++ b/service/kendra/api_op_ListDataSources.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListDataSourcesAPIClient is a client that implements the ListDataSources -// operation. -type ListDataSourcesAPIClient interface { - ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) -} - -var _ ListDataSourcesAPIClient = (*Client)(nil) - // ListDataSourcesPaginatorOptions is the paginator options for ListDataSources type ListDataSourcesPaginatorOptions struct { // The maximum number of data source connectors to return. @@ -213,6 +208,9 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDataSourcesAPIClient is a client that implements the ListDataSources +// operation. +type ListDataSourcesAPIClient interface { + ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) +} + +var _ ListDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListEntityPersonas.go b/service/kendra/api_op_ListEntityPersonas.go index c04b6a3bb93..5aaa53d5bf1 100644 --- a/service/kendra/api_op_ListEntityPersonas.go +++ b/service/kendra/api_op_ListEntityPersonas.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListEntityPersonasMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEntityPersonasValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListEntityPersonasMiddlewares(stack *middleware.Sta return nil } -// ListEntityPersonasAPIClient is a client that implements the ListEntityPersonas -// operation. -type ListEntityPersonasAPIClient interface { - ListEntityPersonas(context.Context, *ListEntityPersonasInput, ...func(*Options)) (*ListEntityPersonasOutput, error) -} - -var _ ListEntityPersonasAPIClient = (*Client)(nil) - // ListEntityPersonasPaginatorOptions is the paginator options for // ListEntityPersonas type ListEntityPersonasPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListEntityPersonasPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntityPersonas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListEntityPersonasPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEntityPersonasAPIClient is a client that implements the ListEntityPersonas +// operation. +type ListEntityPersonasAPIClient interface { + ListEntityPersonas(context.Context, *ListEntityPersonasInput, ...func(*Options)) (*ListEntityPersonasOutput, error) +} + +var _ ListEntityPersonasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntityPersonas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListExperienceEntities.go b/service/kendra/api_op_ListExperienceEntities.go index e9d04d5c3f6..720fad07c24 100644 --- a/service/kendra/api_op_ListExperienceEntities.go +++ b/service/kendra/api_op_ListExperienceEntities.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListExperienceEntitiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExperienceEntitiesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListExperienceEntitiesMiddlewares(stack *middleware return nil } -// ListExperienceEntitiesAPIClient is a client that implements the -// ListExperienceEntities operation. -type ListExperienceEntitiesAPIClient interface { - ListExperienceEntities(context.Context, *ListExperienceEntitiesInput, ...func(*Options)) (*ListExperienceEntitiesOutput, error) -} - -var _ ListExperienceEntitiesAPIClient = (*Client)(nil) - // ListExperienceEntitiesPaginatorOptions is the paginator options for // ListExperienceEntities type ListExperienceEntitiesPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListExperienceEntitiesPaginator) NextPage(ctx context.Context, optFns . params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperienceEntities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListExperienceEntitiesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListExperienceEntitiesAPIClient is a client that implements the +// ListExperienceEntities operation. +type ListExperienceEntitiesAPIClient interface { + ListExperienceEntities(context.Context, *ListExperienceEntitiesInput, ...func(*Options)) (*ListExperienceEntitiesOutput, error) +} + +var _ ListExperienceEntitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperienceEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListExperiences.go b/service/kendra/api_op_ListExperiences.go index 2cb87af8914..01a80bf1090 100644 --- a/service/kendra/api_op_ListExperiences.go +++ b/service/kendra/api_op_ListExperiences.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListExperiencesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExperiencesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListExperiencesMiddlewares(stack *middleware.Stack, return nil } -// ListExperiencesAPIClient is a client that implements the ListExperiences -// operation. -type ListExperiencesAPIClient interface { - ListExperiences(context.Context, *ListExperiencesInput, ...func(*Options)) (*ListExperiencesOutput, error) -} - -var _ ListExperiencesAPIClient = (*Client)(nil) - // ListExperiencesPaginatorOptions is the paginator options for ListExperiences type ListExperiencesPaginatorOptions struct { // The maximum number of returned Amazon Kendra experiences. @@ -217,6 +212,9 @@ func (p *ListExperiencesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperiences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListExperiencesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListExperiencesAPIClient is a client that implements the ListExperiences +// operation. +type ListExperiencesAPIClient interface { + ListExperiences(context.Context, *ListExperiencesInput, ...func(*Options)) (*ListExperiencesOutput, error) +} + +var _ ListExperiencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperiences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListFaqs.go b/service/kendra/api_op_ListFaqs.go index 5be13ed2c5c..72d10cb92b9 100644 --- a/service/kendra/api_op_ListFaqs.go +++ b/service/kendra/api_op_ListFaqs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListFaqsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFaqsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListFaqsMiddlewares(stack *middleware.Stack, option return nil } -// ListFaqsAPIClient is a client that implements the ListFaqs operation. -type ListFaqsAPIClient interface { - ListFaqs(context.Context, *ListFaqsInput, ...func(*Options)) (*ListFaqsOutput, error) -} - -var _ ListFaqsAPIClient = (*Client)(nil) - // ListFaqsPaginatorOptions is the paginator options for ListFaqs type ListFaqsPaginatorOptions struct { // The maximum number of FAQs to return in the response. If there are fewer @@ -214,6 +210,9 @@ func (p *ListFaqsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFaqs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListFaqsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListFaqsAPIClient is a client that implements the ListFaqs operation. +type ListFaqsAPIClient interface { + ListFaqs(context.Context, *ListFaqsInput, ...func(*Options)) (*ListFaqsOutput, error) +} + +var _ ListFaqsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFaqs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListFeaturedResultsSets.go b/service/kendra/api_op_ListFeaturedResultsSets.go index 52c5a421cac..b01f980098d 100644 --- a/service/kendra/api_op_ListFeaturedResultsSets.go +++ b/service/kendra/api_op_ListFeaturedResultsSets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListFeaturedResultsSetsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFeaturedResultsSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_ListGroupsOlderThanOrderingId.go b/service/kendra/api_op_ListGroupsOlderThanOrderingId.go index 0fb152778c2..598b5b8b2cd 100644 --- a/service/kendra/api_op_ListGroupsOlderThanOrderingId.go +++ b/service/kendra/api_op_ListGroupsOlderThanOrderingId.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListGroupsOlderThanOrderingIdMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsOlderThanOrderingIdValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListGroupsOlderThanOrderingIdMiddlewares(stack *mid return nil } -// ListGroupsOlderThanOrderingIdAPIClient is a client that implements the -// ListGroupsOlderThanOrderingId operation. -type ListGroupsOlderThanOrderingIdAPIClient interface { - ListGroupsOlderThanOrderingId(context.Context, *ListGroupsOlderThanOrderingIdInput, ...func(*Options)) (*ListGroupsOlderThanOrderingIdOutput, error) -} - -var _ ListGroupsOlderThanOrderingIdAPIClient = (*Client)(nil) - // ListGroupsOlderThanOrderingIdPaginatorOptions is the paginator options for // ListGroupsOlderThanOrderingId type ListGroupsOlderThanOrderingIdPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListGroupsOlderThanOrderingIdPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupsOlderThanOrderingId(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListGroupsOlderThanOrderingIdPaginator) NextPage(ctx context.Context, o return result, nil } +// ListGroupsOlderThanOrderingIdAPIClient is a client that implements the +// ListGroupsOlderThanOrderingId operation. +type ListGroupsOlderThanOrderingIdAPIClient interface { + ListGroupsOlderThanOrderingId(context.Context, *ListGroupsOlderThanOrderingIdInput, ...func(*Options)) (*ListGroupsOlderThanOrderingIdOutput, error) +} + +var _ ListGroupsOlderThanOrderingIdAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupsOlderThanOrderingId(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListIndices.go b/service/kendra/api_op_ListIndices.go index c7494ff137f..fdd9763e8a2 100644 --- a/service/kendra/api_op_ListIndices.go +++ b/service/kendra/api_op_ListIndices.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIndices(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListIndicesAPIClient is a client that implements the ListIndices operation. -type ListIndicesAPIClient interface { - ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) -} - -var _ ListIndicesAPIClient = (*Client)(nil) - // ListIndicesPaginatorOptions is the paginator options for ListIndices type ListIndicesPaginatorOptions struct { // The maximum number of indices to return. @@ -204,6 +200,9 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIndices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListIndicesAPIClient is a client that implements the ListIndices operation. +type ListIndicesAPIClient interface { + ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) +} + +var _ ListIndicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIndices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListQuerySuggestionsBlockLists.go b/service/kendra/api_op_ListQuerySuggestionsBlockLists.go index 4f320f810df..8f6399eee4c 100644 --- a/service/kendra/api_op_ListQuerySuggestionsBlockLists.go +++ b/service/kendra/api_op_ListQuerySuggestionsBlockLists.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListQuerySuggestionsBlockListsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQuerySuggestionsBlockListsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListQuerySuggestionsBlockListsMiddlewares(stack *mi return nil } -// ListQuerySuggestionsBlockListsAPIClient is a client that implements the -// ListQuerySuggestionsBlockLists operation. -type ListQuerySuggestionsBlockListsAPIClient interface { - ListQuerySuggestionsBlockLists(context.Context, *ListQuerySuggestionsBlockListsInput, ...func(*Options)) (*ListQuerySuggestionsBlockListsOutput, error) -} - -var _ ListQuerySuggestionsBlockListsAPIClient = (*Client)(nil) - // ListQuerySuggestionsBlockListsPaginatorOptions is the paginator options for // ListQuerySuggestionsBlockLists type ListQuerySuggestionsBlockListsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListQuerySuggestionsBlockListsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQuerySuggestionsBlockLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListQuerySuggestionsBlockListsPaginator) NextPage(ctx context.Context, return result, nil } +// ListQuerySuggestionsBlockListsAPIClient is a client that implements the +// ListQuerySuggestionsBlockLists operation. +type ListQuerySuggestionsBlockListsAPIClient interface { + ListQuerySuggestionsBlockLists(context.Context, *ListQuerySuggestionsBlockListsInput, ...func(*Options)) (*ListQuerySuggestionsBlockListsOutput, error) +} + +var _ ListQuerySuggestionsBlockListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQuerySuggestionsBlockLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_ListTagsForResource.go b/service/kendra/api_op_ListTagsForResource.go index f0351d34abd..c342bcfa750 100644 --- a/service/kendra/api_op_ListTagsForResource.go +++ b/service/kendra/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_ListThesauri.go b/service/kendra/api_op_ListThesauri.go index 50d8193027e..fe60dbe6704 100644 --- a/service/kendra/api_op_ListThesauri.go +++ b/service/kendra/api_op_ListThesauri.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListThesauriMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThesauriValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListThesauriMiddlewares(stack *middleware.Stack, op return nil } -// ListThesauriAPIClient is a client that implements the ListThesauri operation. -type ListThesauriAPIClient interface { - ListThesauri(context.Context, *ListThesauriInput, ...func(*Options)) (*ListThesauriOutput, error) -} - -var _ ListThesauriAPIClient = (*Client)(nil) - // ListThesauriPaginatorOptions is the paginator options for ListThesauri type ListThesauriPaginatorOptions struct { // The maximum number of thesauri to return. @@ -213,6 +209,9 @@ func (p *ListThesauriPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThesauri(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListThesauriPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListThesauriAPIClient is a client that implements the ListThesauri operation. +type ListThesauriAPIClient interface { + ListThesauri(context.Context, *ListThesauriInput, ...func(*Options)) (*ListThesauriOutput, error) +} + +var _ ListThesauriAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThesauri(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendra/api_op_PutPrincipalMapping.go b/service/kendra/api_op_PutPrincipalMapping.go index dafe653fc39..289d2b25ac4 100644 --- a/service/kendra/api_op_PutPrincipalMapping.go +++ b/service/kendra/api_op_PutPrincipalMapping.go @@ -171,6 +171,9 @@ func (c *Client) addOperationPutPrincipalMappingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPrincipalMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_Query.go b/service/kendra/api_op_Query.go index f91ce3ff4be..ce72ab14742 100644 --- a/service/kendra/api_op_Query.go +++ b/service/kendra/api_op_Query.go @@ -258,6 +258,9 @@ func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options O if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_Retrieve.go b/service/kendra/api_op_Retrieve.go index 8dcdf1ddd05..0538fa5e31c 100644 --- a/service/kendra/api_op_Retrieve.go +++ b/service/kendra/api_op_Retrieve.go @@ -196,6 +196,9 @@ func (c *Client) addOperationRetrieveMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_StartDataSourceSyncJob.go b/service/kendra/api_op_StartDataSourceSyncJob.go index d686ae87ccd..60705da5d0a 100644 --- a/service/kendra/api_op_StartDataSourceSyncJob.go +++ b/service/kendra/api_op_StartDataSourceSyncJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartDataSourceSyncJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDataSourceSyncJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_StopDataSourceSyncJob.go b/service/kendra/api_op_StopDataSourceSyncJob.go index 1470d1b0b51..139472d3787 100644 --- a/service/kendra/api_op_StopDataSourceSyncJob.go +++ b/service/kendra/api_op_StopDataSourceSyncJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopDataSourceSyncJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDataSourceSyncJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_SubmitFeedback.go b/service/kendra/api_op_SubmitFeedback.go index 5102c197482..8e60e41e675 100644 --- a/service/kendra/api_op_SubmitFeedback.go +++ b/service/kendra/api_op_SubmitFeedback.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSubmitFeedbackMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_TagResource.go b/service/kendra/api_op_TagResource.go index 0930a6d4333..678080fa9d1 100644 --- a/service/kendra/api_op_TagResource.go +++ b/service/kendra/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UntagResource.go b/service/kendra/api_op_UntagResource.go index 84b32ea74a9..da8c94b7e82 100644 --- a/service/kendra/api_op_UntagResource.go +++ b/service/kendra/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateAccessControlConfiguration.go b/service/kendra/api_op_UpdateAccessControlConfiguration.go index 22a565717e7..f6909c09953 100644 --- a/service/kendra/api_op_UpdateAccessControlConfiguration.go +++ b/service/kendra/api_op_UpdateAccessControlConfiguration.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateAccessControlConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccessControlConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateDataSource.go b/service/kendra/api_op_UpdateDataSource.go index 6ef3f6a3943..93bf01e69bb 100644 --- a/service/kendra/api_op_UpdateDataSource.go +++ b/service/kendra/api_op_UpdateDataSource.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateExperience.go b/service/kendra/api_op_UpdateExperience.go index 5a80e509b74..4b14e04d6d1 100644 --- a/service/kendra/api_op_UpdateExperience.go +++ b/service/kendra/api_op_UpdateExperience.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateExperienceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateFeaturedResultsSet.go b/service/kendra/api_op_UpdateFeaturedResultsSet.go index 57127fcd24e..8d1fe114250 100644 --- a/service/kendra/api_op_UpdateFeaturedResultsSet.go +++ b/service/kendra/api_op_UpdateFeaturedResultsSet.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateFeaturedResultsSetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFeaturedResultsSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateIndex.go b/service/kendra/api_op_UpdateIndex.go index 6859ff1cbb9..92dcc97dd07 100644 --- a/service/kendra/api_op_UpdateIndex.go +++ b/service/kendra/api_op_UpdateIndex.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateQuerySuggestionsBlockList.go b/service/kendra/api_op_UpdateQuerySuggestionsBlockList.go index ec87eb8d6bc..83003a259db 100644 --- a/service/kendra/api_op_UpdateQuerySuggestionsBlockList.go +++ b/service/kendra/api_op_UpdateQuerySuggestionsBlockList.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateQuerySuggestionsBlockListMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQuerySuggestionsBlockListValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateQuerySuggestionsConfig.go b/service/kendra/api_op_UpdateQuerySuggestionsConfig.go index dcb41dbf407..99b6aaff695 100644 --- a/service/kendra/api_op_UpdateQuerySuggestionsConfig.go +++ b/service/kendra/api_op_UpdateQuerySuggestionsConfig.go @@ -173,6 +173,9 @@ func (c *Client) addOperationUpdateQuerySuggestionsConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQuerySuggestionsConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendra/api_op_UpdateThesaurus.go b/service/kendra/api_op_UpdateThesaurus.go index f333248c3cd..e414f7a1f8b 100644 --- a/service/kendra/api_op_UpdateThesaurus.go +++ b/service/kendra/api_op_UpdateThesaurus.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateThesaurusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThesaurusValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_client.go b/service/kendraranking/api_client.go index 946fc60fac5..d5ede2f5385 100644 --- a/service/kendraranking/api_client.go +++ b/service/kendraranking/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/kendraranking/api_op_CreateRescoreExecutionPlan.go b/service/kendraranking/api_op_CreateRescoreExecutionPlan.go index ea22f734062..14ba0e3aa96 100644 --- a/service/kendraranking/api_op_CreateRescoreExecutionPlan.go +++ b/service/kendraranking/api_op_CreateRescoreExecutionPlan.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateRescoreExecutionPlanMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRescoreExecutionPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/kendraranking/api_op_DeleteRescoreExecutionPlan.go b/service/kendraranking/api_op_DeleteRescoreExecutionPlan.go index 5aef4b0c810..8b562e0bb45 100644 --- a/service/kendraranking/api_op_DeleteRescoreExecutionPlan.go +++ b/service/kendraranking/api_op_DeleteRescoreExecutionPlan.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRescoreExecutionPlanMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_op_DescribeRescoreExecutionPlan.go b/service/kendraranking/api_op_DescribeRescoreExecutionPlan.go index 10c0ca25106..3fc172945a1 100644 --- a/service/kendraranking/api_op_DescribeRescoreExecutionPlan.go +++ b/service/kendraranking/api_op_DescribeRescoreExecutionPlan.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeRescoreExecutionPlanMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_op_ListRescoreExecutionPlans.go b/service/kendraranking/api_op_ListRescoreExecutionPlans.go index 54292e7f560..cfde3f42420 100644 --- a/service/kendraranking/api_op_ListRescoreExecutionPlans.go +++ b/service/kendraranking/api_op_ListRescoreExecutionPlans.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRescoreExecutionPlansMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRescoreExecutionPlans(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListRescoreExecutionPlansMiddlewares(stack *middlew return nil } -// ListRescoreExecutionPlansAPIClient is a client that implements the -// ListRescoreExecutionPlans operation. -type ListRescoreExecutionPlansAPIClient interface { - ListRescoreExecutionPlans(context.Context, *ListRescoreExecutionPlansInput, ...func(*Options)) (*ListRescoreExecutionPlansOutput, error) -} - -var _ ListRescoreExecutionPlansAPIClient = (*Client)(nil) - // ListRescoreExecutionPlansPaginatorOptions is the paginator options for // ListRescoreExecutionPlans type ListRescoreExecutionPlansPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListRescoreExecutionPlansPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRescoreExecutionPlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListRescoreExecutionPlansPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListRescoreExecutionPlansAPIClient is a client that implements the +// ListRescoreExecutionPlans operation. +type ListRescoreExecutionPlansAPIClient interface { + ListRescoreExecutionPlans(context.Context, *ListRescoreExecutionPlansInput, ...func(*Options)) (*ListRescoreExecutionPlansOutput, error) +} + +var _ ListRescoreExecutionPlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRescoreExecutionPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kendraranking/api_op_ListTagsForResource.go b/service/kendraranking/api_op_ListTagsForResource.go index 05d680da63b..a57f45d3c21 100644 --- a/service/kendraranking/api_op_ListTagsForResource.go +++ b/service/kendraranking/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_op_Rescore.go b/service/kendraranking/api_op_Rescore.go index 3adb59b65ee..adb9045582d 100644 --- a/service/kendraranking/api_op_Rescore.go +++ b/service/kendraranking/api_op_Rescore.go @@ -127,6 +127,9 @@ func (c *Client) addOperationRescoreMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRescoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_op_TagResource.go b/service/kendraranking/api_op_TagResource.go index 2e74f9161df..c4a28f1a1aa 100644 --- a/service/kendraranking/api_op_TagResource.go +++ b/service/kendraranking/api_op_TagResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_op_UntagResource.go b/service/kendraranking/api_op_UntagResource.go index 1bfb58e9142..49b38baa1d9 100644 --- a/service/kendraranking/api_op_UntagResource.go +++ b/service/kendraranking/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kendraranking/api_op_UpdateRescoreExecutionPlan.go b/service/kendraranking/api_op_UpdateRescoreExecutionPlan.go index 65aba506241..07f3de781a1 100644 --- a/service/kendraranking/api_op_UpdateRescoreExecutionPlan.go +++ b/service/kendraranking/api_op_UpdateRescoreExecutionPlan.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateRescoreExecutionPlanMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRescoreExecutionPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_client.go b/service/keyspaces/api_client.go index ddbe1af6f0b..945149be90f 100644 --- a/service/keyspaces/api_client.go +++ b/service/keyspaces/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/keyspaces/api_op_CreateKeyspace.go b/service/keyspaces/api_op_CreateKeyspace.go index f0bb624bcb6..6fa9d4524d7 100644 --- a/service/keyspaces/api_op_CreateKeyspace.go +++ b/service/keyspaces/api_op_CreateKeyspace.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateKeyspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_CreateTable.go b/service/keyspaces/api_op_CreateTable.go index 86a7fdeed30..c57794c8813 100644 --- a/service/keyspaces/api_op_CreateTable.go +++ b/service/keyspaces/api_op_CreateTable.go @@ -279,6 +279,9 @@ func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_DeleteKeyspace.go b/service/keyspaces/api_op_DeleteKeyspace.go index d0fa6f047fe..4fc58e7f271 100644 --- a/service/keyspaces/api_op_DeleteKeyspace.go +++ b/service/keyspaces/api_op_DeleteKeyspace.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteKeyspaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeyspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_DeleteTable.go b/service/keyspaces/api_op_DeleteTable.go index fcd3351971a..443b21e4edb 100644 --- a/service/keyspaces/api_op_DeleteTable.go +++ b/service/keyspaces/api_op_DeleteTable.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_GetKeyspace.go b/service/keyspaces/api_op_GetKeyspace.go index 264768ee5a2..d8c6aeec874 100644 --- a/service/keyspaces/api_op_GetKeyspace.go +++ b/service/keyspaces/api_op_GetKeyspace.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetKeyspaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_GetTable.go b/service/keyspaces/api_op_GetTable.go index a5edd47a816..a1e1da8bfe2 100644 --- a/service/keyspaces/api_op_GetTable.go +++ b/service/keyspaces/api_op_GetTable.go @@ -166,6 +166,9 @@ func (c *Client) addOperationGetTableMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_GetTableAutoScalingSettings.go b/service/keyspaces/api_op_GetTableAutoScalingSettings.go index 95a99d01a43..56a8ebe112d 100644 --- a/service/keyspaces/api_op_GetTableAutoScalingSettings.go +++ b/service/keyspaces/api_op_GetTableAutoScalingSettings.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetTableAutoScalingSettingsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableAutoScalingSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_ListKeyspaces.go b/service/keyspaces/api_op_ListKeyspaces.go index 85962d813c0..0fa5781d339 100644 --- a/service/keyspaces/api_op_ListKeyspaces.go +++ b/service/keyspaces/api_op_ListKeyspaces.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListKeyspacesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyspaces(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListKeyspacesMiddlewares(stack *middleware.Stack, o return nil } -// ListKeyspacesAPIClient is a client that implements the ListKeyspaces operation. -type ListKeyspacesAPIClient interface { - ListKeyspaces(context.Context, *ListKeyspacesInput, ...func(*Options)) (*ListKeyspacesOutput, error) -} - -var _ ListKeyspacesAPIClient = (*Client)(nil) - // ListKeyspacesPaginatorOptions is the paginator options for ListKeyspaces type ListKeyspacesPaginatorOptions struct { // The total number of keyspaces to return in the output. If the total number of @@ -211,6 +207,9 @@ func (p *ListKeyspacesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeyspaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListKeyspacesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListKeyspacesAPIClient is a client that implements the ListKeyspaces operation. +type ListKeyspacesAPIClient interface { + ListKeyspaces(context.Context, *ListKeyspacesInput, ...func(*Options)) (*ListKeyspacesOutput, error) +} + +var _ ListKeyspacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeyspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/keyspaces/api_op_ListTables.go b/service/keyspaces/api_op_ListTables.go index a13dff39f08..a9960dc5276 100644 --- a/service/keyspaces/api_op_ListTables.go +++ b/service/keyspaces/api_op_ListTables.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTablesValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti return nil } -// ListTablesAPIClient is a client that implements the ListTables operation. -type ListTablesAPIClient interface { - ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) -} - -var _ ListTablesAPIClient = (*Client)(nil) - // ListTablesPaginatorOptions is the paginator options for ListTables type ListTablesPaginatorOptions struct { // The total number of tables to return in the output. If the total number of @@ -217,6 +213,9 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTablesAPIClient is a client that implements the ListTables operation. +type ListTablesAPIClient interface { + ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) +} + +var _ ListTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/keyspaces/api_op_ListTagsForResource.go b/service/keyspaces/api_op_ListTagsForResource.go index 9acc717cc9f..bc8b92ff04d 100644 --- a/service/keyspaces/api_op_ListTagsForResource.go +++ b/service/keyspaces/api_op_ListTagsForResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/keyspaces/api_op_RestoreTable.go b/service/keyspaces/api_op_RestoreTable.go index b9bc9bf3b8a..e1ff6bcb7fb 100644 --- a/service/keyspaces/api_op_RestoreTable.go +++ b/service/keyspaces/api_op_RestoreTable.go @@ -236,6 +236,9 @@ func (c *Client) addOperationRestoreTableMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_TagResource.go b/service/keyspaces/api_op_TagResource.go index f5fe29f4020..ba93f9c9902 100644 --- a/service/keyspaces/api_op_TagResource.go +++ b/service/keyspaces/api_op_TagResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_UntagResource.go b/service/keyspaces/api_op_UntagResource.go index 6efb79c0773..e7565f67e12 100644 --- a/service/keyspaces/api_op_UntagResource.go +++ b/service/keyspaces/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/keyspaces/api_op_UpdateTable.go b/service/keyspaces/api_op_UpdateTable.go index c36e1b3e705..10d26355f92 100644 --- a/service/keyspaces/api_op_UpdateTable.go +++ b/service/keyspaces/api_op_UpdateTable.go @@ -219,6 +219,9 @@ func (c *Client) addOperationUpdateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_client.go b/service/kinesis/api_client.go index 3f9a4cc2686..03101a1bcb5 100644 --- a/service/kinesis/api_client.go +++ b/service/kinesis/api_client.go @@ -452,6 +452,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -537,6 +561,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesis/api_op_AddTagsToStream.go b/service/kinesis/api_op_AddTagsToStream.go index 8920121e056..5667f9d31f9 100644 --- a/service/kinesis/api_op_AddTagsToStream.go +++ b/service/kinesis/api_op_AddTagsToStream.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAddTagsToStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_CreateStream.go b/service/kinesis/api_op_CreateStream.go index 5d4cba9154b..e6225a09284 100644 --- a/service/kinesis/api_op_CreateStream.go +++ b/service/kinesis/api_op_CreateStream.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go b/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go index cab56a18b6b..719ee2d4be1 100644 --- a/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go +++ b/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDecreaseStreamRetentionPeriodMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecreaseStreamRetentionPeriodValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_DeleteResourcePolicy.go b/service/kinesis/api_op_DeleteResourcePolicy.go index 4bf8a326ce5..272d04a41e5 100644 --- a/service/kinesis/api_op_DeleteResourcePolicy.go +++ b/service/kinesis/api_op_DeleteResourcePolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_DeleteStream.go b/service/kinesis/api_op_DeleteStream.go index 6f1c1f9d3d3..d24f33dac3e 100644 --- a/service/kinesis/api_op_DeleteStream.go +++ b/service/kinesis/api_op_DeleteStream.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDeleteStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesis/api_op_DeregisterStreamConsumer.go b/service/kinesis/api_op_DeregisterStreamConsumer.go index 41231aefc3c..edf6f8ccb92 100644 --- a/service/kinesis/api_op_DeregisterStreamConsumer.go +++ b/service/kinesis/api_op_DeregisterStreamConsumer.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeregisterStreamConsumerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterStreamConsumer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesis/api_op_DescribeLimits.go b/service/kinesis/api_op_DescribeLimits.go index 95f22656132..c1400f25c72 100644 --- a/service/kinesis/api_op_DescribeLimits.go +++ b/service/kinesis/api_op_DescribeLimits.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeLimitsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLimits(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesis/api_op_DescribeStream.go b/service/kinesis/api_op_DescribeStream.go index d57b352716c..ed2f6d5a196 100644 --- a/service/kinesis/api_op_DescribeStream.go +++ b/service/kinesis/api_op_DescribeStream.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStream(options.Region), middleware.Before); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationDescribeStreamMiddlewares(stack *middleware.Stack, return nil } -// DescribeStreamAPIClient is a client that implements the DescribeStream -// operation. -type DescribeStreamAPIClient interface { - DescribeStream(context.Context, *DescribeStreamInput, ...func(*Options)) (*DescribeStreamOutput, error) -} - -var _ DescribeStreamAPIClient = (*Client)(nil) - // StreamExistsWaiterOptions are waiter options for StreamExistsWaiter type StreamExistsWaiterOptions struct { @@ -308,7 +303,13 @@ func (w *StreamExistsWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeStream(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -481,7 +482,13 @@ func (w *StreamNotExistsWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeStream(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -529,6 +536,14 @@ func streamNotExistsStateRetryable(ctx context.Context, input *DescribeStreamInp return true, nil } +// DescribeStreamAPIClient is a client that implements the DescribeStream +// operation. +type DescribeStreamAPIClient interface { + DescribeStream(context.Context, *DescribeStreamInput, ...func(*Options)) (*DescribeStreamOutput, error) +} + +var _ DescribeStreamAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesis/api_op_DescribeStreamConsumer.go b/service/kinesis/api_op_DescribeStreamConsumer.go index 4a06a07d0d9..ff01564fedd 100644 --- a/service/kinesis/api_op_DescribeStreamConsumer.go +++ b/service/kinesis/api_op_DescribeStreamConsumer.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeStreamConsumerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStreamConsumer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesis/api_op_DescribeStreamSummary.go b/service/kinesis/api_op_DescribeStreamSummary.go index db48e020def..84e1891c5b2 100644 --- a/service/kinesis/api_op_DescribeStreamSummary.go +++ b/service/kinesis/api_op_DescribeStreamSummary.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeStreamSummaryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStreamSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesis/api_op_DisableEnhancedMonitoring.go b/service/kinesis/api_op_DisableEnhancedMonitoring.go index f582a3287fe..acb590be095 100644 --- a/service/kinesis/api_op_DisableEnhancedMonitoring.go +++ b/service/kinesis/api_op_DisableEnhancedMonitoring.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDisableEnhancedMonitoringMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableEnhancedMonitoringValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_EnableEnhancedMonitoring.go b/service/kinesis/api_op_EnableEnhancedMonitoring.go index d6e656917c9..0ce5810582a 100644 --- a/service/kinesis/api_op_EnableEnhancedMonitoring.go +++ b/service/kinesis/api_op_EnableEnhancedMonitoring.go @@ -158,6 +158,9 @@ func (c *Client) addOperationEnableEnhancedMonitoringMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableEnhancedMonitoringValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_GetRecords.go b/service/kinesis/api_op_GetRecords.go index 3bcf6029db8..44684ab323a 100644 --- a/service/kinesis/api_op_GetRecords.go +++ b/service/kinesis/api_op_GetRecords.go @@ -205,6 +205,9 @@ func (c *Client) addOperationGetRecordsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_GetResourcePolicy.go b/service/kinesis/api_op_GetResourcePolicy.go index 7a3f9534473..52cc5a20a83 100644 --- a/service/kinesis/api_op_GetResourcePolicy.go +++ b/service/kinesis/api_op_GetResourcePolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_GetShardIterator.go b/service/kinesis/api_op_GetShardIterator.go index 14e90dac36c..796a38f6a79 100644 --- a/service/kinesis/api_op_GetShardIterator.go +++ b/service/kinesis/api_op_GetShardIterator.go @@ -199,6 +199,9 @@ func (c *Client) addOperationGetShardIteratorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetShardIteratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go b/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go index de52db524bc..1fc0e6fb911 100644 --- a/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go +++ b/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go @@ -129,6 +129,9 @@ func (c *Client) addOperationIncreaseStreamRetentionPeriodMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIncreaseStreamRetentionPeriodValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_ListShards.go b/service/kinesis/api_op_ListShards.go index 1dd14f0d1c8..226cfea2bd3 100644 --- a/service/kinesis/api_op_ListShards.go +++ b/service/kinesis/api_op_ListShards.go @@ -218,6 +218,9 @@ func (c *Client) addOperationListShardsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListShardsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_ListStreamConsumers.go b/service/kinesis/api_op_ListStreamConsumers.go index d5c79d09870..5220eb46170 100644 --- a/service/kinesis/api_op_ListStreamConsumers.go +++ b/service/kinesis/api_op_ListStreamConsumers.go @@ -170,6 +170,9 @@ func (c *Client) addOperationListStreamConsumersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStreamConsumersValidationMiddleware(stack); err != nil { return err } @@ -194,14 +197,6 @@ func (c *Client) addOperationListStreamConsumersMiddlewares(stack *middleware.St return nil } -// ListStreamConsumersAPIClient is a client that implements the -// ListStreamConsumers operation. -type ListStreamConsumersAPIClient interface { - ListStreamConsumers(context.Context, *ListStreamConsumersInput, ...func(*Options)) (*ListStreamConsumersOutput, error) -} - -var _ ListStreamConsumersAPIClient = (*Client)(nil) - // ListStreamConsumersPaginatorOptions is the paginator options for // ListStreamConsumers type ListStreamConsumersPaginatorOptions struct { @@ -268,6 +263,9 @@ func (p *ListStreamConsumersPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamConsumers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -287,6 +285,14 @@ func (p *ListStreamConsumersPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListStreamConsumersAPIClient is a client that implements the +// ListStreamConsumers operation. +type ListStreamConsumersAPIClient interface { + ListStreamConsumers(context.Context, *ListStreamConsumersInput, ...func(*Options)) (*ListStreamConsumersOutput, error) +} + +var _ ListStreamConsumersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamConsumers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesis/api_op_ListStreams.go b/service/kinesis/api_op_ListStreams.go index 748f2ab3617..d49bd06aa92 100644 --- a/service/kinesis/api_op_ListStreams.go +++ b/service/kinesis/api_op_ListStreams.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil { return err } @@ -163,13 +166,6 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt return nil } -// ListStreamsAPIClient is a client that implements the ListStreams operation. -type ListStreamsAPIClient interface { - ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) -} - -var _ ListStreamsAPIClient = (*Client)(nil) - // ListStreamsPaginatorOptions is the paginator options for ListStreams type ListStreamsPaginatorOptions struct { // The maximum number of streams to list. The default value is 100. If you specify @@ -234,6 +230,9 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListStreamsAPIClient is a client that implements the ListStreams operation. +type ListStreamsAPIClient interface { + ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) +} + +var _ ListStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesis/api_op_ListTagsForStream.go b/service/kinesis/api_op_ListTagsForStream.go index f56009e48c8..32b46c852ba 100644 --- a/service/kinesis/api_op_ListTagsForStream.go +++ b/service/kinesis/api_op_ListTagsForStream.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListTagsForStreamMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesis/api_op_MergeShards.go b/service/kinesis/api_op_MergeShards.go index 18e4932d5cf..ac82d5b57af 100644 --- a/service/kinesis/api_op_MergeShards.go +++ b/service/kinesis/api_op_MergeShards.go @@ -160,6 +160,9 @@ func (c *Client) addOperationMergeShardsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMergeShardsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_PutRecord.go b/service/kinesis/api_op_PutRecord.go index be37a935f70..6a2faff5db1 100644 --- a/service/kinesis/api_op_PutRecord.go +++ b/service/kinesis/api_op_PutRecord.go @@ -212,6 +212,9 @@ func (c *Client) addOperationPutRecordMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_PutRecords.go b/service/kinesis/api_op_PutRecords.go index d81e4438bb9..2bb2cd092a3 100644 --- a/service/kinesis/api_op_PutRecords.go +++ b/service/kinesis/api_op_PutRecords.go @@ -206,6 +206,9 @@ func (c *Client) addOperationPutRecordsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_PutResourcePolicy.go b/service/kinesis/api_op_PutResourcePolicy.go index 6fa3caa515f..566648ca3f5 100644 --- a/service/kinesis/api_op_PutResourcePolicy.go +++ b/service/kinesis/api_op_PutResourcePolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_RegisterStreamConsumer.go b/service/kinesis/api_op_RegisterStreamConsumer.go index e1eaef51c55..72d5b36b40f 100644 --- a/service/kinesis/api_op_RegisterStreamConsumer.go +++ b/service/kinesis/api_op_RegisterStreamConsumer.go @@ -139,6 +139,9 @@ func (c *Client) addOperationRegisterStreamConsumerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterStreamConsumerValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_RemoveTagsFromStream.go b/service/kinesis/api_op_RemoveTagsFromStream.go index f1d6dea775a..33f59007932 100644 --- a/service/kinesis/api_op_RemoveTagsFromStream.go +++ b/service/kinesis/api_op_RemoveTagsFromStream.go @@ -123,6 +123,9 @@ func (c *Client) addOperationRemoveTagsFromStreamMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_SplitShard.go b/service/kinesis/api_op_SplitShard.go index 1ff48e9e6f3..c9619e577a8 100644 --- a/service/kinesis/api_op_SplitShard.go +++ b/service/kinesis/api_op_SplitShard.go @@ -174,6 +174,9 @@ func (c *Client) addOperationSplitShardMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSplitShardValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_StartStreamEncryption.go b/service/kinesis/api_op_StartStreamEncryption.go index 2b7765e14fe..d8b2c0148eb 100644 --- a/service/kinesis/api_op_StartStreamEncryption.go +++ b/service/kinesis/api_op_StartStreamEncryption.go @@ -155,6 +155,9 @@ func (c *Client) addOperationStartStreamEncryptionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartStreamEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_StopStreamEncryption.go b/service/kinesis/api_op_StopStreamEncryption.go index 5ce57cf07f7..58af4cf628a 100644 --- a/service/kinesis/api_op_StopStreamEncryption.go +++ b/service/kinesis/api_op_StopStreamEncryption.go @@ -155,6 +155,9 @@ func (c *Client) addOperationStopStreamEncryptionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopStreamEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_SubscribeToShard.go b/service/kinesis/api_op_SubscribeToShard.go index 8e5ea0b437a..efaf86709fc 100644 --- a/service/kinesis/api_op_SubscribeToShard.go +++ b/service/kinesis/api_op_SubscribeToShard.go @@ -148,6 +148,9 @@ func (c *Client) addOperationSubscribeToShardMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubscribeToShardValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_UpdateShardCount.go b/service/kinesis/api_op_UpdateShardCount.go index ef55db45eeb..b2de4f3674f 100644 --- a/service/kinesis/api_op_UpdateShardCount.go +++ b/service/kinesis/api_op_UpdateShardCount.go @@ -192,6 +192,9 @@ func (c *Client) addOperationUpdateShardCountMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateShardCountValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesis/api_op_UpdateStreamMode.go b/service/kinesis/api_op_UpdateStreamMode.go index 04428c86a80..a78ac98a678 100644 --- a/service/kinesis/api_op_UpdateStreamMode.go +++ b/service/kinesis/api_op_UpdateStreamMode.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateStreamModeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStreamModeValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_client.go b/service/kinesisanalytics/api_client.go index 9266d07ae2a..ab44d2dd2a5 100644 --- a/service/kinesisanalytics/api_client.go +++ b/service/kinesisanalytics/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisanalytics/api_op_AddApplicationCloudWatchLoggingOption.go b/service/kinesisanalytics/api_op_AddApplicationCloudWatchLoggingOption.go index 5821c9b07a9..fd1294f96f4 100644 --- a/service/kinesisanalytics/api_op_AddApplicationCloudWatchLoggingOption.go +++ b/service/kinesisanalytics/api_op_AddApplicationCloudWatchLoggingOption.go @@ -122,6 +122,9 @@ func (c *Client) addOperationAddApplicationCloudWatchLoggingOptionMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationCloudWatchLoggingOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_AddApplicationInput.go b/service/kinesisanalytics/api_op_AddApplicationInput.go index 6b6ac7a26f2..da15367f23b 100644 --- a/service/kinesisanalytics/api_op_AddApplicationInput.go +++ b/service/kinesisanalytics/api_op_AddApplicationInput.go @@ -138,6 +138,9 @@ func (c *Client) addOperationAddApplicationInputMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_AddApplicationInputProcessingConfiguration.go b/service/kinesisanalytics/api_op_AddApplicationInputProcessingConfiguration.go index fdbce2bd4f1..09460013460 100644 --- a/service/kinesisanalytics/api_op_AddApplicationInputProcessingConfiguration.go +++ b/service/kinesisanalytics/api_op_AddApplicationInputProcessingConfiguration.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAddApplicationInputProcessingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationInputProcessingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_AddApplicationOutput.go b/service/kinesisanalytics/api_op_AddApplicationOutput.go index dfd3323a688..c629c35fd4b 100644 --- a/service/kinesisanalytics/api_op_AddApplicationOutput.go +++ b/service/kinesisanalytics/api_op_AddApplicationOutput.go @@ -150,6 +150,9 @@ func (c *Client) addOperationAddApplicationOutputMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go b/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go index d6b8ec87f51..b3f13b2f8b7 100644 --- a/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go +++ b/service/kinesisanalytics/api_op_AddApplicationReferenceDataSource.go @@ -142,6 +142,9 @@ func (c *Client) addOperationAddApplicationReferenceDataSourceMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationReferenceDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_CreateApplication.go b/service/kinesisanalytics/api_op_CreateApplication.go index cf8c0275c21..7d559c3b7e5 100644 --- a/service/kinesisanalytics/api_op_CreateApplication.go +++ b/service/kinesisanalytics/api_op_CreateApplication.go @@ -217,6 +217,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DeleteApplication.go b/service/kinesisanalytics/api_op_DeleteApplication.go index 6da5590651a..89c207d2a15 100644 --- a/service/kinesisanalytics/api_op_DeleteApplication.go +++ b/service/kinesisanalytics/api_op_DeleteApplication.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DeleteApplicationCloudWatchLoggingOption.go b/service/kinesisanalytics/api_op_DeleteApplicationCloudWatchLoggingOption.go index f80f1fdfdf9..29618d2e8d6 100644 --- a/service/kinesisanalytics/api_op_DeleteApplicationCloudWatchLoggingOption.go +++ b/service/kinesisanalytics/api_op_DeleteApplicationCloudWatchLoggingOption.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteApplicationCloudWatchLoggingOptionMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationCloudWatchLoggingOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DeleteApplicationInputProcessingConfiguration.go b/service/kinesisanalytics/api_op_DeleteApplicationInputProcessingConfiguration.go index f34ac55a7c3..020841f2267 100644 --- a/service/kinesisanalytics/api_op_DeleteApplicationInputProcessingConfiguration.go +++ b/service/kinesisanalytics/api_op_DeleteApplicationInputProcessingConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteApplicationInputProcessingConfigurationMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationInputProcessingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DeleteApplicationOutput.go b/service/kinesisanalytics/api_op_DeleteApplicationOutput.go index 8fb4b5be4a7..772bfa79fdf 100644 --- a/service/kinesisanalytics/api_op_DeleteApplicationOutput.go +++ b/service/kinesisanalytics/api_op_DeleteApplicationOutput.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteApplicationOutputMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DeleteApplicationReferenceDataSource.go b/service/kinesisanalytics/api_op_DeleteApplicationReferenceDataSource.go index de35c6df308..2ac61e1e3d6 100644 --- a/service/kinesisanalytics/api_op_DeleteApplicationReferenceDataSource.go +++ b/service/kinesisanalytics/api_op_DeleteApplicationReferenceDataSource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteApplicationReferenceDataSourceMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationReferenceDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DescribeApplication.go b/service/kinesisanalytics/api_op_DescribeApplication.go index df36154a9f3..83e507a8dfc 100644 --- a/service/kinesisanalytics/api_op_DescribeApplication.go +++ b/service/kinesisanalytics/api_op_DescribeApplication.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_DiscoverInputSchema.go b/service/kinesisanalytics/api_op_DiscoverInputSchema.go index b75c631d27d..e8f612a4ff1 100644 --- a/service/kinesisanalytics/api_op_DiscoverInputSchema.go +++ b/service/kinesisanalytics/api_op_DiscoverInputSchema.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDiscoverInputSchemaMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDiscoverInputSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_ListApplications.go b/service/kinesisanalytics/api_op_ListApplications.go index 5d1fd01a011..cd996cea2e0 100644 --- a/service/kinesisanalytics/api_op_ListApplications.go +++ b/service/kinesisanalytics/api_op_ListApplications.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_ListTagsForResource.go b/service/kinesisanalytics/api_op_ListTagsForResource.go index 19b8b5bed62..c4a244002ef 100644 --- a/service/kinesisanalytics/api_op_ListTagsForResource.go +++ b/service/kinesisanalytics/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_StartApplication.go b/service/kinesisanalytics/api_op_StartApplication.go index 9b319a36919..a6c643aad4d 100644 --- a/service/kinesisanalytics/api_op_StartApplication.go +++ b/service/kinesisanalytics/api_op_StartApplication.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartApplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_StopApplication.go b/service/kinesisanalytics/api_op_StopApplication.go index c04fc17eb96..207ef4b560c 100644 --- a/service/kinesisanalytics/api_op_StopApplication.go +++ b/service/kinesisanalytics/api_op_StopApplication.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStopApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_TagResource.go b/service/kinesisanalytics/api_op_TagResource.go index 7c24612de46..3c8ca3fe982 100644 --- a/service/kinesisanalytics/api_op_TagResource.go +++ b/service/kinesisanalytics/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_UntagResource.go b/service/kinesisanalytics/api_op_UntagResource.go index a3fae416b30..17827c66cbb 100644 --- a/service/kinesisanalytics/api_op_UntagResource.go +++ b/service/kinesisanalytics/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalytics/api_op_UpdateApplication.go b/service/kinesisanalytics/api_op_UpdateApplication.go index c02395be105..aabd6c7ef6a 100644 --- a/service/kinesisanalytics/api_op_UpdateApplication.go +++ b/service/kinesisanalytics/api_op_UpdateApplication.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_client.go b/service/kinesisanalyticsv2/api_client.go index 29944e88733..46e2076e609 100644 --- a/service/kinesisanalyticsv2/api_client.go +++ b/service/kinesisanalyticsv2/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go b/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go index 1251b36cfe1..990a46af23b 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationCloudWatchLoggingOption.go @@ -134,6 +134,9 @@ func (c *Client) addOperationAddApplicationCloudWatchLoggingOptionMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationCloudWatchLoggingOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationInput.go b/service/kinesisanalyticsv2/api_op_AddApplicationInput.go index ed487b9b42a..70213afbe41 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationInput.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationInput.go @@ -133,6 +133,9 @@ func (c *Client) addOperationAddApplicationInputMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationInputProcessingConfiguration.go b/service/kinesisanalyticsv2/api_op_AddApplicationInputProcessingConfiguration.go index d3b63bf6f75..320836d25e4 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationInputProcessingConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationInputProcessingConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationAddApplicationInputProcessingConfigurationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationInputProcessingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationOutput.go b/service/kinesisanalyticsv2/api_op_AddApplicationOutput.go index 3bb04a8acb7..a4601c122df 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationOutput.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationOutput.go @@ -148,6 +148,9 @@ func (c *Client) addOperationAddApplicationOutputMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationReferenceDataSource.go b/service/kinesisanalyticsv2/api_op_AddApplicationReferenceDataSource.go index a152c700a9a..51355c8bb03 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationReferenceDataSource.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationReferenceDataSource.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAddApplicationReferenceDataSourceMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationReferenceDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go b/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go index d53f0bef58d..9f70bf2ed57 100644 --- a/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_AddApplicationVpcConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationAddApplicationVpcConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddApplicationVpcConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_CreateApplication.go b/service/kinesisanalyticsv2/api_op_CreateApplication.go index ba94da93a81..fe047e5b41b 100644 --- a/service/kinesisanalyticsv2/api_op_CreateApplication.go +++ b/service/kinesisanalyticsv2/api_op_CreateApplication.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_CreateApplicationPresignedUrl.go b/service/kinesisanalyticsv2/api_op_CreateApplicationPresignedUrl.go index 735f6327ee2..6d8859cd5aa 100644 --- a/service/kinesisanalyticsv2/api_op_CreateApplicationPresignedUrl.go +++ b/service/kinesisanalyticsv2/api_op_CreateApplicationPresignedUrl.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateApplicationPresignedUrlMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationPresignedUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_CreateApplicationSnapshot.go b/service/kinesisanalyticsv2/api_op_CreateApplicationSnapshot.go index f5255305377..0c197024f75 100644 --- a/service/kinesisanalyticsv2/api_op_CreateApplicationSnapshot.go +++ b/service/kinesisanalyticsv2/api_op_CreateApplicationSnapshot.go @@ -106,6 +106,9 @@ func (c *Client) addOperationCreateApplicationSnapshotMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplication.go b/service/kinesisanalyticsv2/api_op_DeleteApplication.go index 76cb5619bd7..78c21a194e6 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplication.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go index ebeff098269..ecef8bac21c 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationCloudWatchLoggingOption.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteApplicationCloudWatchLoggingOptionMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationCloudWatchLoggingOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationInputProcessingConfiguration.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationInputProcessingConfiguration.go index e050bc1016d..f1d8420ea44 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationInputProcessingConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationInputProcessingConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteApplicationInputProcessingConfigurationMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationInputProcessingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationOutput.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationOutput.go index 1d436fcde6a..3df34de2487 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationOutput.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationOutput.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteApplicationOutputMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationReferenceDataSource.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationReferenceDataSource.go index c0a0cafcb23..c58cd5be82f 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationReferenceDataSource.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationReferenceDataSource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteApplicationReferenceDataSourceMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationReferenceDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationSnapshot.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationSnapshot.go index 179fc0ffba6..3f5be90a9ac 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationSnapshot.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationSnapshot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteApplicationSnapshotMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go b/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go index c34d6d55b85..aae8fa12a45 100644 --- a/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_DeleteApplicationVpcConfiguration.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteApplicationVpcConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationVpcConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DescribeApplication.go b/service/kinesisanalyticsv2/api_op_DescribeApplication.go index 3f5d30d522c..59eb07f55c3 100644 --- a/service/kinesisanalyticsv2/api_op_DescribeApplication.go +++ b/service/kinesisanalyticsv2/api_op_DescribeApplication.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DescribeApplicationSnapshot.go b/service/kinesisanalyticsv2/api_op_DescribeApplicationSnapshot.go index bed10b57e43..24e3e1449d9 100644 --- a/service/kinesisanalyticsv2/api_op_DescribeApplicationSnapshot.go +++ b/service/kinesisanalyticsv2/api_op_DescribeApplicationSnapshot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeApplicationSnapshotMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go b/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go index ce88e419c92..d9df72b41c7 100644 --- a/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go +++ b/service/kinesisanalyticsv2/api_op_DescribeApplicationVersion.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeApplicationVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_DiscoverInputSchema.go b/service/kinesisanalyticsv2/api_op_DiscoverInputSchema.go index 4f4052f35b8..a33d74b72ac 100644 --- a/service/kinesisanalyticsv2/api_op_DiscoverInputSchema.go +++ b/service/kinesisanalyticsv2/api_op_DiscoverInputSchema.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDiscoverInputSchemaMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDiscoverInputSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go b/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go index 4da92919d8b..3cb74fcf98e 100644 --- a/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go +++ b/service/kinesisanalyticsv2/api_op_ListApplicationSnapshots.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListApplicationSnapshotsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationSnapshotsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go b/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go index cbe18fa1e43..e7cb54f8371 100644 --- a/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go +++ b/service/kinesisanalyticsv2/api_op_ListApplicationVersions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_ListApplications.go b/service/kinesisanalyticsv2/api_op_ListApplications.go index 75dac151889..97ff4d5a686 100644 --- a/service/kinesisanalyticsv2/api_op_ListApplications.go +++ b/service/kinesisanalyticsv2/api_op_ListApplications.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_ListTagsForResource.go b/service/kinesisanalyticsv2/api_op_ListTagsForResource.go index 312e142fc85..2305dc11c02 100644 --- a/service/kinesisanalyticsv2/api_op_ListTagsForResource.go +++ b/service/kinesisanalyticsv2/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_RollbackApplication.go b/service/kinesisanalyticsv2/api_op_RollbackApplication.go index 63c78db1572..95c3465f3e8 100644 --- a/service/kinesisanalyticsv2/api_op_RollbackApplication.go +++ b/service/kinesisanalyticsv2/api_op_RollbackApplication.go @@ -126,6 +126,9 @@ func (c *Client) addOperationRollbackApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRollbackApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_StartApplication.go b/service/kinesisanalyticsv2/api_op_StartApplication.go index 3711d15ca6d..2f453707b85 100644 --- a/service/kinesisanalyticsv2/api_op_StartApplication.go +++ b/service/kinesisanalyticsv2/api_op_StartApplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartApplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_StopApplication.go b/service/kinesisanalyticsv2/api_op_StopApplication.go index 9292255a758..fa2b86eddcf 100644 --- a/service/kinesisanalyticsv2/api_op_StopApplication.go +++ b/service/kinesisanalyticsv2/api_op_StopApplication.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStopApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_TagResource.go b/service/kinesisanalyticsv2/api_op_TagResource.go index 3c9eedef1e7..54472ce4dd8 100644 --- a/service/kinesisanalyticsv2/api_op_TagResource.go +++ b/service/kinesisanalyticsv2/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_UntagResource.go b/service/kinesisanalyticsv2/api_op_UntagResource.go index 27105a65d43..04f7b92c192 100644 --- a/service/kinesisanalyticsv2/api_op_UntagResource.go +++ b/service/kinesisanalyticsv2/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_UpdateApplication.go b/service/kinesisanalyticsv2/api_op_UpdateApplication.go index f4699c94256..2ad79c23cc3 100644 --- a/service/kinesisanalyticsv2/api_op_UpdateApplication.go +++ b/service/kinesisanalyticsv2/api_op_UpdateApplication.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go b/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go index c491e7658b0..9d306f00e6b 100644 --- a/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go +++ b/service/kinesisanalyticsv2/api_op_UpdateApplicationMaintenanceConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateApplicationMaintenanceConfigurationMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationMaintenanceConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_client.go b/service/kinesisvideo/api_client.go index 26563bc1ae1..ffc307cb1e2 100644 --- a/service/kinesisvideo/api_client.go +++ b/service/kinesisvideo/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisvideo/api_op_CreateSignalingChannel.go b/service/kinesisvideo/api_op_CreateSignalingChannel.go index e6b2607c970..8cd2fe64083 100644 --- a/service/kinesisvideo/api_op_CreateSignalingChannel.go +++ b/service/kinesisvideo/api_op_CreateSignalingChannel.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateSignalingChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSignalingChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_CreateStream.go b/service/kinesisvideo/api_op_CreateStream.go index 4e8ac58e261..2e8b89546b6 100644 --- a/service/kinesisvideo/api_op_CreateStream.go +++ b/service/kinesisvideo/api_op_CreateStream.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DeleteEdgeConfiguration.go b/service/kinesisvideo/api_op_DeleteEdgeConfiguration.go index 2e09331419f..29f1c1de7ea 100644 --- a/service/kinesisvideo/api_op_DeleteEdgeConfiguration.go +++ b/service/kinesisvideo/api_op_DeleteEdgeConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteEdgeConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEdgeConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DeleteSignalingChannel.go b/service/kinesisvideo/api_op_DeleteSignalingChannel.go index 985782a5a41..1020985ca64 100644 --- a/service/kinesisvideo/api_op_DeleteSignalingChannel.go +++ b/service/kinesisvideo/api_op_DeleteSignalingChannel.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSignalingChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSignalingChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DeleteStream.go b/service/kinesisvideo/api_op_DeleteStream.go index 8ec318c2cb4..40b409b9684 100644 --- a/service/kinesisvideo/api_op_DeleteStream.go +++ b/service/kinesisvideo/api_op_DeleteStream.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DescribeEdgeConfiguration.go b/service/kinesisvideo/api_op_DescribeEdgeConfiguration.go index b70b469d412..736fc385008 100644 --- a/service/kinesisvideo/api_op_DescribeEdgeConfiguration.go +++ b/service/kinesisvideo/api_op_DescribeEdgeConfiguration.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeEdgeConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEdgeConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DescribeImageGenerationConfiguration.go b/service/kinesisvideo/api_op_DescribeImageGenerationConfiguration.go index 74b456bc2aa..7243117eba2 100644 --- a/service/kinesisvideo/api_op_DescribeImageGenerationConfiguration.go +++ b/service/kinesisvideo/api_op_DescribeImageGenerationConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeImageGenerationConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImageGenerationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DescribeMappedResourceConfiguration.go b/service/kinesisvideo/api_op_DescribeMappedResourceConfiguration.go index 25490c25e68..dc03e4f9028 100644 --- a/service/kinesisvideo/api_op_DescribeMappedResourceConfiguration.go +++ b/service/kinesisvideo/api_op_DescribeMappedResourceConfiguration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeMappedResourceConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMappedResourceConfiguration(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeMappedResourceConfigurationMiddlewares(stac return nil } -// DescribeMappedResourceConfigurationAPIClient is a client that implements the -// DescribeMappedResourceConfiguration operation. -type DescribeMappedResourceConfigurationAPIClient interface { - DescribeMappedResourceConfiguration(context.Context, *DescribeMappedResourceConfigurationInput, ...func(*Options)) (*DescribeMappedResourceConfigurationOutput, error) -} - -var _ DescribeMappedResourceConfigurationAPIClient = (*Client)(nil) - // DescribeMappedResourceConfigurationPaginatorOptions is the paginator options // for DescribeMappedResourceConfiguration type DescribeMappedResourceConfigurationPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *DescribeMappedResourceConfigurationPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMappedResourceConfiguration(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeMappedResourceConfigurationPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeMappedResourceConfigurationAPIClient is a client that implements the +// DescribeMappedResourceConfiguration operation. +type DescribeMappedResourceConfigurationAPIClient interface { + DescribeMappedResourceConfiguration(context.Context, *DescribeMappedResourceConfigurationInput, ...func(*Options)) (*DescribeMappedResourceConfigurationOutput, error) +} + +var _ DescribeMappedResourceConfigurationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMappedResourceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideo/api_op_DescribeMediaStorageConfiguration.go b/service/kinesisvideo/api_op_DescribeMediaStorageConfiguration.go index 5ef6887be5c..b28b4c23a90 100644 --- a/service/kinesisvideo/api_op_DescribeMediaStorageConfiguration.go +++ b/service/kinesisvideo/api_op_DescribeMediaStorageConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeMediaStorageConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMediaStorageConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DescribeNotificationConfiguration.go b/service/kinesisvideo/api_op_DescribeNotificationConfiguration.go index 2068a693fc6..71d35d95ad7 100644 --- a/service/kinesisvideo/api_op_DescribeNotificationConfiguration.go +++ b/service/kinesisvideo/api_op_DescribeNotificationConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeNotificationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNotificationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DescribeSignalingChannel.go b/service/kinesisvideo/api_op_DescribeSignalingChannel.go index 5f624ac6459..8f0e40e93ee 100644 --- a/service/kinesisvideo/api_op_DescribeSignalingChannel.go +++ b/service/kinesisvideo/api_op_DescribeSignalingChannel.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeSignalingChannelMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSignalingChannel(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_DescribeStream.go b/service/kinesisvideo/api_op_DescribeStream.go index 911855b262d..a299caa9dc5 100644 --- a/service/kinesisvideo/api_op_DescribeStream.go +++ b/service/kinesisvideo/api_op_DescribeStream.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_GetDataEndpoint.go b/service/kinesisvideo/api_op_GetDataEndpoint.go index 76eccb9ebad..0fa3b562f7c 100644 --- a/service/kinesisvideo/api_op_GetDataEndpoint.go +++ b/service/kinesisvideo/api_op_GetDataEndpoint.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetDataEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_GetSignalingChannelEndpoint.go b/service/kinesisvideo/api_op_GetSignalingChannelEndpoint.go index 412ac34661a..43d93c4f291 100644 --- a/service/kinesisvideo/api_op_GetSignalingChannelEndpoint.go +++ b/service/kinesisvideo/api_op_GetSignalingChannelEndpoint.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetSignalingChannelEndpointMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSignalingChannelEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_ListEdgeAgentConfigurations.go b/service/kinesisvideo/api_op_ListEdgeAgentConfigurations.go index ef2af91942d..87650ddb6d4 100644 --- a/service/kinesisvideo/api_op_ListEdgeAgentConfigurations.go +++ b/service/kinesisvideo/api_op_ListEdgeAgentConfigurations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListEdgeAgentConfigurationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEdgeAgentConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListEdgeAgentConfigurationsMiddlewares(stack *middl return nil } -// ListEdgeAgentConfigurationsAPIClient is a client that implements the -// ListEdgeAgentConfigurations operation. -type ListEdgeAgentConfigurationsAPIClient interface { - ListEdgeAgentConfigurations(context.Context, *ListEdgeAgentConfigurationsInput, ...func(*Options)) (*ListEdgeAgentConfigurationsOutput, error) -} - -var _ ListEdgeAgentConfigurationsAPIClient = (*Client)(nil) - // ListEdgeAgentConfigurationsPaginatorOptions is the paginator options for // ListEdgeAgentConfigurations type ListEdgeAgentConfigurationsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListEdgeAgentConfigurationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEdgeAgentConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListEdgeAgentConfigurationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListEdgeAgentConfigurationsAPIClient is a client that implements the +// ListEdgeAgentConfigurations operation. +type ListEdgeAgentConfigurationsAPIClient interface { + ListEdgeAgentConfigurations(context.Context, *ListEdgeAgentConfigurationsInput, ...func(*Options)) (*ListEdgeAgentConfigurationsOutput, error) +} + +var _ ListEdgeAgentConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEdgeAgentConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideo/api_op_ListSignalingChannels.go b/service/kinesisvideo/api_op_ListSignalingChannels.go index c06be1a533c..c677481e41c 100644 --- a/service/kinesisvideo/api_op_ListSignalingChannels.go +++ b/service/kinesisvideo/api_op_ListSignalingChannels.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListSignalingChannelsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSignalingChannels(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListSignalingChannelsMiddlewares(stack *middleware. return nil } -// ListSignalingChannelsAPIClient is a client that implements the -// ListSignalingChannels operation. -type ListSignalingChannelsAPIClient interface { - ListSignalingChannels(context.Context, *ListSignalingChannelsInput, ...func(*Options)) (*ListSignalingChannelsOutput, error) -} - -var _ ListSignalingChannelsAPIClient = (*Client)(nil) - // ListSignalingChannelsPaginatorOptions is the paginator options for // ListSignalingChannels type ListSignalingChannelsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListSignalingChannelsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSignalingChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListSignalingChannelsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListSignalingChannelsAPIClient is a client that implements the +// ListSignalingChannels operation. +type ListSignalingChannelsAPIClient interface { + ListSignalingChannels(context.Context, *ListSignalingChannelsInput, ...func(*Options)) (*ListSignalingChannelsOutput, error) +} + +var _ ListSignalingChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSignalingChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideo/api_op_ListStreams.go b/service/kinesisvideo/api_op_ListStreams.go index 0a05175e36d..980bdfedd04 100644 --- a/service/kinesisvideo/api_op_ListStreams.go +++ b/service/kinesisvideo/api_op_ListStreams.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, opt return nil } -// ListStreamsAPIClient is a client that implements the ListStreams operation. -type ListStreamsAPIClient interface { - ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) -} - -var _ ListStreamsAPIClient = (*Client)(nil) - // ListStreamsPaginatorOptions is the paginator options for ListStreams type ListStreamsPaginatorOptions struct { // The maximum number of streams to return in the response. The default is 10,000. @@ -210,6 +206,9 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListStreamsAPIClient is a client that implements the ListStreams operation. +type ListStreamsAPIClient interface { + ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) +} + +var _ ListStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideo/api_op_ListTagsForResource.go b/service/kinesisvideo/api_op_ListTagsForResource.go index de995806f7c..5386aac60bc 100644 --- a/service/kinesisvideo/api_op_ListTagsForResource.go +++ b/service/kinesisvideo/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_ListTagsForStream.go b/service/kinesisvideo/api_op_ListTagsForStream.go index 30c46232711..61116b859ca 100644 --- a/service/kinesisvideo/api_op_ListTagsForStream.go +++ b/service/kinesisvideo/api_op_ListTagsForStream.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForStreamMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideo/api_op_StartEdgeConfigurationUpdate.go b/service/kinesisvideo/api_op_StartEdgeConfigurationUpdate.go index 19bc9d24848..482fcda1450 100644 --- a/service/kinesisvideo/api_op_StartEdgeConfigurationUpdate.go +++ b/service/kinesisvideo/api_op_StartEdgeConfigurationUpdate.go @@ -155,6 +155,9 @@ func (c *Client) addOperationStartEdgeConfigurationUpdateMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartEdgeConfigurationUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_TagResource.go b/service/kinesisvideo/api_op_TagResource.go index 9502e095c6a..47cfbebb23f 100644 --- a/service/kinesisvideo/api_op_TagResource.go +++ b/service/kinesisvideo/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_TagStream.go b/service/kinesisvideo/api_op_TagStream.go index 5f5d77f1079..0025417f3c1 100644 --- a/service/kinesisvideo/api_op_TagStream.go +++ b/service/kinesisvideo/api_op_TagStream.go @@ -121,6 +121,9 @@ func (c *Client) addOperationTagStreamMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UntagResource.go b/service/kinesisvideo/api_op_UntagResource.go index 3fb26cdbf1e..2094e7fc3de 100644 --- a/service/kinesisvideo/api_op_UntagResource.go +++ b/service/kinesisvideo/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UntagStream.go b/service/kinesisvideo/api_op_UntagStream.go index 8e9c1df0b84..e787b0ef3c0 100644 --- a/service/kinesisvideo/api_op_UntagStream.go +++ b/service/kinesisvideo/api_op_UntagStream.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagStreamMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UpdateDataRetention.go b/service/kinesisvideo/api_op_UpdateDataRetention.go index 20c7f3a3eb8..f827c426af9 100644 --- a/service/kinesisvideo/api_op_UpdateDataRetention.go +++ b/service/kinesisvideo/api_op_UpdateDataRetention.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateDataRetentionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataRetentionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UpdateImageGenerationConfiguration.go b/service/kinesisvideo/api_op_UpdateImageGenerationConfiguration.go index 243baf5f984..1ca42932c46 100644 --- a/service/kinesisvideo/api_op_UpdateImageGenerationConfiguration.go +++ b/service/kinesisvideo/api_op_UpdateImageGenerationConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateImageGenerationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateImageGenerationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UpdateMediaStorageConfiguration.go b/service/kinesisvideo/api_op_UpdateMediaStorageConfiguration.go index 329b4df76bb..00ed52c1959 100644 --- a/service/kinesisvideo/api_op_UpdateMediaStorageConfiguration.go +++ b/service/kinesisvideo/api_op_UpdateMediaStorageConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateMediaStorageConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMediaStorageConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UpdateNotificationConfiguration.go b/service/kinesisvideo/api_op_UpdateNotificationConfiguration.go index 684564e6da3..9c1400ba516 100644 --- a/service/kinesisvideo/api_op_UpdateNotificationConfiguration.go +++ b/service/kinesisvideo/api_op_UpdateNotificationConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateNotificationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotificationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UpdateSignalingChannel.go b/service/kinesisvideo/api_op_UpdateSignalingChannel.go index 789950275d2..1c8eeaf0499 100644 --- a/service/kinesisvideo/api_op_UpdateSignalingChannel.go +++ b/service/kinesisvideo/api_op_UpdateSignalingChannel.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateSignalingChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSignalingChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideo/api_op_UpdateStream.go b/service/kinesisvideo/api_op_UpdateStream.go index 7d3aa0cbe21..ff77b4c8a7d 100644 --- a/service/kinesisvideo/api_op_UpdateStream.go +++ b/service/kinesisvideo/api_op_UpdateStream.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateStreamMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideoarchivedmedia/api_client.go b/service/kinesisvideoarchivedmedia/api_client.go index 90408dcdb76..0314c65d399 100644 --- a/service/kinesisvideoarchivedmedia/api_client.go +++ b/service/kinesisvideoarchivedmedia/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisvideoarchivedmedia/api_op_GetClip.go b/service/kinesisvideoarchivedmedia/api_op_GetClip.go index 1762faac3cd..a53aa7549d8 100644 --- a/service/kinesisvideoarchivedmedia/api_op_GetClip.go +++ b/service/kinesisvideoarchivedmedia/api_op_GetClip.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetClipMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClipValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideoarchivedmedia/api_op_GetDASHStreamingSessionURL.go b/service/kinesisvideoarchivedmedia/api_op_GetDASHStreamingSessionURL.go index b5dd0ed998d..15f63ba5cad 100644 --- a/service/kinesisvideoarchivedmedia/api_op_GetDASHStreamingSessionURL.go +++ b/service/kinesisvideoarchivedmedia/api_op_GetDASHStreamingSessionURL.go @@ -349,6 +349,9 @@ func (c *Client) addOperationGetDASHStreamingSessionURLMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDASHStreamingSessionURL(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideoarchivedmedia/api_op_GetHLSStreamingSessionURL.go b/service/kinesisvideoarchivedmedia/api_op_GetHLSStreamingSessionURL.go index 8575184b9fe..1f4cd2a4f83 100644 --- a/service/kinesisvideoarchivedmedia/api_op_GetHLSStreamingSessionURL.go +++ b/service/kinesisvideoarchivedmedia/api_op_GetHLSStreamingSessionURL.go @@ -415,6 +415,9 @@ func (c *Client) addOperationGetHLSStreamingSessionURLMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHLSStreamingSessionURL(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kinesisvideoarchivedmedia/api_op_GetImages.go b/service/kinesisvideoarchivedmedia/api_op_GetImages.go index a5fd46ab55a..d1fec2877a5 100644 --- a/service/kinesisvideoarchivedmedia/api_op_GetImages.go +++ b/service/kinesisvideoarchivedmedia/api_op_GetImages.go @@ -183,6 +183,9 @@ func (c *Client) addOperationGetImagesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImagesValidationMiddleware(stack); err != nil { return err } @@ -207,13 +210,6 @@ func (c *Client) addOperationGetImagesMiddlewares(stack *middleware.Stack, optio return nil } -// GetImagesAPIClient is a client that implements the GetImages operation. -type GetImagesAPIClient interface { - GetImages(context.Context, *GetImagesInput, ...func(*Options)) (*GetImagesOutput, error) -} - -var _ GetImagesAPIClient = (*Client)(nil) - // GetImagesPaginatorOptions is the paginator options for GetImages type GetImagesPaginatorOptions struct { // The maximum number of images to be returned by the API. @@ -281,6 +277,9 @@ func (p *GetImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -300,6 +299,13 @@ func (p *GetImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// GetImagesAPIClient is a client that implements the GetImages operation. +type GetImagesAPIClient interface { + GetImages(context.Context, *GetImagesInput, ...func(*Options)) (*GetImagesOutput, error) +} + +var _ GetImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideoarchivedmedia/api_op_GetMediaForFragmentList.go b/service/kinesisvideoarchivedmedia/api_op_GetMediaForFragmentList.go index da99aa28a75..2f647de68f9 100644 --- a/service/kinesisvideoarchivedmedia/api_op_GetMediaForFragmentList.go +++ b/service/kinesisvideoarchivedmedia/api_op_GetMediaForFragmentList.go @@ -166,6 +166,9 @@ func (c *Client) addOperationGetMediaForFragmentListMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaForFragmentListValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideoarchivedmedia/api_op_ListFragments.go b/service/kinesisvideoarchivedmedia/api_op_ListFragments.go index aeb7b6e502c..04b55e8aab7 100644 --- a/service/kinesisvideoarchivedmedia/api_op_ListFragments.go +++ b/service/kinesisvideoarchivedmedia/api_op_ListFragments.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListFragmentsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFragmentsValidationMiddleware(stack); err != nil { return err } @@ -185,13 +188,6 @@ func (c *Client) addOperationListFragmentsMiddlewares(stack *middleware.Stack, o return nil } -// ListFragmentsAPIClient is a client that implements the ListFragments operation. -type ListFragmentsAPIClient interface { - ListFragments(context.Context, *ListFragmentsInput, ...func(*Options)) (*ListFragmentsOutput, error) -} - -var _ ListFragmentsAPIClient = (*Client)(nil) - // ListFragmentsPaginatorOptions is the paginator options for ListFragments type ListFragmentsPaginatorOptions struct { // The total number of fragments to return. If the total number of fragments @@ -257,6 +253,9 @@ func (p *ListFragmentsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFragments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +275,13 @@ func (p *ListFragmentsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListFragmentsAPIClient is a client that implements the ListFragments operation. +type ListFragmentsAPIClient interface { + ListFragments(context.Context, *ListFragmentsInput, ...func(*Options)) (*ListFragmentsOutput, error) +} + +var _ ListFragmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFragments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kinesisvideomedia/api_client.go b/service/kinesisvideomedia/api_client.go index 7e23059cc80..f26a66505d1 100644 --- a/service/kinesisvideomedia/api_client.go +++ b/service/kinesisvideomedia/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisvideomedia/api_op_GetMedia.go b/service/kinesisvideomedia/api_op_GetMedia.go index ca2b388a8d1..852a66912ca 100644 --- a/service/kinesisvideomedia/api_op_GetMedia.go +++ b/service/kinesisvideomedia/api_op_GetMedia.go @@ -202,6 +202,9 @@ func (c *Client) addOperationGetMediaMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideosignaling/api_client.go b/service/kinesisvideosignaling/api_client.go index 29325c19503..7a99f89c3de 100644 --- a/service/kinesisvideosignaling/api_client.go +++ b/service/kinesisvideosignaling/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisvideosignaling/api_op_GetIceServerConfig.go b/service/kinesisvideosignaling/api_op_GetIceServerConfig.go index 5094690d1e3..0d45fd7b9af 100644 --- a/service/kinesisvideosignaling/api_op_GetIceServerConfig.go +++ b/service/kinesisvideosignaling/api_op_GetIceServerConfig.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetIceServerConfigMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIceServerConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideosignaling/api_op_SendAlexaOfferToMaster.go b/service/kinesisvideosignaling/api_op_SendAlexaOfferToMaster.go index 96bbfb1e325..8c2384896d1 100644 --- a/service/kinesisvideosignaling/api_op_SendAlexaOfferToMaster.go +++ b/service/kinesisvideosignaling/api_op_SendAlexaOfferToMaster.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSendAlexaOfferToMasterMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendAlexaOfferToMasterValidationMiddleware(stack); err != nil { return err } diff --git a/service/kinesisvideowebrtcstorage/api_client.go b/service/kinesisvideowebrtcstorage/api_client.go index cd9fd682fff..5da9fa22acf 100644 --- a/service/kinesisvideowebrtcstorage/api_client.go +++ b/service/kinesisvideowebrtcstorage/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kinesisvideowebrtcstorage/api_op_JoinStorageSession.go b/service/kinesisvideowebrtcstorage/api_op_JoinStorageSession.go index 7955cf5fe23..acbf79d3e7b 100644 --- a/service/kinesisvideowebrtcstorage/api_op_JoinStorageSession.go +++ b/service/kinesisvideowebrtcstorage/api_op_JoinStorageSession.go @@ -122,6 +122,9 @@ func (c *Client) addOperationJoinStorageSessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpJoinStorageSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_client.go b/service/kms/api_client.go index cdb46d3aa45..d0592064282 100644 --- a/service/kms/api_client.go +++ b/service/kms/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/kms/api_op_CancelKeyDeletion.go b/service/kms/api_op_CancelKeyDeletion.go index 6c6b5467828..71c9a0c01b1 100644 --- a/service/kms/api_op_CancelKeyDeletion.go +++ b/service/kms/api_op_CancelKeyDeletion.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCancelKeyDeletionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelKeyDeletionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_ConnectCustomKeyStore.go b/service/kms/api_op_ConnectCustomKeyStore.go index adfaa26440a..967eb34fd66 100644 --- a/service/kms/api_op_ConnectCustomKeyStore.go +++ b/service/kms/api_op_ConnectCustomKeyStore.go @@ -194,6 +194,9 @@ func (c *Client) addOperationConnectCustomKeyStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConnectCustomKeyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_CreateAlias.go b/service/kms/api_op_CreateAlias.go index c9f6a366879..cca6fb5c9f7 100644 --- a/service/kms/api_op_CreateAlias.go +++ b/service/kms/api_op_CreateAlias.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_CreateCustomKeyStore.go b/service/kms/api_op_CreateCustomKeyStore.go index d601a863de8..b3e5109cc21 100644 --- a/service/kms/api_op_CreateCustomKeyStore.go +++ b/service/kms/api_op_CreateCustomKeyStore.go @@ -342,6 +342,9 @@ func (c *Client) addOperationCreateCustomKeyStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomKeyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_CreateGrant.go b/service/kms/api_op_CreateGrant.go index 608bdbb76b5..95754b366c5 100644 --- a/service/kms/api_op_CreateGrant.go +++ b/service/kms/api_op_CreateGrant.go @@ -300,6 +300,9 @@ func (c *Client) addOperationCreateGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_CreateKey.go b/service/kms/api_op_CreateKey.go index 05679dd9d8c..25aa94a0744 100644 --- a/service/kms/api_op_CreateKey.go +++ b/service/kms/api_op_CreateKey.go @@ -548,6 +548,9 @@ func (c *Client) addOperationCreateKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_Decrypt.go b/service/kms/api_op_Decrypt.go index a2436166049..6558f5bb843 100644 --- a/service/kms/api_op_Decrypt.go +++ b/service/kms/api_op_Decrypt.go @@ -311,6 +311,9 @@ func (c *Client) addOperationDecryptMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecryptValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DeleteAlias.go b/service/kms/api_op_DeleteAlias.go index 25db608d7b4..4dab0d25325 100644 --- a/service/kms/api_op_DeleteAlias.go +++ b/service/kms/api_op_DeleteAlias.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DeleteCustomKeyStore.go b/service/kms/api_op_DeleteCustomKeyStore.go index e144384195a..bab682962fc 100644 --- a/service/kms/api_op_DeleteCustomKeyStore.go +++ b/service/kms/api_op_DeleteCustomKeyStore.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDeleteCustomKeyStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomKeyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DeleteImportedKeyMaterial.go b/service/kms/api_op_DeleteImportedKeyMaterial.go index a07b8bfa3b4..480dfbcca50 100644 --- a/service/kms/api_op_DeleteImportedKeyMaterial.go +++ b/service/kms/api_op_DeleteImportedKeyMaterial.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeleteImportedKeyMaterialMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImportedKeyMaterialValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DeriveSharedSecret.go b/service/kms/api_op_DeriveSharedSecret.go index 54a20cad83b..1ec4daeaf71 100644 --- a/service/kms/api_op_DeriveSharedSecret.go +++ b/service/kms/api_op_DeriveSharedSecret.go @@ -313,6 +313,9 @@ func (c *Client) addOperationDeriveSharedSecretMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeriveSharedSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DescribeCustomKeyStores.go b/service/kms/api_op_DescribeCustomKeyStores.go index 92f82b76383..107f19bc7dd 100644 --- a/service/kms/api_op_DescribeCustomKeyStores.go +++ b/service/kms/api_op_DescribeCustomKeyStores.go @@ -193,6 +193,9 @@ func (c *Client) addOperationDescribeCustomKeyStoresMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomKeyStores(options.Region), middleware.Before); err != nil { return err } @@ -214,14 +217,6 @@ func (c *Client) addOperationDescribeCustomKeyStoresMiddlewares(stack *middlewar return nil } -// DescribeCustomKeyStoresAPIClient is a client that implements the -// DescribeCustomKeyStores operation. -type DescribeCustomKeyStoresAPIClient interface { - DescribeCustomKeyStores(context.Context, *DescribeCustomKeyStoresInput, ...func(*Options)) (*DescribeCustomKeyStoresOutput, error) -} - -var _ DescribeCustomKeyStoresAPIClient = (*Client)(nil) - // DescribeCustomKeyStoresPaginatorOptions is the paginator options for // DescribeCustomKeyStores type DescribeCustomKeyStoresPaginatorOptions struct { @@ -289,6 +284,9 @@ func (p *DescribeCustomKeyStoresPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCustomKeyStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -308,6 +306,14 @@ func (p *DescribeCustomKeyStoresPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeCustomKeyStoresAPIClient is a client that implements the +// DescribeCustomKeyStores operation. +type DescribeCustomKeyStoresAPIClient interface { + DescribeCustomKeyStores(context.Context, *DescribeCustomKeyStoresInput, ...func(*Options)) (*DescribeCustomKeyStoresOutput, error) +} + +var _ DescribeCustomKeyStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCustomKeyStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_DescribeKey.go b/service/kms/api_op_DescribeKey.go index 752b9fcbc17..67b026c3b8d 100644 --- a/service/kms/api_op_DescribeKey.go +++ b/service/kms/api_op_DescribeKey.go @@ -206,6 +206,9 @@ func (c *Client) addOperationDescribeKeyMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DisableKey.go b/service/kms/api_op_DisableKey.go index 31ecdec1058..20bfe6cb945 100644 --- a/service/kms/api_op_DisableKey.go +++ b/service/kms/api_op_DisableKey.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDisableKeyMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DisableKeyRotation.go b/service/kms/api_op_DisableKeyRotation.go index 0f3b9020c23..0a12984ac39 100644 --- a/service/kms/api_op_DisableKeyRotation.go +++ b/service/kms/api_op_DisableKeyRotation.go @@ -164,6 +164,9 @@ func (c *Client) addOperationDisableKeyRotationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableKeyRotationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_DisconnectCustomKeyStore.go b/service/kms/api_op_DisconnectCustomKeyStore.go index e37e538cd16..0b563fcbca4 100644 --- a/service/kms/api_op_DisconnectCustomKeyStore.go +++ b/service/kms/api_op_DisconnectCustomKeyStore.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDisconnectCustomKeyStoreMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisconnectCustomKeyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_EnableKey.go b/service/kms/api_op_EnableKey.go index b48ca368278..a792631d21e 100644 --- a/service/kms/api_op_EnableKey.go +++ b/service/kms/api_op_EnableKey.go @@ -131,6 +131,9 @@ func (c *Client) addOperationEnableKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_EnableKeyRotation.go b/service/kms/api_op_EnableKeyRotation.go index d64932198ea..2b6bae01b44 100644 --- a/service/kms/api_op_EnableKeyRotation.go +++ b/service/kms/api_op_EnableKeyRotation.go @@ -203,6 +203,9 @@ func (c *Client) addOperationEnableKeyRotationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableKeyRotationValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_Encrypt.go b/service/kms/api_op_Encrypt.go index e0f8a0ffe3b..9430f62f8e2 100644 --- a/service/kms/api_op_Encrypt.go +++ b/service/kms/api_op_Encrypt.go @@ -271,6 +271,9 @@ func (c *Client) addOperationEncryptMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEncryptValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GenerateDataKey.go b/service/kms/api_op_GenerateDataKey.go index 6936c7cbb42..d030a69437e 100644 --- a/service/kms/api_op_GenerateDataKey.go +++ b/service/kms/api_op_GenerateDataKey.go @@ -326,6 +326,9 @@ func (c *Client) addOperationGenerateDataKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateDataKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GenerateDataKeyPair.go b/service/kms/api_op_GenerateDataKeyPair.go index db4832201a0..8934cc5d8f6 100644 --- a/service/kms/api_op_GenerateDataKeyPair.go +++ b/service/kms/api_op_GenerateDataKeyPair.go @@ -324,6 +324,9 @@ func (c *Client) addOperationGenerateDataKeyPairMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateDataKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go b/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go index 3cf366035c1..bed654be640 100644 --- a/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go +++ b/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go @@ -251,6 +251,9 @@ func (c *Client) addOperationGenerateDataKeyPairWithoutPlaintextMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateDataKeyPairWithoutPlaintextValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go b/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go index f808103b165..bf130475372 100644 --- a/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go +++ b/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go @@ -251,6 +251,9 @@ func (c *Client) addOperationGenerateDataKeyWithoutPlaintextMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateDataKeyWithoutPlaintextValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GenerateMac.go b/service/kms/api_op_GenerateMac.go index 9aaaabb2cea..cec517c2b5e 100644 --- a/service/kms/api_op_GenerateMac.go +++ b/service/kms/api_op_GenerateMac.go @@ -196,6 +196,9 @@ func (c *Client) addOperationGenerateMacMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateMacValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GenerateRandom.go b/service/kms/api_op_GenerateRandom.go index 37f21e84a78..29aba8fa1c2 100644 --- a/service/kms/api_op_GenerateRandom.go +++ b/service/kms/api_op_GenerateRandom.go @@ -184,6 +184,9 @@ func (c *Client) addOperationGenerateRandomMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateRandom(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kms/api_op_GetKeyPolicy.go b/service/kms/api_op_GetKeyPolicy.go index a25f717d07c..ee38bff337f 100644 --- a/service/kms/api_op_GetKeyPolicy.go +++ b/service/kms/api_op_GetKeyPolicy.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetKeyPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GetKeyRotationStatus.go b/service/kms/api_op_GetKeyRotationStatus.go index 90d2dc07639..18d0e207e1e 100644 --- a/service/kms/api_op_GetKeyRotationStatus.go +++ b/service/kms/api_op_GetKeyRotationStatus.go @@ -207,6 +207,9 @@ func (c *Client) addOperationGetKeyRotationStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyRotationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GetParametersForImport.go b/service/kms/api_op_GetParametersForImport.go index 6feebace558..f1af81f15f2 100644 --- a/service/kms/api_op_GetParametersForImport.go +++ b/service/kms/api_op_GetParametersForImport.go @@ -255,6 +255,9 @@ func (c *Client) addOperationGetParametersForImportMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParametersForImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_GetPublicKey.go b/service/kms/api_op_GetPublicKey.go index 24a65183443..a32205fe309 100644 --- a/service/kms/api_op_GetPublicKey.go +++ b/service/kms/api_op_GetPublicKey.go @@ -246,6 +246,9 @@ func (c *Client) addOperationGetPublicKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_ImportKeyMaterial.go b/service/kms/api_op_ImportKeyMaterial.go index e71e35965a5..60395169bee 100644 --- a/service/kms/api_op_ImportKeyMaterial.go +++ b/service/kms/api_op_ImportKeyMaterial.go @@ -270,6 +270,9 @@ func (c *Client) addOperationImportKeyMaterialMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportKeyMaterialValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_ListAliases.go b/service/kms/api_op_ListAliases.go index fc7e45dba5e..67bc9d7aaf0 100644 --- a/service/kms/api_op_ListAliases.go +++ b/service/kms/api_op_ListAliases.go @@ -181,6 +181,9 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(options.Region), middleware.Before); err != nil { return err } @@ -202,13 +205,6 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt return nil } -// ListAliasesAPIClient is a client that implements the ListAliases operation. -type ListAliasesAPIClient interface { - ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) -} - -var _ ListAliasesAPIClient = (*Client)(nil) - // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -277,6 +273,9 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -296,6 +295,13 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_ListGrants.go b/service/kms/api_op_ListGrants.go index 67102f07580..2ee6363dd54 100644 --- a/service/kms/api_op_ListGrants.go +++ b/service/kms/api_op_ListGrants.go @@ -187,6 +187,9 @@ func (c *Client) addOperationListGrantsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGrantsValidationMiddleware(stack); err != nil { return err } @@ -211,13 +214,6 @@ func (c *Client) addOperationListGrantsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGrantsAPIClient is a client that implements the ListGrants operation. -type ListGrantsAPIClient interface { - ListGrants(context.Context, *ListGrantsInput, ...func(*Options)) (*ListGrantsOutput, error) -} - -var _ ListGrantsAPIClient = (*Client)(nil) - // ListGrantsPaginatorOptions is the paginator options for ListGrants type ListGrantsPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -286,6 +282,9 @@ func (p *ListGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -305,6 +304,13 @@ func (p *ListGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGrantsAPIClient is a client that implements the ListGrants operation. +type ListGrantsAPIClient interface { + ListGrants(context.Context, *ListGrantsInput, ...func(*Options)) (*ListGrantsOutput, error) +} + +var _ ListGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_ListKeyPolicies.go b/service/kms/api_op_ListKeyPolicies.go index 2a42510fd30..34522dd1a97 100644 --- a/service/kms/api_op_ListKeyPolicies.go +++ b/service/kms/api_op_ListKeyPolicies.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListKeyPoliciesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKeyPoliciesValidationMiddleware(stack); err != nil { return err } @@ -185,14 +188,6 @@ func (c *Client) addOperationListKeyPoliciesMiddlewares(stack *middleware.Stack, return nil } -// ListKeyPoliciesAPIClient is a client that implements the ListKeyPolicies -// operation. -type ListKeyPoliciesAPIClient interface { - ListKeyPolicies(context.Context, *ListKeyPoliciesInput, ...func(*Options)) (*ListKeyPoliciesOutput, error) -} - -var _ ListKeyPoliciesAPIClient = (*Client)(nil) - // ListKeyPoliciesPaginatorOptions is the paginator options for ListKeyPolicies type ListKeyPoliciesPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -263,6 +258,9 @@ func (p *ListKeyPoliciesPaginator) NextPage(ctx context.Context, optFns ...func( } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeyPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -282,6 +280,14 @@ func (p *ListKeyPoliciesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListKeyPoliciesAPIClient is a client that implements the ListKeyPolicies +// operation. +type ListKeyPoliciesAPIClient interface { + ListKeyPolicies(context.Context, *ListKeyPoliciesInput, ...func(*Options)) (*ListKeyPoliciesOutput, error) +} + +var _ ListKeyPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeyPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_ListKeyRotations.go b/service/kms/api_op_ListKeyRotations.go index 1b46f690f48..bc3524b325b 100644 --- a/service/kms/api_op_ListKeyRotations.go +++ b/service/kms/api_op_ListKeyRotations.go @@ -169,6 +169,9 @@ func (c *Client) addOperationListKeyRotationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListKeyRotationsValidationMiddleware(stack); err != nil { return err } @@ -193,14 +196,6 @@ func (c *Client) addOperationListKeyRotationsMiddlewares(stack *middleware.Stack return nil } -// ListKeyRotationsAPIClient is a client that implements the ListKeyRotations -// operation. -type ListKeyRotationsAPIClient interface { - ListKeyRotations(context.Context, *ListKeyRotationsInput, ...func(*Options)) (*ListKeyRotationsOutput, error) -} - -var _ ListKeyRotationsAPIClient = (*Client)(nil) - // ListKeyRotationsPaginatorOptions is the paginator options for ListKeyRotations type ListKeyRotationsPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -269,6 +264,9 @@ func (p *ListKeyRotationsPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeyRotations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +286,14 @@ func (p *ListKeyRotationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListKeyRotationsAPIClient is a client that implements the ListKeyRotations +// operation. +type ListKeyRotationsAPIClient interface { + ListKeyRotations(context.Context, *ListKeyRotationsInput, ...func(*Options)) (*ListKeyRotationsOutput, error) +} + +var _ ListKeyRotationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeyRotations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_ListKeys.go b/service/kms/api_op_ListKeys.go index 772770f84fe..80ed5ba24d5 100644 --- a/service/kms/api_op_ListKeys.go +++ b/service/kms/api_op_ListKeys.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeys(options.Region), middleware.Before); err != nil { return err } @@ -167,13 +170,6 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option return nil } -// ListKeysAPIClient is a client that implements the ListKeys operation. -type ListKeysAPIClient interface { - ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) -} - -var _ ListKeysAPIClient = (*Client)(nil) - // ListKeysPaginatorOptions is the paginator options for ListKeys type ListKeysPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -242,6 +238,9 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +260,13 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListKeysAPIClient is a client that implements the ListKeys operation. +type ListKeysAPIClient interface { + ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) +} + +var _ ListKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_ListResourceTags.go b/service/kms/api_op_ListResourceTags.go index 70753172667..a18dd7f019c 100644 --- a/service/kms/api_op_ListResourceTags.go +++ b/service/kms/api_op_ListResourceTags.go @@ -177,6 +177,9 @@ func (c *Client) addOperationListResourceTagsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceTagsValidationMiddleware(stack); err != nil { return err } @@ -201,14 +204,6 @@ func (c *Client) addOperationListResourceTagsMiddlewares(stack *middleware.Stack return nil } -// ListResourceTagsAPIClient is a client that implements the ListResourceTags -// operation. -type ListResourceTagsAPIClient interface { - ListResourceTags(context.Context, *ListResourceTagsInput, ...func(*Options)) (*ListResourceTagsOutput, error) -} - -var _ ListResourceTagsAPIClient = (*Client)(nil) - // ListResourceTagsPaginatorOptions is the paginator options for ListResourceTags type ListResourceTagsPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -277,6 +272,9 @@ func (p *ListResourceTagsPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -296,6 +294,14 @@ func (p *ListResourceTagsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListResourceTagsAPIClient is a client that implements the ListResourceTags +// operation. +type ListResourceTagsAPIClient interface { + ListResourceTags(context.Context, *ListResourceTagsInput, ...func(*Options)) (*ListResourceTagsOutput, error) +} + +var _ ListResourceTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_ListRetirableGrants.go b/service/kms/api_op_ListRetirableGrants.go index 0e16714619f..2bc033112b4 100644 --- a/service/kms/api_op_ListRetirableGrants.go +++ b/service/kms/api_op_ListRetirableGrants.go @@ -182,6 +182,9 @@ func (c *Client) addOperationListRetirableGrantsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRetirableGrantsValidationMiddleware(stack); err != nil { return err } @@ -206,14 +209,6 @@ func (c *Client) addOperationListRetirableGrantsMiddlewares(stack *middleware.St return nil } -// ListRetirableGrantsAPIClient is a client that implements the -// ListRetirableGrants operation. -type ListRetirableGrantsAPIClient interface { - ListRetirableGrants(context.Context, *ListRetirableGrantsInput, ...func(*Options)) (*ListRetirableGrantsOutput, error) -} - -var _ ListRetirableGrantsAPIClient = (*Client)(nil) - // ListRetirableGrantsPaginatorOptions is the paginator options for // ListRetirableGrants type ListRetirableGrantsPaginatorOptions struct { @@ -283,6 +278,9 @@ func (p *ListRetirableGrantsPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRetirableGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -302,6 +300,14 @@ func (p *ListRetirableGrantsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRetirableGrantsAPIClient is a client that implements the +// ListRetirableGrants operation. +type ListRetirableGrantsAPIClient interface { + ListRetirableGrants(context.Context, *ListRetirableGrantsInput, ...func(*Options)) (*ListRetirableGrantsOutput, error) +} + +var _ ListRetirableGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRetirableGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/kms/api_op_PutKeyPolicy.go b/service/kms/api_op_PutKeyPolicy.go index 5c253a88194..53c3766900d 100644 --- a/service/kms/api_op_PutKeyPolicy.go +++ b/service/kms/api_op_PutKeyPolicy.go @@ -193,6 +193,9 @@ func (c *Client) addOperationPutKeyPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutKeyPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_ReEncrypt.go b/service/kms/api_op_ReEncrypt.go index 765e8919da6..f65a577fa41 100644 --- a/service/kms/api_op_ReEncrypt.go +++ b/service/kms/api_op_ReEncrypt.go @@ -350,6 +350,9 @@ func (c *Client) addOperationReEncryptMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReEncryptValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_ReplicateKey.go b/service/kms/api_op_ReplicateKey.go index ffe14e79145..84fa3d11ef0 100644 --- a/service/kms/api_op_ReplicateKey.go +++ b/service/kms/api_op_ReplicateKey.go @@ -347,6 +347,9 @@ func (c *Client) addOperationReplicateKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplicateKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_RetireGrant.go b/service/kms/api_op_RetireGrant.go index 9224d198a15..9158b1c1cac 100644 --- a/service/kms/api_op_RetireGrant.go +++ b/service/kms/api_op_RetireGrant.go @@ -165,6 +165,9 @@ func (c *Client) addOperationRetireGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetireGrant(options.Region), middleware.Before); err != nil { return err } diff --git a/service/kms/api_op_RevokeGrant.go b/service/kms/api_op_RevokeGrant.go index 1823f22de06..ed45c1596a2 100644 --- a/service/kms/api_op_RevokeGrant.go +++ b/service/kms/api_op_RevokeGrant.go @@ -164,6 +164,9 @@ func (c *Client) addOperationRevokeGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_RotateKeyOnDemand.go b/service/kms/api_op_RotateKeyOnDemand.go index 0da321c3cdf..ed5d27a0607 100644 --- a/service/kms/api_op_RotateKeyOnDemand.go +++ b/service/kms/api_op_RotateKeyOnDemand.go @@ -186,6 +186,9 @@ func (c *Client) addOperationRotateKeyOnDemandMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRotateKeyOnDemandValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_ScheduleKeyDeletion.go b/service/kms/api_op_ScheduleKeyDeletion.go index a72e8d89617..6000bc763fe 100644 --- a/service/kms/api_op_ScheduleKeyDeletion.go +++ b/service/kms/api_op_ScheduleKeyDeletion.go @@ -217,6 +217,9 @@ func (c *Client) addOperationScheduleKeyDeletionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpScheduleKeyDeletionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_Sign.go b/service/kms/api_op_Sign.go index 8ae4b77af9b..b3b7d732f7a 100644 --- a/service/kms/api_op_Sign.go +++ b/service/kms/api_op_Sign.go @@ -274,6 +274,9 @@ func (c *Client) addOperationSignMiddlewares(stack *middleware.Stack, options Op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_TagResource.go b/service/kms/api_op_TagResource.go index 03fb702036e..6d964f39b6d 100644 --- a/service/kms/api_op_TagResource.go +++ b/service/kms/api_op_TagResource.go @@ -175,6 +175,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_UntagResource.go b/service/kms/api_op_UntagResource.go index 5e8f8381412..d62a3ae0a5d 100644 --- a/service/kms/api_op_UntagResource.go +++ b/service/kms/api_op_UntagResource.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_UpdateAlias.go b/service/kms/api_op_UpdateAlias.go index bb340c8431a..fc9ad585713 100644 --- a/service/kms/api_op_UpdateAlias.go +++ b/service/kms/api_op_UpdateAlias.go @@ -189,6 +189,9 @@ func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_UpdateCustomKeyStore.go b/service/kms/api_op_UpdateCustomKeyStore.go index 2ac11c7a935..a615be4b0b1 100644 --- a/service/kms/api_op_UpdateCustomKeyStore.go +++ b/service/kms/api_op_UpdateCustomKeyStore.go @@ -299,6 +299,9 @@ func (c *Client) addOperationUpdateCustomKeyStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomKeyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_UpdateKeyDescription.go b/service/kms/api_op_UpdateKeyDescription.go index 44a23e5208a..82e9e6e5c76 100644 --- a/service/kms/api_op_UpdateKeyDescription.go +++ b/service/kms/api_op_UpdateKeyDescription.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateKeyDescriptionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKeyDescriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_UpdatePrimaryRegion.go b/service/kms/api_op_UpdatePrimaryRegion.go index f4aa0c53404..3792c12db74 100644 --- a/service/kms/api_op_UpdatePrimaryRegion.go +++ b/service/kms/api_op_UpdatePrimaryRegion.go @@ -197,6 +197,9 @@ func (c *Client) addOperationUpdatePrimaryRegionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePrimaryRegionValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_Verify.go b/service/kms/api_op_Verify.go index 7cbcfedc369..8f3676ae16b 100644 --- a/service/kms/api_op_Verify.go +++ b/service/kms/api_op_Verify.go @@ -262,6 +262,9 @@ func (c *Client) addOperationVerifyMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyValidationMiddleware(stack); err != nil { return err } diff --git a/service/kms/api_op_VerifyMac.go b/service/kms/api_op_VerifyMac.go index 70254cc1ccc..7be101c10f6 100644 --- a/service/kms/api_op_VerifyMac.go +++ b/service/kms/api_op_VerifyMac.go @@ -195,6 +195,9 @@ func (c *Client) addOperationVerifyMacMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyMacValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_client.go b/service/lakeformation/api_client.go index 0b9cd2daffd..615290f56d0 100644 --- a/service/lakeformation/api_client.go +++ b/service/lakeformation/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lakeformation/api_op_AddLFTagsToResource.go b/service/lakeformation/api_op_AddLFTagsToResource.go index c0f6a252c9a..9e57949c263 100644 --- a/service/lakeformation/api_op_AddLFTagsToResource.go +++ b/service/lakeformation/api_op_AddLFTagsToResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAddLFTagsToResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddLFTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go b/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go index 397ab1cb06f..e198f26ef51 100644 --- a/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go +++ b/service/lakeformation/api_op_AssumeDecoratedRoleWithSAML.go @@ -149,6 +149,9 @@ func (c *Client) addOperationAssumeDecoratedRoleWithSAMLMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeDecoratedRoleWithSAMLValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_BatchGrantPermissions.go b/service/lakeformation/api_op_BatchGrantPermissions.go index ecc2cabd6b6..3b7829fe71c 100644 --- a/service/lakeformation/api_op_BatchGrantPermissions.go +++ b/service/lakeformation/api_op_BatchGrantPermissions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchGrantPermissionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGrantPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_BatchRevokePermissions.go b/service/lakeformation/api_op_BatchRevokePermissions.go index e9c601723cf..26cf29b2a56 100644 --- a/service/lakeformation/api_op_BatchRevokePermissions.go +++ b/service/lakeformation/api_op_BatchRevokePermissions.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchRevokePermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchRevokePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_CancelTransaction.go b/service/lakeformation/api_op_CancelTransaction.go index 10af61c7ae7..17626fdf617 100644 --- a/service/lakeformation/api_op_CancelTransaction.go +++ b/service/lakeformation/api_op_CancelTransaction.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCancelTransactionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_CommitTransaction.go b/service/lakeformation/api_op_CommitTransaction.go index 26fac8ec46b..4acc95e9829 100644 --- a/service/lakeformation/api_op_CommitTransaction.go +++ b/service/lakeformation/api_op_CommitTransaction.go @@ -108,6 +108,9 @@ func (c *Client) addOperationCommitTransactionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCommitTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_CreateDataCellsFilter.go b/service/lakeformation/api_op_CreateDataCellsFilter.go index dc1cdbe793b..4fc5869787f 100644 --- a/service/lakeformation/api_op_CreateDataCellsFilter.go +++ b/service/lakeformation/api_op_CreateDataCellsFilter.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCreateDataCellsFilterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataCellsFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_CreateLFTag.go b/service/lakeformation/api_op_CreateLFTag.go index a90dae785a7..ab308716716 100644 --- a/service/lakeformation/api_op_CreateLFTag.go +++ b/service/lakeformation/api_op_CreateLFTag.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCreateLFTagMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLFTagValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go index f4440368ab6..8b5cca42aff 100644 --- a/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_CreateLakeFormationIdentityCenterConfiguration.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateLakeFormationIdentityCenterConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLakeFormationIdentityCenterConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_CreateLakeFormationOptIn.go b/service/lakeformation/api_op_CreateLakeFormationOptIn.go index 7a71a27e880..7698cd331b5 100644 --- a/service/lakeformation/api_op_CreateLakeFormationOptIn.go +++ b/service/lakeformation/api_op_CreateLakeFormationOptIn.go @@ -108,6 +108,9 @@ func (c *Client) addOperationCreateLakeFormationOptInMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLakeFormationOptInValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_DeleteDataCellsFilter.go b/service/lakeformation/api_op_DeleteDataCellsFilter.go index f1f232275eb..82da8452c7d 100644 --- a/service/lakeformation/api_op_DeleteDataCellsFilter.go +++ b/service/lakeformation/api_op_DeleteDataCellsFilter.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDataCellsFilterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDataCellsFilter(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_DeleteLFTag.go b/service/lakeformation/api_op_DeleteLFTag.go index 3d71149124a..cdded89b6cd 100644 --- a/service/lakeformation/api_op_DeleteLFTag.go +++ b/service/lakeformation/api_op_DeleteLFTag.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteLFTagMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLFTagValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_DeleteLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_DeleteLakeFormationIdentityCenterConfiguration.go index 6ad4ba57bba..3f9a256bcd9 100644 --- a/service/lakeformation/api_op_DeleteLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_DeleteLakeFormationIdentityCenterConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteLakeFormationIdentityCenterConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLakeFormationIdentityCenterConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_DeleteLakeFormationOptIn.go b/service/lakeformation/api_op_DeleteLakeFormationOptIn.go index e439a34f71d..c74d37c76fc 100644 --- a/service/lakeformation/api_op_DeleteLakeFormationOptIn.go +++ b/service/lakeformation/api_op_DeleteLakeFormationOptIn.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteLakeFormationOptInMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLakeFormationOptInValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_DeleteObjectsOnCancel.go b/service/lakeformation/api_op_DeleteObjectsOnCancel.go index d2afa268c47..b923787a835 100644 --- a/service/lakeformation/api_op_DeleteObjectsOnCancel.go +++ b/service/lakeformation/api_op_DeleteObjectsOnCancel.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteObjectsOnCancelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteObjectsOnCancelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_DeregisterResource.go b/service/lakeformation/api_op_DeregisterResource.go index 35d043ed153..ac8ab937b73 100644 --- a/service/lakeformation/api_op_DeregisterResource.go +++ b/service/lakeformation/api_op_DeregisterResource.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeregisterResourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go index bbe5daf9352..baf8e11f906 100644 --- a/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_DescribeLakeFormationIdentityCenterConfiguration.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeLakeFormationIdentityCenterConfigurationMid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLakeFormationIdentityCenterConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_DescribeResource.go b/service/lakeformation/api_op_DescribeResource.go index 3bd6ca33e57..bb1bfcd4c02 100644 --- a/service/lakeformation/api_op_DescribeResource.go +++ b/service/lakeformation/api_op_DescribeResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeResourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_DescribeTransaction.go b/service/lakeformation/api_op_DescribeTransaction.go index a1849f08668..618fd2f91c2 100644 --- a/service/lakeformation/api_op_DescribeTransaction.go +++ b/service/lakeformation/api_op_DescribeTransaction.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeTransactionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_ExtendTransaction.go b/service/lakeformation/api_op_ExtendTransaction.go index f38ea9b8131..ecfc035ccfa 100644 --- a/service/lakeformation/api_op_ExtendTransaction.go +++ b/service/lakeformation/api_op_ExtendTransaction.go @@ -103,6 +103,9 @@ func (c *Client) addOperationExtendTransactionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExtendTransaction(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_GetDataCellsFilter.go b/service/lakeformation/api_op_GetDataCellsFilter.go index 6eb7fee2c36..1317ac816cc 100644 --- a/service/lakeformation/api_op_GetDataCellsFilter.go +++ b/service/lakeformation/api_op_GetDataCellsFilter.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetDataCellsFilterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataCellsFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetDataLakePrincipal.go b/service/lakeformation/api_op_GetDataLakePrincipal.go index 0ffa845ccc2..e69e166b6f7 100644 --- a/service/lakeformation/api_op_GetDataLakePrincipal.go +++ b/service/lakeformation/api_op_GetDataLakePrincipal.go @@ -99,6 +99,9 @@ func (c *Client) addOperationGetDataLakePrincipalMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataLakePrincipal(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_GetDataLakeSettings.go b/service/lakeformation/api_op_GetDataLakeSettings.go index e521423ab2f..3d85294f1c0 100644 --- a/service/lakeformation/api_op_GetDataLakeSettings.go +++ b/service/lakeformation/api_op_GetDataLakeSettings.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetDataLakeSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataLakeSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_GetEffectivePermissionsForPath.go b/service/lakeformation/api_op_GetEffectivePermissionsForPath.go index b98dfab5363..6af1fee09a4 100644 --- a/service/lakeformation/api_op_GetEffectivePermissionsForPath.go +++ b/service/lakeformation/api_op_GetEffectivePermissionsForPath.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetEffectivePermissionsForPathMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEffectivePermissionsForPathValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetEffectivePermissionsForPathMiddlewares(stack *mi return nil } -// GetEffectivePermissionsForPathAPIClient is a client that implements the -// GetEffectivePermissionsForPath operation. -type GetEffectivePermissionsForPathAPIClient interface { - GetEffectivePermissionsForPath(context.Context, *GetEffectivePermissionsForPathInput, ...func(*Options)) (*GetEffectivePermissionsForPathOutput, error) -} - -var _ GetEffectivePermissionsForPathAPIClient = (*Client)(nil) - // GetEffectivePermissionsForPathPaginatorOptions is the paginator options for // GetEffectivePermissionsForPath type GetEffectivePermissionsForPathPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *GetEffectivePermissionsForPathPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEffectivePermissionsForPath(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *GetEffectivePermissionsForPathPaginator) NextPage(ctx context.Context, return result, nil } +// GetEffectivePermissionsForPathAPIClient is a client that implements the +// GetEffectivePermissionsForPath operation. +type GetEffectivePermissionsForPathAPIClient interface { + GetEffectivePermissionsForPath(context.Context, *GetEffectivePermissionsForPathInput, ...func(*Options)) (*GetEffectivePermissionsForPathOutput, error) +} + +var _ GetEffectivePermissionsForPathAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEffectivePermissionsForPath(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_GetLFTag.go b/service/lakeformation/api_op_GetLFTag.go index ae6aee469bc..c52c64e9743 100644 --- a/service/lakeformation/api_op_GetLFTag.go +++ b/service/lakeformation/api_op_GetLFTag.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetLFTagMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLFTagValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetQueryState.go b/service/lakeformation/api_op_GetQueryState.go index 86d376ba82b..11394df7c52 100644 --- a/service/lakeformation/api_op_GetQueryState.go +++ b/service/lakeformation/api_op_GetQueryState.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetQueryStateMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetQueryStateMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetQueryStatistics.go b/service/lakeformation/api_op_GetQueryStatistics.go index d14e38c4af3..c7960b5908f 100644 --- a/service/lakeformation/api_op_GetQueryStatistics.go +++ b/service/lakeformation/api_op_GetQueryStatistics.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetQueryStatisticsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetQueryStatisticsMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetResourceLFTags.go b/service/lakeformation/api_op_GetResourceLFTags.go index 85785eed7e5..b92ef8ef1f9 100644 --- a/service/lakeformation/api_op_GetResourceLFTags.go +++ b/service/lakeformation/api_op_GetResourceLFTags.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetResourceLFTagsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceLFTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetTableObjects.go b/service/lakeformation/api_op_GetTableObjects.go index 57c3f301332..7a0263937d3 100644 --- a/service/lakeformation/api_op_GetTableObjects.go +++ b/service/lakeformation/api_op_GetTableObjects.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetTableObjectsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableObjectsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationGetTableObjectsMiddlewares(stack *middleware.Stack, return nil } -// GetTableObjectsAPIClient is a client that implements the GetTableObjects -// operation. -type GetTableObjectsAPIClient interface { - GetTableObjects(context.Context, *GetTableObjectsInput, ...func(*Options)) (*GetTableObjectsOutput, error) -} - -var _ GetTableObjectsAPIClient = (*Client)(nil) - // GetTableObjectsPaginatorOptions is the paginator options for GetTableObjects type GetTableObjectsPaginatorOptions struct { // Specifies how many values to return in a page. @@ -241,6 +236,9 @@ func (p *GetTableObjectsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTableObjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *GetTableObjectsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetTableObjectsAPIClient is a client that implements the GetTableObjects +// operation. +type GetTableObjectsAPIClient interface { + GetTableObjects(context.Context, *GetTableObjectsInput, ...func(*Options)) (*GetTableObjectsOutput, error) +} + +var _ GetTableObjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTableObjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_GetTemporaryGluePartitionCredentials.go b/service/lakeformation/api_op_GetTemporaryGluePartitionCredentials.go index 03e3ea20baa..4de0a21c962 100644 --- a/service/lakeformation/api_op_GetTemporaryGluePartitionCredentials.go +++ b/service/lakeformation/api_op_GetTemporaryGluePartitionCredentials.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetTemporaryGluePartitionCredentialsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemporaryGluePartitionCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetTemporaryGlueTableCredentials.go b/service/lakeformation/api_op_GetTemporaryGlueTableCredentials.go index 8fb7ea63ef2..30e67864f4b 100644 --- a/service/lakeformation/api_op_GetTemporaryGlueTableCredentials.go +++ b/service/lakeformation/api_op_GetTemporaryGlueTableCredentials.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetTemporaryGlueTableCredentialsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemporaryGlueTableCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetWorkUnitResults.go b/service/lakeformation/api_op_GetWorkUnitResults.go index cdb3a8774d9..08b6d02c3b3 100644 --- a/service/lakeformation/api_op_GetWorkUnitResults.go +++ b/service/lakeformation/api_op_GetWorkUnitResults.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetWorkUnitResultsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetWorkUnitResultsMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_GetWorkUnits.go b/service/lakeformation/api_op_GetWorkUnits.go index bd8a66513e6..7aa8f6857ca 100644 --- a/service/lakeformation/api_op_GetWorkUnits.go +++ b/service/lakeformation/api_op_GetWorkUnits.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetWorkUnitsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetWorkUnitsMiddleware(stack); err != nil { return err } @@ -156,40 +159,6 @@ func (c *Client) addOperationGetWorkUnitsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opGetWorkUnitsMiddleware struct { -} - -func (*endpointPrefix_opGetWorkUnitsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetWorkUnitsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "query-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetWorkUnitsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetWorkUnitsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetWorkUnitsAPIClient is a client that implements the GetWorkUnits operation. -type GetWorkUnitsAPIClient interface { - GetWorkUnits(context.Context, *GetWorkUnitsInput, ...func(*Options)) (*GetWorkUnitsOutput, error) -} - -var _ GetWorkUnitsAPIClient = (*Client)(nil) - // GetWorkUnitsPaginatorOptions is the paginator options for GetWorkUnits type GetWorkUnitsPaginatorOptions struct { // The size of each page to get in the Amazon Web Services service call. This does @@ -257,6 +226,9 @@ func (p *GetWorkUnitsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetWorkUnits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +248,40 @@ func (p *GetWorkUnitsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opGetWorkUnitsMiddleware struct { +} + +func (*endpointPrefix_opGetWorkUnitsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetWorkUnitsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "query-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetWorkUnitsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetWorkUnitsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetWorkUnitsAPIClient is a client that implements the GetWorkUnits operation. +type GetWorkUnitsAPIClient interface { + GetWorkUnits(context.Context, *GetWorkUnitsInput, ...func(*Options)) (*GetWorkUnitsOutput, error) +} + +var _ GetWorkUnitsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetWorkUnits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_GrantPermissions.go b/service/lakeformation/api_op_GrantPermissions.go index 709d1595a3b..5e36d89d8bb 100644 --- a/service/lakeformation/api_op_GrantPermissions.go +++ b/service/lakeformation/api_op_GrantPermissions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGrantPermissionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGrantPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_ListDataCellsFilter.go b/service/lakeformation/api_op_ListDataCellsFilter.go index 382d65ecf59..fdcd78b329b 100644 --- a/service/lakeformation/api_op_ListDataCellsFilter.go +++ b/service/lakeformation/api_op_ListDataCellsFilter.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDataCellsFilterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataCellsFilterValidationMiddleware(stack); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListDataCellsFilterMiddlewares(stack *middleware.St return nil } -// ListDataCellsFilterAPIClient is a client that implements the -// ListDataCellsFilter operation. -type ListDataCellsFilterAPIClient interface { - ListDataCellsFilter(context.Context, *ListDataCellsFilterInput, ...func(*Options)) (*ListDataCellsFilterOutput, error) -} - -var _ ListDataCellsFilterAPIClient = (*Client)(nil) - // ListDataCellsFilterPaginatorOptions is the paginator options for // ListDataCellsFilter type ListDataCellsFilterPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListDataCellsFilterPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataCellsFilter(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListDataCellsFilterPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListDataCellsFilterAPIClient is a client that implements the +// ListDataCellsFilter operation. +type ListDataCellsFilterAPIClient interface { + ListDataCellsFilter(context.Context, *ListDataCellsFilterInput, ...func(*Options)) (*ListDataCellsFilterOutput, error) +} + +var _ ListDataCellsFilterAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataCellsFilter(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_ListLFTags.go b/service/lakeformation/api_op_ListLFTags.go index 4a249dd82f5..ce2fc21b83b 100644 --- a/service/lakeformation/api_op_ListLFTags.go +++ b/service/lakeformation/api_op_ListLFTags.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListLFTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLFTags(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListLFTagsMiddlewares(stack *middleware.Stack, opti return nil } -// ListLFTagsAPIClient is a client that implements the ListLFTags operation. -type ListLFTagsAPIClient interface { - ListLFTags(context.Context, *ListLFTagsInput, ...func(*Options)) (*ListLFTagsOutput, error) -} - -var _ ListLFTagsAPIClient = (*Client)(nil) - // ListLFTagsPaginatorOptions is the paginator options for ListLFTags type ListLFTagsPaginatorOptions struct { // The maximum number of results to return. @@ -214,6 +210,9 @@ func (p *ListLFTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLFTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListLFTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListLFTagsAPIClient is a client that implements the ListLFTags operation. +type ListLFTagsAPIClient interface { + ListLFTags(context.Context, *ListLFTagsInput, ...func(*Options)) (*ListLFTagsOutput, error) +} + +var _ ListLFTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLFTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_ListLakeFormationOptIns.go b/service/lakeformation/api_op_ListLakeFormationOptIns.go index f9a75303417..d65e9bf1690 100644 --- a/service/lakeformation/api_op_ListLakeFormationOptIns.go +++ b/service/lakeformation/api_op_ListLakeFormationOptIns.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListLakeFormationOptInsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLakeFormationOptInsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListLakeFormationOptInsMiddlewares(stack *middlewar return nil } -// ListLakeFormationOptInsAPIClient is a client that implements the -// ListLakeFormationOptIns operation. -type ListLakeFormationOptInsAPIClient interface { - ListLakeFormationOptIns(context.Context, *ListLakeFormationOptInsInput, ...func(*Options)) (*ListLakeFormationOptInsOutput, error) -} - -var _ ListLakeFormationOptInsAPIClient = (*Client)(nil) - // ListLakeFormationOptInsPaginatorOptions is the paginator options for // ListLakeFormationOptIns type ListLakeFormationOptInsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListLakeFormationOptInsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLakeFormationOptIns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListLakeFormationOptInsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListLakeFormationOptInsAPIClient is a client that implements the +// ListLakeFormationOptIns operation. +type ListLakeFormationOptInsAPIClient interface { + ListLakeFormationOptIns(context.Context, *ListLakeFormationOptInsInput, ...func(*Options)) (*ListLakeFormationOptInsOutput, error) +} + +var _ ListLakeFormationOptInsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLakeFormationOptIns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_ListPermissions.go b/service/lakeformation/api_op_ListPermissions.go index 94eeab7c1a8..cbaa01d7291 100644 --- a/service/lakeformation/api_op_ListPermissions.go +++ b/service/lakeformation/api_op_ListPermissions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, return nil } -// ListPermissionsAPIClient is a client that implements the ListPermissions -// operation. -type ListPermissionsAPIClient interface { - ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) -} - -var _ ListPermissionsAPIClient = (*Client)(nil) - // ListPermissionsPaginatorOptions is the paginator options for ListPermissions type ListPermissionsPaginatorOptions struct { // The maximum number of results to return. @@ -236,6 +231,9 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListPermissionsAPIClient is a client that implements the ListPermissions +// operation. +type ListPermissionsAPIClient interface { + ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) +} + +var _ ListPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_ListResources.go b/service/lakeformation/api_op_ListResources.go index 99962ee2869..b54f2d6838e 100644 --- a/service/lakeformation/api_op_ListResources.go +++ b/service/lakeformation/api_op_ListResources.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResources(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o return nil } -// ListResourcesAPIClient is a client that implements the ListResources operation. -type ListResourcesAPIClient interface { - ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) -} - -var _ ListResourcesAPIClient = (*Client)(nil) - // ListResourcesPaginatorOptions is the paginator options for ListResources type ListResourcesPaginatorOptions struct { // The maximum number of resource results. @@ -205,6 +201,9 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListResourcesAPIClient is a client that implements the ListResources operation. +type ListResourcesAPIClient interface { + ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) +} + +var _ ListResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_ListTableStorageOptimizers.go b/service/lakeformation/api_op_ListTableStorageOptimizers.go index a9c32d1f9a7..d59c3b55034 100644 --- a/service/lakeformation/api_op_ListTableStorageOptimizers.go +++ b/service/lakeformation/api_op_ListTableStorageOptimizers.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListTableStorageOptimizersMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTableStorageOptimizersValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListTableStorageOptimizersMiddlewares(stack *middle return nil } -// ListTableStorageOptimizersAPIClient is a client that implements the -// ListTableStorageOptimizers operation. -type ListTableStorageOptimizersAPIClient interface { - ListTableStorageOptimizers(context.Context, *ListTableStorageOptimizersInput, ...func(*Options)) (*ListTableStorageOptimizersOutput, error) -} - -var _ ListTableStorageOptimizersAPIClient = (*Client)(nil) - // ListTableStorageOptimizersPaginatorOptions is the paginator options for // ListTableStorageOptimizers type ListTableStorageOptimizersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListTableStorageOptimizersPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTableStorageOptimizers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListTableStorageOptimizersPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListTableStorageOptimizersAPIClient is a client that implements the +// ListTableStorageOptimizers operation. +type ListTableStorageOptimizersAPIClient interface { + ListTableStorageOptimizers(context.Context, *ListTableStorageOptimizersInput, ...func(*Options)) (*ListTableStorageOptimizersOutput, error) +} + +var _ ListTableStorageOptimizersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTableStorageOptimizers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_ListTransactions.go b/service/lakeformation/api_op_ListTransactions.go index 5d62fb0bc06..7ed4e960bc5 100644 --- a/service/lakeformation/api_op_ListTransactions.go +++ b/service/lakeformation/api_op_ListTransactions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTransactionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTransactions(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTransactionsMiddlewares(stack *middleware.Stack return nil } -// ListTransactionsAPIClient is a client that implements the ListTransactions -// operation. -type ListTransactionsAPIClient interface { - ListTransactions(context.Context, *ListTransactionsInput, ...func(*Options)) (*ListTransactionsOutput, error) -} - -var _ ListTransactionsAPIClient = (*Client)(nil) - // ListTransactionsPaginatorOptions is the paginator options for ListTransactions type ListTransactionsPaginatorOptions struct { // The maximum number of transactions to return in a single call. @@ -216,6 +211,9 @@ func (p *ListTransactionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTransactions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTransactionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTransactionsAPIClient is a client that implements the ListTransactions +// operation. +type ListTransactionsAPIClient interface { + ListTransactions(context.Context, *ListTransactionsInput, ...func(*Options)) (*ListTransactionsOutput, error) +} + +var _ ListTransactionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTransactions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_PutDataLakeSettings.go b/service/lakeformation/api_op_PutDataLakeSettings.go index 7b81737cc59..f9b7b937f39 100644 --- a/service/lakeformation/api_op_PutDataLakeSettings.go +++ b/service/lakeformation/api_op_PutDataLakeSettings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutDataLakeSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDataLakeSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_RegisterResource.go b/service/lakeformation/api_op_RegisterResource.go index 5a7d2fe7dec..2a4a8c2611f 100644 --- a/service/lakeformation/api_op_RegisterResource.go +++ b/service/lakeformation/api_op_RegisterResource.go @@ -137,6 +137,9 @@ func (c *Client) addOperationRegisterResourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_RemoveLFTagsFromResource.go b/service/lakeformation/api_op_RemoveLFTagsFromResource.go index c950018cbd3..f9c743f1944 100644 --- a/service/lakeformation/api_op_RemoveLFTagsFromResource.go +++ b/service/lakeformation/api_op_RemoveLFTagsFromResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRemoveLFTagsFromResourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveLFTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_RevokePermissions.go b/service/lakeformation/api_op_RevokePermissions.go index b58dc964cc1..2a66b141f10 100644 --- a/service/lakeformation/api_op_RevokePermissions.go +++ b/service/lakeformation/api_op_RevokePermissions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationRevokePermissionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_SearchDatabasesByLFTags.go b/service/lakeformation/api_op_SearchDatabasesByLFTags.go index 9e2eadbd1a2..22daffab9c4 100644 --- a/service/lakeformation/api_op_SearchDatabasesByLFTags.go +++ b/service/lakeformation/api_op_SearchDatabasesByLFTags.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSearchDatabasesByLFTagsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchDatabasesByLFTagsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationSearchDatabasesByLFTagsMiddlewares(stack *middlewar return nil } -// SearchDatabasesByLFTagsAPIClient is a client that implements the -// SearchDatabasesByLFTags operation. -type SearchDatabasesByLFTagsAPIClient interface { - SearchDatabasesByLFTags(context.Context, *SearchDatabasesByLFTagsInput, ...func(*Options)) (*SearchDatabasesByLFTagsOutput, error) -} - -var _ SearchDatabasesByLFTagsAPIClient = (*Client)(nil) - // SearchDatabasesByLFTagsPaginatorOptions is the paginator options for // SearchDatabasesByLFTags type SearchDatabasesByLFTagsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *SearchDatabasesByLFTagsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchDatabasesByLFTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *SearchDatabasesByLFTagsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// SearchDatabasesByLFTagsAPIClient is a client that implements the +// SearchDatabasesByLFTags operation. +type SearchDatabasesByLFTagsAPIClient interface { + SearchDatabasesByLFTags(context.Context, *SearchDatabasesByLFTagsInput, ...func(*Options)) (*SearchDatabasesByLFTagsOutput, error) +} + +var _ SearchDatabasesByLFTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchDatabasesByLFTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_SearchTablesByLFTags.go b/service/lakeformation/api_op_SearchTablesByLFTags.go index b11783580ed..986cb261372 100644 --- a/service/lakeformation/api_op_SearchTablesByLFTags.go +++ b/service/lakeformation/api_op_SearchTablesByLFTags.go @@ -126,6 +126,9 @@ func (c *Client) addOperationSearchTablesByLFTagsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchTablesByLFTagsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationSearchTablesByLFTagsMiddlewares(stack *middleware.S return nil } -// SearchTablesByLFTagsAPIClient is a client that implements the -// SearchTablesByLFTags operation. -type SearchTablesByLFTagsAPIClient interface { - SearchTablesByLFTags(context.Context, *SearchTablesByLFTagsInput, ...func(*Options)) (*SearchTablesByLFTagsOutput, error) -} - -var _ SearchTablesByLFTagsAPIClient = (*Client)(nil) - // SearchTablesByLFTagsPaginatorOptions is the paginator options for // SearchTablesByLFTags type SearchTablesByLFTagsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *SearchTablesByLFTagsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchTablesByLFTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *SearchTablesByLFTagsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SearchTablesByLFTagsAPIClient is a client that implements the +// SearchTablesByLFTags operation. +type SearchTablesByLFTagsAPIClient interface { + SearchTablesByLFTags(context.Context, *SearchTablesByLFTagsInput, ...func(*Options)) (*SearchTablesByLFTagsOutput, error) +} + +var _ SearchTablesByLFTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchTablesByLFTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lakeformation/api_op_StartQueryPlanning.go b/service/lakeformation/api_op_StartQueryPlanning.go index eb582178f0d..f466a6a5ea0 100644 --- a/service/lakeformation/api_op_StartQueryPlanning.go +++ b/service/lakeformation/api_op_StartQueryPlanning.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartQueryPlanningMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartQueryPlanningMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_StartTransaction.go b/service/lakeformation/api_op_StartTransaction.go index 5bdbea568e9..bd8aab0e1c5 100644 --- a/service/lakeformation/api_op_StartTransaction.go +++ b/service/lakeformation/api_op_StartTransaction.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartTransactionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartTransaction(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lakeformation/api_op_UpdateDataCellsFilter.go b/service/lakeformation/api_op_UpdateDataCellsFilter.go index 2f9f2a7179c..77137eecfc6 100644 --- a/service/lakeformation/api_op_UpdateDataCellsFilter.go +++ b/service/lakeformation/api_op_UpdateDataCellsFilter.go @@ -102,6 +102,9 @@ func (c *Client) addOperationUpdateDataCellsFilterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataCellsFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_UpdateLFTag.go b/service/lakeformation/api_op_UpdateLFTag.go index 0015a4d66e8..b24adda62a2 100644 --- a/service/lakeformation/api_op_UpdateLFTag.go +++ b/service/lakeformation/api_op_UpdateLFTag.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateLFTagMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLFTagValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go b/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go index ec91e49a317..f193a2ff8e2 100644 --- a/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go +++ b/service/lakeformation/api_op_UpdateLakeFormationIdentityCenterConfiguration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateLakeFormationIdentityCenterConfigurationMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLakeFormationIdentityCenterConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_UpdateResource.go b/service/lakeformation/api_op_UpdateResource.go index 9dc9b85d0d6..633322320ee 100644 --- a/service/lakeformation/api_op_UpdateResource.go +++ b/service/lakeformation/api_op_UpdateResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_UpdateTableObjects.go b/service/lakeformation/api_op_UpdateTableObjects.go index eb6fb8f8a1f..3fbd2c7376a 100644 --- a/service/lakeformation/api_op_UpdateTableObjects.go +++ b/service/lakeformation/api_op_UpdateTableObjects.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateTableObjectsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableObjectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lakeformation/api_op_UpdateTableStorageOptimizer.go b/service/lakeformation/api_op_UpdateTableStorageOptimizer.go index 192d7c98e1e..15c36603b43 100644 --- a/service/lakeformation/api_op_UpdateTableStorageOptimizer.go +++ b/service/lakeformation/api_op_UpdateTableStorageOptimizer.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateTableStorageOptimizerMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableStorageOptimizerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_client.go b/service/lambda/api_client.go index fada9abb9e5..c73bb27b3a4 100644 --- a/service/lambda/api_client.go +++ b/service/lambda/api_client.go @@ -452,6 +452,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -537,6 +561,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lambda/api_op_AddLayerVersionPermission.go b/service/lambda/api_op_AddLayerVersionPermission.go index 183bf7cd715..710a480f517 100644 --- a/service/lambda/api_op_AddLayerVersionPermission.go +++ b/service/lambda/api_op_AddLayerVersionPermission.go @@ -149,6 +149,9 @@ func (c *Client) addOperationAddLayerVersionPermissionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddLayerVersionPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_AddPermission.go b/service/lambda/api_op_AddPermission.go index 106ca6e0ed8..1b875ef9560 100644 --- a/service/lambda/api_op_AddPermission.go +++ b/service/lambda/api_op_AddPermission.go @@ -191,6 +191,9 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_CreateAlias.go b/service/lambda/api_op_CreateAlias.go index 5fc39c2f9b0..5b6b3539637 100644 --- a/service/lambda/api_op_CreateAlias.go +++ b/service/lambda/api_op_CreateAlias.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_CreateCodeSigningConfig.go b/service/lambda/api_op_CreateCodeSigningConfig.go index 8495c121fa9..934eae77aaf 100644 --- a/service/lambda/api_op_CreateCodeSigningConfig.go +++ b/service/lambda/api_op_CreateCodeSigningConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateCodeSigningConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_CreateEventSourceMapping.go b/service/lambda/api_op_CreateEventSourceMapping.go index 6f056880c57..42a1a0ffe4d 100644 --- a/service/lambda/api_op_CreateEventSourceMapping.go +++ b/service/lambda/api_op_CreateEventSourceMapping.go @@ -454,6 +454,9 @@ func (c *Client) addOperationCreateEventSourceMappingMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventSourceMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_CreateFunction.go b/service/lambda/api_op_CreateFunction.go index ebe011c6903..49146f25d11 100644 --- a/service/lambda/api_op_CreateFunction.go +++ b/service/lambda/api_op_CreateFunction.go @@ -443,6 +443,9 @@ func (c *Client) addOperationCreateFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_CreateFunctionUrlConfig.go b/service/lambda/api_op_CreateFunctionUrlConfig.go index 74de814e469..20c881cbe0a 100644 --- a/service/lambda/api_op_CreateFunctionUrlConfig.go +++ b/service/lambda/api_op_CreateFunctionUrlConfig.go @@ -192,6 +192,9 @@ func (c *Client) addOperationCreateFunctionUrlConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFunctionUrlConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteAlias.go b/service/lambda/api_op_DeleteAlias.go index e55e08b07fe..b7f1208ff64 100644 --- a/service/lambda/api_op_DeleteAlias.go +++ b/service/lambda/api_op_DeleteAlias.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteCodeSigningConfig.go b/service/lambda/api_op_DeleteCodeSigningConfig.go index 100e99cec9b..51d5113dd8d 100644 --- a/service/lambda/api_op_DeleteCodeSigningConfig.go +++ b/service/lambda/api_op_DeleteCodeSigningConfig.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteCodeSigningConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteEventSourceMapping.go b/service/lambda/api_op_DeleteEventSourceMapping.go index 011dd76bb40..1201b64ea33 100644 --- a/service/lambda/api_op_DeleteEventSourceMapping.go +++ b/service/lambda/api_op_DeleteEventSourceMapping.go @@ -245,6 +245,9 @@ func (c *Client) addOperationDeleteEventSourceMappingMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventSourceMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteFunction.go b/service/lambda/api_op_DeleteFunction.go index b0a48926277..d0034044143 100644 --- a/service/lambda/api_op_DeleteFunction.go +++ b/service/lambda/api_op_DeleteFunction.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteFunctionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go b/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go index b75ceea1f8d..ecf94555bf3 100644 --- a/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go +++ b/service/lambda/api_op_DeleteFunctionCodeSigningConfig.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteFunctionCodeSigningConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteFunctionConcurrency.go b/service/lambda/api_op_DeleteFunctionConcurrency.go index 6ffb8dffb0e..cda7b78ec8f 100644 --- a/service/lambda/api_op_DeleteFunctionConcurrency.go +++ b/service/lambda/api_op_DeleteFunctionConcurrency.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteFunctionConcurrencyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionConcurrencyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go b/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go index 5df3f4a5110..03eb1683f28 100644 --- a/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_DeleteFunctionEventInvokeConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteFunctionEventInvokeConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteFunctionUrlConfig.go b/service/lambda/api_op_DeleteFunctionUrlConfig.go index 17164122239..115b079aca0 100644 --- a/service/lambda/api_op_DeleteFunctionUrlConfig.go +++ b/service/lambda/api_op_DeleteFunctionUrlConfig.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteFunctionUrlConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFunctionUrlConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteLayerVersion.go b/service/lambda/api_op_DeleteLayerVersion.go index 0ef3ef7030d..d65bff361f0 100644 --- a/service/lambda/api_op_DeleteLayerVersion.go +++ b/service/lambda/api_op_DeleteLayerVersion.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteLayerVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLayerVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go b/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go index 68bfe29c923..5b7e582c972 100644 --- a/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go +++ b/service/lambda/api_op_DeleteProvisionedConcurrencyConfig.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteProvisionedConcurrencyConfigMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetAccountSettings.go b/service/lambda/api_op_GetAccountSettings.go index 597130275c5..cb8493e2ef9 100644 --- a/service/lambda/api_op_GetAccountSettings.go +++ b/service/lambda/api_op_GetAccountSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lambda/api_op_GetAlias.go b/service/lambda/api_op_GetAlias.go index 9357e3767b1..050b8784235 100644 --- a/service/lambda/api_op_GetAlias.go +++ b/service/lambda/api_op_GetAlias.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetAliasMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetCodeSigningConfig.go b/service/lambda/api_op_GetCodeSigningConfig.go index eb12166debd..330431851e3 100644 --- a/service/lambda/api_op_GetCodeSigningConfig.go +++ b/service/lambda/api_op_GetCodeSigningConfig.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetCodeSigningConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetEventSourceMapping.go b/service/lambda/api_op_GetEventSourceMapping.go index 0bc8e9b1d9f..92da5d0d124 100644 --- a/service/lambda/api_op_GetEventSourceMapping.go +++ b/service/lambda/api_op_GetEventSourceMapping.go @@ -241,6 +241,9 @@ func (c *Client) addOperationGetEventSourceMappingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventSourceMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetFunction.go b/service/lambda/api_op_GetFunction.go index 17d460de3eb..121d2cbb24b 100644 --- a/service/lambda/api_op_GetFunction.go +++ b/service/lambda/api_op_GetFunction.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionValidationMiddleware(stack); err != nil { return err } @@ -166,13 +169,6 @@ func (c *Client) addOperationGetFunctionMiddlewares(stack *middleware.Stack, opt return nil } -// GetFunctionAPIClient is a client that implements the GetFunction operation. -type GetFunctionAPIClient interface { - GetFunction(context.Context, *GetFunctionInput, ...func(*Options)) (*GetFunctionOutput, error) -} - -var _ GetFunctionAPIClient = (*Client)(nil) - // FunctionActiveV2WaiterOptions are waiter options for FunctionActiveV2Waiter type FunctionActiveV2WaiterOptions struct { @@ -288,7 +284,13 @@ func (w *FunctionActiveV2Waiter) WaitForOutput(ctx context.Context, params *GetF } out, err := w.client.GetFunction(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -495,7 +497,13 @@ func (w *FunctionExistsWaiter) WaitForOutput(ctx context.Context, params *GetFun } out, err := w.client.GetFunction(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -662,7 +670,13 @@ func (w *FunctionUpdatedV2Waiter) WaitForOutput(ctx context.Context, params *Get } out, err := w.client.GetFunction(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -754,6 +768,13 @@ func functionUpdatedV2StateRetryable(ctx context.Context, input *GetFunctionInpu return true, nil } +// GetFunctionAPIClient is a client that implements the GetFunction operation. +type GetFunctionAPIClient interface { + GetFunction(context.Context, *GetFunctionInput, ...func(*Options)) (*GetFunctionOutput, error) +} + +var _ GetFunctionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFunction(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_GetFunctionCodeSigningConfig.go b/service/lambda/api_op_GetFunctionCodeSigningConfig.go index ed666949cb2..3a6d7f8b283 100644 --- a/service/lambda/api_op_GetFunctionCodeSigningConfig.go +++ b/service/lambda/api_op_GetFunctionCodeSigningConfig.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetFunctionCodeSigningConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetFunctionConcurrency.go b/service/lambda/api_op_GetFunctionConcurrency.go index 6427da572bf..1837931bdf6 100644 --- a/service/lambda/api_op_GetFunctionConcurrency.go +++ b/service/lambda/api_op_GetFunctionConcurrency.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetFunctionConcurrencyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionConcurrencyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetFunctionConfiguration.go b/service/lambda/api_op_GetFunctionConfiguration.go index b2df3b71698..60112aa8075 100644 --- a/service/lambda/api_op_GetFunctionConfiguration.go +++ b/service/lambda/api_op_GetFunctionConfiguration.go @@ -270,6 +270,9 @@ func (c *Client) addOperationGetFunctionConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionConfigurationValidationMiddleware(stack); err != nil { return err } @@ -294,14 +297,6 @@ func (c *Client) addOperationGetFunctionConfigurationMiddlewares(stack *middlewa return nil } -// GetFunctionConfigurationAPIClient is a client that implements the -// GetFunctionConfiguration operation. -type GetFunctionConfigurationAPIClient interface { - GetFunctionConfiguration(context.Context, *GetFunctionConfigurationInput, ...func(*Options)) (*GetFunctionConfigurationOutput, error) -} - -var _ GetFunctionConfigurationAPIClient = (*Client)(nil) - // FunctionActiveWaiterOptions are waiter options for FunctionActiveWaiter type FunctionActiveWaiterOptions struct { @@ -417,7 +412,13 @@ func (w *FunctionActiveWaiter) WaitForOutput(ctx context.Context, params *GetFun } out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -624,7 +625,13 @@ func (w *FunctionUpdatedWaiter) WaitForOutput(ctx context.Context, params *GetFu } out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -833,7 +840,13 @@ func (w *PublishedVersionActiveWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetFunctionConfiguration(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -925,6 +938,14 @@ func publishedVersionActiveStateRetryable(ctx context.Context, input *GetFunctio return true, nil } +// GetFunctionConfigurationAPIClient is a client that implements the +// GetFunctionConfiguration operation. +type GetFunctionConfigurationAPIClient interface { + GetFunctionConfiguration(context.Context, *GetFunctionConfigurationInput, ...func(*Options)) (*GetFunctionConfigurationOutput, error) +} + +var _ GetFunctionConfigurationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFunctionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_GetFunctionEventInvokeConfig.go b/service/lambda/api_op_GetFunctionEventInvokeConfig.go index 84af388d4c8..d4a8e757320 100644 --- a/service/lambda/api_op_GetFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_GetFunctionEventInvokeConfig.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetFunctionEventInvokeConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetFunctionUrlConfig.go b/service/lambda/api_op_GetFunctionUrlConfig.go index 4ea07c19c59..3918cc1cf5b 100644 --- a/service/lambda/api_op_GetFunctionUrlConfig.go +++ b/service/lambda/api_op_GetFunctionUrlConfig.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetFunctionUrlConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFunctionUrlConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetLayerVersion.go b/service/lambda/api_op_GetLayerVersion.go index 5914b9e1586..40c9ce30db3 100644 --- a/service/lambda/api_op_GetLayerVersion.go +++ b/service/lambda/api_op_GetLayerVersion.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetLayerVersionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLayerVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetLayerVersionByArn.go b/service/lambda/api_op_GetLayerVersionByArn.go index e1fd873af14..432396cfae2 100644 --- a/service/lambda/api_op_GetLayerVersionByArn.go +++ b/service/lambda/api_op_GetLayerVersionByArn.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetLayerVersionByArnMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLayerVersionByArnValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetLayerVersionPolicy.go b/service/lambda/api_op_GetLayerVersionPolicy.go index 3a61e03f914..a19e9fb86b5 100644 --- a/service/lambda/api_op_GetLayerVersionPolicy.go +++ b/service/lambda/api_op_GetLayerVersionPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetLayerVersionPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLayerVersionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetPolicy.go b/service/lambda/api_op_GetPolicy.go index 3c8bf349134..abcf1c2dc68 100644 --- a/service/lambda/api_op_GetPolicy.go +++ b/service/lambda/api_op_GetPolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetProvisionedConcurrencyConfig.go b/service/lambda/api_op_GetProvisionedConcurrencyConfig.go index 1818da8e814..e4179b85bc5 100644 --- a/service/lambda/api_op_GetProvisionedConcurrencyConfig.go +++ b/service/lambda/api_op_GetProvisionedConcurrencyConfig.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetProvisionedConcurrencyConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_GetRuntimeManagementConfig.go b/service/lambda/api_op_GetRuntimeManagementConfig.go index bd022397bb1..ac23f8a8d72 100644 --- a/service/lambda/api_op_GetRuntimeManagementConfig.go +++ b/service/lambda/api_op_GetRuntimeManagementConfig.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetRuntimeManagementConfigMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuntimeManagementConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_Invoke.go b/service/lambda/api_op_Invoke.go index 1b57c2635d1..b0dd690f12d 100644 --- a/service/lambda/api_op_Invoke.go +++ b/service/lambda/api_op_Invoke.go @@ -212,6 +212,9 @@ func (c *Client) addOperationInvokeMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_InvokeAsync.go b/service/lambda/api_op_InvokeAsync.go index 25a05eaa473..c19012ffed3 100644 --- a/service/lambda/api_op_InvokeAsync.go +++ b/service/lambda/api_op_InvokeAsync.go @@ -132,6 +132,9 @@ func (c *Client) addOperationInvokeAsyncMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeAsyncValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_InvokeWithResponseStream.go b/service/lambda/api_op_InvokeWithResponseStream.go index c8e356061c6..a619d3219ff 100644 --- a/service/lambda/api_op_InvokeWithResponseStream.go +++ b/service/lambda/api_op_InvokeWithResponseStream.go @@ -166,6 +166,9 @@ func (c *Client) addOperationInvokeWithResponseStreamMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeWithResponseStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_ListAliases.go b/service/lambda/api_op_ListAliases.go index 86a77f35315..fc66bd28f48 100644 --- a/service/lambda/api_op_ListAliases.go +++ b/service/lambda/api_op_ListAliases.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAliasesValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt return nil } -// ListAliasesAPIClient is a client that implements the ListAliases operation. -type ListAliasesAPIClient interface { - ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) -} - -var _ ListAliasesAPIClient = (*Client)(nil) - // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // Limit the number of aliases returned. @@ -226,6 +222,9 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListCodeSigningConfigs.go b/service/lambda/api_op_ListCodeSigningConfigs.go index 84f35963f88..ce352b7b8f1 100644 --- a/service/lambda/api_op_ListCodeSigningConfigs.go +++ b/service/lambda/api_op_ListCodeSigningConfigs.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListCodeSigningConfigsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCodeSigningConfigs(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListCodeSigningConfigsMiddlewares(stack *middleware return nil } -// ListCodeSigningConfigsAPIClient is a client that implements the -// ListCodeSigningConfigs operation. -type ListCodeSigningConfigsAPIClient interface { - ListCodeSigningConfigs(context.Context, *ListCodeSigningConfigsInput, ...func(*Options)) (*ListCodeSigningConfigsOutput, error) -} - -var _ ListCodeSigningConfigsAPIClient = (*Client)(nil) - // ListCodeSigningConfigsPaginatorOptions is the paginator options for // ListCodeSigningConfigs type ListCodeSigningConfigsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListCodeSigningConfigsPaginator) NextPage(ctx context.Context, optFns . } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCodeSigningConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListCodeSigningConfigsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListCodeSigningConfigsAPIClient is a client that implements the +// ListCodeSigningConfigs operation. +type ListCodeSigningConfigsAPIClient interface { + ListCodeSigningConfigs(context.Context, *ListCodeSigningConfigsInput, ...func(*Options)) (*ListCodeSigningConfigsOutput, error) +} + +var _ ListCodeSigningConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCodeSigningConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListEventSourceMappings.go b/service/lambda/api_op_ListEventSourceMappings.go index 83d0561676e..13cf0afd7ab 100644 --- a/service/lambda/api_op_ListEventSourceMappings.go +++ b/service/lambda/api_op_ListEventSourceMappings.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListEventSourceMappingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventSourceMappings(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListEventSourceMappingsMiddlewares(stack *middlewar return nil } -// ListEventSourceMappingsAPIClient is a client that implements the -// ListEventSourceMappings operation. -type ListEventSourceMappingsAPIClient interface { - ListEventSourceMappings(context.Context, *ListEventSourceMappingsInput, ...func(*Options)) (*ListEventSourceMappingsOutput, error) -} - -var _ ListEventSourceMappingsAPIClient = (*Client)(nil) - // ListEventSourceMappingsPaginatorOptions is the paginator options for // ListEventSourceMappings type ListEventSourceMappingsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *ListEventSourceMappingsPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventSourceMappings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListEventSourceMappingsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEventSourceMappingsAPIClient is a client that implements the +// ListEventSourceMappings operation. +type ListEventSourceMappingsAPIClient interface { + ListEventSourceMappings(context.Context, *ListEventSourceMappingsInput, ...func(*Options)) (*ListEventSourceMappingsOutput, error) +} + +var _ ListEventSourceMappingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventSourceMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListFunctionEventInvokeConfigs.go b/service/lambda/api_op_ListFunctionEventInvokeConfigs.go index 25a5b4af102..118af24028c 100644 --- a/service/lambda/api_op_ListFunctionEventInvokeConfigs.go +++ b/service/lambda/api_op_ListFunctionEventInvokeConfigs.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListFunctionEventInvokeConfigsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFunctionEventInvokeConfigsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListFunctionEventInvokeConfigsMiddlewares(stack *mi return nil } -// ListFunctionEventInvokeConfigsAPIClient is a client that implements the -// ListFunctionEventInvokeConfigs operation. -type ListFunctionEventInvokeConfigsAPIClient interface { - ListFunctionEventInvokeConfigs(context.Context, *ListFunctionEventInvokeConfigsInput, ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) -} - -var _ ListFunctionEventInvokeConfigsAPIClient = (*Client)(nil) - // ListFunctionEventInvokeConfigsPaginatorOptions is the paginator options for // ListFunctionEventInvokeConfigs type ListFunctionEventInvokeConfigsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListFunctionEventInvokeConfigsPaginator) NextPage(ctx context.Context, } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFunctionEventInvokeConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListFunctionEventInvokeConfigsPaginator) NextPage(ctx context.Context, return result, nil } +// ListFunctionEventInvokeConfigsAPIClient is a client that implements the +// ListFunctionEventInvokeConfigs operation. +type ListFunctionEventInvokeConfigsAPIClient interface { + ListFunctionEventInvokeConfigs(context.Context, *ListFunctionEventInvokeConfigsInput, ...func(*Options)) (*ListFunctionEventInvokeConfigsOutput, error) +} + +var _ ListFunctionEventInvokeConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFunctionEventInvokeConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListFunctionUrlConfigs.go b/service/lambda/api_op_ListFunctionUrlConfigs.go index 383e830f996..8d50de3b06d 100644 --- a/service/lambda/api_op_ListFunctionUrlConfigs.go +++ b/service/lambda/api_op_ListFunctionUrlConfigs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListFunctionUrlConfigsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFunctionUrlConfigsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListFunctionUrlConfigsMiddlewares(stack *middleware return nil } -// ListFunctionUrlConfigsAPIClient is a client that implements the -// ListFunctionUrlConfigs operation. -type ListFunctionUrlConfigsAPIClient interface { - ListFunctionUrlConfigs(context.Context, *ListFunctionUrlConfigsInput, ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) -} - -var _ ListFunctionUrlConfigsAPIClient = (*Client)(nil) - // ListFunctionUrlConfigsPaginatorOptions is the paginator options for // ListFunctionUrlConfigs type ListFunctionUrlConfigsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListFunctionUrlConfigsPaginator) NextPage(ctx context.Context, optFns . } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFunctionUrlConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListFunctionUrlConfigsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListFunctionUrlConfigsAPIClient is a client that implements the +// ListFunctionUrlConfigs operation. +type ListFunctionUrlConfigsAPIClient interface { + ListFunctionUrlConfigs(context.Context, *ListFunctionUrlConfigsInput, ...func(*Options)) (*ListFunctionUrlConfigsOutput, error) +} + +var _ ListFunctionUrlConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFunctionUrlConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListFunctions.go b/service/lambda/api_op_ListFunctions.go index 11b7d1a88a5..5d962a03404 100644 --- a/service/lambda/api_op_ListFunctions.go +++ b/service/lambda/api_op_ListFunctions.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFunctions(options.Region), middleware.Before); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListFunctionsMiddlewares(stack *middleware.Stack, o return nil } -// ListFunctionsAPIClient is a client that implements the ListFunctions operation. -type ListFunctionsAPIClient interface { - ListFunctions(context.Context, *ListFunctionsInput, ...func(*Options)) (*ListFunctionsOutput, error) -} - -var _ ListFunctionsAPIClient = (*Client)(nil) - // ListFunctionsPaginatorOptions is the paginator options for ListFunctions type ListFunctionsPaginatorOptions struct { // The maximum number of functions to return in the response. Note that @@ -225,6 +221,9 @@ func (p *ListFunctionsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFunctions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListFunctionsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListFunctionsAPIClient is a client that implements the ListFunctions operation. +type ListFunctionsAPIClient interface { + ListFunctions(context.Context, *ListFunctionsInput, ...func(*Options)) (*ListFunctionsOutput, error) +} + +var _ ListFunctionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFunctions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go b/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go index 2dbeb74b005..773d5772ef2 100644 --- a/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go +++ b/service/lambda/api_op_ListFunctionsByCodeSigningConfig.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListFunctionsByCodeSigningConfigMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFunctionsByCodeSigningConfigValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListFunctionsByCodeSigningConfigMiddlewares(stack * return nil } -// ListFunctionsByCodeSigningConfigAPIClient is a client that implements the -// ListFunctionsByCodeSigningConfig operation. -type ListFunctionsByCodeSigningConfigAPIClient interface { - ListFunctionsByCodeSigningConfig(context.Context, *ListFunctionsByCodeSigningConfigInput, ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) -} - -var _ ListFunctionsByCodeSigningConfigAPIClient = (*Client)(nil) - // ListFunctionsByCodeSigningConfigPaginatorOptions is the paginator options for // ListFunctionsByCodeSigningConfig type ListFunctionsByCodeSigningConfigPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListFunctionsByCodeSigningConfigPaginator) NextPage(ctx context.Context } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFunctionsByCodeSigningConfig(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListFunctionsByCodeSigningConfigPaginator) NextPage(ctx context.Context return result, nil } +// ListFunctionsByCodeSigningConfigAPIClient is a client that implements the +// ListFunctionsByCodeSigningConfig operation. +type ListFunctionsByCodeSigningConfigAPIClient interface { + ListFunctionsByCodeSigningConfig(context.Context, *ListFunctionsByCodeSigningConfigInput, ...func(*Options)) (*ListFunctionsByCodeSigningConfigOutput, error) +} + +var _ ListFunctionsByCodeSigningConfigAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFunctionsByCodeSigningConfig(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListLayerVersions.go b/service/lambda/api_op_ListLayerVersions.go index 8f2a9e5dc4c..6870a34d028 100644 --- a/service/lambda/api_op_ListLayerVersions.go +++ b/service/lambda/api_op_ListLayerVersions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListLayerVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLayerVersionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListLayerVersionsMiddlewares(stack *middleware.Stac return nil } -// ListLayerVersionsAPIClient is a client that implements the ListLayerVersions -// operation. -type ListLayerVersionsAPIClient interface { - ListLayerVersions(context.Context, *ListLayerVersionsInput, ...func(*Options)) (*ListLayerVersionsOutput, error) -} - -var _ ListLayerVersionsAPIClient = (*Client)(nil) - // ListLayerVersionsPaginatorOptions is the paginator options for ListLayerVersions type ListLayerVersionsPaginatorOptions struct { // The maximum number of versions to return. @@ -228,6 +223,9 @@ func (p *ListLayerVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLayerVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListLayerVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListLayerVersionsAPIClient is a client that implements the ListLayerVersions +// operation. +type ListLayerVersionsAPIClient interface { + ListLayerVersions(context.Context, *ListLayerVersionsInput, ...func(*Options)) (*ListLayerVersionsOutput, error) +} + +var _ ListLayerVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLayerVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListLayers.go b/service/lambda/api_op_ListLayers.go index 82e84959464..74220e2cdb6 100644 --- a/service/lambda/api_op_ListLayers.go +++ b/service/lambda/api_op_ListLayers.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListLayersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLayers(options.Region), middleware.Before); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListLayersMiddlewares(stack *middleware.Stack, opti return nil } -// ListLayersAPIClient is a client that implements the ListLayers operation. -type ListLayersAPIClient interface { - ListLayers(context.Context, *ListLayersInput, ...func(*Options)) (*ListLayersOutput, error) -} - -var _ ListLayersAPIClient = (*Client)(nil) - // ListLayersPaginatorOptions is the paginator options for ListLayers type ListLayersPaginatorOptions struct { // The maximum number of layers to return. @@ -220,6 +216,9 @@ func (p *ListLayersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLayers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListLayersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListLayersAPIClient is a client that implements the ListLayers operation. +type ListLayersAPIClient interface { + ListLayers(context.Context, *ListLayersInput, ...func(*Options)) (*ListLayersOutput, error) +} + +var _ ListLayersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLayers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go b/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go index f9e2024c236..e9e175bd72d 100644 --- a/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go +++ b/service/lambda/api_op_ListProvisionedConcurrencyConfigs.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListProvisionedConcurrencyConfigsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProvisionedConcurrencyConfigsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListProvisionedConcurrencyConfigsMiddlewares(stack return nil } -// ListProvisionedConcurrencyConfigsAPIClient is a client that implements the -// ListProvisionedConcurrencyConfigs operation. -type ListProvisionedConcurrencyConfigsAPIClient interface { - ListProvisionedConcurrencyConfigs(context.Context, *ListProvisionedConcurrencyConfigsInput, ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) -} - -var _ ListProvisionedConcurrencyConfigsAPIClient = (*Client)(nil) - // ListProvisionedConcurrencyConfigsPaginatorOptions is the paginator options for // ListProvisionedConcurrencyConfigs type ListProvisionedConcurrencyConfigsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListProvisionedConcurrencyConfigsPaginator) NextPage(ctx context.Contex } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProvisionedConcurrencyConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListProvisionedConcurrencyConfigsPaginator) NextPage(ctx context.Contex return result, nil } +// ListProvisionedConcurrencyConfigsAPIClient is a client that implements the +// ListProvisionedConcurrencyConfigs operation. +type ListProvisionedConcurrencyConfigsAPIClient interface { + ListProvisionedConcurrencyConfigs(context.Context, *ListProvisionedConcurrencyConfigsInput, ...func(*Options)) (*ListProvisionedConcurrencyConfigsOutput, error) +} + +var _ ListProvisionedConcurrencyConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProvisionedConcurrencyConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_ListTags.go b/service/lambda/api_op_ListTags.go index a06793f8de3..d8ff90a6894 100644 --- a/service/lambda/api_op_ListTags.go +++ b/service/lambda/api_op_ListTags.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_ListVersionsByFunction.go b/service/lambda/api_op_ListVersionsByFunction.go index 85cd55dc281..11041bda9b8 100644 --- a/service/lambda/api_op_ListVersionsByFunction.go +++ b/service/lambda/api_op_ListVersionsByFunction.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListVersionsByFunctionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVersionsByFunctionValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListVersionsByFunctionMiddlewares(stack *middleware return nil } -// ListVersionsByFunctionAPIClient is a client that implements the -// ListVersionsByFunction operation. -type ListVersionsByFunctionAPIClient interface { - ListVersionsByFunction(context.Context, *ListVersionsByFunctionInput, ...func(*Options)) (*ListVersionsByFunctionOutput, error) -} - -var _ ListVersionsByFunctionAPIClient = (*Client)(nil) - // ListVersionsByFunctionPaginatorOptions is the paginator options for // ListVersionsByFunction type ListVersionsByFunctionPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListVersionsByFunctionPaginator) NextPage(ctx context.Context, optFns . } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVersionsByFunction(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListVersionsByFunctionPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListVersionsByFunctionAPIClient is a client that implements the +// ListVersionsByFunction operation. +type ListVersionsByFunctionAPIClient interface { + ListVersionsByFunction(context.Context, *ListVersionsByFunctionInput, ...func(*Options)) (*ListVersionsByFunctionOutput, error) +} + +var _ ListVersionsByFunctionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVersionsByFunction(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lambda/api_op_PublishLayerVersion.go b/service/lambda/api_op_PublishLayerVersion.go index 2b135b575f5..e4be345cb80 100644 --- a/service/lambda/api_op_PublishLayerVersion.go +++ b/service/lambda/api_op_PublishLayerVersion.go @@ -176,6 +176,9 @@ func (c *Client) addOperationPublishLayerVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishLayerVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_PublishVersion.go b/service/lambda/api_op_PublishVersion.go index b07edf04dfb..d6df73e6188 100644 --- a/service/lambda/api_op_PublishVersion.go +++ b/service/lambda/api_op_PublishVersion.go @@ -282,6 +282,9 @@ func (c *Client) addOperationPublishVersionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_PutFunctionCodeSigningConfig.go b/service/lambda/api_op_PutFunctionCodeSigningConfig.go index 8715732d5bb..bbe4de3639e 100644 --- a/service/lambda/api_op_PutFunctionCodeSigningConfig.go +++ b/service/lambda/api_op_PutFunctionCodeSigningConfig.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutFunctionCodeSigningConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFunctionCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_PutFunctionConcurrency.go b/service/lambda/api_op_PutFunctionConcurrency.go index 24ff3f37f81..f1cc693fb2f 100644 --- a/service/lambda/api_op_PutFunctionConcurrency.go +++ b/service/lambda/api_op_PutFunctionConcurrency.go @@ -138,6 +138,9 @@ func (c *Client) addOperationPutFunctionConcurrencyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFunctionConcurrencyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_PutFunctionEventInvokeConfig.go b/service/lambda/api_op_PutFunctionEventInvokeConfig.go index 2e936e5ab7a..11c6a236731 100644 --- a/service/lambda/api_op_PutFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_PutFunctionEventInvokeConfig.go @@ -180,6 +180,9 @@ func (c *Client) addOperationPutFunctionEventInvokeConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_PutProvisionedConcurrencyConfig.go b/service/lambda/api_op_PutProvisionedConcurrencyConfig.go index effdd1fe3ff..14d4e2003e7 100644 --- a/service/lambda/api_op_PutProvisionedConcurrencyConfig.go +++ b/service/lambda/api_op_PutProvisionedConcurrencyConfig.go @@ -147,6 +147,9 @@ func (c *Client) addOperationPutProvisionedConcurrencyConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutProvisionedConcurrencyConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_PutRuntimeManagementConfig.go b/service/lambda/api_op_PutRuntimeManagementConfig.go index 09711f1366c..6339bc318a0 100644 --- a/service/lambda/api_op_PutRuntimeManagementConfig.go +++ b/service/lambda/api_op_PutRuntimeManagementConfig.go @@ -166,6 +166,9 @@ func (c *Client) addOperationPutRuntimeManagementConfigMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRuntimeManagementConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_RemoveLayerVersionPermission.go b/service/lambda/api_op_RemoveLayerVersionPermission.go index 9b6818fdceb..9b3bb6dcaba 100644 --- a/service/lambda/api_op_RemoveLayerVersionPermission.go +++ b/service/lambda/api_op_RemoveLayerVersionPermission.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRemoveLayerVersionPermissionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveLayerVersionPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_RemovePermission.go b/service/lambda/api_op_RemovePermission.go index a78e5bcabc7..b067739a324 100644 --- a/service/lambda/api_op_RemovePermission.go +++ b/service/lambda/api_op_RemovePermission.go @@ -127,6 +127,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemovePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_TagResource.go b/service/lambda/api_op_TagResource.go index a13e501a154..a283dd25ea9 100644 --- a/service/lambda/api_op_TagResource.go +++ b/service/lambda/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UntagResource.go b/service/lambda/api_op_UntagResource.go index cc784603a87..aa5bbf633b9 100644 --- a/service/lambda/api_op_UntagResource.go +++ b/service/lambda/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateAlias.go b/service/lambda/api_op_UpdateAlias.go index a1a85c13182..47dd9135aac 100644 --- a/service/lambda/api_op_UpdateAlias.go +++ b/service/lambda/api_op_UpdateAlias.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateCodeSigningConfig.go b/service/lambda/api_op_UpdateCodeSigningConfig.go index 0ffaa250ff1..0179fca3da1 100644 --- a/service/lambda/api_op_UpdateCodeSigningConfig.go +++ b/service/lambda/api_op_UpdateCodeSigningConfig.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateCodeSigningConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCodeSigningConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateEventSourceMapping.go b/service/lambda/api_op_UpdateEventSourceMapping.go index 0b15406e8f6..43ccf7fe108 100644 --- a/service/lambda/api_op_UpdateEventSourceMapping.go +++ b/service/lambda/api_op_UpdateEventSourceMapping.go @@ -413,6 +413,9 @@ func (c *Client) addOperationUpdateEventSourceMappingMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventSourceMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateFunctionCode.go b/service/lambda/api_op_UpdateFunctionCode.go index 2ea86b1303e..38302b65c60 100644 --- a/service/lambda/api_op_UpdateFunctionCode.go +++ b/service/lambda/api_op_UpdateFunctionCode.go @@ -319,6 +319,9 @@ func (c *Client) addOperationUpdateFunctionCodeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateFunctionConfiguration.go b/service/lambda/api_op_UpdateFunctionConfiguration.go index 527597644cc..f3f53e8cace 100644 --- a/service/lambda/api_op_UpdateFunctionConfiguration.go +++ b/service/lambda/api_op_UpdateFunctionConfiguration.go @@ -379,6 +379,9 @@ func (c *Client) addOperationUpdateFunctionConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go b/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go index 95d3d9729d2..10407c7172b 100644 --- a/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go +++ b/service/lambda/api_op_UpdateFunctionEventInvokeConfig.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateFunctionEventInvokeConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionEventInvokeConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lambda/api_op_UpdateFunctionUrlConfig.go b/service/lambda/api_op_UpdateFunctionUrlConfig.go index 8ab960e73eb..b2b94400cca 100644 --- a/service/lambda/api_op_UpdateFunctionUrlConfig.go +++ b/service/lambda/api_op_UpdateFunctionUrlConfig.go @@ -196,6 +196,9 @@ func (c *Client) addOperationUpdateFunctionUrlConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFunctionUrlConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_client.go b/service/launchwizard/api_client.go index 59d583b0b7b..e56da9b1d89 100644 --- a/service/launchwizard/api_client.go +++ b/service/launchwizard/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/launchwizard/api_op_CreateDeployment.go b/service/launchwizard/api_op_CreateDeployment.go index b8a3b7d7956..ffccec94100 100644 --- a/service/launchwizard/api_op_CreateDeployment.go +++ b/service/launchwizard/api_op_CreateDeployment.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_DeleteDeployment.go b/service/launchwizard/api_op_DeleteDeployment.go index b55182b8d89..67b900e1ec7 100644 --- a/service/launchwizard/api_op_DeleteDeployment.go +++ b/service/launchwizard/api_op_DeleteDeployment.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_GetDeployment.go b/service/launchwizard/api_op_GetDeployment.go index bd744fa2a36..dc625532bc8 100644 --- a/service/launchwizard/api_op_GetDeployment.go +++ b/service/launchwizard/api_op_GetDeployment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_GetWorkload.go b/service/launchwizard/api_op_GetWorkload.go index 7dc53f7ef21..da36672e929 100644 --- a/service/launchwizard/api_op_GetWorkload.go +++ b/service/launchwizard/api_op_GetWorkload.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetWorkloadMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_GetWorkloadDeploymentPattern.go b/service/launchwizard/api_op_GetWorkloadDeploymentPattern.go index 65f23d23e2b..3b83c73f00b 100644 --- a/service/launchwizard/api_op_GetWorkloadDeploymentPattern.go +++ b/service/launchwizard/api_op_GetWorkloadDeploymentPattern.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetWorkloadDeploymentPatternMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkloadDeploymentPatternValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_ListDeploymentEvents.go b/service/launchwizard/api_op_ListDeploymentEvents.go index 99d875dce44..499dc7f0d06 100644 --- a/service/launchwizard/api_op_ListDeploymentEvents.go +++ b/service/launchwizard/api_op_ListDeploymentEvents.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDeploymentEventsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentEventsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListDeploymentEventsMiddlewares(stack *middleware.S return nil } -// ListDeploymentEventsAPIClient is a client that implements the -// ListDeploymentEvents operation. -type ListDeploymentEventsAPIClient interface { - ListDeploymentEvents(context.Context, *ListDeploymentEventsInput, ...func(*Options)) (*ListDeploymentEventsOutput, error) -} - -var _ ListDeploymentEventsAPIClient = (*Client)(nil) - // ListDeploymentEventsPaginatorOptions is the paginator options for // ListDeploymentEvents type ListDeploymentEventsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDeploymentEventsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeploymentEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDeploymentEventsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDeploymentEventsAPIClient is a client that implements the +// ListDeploymentEvents operation. +type ListDeploymentEventsAPIClient interface { + ListDeploymentEvents(context.Context, *ListDeploymentEventsInput, ...func(*Options)) (*ListDeploymentEventsOutput, error) +} + +var _ ListDeploymentEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeploymentEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/launchwizard/api_op_ListDeployments.go b/service/launchwizard/api_op_ListDeployments.go index 2626981e088..a68bf0d71cb 100644 --- a/service/launchwizard/api_op_ListDeployments.go +++ b/service/launchwizard/api_op_ListDeployments.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeployments(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// ListDeploymentsAPIClient is a client that implements the ListDeployments -// operation. -type ListDeploymentsAPIClient interface { - ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) -} - -var _ ListDeploymentsAPIClient = (*Client)(nil) - // ListDeploymentsPaginatorOptions is the paginator options for ListDeployments type ListDeploymentsPaginatorOptions struct { // The maximum number of items to return for this request. To get the next page of @@ -215,6 +210,9 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDeploymentsAPIClient is a client that implements the ListDeployments +// operation. +type ListDeploymentsAPIClient interface { + ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) +} + +var _ ListDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/launchwizard/api_op_ListTagsForResource.go b/service/launchwizard/api_op_ListTagsForResource.go index ecc4660cf4d..9d11ecaeb52 100644 --- a/service/launchwizard/api_op_ListTagsForResource.go +++ b/service/launchwizard/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_ListWorkloadDeploymentPatterns.go b/service/launchwizard/api_op_ListWorkloadDeploymentPatterns.go index 63fa5c32153..6944dfc6d67 100644 --- a/service/launchwizard/api_op_ListWorkloadDeploymentPatterns.go +++ b/service/launchwizard/api_op_ListWorkloadDeploymentPatterns.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListWorkloadDeploymentPatternsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkloadDeploymentPatternsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListWorkloadDeploymentPatternsMiddlewares(stack *mi return nil } -// ListWorkloadDeploymentPatternsAPIClient is a client that implements the -// ListWorkloadDeploymentPatterns operation. -type ListWorkloadDeploymentPatternsAPIClient interface { - ListWorkloadDeploymentPatterns(context.Context, *ListWorkloadDeploymentPatternsInput, ...func(*Options)) (*ListWorkloadDeploymentPatternsOutput, error) -} - -var _ ListWorkloadDeploymentPatternsAPIClient = (*Client)(nil) - // ListWorkloadDeploymentPatternsPaginatorOptions is the paginator options for // ListWorkloadDeploymentPatterns type ListWorkloadDeploymentPatternsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListWorkloadDeploymentPatternsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkloadDeploymentPatterns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListWorkloadDeploymentPatternsPaginator) NextPage(ctx context.Context, return result, nil } +// ListWorkloadDeploymentPatternsAPIClient is a client that implements the +// ListWorkloadDeploymentPatterns operation. +type ListWorkloadDeploymentPatternsAPIClient interface { + ListWorkloadDeploymentPatterns(context.Context, *ListWorkloadDeploymentPatternsInput, ...func(*Options)) (*ListWorkloadDeploymentPatternsOutput, error) +} + +var _ ListWorkloadDeploymentPatternsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkloadDeploymentPatterns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/launchwizard/api_op_ListWorkloads.go b/service/launchwizard/api_op_ListWorkloads.go index cc6a3f23f30..c2ae833eabe 100644 --- a/service/launchwizard/api_op_ListWorkloads.go +++ b/service/launchwizard/api_op_ListWorkloads.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkloads(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. -type ListWorkloadsAPIClient interface { - ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) -} - -var _ ListWorkloadsAPIClient = (*Client)(nil) - // ListWorkloadsPaginatorOptions is the paginator options for ListWorkloads type ListWorkloadsPaginatorOptions struct { // The maximum number of items to return for this request. To get the next page of @@ -208,6 +204,9 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkloads(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. +type ListWorkloadsAPIClient interface { + ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) +} + +var _ ListWorkloadsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkloads(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/launchwizard/api_op_TagResource.go b/service/launchwizard/api_op_TagResource.go index 6e8235eb0dd..fbe005562f3 100644 --- a/service/launchwizard/api_op_TagResource.go +++ b/service/launchwizard/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/launchwizard/api_op_UntagResource.go b/service/launchwizard/api_op_UntagResource.go index 1008f1ed04f..01f177c3982 100644 --- a/service/launchwizard/api_op_UntagResource.go +++ b/service/launchwizard/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_client.go b/service/lexmodelbuildingservice/api_client.go index eb6dbe9c8bc..92ac8e115b9 100644 --- a/service/lexmodelbuildingservice/api_client.go +++ b/service/lexmodelbuildingservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lexmodelbuildingservice/api_op_CreateBotVersion.go b/service/lexmodelbuildingservice/api_op_CreateBotVersion.go index 6db5d249106..3dbf678c683 100644 --- a/service/lexmodelbuildingservice/api_op_CreateBotVersion.go +++ b/service/lexmodelbuildingservice/api_op_CreateBotVersion.go @@ -206,6 +206,9 @@ func (c *Client) addOperationCreateBotVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_CreateIntentVersion.go b/service/lexmodelbuildingservice/api_op_CreateIntentVersion.go index 5458964d158..6f987b1e92a 100644 --- a/service/lexmodelbuildingservice/api_op_CreateIntentVersion.go +++ b/service/lexmodelbuildingservice/api_op_CreateIntentVersion.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateIntentVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_CreateSlotTypeVersion.go b/service/lexmodelbuildingservice/api_op_CreateSlotTypeVersion.go index 2fef2c7538b..3bca453532e 100644 --- a/service/lexmodelbuildingservice/api_op_CreateSlotTypeVersion.go +++ b/service/lexmodelbuildingservice/api_op_CreateSlotTypeVersion.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateSlotTypeVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSlotTypeVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteBot.go b/service/lexmodelbuildingservice/api_op_DeleteBot.go index 627ef7726a1..19363741614 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteBot.go +++ b/service/lexmodelbuildingservice/api_op_DeleteBot.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteBotMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteBotAlias.go b/service/lexmodelbuildingservice/api_op_DeleteBotAlias.go index e4b648e691c..e2014d259f8 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteBotAlias.go +++ b/service/lexmodelbuildingservice/api_op_DeleteBotAlias.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteBotAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteBotChannelAssociation.go b/service/lexmodelbuildingservice/api_op_DeleteBotChannelAssociation.go index dac1731e77e..08e26541a60 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteBotChannelAssociation.go +++ b/service/lexmodelbuildingservice/api_op_DeleteBotChannelAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteBotChannelAssociationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotChannelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteBotVersion.go b/service/lexmodelbuildingservice/api_op_DeleteBotVersion.go index 46a0c5d55d2..eac84ef0d71 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteBotVersion.go +++ b/service/lexmodelbuildingservice/api_op_DeleteBotVersion.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteBotVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteIntent.go b/service/lexmodelbuildingservice/api_op_DeleteIntent.go index 3a33d47d7cd..037a00a4d84 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteIntent.go +++ b/service/lexmodelbuildingservice/api_op_DeleteIntent.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteIntentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteIntentVersion.go b/service/lexmodelbuildingservice/api_op_DeleteIntentVersion.go index d486dae143f..163ea996700 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteIntentVersion.go +++ b/service/lexmodelbuildingservice/api_op_DeleteIntentVersion.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteIntentVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteSlotType.go b/service/lexmodelbuildingservice/api_op_DeleteSlotType.go index f16b4eaf688..b3480ee049a 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteSlotType.go +++ b/service/lexmodelbuildingservice/api_op_DeleteSlotType.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteSlotTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteSlotTypeVersion.go b/service/lexmodelbuildingservice/api_op_DeleteSlotTypeVersion.go index 2bd8feb75f9..7d8f5267967 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteSlotTypeVersion.go +++ b/service/lexmodelbuildingservice/api_op_DeleteSlotTypeVersion.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSlotTypeVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlotTypeVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_DeleteUtterances.go b/service/lexmodelbuildingservice/api_op_DeleteUtterances.go index a8c0295acb5..eb9d45ae6f2 100644 --- a/service/lexmodelbuildingservice/api_op_DeleteUtterances.go +++ b/service/lexmodelbuildingservice/api_op_DeleteUtterances.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteUtterancesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUtterancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetBot.go b/service/lexmodelbuildingservice/api_op_GetBot.go index 1d32c27bbca..df5a5586bc7 100644 --- a/service/lexmodelbuildingservice/api_op_GetBot.go +++ b/service/lexmodelbuildingservice/api_op_GetBot.go @@ -215,6 +215,9 @@ func (c *Client) addOperationGetBotMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetBotAlias.go b/service/lexmodelbuildingservice/api_op_GetBotAlias.go index 776e6ec600d..57854829e66 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotAlias.go +++ b/service/lexmodelbuildingservice/api_op_GetBotAlias.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetBotAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetBotAliases.go b/service/lexmodelbuildingservice/api_op_GetBotAliases.go index 4de8aeb49cc..46a934d79e0 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotAliases.go +++ b/service/lexmodelbuildingservice/api_op_GetBotAliases.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetBotAliasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotAliasesValidationMiddleware(stack); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationGetBotAliasesMiddlewares(stack *middleware.Stack, o return nil } -// GetBotAliasesAPIClient is a client that implements the GetBotAliases operation. -type GetBotAliasesAPIClient interface { - GetBotAliases(context.Context, *GetBotAliasesInput, ...func(*Options)) (*GetBotAliasesOutput, error) -} - -var _ GetBotAliasesAPIClient = (*Client)(nil) - // GetBotAliasesPaginatorOptions is the paginator options for GetBotAliases type GetBotAliasesPaginatorOptions struct { // The maximum number of aliases to return in the response. The default is 50. . @@ -222,6 +218,9 @@ func (p *GetBotAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBotAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *GetBotAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetBotAliasesAPIClient is a client that implements the GetBotAliases operation. +type GetBotAliasesAPIClient interface { + GetBotAliases(context.Context, *GetBotAliasesInput, ...func(*Options)) (*GetBotAliasesOutput, error) +} + +var _ GetBotAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBotAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetBotChannelAssociation.go b/service/lexmodelbuildingservice/api_op_GetBotChannelAssociation.go index 059a2d831a2..c8b40227e37 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotChannelAssociation.go +++ b/service/lexmodelbuildingservice/api_op_GetBotChannelAssociation.go @@ -156,6 +156,9 @@ func (c *Client) addOperationGetBotChannelAssociationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotChannelAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go b/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go index a18090c1373..85070fffd19 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go +++ b/service/lexmodelbuildingservice/api_op_GetBotChannelAssociations.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetBotChannelAssociationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotChannelAssociationsValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationGetBotChannelAssociationsMiddlewares(stack *middlew return nil } -// GetBotChannelAssociationsAPIClient is a client that implements the -// GetBotChannelAssociations operation. -type GetBotChannelAssociationsAPIClient interface { - GetBotChannelAssociations(context.Context, *GetBotChannelAssociationsInput, ...func(*Options)) (*GetBotChannelAssociationsOutput, error) -} - -var _ GetBotChannelAssociationsAPIClient = (*Client)(nil) - // GetBotChannelAssociationsPaginatorOptions is the paginator options for // GetBotChannelAssociations type GetBotChannelAssociationsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *GetBotChannelAssociationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBotChannelAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *GetBotChannelAssociationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// GetBotChannelAssociationsAPIClient is a client that implements the +// GetBotChannelAssociations operation. +type GetBotChannelAssociationsAPIClient interface { + GetBotChannelAssociations(context.Context, *GetBotChannelAssociationsInput, ...func(*Options)) (*GetBotChannelAssociationsOutput, error) +} + +var _ GetBotChannelAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBotChannelAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetBotVersions.go b/service/lexmodelbuildingservice/api_op_GetBotVersions.go index 8a600937213..bf2fc9153ac 100644 --- a/service/lexmodelbuildingservice/api_op_GetBotVersions.go +++ b/service/lexmodelbuildingservice/api_op_GetBotVersions.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetBotVersionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBotVersionsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationGetBotVersionsMiddlewares(stack *middleware.Stack, return nil } -// GetBotVersionsAPIClient is a client that implements the GetBotVersions -// operation. -type GetBotVersionsAPIClient interface { - GetBotVersions(context.Context, *GetBotVersionsInput, ...func(*Options)) (*GetBotVersionsOutput, error) -} - -var _ GetBotVersionsAPIClient = (*Client)(nil) - // GetBotVersionsPaginatorOptions is the paginator options for GetBotVersions type GetBotVersionsPaginatorOptions struct { // The maximum number of bot versions to return in the response. The default is 10. @@ -227,6 +222,9 @@ func (p *GetBotVersionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBotVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *GetBotVersionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetBotVersionsAPIClient is a client that implements the GetBotVersions +// operation. +type GetBotVersionsAPIClient interface { + GetBotVersions(context.Context, *GetBotVersionsInput, ...func(*Options)) (*GetBotVersionsOutput, error) +} + +var _ GetBotVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBotVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetBots.go b/service/lexmodelbuildingservice/api_op_GetBots.go index 8779074244d..e3fb91efb66 100644 --- a/service/lexmodelbuildingservice/api_op_GetBots.go +++ b/service/lexmodelbuildingservice/api_op_GetBots.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetBotsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBots(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationGetBotsMiddlewares(stack *middleware.Stack, options return nil } -// GetBotsAPIClient is a client that implements the GetBots operation. -type GetBotsAPIClient interface { - GetBots(context.Context, *GetBotsInput, ...func(*Options)) (*GetBotsOutput, error) -} - -var _ GetBotsAPIClient = (*Client)(nil) - // GetBotsPaginatorOptions is the paginator options for GetBots type GetBotsPaginatorOptions struct { // The maximum number of bots to return in the response that the request will @@ -218,6 +214,9 @@ func (p *GetBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *GetBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options return result, nil } +// GetBotsAPIClient is a client that implements the GetBots operation. +type GetBotsAPIClient interface { + GetBots(context.Context, *GetBotsInput, ...func(*Options)) (*GetBotsOutput, error) +} + +var _ GetBotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetBuiltinIntent.go b/service/lexmodelbuildingservice/api_op_GetBuiltinIntent.go index dd2367cab34..4df5772706a 100644 --- a/service/lexmodelbuildingservice/api_op_GetBuiltinIntent.go +++ b/service/lexmodelbuildingservice/api_op_GetBuiltinIntent.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetBuiltinIntentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBuiltinIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go b/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go index e61a8e0c285..68e91232b22 100644 --- a/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go +++ b/service/lexmodelbuildingservice/api_op_GetBuiltinIntents.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetBuiltinIntentsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBuiltinIntents(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationGetBuiltinIntentsMiddlewares(stack *middleware.Stac return nil } -// GetBuiltinIntentsAPIClient is a client that implements the GetBuiltinIntents -// operation. -type GetBuiltinIntentsAPIClient interface { - GetBuiltinIntents(context.Context, *GetBuiltinIntentsInput, ...func(*Options)) (*GetBuiltinIntentsOutput, error) -} - -var _ GetBuiltinIntentsAPIClient = (*Client)(nil) - // GetBuiltinIntentsPaginatorOptions is the paginator options for GetBuiltinIntents type GetBuiltinIntentsPaginatorOptions struct { // The maximum number of intents to return in the response. The default is 10. @@ -220,6 +215,9 @@ func (p *GetBuiltinIntentsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBuiltinIntents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *GetBuiltinIntentsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetBuiltinIntentsAPIClient is a client that implements the GetBuiltinIntents +// operation. +type GetBuiltinIntentsAPIClient interface { + GetBuiltinIntents(context.Context, *GetBuiltinIntentsInput, ...func(*Options)) (*GetBuiltinIntentsOutput, error) +} + +var _ GetBuiltinIntentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBuiltinIntents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go b/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go index 1da3ca792a4..1783800c55e 100644 --- a/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go +++ b/service/lexmodelbuildingservice/api_op_GetBuiltinSlotTypes.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetBuiltinSlotTypesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBuiltinSlotTypes(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationGetBuiltinSlotTypesMiddlewares(stack *middleware.St return nil } -// GetBuiltinSlotTypesAPIClient is a client that implements the -// GetBuiltinSlotTypes operation. -type GetBuiltinSlotTypesAPIClient interface { - GetBuiltinSlotTypes(context.Context, *GetBuiltinSlotTypesInput, ...func(*Options)) (*GetBuiltinSlotTypesOutput, error) -} - -var _ GetBuiltinSlotTypesAPIClient = (*Client)(nil) - // GetBuiltinSlotTypesPaginatorOptions is the paginator options for // GetBuiltinSlotTypes type GetBuiltinSlotTypesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *GetBuiltinSlotTypesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetBuiltinSlotTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *GetBuiltinSlotTypesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetBuiltinSlotTypesAPIClient is a client that implements the +// GetBuiltinSlotTypes operation. +type GetBuiltinSlotTypesAPIClient interface { + GetBuiltinSlotTypes(context.Context, *GetBuiltinSlotTypesInput, ...func(*Options)) (*GetBuiltinSlotTypesOutput, error) +} + +var _ GetBuiltinSlotTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetBuiltinSlotTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetExport.go b/service/lexmodelbuildingservice/api_op_GetExport.go index 36bb9590fc8..bac472580bc 100644 --- a/service/lexmodelbuildingservice/api_op_GetExport.go +++ b/service/lexmodelbuildingservice/api_op_GetExport.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetExportMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetImport.go b/service/lexmodelbuildingservice/api_op_GetImport.go index 1572bd2e57e..1dde8bc985b 100644 --- a/service/lexmodelbuildingservice/api_op_GetImport.go +++ b/service/lexmodelbuildingservice/api_op_GetImport.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetImportMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetIntent.go b/service/lexmodelbuildingservice/api_op_GetIntent.go index 977924588f8..6a8164806ef 100644 --- a/service/lexmodelbuildingservice/api_op_GetIntent.go +++ b/service/lexmodelbuildingservice/api_op_GetIntent.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetIntentMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetIntentVersions.go b/service/lexmodelbuildingservice/api_op_GetIntentVersions.go index 312f92df1d2..cff4962f260 100644 --- a/service/lexmodelbuildingservice/api_op_GetIntentVersions.go +++ b/service/lexmodelbuildingservice/api_op_GetIntentVersions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetIntentVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIntentVersionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationGetIntentVersionsMiddlewares(stack *middleware.Stac return nil } -// GetIntentVersionsAPIClient is a client that implements the GetIntentVersions -// operation. -type GetIntentVersionsAPIClient interface { - GetIntentVersions(context.Context, *GetIntentVersionsInput, ...func(*Options)) (*GetIntentVersionsOutput, error) -} - -var _ GetIntentVersionsAPIClient = (*Client)(nil) - // GetIntentVersionsPaginatorOptions is the paginator options for GetIntentVersions type GetIntentVersionsPaginatorOptions struct { // The maximum number of intent versions to return in the response. The default is @@ -229,6 +224,9 @@ func (p *GetIntentVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIntentVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *GetIntentVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetIntentVersionsAPIClient is a client that implements the GetIntentVersions +// operation. +type GetIntentVersionsAPIClient interface { + GetIntentVersions(context.Context, *GetIntentVersionsInput, ...func(*Options)) (*GetIntentVersionsOutput, error) +} + +var _ GetIntentVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIntentVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetIntents.go b/service/lexmodelbuildingservice/api_op_GetIntents.go index 29ec07ab651..50f21cf1108 100644 --- a/service/lexmodelbuildingservice/api_op_GetIntents.go +++ b/service/lexmodelbuildingservice/api_op_GetIntents.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetIntentsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIntents(options.Region), middleware.Before); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationGetIntentsMiddlewares(stack *middleware.Stack, opti return nil } -// GetIntentsAPIClient is a client that implements the GetIntents operation. -type GetIntentsAPIClient interface { - GetIntents(context.Context, *GetIntentsInput, ...func(*Options)) (*GetIntentsOutput, error) -} - -var _ GetIntentsAPIClient = (*Client)(nil) - // GetIntentsPaginatorOptions is the paginator options for GetIntents type GetIntentsPaginatorOptions struct { // The maximum number of intents to return in the response. The default is 10. @@ -218,6 +214,9 @@ func (p *GetIntentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetIntents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *GetIntentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// GetIntentsAPIClient is a client that implements the GetIntents operation. +type GetIntentsAPIClient interface { + GetIntents(context.Context, *GetIntentsInput, ...func(*Options)) (*GetIntentsOutput, error) +} + +var _ GetIntentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIntents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetMigration.go b/service/lexmodelbuildingservice/api_op_GetMigration.go index 69ac4662664..a8a3119533e 100644 --- a/service/lexmodelbuildingservice/api_op_GetMigration.go +++ b/service/lexmodelbuildingservice/api_op_GetMigration.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetMigrationMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMigrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetMigrations.go b/service/lexmodelbuildingservice/api_op_GetMigrations.go index b7156bc3e54..9bbe7afe073 100644 --- a/service/lexmodelbuildingservice/api_op_GetMigrations.go +++ b/service/lexmodelbuildingservice/api_op_GetMigrations.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetMigrationsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMigrations(options.Region), middleware.Before); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationGetMigrationsMiddlewares(stack *middleware.Stack, o return nil } -// GetMigrationsAPIClient is a client that implements the GetMigrations operation. -type GetMigrationsAPIClient interface { - GetMigrations(context.Context, *GetMigrationsInput, ...func(*Options)) (*GetMigrationsOutput, error) -} - -var _ GetMigrationsAPIClient = (*Client)(nil) - // GetMigrationsPaginatorOptions is the paginator options for GetMigrations type GetMigrationsPaginatorOptions struct { // The maximum number of migrations to return in the response. The default is 10. @@ -221,6 +217,9 @@ func (p *GetMigrationsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetMigrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *GetMigrationsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetMigrationsAPIClient is a client that implements the GetMigrations operation. +type GetMigrationsAPIClient interface { + GetMigrations(context.Context, *GetMigrationsInput, ...func(*Options)) (*GetMigrationsOutput, error) +} + +var _ GetMigrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetMigrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetSlotType.go b/service/lexmodelbuildingservice/api_op_GetSlotType.go index 35ad259eef3..9f7f9c5afc0 100644 --- a/service/lexmodelbuildingservice/api_op_GetSlotType.go +++ b/service/lexmodelbuildingservice/api_op_GetSlotType.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetSlotTypeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go b/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go index bba99bf18d2..edaba6fbbca 100644 --- a/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go +++ b/service/lexmodelbuildingservice/api_op_GetSlotTypeVersions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetSlotTypeVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSlotTypeVersionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationGetSlotTypeVersionsMiddlewares(stack *middleware.St return nil } -// GetSlotTypeVersionsAPIClient is a client that implements the -// GetSlotTypeVersions operation. -type GetSlotTypeVersionsAPIClient interface { - GetSlotTypeVersions(context.Context, *GetSlotTypeVersionsInput, ...func(*Options)) (*GetSlotTypeVersionsOutput, error) -} - -var _ GetSlotTypeVersionsAPIClient = (*Client)(nil) - // GetSlotTypeVersionsPaginatorOptions is the paginator options for // GetSlotTypeVersions type GetSlotTypeVersionsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *GetSlotTypeVersionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSlotTypeVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *GetSlotTypeVersionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetSlotTypeVersionsAPIClient is a client that implements the +// GetSlotTypeVersions operation. +type GetSlotTypeVersionsAPIClient interface { + GetSlotTypeVersions(context.Context, *GetSlotTypeVersionsInput, ...func(*Options)) (*GetSlotTypeVersionsOutput, error) +} + +var _ GetSlotTypeVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSlotTypeVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetSlotTypes.go b/service/lexmodelbuildingservice/api_op_GetSlotTypes.go index f3cdf256a7b..22f4f6dea07 100644 --- a/service/lexmodelbuildingservice/api_op_GetSlotTypes.go +++ b/service/lexmodelbuildingservice/api_op_GetSlotTypes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetSlotTypesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSlotTypes(options.Region), middleware.Before); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationGetSlotTypesMiddlewares(stack *middleware.Stack, op return nil } -// GetSlotTypesAPIClient is a client that implements the GetSlotTypes operation. -type GetSlotTypesAPIClient interface { - GetSlotTypes(context.Context, *GetSlotTypesInput, ...func(*Options)) (*GetSlotTypesOutput, error) -} - -var _ GetSlotTypesAPIClient = (*Client)(nil) - // GetSlotTypesPaginatorOptions is the paginator options for GetSlotTypes type GetSlotTypesPaginatorOptions struct { // The maximum number of slot types to return in the response. The default is 10. @@ -219,6 +215,9 @@ func (p *GetSlotTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSlotTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *GetSlotTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetSlotTypesAPIClient is a client that implements the GetSlotTypes operation. +type GetSlotTypesAPIClient interface { + GetSlotTypes(context.Context, *GetSlotTypesInput, ...func(*Options)) (*GetSlotTypesOutput, error) +} + +var _ GetSlotTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSlotTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelbuildingservice/api_op_GetUtterancesView.go b/service/lexmodelbuildingservice/api_op_GetUtterancesView.go index 9df8a25880a..f5f803057a7 100644 --- a/service/lexmodelbuildingservice/api_op_GetUtterancesView.go +++ b/service/lexmodelbuildingservice/api_op_GetUtterancesView.go @@ -149,6 +149,9 @@ func (c *Client) addOperationGetUtterancesViewMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUtterancesViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_ListTagsForResource.go b/service/lexmodelbuildingservice/api_op_ListTagsForResource.go index ba37e2a2676..51643ee6877 100644 --- a/service/lexmodelbuildingservice/api_op_ListTagsForResource.go +++ b/service/lexmodelbuildingservice/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_PutBot.go b/service/lexmodelbuildingservice/api_op_PutBot.go index 88ed4cff9c3..43cc00e3f0e 100644 --- a/service/lexmodelbuildingservice/api_op_PutBot.go +++ b/service/lexmodelbuildingservice/api_op_PutBot.go @@ -454,6 +454,9 @@ func (c *Client) addOperationPutBotMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_PutBotAlias.go b/service/lexmodelbuildingservice/api_op_PutBotAlias.go index 0bd3382763f..c8bbe5fa79a 100644 --- a/service/lexmodelbuildingservice/api_op_PutBotAlias.go +++ b/service/lexmodelbuildingservice/api_op_PutBotAlias.go @@ -168,6 +168,9 @@ func (c *Client) addOperationPutBotAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutBotAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_PutIntent.go b/service/lexmodelbuildingservice/api_op_PutIntent.go index b908c1da10b..6ea7ad1dddf 100644 --- a/service/lexmodelbuildingservice/api_op_PutIntent.go +++ b/service/lexmodelbuildingservice/api_op_PutIntent.go @@ -348,6 +348,9 @@ func (c *Client) addOperationPutIntentMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_PutSlotType.go b/service/lexmodelbuildingservice/api_op_PutSlotType.go index e2777d25e58..15d556b46de 100644 --- a/service/lexmodelbuildingservice/api_op_PutSlotType.go +++ b/service/lexmodelbuildingservice/api_op_PutSlotType.go @@ -223,6 +223,9 @@ func (c *Client) addOperationPutSlotTypeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_StartImport.go b/service/lexmodelbuildingservice/api_op_StartImport.go index 815af0ca3c9..df6a41fb697 100644 --- a/service/lexmodelbuildingservice/api_op_StartImport.go +++ b/service/lexmodelbuildingservice/api_op_StartImport.go @@ -157,6 +157,9 @@ func (c *Client) addOperationStartImportMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_StartMigration.go b/service/lexmodelbuildingservice/api_op_StartMigration.go index 4b4a2e18a81..8c34d9bdda3 100644 --- a/service/lexmodelbuildingservice/api_op_StartMigration.go +++ b/service/lexmodelbuildingservice/api_op_StartMigration.go @@ -169,6 +169,9 @@ func (c *Client) addOperationStartMigrationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMigrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_TagResource.go b/service/lexmodelbuildingservice/api_op_TagResource.go index 77b642263f1..b07ee9a5311 100644 --- a/service/lexmodelbuildingservice/api_op_TagResource.go +++ b/service/lexmodelbuildingservice/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelbuildingservice/api_op_UntagResource.go b/service/lexmodelbuildingservice/api_op_UntagResource.go index a75ed187d38..ad9958d52bc 100644 --- a/service/lexmodelbuildingservice/api_op_UntagResource.go +++ b/service/lexmodelbuildingservice/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_client.go b/service/lexmodelsv2/api_client.go index d4ba9d588e3..d6a99a500af 100644 --- a/service/lexmodelsv2/api_client.go +++ b/service/lexmodelsv2/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lexmodelsv2/api_op_BatchCreateCustomVocabularyItem.go b/service/lexmodelsv2/api_op_BatchCreateCustomVocabularyItem.go index b9ea1d111bc..06d38f11c80 100644 --- a/service/lexmodelsv2/api_op_BatchCreateCustomVocabularyItem.go +++ b/service/lexmodelsv2/api_op_BatchCreateCustomVocabularyItem.go @@ -143,6 +143,9 @@ func (c *Client) addOperationBatchCreateCustomVocabularyItemMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateCustomVocabularyItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_BatchDeleteCustomVocabularyItem.go b/service/lexmodelsv2/api_op_BatchDeleteCustomVocabularyItem.go index 1d6e1b2166e..213f33a27a8 100644 --- a/service/lexmodelsv2/api_op_BatchDeleteCustomVocabularyItem.go +++ b/service/lexmodelsv2/api_op_BatchDeleteCustomVocabularyItem.go @@ -143,6 +143,9 @@ func (c *Client) addOperationBatchDeleteCustomVocabularyItemMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteCustomVocabularyItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_BatchUpdateCustomVocabularyItem.go b/service/lexmodelsv2/api_op_BatchUpdateCustomVocabularyItem.go index 9d77bdee7c4..4a3d8e7821f 100644 --- a/service/lexmodelsv2/api_op_BatchUpdateCustomVocabularyItem.go +++ b/service/lexmodelsv2/api_op_BatchUpdateCustomVocabularyItem.go @@ -143,6 +143,9 @@ func (c *Client) addOperationBatchUpdateCustomVocabularyItemMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateCustomVocabularyItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_BuildBotLocale.go b/service/lexmodelsv2/api_op_BuildBotLocale.go index 16f80db43b0..307ec3feaad 100644 --- a/service/lexmodelsv2/api_op_BuildBotLocale.go +++ b/service/lexmodelsv2/api_op_BuildBotLocale.go @@ -142,6 +142,9 @@ func (c *Client) addOperationBuildBotLocaleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBuildBotLocaleValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateBot.go b/service/lexmodelsv2/api_op_CreateBot.go index c8a847dced3..c90ec187601 100644 --- a/service/lexmodelsv2/api_op_CreateBot.go +++ b/service/lexmodelsv2/api_op_CreateBot.go @@ -188,6 +188,9 @@ func (c *Client) addOperationCreateBotMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateBotAlias.go b/service/lexmodelsv2/api_op_CreateBotAlias.go index 02bac07e914..d4a849aa6bf 100644 --- a/service/lexmodelsv2/api_op_CreateBotAlias.go +++ b/service/lexmodelsv2/api_op_CreateBotAlias.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCreateBotAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateBotLocale.go b/service/lexmodelsv2/api_op_CreateBotLocale.go index a645510126a..903fab7dba6 100644 --- a/service/lexmodelsv2/api_op_CreateBotLocale.go +++ b/service/lexmodelsv2/api_op_CreateBotLocale.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateBotLocaleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotLocaleValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateBotReplica.go b/service/lexmodelsv2/api_op_CreateBotReplica.go index 85783b01f9f..564479cf835 100644 --- a/service/lexmodelsv2/api_op_CreateBotReplica.go +++ b/service/lexmodelsv2/api_op_CreateBotReplica.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateBotReplicaMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateBotVersion.go b/service/lexmodelsv2/api_op_CreateBotVersion.go index be17916d3cd..60bbb4459b5 100644 --- a/service/lexmodelsv2/api_op_CreateBotVersion.go +++ b/service/lexmodelsv2/api_op_CreateBotVersion.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateBotVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBotVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateExport.go b/service/lexmodelsv2/api_op_CreateExport.go index 380d544a944..83ef57a641f 100644 --- a/service/lexmodelsv2/api_op_CreateExport.go +++ b/service/lexmodelsv2/api_op_CreateExport.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateExportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateIntent.go b/service/lexmodelsv2/api_op_CreateIntent.go index 9dc63bcb165..47ee859e077 100644 --- a/service/lexmodelsv2/api_op_CreateIntent.go +++ b/service/lexmodelsv2/api_op_CreateIntent.go @@ -294,6 +294,9 @@ func (c *Client) addOperationCreateIntentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateResourcePolicy.go b/service/lexmodelsv2/api_op_CreateResourcePolicy.go index 745394dd2e9..9945a8d9469 100644 --- a/service/lexmodelsv2/api_op_CreateResourcePolicy.go +++ b/service/lexmodelsv2/api_op_CreateResourcePolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go b/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go index b06c5291776..20a2f932c48 100644 --- a/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go +++ b/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateResourcePolicyStatementMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourcePolicyStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateSlot.go b/service/lexmodelsv2/api_op_CreateSlot.go index 4f13dda9f47..957604b3e40 100644 --- a/service/lexmodelsv2/api_op_CreateSlot.go +++ b/service/lexmodelsv2/api_op_CreateSlot.go @@ -206,6 +206,9 @@ func (c *Client) addOperationCreateSlotMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSlotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateSlotType.go b/service/lexmodelsv2/api_op_CreateSlotType.go index 80b531e9f8e..63dd085d121 100644 --- a/service/lexmodelsv2/api_op_CreateSlotType.go +++ b/service/lexmodelsv2/api_op_CreateSlotType.go @@ -200,6 +200,9 @@ func (c *Client) addOperationCreateSlotTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateTestSetDiscrepancyReport.go b/service/lexmodelsv2/api_op_CreateTestSetDiscrepancyReport.go index e7c783e81c5..fc85452a255 100644 --- a/service/lexmodelsv2/api_op_CreateTestSetDiscrepancyReport.go +++ b/service/lexmodelsv2/api_op_CreateTestSetDiscrepancyReport.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateTestSetDiscrepancyReportMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTestSetDiscrepancyReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_CreateUploadUrl.go b/service/lexmodelsv2/api_op_CreateUploadUrl.go index 04a60a48779..0949e9ca715 100644 --- a/service/lexmodelsv2/api_op_CreateUploadUrl.go +++ b/service/lexmodelsv2/api_op_CreateUploadUrl.go @@ -106,6 +106,9 @@ func (c *Client) addOperationCreateUploadUrlMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUploadUrl(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteBot.go b/service/lexmodelsv2/api_op_DeleteBot.go index 07ae707e0de..2a7dc25212a 100644 --- a/service/lexmodelsv2/api_op_DeleteBot.go +++ b/service/lexmodelsv2/api_op_DeleteBot.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteBotMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteBotAlias.go b/service/lexmodelsv2/api_op_DeleteBotAlias.go index 444146026c0..0afd146c0c9 100644 --- a/service/lexmodelsv2/api_op_DeleteBotAlias.go +++ b/service/lexmodelsv2/api_op_DeleteBotAlias.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteBotAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteBotLocale.go b/service/lexmodelsv2/api_op_DeleteBotLocale.go index c9384d8453b..60683903447 100644 --- a/service/lexmodelsv2/api_op_DeleteBotLocale.go +++ b/service/lexmodelsv2/api_op_DeleteBotLocale.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteBotLocaleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotLocaleValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteBotReplica.go b/service/lexmodelsv2/api_op_DeleteBotReplica.go index b40cab03c39..eb1eddf738c 100644 --- a/service/lexmodelsv2/api_op_DeleteBotReplica.go +++ b/service/lexmodelsv2/api_op_DeleteBotReplica.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteBotReplicaMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteBotVersion.go b/service/lexmodelsv2/api_op_DeleteBotVersion.go index 3646cd12e4c..8d042149663 100644 --- a/service/lexmodelsv2/api_op_DeleteBotVersion.go +++ b/service/lexmodelsv2/api_op_DeleteBotVersion.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteBotVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBotVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteCustomVocabulary.go b/service/lexmodelsv2/api_op_DeleteCustomVocabulary.go index 83ca1969e91..34ac159a3c6 100644 --- a/service/lexmodelsv2/api_op_DeleteCustomVocabulary.go +++ b/service/lexmodelsv2/api_op_DeleteCustomVocabulary.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteCustomVocabularyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteExport.go b/service/lexmodelsv2/api_op_DeleteExport.go index 2cebebb6641..aed4bc74e14 100644 --- a/service/lexmodelsv2/api_op_DeleteExport.go +++ b/service/lexmodelsv2/api_op_DeleteExport.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteExportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteImport.go b/service/lexmodelsv2/api_op_DeleteImport.go index 6dd7010cf53..13cc4a8646f 100644 --- a/service/lexmodelsv2/api_op_DeleteImport.go +++ b/service/lexmodelsv2/api_op_DeleteImport.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteImportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteIntent.go b/service/lexmodelsv2/api_op_DeleteIntent.go index 0e76d65c512..0a600c2e836 100644 --- a/service/lexmodelsv2/api_op_DeleteIntent.go +++ b/service/lexmodelsv2/api_op_DeleteIntent.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteIntentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteResourcePolicy.go b/service/lexmodelsv2/api_op_DeleteResourcePolicy.go index 0c47da7f7f5..ecc106b257d 100644 --- a/service/lexmodelsv2/api_op_DeleteResourcePolicy.go +++ b/service/lexmodelsv2/api_op_DeleteResourcePolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go b/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go index 3b53465a12c..1157be53037 100644 --- a/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go +++ b/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteResourcePolicyStatementMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteSlot.go b/service/lexmodelsv2/api_op_DeleteSlot.go index 03d451902f3..d2ee924f101 100644 --- a/service/lexmodelsv2/api_op_DeleteSlot.go +++ b/service/lexmodelsv2/api_op_DeleteSlot.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteSlotMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteSlotType.go b/service/lexmodelsv2/api_op_DeleteSlotType.go index 8d2e7398b6f..9028fc97f13 100644 --- a/service/lexmodelsv2/api_op_DeleteSlotType.go +++ b/service/lexmodelsv2/api_op_DeleteSlotType.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteSlotTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteTestSet.go b/service/lexmodelsv2/api_op_DeleteTestSet.go index c1b1d46eb0f..fa15d5b5117 100644 --- a/service/lexmodelsv2/api_op_DeleteTestSet.go +++ b/service/lexmodelsv2/api_op_DeleteTestSet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTestSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTestSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DeleteUtterances.go b/service/lexmodelsv2/api_op_DeleteUtterances.go index 20f6448bb91..67bf1038168 100644 --- a/service/lexmodelsv2/api_op_DeleteUtterances.go +++ b/service/lexmodelsv2/api_op_DeleteUtterances.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteUtterancesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUtterancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeBot.go b/service/lexmodelsv2/api_op_DescribeBot.go index 1fbeda81ef2..4668a410ecd 100644 --- a/service/lexmodelsv2/api_op_DescribeBot.go +++ b/service/lexmodelsv2/api_op_DescribeBot.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeBotMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotValidationMiddleware(stack); err != nil { return err } @@ -171,13 +174,6 @@ func (c *Client) addOperationDescribeBotMiddlewares(stack *middleware.Stack, opt return nil } -// DescribeBotAPIClient is a client that implements the DescribeBot operation. -type DescribeBotAPIClient interface { - DescribeBot(context.Context, *DescribeBotInput, ...func(*Options)) (*DescribeBotOutput, error) -} - -var _ DescribeBotAPIClient = (*Client)(nil) - // BotAvailableWaiterOptions are waiter options for BotAvailableWaiter type BotAvailableWaiterOptions struct { @@ -292,7 +288,13 @@ func (w *BotAvailableWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeBot(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -401,6 +403,13 @@ func botAvailableStateRetryable(ctx context.Context, input *DescribeBotInput, ou return true, nil } +// DescribeBotAPIClient is a client that implements the DescribeBot operation. +type DescribeBotAPIClient interface { + DescribeBot(context.Context, *DescribeBotInput, ...func(*Options)) (*DescribeBotOutput, error) +} + +var _ DescribeBotAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBot(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_DescribeBotAlias.go b/service/lexmodelsv2/api_op_DescribeBotAlias.go index 98166a6ccca..f7f9d96fa2b 100644 --- a/service/lexmodelsv2/api_op_DescribeBotAlias.go +++ b/service/lexmodelsv2/api_op_DescribeBotAlias.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribeBotAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotAliasValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationDescribeBotAliasMiddlewares(stack *middleware.Stack return nil } -// DescribeBotAliasAPIClient is a client that implements the DescribeBotAlias -// operation. -type DescribeBotAliasAPIClient interface { - DescribeBotAlias(context.Context, *DescribeBotAliasInput, ...func(*Options)) (*DescribeBotAliasOutput, error) -} - -var _ DescribeBotAliasAPIClient = (*Client)(nil) - // BotAliasAvailableWaiterOptions are waiter options for BotAliasAvailableWaiter type BotAliasAvailableWaiterOptions struct { @@ -302,7 +297,13 @@ func (w *BotAliasAvailableWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeBotAlias(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -394,6 +395,14 @@ func botAliasAvailableStateRetryable(ctx context.Context, input *DescribeBotAlia return true, nil } +// DescribeBotAliasAPIClient is a client that implements the DescribeBotAlias +// operation. +type DescribeBotAliasAPIClient interface { + DescribeBotAlias(context.Context, *DescribeBotAliasInput, ...func(*Options)) (*DescribeBotAliasOutput, error) +} + +var _ DescribeBotAliasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBotAlias(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_DescribeBotLocale.go b/service/lexmodelsv2/api_op_DescribeBotLocale.go index d63d67a134f..9ba90b935ec 100644 --- a/service/lexmodelsv2/api_op_DescribeBotLocale.go +++ b/service/lexmodelsv2/api_op_DescribeBotLocale.go @@ -177,6 +177,9 @@ func (c *Client) addOperationDescribeBotLocaleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotLocaleValidationMiddleware(stack); err != nil { return err } @@ -201,14 +204,6 @@ func (c *Client) addOperationDescribeBotLocaleMiddlewares(stack *middleware.Stac return nil } -// DescribeBotLocaleAPIClient is a client that implements the DescribeBotLocale -// operation. -type DescribeBotLocaleAPIClient interface { - DescribeBotLocale(context.Context, *DescribeBotLocaleInput, ...func(*Options)) (*DescribeBotLocaleOutput, error) -} - -var _ DescribeBotLocaleAPIClient = (*Client)(nil) - // BotLocaleBuiltWaiterOptions are waiter options for BotLocaleBuiltWaiter type BotLocaleBuiltWaiterOptions struct { @@ -324,7 +319,13 @@ func (w *BotLocaleBuiltWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeBotLocale(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -548,7 +549,13 @@ func (w *BotLocaleCreatedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeBotLocale(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -794,7 +801,13 @@ func (w *BotLocaleExpressTestingAvailableWaiter) WaitForOutput(ctx context.Conte } out, err := w.client.DescribeBotLocale(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -920,6 +933,14 @@ func botLocaleExpressTestingAvailableStateRetryable(ctx context.Context, input * return true, nil } +// DescribeBotLocaleAPIClient is a client that implements the DescribeBotLocale +// operation. +type DescribeBotLocaleAPIClient interface { + DescribeBotLocale(context.Context, *DescribeBotLocaleInput, ...func(*Options)) (*DescribeBotLocaleOutput, error) +} + +var _ DescribeBotLocaleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBotLocale(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_DescribeBotRecommendation.go b/service/lexmodelsv2/api_op_DescribeBotRecommendation.go index a3730b494c1..6ee1ec812bc 100644 --- a/service/lexmodelsv2/api_op_DescribeBotRecommendation.go +++ b/service/lexmodelsv2/api_op_DescribeBotRecommendation.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeBotRecommendationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeBotReplica.go b/service/lexmodelsv2/api_op_DescribeBotReplica.go index 77416269ba7..a42a17ed9bc 100644 --- a/service/lexmodelsv2/api_op_DescribeBotReplica.go +++ b/service/lexmodelsv2/api_op_DescribeBotReplica.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeBotReplicaMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeBotResourceGeneration.go b/service/lexmodelsv2/api_op_DescribeBotResourceGeneration.go index d3508570759..7c2dd460a44 100644 --- a/service/lexmodelsv2/api_op_DescribeBotResourceGeneration.go +++ b/service/lexmodelsv2/api_op_DescribeBotResourceGeneration.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeBotResourceGenerationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotResourceGenerationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeBotVersion.go b/service/lexmodelsv2/api_op_DescribeBotVersion.go index 020a7d01fc8..c8d6341d69f 100644 --- a/service/lexmodelsv2/api_op_DescribeBotVersion.go +++ b/service/lexmodelsv2/api_op_DescribeBotVersion.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeBotVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBotVersionValidationMiddleware(stack); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationDescribeBotVersionMiddlewares(stack *middleware.Sta return nil } -// DescribeBotVersionAPIClient is a client that implements the DescribeBotVersion -// operation. -type DescribeBotVersionAPIClient interface { - DescribeBotVersion(context.Context, *DescribeBotVersionInput, ...func(*Options)) (*DescribeBotVersionOutput, error) -} - -var _ DescribeBotVersionAPIClient = (*Client)(nil) - // BotVersionAvailableWaiterOptions are waiter options for // BotVersionAvailableWaiter type BotVersionAvailableWaiterOptions struct { @@ -305,7 +300,13 @@ func (w *BotVersionAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeBotVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -404,6 +405,14 @@ func botVersionAvailableStateRetryable(ctx context.Context, input *DescribeBotVe return true, nil } +// DescribeBotVersionAPIClient is a client that implements the DescribeBotVersion +// operation. +type DescribeBotVersionAPIClient interface { + DescribeBotVersion(context.Context, *DescribeBotVersionInput, ...func(*Options)) (*DescribeBotVersionOutput, error) +} + +var _ DescribeBotVersionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBotVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_DescribeCustomVocabularyMetadata.go b/service/lexmodelsv2/api_op_DescribeCustomVocabularyMetadata.go index 35c6d939141..cd0da8af924 100644 --- a/service/lexmodelsv2/api_op_DescribeCustomVocabularyMetadata.go +++ b/service/lexmodelsv2/api_op_DescribeCustomVocabularyMetadata.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeCustomVocabularyMetadataMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCustomVocabularyMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeExport.go b/service/lexmodelsv2/api_op_DescribeExport.go index cd3fc312c16..2b89c8a306b 100644 --- a/service/lexmodelsv2/api_op_DescribeExport.go +++ b/service/lexmodelsv2/api_op_DescribeExport.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeExportMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExportValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeExportMiddlewares(stack *middleware.Stack, return nil } -// DescribeExportAPIClient is a client that implements the DescribeExport -// operation. -type DescribeExportAPIClient interface { - DescribeExport(context.Context, *DescribeExportInput, ...func(*Options)) (*DescribeExportOutput, error) -} - -var _ DescribeExportAPIClient = (*Client)(nil) - // BotExportCompletedWaiterOptions are waiter options for BotExportCompletedWaiter type BotExportCompletedWaiterOptions struct { @@ -281,7 +276,13 @@ func (w *BotExportCompletedWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeExport(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -373,6 +374,14 @@ func botExportCompletedStateRetryable(ctx context.Context, input *DescribeExport return true, nil } +// DescribeExportAPIClient is a client that implements the DescribeExport +// operation. +type DescribeExportAPIClient interface { + DescribeExport(context.Context, *DescribeExportInput, ...func(*Options)) (*DescribeExportOutput, error) +} + +var _ DescribeExportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_DescribeImport.go b/service/lexmodelsv2/api_op_DescribeImport.go index a5bb8563d81..1441c411087 100644 --- a/service/lexmodelsv2/api_op_DescribeImport.go +++ b/service/lexmodelsv2/api_op_DescribeImport.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeImportMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImportValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeImportMiddlewares(stack *middleware.Stack, return nil } -// DescribeImportAPIClient is a client that implements the DescribeImport -// operation. -type DescribeImportAPIClient interface { - DescribeImport(context.Context, *DescribeImportInput, ...func(*Options)) (*DescribeImportOutput, error) -} - -var _ DescribeImportAPIClient = (*Client)(nil) - // BotImportCompletedWaiterOptions are waiter options for BotImportCompletedWaiter type BotImportCompletedWaiterOptions struct { @@ -286,7 +281,13 @@ func (w *BotImportCompletedWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeImport(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -378,6 +379,14 @@ func botImportCompletedStateRetryable(ctx context.Context, input *DescribeImport return true, nil } +// DescribeImportAPIClient is a client that implements the DescribeImport +// operation. +type DescribeImportAPIClient interface { + DescribeImport(context.Context, *DescribeImportInput, ...func(*Options)) (*DescribeImportOutput, error) +} + +var _ DescribeImportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_DescribeIntent.go b/service/lexmodelsv2/api_op_DescribeIntent.go index 45ec9233a33..367feeaa95b 100644 --- a/service/lexmodelsv2/api_op_DescribeIntent.go +++ b/service/lexmodelsv2/api_op_DescribeIntent.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeIntentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeResourcePolicy.go b/service/lexmodelsv2/api_op_DescribeResourcePolicy.go index 8b7780709f2..67074756542 100644 --- a/service/lexmodelsv2/api_op_DescribeResourcePolicy.go +++ b/service/lexmodelsv2/api_op_DescribeResourcePolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeSlot.go b/service/lexmodelsv2/api_op_DescribeSlot.go index 6e4aa8aa953..01b50c4e826 100644 --- a/service/lexmodelsv2/api_op_DescribeSlot.go +++ b/service/lexmodelsv2/api_op_DescribeSlot.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDescribeSlotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSlotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeSlotType.go b/service/lexmodelsv2/api_op_DescribeSlotType.go index 49fad0f062f..62003a1ba2a 100644 --- a/service/lexmodelsv2/api_op_DescribeSlotType.go +++ b/service/lexmodelsv2/api_op_DescribeSlotType.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeSlotTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeTestExecution.go b/service/lexmodelsv2/api_op_DescribeTestExecution.go index d776c190874..f81b120d171 100644 --- a/service/lexmodelsv2/api_op_DescribeTestExecution.go +++ b/service/lexmodelsv2/api_op_DescribeTestExecution.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeTestExecutionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTestExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeTestSet.go b/service/lexmodelsv2/api_op_DescribeTestSet.go index d3a3b51edc7..ceb4f0dfb8f 100644 --- a/service/lexmodelsv2/api_op_DescribeTestSet.go +++ b/service/lexmodelsv2/api_op_DescribeTestSet.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeTestSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTestSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeTestSetDiscrepancyReport.go b/service/lexmodelsv2/api_op_DescribeTestSetDiscrepancyReport.go index 187508723e6..fabbdec37c3 100644 --- a/service/lexmodelsv2/api_op_DescribeTestSetDiscrepancyReport.go +++ b/service/lexmodelsv2/api_op_DescribeTestSetDiscrepancyReport.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeTestSetDiscrepancyReportMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTestSetDiscrepancyReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_DescribeTestSetGeneration.go b/service/lexmodelsv2/api_op_DescribeTestSetGeneration.go index 10ecf72cc44..92935e16867 100644 --- a/service/lexmodelsv2/api_op_DescribeTestSetGeneration.go +++ b/service/lexmodelsv2/api_op_DescribeTestSetGeneration.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeTestSetGenerationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTestSetGenerationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_GenerateBotElement.go b/service/lexmodelsv2/api_op_GenerateBotElement.go index 36d1715cf7e..53b11b98815 100644 --- a/service/lexmodelsv2/api_op_GenerateBotElement.go +++ b/service/lexmodelsv2/api_op_GenerateBotElement.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGenerateBotElementMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateBotElementValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_GetTestExecutionArtifactsUrl.go b/service/lexmodelsv2/api_op_GetTestExecutionArtifactsUrl.go index 71ca1022011..e154a275b33 100644 --- a/service/lexmodelsv2/api_op_GetTestExecutionArtifactsUrl.go +++ b/service/lexmodelsv2/api_op_GetTestExecutionArtifactsUrl.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetTestExecutionArtifactsUrlMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTestExecutionArtifactsUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_ListAggregatedUtterances.go b/service/lexmodelsv2/api_op_ListAggregatedUtterances.go index 6567f919082..dea6a685347 100644 --- a/service/lexmodelsv2/api_op_ListAggregatedUtterances.go +++ b/service/lexmodelsv2/api_op_ListAggregatedUtterances.go @@ -214,6 +214,9 @@ func (c *Client) addOperationListAggregatedUtterancesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAggregatedUtterancesValidationMiddleware(stack); err != nil { return err } @@ -238,14 +241,6 @@ func (c *Client) addOperationListAggregatedUtterancesMiddlewares(stack *middlewa return nil } -// ListAggregatedUtterancesAPIClient is a client that implements the -// ListAggregatedUtterances operation. -type ListAggregatedUtterancesAPIClient interface { - ListAggregatedUtterances(context.Context, *ListAggregatedUtterancesInput, ...func(*Options)) (*ListAggregatedUtterancesOutput, error) -} - -var _ ListAggregatedUtterancesAPIClient = (*Client)(nil) - // ListAggregatedUtterancesPaginatorOptions is the paginator options for // ListAggregatedUtterances type ListAggregatedUtterancesPaginatorOptions struct { @@ -314,6 +309,9 @@ func (p *ListAggregatedUtterancesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAggregatedUtterances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -333,6 +331,14 @@ func (p *ListAggregatedUtterancesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAggregatedUtterancesAPIClient is a client that implements the +// ListAggregatedUtterances operation. +type ListAggregatedUtterancesAPIClient interface { + ListAggregatedUtterances(context.Context, *ListAggregatedUtterancesInput, ...func(*Options)) (*ListAggregatedUtterancesOutput, error) +} + +var _ ListAggregatedUtterancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAggregatedUtterances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotAliasReplicas.go b/service/lexmodelsv2/api_op_ListBotAliasReplicas.go index f5ac28fd2c9..2c5c08162b0 100644 --- a/service/lexmodelsv2/api_op_ListBotAliasReplicas.go +++ b/service/lexmodelsv2/api_op_ListBotAliasReplicas.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListBotAliasReplicasMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotAliasReplicasValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListBotAliasReplicasMiddlewares(stack *middleware.S return nil } -// ListBotAliasReplicasAPIClient is a client that implements the -// ListBotAliasReplicas operation. -type ListBotAliasReplicasAPIClient interface { - ListBotAliasReplicas(context.Context, *ListBotAliasReplicasInput, ...func(*Options)) (*ListBotAliasReplicasOutput, error) -} - -var _ ListBotAliasReplicasAPIClient = (*Client)(nil) - // ListBotAliasReplicasPaginatorOptions is the paginator options for // ListBotAliasReplicas type ListBotAliasReplicasPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListBotAliasReplicasPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotAliasReplicas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListBotAliasReplicasPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListBotAliasReplicasAPIClient is a client that implements the +// ListBotAliasReplicas operation. +type ListBotAliasReplicasAPIClient interface { + ListBotAliasReplicas(context.Context, *ListBotAliasReplicasInput, ...func(*Options)) (*ListBotAliasReplicasOutput, error) +} + +var _ ListBotAliasReplicasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotAliasReplicas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotAliases.go b/service/lexmodelsv2/api_op_ListBotAliases.go index 8f3f4dcc6f2..fe6e05847f1 100644 --- a/service/lexmodelsv2/api_op_ListBotAliases.go +++ b/service/lexmodelsv2/api_op_ListBotAliases.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListBotAliasesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotAliasesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListBotAliasesMiddlewares(stack *middleware.Stack, return nil } -// ListBotAliasesAPIClient is a client that implements the ListBotAliases -// operation. -type ListBotAliasesAPIClient interface { - ListBotAliases(context.Context, *ListBotAliasesInput, ...func(*Options)) (*ListBotAliasesOutput, error) -} - -var _ ListBotAliasesAPIClient = (*Client)(nil) - // ListBotAliasesPaginatorOptions is the paginator options for ListBotAliases type ListBotAliasesPaginatorOptions struct { // The maximum number of aliases to return in each page of results. If there are @@ -225,6 +220,9 @@ func (p *ListBotAliasesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListBotAliasesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListBotAliasesAPIClient is a client that implements the ListBotAliases +// operation. +type ListBotAliasesAPIClient interface { + ListBotAliases(context.Context, *ListBotAliasesInput, ...func(*Options)) (*ListBotAliasesOutput, error) +} + +var _ ListBotAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotLocales.go b/service/lexmodelsv2/api_op_ListBotLocales.go index f8f43f81792..7a5d63774f8 100644 --- a/service/lexmodelsv2/api_op_ListBotLocales.go +++ b/service/lexmodelsv2/api_op_ListBotLocales.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListBotLocalesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotLocalesValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListBotLocalesMiddlewares(stack *middleware.Stack, return nil } -// ListBotLocalesAPIClient is a client that implements the ListBotLocales -// operation. -type ListBotLocalesAPIClient interface { - ListBotLocales(context.Context, *ListBotLocalesInput, ...func(*Options)) (*ListBotLocalesOutput, error) -} - -var _ ListBotLocalesAPIClient = (*Client)(nil) - // ListBotLocalesPaginatorOptions is the paginator options for ListBotLocales type ListBotLocalesPaginatorOptions struct { // The maximum number of aliases to return in each page of results. If there are @@ -242,6 +237,9 @@ func (p *ListBotLocalesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotLocales(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListBotLocalesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListBotLocalesAPIClient is a client that implements the ListBotLocales +// operation. +type ListBotLocalesAPIClient interface { + ListBotLocales(context.Context, *ListBotLocalesInput, ...func(*Options)) (*ListBotLocalesOutput, error) +} + +var _ ListBotLocalesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotLocales(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotRecommendations.go b/service/lexmodelsv2/api_op_ListBotRecommendations.go index 41198e98807..1cfcc7124a0 100644 --- a/service/lexmodelsv2/api_op_ListBotRecommendations.go +++ b/service/lexmodelsv2/api_op_ListBotRecommendations.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListBotRecommendationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListBotRecommendationsMiddlewares(stack *middleware return nil } -// ListBotRecommendationsAPIClient is a client that implements the -// ListBotRecommendations operation. -type ListBotRecommendationsAPIClient interface { - ListBotRecommendations(context.Context, *ListBotRecommendationsInput, ...func(*Options)) (*ListBotRecommendationsOutput, error) -} - -var _ ListBotRecommendationsAPIClient = (*Client)(nil) - // ListBotRecommendationsPaginatorOptions is the paginator options for // ListBotRecommendations type ListBotRecommendationsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListBotRecommendationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListBotRecommendationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBotRecommendationsAPIClient is a client that implements the +// ListBotRecommendations operation. +type ListBotRecommendationsAPIClient interface { + ListBotRecommendations(context.Context, *ListBotRecommendationsInput, ...func(*Options)) (*ListBotRecommendationsOutput, error) +} + +var _ ListBotRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotReplicas.go b/service/lexmodelsv2/api_op_ListBotReplicas.go index fc408ea45c5..46f7eaa4383 100644 --- a/service/lexmodelsv2/api_op_ListBotReplicas.go +++ b/service/lexmodelsv2/api_op_ListBotReplicas.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListBotReplicasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotReplicasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_ListBotResourceGenerations.go b/service/lexmodelsv2/api_op_ListBotResourceGenerations.go index 478d8232963..00b05ad7f63 100644 --- a/service/lexmodelsv2/api_op_ListBotResourceGenerations.go +++ b/service/lexmodelsv2/api_op_ListBotResourceGenerations.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListBotResourceGenerationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotResourceGenerationsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListBotResourceGenerationsMiddlewares(stack *middle return nil } -// ListBotResourceGenerationsAPIClient is a client that implements the -// ListBotResourceGenerations operation. -type ListBotResourceGenerationsAPIClient interface { - ListBotResourceGenerations(context.Context, *ListBotResourceGenerationsInput, ...func(*Options)) (*ListBotResourceGenerationsOutput, error) -} - -var _ ListBotResourceGenerationsAPIClient = (*Client)(nil) - // ListBotResourceGenerationsPaginatorOptions is the paginator options for // ListBotResourceGenerations type ListBotResourceGenerationsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListBotResourceGenerationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotResourceGenerations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListBotResourceGenerationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListBotResourceGenerationsAPIClient is a client that implements the +// ListBotResourceGenerations operation. +type ListBotResourceGenerationsAPIClient interface { + ListBotResourceGenerations(context.Context, *ListBotResourceGenerationsInput, ...func(*Options)) (*ListBotResourceGenerationsOutput, error) +} + +var _ ListBotResourceGenerationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotResourceGenerations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotVersionReplicas.go b/service/lexmodelsv2/api_op_ListBotVersionReplicas.go index 62458b2d205..cb9b9f17aff 100644 --- a/service/lexmodelsv2/api_op_ListBotVersionReplicas.go +++ b/service/lexmodelsv2/api_op_ListBotVersionReplicas.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListBotVersionReplicasMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotVersionReplicasValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListBotVersionReplicasMiddlewares(stack *middleware return nil } -// ListBotVersionReplicasAPIClient is a client that implements the -// ListBotVersionReplicas operation. -type ListBotVersionReplicasAPIClient interface { - ListBotVersionReplicas(context.Context, *ListBotVersionReplicasInput, ...func(*Options)) (*ListBotVersionReplicasOutput, error) -} - -var _ ListBotVersionReplicasAPIClient = (*Client)(nil) - // ListBotVersionReplicasPaginatorOptions is the paginator options for // ListBotVersionReplicas type ListBotVersionReplicasPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListBotVersionReplicasPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotVersionReplicas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListBotVersionReplicasPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBotVersionReplicasAPIClient is a client that implements the +// ListBotVersionReplicas operation. +type ListBotVersionReplicasAPIClient interface { + ListBotVersionReplicas(context.Context, *ListBotVersionReplicasInput, ...func(*Options)) (*ListBotVersionReplicasOutput, error) +} + +var _ ListBotVersionReplicasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotVersionReplicas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBotVersions.go b/service/lexmodelsv2/api_op_ListBotVersions.go index d2e1fc143ae..a387f8d2519 100644 --- a/service/lexmodelsv2/api_op_ListBotVersions.go +++ b/service/lexmodelsv2/api_op_ListBotVersions.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListBotVersionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotVersionsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListBotVersionsMiddlewares(stack *middleware.Stack, return nil } -// ListBotVersionsAPIClient is a client that implements the ListBotVersions -// operation. -type ListBotVersionsAPIClient interface { - ListBotVersions(context.Context, *ListBotVersionsInput, ...func(*Options)) (*ListBotVersionsOutput, error) -} - -var _ ListBotVersionsAPIClient = (*Client)(nil) - // ListBotVersionsPaginatorOptions is the paginator options for ListBotVersions type ListBotVersionsPaginatorOptions struct { // The maximum number of versions to return in each page of results. If there are @@ -237,6 +232,9 @@ func (p *ListBotVersionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBotVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListBotVersionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListBotVersionsAPIClient is a client that implements the ListBotVersions +// operation. +type ListBotVersionsAPIClient interface { + ListBotVersions(context.Context, *ListBotVersionsInput, ...func(*Options)) (*ListBotVersionsOutput, error) +} + +var _ ListBotVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBotVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBots.go b/service/lexmodelsv2/api_op_ListBots.go index c36f7a2e61e..77a05ccff2d 100644 --- a/service/lexmodelsv2/api_op_ListBots.go +++ b/service/lexmodelsv2/api_op_ListBots.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListBotsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBotsValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListBotsMiddlewares(stack *middleware.Stack, option return nil } -// ListBotsAPIClient is a client that implements the ListBots operation. -type ListBotsAPIClient interface { - ListBots(context.Context, *ListBotsInput, ...func(*Options)) (*ListBotsOutput, error) -} - -var _ ListBotsAPIClient = (*Client)(nil) - // ListBotsPaginatorOptions is the paginator options for ListBots type ListBotsPaginatorOptions struct { // The maximum number of bots to return in each page of results. If there are @@ -228,6 +224,9 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +246,13 @@ func (p *ListBotsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListBotsAPIClient is a client that implements the ListBots operation. +type ListBotsAPIClient interface { + ListBots(context.Context, *ListBotsInput, ...func(*Options)) (*ListBotsOutput, error) +} + +var _ ListBotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBuiltInIntents.go b/service/lexmodelsv2/api_op_ListBuiltInIntents.go index 564c9acd8bd..94d90e9a8b1 100644 --- a/service/lexmodelsv2/api_op_ListBuiltInIntents.go +++ b/service/lexmodelsv2/api_op_ListBuiltInIntents.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListBuiltInIntentsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBuiltInIntentsValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListBuiltInIntentsMiddlewares(stack *middleware.Sta return nil } -// ListBuiltInIntentsAPIClient is a client that implements the ListBuiltInIntents -// operation. -type ListBuiltInIntentsAPIClient interface { - ListBuiltInIntents(context.Context, *ListBuiltInIntentsInput, ...func(*Options)) (*ListBuiltInIntentsOutput, error) -} - -var _ ListBuiltInIntentsAPIClient = (*Client)(nil) - // ListBuiltInIntentsPaginatorOptions is the paginator options for // ListBuiltInIntents type ListBuiltInIntentsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListBuiltInIntentsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuiltInIntents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListBuiltInIntentsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListBuiltInIntentsAPIClient is a client that implements the ListBuiltInIntents +// operation. +type ListBuiltInIntentsAPIClient interface { + ListBuiltInIntents(context.Context, *ListBuiltInIntentsInput, ...func(*Options)) (*ListBuiltInIntentsOutput, error) +} + +var _ ListBuiltInIntentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuiltInIntents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go b/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go index 54d48e48c49..c014fdb43dc 100644 --- a/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go +++ b/service/lexmodelsv2/api_op_ListBuiltInSlotTypes.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListBuiltInSlotTypesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBuiltInSlotTypesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListBuiltInSlotTypesMiddlewares(stack *middleware.S return nil } -// ListBuiltInSlotTypesAPIClient is a client that implements the -// ListBuiltInSlotTypes operation. -type ListBuiltInSlotTypesAPIClient interface { - ListBuiltInSlotTypes(context.Context, *ListBuiltInSlotTypesInput, ...func(*Options)) (*ListBuiltInSlotTypesOutput, error) -} - -var _ ListBuiltInSlotTypesAPIClient = (*Client)(nil) - // ListBuiltInSlotTypesPaginatorOptions is the paginator options for // ListBuiltInSlotTypes type ListBuiltInSlotTypesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListBuiltInSlotTypesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBuiltInSlotTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListBuiltInSlotTypesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListBuiltInSlotTypesAPIClient is a client that implements the +// ListBuiltInSlotTypes operation. +type ListBuiltInSlotTypesAPIClient interface { + ListBuiltInSlotTypes(context.Context, *ListBuiltInSlotTypesInput, ...func(*Options)) (*ListBuiltInSlotTypesOutput, error) +} + +var _ ListBuiltInSlotTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBuiltInSlotTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListCustomVocabularyItems.go b/service/lexmodelsv2/api_op_ListCustomVocabularyItems.go index 3607ff98ea5..07ecca345ce 100644 --- a/service/lexmodelsv2/api_op_ListCustomVocabularyItems.go +++ b/service/lexmodelsv2/api_op_ListCustomVocabularyItems.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListCustomVocabularyItemsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomVocabularyItemsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListCustomVocabularyItemsMiddlewares(stack *middlew return nil } -// ListCustomVocabularyItemsAPIClient is a client that implements the -// ListCustomVocabularyItems operation. -type ListCustomVocabularyItemsAPIClient interface { - ListCustomVocabularyItems(context.Context, *ListCustomVocabularyItemsInput, ...func(*Options)) (*ListCustomVocabularyItemsOutput, error) -} - -var _ ListCustomVocabularyItemsAPIClient = (*Client)(nil) - // ListCustomVocabularyItemsPaginatorOptions is the paginator options for // ListCustomVocabularyItems type ListCustomVocabularyItemsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListCustomVocabularyItemsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomVocabularyItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListCustomVocabularyItemsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListCustomVocabularyItemsAPIClient is a client that implements the +// ListCustomVocabularyItems operation. +type ListCustomVocabularyItemsAPIClient interface { + ListCustomVocabularyItems(context.Context, *ListCustomVocabularyItemsInput, ...func(*Options)) (*ListCustomVocabularyItemsOutput, error) +} + +var _ ListCustomVocabularyItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomVocabularyItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListExports.go b/service/lexmodelsv2/api_op_ListExports.go index 5fc4f475caa..ccbb8ec780b 100644 --- a/service/lexmodelsv2/api_op_ListExports.go +++ b/service/lexmodelsv2/api_op_ListExports.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExportsValidationMiddleware(stack); err != nil { return err } @@ -177,13 +180,6 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListExportsAPIClient is a client that implements the ListExports operation. -type ListExportsAPIClient interface { - ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) -} - -var _ ListExportsAPIClient = (*Client)(nil) - // ListExportsPaginatorOptions is the paginator options for ListExports type ListExportsPaginatorOptions struct { // The maximum number of exports to return in each page of results. If there are @@ -249,6 +245,9 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +267,13 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListExportsAPIClient is a client that implements the ListExports operation. +type ListExportsAPIClient interface { + ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) +} + +var _ ListExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListImports.go b/service/lexmodelsv2/api_op_ListImports.go index 628159296d9..40d58f0eba0 100644 --- a/service/lexmodelsv2/api_op_ListImports.go +++ b/service/lexmodelsv2/api_op_ListImports.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImportsValidationMiddleware(stack); err != nil { return err } @@ -177,13 +180,6 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListImportsAPIClient is a client that implements the ListImports operation. -type ListImportsAPIClient interface { - ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) -} - -var _ ListImportsAPIClient = (*Client)(nil) - // ListImportsPaginatorOptions is the paginator options for ListImports type ListImportsPaginatorOptions struct { // The maximum number of imports to return in each page of results. If there are @@ -249,6 +245,9 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +267,13 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListIntentMetrics.go b/service/lexmodelsv2/api_op_ListIntentMetrics.go index b02a4bb8841..8659da02290 100644 --- a/service/lexmodelsv2/api_op_ListIntentMetrics.go +++ b/service/lexmodelsv2/api_op_ListIntentMetrics.go @@ -195,6 +195,9 @@ func (c *Client) addOperationListIntentMetricsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIntentMetricsValidationMiddleware(stack); err != nil { return err } @@ -219,14 +222,6 @@ func (c *Client) addOperationListIntentMetricsMiddlewares(stack *middleware.Stac return nil } -// ListIntentMetricsAPIClient is a client that implements the ListIntentMetrics -// operation. -type ListIntentMetricsAPIClient interface { - ListIntentMetrics(context.Context, *ListIntentMetricsInput, ...func(*Options)) (*ListIntentMetricsOutput, error) -} - -var _ ListIntentMetricsAPIClient = (*Client)(nil) - // ListIntentMetricsPaginatorOptions is the paginator options for ListIntentMetrics type ListIntentMetricsPaginatorOptions struct { // The maximum number of results to return in each page of results. If there are @@ -292,6 +287,9 @@ func (p *ListIntentMetricsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIntentMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -311,6 +309,14 @@ func (p *ListIntentMetricsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListIntentMetricsAPIClient is a client that implements the ListIntentMetrics +// operation. +type ListIntentMetricsAPIClient interface { + ListIntentMetrics(context.Context, *ListIntentMetricsInput, ...func(*Options)) (*ListIntentMetricsOutput, error) +} + +var _ ListIntentMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIntentMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListIntentPaths.go b/service/lexmodelsv2/api_op_ListIntentPaths.go index a0b254b4844..51d8b81cb69 100644 --- a/service/lexmodelsv2/api_op_ListIntentPaths.go +++ b/service/lexmodelsv2/api_op_ListIntentPaths.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListIntentPathsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIntentPathsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_ListIntentStageMetrics.go b/service/lexmodelsv2/api_op_ListIntentStageMetrics.go index fd3584d8a3e..99a8793902f 100644 --- a/service/lexmodelsv2/api_op_ListIntentStageMetrics.go +++ b/service/lexmodelsv2/api_op_ListIntentStageMetrics.go @@ -193,6 +193,9 @@ func (c *Client) addOperationListIntentStageMetricsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIntentStageMetricsValidationMiddleware(stack); err != nil { return err } @@ -217,14 +220,6 @@ func (c *Client) addOperationListIntentStageMetricsMiddlewares(stack *middleware return nil } -// ListIntentStageMetricsAPIClient is a client that implements the -// ListIntentStageMetrics operation. -type ListIntentStageMetricsAPIClient interface { - ListIntentStageMetrics(context.Context, *ListIntentStageMetricsInput, ...func(*Options)) (*ListIntentStageMetricsOutput, error) -} - -var _ ListIntentStageMetricsAPIClient = (*Client)(nil) - // ListIntentStageMetricsPaginatorOptions is the paginator options for // ListIntentStageMetrics type ListIntentStageMetricsPaginatorOptions struct { @@ -291,6 +286,9 @@ func (p *ListIntentStageMetricsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIntentStageMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -310,6 +308,14 @@ func (p *ListIntentStageMetricsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListIntentStageMetricsAPIClient is a client that implements the +// ListIntentStageMetrics operation. +type ListIntentStageMetricsAPIClient interface { + ListIntentStageMetrics(context.Context, *ListIntentStageMetricsInput, ...func(*Options)) (*ListIntentStageMetricsOutput, error) +} + +var _ ListIntentStageMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIntentStageMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListIntents.go b/service/lexmodelsv2/api_op_ListIntents.go index f86bfdd518a..b108e8461a6 100644 --- a/service/lexmodelsv2/api_op_ListIntents.go +++ b/service/lexmodelsv2/api_op_ListIntents.go @@ -160,6 +160,9 @@ func (c *Client) addOperationListIntentsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIntentsValidationMiddleware(stack); err != nil { return err } @@ -184,13 +187,6 @@ func (c *Client) addOperationListIntentsMiddlewares(stack *middleware.Stack, opt return nil } -// ListIntentsAPIClient is a client that implements the ListIntents operation. -type ListIntentsAPIClient interface { - ListIntents(context.Context, *ListIntentsInput, ...func(*Options)) (*ListIntentsOutput, error) -} - -var _ ListIntentsAPIClient = (*Client)(nil) - // ListIntentsPaginatorOptions is the paginator options for ListIntents type ListIntentsPaginatorOptions struct { // The maximum number of intents to return in each page of results. If there are @@ -256,6 +252,9 @@ func (p *ListIntentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIntents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +274,13 @@ func (p *ListIntentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListIntentsAPIClient is a client that implements the ListIntents operation. +type ListIntentsAPIClient interface { + ListIntents(context.Context, *ListIntentsInput, ...func(*Options)) (*ListIntentsOutput, error) +} + +var _ ListIntentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIntents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListRecommendedIntents.go b/service/lexmodelsv2/api_op_ListRecommendedIntents.go index ed9a56badfe..de0659862a9 100644 --- a/service/lexmodelsv2/api_op_ListRecommendedIntents.go +++ b/service/lexmodelsv2/api_op_ListRecommendedIntents.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListRecommendedIntentsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecommendedIntentsValidationMiddleware(stack); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationListRecommendedIntentsMiddlewares(stack *middleware return nil } -// ListRecommendedIntentsAPIClient is a client that implements the -// ListRecommendedIntents operation. -type ListRecommendedIntentsAPIClient interface { - ListRecommendedIntents(context.Context, *ListRecommendedIntentsInput, ...func(*Options)) (*ListRecommendedIntentsOutput, error) -} - -var _ ListRecommendedIntentsAPIClient = (*Client)(nil) - // ListRecommendedIntentsPaginatorOptions is the paginator options for // ListRecommendedIntents type ListRecommendedIntentsPaginatorOptions struct { @@ -254,6 +249,9 @@ func (p *ListRecommendedIntentsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendedIntents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +271,14 @@ func (p *ListRecommendedIntentsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListRecommendedIntentsAPIClient is a client that implements the +// ListRecommendedIntents operation. +type ListRecommendedIntentsAPIClient interface { + ListRecommendedIntents(context.Context, *ListRecommendedIntentsInput, ...func(*Options)) (*ListRecommendedIntentsOutput, error) +} + +var _ ListRecommendedIntentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendedIntents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListSessionAnalyticsData.go b/service/lexmodelsv2/api_op_ListSessionAnalyticsData.go index 83d74592ebe..cea081c5eb8 100644 --- a/service/lexmodelsv2/api_op_ListSessionAnalyticsData.go +++ b/service/lexmodelsv2/api_op_ListSessionAnalyticsData.go @@ -166,6 +166,9 @@ func (c *Client) addOperationListSessionAnalyticsDataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSessionAnalyticsDataValidationMiddleware(stack); err != nil { return err } @@ -190,14 +193,6 @@ func (c *Client) addOperationListSessionAnalyticsDataMiddlewares(stack *middlewa return nil } -// ListSessionAnalyticsDataAPIClient is a client that implements the -// ListSessionAnalyticsData operation. -type ListSessionAnalyticsDataAPIClient interface { - ListSessionAnalyticsData(context.Context, *ListSessionAnalyticsDataInput, ...func(*Options)) (*ListSessionAnalyticsDataOutput, error) -} - -var _ ListSessionAnalyticsDataAPIClient = (*Client)(nil) - // ListSessionAnalyticsDataPaginatorOptions is the paginator options for // ListSessionAnalyticsData type ListSessionAnalyticsDataPaginatorOptions struct { @@ -265,6 +260,9 @@ func (p *ListSessionAnalyticsDataPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessionAnalyticsData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +282,14 @@ func (p *ListSessionAnalyticsDataPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSessionAnalyticsDataAPIClient is a client that implements the +// ListSessionAnalyticsData operation. +type ListSessionAnalyticsDataAPIClient interface { + ListSessionAnalyticsData(context.Context, *ListSessionAnalyticsDataInput, ...func(*Options)) (*ListSessionAnalyticsDataOutput, error) +} + +var _ ListSessionAnalyticsDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessionAnalyticsData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListSessionMetrics.go b/service/lexmodelsv2/api_op_ListSessionMetrics.go index 7a1fe297dc3..bbfa2995528 100644 --- a/service/lexmodelsv2/api_op_ListSessionMetrics.go +++ b/service/lexmodelsv2/api_op_ListSessionMetrics.go @@ -195,6 +195,9 @@ func (c *Client) addOperationListSessionMetricsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSessionMetricsValidationMiddleware(stack); err != nil { return err } @@ -219,14 +222,6 @@ func (c *Client) addOperationListSessionMetricsMiddlewares(stack *middleware.Sta return nil } -// ListSessionMetricsAPIClient is a client that implements the ListSessionMetrics -// operation. -type ListSessionMetricsAPIClient interface { - ListSessionMetrics(context.Context, *ListSessionMetricsInput, ...func(*Options)) (*ListSessionMetricsOutput, error) -} - -var _ ListSessionMetricsAPIClient = (*Client)(nil) - // ListSessionMetricsPaginatorOptions is the paginator options for // ListSessionMetrics type ListSessionMetricsPaginatorOptions struct { @@ -293,6 +288,9 @@ func (p *ListSessionMetricsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSessionMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -312,6 +310,14 @@ func (p *ListSessionMetricsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSessionMetricsAPIClient is a client that implements the ListSessionMetrics +// operation. +type ListSessionMetricsAPIClient interface { + ListSessionMetrics(context.Context, *ListSessionMetricsInput, ...func(*Options)) (*ListSessionMetricsOutput, error) +} + +var _ ListSessionMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSessionMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListSlotTypes.go b/service/lexmodelsv2/api_op_ListSlotTypes.go index 96d74cfde47..fb6e88e4fb5 100644 --- a/service/lexmodelsv2/api_op_ListSlotTypes.go +++ b/service/lexmodelsv2/api_op_ListSlotTypes.go @@ -157,6 +157,9 @@ func (c *Client) addOperationListSlotTypesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSlotTypesValidationMiddleware(stack); err != nil { return err } @@ -181,13 +184,6 @@ func (c *Client) addOperationListSlotTypesMiddlewares(stack *middleware.Stack, o return nil } -// ListSlotTypesAPIClient is a client that implements the ListSlotTypes operation. -type ListSlotTypesAPIClient interface { - ListSlotTypes(context.Context, *ListSlotTypesInput, ...func(*Options)) (*ListSlotTypesOutput, error) -} - -var _ ListSlotTypesAPIClient = (*Client)(nil) - // ListSlotTypesPaginatorOptions is the paginator options for ListSlotTypes type ListSlotTypesPaginatorOptions struct { // The maximum number of slot types to return in each page of results. If there @@ -253,6 +249,9 @@ func (p *ListSlotTypesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSlotTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +271,13 @@ func (p *ListSlotTypesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListSlotTypesAPIClient is a client that implements the ListSlotTypes operation. +type ListSlotTypesAPIClient interface { + ListSlotTypes(context.Context, *ListSlotTypesInput, ...func(*Options)) (*ListSlotTypesOutput, error) +} + +var _ ListSlotTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSlotTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListSlots.go b/service/lexmodelsv2/api_op_ListSlots.go index 2ccbe03a2f6..1a8a129eec5 100644 --- a/service/lexmodelsv2/api_op_ListSlots.go +++ b/service/lexmodelsv2/api_op_ListSlots.go @@ -165,6 +165,9 @@ func (c *Client) addOperationListSlotsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSlotsValidationMiddleware(stack); err != nil { return err } @@ -189,13 +192,6 @@ func (c *Client) addOperationListSlotsMiddlewares(stack *middleware.Stack, optio return nil } -// ListSlotsAPIClient is a client that implements the ListSlots operation. -type ListSlotsAPIClient interface { - ListSlots(context.Context, *ListSlotsInput, ...func(*Options)) (*ListSlotsOutput, error) -} - -var _ ListSlotsAPIClient = (*Client)(nil) - // ListSlotsPaginatorOptions is the paginator options for ListSlots type ListSlotsPaginatorOptions struct { // The maximum number of slots to return in each page of results. If there are @@ -261,6 +257,9 @@ func (p *ListSlotsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSlots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +279,13 @@ func (p *ListSlotsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListSlotsAPIClient is a client that implements the ListSlots operation. +type ListSlotsAPIClient interface { + ListSlots(context.Context, *ListSlotsInput, ...func(*Options)) (*ListSlotsOutput, error) +} + +var _ ListSlotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSlots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListTagsForResource.go b/service/lexmodelsv2/api_op_ListTagsForResource.go index bccb4550326..259d96aa401 100644 --- a/service/lexmodelsv2/api_op_ListTagsForResource.go +++ b/service/lexmodelsv2/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_ListTestExecutionResultItems.go b/service/lexmodelsv2/api_op_ListTestExecutionResultItems.go index ae2131e3713..51001587d5f 100644 --- a/service/lexmodelsv2/api_op_ListTestExecutionResultItems.go +++ b/service/lexmodelsv2/api_op_ListTestExecutionResultItems.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListTestExecutionResultItemsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestExecutionResultItemsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListTestExecutionResultItemsMiddlewares(stack *midd return nil } -// ListTestExecutionResultItemsAPIClient is a client that implements the -// ListTestExecutionResultItems operation. -type ListTestExecutionResultItemsAPIClient interface { - ListTestExecutionResultItems(context.Context, *ListTestExecutionResultItemsInput, ...func(*Options)) (*ListTestExecutionResultItemsOutput, error) -} - -var _ ListTestExecutionResultItemsAPIClient = (*Client)(nil) - // ListTestExecutionResultItemsPaginatorOptions is the paginator options for // ListTestExecutionResultItems type ListTestExecutionResultItemsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListTestExecutionResultItemsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestExecutionResultItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListTestExecutionResultItemsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListTestExecutionResultItemsAPIClient is a client that implements the +// ListTestExecutionResultItems operation. +type ListTestExecutionResultItemsAPIClient interface { + ListTestExecutionResultItems(context.Context, *ListTestExecutionResultItemsInput, ...func(*Options)) (*ListTestExecutionResultItemsOutput, error) +} + +var _ ListTestExecutionResultItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestExecutionResultItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListTestExecutions.go b/service/lexmodelsv2/api_op_ListTestExecutions.go index 3a3f7839289..459b8ff8ef5 100644 --- a/service/lexmodelsv2/api_op_ListTestExecutions.go +++ b/service/lexmodelsv2/api_op_ListTestExecutions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTestExecutionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestExecutionsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListTestExecutionsMiddlewares(stack *middleware.Sta return nil } -// ListTestExecutionsAPIClient is a client that implements the ListTestExecutions -// operation. -type ListTestExecutionsAPIClient interface { - ListTestExecutions(context.Context, *ListTestExecutionsInput, ...func(*Options)) (*ListTestExecutionsOutput, error) -} - -var _ ListTestExecutionsAPIClient = (*Client)(nil) - // ListTestExecutionsPaginatorOptions is the paginator options for // ListTestExecutions type ListTestExecutionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListTestExecutionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListTestExecutionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListTestExecutionsAPIClient is a client that implements the ListTestExecutions +// operation. +type ListTestExecutionsAPIClient interface { + ListTestExecutions(context.Context, *ListTestExecutionsInput, ...func(*Options)) (*ListTestExecutionsOutput, error) +} + +var _ ListTestExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListTestSetRecords.go b/service/lexmodelsv2/api_op_ListTestSetRecords.go index 73611e98921..9cc788ce280 100644 --- a/service/lexmodelsv2/api_op_ListTestSetRecords.go +++ b/service/lexmodelsv2/api_op_ListTestSetRecords.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTestSetRecordsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestSetRecordsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListTestSetRecordsMiddlewares(stack *middleware.Sta return nil } -// ListTestSetRecordsAPIClient is a client that implements the ListTestSetRecords -// operation. -type ListTestSetRecordsAPIClient interface { - ListTestSetRecords(context.Context, *ListTestSetRecordsInput, ...func(*Options)) (*ListTestSetRecordsOutput, error) -} - -var _ ListTestSetRecordsAPIClient = (*Client)(nil) - // ListTestSetRecordsPaginatorOptions is the paginator options for // ListTestSetRecords type ListTestSetRecordsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListTestSetRecordsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestSetRecords(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListTestSetRecordsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListTestSetRecordsAPIClient is a client that implements the ListTestSetRecords +// operation. +type ListTestSetRecordsAPIClient interface { + ListTestSetRecords(context.Context, *ListTestSetRecordsInput, ...func(*Options)) (*ListTestSetRecordsOutput, error) +} + +var _ ListTestSetRecordsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestSetRecords(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListTestSets.go b/service/lexmodelsv2/api_op_ListTestSets.go index f45929c8a68..7cf0878ab68 100644 --- a/service/lexmodelsv2/api_op_ListTestSets.go +++ b/service/lexmodelsv2/api_op_ListTestSets.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListTestSetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestSetsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListTestSetsMiddlewares(stack *middleware.Stack, op return nil } -// ListTestSetsAPIClient is a client that implements the ListTestSets operation. -type ListTestSetsAPIClient interface { - ListTestSets(context.Context, *ListTestSetsInput, ...func(*Options)) (*ListTestSetsOutput, error) -} - -var _ ListTestSetsAPIClient = (*Client)(nil) - // ListTestSetsPaginatorOptions is the paginator options for ListTestSets type ListTestSetsPaginatorOptions struct { // The maximum number of test sets to return in each page. If there are fewer @@ -214,6 +210,9 @@ func (p *ListTestSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListTestSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListTestSetsAPIClient is a client that implements the ListTestSets operation. +type ListTestSetsAPIClient interface { + ListTestSets(context.Context, *ListTestSetsInput, ...func(*Options)) (*ListTestSetsOutput, error) +} + +var _ ListTestSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go b/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go index 307aa4c3b3a..09ca6822934 100644 --- a/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go +++ b/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go @@ -176,6 +176,9 @@ func (c *Client) addOperationListUtteranceAnalyticsDataMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUtteranceAnalyticsDataValidationMiddleware(stack); err != nil { return err } @@ -200,14 +203,6 @@ func (c *Client) addOperationListUtteranceAnalyticsDataMiddlewares(stack *middle return nil } -// ListUtteranceAnalyticsDataAPIClient is a client that implements the -// ListUtteranceAnalyticsData operation. -type ListUtteranceAnalyticsDataAPIClient interface { - ListUtteranceAnalyticsData(context.Context, *ListUtteranceAnalyticsDataInput, ...func(*Options)) (*ListUtteranceAnalyticsDataOutput, error) -} - -var _ ListUtteranceAnalyticsDataAPIClient = (*Client)(nil) - // ListUtteranceAnalyticsDataPaginatorOptions is the paginator options for // ListUtteranceAnalyticsData type ListUtteranceAnalyticsDataPaginatorOptions struct { @@ -276,6 +271,9 @@ func (p *ListUtteranceAnalyticsDataPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUtteranceAnalyticsData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -295,6 +293,14 @@ func (p *ListUtteranceAnalyticsDataPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListUtteranceAnalyticsDataAPIClient is a client that implements the +// ListUtteranceAnalyticsData operation. +type ListUtteranceAnalyticsDataAPIClient interface { + ListUtteranceAnalyticsData(context.Context, *ListUtteranceAnalyticsDataInput, ...func(*Options)) (*ListUtteranceAnalyticsDataOutput, error) +} + +var _ ListUtteranceAnalyticsDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUtteranceAnalyticsData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_ListUtteranceMetrics.go b/service/lexmodelsv2/api_op_ListUtteranceMetrics.go index abbe9e4474b..cc09408d772 100644 --- a/service/lexmodelsv2/api_op_ListUtteranceMetrics.go +++ b/service/lexmodelsv2/api_op_ListUtteranceMetrics.go @@ -207,6 +207,9 @@ func (c *Client) addOperationListUtteranceMetricsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUtteranceMetricsValidationMiddleware(stack); err != nil { return err } @@ -231,14 +234,6 @@ func (c *Client) addOperationListUtteranceMetricsMiddlewares(stack *middleware.S return nil } -// ListUtteranceMetricsAPIClient is a client that implements the -// ListUtteranceMetrics operation. -type ListUtteranceMetricsAPIClient interface { - ListUtteranceMetrics(context.Context, *ListUtteranceMetricsInput, ...func(*Options)) (*ListUtteranceMetricsOutput, error) -} - -var _ ListUtteranceMetricsAPIClient = (*Client)(nil) - // ListUtteranceMetricsPaginatorOptions is the paginator options for // ListUtteranceMetrics type ListUtteranceMetricsPaginatorOptions struct { @@ -305,6 +300,9 @@ func (p *ListUtteranceMetricsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUtteranceMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -324,6 +322,14 @@ func (p *ListUtteranceMetricsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListUtteranceMetricsAPIClient is a client that implements the +// ListUtteranceMetrics operation. +type ListUtteranceMetricsAPIClient interface { + ListUtteranceMetrics(context.Context, *ListUtteranceMetricsInput, ...func(*Options)) (*ListUtteranceMetricsOutput, error) +} + +var _ ListUtteranceMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUtteranceMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lexmodelsv2/api_op_SearchAssociatedTranscripts.go b/service/lexmodelsv2/api_op_SearchAssociatedTranscripts.go index 6ba641238b9..e66843a874a 100644 --- a/service/lexmodelsv2/api_op_SearchAssociatedTranscripts.go +++ b/service/lexmodelsv2/api_op_SearchAssociatedTranscripts.go @@ -173,6 +173,9 @@ func (c *Client) addOperationSearchAssociatedTranscriptsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchAssociatedTranscriptsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_StartBotRecommendation.go b/service/lexmodelsv2/api_op_StartBotRecommendation.go index 6be9689b651..e149f35ae30 100644 --- a/service/lexmodelsv2/api_op_StartBotRecommendation.go +++ b/service/lexmodelsv2/api_op_StartBotRecommendation.go @@ -162,6 +162,9 @@ func (c *Client) addOperationStartBotRecommendationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBotRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_StartBotResourceGeneration.go b/service/lexmodelsv2/api_op_StartBotResourceGeneration.go index c53f16b11bf..25bf9826f9c 100644 --- a/service/lexmodelsv2/api_op_StartBotResourceGeneration.go +++ b/service/lexmodelsv2/api_op_StartBotResourceGeneration.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStartBotResourceGenerationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBotResourceGenerationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_StartImport.go b/service/lexmodelsv2/api_op_StartImport.go index 84f0628568c..82dd44ee413 100644 --- a/service/lexmodelsv2/api_op_StartImport.go +++ b/service/lexmodelsv2/api_op_StartImport.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartImportMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_StartTestExecution.go b/service/lexmodelsv2/api_op_StartTestExecution.go index a9617d404d5..286e3fcf1d6 100644 --- a/service/lexmodelsv2/api_op_StartTestExecution.go +++ b/service/lexmodelsv2/api_op_StartTestExecution.go @@ -141,6 +141,9 @@ func (c *Client) addOperationStartTestExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTestExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_StartTestSetGeneration.go b/service/lexmodelsv2/api_op_StartTestSetGeneration.go index a23d142f737..9f061466ff1 100644 --- a/service/lexmodelsv2/api_op_StartTestSetGeneration.go +++ b/service/lexmodelsv2/api_op_StartTestSetGeneration.go @@ -156,6 +156,9 @@ func (c *Client) addOperationStartTestSetGenerationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTestSetGenerationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_StopBotRecommendation.go b/service/lexmodelsv2/api_op_StopBotRecommendation.go index c660d05ac06..a85ef18bfa0 100644 --- a/service/lexmodelsv2/api_op_StopBotRecommendation.go +++ b/service/lexmodelsv2/api_op_StopBotRecommendation.go @@ -142,6 +142,9 @@ func (c *Client) addOperationStopBotRecommendationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopBotRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_TagResource.go b/service/lexmodelsv2/api_op_TagResource.go index edce7cb8eae..ee5e8fe26b3 100644 --- a/service/lexmodelsv2/api_op_TagResource.go +++ b/service/lexmodelsv2/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UntagResource.go b/service/lexmodelsv2/api_op_UntagResource.go index e4d29bc10b2..9a295eebf66 100644 --- a/service/lexmodelsv2/api_op_UntagResource.go +++ b/service/lexmodelsv2/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateBot.go b/service/lexmodelsv2/api_op_UpdateBot.go index e488675b984..a936fe3ff5e 100644 --- a/service/lexmodelsv2/api_op_UpdateBot.go +++ b/service/lexmodelsv2/api_op_UpdateBot.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateBotMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateBotAlias.go b/service/lexmodelsv2/api_op_UpdateBotAlias.go index 6bca10651d6..c9283cb02ad 100644 --- a/service/lexmodelsv2/api_op_UpdateBotAlias.go +++ b/service/lexmodelsv2/api_op_UpdateBotAlias.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateBotAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBotAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateBotLocale.go b/service/lexmodelsv2/api_op_UpdateBotLocale.go index b8709a2cb3e..b09a2791562 100644 --- a/service/lexmodelsv2/api_op_UpdateBotLocale.go +++ b/service/lexmodelsv2/api_op_UpdateBotLocale.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateBotLocaleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBotLocaleValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateBotRecommendation.go b/service/lexmodelsv2/api_op_UpdateBotRecommendation.go index 0a3a6857326..8a7f3c55227 100644 --- a/service/lexmodelsv2/api_op_UpdateBotRecommendation.go +++ b/service/lexmodelsv2/api_op_UpdateBotRecommendation.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateBotRecommendationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBotRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateExport.go b/service/lexmodelsv2/api_op_UpdateExport.go index 30dc83667de..a610d257c43 100644 --- a/service/lexmodelsv2/api_op_UpdateExport.go +++ b/service/lexmodelsv2/api_op_UpdateExport.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateExportMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateIntent.go b/service/lexmodelsv2/api_op_UpdateIntent.go index 25f778c3e8a..9b341594e4c 100644 --- a/service/lexmodelsv2/api_op_UpdateIntent.go +++ b/service/lexmodelsv2/api_op_UpdateIntent.go @@ -241,6 +241,9 @@ func (c *Client) addOperationUpdateIntentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIntentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateResourcePolicy.go b/service/lexmodelsv2/api_op_UpdateResourcePolicy.go index 711ba986c33..aaea6f453a2 100644 --- a/service/lexmodelsv2/api_op_UpdateResourcePolicy.go +++ b/service/lexmodelsv2/api_op_UpdateResourcePolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateSlot.go b/service/lexmodelsv2/api_op_UpdateSlot.go index fa2172cde61..c6dc4fc86c1 100644 --- a/service/lexmodelsv2/api_op_UpdateSlot.go +++ b/service/lexmodelsv2/api_op_UpdateSlot.go @@ -204,6 +204,9 @@ func (c *Client) addOperationUpdateSlotMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSlotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateSlotType.go b/service/lexmodelsv2/api_op_UpdateSlotType.go index 6c9ce3dccfa..29743435239 100644 --- a/service/lexmodelsv2/api_op_UpdateSlotType.go +++ b/service/lexmodelsv2/api_op_UpdateSlotType.go @@ -188,6 +188,9 @@ func (c *Client) addOperationUpdateSlotTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSlotTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexmodelsv2/api_op_UpdateTestSet.go b/service/lexmodelsv2/api_op_UpdateTestSet.go index 0bc25681ff1..b96ff03c723 100644 --- a/service/lexmodelsv2/api_op_UpdateTestSet.go +++ b/service/lexmodelsv2/api_op_UpdateTestSet.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateTestSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTestSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimeservice/api_client.go b/service/lexruntimeservice/api_client.go index a6b18ae37ec..74ec1aa2596 100644 --- a/service/lexruntimeservice/api_client.go +++ b/service/lexruntimeservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lexruntimeservice/api_op_DeleteSession.go b/service/lexruntimeservice/api_op_DeleteSession.go index 118f0fe5d15..870b0b534d3 100644 --- a/service/lexruntimeservice/api_op_DeleteSession.go +++ b/service/lexruntimeservice/api_op_DeleteSession.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimeservice/api_op_GetSession.go b/service/lexruntimeservice/api_op_GetSession.go index f23cafec623..d5bf1cb2e3f 100644 --- a/service/lexruntimeservice/api_op_GetSession.go +++ b/service/lexruntimeservice/api_op_GetSession.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimeservice/api_op_PostContent.go b/service/lexruntimeservice/api_op_PostContent.go index 5cf6df24aba..6f81c3b2320 100644 --- a/service/lexruntimeservice/api_op_PostContent.go +++ b/service/lexruntimeservice/api_op_PostContent.go @@ -508,6 +508,9 @@ func (c *Client) addOperationPostContentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPostContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimeservice/api_op_PostText.go b/service/lexruntimeservice/api_op_PostText.go index 8729b7d74de..49082b59555 100644 --- a/service/lexruntimeservice/api_op_PostText.go +++ b/service/lexruntimeservice/api_op_PostText.go @@ -356,6 +356,9 @@ func (c *Client) addOperationPostTextMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPostTextValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimeservice/api_op_PutSession.go b/service/lexruntimeservice/api_op_PutSession.go index b7d62f5ac4f..20da36aa651 100644 --- a/service/lexruntimeservice/api_op_PutSession.go +++ b/service/lexruntimeservice/api_op_PutSession.go @@ -271,6 +271,9 @@ func (c *Client) addOperationPutSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimev2/api_client.go b/service/lexruntimev2/api_client.go index 6b815ebaef9..2d39a5b0c37 100644 --- a/service/lexruntimev2/api_client.go +++ b/service/lexruntimev2/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lexruntimev2/api_op_DeleteSession.go b/service/lexruntimev2/api_op_DeleteSession.go index e8894023017..cd037f75a5f 100644 --- a/service/lexruntimev2/api_op_DeleteSession.go +++ b/service/lexruntimev2/api_op_DeleteSession.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDeleteSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimev2/api_op_GetSession.go b/service/lexruntimev2/api_op_GetSession.go index 217686c6a29..8b0738ca49f 100644 --- a/service/lexruntimev2/api_op_GetSession.go +++ b/service/lexruntimev2/api_op_GetSession.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimev2/api_op_PutSession.go b/service/lexruntimev2/api_op_PutSession.go index 011e549c28d..10b55f4a364 100644 --- a/service/lexruntimev2/api_op_PutSession.go +++ b/service/lexruntimev2/api_op_PutSession.go @@ -169,6 +169,9 @@ func (c *Client) addOperationPutSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimev2/api_op_RecognizeText.go b/service/lexruntimev2/api_op_RecognizeText.go index dedecaea482..baf57f68e93 100644 --- a/service/lexruntimev2/api_op_RecognizeText.go +++ b/service/lexruntimev2/api_op_RecognizeText.go @@ -187,6 +187,9 @@ func (c *Client) addOperationRecognizeTextMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRecognizeTextValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimev2/api_op_RecognizeUtterance.go b/service/lexruntimev2/api_op_RecognizeUtterance.go index c2e28e8f2ff..2a20adf66c6 100644 --- a/service/lexruntimev2/api_op_RecognizeUtterance.go +++ b/service/lexruntimev2/api_op_RecognizeUtterance.go @@ -316,6 +316,9 @@ func (c *Client) addOperationRecognizeUtteranceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRecognizeUtteranceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lexruntimev2/api_op_StartConversation.go b/service/lexruntimev2/api_op_StartConversation.go index e287dd63f87..92e43156f3e 100644 --- a/service/lexruntimev2/api_op_StartConversation.go +++ b/service/lexruntimev2/api_op_StartConversation.go @@ -182,6 +182,9 @@ func (c *Client) addOperationStartConversationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartConversationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_client.go b/service/licensemanager/api_client.go index 6dc59bbd873..c070433d58b 100644 --- a/service/licensemanager/api_client.go +++ b/service/licensemanager/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/licensemanager/api_op_AcceptGrant.go b/service/licensemanager/api_op_AcceptGrant.go index 14422c47c99..a9a63253ccc 100644 --- a/service/licensemanager/api_op_AcceptGrant.go +++ b/service/licensemanager/api_op_AcceptGrant.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAcceptGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CheckInLicense.go b/service/licensemanager/api_op_CheckInLicense.go index 8aa5d10543b..fc4eb7ab713 100644 --- a/service/licensemanager/api_op_CheckInLicense.go +++ b/service/licensemanager/api_op_CheckInLicense.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCheckInLicenseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckInLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CheckoutBorrowLicense.go b/service/licensemanager/api_op_CheckoutBorrowLicense.go index cf4dea13afd..c0920035970 100644 --- a/service/licensemanager/api_op_CheckoutBorrowLicense.go +++ b/service/licensemanager/api_op_CheckoutBorrowLicense.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCheckoutBorrowLicenseMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckoutBorrowLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CheckoutLicense.go b/service/licensemanager/api_op_CheckoutLicense.go index b0e907fbd89..7f462d44a57 100644 --- a/service/licensemanager/api_op_CheckoutLicense.go +++ b/service/licensemanager/api_op_CheckoutLicense.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCheckoutLicenseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckoutLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateGrant.go b/service/licensemanager/api_op_CreateGrant.go index 48a20bed4de..cd98a756958 100644 --- a/service/licensemanager/api_op_CreateGrant.go +++ b/service/licensemanager/api_op_CreateGrant.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateGrantVersion.go b/service/licensemanager/api_op_CreateGrantVersion.go index 7cf5aeb7080..ad744eac3ef 100644 --- a/service/licensemanager/api_op_CreateGrantVersion.go +++ b/service/licensemanager/api_op_CreateGrantVersion.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateGrantVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGrantVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateLicense.go b/service/licensemanager/api_op_CreateLicense.go index 16f42e95847..5e55f8fc4d0 100644 --- a/service/licensemanager/api_op_CreateLicense.go +++ b/service/licensemanager/api_op_CreateLicense.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateLicenseMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateLicenseConfiguration.go b/service/licensemanager/api_op_CreateLicenseConfiguration.go index 311521b8843..73f58654e70 100644 --- a/service/licensemanager/api_op_CreateLicenseConfiguration.go +++ b/service/licensemanager/api_op_CreateLicenseConfiguration.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateLicenseConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLicenseConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateLicenseConversionTaskForResource.go b/service/licensemanager/api_op_CreateLicenseConversionTaskForResource.go index fa1535c0561..2e37e6c7bf2 100644 --- a/service/licensemanager/api_op_CreateLicenseConversionTaskForResource.go +++ b/service/licensemanager/api_op_CreateLicenseConversionTaskForResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateLicenseConversionTaskForResourceMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLicenseConversionTaskForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateLicenseManagerReportGenerator.go b/service/licensemanager/api_op_CreateLicenseManagerReportGenerator.go index 82394f6311f..a1c092b8f5b 100644 --- a/service/licensemanager/api_op_CreateLicenseManagerReportGenerator.go +++ b/service/licensemanager/api_op_CreateLicenseManagerReportGenerator.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateLicenseManagerReportGeneratorMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLicenseManagerReportGeneratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateLicenseVersion.go b/service/licensemanager/api_op_CreateLicenseVersion.go index 4c39628c2b1..8f30b38de30 100644 --- a/service/licensemanager/api_op_CreateLicenseVersion.go +++ b/service/licensemanager/api_op_CreateLicenseVersion.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateLicenseVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLicenseVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_CreateToken.go b/service/licensemanager/api_op_CreateToken.go index 1325296b811..37137bc2bc6 100644 --- a/service/licensemanager/api_op_CreateToken.go +++ b/service/licensemanager/api_op_CreateToken.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_DeleteGrant.go b/service/licensemanager/api_op_DeleteGrant.go index dd4dcb7672c..6222fbebe4a 100644 --- a/service/licensemanager/api_op_DeleteGrant.go +++ b/service/licensemanager/api_op_DeleteGrant.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_DeleteLicense.go b/service/licensemanager/api_op_DeleteLicense.go index b5a336089f8..65be9190235 100644 --- a/service/licensemanager/api_op_DeleteLicense.go +++ b/service/licensemanager/api_op_DeleteLicense.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteLicenseMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_DeleteLicenseConfiguration.go b/service/licensemanager/api_op_DeleteLicenseConfiguration.go index 2e55263de29..d7a581e407e 100644 --- a/service/licensemanager/api_op_DeleteLicenseConfiguration.go +++ b/service/licensemanager/api_op_DeleteLicenseConfiguration.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteLicenseConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLicenseConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_DeleteLicenseManagerReportGenerator.go b/service/licensemanager/api_op_DeleteLicenseManagerReportGenerator.go index ebcf4b2c188..e5a5f4f8c40 100644 --- a/service/licensemanager/api_op_DeleteLicenseManagerReportGenerator.go +++ b/service/licensemanager/api_op_DeleteLicenseManagerReportGenerator.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteLicenseManagerReportGeneratorMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLicenseManagerReportGeneratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_DeleteToken.go b/service/licensemanager/api_op_DeleteToken.go index 1ad7a62eefd..ec0b2491d2a 100644 --- a/service/licensemanager/api_op_DeleteToken.go +++ b/service/licensemanager/api_op_DeleteToken.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTokenMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ExtendLicenseConsumption.go b/service/licensemanager/api_op_ExtendLicenseConsumption.go index 5e619b7885b..066d513c3f1 100644 --- a/service/licensemanager/api_op_ExtendLicenseConsumption.go +++ b/service/licensemanager/api_op_ExtendLicenseConsumption.go @@ -113,6 +113,9 @@ func (c *Client) addOperationExtendLicenseConsumptionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExtendLicenseConsumptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetAccessToken.go b/service/licensemanager/api_op_GetAccessToken.go index 38993bc8dbd..a16889cb0f8 100644 --- a/service/licensemanager/api_op_GetAccessToken.go +++ b/service/licensemanager/api_op_GetAccessToken.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetAccessTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetGrant.go b/service/licensemanager/api_op_GetGrant.go index 1419bce0602..cad75d5f98d 100644 --- a/service/licensemanager/api_op_GetGrant.go +++ b/service/licensemanager/api_op_GetGrant.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetGrantMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetLicense.go b/service/licensemanager/api_op_GetLicense.go index 2fa2d073110..506583f637a 100644 --- a/service/licensemanager/api_op_GetLicense.go +++ b/service/licensemanager/api_op_GetLicense.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetLicenseMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLicenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetLicenseConfiguration.go b/service/licensemanager/api_op_GetLicenseConfiguration.go index b66f4b141ee..fc366d97958 100644 --- a/service/licensemanager/api_op_GetLicenseConfiguration.go +++ b/service/licensemanager/api_op_GetLicenseConfiguration.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetLicenseConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLicenseConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetLicenseConversionTask.go b/service/licensemanager/api_op_GetLicenseConversionTask.go index b5524d41a7c..de4ca700013 100644 --- a/service/licensemanager/api_op_GetLicenseConversionTask.go +++ b/service/licensemanager/api_op_GetLicenseConversionTask.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetLicenseConversionTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLicenseConversionTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetLicenseManagerReportGenerator.go b/service/licensemanager/api_op_GetLicenseManagerReportGenerator.go index 6ff10c6f14a..3bdd39176c8 100644 --- a/service/licensemanager/api_op_GetLicenseManagerReportGenerator.go +++ b/service/licensemanager/api_op_GetLicenseManagerReportGenerator.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetLicenseManagerReportGeneratorMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLicenseManagerReportGeneratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetLicenseUsage.go b/service/licensemanager/api_op_GetLicenseUsage.go index bf5f10b5bdf..e58e03b9412 100644 --- a/service/licensemanager/api_op_GetLicenseUsage.go +++ b/service/licensemanager/api_op_GetLicenseUsage.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetLicenseUsageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLicenseUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_GetServiceSettings.go b/service/licensemanager/api_op_GetServiceSettings.go index ae398db9f87..ded716387e2 100644 --- a/service/licensemanager/api_op_GetServiceSettings.go +++ b/service/licensemanager/api_op_GetServiceSettings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetServiceSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListAssociationsForLicenseConfiguration.go b/service/licensemanager/api_op_ListAssociationsForLicenseConfiguration.go index 7ab54317b15..c12ee6dcdb3 100644 --- a/service/licensemanager/api_op_ListAssociationsForLicenseConfiguration.go +++ b/service/licensemanager/api_op_ListAssociationsForLicenseConfiguration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAssociationsForLicenseConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociationsForLicenseConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListDistributedGrants.go b/service/licensemanager/api_op_ListDistributedGrants.go index ee5964dc809..196a753fdd0 100644 --- a/service/licensemanager/api_op_ListDistributedGrants.go +++ b/service/licensemanager/api_op_ListDistributedGrants.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListDistributedGrantsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDistributedGrants(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListFailuresForLicenseConfigurationOperations.go b/service/licensemanager/api_op_ListFailuresForLicenseConfigurationOperations.go index 4682236dd88..1c60e3251bf 100644 --- a/service/licensemanager/api_op_ListFailuresForLicenseConfigurationOperations.go +++ b/service/licensemanager/api_op_ListFailuresForLicenseConfigurationOperations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListFailuresForLicenseConfigurationOperationsMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFailuresForLicenseConfigurationOperationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListLicenseConfigurations.go b/service/licensemanager/api_op_ListLicenseConfigurations.go index e3f9b63727b..cba3ed65f83 100644 --- a/service/licensemanager/api_op_ListLicenseConfigurations.go +++ b/service/licensemanager/api_op_ListLicenseConfigurations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListLicenseConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLicenseConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListLicenseConversionTasks.go b/service/licensemanager/api_op_ListLicenseConversionTasks.go index 8dcb82e8ecc..a8894769eab 100644 --- a/service/licensemanager/api_op_ListLicenseConversionTasks.go +++ b/service/licensemanager/api_op_ListLicenseConversionTasks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListLicenseConversionTasksMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLicenseConversionTasks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListLicenseManagerReportGenerators.go b/service/licensemanager/api_op_ListLicenseManagerReportGenerators.go index 56506aaa4bb..a2585ad3d3b 100644 --- a/service/licensemanager/api_op_ListLicenseManagerReportGenerators.go +++ b/service/licensemanager/api_op_ListLicenseManagerReportGenerators.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListLicenseManagerReportGeneratorsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLicenseManagerReportGenerators(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListLicenseSpecificationsForResource.go b/service/licensemanager/api_op_ListLicenseSpecificationsForResource.go index b2ed14ed451..4870a4e6fe2 100644 --- a/service/licensemanager/api_op_ListLicenseSpecificationsForResource.go +++ b/service/licensemanager/api_op_ListLicenseSpecificationsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListLicenseSpecificationsForResourceMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLicenseSpecificationsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListLicenseVersions.go b/service/licensemanager/api_op_ListLicenseVersions.go index c07d86b02dc..4a104b66074 100644 --- a/service/licensemanager/api_op_ListLicenseVersions.go +++ b/service/licensemanager/api_op_ListLicenseVersions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListLicenseVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLicenseVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListLicenses.go b/service/licensemanager/api_op_ListLicenses.go index a3f9d792275..7d459e91a6d 100644 --- a/service/licensemanager/api_op_ListLicenses.go +++ b/service/licensemanager/api_op_ListLicenses.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListLicensesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLicenses(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListReceivedGrants.go b/service/licensemanager/api_op_ListReceivedGrants.go index 8c09d2658c5..402f62d1eaa 100644 --- a/service/licensemanager/api_op_ListReceivedGrants.go +++ b/service/licensemanager/api_op_ListReceivedGrants.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListReceivedGrantsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceivedGrants(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListReceivedGrantsForOrganization.go b/service/licensemanager/api_op_ListReceivedGrantsForOrganization.go index 45f00cb2ee9..8caae9e54ca 100644 --- a/service/licensemanager/api_op_ListReceivedGrantsForOrganization.go +++ b/service/licensemanager/api_op_ListReceivedGrantsForOrganization.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListReceivedGrantsForOrganizationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListReceivedGrantsForOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListReceivedLicenses.go b/service/licensemanager/api_op_ListReceivedLicenses.go index 9c4e3773daf..1dd380716a1 100644 --- a/service/licensemanager/api_op_ListReceivedLicenses.go +++ b/service/licensemanager/api_op_ListReceivedLicenses.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListReceivedLicensesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceivedLicenses(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListReceivedLicensesForOrganization.go b/service/licensemanager/api_op_ListReceivedLicensesForOrganization.go index b7935fd1781..497b836c299 100644 --- a/service/licensemanager/api_op_ListReceivedLicensesForOrganization.go +++ b/service/licensemanager/api_op_ListReceivedLicensesForOrganization.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListReceivedLicensesForOrganizationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceivedLicensesForOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListResourceInventory.go b/service/licensemanager/api_op_ListResourceInventory.go index dc462c5f0a7..ec5b7a17972 100644 --- a/service/licensemanager/api_op_ListResourceInventory.go +++ b/service/licensemanager/api_op_ListResourceInventory.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListResourceInventoryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceInventoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListTagsForResource.go b/service/licensemanager/api_op_ListTagsForResource.go index 67560a8a03b..7141509ec34 100644 --- a/service/licensemanager/api_op_ListTagsForResource.go +++ b/service/licensemanager/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_ListTokens.go b/service/licensemanager/api_op_ListTokens.go index 715d300f39c..f966aef9ad0 100644 --- a/service/licensemanager/api_op_ListTokens.go +++ b/service/licensemanager/api_op_ListTokens.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTokensMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTokens(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanager/api_op_ListUsageForLicenseConfiguration.go b/service/licensemanager/api_op_ListUsageForLicenseConfiguration.go index c32a30b6ad3..c620c7a3e84 100644 --- a/service/licensemanager/api_op_ListUsageForLicenseConfiguration.go +++ b/service/licensemanager/api_op_ListUsageForLicenseConfiguration.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListUsageForLicenseConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsageForLicenseConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_RejectGrant.go b/service/licensemanager/api_op_RejectGrant.go index 1c4b7f772d5..4dcfccc6c34 100644 --- a/service/licensemanager/api_op_RejectGrant.go +++ b/service/licensemanager/api_op_RejectGrant.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRejectGrantMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_TagResource.go b/service/licensemanager/api_op_TagResource.go index 94d305396ca..bb865c63a85 100644 --- a/service/licensemanager/api_op_TagResource.go +++ b/service/licensemanager/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_UntagResource.go b/service/licensemanager/api_op_UntagResource.go index 4cdf755c2c6..f70a7ea3697 100644 --- a/service/licensemanager/api_op_UntagResource.go +++ b/service/licensemanager/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_UpdateLicenseConfiguration.go b/service/licensemanager/api_op_UpdateLicenseConfiguration.go index 44e374cc7f2..376ef64d2e8 100644 --- a/service/licensemanager/api_op_UpdateLicenseConfiguration.go +++ b/service/licensemanager/api_op_UpdateLicenseConfiguration.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateLicenseConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLicenseConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_UpdateLicenseManagerReportGenerator.go b/service/licensemanager/api_op_UpdateLicenseManagerReportGenerator.go index f2d3933ec71..e5557275ac9 100644 --- a/service/licensemanager/api_op_UpdateLicenseManagerReportGenerator.go +++ b/service/licensemanager/api_op_UpdateLicenseManagerReportGenerator.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateLicenseManagerReportGeneratorMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLicenseManagerReportGeneratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_UpdateLicenseSpecificationsForResource.go b/service/licensemanager/api_op_UpdateLicenseSpecificationsForResource.go index a232fe6b542..14ce6ba8f24 100644 --- a/service/licensemanager/api_op_UpdateLicenseSpecificationsForResource.go +++ b/service/licensemanager/api_op_UpdateLicenseSpecificationsForResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateLicenseSpecificationsForResourceMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLicenseSpecificationsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanager/api_op_UpdateServiceSettings.go b/service/licensemanager/api_op_UpdateServiceSettings.go index b2e4d15f0df..354bd2dfae1 100644 --- a/service/licensemanager/api_op_UpdateServiceSettings.go +++ b/service/licensemanager/api_op_UpdateServiceSettings.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateServiceSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerlinuxsubscriptions/api_client.go b/service/licensemanagerlinuxsubscriptions/api_client.go index 61a3ef1e9cf..07373a7a212 100644 --- a/service/licensemanagerlinuxsubscriptions/api_client.go +++ b/service/licensemanagerlinuxsubscriptions/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/licensemanagerlinuxsubscriptions/api_op_GetServiceSettings.go b/service/licensemanagerlinuxsubscriptions/api_op_GetServiceSettings.go index 42f72fe5170..8a71e5c2174 100644 --- a/service/licensemanagerlinuxsubscriptions/api_op_GetServiceSettings.go +++ b/service/licensemanagerlinuxsubscriptions/api_op_GetServiceSettings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetServiceSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServiceSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptionInstances.go b/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptionInstances.go index d4ce5fb88e6..b0d5867486a 100644 --- a/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptionInstances.go +++ b/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptionInstances.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListLinuxSubscriptionInstancesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLinuxSubscriptionInstances(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListLinuxSubscriptionInstancesMiddlewares(stack *mi return nil } -// ListLinuxSubscriptionInstancesAPIClient is a client that implements the -// ListLinuxSubscriptionInstances operation. -type ListLinuxSubscriptionInstancesAPIClient interface { - ListLinuxSubscriptionInstances(context.Context, *ListLinuxSubscriptionInstancesInput, ...func(*Options)) (*ListLinuxSubscriptionInstancesOutput, error) -} - -var _ ListLinuxSubscriptionInstancesAPIClient = (*Client)(nil) - // ListLinuxSubscriptionInstancesPaginatorOptions is the paginator options for // ListLinuxSubscriptionInstances type ListLinuxSubscriptionInstancesPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListLinuxSubscriptionInstancesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLinuxSubscriptionInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListLinuxSubscriptionInstancesPaginator) NextPage(ctx context.Context, return result, nil } +// ListLinuxSubscriptionInstancesAPIClient is a client that implements the +// ListLinuxSubscriptionInstances operation. +type ListLinuxSubscriptionInstancesAPIClient interface { + ListLinuxSubscriptionInstances(context.Context, *ListLinuxSubscriptionInstancesInput, ...func(*Options)) (*ListLinuxSubscriptionInstancesOutput, error) +} + +var _ ListLinuxSubscriptionInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLinuxSubscriptionInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptions.go b/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptions.go index df0f334eac8..454bfa90fb4 100644 --- a/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptions.go +++ b/service/licensemanagerlinuxsubscriptions/api_op_ListLinuxSubscriptions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListLinuxSubscriptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLinuxSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListLinuxSubscriptionsMiddlewares(stack *middleware return nil } -// ListLinuxSubscriptionsAPIClient is a client that implements the -// ListLinuxSubscriptions operation. -type ListLinuxSubscriptionsAPIClient interface { - ListLinuxSubscriptions(context.Context, *ListLinuxSubscriptionsInput, ...func(*Options)) (*ListLinuxSubscriptionsOutput, error) -} - -var _ ListLinuxSubscriptionsAPIClient = (*Client)(nil) - // ListLinuxSubscriptionsPaginatorOptions is the paginator options for // ListLinuxSubscriptions type ListLinuxSubscriptionsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListLinuxSubscriptionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLinuxSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListLinuxSubscriptionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListLinuxSubscriptionsAPIClient is a client that implements the +// ListLinuxSubscriptions operation. +type ListLinuxSubscriptionsAPIClient interface { + ListLinuxSubscriptions(context.Context, *ListLinuxSubscriptionsInput, ...func(*Options)) (*ListLinuxSubscriptionsOutput, error) +} + +var _ ListLinuxSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLinuxSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/licensemanagerlinuxsubscriptions/api_op_UpdateServiceSettings.go b/service/licensemanagerlinuxsubscriptions/api_op_UpdateServiceSettings.go index ec9ff7507ed..969e17cc477 100644 --- a/service/licensemanagerlinuxsubscriptions/api_op_UpdateServiceSettings.go +++ b/service/licensemanagerlinuxsubscriptions/api_op_UpdateServiceSettings.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateServiceSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_client.go b/service/licensemanagerusersubscriptions/api_client.go index 5374309709b..b88a2bd079f 100644 --- a/service/licensemanagerusersubscriptions/api_client.go +++ b/service/licensemanagerusersubscriptions/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/licensemanagerusersubscriptions/api_op_AssociateUser.go b/service/licensemanagerusersubscriptions/api_op_AssociateUser.go index e095b2360db..7e8d68ae327 100644 --- a/service/licensemanagerusersubscriptions/api_op_AssociateUser.go +++ b/service/licensemanagerusersubscriptions/api_op_AssociateUser.go @@ -128,6 +128,9 @@ func (c *Client) addOperationAssociateUserMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go b/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go index 224f7742363..4e6e4220143 100644 --- a/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go +++ b/service/licensemanagerusersubscriptions/api_op_DeregisterIdentityProvider.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeregisterIdentityProviderMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go b/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go index f93971ffa16..1715a0aa813 100644 --- a/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go +++ b/service/licensemanagerusersubscriptions/api_op_DisassociateUser.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisassociateUserMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go b/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go index 8a5bb7bb7ed..b2670942c83 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go +++ b/service/licensemanagerusersubscriptions/api_op_ListIdentityProviders.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentityProviders(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. return nil } -// ListIdentityProvidersAPIClient is a client that implements the -// ListIdentityProviders operation. -type ListIdentityProvidersAPIClient interface { - ListIdentityProviders(context.Context, *ListIdentityProvidersInput, ...func(*Options)) (*ListIdentityProvidersOutput, error) -} - -var _ ListIdentityProvidersAPIClient = (*Client)(nil) - // ListIdentityProvidersPaginatorOptions is the paginator options for // ListIdentityProviders type ListIdentityProvidersPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentityProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListIdentityProvidersAPIClient is a client that implements the +// ListIdentityProviders operation. +type ListIdentityProvidersAPIClient interface { + ListIdentityProviders(context.Context, *ListIdentityProvidersInput, ...func(*Options)) (*ListIdentityProvidersOutput, error) +} + +var _ ListIdentityProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentityProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/licensemanagerusersubscriptions/api_op_ListInstances.go b/service/licensemanagerusersubscriptions/api_op_ListInstances.go index af14166daae..bcf281dfd56 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListInstances.go +++ b/service/licensemanagerusersubscriptions/api_op_ListInstances.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstances(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o return nil } -// ListInstancesAPIClient is a client that implements the ListInstances operation. -type ListInstancesAPIClient interface { - ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) -} - -var _ ListInstancesAPIClient = (*Client)(nil) - // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { // Maximum number of results to return in a single call. @@ -205,6 +201,9 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListInstancesAPIClient is a client that implements the ListInstances operation. +type ListInstancesAPIClient interface { + ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) +} + +var _ ListInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go b/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go index a2a2bb57b27..88670586cef 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go +++ b/service/licensemanagerusersubscriptions/api_op_ListProductSubscriptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListProductSubscriptionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProductSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListProductSubscriptionsMiddlewares(stack *middlewa return nil } -// ListProductSubscriptionsAPIClient is a client that implements the -// ListProductSubscriptions operation. -type ListProductSubscriptionsAPIClient interface { - ListProductSubscriptions(context.Context, *ListProductSubscriptionsInput, ...func(*Options)) (*ListProductSubscriptionsOutput, error) -} - -var _ ListProductSubscriptionsAPIClient = (*Client)(nil) - // ListProductSubscriptionsPaginatorOptions is the paginator options for // ListProductSubscriptions type ListProductSubscriptionsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListProductSubscriptionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProductSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListProductSubscriptionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListProductSubscriptionsAPIClient is a client that implements the +// ListProductSubscriptions operation. +type ListProductSubscriptionsAPIClient interface { + ListProductSubscriptions(context.Context, *ListProductSubscriptionsInput, ...func(*Options)) (*ListProductSubscriptionsOutput, error) +} + +var _ ListProductSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProductSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go b/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go index 2692f88b7ce..6783dbb88af 100644 --- a/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go +++ b/service/licensemanagerusersubscriptions/api_op_ListUserAssociations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListUserAssociationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserAssociationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListUserAssociationsMiddlewares(stack *middleware.S return nil } -// ListUserAssociationsAPIClient is a client that implements the -// ListUserAssociations operation. -type ListUserAssociationsAPIClient interface { - ListUserAssociations(context.Context, *ListUserAssociationsInput, ...func(*Options)) (*ListUserAssociationsOutput, error) -} - -var _ ListUserAssociationsAPIClient = (*Client)(nil) - // ListUserAssociationsPaginatorOptions is the paginator options for // ListUserAssociations type ListUserAssociationsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListUserAssociationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListUserAssociationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListUserAssociationsAPIClient is a client that implements the +// ListUserAssociations operation. +type ListUserAssociationsAPIClient interface { + ListUserAssociations(context.Context, *ListUserAssociationsInput, ...func(*Options)) (*ListUserAssociationsOutput, error) +} + +var _ ListUserAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go b/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go index 2b8a3398ac1..dfa972d6f31 100644 --- a/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go +++ b/service/licensemanagerusersubscriptions/api_op_RegisterIdentityProvider.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRegisterIdentityProviderMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go b/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go index 7727f60006c..6804bf62e19 100644 --- a/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go +++ b/service/licensemanagerusersubscriptions/api_op_StartProductSubscription.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartProductSubscriptionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartProductSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go b/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go index d1fbdd838e7..accfe5160f5 100644 --- a/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go +++ b/service/licensemanagerusersubscriptions/api_op_StopProductSubscription.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStopProductSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopProductSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go b/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go index ace83091fee..cda7c197419 100644 --- a/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go +++ b/service/licensemanagerusersubscriptions/api_op_UpdateIdentityProviderSettings.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateIdentityProviderSettingsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdentityProviderSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_client.go b/service/lightsail/api_client.go index cd266b68f85..bce5ed3fd66 100644 --- a/service/lightsail/api_client.go +++ b/service/lightsail/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lightsail/api_op_AllocateStaticIp.go b/service/lightsail/api_op_AllocateStaticIp.go index 63fa7220296..3971fce4712 100644 --- a/service/lightsail/api_op_AllocateStaticIp.go +++ b/service/lightsail/api_op_AllocateStaticIp.go @@ -108,6 +108,9 @@ func (c *Client) addOperationAllocateStaticIpMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAllocateStaticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_AttachCertificateToDistribution.go b/service/lightsail/api_op_AttachCertificateToDistribution.go index 46e8ed2010e..f3b786c3639 100644 --- a/service/lightsail/api_op_AttachCertificateToDistribution.go +++ b/service/lightsail/api_op_AttachCertificateToDistribution.go @@ -140,6 +140,9 @@ func (c *Client) addOperationAttachCertificateToDistributionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachCertificateToDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_AttachDisk.go b/service/lightsail/api_op_AttachDisk.go index 51d4a15b88d..4514c2f9565 100644 --- a/service/lightsail/api_op_AttachDisk.go +++ b/service/lightsail/api_op_AttachDisk.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAttachDiskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachDiskValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_AttachInstancesToLoadBalancer.go b/service/lightsail/api_op_AttachInstancesToLoadBalancer.go index bcd5607f933..e76ab56d07b 100644 --- a/service/lightsail/api_op_AttachInstancesToLoadBalancer.go +++ b/service/lightsail/api_op_AttachInstancesToLoadBalancer.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAttachInstancesToLoadBalancerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachInstancesToLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_AttachLoadBalancerTlsCertificate.go b/service/lightsail/api_op_AttachLoadBalancerTlsCertificate.go index 1139679c393..0593401a478 100644 --- a/service/lightsail/api_op_AttachLoadBalancerTlsCertificate.go +++ b/service/lightsail/api_op_AttachLoadBalancerTlsCertificate.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAttachLoadBalancerTlsCertificateMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachLoadBalancerTlsCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_AttachStaticIp.go b/service/lightsail/api_op_AttachStaticIp.go index 73ebf738460..35d1c4f3329 100644 --- a/service/lightsail/api_op_AttachStaticIp.go +++ b/service/lightsail/api_op_AttachStaticIp.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAttachStaticIpMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachStaticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CloseInstancePublicPorts.go b/service/lightsail/api_op_CloseInstancePublicPorts.go index a673811c742..738d1e16a14 100644 --- a/service/lightsail/api_op_CloseInstancePublicPorts.go +++ b/service/lightsail/api_op_CloseInstancePublicPorts.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCloseInstancePublicPortsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloseInstancePublicPortsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CopySnapshot.go b/service/lightsail/api_op_CopySnapshot.go index 58118fcfa21..9456ae51f08 100644 --- a/service/lightsail/api_op_CopySnapshot.go +++ b/service/lightsail/api_op_CopySnapshot.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCopySnapshotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopySnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateBucket.go b/service/lightsail/api_op_CreateBucket.go index 5975f4f712c..bd5ef0f98cc 100644 --- a/service/lightsail/api_op_CreateBucket.go +++ b/service/lightsail/api_op_CreateBucket.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateBucketAccessKey.go b/service/lightsail/api_op_CreateBucketAccessKey.go index 4925bd1c0e1..d4c263afea3 100644 --- a/service/lightsail/api_op_CreateBucketAccessKey.go +++ b/service/lightsail/api_op_CreateBucketAccessKey.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateBucketAccessKeyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBucketAccessKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateCertificate.go b/service/lightsail/api_op_CreateCertificate.go index 43919408b24..183c79bf36f 100644 --- a/service/lightsail/api_op_CreateCertificate.go +++ b/service/lightsail/api_op_CreateCertificate.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateCloudFormationStack.go b/service/lightsail/api_op_CreateCloudFormationStack.go index fdddfb1899d..7ce3ff1cf9b 100644 --- a/service/lightsail/api_op_CreateCloudFormationStack.go +++ b/service/lightsail/api_op_CreateCloudFormationStack.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateCloudFormationStackMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCloudFormationStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateContactMethod.go b/service/lightsail/api_op_CreateContactMethod.go index e2a6608131e..41a82a15970 100644 --- a/service/lightsail/api_op_CreateContactMethod.go +++ b/service/lightsail/api_op_CreateContactMethod.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateContactMethodMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContactMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateContainerService.go b/service/lightsail/api_op_CreateContainerService.go index 82c5c5c4836..e44b27ec6f2 100644 --- a/service/lightsail/api_op_CreateContainerService.go +++ b/service/lightsail/api_op_CreateContainerService.go @@ -201,6 +201,9 @@ func (c *Client) addOperationCreateContainerServiceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContainerServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateContainerServiceDeployment.go b/service/lightsail/api_op_CreateContainerServiceDeployment.go index e7e769c2a7f..a603b8d5287 100644 --- a/service/lightsail/api_op_CreateContainerServiceDeployment.go +++ b/service/lightsail/api_op_CreateContainerServiceDeployment.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateContainerServiceDeploymentMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContainerServiceDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateContainerServiceRegistryLogin.go b/service/lightsail/api_op_CreateContainerServiceRegistryLogin.go index be34e8d45e1..46032d250bc 100644 --- a/service/lightsail/api_op_CreateContainerServiceRegistryLogin.go +++ b/service/lightsail/api_op_CreateContainerServiceRegistryLogin.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateContainerServiceRegistryLoginMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateContainerServiceRegistryLogin(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_CreateDisk.go b/service/lightsail/api_op_CreateDisk.go index 3ac3319c49f..54297350085 100644 --- a/service/lightsail/api_op_CreateDisk.go +++ b/service/lightsail/api_op_CreateDisk.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateDiskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDiskValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateDiskFromSnapshot.go b/service/lightsail/api_op_CreateDiskFromSnapshot.go index cb7fe940fe7..b59a92d008e 100644 --- a/service/lightsail/api_op_CreateDiskFromSnapshot.go +++ b/service/lightsail/api_op_CreateDiskFromSnapshot.go @@ -196,6 +196,9 @@ func (c *Client) addOperationCreateDiskFromSnapshotMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDiskFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateDiskSnapshot.go b/service/lightsail/api_op_CreateDiskSnapshot.go index 2e62b3e0819..608dfe840de 100644 --- a/service/lightsail/api_op_CreateDiskSnapshot.go +++ b/service/lightsail/api_op_CreateDiskSnapshot.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateDiskSnapshotMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDiskSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateDistribution.go b/service/lightsail/api_op_CreateDistribution.go index 1e6c974bf20..8fd9e4a2d2e 100644 --- a/service/lightsail/api_op_CreateDistribution.go +++ b/service/lightsail/api_op_CreateDistribution.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateDistributionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateDomain.go b/service/lightsail/api_op_CreateDomain.go index ed3a32bf9d3..3c4ce8a2763 100644 --- a/service/lightsail/api_op_CreateDomain.go +++ b/service/lightsail/api_op_CreateDomain.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateDomainEntry.go b/service/lightsail/api_op_CreateDomainEntry.go index fd763a09e70..535db663688 100644 --- a/service/lightsail/api_op_CreateDomainEntry.go +++ b/service/lightsail/api_op_CreateDomainEntry.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateDomainEntryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateGUISessionAccessDetails.go b/service/lightsail/api_op_CreateGUISessionAccessDetails.go index 3019c39e1c5..b5a5d3f483c 100644 --- a/service/lightsail/api_op_CreateGUISessionAccessDetails.go +++ b/service/lightsail/api_op_CreateGUISessionAccessDetails.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateGUISessionAccessDetailsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGUISessionAccessDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateInstanceSnapshot.go b/service/lightsail/api_op_CreateInstanceSnapshot.go index 25513c63285..0f72147ae2e 100644 --- a/service/lightsail/api_op_CreateInstanceSnapshot.go +++ b/service/lightsail/api_op_CreateInstanceSnapshot.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateInstanceSnapshotMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateInstances.go b/service/lightsail/api_op_CreateInstances.go index ceed2ec9d3e..3dd5ef60ea6 100644 --- a/service/lightsail/api_op_CreateInstances.go +++ b/service/lightsail/api_op_CreateInstances.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateInstancesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateInstancesFromSnapshot.go b/service/lightsail/api_op_CreateInstancesFromSnapshot.go index 4352761ddd5..e5d9e666957 100644 --- a/service/lightsail/api_op_CreateInstancesFromSnapshot.go +++ b/service/lightsail/api_op_CreateInstancesFromSnapshot.go @@ -222,6 +222,9 @@ func (c *Client) addOperationCreateInstancesFromSnapshotMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstancesFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateKeyPair.go b/service/lightsail/api_op_CreateKeyPair.go index 5659fce596f..d10ff245d4f 100644 --- a/service/lightsail/api_op_CreateKeyPair.go +++ b/service/lightsail/api_op_CreateKeyPair.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateKeyPairMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateLoadBalancer.go b/service/lightsail/api_op_CreateLoadBalancer.go index 324eb98e394..2cb1cebc6b9 100644 --- a/service/lightsail/api_op_CreateLoadBalancer.go +++ b/service/lightsail/api_op_CreateLoadBalancer.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateLoadBalancerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go b/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go index a9dc268e4e7..a92ad26f59c 100644 --- a/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go +++ b/service/lightsail/api_op_CreateLoadBalancerTlsCertificate.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateLoadBalancerTlsCertificateMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLoadBalancerTlsCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateRelationalDatabase.go b/service/lightsail/api_op_CreateRelationalDatabase.go index b6cdf915704..5f9fa801338 100644 --- a/service/lightsail/api_op_CreateRelationalDatabase.go +++ b/service/lightsail/api_op_CreateRelationalDatabase.go @@ -302,6 +302,9 @@ func (c *Client) addOperationCreateRelationalDatabaseMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateRelationalDatabaseFromSnapshot.go b/service/lightsail/api_op_CreateRelationalDatabaseFromSnapshot.go index 32bf0959d14..4585212e354 100644 --- a/service/lightsail/api_op_CreateRelationalDatabaseFromSnapshot.go +++ b/service/lightsail/api_op_CreateRelationalDatabaseFromSnapshot.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateRelationalDatabaseFromSnapshotMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRelationalDatabaseFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_CreateRelationalDatabaseSnapshot.go b/service/lightsail/api_op_CreateRelationalDatabaseSnapshot.go index 7122d93af2c..910c65e9e7d 100644 --- a/service/lightsail/api_op_CreateRelationalDatabaseSnapshot.go +++ b/service/lightsail/api_op_CreateRelationalDatabaseSnapshot.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateRelationalDatabaseSnapshotMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRelationalDatabaseSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteAlarm.go b/service/lightsail/api_op_DeleteAlarm.go index 5179c0fc74f..0bee9eee52d 100644 --- a/service/lightsail/api_op_DeleteAlarm.go +++ b/service/lightsail/api_op_DeleteAlarm.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteAlarmMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteAutoSnapshot.go b/service/lightsail/api_op_DeleteAutoSnapshot.go index d30859d6a98..b8fb6369bfa 100644 --- a/service/lightsail/api_op_DeleteAutoSnapshot.go +++ b/service/lightsail/api_op_DeleteAutoSnapshot.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteAutoSnapshotMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAutoSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteBucket.go b/service/lightsail/api_op_DeleteBucket.go index 53fcc5aee90..98f180dbe7e 100644 --- a/service/lightsail/api_op_DeleteBucket.go +++ b/service/lightsail/api_op_DeleteBucket.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteBucketAccessKey.go b/service/lightsail/api_op_DeleteBucketAccessKey.go index 94238b3dcaf..489d9ad8a84 100644 --- a/service/lightsail/api_op_DeleteBucketAccessKey.go +++ b/service/lightsail/api_op_DeleteBucketAccessKey.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteBucketAccessKeyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBucketAccessKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteCertificate.go b/service/lightsail/api_op_DeleteCertificate.go index 0c275d4b315..d770599c052 100644 --- a/service/lightsail/api_op_DeleteCertificate.go +++ b/service/lightsail/api_op_DeleteCertificate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteContactMethod.go b/service/lightsail/api_op_DeleteContactMethod.go index 982f675fafa..b4d75ed3876 100644 --- a/service/lightsail/api_op_DeleteContactMethod.go +++ b/service/lightsail/api_op_DeleteContactMethod.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteContactMethodMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteContainerImage.go b/service/lightsail/api_op_DeleteContainerImage.go index acd89d7a992..f30774a4dfd 100644 --- a/service/lightsail/api_op_DeleteContainerImage.go +++ b/service/lightsail/api_op_DeleteContainerImage.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteContainerImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContainerImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteContainerService.go b/service/lightsail/api_op_DeleteContainerService.go index c5f82bf45f2..2cd1f32cee7 100644 --- a/service/lightsail/api_op_DeleteContainerService.go +++ b/service/lightsail/api_op_DeleteContainerService.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteContainerServiceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContainerServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteDisk.go b/service/lightsail/api_op_DeleteDisk.go index 383ef355b3d..bacc44ff218 100644 --- a/service/lightsail/api_op_DeleteDisk.go +++ b/service/lightsail/api_op_DeleteDisk.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteDiskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDiskValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteDiskSnapshot.go b/service/lightsail/api_op_DeleteDiskSnapshot.go index c7eb42ccfd5..20e8f69915d 100644 --- a/service/lightsail/api_op_DeleteDiskSnapshot.go +++ b/service/lightsail/api_op_DeleteDiskSnapshot.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteDiskSnapshotMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDiskSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteDistribution.go b/service/lightsail/api_op_DeleteDistribution.go index c024c528e17..ae77620d090 100644 --- a/service/lightsail/api_op_DeleteDistribution.go +++ b/service/lightsail/api_op_DeleteDistribution.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteDistributionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDistribution(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteDomain.go b/service/lightsail/api_op_DeleteDomain.go index eed09f96d68..ff384097698 100644 --- a/service/lightsail/api_op_DeleteDomain.go +++ b/service/lightsail/api_op_DeleteDomain.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteDomainEntry.go b/service/lightsail/api_op_DeleteDomainEntry.go index e2f67563a90..7272dc47988 100644 --- a/service/lightsail/api_op_DeleteDomainEntry.go +++ b/service/lightsail/api_op_DeleteDomainEntry.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteDomainEntryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteInstance.go b/service/lightsail/api_op_DeleteInstance.go index a4d67f6d49b..a076dce7e6a 100644 --- a/service/lightsail/api_op_DeleteInstance.go +++ b/service/lightsail/api_op_DeleteInstance.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteInstanceSnapshot.go b/service/lightsail/api_op_DeleteInstanceSnapshot.go index ea8ecd54596..44aed3c4eb7 100644 --- a/service/lightsail/api_op_DeleteInstanceSnapshot.go +++ b/service/lightsail/api_op_DeleteInstanceSnapshot.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteInstanceSnapshotMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteKeyPair.go b/service/lightsail/api_op_DeleteKeyPair.go index ce77a5dad4f..122e32c3dd1 100644 --- a/service/lightsail/api_op_DeleteKeyPair.go +++ b/service/lightsail/api_op_DeleteKeyPair.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteKeyPairMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteKnownHostKeys.go b/service/lightsail/api_op_DeleteKnownHostKeys.go index afffd94fc74..1cedb2a7d9f 100644 --- a/service/lightsail/api_op_DeleteKnownHostKeys.go +++ b/service/lightsail/api_op_DeleteKnownHostKeys.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteKnownHostKeysMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKnownHostKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteLoadBalancer.go b/service/lightsail/api_op_DeleteLoadBalancer.go index 781a79b627b..e781f426717 100644 --- a/service/lightsail/api_op_DeleteLoadBalancer.go +++ b/service/lightsail/api_op_DeleteLoadBalancer.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteLoadBalancerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteLoadBalancerTlsCertificate.go b/service/lightsail/api_op_DeleteLoadBalancerTlsCertificate.go index 2d88202f69b..386d6fb0e00 100644 --- a/service/lightsail/api_op_DeleteLoadBalancerTlsCertificate.go +++ b/service/lightsail/api_op_DeleteLoadBalancerTlsCertificate.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteLoadBalancerTlsCertificateMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoadBalancerTlsCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteRelationalDatabase.go b/service/lightsail/api_op_DeleteRelationalDatabase.go index 1643556efe7..67fe9dce534 100644 --- a/service/lightsail/api_op_DeleteRelationalDatabase.go +++ b/service/lightsail/api_op_DeleteRelationalDatabase.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDeleteRelationalDatabaseMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DeleteRelationalDatabaseSnapshot.go b/service/lightsail/api_op_DeleteRelationalDatabaseSnapshot.go index 0ab36fb8bf6..f736cebe5bb 100644 --- a/service/lightsail/api_op_DeleteRelationalDatabaseSnapshot.go +++ b/service/lightsail/api_op_DeleteRelationalDatabaseSnapshot.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteRelationalDatabaseSnapshotMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRelationalDatabaseSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DetachCertificateFromDistribution.go b/service/lightsail/api_op_DetachCertificateFromDistribution.go index 27ffd461894..fd22d0223bc 100644 --- a/service/lightsail/api_op_DetachCertificateFromDistribution.go +++ b/service/lightsail/api_op_DetachCertificateFromDistribution.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDetachCertificateFromDistributionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachCertificateFromDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DetachDisk.go b/service/lightsail/api_op_DetachDisk.go index 5d7d7b3a02c..0dc018d9f26 100644 --- a/service/lightsail/api_op_DetachDisk.go +++ b/service/lightsail/api_op_DetachDisk.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDetachDiskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachDiskValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DetachInstancesFromLoadBalancer.go b/service/lightsail/api_op_DetachInstancesFromLoadBalancer.go index 96551b9e674..d135e249f31 100644 --- a/service/lightsail/api_op_DetachInstancesFromLoadBalancer.go +++ b/service/lightsail/api_op_DetachInstancesFromLoadBalancer.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDetachInstancesFromLoadBalancerMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachInstancesFromLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DetachStaticIp.go b/service/lightsail/api_op_DetachStaticIp.go index 4a3b7a84b1b..45afe2fb2b5 100644 --- a/service/lightsail/api_op_DetachStaticIp.go +++ b/service/lightsail/api_op_DetachStaticIp.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDetachStaticIpMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachStaticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DisableAddOn.go b/service/lightsail/api_op_DisableAddOn.go index 9732dc2bea9..b4c33c83a47 100644 --- a/service/lightsail/api_op_DisableAddOn.go +++ b/service/lightsail/api_op_DisableAddOn.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisableAddOnMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableAddOnValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_DownloadDefaultKeyPair.go b/service/lightsail/api_op_DownloadDefaultKeyPair.go index f860fab5d1b..f510fd7b12f 100644 --- a/service/lightsail/api_op_DownloadDefaultKeyPair.go +++ b/service/lightsail/api_op_DownloadDefaultKeyPair.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDownloadDefaultKeyPairMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDownloadDefaultKeyPair(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_EnableAddOn.go b/service/lightsail/api_op_EnableAddOn.go index 9ceb507dcb9..740d4d6f004 100644 --- a/service/lightsail/api_op_EnableAddOn.go +++ b/service/lightsail/api_op_EnableAddOn.go @@ -116,6 +116,9 @@ func (c *Client) addOperationEnableAddOnMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableAddOnValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_ExportSnapshot.go b/service/lightsail/api_op_ExportSnapshot.go index c1c056ea22c..8c67aa1f736 100644 --- a/service/lightsail/api_op_ExportSnapshot.go +++ b/service/lightsail/api_op_ExportSnapshot.go @@ -126,6 +126,9 @@ func (c *Client) addOperationExportSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetActiveNames.go b/service/lightsail/api_op_GetActiveNames.go index a9483a31d63..4beb14e7fff 100644 --- a/service/lightsail/api_op_GetActiveNames.go +++ b/service/lightsail/api_op_GetActiveNames.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetActiveNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetActiveNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetAlarms.go b/service/lightsail/api_op_GetAlarms.go index 66042186c4c..35af7638809 100644 --- a/service/lightsail/api_op_GetAlarms.go +++ b/service/lightsail/api_op_GetAlarms.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetAlarmsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAlarms(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetAutoSnapshots.go b/service/lightsail/api_op_GetAutoSnapshots.go index 97533fb882e..04dbe0fdda3 100644 --- a/service/lightsail/api_op_GetAutoSnapshots.go +++ b/service/lightsail/api_op_GetAutoSnapshots.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetAutoSnapshotsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAutoSnapshotsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetBlueprints.go b/service/lightsail/api_op_GetBlueprints.go index 737cf049207..0f126b4d9d3 100644 --- a/service/lightsail/api_op_GetBlueprints.go +++ b/service/lightsail/api_op_GetBlueprints.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetBlueprintsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBlueprints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetBucketAccessKeys.go b/service/lightsail/api_op_GetBucketAccessKeys.go index b5a44a1c837..354be34da42 100644 --- a/service/lightsail/api_op_GetBucketAccessKeys.go +++ b/service/lightsail/api_op_GetBucketAccessKeys.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetBucketAccessKeysMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBucketAccessKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetBucketBundles.go b/service/lightsail/api_op_GetBucketBundles.go index 5ff17403955..47a84ff92b4 100644 --- a/service/lightsail/api_op_GetBucketBundles.go +++ b/service/lightsail/api_op_GetBucketBundles.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetBucketBundlesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketBundles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetBucketMetricData.go b/service/lightsail/api_op_GetBucketMetricData.go index c6b36f828c1..7529df8648e 100644 --- a/service/lightsail/api_op_GetBucketMetricData.go +++ b/service/lightsail/api_op_GetBucketMetricData.go @@ -193,6 +193,9 @@ func (c *Client) addOperationGetBucketMetricDataMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBucketMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetBuckets.go b/service/lightsail/api_op_GetBuckets.go index be22708acd5..f89a3c786e2 100644 --- a/service/lightsail/api_op_GetBuckets.go +++ b/service/lightsail/api_op_GetBuckets.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetBucketsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBuckets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetBundles.go b/service/lightsail/api_op_GetBundles.go index a021b93c98a..3f4d2295288 100644 --- a/service/lightsail/api_op_GetBundles.go +++ b/service/lightsail/api_op_GetBundles.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetBundlesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBundles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetCertificates.go b/service/lightsail/api_op_GetCertificates.go index 18a649aa238..b358448b2a5 100644 --- a/service/lightsail/api_op_GetCertificates.go +++ b/service/lightsail/api_op_GetCertificates.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetCertificatesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCertificates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetCloudFormationStackRecords.go b/service/lightsail/api_op_GetCloudFormationStackRecords.go index e4171fc5d1f..e95a638a210 100644 --- a/service/lightsail/api_op_GetCloudFormationStackRecords.go +++ b/service/lightsail/api_op_GetCloudFormationStackRecords.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetCloudFormationStackRecordsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCloudFormationStackRecords(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetContactMethods.go b/service/lightsail/api_op_GetContactMethods.go index 4821ba46761..b7ccfb97cb5 100644 --- a/service/lightsail/api_op_GetContactMethods.go +++ b/service/lightsail/api_op_GetContactMethods.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetContactMethodsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContactMethods(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerAPIMetadata.go b/service/lightsail/api_op_GetContainerAPIMetadata.go index fc2c9d7e4ad..240442c8ffb 100644 --- a/service/lightsail/api_op_GetContainerAPIMetadata.go +++ b/service/lightsail/api_op_GetContainerAPIMetadata.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetContainerAPIMetadataMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContainerAPIMetadata(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerImages.go b/service/lightsail/api_op_GetContainerImages.go index c8dda41a4b0..0f67ef260b4 100644 --- a/service/lightsail/api_op_GetContainerImages.go +++ b/service/lightsail/api_op_GetContainerImages.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetContainerImagesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerImagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerLog.go b/service/lightsail/api_op_GetContainerLog.go index 2b0196aaa4e..e2e4bc2e349 100644 --- a/service/lightsail/api_op_GetContainerLog.go +++ b/service/lightsail/api_op_GetContainerLog.go @@ -191,6 +191,9 @@ func (c *Client) addOperationGetContainerLogMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerLogValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerServiceDeployments.go b/service/lightsail/api_op_GetContainerServiceDeployments.go index e475c05dfc0..e38e1af9178 100644 --- a/service/lightsail/api_op_GetContainerServiceDeployments.go +++ b/service/lightsail/api_op_GetContainerServiceDeployments.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetContainerServiceDeploymentsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerServiceDeploymentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerServiceMetricData.go b/service/lightsail/api_op_GetContainerServiceMetricData.go index 2063cdb190e..d35fd5e737a 100644 --- a/service/lightsail/api_op_GetContainerServiceMetricData.go +++ b/service/lightsail/api_op_GetContainerServiceMetricData.go @@ -184,6 +184,9 @@ func (c *Client) addOperationGetContainerServiceMetricDataMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerServiceMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerServicePowers.go b/service/lightsail/api_op_GetContainerServicePowers.go index 7bf08d43bab..8c0a4738855 100644 --- a/service/lightsail/api_op_GetContainerServicePowers.go +++ b/service/lightsail/api_op_GetContainerServicePowers.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetContainerServicePowersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContainerServicePowers(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetContainerServices.go b/service/lightsail/api_op_GetContainerServices.go index ccc5a43267c..78ec29cfbea 100644 --- a/service/lightsail/api_op_GetContainerServices.go +++ b/service/lightsail/api_op_GetContainerServices.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetContainerServicesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContainerServices(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetCostEstimate.go b/service/lightsail/api_op_GetCostEstimate.go index fc39ab96756..984fd29dec8 100644 --- a/service/lightsail/api_op_GetCostEstimate.go +++ b/service/lightsail/api_op_GetCostEstimate.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetCostEstimateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCostEstimateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetDisk.go b/service/lightsail/api_op_GetDisk.go index 33430f2f4cd..d774ac6fe91 100644 --- a/service/lightsail/api_op_GetDisk.go +++ b/service/lightsail/api_op_GetDisk.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDiskMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDiskValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetDiskSnapshot.go b/service/lightsail/api_op_GetDiskSnapshot.go index 12ef46359e4..90e7f4c27b2 100644 --- a/service/lightsail/api_op_GetDiskSnapshot.go +++ b/service/lightsail/api_op_GetDiskSnapshot.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDiskSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDiskSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetDiskSnapshots.go b/service/lightsail/api_op_GetDiskSnapshots.go index c40fd7c444b..6a28d1a61d4 100644 --- a/service/lightsail/api_op_GetDiskSnapshots.go +++ b/service/lightsail/api_op_GetDiskSnapshots.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDiskSnapshotsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDiskSnapshots(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetDisks.go b/service/lightsail/api_op_GetDisks.go index 02366d268c0..68420b1a9b7 100644 --- a/service/lightsail/api_op_GetDisks.go +++ b/service/lightsail/api_op_GetDisks.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDisksMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDisks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetDistributionBundles.go b/service/lightsail/api_op_GetDistributionBundles.go index dd4ffab2894..ddfba501165 100644 --- a/service/lightsail/api_op_GetDistributionBundles.go +++ b/service/lightsail/api_op_GetDistributionBundles.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetDistributionBundlesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDistributionBundles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetDistributionLatestCacheReset.go b/service/lightsail/api_op_GetDistributionLatestCacheReset.go index c6bf3d8ca54..fddbb8ba277 100644 --- a/service/lightsail/api_op_GetDistributionLatestCacheReset.go +++ b/service/lightsail/api_op_GetDistributionLatestCacheReset.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetDistributionLatestCacheResetMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDistributionLatestCacheReset(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetDistributionMetricData.go b/service/lightsail/api_op_GetDistributionMetricData.go index bd519df4603..6794407df1c 100644 --- a/service/lightsail/api_op_GetDistributionMetricData.go +++ b/service/lightsail/api_op_GetDistributionMetricData.go @@ -248,6 +248,9 @@ func (c *Client) addOperationGetDistributionMetricDataMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDistributionMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetDistributions.go b/service/lightsail/api_op_GetDistributions.go index 335acdb0e12..fac2508346c 100644 --- a/service/lightsail/api_op_GetDistributions.go +++ b/service/lightsail/api_op_GetDistributions.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetDistributionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDistributions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetDomain.go b/service/lightsail/api_op_GetDomain.go index 58a2189ec53..7b9abc9fbd6 100644 --- a/service/lightsail/api_op_GetDomain.go +++ b/service/lightsail/api_op_GetDomain.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetDomainMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetDomains.go b/service/lightsail/api_op_GetDomains.go index b0a859f80f5..cf1e5e1c7e2 100644 --- a/service/lightsail/api_op_GetDomains.go +++ b/service/lightsail/api_op_GetDomains.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetDomainsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDomains(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetExportSnapshotRecords.go b/service/lightsail/api_op_GetExportSnapshotRecords.go index 9a60dcd8eb2..3e7ecd65d44 100644 --- a/service/lightsail/api_op_GetExportSnapshotRecords.go +++ b/service/lightsail/api_op_GetExportSnapshotRecords.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetExportSnapshotRecordsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetExportSnapshotRecords(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstance.go b/service/lightsail/api_op_GetInstance.go index 949bc22d3dc..cb996c9ac32 100644 --- a/service/lightsail/api_op_GetInstance.go +++ b/service/lightsail/api_op_GetInstance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetInstanceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstanceAccessDetails.go b/service/lightsail/api_op_GetInstanceAccessDetails.go index a55d0160463..2348cc8a8e2 100644 --- a/service/lightsail/api_op_GetInstanceAccessDetails.go +++ b/service/lightsail/api_op_GetInstanceAccessDetails.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetInstanceAccessDetailsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceAccessDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstanceMetricData.go b/service/lightsail/api_op_GetInstanceMetricData.go index ae331ebcfc8..baf7dd6761b 100644 --- a/service/lightsail/api_op_GetInstanceMetricData.go +++ b/service/lightsail/api_op_GetInstanceMetricData.go @@ -267,6 +267,9 @@ func (c *Client) addOperationGetInstanceMetricDataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstancePortStates.go b/service/lightsail/api_op_GetInstancePortStates.go index 9c11b08c505..43e1945fdcd 100644 --- a/service/lightsail/api_op_GetInstancePortStates.go +++ b/service/lightsail/api_op_GetInstancePortStates.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetInstancePortStatesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstancePortStatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstanceSnapshot.go b/service/lightsail/api_op_GetInstanceSnapshot.go index a699a2d0d95..fa980f185e3 100644 --- a/service/lightsail/api_op_GetInstanceSnapshot.go +++ b/service/lightsail/api_op_GetInstanceSnapshot.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetInstanceSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstanceSnapshots.go b/service/lightsail/api_op_GetInstanceSnapshots.go index 8adef2db879..4287ac3bb69 100644 --- a/service/lightsail/api_op_GetInstanceSnapshots.go +++ b/service/lightsail/api_op_GetInstanceSnapshots.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetInstanceSnapshotsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstanceSnapshots(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstanceState.go b/service/lightsail/api_op_GetInstanceState.go index 0af4338eb7a..b969010b3bd 100644 --- a/service/lightsail/api_op_GetInstanceState.go +++ b/service/lightsail/api_op_GetInstanceState.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetInstanceStateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetInstances.go b/service/lightsail/api_op_GetInstances.go index 001a72f569e..2538de7dbfe 100644 --- a/service/lightsail/api_op_GetInstances.go +++ b/service/lightsail/api_op_GetInstances.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetInstancesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstances(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetKeyPair.go b/service/lightsail/api_op_GetKeyPair.go index 85cea9abca6..761b5cfb4ee 100644 --- a/service/lightsail/api_op_GetKeyPair.go +++ b/service/lightsail/api_op_GetKeyPair.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetKeyPairMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetKeyPairs.go b/service/lightsail/api_op_GetKeyPairs.go index d882572f22d..f896e5ccfca 100644 --- a/service/lightsail/api_op_GetKeyPairs.go +++ b/service/lightsail/api_op_GetKeyPairs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetKeyPairsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKeyPairs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetLoadBalancer.go b/service/lightsail/api_op_GetLoadBalancer.go index dab07826906..354829ba1be 100644 --- a/service/lightsail/api_op_GetLoadBalancer.go +++ b/service/lightsail/api_op_GetLoadBalancer.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetLoadBalancerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetLoadBalancerMetricData.go b/service/lightsail/api_op_GetLoadBalancerMetricData.go index f1c86dd59fc..f11943f060a 100644 --- a/service/lightsail/api_op_GetLoadBalancerMetricData.go +++ b/service/lightsail/api_op_GetLoadBalancerMetricData.go @@ -273,6 +273,9 @@ func (c *Client) addOperationGetLoadBalancerMetricDataMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoadBalancerMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetLoadBalancerTlsCertificates.go b/service/lightsail/api_op_GetLoadBalancerTlsCertificates.go index ee38829571e..e58d6890a09 100644 --- a/service/lightsail/api_op_GetLoadBalancerTlsCertificates.go +++ b/service/lightsail/api_op_GetLoadBalancerTlsCertificates.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetLoadBalancerTlsCertificatesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoadBalancerTlsCertificatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetLoadBalancerTlsPolicies.go b/service/lightsail/api_op_GetLoadBalancerTlsPolicies.go index 05672eca07d..88d1be9aa7e 100644 --- a/service/lightsail/api_op_GetLoadBalancerTlsPolicies.go +++ b/service/lightsail/api_op_GetLoadBalancerTlsPolicies.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetLoadBalancerTlsPoliciesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoadBalancerTlsPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetLoadBalancers.go b/service/lightsail/api_op_GetLoadBalancers.go index 34ae4c9b571..c07b49e15b1 100644 --- a/service/lightsail/api_op_GetLoadBalancers.go +++ b/service/lightsail/api_op_GetLoadBalancers.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetLoadBalancersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLoadBalancers(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetOperation.go b/service/lightsail/api_op_GetOperation.go index df7b89b899f..810ab910b41 100644 --- a/service/lightsail/api_op_GetOperation.go +++ b/service/lightsail/api_op_GetOperation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetOperationMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetOperations.go b/service/lightsail/api_op_GetOperations.go index 1d469c7f39c..e3394825201 100644 --- a/service/lightsail/api_op_GetOperations.go +++ b/service/lightsail/api_op_GetOperations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetOperationsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOperations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetOperationsForResource.go b/service/lightsail/api_op_GetOperationsForResource.go index 57e6e0317fb..3337d52c3f7 100644 --- a/service/lightsail/api_op_GetOperationsForResource.go +++ b/service/lightsail/api_op_GetOperationsForResource.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetOperationsForResourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOperationsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRegions.go b/service/lightsail/api_op_GetRegions.go index 46066de95ee..44a96a2e818 100644 --- a/service/lightsail/api_op_GetRegions.go +++ b/service/lightsail/api_op_GetRegions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetRegionsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRegions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabase.go b/service/lightsail/api_op_GetRelationalDatabase.go index 04b983a379a..c0799e9924b 100644 --- a/service/lightsail/api_op_GetRelationalDatabase.go +++ b/service/lightsail/api_op_GetRelationalDatabase.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetRelationalDatabaseMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseBlueprints.go b/service/lightsail/api_op_GetRelationalDatabaseBlueprints.go index 86ea35b98d0..40b1c2efc70 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseBlueprints.go +++ b/service/lightsail/api_op_GetRelationalDatabaseBlueprints.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetRelationalDatabaseBlueprintsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRelationalDatabaseBlueprints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseBundles.go b/service/lightsail/api_op_GetRelationalDatabaseBundles.go index 36363d7c894..e7aa96adc8f 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseBundles.go +++ b/service/lightsail/api_op_GetRelationalDatabaseBundles.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetRelationalDatabaseBundlesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRelationalDatabaseBundles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseEvents.go b/service/lightsail/api_op_GetRelationalDatabaseEvents.go index 9c98b331f53..50d64fc17a6 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseEvents.go +++ b/service/lightsail/api_op_GetRelationalDatabaseEvents.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetRelationalDatabaseEventsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseLogEvents.go b/service/lightsail/api_op_GetRelationalDatabaseLogEvents.go index 624bb6c18f3..38a8cea3d2f 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseLogEvents.go +++ b/service/lightsail/api_op_GetRelationalDatabaseLogEvents.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetRelationalDatabaseLogEventsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseLogEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseLogStreams.go b/service/lightsail/api_op_GetRelationalDatabaseLogStreams.go index ac0bec0394e..06e2d0a6c0a 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseLogStreams.go +++ b/service/lightsail/api_op_GetRelationalDatabaseLogStreams.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetRelationalDatabaseLogStreamsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseLogStreamsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseMasterUserPassword.go b/service/lightsail/api_op_GetRelationalDatabaseMasterUserPassword.go index b92f1bcdb8e..ddf20201b6f 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseMasterUserPassword.go +++ b/service/lightsail/api_op_GetRelationalDatabaseMasterUserPassword.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetRelationalDatabaseMasterUserPasswordMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseMasterUserPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseMetricData.go b/service/lightsail/api_op_GetRelationalDatabaseMetricData.go index bba7009dad2..b4c5703099c 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseMetricData.go +++ b/service/lightsail/api_op_GetRelationalDatabaseMetricData.go @@ -235,6 +235,9 @@ func (c *Client) addOperationGetRelationalDatabaseMetricDataMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseParameters.go b/service/lightsail/api_op_GetRelationalDatabaseParameters.go index a70c7edcc6a..96bd5fb8dc2 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseParameters.go +++ b/service/lightsail/api_op_GetRelationalDatabaseParameters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetRelationalDatabaseParametersMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseSnapshot.go b/service/lightsail/api_op_GetRelationalDatabaseSnapshot.go index e17cca678b3..0982634b5c3 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseSnapshot.go +++ b/service/lightsail/api_op_GetRelationalDatabaseSnapshot.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetRelationalDatabaseSnapshotMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelationalDatabaseSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabaseSnapshots.go b/service/lightsail/api_op_GetRelationalDatabaseSnapshots.go index bdae94e40c2..69f585c3235 100644 --- a/service/lightsail/api_op_GetRelationalDatabaseSnapshots.go +++ b/service/lightsail/api_op_GetRelationalDatabaseSnapshots.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRelationalDatabaseSnapshotsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRelationalDatabaseSnapshots(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetRelationalDatabases.go b/service/lightsail/api_op_GetRelationalDatabases.go index 7eb5c87eb2e..ea4c1c68b1b 100644 --- a/service/lightsail/api_op_GetRelationalDatabases.go +++ b/service/lightsail/api_op_GetRelationalDatabases.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetRelationalDatabasesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRelationalDatabases(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_GetSetupHistory.go b/service/lightsail/api_op_GetSetupHistory.go index 4199f915254..8136148cfb8 100644 --- a/service/lightsail/api_op_GetSetupHistory.go +++ b/service/lightsail/api_op_GetSetupHistory.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetSetupHistoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSetupHistoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetStaticIp.go b/service/lightsail/api_op_GetStaticIp.go index 4c79cfddeec..80271c42eb3 100644 --- a/service/lightsail/api_op_GetStaticIp.go +++ b/service/lightsail/api_op_GetStaticIp.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetStaticIpMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStaticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_GetStaticIps.go b/service/lightsail/api_op_GetStaticIps.go index f6ab014c43b..d4e22a6ece3 100644 --- a/service/lightsail/api_op_GetStaticIps.go +++ b/service/lightsail/api_op_GetStaticIps.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetStaticIpsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetStaticIps(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_ImportKeyPair.go b/service/lightsail/api_op_ImportKeyPair.go index b73248eff56..8977b6a73d5 100644 --- a/service/lightsail/api_op_ImportKeyPair.go +++ b/service/lightsail/api_op_ImportKeyPair.go @@ -113,6 +113,9 @@ func (c *Client) addOperationImportKeyPairMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportKeyPairValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_IsVpcPeered.go b/service/lightsail/api_op_IsVpcPeered.go index 4bc40042708..379d30baccc 100644 --- a/service/lightsail/api_op_IsVpcPeered.go +++ b/service/lightsail/api_op_IsVpcPeered.go @@ -99,6 +99,9 @@ func (c *Client) addOperationIsVpcPeeredMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opIsVpcPeered(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_OpenInstancePublicPorts.go b/service/lightsail/api_op_OpenInstancePublicPorts.go index fe2abae3051..8df0b16c0d0 100644 --- a/service/lightsail/api_op_OpenInstancePublicPorts.go +++ b/service/lightsail/api_op_OpenInstancePublicPorts.go @@ -121,6 +121,9 @@ func (c *Client) addOperationOpenInstancePublicPortsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpOpenInstancePublicPortsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_PeerVpc.go b/service/lightsail/api_op_PeerVpc.go index 78827ef20e7..0a38a8a4784 100644 --- a/service/lightsail/api_op_PeerVpc.go +++ b/service/lightsail/api_op_PeerVpc.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPeerVpcMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPeerVpc(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_PutAlarm.go b/service/lightsail/api_op_PutAlarm.go index d14adabe34b..6a1a2e03ca3 100644 --- a/service/lightsail/api_op_PutAlarm.go +++ b/service/lightsail/api_op_PutAlarm.go @@ -254,6 +254,9 @@ func (c *Client) addOperationPutAlarmMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_PutInstancePublicPorts.go b/service/lightsail/api_op_PutInstancePublicPorts.go index ee00c43b948..a7593fa3f61 100644 --- a/service/lightsail/api_op_PutInstancePublicPorts.go +++ b/service/lightsail/api_op_PutInstancePublicPorts.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutInstancePublicPortsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInstancePublicPortsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_RebootInstance.go b/service/lightsail/api_op_RebootInstance.go index e4feeddff87..80b560aa0b1 100644 --- a/service/lightsail/api_op_RebootInstance.go +++ b/service/lightsail/api_op_RebootInstance.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRebootInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_RebootRelationalDatabase.go b/service/lightsail/api_op_RebootRelationalDatabase.go index b25e38d178a..8c5d9a480e9 100644 --- a/service/lightsail/api_op_RebootRelationalDatabase.go +++ b/service/lightsail/api_op_RebootRelationalDatabase.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRebootRelationalDatabaseMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_RegisterContainerImage.go b/service/lightsail/api_op_RegisterContainerImage.go index 07f9079e901..f6f27053d37 100644 --- a/service/lightsail/api_op_RegisterContainerImage.go +++ b/service/lightsail/api_op_RegisterContainerImage.go @@ -142,6 +142,9 @@ func (c *Client) addOperationRegisterContainerImageMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterContainerImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_ReleaseStaticIp.go b/service/lightsail/api_op_ReleaseStaticIp.go index 0abd0aa4e63..b1062e54d54 100644 --- a/service/lightsail/api_op_ReleaseStaticIp.go +++ b/service/lightsail/api_op_ReleaseStaticIp.go @@ -108,6 +108,9 @@ func (c *Client) addOperationReleaseStaticIpMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReleaseStaticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_ResetDistributionCache.go b/service/lightsail/api_op_ResetDistributionCache.go index 14ed97935eb..0ee99314f5a 100644 --- a/service/lightsail/api_op_ResetDistributionCache.go +++ b/service/lightsail/api_op_ResetDistributionCache.go @@ -120,6 +120,9 @@ func (c *Client) addOperationResetDistributionCacheMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetDistributionCache(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_SendContactMethodVerification.go b/service/lightsail/api_op_SendContactMethodVerification.go index 33718fc40a1..c88b051a082 100644 --- a/service/lightsail/api_op_SendContactMethodVerification.go +++ b/service/lightsail/api_op_SendContactMethodVerification.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSendContactMethodVerificationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendContactMethodVerificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_SetIpAddressType.go b/service/lightsail/api_op_SetIpAddressType.go index b87da91bda4..4e348783016 100644 --- a/service/lightsail/api_op_SetIpAddressType.go +++ b/service/lightsail/api_op_SetIpAddressType.go @@ -142,6 +142,9 @@ func (c *Client) addOperationSetIpAddressTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIpAddressTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_SetResourceAccessForBucket.go b/service/lightsail/api_op_SetResourceAccessForBucket.go index d262d65b9d5..88b5320ee7b 100644 --- a/service/lightsail/api_op_SetResourceAccessForBucket.go +++ b/service/lightsail/api_op_SetResourceAccessForBucket.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSetResourceAccessForBucketMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetResourceAccessForBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_SetupInstanceHttps.go b/service/lightsail/api_op_SetupInstanceHttps.go index c193237541c..d01d735fcb7 100644 --- a/service/lightsail/api_op_SetupInstanceHttps.go +++ b/service/lightsail/api_op_SetupInstanceHttps.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSetupInstanceHttpsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetupInstanceHttpsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_StartGUISession.go b/service/lightsail/api_op_StartGUISession.go index f6069363b4f..2e71cadf245 100644 --- a/service/lightsail/api_op_StartGUISession.go +++ b/service/lightsail/api_op_StartGUISession.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartGUISessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartGUISessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_StartInstance.go b/service/lightsail/api_op_StartInstance.go index b7205f29076..954cd68742e 100644 --- a/service/lightsail/api_op_StartInstance.go +++ b/service/lightsail/api_op_StartInstance.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStartInstanceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_StartRelationalDatabase.go b/service/lightsail/api_op_StartRelationalDatabase.go index 8cc5823454e..aecd3c4b69f 100644 --- a/service/lightsail/api_op_StartRelationalDatabase.go +++ b/service/lightsail/api_op_StartRelationalDatabase.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartRelationalDatabaseMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_StopGUISession.go b/service/lightsail/api_op_StopGUISession.go index 6012b60dd2b..55af2be5003 100644 --- a/service/lightsail/api_op_StopGUISession.go +++ b/service/lightsail/api_op_StopGUISession.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopGUISessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopGUISessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_StopInstance.go b/service/lightsail/api_op_StopInstance.go index 6540895480e..5d08f7adc17 100644 --- a/service/lightsail/api_op_StopInstance.go +++ b/service/lightsail/api_op_StopInstance.go @@ -127,6 +127,9 @@ func (c *Client) addOperationStopInstanceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_StopRelationalDatabase.go b/service/lightsail/api_op_StopRelationalDatabase.go index f94d2d1754f..0341fbae42c 100644 --- a/service/lightsail/api_op_StopRelationalDatabase.go +++ b/service/lightsail/api_op_StopRelationalDatabase.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStopRelationalDatabaseMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_TagResource.go b/service/lightsail/api_op_TagResource.go index 6649701e4ff..294fd72842a 100644 --- a/service/lightsail/api_op_TagResource.go +++ b/service/lightsail/api_op_TagResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_TestAlarm.go b/service/lightsail/api_op_TestAlarm.go index b594c282298..11d1957dc54 100644 --- a/service/lightsail/api_op_TestAlarm.go +++ b/service/lightsail/api_op_TestAlarm.go @@ -132,6 +132,9 @@ func (c *Client) addOperationTestAlarmMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestAlarmValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UnpeerVpc.go b/service/lightsail/api_op_UnpeerVpc.go index 6d6eb1f70bb..0970da1cb70 100644 --- a/service/lightsail/api_op_UnpeerVpc.go +++ b/service/lightsail/api_op_UnpeerVpc.go @@ -102,6 +102,9 @@ func (c *Client) addOperationUnpeerVpcMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnpeerVpc(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_UntagResource.go b/service/lightsail/api_op_UntagResource.go index abc79df19b1..841d1912a5c 100644 --- a/service/lightsail/api_op_UntagResource.go +++ b/service/lightsail/api_op_UntagResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateBucket.go b/service/lightsail/api_op_UpdateBucket.go index 908ea5b0333..08fe5959e80 100644 --- a/service/lightsail/api_op_UpdateBucket.go +++ b/service/lightsail/api_op_UpdateBucket.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateBucketBundle.go b/service/lightsail/api_op_UpdateBucketBundle.go index 5f13bfd2ba0..73c0b9992ef 100644 --- a/service/lightsail/api_op_UpdateBucketBundle.go +++ b/service/lightsail/api_op_UpdateBucketBundle.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateBucketBundleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBucketBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateContainerService.go b/service/lightsail/api_op_UpdateContainerService.go index bc2e73a016c..539c876944e 100644 --- a/service/lightsail/api_op_UpdateContainerService.go +++ b/service/lightsail/api_op_UpdateContainerService.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateContainerServiceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContainerServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateDistribution.go b/service/lightsail/api_op_UpdateDistribution.go index 5f750236e97..e32e23079b1 100644 --- a/service/lightsail/api_op_UpdateDistribution.go +++ b/service/lightsail/api_op_UpdateDistribution.go @@ -156,6 +156,9 @@ func (c *Client) addOperationUpdateDistributionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDistributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateDistributionBundle.go b/service/lightsail/api_op_UpdateDistributionBundle.go index 69a512a8daf..bafabbd6c4a 100644 --- a/service/lightsail/api_op_UpdateDistributionBundle.go +++ b/service/lightsail/api_op_UpdateDistributionBundle.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateDistributionBundleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDistributionBundle(options.Region), middleware.Before); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateDomainEntry.go b/service/lightsail/api_op_UpdateDomainEntry.go index 9ba4957146f..0398b7a6810 100644 --- a/service/lightsail/api_op_UpdateDomainEntry.go +++ b/service/lightsail/api_op_UpdateDomainEntry.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateDomainEntryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateInstanceMetadataOptions.go b/service/lightsail/api_op_UpdateInstanceMetadataOptions.go index 6e8e6efb084..9008dc15f2d 100644 --- a/service/lightsail/api_op_UpdateInstanceMetadataOptions.go +++ b/service/lightsail/api_op_UpdateInstanceMetadataOptions.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateInstanceMetadataOptionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceMetadataOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateLoadBalancerAttribute.go b/service/lightsail/api_op_UpdateLoadBalancerAttribute.go index f6efd226815..774520c9a9e 100644 --- a/service/lightsail/api_op_UpdateLoadBalancerAttribute.go +++ b/service/lightsail/api_op_UpdateLoadBalancerAttribute.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateLoadBalancerAttributeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLoadBalancerAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateRelationalDatabase.go b/service/lightsail/api_op_UpdateRelationalDatabase.go index 848796b964c..7c77ebefb4c 100644 --- a/service/lightsail/api_op_UpdateRelationalDatabase.go +++ b/service/lightsail/api_op_UpdateRelationalDatabase.go @@ -210,6 +210,9 @@ func (c *Client) addOperationUpdateRelationalDatabaseMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRelationalDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/lightsail/api_op_UpdateRelationalDatabaseParameters.go b/service/lightsail/api_op_UpdateRelationalDatabaseParameters.go index b604044ea1f..45a1722c5c9 100644 --- a/service/lightsail/api_op_UpdateRelationalDatabaseParameters.go +++ b/service/lightsail/api_op_UpdateRelationalDatabaseParameters.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateRelationalDatabaseParametersMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRelationalDatabaseParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/location/api_client.go b/service/location/api_client.go index e95d38e6121..18c67230abd 100644 --- a/service/location/api_client.go +++ b/service/location/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/location/api_op_AssociateTrackerConsumer.go b/service/location/api_op_AssociateTrackerConsumer.go index 60b6669b39e..cff76d237ed 100644 --- a/service/location/api_op_AssociateTrackerConsumer.go +++ b/service/location/api_op_AssociateTrackerConsumer.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateTrackerConsumerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAssociateTrackerConsumerMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_BatchDeleteDevicePositionHistory.go b/service/location/api_op_BatchDeleteDevicePositionHistory.go index b9c71b104e0..7d585d005ba 100644 --- a/service/location/api_op_BatchDeleteDevicePositionHistory.go +++ b/service/location/api_op_BatchDeleteDevicePositionHistory.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchDeleteDevicePositionHistoryMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchDeleteDevicePositionHistoryMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_BatchDeleteGeofence.go b/service/location/api_op_BatchDeleteGeofence.go index 647fa11d344..559b02eeccb 100644 --- a/service/location/api_op_BatchDeleteGeofence.go +++ b/service/location/api_op_BatchDeleteGeofence.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchDeleteGeofenceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchDeleteGeofenceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_BatchEvaluateGeofences.go b/service/location/api_op_BatchEvaluateGeofences.go index d9508f4da66..28ede44d522 100644 --- a/service/location/api_op_BatchEvaluateGeofences.go +++ b/service/location/api_op_BatchEvaluateGeofences.go @@ -137,6 +137,9 @@ func (c *Client) addOperationBatchEvaluateGeofencesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchEvaluateGeofencesMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_BatchGetDevicePosition.go b/service/location/api_op_BatchGetDevicePosition.go index 1d0688edee4..10856a7beec 100644 --- a/service/location/api_op_BatchGetDevicePosition.go +++ b/service/location/api_op_BatchGetDevicePosition.go @@ -122,6 +122,9 @@ func (c *Client) addOperationBatchGetDevicePositionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchGetDevicePositionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_BatchPutGeofence.go b/service/location/api_op_BatchPutGeofence.go index fe8a8bb9266..4bc0b45a686 100644 --- a/service/location/api_op_BatchPutGeofence.go +++ b/service/location/api_op_BatchPutGeofence.go @@ -121,6 +121,9 @@ func (c *Client) addOperationBatchPutGeofenceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchPutGeofenceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_BatchUpdateDevicePosition.go b/service/location/api_op_BatchUpdateDevicePosition.go index a964f4b1f5e..f845c5c5154 100644 --- a/service/location/api_op_BatchUpdateDevicePosition.go +++ b/service/location/api_op_BatchUpdateDevicePosition.go @@ -136,6 +136,9 @@ func (c *Client) addOperationBatchUpdateDevicePositionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchUpdateDevicePositionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CalculateRoute.go b/service/location/api_op_CalculateRoute.go index 64126d8773a..e10fd4f7570 100644 --- a/service/location/api_op_CalculateRoute.go +++ b/service/location/api_op_CalculateRoute.go @@ -300,6 +300,9 @@ func (c *Client) addOperationCalculateRouteMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCalculateRouteMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CalculateRouteMatrix.go b/service/location/api_op_CalculateRouteMatrix.go index 6b06cf93867..d40d9173a23 100644 --- a/service/location/api_op_CalculateRouteMatrix.go +++ b/service/location/api_op_CalculateRouteMatrix.go @@ -274,6 +274,9 @@ func (c *Client) addOperationCalculateRouteMatrixMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCalculateRouteMatrixMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CreateGeofenceCollection.go b/service/location/api_op_CreateGeofenceCollection.go index 51a2ddc3835..5a1c1d18a2f 100644 --- a/service/location/api_op_CreateGeofenceCollection.go +++ b/service/location/api_op_CreateGeofenceCollection.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateGeofenceCollectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateGeofenceCollectionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CreateKey.go b/service/location/api_op_CreateKey.go index 0bb3f8c340e..32d7aa27d72 100644 --- a/service/location/api_op_CreateKey.go +++ b/service/location/api_op_CreateKey.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateKeyMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CreateMap.go b/service/location/api_op_CreateMap.go index c671ae32ed3..9b0318a2849 100644 --- a/service/location/api_op_CreateMap.go +++ b/service/location/api_op_CreateMap.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCreateMapMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateMapMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CreatePlaceIndex.go b/service/location/api_op_CreatePlaceIndex.go index 2a9f3de057e..f03671f41ed 100644 --- a/service/location/api_op_CreatePlaceIndex.go +++ b/service/location/api_op_CreatePlaceIndex.go @@ -212,6 +212,9 @@ func (c *Client) addOperationCreatePlaceIndexMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreatePlaceIndexMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CreateRouteCalculator.go b/service/location/api_op_CreateRouteCalculator.go index a02af0b63b1..60651751d35 100644 --- a/service/location/api_op_CreateRouteCalculator.go +++ b/service/location/api_op_CreateRouteCalculator.go @@ -216,6 +216,9 @@ func (c *Client) addOperationCreateRouteCalculatorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateRouteCalculatorMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_CreateTracker.go b/service/location/api_op_CreateTracker.go index 3f98bf075fc..d82826038a4 100644 --- a/service/location/api_op_CreateTracker.go +++ b/service/location/api_op_CreateTracker.go @@ -226,6 +226,9 @@ func (c *Client) addOperationCreateTrackerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateTrackerMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DeleteGeofenceCollection.go b/service/location/api_op_DeleteGeofenceCollection.go index 91b250f3eb2..45a3832da82 100644 --- a/service/location/api_op_DeleteGeofenceCollection.go +++ b/service/location/api_op_DeleteGeofenceCollection.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteGeofenceCollectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteGeofenceCollectionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DeleteKey.go b/service/location/api_op_DeleteKey.go index 836866a9375..7f6d14af4ed 100644 --- a/service/location/api_op_DeleteKey.go +++ b/service/location/api_op_DeleteKey.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteKeyMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DeleteMap.go b/service/location/api_op_DeleteMap.go index ca56104c505..55fc284fa09 100644 --- a/service/location/api_op_DeleteMap.go +++ b/service/location/api_op_DeleteMap.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMapMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteMapMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DeletePlaceIndex.go b/service/location/api_op_DeletePlaceIndex.go index b89df9ed8a3..5916fc6c302 100644 --- a/service/location/api_op_DeletePlaceIndex.go +++ b/service/location/api_op_DeletePlaceIndex.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeletePlaceIndexMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeletePlaceIndexMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DeleteRouteCalculator.go b/service/location/api_op_DeleteRouteCalculator.go index 1aec6432169..efe8b50b2ef 100644 --- a/service/location/api_op_DeleteRouteCalculator.go +++ b/service/location/api_op_DeleteRouteCalculator.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteRouteCalculatorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteRouteCalculatorMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DeleteTracker.go b/service/location/api_op_DeleteTracker.go index adc636a6b27..fe8d77d893c 100644 --- a/service/location/api_op_DeleteTracker.go +++ b/service/location/api_op_DeleteTracker.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteTrackerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteTrackerMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DescribeGeofenceCollection.go b/service/location/api_op_DescribeGeofenceCollection.go index f93a87a2d49..3c1765121da 100644 --- a/service/location/api_op_DescribeGeofenceCollection.go +++ b/service/location/api_op_DescribeGeofenceCollection.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeGeofenceCollectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeGeofenceCollectionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DescribeKey.go b/service/location/api_op_DescribeKey.go index f544f4efe92..a3246b068cd 100644 --- a/service/location/api_op_DescribeKey.go +++ b/service/location/api_op_DescribeKey.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeKeyMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeKeyMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DescribeMap.go b/service/location/api_op_DescribeMap.go index f8cb5db9886..5b306e30229 100644 --- a/service/location/api_op_DescribeMap.go +++ b/service/location/api_op_DescribeMap.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeMapMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeMapMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DescribePlaceIndex.go b/service/location/api_op_DescribePlaceIndex.go index 145ef3b5361..1d2c6908a80 100644 --- a/service/location/api_op_DescribePlaceIndex.go +++ b/service/location/api_op_DescribePlaceIndex.go @@ -166,6 +166,9 @@ func (c *Client) addOperationDescribePlaceIndexMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribePlaceIndexMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DescribeRouteCalculator.go b/service/location/api_op_DescribeRouteCalculator.go index 70485b0e405..63c1495ef23 100644 --- a/service/location/api_op_DescribeRouteCalculator.go +++ b/service/location/api_op_DescribeRouteCalculator.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDescribeRouteCalculatorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeRouteCalculatorMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DescribeTracker.go b/service/location/api_op_DescribeTracker.go index daa65553cfa..6aa0a565f0e 100644 --- a/service/location/api_op_DescribeTracker.go +++ b/service/location/api_op_DescribeTracker.go @@ -180,6 +180,9 @@ func (c *Client) addOperationDescribeTrackerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeTrackerMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_DisassociateTrackerConsumer.go b/service/location/api_op_DisassociateTrackerConsumer.go index fbaffd2b2a8..dbc25ea0b36 100644 --- a/service/location/api_op_DisassociateTrackerConsumer.go +++ b/service/location/api_op_DisassociateTrackerConsumer.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisassociateTrackerConsumerMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDisassociateTrackerConsumerMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_ForecastGeofenceEvents.go b/service/location/api_op_ForecastGeofenceEvents.go index b3e418689e7..6282866c5f4 100644 --- a/service/location/api_op_ForecastGeofenceEvents.go +++ b/service/location/api_op_ForecastGeofenceEvents.go @@ -166,6 +166,9 @@ func (c *Client) addOperationForecastGeofenceEventsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opForecastGeofenceEventsMiddleware(stack); err != nil { return err } @@ -193,41 +196,6 @@ func (c *Client) addOperationForecastGeofenceEventsMiddlewares(stack *middleware return nil } -type endpointPrefix_opForecastGeofenceEventsMiddleware struct { -} - -func (*endpointPrefix_opForecastGeofenceEventsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opForecastGeofenceEventsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opForecastGeofenceEventsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opForecastGeofenceEventsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ForecastGeofenceEventsAPIClient is a client that implements the -// ForecastGeofenceEvents operation. -type ForecastGeofenceEventsAPIClient interface { - ForecastGeofenceEvents(context.Context, *ForecastGeofenceEventsInput, ...func(*Options)) (*ForecastGeofenceEventsOutput, error) -} - -var _ ForecastGeofenceEventsAPIClient = (*Client)(nil) - // ForecastGeofenceEventsPaginatorOptions is the paginator options for // ForecastGeofenceEvents type ForecastGeofenceEventsPaginatorOptions struct { @@ -294,6 +262,9 @@ func (p *ForecastGeofenceEventsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ForecastGeofenceEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -313,6 +284,41 @@ func (p *ForecastGeofenceEventsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +type endpointPrefix_opForecastGeofenceEventsMiddleware struct { +} + +func (*endpointPrefix_opForecastGeofenceEventsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opForecastGeofenceEventsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "geofencing." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opForecastGeofenceEventsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opForecastGeofenceEventsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ForecastGeofenceEventsAPIClient is a client that implements the +// ForecastGeofenceEvents operation. +type ForecastGeofenceEventsAPIClient interface { + ForecastGeofenceEvents(context.Context, *ForecastGeofenceEventsInput, ...func(*Options)) (*ForecastGeofenceEventsOutput, error) +} + +var _ ForecastGeofenceEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opForecastGeofenceEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetDevicePosition.go b/service/location/api_op_GetDevicePosition.go index cc6f6c014ff..68ac0e185b9 100644 --- a/service/location/api_op_GetDevicePosition.go +++ b/service/location/api_op_GetDevicePosition.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetDevicePositionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetDevicePositionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_GetDevicePositionHistory.go b/service/location/api_op_GetDevicePositionHistory.go index 3e30c3dd1fb..06d8c9a8f61 100644 --- a/service/location/api_op_GetDevicePositionHistory.go +++ b/service/location/api_op_GetDevicePositionHistory.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetDevicePositionHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetDevicePositionHistoryMiddleware(stack); err != nil { return err } @@ -182,41 +185,6 @@ func (c *Client) addOperationGetDevicePositionHistoryMiddlewares(stack *middlewa return nil } -type endpointPrefix_opGetDevicePositionHistoryMiddleware struct { -} - -func (*endpointPrefix_opGetDevicePositionHistoryMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetDevicePositionHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetDevicePositionHistoryMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetDevicePositionHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetDevicePositionHistoryAPIClient is a client that implements the -// GetDevicePositionHistory operation. -type GetDevicePositionHistoryAPIClient interface { - GetDevicePositionHistory(context.Context, *GetDevicePositionHistoryInput, ...func(*Options)) (*GetDevicePositionHistoryOutput, error) -} - -var _ GetDevicePositionHistoryAPIClient = (*Client)(nil) - // GetDevicePositionHistoryPaginatorOptions is the paginator options for // GetDevicePositionHistory type GetDevicePositionHistoryPaginatorOptions struct { @@ -284,6 +252,9 @@ func (p *GetDevicePositionHistoryPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDevicePositionHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -303,6 +274,41 @@ func (p *GetDevicePositionHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opGetDevicePositionHistoryMiddleware struct { +} + +func (*endpointPrefix_opGetDevicePositionHistoryMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetDevicePositionHistoryMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "tracking." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetDevicePositionHistoryMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetDevicePositionHistoryMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetDevicePositionHistoryAPIClient is a client that implements the +// GetDevicePositionHistory operation. +type GetDevicePositionHistoryAPIClient interface { + GetDevicePositionHistory(context.Context, *GetDevicePositionHistoryInput, ...func(*Options)) (*GetDevicePositionHistoryOutput, error) +} + +var _ GetDevicePositionHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDevicePositionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_GetGeofence.go b/service/location/api_op_GetGeofence.go index 88e4636da56..a328b116013 100644 --- a/service/location/api_op_GetGeofence.go +++ b/service/location/api_op_GetGeofence.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetGeofenceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetGeofenceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_GetMapGlyphs.go b/service/location/api_op_GetMapGlyphs.go index b2fe9094dfe..f2cc98cfb20 100644 --- a/service/location/api_op_GetMapGlyphs.go +++ b/service/location/api_op_GetMapGlyphs.go @@ -179,6 +179,9 @@ func (c *Client) addOperationGetMapGlyphsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMapGlyphsMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_GetMapSprites.go b/service/location/api_op_GetMapSprites.go index bf501860116..0d7e8c4b391 100644 --- a/service/location/api_op_GetMapSprites.go +++ b/service/location/api_op_GetMapSprites.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetMapSpritesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMapSpritesMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_GetMapStyleDescriptor.go b/service/location/api_op_GetMapStyleDescriptor.go index e905d48582a..ec1b2d64a82 100644 --- a/service/location/api_op_GetMapStyleDescriptor.go +++ b/service/location/api_op_GetMapStyleDescriptor.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetMapStyleDescriptorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMapStyleDescriptorMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_GetMapTile.go b/service/location/api_op_GetMapTile.go index e4a7248bf80..3ac51c6d764 100644 --- a/service/location/api_op_GetMapTile.go +++ b/service/location/api_op_GetMapTile.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetMapTileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetMapTileMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_GetPlace.go b/service/location/api_op_GetPlace.go index ede0791c972..b390788da13 100644 --- a/service/location/api_op_GetPlace.go +++ b/service/location/api_op_GetPlace.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetPlaceMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetPlaceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_ListDevicePositions.go b/service/location/api_op_ListDevicePositions.go index eca3cb25e73..97fb02fd078 100644 --- a/service/location/api_op_ListDevicePositions.go +++ b/service/location/api_op_ListDevicePositions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListDevicePositionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListDevicePositionsMiddleware(stack); err != nil { return err } @@ -153,41 +156,6 @@ func (c *Client) addOperationListDevicePositionsMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListDevicePositionsMiddleware struct { -} - -func (*endpointPrefix_opListDevicePositionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListDevicePositionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "tracking." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListDevicePositionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListDevicePositionsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListDevicePositionsAPIClient is a client that implements the -// ListDevicePositions operation. -type ListDevicePositionsAPIClient interface { - ListDevicePositions(context.Context, *ListDevicePositionsInput, ...func(*Options)) (*ListDevicePositionsOutput, error) -} - -var _ ListDevicePositionsAPIClient = (*Client)(nil) - // ListDevicePositionsPaginatorOptions is the paginator options for // ListDevicePositions type ListDevicePositionsPaginatorOptions struct { @@ -254,6 +222,9 @@ func (p *ListDevicePositionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevicePositions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +244,41 @@ func (p *ListDevicePositionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListDevicePositionsMiddleware struct { +} + +func (*endpointPrefix_opListDevicePositionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListDevicePositionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "tracking." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListDevicePositionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListDevicePositionsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListDevicePositionsAPIClient is a client that implements the +// ListDevicePositions operation. +type ListDevicePositionsAPIClient interface { + ListDevicePositions(context.Context, *ListDevicePositionsInput, ...func(*Options)) (*ListDevicePositionsOutput, error) +} + +var _ ListDevicePositionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevicePositions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListGeofenceCollections.go b/service/location/api_op_ListGeofenceCollections.go index 56f31ae5757..3d10416e385 100644 --- a/service/location/api_op_ListGeofenceCollections.go +++ b/service/location/api_op_ListGeofenceCollections.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListGeofenceCollectionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListGeofenceCollectionsMiddleware(stack); err != nil { return err } @@ -142,41 +145,6 @@ func (c *Client) addOperationListGeofenceCollectionsMiddlewares(stack *middlewar return nil } -type endpointPrefix_opListGeofenceCollectionsMiddleware struct { -} - -func (*endpointPrefix_opListGeofenceCollectionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListGeofenceCollectionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.geofencing." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListGeofenceCollectionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListGeofenceCollectionsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListGeofenceCollectionsAPIClient is a client that implements the -// ListGeofenceCollections operation. -type ListGeofenceCollectionsAPIClient interface { - ListGeofenceCollections(context.Context, *ListGeofenceCollectionsInput, ...func(*Options)) (*ListGeofenceCollectionsOutput, error) -} - -var _ ListGeofenceCollectionsAPIClient = (*Client)(nil) - // ListGeofenceCollectionsPaginatorOptions is the paginator options for // ListGeofenceCollections type ListGeofenceCollectionsPaginatorOptions struct { @@ -244,6 +212,9 @@ func (p *ListGeofenceCollectionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGeofenceCollections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +234,41 @@ func (p *ListGeofenceCollectionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opListGeofenceCollectionsMiddleware struct { +} + +func (*endpointPrefix_opListGeofenceCollectionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListGeofenceCollectionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.geofencing." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListGeofenceCollectionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListGeofenceCollectionsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListGeofenceCollectionsAPIClient is a client that implements the +// ListGeofenceCollections operation. +type ListGeofenceCollectionsAPIClient interface { + ListGeofenceCollections(context.Context, *ListGeofenceCollectionsInput, ...func(*Options)) (*ListGeofenceCollectionsOutput, error) +} + +var _ ListGeofenceCollectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGeofenceCollections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListGeofences.go b/service/location/api_op_ListGeofences.go index bf0505ab3ce..353e1dc3b8d 100644 --- a/service/location/api_op_ListGeofences.go +++ b/service/location/api_op_ListGeofences.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListGeofencesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListGeofencesMiddleware(stack); err != nil { return err } @@ -150,40 +153,6 @@ func (c *Client) addOperationListGeofencesMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opListGeofencesMiddleware struct { -} - -func (*endpointPrefix_opListGeofencesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListGeofencesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "geofencing." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListGeofencesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListGeofencesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListGeofencesAPIClient is a client that implements the ListGeofences operation. -type ListGeofencesAPIClient interface { - ListGeofences(context.Context, *ListGeofencesInput, ...func(*Options)) (*ListGeofencesOutput, error) -} - -var _ ListGeofencesAPIClient = (*Client)(nil) - // ListGeofencesPaginatorOptions is the paginator options for ListGeofences type ListGeofencesPaginatorOptions struct { // An optional limit for the number of geofences returned in a single call. @@ -249,6 +218,9 @@ func (p *ListGeofencesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGeofences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +240,40 @@ func (p *ListGeofencesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +type endpointPrefix_opListGeofencesMiddleware struct { +} + +func (*endpointPrefix_opListGeofencesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListGeofencesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "geofencing." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListGeofencesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListGeofencesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListGeofencesAPIClient is a client that implements the ListGeofences operation. +type ListGeofencesAPIClient interface { + ListGeofences(context.Context, *ListGeofencesInput, ...func(*Options)) (*ListGeofencesOutput, error) +} + +var _ ListGeofencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGeofences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListKeys.go b/service/location/api_op_ListKeys.go index 1c03440ad5a..05003174c4e 100644 --- a/service/location/api_op_ListKeys.go +++ b/service/location/api_op_ListKeys.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListKeysMiddleware(stack); err != nil { return err } @@ -146,40 +149,6 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opListKeysMiddleware struct { -} - -func (*endpointPrefix_opListKeysMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListKeysMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.metadata." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListKeysMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListKeysMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListKeysAPIClient is a client that implements the ListKeys operation. -type ListKeysAPIClient interface { - ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) -} - -var _ ListKeysAPIClient = (*Client)(nil) - // ListKeysPaginatorOptions is the paginator options for ListKeys type ListKeysPaginatorOptions struct { // An optional limit for the number of resources returned in a single call. @@ -245,6 +214,9 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +236,40 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +type endpointPrefix_opListKeysMiddleware struct { +} + +func (*endpointPrefix_opListKeysMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListKeysMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.metadata." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListKeysMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListKeysMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListKeysAPIClient is a client that implements the ListKeys operation. +type ListKeysAPIClient interface { + ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) +} + +var _ ListKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListMaps.go b/service/location/api_op_ListMaps.go index 37a7d7c1aa9..47d2ae21aab 100644 --- a/service/location/api_op_ListMaps.go +++ b/service/location/api_op_ListMaps.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListMapsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListMapsMiddleware(stack); err != nil { return err } @@ -142,40 +145,6 @@ func (c *Client) addOperationListMapsMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opListMapsMiddleware struct { -} - -func (*endpointPrefix_opListMapsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMapsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.maps." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListMapsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListMapsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListMapsAPIClient is a client that implements the ListMaps operation. -type ListMapsAPIClient interface { - ListMaps(context.Context, *ListMapsInput, ...func(*Options)) (*ListMapsOutput, error) -} - -var _ ListMapsAPIClient = (*Client)(nil) - // ListMapsPaginatorOptions is the paginator options for ListMaps type ListMapsPaginatorOptions struct { // An optional limit for the number of resources returned in a single call. @@ -241,6 +210,9 @@ func (p *ListMapsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMaps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +232,40 @@ func (p *ListMapsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +type endpointPrefix_opListMapsMiddleware struct { +} + +func (*endpointPrefix_opListMapsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListMapsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.maps." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListMapsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListMapsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListMapsAPIClient is a client that implements the ListMaps operation. +type ListMapsAPIClient interface { + ListMaps(context.Context, *ListMapsInput, ...func(*Options)) (*ListMapsOutput, error) +} + +var _ ListMapsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMaps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListPlaceIndexes.go b/service/location/api_op_ListPlaceIndexes.go index 8571c9d3589..fb7065a5650 100644 --- a/service/location/api_op_ListPlaceIndexes.go +++ b/service/location/api_op_ListPlaceIndexes.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPlaceIndexesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListPlaceIndexesMiddleware(stack); err != nil { return err } @@ -142,41 +145,6 @@ func (c *Client) addOperationListPlaceIndexesMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListPlaceIndexesMiddleware struct { -} - -func (*endpointPrefix_opListPlaceIndexesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListPlaceIndexesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.places." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListPlaceIndexesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListPlaceIndexesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListPlaceIndexesAPIClient is a client that implements the ListPlaceIndexes -// operation. -type ListPlaceIndexesAPIClient interface { - ListPlaceIndexes(context.Context, *ListPlaceIndexesInput, ...func(*Options)) (*ListPlaceIndexesOutput, error) -} - -var _ ListPlaceIndexesAPIClient = (*Client)(nil) - // ListPlaceIndexesPaginatorOptions is the paginator options for ListPlaceIndexes type ListPlaceIndexesPaginatorOptions struct { // An optional limit for the maximum number of results returned in a single call. @@ -242,6 +210,9 @@ func (p *ListPlaceIndexesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlaceIndexes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +232,41 @@ func (p *ListPlaceIndexesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListPlaceIndexesMiddleware struct { +} + +func (*endpointPrefix_opListPlaceIndexesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListPlaceIndexesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.places." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListPlaceIndexesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListPlaceIndexesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListPlaceIndexesAPIClient is a client that implements the ListPlaceIndexes +// operation. +type ListPlaceIndexesAPIClient interface { + ListPlaceIndexes(context.Context, *ListPlaceIndexesInput, ...func(*Options)) (*ListPlaceIndexesOutput, error) +} + +var _ ListPlaceIndexesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlaceIndexes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListRouteCalculators.go b/service/location/api_op_ListRouteCalculators.go index 070aefc62af..51e468f5168 100644 --- a/service/location/api_op_ListRouteCalculators.go +++ b/service/location/api_op_ListRouteCalculators.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListRouteCalculatorsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListRouteCalculatorsMiddleware(stack); err != nil { return err } @@ -143,41 +146,6 @@ func (c *Client) addOperationListRouteCalculatorsMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListRouteCalculatorsMiddleware struct { -} - -func (*endpointPrefix_opListRouteCalculatorsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListRouteCalculatorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.routes." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListRouteCalculatorsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListRouteCalculatorsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListRouteCalculatorsAPIClient is a client that implements the -// ListRouteCalculators operation. -type ListRouteCalculatorsAPIClient interface { - ListRouteCalculators(context.Context, *ListRouteCalculatorsInput, ...func(*Options)) (*ListRouteCalculatorsOutput, error) -} - -var _ ListRouteCalculatorsAPIClient = (*Client)(nil) - // ListRouteCalculatorsPaginatorOptions is the paginator options for // ListRouteCalculators type ListRouteCalculatorsPaginatorOptions struct { @@ -244,6 +212,9 @@ func (p *ListRouteCalculatorsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRouteCalculators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +234,41 @@ func (p *ListRouteCalculatorsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListRouteCalculatorsMiddleware struct { +} + +func (*endpointPrefix_opListRouteCalculatorsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListRouteCalculatorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.routes." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListRouteCalculatorsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListRouteCalculatorsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListRouteCalculatorsAPIClient is a client that implements the +// ListRouteCalculators operation. +type ListRouteCalculatorsAPIClient interface { + ListRouteCalculators(context.Context, *ListRouteCalculatorsInput, ...func(*Options)) (*ListRouteCalculatorsOutput, error) +} + +var _ ListRouteCalculatorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRouteCalculators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListTagsForResource.go b/service/location/api_op_ListTagsForResource.go index 377bc62c62c..0526e533082 100644 --- a/service/location/api_op_ListTagsForResource.go +++ b/service/location/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_ListTrackerConsumers.go b/service/location/api_op_ListTrackerConsumers.go index 325c2ef0d95..41d0c8fd3a2 100644 --- a/service/location/api_op_ListTrackerConsumers.go +++ b/service/location/api_op_ListTrackerConsumers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTrackerConsumersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTrackerConsumersMiddleware(stack); err != nil { return err } @@ -150,41 +153,6 @@ func (c *Client) addOperationListTrackerConsumersMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListTrackerConsumersMiddleware struct { -} - -func (*endpointPrefix_opListTrackerConsumersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTrackerConsumersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.tracking." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListTrackerConsumersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListTrackerConsumersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListTrackerConsumersAPIClient is a client that implements the -// ListTrackerConsumers operation. -type ListTrackerConsumersAPIClient interface { - ListTrackerConsumers(context.Context, *ListTrackerConsumersInput, ...func(*Options)) (*ListTrackerConsumersOutput, error) -} - -var _ ListTrackerConsumersAPIClient = (*Client)(nil) - // ListTrackerConsumersPaginatorOptions is the paginator options for // ListTrackerConsumers type ListTrackerConsumersPaginatorOptions struct { @@ -251,6 +219,9 @@ func (p *ListTrackerConsumersPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrackerConsumers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +241,41 @@ func (p *ListTrackerConsumersPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListTrackerConsumersMiddleware struct { +} + +func (*endpointPrefix_opListTrackerConsumersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListTrackerConsumersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.tracking." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListTrackerConsumersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListTrackerConsumersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListTrackerConsumersAPIClient is a client that implements the +// ListTrackerConsumers operation. +type ListTrackerConsumersAPIClient interface { + ListTrackerConsumers(context.Context, *ListTrackerConsumersInput, ...func(*Options)) (*ListTrackerConsumersOutput, error) +} + +var _ ListTrackerConsumersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrackerConsumers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_ListTrackers.go b/service/location/api_op_ListTrackers.go index 5e75878475f..1fa28f4da92 100644 --- a/service/location/api_op_ListTrackers.go +++ b/service/location/api_op_ListTrackers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTrackersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTrackersMiddleware(stack); err != nil { return err } @@ -144,40 +147,6 @@ func (c *Client) addOperationListTrackersMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListTrackersMiddleware struct { -} - -func (*endpointPrefix_opListTrackersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListTrackersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "cp.tracking." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListTrackersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListTrackersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListTrackersAPIClient is a client that implements the ListTrackers operation. -type ListTrackersAPIClient interface { - ListTrackers(context.Context, *ListTrackersInput, ...func(*Options)) (*ListTrackersOutput, error) -} - -var _ ListTrackersAPIClient = (*Client)(nil) - // ListTrackersPaginatorOptions is the paginator options for ListTrackers type ListTrackersPaginatorOptions struct { // An optional limit for the number of resources returned in a single call. @@ -243,6 +212,9 @@ func (p *ListTrackersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrackers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +234,40 @@ func (p *ListTrackersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListTrackersMiddleware struct { +} + +func (*endpointPrefix_opListTrackersMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListTrackersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "cp.tracking." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListTrackersMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListTrackersMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListTrackersAPIClient is a client that implements the ListTrackers operation. +type ListTrackersAPIClient interface { + ListTrackers(context.Context, *ListTrackersInput, ...func(*Options)) (*ListTrackersOutput, error) +} + +var _ ListTrackersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrackers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/location/api_op_PutGeofence.go b/service/location/api_op_PutGeofence.go index e17f0ba2e28..b405efbb29f 100644 --- a/service/location/api_op_PutGeofence.go +++ b/service/location/api_op_PutGeofence.go @@ -151,6 +151,9 @@ func (c *Client) addOperationPutGeofenceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutGeofenceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_SearchPlaceIndexForPosition.go b/service/location/api_op_SearchPlaceIndexForPosition.go index f05e26faee9..b4d3d03a379 100644 --- a/service/location/api_op_SearchPlaceIndexForPosition.go +++ b/service/location/api_op_SearchPlaceIndexForPosition.go @@ -158,6 +158,9 @@ func (c *Client) addOperationSearchPlaceIndexForPositionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchPlaceIndexForPositionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_SearchPlaceIndexForSuggestions.go b/service/location/api_op_SearchPlaceIndexForSuggestions.go index 55739389854..e1c888dedb0 100644 --- a/service/location/api_op_SearchPlaceIndexForSuggestions.go +++ b/service/location/api_op_SearchPlaceIndexForSuggestions.go @@ -211,6 +211,9 @@ func (c *Client) addOperationSearchPlaceIndexForSuggestionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchPlaceIndexForSuggestionsMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_SearchPlaceIndexForText.go b/service/location/api_op_SearchPlaceIndexForText.go index b0024bf1881..f993bc1d8be 100644 --- a/service/location/api_op_SearchPlaceIndexForText.go +++ b/service/location/api_op_SearchPlaceIndexForText.go @@ -216,6 +216,9 @@ func (c *Client) addOperationSearchPlaceIndexForTextMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchPlaceIndexForTextMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_TagResource.go b/service/location/api_op_TagResource.go index 9306b6beaa0..fe2af843477 100644 --- a/service/location/api_op_TagResource.go +++ b/service/location/api_op_TagResource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UntagResource.go b/service/location/api_op_UntagResource.go index a2fa8bca161..0b12948c355 100644 --- a/service/location/api_op_UntagResource.go +++ b/service/location/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UpdateGeofenceCollection.go b/service/location/api_op_UpdateGeofenceCollection.go index ba917c09a00..c011a5b39ce 100644 --- a/service/location/api_op_UpdateGeofenceCollection.go +++ b/service/location/api_op_UpdateGeofenceCollection.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateGeofenceCollectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateGeofenceCollectionMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UpdateKey.go b/service/location/api_op_UpdateKey.go index 4f6715ecb3a..b871148d960 100644 --- a/service/location/api_op_UpdateKey.go +++ b/service/location/api_op_UpdateKey.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateKeyMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UpdateMap.go b/service/location/api_op_UpdateMap.go index b99a01d47c8..ff140ff676f 100644 --- a/service/location/api_op_UpdateMap.go +++ b/service/location/api_op_UpdateMap.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateMapMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateMapMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UpdatePlaceIndex.go b/service/location/api_op_UpdatePlaceIndex.go index 14cd044ea03..ddd5a6afd22 100644 --- a/service/location/api_op_UpdatePlaceIndex.go +++ b/service/location/api_op_UpdatePlaceIndex.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdatePlaceIndexMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdatePlaceIndexMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UpdateRouteCalculator.go b/service/location/api_op_UpdateRouteCalculator.go index a5221d89cbf..730d5e18d67 100644 --- a/service/location/api_op_UpdateRouteCalculator.go +++ b/service/location/api_op_UpdateRouteCalculator.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateRouteCalculatorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateRouteCalculatorMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_UpdateTracker.go b/service/location/api_op_UpdateTracker.go index 343057a232d..39c587acf24 100644 --- a/service/location/api_op_UpdateTracker.go +++ b/service/location/api_op_UpdateTracker.go @@ -178,6 +178,9 @@ func (c *Client) addOperationUpdateTrackerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateTrackerMiddleware(stack); err != nil { return err } diff --git a/service/location/api_op_VerifyDevicePosition.go b/service/location/api_op_VerifyDevicePosition.go index 85f3ffdd70b..d4abed520c0 100644 --- a/service/location/api_op_VerifyDevicePosition.go +++ b/service/location/api_op_VerifyDevicePosition.go @@ -149,6 +149,9 @@ func (c *Client) addOperationVerifyDevicePositionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opVerifyDevicePositionMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_client.go b/service/lookoutequipment/api_client.go index 701aaaf7d2a..9730ae82019 100644 --- a/service/lookoutequipment/api_client.go +++ b/service/lookoutequipment/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/lookoutequipment/api_op_CreateDataset.go b/service/lookoutequipment/api_op_CreateDataset.go index e44c3ef5682..b10725de533 100644 --- a/service/lookoutequipment/api_op_CreateDataset.go +++ b/service/lookoutequipment/api_op_CreateDataset.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_CreateInferenceScheduler.go b/service/lookoutequipment/api_op_CreateInferenceScheduler.go index 7da7d86a771..cf896224443 100644 --- a/service/lookoutequipment/api_op_CreateInferenceScheduler.go +++ b/service/lookoutequipment/api_op_CreateInferenceScheduler.go @@ -200,6 +200,9 @@ func (c *Client) addOperationCreateInferenceSchedulerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateInferenceSchedulerMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_CreateLabel.go b/service/lookoutequipment/api_op_CreateLabel.go index e88f34259f3..cb50ede4f8f 100644 --- a/service/lookoutequipment/api_op_CreateLabel.go +++ b/service/lookoutequipment/api_op_CreateLabel.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateLabelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLabelMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_CreateLabelGroup.go b/service/lookoutequipment/api_op_CreateLabelGroup.go index 7b718e833c5..8aaf3ee0da5 100644 --- a/service/lookoutequipment/api_op_CreateLabelGroup.go +++ b/service/lookoutequipment/api_op_CreateLabelGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateLabelGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLabelGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_CreateModel.go b/service/lookoutequipment/api_op_CreateModel.go index 055a49c90ea..390244c40ef 100644 --- a/service/lookoutequipment/api_op_CreateModel.go +++ b/service/lookoutequipment/api_op_CreateModel.go @@ -188,6 +188,9 @@ func (c *Client) addOperationCreateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateModelMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_CreateRetrainingScheduler.go b/service/lookoutequipment/api_op_CreateRetrainingScheduler.go index ad454ada8e2..db8cfb9761a 100644 --- a/service/lookoutequipment/api_op_CreateRetrainingScheduler.go +++ b/service/lookoutequipment/api_op_CreateRetrainingScheduler.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateRetrainingSchedulerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRetrainingSchedulerMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteDataset.go b/service/lookoutequipment/api_op_DeleteDataset.go index 8501c3dc199..22f02336092 100644 --- a/service/lookoutequipment/api_op_DeleteDataset.go +++ b/service/lookoutequipment/api_op_DeleteDataset.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteInferenceScheduler.go b/service/lookoutequipment/api_op_DeleteInferenceScheduler.go index b28bc595af2..ea97ccc51c2 100644 --- a/service/lookoutequipment/api_op_DeleteInferenceScheduler.go +++ b/service/lookoutequipment/api_op_DeleteInferenceScheduler.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteInferenceSchedulerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInferenceSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteLabel.go b/service/lookoutequipment/api_op_DeleteLabel.go index c9367bec471..d3b69e2a936 100644 --- a/service/lookoutequipment/api_op_DeleteLabel.go +++ b/service/lookoutequipment/api_op_DeleteLabel.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteLabelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteLabelGroup.go b/service/lookoutequipment/api_op_DeleteLabelGroup.go index 67d39428e17..45610f1f573 100644 --- a/service/lookoutequipment/api_op_DeleteLabelGroup.go +++ b/service/lookoutequipment/api_op_DeleteLabelGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteLabelGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLabelGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteModel.go b/service/lookoutequipment/api_op_DeleteModel.go index 20c07cbd1f0..c558284fc16 100644 --- a/service/lookoutequipment/api_op_DeleteModel.go +++ b/service/lookoutequipment/api_op_DeleteModel.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteResourcePolicy.go b/service/lookoutequipment/api_op_DeleteResourcePolicy.go index 445e60ecbbc..0701096779f 100644 --- a/service/lookoutequipment/api_op_DeleteResourcePolicy.go +++ b/service/lookoutequipment/api_op_DeleteResourcePolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DeleteRetrainingScheduler.go b/service/lookoutequipment/api_op_DeleteRetrainingScheduler.go index 2fc70c97979..b6319ec8d36 100644 --- a/service/lookoutequipment/api_op_DeleteRetrainingScheduler.go +++ b/service/lookoutequipment/api_op_DeleteRetrainingScheduler.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRetrainingSchedulerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRetrainingSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeDataIngestionJob.go b/service/lookoutequipment/api_op_DescribeDataIngestionJob.go index 3e30ae60794..08bf0482047 100644 --- a/service/lookoutequipment/api_op_DescribeDataIngestionJob.go +++ b/service/lookoutequipment/api_op_DescribeDataIngestionJob.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeDataIngestionJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataIngestionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeDataset.go b/service/lookoutequipment/api_op_DescribeDataset.go index 1df0edca708..de5a2caa746 100644 --- a/service/lookoutequipment/api_op_DescribeDataset.go +++ b/service/lookoutequipment/api_op_DescribeDataset.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeInferenceScheduler.go b/service/lookoutequipment/api_op_DescribeInferenceScheduler.go index 9e6cf6d54af..e53f5e5f7d3 100644 --- a/service/lookoutequipment/api_op_DescribeInferenceScheduler.go +++ b/service/lookoutequipment/api_op_DescribeInferenceScheduler.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDescribeInferenceSchedulerMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInferenceSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeLabel.go b/service/lookoutequipment/api_op_DescribeLabel.go index e05bcd8c001..1d2f6788cf6 100644 --- a/service/lookoutequipment/api_op_DescribeLabel.go +++ b/service/lookoutequipment/api_op_DescribeLabel.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeLabelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeLabelGroup.go b/service/lookoutequipment/api_op_DescribeLabelGroup.go index 95c7be1c98c..213a9d50b84 100644 --- a/service/lookoutequipment/api_op_DescribeLabelGroup.go +++ b/service/lookoutequipment/api_op_DescribeLabelGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeLabelGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLabelGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeModel.go b/service/lookoutequipment/api_op_DescribeModel.go index 67738f9c370..79d76e925c7 100644 --- a/service/lookoutequipment/api_op_DescribeModel.go +++ b/service/lookoutequipment/api_op_DescribeModel.go @@ -291,6 +291,9 @@ func (c *Client) addOperationDescribeModelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeModelVersion.go b/service/lookoutequipment/api_op_DescribeModelVersion.go index 25e6886667f..54ca3ffdf37 100644 --- a/service/lookoutequipment/api_op_DescribeModelVersion.go +++ b/service/lookoutequipment/api_op_DescribeModelVersion.go @@ -268,6 +268,9 @@ func (c *Client) addOperationDescribeModelVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeResourcePolicy.go b/service/lookoutequipment/api_op_DescribeResourcePolicy.go index 321285748e6..a86c9252194 100644 --- a/service/lookoutequipment/api_op_DescribeResourcePolicy.go +++ b/service/lookoutequipment/api_op_DescribeResourcePolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_DescribeRetrainingScheduler.go b/service/lookoutequipment/api_op_DescribeRetrainingScheduler.go index 3445c186674..f735f22eb04 100644 --- a/service/lookoutequipment/api_op_DescribeRetrainingScheduler.go +++ b/service/lookoutequipment/api_op_DescribeRetrainingScheduler.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeRetrainingSchedulerMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRetrainingSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_ImportDataset.go b/service/lookoutequipment/api_op_ImportDataset.go index 675f30df784..75bf7c2d6c3 100644 --- a/service/lookoutequipment/api_op_ImportDataset.go +++ b/service/lookoutequipment/api_op_ImportDataset.go @@ -133,6 +133,9 @@ func (c *Client) addOperationImportDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_ImportModelVersion.go b/service/lookoutequipment/api_op_ImportModelVersion.go index e1aae98e045..18e7ee33018 100644 --- a/service/lookoutequipment/api_op_ImportModelVersion.go +++ b/service/lookoutequipment/api_op_ImportModelVersion.go @@ -161,6 +161,9 @@ func (c *Client) addOperationImportModelVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportModelVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_ListDataIngestionJobs.go b/service/lookoutequipment/api_op_ListDataIngestionJobs.go index 084cbe86ace..9e2e77b78d5 100644 --- a/service/lookoutequipment/api_op_ListDataIngestionJobs.go +++ b/service/lookoutequipment/api_op_ListDataIngestionJobs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDataIngestionJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataIngestionJobs(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListDataIngestionJobsMiddlewares(stack *middleware. return nil } -// ListDataIngestionJobsAPIClient is a client that implements the -// ListDataIngestionJobs operation. -type ListDataIngestionJobsAPIClient interface { - ListDataIngestionJobs(context.Context, *ListDataIngestionJobsInput, ...func(*Options)) (*ListDataIngestionJobsOutput, error) -} - -var _ ListDataIngestionJobsAPIClient = (*Client)(nil) - // ListDataIngestionJobsPaginatorOptions is the paginator options for // ListDataIngestionJobs type ListDataIngestionJobsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListDataIngestionJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataIngestionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListDataIngestionJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDataIngestionJobsAPIClient is a client that implements the +// ListDataIngestionJobs operation. +type ListDataIngestionJobsAPIClient interface { + ListDataIngestionJobs(context.Context, *ListDataIngestionJobsInput, ...func(*Options)) (*ListDataIngestionJobsOutput, error) +} + +var _ ListDataIngestionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataIngestionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListDatasets.go b/service/lookoutequipment/api_op_ListDatasets.go index 113620fb90d..f6e9278460b 100644 --- a/service/lookoutequipment/api_op_ListDatasets.go +++ b/service/lookoutequipment/api_op_ListDatasets.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // Specifies the maximum number of datasets to list. @@ -208,6 +204,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListInferenceEvents.go b/service/lookoutequipment/api_op_ListInferenceEvents.go index df04b79fc5c..fcb973bd6fa 100644 --- a/service/lookoutequipment/api_op_ListInferenceEvents.go +++ b/service/lookoutequipment/api_op_ListInferenceEvents.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListInferenceEventsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInferenceEventsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListInferenceEventsMiddlewares(stack *middleware.St return nil } -// ListInferenceEventsAPIClient is a client that implements the -// ListInferenceEvents operation. -type ListInferenceEventsAPIClient interface { - ListInferenceEvents(context.Context, *ListInferenceEventsInput, ...func(*Options)) (*ListInferenceEventsOutput, error) -} - -var _ ListInferenceEventsAPIClient = (*Client)(nil) - // ListInferenceEventsPaginatorOptions is the paginator options for // ListInferenceEvents type ListInferenceEventsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListInferenceEventsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListInferenceEventsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListInferenceEventsAPIClient is a client that implements the +// ListInferenceEvents operation. +type ListInferenceEventsAPIClient interface { + ListInferenceEvents(context.Context, *ListInferenceEventsInput, ...func(*Options)) (*ListInferenceEventsOutput, error) +} + +var _ ListInferenceEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListInferenceExecutions.go b/service/lookoutequipment/api_op_ListInferenceExecutions.go index 53339233061..2e9040ce42c 100644 --- a/service/lookoutequipment/api_op_ListInferenceExecutions.go +++ b/service/lookoutequipment/api_op_ListInferenceExecutions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListInferenceExecutionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInferenceExecutionsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListInferenceExecutionsMiddlewares(stack *middlewar return nil } -// ListInferenceExecutionsAPIClient is a client that implements the -// ListInferenceExecutions operation. -type ListInferenceExecutionsAPIClient interface { - ListInferenceExecutions(context.Context, *ListInferenceExecutionsInput, ...func(*Options)) (*ListInferenceExecutionsOutput, error) -} - -var _ ListInferenceExecutionsAPIClient = (*Client)(nil) - // ListInferenceExecutionsPaginatorOptions is the paginator options for // ListInferenceExecutions type ListInferenceExecutionsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListInferenceExecutionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListInferenceExecutionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInferenceExecutionsAPIClient is a client that implements the +// ListInferenceExecutions operation. +type ListInferenceExecutionsAPIClient interface { + ListInferenceExecutions(context.Context, *ListInferenceExecutionsInput, ...func(*Options)) (*ListInferenceExecutionsOutput, error) +} + +var _ ListInferenceExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListInferenceSchedulers.go b/service/lookoutequipment/api_op_ListInferenceSchedulers.go index 8bf839dc7df..913d9947f9e 100644 --- a/service/lookoutequipment/api_op_ListInferenceSchedulers.go +++ b/service/lookoutequipment/api_op_ListInferenceSchedulers.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListInferenceSchedulersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInferenceSchedulers(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListInferenceSchedulersMiddlewares(stack *middlewar return nil } -// ListInferenceSchedulersAPIClient is a client that implements the -// ListInferenceSchedulers operation. -type ListInferenceSchedulersAPIClient interface { - ListInferenceSchedulers(context.Context, *ListInferenceSchedulersInput, ...func(*Options)) (*ListInferenceSchedulersOutput, error) -} - -var _ ListInferenceSchedulersAPIClient = (*Client)(nil) - // ListInferenceSchedulersPaginatorOptions is the paginator options for // ListInferenceSchedulers type ListInferenceSchedulersPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListInferenceSchedulersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceSchedulers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListInferenceSchedulersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInferenceSchedulersAPIClient is a client that implements the +// ListInferenceSchedulers operation. +type ListInferenceSchedulersAPIClient interface { + ListInferenceSchedulers(context.Context, *ListInferenceSchedulersInput, ...func(*Options)) (*ListInferenceSchedulersOutput, error) +} + +var _ ListInferenceSchedulersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceSchedulers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListLabelGroups.go b/service/lookoutequipment/api_op_ListLabelGroups.go index 07c0f3f2e85..1ec42ccb3a0 100644 --- a/service/lookoutequipment/api_op_ListLabelGroups.go +++ b/service/lookoutequipment/api_op_ListLabelGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListLabelGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLabelGroups(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListLabelGroupsMiddlewares(stack *middleware.Stack, return nil } -// ListLabelGroupsAPIClient is a client that implements the ListLabelGroups -// operation. -type ListLabelGroupsAPIClient interface { - ListLabelGroups(context.Context, *ListLabelGroupsInput, ...func(*Options)) (*ListLabelGroupsOutput, error) -} - -var _ ListLabelGroupsAPIClient = (*Client)(nil) - // ListLabelGroupsPaginatorOptions is the paginator options for ListLabelGroups type ListLabelGroupsPaginatorOptions struct { // Specifies the maximum number of label groups to list. @@ -207,6 +202,9 @@ func (p *ListLabelGroupsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLabelGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListLabelGroupsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListLabelGroupsAPIClient is a client that implements the ListLabelGroups +// operation. +type ListLabelGroupsAPIClient interface { + ListLabelGroups(context.Context, *ListLabelGroupsInput, ...func(*Options)) (*ListLabelGroupsOutput, error) +} + +var _ ListLabelGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLabelGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListLabels.go b/service/lookoutequipment/api_op_ListLabels.go index 5632a4f0572..b7d62d46bc0 100644 --- a/service/lookoutequipment/api_op_ListLabels.go +++ b/service/lookoutequipment/api_op_ListLabels.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListLabelsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLabelsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListLabelsMiddlewares(stack *middleware.Stack, opti return nil } -// ListLabelsAPIClient is a client that implements the ListLabels operation. -type ListLabelsAPIClient interface { - ListLabels(context.Context, *ListLabelsInput, ...func(*Options)) (*ListLabelsOutput, error) -} - -var _ ListLabelsAPIClient = (*Client)(nil) - // ListLabelsPaginatorOptions is the paginator options for ListLabels type ListLabelsPaginatorOptions struct { // Specifies the maximum number of labels to list. @@ -229,6 +225,9 @@ func (p *ListLabelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLabels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *ListLabelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListLabelsAPIClient is a client that implements the ListLabels operation. +type ListLabelsAPIClient interface { + ListLabels(context.Context, *ListLabelsInput, ...func(*Options)) (*ListLabelsOutput, error) +} + +var _ ListLabelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLabels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListModelVersions.go b/service/lookoutequipment/api_op_ListModelVersions.go index 0d181153edd..fe5f24c0f3f 100644 --- a/service/lookoutequipment/api_op_ListModelVersions.go +++ b/service/lookoutequipment/api_op_ListModelVersions.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListModelVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelVersionsValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationListModelVersionsMiddlewares(stack *middleware.Stac return nil } -// ListModelVersionsAPIClient is a client that implements the ListModelVersions -// operation. -type ListModelVersionsAPIClient interface { - ListModelVersions(context.Context, *ListModelVersionsInput, ...func(*Options)) (*ListModelVersionsOutput, error) -} - -var _ ListModelVersionsAPIClient = (*Client)(nil) - // ListModelVersionsPaginatorOptions is the paginator options for ListModelVersions type ListModelVersionsPaginatorOptions struct { // Specifies the maximum number of machine learning model versions to list. @@ -243,6 +238,9 @@ func (p *ListModelVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *ListModelVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListModelVersionsAPIClient is a client that implements the ListModelVersions +// operation. +type ListModelVersionsAPIClient interface { + ListModelVersions(context.Context, *ListModelVersionsInput, ...func(*Options)) (*ListModelVersionsOutput, error) +} + +var _ ListModelVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListModels.go b/service/lookoutequipment/api_op_ListModels.go index 1896474380e..68f59f3adaa 100644 --- a/service/lookoutequipment/api_op_ListModels.go +++ b/service/lookoutequipment/api_op_ListModels.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListModelsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModels(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListModelsMiddlewares(stack *middleware.Stack, opti return nil } -// ListModelsAPIClient is a client that implements the ListModels operation. -type ListModelsAPIClient interface { - ListModels(context.Context, *ListModelsInput, ...func(*Options)) (*ListModelsOutput, error) -} - -var _ ListModelsAPIClient = (*Client)(nil) - // ListModelsPaginatorOptions is the paginator options for ListModels type ListModelsPaginatorOptions struct { // Specifies the maximum number of machine learning models to list. @@ -215,6 +211,9 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListModelsAPIClient is a client that implements the ListModels operation. +type ListModelsAPIClient interface { + ListModels(context.Context, *ListModelsInput, ...func(*Options)) (*ListModelsOutput, error) +} + +var _ ListModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListRetrainingSchedulers.go b/service/lookoutequipment/api_op_ListRetrainingSchedulers.go index 50d6fd63302..ef0310523e4 100644 --- a/service/lookoutequipment/api_op_ListRetrainingSchedulers.go +++ b/service/lookoutequipment/api_op_ListRetrainingSchedulers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListRetrainingSchedulersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRetrainingSchedulers(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListRetrainingSchedulersMiddlewares(stack *middlewa return nil } -// ListRetrainingSchedulersAPIClient is a client that implements the -// ListRetrainingSchedulers operation. -type ListRetrainingSchedulersAPIClient interface { - ListRetrainingSchedulers(context.Context, *ListRetrainingSchedulersInput, ...func(*Options)) (*ListRetrainingSchedulersOutput, error) -} - -var _ ListRetrainingSchedulersAPIClient = (*Client)(nil) - // ListRetrainingSchedulersPaginatorOptions is the paginator options for // ListRetrainingSchedulers type ListRetrainingSchedulersPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListRetrainingSchedulersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRetrainingSchedulers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListRetrainingSchedulersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListRetrainingSchedulersAPIClient is a client that implements the +// ListRetrainingSchedulers operation. +type ListRetrainingSchedulersAPIClient interface { + ListRetrainingSchedulers(context.Context, *ListRetrainingSchedulersInput, ...func(*Options)) (*ListRetrainingSchedulersOutput, error) +} + +var _ ListRetrainingSchedulersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRetrainingSchedulers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListSensorStatistics.go b/service/lookoutequipment/api_op_ListSensorStatistics.go index e3225cf857b..eea923f5642 100644 --- a/service/lookoutequipment/api_op_ListSensorStatistics.go +++ b/service/lookoutequipment/api_op_ListSensorStatistics.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListSensorStatisticsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSensorStatisticsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListSensorStatisticsMiddlewares(stack *middleware.S return nil } -// ListSensorStatisticsAPIClient is a client that implements the -// ListSensorStatistics operation. -type ListSensorStatisticsAPIClient interface { - ListSensorStatistics(context.Context, *ListSensorStatisticsInput, ...func(*Options)) (*ListSensorStatisticsOutput, error) -} - -var _ ListSensorStatisticsAPIClient = (*Client)(nil) - // ListSensorStatisticsPaginatorOptions is the paginator options for // ListSensorStatistics type ListSensorStatisticsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListSensorStatisticsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSensorStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListSensorStatisticsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSensorStatisticsAPIClient is a client that implements the +// ListSensorStatistics operation. +type ListSensorStatisticsAPIClient interface { + ListSensorStatistics(context.Context, *ListSensorStatisticsInput, ...func(*Options)) (*ListSensorStatisticsOutput, error) +} + +var _ ListSensorStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSensorStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutequipment/api_op_ListTagsForResource.go b/service/lookoutequipment/api_op_ListTagsForResource.go index 11646cf0112..db87d2f7aea 100644 --- a/service/lookoutequipment/api_op_ListTagsForResource.go +++ b/service/lookoutequipment/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_PutResourcePolicy.go b/service/lookoutequipment/api_op_PutResourcePolicy.go index 93b1dcf1517..0007a44bfca 100644 --- a/service/lookoutequipment/api_op_PutResourcePolicy.go +++ b/service/lookoutequipment/api_op_PutResourcePolicy.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutResourcePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_StartDataIngestionJob.go b/service/lookoutequipment/api_op_StartDataIngestionJob.go index 372d63824b6..dbef5f3d070 100644 --- a/service/lookoutequipment/api_op_StartDataIngestionJob.go +++ b/service/lookoutequipment/api_op_StartDataIngestionJob.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartDataIngestionJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartDataIngestionJobMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutequipment/api_op_StartInferenceScheduler.go b/service/lookoutequipment/api_op_StartInferenceScheduler.go index 9c7d2a20e67..a13f6a3ade2 100644 --- a/service/lookoutequipment/api_op_StartInferenceScheduler.go +++ b/service/lookoutequipment/api_op_StartInferenceScheduler.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartInferenceSchedulerMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInferenceSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_StartRetrainingScheduler.go b/service/lookoutequipment/api_op_StartRetrainingScheduler.go index ecd2b6db130..8c1fb213c5b 100644 --- a/service/lookoutequipment/api_op_StartRetrainingScheduler.go +++ b/service/lookoutequipment/api_op_StartRetrainingScheduler.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStartRetrainingSchedulerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRetrainingSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_StopInferenceScheduler.go b/service/lookoutequipment/api_op_StopInferenceScheduler.go index 18a2daeff45..90faca586d8 100644 --- a/service/lookoutequipment/api_op_StopInferenceScheduler.go +++ b/service/lookoutequipment/api_op_StopInferenceScheduler.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStopInferenceSchedulerMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInferenceSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_StopRetrainingScheduler.go b/service/lookoutequipment/api_op_StopRetrainingScheduler.go index 994ed37aad4..b74030e4785 100644 --- a/service/lookoutequipment/api_op_StopRetrainingScheduler.go +++ b/service/lookoutequipment/api_op_StopRetrainingScheduler.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStopRetrainingSchedulerMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopRetrainingSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_TagResource.go b/service/lookoutequipment/api_op_TagResource.go index bb93a7e4ad2..a234ef28d67 100644 --- a/service/lookoutequipment/api_op_TagResource.go +++ b/service/lookoutequipment/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_UntagResource.go b/service/lookoutequipment/api_op_UntagResource.go index 45902919811..4e520530da6 100644 --- a/service/lookoutequipment/api_op_UntagResource.go +++ b/service/lookoutequipment/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_UpdateActiveModelVersion.go b/service/lookoutequipment/api_op_UpdateActiveModelVersion.go index b9e11137f14..c95ba2bfa3f 100644 --- a/service/lookoutequipment/api_op_UpdateActiveModelVersion.go +++ b/service/lookoutequipment/api_op_UpdateActiveModelVersion.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateActiveModelVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateActiveModelVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_UpdateInferenceScheduler.go b/service/lookoutequipment/api_op_UpdateInferenceScheduler.go index 04ea76d95a5..1e660a83eb0 100644 --- a/service/lookoutequipment/api_op_UpdateInferenceScheduler.go +++ b/service/lookoutequipment/api_op_UpdateInferenceScheduler.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateInferenceSchedulerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInferenceSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_UpdateLabelGroup.go b/service/lookoutequipment/api_op_UpdateLabelGroup.go index 6423d25162b..026b03139f4 100644 --- a/service/lookoutequipment/api_op_UpdateLabelGroup.go +++ b/service/lookoutequipment/api_op_UpdateLabelGroup.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateLabelGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLabelGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_UpdateModel.go b/service/lookoutequipment/api_op_UpdateModel.go index fc934cfc0fb..aff0157b39f 100644 --- a/service/lookoutequipment/api_op_UpdateModel.go +++ b/service/lookoutequipment/api_op_UpdateModel.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutequipment/api_op_UpdateRetrainingScheduler.go b/service/lookoutequipment/api_op_UpdateRetrainingScheduler.go index 575cbed61bb..6a52e0dfa9a 100644 --- a/service/lookoutequipment/api_op_UpdateRetrainingScheduler.go +++ b/service/lookoutequipment/api_op_UpdateRetrainingScheduler.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateRetrainingSchedulerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRetrainingSchedulerValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_client.go b/service/lookoutmetrics/api_client.go index f0d8302bfcf..281c77574ab 100644 --- a/service/lookoutmetrics/api_client.go +++ b/service/lookoutmetrics/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/lookoutmetrics/api_op_ActivateAnomalyDetector.go b/service/lookoutmetrics/api_op_ActivateAnomalyDetector.go index d976b27de8b..b52f5cdb4fd 100644 --- a/service/lookoutmetrics/api_op_ActivateAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_ActivateAnomalyDetector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationActivateAnomalyDetectorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_BackTestAnomalyDetector.go b/service/lookoutmetrics/api_op_BackTestAnomalyDetector.go index 93f5e4b7b9a..4f16f3442d2 100644 --- a/service/lookoutmetrics/api_op_BackTestAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_BackTestAnomalyDetector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationBackTestAnomalyDetectorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBackTestAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_CreateAlert.go b/service/lookoutmetrics/api_op_CreateAlert.go index e19206420a1..b920ccc7dee 100644 --- a/service/lookoutmetrics/api_op_CreateAlert.go +++ b/service/lookoutmetrics/api_op_CreateAlert.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateAlertMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAlertValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_CreateAnomalyDetector.go b/service/lookoutmetrics/api_op_CreateAnomalyDetector.go index c7d41b470c8..65df36add22 100644 --- a/service/lookoutmetrics/api_op_CreateAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_CreateAnomalyDetector.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateAnomalyDetectorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_CreateMetricSet.go b/service/lookoutmetrics/api_op_CreateMetricSet.go index 8904c6c61e2..c7568b09ea1 100644 --- a/service/lookoutmetrics/api_op_CreateMetricSet.go +++ b/service/lookoutmetrics/api_op_CreateMetricSet.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateMetricSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMetricSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DeactivateAnomalyDetector.go b/service/lookoutmetrics/api_op_DeactivateAnomalyDetector.go index 02ae1b1b7d3..f723fbc8e3d 100644 --- a/service/lookoutmetrics/api_op_DeactivateAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_DeactivateAnomalyDetector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeactivateAnomalyDetectorMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DeleteAlert.go b/service/lookoutmetrics/api_op_DeleteAlert.go index e8fe7fd4a82..d8778b798fd 100644 --- a/service/lookoutmetrics/api_op_DeleteAlert.go +++ b/service/lookoutmetrics/api_op_DeleteAlert.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAlertMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAlertValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DeleteAnomalyDetector.go b/service/lookoutmetrics/api_op_DeleteAnomalyDetector.go index b185430e177..7c538ab4c03 100644 --- a/service/lookoutmetrics/api_op_DeleteAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_DeleteAnomalyDetector.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAnomalyDetectorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DescribeAlert.go b/service/lookoutmetrics/api_op_DescribeAlert.go index 7ababa24395..e5f4b05e300 100644 --- a/service/lookoutmetrics/api_op_DescribeAlert.go +++ b/service/lookoutmetrics/api_op_DescribeAlert.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeAlertMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlertValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go b/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go index 044bac32bbf..0018c840328 100644 --- a/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go +++ b/service/lookoutmetrics/api_op_DescribeAnomalyDetectionExecutions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeAnomalyDetectionExecutionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnomalyDetectionExecutionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationDescribeAnomalyDetectionExecutionsMiddlewares(stack return nil } -// DescribeAnomalyDetectionExecutionsAPIClient is a client that implements the -// DescribeAnomalyDetectionExecutions operation. -type DescribeAnomalyDetectionExecutionsAPIClient interface { - DescribeAnomalyDetectionExecutions(context.Context, *DescribeAnomalyDetectionExecutionsInput, ...func(*Options)) (*DescribeAnomalyDetectionExecutionsOutput, error) -} - -var _ DescribeAnomalyDetectionExecutionsAPIClient = (*Client)(nil) - // DescribeAnomalyDetectionExecutionsPaginatorOptions is the paginator options for // DescribeAnomalyDetectionExecutions type DescribeAnomalyDetectionExecutionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeAnomalyDetectionExecutionsPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAnomalyDetectionExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeAnomalyDetectionExecutionsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeAnomalyDetectionExecutionsAPIClient is a client that implements the +// DescribeAnomalyDetectionExecutions operation. +type DescribeAnomalyDetectionExecutionsAPIClient interface { + DescribeAnomalyDetectionExecutions(context.Context, *DescribeAnomalyDetectionExecutionsInput, ...func(*Options)) (*DescribeAnomalyDetectionExecutionsOutput, error) +} + +var _ DescribeAnomalyDetectionExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAnomalyDetectionExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go b/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go index 7b0e436435e..38120d968fc 100644 --- a/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_DescribeAnomalyDetector.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeAnomalyDetectorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DescribeMetricSet.go b/service/lookoutmetrics/api_op_DescribeMetricSet.go index fc38facf3ee..354acb39231 100644 --- a/service/lookoutmetrics/api_op_DescribeMetricSet.go +++ b/service/lookoutmetrics/api_op_DescribeMetricSet.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeMetricSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetricSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_DetectMetricSetConfig.go b/service/lookoutmetrics/api_op_DetectMetricSetConfig.go index b6aee32dae0..d0983a18775 100644 --- a/service/lookoutmetrics/api_op_DetectMetricSetConfig.go +++ b/service/lookoutmetrics/api_op_DetectMetricSetConfig.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDetectMetricSetConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectMetricSetConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_GetAnomalyGroup.go b/service/lookoutmetrics/api_op_GetAnomalyGroup.go index 962867e9f3d..5a432fcf114 100644 --- a/service/lookoutmetrics/api_op_GetAnomalyGroup.go +++ b/service/lookoutmetrics/api_op_GetAnomalyGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetAnomalyGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAnomalyGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_GetDataQualityMetrics.go b/service/lookoutmetrics/api_op_GetDataQualityMetrics.go index 4aec131e072..32f1aa71831 100644 --- a/service/lookoutmetrics/api_op_GetDataQualityMetrics.go +++ b/service/lookoutmetrics/api_op_GetDataQualityMetrics.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetDataQualityMetricsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataQualityMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_GetFeedback.go b/service/lookoutmetrics/api_op_GetFeedback.go index 11da675f143..2d00e8b147b 100644 --- a/service/lookoutmetrics/api_op_GetFeedback.go +++ b/service/lookoutmetrics/api_op_GetFeedback.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetFeedbackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFeedbackValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationGetFeedbackMiddlewares(stack *middleware.Stack, opt return nil } -// GetFeedbackAPIClient is a client that implements the GetFeedback operation. -type GetFeedbackAPIClient interface { - GetFeedback(context.Context, *GetFeedbackInput, ...func(*Options)) (*GetFeedbackOutput, error) -} - -var _ GetFeedbackAPIClient = (*Client)(nil) - // GetFeedbackPaginatorOptions is the paginator options for GetFeedback type GetFeedbackPaginatorOptions struct { // The maximum number of results to return. @@ -215,6 +211,9 @@ func (p *GetFeedbackPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFeedback(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *GetFeedbackPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetFeedbackAPIClient is a client that implements the GetFeedback operation. +type GetFeedbackAPIClient interface { + GetFeedback(context.Context, *GetFeedbackInput, ...func(*Options)) (*GetFeedbackOutput, error) +} + +var _ GetFeedbackAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFeedback(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_GetSampleData.go b/service/lookoutmetrics/api_op_GetSampleData.go index 7eefeeb2cc3..8e66836e0a9 100644 --- a/service/lookoutmetrics/api_op_GetSampleData.go +++ b/service/lookoutmetrics/api_op_GetSampleData.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetSampleDataMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSampleDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_ListAlerts.go b/service/lookoutmetrics/api_op_ListAlerts.go index 364f99770c4..0457e6485e6 100644 --- a/service/lookoutmetrics/api_op_ListAlerts.go +++ b/service/lookoutmetrics/api_op_ListAlerts.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListAlertsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAlerts(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListAlertsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAlertsAPIClient is a client that implements the ListAlerts operation. -type ListAlertsAPIClient interface { - ListAlerts(context.Context, *ListAlertsInput, ...func(*Options)) (*ListAlertsOutput, error) -} - -var _ ListAlertsAPIClient = (*Client)(nil) - // ListAlertsPaginatorOptions is the paginator options for ListAlerts type ListAlertsPaginatorOptions struct { // The maximum number of results that will be displayed by the request. @@ -211,6 +207,9 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAlerts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAlertsAPIClient is a client that implements the ListAlerts operation. +type ListAlertsAPIClient interface { + ListAlerts(context.Context, *ListAlertsInput, ...func(*Options)) (*ListAlertsOutput, error) +} + +var _ ListAlertsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAlerts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_ListAnomalyDetectors.go b/service/lookoutmetrics/api_op_ListAnomalyDetectors.go index d54f38df008..ad69843a3e4 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyDetectors.go +++ b/service/lookoutmetrics/api_op_ListAnomalyDetectors.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAnomalyDetectorsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnomalyDetectors(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListAnomalyDetectorsMiddlewares(stack *middleware.S return nil } -// ListAnomalyDetectorsAPIClient is a client that implements the -// ListAnomalyDetectors operation. -type ListAnomalyDetectorsAPIClient interface { - ListAnomalyDetectors(context.Context, *ListAnomalyDetectorsInput, ...func(*Options)) (*ListAnomalyDetectorsOutput, error) -} - -var _ ListAnomalyDetectorsAPIClient = (*Client)(nil) - // ListAnomalyDetectorsPaginatorOptions is the paginator options for // ListAnomalyDetectors type ListAnomalyDetectorsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomalyDetectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListAnomalyDetectorsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListAnomalyDetectorsAPIClient is a client that implements the +// ListAnomalyDetectors operation. +type ListAnomalyDetectorsAPIClient interface { + ListAnomalyDetectors(context.Context, *ListAnomalyDetectorsInput, ...func(*Options)) (*ListAnomalyDetectorsOutput, error) +} + +var _ ListAnomalyDetectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomalyDetectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_ListAnomalyGroupRelatedMetrics.go b/service/lookoutmetrics/api_op_ListAnomalyGroupRelatedMetrics.go index 10553548871..ae9f817ce0a 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyGroupRelatedMetrics.go +++ b/service/lookoutmetrics/api_op_ListAnomalyGroupRelatedMetrics.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListAnomalyGroupRelatedMetricsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnomalyGroupRelatedMetricsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListAnomalyGroupRelatedMetricsMiddlewares(stack *mi return nil } -// ListAnomalyGroupRelatedMetricsAPIClient is a client that implements the -// ListAnomalyGroupRelatedMetrics operation. -type ListAnomalyGroupRelatedMetricsAPIClient interface { - ListAnomalyGroupRelatedMetrics(context.Context, *ListAnomalyGroupRelatedMetricsInput, ...func(*Options)) (*ListAnomalyGroupRelatedMetricsOutput, error) -} - -var _ ListAnomalyGroupRelatedMetricsAPIClient = (*Client)(nil) - // ListAnomalyGroupRelatedMetricsPaginatorOptions is the paginator options for // ListAnomalyGroupRelatedMetrics type ListAnomalyGroupRelatedMetricsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAnomalyGroupRelatedMetricsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomalyGroupRelatedMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAnomalyGroupRelatedMetricsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAnomalyGroupRelatedMetricsAPIClient is a client that implements the +// ListAnomalyGroupRelatedMetrics operation. +type ListAnomalyGroupRelatedMetricsAPIClient interface { + ListAnomalyGroupRelatedMetrics(context.Context, *ListAnomalyGroupRelatedMetricsInput, ...func(*Options)) (*ListAnomalyGroupRelatedMetricsOutput, error) +} + +var _ ListAnomalyGroupRelatedMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomalyGroupRelatedMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go b/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go index 293a68f9593..03916d753da 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go +++ b/service/lookoutmetrics/api_op_ListAnomalyGroupSummaries.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAnomalyGroupSummariesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnomalyGroupSummariesValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAnomalyGroupSummariesMiddlewares(stack *middlew return nil } -// ListAnomalyGroupSummariesAPIClient is a client that implements the -// ListAnomalyGroupSummaries operation. -type ListAnomalyGroupSummariesAPIClient interface { - ListAnomalyGroupSummaries(context.Context, *ListAnomalyGroupSummariesInput, ...func(*Options)) (*ListAnomalyGroupSummariesOutput, error) -} - -var _ ListAnomalyGroupSummariesAPIClient = (*Client)(nil) - // ListAnomalyGroupSummariesPaginatorOptions is the paginator options for // ListAnomalyGroupSummaries type ListAnomalyGroupSummariesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListAnomalyGroupSummariesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomalyGroupSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListAnomalyGroupSummariesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAnomalyGroupSummariesAPIClient is a client that implements the +// ListAnomalyGroupSummaries operation. +type ListAnomalyGroupSummariesAPIClient interface { + ListAnomalyGroupSummaries(context.Context, *ListAnomalyGroupSummariesInput, ...func(*Options)) (*ListAnomalyGroupSummariesOutput, error) +} + +var _ ListAnomalyGroupSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomalyGroupSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go b/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go index c30e306eb47..008bf39c925 100644 --- a/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go +++ b/service/lookoutmetrics/api_op_ListAnomalyGroupTimeSeries.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListAnomalyGroupTimeSeriesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnomalyGroupTimeSeriesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListAnomalyGroupTimeSeriesMiddlewares(stack *middle return nil } -// ListAnomalyGroupTimeSeriesAPIClient is a client that implements the -// ListAnomalyGroupTimeSeries operation. -type ListAnomalyGroupTimeSeriesAPIClient interface { - ListAnomalyGroupTimeSeries(context.Context, *ListAnomalyGroupTimeSeriesInput, ...func(*Options)) (*ListAnomalyGroupTimeSeriesOutput, error) -} - -var _ ListAnomalyGroupTimeSeriesAPIClient = (*Client)(nil) - // ListAnomalyGroupTimeSeriesPaginatorOptions is the paginator options for // ListAnomalyGroupTimeSeries type ListAnomalyGroupTimeSeriesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListAnomalyGroupTimeSeriesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnomalyGroupTimeSeries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListAnomalyGroupTimeSeriesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListAnomalyGroupTimeSeriesAPIClient is a client that implements the +// ListAnomalyGroupTimeSeries operation. +type ListAnomalyGroupTimeSeriesAPIClient interface { + ListAnomalyGroupTimeSeries(context.Context, *ListAnomalyGroupTimeSeriesInput, ...func(*Options)) (*ListAnomalyGroupTimeSeriesOutput, error) +} + +var _ ListAnomalyGroupTimeSeriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnomalyGroupTimeSeries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_ListMetricSets.go b/service/lookoutmetrics/api_op_ListMetricSets.go index 2f01958fd5a..736ddaa44fe 100644 --- a/service/lookoutmetrics/api_op_ListMetricSets.go +++ b/service/lookoutmetrics/api_op_ListMetricSets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListMetricSetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMetricSets(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListMetricSetsMiddlewares(stack *middleware.Stack, return nil } -// ListMetricSetsAPIClient is a client that implements the ListMetricSets -// operation. -type ListMetricSetsAPIClient interface { - ListMetricSets(context.Context, *ListMetricSetsInput, ...func(*Options)) (*ListMetricSetsOutput, error) -} - -var _ ListMetricSetsAPIClient = (*Client)(nil) - // ListMetricSetsPaginatorOptions is the paginator options for ListMetricSets type ListMetricSetsPaginatorOptions struct { // The maximum number of results to return. @@ -212,6 +207,9 @@ func (p *ListMetricSetsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetricSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListMetricSetsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListMetricSetsAPIClient is a client that implements the ListMetricSets +// operation. +type ListMetricSetsAPIClient interface { + ListMetricSets(context.Context, *ListMetricSetsInput, ...func(*Options)) (*ListMetricSetsOutput, error) +} + +var _ ListMetricSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetricSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutmetrics/api_op_ListTagsForResource.go b/service/lookoutmetrics/api_op_ListTagsForResource.go index 5ce240bae06..531c5d86582 100644 --- a/service/lookoutmetrics/api_op_ListTagsForResource.go +++ b/service/lookoutmetrics/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_PutFeedback.go b/service/lookoutmetrics/api_op_PutFeedback.go index 2cfbeec9be1..7b23cd9b94b 100644 --- a/service/lookoutmetrics/api_op_PutFeedback.go +++ b/service/lookoutmetrics/api_op_PutFeedback.go @@ -107,6 +107,9 @@ func (c *Client) addOperationPutFeedbackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_TagResource.go b/service/lookoutmetrics/api_op_TagResource.go index 2a6073e7214..9eb1f40c536 100644 --- a/service/lookoutmetrics/api_op_TagResource.go +++ b/service/lookoutmetrics/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_UntagResource.go b/service/lookoutmetrics/api_op_UntagResource.go index fc8b09fbbb5..521a424b2e2 100644 --- a/service/lookoutmetrics/api_op_UntagResource.go +++ b/service/lookoutmetrics/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_UpdateAlert.go b/service/lookoutmetrics/api_op_UpdateAlert.go index df1f79d6059..1978ab7465c 100644 --- a/service/lookoutmetrics/api_op_UpdateAlert.go +++ b/service/lookoutmetrics/api_op_UpdateAlert.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateAlertMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAlertValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_UpdateAnomalyDetector.go b/service/lookoutmetrics/api_op_UpdateAnomalyDetector.go index ded766fb335..df568b9862c 100644 --- a/service/lookoutmetrics/api_op_UpdateAnomalyDetector.go +++ b/service/lookoutmetrics/api_op_UpdateAnomalyDetector.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateAnomalyDetectorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnomalyDetectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutmetrics/api_op_UpdateMetricSet.go b/service/lookoutmetrics/api_op_UpdateMetricSet.go index 9382976d9f7..a82d500b234 100644 --- a/service/lookoutmetrics/api_op_UpdateMetricSet.go +++ b/service/lookoutmetrics/api_op_UpdateMetricSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateMetricSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMetricSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_client.go b/service/lookoutvision/api_client.go index 4f67e636b36..daaf01637cf 100644 --- a/service/lookoutvision/api_client.go +++ b/service/lookoutvision/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/lookoutvision/api_op_CreateDataset.go b/service/lookoutvision/api_op_CreateDataset.go index e56f00d9ee4..99975897c42 100644 --- a/service/lookoutvision/api_op_CreateDataset.go +++ b/service/lookoutvision/api_op_CreateDataset.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_CreateModel.go b/service/lookoutvision/api_op_CreateModel.go index fc9ec5d22cd..a7c12f2c47f 100644 --- a/service/lookoutvision/api_op_CreateModel.go +++ b/service/lookoutvision/api_op_CreateModel.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateModelMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_CreateProject.go b/service/lookoutvision/api_op_CreateProject.go index 11ba4dc8b24..97d1f1ea83a 100644 --- a/service/lookoutvision/api_op_CreateProject.go +++ b/service/lookoutvision/api_op_CreateProject.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProjectMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_DeleteDataset.go b/service/lookoutvision/api_op_DeleteDataset.go index b229ac4e821..cb79ce7af74 100644 --- a/service/lookoutvision/api_op_DeleteDataset.go +++ b/service/lookoutvision/api_op_DeleteDataset.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteDatasetMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_DeleteModel.go b/service/lookoutvision/api_op_DeleteModel.go index f8b8bfac551..7bf27a40c33 100644 --- a/service/lookoutvision/api_op_DeleteModel.go +++ b/service/lookoutvision/api_op_DeleteModel.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteModelMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_DeleteProject.go b/service/lookoutvision/api_op_DeleteProject.go index 1247777c44c..d69c37e2dcb 100644 --- a/service/lookoutvision/api_op_DeleteProject.go +++ b/service/lookoutvision/api_op_DeleteProject.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteProjectMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_DescribeDataset.go b/service/lookoutvision/api_op_DescribeDataset.go index 9e338e748c3..07a40b4daaf 100644 --- a/service/lookoutvision/api_op_DescribeDataset.go +++ b/service/lookoutvision/api_op_DescribeDataset.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_DescribeModel.go b/service/lookoutvision/api_op_DescribeModel.go index 830d4f7db30..df6c5ed0d9d 100644 --- a/service/lookoutvision/api_op_DescribeModel.go +++ b/service/lookoutvision/api_op_DescribeModel.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeModelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_DescribeModelPackagingJob.go b/service/lookoutvision/api_op_DescribeModelPackagingJob.go index 4a7b4bf43f5..8080f5ddba6 100644 --- a/service/lookoutvision/api_op_DescribeModelPackagingJob.go +++ b/service/lookoutvision/api_op_DescribeModelPackagingJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeModelPackagingJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelPackagingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_DescribeProject.go b/service/lookoutvision/api_op_DescribeProject.go index 6230c025722..92445682bd8 100644 --- a/service/lookoutvision/api_op_DescribeProject.go +++ b/service/lookoutvision/api_op_DescribeProject.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_DetectAnomalies.go b/service/lookoutvision/api_op_DetectAnomalies.go index 8712bbf4260..e8be66495e1 100644 --- a/service/lookoutvision/api_op_DetectAnomalies.go +++ b/service/lookoutvision/api_op_DetectAnomalies.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDetectAnomaliesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectAnomaliesValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_ListDatasetEntries.go b/service/lookoutvision/api_op_ListDatasetEntries.go index 150e4d51773..70a91d5daba 100644 --- a/service/lookoutvision/api_op_ListDatasetEntries.go +++ b/service/lookoutvision/api_op_ListDatasetEntries.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListDatasetEntriesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasetEntriesValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListDatasetEntriesMiddlewares(stack *middleware.Sta return nil } -// ListDatasetEntriesAPIClient is a client that implements the ListDatasetEntries -// operation. -type ListDatasetEntriesAPIClient interface { - ListDatasetEntries(context.Context, *ListDatasetEntriesInput, ...func(*Options)) (*ListDatasetEntriesOutput, error) -} - -var _ ListDatasetEntriesAPIClient = (*Client)(nil) - // ListDatasetEntriesPaginatorOptions is the paginator options for // ListDatasetEntries type ListDatasetEntriesPaginatorOptions struct { @@ -253,6 +248,9 @@ func (p *ListDatasetEntriesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetEntries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +270,14 @@ func (p *ListDatasetEntriesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListDatasetEntriesAPIClient is a client that implements the ListDatasetEntries +// operation. +type ListDatasetEntriesAPIClient interface { + ListDatasetEntries(context.Context, *ListDatasetEntriesInput, ...func(*Options)) (*ListDatasetEntriesOutput, error) +} + +var _ ListDatasetEntriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetEntries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutvision/api_op_ListModelPackagingJobs.go b/service/lookoutvision/api_op_ListModelPackagingJobs.go index 578f1161742..eff8693bddb 100644 --- a/service/lookoutvision/api_op_ListModelPackagingJobs.go +++ b/service/lookoutvision/api_op_ListModelPackagingJobs.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListModelPackagingJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelPackagingJobsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListModelPackagingJobsMiddlewares(stack *middleware return nil } -// ListModelPackagingJobsAPIClient is a client that implements the -// ListModelPackagingJobs operation. -type ListModelPackagingJobsAPIClient interface { - ListModelPackagingJobs(context.Context, *ListModelPackagingJobsInput, ...func(*Options)) (*ListModelPackagingJobsOutput, error) -} - -var _ ListModelPackagingJobsAPIClient = (*Client)(nil) - // ListModelPackagingJobsPaginatorOptions is the paginator options for // ListModelPackagingJobs type ListModelPackagingJobsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListModelPackagingJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelPackagingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListModelPackagingJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListModelPackagingJobsAPIClient is a client that implements the +// ListModelPackagingJobs operation. +type ListModelPackagingJobsAPIClient interface { + ListModelPackagingJobs(context.Context, *ListModelPackagingJobsInput, ...func(*Options)) (*ListModelPackagingJobsOutput, error) +} + +var _ ListModelPackagingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelPackagingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutvision/api_op_ListModels.go b/service/lookoutvision/api_op_ListModels.go index 0e52e3376d9..5988ce4298d 100644 --- a/service/lookoutvision/api_op_ListModels.go +++ b/service/lookoutvision/api_op_ListModels.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListModelsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListModelsMiddlewares(stack *middleware.Stack, opti return nil } -// ListModelsAPIClient is a client that implements the ListModels operation. -type ListModelsAPIClient interface { - ListModels(context.Context, *ListModelsInput, ...func(*Options)) (*ListModelsOutput, error) -} - -var _ ListModelsAPIClient = (*Client)(nil) - // ListModelsPaginatorOptions is the paginator options for ListModels type ListModelsPaginatorOptions struct { // The maximum number of results to return per paginated call. The largest value @@ -222,6 +218,9 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListModelsAPIClient is a client that implements the ListModels operation. +type ListModelsAPIClient interface { + ListModels(context.Context, *ListModelsInput, ...func(*Options)) (*ListModelsOutput, error) +} + +var _ ListModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutvision/api_op_ListProjects.go b/service/lookoutvision/api_op_ListProjects.go index 0e0be1c3b39..6911dcb4ff0 100644 --- a/service/lookoutvision/api_op_ListProjects.go +++ b/service/lookoutvision/api_op_ListProjects.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of results to return per paginated call. The largest value @@ -216,6 +212,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/lookoutvision/api_op_ListTagsForResource.go b/service/lookoutvision/api_op_ListTagsForResource.go index 3059aa6fbae..6408988bd26 100644 --- a/service/lookoutvision/api_op_ListTagsForResource.go +++ b/service/lookoutvision/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_StartModel.go b/service/lookoutvision/api_op_StartModel.go index a19904eee86..3cc650298fa 100644 --- a/service/lookoutvision/api_op_StartModel.go +++ b/service/lookoutvision/api_op_StartModel.go @@ -151,6 +151,9 @@ func (c *Client) addOperationStartModelMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartModelMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_StartModelPackagingJob.go b/service/lookoutvision/api_op_StartModelPackagingJob.go index 04b3ae4219f..a6a07f0c072 100644 --- a/service/lookoutvision/api_op_StartModelPackagingJob.go +++ b/service/lookoutvision/api_op_StartModelPackagingJob.go @@ -172,6 +172,9 @@ func (c *Client) addOperationStartModelPackagingJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartModelPackagingJobMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_StopModel.go b/service/lookoutvision/api_op_StopModel.go index a90320e0df3..dd156fac451 100644 --- a/service/lookoutvision/api_op_StopModel.go +++ b/service/lookoutvision/api_op_StopModel.go @@ -132,6 +132,9 @@ func (c *Client) addOperationStopModelMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStopModelMiddleware(stack, options); err != nil { return err } diff --git a/service/lookoutvision/api_op_TagResource.go b/service/lookoutvision/api_op_TagResource.go index ed88bb1a29d..b07c7b41319 100644 --- a/service/lookoutvision/api_op_TagResource.go +++ b/service/lookoutvision/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_UntagResource.go b/service/lookoutvision/api_op_UntagResource.go index 3aebbf8ba8f..11eba216a44 100644 --- a/service/lookoutvision/api_op_UntagResource.go +++ b/service/lookoutvision/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/lookoutvision/api_op_UpdateDatasetEntries.go b/service/lookoutvision/api_op_UpdateDatasetEntries.go index 270dda553ae..c45690b1860 100644 --- a/service/lookoutvision/api_op_UpdateDatasetEntries.go +++ b/service/lookoutvision/api_op_UpdateDatasetEntries.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateDatasetEntriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateDatasetEntriesMiddleware(stack, options); err != nil { return err } diff --git a/service/m2/api_client.go b/service/m2/api_client.go index 48901d89d9a..3f89f91678e 100644 --- a/service/m2/api_client.go +++ b/service/m2/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/m2/api_op_CancelBatchJobExecution.go b/service/m2/api_op_CancelBatchJobExecution.go index e31a530dafd..9d6e7bac395 100644 --- a/service/m2/api_op_CancelBatchJobExecution.go +++ b/service/m2/api_op_CancelBatchJobExecution.go @@ -106,6 +106,9 @@ func (c *Client) addOperationCancelBatchJobExecutionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelBatchJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_CreateApplication.go b/service/m2/api_op_CreateApplication.go index 58c45cbbcbd..6c3b90132b2 100644 --- a/service/m2/api_op_CreateApplication.go +++ b/service/m2/api_op_CreateApplication.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/m2/api_op_CreateDataSetImportTask.go b/service/m2/api_op_CreateDataSetImportTask.go index fa57e2d1d4c..30b64bd92d3 100644 --- a/service/m2/api_op_CreateDataSetImportTask.go +++ b/service/m2/api_op_CreateDataSetImportTask.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateDataSetImportTaskMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataSetImportTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/m2/api_op_CreateDeployment.go b/service/m2/api_op_CreateDeployment.go index ff232f26fe7..b8ad389ebe7 100644 --- a/service/m2/api_op_CreateDeployment.go +++ b/service/m2/api_op_CreateDeployment.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDeploymentMiddleware(stack, options); err != nil { return err } diff --git a/service/m2/api_op_CreateEnvironment.go b/service/m2/api_op_CreateEnvironment.go index c7c5c5f4697..33e33ebd697 100644 --- a/service/m2/api_op_CreateEnvironment.go +++ b/service/m2/api_op_CreateEnvironment.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEnvironmentMiddleware(stack, options); err != nil { return err } diff --git a/service/m2/api_op_DeleteApplication.go b/service/m2/api_op_DeleteApplication.go index ab7f829b9ce..685e4ddc283 100644 --- a/service/m2/api_op_DeleteApplication.go +++ b/service/m2/api_op_DeleteApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_DeleteApplicationFromEnvironment.go b/service/m2/api_op_DeleteApplicationFromEnvironment.go index 2d101dd6c76..20f1a41ff75 100644 --- a/service/m2/api_op_DeleteApplicationFromEnvironment.go +++ b/service/m2/api_op_DeleteApplicationFromEnvironment.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteApplicationFromEnvironmentMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationFromEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_DeleteEnvironment.go b/service/m2/api_op_DeleteEnvironment.go index 69001b92676..1ef5fd9ea78 100644 --- a/service/m2/api_op_DeleteEnvironment.go +++ b/service/m2/api_op_DeleteEnvironment.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetApplication.go b/service/m2/api_op_GetApplication.go index f5508200788..f08cdf55037 100644 --- a/service/m2/api_op_GetApplication.go +++ b/service/m2/api_op_GetApplication.go @@ -188,6 +188,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetApplicationVersion.go b/service/m2/api_op_GetApplicationVersion.go index c45473dd07b..624a863b0f9 100644 --- a/service/m2/api_op_GetApplicationVersion.go +++ b/service/m2/api_op_GetApplicationVersion.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetApplicationVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetBatchJobExecution.go b/service/m2/api_op_GetBatchJobExecution.go index 9fdc93d5af2..2b68878fde1 100644 --- a/service/m2/api_op_GetBatchJobExecution.go +++ b/service/m2/api_op_GetBatchJobExecution.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetBatchJobExecutionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBatchJobExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetDataSetDetails.go b/service/m2/api_op_GetDataSetDetails.go index 613ab9f4234..a2ac906c7b4 100644 --- a/service/m2/api_op_GetDataSetDetails.go +++ b/service/m2/api_op_GetDataSetDetails.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetDataSetDetailsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSetDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetDataSetImportTask.go b/service/m2/api_op_GetDataSetImportTask.go index 7cb08abcf02..f567926dbca 100644 --- a/service/m2/api_op_GetDataSetImportTask.go +++ b/service/m2/api_op_GetDataSetImportTask.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetDataSetImportTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSetImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetDeployment.go b/service/m2/api_op_GetDeployment.go index 4b6a3a524d9..d569f77810a 100644 --- a/service/m2/api_op_GetDeployment.go +++ b/service/m2/api_op_GetDeployment.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetEnvironment.go b/service/m2/api_op_GetEnvironment.go index 65c969b211a..8bd5553784d 100644 --- a/service/m2/api_op_GetEnvironment.go +++ b/service/m2/api_op_GetEnvironment.go @@ -199,6 +199,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_GetSignedBluinsightsUrl.go b/service/m2/api_op_GetSignedBluinsightsUrl.go index ac5c1362894..5768f362456 100644 --- a/service/m2/api_op_GetSignedBluinsightsUrl.go +++ b/service/m2/api_op_GetSignedBluinsightsUrl.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetSignedBluinsightsUrlMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSignedBluinsightsUrl(options.Region), middleware.Before); err != nil { return err } diff --git a/service/m2/api_op_ListApplicationVersions.go b/service/m2/api_op_ListApplicationVersions.go index 7296f367e2c..211136c5aa8 100644 --- a/service/m2/api_op_ListApplicationVersions.go +++ b/service/m2/api_op_ListApplicationVersions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationVersionsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middlewar return nil } -// ListApplicationVersionsAPIClient is a client that implements the -// ListApplicationVersions operation. -type ListApplicationVersionsAPIClient interface { - ListApplicationVersions(context.Context, *ListApplicationVersionsInput, ...func(*Options)) (*ListApplicationVersionsOutput, error) -} - -var _ ListApplicationVersionsAPIClient = (*Client)(nil) - // ListApplicationVersionsPaginatorOptions is the paginator options for // ListApplicationVersions type ListApplicationVersionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListApplicationVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListApplicationVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationVersionsAPIClient is a client that implements the +// ListApplicationVersions operation. +type ListApplicationVersionsAPIClient interface { + ListApplicationVersions(context.Context, *ListApplicationVersionsInput, ...func(*Options)) (*ListApplicationVersionsOutput, error) +} + +var _ ListApplicationVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListApplications.go b/service/m2/api_op_ListApplications.go index 10bafc37d41..d3534fe9038 100644 --- a/service/m2/api_op_ListApplications.go +++ b/service/m2/api_op_ListApplications.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of applications to return. @@ -215,6 +210,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListBatchJobDefinitions.go b/service/m2/api_op_ListBatchJobDefinitions.go index de0480f155d..8f46d12823b 100644 --- a/service/m2/api_op_ListBatchJobDefinitions.go +++ b/service/m2/api_op_ListBatchJobDefinitions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListBatchJobDefinitionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBatchJobDefinitionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListBatchJobDefinitionsMiddlewares(stack *middlewar return nil } -// ListBatchJobDefinitionsAPIClient is a client that implements the -// ListBatchJobDefinitions operation. -type ListBatchJobDefinitionsAPIClient interface { - ListBatchJobDefinitions(context.Context, *ListBatchJobDefinitionsInput, ...func(*Options)) (*ListBatchJobDefinitionsOutput, error) -} - -var _ ListBatchJobDefinitionsAPIClient = (*Client)(nil) - // ListBatchJobDefinitionsPaginatorOptions is the paginator options for // ListBatchJobDefinitions type ListBatchJobDefinitionsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListBatchJobDefinitionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBatchJobDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListBatchJobDefinitionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListBatchJobDefinitionsAPIClient is a client that implements the +// ListBatchJobDefinitions operation. +type ListBatchJobDefinitionsAPIClient interface { + ListBatchJobDefinitions(context.Context, *ListBatchJobDefinitionsInput, ...func(*Options)) (*ListBatchJobDefinitionsOutput, error) +} + +var _ ListBatchJobDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBatchJobDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListBatchJobExecutions.go b/service/m2/api_op_ListBatchJobExecutions.go index 18ff6918964..37907f18644 100644 --- a/service/m2/api_op_ListBatchJobExecutions.go +++ b/service/m2/api_op_ListBatchJobExecutions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListBatchJobExecutionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBatchJobExecutionsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListBatchJobExecutionsMiddlewares(stack *middleware return nil } -// ListBatchJobExecutionsAPIClient is a client that implements the -// ListBatchJobExecutions operation. -type ListBatchJobExecutionsAPIClient interface { - ListBatchJobExecutions(context.Context, *ListBatchJobExecutionsInput, ...func(*Options)) (*ListBatchJobExecutionsOutput, error) -} - -var _ ListBatchJobExecutionsAPIClient = (*Client)(nil) - // ListBatchJobExecutionsPaginatorOptions is the paginator options for // ListBatchJobExecutions type ListBatchJobExecutionsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListBatchJobExecutionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBatchJobExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListBatchJobExecutionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBatchJobExecutionsAPIClient is a client that implements the +// ListBatchJobExecutions operation. +type ListBatchJobExecutionsAPIClient interface { + ListBatchJobExecutions(context.Context, *ListBatchJobExecutionsInput, ...func(*Options)) (*ListBatchJobExecutionsOutput, error) +} + +var _ ListBatchJobExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBatchJobExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListBatchJobRestartPoints.go b/service/m2/api_op_ListBatchJobRestartPoints.go index 690a1690bd7..5c1b6a53f19 100644 --- a/service/m2/api_op_ListBatchJobRestartPoints.go +++ b/service/m2/api_op_ListBatchJobRestartPoints.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListBatchJobRestartPointsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBatchJobRestartPointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_ListDataSetImportHistory.go b/service/m2/api_op_ListDataSetImportHistory.go index adab2d01f67..b4513c0c536 100644 --- a/service/m2/api_op_ListDataSetImportHistory.go +++ b/service/m2/api_op_ListDataSetImportHistory.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDataSetImportHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSetImportHistoryValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListDataSetImportHistoryMiddlewares(stack *middlewa return nil } -// ListDataSetImportHistoryAPIClient is a client that implements the -// ListDataSetImportHistory operation. -type ListDataSetImportHistoryAPIClient interface { - ListDataSetImportHistory(context.Context, *ListDataSetImportHistoryInput, ...func(*Options)) (*ListDataSetImportHistoryOutput, error) -} - -var _ ListDataSetImportHistoryAPIClient = (*Client)(nil) - // ListDataSetImportHistoryPaginatorOptions is the paginator options for // ListDataSetImportHistory type ListDataSetImportHistoryPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListDataSetImportHistoryPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSetImportHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListDataSetImportHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDataSetImportHistoryAPIClient is a client that implements the +// ListDataSetImportHistory operation. +type ListDataSetImportHistoryAPIClient interface { + ListDataSetImportHistory(context.Context, *ListDataSetImportHistoryInput, ...func(*Options)) (*ListDataSetImportHistoryOutput, error) +} + +var _ ListDataSetImportHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSetImportHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListDataSets.go b/service/m2/api_op_ListDataSets.go index f398b832872..a528e622768 100644 --- a/service/m2/api_op_ListDataSets.go +++ b/service/m2/api_op_ListDataSets.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListDataSetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSetsValidationMiddleware(stack); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListDataSetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDataSetsAPIClient is a client that implements the ListDataSets operation. -type ListDataSetsAPIClient interface { - ListDataSets(context.Context, *ListDataSetsInput, ...func(*Options)) (*ListDataSetsOutput, error) -} - -var _ ListDataSetsAPIClient = (*Client)(nil) - // ListDataSetsPaginatorOptions is the paginator options for ListDataSets type ListDataSetsPaginatorOptions struct { // The maximum number of objects to return. @@ -230,6 +226,9 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDataSetsAPIClient is a client that implements the ListDataSets operation. +type ListDataSetsAPIClient interface { + ListDataSets(context.Context, *ListDataSetsInput, ...func(*Options)) (*ListDataSetsOutput, error) +} + +var _ ListDataSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListDeployments.go b/service/m2/api_op_ListDeployments.go index 0df34a16f5c..9412b74b2ca 100644 --- a/service/m2/api_op_ListDeployments.go +++ b/service/m2/api_op_ListDeployments.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeploymentsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// ListDeploymentsAPIClient is a client that implements the ListDeployments -// operation. -type ListDeploymentsAPIClient interface { - ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) -} - -var _ ListDeploymentsAPIClient = (*Client)(nil) - // ListDeploymentsPaginatorOptions is the paginator options for ListDeployments type ListDeploymentsPaginatorOptions struct { // The maximum number of objects to return. @@ -217,6 +212,9 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDeploymentsAPIClient is a client that implements the ListDeployments +// operation. +type ListDeploymentsAPIClient interface { + ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) +} + +var _ ListDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListEngineVersions.go b/service/m2/api_op_ListEngineVersions.go index fd41a5258c8..b62b5dfdb19 100644 --- a/service/m2/api_op_ListEngineVersions.go +++ b/service/m2/api_op_ListEngineVersions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEngineVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngineVersions(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListEngineVersionsMiddlewares(stack *middleware.Sta return nil } -// ListEngineVersionsAPIClient is a client that implements the ListEngineVersions -// operation. -type ListEngineVersionsAPIClient interface { - ListEngineVersions(context.Context, *ListEngineVersionsInput, ...func(*Options)) (*ListEngineVersionsOutput, error) -} - -var _ ListEngineVersionsAPIClient = (*Client)(nil) - // ListEngineVersionsPaginatorOptions is the paginator options for // ListEngineVersions type ListEngineVersionsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListEngineVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListEngineVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEngineVersionsAPIClient is a client that implements the ListEngineVersions +// operation. +type ListEngineVersionsAPIClient interface { + ListEngineVersions(context.Context, *ListEngineVersionsInput, ...func(*Options)) (*ListEngineVersionsOutput, error) +} + +var _ ListEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListEnvironments.go b/service/m2/api_op_ListEnvironments.go index a603ebf50fd..78f049aa0f8 100644 --- a/service/m2/api_op_ListEnvironments.go +++ b/service/m2/api_op_ListEnvironments.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironments(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of runtime environments to return. @@ -213,6 +208,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/m2/api_op_ListTagsForResource.go b/service/m2/api_op_ListTagsForResource.go index 41fdc5af612..29af22bfa39 100644 --- a/service/m2/api_op_ListTagsForResource.go +++ b/service/m2/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_StartApplication.go b/service/m2/api_op_StartApplication.go index be3bd11c6bd..4b30f2dd75d 100644 --- a/service/m2/api_op_StartApplication.go +++ b/service/m2/api_op_StartApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStartApplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_StartBatchJob.go b/service/m2/api_op_StartBatchJob.go index 540b60f8447..e1c8f039f5d 100644 --- a/service/m2/api_op_StartBatchJob.go +++ b/service/m2/api_op_StartBatchJob.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStartBatchJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartBatchJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_StopApplication.go b/service/m2/api_op_StopApplication.go index 9b094de71a3..1b4b688eceb 100644 --- a/service/m2/api_op_StopApplication.go +++ b/service/m2/api_op_StopApplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_TagResource.go b/service/m2/api_op_TagResource.go index acafca05589..7b84ab2c292 100644 --- a/service/m2/api_op_TagResource.go +++ b/service/m2/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_UntagResource.go b/service/m2/api_op_UntagResource.go index 34cffcffb35..45d26c95a0c 100644 --- a/service/m2/api_op_UntagResource.go +++ b/service/m2/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_UpdateApplication.go b/service/m2/api_op_UpdateApplication.go index c93c4e95eef..7cb0a6be96e 100644 --- a/service/m2/api_op_UpdateApplication.go +++ b/service/m2/api_op_UpdateApplication.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/m2/api_op_UpdateEnvironment.go b/service/m2/api_op_UpdateEnvironment.go index b956ea1cbe0..73205037091 100644 --- a/service/m2/api_op_UpdateEnvironment.go +++ b/service/m2/api_op_UpdateEnvironment.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_client.go b/service/machinelearning/api_client.go index f86ff84abab..4012e725e3a 100644 --- a/service/machinelearning/api_client.go +++ b/service/machinelearning/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/machinelearning/api_op_AddTags.go b/service/machinelearning/api_op_AddTags.go index 5e5b341c82a..d74e45b5fbc 100644 --- a/service/machinelearning/api_op_AddTags.go +++ b/service/machinelearning/api_op_AddTags.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateBatchPrediction.go b/service/machinelearning/api_op_CreateBatchPrediction.go index bf67296c7d4..20309736a44 100644 --- a/service/machinelearning/api_op_CreateBatchPrediction.go +++ b/service/machinelearning/api_op_CreateBatchPrediction.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateBatchPredictionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBatchPredictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateDataSourceFromRDS.go b/service/machinelearning/api_op_CreateDataSourceFromRDS.go index 642d689c073..3605198f764 100644 --- a/service/machinelearning/api_op_CreateDataSourceFromRDS.go +++ b/service/machinelearning/api_op_CreateDataSourceFromRDS.go @@ -195,6 +195,9 @@ func (c *Client) addOperationCreateDataSourceFromRDSMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSourceFromRDSValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateDataSourceFromRedshift.go b/service/machinelearning/api_op_CreateDataSourceFromRedshift.go index 20e71009c0b..4ca39b5db59 100644 --- a/service/machinelearning/api_op_CreateDataSourceFromRedshift.go +++ b/service/machinelearning/api_op_CreateDataSourceFromRedshift.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateDataSourceFromRedshiftMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSourceFromRedshiftValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateDataSourceFromS3.go b/service/machinelearning/api_op_CreateDataSourceFromS3.go index 5acff997eeb..0b139a6e468 100644 --- a/service/machinelearning/api_op_CreateDataSourceFromS3.go +++ b/service/machinelearning/api_op_CreateDataSourceFromS3.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateDataSourceFromS3Middlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSourceFromS3ValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateEvaluation.go b/service/machinelearning/api_op_CreateEvaluation.go index 788a9bd99f9..8c8383444cc 100644 --- a/service/machinelearning/api_op_CreateEvaluation.go +++ b/service/machinelearning/api_op_CreateEvaluation.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateEvaluationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateMLModel.go b/service/machinelearning/api_op_CreateMLModel.go index cd3d90e10ad..f28b3cb75f0 100644 --- a/service/machinelearning/api_op_CreateMLModel.go +++ b/service/machinelearning/api_op_CreateMLModel.go @@ -201,6 +201,9 @@ func (c *Client) addOperationCreateMLModelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMLModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_CreateRealtimeEndpoint.go b/service/machinelearning/api_op_CreateRealtimeEndpoint.go index 3920b450155..ae98ad575b2 100644 --- a/service/machinelearning/api_op_CreateRealtimeEndpoint.go +++ b/service/machinelearning/api_op_CreateRealtimeEndpoint.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateRealtimeEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRealtimeEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DeleteBatchPrediction.go b/service/machinelearning/api_op_DeleteBatchPrediction.go index d7e7c85f81a..2d784fddd96 100644 --- a/service/machinelearning/api_op_DeleteBatchPrediction.go +++ b/service/machinelearning/api_op_DeleteBatchPrediction.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteBatchPredictionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBatchPredictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DeleteDataSource.go b/service/machinelearning/api_op_DeleteDataSource.go index f53ca8969da..11f93ebe29d 100644 --- a/service/machinelearning/api_op_DeleteDataSource.go +++ b/service/machinelearning/api_op_DeleteDataSource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DeleteEvaluation.go b/service/machinelearning/api_op_DeleteEvaluation.go index f4a9accc321..687d649fe6b 100644 --- a/service/machinelearning/api_op_DeleteEvaluation.go +++ b/service/machinelearning/api_op_DeleteEvaluation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteEvaluationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DeleteMLModel.go b/service/machinelearning/api_op_DeleteMLModel.go index 5ae06df68eb..6e7aa425d14 100644 --- a/service/machinelearning/api_op_DeleteMLModel.go +++ b/service/machinelearning/api_op_DeleteMLModel.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteMLModelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMLModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DeleteRealtimeEndpoint.go b/service/machinelearning/api_op_DeleteRealtimeEndpoint.go index 854259964a8..78d8695f2c2 100644 --- a/service/machinelearning/api_op_DeleteRealtimeEndpoint.go +++ b/service/machinelearning/api_op_DeleteRealtimeEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteRealtimeEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRealtimeEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DeleteTags.go b/service/machinelearning/api_op_DeleteTags.go index e32db5cb073..b645939f957 100644 --- a/service/machinelearning/api_op_DeleteTags.go +++ b/service/machinelearning/api_op_DeleteTags.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_DescribeBatchPredictions.go b/service/machinelearning/api_op_DescribeBatchPredictions.go index c174e18d520..1c88b38553b 100644 --- a/service/machinelearning/api_op_DescribeBatchPredictions.go +++ b/service/machinelearning/api_op_DescribeBatchPredictions.go @@ -190,6 +190,9 @@ func (c *Client) addOperationDescribeBatchPredictionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBatchPredictions(options.Region), middleware.Before); err != nil { return err } @@ -211,99 +214,6 @@ func (c *Client) addOperationDescribeBatchPredictionsMiddlewares(stack *middlewa return nil } -// DescribeBatchPredictionsAPIClient is a client that implements the -// DescribeBatchPredictions operation. -type DescribeBatchPredictionsAPIClient interface { - DescribeBatchPredictions(context.Context, *DescribeBatchPredictionsInput, ...func(*Options)) (*DescribeBatchPredictionsOutput, error) -} - -var _ DescribeBatchPredictionsAPIClient = (*Client)(nil) - -// DescribeBatchPredictionsPaginatorOptions is the paginator options for -// DescribeBatchPredictions -type DescribeBatchPredictionsPaginatorOptions struct { - // The number of pages of information to include in the result. The range of - // acceptable values is 1 through 100 . The default value is 100 . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeBatchPredictionsPaginator is a paginator for DescribeBatchPredictions -type DescribeBatchPredictionsPaginator struct { - options DescribeBatchPredictionsPaginatorOptions - client DescribeBatchPredictionsAPIClient - params *DescribeBatchPredictionsInput - nextToken *string - firstPage bool -} - -// NewDescribeBatchPredictionsPaginator returns a new -// DescribeBatchPredictionsPaginator -func NewDescribeBatchPredictionsPaginator(client DescribeBatchPredictionsAPIClient, params *DescribeBatchPredictionsInput, optFns ...func(*DescribeBatchPredictionsPaginatorOptions)) *DescribeBatchPredictionsPaginator { - if params == nil { - params = &DescribeBatchPredictionsInput{} - } - - options := DescribeBatchPredictionsPaginatorOptions{} - if params.Limit != nil { - options.Limit = *params.Limit - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeBatchPredictionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeBatchPredictionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeBatchPredictions page. -func (p *DescribeBatchPredictionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeBatchPredictionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.Limit = limit - - result, err := p.client.DescribeBatchPredictions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // BatchPredictionAvailableWaiterOptions are waiter options for // BatchPredictionAvailableWaiter type BatchPredictionAvailableWaiterOptions struct { @@ -421,7 +331,13 @@ func (w *BatchPredictionAvailableWaiter) WaitForOutput(ctx context.Context, para } out, err := w.client.DescribeBatchPredictions(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -518,6 +434,102 @@ func batchPredictionAvailableStateRetryable(ctx context.Context, input *Describe return true, nil } +// DescribeBatchPredictionsPaginatorOptions is the paginator options for +// DescribeBatchPredictions +type DescribeBatchPredictionsPaginatorOptions struct { + // The number of pages of information to include in the result. The range of + // acceptable values is 1 through 100 . The default value is 100 . + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeBatchPredictionsPaginator is a paginator for DescribeBatchPredictions +type DescribeBatchPredictionsPaginator struct { + options DescribeBatchPredictionsPaginatorOptions + client DescribeBatchPredictionsAPIClient + params *DescribeBatchPredictionsInput + nextToken *string + firstPage bool +} + +// NewDescribeBatchPredictionsPaginator returns a new +// DescribeBatchPredictionsPaginator +func NewDescribeBatchPredictionsPaginator(client DescribeBatchPredictionsAPIClient, params *DescribeBatchPredictionsInput, optFns ...func(*DescribeBatchPredictionsPaginatorOptions)) *DescribeBatchPredictionsPaginator { + if params == nil { + params = &DescribeBatchPredictionsInput{} + } + + options := DescribeBatchPredictionsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeBatchPredictionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeBatchPredictionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeBatchPredictions page. +func (p *DescribeBatchPredictionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeBatchPredictionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeBatchPredictions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeBatchPredictionsAPIClient is a client that implements the +// DescribeBatchPredictions operation. +type DescribeBatchPredictionsAPIClient interface { + DescribeBatchPredictions(context.Context, *DescribeBatchPredictionsInput, ...func(*Options)) (*DescribeBatchPredictionsOutput, error) +} + +var _ DescribeBatchPredictionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBatchPredictions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/machinelearning/api_op_DescribeDataSources.go b/service/machinelearning/api_op_DescribeDataSources.go index 1bc504e93b1..b50b96e5807 100644 --- a/service/machinelearning/api_op_DescribeDataSources.go +++ b/service/machinelearning/api_op_DescribeDataSources.go @@ -182,6 +182,9 @@ func (c *Client) addOperationDescribeDataSourcesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataSources(options.Region), middleware.Before); err != nil { return err } @@ -203,97 +206,6 @@ func (c *Client) addOperationDescribeDataSourcesMiddlewares(stack *middleware.St return nil } -// DescribeDataSourcesAPIClient is a client that implements the -// DescribeDataSources operation. -type DescribeDataSourcesAPIClient interface { - DescribeDataSources(context.Context, *DescribeDataSourcesInput, ...func(*Options)) (*DescribeDataSourcesOutput, error) -} - -var _ DescribeDataSourcesAPIClient = (*Client)(nil) - -// DescribeDataSourcesPaginatorOptions is the paginator options for -// DescribeDataSources -type DescribeDataSourcesPaginatorOptions struct { - // The maximum number of DataSource to include in the result. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDataSourcesPaginator is a paginator for DescribeDataSources -type DescribeDataSourcesPaginator struct { - options DescribeDataSourcesPaginatorOptions - client DescribeDataSourcesAPIClient - params *DescribeDataSourcesInput - nextToken *string - firstPage bool -} - -// NewDescribeDataSourcesPaginator returns a new DescribeDataSourcesPaginator -func NewDescribeDataSourcesPaginator(client DescribeDataSourcesAPIClient, params *DescribeDataSourcesInput, optFns ...func(*DescribeDataSourcesPaginatorOptions)) *DescribeDataSourcesPaginator { - if params == nil { - params = &DescribeDataSourcesInput{} - } - - options := DescribeDataSourcesPaginatorOptions{} - if params.Limit != nil { - options.Limit = *params.Limit - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDataSourcesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDataSourcesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDataSources page. -func (p *DescribeDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDataSourcesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.Limit = limit - - result, err := p.client.DescribeDataSources(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DataSourceAvailableWaiterOptions are waiter options for // DataSourceAvailableWaiter type DataSourceAvailableWaiterOptions struct { @@ -411,7 +323,13 @@ func (w *DataSourceAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeDataSources(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -508,6 +426,100 @@ func dataSourceAvailableStateRetryable(ctx context.Context, input *DescribeDataS return true, nil } +// DescribeDataSourcesPaginatorOptions is the paginator options for +// DescribeDataSources +type DescribeDataSourcesPaginatorOptions struct { + // The maximum number of DataSource to include in the result. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDataSourcesPaginator is a paginator for DescribeDataSources +type DescribeDataSourcesPaginator struct { + options DescribeDataSourcesPaginatorOptions + client DescribeDataSourcesAPIClient + params *DescribeDataSourcesInput + nextToken *string + firstPage bool +} + +// NewDescribeDataSourcesPaginator returns a new DescribeDataSourcesPaginator +func NewDescribeDataSourcesPaginator(client DescribeDataSourcesAPIClient, params *DescribeDataSourcesInput, optFns ...func(*DescribeDataSourcesPaginatorOptions)) *DescribeDataSourcesPaginator { + if params == nil { + params = &DescribeDataSourcesInput{} + } + + options := DescribeDataSourcesPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDataSourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDataSourcesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDataSources page. +func (p *DescribeDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDataSourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDataSources(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDataSourcesAPIClient is a client that implements the +// DescribeDataSources operation. +type DescribeDataSourcesAPIClient interface { + DescribeDataSources(context.Context, *DescribeDataSourcesInput, ...func(*Options)) (*DescribeDataSourcesOutput, error) +} + +var _ DescribeDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/machinelearning/api_op_DescribeEvaluations.go b/service/machinelearning/api_op_DescribeEvaluations.go index dea99b102e0..83570d23101 100644 --- a/service/machinelearning/api_op_DescribeEvaluations.go +++ b/service/machinelearning/api_op_DescribeEvaluations.go @@ -188,6 +188,9 @@ func (c *Client) addOperationDescribeEvaluationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvaluations(options.Region), middleware.Before); err != nil { return err } @@ -209,97 +212,6 @@ func (c *Client) addOperationDescribeEvaluationsMiddlewares(stack *middleware.St return nil } -// DescribeEvaluationsAPIClient is a client that implements the -// DescribeEvaluations operation. -type DescribeEvaluationsAPIClient interface { - DescribeEvaluations(context.Context, *DescribeEvaluationsInput, ...func(*Options)) (*DescribeEvaluationsOutput, error) -} - -var _ DescribeEvaluationsAPIClient = (*Client)(nil) - -// DescribeEvaluationsPaginatorOptions is the paginator options for -// DescribeEvaluations -type DescribeEvaluationsPaginatorOptions struct { - // The maximum number of Evaluation to include in the result. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeEvaluationsPaginator is a paginator for DescribeEvaluations -type DescribeEvaluationsPaginator struct { - options DescribeEvaluationsPaginatorOptions - client DescribeEvaluationsAPIClient - params *DescribeEvaluationsInput - nextToken *string - firstPage bool -} - -// NewDescribeEvaluationsPaginator returns a new DescribeEvaluationsPaginator -func NewDescribeEvaluationsPaginator(client DescribeEvaluationsAPIClient, params *DescribeEvaluationsInput, optFns ...func(*DescribeEvaluationsPaginatorOptions)) *DescribeEvaluationsPaginator { - if params == nil { - params = &DescribeEvaluationsInput{} - } - - options := DescribeEvaluationsPaginatorOptions{} - if params.Limit != nil { - options.Limit = *params.Limit - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeEvaluationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeEvaluationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeEvaluations page. -func (p *DescribeEvaluationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEvaluationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.Limit = limit - - result, err := p.client.DescribeEvaluations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // EvaluationAvailableWaiterOptions are waiter options for // EvaluationAvailableWaiter type EvaluationAvailableWaiterOptions struct { @@ -417,7 +329,13 @@ func (w *EvaluationAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeEvaluations(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -514,6 +432,100 @@ func evaluationAvailableStateRetryable(ctx context.Context, input *DescribeEvalu return true, nil } +// DescribeEvaluationsPaginatorOptions is the paginator options for +// DescribeEvaluations +type DescribeEvaluationsPaginatorOptions struct { + // The maximum number of Evaluation to include in the result. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeEvaluationsPaginator is a paginator for DescribeEvaluations +type DescribeEvaluationsPaginator struct { + options DescribeEvaluationsPaginatorOptions + client DescribeEvaluationsAPIClient + params *DescribeEvaluationsInput + nextToken *string + firstPage bool +} + +// NewDescribeEvaluationsPaginator returns a new DescribeEvaluationsPaginator +func NewDescribeEvaluationsPaginator(client DescribeEvaluationsAPIClient, params *DescribeEvaluationsInput, optFns ...func(*DescribeEvaluationsPaginatorOptions)) *DescribeEvaluationsPaginator { + if params == nil { + params = &DescribeEvaluationsInput{} + } + + options := DescribeEvaluationsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeEvaluationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeEvaluationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeEvaluations page. +func (p *DescribeEvaluationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEvaluationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeEvaluations(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeEvaluationsAPIClient is a client that implements the +// DescribeEvaluations operation. +type DescribeEvaluationsAPIClient interface { + DescribeEvaluations(context.Context, *DescribeEvaluationsInput, ...func(*Options)) (*DescribeEvaluationsOutput, error) +} + +var _ DescribeEvaluationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvaluations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/machinelearning/api_op_DescribeMLModels.go b/service/machinelearning/api_op_DescribeMLModels.go index fcde9b2a9f8..6746baeae6c 100644 --- a/service/machinelearning/api_op_DescribeMLModels.go +++ b/service/machinelearning/api_op_DescribeMLModels.go @@ -193,6 +193,9 @@ func (c *Client) addOperationDescribeMLModelsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMLModels(options.Region), middleware.Before); err != nil { return err } @@ -214,97 +217,6 @@ func (c *Client) addOperationDescribeMLModelsMiddlewares(stack *middleware.Stack return nil } -// DescribeMLModelsAPIClient is a client that implements the DescribeMLModels -// operation. -type DescribeMLModelsAPIClient interface { - DescribeMLModels(context.Context, *DescribeMLModelsInput, ...func(*Options)) (*DescribeMLModelsOutput, error) -} - -var _ DescribeMLModelsAPIClient = (*Client)(nil) - -// DescribeMLModelsPaginatorOptions is the paginator options for DescribeMLModels -type DescribeMLModelsPaginatorOptions struct { - // The number of pages of information to include in the result. The range of - // acceptable values is 1 through 100 . The default value is 100 . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeMLModelsPaginator is a paginator for DescribeMLModels -type DescribeMLModelsPaginator struct { - options DescribeMLModelsPaginatorOptions - client DescribeMLModelsAPIClient - params *DescribeMLModelsInput - nextToken *string - firstPage bool -} - -// NewDescribeMLModelsPaginator returns a new DescribeMLModelsPaginator -func NewDescribeMLModelsPaginator(client DescribeMLModelsAPIClient, params *DescribeMLModelsInput, optFns ...func(*DescribeMLModelsPaginatorOptions)) *DescribeMLModelsPaginator { - if params == nil { - params = &DescribeMLModelsInput{} - } - - options := DescribeMLModelsPaginatorOptions{} - if params.Limit != nil { - options.Limit = *params.Limit - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeMLModelsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeMLModelsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeMLModels page. -func (p *DescribeMLModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMLModelsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.Limit = limit - - result, err := p.client.DescribeMLModels(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // MLModelAvailableWaiterOptions are waiter options for MLModelAvailableWaiter type MLModelAvailableWaiterOptions struct { @@ -420,7 +332,13 @@ func (w *MLModelAvailableWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeMLModels(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -517,6 +435,100 @@ func mLModelAvailableStateRetryable(ctx context.Context, input *DescribeMLModels return true, nil } +// DescribeMLModelsPaginatorOptions is the paginator options for DescribeMLModels +type DescribeMLModelsPaginatorOptions struct { + // The number of pages of information to include in the result. The range of + // acceptable values is 1 through 100 . The default value is 100 . + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeMLModelsPaginator is a paginator for DescribeMLModels +type DescribeMLModelsPaginator struct { + options DescribeMLModelsPaginatorOptions + client DescribeMLModelsAPIClient + params *DescribeMLModelsInput + nextToken *string + firstPage bool +} + +// NewDescribeMLModelsPaginator returns a new DescribeMLModelsPaginator +func NewDescribeMLModelsPaginator(client DescribeMLModelsAPIClient, params *DescribeMLModelsInput, optFns ...func(*DescribeMLModelsPaginatorOptions)) *DescribeMLModelsPaginator { + if params == nil { + params = &DescribeMLModelsInput{} + } + + options := DescribeMLModelsPaginatorOptions{} + if params.Limit != nil { + options.Limit = *params.Limit + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMLModelsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMLModelsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMLModels page. +func (p *DescribeMLModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMLModelsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.Limit = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMLModels(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMLModelsAPIClient is a client that implements the DescribeMLModels +// operation. +type DescribeMLModelsAPIClient interface { + DescribeMLModels(context.Context, *DescribeMLModelsInput, ...func(*Options)) (*DescribeMLModelsOutput, error) +} + +var _ DescribeMLModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMLModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/machinelearning/api_op_DescribeTags.go b/service/machinelearning/api_op_DescribeTags.go index 9b5f034ddff..bb28928decc 100644 --- a/service/machinelearning/api_op_DescribeTags.go +++ b/service/machinelearning/api_op_DescribeTags.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_GetBatchPrediction.go b/service/machinelearning/api_op_GetBatchPrediction.go index 63f51aeae2b..520c43fc196 100644 --- a/service/machinelearning/api_op_GetBatchPrediction.go +++ b/service/machinelearning/api_op_GetBatchPrediction.go @@ -187,6 +187,9 @@ func (c *Client) addOperationGetBatchPredictionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBatchPredictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_GetDataSource.go b/service/machinelearning/api_op_GetDataSource.go index dff489b9346..1be6f3ce938 100644 --- a/service/machinelearning/api_op_GetDataSource.go +++ b/service/machinelearning/api_op_GetDataSource.go @@ -208,6 +208,9 @@ func (c *Client) addOperationGetDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_GetEvaluation.go b/service/machinelearning/api_op_GetEvaluation.go index 1199c154d1c..c7350f20ab9 100644 --- a/service/machinelearning/api_op_GetEvaluation.go +++ b/service/machinelearning/api_op_GetEvaluation.go @@ -189,6 +189,9 @@ func (c *Client) addOperationGetEvaluationMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_GetMLModel.go b/service/machinelearning/api_op_GetMLModel.go index 4ee51601233..42beeeda174 100644 --- a/service/machinelearning/api_op_GetMLModel.go +++ b/service/machinelearning/api_op_GetMLModel.go @@ -257,6 +257,9 @@ func (c *Client) addOperationGetMLModelMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_Predict.go b/service/machinelearning/api_op_Predict.go index ee3f99196fa..540917a55dd 100644 --- a/service/machinelearning/api_op_Predict.go +++ b/service/machinelearning/api_op_Predict.go @@ -130,6 +130,9 @@ func (c *Client) addOperationPredictMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPredictValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_UpdateBatchPrediction.go b/service/machinelearning/api_op_UpdateBatchPrediction.go index 18a5ab324f7..cd9899ef5ae 100644 --- a/service/machinelearning/api_op_UpdateBatchPrediction.go +++ b/service/machinelearning/api_op_UpdateBatchPrediction.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateBatchPredictionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBatchPredictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_UpdateDataSource.go b/service/machinelearning/api_op_UpdateDataSource.go index 26d055374e2..4f830dec9e4 100644 --- a/service/machinelearning/api_op_UpdateDataSource.go +++ b/service/machinelearning/api_op_UpdateDataSource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_UpdateEvaluation.go b/service/machinelearning/api_op_UpdateEvaluation.go index ec4cc171862..62691f59f99 100644 --- a/service/machinelearning/api_op_UpdateEvaluation.go +++ b/service/machinelearning/api_op_UpdateEvaluation.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateEvaluationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEvaluationValidationMiddleware(stack); err != nil { return err } diff --git a/service/machinelearning/api_op_UpdateMLModel.go b/service/machinelearning/api_op_UpdateMLModel.go index 88d795853d3..0cedac4d693 100644 --- a/service/machinelearning/api_op_UpdateMLModel.go +++ b/service/machinelearning/api_op_UpdateMLModel.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateMLModelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMLModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_client.go b/service/macie2/api_client.go index 983dae602dc..ad99a7a6d42 100644 --- a/service/macie2/api_client.go +++ b/service/macie2/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/macie2/api_op_AcceptInvitation.go b/service/macie2/api_op_AcceptInvitation.go index 171638026b7..d01bc6a3bed 100644 --- a/service/macie2/api_op_AcceptInvitation.go +++ b/service/macie2/api_op_AcceptInvitation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationAcceptInvitationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_BatchGetCustomDataIdentifiers.go b/service/macie2/api_op_BatchGetCustomDataIdentifiers.go index d6d978907d6..26fc2474e6b 100644 --- a/service/macie2/api_op_BatchGetCustomDataIdentifiers.go +++ b/service/macie2/api_op_BatchGetCustomDataIdentifiers.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchGetCustomDataIdentifiersMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetCustomDataIdentifiers(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_BatchUpdateAutomatedDiscoveryAccounts.go b/service/macie2/api_op_BatchUpdateAutomatedDiscoveryAccounts.go index f71e601ffd6..d70eb6aea53 100644 --- a/service/macie2/api_op_BatchUpdateAutomatedDiscoveryAccounts.go +++ b/service/macie2/api_op_BatchUpdateAutomatedDiscoveryAccounts.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchUpdateAutomatedDiscoveryAccountsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchUpdateAutomatedDiscoveryAccounts(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_CreateAllowList.go b/service/macie2/api_op_CreateAllowList.go index 094f6fa4694..46ef9937f82 100644 --- a/service/macie2/api_op_CreateAllowList.go +++ b/service/macie2/api_op_CreateAllowList.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateAllowListMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAllowListMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_CreateClassificationJob.go b/service/macie2/api_op_CreateClassificationJob.go index 085bb4c2383..e4e0802931d 100644 --- a/service/macie2/api_op_CreateClassificationJob.go +++ b/service/macie2/api_op_CreateClassificationJob.go @@ -220,6 +220,9 @@ func (c *Client) addOperationCreateClassificationJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateClassificationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_CreateCustomDataIdentifier.go b/service/macie2/api_op_CreateCustomDataIdentifier.go index 065b9dfee33..99158d45084 100644 --- a/service/macie2/api_op_CreateCustomDataIdentifier.go +++ b/service/macie2/api_op_CreateCustomDataIdentifier.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateCustomDataIdentifierMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCustomDataIdentifierMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_CreateFindingsFilter.go b/service/macie2/api_op_CreateFindingsFilter.go index 77230651974..608b17771ed 100644 --- a/service/macie2/api_op_CreateFindingsFilter.go +++ b/service/macie2/api_op_CreateFindingsFilter.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateFindingsFilterMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFindingsFilterMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_CreateInvitations.go b/service/macie2/api_op_CreateInvitations.go index 93d490e18b6..018d7d237c4 100644 --- a/service/macie2/api_op_CreateInvitations.go +++ b/service/macie2/api_op_CreateInvitations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateInvitationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_CreateMember.go b/service/macie2/api_op_CreateMember.go index 9e52bc624ab..81d65023201 100644 --- a/service/macie2/api_op_CreateMember.go +++ b/service/macie2/api_op_CreateMember.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateMemberMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_CreateSampleFindings.go b/service/macie2/api_op_CreateSampleFindings.go index ad1bb916545..b746a0a2233 100644 --- a/service/macie2/api_op_CreateSampleFindings.go +++ b/service/macie2/api_op_CreateSampleFindings.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCreateSampleFindingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSampleFindings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_DeclineInvitations.go b/service/macie2/api_op_DeclineInvitations.go index 8185b3e11d7..05618025c48 100644 --- a/service/macie2/api_op_DeclineInvitations.go +++ b/service/macie2/api_op_DeclineInvitations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeclineInvitationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeclineInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DeleteAllowList.go b/service/macie2/api_op_DeleteAllowList.go index adb18e7615e..025f1b2e803 100644 --- a/service/macie2/api_op_DeleteAllowList.go +++ b/service/macie2/api_op_DeleteAllowList.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAllowListMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAllowListValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DeleteCustomDataIdentifier.go b/service/macie2/api_op_DeleteCustomDataIdentifier.go index 3ca42ff9af7..fe774846c72 100644 --- a/service/macie2/api_op_DeleteCustomDataIdentifier.go +++ b/service/macie2/api_op_DeleteCustomDataIdentifier.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCustomDataIdentifierMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomDataIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DeleteFindingsFilter.go b/service/macie2/api_op_DeleteFindingsFilter.go index a72af1a1a76..8d1ff6e0525 100644 --- a/service/macie2/api_op_DeleteFindingsFilter.go +++ b/service/macie2/api_op_DeleteFindingsFilter.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFindingsFilterMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFindingsFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DeleteInvitations.go b/service/macie2/api_op_DeleteInvitations.go index 709f59f896b..60c88b79ad5 100644 --- a/service/macie2/api_op_DeleteInvitations.go +++ b/service/macie2/api_op_DeleteInvitations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteInvitationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DeleteMember.go b/service/macie2/api_op_DeleteMember.go index 174be433454..4da19658b5b 100644 --- a/service/macie2/api_op_DeleteMember.go +++ b/service/macie2/api_op_DeleteMember.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteMemberMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DescribeBuckets.go b/service/macie2/api_op_DescribeBuckets.go index 50b797dfa34..64dd6e26bb8 100644 --- a/service/macie2/api_op_DescribeBuckets.go +++ b/service/macie2/api_op_DescribeBuckets.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeBucketsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBuckets(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeBucketsMiddlewares(stack *middleware.Stack, return nil } -// DescribeBucketsAPIClient is a client that implements the DescribeBuckets -// operation. -type DescribeBucketsAPIClient interface { - DescribeBuckets(context.Context, *DescribeBucketsInput, ...func(*Options)) (*DescribeBucketsOutput, error) -} - -var _ DescribeBucketsAPIClient = (*Client)(nil) - // DescribeBucketsPaginatorOptions is the paginator options for DescribeBuckets type DescribeBucketsPaginatorOptions struct { // The maximum number of items to include in each page of the response. The @@ -214,6 +209,9 @@ func (p *DescribeBucketsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBuckets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeBucketsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeBucketsAPIClient is a client that implements the DescribeBuckets +// operation. +type DescribeBucketsAPIClient interface { + DescribeBuckets(context.Context, *DescribeBucketsInput, ...func(*Options)) (*DescribeBucketsOutput, error) +} + +var _ DescribeBucketsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBuckets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_DescribeClassificationJob.go b/service/macie2/api_op_DescribeClassificationJob.go index 4121f741a80..5c39a9cb7b5 100644 --- a/service/macie2/api_op_DescribeClassificationJob.go +++ b/service/macie2/api_op_DescribeClassificationJob.go @@ -247,6 +247,9 @@ func (c *Client) addOperationDescribeClassificationJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClassificationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DescribeOrganizationConfiguration.go b/service/macie2/api_op_DescribeOrganizationConfiguration.go index fadd7848837..2643dfaebe6 100644 --- a/service/macie2/api_op_DescribeOrganizationConfiguration.go +++ b/service/macie2/api_op_DescribeOrganizationConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_DisableMacie.go b/service/macie2/api_op_DisableMacie.go index ae6cb7b98d7..9ab5bae5139 100644 --- a/service/macie2/api_op_DisableMacie.go +++ b/service/macie2/api_op_DisableMacie.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDisableMacieMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableMacie(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_DisableOrganizationAdminAccount.go b/service/macie2/api_op_DisableOrganizationAdminAccount.go index e521aac8ad1..d84295efab8 100644 --- a/service/macie2/api_op_DisableOrganizationAdminAccount.go +++ b/service/macie2/api_op_DisableOrganizationAdminAccount.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDisableOrganizationAdminAccountMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_DisassociateFromAdministratorAccount.go b/service/macie2/api_op_DisassociateFromAdministratorAccount.go index c62373083f6..fff29a4f588 100644 --- a/service/macie2/api_op_DisassociateFromAdministratorAccount.go +++ b/service/macie2/api_op_DisassociateFromAdministratorAccount.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDisassociateFromAdministratorAccountMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateFromAdministratorAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_DisassociateFromMasterAccount.go b/service/macie2/api_op_DisassociateFromMasterAccount.go index e34e42707fb..b7d21a93f3f 100644 --- a/service/macie2/api_op_DisassociateFromMasterAccount.go +++ b/service/macie2/api_op_DisassociateFromMasterAccount.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDisassociateFromMasterAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateFromMasterAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_DisassociateMember.go b/service/macie2/api_op_DisassociateMember.go index 8552f07e9dd..dd457c167e7 100644 --- a/service/macie2/api_op_DisassociateMember.go +++ b/service/macie2/api_op_DisassociateMember.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateMemberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_EnableMacie.go b/service/macie2/api_op_EnableMacie.go index d2cab006cbf..d15dde415ed 100644 --- a/service/macie2/api_op_EnableMacie.go +++ b/service/macie2/api_op_EnableMacie.go @@ -111,6 +111,9 @@ func (c *Client) addOperationEnableMacieMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opEnableMacieMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_EnableOrganizationAdminAccount.go b/service/macie2/api_op_EnableOrganizationAdminAccount.go index 4a4efe460c4..97bb8aa3a62 100644 --- a/service/macie2/api_op_EnableOrganizationAdminAccount.go +++ b/service/macie2/api_op_EnableOrganizationAdminAccount.go @@ -107,6 +107,9 @@ func (c *Client) addOperationEnableOrganizationAdminAccountMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opEnableOrganizationAdminAccountMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_GetAdministratorAccount.go b/service/macie2/api_op_GetAdministratorAccount.go index 2dcfc12a1cb..4ebae3300ca 100644 --- a/service/macie2/api_op_GetAdministratorAccount.go +++ b/service/macie2/api_op_GetAdministratorAccount.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAdministratorAccountMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAdministratorAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetAllowList.go b/service/macie2/api_op_GetAllowList.go index 11687d7d119..3c3f2fd8c5f 100644 --- a/service/macie2/api_op_GetAllowList.go +++ b/service/macie2/api_op_GetAllowList.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetAllowListMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAllowListValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetAutomatedDiscoveryConfiguration.go b/service/macie2/api_op_GetAutomatedDiscoveryConfiguration.go index 3cf392412ff..b927387ece6 100644 --- a/service/macie2/api_op_GetAutomatedDiscoveryConfiguration.go +++ b/service/macie2/api_op_GetAutomatedDiscoveryConfiguration.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetAutomatedDiscoveryConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAutomatedDiscoveryConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetBucketStatistics.go b/service/macie2/api_op_GetBucketStatistics.go index 72e9fd020c6..25b953d08f7 100644 --- a/service/macie2/api_op_GetBucketStatistics.go +++ b/service/macie2/api_op_GetBucketStatistics.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetBucketStatisticsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetBucketStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetClassificationExportConfiguration.go b/service/macie2/api_op_GetClassificationExportConfiguration.go index 6302964a3b4..27e379fc4db 100644 --- a/service/macie2/api_op_GetClassificationExportConfiguration.go +++ b/service/macie2/api_op_GetClassificationExportConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetClassificationExportConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetClassificationExportConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetClassificationScope.go b/service/macie2/api_op_GetClassificationScope.go index 6999ba42079..725fdd78bb1 100644 --- a/service/macie2/api_op_GetClassificationScope.go +++ b/service/macie2/api_op_GetClassificationScope.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetClassificationScopeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClassificationScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetCustomDataIdentifier.go b/service/macie2/api_op_GetCustomDataIdentifier.go index 24c6941cbab..feccb3fe0c1 100644 --- a/service/macie2/api_op_GetCustomDataIdentifier.go +++ b/service/macie2/api_op_GetCustomDataIdentifier.go @@ -157,6 +157,9 @@ func (c *Client) addOperationGetCustomDataIdentifierMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomDataIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetFindingStatistics.go b/service/macie2/api_op_GetFindingStatistics.go index 669547995e8..9432c0d406d 100644 --- a/service/macie2/api_op_GetFindingStatistics.go +++ b/service/macie2/api_op_GetFindingStatistics.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetFindingStatisticsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingStatisticsValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetFindings.go b/service/macie2/api_op_GetFindings.go index f67926341e9..11b26230d1c 100644 --- a/service/macie2/api_op_GetFindings.go +++ b/service/macie2/api_op_GetFindings.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetFindingsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetFindingsFilter.go b/service/macie2/api_op_GetFindingsFilter.go index 3d66f3399c5..c59373996aa 100644 --- a/service/macie2/api_op_GetFindingsFilter.go +++ b/service/macie2/api_op_GetFindingsFilter.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetFindingsFilterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingsFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetFindingsPublicationConfiguration.go b/service/macie2/api_op_GetFindingsPublicationConfiguration.go index 9dda372fcc1..2ceb979f6f5 100644 --- a/service/macie2/api_op_GetFindingsPublicationConfiguration.go +++ b/service/macie2/api_op_GetFindingsPublicationConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetFindingsPublicationConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFindingsPublicationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetInvitationsCount.go b/service/macie2/api_op_GetInvitationsCount.go index 2526fab46de..ebae7277474 100644 --- a/service/macie2/api_op_GetInvitationsCount.go +++ b/service/macie2/api_op_GetInvitationsCount.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetInvitationsCountMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInvitationsCount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetMacieSession.go b/service/macie2/api_op_GetMacieSession.go index f8eaeda224c..21d7394e2c2 100644 --- a/service/macie2/api_op_GetMacieSession.go +++ b/service/macie2/api_op_GetMacieSession.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetMacieSessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMacieSession(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetMasterAccount.go b/service/macie2/api_op_GetMasterAccount.go index 4ccca1d4f9d..b8bfb174efd 100644 --- a/service/macie2/api_op_GetMasterAccount.go +++ b/service/macie2/api_op_GetMasterAccount.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetMasterAccountMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMasterAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetMember.go b/service/macie2/api_op_GetMember.go index d185ebcbea7..e88db09e337 100644 --- a/service/macie2/api_op_GetMember.go +++ b/service/macie2/api_op_GetMember.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetMemberMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetResourceProfile.go b/service/macie2/api_op_GetResourceProfile.go index 5e697240444..d92dba50e3b 100644 --- a/service/macie2/api_op_GetResourceProfile.go +++ b/service/macie2/api_op_GetResourceProfile.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetResourceProfileMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetRevealConfiguration.go b/service/macie2/api_op_GetRevealConfiguration.go index b26e2f95774..a4f5d63e9a3 100644 --- a/service/macie2/api_op_GetRevealConfiguration.go +++ b/service/macie2/api_op_GetRevealConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetRevealConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRevealConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_GetSensitiveDataOccurrences.go b/service/macie2/api_op_GetSensitiveDataOccurrences.go index 13fd02f4426..ec6618735ba 100644 --- a/service/macie2/api_op_GetSensitiveDataOccurrences.go +++ b/service/macie2/api_op_GetSensitiveDataOccurrences.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetSensitiveDataOccurrencesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSensitiveDataOccurrencesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationGetSensitiveDataOccurrencesMiddlewares(stack *middl return nil } -// GetSensitiveDataOccurrencesAPIClient is a client that implements the -// GetSensitiveDataOccurrences operation. -type GetSensitiveDataOccurrencesAPIClient interface { - GetSensitiveDataOccurrences(context.Context, *GetSensitiveDataOccurrencesInput, ...func(*Options)) (*GetSensitiveDataOccurrencesOutput, error) -} - -var _ GetSensitiveDataOccurrencesAPIClient = (*Client)(nil) - // FindingRevealedWaiterOptions are waiter options for FindingRevealedWaiter type FindingRevealedWaiterOptions struct { @@ -277,7 +272,13 @@ func (w *FindingRevealedWaiter) WaitForOutput(ctx context.Context, params *GetSe } out, err := w.client.GetSensitiveDataOccurrences(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -352,6 +353,14 @@ func findingRevealedStateRetryable(ctx context.Context, input *GetSensitiveDataO return true, nil } +// GetSensitiveDataOccurrencesAPIClient is a client that implements the +// GetSensitiveDataOccurrences operation. +type GetSensitiveDataOccurrencesAPIClient interface { + GetSensitiveDataOccurrences(context.Context, *GetSensitiveDataOccurrencesInput, ...func(*Options)) (*GetSensitiveDataOccurrencesOutput, error) +} + +var _ GetSensitiveDataOccurrencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSensitiveDataOccurrences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_GetSensitiveDataOccurrencesAvailability.go b/service/macie2/api_op_GetSensitiveDataOccurrencesAvailability.go index 7c5795d0c81..72da840a61a 100644 --- a/service/macie2/api_op_GetSensitiveDataOccurrencesAvailability.go +++ b/service/macie2/api_op_GetSensitiveDataOccurrencesAvailability.go @@ -166,6 +166,9 @@ func (c *Client) addOperationGetSensitiveDataOccurrencesAvailabilityMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSensitiveDataOccurrencesAvailabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetSensitivityInspectionTemplate.go b/service/macie2/api_op_GetSensitivityInspectionTemplate.go index 43a88a74b58..3008162bc1a 100644 --- a/service/macie2/api_op_GetSensitivityInspectionTemplate.go +++ b/service/macie2/api_op_GetSensitivityInspectionTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetSensitivityInspectionTemplateMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSensitivityInspectionTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_GetUsageStatistics.go b/service/macie2/api_op_GetUsageStatistics.go index 4186ef6c313..c1a43237ae7 100644 --- a/service/macie2/api_op_GetUsageStatistics.go +++ b/service/macie2/api_op_GetUsageStatistics.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetUsageStatisticsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUsageStatistics(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationGetUsageStatisticsMiddlewares(stack *middleware.Sta return nil } -// GetUsageStatisticsAPIClient is a client that implements the GetUsageStatistics -// operation. -type GetUsageStatisticsAPIClient interface { - GetUsageStatistics(context.Context, *GetUsageStatisticsInput, ...func(*Options)) (*GetUsageStatisticsOutput, error) -} - -var _ GetUsageStatisticsAPIClient = (*Client)(nil) - // GetUsageStatisticsPaginatorOptions is the paginator options for // GetUsageStatistics type GetUsageStatisticsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetUsageStatisticsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUsageStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetUsageStatisticsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetUsageStatisticsAPIClient is a client that implements the GetUsageStatistics +// operation. +type GetUsageStatisticsAPIClient interface { + GetUsageStatistics(context.Context, *GetUsageStatisticsInput, ...func(*Options)) (*GetUsageStatisticsOutput, error) +} + +var _ GetUsageStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUsageStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_GetUsageTotals.go b/service/macie2/api_op_GetUsageTotals.go index f56d9809be5..cde79e0f646 100644 --- a/service/macie2/api_op_GetUsageTotals.go +++ b/service/macie2/api_op_GetUsageTotals.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetUsageTotalsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetUsageTotals(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_ListAllowLists.go b/service/macie2/api_op_ListAllowLists.go index d549b2d0299..8399691df66 100644 --- a/service/macie2/api_op_ListAllowLists.go +++ b/service/macie2/api_op_ListAllowLists.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListAllowListsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAllowLists(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListAllowListsMiddlewares(stack *middleware.Stack, return nil } -// ListAllowListsAPIClient is a client that implements the ListAllowLists -// operation. -type ListAllowListsAPIClient interface { - ListAllowLists(context.Context, *ListAllowListsInput, ...func(*Options)) (*ListAllowListsOutput, error) -} - -var _ ListAllowListsAPIClient = (*Client)(nil) - // ListAllowListsPaginatorOptions is the paginator options for ListAllowLists type ListAllowListsPaginatorOptions struct { // The maximum number of items to include in each page of a paginated response. @@ -204,6 +199,9 @@ func (p *ListAllowListsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAllowLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListAllowListsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAllowListsAPIClient is a client that implements the ListAllowLists +// operation. +type ListAllowListsAPIClient interface { + ListAllowLists(context.Context, *ListAllowListsInput, ...func(*Options)) (*ListAllowListsOutput, error) +} + +var _ ListAllowListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAllowLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListAutomatedDiscoveryAccounts.go b/service/macie2/api_op_ListAutomatedDiscoveryAccounts.go index df01bffe94a..3aa88ef2fa8 100644 --- a/service/macie2/api_op_ListAutomatedDiscoveryAccounts.go +++ b/service/macie2/api_op_ListAutomatedDiscoveryAccounts.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAutomatedDiscoveryAccountsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutomatedDiscoveryAccounts(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAutomatedDiscoveryAccountsMiddlewares(stack *mi return nil } -// ListAutomatedDiscoveryAccountsAPIClient is a client that implements the -// ListAutomatedDiscoveryAccounts operation. -type ListAutomatedDiscoveryAccountsAPIClient interface { - ListAutomatedDiscoveryAccounts(context.Context, *ListAutomatedDiscoveryAccountsInput, ...func(*Options)) (*ListAutomatedDiscoveryAccountsOutput, error) -} - -var _ ListAutomatedDiscoveryAccountsAPIClient = (*Client)(nil) - // ListAutomatedDiscoveryAccountsPaginatorOptions is the paginator options for // ListAutomatedDiscoveryAccounts type ListAutomatedDiscoveryAccountsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListAutomatedDiscoveryAccountsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAutomatedDiscoveryAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListAutomatedDiscoveryAccountsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAutomatedDiscoveryAccountsAPIClient is a client that implements the +// ListAutomatedDiscoveryAccounts operation. +type ListAutomatedDiscoveryAccountsAPIClient interface { + ListAutomatedDiscoveryAccounts(context.Context, *ListAutomatedDiscoveryAccountsInput, ...func(*Options)) (*ListAutomatedDiscoveryAccountsOutput, error) +} + +var _ ListAutomatedDiscoveryAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAutomatedDiscoveryAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListClassificationJobs.go b/service/macie2/api_op_ListClassificationJobs.go index 9eb4e128347..cbe3c9bee68 100644 --- a/service/macie2/api_op_ListClassificationJobs.go +++ b/service/macie2/api_op_ListClassificationJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListClassificationJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClassificationJobs(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListClassificationJobsMiddlewares(stack *middleware return nil } -// ListClassificationJobsAPIClient is a client that implements the -// ListClassificationJobs operation. -type ListClassificationJobsAPIClient interface { - ListClassificationJobs(context.Context, *ListClassificationJobsInput, ...func(*Options)) (*ListClassificationJobsOutput, error) -} - -var _ ListClassificationJobsAPIClient = (*Client)(nil) - // ListClassificationJobsPaginatorOptions is the paginator options for // ListClassificationJobs type ListClassificationJobsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListClassificationJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClassificationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListClassificationJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListClassificationJobsAPIClient is a client that implements the +// ListClassificationJobs operation. +type ListClassificationJobsAPIClient interface { + ListClassificationJobs(context.Context, *ListClassificationJobsInput, ...func(*Options)) (*ListClassificationJobsOutput, error) +} + +var _ ListClassificationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClassificationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListClassificationScopes.go b/service/macie2/api_op_ListClassificationScopes.go index bca17795b3e..b6499e05fce 100644 --- a/service/macie2/api_op_ListClassificationScopes.go +++ b/service/macie2/api_op_ListClassificationScopes.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListClassificationScopesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClassificationScopes(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListClassificationScopesMiddlewares(stack *middlewa return nil } -// ListClassificationScopesAPIClient is a client that implements the -// ListClassificationScopes operation. -type ListClassificationScopesAPIClient interface { - ListClassificationScopes(context.Context, *ListClassificationScopesInput, ...func(*Options)) (*ListClassificationScopesOutput, error) -} - -var _ ListClassificationScopesAPIClient = (*Client)(nil) - // ListClassificationScopesPaginatorOptions is the paginator options for // ListClassificationScopes type ListClassificationScopesPaginatorOptions struct { @@ -195,6 +190,9 @@ func (p *ListClassificationScopesPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClassificationScopes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +212,14 @@ func (p *ListClassificationScopesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListClassificationScopesAPIClient is a client that implements the +// ListClassificationScopes operation. +type ListClassificationScopesAPIClient interface { + ListClassificationScopes(context.Context, *ListClassificationScopesInput, ...func(*Options)) (*ListClassificationScopesOutput, error) +} + +var _ ListClassificationScopesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClassificationScopes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListCustomDataIdentifiers.go b/service/macie2/api_op_ListCustomDataIdentifiers.go index 7bfcaa481fa..2ab79d45a99 100644 --- a/service/macie2/api_op_ListCustomDataIdentifiers.go +++ b/service/macie2/api_op_ListCustomDataIdentifiers.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListCustomDataIdentifiersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomDataIdentifiers(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListCustomDataIdentifiersMiddlewares(stack *middlew return nil } -// ListCustomDataIdentifiersAPIClient is a client that implements the -// ListCustomDataIdentifiers operation. -type ListCustomDataIdentifiersAPIClient interface { - ListCustomDataIdentifiers(context.Context, *ListCustomDataIdentifiersInput, ...func(*Options)) (*ListCustomDataIdentifiersOutput, error) -} - -var _ ListCustomDataIdentifiersAPIClient = (*Client)(nil) - // ListCustomDataIdentifiersPaginatorOptions is the paginator options for // ListCustomDataIdentifiers type ListCustomDataIdentifiersPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListCustomDataIdentifiersPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomDataIdentifiers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListCustomDataIdentifiersPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListCustomDataIdentifiersAPIClient is a client that implements the +// ListCustomDataIdentifiers operation. +type ListCustomDataIdentifiersAPIClient interface { + ListCustomDataIdentifiers(context.Context, *ListCustomDataIdentifiersInput, ...func(*Options)) (*ListCustomDataIdentifiersOutput, error) +} + +var _ ListCustomDataIdentifiersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomDataIdentifiers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListFindings.go b/service/macie2/api_op_ListFindings.go index 4a69579d0fc..a57ff0252ec 100644 --- a/service/macie2/api_op_ListFindings.go +++ b/service/macie2/api_op_ListFindings.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFindings(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListFindingsMiddlewares(stack *middleware.Stack, op return nil } -// ListFindingsAPIClient is a client that implements the ListFindings operation. -type ListFindingsAPIClient interface { - ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) -} - -var _ ListFindingsAPIClient = (*Client)(nil) - // ListFindingsPaginatorOptions is the paginator options for ListFindings type ListFindingsPaginatorOptions struct { // The maximum number of items to include in each page of the response. @@ -210,6 +206,9 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListFindingsAPIClient is a client that implements the ListFindings operation. +type ListFindingsAPIClient interface { + ListFindings(context.Context, *ListFindingsInput, ...func(*Options)) (*ListFindingsOutput, error) +} + +var _ ListFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListFindingsFilters.go b/service/macie2/api_op_ListFindingsFilters.go index 705954acc82..d9870f028dd 100644 --- a/service/macie2/api_op_ListFindingsFilters.go +++ b/service/macie2/api_op_ListFindingsFilters.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListFindingsFiltersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFindingsFilters(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListFindingsFiltersMiddlewares(stack *middleware.St return nil } -// ListFindingsFiltersAPIClient is a client that implements the -// ListFindingsFilters operation. -type ListFindingsFiltersAPIClient interface { - ListFindingsFilters(context.Context, *ListFindingsFiltersInput, ...func(*Options)) (*ListFindingsFiltersOutput, error) -} - -var _ ListFindingsFiltersAPIClient = (*Client)(nil) - // ListFindingsFiltersPaginatorOptions is the paginator options for // ListFindingsFilters type ListFindingsFiltersPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListFindingsFiltersPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindingsFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListFindingsFiltersPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFindingsFiltersAPIClient is a client that implements the +// ListFindingsFilters operation. +type ListFindingsFiltersAPIClient interface { + ListFindingsFilters(context.Context, *ListFindingsFiltersInput, ...func(*Options)) (*ListFindingsFiltersOutput, error) +} + +var _ ListFindingsFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindingsFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListInvitations.go b/service/macie2/api_op_ListInvitations.go index 7b1b5b2164f..18ba6a6be1b 100644 --- a/service/macie2/api_op_ListInvitations.go +++ b/service/macie2/api_op_ListInvitations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInvitations(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, return nil } -// ListInvitationsAPIClient is a client that implements the ListInvitations -// operation. -type ListInvitationsAPIClient interface { - ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) -} - -var _ ListInvitationsAPIClient = (*Client)(nil) - // ListInvitationsPaginatorOptions is the paginator options for ListInvitations type ListInvitationsPaginatorOptions struct { // The maximum number of items to include in each page of a paginated response. @@ -205,6 +200,9 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListInvitationsAPIClient is a client that implements the ListInvitations +// operation. +type ListInvitationsAPIClient interface { + ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) +} + +var _ ListInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListManagedDataIdentifiers.go b/service/macie2/api_op_ListManagedDataIdentifiers.go index 94b4ed2190e..4d807f6b0b8 100644 --- a/service/macie2/api_op_ListManagedDataIdentifiers.go +++ b/service/macie2/api_op_ListManagedDataIdentifiers.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListManagedDataIdentifiersMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedDataIdentifiers(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListManagedDataIdentifiersMiddlewares(stack *middle return nil } -// ListManagedDataIdentifiersAPIClient is a client that implements the -// ListManagedDataIdentifiers operation. -type ListManagedDataIdentifiersAPIClient interface { - ListManagedDataIdentifiers(context.Context, *ListManagedDataIdentifiersInput, ...func(*Options)) (*ListManagedDataIdentifiersOutput, error) -} - -var _ ListManagedDataIdentifiersAPIClient = (*Client)(nil) - // ListManagedDataIdentifiersPaginatorOptions is the paginator options for // ListManagedDataIdentifiers type ListManagedDataIdentifiersPaginatorOptions struct { @@ -193,6 +188,9 @@ func (p *ListManagedDataIdentifiersPaginator) NextPage(ctx context.Context, optF params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedDataIdentifiers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -212,6 +210,14 @@ func (p *ListManagedDataIdentifiersPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListManagedDataIdentifiersAPIClient is a client that implements the +// ListManagedDataIdentifiers operation. +type ListManagedDataIdentifiersAPIClient interface { + ListManagedDataIdentifiers(context.Context, *ListManagedDataIdentifiersInput, ...func(*Options)) (*ListManagedDataIdentifiersOutput, error) +} + +var _ ListManagedDataIdentifiersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedDataIdentifiers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListMembers.go b/service/macie2/api_op_ListMembers.go index 32f00cd340a..14db4b8ede7 100644 --- a/service/macie2/api_op_ListMembers.go +++ b/service/macie2/api_op_ListMembers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMembers(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // The maximum number of items to include in each page of a paginated response. @@ -211,6 +207,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListOrganizationAdminAccounts.go b/service/macie2/api_op_ListOrganizationAdminAccounts.go index e928e04edfa..95fc3ff7767 100644 --- a/service/macie2/api_op_ListOrganizationAdminAccounts.go +++ b/service/macie2/api_op_ListOrganizationAdminAccounts.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationAdminAccounts(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid return nil } -// ListOrganizationAdminAccountsAPIClient is a client that implements the -// ListOrganizationAdminAccounts operation. -type ListOrganizationAdminAccountsAPIClient interface { - ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) -} - -var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) - // ListOrganizationAdminAccountsPaginatorOptions is the paginator options for // ListOrganizationAdminAccounts type ListOrganizationAdminAccountsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationAdminAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListOrganizationAdminAccountsAPIClient is a client that implements the +// ListOrganizationAdminAccounts operation. +type ListOrganizationAdminAccountsAPIClient interface { + ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) +} + +var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationAdminAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListResourceProfileArtifacts.go b/service/macie2/api_op_ListResourceProfileArtifacts.go index 3d3f54b78fd..3aa93712ea5 100644 --- a/service/macie2/api_op_ListResourceProfileArtifacts.go +++ b/service/macie2/api_op_ListResourceProfileArtifacts.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListResourceProfileArtifactsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceProfileArtifactsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListResourceProfileArtifactsMiddlewares(stack *midd return nil } -// ListResourceProfileArtifactsAPIClient is a client that implements the -// ListResourceProfileArtifacts operation. -type ListResourceProfileArtifactsAPIClient interface { - ListResourceProfileArtifacts(context.Context, *ListResourceProfileArtifactsInput, ...func(*Options)) (*ListResourceProfileArtifactsOutput, error) -} - -var _ ListResourceProfileArtifactsAPIClient = (*Client)(nil) - // ListResourceProfileArtifactsPaginatorOptions is the paginator options for // ListResourceProfileArtifacts type ListResourceProfileArtifactsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListResourceProfileArtifactsPaginator) NextPage(ctx context.Context, op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceProfileArtifacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListResourceProfileArtifactsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListResourceProfileArtifactsAPIClient is a client that implements the +// ListResourceProfileArtifacts operation. +type ListResourceProfileArtifactsAPIClient interface { + ListResourceProfileArtifacts(context.Context, *ListResourceProfileArtifactsInput, ...func(*Options)) (*ListResourceProfileArtifactsOutput, error) +} + +var _ ListResourceProfileArtifactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceProfileArtifacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListResourceProfileDetections.go b/service/macie2/api_op_ListResourceProfileDetections.go index eefc8c270bf..d49038d1d67 100644 --- a/service/macie2/api_op_ListResourceProfileDetections.go +++ b/service/macie2/api_op_ListResourceProfileDetections.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListResourceProfileDetectionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceProfileDetectionsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListResourceProfileDetectionsMiddlewares(stack *mid return nil } -// ListResourceProfileDetectionsAPIClient is a client that implements the -// ListResourceProfileDetections operation. -type ListResourceProfileDetectionsAPIClient interface { - ListResourceProfileDetections(context.Context, *ListResourceProfileDetectionsInput, ...func(*Options)) (*ListResourceProfileDetectionsOutput, error) -} - -var _ ListResourceProfileDetectionsAPIClient = (*Client)(nil) - // ListResourceProfileDetectionsPaginatorOptions is the paginator options for // ListResourceProfileDetections type ListResourceProfileDetectionsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListResourceProfileDetectionsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceProfileDetections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListResourceProfileDetectionsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListResourceProfileDetectionsAPIClient is a client that implements the +// ListResourceProfileDetections operation. +type ListResourceProfileDetectionsAPIClient interface { + ListResourceProfileDetections(context.Context, *ListResourceProfileDetectionsInput, ...func(*Options)) (*ListResourceProfileDetectionsOutput, error) +} + +var _ ListResourceProfileDetectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceProfileDetections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListSensitivityInspectionTemplates.go b/service/macie2/api_op_ListSensitivityInspectionTemplates.go index 16c1397bd05..e073c383e48 100644 --- a/service/macie2/api_op_ListSensitivityInspectionTemplates.go +++ b/service/macie2/api_op_ListSensitivityInspectionTemplates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListSensitivityInspectionTemplatesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSensitivityInspectionTemplates(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListSensitivityInspectionTemplatesMiddlewares(stack return nil } -// ListSensitivityInspectionTemplatesAPIClient is a client that implements the -// ListSensitivityInspectionTemplates operation. -type ListSensitivityInspectionTemplatesAPIClient interface { - ListSensitivityInspectionTemplates(context.Context, *ListSensitivityInspectionTemplatesInput, ...func(*Options)) (*ListSensitivityInspectionTemplatesOutput, error) -} - -var _ ListSensitivityInspectionTemplatesAPIClient = (*Client)(nil) - // ListSensitivityInspectionTemplatesPaginatorOptions is the paginator options for // ListSensitivityInspectionTemplates type ListSensitivityInspectionTemplatesPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListSensitivityInspectionTemplatesPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSensitivityInspectionTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListSensitivityInspectionTemplatesPaginator) NextPage(ctx context.Conte return result, nil } +// ListSensitivityInspectionTemplatesAPIClient is a client that implements the +// ListSensitivityInspectionTemplates operation. +type ListSensitivityInspectionTemplatesAPIClient interface { + ListSensitivityInspectionTemplates(context.Context, *ListSensitivityInspectionTemplatesInput, ...func(*Options)) (*ListSensitivityInspectionTemplatesOutput, error) +} + +var _ ListSensitivityInspectionTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSensitivityInspectionTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_ListTagsForResource.go b/service/macie2/api_op_ListTagsForResource.go index 231ecf93b3e..fa8ee309185 100644 --- a/service/macie2/api_op_ListTagsForResource.go +++ b/service/macie2/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_PutClassificationExportConfiguration.go b/service/macie2/api_op_PutClassificationExportConfiguration.go index b1012982fb3..ec1073be23a 100644 --- a/service/macie2/api_op_PutClassificationExportConfiguration.go +++ b/service/macie2/api_op_PutClassificationExportConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutClassificationExportConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutClassificationExportConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_PutFindingsPublicationConfiguration.go b/service/macie2/api_op_PutFindingsPublicationConfiguration.go index cad76cf67c8..86d587ee75d 100644 --- a/service/macie2/api_op_PutFindingsPublicationConfiguration.go +++ b/service/macie2/api_op_PutFindingsPublicationConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationPutFindingsPublicationConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutFindingsPublicationConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_SearchResources.go b/service/macie2/api_op_SearchResources.go index 9e4c98ecb1d..e429a67e23b 100644 --- a/service/macie2/api_op_SearchResources.go +++ b/service/macie2/api_op_SearchResources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSearchResourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchResources(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationSearchResourcesMiddlewares(stack *middleware.Stack, return nil } -// SearchResourcesAPIClient is a client that implements the SearchResources -// operation. -type SearchResourcesAPIClient interface { - SearchResources(context.Context, *SearchResourcesInput, ...func(*Options)) (*SearchResourcesOutput, error) -} - -var _ SearchResourcesAPIClient = (*Client)(nil) - // SearchResourcesPaginatorOptions is the paginator options for SearchResources type SearchResourcesPaginatorOptions struct { // The maximum number of items to include in each page of the response. The @@ -215,6 +210,9 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// SearchResourcesAPIClient is a client that implements the SearchResources +// operation. +type SearchResourcesAPIClient interface { + SearchResources(context.Context, *SearchResourcesInput, ...func(*Options)) (*SearchResourcesOutput, error) +} + +var _ SearchResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/macie2/api_op_TagResource.go b/service/macie2/api_op_TagResource.go index ba6875e85fc..cb1a1842a85 100644 --- a/service/macie2/api_op_TagResource.go +++ b/service/macie2/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_TestCustomDataIdentifier.go b/service/macie2/api_op_TestCustomDataIdentifier.go index 914d2c8549c..b11320cfd9a 100644 --- a/service/macie2/api_op_TestCustomDataIdentifier.go +++ b/service/macie2/api_op_TestCustomDataIdentifier.go @@ -134,6 +134,9 @@ func (c *Client) addOperationTestCustomDataIdentifierMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestCustomDataIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UntagResource.go b/service/macie2/api_op_UntagResource.go index 96b1b3c7f10..7fd992392ff 100644 --- a/service/macie2/api_op_UntagResource.go +++ b/service/macie2/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateAllowList.go b/service/macie2/api_op_UpdateAllowList.go index 8128b5a9028..541fe560a57 100644 --- a/service/macie2/api_op_UpdateAllowList.go +++ b/service/macie2/api_op_UpdateAllowList.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateAllowListMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAllowListValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateAutomatedDiscoveryConfiguration.go b/service/macie2/api_op_UpdateAutomatedDiscoveryConfiguration.go index 2ce38cb03d0..fd389036919 100644 --- a/service/macie2/api_op_UpdateAutomatedDiscoveryConfiguration.go +++ b/service/macie2/api_op_UpdateAutomatedDiscoveryConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateAutomatedDiscoveryConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAutomatedDiscoveryConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateClassificationJob.go b/service/macie2/api_op_UpdateClassificationJob.go index 42bbc8ca3b2..fbcefc525e8 100644 --- a/service/macie2/api_op_UpdateClassificationJob.go +++ b/service/macie2/api_op_UpdateClassificationJob.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateClassificationJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClassificationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateClassificationScope.go b/service/macie2/api_op_UpdateClassificationScope.go index b7296693191..de7e2f670bf 100644 --- a/service/macie2/api_op_UpdateClassificationScope.go +++ b/service/macie2/api_op_UpdateClassificationScope.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateClassificationScopeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClassificationScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateFindingsFilter.go b/service/macie2/api_op_UpdateFindingsFilter.go index 53e20bfc04b..b9fbc31847a 100644 --- a/service/macie2/api_op_UpdateFindingsFilter.go +++ b/service/macie2/api_op_UpdateFindingsFilter.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateFindingsFilterMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateFindingsFilterMiddleware(stack, options); err != nil { return err } diff --git a/service/macie2/api_op_UpdateMacieSession.go b/service/macie2/api_op_UpdateMacieSession.go index eab10479c5b..1fda11bbde7 100644 --- a/service/macie2/api_op_UpdateMacieSession.go +++ b/service/macie2/api_op_UpdateMacieSession.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateMacieSessionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMacieSession(options.Region), middleware.Before); err != nil { return err } diff --git a/service/macie2/api_op_UpdateMemberSession.go b/service/macie2/api_op_UpdateMemberSession.go index eebaa19fedf..8cd4ea55914 100644 --- a/service/macie2/api_op_UpdateMemberSession.go +++ b/service/macie2/api_op_UpdateMemberSession.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateMemberSessionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMemberSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateOrganizationConfiguration.go b/service/macie2/api_op_UpdateOrganizationConfiguration.go index 993b1a6f8d0..848ddd0e92d 100644 --- a/service/macie2/api_op_UpdateOrganizationConfiguration.go +++ b/service/macie2/api_op_UpdateOrganizationConfiguration.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUpdateOrganizationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateResourceProfile.go b/service/macie2/api_op_UpdateResourceProfile.go index 02e9436c11b..911eab09ee4 100644 --- a/service/macie2/api_op_UpdateResourceProfile.go +++ b/service/macie2/api_op_UpdateResourceProfile.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateResourceProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateResourceProfileDetections.go b/service/macie2/api_op_UpdateResourceProfileDetections.go index fd0b5b77f08..7949c757f4e 100644 --- a/service/macie2/api_op_UpdateResourceProfileDetections.go +++ b/service/macie2/api_op_UpdateResourceProfileDetections.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateResourceProfileDetectionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceProfileDetectionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateRevealConfiguration.go b/service/macie2/api_op_UpdateRevealConfiguration.go index d3b78670541..04ae36e25dd 100644 --- a/service/macie2/api_op_UpdateRevealConfiguration.go +++ b/service/macie2/api_op_UpdateRevealConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateRevealConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRevealConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/macie2/api_op_UpdateSensitivityInspectionTemplate.go b/service/macie2/api_op_UpdateSensitivityInspectionTemplate.go index 296aa1f1104..6d6824ed4b7 100644 --- a/service/macie2/api_op_UpdateSensitivityInspectionTemplate.go +++ b/service/macie2/api_op_UpdateSensitivityInspectionTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateSensitivityInspectionTemplateMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSensitivityInspectionTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_client.go b/service/mailmanager/api_client.go index fe8f10dfe42..020570fd34d 100644 --- a/service/mailmanager/api_client.go +++ b/service/mailmanager/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/mailmanager/api_op_CreateAddonInstance.go b/service/mailmanager/api_op_CreateAddonInstance.go index 52c313d0137..c72ed9b6b63 100644 --- a/service/mailmanager/api_op_CreateAddonInstance.go +++ b/service/mailmanager/api_op_CreateAddonInstance.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateAddonInstanceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAddonInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_CreateAddonSubscription.go b/service/mailmanager/api_op_CreateAddonSubscription.go index 0a6a1458668..f48e0bfa5b4 100644 --- a/service/mailmanager/api_op_CreateAddonSubscription.go +++ b/service/mailmanager/api_op_CreateAddonSubscription.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateAddonSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAddonSubscriptionMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_CreateArchive.go b/service/mailmanager/api_op_CreateArchive.go index c364a32ff7b..a967d2a7060 100644 --- a/service/mailmanager/api_op_CreateArchive.go +++ b/service/mailmanager/api_op_CreateArchive.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateArchiveMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_CreateIngressPoint.go b/service/mailmanager/api_op_CreateIngressPoint.go index acd0695de7d..106ab7eb612 100644 --- a/service/mailmanager/api_op_CreateIngressPoint.go +++ b/service/mailmanager/api_op_CreateIngressPoint.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateIngressPointMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIngressPointMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_CreateRelay.go b/service/mailmanager/api_op_CreateRelay.go index 307c3a3b5d6..be3c7cd4ac9 100644 --- a/service/mailmanager/api_op_CreateRelay.go +++ b/service/mailmanager/api_op_CreateRelay.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateRelayMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRelayMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_CreateRuleSet.go b/service/mailmanager/api_op_CreateRuleSet.go index 7c494ac3656..aee0193388e 100644 --- a/service/mailmanager/api_op_CreateRuleSet.go +++ b/service/mailmanager/api_op_CreateRuleSet.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateRuleSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRuleSetMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_CreateTrafficPolicy.go b/service/mailmanager/api_op_CreateTrafficPolicy.go index f7a521a34ff..6d0835f2f23 100644 --- a/service/mailmanager/api_op_CreateTrafficPolicy.go +++ b/service/mailmanager/api_op_CreateTrafficPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateTrafficPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrafficPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteAddonInstance.go b/service/mailmanager/api_op_DeleteAddonInstance.go index 31b44a9292b..b858466141c 100644 --- a/service/mailmanager/api_op_DeleteAddonInstance.go +++ b/service/mailmanager/api_op_DeleteAddonInstance.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAddonInstanceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAddonInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteAddonSubscription.go b/service/mailmanager/api_op_DeleteAddonSubscription.go index 1bf57830ff4..62de2a226bc 100644 --- a/service/mailmanager/api_op_DeleteAddonSubscription.go +++ b/service/mailmanager/api_op_DeleteAddonSubscription.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAddonSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAddonSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteArchive.go b/service/mailmanager/api_op_DeleteArchive.go index 48eb014cbe5..7b9a521f1c2 100644 --- a/service/mailmanager/api_op_DeleteArchive.go +++ b/service/mailmanager/api_op_DeleteArchive.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteIngressPoint.go b/service/mailmanager/api_op_DeleteIngressPoint.go index a932c4d32ae..04c2875d8de 100644 --- a/service/mailmanager/api_op_DeleteIngressPoint.go +++ b/service/mailmanager/api_op_DeleteIngressPoint.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteIngressPointMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIngressPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteRelay.go b/service/mailmanager/api_op_DeleteRelay.go index d949c544570..e4440104c75 100644 --- a/service/mailmanager/api_op_DeleteRelay.go +++ b/service/mailmanager/api_op_DeleteRelay.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRelayMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRelayValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteRuleSet.go b/service/mailmanager/api_op_DeleteRuleSet.go index 39fa80d6787..decb37c1d9b 100644 --- a/service/mailmanager/api_op_DeleteRuleSet.go +++ b/service/mailmanager/api_op_DeleteRuleSet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRuleSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_DeleteTrafficPolicy.go b/service/mailmanager/api_op_DeleteTrafficPolicy.go index d46ee2a3339..8d22114ebb9 100644 --- a/service/mailmanager/api_op_DeleteTrafficPolicy.go +++ b/service/mailmanager/api_op_DeleteTrafficPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTrafficPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetAddonInstance.go b/service/mailmanager/api_op_GetAddonInstance.go index c6c4abf40fb..353a4cf5d2f 100644 --- a/service/mailmanager/api_op_GetAddonInstance.go +++ b/service/mailmanager/api_op_GetAddonInstance.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetAddonInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAddonInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetAddonSubscription.go b/service/mailmanager/api_op_GetAddonSubscription.go index 9198f155e8c..cc4a4c461bc 100644 --- a/service/mailmanager/api_op_GetAddonSubscription.go +++ b/service/mailmanager/api_op_GetAddonSubscription.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAddonSubscriptionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAddonSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetArchive.go b/service/mailmanager/api_op_GetArchive.go index 210bdc6a274..1e5c1f5ccb0 100644 --- a/service/mailmanager/api_op_GetArchive.go +++ b/service/mailmanager/api_op_GetArchive.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetArchiveMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetArchiveExport.go b/service/mailmanager/api_op_GetArchiveExport.go index 3855f83a94b..df01a366c0f 100644 --- a/service/mailmanager/api_op_GetArchiveExport.go +++ b/service/mailmanager/api_op_GetArchiveExport.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetArchiveExportMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetArchiveMessage.go b/service/mailmanager/api_op_GetArchiveMessage.go index d9a0fbab7fe..0211724e9ba 100644 --- a/service/mailmanager/api_op_GetArchiveMessage.go +++ b/service/mailmanager/api_op_GetArchiveMessage.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetArchiveMessageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetArchiveMessageContent.go b/service/mailmanager/api_op_GetArchiveMessageContent.go index b33321aa73f..0ea1cfe9a2e 100644 --- a/service/mailmanager/api_op_GetArchiveMessageContent.go +++ b/service/mailmanager/api_op_GetArchiveMessageContent.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetArchiveMessageContentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveMessageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetArchiveSearch.go b/service/mailmanager/api_op_GetArchiveSearch.go index 90f47b08b90..66b5da4b95a 100644 --- a/service/mailmanager/api_op_GetArchiveSearch.go +++ b/service/mailmanager/api_op_GetArchiveSearch.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetArchiveSearchMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveSearchValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetArchiveSearchResults.go b/service/mailmanager/api_op_GetArchiveSearchResults.go index 577976a7f61..74a72eff052 100644 --- a/service/mailmanager/api_op_GetArchiveSearchResults.go +++ b/service/mailmanager/api_op_GetArchiveSearchResults.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetArchiveSearchResultsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchiveSearchResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetIngressPoint.go b/service/mailmanager/api_op_GetIngressPoint.go index 85799f6a00c..d66a4fedee4 100644 --- a/service/mailmanager/api_op_GetIngressPoint.go +++ b/service/mailmanager/api_op_GetIngressPoint.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetIngressPointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIngressPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetRelay.go b/service/mailmanager/api_op_GetRelay.go index 7646adde676..d7acfac2740 100644 --- a/service/mailmanager/api_op_GetRelay.go +++ b/service/mailmanager/api_op_GetRelay.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetRelayMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRelayValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetRuleSet.go b/service/mailmanager/api_op_GetRuleSet.go index 46d57531d12..8443a4c7293 100644 --- a/service/mailmanager/api_op_GetRuleSet.go +++ b/service/mailmanager/api_op_GetRuleSet.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetRuleSetMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_GetTrafficPolicy.go b/service/mailmanager/api_op_GetTrafficPolicy.go index ae7b7823aa5..2caa8770d4d 100644 --- a/service/mailmanager/api_op_GetTrafficPolicy.go +++ b/service/mailmanager/api_op_GetTrafficPolicy.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetTrafficPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrafficPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_ListAddonInstances.go b/service/mailmanager/api_op_ListAddonInstances.go index aa9dfcdb2d6..a6f5bbcfdcf 100644 --- a/service/mailmanager/api_op_ListAddonInstances.go +++ b/service/mailmanager/api_op_ListAddonInstances.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListAddonInstancesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAddonInstances(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListAddonInstancesMiddlewares(stack *middleware.Sta return nil } -// ListAddonInstancesAPIClient is a client that implements the ListAddonInstances -// operation. -type ListAddonInstancesAPIClient interface { - ListAddonInstances(context.Context, *ListAddonInstancesInput, ...func(*Options)) (*ListAddonInstancesOutput, error) -} - -var _ ListAddonInstancesAPIClient = (*Client)(nil) - // ListAddonInstancesPaginatorOptions is the paginator options for // ListAddonInstances type ListAddonInstancesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListAddonInstancesPaginator) NextPage(ctx context.Context, optFns ...fu } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAddonInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListAddonInstancesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAddonInstancesAPIClient is a client that implements the ListAddonInstances +// operation. +type ListAddonInstancesAPIClient interface { + ListAddonInstances(context.Context, *ListAddonInstancesInput, ...func(*Options)) (*ListAddonInstancesOutput, error) +} + +var _ ListAddonInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAddonInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListAddonSubscriptions.go b/service/mailmanager/api_op_ListAddonSubscriptions.go index 9483d6f5662..c5fb39582d8 100644 --- a/service/mailmanager/api_op_ListAddonSubscriptions.go +++ b/service/mailmanager/api_op_ListAddonSubscriptions.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListAddonSubscriptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAddonSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListAddonSubscriptionsMiddlewares(stack *middleware return nil } -// ListAddonSubscriptionsAPIClient is a client that implements the -// ListAddonSubscriptions operation. -type ListAddonSubscriptionsAPIClient interface { - ListAddonSubscriptions(context.Context, *ListAddonSubscriptionsInput, ...func(*Options)) (*ListAddonSubscriptionsOutput, error) -} - -var _ ListAddonSubscriptionsAPIClient = (*Client)(nil) - // ListAddonSubscriptionsPaginatorOptions is the paginator options for // ListAddonSubscriptions type ListAddonSubscriptionsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListAddonSubscriptionsPaginator) NextPage(ctx context.Context, optFns . } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAddonSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListAddonSubscriptionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAddonSubscriptionsAPIClient is a client that implements the +// ListAddonSubscriptions operation. +type ListAddonSubscriptionsAPIClient interface { + ListAddonSubscriptions(context.Context, *ListAddonSubscriptionsInput, ...func(*Options)) (*ListAddonSubscriptionsOutput, error) +} + +var _ ListAddonSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAddonSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListArchiveExports.go b/service/mailmanager/api_op_ListArchiveExports.go index 1533dcd018d..a67c4186369 100644 --- a/service/mailmanager/api_op_ListArchiveExports.go +++ b/service/mailmanager/api_op_ListArchiveExports.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListArchiveExportsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListArchiveExportsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListArchiveExportsMiddlewares(stack *middleware.Sta return nil } -// ListArchiveExportsAPIClient is a client that implements the ListArchiveExports -// operation. -type ListArchiveExportsAPIClient interface { - ListArchiveExports(context.Context, *ListArchiveExportsInput, ...func(*Options)) (*ListArchiveExportsOutput, error) -} - -var _ ListArchiveExportsAPIClient = (*Client)(nil) - // ListArchiveExportsPaginatorOptions is the paginator options for // ListArchiveExports type ListArchiveExportsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListArchiveExportsPaginator) NextPage(ctx context.Context, optFns ...fu } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListArchiveExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListArchiveExportsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListArchiveExportsAPIClient is a client that implements the ListArchiveExports +// operation. +type ListArchiveExportsAPIClient interface { + ListArchiveExports(context.Context, *ListArchiveExportsInput, ...func(*Options)) (*ListArchiveExportsOutput, error) +} + +var _ ListArchiveExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListArchiveExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListArchiveSearches.go b/service/mailmanager/api_op_ListArchiveSearches.go index 06442cd950e..503acdc0fde 100644 --- a/service/mailmanager/api_op_ListArchiveSearches.go +++ b/service/mailmanager/api_op_ListArchiveSearches.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListArchiveSearchesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListArchiveSearchesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListArchiveSearchesMiddlewares(stack *middleware.St return nil } -// ListArchiveSearchesAPIClient is a client that implements the -// ListArchiveSearches operation. -type ListArchiveSearchesAPIClient interface { - ListArchiveSearches(context.Context, *ListArchiveSearchesInput, ...func(*Options)) (*ListArchiveSearchesOutput, error) -} - -var _ ListArchiveSearchesAPIClient = (*Client)(nil) - // ListArchiveSearchesPaginatorOptions is the paginator options for // ListArchiveSearches type ListArchiveSearchesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListArchiveSearchesPaginator) NextPage(ctx context.Context, optFns ...f } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListArchiveSearches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListArchiveSearchesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListArchiveSearchesAPIClient is a client that implements the +// ListArchiveSearches operation. +type ListArchiveSearchesAPIClient interface { + ListArchiveSearches(context.Context, *ListArchiveSearchesInput, ...func(*Options)) (*ListArchiveSearchesOutput, error) +} + +var _ ListArchiveSearchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListArchiveSearches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListArchives.go b/service/mailmanager/api_op_ListArchives.go index 7462597c283..bb3813d1554 100644 --- a/service/mailmanager/api_op_ListArchives.go +++ b/service/mailmanager/api_op_ListArchives.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListArchivesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListArchives(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListArchivesMiddlewares(stack *middleware.Stack, op return nil } -// ListArchivesAPIClient is a client that implements the ListArchives operation. -type ListArchivesAPIClient interface { - ListArchives(context.Context, *ListArchivesInput, ...func(*Options)) (*ListArchivesOutput, error) -} - -var _ ListArchivesAPIClient = (*Client)(nil) - // ListArchivesPaginatorOptions is the paginator options for ListArchives type ListArchivesPaginatorOptions struct { // The maximum number of archives that are returned per call. You can use @@ -209,6 +205,9 @@ func (p *ListArchivesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListArchives(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListArchivesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListArchivesAPIClient is a client that implements the ListArchives operation. +type ListArchivesAPIClient interface { + ListArchives(context.Context, *ListArchivesInput, ...func(*Options)) (*ListArchivesOutput, error) +} + +var _ ListArchivesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListArchives(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListIngressPoints.go b/service/mailmanager/api_op_ListIngressPoints.go index 66a9fd7a727..b704f2e7a7e 100644 --- a/service/mailmanager/api_op_ListIngressPoints.go +++ b/service/mailmanager/api_op_ListIngressPoints.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListIngressPointsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIngressPoints(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListIngressPointsMiddlewares(stack *middleware.Stac return nil } -// ListIngressPointsAPIClient is a client that implements the ListIngressPoints -// operation. -type ListIngressPointsAPIClient interface { - ListIngressPoints(context.Context, *ListIngressPointsInput, ...func(*Options)) (*ListIngressPointsOutput, error) -} - -var _ ListIngressPointsAPIClient = (*Client)(nil) - // ListIngressPointsPaginatorOptions is the paginator options for ListIngressPoints type ListIngressPointsPaginatorOptions struct { // The maximum number of ingress endpoint resources that are returned per call. @@ -207,6 +202,9 @@ func (p *ListIngressPointsPaginator) NextPage(ctx context.Context, optFns ...fun } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIngressPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListIngressPointsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListIngressPointsAPIClient is a client that implements the ListIngressPoints +// operation. +type ListIngressPointsAPIClient interface { + ListIngressPoints(context.Context, *ListIngressPointsInput, ...func(*Options)) (*ListIngressPointsOutput, error) +} + +var _ ListIngressPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIngressPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListRelays.go b/service/mailmanager/api_op_ListRelays.go index 8f10b2456b4..ab14a6eee97 100644 --- a/service/mailmanager/api_op_ListRelays.go +++ b/service/mailmanager/api_op_ListRelays.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListRelaysMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRelays(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListRelaysMiddlewares(stack *middleware.Stack, opti return nil } -// ListRelaysAPIClient is a client that implements the ListRelays operation. -type ListRelaysAPIClient interface { - ListRelays(context.Context, *ListRelaysInput, ...func(*Options)) (*ListRelaysOutput, error) -} - -var _ ListRelaysAPIClient = (*Client)(nil) - // ListRelaysPaginatorOptions is the paginator options for ListRelays type ListRelaysPaginatorOptions struct { // The number of relays to be returned in one request. @@ -206,6 +202,9 @@ func (p *ListRelaysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRelays(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListRelaysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListRelaysAPIClient is a client that implements the ListRelays operation. +type ListRelaysAPIClient interface { + ListRelays(context.Context, *ListRelaysInput, ...func(*Options)) (*ListRelaysOutput, error) +} + +var _ ListRelaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRelays(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListRuleSets.go b/service/mailmanager/api_op_ListRuleSets.go index a63238e2f40..1dccc3a0e33 100644 --- a/service/mailmanager/api_op_ListRuleSets.go +++ b/service/mailmanager/api_op_ListRuleSets.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListRuleSetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRuleSets(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListRuleSetsMiddlewares(stack *middleware.Stack, op return nil } -// ListRuleSetsAPIClient is a client that implements the ListRuleSets operation. -type ListRuleSetsAPIClient interface { - ListRuleSets(context.Context, *ListRuleSetsInput, ...func(*Options)) (*ListRuleSetsOutput, error) -} - -var _ ListRuleSetsAPIClient = (*Client)(nil) - // ListRuleSetsPaginatorOptions is the paginator options for ListRuleSets type ListRuleSetsPaginatorOptions struct { // The maximum number of rule set resources that are returned per call. You can @@ -208,6 +204,9 @@ func (p *ListRuleSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRuleSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListRuleSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListRuleSetsAPIClient is a client that implements the ListRuleSets operation. +type ListRuleSetsAPIClient interface { + ListRuleSets(context.Context, *ListRuleSetsInput, ...func(*Options)) (*ListRuleSetsOutput, error) +} + +var _ ListRuleSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRuleSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_ListTagsForResource.go b/service/mailmanager/api_op_ListTagsForResource.go index d19da9039fa..15ce3b54872 100644 --- a/service/mailmanager/api_op_ListTagsForResource.go +++ b/service/mailmanager/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_ListTrafficPolicies.go b/service/mailmanager/api_op_ListTrafficPolicies.go index 8f97086cb44..80c1491364e 100644 --- a/service/mailmanager/api_op_ListTrafficPolicies.go +++ b/service/mailmanager/api_op_ListTrafficPolicies.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTrafficPoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicies(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListTrafficPoliciesMiddlewares(stack *middleware.St return nil } -// ListTrafficPoliciesAPIClient is a client that implements the -// ListTrafficPolicies operation. -type ListTrafficPoliciesAPIClient interface { - ListTrafficPolicies(context.Context, *ListTrafficPoliciesInput, ...func(*Options)) (*ListTrafficPoliciesOutput, error) -} - -var _ ListTrafficPoliciesAPIClient = (*Client)(nil) - // ListTrafficPoliciesPaginatorOptions is the paginator options for // ListTrafficPolicies type ListTrafficPoliciesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListTrafficPoliciesPaginator) NextPage(ctx context.Context, optFns ...f } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrafficPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListTrafficPoliciesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTrafficPoliciesAPIClient is a client that implements the +// ListTrafficPolicies operation. +type ListTrafficPoliciesAPIClient interface { + ListTrafficPolicies(context.Context, *ListTrafficPoliciesInput, ...func(*Options)) (*ListTrafficPoliciesOutput, error) +} + +var _ ListTrafficPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrafficPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mailmanager/api_op_StartArchiveExport.go b/service/mailmanager/api_op_StartArchiveExport.go index 5b217401476..1e4857af8cf 100644 --- a/service/mailmanager/api_op_StartArchiveExport.go +++ b/service/mailmanager/api_op_StartArchiveExport.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartArchiveExportMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartArchiveExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_StartArchiveSearch.go b/service/mailmanager/api_op_StartArchiveSearch.go index da9380a42a4..c83298d61c4 100644 --- a/service/mailmanager/api_op_StartArchiveSearch.go +++ b/service/mailmanager/api_op_StartArchiveSearch.go @@ -127,6 +127,9 @@ func (c *Client) addOperationStartArchiveSearchMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartArchiveSearchValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_StopArchiveExport.go b/service/mailmanager/api_op_StopArchiveExport.go index 7852c6614ca..e3c301b4594 100644 --- a/service/mailmanager/api_op_StopArchiveExport.go +++ b/service/mailmanager/api_op_StopArchiveExport.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopArchiveExportMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopArchiveExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_StopArchiveSearch.go b/service/mailmanager/api_op_StopArchiveSearch.go index 7b582bd21ef..bd61e8b06d9 100644 --- a/service/mailmanager/api_op_StopArchiveSearch.go +++ b/service/mailmanager/api_op_StopArchiveSearch.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopArchiveSearchMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopArchiveSearchValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_TagResource.go b/service/mailmanager/api_op_TagResource.go index 2ce9fe06c99..59d4ec8c25d 100644 --- a/service/mailmanager/api_op_TagResource.go +++ b/service/mailmanager/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_UntagResource.go b/service/mailmanager/api_op_UntagResource.go index db9a072e085..eab03922880 100644 --- a/service/mailmanager/api_op_UntagResource.go +++ b/service/mailmanager/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_UpdateArchive.go b/service/mailmanager/api_op_UpdateArchive.go index 048179c0a0c..a62a37f2240 100644 --- a/service/mailmanager/api_op_UpdateArchive.go +++ b/service/mailmanager/api_op_UpdateArchive.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateArchiveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_UpdateIngressPoint.go b/service/mailmanager/api_op_UpdateIngressPoint.go index 814d25cc267..5a9d0482765 100644 --- a/service/mailmanager/api_op_UpdateIngressPoint.go +++ b/service/mailmanager/api_op_UpdateIngressPoint.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateIngressPointMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIngressPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_UpdateRelay.go b/service/mailmanager/api_op_UpdateRelay.go index c3175497eb1..56838f8ff49 100644 --- a/service/mailmanager/api_op_UpdateRelay.go +++ b/service/mailmanager/api_op_UpdateRelay.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateRelayMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRelayValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_UpdateRuleSet.go b/service/mailmanager/api_op_UpdateRuleSet.go index 0d06e470090..0de1f40e664 100644 --- a/service/mailmanager/api_op_UpdateRuleSet.go +++ b/service/mailmanager/api_op_UpdateRuleSet.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateRuleSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mailmanager/api_op_UpdateTrafficPolicy.go b/service/mailmanager/api_op_UpdateTrafficPolicy.go index e3304af378b..217df7591d0 100644 --- a/service/mailmanager/api_op_UpdateTrafficPolicy.go +++ b/service/mailmanager/api_op_UpdateTrafficPolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateTrafficPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrafficPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_client.go b/service/managedblockchain/api_client.go index 9046647f2cc..f9183d38ebf 100644 --- a/service/managedblockchain/api_client.go +++ b/service/managedblockchain/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/managedblockchain/api_op_CreateAccessor.go b/service/managedblockchain/api_op_CreateAccessor.go index d3f91d5b9fd..8ececb93968 100644 --- a/service/managedblockchain/api_op_CreateAccessor.go +++ b/service/managedblockchain/api_op_CreateAccessor.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateAccessorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessorMiddleware(stack, options); err != nil { return err } diff --git a/service/managedblockchain/api_op_CreateMember.go b/service/managedblockchain/api_op_CreateMember.go index 7c924561246..0133b3ea5d5 100644 --- a/service/managedblockchain/api_op_CreateMember.go +++ b/service/managedblockchain/api_op_CreateMember.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateMemberMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMemberMiddleware(stack, options); err != nil { return err } diff --git a/service/managedblockchain/api_op_CreateNetwork.go b/service/managedblockchain/api_op_CreateNetwork.go index 144863119c3..5fe1068b3b3 100644 --- a/service/managedblockchain/api_op_CreateNetwork.go +++ b/service/managedblockchain/api_op_CreateNetwork.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateNetworkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkMiddleware(stack, options); err != nil { return err } diff --git a/service/managedblockchain/api_op_CreateNode.go b/service/managedblockchain/api_op_CreateNode.go index 296266b4828..0e368599746 100644 --- a/service/managedblockchain/api_op_CreateNode.go +++ b/service/managedblockchain/api_op_CreateNode.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateNodeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNodeMiddleware(stack, options); err != nil { return err } diff --git a/service/managedblockchain/api_op_CreateProposal.go b/service/managedblockchain/api_op_CreateProposal.go index 19252f799a2..9ac76f7fcd0 100644 --- a/service/managedblockchain/api_op_CreateProposal.go +++ b/service/managedblockchain/api_op_CreateProposal.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateProposalMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProposalMiddleware(stack, options); err != nil { return err } diff --git a/service/managedblockchain/api_op_DeleteAccessor.go b/service/managedblockchain/api_op_DeleteAccessor.go index f9015bd8fa5..9fd177fc319 100644 --- a/service/managedblockchain/api_op_DeleteAccessor.go +++ b/service/managedblockchain/api_op_DeleteAccessor.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAccessorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_DeleteMember.go b/service/managedblockchain/api_op_DeleteMember.go index c2e9febf418..b92f66efc91 100644 --- a/service/managedblockchain/api_op_DeleteMember.go +++ b/service/managedblockchain/api_op_DeleteMember.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteMemberMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_DeleteNode.go b/service/managedblockchain/api_op_DeleteNode.go index ce045f3b3ce..233f6a455ed 100644 --- a/service/managedblockchain/api_op_DeleteNode.go +++ b/service/managedblockchain/api_op_DeleteNode.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteNodeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_GetAccessor.go b/service/managedblockchain/api_op_GetAccessor.go index 00ee2cf167d..5657a3c1e49 100644 --- a/service/managedblockchain/api_op_GetAccessor.go +++ b/service/managedblockchain/api_op_GetAccessor.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetAccessorMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_GetMember.go b/service/managedblockchain/api_op_GetMember.go index caa33e032ab..1c2e7b65667 100644 --- a/service/managedblockchain/api_op_GetMember.go +++ b/service/managedblockchain/api_op_GetMember.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetMemberMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_GetNetwork.go b/service/managedblockchain/api_op_GetNetwork.go index a0c86214c9e..c56b564a118 100644 --- a/service/managedblockchain/api_op_GetNetwork.go +++ b/service/managedblockchain/api_op_GetNetwork.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetNetworkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_GetNode.go b/service/managedblockchain/api_op_GetNode.go index f30c878e797..cb60ec438b6 100644 --- a/service/managedblockchain/api_op_GetNode.go +++ b/service/managedblockchain/api_op_GetNode.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetNodeMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_GetProposal.go b/service/managedblockchain/api_op_GetProposal.go index 21f866d2ba7..dd4a2027492 100644 --- a/service/managedblockchain/api_op_GetProposal.go +++ b/service/managedblockchain/api_op_GetProposal.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetProposalMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProposalValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_ListAccessors.go b/service/managedblockchain/api_op_ListAccessors.go index 252286e5625..38a9068d05c 100644 --- a/service/managedblockchain/api_op_ListAccessors.go +++ b/service/managedblockchain/api_op_ListAccessors.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAccessorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccessors(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListAccessorsMiddlewares(stack *middleware.Stack, o return nil } -// ListAccessorsAPIClient is a client that implements the ListAccessors operation. -type ListAccessorsAPIClient interface { - ListAccessors(context.Context, *ListAccessorsInput, ...func(*Options)) (*ListAccessorsOutput, error) -} - -var _ ListAccessorsAPIClient = (*Client)(nil) - // ListAccessorsPaginatorOptions is the paginator options for ListAccessors type ListAccessorsPaginatorOptions struct { // The maximum number of accessors to list. @@ -210,6 +206,9 @@ func (p *ListAccessorsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListAccessorsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListAccessorsAPIClient is a client that implements the ListAccessors operation. +type ListAccessorsAPIClient interface { + ListAccessors(context.Context, *ListAccessorsInput, ...func(*Options)) (*ListAccessorsOutput, error) +} + +var _ ListAccessorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListInvitations.go b/service/managedblockchain/api_op_ListInvitations.go index 64d7e74c365..d6c5cf35d46 100644 --- a/service/managedblockchain/api_op_ListInvitations.go +++ b/service/managedblockchain/api_op_ListInvitations.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInvitations(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, return nil } -// ListInvitationsAPIClient is a client that implements the ListInvitations -// operation. -type ListInvitationsAPIClient interface { - ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) -} - -var _ ListInvitationsAPIClient = (*Client)(nil) - // ListInvitationsPaginatorOptions is the paginator options for ListInvitations type ListInvitationsPaginatorOptions struct { // The maximum number of invitations to return. @@ -204,6 +199,9 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListInvitationsAPIClient is a client that implements the ListInvitations +// operation. +type ListInvitationsAPIClient interface { + ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) +} + +var _ ListInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListMembers.go b/service/managedblockchain/api_op_ListMembers.go index 73e7cbc450e..901f9926a8b 100644 --- a/service/managedblockchain/api_op_ListMembers.go +++ b/service/managedblockchain/api_op_ListMembers.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMembersValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // The maximum number of members to return in the request. @@ -225,6 +221,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListNetworks.go b/service/managedblockchain/api_op_ListNetworks.go index 1eef4261500..d725c0e1326 100644 --- a/service/managedblockchain/api_op_ListNetworks.go +++ b/service/managedblockchain/api_op_ListNetworks.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListNetworksMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworks(options.Region), middleware.Before); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListNetworksMiddlewares(stack *middleware.Stack, op return nil } -// ListNetworksAPIClient is a client that implements the ListNetworks operation. -type ListNetworksAPIClient interface { - ListNetworks(context.Context, *ListNetworksInput, ...func(*Options)) (*ListNetworksOutput, error) -} - -var _ ListNetworksAPIClient = (*Client)(nil) - // ListNetworksPaginatorOptions is the paginator options for ListNetworks type ListNetworksPaginatorOptions struct { // The maximum number of networks to list. @@ -218,6 +214,9 @@ func (p *ListNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListNetworksAPIClient is a client that implements the ListNetworks operation. +type ListNetworksAPIClient interface { + ListNetworks(context.Context, *ListNetworksInput, ...func(*Options)) (*ListNetworksOutput, error) +} + +var _ ListNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListNodes.go b/service/managedblockchain/api_op_ListNodes.go index 467312e0e2f..9d66937f354 100644 --- a/service/managedblockchain/api_op_ListNodes.go +++ b/service/managedblockchain/api_op_ListNodes.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNodesValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, optio return nil } -// ListNodesAPIClient is a client that implements the ListNodes operation. -type ListNodesAPIClient interface { - ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) -} - -var _ ListNodesAPIClient = (*Client)(nil) - // ListNodesPaginatorOptions is the paginator options for ListNodes type ListNodesPaginatorOptions struct { // The maximum number of nodes to list. @@ -221,6 +217,9 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListNodesAPIClient is a client that implements the ListNodes operation. +type ListNodesAPIClient interface { + ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) +} + +var _ ListNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListProposalVotes.go b/service/managedblockchain/api_op_ListProposalVotes.go index dd3c166f118..7720d50a3ba 100644 --- a/service/managedblockchain/api_op_ListProposalVotes.go +++ b/service/managedblockchain/api_op_ListProposalVotes.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListProposalVotesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProposalVotesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListProposalVotesMiddlewares(stack *middleware.Stac return nil } -// ListProposalVotesAPIClient is a client that implements the ListProposalVotes -// operation. -type ListProposalVotesAPIClient interface { - ListProposalVotes(context.Context, *ListProposalVotesInput, ...func(*Options)) (*ListProposalVotesOutput, error) -} - -var _ ListProposalVotesAPIClient = (*Client)(nil) - // ListProposalVotesPaginatorOptions is the paginator options for ListProposalVotes type ListProposalVotesPaginatorOptions struct { // The maximum number of votes to return. @@ -218,6 +213,9 @@ func (p *ListProposalVotesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProposalVotes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListProposalVotesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListProposalVotesAPIClient is a client that implements the ListProposalVotes +// operation. +type ListProposalVotesAPIClient interface { + ListProposalVotes(context.Context, *ListProposalVotesInput, ...func(*Options)) (*ListProposalVotesOutput, error) +} + +var _ ListProposalVotesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProposalVotes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListProposals.go b/service/managedblockchain/api_op_ListProposals.go index d3107c0be4f..9d64f8c13e2 100644 --- a/service/managedblockchain/api_op_ListProposals.go +++ b/service/managedblockchain/api_op_ListProposals.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListProposalsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProposalsValidationMiddleware(stack); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListProposalsMiddlewares(stack *middleware.Stack, o return nil } -// ListProposalsAPIClient is a client that implements the ListProposals operation. -type ListProposalsAPIClient interface { - ListProposals(context.Context, *ListProposalsInput, ...func(*Options)) (*ListProposalsOutput, error) -} - -var _ ListProposalsAPIClient = (*Client)(nil) - // ListProposalsPaginatorOptions is the paginator options for ListProposals type ListProposalsPaginatorOptions struct { // The maximum number of proposals to return. @@ -211,6 +207,9 @@ func (p *ListProposalsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProposals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListProposalsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListProposalsAPIClient is a client that implements the ListProposals operation. +type ListProposalsAPIClient interface { + ListProposals(context.Context, *ListProposalsInput, ...func(*Options)) (*ListProposalsOutput, error) +} + +var _ ListProposalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProposals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchain/api_op_ListTagsForResource.go b/service/managedblockchain/api_op_ListTagsForResource.go index bed681d6eb2..fd1bfc582f8 100644 --- a/service/managedblockchain/api_op_ListTagsForResource.go +++ b/service/managedblockchain/api_op_ListTagsForResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_RejectInvitation.go b/service/managedblockchain/api_op_RejectInvitation.go index f6670f81e9e..9c31c846236 100644 --- a/service/managedblockchain/api_op_RejectInvitation.go +++ b/service/managedblockchain/api_op_RejectInvitation.go @@ -105,6 +105,9 @@ func (c *Client) addOperationRejectInvitationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_TagResource.go b/service/managedblockchain/api_op_TagResource.go index 2f749fa55f5..47cc3b4441f 100644 --- a/service/managedblockchain/api_op_TagResource.go +++ b/service/managedblockchain/api_op_TagResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_UntagResource.go b/service/managedblockchain/api_op_UntagResource.go index 1839f4b6327..75b0b22341d 100644 --- a/service/managedblockchain/api_op_UntagResource.go +++ b/service/managedblockchain/api_op_UntagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_UpdateMember.go b/service/managedblockchain/api_op_UpdateMember.go index 705debef7d9..6568b7569df 100644 --- a/service/managedblockchain/api_op_UpdateMember.go +++ b/service/managedblockchain/api_op_UpdateMember.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateMemberMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_UpdateNode.go b/service/managedblockchain/api_op_UpdateNode.go index 0540e125de3..9f12268709f 100644 --- a/service/managedblockchain/api_op_UpdateNode.go +++ b/service/managedblockchain/api_op_UpdateNode.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateNodeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchain/api_op_VoteOnProposal.go b/service/managedblockchain/api_op_VoteOnProposal.go index 83568676ac3..0a29632db01 100644 --- a/service/managedblockchain/api_op_VoteOnProposal.go +++ b/service/managedblockchain/api_op_VoteOnProposal.go @@ -121,6 +121,9 @@ func (c *Client) addOperationVoteOnProposalMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVoteOnProposalValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchainquery/api_client.go b/service/managedblockchainquery/api_client.go index d5fe3cf4c39..e89186279d7 100644 --- a/service/managedblockchainquery/api_client.go +++ b/service/managedblockchainquery/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/managedblockchainquery/api_op_BatchGetTokenBalance.go b/service/managedblockchainquery/api_op_BatchGetTokenBalance.go index af28353e7ca..412f364be54 100644 --- a/service/managedblockchainquery/api_op_BatchGetTokenBalance.go +++ b/service/managedblockchainquery/api_op_BatchGetTokenBalance.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchGetTokenBalanceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetTokenBalanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchainquery/api_op_GetAssetContract.go b/service/managedblockchainquery/api_op_GetAssetContract.go index d990d532dcc..af5ef0bf24a 100644 --- a/service/managedblockchainquery/api_op_GetAssetContract.go +++ b/service/managedblockchainquery/api_op_GetAssetContract.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetAssetContractMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssetContractValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchainquery/api_op_GetTokenBalance.go b/service/managedblockchainquery/api_op_GetTokenBalance.go index 89583726ee4..c28905fbbe5 100644 --- a/service/managedblockchainquery/api_op_GetTokenBalance.go +++ b/service/managedblockchainquery/api_op_GetTokenBalance.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetTokenBalanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTokenBalanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchainquery/api_op_GetTransaction.go b/service/managedblockchainquery/api_op_GetTransaction.go index 9c321345d3d..34e11e55f76 100644 --- a/service/managedblockchainquery/api_op_GetTransaction.go +++ b/service/managedblockchainquery/api_op_GetTransaction.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetTransactionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/managedblockchainquery/api_op_ListAssetContracts.go b/service/managedblockchainquery/api_op_ListAssetContracts.go index df327563d54..40be39f4920 100644 --- a/service/managedblockchainquery/api_op_ListAssetContracts.go +++ b/service/managedblockchainquery/api_op_ListAssetContracts.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListAssetContractsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssetContractsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListAssetContractsMiddlewares(stack *middleware.Sta return nil } -// ListAssetContractsAPIClient is a client that implements the ListAssetContracts -// operation. -type ListAssetContractsAPIClient interface { - ListAssetContracts(context.Context, *ListAssetContractsInput, ...func(*Options)) (*ListAssetContractsOutput, error) -} - -var _ ListAssetContractsAPIClient = (*Client)(nil) - // ListAssetContractsPaginatorOptions is the paginator options for // ListAssetContracts type ListAssetContractsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListAssetContractsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetContracts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListAssetContractsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAssetContractsAPIClient is a client that implements the ListAssetContracts +// operation. +type ListAssetContractsAPIClient interface { + ListAssetContracts(context.Context, *ListAssetContractsInput, ...func(*Options)) (*ListAssetContractsOutput, error) +} + +var _ ListAssetContractsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetContracts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchainquery/api_op_ListFilteredTransactionEvents.go b/service/managedblockchainquery/api_op_ListFilteredTransactionEvents.go index 4a06b4ee8c0..644f68bf860 100644 --- a/service/managedblockchainquery/api_op_ListFilteredTransactionEvents.go +++ b/service/managedblockchainquery/api_op_ListFilteredTransactionEvents.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListFilteredTransactionEventsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFilteredTransactionEventsValidationMiddleware(stack); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationListFilteredTransactionEventsMiddlewares(stack *mid return nil } -// ListFilteredTransactionEventsAPIClient is a client that implements the -// ListFilteredTransactionEvents operation. -type ListFilteredTransactionEventsAPIClient interface { - ListFilteredTransactionEvents(context.Context, *ListFilteredTransactionEventsInput, ...func(*Options)) (*ListFilteredTransactionEventsOutput, error) -} - -var _ ListFilteredTransactionEventsAPIClient = (*Client)(nil) - // ListFilteredTransactionEventsPaginatorOptions is the paginator options for // ListFilteredTransactionEvents type ListFilteredTransactionEventsPaginatorOptions struct { @@ -260,6 +255,9 @@ func (p *ListFilteredTransactionEventsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFilteredTransactionEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *ListFilteredTransactionEventsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListFilteredTransactionEventsAPIClient is a client that implements the +// ListFilteredTransactionEvents operation. +type ListFilteredTransactionEventsAPIClient interface { + ListFilteredTransactionEvents(context.Context, *ListFilteredTransactionEventsInput, ...func(*Options)) (*ListFilteredTransactionEventsOutput, error) +} + +var _ ListFilteredTransactionEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFilteredTransactionEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchainquery/api_op_ListTokenBalances.go b/service/managedblockchainquery/api_op_ListTokenBalances.go index 8600ec6aa95..d538b55800c 100644 --- a/service/managedblockchainquery/api_op_ListTokenBalances.go +++ b/service/managedblockchainquery/api_op_ListTokenBalances.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListTokenBalancesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTokenBalancesValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListTokenBalancesMiddlewares(stack *middleware.Stac return nil } -// ListTokenBalancesAPIClient is a client that implements the ListTokenBalances -// operation. -type ListTokenBalancesAPIClient interface { - ListTokenBalances(context.Context, *ListTokenBalancesInput, ...func(*Options)) (*ListTokenBalancesOutput, error) -} - -var _ ListTokenBalancesAPIClient = (*Client)(nil) - // ListTokenBalancesPaginatorOptions is the paginator options for ListTokenBalances type ListTokenBalancesPaginatorOptions struct { // The maximum number of token balances to return. @@ -251,6 +246,9 @@ func (p *ListTokenBalancesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTokenBalances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *ListTokenBalancesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListTokenBalancesAPIClient is a client that implements the ListTokenBalances +// operation. +type ListTokenBalancesAPIClient interface { + ListTokenBalances(context.Context, *ListTokenBalancesInput, ...func(*Options)) (*ListTokenBalancesOutput, error) +} + +var _ ListTokenBalancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTokenBalances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchainquery/api_op_ListTransactionEvents.go b/service/managedblockchainquery/api_op_ListTransactionEvents.go index ffbcae42f23..73759050ff6 100644 --- a/service/managedblockchainquery/api_op_ListTransactionEvents.go +++ b/service/managedblockchainquery/api_op_ListTransactionEvents.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListTransactionEventsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTransactionEventsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListTransactionEventsMiddlewares(stack *middleware. return nil } -// ListTransactionEventsAPIClient is a client that implements the -// ListTransactionEvents operation. -type ListTransactionEventsAPIClient interface { - ListTransactionEvents(context.Context, *ListTransactionEventsInput, ...func(*Options)) (*ListTransactionEventsOutput, error) -} - -var _ ListTransactionEventsAPIClient = (*Client)(nil) - // ListTransactionEventsPaginatorOptions is the paginator options for // ListTransactionEvents type ListTransactionEventsPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *ListTransactionEventsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTransactionEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListTransactionEventsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListTransactionEventsAPIClient is a client that implements the +// ListTransactionEvents operation. +type ListTransactionEventsAPIClient interface { + ListTransactionEvents(context.Context, *ListTransactionEventsInput, ...func(*Options)) (*ListTransactionEventsOutput, error) +} + +var _ ListTransactionEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTransactionEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/managedblockchainquery/api_op_ListTransactions.go b/service/managedblockchainquery/api_op_ListTransactions.go index 385c9a9ee11..ab89832fc20 100644 --- a/service/managedblockchainquery/api_op_ListTransactions.go +++ b/service/managedblockchainquery/api_op_ListTransactions.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListTransactionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTransactionsValidationMiddleware(stack); err != nil { return err } @@ -172,14 +175,6 @@ func (c *Client) addOperationListTransactionsMiddlewares(stack *middleware.Stack return nil } -// ListTransactionsAPIClient is a client that implements the ListTransactions -// operation. -type ListTransactionsAPIClient interface { - ListTransactions(context.Context, *ListTransactionsInput, ...func(*Options)) (*ListTransactionsOutput, error) -} - -var _ ListTransactionsAPIClient = (*Client)(nil) - // ListTransactionsPaginatorOptions is the paginator options for ListTransactions type ListTransactionsPaginatorOptions struct { // The maximum number of transactions to list. @@ -252,6 +247,9 @@ func (p *ListTransactionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTransactions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *ListTransactionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTransactionsAPIClient is a client that implements the ListTransactions +// operation. +type ListTransactionsAPIClient interface { + ListTransactions(context.Context, *ListTransactionsInput, ...func(*Options)) (*ListTransactionsOutput, error) +} + +var _ ListTransactionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTransactions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/marketplaceagreement/api_client.go b/service/marketplaceagreement/api_client.go index fda83ee0f66..fb45af4ad7c 100644 --- a/service/marketplaceagreement/api_client.go +++ b/service/marketplaceagreement/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/marketplaceagreement/api_op_DescribeAgreement.go b/service/marketplaceagreement/api_op_DescribeAgreement.go index 5f3da8c4306..212c4ed30e6 100644 --- a/service/marketplaceagreement/api_op_DescribeAgreement.go +++ b/service/marketplaceagreement/api_op_DescribeAgreement.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeAgreementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAgreementValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplaceagreement/api_op_GetAgreementTerms.go b/service/marketplaceagreement/api_op_GetAgreementTerms.go index 40453efcd07..3255b391a3d 100644 --- a/service/marketplaceagreement/api_op_GetAgreementTerms.go +++ b/service/marketplaceagreement/api_op_GetAgreementTerms.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetAgreementTermsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAgreementTermsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationGetAgreementTermsMiddlewares(stack *middleware.Stac return nil } -// GetAgreementTermsAPIClient is a client that implements the GetAgreementTerms -// operation. -type GetAgreementTermsAPIClient interface { - GetAgreementTerms(context.Context, *GetAgreementTermsInput, ...func(*Options)) (*GetAgreementTermsOutput, error) -} - -var _ GetAgreementTermsAPIClient = (*Client)(nil) - // GetAgreementTermsPaginatorOptions is the paginator options for GetAgreementTerms type GetAgreementTermsPaginatorOptions struct { // The maximum number of agreements to return in the response. @@ -228,6 +223,9 @@ func (p *GetAgreementTermsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAgreementTerms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *GetAgreementTermsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetAgreementTermsAPIClient is a client that implements the GetAgreementTerms +// operation. +type GetAgreementTermsAPIClient interface { + GetAgreementTerms(context.Context, *GetAgreementTermsInput, ...func(*Options)) (*GetAgreementTermsOutput, error) +} + +var _ GetAgreementTermsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAgreementTerms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/marketplaceagreement/api_op_SearchAgreements.go b/service/marketplaceagreement/api_op_SearchAgreements.go index 3a0d73ef7e4..e6701952d00 100644 --- a/service/marketplaceagreement/api_op_SearchAgreements.go +++ b/service/marketplaceagreement/api_op_SearchAgreements.go @@ -184,6 +184,9 @@ func (c *Client) addOperationSearchAgreementsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchAgreements(options.Region), middleware.Before); err != nil { return err } @@ -205,14 +208,6 @@ func (c *Client) addOperationSearchAgreementsMiddlewares(stack *middleware.Stack return nil } -// SearchAgreementsAPIClient is a client that implements the SearchAgreements -// operation. -type SearchAgreementsAPIClient interface { - SearchAgreements(context.Context, *SearchAgreementsInput, ...func(*Options)) (*SearchAgreementsOutput, error) -} - -var _ SearchAgreementsAPIClient = (*Client)(nil) - // SearchAgreementsPaginatorOptions is the paginator options for SearchAgreements type SearchAgreementsPaginatorOptions struct { // The maximum number of agreements to return in the response. @@ -276,6 +271,9 @@ func (p *SearchAgreementsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchAgreements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -295,6 +293,14 @@ func (p *SearchAgreementsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// SearchAgreementsAPIClient is a client that implements the SearchAgreements +// operation. +type SearchAgreementsAPIClient interface { + SearchAgreements(context.Context, *SearchAgreementsInput, ...func(*Options)) (*SearchAgreementsOutput, error) +} + +var _ SearchAgreementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchAgreements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/marketplacecatalog/api_client.go b/service/marketplacecatalog/api_client.go index 1ec169320ec..f15315b44bd 100644 --- a/service/marketplacecatalog/api_client.go +++ b/service/marketplacecatalog/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/marketplacecatalog/api_op_BatchDescribeEntities.go b/service/marketplacecatalog/api_op_BatchDescribeEntities.go index a1d55d736aa..ba13e5d558b 100644 --- a/service/marketplacecatalog/api_op_BatchDescribeEntities.go +++ b/service/marketplacecatalog/api_op_BatchDescribeEntities.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchDescribeEntitiesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDescribeEntitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_CancelChangeSet.go b/service/marketplacecatalog/api_op_CancelChangeSet.go index 2cec669bdaa..0fad7d6781c 100644 --- a/service/marketplacecatalog/api_op_CancelChangeSet.go +++ b/service/marketplacecatalog/api_op_CancelChangeSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCancelChangeSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_DeleteResourcePolicy.go b/service/marketplacecatalog/api_op_DeleteResourcePolicy.go index 70c817b5d9c..e93fc953d1e 100644 --- a/service/marketplacecatalog/api_op_DeleteResourcePolicy.go +++ b/service/marketplacecatalog/api_op_DeleteResourcePolicy.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_DescribeChangeSet.go b/service/marketplacecatalog/api_op_DescribeChangeSet.go index e61a3eaddf5..2baab66ba83 100644 --- a/service/marketplacecatalog/api_op_DescribeChangeSet.go +++ b/service/marketplacecatalog/api_op_DescribeChangeSet.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeChangeSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_DescribeEntity.go b/service/marketplacecatalog/api_op_DescribeEntity.go index 27981ac09f1..fa1596d9829 100644 --- a/service/marketplacecatalog/api_op_DescribeEntity.go +++ b/service/marketplacecatalog/api_op_DescribeEntity.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeEntityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntityValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_GetResourcePolicy.go b/service/marketplacecatalog/api_op_GetResourcePolicy.go index 9b943b3e5cb..62e67c3ba92 100644 --- a/service/marketplacecatalog/api_op_GetResourcePolicy.go +++ b/service/marketplacecatalog/api_op_GetResourcePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_ListChangeSets.go b/service/marketplacecatalog/api_op_ListChangeSets.go index 1b0b65c1291..4b976f083f7 100644 --- a/service/marketplacecatalog/api_op_ListChangeSets.go +++ b/service/marketplacecatalog/api_op_ListChangeSets.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListChangeSetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChangeSetsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListChangeSetsMiddlewares(stack *middleware.Stack, return nil } -// ListChangeSetsAPIClient is a client that implements the ListChangeSets -// operation. -type ListChangeSetsAPIClient interface { - ListChangeSets(context.Context, *ListChangeSetsInput, ...func(*Options)) (*ListChangeSetsOutput, error) -} - -var _ ListChangeSetsAPIClient = (*Client)(nil) - // ListChangeSetsPaginatorOptions is the paginator options for ListChangeSets type ListChangeSetsPaginatorOptions struct { // The maximum number of results returned by a single call. This value must be @@ -227,6 +222,9 @@ func (p *ListChangeSetsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChangeSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListChangeSetsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListChangeSetsAPIClient is a client that implements the ListChangeSets +// operation. +type ListChangeSetsAPIClient interface { + ListChangeSets(context.Context, *ListChangeSetsInput, ...func(*Options)) (*ListChangeSetsOutput, error) +} + +var _ ListChangeSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChangeSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/marketplacecatalog/api_op_ListEntities.go b/service/marketplacecatalog/api_op_ListEntities.go index 063cc807446..3843ccc9944 100644 --- a/service/marketplacecatalog/api_op_ListEntities.go +++ b/service/marketplacecatalog/api_op_ListEntities.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListEntitiesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEntitiesValidationMiddleware(stack); err != nil { return err } @@ -170,13 +173,6 @@ func (c *Client) addOperationListEntitiesMiddlewares(stack *middleware.Stack, op return nil } -// ListEntitiesAPIClient is a client that implements the ListEntities operation. -type ListEntitiesAPIClient interface { - ListEntities(context.Context, *ListEntitiesInput, ...func(*Options)) (*ListEntitiesOutput, error) -} - -var _ ListEntitiesAPIClient = (*Client)(nil) - // ListEntitiesPaginatorOptions is the paginator options for ListEntities type ListEntitiesPaginatorOptions struct { // Specifies the upper limit of the elements on a single page. If a value isn't @@ -241,6 +237,9 @@ func (p *ListEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +259,13 @@ func (p *ListEntitiesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListEntitiesAPIClient is a client that implements the ListEntities operation. +type ListEntitiesAPIClient interface { + ListEntities(context.Context, *ListEntitiesInput, ...func(*Options)) (*ListEntitiesOutput, error) +} + +var _ ListEntitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/marketplacecatalog/api_op_ListTagsForResource.go b/service/marketplacecatalog/api_op_ListTagsForResource.go index c13ce7601d5..7610bc2ac0d 100644 --- a/service/marketplacecatalog/api_op_ListTagsForResource.go +++ b/service/marketplacecatalog/api_op_ListTagsForResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_PutResourcePolicy.go b/service/marketplacecatalog/api_op_PutResourcePolicy.go index bbcf614810f..2795a20e758 100644 --- a/service/marketplacecatalog/api_op_PutResourcePolicy.go +++ b/service/marketplacecatalog/api_op_PutResourcePolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_StartChangeSet.go b/service/marketplacecatalog/api_op_StartChangeSet.go index 3d372118004..2664eb27a75 100644 --- a/service/marketplacecatalog/api_op_StartChangeSet.go +++ b/service/marketplacecatalog/api_op_StartChangeSet.go @@ -152,6 +152,9 @@ func (c *Client) addOperationStartChangeSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartChangeSetMiddleware(stack, options); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_TagResource.go b/service/marketplacecatalog/api_op_TagResource.go index 96a877cb769..51018a01a94 100644 --- a/service/marketplacecatalog/api_op_TagResource.go +++ b/service/marketplacecatalog/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecatalog/api_op_UntagResource.go b/service/marketplacecatalog/api_op_UntagResource.go index 23a02f146b6..cdbbde1753f 100644 --- a/service/marketplacecatalog/api_op_UntagResource.go +++ b/service/marketplacecatalog/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecommerceanalytics/api_client.go b/service/marketplacecommerceanalytics/api_client.go index 14fbc43dec1..5934a7fe25c 100644 --- a/service/marketplacecommerceanalytics/api_client.go +++ b/service/marketplacecommerceanalytics/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/marketplacecommerceanalytics/api_op_GenerateDataSet.go b/service/marketplacecommerceanalytics/api_op_GenerateDataSet.go index a24ef0f03f3..5628ff91f95 100644 --- a/service/marketplacecommerceanalytics/api_op_GenerateDataSet.go +++ b/service/marketplacecommerceanalytics/api_op_GenerateDataSet.go @@ -241,6 +241,9 @@ func (c *Client) addOperationGenerateDataSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacecommerceanalytics/api_op_StartSupportDataExport.go b/service/marketplacecommerceanalytics/api_op_StartSupportDataExport.go index 5fc387f93ed..d7310c25107 100644 --- a/service/marketplacecommerceanalytics/api_op_StartSupportDataExport.go +++ b/service/marketplacecommerceanalytics/api_op_StartSupportDataExport.go @@ -179,6 +179,9 @@ func (c *Client) addOperationStartSupportDataExportMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSupportDataExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacedeployment/api_client.go b/service/marketplacedeployment/api_client.go index b80ce03a6c1..7c358fe68f2 100644 --- a/service/marketplacedeployment/api_client.go +++ b/service/marketplacedeployment/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/marketplacedeployment/api_op_ListTagsForResource.go b/service/marketplacedeployment/api_op_ListTagsForResource.go index 17457bbc7e6..0aefe74bf82 100644 --- a/service/marketplacedeployment/api_op_ListTagsForResource.go +++ b/service/marketplacedeployment/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacedeployment/api_op_PutDeploymentParameter.go b/service/marketplacedeployment/api_op_PutDeploymentParameter.go index 39060ecd823..a44db8d5d37 100644 --- a/service/marketplacedeployment/api_op_PutDeploymentParameter.go +++ b/service/marketplacedeployment/api_op_PutDeploymentParameter.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutDeploymentParameterMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutDeploymentParameterMiddleware(stack, options); err != nil { return err } diff --git a/service/marketplacedeployment/api_op_TagResource.go b/service/marketplacedeployment/api_op_TagResource.go index f222065e300..8719653cc2c 100644 --- a/service/marketplacedeployment/api_op_TagResource.go +++ b/service/marketplacedeployment/api_op_TagResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacedeployment/api_op_UntagResource.go b/service/marketplacedeployment/api_op_UntagResource.go index c6b9fcd0b74..af81b5b0a91 100644 --- a/service/marketplacedeployment/api_op_UntagResource.go +++ b/service/marketplacedeployment/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplaceentitlementservice/api_client.go b/service/marketplaceentitlementservice/api_client.go index 772cd836b7c..4725db39a9f 100644 --- a/service/marketplaceentitlementservice/api_client.go +++ b/service/marketplaceentitlementservice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/marketplaceentitlementservice/api_op_GetEntitlements.go b/service/marketplaceentitlementservice/api_op_GetEntitlements.go index 909efe851e1..f7d31d170ba 100644 --- a/service/marketplaceentitlementservice/api_op_GetEntitlements.go +++ b/service/marketplaceentitlementservice/api_op_GetEntitlements.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetEntitlementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEntitlementsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationGetEntitlementsMiddlewares(stack *middleware.Stack, return nil } -// GetEntitlementsAPIClient is a client that implements the GetEntitlements -// operation. -type GetEntitlementsAPIClient interface { - GetEntitlements(context.Context, *GetEntitlementsInput, ...func(*Options)) (*GetEntitlementsOutput, error) -} - -var _ GetEntitlementsAPIClient = (*Client)(nil) - // GetEntitlementsPaginatorOptions is the paginator options for GetEntitlements type GetEntitlementsPaginatorOptions struct { // The maximum number of items to retrieve from the GetEntitlements operation. For @@ -229,6 +224,9 @@ func (p *GetEntitlementsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEntitlements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *GetEntitlementsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetEntitlementsAPIClient is a client that implements the GetEntitlements +// operation. +type GetEntitlementsAPIClient interface { + GetEntitlements(context.Context, *GetEntitlementsInput, ...func(*Options)) (*GetEntitlementsOutput, error) +} + +var _ GetEntitlementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEntitlements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/marketplacemetering/api_client.go b/service/marketplacemetering/api_client.go index e72470c0e97..4e7ee124365 100644 --- a/service/marketplacemetering/api_client.go +++ b/service/marketplacemetering/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/marketplacemetering/api_op_BatchMeterUsage.go b/service/marketplacemetering/api_op_BatchMeterUsage.go index c3ee4f8cefe..fabf940f1e7 100644 --- a/service/marketplacemetering/api_op_BatchMeterUsage.go +++ b/service/marketplacemetering/api_op_BatchMeterUsage.go @@ -153,6 +153,9 @@ func (c *Client) addOperationBatchMeterUsageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchMeterUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacemetering/api_op_MeterUsage.go b/service/marketplacemetering/api_op_MeterUsage.go index 24c0e1741d6..4f42e1e6570 100644 --- a/service/marketplacemetering/api_op_MeterUsage.go +++ b/service/marketplacemetering/api_op_MeterUsage.go @@ -150,6 +150,9 @@ func (c *Client) addOperationMeterUsageMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMeterUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacemetering/api_op_RegisterUsage.go b/service/marketplacemetering/api_op_RegisterUsage.go index 8ffbeaff820..cd23b6a4e9e 100644 --- a/service/marketplacemetering/api_op_RegisterUsage.go +++ b/service/marketplacemetering/api_op_RegisterUsage.go @@ -151,6 +151,9 @@ func (c *Client) addOperationRegisterUsageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/marketplacemetering/api_op_ResolveCustomer.go b/service/marketplacemetering/api_op_ResolveCustomer.go index c63fd84b8a7..39e684f0565 100644 --- a/service/marketplacemetering/api_op_ResolveCustomer.go +++ b/service/marketplacemetering/api_op_ResolveCustomer.go @@ -135,6 +135,9 @@ func (c *Client) addOperationResolveCustomerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResolveCustomerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_client.go b/service/mediaconnect/api_client.go index 3a1dfc12540..5310c7264da 100644 --- a/service/mediaconnect/api_client.go +++ b/service/mediaconnect/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mediaconnect/api_op_AddBridgeOutputs.go b/service/mediaconnect/api_op_AddBridgeOutputs.go index 907bb817976..4c663120fff 100644 --- a/service/mediaconnect/api_op_AddBridgeOutputs.go +++ b/service/mediaconnect/api_op_AddBridgeOutputs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddBridgeOutputsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddBridgeOutputsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_AddBridgeSources.go b/service/mediaconnect/api_op_AddBridgeSources.go index 6a37aa0cbc8..99e697389a0 100644 --- a/service/mediaconnect/api_op_AddBridgeSources.go +++ b/service/mediaconnect/api_op_AddBridgeSources.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddBridgeSourcesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddBridgeSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_AddFlowMediaStreams.go b/service/mediaconnect/api_op_AddFlowMediaStreams.go index 3737465f1d6..dd2b689cf9a 100644 --- a/service/mediaconnect/api_op_AddFlowMediaStreams.go +++ b/service/mediaconnect/api_op_AddFlowMediaStreams.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAddFlowMediaStreamsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddFlowMediaStreamsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_AddFlowOutputs.go b/service/mediaconnect/api_op_AddFlowOutputs.go index 8edae66f5c6..671d5b2596e 100644 --- a/service/mediaconnect/api_op_AddFlowOutputs.go +++ b/service/mediaconnect/api_op_AddFlowOutputs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddFlowOutputsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddFlowOutputsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_AddFlowSources.go b/service/mediaconnect/api_op_AddFlowSources.go index 7d3eb291765..bbf1804fd48 100644 --- a/service/mediaconnect/api_op_AddFlowSources.go +++ b/service/mediaconnect/api_op_AddFlowSources.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddFlowSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddFlowSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_AddFlowVpcInterfaces.go b/service/mediaconnect/api_op_AddFlowVpcInterfaces.go index 82006e8038b..131d65d164c 100644 --- a/service/mediaconnect/api_op_AddFlowVpcInterfaces.go +++ b/service/mediaconnect/api_op_AddFlowVpcInterfaces.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAddFlowVpcInterfacesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddFlowVpcInterfacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_CreateBridge.go b/service/mediaconnect/api_op_CreateBridge.go index 7c73981313c..54272f31113 100644 --- a/service/mediaconnect/api_op_CreateBridge.go +++ b/service/mediaconnect/api_op_CreateBridge.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateBridgeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBridgeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_CreateFlow.go b/service/mediaconnect/api_op_CreateFlow.go index 792f162e93f..28f00a61d2a 100644 --- a/service/mediaconnect/api_op_CreateFlow.go +++ b/service/mediaconnect/api_op_CreateFlow.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_CreateGateway.go b/service/mediaconnect/api_op_CreateGateway.go index bb36db0fdea..6830959d41e 100644 --- a/service/mediaconnect/api_op_CreateGateway.go +++ b/service/mediaconnect/api_op_CreateGateway.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DeleteBridge.go b/service/mediaconnect/api_op_DeleteBridge.go index a86dc948ac2..bfb6200e9d5 100644 --- a/service/mediaconnect/api_op_DeleteBridge.go +++ b/service/mediaconnect/api_op_DeleteBridge.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteBridgeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBridgeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DeleteFlow.go b/service/mediaconnect/api_op_DeleteFlow.go index f6010fdf5c0..1ccca72bc5a 100644 --- a/service/mediaconnect/api_op_DeleteFlow.go +++ b/service/mediaconnect/api_op_DeleteFlow.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DeleteGateway.go b/service/mediaconnect/api_op_DeleteGateway.go index 1c67d67a444..ee6fb1c3f00 100644 --- a/service/mediaconnect/api_op_DeleteGateway.go +++ b/service/mediaconnect/api_op_DeleteGateway.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DeregisterGatewayInstance.go b/service/mediaconnect/api_op_DeregisterGatewayInstance.go index 703191cd25b..ac9d0fb5d28 100644 --- a/service/mediaconnect/api_op_DeregisterGatewayInstance.go +++ b/service/mediaconnect/api_op_DeregisterGatewayInstance.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeregisterGatewayInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterGatewayInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DescribeBridge.go b/service/mediaconnect/api_op_DescribeBridge.go index 8aaffb9d21e..c34575c763b 100644 --- a/service/mediaconnect/api_op_DescribeBridge.go +++ b/service/mediaconnect/api_op_DescribeBridge.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeBridgeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBridgeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DescribeFlow.go b/service/mediaconnect/api_op_DescribeFlow.go index b3a26fdfed4..39449db5e0a 100644 --- a/service/mediaconnect/api_op_DescribeFlow.go +++ b/service/mediaconnect/api_op_DescribeFlow.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeFlowMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlowValidationMiddleware(stack); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationDescribeFlowMiddlewares(stack *middleware.Stack, op return nil } -// DescribeFlowAPIClient is a client that implements the DescribeFlow operation. -type DescribeFlowAPIClient interface { - DescribeFlow(context.Context, *DescribeFlowInput, ...func(*Options)) (*DescribeFlowOutput, error) -} - -var _ DescribeFlowAPIClient = (*Client)(nil) - // FlowActiveWaiterOptions are waiter options for FlowActiveWaiter type FlowActiveWaiterOptions struct { @@ -261,7 +257,13 @@ func (w *FlowActiveWaiter) WaitForOutput(ctx context.Context, params *DescribeFl } out, err := w.client.DescribeFlow(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -498,7 +500,13 @@ func (w *FlowDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeF } out, err := w.client.DescribeFlow(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -708,7 +716,13 @@ func (w *FlowStandbyWaiter) WaitForOutput(ctx context.Context, params *DescribeF } out, err := w.client.DescribeFlow(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -814,6 +828,13 @@ func flowStandbyStateRetryable(ctx context.Context, input *DescribeFlowInput, ou return true, nil } +// DescribeFlowAPIClient is a client that implements the DescribeFlow operation. +type DescribeFlowAPIClient interface { + DescribeFlow(context.Context, *DescribeFlowInput, ...func(*Options)) (*DescribeFlowOutput, error) +} + +var _ DescribeFlowAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFlow(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_DescribeFlowSourceMetadata.go b/service/mediaconnect/api_op_DescribeFlowSourceMetadata.go index 8f0712d4292..18d3d00513d 100644 --- a/service/mediaconnect/api_op_DescribeFlowSourceMetadata.go +++ b/service/mediaconnect/api_op_DescribeFlowSourceMetadata.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeFlowSourceMetadataMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlowSourceMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DescribeGateway.go b/service/mediaconnect/api_op_DescribeGateway.go index 715ba5769e5..6f4ba9988d3 100644 --- a/service/mediaconnect/api_op_DescribeGateway.go +++ b/service/mediaconnect/api_op_DescribeGateway.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeGatewayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DescribeGatewayInstance.go b/service/mediaconnect/api_op_DescribeGatewayInstance.go index 46112dd7e5a..668ddfc7449 100644 --- a/service/mediaconnect/api_op_DescribeGatewayInstance.go +++ b/service/mediaconnect/api_op_DescribeGatewayInstance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeGatewayInstanceMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGatewayInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DescribeOffering.go b/service/mediaconnect/api_op_DescribeOffering.go index 7f3f2b58c59..aba97d80a8b 100644 --- a/service/mediaconnect/api_op_DescribeOffering.go +++ b/service/mediaconnect/api_op_DescribeOffering.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeOfferingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_DescribeReservation.go b/service/mediaconnect/api_op_DescribeReservation.go index e41efdc567c..5e0bdcbd115 100644 --- a/service/mediaconnect/api_op_DescribeReservation.go +++ b/service/mediaconnect/api_op_DescribeReservation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeReservationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_GrantFlowEntitlements.go b/service/mediaconnect/api_op_GrantFlowEntitlements.go index 9da3fcd9318..070429bbadc 100644 --- a/service/mediaconnect/api_op_GrantFlowEntitlements.go +++ b/service/mediaconnect/api_op_GrantFlowEntitlements.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGrantFlowEntitlementsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGrantFlowEntitlementsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_ListBridges.go b/service/mediaconnect/api_op_ListBridges.go index 1d0a4b47476..513719fa74b 100644 --- a/service/mediaconnect/api_op_ListBridges.go +++ b/service/mediaconnect/api_op_ListBridges.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListBridgesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBridges(options.Region), middleware.Before); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListBridgesMiddlewares(stack *middleware.Stack, opt return nil } -// ListBridgesAPIClient is a client that implements the ListBridges operation. -type ListBridgesAPIClient interface { - ListBridges(context.Context, *ListBridgesInput, ...func(*Options)) (*ListBridgesOutput, error) -} - -var _ ListBridgesAPIClient = (*Client)(nil) - // ListBridgesPaginatorOptions is the paginator options for ListBridges type ListBridgesPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -226,6 +222,9 @@ func (p *ListBridgesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBridges(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListBridgesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListBridgesAPIClient is a client that implements the ListBridges operation. +type ListBridgesAPIClient interface { + ListBridges(context.Context, *ListBridgesInput, ...func(*Options)) (*ListBridgesOutput, error) +} + +var _ ListBridgesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBridges(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListEntitlements.go b/service/mediaconnect/api_op_ListEntitlements.go index 4f64fa4413c..52a337cc5c2 100644 --- a/service/mediaconnect/api_op_ListEntitlements.go +++ b/service/mediaconnect/api_op_ListEntitlements.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListEntitlementsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEntitlements(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListEntitlementsMiddlewares(stack *middleware.Stack return nil } -// ListEntitlementsAPIClient is a client that implements the ListEntitlements -// operation. -type ListEntitlementsAPIClient interface { - ListEntitlements(context.Context, *ListEntitlementsInput, ...func(*Options)) (*ListEntitlementsOutput, error) -} - -var _ ListEntitlementsAPIClient = (*Client)(nil) - // ListEntitlementsPaginatorOptions is the paginator options for ListEntitlements type ListEntitlementsPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -223,6 +218,9 @@ func (p *ListEntitlementsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEntitlements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListEntitlementsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEntitlementsAPIClient is a client that implements the ListEntitlements +// operation. +type ListEntitlementsAPIClient interface { + ListEntitlements(context.Context, *ListEntitlementsInput, ...func(*Options)) (*ListEntitlementsOutput, error) +} + +var _ ListEntitlementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEntitlements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListFlows.go b/service/mediaconnect/api_op_ListFlows.go index 2f99f1b801b..e502c4b9a90 100644 --- a/service/mediaconnect/api_op_ListFlows.go +++ b/service/mediaconnect/api_op_ListFlows.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListFlowsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFlows(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListFlowsMiddlewares(stack *middleware.Stack, optio return nil } -// ListFlowsAPIClient is a client that implements the ListFlows operation. -type ListFlowsAPIClient interface { - ListFlows(context.Context, *ListFlowsInput, ...func(*Options)) (*ListFlowsOutput, error) -} - -var _ ListFlowsAPIClient = (*Client)(nil) - // ListFlowsPaginatorOptions is the paginator options for ListFlows type ListFlowsPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -222,6 +218,9 @@ func (p *ListFlowsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListFlowsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListFlowsAPIClient is a client that implements the ListFlows operation. +type ListFlowsAPIClient interface { + ListFlows(context.Context, *ListFlowsInput, ...func(*Options)) (*ListFlowsOutput, error) +} + +var _ ListFlowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListGatewayInstances.go b/service/mediaconnect/api_op_ListGatewayInstances.go index 9fc9c8ec17d..9f93350f40b 100644 --- a/service/mediaconnect/api_op_ListGatewayInstances.go +++ b/service/mediaconnect/api_op_ListGatewayInstances.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListGatewayInstancesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGatewayInstances(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListGatewayInstancesMiddlewares(stack *middleware.S return nil } -// ListGatewayInstancesAPIClient is a client that implements the -// ListGatewayInstances operation. -type ListGatewayInstancesAPIClient interface { - ListGatewayInstances(context.Context, *ListGatewayInstancesInput, ...func(*Options)) (*ListGatewayInstancesOutput, error) -} - -var _ ListGatewayInstancesAPIClient = (*Client)(nil) - // ListGatewayInstancesPaginatorOptions is the paginator options for // ListGatewayInstances type ListGatewayInstancesPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListGatewayInstancesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGatewayInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListGatewayInstancesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListGatewayInstancesAPIClient is a client that implements the +// ListGatewayInstances operation. +type ListGatewayInstancesAPIClient interface { + ListGatewayInstances(context.Context, *ListGatewayInstancesInput, ...func(*Options)) (*ListGatewayInstancesOutput, error) +} + +var _ ListGatewayInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGatewayInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListGateways.go b/service/mediaconnect/api_op_ListGateways.go index 1e1811e0aaf..3c3fd3259f4 100644 --- a/service/mediaconnect/api_op_ListGateways.go +++ b/service/mediaconnect/api_op_ListGateways.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGateways(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op return nil } -// ListGatewaysAPIClient is a client that implements the ListGateways operation. -type ListGatewaysAPIClient interface { - ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) -} - -var _ ListGatewaysAPIClient = (*Client)(nil) - // ListGatewaysPaginatorOptions is the paginator options for ListGateways type ListGatewaysPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -222,6 +218,9 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListGatewaysAPIClient is a client that implements the ListGateways operation. +type ListGatewaysAPIClient interface { + ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) +} + +var _ ListGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListOfferings.go b/service/mediaconnect/api_op_ListOfferings.go index d58b6482500..96f85cee2a6 100644 --- a/service/mediaconnect/api_op_ListOfferings.go +++ b/service/mediaconnect/api_op_ListOfferings.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListOfferingsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOfferings(options.Region), middleware.Before); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListOfferingsMiddlewares(stack *middleware.Stack, o return nil } -// ListOfferingsAPIClient is a client that implements the ListOfferings operation. -type ListOfferingsAPIClient interface { - ListOfferings(context.Context, *ListOfferingsInput, ...func(*Options)) (*ListOfferingsOutput, error) -} - -var _ ListOfferingsAPIClient = (*Client)(nil) - // ListOfferingsPaginatorOptions is the paginator options for ListOfferings type ListOfferingsPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -225,6 +221,9 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListOfferingsAPIClient is a client that implements the ListOfferings operation. +type ListOfferingsAPIClient interface { + ListOfferings(context.Context, *ListOfferingsInput, ...func(*Options)) (*ListOfferingsOutput, error) +} + +var _ ListOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListReservations.go b/service/mediaconnect/api_op_ListReservations.go index f63050efbe0..e8d2fb46854 100644 --- a/service/mediaconnect/api_op_ListReservations.go +++ b/service/mediaconnect/api_op_ListReservations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListReservationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReservations(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListReservationsMiddlewares(stack *middleware.Stack return nil } -// ListReservationsAPIClient is a client that implements the ListReservations -// operation. -type ListReservationsAPIClient interface { - ListReservations(context.Context, *ListReservationsInput, ...func(*Options)) (*ListReservationsOutput, error) -} - -var _ ListReservationsAPIClient = (*Client)(nil) - // ListReservationsPaginatorOptions is the paginator options for ListReservations type ListReservationsPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -225,6 +220,9 @@ func (p *ListReservationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReservations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListReservationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListReservationsAPIClient is a client that implements the ListReservations +// operation. +type ListReservationsAPIClient interface { + ListReservations(context.Context, *ListReservationsInput, ...func(*Options)) (*ListReservationsOutput, error) +} + +var _ ListReservationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReservations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconnect/api_op_ListTagsForResource.go b/service/mediaconnect/api_op_ListTagsForResource.go index d9f15f62016..1fa182d339b 100644 --- a/service/mediaconnect/api_op_ListTagsForResource.go +++ b/service/mediaconnect/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_PurchaseOffering.go b/service/mediaconnect/api_op_PurchaseOffering.go index ffe202332ca..e5c1f740eab 100644 --- a/service/mediaconnect/api_op_PurchaseOffering.go +++ b/service/mediaconnect/api_op_PurchaseOffering.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPurchaseOfferingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RemoveBridgeOutput.go b/service/mediaconnect/api_op_RemoveBridgeOutput.go index 8104bc026b1..a3530a0b30c 100644 --- a/service/mediaconnect/api_op_RemoveBridgeOutput.go +++ b/service/mediaconnect/api_op_RemoveBridgeOutput.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRemoveBridgeOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveBridgeOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RemoveBridgeSource.go b/service/mediaconnect/api_op_RemoveBridgeSource.go index caebf625087..2dc09c4dda0 100644 --- a/service/mediaconnect/api_op_RemoveBridgeSource.go +++ b/service/mediaconnect/api_op_RemoveBridgeSource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRemoveBridgeSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveBridgeSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RemoveFlowMediaStream.go b/service/mediaconnect/api_op_RemoveFlowMediaStream.go index 2a6fe2f2eb1..d0bb91b0345 100644 --- a/service/mediaconnect/api_op_RemoveFlowMediaStream.go +++ b/service/mediaconnect/api_op_RemoveFlowMediaStream.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveFlowMediaStreamMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFlowMediaStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RemoveFlowOutput.go b/service/mediaconnect/api_op_RemoveFlowOutput.go index d8a39d6a4b2..590c58b9994 100644 --- a/service/mediaconnect/api_op_RemoveFlowOutput.go +++ b/service/mediaconnect/api_op_RemoveFlowOutput.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRemoveFlowOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFlowOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RemoveFlowSource.go b/service/mediaconnect/api_op_RemoveFlowSource.go index 1c105f99a4f..fe1588699ad 100644 --- a/service/mediaconnect/api_op_RemoveFlowSource.go +++ b/service/mediaconnect/api_op_RemoveFlowSource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveFlowSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFlowSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RemoveFlowVpcInterface.go b/service/mediaconnect/api_op_RemoveFlowVpcInterface.go index d149f49e5a3..10dc3843cd4 100644 --- a/service/mediaconnect/api_op_RemoveFlowVpcInterface.go +++ b/service/mediaconnect/api_op_RemoveFlowVpcInterface.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRemoveFlowVpcInterfaceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFlowVpcInterfaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_RevokeFlowEntitlement.go b/service/mediaconnect/api_op_RevokeFlowEntitlement.go index 1557a7ae296..0578313ea32 100644 --- a/service/mediaconnect/api_op_RevokeFlowEntitlement.go +++ b/service/mediaconnect/api_op_RevokeFlowEntitlement.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRevokeFlowEntitlementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeFlowEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_StartFlow.go b/service/mediaconnect/api_op_StartFlow.go index 2760556d24e..8945656bd96 100644 --- a/service/mediaconnect/api_op_StartFlow.go +++ b/service/mediaconnect/api_op_StartFlow.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStartFlowMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_StopFlow.go b/service/mediaconnect/api_op_StopFlow.go index 97f5c363f78..96e145bc382 100644 --- a/service/mediaconnect/api_op_StopFlow.go +++ b/service/mediaconnect/api_op_StopFlow.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopFlowMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_TagResource.go b/service/mediaconnect/api_op_TagResource.go index 29aab786a28..ee1ed2adbdc 100644 --- a/service/mediaconnect/api_op_TagResource.go +++ b/service/mediaconnect/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UntagResource.go b/service/mediaconnect/api_op_UntagResource.go index fdfb78bcbd0..88fc542c19e 100644 --- a/service/mediaconnect/api_op_UntagResource.go +++ b/service/mediaconnect/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateBridge.go b/service/mediaconnect/api_op_UpdateBridge.go index b66a5958fae..53b97e324d4 100644 --- a/service/mediaconnect/api_op_UpdateBridge.go +++ b/service/mediaconnect/api_op_UpdateBridge.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateBridgeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBridgeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateBridgeOutput.go b/service/mediaconnect/api_op_UpdateBridgeOutput.go index e39a6835923..8563ad51707 100644 --- a/service/mediaconnect/api_op_UpdateBridgeOutput.go +++ b/service/mediaconnect/api_op_UpdateBridgeOutput.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateBridgeOutputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBridgeOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateBridgeSource.go b/service/mediaconnect/api_op_UpdateBridgeSource.go index 3cd32a62443..3b12cade3f7 100644 --- a/service/mediaconnect/api_op_UpdateBridgeSource.go +++ b/service/mediaconnect/api_op_UpdateBridgeSource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateBridgeSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBridgeSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateBridgeState.go b/service/mediaconnect/api_op_UpdateBridgeState.go index e9465caede5..4441891dc29 100644 --- a/service/mediaconnect/api_op_UpdateBridgeState.go +++ b/service/mediaconnect/api_op_UpdateBridgeState.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateBridgeStateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBridgeStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateFlow.go b/service/mediaconnect/api_op_UpdateFlow.go index ffed80b159e..6ad1ff22005 100644 --- a/service/mediaconnect/api_op_UpdateFlow.go +++ b/service/mediaconnect/api_op_UpdateFlow.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateFlowMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlowValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateFlowEntitlement.go b/service/mediaconnect/api_op_UpdateFlowEntitlement.go index a12b1ae5363..f694d1227c6 100644 --- a/service/mediaconnect/api_op_UpdateFlowEntitlement.go +++ b/service/mediaconnect/api_op_UpdateFlowEntitlement.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateFlowEntitlementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlowEntitlementValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateFlowMediaStream.go b/service/mediaconnect/api_op_UpdateFlowMediaStream.go index f29a56ca99d..ed7412e0196 100644 --- a/service/mediaconnect/api_op_UpdateFlowMediaStream.go +++ b/service/mediaconnect/api_op_UpdateFlowMediaStream.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateFlowMediaStreamMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlowMediaStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateFlowOutput.go b/service/mediaconnect/api_op_UpdateFlowOutput.go index a2aa60589ca..30087e002d3 100644 --- a/service/mediaconnect/api_op_UpdateFlowOutput.go +++ b/service/mediaconnect/api_op_UpdateFlowOutput.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateFlowOutputMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlowOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateFlowSource.go b/service/mediaconnect/api_op_UpdateFlowSource.go index ec3b41e3bba..7c32e6f412c 100644 --- a/service/mediaconnect/api_op_UpdateFlowSource.go +++ b/service/mediaconnect/api_op_UpdateFlowSource.go @@ -184,6 +184,9 @@ func (c *Client) addOperationUpdateFlowSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFlowSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconnect/api_op_UpdateGatewayInstance.go b/service/mediaconnect/api_op_UpdateGatewayInstance.go index 71c51775a59..60f07739bba 100644 --- a/service/mediaconnect/api_op_UpdateGatewayInstance.go +++ b/service/mediaconnect/api_op_UpdateGatewayInstance.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateGatewayInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGatewayInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_client.go b/service/mediaconvert/api_client.go index 67ca81d4b5a..d7aeee88834 100644 --- a/service/mediaconvert/api_client.go +++ b/service/mediaconvert/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/mediaconvert/api_op_AssociateCertificate.go b/service/mediaconvert/api_op_AssociateCertificate.go index 99bc2cefef9..b82c3b0a165 100644 --- a/service/mediaconvert/api_op_AssociateCertificate.go +++ b/service/mediaconvert/api_op_AssociateCertificate.go @@ -103,6 +103,9 @@ func (c *Client) addOperationAssociateCertificateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_CancelJob.go b/service/mediaconvert/api_op_CancelJob.go index 43904dd66f0..61d027202d2 100644 --- a/service/mediaconvert/api_op_CancelJob.go +++ b/service/mediaconvert/api_op_CancelJob.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_CreateJob.go b/service/mediaconvert/api_op_CreateJob.go index 14a98d94d5f..0ceddbca6fb 100644 --- a/service/mediaconvert/api_op_CreateJob.go +++ b/service/mediaconvert/api_op_CreateJob.go @@ -185,6 +185,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateJobMiddleware(stack, options); err != nil { return err } diff --git a/service/mediaconvert/api_op_CreateJobTemplate.go b/service/mediaconvert/api_op_CreateJobTemplate.go index 2fd0ab606ae..0ced00578dd 100644 --- a/service/mediaconvert/api_op_CreateJobTemplate.go +++ b/service/mediaconvert/api_op_CreateJobTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_CreatePreset.go b/service/mediaconvert/api_op_CreatePreset.go index ce913ce79e9..abb0f0164d9 100644 --- a/service/mediaconvert/api_op_CreatePreset.go +++ b/service/mediaconvert/api_op_CreatePreset.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreatePresetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_CreateQueue.go b/service/mediaconvert/api_op_CreateQueue.go index e49143004f1..cac482516c9 100644 --- a/service/mediaconvert/api_op_CreateQueue.go +++ b/service/mediaconvert/api_op_CreateQueue.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_DeleteJobTemplate.go b/service/mediaconvert/api_op_DeleteJobTemplate.go index 2874a4eec19..7dd28c1e0fe 100644 --- a/service/mediaconvert/api_op_DeleteJobTemplate.go +++ b/service/mediaconvert/api_op_DeleteJobTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_DeletePolicy.go b/service/mediaconvert/api_op_DeletePolicy.go index 0c53df7555a..b248cf45309 100644 --- a/service/mediaconvert/api_op_DeletePolicy.go +++ b/service/mediaconvert/api_op_DeletePolicy.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mediaconvert/api_op_DeletePreset.go b/service/mediaconvert/api_op_DeletePreset.go index 0e7d040d4c4..fb332391db6 100644 --- a/service/mediaconvert/api_op_DeletePreset.go +++ b/service/mediaconvert/api_op_DeletePreset.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePresetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_DeleteQueue.go b/service/mediaconvert/api_op_DeleteQueue.go index a4bba6a652d..906dff7f87c 100644 --- a/service/mediaconvert/api_op_DeleteQueue.go +++ b/service/mediaconvert/api_op_DeleteQueue.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_DescribeEndpoints.go b/service/mediaconvert/api_op_DescribeEndpoints.go index aea18cecabe..a44d91974f2 100644 --- a/service/mediaconvert/api_op_DescribeEndpoints.go +++ b/service/mediaconvert/api_op_DescribeEndpoints.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac return nil } -// DescribeEndpointsAPIClient is a client that implements the DescribeEndpoints -// operation. -type DescribeEndpointsAPIClient interface { - DescribeEndpoints(context.Context, *DescribeEndpointsInput, ...func(*Options)) (*DescribeEndpointsOutput, error) -} - -var _ DescribeEndpointsAPIClient = (*Client)(nil) - // DescribeEndpointsPaginatorOptions is the paginator options for DescribeEndpoints type DescribeEndpointsPaginatorOptions struct { // Optional. Max number of endpoints, up to twenty, that will be returned at one @@ -221,6 +216,9 @@ func (p *DescribeEndpointsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeEndpointsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeEndpointsAPIClient is a client that implements the DescribeEndpoints +// operation. +type DescribeEndpointsAPIClient interface { + DescribeEndpoints(context.Context, *DescribeEndpointsInput, ...func(*Options)) (*DescribeEndpointsOutput, error) +} + +var _ DescribeEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconvert/api_op_DisassociateCertificate.go b/service/mediaconvert/api_op_DisassociateCertificate.go index 6891a9af916..0b05edeaeca 100644 --- a/service/mediaconvert/api_op_DisassociateCertificate.go +++ b/service/mediaconvert/api_op_DisassociateCertificate.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDisassociateCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_GetJob.go b/service/mediaconvert/api_op_GetJob.go index 1bc7295a67b..54501fc865d 100644 --- a/service/mediaconvert/api_op_GetJob.go +++ b/service/mediaconvert/api_op_GetJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetJobMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_GetJobTemplate.go b/service/mediaconvert/api_op_GetJobTemplate.go index ad9a784a2ff..96fb87b62db 100644 --- a/service/mediaconvert/api_op_GetJobTemplate.go +++ b/service/mediaconvert/api_op_GetJobTemplate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetJobTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_GetPolicy.go b/service/mediaconvert/api_op_GetPolicy.go index d6170dfed3f..29d98197855 100644 --- a/service/mediaconvert/api_op_GetPolicy.go +++ b/service/mediaconvert/api_op_GetPolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mediaconvert/api_op_GetPreset.go b/service/mediaconvert/api_op_GetPreset.go index 953e0fb0952..2aff1e0fc40 100644 --- a/service/mediaconvert/api_op_GetPreset.go +++ b/service/mediaconvert/api_op_GetPreset.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetPresetMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_GetQueue.go b/service/mediaconvert/api_op_GetQueue.go index 9f575428b38..84630b9880c 100644 --- a/service/mediaconvert/api_op_GetQueue.go +++ b/service/mediaconvert/api_op_GetQueue.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetQueueMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_ListJobTemplates.go b/service/mediaconvert/api_op_ListJobTemplates.go index eed6d70a126..e2706f06db0 100644 --- a/service/mediaconvert/api_op_ListJobTemplates.go +++ b/service/mediaconvert/api_op_ListJobTemplates.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListJobTemplatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobTemplates(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListJobTemplatesMiddlewares(stack *middleware.Stack return nil } -// ListJobTemplatesAPIClient is a client that implements the ListJobTemplates -// operation. -type ListJobTemplatesAPIClient interface { - ListJobTemplates(context.Context, *ListJobTemplatesInput, ...func(*Options)) (*ListJobTemplatesOutput, error) -} - -var _ ListJobTemplatesAPIClient = (*Client)(nil) - // ListJobTemplatesPaginatorOptions is the paginator options for ListJobTemplates type ListJobTemplatesPaginatorOptions struct { // Optional. Number of job templates, up to twenty, that will be returned at one @@ -220,6 +215,9 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListJobTemplatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListJobTemplatesAPIClient is a client that implements the ListJobTemplates +// operation. +type ListJobTemplatesAPIClient interface { + ListJobTemplates(context.Context, *ListJobTemplatesInput, ...func(*Options)) (*ListJobTemplatesOutput, error) +} + +var _ ListJobTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconvert/api_op_ListJobs.go b/service/mediaconvert/api_op_ListJobs.go index cb21593de77..54cbcc59174 100644 --- a/service/mediaconvert/api_op_ListJobs.go +++ b/service/mediaconvert/api_op_ListJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // Optional. Number of jobs, up to twenty, that will be returned at one time. @@ -216,6 +212,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconvert/api_op_ListPresets.go b/service/mediaconvert/api_op_ListPresets.go index 096d2b51d21..5ac8014638b 100644 --- a/service/mediaconvert/api_op_ListPresets.go +++ b/service/mediaconvert/api_op_ListPresets.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListPresetsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPresets(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListPresetsMiddlewares(stack *middleware.Stack, opt return nil } -// ListPresetsAPIClient is a client that implements the ListPresets operation. -type ListPresetsAPIClient interface { - ListPresets(context.Context, *ListPresetsInput, ...func(*Options)) (*ListPresetsOutput, error) -} - -var _ ListPresetsAPIClient = (*Client)(nil) - // ListPresetsPaginatorOptions is the paginator options for ListPresets type ListPresetsPaginatorOptions struct { // Optional. Number of presets, up to twenty, that will be returned at one time @@ -217,6 +213,9 @@ func (p *ListPresetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPresets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListPresetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListPresetsAPIClient is a client that implements the ListPresets operation. +type ListPresetsAPIClient interface { + ListPresets(context.Context, *ListPresetsInput, ...func(*Options)) (*ListPresetsOutput, error) +} + +var _ ListPresetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPresets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconvert/api_op_ListQueues.go b/service/mediaconvert/api_op_ListQueues.go index ee164a6df40..20b588d7522 100644 --- a/service/mediaconvert/api_op_ListQueues.go +++ b/service/mediaconvert/api_op_ListQueues.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueues(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti return nil } -// ListQueuesAPIClient is a client that implements the ListQueues operation. -type ListQueuesAPIClient interface { - ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) -} - -var _ ListQueuesAPIClient = (*Client)(nil) - // ListQueuesPaginatorOptions is the paginator options for ListQueues type ListQueuesPaginatorOptions struct { // Optional. Number of queues, up to twenty, that will be returned at one time. @@ -213,6 +209,9 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListQueuesAPIClient is a client that implements the ListQueues operation. +type ListQueuesAPIClient interface { + ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) +} + +var _ ListQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconvert/api_op_ListTagsForResource.go b/service/mediaconvert/api_op_ListTagsForResource.go index 584c07281d4..5acaf34f95a 100644 --- a/service/mediaconvert/api_op_ListTagsForResource.go +++ b/service/mediaconvert/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_PutPolicy.go b/service/mediaconvert/api_op_PutPolicy.go index 82825d21ed8..e334d913108 100644 --- a/service/mediaconvert/api_op_PutPolicy.go +++ b/service/mediaconvert/api_op_PutPolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_SearchJobs.go b/service/mediaconvert/api_op_SearchJobs.go index 5c04744832e..883ea4c5ee1 100644 --- a/service/mediaconvert/api_op_SearchJobs.go +++ b/service/mediaconvert/api_op_SearchJobs.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSearchJobsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchJobs(options.Region), middleware.Before); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationSearchJobsMiddlewares(stack *middleware.Stack, opti return nil } -// SearchJobsAPIClient is a client that implements the SearchJobs operation. -type SearchJobsAPIClient interface { - SearchJobs(context.Context, *SearchJobsInput, ...func(*Options)) (*SearchJobsOutput, error) -} - -var _ SearchJobsAPIClient = (*Client)(nil) - // SearchJobsPaginatorOptions is the paginator options for SearchJobs type SearchJobsPaginatorOptions struct { // Optional. Number of jobs, up to twenty, that will be returned at one time. @@ -221,6 +217,9 @@ func (p *SearchJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *SearchJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// SearchJobsAPIClient is a client that implements the SearchJobs operation. +type SearchJobsAPIClient interface { + SearchJobs(context.Context, *SearchJobsInput, ...func(*Options)) (*SearchJobsOutput, error) +} + +var _ SearchJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediaconvert/api_op_TagResource.go b/service/mediaconvert/api_op_TagResource.go index aacbf802f81..1496b477521 100644 --- a/service/mediaconvert/api_op_TagResource.go +++ b/service/mediaconvert/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_UntagResource.go b/service/mediaconvert/api_op_UntagResource.go index 380b0f2888a..bd1e0389af6 100644 --- a/service/mediaconvert/api_op_UntagResource.go +++ b/service/mediaconvert/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_UpdateJobTemplate.go b/service/mediaconvert/api_op_UpdateJobTemplate.go index 4487aa188a7..6e5f77298d5 100644 --- a/service/mediaconvert/api_op_UpdateJobTemplate.go +++ b/service/mediaconvert/api_op_UpdateJobTemplate.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateJobTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_UpdatePreset.go b/service/mediaconvert/api_op_UpdatePreset.go index 5853de92972..4123b3f9f97 100644 --- a/service/mediaconvert/api_op_UpdatePreset.go +++ b/service/mediaconvert/api_op_UpdatePreset.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdatePresetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePresetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediaconvert/api_op_UpdateQueue.go b/service/mediaconvert/api_op_UpdateQueue.go index 22942e1c18b..48b639a4bbd 100644 --- a/service/mediaconvert/api_op_UpdateQueue.go +++ b/service/mediaconvert/api_op_UpdateQueue.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_client.go b/service/medialive/api_client.go index c9804a82a3e..6970c12c2e5 100644 --- a/service/medialive/api_client.go +++ b/service/medialive/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/medialive/api_op_AcceptInputDeviceTransfer.go b/service/medialive/api_op_AcceptInputDeviceTransfer.go index 5903d25a9d2..a6c65f9270b 100644 --- a/service/medialive/api_op_AcceptInputDeviceTransfer.go +++ b/service/medialive/api_op_AcceptInputDeviceTransfer.go @@ -104,6 +104,9 @@ func (c *Client) addOperationAcceptInputDeviceTransferMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInputDeviceTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_BatchDelete.go b/service/medialive/api_op_BatchDelete.go index e8255987932..4582ae253c7 100644 --- a/service/medialive/api_op_BatchDelete.go +++ b/service/medialive/api_op_BatchDelete.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchDeleteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchDelete(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_BatchStart.go b/service/medialive/api_op_BatchStart.go index f1b8a52bf34..19be8b3efdf 100644 --- a/service/medialive/api_op_BatchStart.go +++ b/service/medialive/api_op_BatchStart.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchStartMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchStart(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_BatchStop.go b/service/medialive/api_op_BatchStop.go index 0f009304371..33cdeb4ee79 100644 --- a/service/medialive/api_op_BatchStop.go +++ b/service/medialive/api_op_BatchStop.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchStopMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchStop(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_BatchUpdateSchedule.go b/service/medialive/api_op_BatchUpdateSchedule.go index 9b6570c5eef..165f54f62c7 100644 --- a/service/medialive/api_op_BatchUpdateSchedule.go +++ b/service/medialive/api_op_BatchUpdateSchedule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchUpdateScheduleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_CancelInputDeviceTransfer.go b/service/medialive/api_op_CancelInputDeviceTransfer.go index 0fb969fd067..cfd215fbe5e 100644 --- a/service/medialive/api_op_CancelInputDeviceTransfer.go +++ b/service/medialive/api_op_CancelInputDeviceTransfer.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCancelInputDeviceTransferMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelInputDeviceTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_ClaimDevice.go b/service/medialive/api_op_ClaimDevice.go index c79f3ce9b2c..658b49421a0 100644 --- a/service/medialive/api_op_ClaimDevice.go +++ b/service/medialive/api_op_ClaimDevice.go @@ -103,6 +103,9 @@ func (c *Client) addOperationClaimDeviceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opClaimDevice(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_CreateChannel.go b/service/medialive/api_op_CreateChannel.go index 86030a5677b..4b1b0255d06 100644 --- a/service/medialive/api_op_CreateChannel.go +++ b/service/medialive/api_op_CreateChannel.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChannelMiddleware(stack, options); err != nil { return err } diff --git a/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go b/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go index 67d0bd7596b..e2c062c2c6f 100644 --- a/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go +++ b/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go @@ -227,6 +227,9 @@ func (c *Client) addOperationCreateCloudWatchAlarmTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go index 048fb6e05a7..2912e50a1d8 100644 --- a/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go +++ b/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateCloudWatchAlarmTemplateGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_CreateEventBridgeRuleTemplate.go b/service/medialive/api_op_CreateEventBridgeRuleTemplate.go index 808d8b0ab9a..6894fca8ef9 100644 --- a/service/medialive/api_op_CreateEventBridgeRuleTemplate.go +++ b/service/medialive/api_op_CreateEventBridgeRuleTemplate.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateEventBridgeRuleTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go index a2fd9259a2c..e2dc369d29d 100644 --- a/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go +++ b/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateEventBridgeRuleTemplateGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_CreateInput.go b/service/medialive/api_op_CreateInput.go index 63f225f5957..ab3131d72cc 100644 --- a/service/medialive/api_op_CreateInput.go +++ b/service/medialive/api_op_CreateInput.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateInputMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateInputMiddleware(stack, options); err != nil { return err } diff --git a/service/medialive/api_op_CreateInputSecurityGroup.go b/service/medialive/api_op_CreateInputSecurityGroup.go index 16e8df6f946..ce9c92a3467 100644 --- a/service/medialive/api_op_CreateInputSecurityGroup.go +++ b/service/medialive/api_op_CreateInputSecurityGroup.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateInputSecurityGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInputSecurityGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_CreateMultiplex.go b/service/medialive/api_op_CreateMultiplex.go index 58ac909d51b..f19d237e16e 100644 --- a/service/medialive/api_op_CreateMultiplex.go +++ b/service/medialive/api_op_CreateMultiplex.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateMultiplexMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMultiplexMiddleware(stack, options); err != nil { return err } diff --git a/service/medialive/api_op_CreateMultiplexProgram.go b/service/medialive/api_op_CreateMultiplexProgram.go index cfddad7fdda..09dd52828cc 100644 --- a/service/medialive/api_op_CreateMultiplexProgram.go +++ b/service/medialive/api_op_CreateMultiplexProgram.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateMultiplexProgramMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMultiplexProgramMiddleware(stack, options); err != nil { return err } diff --git a/service/medialive/api_op_CreatePartnerInput.go b/service/medialive/api_op_CreatePartnerInput.go index fa5e215370c..6bd2623ca10 100644 --- a/service/medialive/api_op_CreatePartnerInput.go +++ b/service/medialive/api_op_CreatePartnerInput.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreatePartnerInputMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePartnerInputMiddleware(stack, options); err != nil { return err } diff --git a/service/medialive/api_op_CreateSignalMap.go b/service/medialive/api_op_CreateSignalMap.go index 5b34d1d4acc..730d2685993 100644 --- a/service/medialive/api_op_CreateSignalMap.go +++ b/service/medialive/api_op_CreateSignalMap.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateSignalMapMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSignalMapValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_CreateTags.go b/service/medialive/api_op_CreateTags.go index c05b24819c6..a61ddea0780 100644 --- a/service/medialive/api_op_CreateTags.go +++ b/service/medialive/api_op_CreateTags.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteChannel.go b/service/medialive/api_op_DeleteChannel.go index b56e005b7da..068bc8e428d 100644 --- a/service/medialive/api_op_DeleteChannel.go +++ b/service/medialive/api_op_DeleteChannel.go @@ -162,6 +162,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go b/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go index f33933297f6..8d419102b12 100644 --- a/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go +++ b/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteCloudWatchAlarmTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go index 72b59643ed5..cb30abe932b 100644 --- a/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go +++ b/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteCloudWatchAlarmTemplateGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go b/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go index c463a657ba0..dd1a7945801 100644 --- a/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go +++ b/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteEventBridgeRuleTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go index 791b3374b11..67b3c704c52 100644 --- a/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go +++ b/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteEventBridgeRuleTemplateGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteInput.go b/service/medialive/api_op_DeleteInput.go index c064edb0310..6882c9c259b 100644 --- a/service/medialive/api_op_DeleteInput.go +++ b/service/medialive/api_op_DeleteInput.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteInputMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteInputSecurityGroup.go b/service/medialive/api_op_DeleteInputSecurityGroup.go index 0400ee5a818..b4a602a9731 100644 --- a/service/medialive/api_op_DeleteInputSecurityGroup.go +++ b/service/medialive/api_op_DeleteInputSecurityGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteInputSecurityGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInputSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteMultiplex.go b/service/medialive/api_op_DeleteMultiplex.go index 3086146b723..7e7eac1b2d9 100644 --- a/service/medialive/api_op_DeleteMultiplex.go +++ b/service/medialive/api_op_DeleteMultiplex.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteMultiplexMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMultiplexValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteMultiplexProgram.go b/service/medialive/api_op_DeleteMultiplexProgram.go index 825a1bd857a..7e5b038d646 100644 --- a/service/medialive/api_op_DeleteMultiplexProgram.go +++ b/service/medialive/api_op_DeleteMultiplexProgram.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteMultiplexProgramMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMultiplexProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteReservation.go b/service/medialive/api_op_DeleteReservation.go index 1d7845c7f40..874916d3083 100644 --- a/service/medialive/api_op_DeleteReservation.go +++ b/service/medialive/api_op_DeleteReservation.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDeleteReservationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteSchedule.go b/service/medialive/api_op_DeleteSchedule.go index 8c46c20be98..d9f129080ff 100644 --- a/service/medialive/api_op_DeleteSchedule.go +++ b/service/medialive/api_op_DeleteSchedule.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteSignalMap.go b/service/medialive/api_op_DeleteSignalMap.go index ea1a2fa38a1..c34d87bd935 100644 --- a/service/medialive/api_op_DeleteSignalMap.go +++ b/service/medialive/api_op_DeleteSignalMap.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteSignalMapMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSignalMapValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DeleteTags.go b/service/medialive/api_op_DeleteTags.go index 48de57d4685..2d6c734a165 100644 --- a/service/medialive/api_op_DeleteTags.go +++ b/service/medialive/api_op_DeleteTags.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeAccountConfiguration.go b/service/medialive/api_op_DescribeAccountConfiguration.go index 6751e603c51..e343cf43164 100644 --- a/service/medialive/api_op_DescribeAccountConfiguration.go +++ b/service/medialive/api_op_DescribeAccountConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDescribeAccountConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_DescribeChannel.go b/service/medialive/api_op_DescribeChannel.go index 5a2467f5c42..8ac40de2ca6 100644 --- a/service/medialive/api_op_DescribeChannel.go +++ b/service/medialive/api_op_DescribeChannel.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { return err } @@ -191,14 +194,6 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, return nil } -// DescribeChannelAPIClient is a client that implements the DescribeChannel -// operation. -type DescribeChannelAPIClient interface { - DescribeChannel(context.Context, *DescribeChannelInput, ...func(*Options)) (*DescribeChannelOutput, error) -} - -var _ DescribeChannelAPIClient = (*Client)(nil) - // ChannelCreatedWaiterOptions are waiter options for ChannelCreatedWaiter type ChannelCreatedWaiterOptions struct { @@ -314,7 +309,13 @@ func (w *ChannelCreatedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeChannel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -528,7 +529,13 @@ func (w *ChannelDeletedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeChannel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -725,7 +732,13 @@ func (w *ChannelRunningWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeChannel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -922,7 +935,13 @@ func (w *ChannelStoppedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeChannel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1004,6 +1023,14 @@ func channelStoppedStateRetryable(ctx context.Context, input *DescribeChannelInp return true, nil } +// DescribeChannelAPIClient is a client that implements the DescribeChannel +// operation. +type DescribeChannelAPIClient interface { + DescribeChannel(context.Context, *DescribeChannelInput, ...func(*Options)) (*DescribeChannelOutput, error) +} + +var _ DescribeChannelAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_DescribeInput.go b/service/medialive/api_op_DescribeInput.go index 1e01968cf20..54cbd889dea 100644 --- a/service/medialive/api_op_DescribeInput.go +++ b/service/medialive/api_op_DescribeInput.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDescribeInputMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInputValidationMiddleware(stack); err != nil { return err } @@ -192,13 +195,6 @@ func (c *Client) addOperationDescribeInputMiddlewares(stack *middleware.Stack, o return nil } -// DescribeInputAPIClient is a client that implements the DescribeInput operation. -type DescribeInputAPIClient interface { - DescribeInput(context.Context, *DescribeInputInput, ...func(*Options)) (*DescribeInputOutput, error) -} - -var _ DescribeInputAPIClient = (*Client)(nil) - // InputAttachedWaiterOptions are waiter options for InputAttachedWaiter type InputAttachedWaiterOptions struct { @@ -314,7 +310,13 @@ func (w *InputAttachedWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeInput(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -510,7 +512,13 @@ func (w *InputDeletedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeInput(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -707,7 +715,13 @@ func (w *InputDetachedWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeInput(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -806,6 +820,13 @@ func inputDetachedStateRetryable(ctx context.Context, input *DescribeInputInput, return true, nil } +// DescribeInputAPIClient is a client that implements the DescribeInput operation. +type DescribeInputAPIClient interface { + DescribeInput(context.Context, *DescribeInputInput, ...func(*Options)) (*DescribeInputOutput, error) +} + +var _ DescribeInputAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInput(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_DescribeInputDevice.go b/service/medialive/api_op_DescribeInputDevice.go index 12ab67554b6..5c221afce8a 100644 --- a/service/medialive/api_op_DescribeInputDevice.go +++ b/service/medialive/api_op_DescribeInputDevice.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeInputDeviceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInputDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeInputDeviceThumbnail.go b/service/medialive/api_op_DescribeInputDeviceThumbnail.go index 20892c84b6b..9be26c731e7 100644 --- a/service/medialive/api_op_DescribeInputDeviceThumbnail.go +++ b/service/medialive/api_op_DescribeInputDeviceThumbnail.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeInputDeviceThumbnailMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInputDeviceThumbnailValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeInputSecurityGroup.go b/service/medialive/api_op_DescribeInputSecurityGroup.go index 6b323e29832..a7109948397 100644 --- a/service/medialive/api_op_DescribeInputSecurityGroup.go +++ b/service/medialive/api_op_DescribeInputSecurityGroup.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeInputSecurityGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInputSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeMultiplex.go b/service/medialive/api_op_DescribeMultiplex.go index bba58061ecf..0e855fe46cd 100644 --- a/service/medialive/api_op_DescribeMultiplex.go +++ b/service/medialive/api_op_DescribeMultiplex.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeMultiplexMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMultiplexValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeMultiplexMiddlewares(stack *middleware.Stac return nil } -// DescribeMultiplexAPIClient is a client that implements the DescribeMultiplex -// operation. -type DescribeMultiplexAPIClient interface { - DescribeMultiplex(context.Context, *DescribeMultiplexInput, ...func(*Options)) (*DescribeMultiplexOutput, error) -} - -var _ DescribeMultiplexAPIClient = (*Client)(nil) - // MultiplexCreatedWaiterOptions are waiter options for MultiplexCreatedWaiter type MultiplexCreatedWaiterOptions struct { @@ -287,7 +282,13 @@ func (w *MultiplexCreatedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeMultiplex(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -501,7 +502,13 @@ func (w *MultiplexDeletedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeMultiplex(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -698,7 +705,13 @@ func (w *MultiplexRunningWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeMultiplex(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -895,7 +908,13 @@ func (w *MultiplexStoppedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeMultiplex(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -977,6 +996,14 @@ func multiplexStoppedStateRetryable(ctx context.Context, input *DescribeMultiple return true, nil } +// DescribeMultiplexAPIClient is a client that implements the DescribeMultiplex +// operation. +type DescribeMultiplexAPIClient interface { + DescribeMultiplex(context.Context, *DescribeMultiplexInput, ...func(*Options)) (*DescribeMultiplexOutput, error) +} + +var _ DescribeMultiplexAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMultiplex(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_DescribeMultiplexProgram.go b/service/medialive/api_op_DescribeMultiplexProgram.go index 6b229ee34ae..68f3572a1d3 100644 --- a/service/medialive/api_op_DescribeMultiplexProgram.go +++ b/service/medialive/api_op_DescribeMultiplexProgram.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeMultiplexProgramMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMultiplexProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeOffering.go b/service/medialive/api_op_DescribeOffering.go index 08a4c207347..c5c79ce27bc 100644 --- a/service/medialive/api_op_DescribeOffering.go +++ b/service/medialive/api_op_DescribeOffering.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeOfferingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeReservation.go b/service/medialive/api_op_DescribeReservation.go index a5f962a4557..f04c199692f 100644 --- a/service/medialive/api_op_DescribeReservation.go +++ b/service/medialive/api_op_DescribeReservation.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeReservationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_DescribeSchedule.go b/service/medialive/api_op_DescribeSchedule.go index 6c34cc0f2df..3d6cec84d87 100644 --- a/service/medialive/api_op_DescribeSchedule.go +++ b/service/medialive/api_op_DescribeSchedule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeScheduleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduleValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeScheduleMiddlewares(stack *middleware.Stack return nil } -// DescribeScheduleAPIClient is a client that implements the DescribeSchedule -// operation. -type DescribeScheduleAPIClient interface { - DescribeSchedule(context.Context, *DescribeScheduleInput, ...func(*Options)) (*DescribeScheduleOutput, error) -} - -var _ DescribeScheduleAPIClient = (*Client)(nil) - // DescribeSchedulePaginatorOptions is the paginator options for DescribeSchedule type DescribeSchedulePaginatorOptions struct { // Placeholder documentation for MaxResults @@ -212,6 +207,9 @@ func (p *DescribeSchedulePaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSchedule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribeSchedulePaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeScheduleAPIClient is a client that implements the DescribeSchedule +// operation. +type DescribeScheduleAPIClient interface { + DescribeSchedule(context.Context, *DescribeScheduleInput, ...func(*Options)) (*DescribeScheduleOutput, error) +} + +var _ DescribeScheduleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSchedule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_DescribeThumbnails.go b/service/medialive/api_op_DescribeThumbnails.go index c47521cc247..a2cb52a69dc 100644 --- a/service/medialive/api_op_DescribeThumbnails.go +++ b/service/medialive/api_op_DescribeThumbnails.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeThumbnailsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThumbnailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_GetCloudWatchAlarmTemplate.go b/service/medialive/api_op_GetCloudWatchAlarmTemplate.go index cb277bfdcd1..032c97b892f 100644 --- a/service/medialive/api_op_GetCloudWatchAlarmTemplate.go +++ b/service/medialive/api_op_GetCloudWatchAlarmTemplate.go @@ -166,6 +166,9 @@ func (c *Client) addOperationGetCloudWatchAlarmTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go index 3d0cffbeb68..5a53991ece8 100644 --- a/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go +++ b/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetCloudWatchAlarmTemplateGroupMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_GetEventBridgeRuleTemplate.go b/service/medialive/api_op_GetEventBridgeRuleTemplate.go index de8a20ec9fc..47d8df31cb3 100644 --- a/service/medialive/api_op_GetEventBridgeRuleTemplate.go +++ b/service/medialive/api_op_GetEventBridgeRuleTemplate.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetEventBridgeRuleTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go index 87c30b2031c..1f99019494f 100644 --- a/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go +++ b/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetEventBridgeRuleTemplateGroupMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_GetSignalMap.go b/service/medialive/api_op_GetSignalMap.go index fa60970ca03..fc286a99fce 100644 --- a/service/medialive/api_op_GetSignalMap.go +++ b/service/medialive/api_op_GetSignalMap.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetSignalMapMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSignalMapValidationMiddleware(stack); err != nil { return err } @@ -191,13 +194,6 @@ func (c *Client) addOperationGetSignalMapMiddlewares(stack *middleware.Stack, op return nil } -// GetSignalMapAPIClient is a client that implements the GetSignalMap operation. -type GetSignalMapAPIClient interface { - GetSignalMap(context.Context, *GetSignalMapInput, ...func(*Options)) (*GetSignalMapOutput, error) -} - -var _ GetSignalMapAPIClient = (*Client)(nil) - // SignalMapCreatedWaiterOptions are waiter options for SignalMapCreatedWaiter type SignalMapCreatedWaiterOptions struct { @@ -313,7 +309,13 @@ func (w *SignalMapCreatedWaiter) WaitForOutput(ctx context.Context, params *GetS } out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -522,7 +524,13 @@ func (w *SignalMapMonitorDeletedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -731,7 +739,13 @@ func (w *SignalMapMonitorDeployedWaiter) WaitForOutput(ctx context.Context, para } out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -989,7 +1003,13 @@ func (w *SignalMapUpdatedWaiter) WaitForOutput(ctx context.Context, params *GetS } out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1098,6 +1118,13 @@ func signalMapUpdatedStateRetryable(ctx context.Context, input *GetSignalMapInpu return true, nil } +// GetSignalMapAPIClient is a client that implements the GetSignalMap operation. +type GetSignalMapAPIClient interface { + GetSignalMap(context.Context, *GetSignalMapInput, ...func(*Options)) (*GetSignalMapOutput, error) +} + +var _ GetSignalMapAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSignalMap(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListChannels.go b/service/medialive/api_op_ListChannels.go index 53332c1351b..5531ebf3c9f 100644 --- a/service/medialive/api_op_ListChannels.go +++ b/service/medialive/api_op_ListChannels.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } @@ -133,13 +136,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // Placeholder documentation for MaxResults @@ -203,6 +199,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go b/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go index 5050076e0ed..0ce94f07d95 100644 --- a/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go +++ b/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListCloudWatchAlarmTemplateGroupsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCloudWatchAlarmTemplateGroups(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListCloudWatchAlarmTemplateGroupsMiddlewares(stack return nil } -// ListCloudWatchAlarmTemplateGroupsAPIClient is a client that implements the -// ListCloudWatchAlarmTemplateGroups operation. -type ListCloudWatchAlarmTemplateGroupsAPIClient interface { - ListCloudWatchAlarmTemplateGroups(context.Context, *ListCloudWatchAlarmTemplateGroupsInput, ...func(*Options)) (*ListCloudWatchAlarmTemplateGroupsOutput, error) -} - -var _ ListCloudWatchAlarmTemplateGroupsAPIClient = (*Client)(nil) - // ListCloudWatchAlarmTemplateGroupsPaginatorOptions is the paginator options for // ListCloudWatchAlarmTemplateGroups type ListCloudWatchAlarmTemplateGroupsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListCloudWatchAlarmTemplateGroupsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCloudWatchAlarmTemplateGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListCloudWatchAlarmTemplateGroupsPaginator) NextPage(ctx context.Contex return result, nil } +// ListCloudWatchAlarmTemplateGroupsAPIClient is a client that implements the +// ListCloudWatchAlarmTemplateGroups operation. +type ListCloudWatchAlarmTemplateGroupsAPIClient interface { + ListCloudWatchAlarmTemplateGroups(context.Context, *ListCloudWatchAlarmTemplateGroupsInput, ...func(*Options)) (*ListCloudWatchAlarmTemplateGroupsOutput, error) +} + +var _ ListCloudWatchAlarmTemplateGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCloudWatchAlarmTemplateGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListCloudWatchAlarmTemplates.go b/service/medialive/api_op_ListCloudWatchAlarmTemplates.go index 87cf253a10c..1118293babd 100644 --- a/service/medialive/api_op_ListCloudWatchAlarmTemplates.go +++ b/service/medialive/api_op_ListCloudWatchAlarmTemplates.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListCloudWatchAlarmTemplatesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCloudWatchAlarmTemplates(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListCloudWatchAlarmTemplatesMiddlewares(stack *midd return nil } -// ListCloudWatchAlarmTemplatesAPIClient is a client that implements the -// ListCloudWatchAlarmTemplates operation. -type ListCloudWatchAlarmTemplatesAPIClient interface { - ListCloudWatchAlarmTemplates(context.Context, *ListCloudWatchAlarmTemplatesInput, ...func(*Options)) (*ListCloudWatchAlarmTemplatesOutput, error) -} - -var _ ListCloudWatchAlarmTemplatesAPIClient = (*Client)(nil) - // ListCloudWatchAlarmTemplatesPaginatorOptions is the paginator options for // ListCloudWatchAlarmTemplates type ListCloudWatchAlarmTemplatesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListCloudWatchAlarmTemplatesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCloudWatchAlarmTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListCloudWatchAlarmTemplatesPaginator) NextPage(ctx context.Context, op return result, nil } +// ListCloudWatchAlarmTemplatesAPIClient is a client that implements the +// ListCloudWatchAlarmTemplates operation. +type ListCloudWatchAlarmTemplatesAPIClient interface { + ListCloudWatchAlarmTemplates(context.Context, *ListCloudWatchAlarmTemplatesInput, ...func(*Options)) (*ListCloudWatchAlarmTemplatesOutput, error) +} + +var _ ListCloudWatchAlarmTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCloudWatchAlarmTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go b/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go index c6f1d256716..bfff5622bfc 100644 --- a/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go +++ b/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEventBridgeRuleTemplateGroupsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventBridgeRuleTemplateGroups(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEventBridgeRuleTemplateGroupsMiddlewares(stack return nil } -// ListEventBridgeRuleTemplateGroupsAPIClient is a client that implements the -// ListEventBridgeRuleTemplateGroups operation. -type ListEventBridgeRuleTemplateGroupsAPIClient interface { - ListEventBridgeRuleTemplateGroups(context.Context, *ListEventBridgeRuleTemplateGroupsInput, ...func(*Options)) (*ListEventBridgeRuleTemplateGroupsOutput, error) -} - -var _ ListEventBridgeRuleTemplateGroupsAPIClient = (*Client)(nil) - // ListEventBridgeRuleTemplateGroupsPaginatorOptions is the paginator options for // ListEventBridgeRuleTemplateGroups type ListEventBridgeRuleTemplateGroupsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListEventBridgeRuleTemplateGroupsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventBridgeRuleTemplateGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListEventBridgeRuleTemplateGroupsPaginator) NextPage(ctx context.Contex return result, nil } +// ListEventBridgeRuleTemplateGroupsAPIClient is a client that implements the +// ListEventBridgeRuleTemplateGroups operation. +type ListEventBridgeRuleTemplateGroupsAPIClient interface { + ListEventBridgeRuleTemplateGroups(context.Context, *ListEventBridgeRuleTemplateGroupsInput, ...func(*Options)) (*ListEventBridgeRuleTemplateGroupsOutput, error) +} + +var _ ListEventBridgeRuleTemplateGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventBridgeRuleTemplateGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListEventBridgeRuleTemplates.go b/service/medialive/api_op_ListEventBridgeRuleTemplates.go index c8039ca476b..16996f2b9b4 100644 --- a/service/medialive/api_op_ListEventBridgeRuleTemplates.go +++ b/service/medialive/api_op_ListEventBridgeRuleTemplates.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListEventBridgeRuleTemplatesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventBridgeRuleTemplates(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListEventBridgeRuleTemplatesMiddlewares(stack *midd return nil } -// ListEventBridgeRuleTemplatesAPIClient is a client that implements the -// ListEventBridgeRuleTemplates operation. -type ListEventBridgeRuleTemplatesAPIClient interface { - ListEventBridgeRuleTemplates(context.Context, *ListEventBridgeRuleTemplatesInput, ...func(*Options)) (*ListEventBridgeRuleTemplatesOutput, error) -} - -var _ ListEventBridgeRuleTemplatesAPIClient = (*Client)(nil) - // ListEventBridgeRuleTemplatesPaginatorOptions is the paginator options for // ListEventBridgeRuleTemplates type ListEventBridgeRuleTemplatesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListEventBridgeRuleTemplatesPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventBridgeRuleTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEventBridgeRuleTemplatesPaginator) NextPage(ctx context.Context, op return result, nil } +// ListEventBridgeRuleTemplatesAPIClient is a client that implements the +// ListEventBridgeRuleTemplates operation. +type ListEventBridgeRuleTemplatesAPIClient interface { + ListEventBridgeRuleTemplates(context.Context, *ListEventBridgeRuleTemplatesInput, ...func(*Options)) (*ListEventBridgeRuleTemplatesOutput, error) +} + +var _ ListEventBridgeRuleTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventBridgeRuleTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListInputDeviceTransfers.go b/service/medialive/api_op_ListInputDeviceTransfers.go index 5ba357a2707..a9a2c4cf7fd 100644 --- a/service/medialive/api_op_ListInputDeviceTransfers.go +++ b/service/medialive/api_op_ListInputDeviceTransfers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListInputDeviceTransfersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInputDeviceTransfersValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListInputDeviceTransfersMiddlewares(stack *middlewa return nil } -// ListInputDeviceTransfersAPIClient is a client that implements the -// ListInputDeviceTransfers operation. -type ListInputDeviceTransfersAPIClient interface { - ListInputDeviceTransfers(context.Context, *ListInputDeviceTransfersInput, ...func(*Options)) (*ListInputDeviceTransfersOutput, error) -} - -var _ ListInputDeviceTransfersAPIClient = (*Client)(nil) - // ListInputDeviceTransfersPaginatorOptions is the paginator options for // ListInputDeviceTransfers type ListInputDeviceTransfersPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListInputDeviceTransfersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInputDeviceTransfers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListInputDeviceTransfersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInputDeviceTransfersAPIClient is a client that implements the +// ListInputDeviceTransfers operation. +type ListInputDeviceTransfersAPIClient interface { + ListInputDeviceTransfers(context.Context, *ListInputDeviceTransfersInput, ...func(*Options)) (*ListInputDeviceTransfersOutput, error) +} + +var _ ListInputDeviceTransfersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInputDeviceTransfers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListInputDevices.go b/service/medialive/api_op_ListInputDevices.go index c153050a46d..88ce538f3ec 100644 --- a/service/medialive/api_op_ListInputDevices.go +++ b/service/medialive/api_op_ListInputDevices.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListInputDevicesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInputDevices(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListInputDevicesMiddlewares(stack *middleware.Stack return nil } -// ListInputDevicesAPIClient is a client that implements the ListInputDevices -// operation. -type ListInputDevicesAPIClient interface { - ListInputDevices(context.Context, *ListInputDevicesInput, ...func(*Options)) (*ListInputDevicesOutput, error) -} - -var _ ListInputDevicesAPIClient = (*Client)(nil) - // ListInputDevicesPaginatorOptions is the paginator options for ListInputDevices type ListInputDevicesPaginatorOptions struct { // Placeholder documentation for MaxResults @@ -204,6 +199,9 @@ func (p *ListInputDevicesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInputDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListInputDevicesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListInputDevicesAPIClient is a client that implements the ListInputDevices +// operation. +type ListInputDevicesAPIClient interface { + ListInputDevices(context.Context, *ListInputDevicesInput, ...func(*Options)) (*ListInputDevicesOutput, error) +} + +var _ ListInputDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInputDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListInputSecurityGroups.go b/service/medialive/api_op_ListInputSecurityGroups.go index e23823af4b9..e74b05960b4 100644 --- a/service/medialive/api_op_ListInputSecurityGroups.go +++ b/service/medialive/api_op_ListInputSecurityGroups.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListInputSecurityGroupsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInputSecurityGroups(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListInputSecurityGroupsMiddlewares(stack *middlewar return nil } -// ListInputSecurityGroupsAPIClient is a client that implements the -// ListInputSecurityGroups operation. -type ListInputSecurityGroupsAPIClient interface { - ListInputSecurityGroups(context.Context, *ListInputSecurityGroupsInput, ...func(*Options)) (*ListInputSecurityGroupsOutput, error) -} - -var _ ListInputSecurityGroupsAPIClient = (*Client)(nil) - // ListInputSecurityGroupsPaginatorOptions is the paginator options for // ListInputSecurityGroups type ListInputSecurityGroupsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListInputSecurityGroupsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInputSecurityGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListInputSecurityGroupsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInputSecurityGroupsAPIClient is a client that implements the +// ListInputSecurityGroups operation. +type ListInputSecurityGroupsAPIClient interface { + ListInputSecurityGroups(context.Context, *ListInputSecurityGroupsInput, ...func(*Options)) (*ListInputSecurityGroupsOutput, error) +} + +var _ ListInputSecurityGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInputSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListInputs.go b/service/medialive/api_op_ListInputs.go index 5e408ae50e5..0141841aa41 100644 --- a/service/medialive/api_op_ListInputs.go +++ b/service/medialive/api_op_ListInputs.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListInputsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInputs(options.Region), middleware.Before); err != nil { return err } @@ -133,13 +136,6 @@ func (c *Client) addOperationListInputsMiddlewares(stack *middleware.Stack, opti return nil } -// ListInputsAPIClient is a client that implements the ListInputs operation. -type ListInputsAPIClient interface { - ListInputs(context.Context, *ListInputsInput, ...func(*Options)) (*ListInputsOutput, error) -} - -var _ ListInputsAPIClient = (*Client)(nil) - // ListInputsPaginatorOptions is the paginator options for ListInputs type ListInputsPaginatorOptions struct { // Placeholder documentation for MaxResults @@ -203,6 +199,9 @@ func (p *ListInputsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListInputsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListInputsAPIClient is a client that implements the ListInputs operation. +type ListInputsAPIClient interface { + ListInputs(context.Context, *ListInputsInput, ...func(*Options)) (*ListInputsOutput, error) +} + +var _ ListInputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListMultiplexPrograms.go b/service/medialive/api_op_ListMultiplexPrograms.go index 488a22f7944..d3380a28500 100644 --- a/service/medialive/api_op_ListMultiplexPrograms.go +++ b/service/medialive/api_op_ListMultiplexPrograms.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListMultiplexProgramsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMultiplexProgramsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListMultiplexProgramsMiddlewares(stack *middleware. return nil } -// ListMultiplexProgramsAPIClient is a client that implements the -// ListMultiplexPrograms operation. -type ListMultiplexProgramsAPIClient interface { - ListMultiplexPrograms(context.Context, *ListMultiplexProgramsInput, ...func(*Options)) (*ListMultiplexProgramsOutput, error) -} - -var _ ListMultiplexProgramsAPIClient = (*Client)(nil) - // ListMultiplexProgramsPaginatorOptions is the paginator options for // ListMultiplexPrograms type ListMultiplexProgramsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListMultiplexProgramsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMultiplexPrograms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListMultiplexProgramsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListMultiplexProgramsAPIClient is a client that implements the +// ListMultiplexPrograms operation. +type ListMultiplexProgramsAPIClient interface { + ListMultiplexPrograms(context.Context, *ListMultiplexProgramsInput, ...func(*Options)) (*ListMultiplexProgramsOutput, error) +} + +var _ ListMultiplexProgramsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMultiplexPrograms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListMultiplexes.go b/service/medialive/api_op_ListMultiplexes.go index 8bd7710ce57..afcba196cbc 100644 --- a/service/medialive/api_op_ListMultiplexes.go +++ b/service/medialive/api_op_ListMultiplexes.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListMultiplexesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMultiplexes(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListMultiplexesMiddlewares(stack *middleware.Stack, return nil } -// ListMultiplexesAPIClient is a client that implements the ListMultiplexes -// operation. -type ListMultiplexesAPIClient interface { - ListMultiplexes(context.Context, *ListMultiplexesInput, ...func(*Options)) (*ListMultiplexesOutput, error) -} - -var _ ListMultiplexesAPIClient = (*Client)(nil) - // ListMultiplexesPaginatorOptions is the paginator options for ListMultiplexes type ListMultiplexesPaginatorOptions struct { // The maximum number of items to return. @@ -204,6 +199,9 @@ func (p *ListMultiplexesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMultiplexes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListMultiplexesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListMultiplexesAPIClient is a client that implements the ListMultiplexes +// operation. +type ListMultiplexesAPIClient interface { + ListMultiplexes(context.Context, *ListMultiplexesInput, ...func(*Options)) (*ListMultiplexesOutput, error) +} + +var _ ListMultiplexesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMultiplexes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListOfferings.go b/service/medialive/api_op_ListOfferings.go index bce9b66c7bc..aecdfed1cd1 100644 --- a/service/medialive/api_op_ListOfferings.go +++ b/service/medialive/api_op_ListOfferings.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListOfferingsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOfferings(options.Region), middleware.Before); err != nil { return err } @@ -164,13 +167,6 @@ func (c *Client) addOperationListOfferingsMiddlewares(stack *middleware.Stack, o return nil } -// ListOfferingsAPIClient is a client that implements the ListOfferings operation. -type ListOfferingsAPIClient interface { - ListOfferings(context.Context, *ListOfferingsInput, ...func(*Options)) (*ListOfferingsOutput, error) -} - -var _ ListOfferingsAPIClient = (*Client)(nil) - // ListOfferingsPaginatorOptions is the paginator options for ListOfferings type ListOfferingsPaginatorOptions struct { // Placeholder documentation for MaxResults @@ -234,6 +230,9 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +252,13 @@ func (p *ListOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListOfferingsAPIClient is a client that implements the ListOfferings operation. +type ListOfferingsAPIClient interface { + ListOfferings(context.Context, *ListOfferingsInput, ...func(*Options)) (*ListOfferingsOutput, error) +} + +var _ ListOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListReservations.go b/service/medialive/api_op_ListReservations.go index ee99416b660..94aa9ff0aa0 100644 --- a/service/medialive/api_op_ListReservations.go +++ b/service/medialive/api_op_ListReservations.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListReservationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReservations(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListReservationsMiddlewares(stack *middleware.Stack return nil } -// ListReservationsAPIClient is a client that implements the ListReservations -// operation. -type ListReservationsAPIClient interface { - ListReservations(context.Context, *ListReservationsInput, ...func(*Options)) (*ListReservationsOutput, error) -} - -var _ ListReservationsAPIClient = (*Client)(nil) - // ListReservationsPaginatorOptions is the paginator options for ListReservations type ListReservationsPaginatorOptions struct { // Placeholder documentation for MaxResults @@ -228,6 +223,9 @@ func (p *ListReservationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReservations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListReservationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListReservationsAPIClient is a client that implements the ListReservations +// operation. +type ListReservationsAPIClient interface { + ListReservations(context.Context, *ListReservationsInput, ...func(*Options)) (*ListReservationsOutput, error) +} + +var _ ListReservationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReservations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListSignalMaps.go b/service/medialive/api_op_ListSignalMaps.go index 74d82d0a150..e1940cf7f01 100644 --- a/service/medialive/api_op_ListSignalMaps.go +++ b/service/medialive/api_op_ListSignalMaps.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListSignalMapsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSignalMaps(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListSignalMapsMiddlewares(stack *middleware.Stack, return nil } -// ListSignalMapsAPIClient is a client that implements the ListSignalMaps -// operation. -type ListSignalMapsAPIClient interface { - ListSignalMaps(context.Context, *ListSignalMapsInput, ...func(*Options)) (*ListSignalMapsOutput, error) -} - -var _ ListSignalMapsAPIClient = (*Client)(nil) - // ListSignalMapsPaginatorOptions is the paginator options for ListSignalMaps type ListSignalMapsPaginatorOptions struct { // Placeholder documentation for MaxResults @@ -212,6 +207,9 @@ func (p *ListSignalMapsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSignalMaps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListSignalMapsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListSignalMapsAPIClient is a client that implements the ListSignalMaps +// operation. +type ListSignalMapsAPIClient interface { + ListSignalMaps(context.Context, *ListSignalMapsInput, ...func(*Options)) (*ListSignalMapsOutput, error) +} + +var _ ListSignalMapsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSignalMaps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medialive/api_op_ListTagsForResource.go b/service/medialive/api_op_ListTagsForResource.go index 94f2c69e1c5..54a4019d70d 100644 --- a/service/medialive/api_op_ListTagsForResource.go +++ b/service/medialive/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_PurchaseOffering.go b/service/medialive/api_op_PurchaseOffering.go index 0849bd5a743..2eb3387a870 100644 --- a/service/medialive/api_op_PurchaseOffering.go +++ b/service/medialive/api_op_PurchaseOffering.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPurchaseOfferingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPurchaseOfferingMiddleware(stack, options); err != nil { return err } diff --git a/service/medialive/api_op_RebootInputDevice.go b/service/medialive/api_op_RebootInputDevice.go index d705eb22bb3..22927a947de 100644 --- a/service/medialive/api_op_RebootInputDevice.go +++ b/service/medialive/api_op_RebootInputDevice.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRebootInputDeviceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootInputDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_RejectInputDeviceTransfer.go b/service/medialive/api_op_RejectInputDeviceTransfer.go index 519db83f9c5..a1d1fa662d9 100644 --- a/service/medialive/api_op_RejectInputDeviceTransfer.go +++ b/service/medialive/api_op_RejectInputDeviceTransfer.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRejectInputDeviceTransferMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectInputDeviceTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_RestartChannelPipelines.go b/service/medialive/api_op_RestartChannelPipelines.go index 3f84cef4a19..866b3d87c31 100644 --- a/service/medialive/api_op_RestartChannelPipelines.go +++ b/service/medialive/api_op_RestartChannelPipelines.go @@ -169,6 +169,9 @@ func (c *Client) addOperationRestartChannelPipelinesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestartChannelPipelinesValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartChannel.go b/service/medialive/api_op_StartChannel.go index 96116937968..426fcde0299 100644 --- a/service/medialive/api_op_StartChannel.go +++ b/service/medialive/api_op_StartChannel.go @@ -162,6 +162,9 @@ func (c *Client) addOperationStartChannelMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartDeleteMonitorDeployment.go b/service/medialive/api_op_StartDeleteMonitorDeployment.go index 99fa409168e..890a1835a1f 100644 --- a/service/medialive/api_op_StartDeleteMonitorDeployment.go +++ b/service/medialive/api_op_StartDeleteMonitorDeployment.go @@ -164,6 +164,9 @@ func (c *Client) addOperationStartDeleteMonitorDeploymentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeleteMonitorDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartInputDevice.go b/service/medialive/api_op_StartInputDevice.go index cd5c0a2a0eb..d7e8e8deca2 100644 --- a/service/medialive/api_op_StartInputDevice.go +++ b/service/medialive/api_op_StartInputDevice.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStartInputDeviceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInputDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartInputDeviceMaintenanceWindow.go b/service/medialive/api_op_StartInputDeviceMaintenanceWindow.go index 6da298681fc..9ba44e9b5c4 100644 --- a/service/medialive/api_op_StartInputDeviceMaintenanceWindow.go +++ b/service/medialive/api_op_StartInputDeviceMaintenanceWindow.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartInputDeviceMaintenanceWindowMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInputDeviceMaintenanceWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartMonitorDeployment.go b/service/medialive/api_op_StartMonitorDeployment.go index c7dcf6144ef..55f84662ba6 100644 --- a/service/medialive/api_op_StartMonitorDeployment.go +++ b/service/medialive/api_op_StartMonitorDeployment.go @@ -167,6 +167,9 @@ func (c *Client) addOperationStartMonitorDeploymentMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMonitorDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartMultiplex.go b/service/medialive/api_op_StartMultiplex.go index f5b68a66fd3..68961399744 100644 --- a/service/medialive/api_op_StartMultiplex.go +++ b/service/medialive/api_op_StartMultiplex.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStartMultiplexMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMultiplexValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StartUpdateSignalMap.go b/service/medialive/api_op_StartUpdateSignalMap.go index cd589d8f57c..8ed122e95cf 100644 --- a/service/medialive/api_op_StartUpdateSignalMap.go +++ b/service/medialive/api_op_StartUpdateSignalMap.go @@ -185,6 +185,9 @@ func (c *Client) addOperationStartUpdateSignalMapMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartUpdateSignalMapValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StopChannel.go b/service/medialive/api_op_StopChannel.go index a308929db89..28bca9db6de 100644 --- a/service/medialive/api_op_StopChannel.go +++ b/service/medialive/api_op_StopChannel.go @@ -162,6 +162,9 @@ func (c *Client) addOperationStopChannelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StopInputDevice.go b/service/medialive/api_op_StopInputDevice.go index 95332883360..29191a36585 100644 --- a/service/medialive/api_op_StopInputDevice.go +++ b/service/medialive/api_op_StopInputDevice.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopInputDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInputDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_StopMultiplex.go b/service/medialive/api_op_StopMultiplex.go index 2db0d4e8fa8..b85fbd1e762 100644 --- a/service/medialive/api_op_StopMultiplex.go +++ b/service/medialive/api_op_StopMultiplex.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStopMultiplexMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMultiplexValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_TransferInputDevice.go b/service/medialive/api_op_TransferInputDevice.go index 2251659b15c..1c0ad4af80c 100644 --- a/service/medialive/api_op_TransferInputDevice.go +++ b/service/medialive/api_op_TransferInputDevice.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTransferInputDeviceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTransferInputDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateAccountConfiguration.go b/service/medialive/api_op_UpdateAccountConfiguration.go index 52192088f9d..0db4d3ca61d 100644 --- a/service/medialive/api_op_UpdateAccountConfiguration.go +++ b/service/medialive/api_op_UpdateAccountConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateAccountConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/medialive/api_op_UpdateChannel.go b/service/medialive/api_op_UpdateChannel.go index 267c301ac03..0d02c6c24d1 100644 --- a/service/medialive/api_op_UpdateChannel.go +++ b/service/medialive/api_op_UpdateChannel.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateChannelClass.go b/service/medialive/api_op_UpdateChannelClass.go index a02d093dafe..2b4c25fb249 100644 --- a/service/medialive/api_op_UpdateChannelClass.go +++ b/service/medialive/api_op_UpdateChannelClass.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateChannelClassMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelClassValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go b/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go index 1af8128080b..7cca3a1039f 100644 --- a/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go +++ b/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go @@ -209,6 +209,9 @@ func (c *Client) addOperationUpdateCloudWatchAlarmTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go index 972a30273d2..f296fed51f5 100644 --- a/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go +++ b/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateCloudWatchAlarmTemplateGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go b/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go index 842a243f844..a6c8ecb62d9 100644 --- a/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go +++ b/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go @@ -157,6 +157,9 @@ func (c *Client) addOperationUpdateEventBridgeRuleTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go index 368251831da..b5c9c4fe366 100644 --- a/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go +++ b/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateEventBridgeRuleTemplateGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateInput.go b/service/medialive/api_op_UpdateInput.go index c6ec31d6bd6..09ed6026022 100644 --- a/service/medialive/api_op_UpdateInput.go +++ b/service/medialive/api_op_UpdateInput.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateInputMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInputValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateInputDevice.go b/service/medialive/api_op_UpdateInputDevice.go index c2077cbf69c..fdfa42c24ea 100644 --- a/service/medialive/api_op_UpdateInputDevice.go +++ b/service/medialive/api_op_UpdateInputDevice.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdateInputDeviceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInputDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateInputSecurityGroup.go b/service/medialive/api_op_UpdateInputSecurityGroup.go index f22ae92bd52..380c6eec613 100644 --- a/service/medialive/api_op_UpdateInputSecurityGroup.go +++ b/service/medialive/api_op_UpdateInputSecurityGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateInputSecurityGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInputSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateMultiplex.go b/service/medialive/api_op_UpdateMultiplex.go index 5991174bae0..8e3fedd0578 100644 --- a/service/medialive/api_op_UpdateMultiplex.go +++ b/service/medialive/api_op_UpdateMultiplex.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateMultiplexMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMultiplexValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateMultiplexProgram.go b/service/medialive/api_op_UpdateMultiplexProgram.go index 2c702c58166..6ba3f64a3b4 100644 --- a/service/medialive/api_op_UpdateMultiplexProgram.go +++ b/service/medialive/api_op_UpdateMultiplexProgram.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateMultiplexProgramMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMultiplexProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/medialive/api_op_UpdateReservation.go b/service/medialive/api_op_UpdateReservation.go index 76c97622057..2e0a8a3ccb7 100644 --- a/service/medialive/api_op_UpdateReservation.go +++ b/service/medialive/api_op_UpdateReservation.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateReservationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReservationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_client.go b/service/mediapackage/api_client.go index f567f9bc1cb..992094ed023 100644 --- a/service/mediapackage/api_client.go +++ b/service/mediapackage/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mediapackage/api_op_ConfigureLogs.go b/service/mediapackage/api_op_ConfigureLogs.go index d45ac9b2e31..5d45ec7a983 100644 --- a/service/mediapackage/api_op_ConfigureLogs.go +++ b/service/mediapackage/api_op_ConfigureLogs.go @@ -134,6 +134,9 @@ func (c *Client) addOperationConfigureLogsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureLogsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_CreateChannel.go b/service/mediapackage/api_op_CreateChannel.go index d43d4a132fb..e1a5c3ae0ba 100644 --- a/service/mediapackage/api_op_CreateChannel.go +++ b/service/mediapackage/api_op_CreateChannel.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_CreateHarvestJob.go b/service/mediapackage/api_op_CreateHarvestJob.go index 54437608fcb..f4883355809 100644 --- a/service/mediapackage/api_op_CreateHarvestJob.go +++ b/service/mediapackage/api_op_CreateHarvestJob.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateHarvestJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHarvestJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_CreateOriginEndpoint.go b/service/mediapackage/api_op_CreateOriginEndpoint.go index 450311e75db..56abc701bfa 100644 --- a/service/mediapackage/api_op_CreateOriginEndpoint.go +++ b/service/mediapackage/api_op_CreateOriginEndpoint.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateOriginEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_DeleteChannel.go b/service/mediapackage/api_op_DeleteChannel.go index 876adfb8f23..995389d761c 100644 --- a/service/mediapackage/api_op_DeleteChannel.go +++ b/service/mediapackage/api_op_DeleteChannel.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_DeleteOriginEndpoint.go b/service/mediapackage/api_op_DeleteOriginEndpoint.go index 10480da2eab..89ae14d61a7 100644 --- a/service/mediapackage/api_op_DeleteOriginEndpoint.go +++ b/service/mediapackage/api_op_DeleteOriginEndpoint.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteOriginEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_DescribeChannel.go b/service/mediapackage/api_op_DescribeChannel.go index 8ea7b2c47cd..a13a250059d 100644 --- a/service/mediapackage/api_op_DescribeChannel.go +++ b/service/mediapackage/api_op_DescribeChannel.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_DescribeHarvestJob.go b/service/mediapackage/api_op_DescribeHarvestJob.go index 10b7c995bc7..497bcf7a490 100644 --- a/service/mediapackage/api_op_DescribeHarvestJob.go +++ b/service/mediapackage/api_op_DescribeHarvestJob.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeHarvestJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHarvestJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_DescribeOriginEndpoint.go b/service/mediapackage/api_op_DescribeOriginEndpoint.go index 6e48887f905..0c369843c83 100644 --- a/service/mediapackage/api_op_DescribeOriginEndpoint.go +++ b/service/mediapackage/api_op_DescribeOriginEndpoint.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeOriginEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_ListChannels.go b/service/mediapackage/api_op_ListChannels.go index d012a00ec8c..3863fa65f36 100644 --- a/service/mediapackage/api_op_ListChannels.go +++ b/service/mediapackage/api_op_ListChannels.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // Upper bound on number of records to return. @@ -201,6 +197,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackage/api_op_ListHarvestJobs.go b/service/mediapackage/api_op_ListHarvestJobs.go index 70636750f24..dbb3a27de36 100644 --- a/service/mediapackage/api_op_ListHarvestJobs.go +++ b/service/mediapackage/api_op_ListHarvestJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListHarvestJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHarvestJobs(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListHarvestJobsMiddlewares(stack *middleware.Stack, return nil } -// ListHarvestJobsAPIClient is a client that implements the ListHarvestJobs -// operation. -type ListHarvestJobsAPIClient interface { - ListHarvestJobs(context.Context, *ListHarvestJobsInput, ...func(*Options)) (*ListHarvestJobsOutput, error) -} - -var _ ListHarvestJobsAPIClient = (*Client)(nil) - // ListHarvestJobsPaginatorOptions is the paginator options for ListHarvestJobs type ListHarvestJobsPaginatorOptions struct { // The upper bound on the number of records to return. @@ -209,6 +204,9 @@ func (p *ListHarvestJobsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHarvestJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListHarvestJobsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListHarvestJobsAPIClient is a client that implements the ListHarvestJobs +// operation. +type ListHarvestJobsAPIClient interface { + ListHarvestJobs(context.Context, *ListHarvestJobsInput, ...func(*Options)) (*ListHarvestJobsOutput, error) +} + +var _ ListHarvestJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHarvestJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackage/api_op_ListOriginEndpoints.go b/service/mediapackage/api_op_ListOriginEndpoints.go index c3dc8afb5a9..967b5a61a60 100644 --- a/service/mediapackage/api_op_ListOriginEndpoints.go +++ b/service/mediapackage/api_op_ListOriginEndpoints.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListOriginEndpointsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListOriginEndpointsMiddlewares(stack *middleware.St return nil } -// ListOriginEndpointsAPIClient is a client that implements the -// ListOriginEndpoints operation. -type ListOriginEndpointsAPIClient interface { - ListOriginEndpoints(context.Context, *ListOriginEndpointsInput, ...func(*Options)) (*ListOriginEndpointsOutput, error) -} - -var _ ListOriginEndpointsAPIClient = (*Client)(nil) - // ListOriginEndpointsPaginatorOptions is the paginator options for // ListOriginEndpoints type ListOriginEndpointsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOriginEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListOriginEndpointsAPIClient is a client that implements the +// ListOriginEndpoints operation. +type ListOriginEndpointsAPIClient interface { + ListOriginEndpoints(context.Context, *ListOriginEndpointsInput, ...func(*Options)) (*ListOriginEndpointsOutput, error) +} + +var _ ListOriginEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOriginEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackage/api_op_ListTagsForResource.go b/service/mediapackage/api_op_ListTagsForResource.go index 937db4e7d17..bf1a727a5e0 100644 --- a/service/mediapackage/api_op_ListTagsForResource.go +++ b/service/mediapackage/api_op_ListTagsForResource.go @@ -100,6 +100,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_RotateChannelCredentials.go b/service/mediapackage/api_op_RotateChannelCredentials.go index 11a7a4e1926..d01e1519686 100644 --- a/service/mediapackage/api_op_RotateChannelCredentials.go +++ b/service/mediapackage/api_op_RotateChannelCredentials.go @@ -131,6 +131,9 @@ func (c *Client) addOperationRotateChannelCredentialsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRotateChannelCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_RotateIngestEndpointCredentials.go b/service/mediapackage/api_op_RotateIngestEndpointCredentials.go index 861465a9b65..99c62c3e1e3 100644 --- a/service/mediapackage/api_op_RotateIngestEndpointCredentials.go +++ b/service/mediapackage/api_op_RotateIngestEndpointCredentials.go @@ -133,6 +133,9 @@ func (c *Client) addOperationRotateIngestEndpointCredentialsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRotateIngestEndpointCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_TagResource.go b/service/mediapackage/api_op_TagResource.go index 4968e41537a..5d7a1250d19 100644 --- a/service/mediapackage/api_op_TagResource.go +++ b/service/mediapackage/api_op_TagResource.go @@ -101,6 +101,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_UntagResource.go b/service/mediapackage/api_op_UntagResource.go index 18f0f19341e..837d4021798 100644 --- a/service/mediapackage/api_op_UntagResource.go +++ b/service/mediapackage/api_op_UntagResource.go @@ -103,6 +103,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_UpdateChannel.go b/service/mediapackage/api_op_UpdateChannel.go index ba051a816a3..a62d7ece124 100644 --- a/service/mediapackage/api_op_UpdateChannel.go +++ b/service/mediapackage/api_op_UpdateChannel.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackage/api_op_UpdateOriginEndpoint.go b/service/mediapackage/api_op_UpdateOriginEndpoint.go index 8d22ea6286a..cc808ccc6c1 100644 --- a/service/mediapackage/api_op_UpdateOriginEndpoint.go +++ b/service/mediapackage/api_op_UpdateOriginEndpoint.go @@ -202,6 +202,9 @@ func (c *Client) addOperationUpdateOriginEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_client.go b/service/mediapackagev2/api_client.go index a7cf80943eb..39cf9af0df1 100644 --- a/service/mediapackagev2/api_client.go +++ b/service/mediapackagev2/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/mediapackagev2/api_op_CreateChannel.go b/service/mediapackagev2/api_op_CreateChannel.go index 197ed85c292..3282cadca88 100644 --- a/service/mediapackagev2/api_op_CreateChannel.go +++ b/service/mediapackagev2/api_op_CreateChannel.go @@ -200,6 +200,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChannelMiddleware(stack, options); err != nil { return err } diff --git a/service/mediapackagev2/api_op_CreateChannelGroup.go b/service/mediapackagev2/api_op_CreateChannelGroup.go index 366a947ccb6..3c26e697fbc 100644 --- a/service/mediapackagev2/api_op_CreateChannelGroup.go +++ b/service/mediapackagev2/api_op_CreateChannelGroup.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateChannelGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChannelGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/mediapackagev2/api_op_CreateOriginEndpoint.go b/service/mediapackagev2/api_op_CreateOriginEndpoint.go index 81ba9c4cb77..c5957781cba 100644 --- a/service/mediapackagev2/api_op_CreateOriginEndpoint.go +++ b/service/mediapackagev2/api_op_CreateOriginEndpoint.go @@ -241,6 +241,9 @@ func (c *Client) addOperationCreateOriginEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateOriginEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/mediapackagev2/api_op_DeleteChannel.go b/service/mediapackagev2/api_op_DeleteChannel.go index 9d1a47357fa..4c44f5562d0 100644 --- a/service/mediapackagev2/api_op_DeleteChannel.go +++ b/service/mediapackagev2/api_op_DeleteChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_DeleteChannelGroup.go b/service/mediapackagev2/api_op_DeleteChannelGroup.go index c8bb282bf0f..fe134a1c3b5 100644 --- a/service/mediapackagev2/api_op_DeleteChannelGroup.go +++ b/service/mediapackagev2/api_op_DeleteChannelGroup.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteChannelGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_DeleteChannelPolicy.go b/service/mediapackagev2/api_op_DeleteChannelPolicy.go index 9ca9c3a23c1..496cb2295ff 100644 --- a/service/mediapackagev2/api_op_DeleteChannelPolicy.go +++ b/service/mediapackagev2/api_op_DeleteChannelPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteChannelPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_DeleteOriginEndpoint.go b/service/mediapackagev2/api_op_DeleteOriginEndpoint.go index e73a058eb53..af750060462 100644 --- a/service/mediapackagev2/api_op_DeleteOriginEndpoint.go +++ b/service/mediapackagev2/api_op_DeleteOriginEndpoint.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteOriginEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_DeleteOriginEndpointPolicy.go b/service/mediapackagev2/api_op_DeleteOriginEndpointPolicy.go index d2952897643..e68e7bcd58d 100644 --- a/service/mediapackagev2/api_op_DeleteOriginEndpointPolicy.go +++ b/service/mediapackagev2/api_op_DeleteOriginEndpointPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteOriginEndpointPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOriginEndpointPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_GetChannel.go b/service/mediapackagev2/api_op_GetChannel.go index 986ababed95..291ccf5b489 100644 --- a/service/mediapackagev2/api_op_GetChannel.go +++ b/service/mediapackagev2/api_op_GetChannel.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetChannelMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_GetChannelGroup.go b/service/mediapackagev2/api_op_GetChannelGroup.go index a430fd36e52..1a30fc26623 100644 --- a/service/mediapackagev2/api_op_GetChannelGroup.go +++ b/service/mediapackagev2/api_op_GetChannelGroup.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetChannelGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_GetChannelPolicy.go b/service/mediapackagev2/api_op_GetChannelPolicy.go index f697f066c39..c247ed8b780 100644 --- a/service/mediapackagev2/api_op_GetChannelPolicy.go +++ b/service/mediapackagev2/api_op_GetChannelPolicy.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetChannelPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_GetOriginEndpoint.go b/service/mediapackagev2/api_op_GetOriginEndpoint.go index 8958b135514..a4e9c91cc93 100644 --- a/service/mediapackagev2/api_op_GetOriginEndpoint.go +++ b/service/mediapackagev2/api_op_GetOriginEndpoint.go @@ -194,6 +194,9 @@ func (c *Client) addOperationGetOriginEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_GetOriginEndpointPolicy.go b/service/mediapackagev2/api_op_GetOriginEndpointPolicy.go index 4e65f19a8f0..eb2dacabed2 100644 --- a/service/mediapackagev2/api_op_GetOriginEndpointPolicy.go +++ b/service/mediapackagev2/api_op_GetOriginEndpointPolicy.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetOriginEndpointPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOriginEndpointPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_ListChannelGroups.go b/service/mediapackagev2/api_op_ListChannelGroups.go index 5e157ffc7a8..ce445b29782 100644 --- a/service/mediapackagev2/api_op_ListChannelGroups.go +++ b/service/mediapackagev2/api_op_ListChannelGroups.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListChannelGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelGroups(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListChannelGroupsMiddlewares(stack *middleware.Stac return nil } -// ListChannelGroupsAPIClient is a client that implements the ListChannelGroups -// operation. -type ListChannelGroupsAPIClient interface { - ListChannelGroups(context.Context, *ListChannelGroupsInput, ...func(*Options)) (*ListChannelGroupsOutput, error) -} - -var _ ListChannelGroupsAPIClient = (*Client)(nil) - // ListChannelGroupsPaginatorOptions is the paginator options for ListChannelGroups type ListChannelGroupsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -205,6 +200,9 @@ func (p *ListChannelGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannelGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListChannelGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListChannelGroupsAPIClient is a client that implements the ListChannelGroups +// operation. +type ListChannelGroupsAPIClient interface { + ListChannelGroups(context.Context, *ListChannelGroupsInput, ...func(*Options)) (*ListChannelGroupsOutput, error) +} + +var _ ListChannelGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannelGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackagev2/api_op_ListChannels.go b/service/mediapackagev2/api_op_ListChannels.go index 68748940d4e..f59f72af9ce 100644 --- a/service/mediapackagev2/api_op_ListChannels.go +++ b/service/mediapackagev2/api_op_ListChannels.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChannelsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -213,6 +209,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackagev2/api_op_ListOriginEndpoints.go b/service/mediapackagev2/api_op_ListOriginEndpoints.go index 6932e085c33..fb9891a0698 100644 --- a/service/mediapackagev2/api_op_ListOriginEndpoints.go +++ b/service/mediapackagev2/api_op_ListOriginEndpoints.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListOriginEndpointsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOriginEndpointsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListOriginEndpointsMiddlewares(stack *middleware.St return nil } -// ListOriginEndpointsAPIClient is a client that implements the -// ListOriginEndpoints operation. -type ListOriginEndpointsAPIClient interface { - ListOriginEndpoints(context.Context, *ListOriginEndpointsInput, ...func(*Options)) (*ListOriginEndpointsOutput, error) -} - -var _ ListOriginEndpointsAPIClient = (*Client)(nil) - // ListOriginEndpointsPaginatorOptions is the paginator options for // ListOriginEndpoints type ListOriginEndpointsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOriginEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListOriginEndpointsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListOriginEndpointsAPIClient is a client that implements the +// ListOriginEndpoints operation. +type ListOriginEndpointsAPIClient interface { + ListOriginEndpoints(context.Context, *ListOriginEndpointsInput, ...func(*Options)) (*ListOriginEndpointsOutput, error) +} + +var _ ListOriginEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOriginEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackagev2/api_op_ListTagsForResource.go b/service/mediapackagev2/api_op_ListTagsForResource.go index 7741555ba8a..7d11e0a2694 100644 --- a/service/mediapackagev2/api_op_ListTagsForResource.go +++ b/service/mediapackagev2/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_PutChannelPolicy.go b/service/mediapackagev2/api_op_PutChannelPolicy.go index 96c2836cb3e..784e0569676 100644 --- a/service/mediapackagev2/api_op_PutChannelPolicy.go +++ b/service/mediapackagev2/api_op_PutChannelPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutChannelPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutChannelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_PutOriginEndpointPolicy.go b/service/mediapackagev2/api_op_PutOriginEndpointPolicy.go index f3d6f3d22a8..5bfd743c777 100644 --- a/service/mediapackagev2/api_op_PutOriginEndpointPolicy.go +++ b/service/mediapackagev2/api_op_PutOriginEndpointPolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutOriginEndpointPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutOriginEndpointPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_TagResource.go b/service/mediapackagev2/api_op_TagResource.go index 440905b5c99..4c1a5510a7d 100644 --- a/service/mediapackagev2/api_op_TagResource.go +++ b/service/mediapackagev2/api_op_TagResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_UntagResource.go b/service/mediapackagev2/api_op_UntagResource.go index 26ad3edbf54..571a547c6ef 100644 --- a/service/mediapackagev2/api_op_UntagResource.go +++ b/service/mediapackagev2/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_UpdateChannel.go b/service/mediapackagev2/api_op_UpdateChannel.go index 609f0af5cb9..6bedb874c35 100644 --- a/service/mediapackagev2/api_op_UpdateChannel.go +++ b/service/mediapackagev2/api_op_UpdateChannel.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_UpdateChannelGroup.go b/service/mediapackagev2/api_op_UpdateChannelGroup.go index 4be47cd013a..3946bb7811a 100644 --- a/service/mediapackagev2/api_op_UpdateChannelGroup.go +++ b/service/mediapackagev2/api_op_UpdateChannelGroup.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateChannelGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagev2/api_op_UpdateOriginEndpoint.go b/service/mediapackagev2/api_op_UpdateOriginEndpoint.go index 33a2762ec48..584e7b6cabb 100644 --- a/service/mediapackagev2/api_op_UpdateOriginEndpoint.go +++ b/service/mediapackagev2/api_op_UpdateOriginEndpoint.go @@ -235,6 +235,9 @@ func (c *Client) addOperationUpdateOriginEndpointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOriginEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_client.go b/service/mediapackagevod/api_client.go index f732227ac58..77c6fd1a294 100644 --- a/service/mediapackagevod/api_client.go +++ b/service/mediapackagevod/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mediapackagevod/api_op_ConfigureLogs.go b/service/mediapackagevod/api_op_ConfigureLogs.go index d3c8cc85922..1a4fd26fafe 100644 --- a/service/mediapackagevod/api_op_ConfigureLogs.go +++ b/service/mediapackagevod/api_op_ConfigureLogs.go @@ -128,6 +128,9 @@ func (c *Client) addOperationConfigureLogsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureLogsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_CreateAsset.go b/service/mediapackagevod/api_op_CreateAsset.go index e242077ee4c..6d97c96d361 100644 --- a/service/mediapackagevod/api_op_CreateAsset.go +++ b/service/mediapackagevod/api_op_CreateAsset.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_CreatePackagingConfiguration.go b/service/mediapackagevod/api_op_CreatePackagingConfiguration.go index 8312a35c74d..0ee3b439809 100644 --- a/service/mediapackagevod/api_op_CreatePackagingConfiguration.go +++ b/service/mediapackagevod/api_op_CreatePackagingConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreatePackagingConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackagingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_CreatePackagingGroup.go b/service/mediapackagevod/api_op_CreatePackagingGroup.go index 51bc55ea009..fe72a35bfab 100644 --- a/service/mediapackagevod/api_op_CreatePackagingGroup.go +++ b/service/mediapackagevod/api_op_CreatePackagingGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreatePackagingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackagingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_DeleteAsset.go b/service/mediapackagevod/api_op_DeleteAsset.go index 9e8d6b131d0..db02768a065 100644 --- a/service/mediapackagevod/api_op_DeleteAsset.go +++ b/service/mediapackagevod/api_op_DeleteAsset.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAssetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_DeletePackagingConfiguration.go b/service/mediapackagevod/api_op_DeletePackagingConfiguration.go index 0e8272be861..41a6271b099 100644 --- a/service/mediapackagevod/api_op_DeletePackagingConfiguration.go +++ b/service/mediapackagevod/api_op_DeletePackagingConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePackagingConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackagingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_DeletePackagingGroup.go b/service/mediapackagevod/api_op_DeletePackagingGroup.go index c5beda0dc1d..22b55c32856 100644 --- a/service/mediapackagevod/api_op_DeletePackagingGroup.go +++ b/service/mediapackagevod/api_op_DeletePackagingGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePackagingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackagingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_DescribeAsset.go b/service/mediapackagevod/api_op_DescribeAsset.go index 94a50c0a7b8..1087c101bc2 100644 --- a/service/mediapackagevod/api_op_DescribeAsset.go +++ b/service/mediapackagevod/api_op_DescribeAsset.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeAssetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssetValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_DescribePackagingConfiguration.go b/service/mediapackagevod/api_op_DescribePackagingConfiguration.go index 4fb47513dd1..1f1978314ac 100644 --- a/service/mediapackagevod/api_op_DescribePackagingConfiguration.go +++ b/service/mediapackagevod/api_op_DescribePackagingConfiguration.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribePackagingConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackagingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_DescribePackagingGroup.go b/service/mediapackagevod/api_op_DescribePackagingGroup.go index 5495647e00e..0993eb1d77e 100644 --- a/service/mediapackagevod/api_op_DescribePackagingGroup.go +++ b/service/mediapackagevod/api_op_DescribePackagingGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribePackagingGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackagingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_ListAssets.go b/service/mediapackagevod/api_op_ListAssets.go index 6859755c4f4..2a017464f00 100644 --- a/service/mediapackagevod/api_op_ListAssets.go +++ b/service/mediapackagevod/api_op_ListAssets.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssets(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAssetsAPIClient is a client that implements the ListAssets operation. -type ListAssetsAPIClient interface { - ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) -} - -var _ ListAssetsAPIClient = (*Client)(nil) - // ListAssetsPaginatorOptions is the paginator options for ListAssets type ListAssetsPaginatorOptions struct { // Upper bound on number of records to return. @@ -204,6 +200,9 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAssetsAPIClient is a client that implements the ListAssets operation. +type ListAssetsAPIClient interface { + ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) +} + +var _ ListAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackagevod/api_op_ListPackagingConfigurations.go b/service/mediapackagevod/api_op_ListPackagingConfigurations.go index 92cdf76fca9..4430d90ba19 100644 --- a/service/mediapackagevod/api_op_ListPackagingConfigurations.go +++ b/service/mediapackagevod/api_op_ListPackagingConfigurations.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListPackagingConfigurationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackagingConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListPackagingConfigurationsMiddlewares(stack *middl return nil } -// ListPackagingConfigurationsAPIClient is a client that implements the -// ListPackagingConfigurations operation. -type ListPackagingConfigurationsAPIClient interface { - ListPackagingConfigurations(context.Context, *ListPackagingConfigurationsInput, ...func(*Options)) (*ListPackagingConfigurationsOutput, error) -} - -var _ ListPackagingConfigurationsAPIClient = (*Client)(nil) - // ListPackagingConfigurationsPaginatorOptions is the paginator options for // ListPackagingConfigurations type ListPackagingConfigurationsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListPackagingConfigurationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackagingConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListPackagingConfigurationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListPackagingConfigurationsAPIClient is a client that implements the +// ListPackagingConfigurations operation. +type ListPackagingConfigurationsAPIClient interface { + ListPackagingConfigurations(context.Context, *ListPackagingConfigurationsInput, ...func(*Options)) (*ListPackagingConfigurationsOutput, error) +} + +var _ ListPackagingConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackagingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackagevod/api_op_ListPackagingGroups.go b/service/mediapackagevod/api_op_ListPackagingGroups.go index 38236388f23..f470b88cf42 100644 --- a/service/mediapackagevod/api_op_ListPackagingGroups.go +++ b/service/mediapackagevod/api_op_ListPackagingGroups.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListPackagingGroupsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackagingGroups(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListPackagingGroupsMiddlewares(stack *middleware.St return nil } -// ListPackagingGroupsAPIClient is a client that implements the -// ListPackagingGroups operation. -type ListPackagingGroupsAPIClient interface { - ListPackagingGroups(context.Context, *ListPackagingGroupsInput, ...func(*Options)) (*ListPackagingGroupsOutput, error) -} - -var _ ListPackagingGroupsAPIClient = (*Client)(nil) - // ListPackagingGroupsPaginatorOptions is the paginator options for // ListPackagingGroups type ListPackagingGroupsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListPackagingGroupsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackagingGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListPackagingGroupsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPackagingGroupsAPIClient is a client that implements the +// ListPackagingGroups operation. +type ListPackagingGroupsAPIClient interface { + ListPackagingGroups(context.Context, *ListPackagingGroupsInput, ...func(*Options)) (*ListPackagingGroupsOutput, error) +} + +var _ ListPackagingGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackagingGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediapackagevod/api_op_ListTagsForResource.go b/service/mediapackagevod/api_op_ListTagsForResource.go index 17f70520680..cc249fdeb9e 100644 --- a/service/mediapackagevod/api_op_ListTagsForResource.go +++ b/service/mediapackagevod/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_TagResource.go b/service/mediapackagevod/api_op_TagResource.go index 9e17705f49d..adac5f85bf6 100644 --- a/service/mediapackagevod/api_op_TagResource.go +++ b/service/mediapackagevod/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_UntagResource.go b/service/mediapackagevod/api_op_UntagResource.go index ecbb5ad42bd..7afea4f5dcd 100644 --- a/service/mediapackagevod/api_op_UntagResource.go +++ b/service/mediapackagevod/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediapackagevod/api_op_UpdatePackagingGroup.go b/service/mediapackagevod/api_op_UpdatePackagingGroup.go index c647b8c2970..f6f43950693 100644 --- a/service/mediapackagevod/api_op_UpdatePackagingGroup.go +++ b/service/mediapackagevod/api_op_UpdatePackagingGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdatePackagingGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePackagingGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_client.go b/service/mediastore/api_client.go index 0ad3fb24178..28c04a49db0 100644 --- a/service/mediastore/api_client.go +++ b/service/mediastore/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mediastore/api_op_CreateContainer.go b/service/mediastore/api_op_CreateContainer.go index 3ef35e343e0..2e9165567b8 100644 --- a/service/mediastore/api_op_CreateContainer.go +++ b/service/mediastore/api_op_CreateContainer.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateContainerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContainerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_DeleteContainer.go b/service/mediastore/api_op_DeleteContainer.go index c6f479ba873..79d92d84a0f 100644 --- a/service/mediastore/api_op_DeleteContainer.go +++ b/service/mediastore/api_op_DeleteContainer.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteContainerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContainerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_DeleteContainerPolicy.go b/service/mediastore/api_op_DeleteContainerPolicy.go index 79fcd8e0dfe..29514f0d4a4 100644 --- a/service/mediastore/api_op_DeleteContainerPolicy.go +++ b/service/mediastore/api_op_DeleteContainerPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteContainerPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContainerPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_DeleteCorsPolicy.go b/service/mediastore/api_op_DeleteCorsPolicy.go index 343e2692980..91ccadeb4c9 100644 --- a/service/mediastore/api_op_DeleteCorsPolicy.go +++ b/service/mediastore/api_op_DeleteCorsPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCorsPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCorsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_DeleteLifecyclePolicy.go b/service/mediastore/api_op_DeleteLifecyclePolicy.go index 9d3ac3c9a89..7514922b50b 100644 --- a/service/mediastore/api_op_DeleteLifecyclePolicy.go +++ b/service/mediastore/api_op_DeleteLifecyclePolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_DeleteMetricPolicy.go b/service/mediastore/api_op_DeleteMetricPolicy.go index 3af164cdf85..8895163725e 100644 --- a/service/mediastore/api_op_DeleteMetricPolicy.go +++ b/service/mediastore/api_op_DeleteMetricPolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMetricPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMetricPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_DescribeContainer.go b/service/mediastore/api_op_DescribeContainer.go index f065b458e6b..5c53ff1160e 100644 --- a/service/mediastore/api_op_DescribeContainer.go +++ b/service/mediastore/api_op_DescribeContainer.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeContainerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeContainer(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mediastore/api_op_GetContainerPolicy.go b/service/mediastore/api_op_GetContainerPolicy.go index 8a36f13627e..3cf9f32eee9 100644 --- a/service/mediastore/api_op_GetContainerPolicy.go +++ b/service/mediastore/api_op_GetContainerPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetContainerPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContainerPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_GetCorsPolicy.go b/service/mediastore/api_op_GetCorsPolicy.go index 85947415b36..f7212b0a51c 100644 --- a/service/mediastore/api_op_GetCorsPolicy.go +++ b/service/mediastore/api_op_GetCorsPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetCorsPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCorsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_GetLifecyclePolicy.go b/service/mediastore/api_op_GetLifecyclePolicy.go index ae224ed5f1c..402a201cf5a 100644 --- a/service/mediastore/api_op_GetLifecyclePolicy.go +++ b/service/mediastore/api_op_GetLifecyclePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetLifecyclePolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_GetMetricPolicy.go b/service/mediastore/api_op_GetMetricPolicy.go index 0ed8a7f88df..6ec47724285 100644 --- a/service/mediastore/api_op_GetMetricPolicy.go +++ b/service/mediastore/api_op_GetMetricPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetMetricPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMetricPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_ListContainers.go b/service/mediastore/api_op_ListContainers.go index d729f92e9d3..cc161fee837 100644 --- a/service/mediastore/api_op_ListContainers.go +++ b/service/mediastore/api_op_ListContainers.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListContainersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContainers(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListContainersMiddlewares(stack *middleware.Stack, return nil } -// ListContainersAPIClient is a client that implements the ListContainers -// operation. -type ListContainersAPIClient interface { - ListContainers(context.Context, *ListContainersInput, ...func(*Options)) (*ListContainersOutput, error) -} - -var _ ListContainersAPIClient = (*Client)(nil) - // ListContainersPaginatorOptions is the paginator options for ListContainers type ListContainersPaginatorOptions struct { // Enter the maximum number of containers in the response. Use from 1 to 255 @@ -220,6 +215,9 @@ func (p *ListContainersPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContainers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListContainersPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListContainersAPIClient is a client that implements the ListContainers +// operation. +type ListContainersAPIClient interface { + ListContainers(context.Context, *ListContainersInput, ...func(*Options)) (*ListContainersOutput, error) +} + +var _ ListContainersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContainers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediastore/api_op_ListTagsForResource.go b/service/mediastore/api_op_ListTagsForResource.go index 7bda45fd673..38cf49b2fc6 100644 --- a/service/mediastore/api_op_ListTagsForResource.go +++ b/service/mediastore/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_PutContainerPolicy.go b/service/mediastore/api_op_PutContainerPolicy.go index d6aac1cd22c..c72c4b8339e 100644 --- a/service/mediastore/api_op_PutContainerPolicy.go +++ b/service/mediastore/api_op_PutContainerPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutContainerPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutContainerPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_PutCorsPolicy.go b/service/mediastore/api_op_PutCorsPolicy.go index f4f6e38240d..cf641ec78d9 100644 --- a/service/mediastore/api_op_PutCorsPolicy.go +++ b/service/mediastore/api_op_PutCorsPolicy.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPutCorsPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutCorsPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_PutLifecyclePolicy.go b/service/mediastore/api_op_PutLifecyclePolicy.go index ec4ed2b3e50..176b06bfdff 100644 --- a/service/mediastore/api_op_PutLifecyclePolicy.go +++ b/service/mediastore/api_op_PutLifecyclePolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutLifecyclePolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_PutMetricPolicy.go b/service/mediastore/api_op_PutMetricPolicy.go index 603acda4b5c..0bf9cbc0f37 100644 --- a/service/mediastore/api_op_PutMetricPolicy.go +++ b/service/mediastore/api_op_PutMetricPolicy.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutMetricPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMetricPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_StartAccessLogging.go b/service/mediastore/api_op_StartAccessLogging.go index bc72bd313ad..4f8990df73f 100644 --- a/service/mediastore/api_op_StartAccessLogging.go +++ b/service/mediastore/api_op_StartAccessLogging.go @@ -103,6 +103,9 @@ func (c *Client) addOperationStartAccessLoggingMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAccessLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_StopAccessLogging.go b/service/mediastore/api_op_StopAccessLogging.go index 9a109b64419..094206cde36 100644 --- a/service/mediastore/api_op_StopAccessLogging.go +++ b/service/mediastore/api_op_StopAccessLogging.go @@ -103,6 +103,9 @@ func (c *Client) addOperationStopAccessLoggingMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAccessLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_TagResource.go b/service/mediastore/api_op_TagResource.go index ce8221b54ee..0e12edd365e 100644 --- a/service/mediastore/api_op_TagResource.go +++ b/service/mediastore/api_op_TagResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastore/api_op_UntagResource.go b/service/mediastore/api_op_UntagResource.go index efff8e4bb1b..5695a06c39a 100644 --- a/service/mediastore/api_op_UntagResource.go +++ b/service/mediastore/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastoredata/api_client.go b/service/mediastoredata/api_client.go index 32f6c9e16da..d92561ad1a0 100644 --- a/service/mediastoredata/api_client.go +++ b/service/mediastoredata/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mediastoredata/api_op_DeleteObject.go b/service/mediastoredata/api_op_DeleteObject.go index fe2e38bf50d..3f7fee600cc 100644 --- a/service/mediastoredata/api_op_DeleteObject.go +++ b/service/mediastoredata/api_op_DeleteObject.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastoredata/api_op_DescribeObject.go b/service/mediastoredata/api_op_DescribeObject.go index ae7770a4027..e947184e8e3 100644 --- a/service/mediastoredata/api_op_DescribeObject.go +++ b/service/mediastoredata/api_op_DescribeObject.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeObjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastoredata/api_op_GetObject.go b/service/mediastoredata/api_op_GetObject.go index ef7f7b529f5..f6e6f4ad694 100644 --- a/service/mediastoredata/api_op_GetObject.go +++ b/service/mediastoredata/api_op_GetObject.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediastoredata/api_op_ListItems.go b/service/mediastoredata/api_op_ListItems.go index 3eb00a12372..26f08618938 100644 --- a/service/mediastoredata/api_op_ListItems.go +++ b/service/mediastoredata/api_op_ListItems.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListItemsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListItems(options.Region), middleware.Before); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListItemsMiddlewares(stack *middleware.Stack, optio return nil } -// ListItemsAPIClient is a client that implements the ListItems operation. -type ListItemsAPIClient interface { - ListItems(context.Context, *ListItemsInput, ...func(*Options)) (*ListItemsOutput, error) -} - -var _ ListItemsAPIClient = (*Client)(nil) - // ListItemsPaginatorOptions is the paginator options for ListItems type ListItemsPaginatorOptions struct { // The maximum number of results to return per API request. For example, you @@ -228,6 +224,9 @@ func (p *ListItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +246,13 @@ func (p *ListItemsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListItemsAPIClient is a client that implements the ListItems operation. +type ListItemsAPIClient interface { + ListItems(context.Context, *ListItemsInput, ...func(*Options)) (*ListItemsOutput, error) +} + +var _ ListItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediastoredata/api_op_PutObject.go b/service/mediastoredata/api_op_PutObject.go index f322e67c365..df4b3e2ec3b 100644 --- a/service/mediastoredata/api_op_PutObject.go +++ b/service/mediastoredata/api_op_PutObject.go @@ -171,6 +171,9 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_client.go b/service/mediatailor/api_client.go index f81ccf5beab..88fe607bf9a 100644 --- a/service/mediatailor/api_client.go +++ b/service/mediatailor/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mediatailor/api_op_ConfigureLogsForChannel.go b/service/mediatailor/api_op_ConfigureLogsForChannel.go index 3451f64f060..618eb65a214 100644 --- a/service/mediatailor/api_op_ConfigureLogsForChannel.go +++ b/service/mediatailor/api_op_ConfigureLogsForChannel.go @@ -114,6 +114,9 @@ func (c *Client) addOperationConfigureLogsForChannelMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureLogsForChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_ConfigureLogsForPlaybackConfiguration.go b/service/mediatailor/api_op_ConfigureLogsForPlaybackConfiguration.go index 2c8f16888ca..2a047c61572 100644 --- a/service/mediatailor/api_op_ConfigureLogsForPlaybackConfiguration.go +++ b/service/mediatailor/api_op_ConfigureLogsForPlaybackConfiguration.go @@ -126,6 +126,9 @@ func (c *Client) addOperationConfigureLogsForPlaybackConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureLogsForPlaybackConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_CreateChannel.go b/service/mediatailor/api_op_CreateChannel.go index 16446f824e4..14daa41fc6c 100644 --- a/service/mediatailor/api_op_CreateChannel.go +++ b/service/mediatailor/api_op_CreateChannel.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_CreateLiveSource.go b/service/mediatailor/api_op_CreateLiveSource.go index ab811fa3878..642ff5b7ad3 100644 --- a/service/mediatailor/api_op_CreateLiveSource.go +++ b/service/mediatailor/api_op_CreateLiveSource.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateLiveSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLiveSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_CreatePrefetchSchedule.go b/service/mediatailor/api_op_CreatePrefetchSchedule.go index 9f33a98bbba..66ac5356851 100644 --- a/service/mediatailor/api_op_CreatePrefetchSchedule.go +++ b/service/mediatailor/api_op_CreatePrefetchSchedule.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreatePrefetchScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePrefetchScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_CreateProgram.go b/service/mediatailor/api_op_CreateProgram.go index 6e7bad59d68..5fd95b75461 100644 --- a/service/mediatailor/api_op_CreateProgram.go +++ b/service/mediatailor/api_op_CreateProgram.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateProgramMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_CreateSourceLocation.go b/service/mediatailor/api_op_CreateSourceLocation.go index d0d6136e7c7..77b01f93429 100644 --- a/service/mediatailor/api_op_CreateSourceLocation.go +++ b/service/mediatailor/api_op_CreateSourceLocation.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateSourceLocationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSourceLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_CreateVodSource.go b/service/mediatailor/api_op_CreateVodSource.go index 53eebfee31c..3f93d9509f3 100644 --- a/service/mediatailor/api_op_CreateVodSource.go +++ b/service/mediatailor/api_op_CreateVodSource.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateVodSourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVodSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeleteChannel.go b/service/mediatailor/api_op_DeleteChannel.go index 375a9d5ee4e..372a645896f 100644 --- a/service/mediatailor/api_op_DeleteChannel.go +++ b/service/mediatailor/api_op_DeleteChannel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeleteChannelPolicy.go b/service/mediatailor/api_op_DeleteChannelPolicy.go index 88d5877a470..8d758f8aab3 100644 --- a/service/mediatailor/api_op_DeleteChannelPolicy.go +++ b/service/mediatailor/api_op_DeleteChannelPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteChannelPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChannelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeleteLiveSource.go b/service/mediatailor/api_op_DeleteLiveSource.go index ebdc1032a3c..62d835432b4 100644 --- a/service/mediatailor/api_op_DeleteLiveSource.go +++ b/service/mediatailor/api_op_DeleteLiveSource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteLiveSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLiveSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeletePlaybackConfiguration.go b/service/mediatailor/api_op_DeletePlaybackConfiguration.go index 80984704d1d..341e40cbdbe 100644 --- a/service/mediatailor/api_op_DeletePlaybackConfiguration.go +++ b/service/mediatailor/api_op_DeletePlaybackConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeletePlaybackConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePlaybackConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeletePrefetchSchedule.go b/service/mediatailor/api_op_DeletePrefetchSchedule.go index 65cfaffa5f6..3749209bc5b 100644 --- a/service/mediatailor/api_op_DeletePrefetchSchedule.go +++ b/service/mediatailor/api_op_DeletePrefetchSchedule.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeletePrefetchScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePrefetchScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeleteProgram.go b/service/mediatailor/api_op_DeleteProgram.go index 567f5cb58d2..4baac4858d8 100644 --- a/service/mediatailor/api_op_DeleteProgram.go +++ b/service/mediatailor/api_op_DeleteProgram.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteProgramMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeleteSourceLocation.go b/service/mediatailor/api_op_DeleteSourceLocation.go index fb39c81ef42..b6d1b693ea0 100644 --- a/service/mediatailor/api_op_DeleteSourceLocation.go +++ b/service/mediatailor/api_op_DeleteSourceLocation.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSourceLocationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSourceLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DeleteVodSource.go b/service/mediatailor/api_op_DeleteVodSource.go index f5f11ea0bf2..69f7da18c3f 100644 --- a/service/mediatailor/api_op_DeleteVodSource.go +++ b/service/mediatailor/api_op_DeleteVodSource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteVodSourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVodSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DescribeChannel.go b/service/mediatailor/api_op_DescribeChannel.go index bec4e47d511..8bb6ad1f656 100644 --- a/service/mediatailor/api_op_DescribeChannel.go +++ b/service/mediatailor/api_op_DescribeChannel.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DescribeLiveSource.go b/service/mediatailor/api_op_DescribeLiveSource.go index 48d2873d346..9ccb69c6be7 100644 --- a/service/mediatailor/api_op_DescribeLiveSource.go +++ b/service/mediatailor/api_op_DescribeLiveSource.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeLiveSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLiveSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DescribeProgram.go b/service/mediatailor/api_op_DescribeProgram.go index 17b63a3aa6e..b710529b6d8 100644 --- a/service/mediatailor/api_op_DescribeProgram.go +++ b/service/mediatailor/api_op_DescribeProgram.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeProgramMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DescribeSourceLocation.go b/service/mediatailor/api_op_DescribeSourceLocation.go index 305aeb9d32a..9f08e86a15b 100644 --- a/service/mediatailor/api_op_DescribeSourceLocation.go +++ b/service/mediatailor/api_op_DescribeSourceLocation.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeSourceLocationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSourceLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_DescribeVodSource.go b/service/mediatailor/api_op_DescribeVodSource.go index 65bb50ae85b..10170036dd2 100644 --- a/service/mediatailor/api_op_DescribeVodSource.go +++ b/service/mediatailor/api_op_DescribeVodSource.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeVodSourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVodSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_GetChannelPolicy.go b/service/mediatailor/api_op_GetChannelPolicy.go index f5491fbceb2..aabcebd8ded 100644 --- a/service/mediatailor/api_op_GetChannelPolicy.go +++ b/service/mediatailor/api_op_GetChannelPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetChannelPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_GetChannelSchedule.go b/service/mediatailor/api_op_GetChannelSchedule.go index 101f88fd313..d50987eb547 100644 --- a/service/mediatailor/api_op_GetChannelSchedule.go +++ b/service/mediatailor/api_op_GetChannelSchedule.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetChannelScheduleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelScheduleValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationGetChannelScheduleMiddlewares(stack *middleware.Sta return nil } -// GetChannelScheduleAPIClient is a client that implements the GetChannelSchedule -// operation. -type GetChannelScheduleAPIClient interface { - GetChannelSchedule(context.Context, *GetChannelScheduleInput, ...func(*Options)) (*GetChannelScheduleOutput, error) -} - -var _ GetChannelScheduleAPIClient = (*Client)(nil) - // GetChannelSchedulePaginatorOptions is the paginator options for // GetChannelSchedule type GetChannelSchedulePaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *GetChannelSchedulePaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetChannelSchedule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *GetChannelSchedulePaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetChannelScheduleAPIClient is a client that implements the GetChannelSchedule +// operation. +type GetChannelScheduleAPIClient interface { + GetChannelSchedule(context.Context, *GetChannelScheduleInput, ...func(*Options)) (*GetChannelScheduleOutput, error) +} + +var _ GetChannelScheduleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetChannelSchedule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_GetPlaybackConfiguration.go b/service/mediatailor/api_op_GetPlaybackConfiguration.go index baecdc84fc8..eb6bddcd9f5 100644 --- a/service/mediatailor/api_op_GetPlaybackConfiguration.go +++ b/service/mediatailor/api_op_GetPlaybackConfiguration.go @@ -209,6 +209,9 @@ func (c *Client) addOperationGetPlaybackConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPlaybackConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_GetPrefetchSchedule.go b/service/mediatailor/api_op_GetPrefetchSchedule.go index 0dec4e7e6d0..a2521603382 100644 --- a/service/mediatailor/api_op_GetPrefetchSchedule.go +++ b/service/mediatailor/api_op_GetPrefetchSchedule.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetPrefetchScheduleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPrefetchScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_ListAlerts.go b/service/mediatailor/api_op_ListAlerts.go index c2b76a6aa9f..660367468a4 100644 --- a/service/mediatailor/api_op_ListAlerts.go +++ b/service/mediatailor/api_op_ListAlerts.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListAlertsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAlertsValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListAlertsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAlertsAPIClient is a client that implements the ListAlerts operation. -type ListAlertsAPIClient interface { - ListAlerts(context.Context, *ListAlertsInput, ...func(*Options)) (*ListAlertsOutput, error) -} - -var _ ListAlertsAPIClient = (*Client)(nil) - // ListAlertsPaginatorOptions is the paginator options for ListAlerts type ListAlertsPaginatorOptions struct { // The maximum number of alerts that you want MediaTailor to return in response to @@ -216,6 +212,9 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAlerts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListAlertsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAlertsAPIClient is a client that implements the ListAlerts operation. +type ListAlertsAPIClient interface { + ListAlerts(context.Context, *ListAlertsInput, ...func(*Options)) (*ListAlertsOutput, error) +} + +var _ ListAlertsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAlerts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_ListChannels.go b/service/mediatailor/api_op_ListChannels.go index d05a17aeaed..aa73d0b8009 100644 --- a/service/mediatailor/api_op_ListChannels.go +++ b/service/mediatailor/api_op_ListChannels.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, op return nil } -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - // ListChannelsPaginatorOptions is the paginator options for ListChannels type ListChannelsPaginatorOptions struct { // The maximum number of channels that you want MediaTailor to return in response @@ -208,6 +204,9 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChannelsAPIClient is a client that implements the ListChannels operation. +type ListChannelsAPIClient interface { + ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) +} + +var _ ListChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_ListLiveSources.go b/service/mediatailor/api_op_ListLiveSources.go index 7bd992a564c..76db9e42d35 100644 --- a/service/mediatailor/api_op_ListLiveSources.go +++ b/service/mediatailor/api_op_ListLiveSources.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListLiveSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLiveSourcesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListLiveSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListLiveSourcesAPIClient is a client that implements the ListLiveSources -// operation. -type ListLiveSourcesAPIClient interface { - ListLiveSources(context.Context, *ListLiveSourcesInput, ...func(*Options)) (*ListLiveSourcesOutput, error) -} - -var _ ListLiveSourcesAPIClient = (*Client)(nil) - // ListLiveSourcesPaginatorOptions is the paginator options for ListLiveSources type ListLiveSourcesPaginatorOptions struct { // The maximum number of live sources that you want MediaTailor to return in @@ -219,6 +214,9 @@ func (p *ListLiveSourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLiveSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListLiveSourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListLiveSourcesAPIClient is a client that implements the ListLiveSources +// operation. +type ListLiveSourcesAPIClient interface { + ListLiveSources(context.Context, *ListLiveSourcesInput, ...func(*Options)) (*ListLiveSourcesOutput, error) +} + +var _ ListLiveSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLiveSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_ListPlaybackConfigurations.go b/service/mediatailor/api_op_ListPlaybackConfigurations.go index 9934eafef27..caf41bda4c9 100644 --- a/service/mediatailor/api_op_ListPlaybackConfigurations.go +++ b/service/mediatailor/api_op_ListPlaybackConfigurations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListPlaybackConfigurationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlaybackConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListPlaybackConfigurationsMiddlewares(stack *middle return nil } -// ListPlaybackConfigurationsAPIClient is a client that implements the -// ListPlaybackConfigurations operation. -type ListPlaybackConfigurationsAPIClient interface { - ListPlaybackConfigurations(context.Context, *ListPlaybackConfigurationsInput, ...func(*Options)) (*ListPlaybackConfigurationsOutput, error) -} - -var _ ListPlaybackConfigurationsAPIClient = (*Client)(nil) - // ListPlaybackConfigurationsPaginatorOptions is the paginator options for // ListPlaybackConfigurations type ListPlaybackConfigurationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListPlaybackConfigurationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlaybackConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListPlaybackConfigurationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPlaybackConfigurationsAPIClient is a client that implements the +// ListPlaybackConfigurations operation. +type ListPlaybackConfigurationsAPIClient interface { + ListPlaybackConfigurations(context.Context, *ListPlaybackConfigurationsInput, ...func(*Options)) (*ListPlaybackConfigurationsOutput, error) +} + +var _ ListPlaybackConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlaybackConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_ListPrefetchSchedules.go b/service/mediatailor/api_op_ListPrefetchSchedules.go index 6d3c33b9ae6..3f72861c14e 100644 --- a/service/mediatailor/api_op_ListPrefetchSchedules.go +++ b/service/mediatailor/api_op_ListPrefetchSchedules.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListPrefetchSchedulesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrefetchSchedulesValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListPrefetchSchedulesMiddlewares(stack *middleware. return nil } -// ListPrefetchSchedulesAPIClient is a client that implements the -// ListPrefetchSchedules operation. -type ListPrefetchSchedulesAPIClient interface { - ListPrefetchSchedules(context.Context, *ListPrefetchSchedulesInput, ...func(*Options)) (*ListPrefetchSchedulesOutput, error) -} - -var _ ListPrefetchSchedulesAPIClient = (*Client)(nil) - // ListPrefetchSchedulesPaginatorOptions is the paginator options for // ListPrefetchSchedules type ListPrefetchSchedulesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListPrefetchSchedulesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrefetchSchedules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListPrefetchSchedulesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPrefetchSchedulesAPIClient is a client that implements the +// ListPrefetchSchedules operation. +type ListPrefetchSchedulesAPIClient interface { + ListPrefetchSchedules(context.Context, *ListPrefetchSchedulesInput, ...func(*Options)) (*ListPrefetchSchedulesOutput, error) +} + +var _ ListPrefetchSchedulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrefetchSchedules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_ListSourceLocations.go b/service/mediatailor/api_op_ListSourceLocations.go index 6c029ddb6f7..b5064138f28 100644 --- a/service/mediatailor/api_op_ListSourceLocations.go +++ b/service/mediatailor/api_op_ListSourceLocations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListSourceLocationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSourceLocations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListSourceLocationsMiddlewares(stack *middleware.St return nil } -// ListSourceLocationsAPIClient is a client that implements the -// ListSourceLocations operation. -type ListSourceLocationsAPIClient interface { - ListSourceLocations(context.Context, *ListSourceLocationsInput, ...func(*Options)) (*ListSourceLocationsOutput, error) -} - -var _ ListSourceLocationsAPIClient = (*Client)(nil) - // ListSourceLocationsPaginatorOptions is the paginator options for // ListSourceLocations type ListSourceLocationsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListSourceLocationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSourceLocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListSourceLocationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListSourceLocationsAPIClient is a client that implements the +// ListSourceLocations operation. +type ListSourceLocationsAPIClient interface { + ListSourceLocations(context.Context, *ListSourceLocationsInput, ...func(*Options)) (*ListSourceLocationsOutput, error) +} + +var _ ListSourceLocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSourceLocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_ListTagsForResource.go b/service/mediatailor/api_op_ListTagsForResource.go index 880ad2b4a2b..b12df950585 100644 --- a/service/mediatailor/api_op_ListTagsForResource.go +++ b/service/mediatailor/api_op_ListTagsForResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_ListVodSources.go b/service/mediatailor/api_op_ListVodSources.go index 83770a1b90f..0759291c409 100644 --- a/service/mediatailor/api_op_ListVodSources.go +++ b/service/mediatailor/api_op_ListVodSources.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListVodSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVodSourcesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListVodSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListVodSourcesAPIClient is a client that implements the ListVodSources -// operation. -type ListVodSourcesAPIClient interface { - ListVodSources(context.Context, *ListVodSourcesInput, ...func(*Options)) (*ListVodSourcesOutput, error) -} - -var _ ListVodSourcesAPIClient = (*Client)(nil) - // ListVodSourcesPaginatorOptions is the paginator options for ListVodSources type ListVodSourcesPaginatorOptions struct { // The maximum number of VOD sources that you want MediaTailor to return in @@ -217,6 +212,9 @@ func (p *ListVodSourcesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVodSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListVodSourcesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListVodSourcesAPIClient is a client that implements the ListVodSources +// operation. +type ListVodSourcesAPIClient interface { + ListVodSources(context.Context, *ListVodSourcesInput, ...func(*Options)) (*ListVodSourcesOutput, error) +} + +var _ ListVodSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVodSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mediatailor/api_op_PutChannelPolicy.go b/service/mediatailor/api_op_PutChannelPolicy.go index aa135f84d27..e8bf0ab2463 100644 --- a/service/mediatailor/api_op_PutChannelPolicy.go +++ b/service/mediatailor/api_op_PutChannelPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationPutChannelPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutChannelPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_PutPlaybackConfiguration.go b/service/mediatailor/api_op_PutPlaybackConfiguration.go index 50865375482..022dc597f1b 100644 --- a/service/mediatailor/api_op_PutPlaybackConfiguration.go +++ b/service/mediatailor/api_op_PutPlaybackConfiguration.go @@ -291,6 +291,9 @@ func (c *Client) addOperationPutPlaybackConfigurationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPlaybackConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_StartChannel.go b/service/mediatailor/api_op_StartChannel.go index ad73c68a709..cb4b0897a11 100644 --- a/service/mediatailor/api_op_StartChannel.go +++ b/service/mediatailor/api_op_StartChannel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStartChannelMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_StopChannel.go b/service/mediatailor/api_op_StopChannel.go index b3274841274..458b0de65e4 100644 --- a/service/mediatailor/api_op_StopChannel.go +++ b/service/mediatailor/api_op_StopChannel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStopChannelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_TagResource.go b/service/mediatailor/api_op_TagResource.go index d074c3b3229..e455ea1df9e 100644 --- a/service/mediatailor/api_op_TagResource.go +++ b/service/mediatailor/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_UntagResource.go b/service/mediatailor/api_op_UntagResource.go index 888a6e81d08..ba8a4f58b5c 100644 --- a/service/mediatailor/api_op_UntagResource.go +++ b/service/mediatailor/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_UpdateChannel.go b/service/mediatailor/api_op_UpdateChannel.go index 0af3230609a..570a72a335b 100644 --- a/service/mediatailor/api_op_UpdateChannel.go +++ b/service/mediatailor/api_op_UpdateChannel.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_UpdateLiveSource.go b/service/mediatailor/api_op_UpdateLiveSource.go index 8a950948716..58167fe4d3b 100644 --- a/service/mediatailor/api_op_UpdateLiveSource.go +++ b/service/mediatailor/api_op_UpdateLiveSource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateLiveSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLiveSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_UpdateProgram.go b/service/mediatailor/api_op_UpdateProgram.go index 37a53dd7c5f..5133a49c177 100644 --- a/service/mediatailor/api_op_UpdateProgram.go +++ b/service/mediatailor/api_op_UpdateProgram.go @@ -156,6 +156,9 @@ func (c *Client) addOperationUpdateProgramMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProgramValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_UpdateSourceLocation.go b/service/mediatailor/api_op_UpdateSourceLocation.go index 2024aff2c82..5fb21cf95ea 100644 --- a/service/mediatailor/api_op_UpdateSourceLocation.go +++ b/service/mediatailor/api_op_UpdateSourceLocation.go @@ -157,6 +157,9 @@ func (c *Client) addOperationUpdateSourceLocationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSourceLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mediatailor/api_op_UpdateVodSource.go b/service/mediatailor/api_op_UpdateVodSource.go index 1ba466c931d..4276ac262aa 100644 --- a/service/mediatailor/api_op_UpdateVodSource.go +++ b/service/mediatailor/api_op_UpdateVodSource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateVodSourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVodSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_client.go b/service/medicalimaging/api_client.go index b7ea2d501f5..b16639a1b5a 100644 --- a/service/medicalimaging/api_client.go +++ b/service/medicalimaging/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/medicalimaging/api_op_CopyImageSet.go b/service/medicalimaging/api_op_CopyImageSet.go index 218add66816..2298d90a768 100644 --- a/service/medicalimaging/api_op_CopyImageSet.go +++ b/service/medicalimaging/api_op_CopyImageSet.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCopyImageSetMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCopyImageSetMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_CreateDatastore.go b/service/medicalimaging/api_op_CreateDatastore.go index b07de913f37..3d3251cebb2 100644 --- a/service/medicalimaging/api_op_CreateDatastore.go +++ b/service/medicalimaging/api_op_CreateDatastore.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateDatastoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDatastoreMiddleware(stack, options); err != nil { return err } diff --git a/service/medicalimaging/api_op_DeleteDatastore.go b/service/medicalimaging/api_op_DeleteDatastore.go index 4d6c7de6f33..715546733d1 100644 --- a/service/medicalimaging/api_op_DeleteDatastore.go +++ b/service/medicalimaging/api_op_DeleteDatastore.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteDatastoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_DeleteImageSet.go b/service/medicalimaging/api_op_DeleteImageSet.go index f43ad05f790..06f761a8883 100644 --- a/service/medicalimaging/api_op_DeleteImageSet.go +++ b/service/medicalimaging/api_op_DeleteImageSet.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteImageSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteImageSetMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_GetDICOMImportJob.go b/service/medicalimaging/api_op_GetDICOMImportJob.go index 250bf718d0c..dbe8864571e 100644 --- a/service/medicalimaging/api_op_GetDICOMImportJob.go +++ b/service/medicalimaging/api_op_GetDICOMImportJob.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetDICOMImportJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDICOMImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_GetDatastore.go b/service/medicalimaging/api_op_GetDatastore.go index f75a8a77bd6..78333fdc8e5 100644 --- a/service/medicalimaging/api_op_GetDatastore.go +++ b/service/medicalimaging/api_op_GetDatastore.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetDatastoreMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDatastoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_GetImageFrame.go b/service/medicalimaging/api_op_GetImageFrame.go index 2c9d4eff59c..d006ad13b74 100644 --- a/service/medicalimaging/api_op_GetImageFrame.go +++ b/service/medicalimaging/api_op_GetImageFrame.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetImageFrameMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetImageFrameMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_GetImageSet.go b/service/medicalimaging/api_op_GetImageSet.go index 3fb585d2548..1b0b1c5f598 100644 --- a/service/medicalimaging/api_op_GetImageSet.go +++ b/service/medicalimaging/api_op_GetImageSet.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetImageSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetImageSetMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_GetImageSetMetadata.go b/service/medicalimaging/api_op_GetImageSetMetadata.go index 40708ba5c9c..dd72ded5deb 100644 --- a/service/medicalimaging/api_op_GetImageSetMetadata.go +++ b/service/medicalimaging/api_op_GetImageSetMetadata.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetImageSetMetadataMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetImageSetMetadataMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_ListDICOMImportJobs.go b/service/medicalimaging/api_op_ListDICOMImportJobs.go index ce91ae213f2..a1b782a8ece 100644 --- a/service/medicalimaging/api_op_ListDICOMImportJobs.go +++ b/service/medicalimaging/api_op_ListDICOMImportJobs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDICOMImportJobsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDICOMImportJobsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListDICOMImportJobsMiddlewares(stack *middleware.St return nil } -// ListDICOMImportJobsAPIClient is a client that implements the -// ListDICOMImportJobs operation. -type ListDICOMImportJobsAPIClient interface { - ListDICOMImportJobs(context.Context, *ListDICOMImportJobsInput, ...func(*Options)) (*ListDICOMImportJobsOutput, error) -} - -var _ ListDICOMImportJobsAPIClient = (*Client)(nil) - // ListDICOMImportJobsPaginatorOptions is the paginator options for // ListDICOMImportJobs type ListDICOMImportJobsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListDICOMImportJobsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDICOMImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListDICOMImportJobsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListDICOMImportJobsAPIClient is a client that implements the +// ListDICOMImportJobs operation. +type ListDICOMImportJobsAPIClient interface { + ListDICOMImportJobs(context.Context, *ListDICOMImportJobsInput, ...func(*Options)) (*ListDICOMImportJobsOutput, error) +} + +var _ ListDICOMImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDICOMImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medicalimaging/api_op_ListDatastores.go b/service/medicalimaging/api_op_ListDatastores.go index 22d678722b6..af258f42268 100644 --- a/service/medicalimaging/api_op_ListDatastores.go +++ b/service/medicalimaging/api_op_ListDatastores.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListDatastoresMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatastores(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListDatastoresMiddlewares(stack *middleware.Stack, return nil } -// ListDatastoresAPIClient is a client that implements the ListDatastores -// operation. -type ListDatastoresAPIClient interface { - ListDatastores(context.Context, *ListDatastoresInput, ...func(*Options)) (*ListDatastoresOutput, error) -} - -var _ ListDatastoresAPIClient = (*Client)(nil) - // ListDatastoresPaginatorOptions is the paginator options for ListDatastores type ListDatastoresPaginatorOptions struct { // Valid Range: Minimum value of 1. Maximum value of 50. @@ -205,6 +200,9 @@ func (p *ListDatastoresPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatastores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListDatastoresPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListDatastoresAPIClient is a client that implements the ListDatastores +// operation. +type ListDatastoresAPIClient interface { + ListDatastores(context.Context, *ListDatastoresInput, ...func(*Options)) (*ListDatastoresOutput, error) +} + +var _ ListDatastoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatastores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medicalimaging/api_op_ListImageSetVersions.go b/service/medicalimaging/api_op_ListImageSetVersions.go index ff90bae334e..e24010ceebe 100644 --- a/service/medicalimaging/api_op_ListImageSetVersions.go +++ b/service/medicalimaging/api_op_ListImageSetVersions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListImageSetVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListImageSetVersionsMiddleware(stack); err != nil { return err } @@ -151,41 +154,6 @@ func (c *Client) addOperationListImageSetVersionsMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListImageSetVersionsMiddleware struct { -} - -func (*endpointPrefix_opListImageSetVersionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListImageSetVersionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "runtime-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListImageSetVersionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListImageSetVersionsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListImageSetVersionsAPIClient is a client that implements the -// ListImageSetVersions operation. -type ListImageSetVersionsAPIClient interface { - ListImageSetVersions(context.Context, *ListImageSetVersionsInput, ...func(*Options)) (*ListImageSetVersionsOutput, error) -} - -var _ ListImageSetVersionsAPIClient = (*Client)(nil) - // ListImageSetVersionsPaginatorOptions is the paginator options for // ListImageSetVersions type ListImageSetVersionsPaginatorOptions struct { @@ -250,6 +218,9 @@ func (p *ListImageSetVersionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImageSetVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +240,41 @@ func (p *ListImageSetVersionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListImageSetVersionsMiddleware struct { +} + +func (*endpointPrefix_opListImageSetVersionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListImageSetVersionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "runtime-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListImageSetVersionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListImageSetVersionsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListImageSetVersionsAPIClient is a client that implements the +// ListImageSetVersions operation. +type ListImageSetVersionsAPIClient interface { + ListImageSetVersions(context.Context, *ListImageSetVersionsInput, ...func(*Options)) (*ListImageSetVersionsOutput, error) +} + +var _ ListImageSetVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImageSetVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medicalimaging/api_op_ListTagsForResource.go b/service/medicalimaging/api_op_ListTagsForResource.go index e1873af8368..da6a9a46ad0 100644 --- a/service/medicalimaging/api_op_ListTagsForResource.go +++ b/service/medicalimaging/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_SearchImageSets.go b/service/medicalimaging/api_op_SearchImageSets.go index 95d8a564868..e5fefceb63d 100644 --- a/service/medicalimaging/api_op_SearchImageSets.go +++ b/service/medicalimaging/api_op_SearchImageSets.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSearchImageSetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opSearchImageSetsMiddleware(stack); err != nil { return err } @@ -160,41 +163,6 @@ func (c *Client) addOperationSearchImageSetsMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opSearchImageSetsMiddleware struct { -} - -func (*endpointPrefix_opSearchImageSetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opSearchImageSetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "runtime-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opSearchImageSetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opSearchImageSetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// SearchImageSetsAPIClient is a client that implements the SearchImageSets -// operation. -type SearchImageSetsAPIClient interface { - SearchImageSets(context.Context, *SearchImageSetsInput, ...func(*Options)) (*SearchImageSetsOutput, error) -} - -var _ SearchImageSetsAPIClient = (*Client)(nil) - // SearchImageSetsPaginatorOptions is the paginator options for SearchImageSets type SearchImageSetsPaginatorOptions struct { // The maximum number of results that can be returned in a search. @@ -258,6 +226,9 @@ func (p *SearchImageSetsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchImageSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +248,41 @@ func (p *SearchImageSetsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +type endpointPrefix_opSearchImageSetsMiddleware struct { +} + +func (*endpointPrefix_opSearchImageSetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opSearchImageSetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "runtime-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opSearchImageSetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opSearchImageSetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// SearchImageSetsAPIClient is a client that implements the SearchImageSets +// operation. +type SearchImageSetsAPIClient interface { + SearchImageSets(context.Context, *SearchImageSetsInput, ...func(*Options)) (*SearchImageSetsOutput, error) +} + +var _ SearchImageSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchImageSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/medicalimaging/api_op_StartDICOMImportJob.go b/service/medicalimaging/api_op_StartDICOMImportJob.go index 8546fcce53e..2f32cb774f6 100644 --- a/service/medicalimaging/api_op_StartDICOMImportJob.go +++ b/service/medicalimaging/api_op_StartDICOMImportJob.go @@ -156,6 +156,9 @@ func (c *Client) addOperationStartDICOMImportJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartDICOMImportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/medicalimaging/api_op_TagResource.go b/service/medicalimaging/api_op_TagResource.go index 2c1b6fee6a7..0ed59a2c248 100644 --- a/service/medicalimaging/api_op_TagResource.go +++ b/service/medicalimaging/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_UntagResource.go b/service/medicalimaging/api_op_UntagResource.go index 3b4fcd122a7..f1e6bb57825 100644 --- a/service/medicalimaging/api_op_UntagResource.go +++ b/service/medicalimaging/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/medicalimaging/api_op_UpdateImageSetMetadata.go b/service/medicalimaging/api_op_UpdateImageSetMetadata.go index 76c466d2f6b..d0a37a08435 100644 --- a/service/medicalimaging/api_op_UpdateImageSetMetadata.go +++ b/service/medicalimaging/api_op_UpdateImageSetMetadata.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateImageSetMetadataMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateImageSetMetadataMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_client.go b/service/memorydb/api_client.go index 7b910cc1fe6..859dd992425 100644 --- a/service/memorydb/api_client.go +++ b/service/memorydb/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/memorydb/api_op_BatchUpdateCluster.go b/service/memorydb/api_op_BatchUpdateCluster.go index bee5b4b1cca..1a13d14ac25 100644 --- a/service/memorydb/api_op_BatchUpdateCluster.go +++ b/service/memorydb/api_op_BatchUpdateCluster.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchUpdateClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CopySnapshot.go b/service/memorydb/api_op_CopySnapshot.go index 018fe6aeacd..41815f71c69 100644 --- a/service/memorydb/api_op_CopySnapshot.go +++ b/service/memorydb/api_op_CopySnapshot.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCopySnapshotMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopySnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CreateACL.go b/service/memorydb/api_op_CreateACL.go index 2b322aa1c2f..99ea0059883 100644 --- a/service/memorydb/api_op_CreateACL.go +++ b/service/memorydb/api_op_CreateACL.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateACLMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CreateCluster.go b/service/memorydb/api_op_CreateCluster.go index 3d2ffa803af..1747ea120e0 100644 --- a/service/memorydb/api_op_CreateCluster.go +++ b/service/memorydb/api_op_CreateCluster.go @@ -215,6 +215,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CreateParameterGroup.go b/service/memorydb/api_op_CreateParameterGroup.go index 01eec763e37..ba51a7c6d55 100644 --- a/service/memorydb/api_op_CreateParameterGroup.go +++ b/service/memorydb/api_op_CreateParameterGroup.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CreateSnapshot.go b/service/memorydb/api_op_CreateSnapshot.go index f1dbbc518ef..88548dae89c 100644 --- a/service/memorydb/api_op_CreateSnapshot.go +++ b/service/memorydb/api_op_CreateSnapshot.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CreateSubnetGroup.go b/service/memorydb/api_op_CreateSubnetGroup.go index d0f2b489bf9..ba1fbde6367 100644 --- a/service/memorydb/api_op_CreateSubnetGroup.go +++ b/service/memorydb/api_op_CreateSubnetGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateSubnetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_CreateUser.go b/service/memorydb/api_op_CreateUser.go index a164f2e86c6..3b907557c74 100644 --- a/service/memorydb/api_op_CreateUser.go +++ b/service/memorydb/api_op_CreateUser.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DeleteACL.go b/service/memorydb/api_op_DeleteACL.go index f0a5e8ea0c5..3d57214fc8a 100644 --- a/service/memorydb/api_op_DeleteACL.go +++ b/service/memorydb/api_op_DeleteACL.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteACLMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DeleteCluster.go b/service/memorydb/api_op_DeleteCluster.go index 38592fecd61..5d51dc85a59 100644 --- a/service/memorydb/api_op_DeleteCluster.go +++ b/service/memorydb/api_op_DeleteCluster.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DeleteParameterGroup.go b/service/memorydb/api_op_DeleteParameterGroup.go index 44abc6ae7e3..c7e61b20249 100644 --- a/service/memorydb/api_op_DeleteParameterGroup.go +++ b/service/memorydb/api_op_DeleteParameterGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DeleteSnapshot.go b/service/memorydb/api_op_DeleteSnapshot.go index e4414015d35..bb674db21d7 100644 --- a/service/memorydb/api_op_DeleteSnapshot.go +++ b/service/memorydb/api_op_DeleteSnapshot.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DeleteSubnetGroup.go b/service/memorydb/api_op_DeleteSubnetGroup.go index 6138269dfa4..76c217d344d 100644 --- a/service/memorydb/api_op_DeleteSubnetGroup.go +++ b/service/memorydb/api_op_DeleteSubnetGroup.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteSubnetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DeleteUser.go b/service/memorydb/api_op_DeleteUser.go index be2f9e910de..304f975389b 100644 --- a/service/memorydb/api_op_DeleteUser.go +++ b/service/memorydb/api_op_DeleteUser.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_DescribeACLs.go b/service/memorydb/api_op_DescribeACLs.go index 28e32312824..68a167a3e47 100644 --- a/service/memorydb/api_op_DescribeACLs.go +++ b/service/memorydb/api_op_DescribeACLs.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeACLsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeACLs(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationDescribeACLsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeACLsAPIClient is a client that implements the DescribeACLs operation. -type DescribeACLsAPIClient interface { - DescribeACLs(context.Context, *DescribeACLsInput, ...func(*Options)) (*DescribeACLsOutput, error) -} - -var _ DescribeACLsAPIClient = (*Client)(nil) - // DescribeACLsPaginatorOptions is the paginator options for DescribeACLs type DescribeACLsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -215,6 +211,9 @@ func (p *DescribeACLsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeACLs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *DescribeACLsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeACLsAPIClient is a client that implements the DescribeACLs operation. +type DescribeACLsAPIClient interface { + DescribeACLs(context.Context, *DescribeACLsInput, ...func(*Options)) (*DescribeACLsOutput, error) +} + +var _ DescribeACLsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeACLs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeClusters.go b/service/memorydb/api_op_DescribeClusters.go index 78b2b0c7f2a..a350168cac3 100644 --- a/service/memorydb/api_op_DescribeClusters.go +++ b/service/memorydb/api_op_DescribeClusters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusters(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack return nil } -// DescribeClustersAPIClient is a client that implements the DescribeClusters -// operation. -type DescribeClustersAPIClient interface { - DescribeClusters(context.Context, *DescribeClustersInput, ...func(*Options)) (*DescribeClustersOutput, error) -} - -var _ DescribeClustersAPIClient = (*Client)(nil) - // DescribeClustersPaginatorOptions is the paginator options for DescribeClusters type DescribeClustersPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -222,6 +217,9 @@ func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeClustersAPIClient is a client that implements the DescribeClusters +// operation. +type DescribeClustersAPIClient interface { + DescribeClusters(context.Context, *DescribeClustersInput, ...func(*Options)) (*DescribeClustersOutput, error) +} + +var _ DescribeClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeEngineVersions.go b/service/memorydb/api_op_DescribeEngineVersions.go index 15be6144fdf..29bd669fc9f 100644 --- a/service/memorydb/api_op_DescribeEngineVersions.go +++ b/service/memorydb/api_op_DescribeEngineVersions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeEngineVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEngineVersions(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeEngineVersionsMiddlewares(stack *middleware return nil } -// DescribeEngineVersionsAPIClient is a client that implements the -// DescribeEngineVersions operation. -type DescribeEngineVersionsAPIClient interface { - DescribeEngineVersions(context.Context, *DescribeEngineVersionsInput, ...func(*Options)) (*DescribeEngineVersionsOutput, error) -} - -var _ DescribeEngineVersionsAPIClient = (*Client)(nil) - // DescribeEngineVersionsPaginatorOptions is the paginator options for // DescribeEngineVersions type DescribeEngineVersionsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeEngineVersionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeEngineVersionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeEngineVersionsAPIClient is a client that implements the +// DescribeEngineVersions operation. +type DescribeEngineVersionsAPIClient interface { + DescribeEngineVersions(context.Context, *DescribeEngineVersionsInput, ...func(*Options)) (*DescribeEngineVersionsOutput, error) +} + +var _ DescribeEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeEvents.go b/service/memorydb/api_op_DescribeEvents.go index a086a20c765..8a05800e907 100644 --- a/service/memorydb/api_op_DescribeEvents.go +++ b/service/memorydb/api_op_DescribeEvents.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -244,6 +239,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeParameterGroups.go b/service/memorydb/api_op_DescribeParameterGroups.go index 697ae7aa811..259a5462e95 100644 --- a/service/memorydb/api_op_DescribeParameterGroups.go +++ b/service/memorydb/api_op_DescribeParameterGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeParameterGroupsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeParameterGroups(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeParameterGroupsMiddlewares(stack *middlewar return nil } -// DescribeParameterGroupsAPIClient is a client that implements the -// DescribeParameterGroups operation. -type DescribeParameterGroupsAPIClient interface { - DescribeParameterGroups(context.Context, *DescribeParameterGroupsInput, ...func(*Options)) (*DescribeParameterGroupsOutput, error) -} - -var _ DescribeParameterGroupsAPIClient = (*Client)(nil) - // DescribeParameterGroupsPaginatorOptions is the paginator options for // DescribeParameterGroups type DescribeParameterGroupsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeParameterGroupsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeParameterGroupsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeParameterGroupsAPIClient is a client that implements the +// DescribeParameterGroups operation. +type DescribeParameterGroupsAPIClient interface { + DescribeParameterGroups(context.Context, *DescribeParameterGroupsInput, ...func(*Options)) (*DescribeParameterGroupsOutput, error) +} + +var _ DescribeParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeParameters.go b/service/memorydb/api_op_DescribeParameters.go index 33692c05ef5..01f44306471 100644 --- a/service/memorydb/api_op_DescribeParameters.go +++ b/service/memorydb/api_op_DescribeParameters.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeParametersValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta return nil } -// DescribeParametersAPIClient is a client that implements the DescribeParameters -// operation. -type DescribeParametersAPIClient interface { - DescribeParameters(context.Context, *DescribeParametersInput, ...func(*Options)) (*DescribeParametersOutput, error) -} - -var _ DescribeParametersAPIClient = (*Client)(nil) - // DescribeParametersPaginatorOptions is the paginator options for // DescribeParameters type DescribeParametersPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeParametersAPIClient is a client that implements the DescribeParameters +// operation. +type DescribeParametersAPIClient interface { + DescribeParameters(context.Context, *DescribeParametersInput, ...func(*Options)) (*DescribeParametersOutput, error) +} + +var _ DescribeParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeReservedNodes.go b/service/memorydb/api_op_DescribeReservedNodes.go index cae02183935..946bd5d5538 100644 --- a/service/memorydb/api_op_DescribeReservedNodes.go +++ b/service/memorydb/api_op_DescribeReservedNodes.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeReservedNodesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedNodes(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeReservedNodesMiddlewares(stack *middleware. return nil } -// DescribeReservedNodesAPIClient is a client that implements the -// DescribeReservedNodes operation. -type DescribeReservedNodesAPIClient interface { - DescribeReservedNodes(context.Context, *DescribeReservedNodesInput, ...func(*Options)) (*DescribeReservedNodesOutput, error) -} - -var _ DescribeReservedNodesAPIClient = (*Client)(nil) - // DescribeReservedNodesPaginatorOptions is the paginator options for // DescribeReservedNodes type DescribeReservedNodesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeReservedNodesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeReservedNodesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeReservedNodesAPIClient is a client that implements the +// DescribeReservedNodes operation. +type DescribeReservedNodesAPIClient interface { + DescribeReservedNodes(context.Context, *DescribeReservedNodesInput, ...func(*Options)) (*DescribeReservedNodesOutput, error) +} + +var _ DescribeReservedNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeReservedNodesOfferings.go b/service/memorydb/api_op_DescribeReservedNodesOfferings.go index 133911815ad..907b771197c 100644 --- a/service/memorydb/api_op_DescribeReservedNodesOfferings.go +++ b/service/memorydb/api_op_DescribeReservedNodesOfferings.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeReservedNodesOfferingsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedNodesOfferings(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeReservedNodesOfferingsMiddlewares(stack *mi return nil } -// DescribeReservedNodesOfferingsAPIClient is a client that implements the -// DescribeReservedNodesOfferings operation. -type DescribeReservedNodesOfferingsAPIClient interface { - DescribeReservedNodesOfferings(context.Context, *DescribeReservedNodesOfferingsInput, ...func(*Options)) (*DescribeReservedNodesOfferingsOutput, error) -} - -var _ DescribeReservedNodesOfferingsAPIClient = (*Client)(nil) - // DescribeReservedNodesOfferingsPaginatorOptions is the paginator options for // DescribeReservedNodesOfferings type DescribeReservedNodesOfferingsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeReservedNodesOfferingsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedNodesOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeReservedNodesOfferingsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeReservedNodesOfferingsAPIClient is a client that implements the +// DescribeReservedNodesOfferings operation. +type DescribeReservedNodesOfferingsAPIClient interface { + DescribeReservedNodesOfferings(context.Context, *DescribeReservedNodesOfferingsInput, ...func(*Options)) (*DescribeReservedNodesOfferingsOutput, error) +} + +var _ DescribeReservedNodesOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedNodesOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeServiceUpdates.go b/service/memorydb/api_op_DescribeServiceUpdates.go index 4d9a5872a2f..887015be731 100644 --- a/service/memorydb/api_op_DescribeServiceUpdates.go +++ b/service/memorydb/api_op_DescribeServiceUpdates.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeServiceUpdatesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServiceUpdates(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeServiceUpdatesMiddlewares(stack *middleware return nil } -// DescribeServiceUpdatesAPIClient is a client that implements the -// DescribeServiceUpdates operation. -type DescribeServiceUpdatesAPIClient interface { - DescribeServiceUpdates(context.Context, *DescribeServiceUpdatesInput, ...func(*Options)) (*DescribeServiceUpdatesOutput, error) -} - -var _ DescribeServiceUpdatesAPIClient = (*Client)(nil) - // DescribeServiceUpdatesPaginatorOptions is the paginator options for // DescribeServiceUpdates type DescribeServiceUpdatesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeServiceUpdatesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeServiceUpdates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeServiceUpdatesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeServiceUpdatesAPIClient is a client that implements the +// DescribeServiceUpdates operation. +type DescribeServiceUpdatesAPIClient interface { + DescribeServiceUpdates(context.Context, *DescribeServiceUpdatesInput, ...func(*Options)) (*DescribeServiceUpdatesOutput, error) +} + +var _ DescribeServiceUpdatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServiceUpdates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeSnapshots.go b/service/memorydb/api_op_DescribeSnapshots.go index 53b1e8af0ad..36aad6328de 100644 --- a/service/memorydb/api_op_DescribeSnapshots.go +++ b/service/memorydb/api_op_DescribeSnapshots.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stac return nil } -// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots -// operation. -type DescribeSnapshotsAPIClient interface { - DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) -} - -var _ DescribeSnapshotsAPIClient = (*Client)(nil) - // DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots type DescribeSnapshotsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -234,6 +229,9 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots +// operation. +type DescribeSnapshotsAPIClient interface { + DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) +} + +var _ DescribeSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeSubnetGroups.go b/service/memorydb/api_op_DescribeSubnetGroups.go index 135a4890b46..bb436dde0c2 100644 --- a/service/memorydb/api_op_DescribeSubnetGroups.go +++ b/service/memorydb/api_op_DescribeSubnetGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeSubnetGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSubnetGroups(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeSubnetGroupsMiddlewares(stack *middleware.S return nil } -// DescribeSubnetGroupsAPIClient is a client that implements the -// DescribeSubnetGroups operation. -type DescribeSubnetGroupsAPIClient interface { - DescribeSubnetGroups(context.Context, *DescribeSubnetGroupsInput, ...func(*Options)) (*DescribeSubnetGroupsOutput, error) -} - -var _ DescribeSubnetGroupsAPIClient = (*Client)(nil) - // DescribeSubnetGroupsPaginatorOptions is the paginator options for // DescribeSubnetGroups type DescribeSubnetGroupsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *DescribeSubnetGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeSubnetGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeSubnetGroupsAPIClient is a client that implements the +// DescribeSubnetGroups operation. +type DescribeSubnetGroupsAPIClient interface { + DescribeSubnetGroups(context.Context, *DescribeSubnetGroupsInput, ...func(*Options)) (*DescribeSubnetGroupsOutput, error) +} + +var _ DescribeSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_DescribeUsers.go b/service/memorydb/api_op_DescribeUsers.go index 2a96d5745e5..c2ec344ad5d 100644 --- a/service/memorydb/api_op_DescribeUsers.go +++ b/service/memorydb/api_op_DescribeUsers.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUsersValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o return nil } -// DescribeUsersAPIClient is a client that implements the DescribeUsers operation. -type DescribeUsersAPIClient interface { - DescribeUsers(context.Context, *DescribeUsersInput, ...func(*Options)) (*DescribeUsersOutput, error) -} - -var _ DescribeUsersAPIClient = (*Client)(nil) - // DescribeUsersPaginatorOptions is the paginator options for DescribeUsers type DescribeUsersPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -222,6 +218,9 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeUsersAPIClient is a client that implements the DescribeUsers operation. +type DescribeUsersAPIClient interface { + DescribeUsers(context.Context, *DescribeUsersInput, ...func(*Options)) (*DescribeUsersOutput, error) +} + +var _ DescribeUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/memorydb/api_op_FailoverShard.go b/service/memorydb/api_op_FailoverShard.go index 4444ccbb1c3..165709cb252 100644 --- a/service/memorydb/api_op_FailoverShard.go +++ b/service/memorydb/api_op_FailoverShard.go @@ -115,6 +115,9 @@ func (c *Client) addOperationFailoverShardMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFailoverShardValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_ListAllowedNodeTypeUpdates.go b/service/memorydb/api_op_ListAllowedNodeTypeUpdates.go index a50f5638e97..232c8a656ce 100644 --- a/service/memorydb/api_op_ListAllowedNodeTypeUpdates.go +++ b/service/memorydb/api_op_ListAllowedNodeTypeUpdates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListAllowedNodeTypeUpdatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAllowedNodeTypeUpdatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_ListTags.go b/service/memorydb/api_op_ListTags.go index 7e04b7ad62a..9e92787e202 100644 --- a/service/memorydb/api_op_ListTags.go +++ b/service/memorydb/api_op_ListTags.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_PurchaseReservedNodesOffering.go b/service/memorydb/api_op_PurchaseReservedNodesOffering.go index 3b3a5ae4bc6..934ed061129 100644 --- a/service/memorydb/api_op_PurchaseReservedNodesOffering.go +++ b/service/memorydb/api_op_PurchaseReservedNodesOffering.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPurchaseReservedNodesOfferingMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedNodesOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_ResetParameterGroup.go b/service/memorydb/api_op_ResetParameterGroup.go index 333d2a4efdb..fb5b00bd422 100644 --- a/service/memorydb/api_op_ResetParameterGroup.go +++ b/service/memorydb/api_op_ResetParameterGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationResetParameterGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_TagResource.go b/service/memorydb/api_op_TagResource.go index eaff07d3962..4b2d4e14664 100644 --- a/service/memorydb/api_op_TagResource.go +++ b/service/memorydb/api_op_TagResource.go @@ -129,6 +129,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_UntagResource.go b/service/memorydb/api_op_UntagResource.go index 3ee621123bf..739cd645f23 100644 --- a/service/memorydb/api_op_UntagResource.go +++ b/service/memorydb/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_UpdateACL.go b/service/memorydb/api_op_UpdateACL.go index ce605d05c43..6d52dea6722 100644 --- a/service/memorydb/api_op_UpdateACL.go +++ b/service/memorydb/api_op_UpdateACL.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateACLMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_UpdateCluster.go b/service/memorydb/api_op_UpdateCluster.go index 34cfbd7b734..e2f8ebbae54 100644 --- a/service/memorydb/api_op_UpdateCluster.go +++ b/service/memorydb/api_op_UpdateCluster.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_UpdateParameterGroup.go b/service/memorydb/api_op_UpdateParameterGroup.go index 41087b3e54c..dacb72f4cfc 100644 --- a/service/memorydb/api_op_UpdateParameterGroup.go +++ b/service/memorydb/api_op_UpdateParameterGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_UpdateSubnetGroup.go b/service/memorydb/api_op_UpdateSubnetGroup.go index 457347fe386..eadc585651d 100644 --- a/service/memorydb/api_op_UpdateSubnetGroup.go +++ b/service/memorydb/api_op_UpdateSubnetGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateSubnetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/memorydb/api_op_UpdateUser.go b/service/memorydb/api_op_UpdateUser.go index 09a483495fe..cc5a4a4c699 100644 --- a/service/memorydb/api_op_UpdateUser.go +++ b/service/memorydb/api_op_UpdateUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_client.go b/service/mgn/api_client.go index bdbb2d70bbc..7595dac63d0 100644 --- a/service/mgn/api_client.go +++ b/service/mgn/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/mgn/api_op_ArchiveApplication.go b/service/mgn/api_op_ArchiveApplication.go index 8a58ac8fbb3..b897e0fa121 100644 --- a/service/mgn/api_op_ArchiveApplication.go +++ b/service/mgn/api_op_ArchiveApplication.go @@ -136,6 +136,9 @@ func (c *Client) addOperationArchiveApplicationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpArchiveApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_ArchiveWave.go b/service/mgn/api_op_ArchiveWave.go index 21577aa75d9..7c9410b47ef 100644 --- a/service/mgn/api_op_ArchiveWave.go +++ b/service/mgn/api_op_ArchiveWave.go @@ -133,6 +133,9 @@ func (c *Client) addOperationArchiveWaveMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpArchiveWaveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_AssociateApplications.go b/service/mgn/api_op_AssociateApplications.go index 48530c44a04..2c52ee0c01f 100644 --- a/service/mgn/api_op_AssociateApplications.go +++ b/service/mgn/api_op_AssociateApplications.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAssociateApplicationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateApplicationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_AssociateSourceServers.go b/service/mgn/api_op_AssociateSourceServers.go index a2d65147405..ebb63d6bbfc 100644 --- a/service/mgn/api_op_AssociateSourceServers.go +++ b/service/mgn/api_op_AssociateSourceServers.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAssociateSourceServersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSourceServersValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_ChangeServerLifeCycleState.go b/service/mgn/api_op_ChangeServerLifeCycleState.go index f5942eeaecd..8f39bce1b03 100644 --- a/service/mgn/api_op_ChangeServerLifeCycleState.go +++ b/service/mgn/api_op_ChangeServerLifeCycleState.go @@ -157,6 +157,9 @@ func (c *Client) addOperationChangeServerLifeCycleStateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangeServerLifeCycleStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_CreateApplication.go b/service/mgn/api_op_CreateApplication.go index 9d55254c3c0..8881a874e3c 100644 --- a/service/mgn/api_op_CreateApplication.go +++ b/service/mgn/api_op_CreateApplication.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_CreateConnector.go b/service/mgn/api_op_CreateConnector.go index 817b9be6bfd..d34b4751b34 100644 --- a/service/mgn/api_op_CreateConnector.go +++ b/service/mgn/api_op_CreateConnector.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_CreateLaunchConfigurationTemplate.go b/service/mgn/api_op_CreateLaunchConfigurationTemplate.go index 0c5b3b20fec..0a30d0a7020 100644 --- a/service/mgn/api_op_CreateLaunchConfigurationTemplate.go +++ b/service/mgn/api_op_CreateLaunchConfigurationTemplate.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateLaunchConfigurationTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLaunchConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_CreateReplicationConfigurationTemplate.go b/service/mgn/api_op_CreateReplicationConfigurationTemplate.go index ef7230120d0..7af731d4d37 100644 --- a/service/mgn/api_op_CreateReplicationConfigurationTemplate.go +++ b/service/mgn/api_op_CreateReplicationConfigurationTemplate.go @@ -224,6 +224,9 @@ func (c *Client) addOperationCreateReplicationConfigurationTemplateMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_CreateWave.go b/service/mgn/api_op_CreateWave.go index fed95e9ee6f..12f454f876e 100644 --- a/service/mgn/api_op_CreateWave.go +++ b/service/mgn/api_op_CreateWave.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateWaveMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWaveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteApplication.go b/service/mgn/api_op_DeleteApplication.go index 09756b297f4..6707838a53b 100644 --- a/service/mgn/api_op_DeleteApplication.go +++ b/service/mgn/api_op_DeleteApplication.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteConnector.go b/service/mgn/api_op_DeleteConnector.go index f7b1b03a8cd..9e0a2a1d2d9 100644 --- a/service/mgn/api_op_DeleteConnector.go +++ b/service/mgn/api_op_DeleteConnector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteJob.go b/service/mgn/api_op_DeleteJob.go index 08c28159a62..608a08ecffb 100644 --- a/service/mgn/api_op_DeleteJob.go +++ b/service/mgn/api_op_DeleteJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteLaunchConfigurationTemplate.go b/service/mgn/api_op_DeleteLaunchConfigurationTemplate.go index aee21acf223..7446dcd223a 100644 --- a/service/mgn/api_op_DeleteLaunchConfigurationTemplate.go +++ b/service/mgn/api_op_DeleteLaunchConfigurationTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteLaunchConfigurationTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLaunchConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteReplicationConfigurationTemplate.go b/service/mgn/api_op_DeleteReplicationConfigurationTemplate.go index af68c166fba..d477e842ab8 100644 --- a/service/mgn/api_op_DeleteReplicationConfigurationTemplate.go +++ b/service/mgn/api_op_DeleteReplicationConfigurationTemplate.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteReplicationConfigurationTemplateMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteSourceServer.go b/service/mgn/api_op_DeleteSourceServer.go index 5f200b222ff..eaf8765344e 100644 --- a/service/mgn/api_op_DeleteSourceServer.go +++ b/service/mgn/api_op_DeleteSourceServer.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSourceServerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteVcenterClient.go b/service/mgn/api_op_DeleteVcenterClient.go index f6057fc515c..5700e3e2e18 100644 --- a/service/mgn/api_op_DeleteVcenterClient.go +++ b/service/mgn/api_op_DeleteVcenterClient.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteVcenterClientMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVcenterClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DeleteWave.go b/service/mgn/api_op_DeleteWave.go index d3cf5fc42c5..6d0c5904981 100644 --- a/service/mgn/api_op_DeleteWave.go +++ b/service/mgn/api_op_DeleteWave.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteWaveMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWaveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DescribeJobLogItems.go b/service/mgn/api_op_DescribeJobLogItems.go index 47fda1a5c23..a6bd6dac2fc 100644 --- a/service/mgn/api_op_DescribeJobLogItems.go +++ b/service/mgn/api_op_DescribeJobLogItems.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeJobLogItemsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobLogItemsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeJobLogItemsMiddlewares(stack *middleware.St return nil } -// DescribeJobLogItemsAPIClient is a client that implements the -// DescribeJobLogItems operation. -type DescribeJobLogItemsAPIClient interface { - DescribeJobLogItems(context.Context, *DescribeJobLogItemsInput, ...func(*Options)) (*DescribeJobLogItemsOutput, error) -} - -var _ DescribeJobLogItemsAPIClient = (*Client)(nil) - // DescribeJobLogItemsPaginatorOptions is the paginator options for // DescribeJobLogItems type DescribeJobLogItemsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *DescribeJobLogItemsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeJobLogItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeJobLogItemsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeJobLogItemsAPIClient is a client that implements the +// DescribeJobLogItems operation. +type DescribeJobLogItemsAPIClient interface { + DescribeJobLogItems(context.Context, *DescribeJobLogItemsInput, ...func(*Options)) (*DescribeJobLogItemsOutput, error) +} + +var _ DescribeJobLogItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeJobLogItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_DescribeJobs.go b/service/mgn/api_op_DescribeJobs.go index 1f6f41d3225..d628e11e17b 100644 --- a/service/mgn/api_op_DescribeJobs.go +++ b/service/mgn/api_op_DescribeJobs.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeJobsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeJobs(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationDescribeJobsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeJobsAPIClient is a client that implements the DescribeJobs operation. -type DescribeJobsAPIClient interface { - DescribeJobs(context.Context, *DescribeJobsInput, ...func(*Options)) (*DescribeJobsOutput, error) -} - -var _ DescribeJobsAPIClient = (*Client)(nil) - // DescribeJobsPaginatorOptions is the paginator options for DescribeJobs type DescribeJobsPaginatorOptions struct { // Request to describe job log items by max results. @@ -212,6 +208,9 @@ func (p *DescribeJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *DescribeJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeJobsAPIClient is a client that implements the DescribeJobs operation. +type DescribeJobsAPIClient interface { + DescribeJobs(context.Context, *DescribeJobsInput, ...func(*Options)) (*DescribeJobsOutput, error) +} + +var _ DescribeJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_DescribeLaunchConfigurationTemplates.go b/service/mgn/api_op_DescribeLaunchConfigurationTemplates.go index ef61e98e77b..056b48ff58d 100644 --- a/service/mgn/api_op_DescribeLaunchConfigurationTemplates.go +++ b/service/mgn/api_op_DescribeLaunchConfigurationTemplates.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeLaunchConfigurationTemplatesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchConfigurationTemplates(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeLaunchConfigurationTemplatesMiddlewares(sta return nil } -// DescribeLaunchConfigurationTemplatesAPIClient is a client that implements the -// DescribeLaunchConfigurationTemplates operation. -type DescribeLaunchConfigurationTemplatesAPIClient interface { - DescribeLaunchConfigurationTemplates(context.Context, *DescribeLaunchConfigurationTemplatesInput, ...func(*Options)) (*DescribeLaunchConfigurationTemplatesOutput, error) -} - -var _ DescribeLaunchConfigurationTemplatesAPIClient = (*Client)(nil) - // DescribeLaunchConfigurationTemplatesPaginatorOptions is the paginator options // for DescribeLaunchConfigurationTemplates type DescribeLaunchConfigurationTemplatesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *DescribeLaunchConfigurationTemplatesPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeLaunchConfigurationTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *DescribeLaunchConfigurationTemplatesPaginator) NextPage(ctx context.Con return result, nil } +// DescribeLaunchConfigurationTemplatesAPIClient is a client that implements the +// DescribeLaunchConfigurationTemplates operation. +type DescribeLaunchConfigurationTemplatesAPIClient interface { + DescribeLaunchConfigurationTemplates(context.Context, *DescribeLaunchConfigurationTemplatesInput, ...func(*Options)) (*DescribeLaunchConfigurationTemplatesOutput, error) +} + +var _ DescribeLaunchConfigurationTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeLaunchConfigurationTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go b/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go index 7b87f7c420d..cd8677cb5dc 100644 --- a/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go +++ b/service/mgn/api_op_DescribeReplicationConfigurationTemplates.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeReplicationConfigurationTemplatesMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplicationConfigurationTemplates(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationDescribeReplicationConfigurationTemplatesMiddleware return nil } -// DescribeReplicationConfigurationTemplatesAPIClient is a client that implements -// the DescribeReplicationConfigurationTemplates operation. -type DescribeReplicationConfigurationTemplatesAPIClient interface { - DescribeReplicationConfigurationTemplates(context.Context, *DescribeReplicationConfigurationTemplatesInput, ...func(*Options)) (*DescribeReplicationConfigurationTemplatesOutput, error) -} - -var _ DescribeReplicationConfigurationTemplatesAPIClient = (*Client)(nil) - // DescribeReplicationConfigurationTemplatesPaginatorOptions is the paginator // options for DescribeReplicationConfigurationTemplates type DescribeReplicationConfigurationTemplatesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *DescribeReplicationConfigurationTemplatesPaginator) NextPage(ctx contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReplicationConfigurationTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *DescribeReplicationConfigurationTemplatesPaginator) NextPage(ctx contex return result, nil } +// DescribeReplicationConfigurationTemplatesAPIClient is a client that implements +// the DescribeReplicationConfigurationTemplates operation. +type DescribeReplicationConfigurationTemplatesAPIClient interface { + DescribeReplicationConfigurationTemplates(context.Context, *DescribeReplicationConfigurationTemplatesInput, ...func(*Options)) (*DescribeReplicationConfigurationTemplatesOutput, error) +} + +var _ DescribeReplicationConfigurationTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReplicationConfigurationTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_DescribeSourceServers.go b/service/mgn/api_op_DescribeSourceServers.go index 17633537996..780092128d7 100644 --- a/service/mgn/api_op_DescribeSourceServers.go +++ b/service/mgn/api_op_DescribeSourceServers.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeSourceServersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSourceServers(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeSourceServersMiddlewares(stack *middleware. return nil } -// DescribeSourceServersAPIClient is a client that implements the -// DescribeSourceServers operation. -type DescribeSourceServersAPIClient interface { - DescribeSourceServers(context.Context, *DescribeSourceServersInput, ...func(*Options)) (*DescribeSourceServersOutput, error) -} - -var _ DescribeSourceServersAPIClient = (*Client)(nil) - // DescribeSourceServersPaginatorOptions is the paginator options for // DescribeSourceServers type DescribeSourceServersPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeSourceServersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSourceServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeSourceServersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeSourceServersAPIClient is a client that implements the +// DescribeSourceServers operation. +type DescribeSourceServersAPIClient interface { + DescribeSourceServers(context.Context, *DescribeSourceServersInput, ...func(*Options)) (*DescribeSourceServersOutput, error) +} + +var _ DescribeSourceServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSourceServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_DescribeVcenterClients.go b/service/mgn/api_op_DescribeVcenterClients.go index fa3ca5d7a83..f4aa7041bc3 100644 --- a/service/mgn/api_op_DescribeVcenterClients.go +++ b/service/mgn/api_op_DescribeVcenterClients.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeVcenterClientsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVcenterClients(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationDescribeVcenterClientsMiddlewares(stack *middleware return nil } -// DescribeVcenterClientsAPIClient is a client that implements the -// DescribeVcenterClients operation. -type DescribeVcenterClientsAPIClient interface { - DescribeVcenterClients(context.Context, *DescribeVcenterClientsInput, ...func(*Options)) (*DescribeVcenterClientsOutput, error) -} - -var _ DescribeVcenterClientsAPIClient = (*Client)(nil) - // DescribeVcenterClientsPaginatorOptions is the paginator options for // DescribeVcenterClients type DescribeVcenterClientsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *DescribeVcenterClientsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVcenterClients(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *DescribeVcenterClientsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeVcenterClientsAPIClient is a client that implements the +// DescribeVcenterClients operation. +type DescribeVcenterClientsAPIClient interface { + DescribeVcenterClients(context.Context, *DescribeVcenterClientsInput, ...func(*Options)) (*DescribeVcenterClientsOutput, error) +} + +var _ DescribeVcenterClientsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVcenterClients(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_DisassociateApplications.go b/service/mgn/api_op_DisassociateApplications.go index c68d10fc51e..6e7c3993924 100644 --- a/service/mgn/api_op_DisassociateApplications.go +++ b/service/mgn/api_op_DisassociateApplications.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisassociateApplicationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateApplicationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DisassociateSourceServers.go b/service/mgn/api_op_DisassociateSourceServers.go index 4037f8b74a7..bfe4a4a15ca 100644 --- a/service/mgn/api_op_DisassociateSourceServers.go +++ b/service/mgn/api_op_DisassociateSourceServers.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisassociateSourceServersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateSourceServersValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_DisconnectFromService.go b/service/mgn/api_op_DisconnectFromService.go index 8f918fe8eef..a5d0a91f683 100644 --- a/service/mgn/api_op_DisconnectFromService.go +++ b/service/mgn/api_op_DisconnectFromService.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDisconnectFromServiceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisconnectFromServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_FinalizeCutover.go b/service/mgn/api_op_FinalizeCutover.go index 743a0879033..6a6d57f1779 100644 --- a/service/mgn/api_op_FinalizeCutover.go +++ b/service/mgn/api_op_FinalizeCutover.go @@ -158,6 +158,9 @@ func (c *Client) addOperationFinalizeCutoverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFinalizeCutoverValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_GetLaunchConfiguration.go b/service/mgn/api_op_GetLaunchConfiguration.go index e62d6a71837..c0f6dc0f88f 100644 --- a/service/mgn/api_op_GetLaunchConfiguration.go +++ b/service/mgn/api_op_GetLaunchConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetLaunchConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_GetReplicationConfiguration.go b/service/mgn/api_op_GetReplicationConfiguration.go index 21f8b1e00e5..6a805538852 100644 --- a/service/mgn/api_op_GetReplicationConfiguration.go +++ b/service/mgn/api_op_GetReplicationConfiguration.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetReplicationConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_InitializeService.go b/service/mgn/api_op_InitializeService.go index 56a40c16193..73dcd758669 100644 --- a/service/mgn/api_op_InitializeService.go +++ b/service/mgn/api_op_InitializeService.go @@ -95,6 +95,9 @@ func (c *Client) addOperationInitializeServiceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInitializeService(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mgn/api_op_ListApplications.go b/service/mgn/api_op_ListApplications.go index 6957ed67d27..84e8e0f604e 100644 --- a/service/mgn/api_op_ListApplications.go +++ b/service/mgn/api_op_ListApplications.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // Maximum results to return when listing applications. @@ -208,6 +203,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListConnectors.go b/service/mgn/api_op_ListConnectors.go index 585d96c69a0..dcad6ef2ea0 100644 --- a/service/mgn/api_op_ListConnectors.go +++ b/service/mgn/api_op_ListConnectors.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectors(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectorsAPIClient is a client that implements the ListConnectors -// operation. -type ListConnectorsAPIClient interface { - ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) -} - -var _ ListConnectorsAPIClient = (*Client)(nil) - // ListConnectorsPaginatorOptions is the paginator options for ListConnectors type ListConnectorsPaginatorOptions struct { // List Connectors Request max results. @@ -205,6 +200,9 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListConnectorsAPIClient is a client that implements the ListConnectors +// operation. +type ListConnectorsAPIClient interface { + ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) +} + +var _ ListConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListExportErrors.go b/service/mgn/api_op_ListExportErrors.go index d70d249306c..1e5edfd6a7a 100644 --- a/service/mgn/api_op_ListExportErrors.go +++ b/service/mgn/api_op_ListExportErrors.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListExportErrorsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExportErrorsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListExportErrorsMiddlewares(stack *middleware.Stack return nil } -// ListExportErrorsAPIClient is a client that implements the ListExportErrors -// operation. -type ListExportErrorsAPIClient interface { - ListExportErrors(context.Context, *ListExportErrorsInput, ...func(*Options)) (*ListExportErrorsOutput, error) -} - -var _ ListExportErrorsAPIClient = (*Client)(nil) - // ListExportErrorsPaginatorOptions is the paginator options for ListExportErrors type ListExportErrorsPaginatorOptions struct { // List export errors request max results. @@ -212,6 +207,9 @@ func (p *ListExportErrorsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExportErrors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListExportErrorsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListExportErrorsAPIClient is a client that implements the ListExportErrors +// operation. +type ListExportErrorsAPIClient interface { + ListExportErrors(context.Context, *ListExportErrorsInput, ...func(*Options)) (*ListExportErrorsOutput, error) +} + +var _ ListExportErrorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExportErrors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListExports.go b/service/mgn/api_op_ListExports.go index 346bc439a09..b5b7b6b1e45 100644 --- a/service/mgn/api_op_ListExports.go +++ b/service/mgn/api_op_ListExports.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExports(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListExportsAPIClient is a client that implements the ListExports operation. -type ListExportsAPIClient interface { - ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) -} - -var _ ListExportsAPIClient = (*Client)(nil) - // ListExportsPaginatorOptions is the paginator options for ListExports type ListExportsPaginatorOptions struct { // List export request max results. @@ -206,6 +202,9 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListExportsAPIClient is a client that implements the ListExports operation. +type ListExportsAPIClient interface { + ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) +} + +var _ ListExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListImportErrors.go b/service/mgn/api_op_ListImportErrors.go index ddf3819cf0c..39488f59a88 100644 --- a/service/mgn/api_op_ListImportErrors.go +++ b/service/mgn/api_op_ListImportErrors.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListImportErrorsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImportErrorsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListImportErrorsMiddlewares(stack *middleware.Stack return nil } -// ListImportErrorsAPIClient is a client that implements the ListImportErrors -// operation. -type ListImportErrorsAPIClient interface { - ListImportErrors(context.Context, *ListImportErrorsInput, ...func(*Options)) (*ListImportErrorsOutput, error) -} - -var _ ListImportErrorsAPIClient = (*Client)(nil) - // ListImportErrorsPaginatorOptions is the paginator options for ListImportErrors type ListImportErrorsPaginatorOptions struct { // List import errors request max results. @@ -212,6 +207,9 @@ func (p *ListImportErrorsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportErrors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListImportErrorsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListImportErrorsAPIClient is a client that implements the ListImportErrors +// operation. +type ListImportErrorsAPIClient interface { + ListImportErrors(context.Context, *ListImportErrorsInput, ...func(*Options)) (*ListImportErrorsOutput, error) +} + +var _ ListImportErrorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportErrors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListImports.go b/service/mgn/api_op_ListImports.go index 3152cde48a9..0d386e4a8e4 100644 --- a/service/mgn/api_op_ListImports.go +++ b/service/mgn/api_op_ListImports.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImports(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, opt return nil } -// ListImportsAPIClient is a client that implements the ListImports operation. -type ListImportsAPIClient interface { - ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) -} - -var _ ListImportsAPIClient = (*Client)(nil) - // ListImportsPaginatorOptions is the paginator options for ListImports type ListImportsPaginatorOptions struct { // List imports request max results. @@ -206,6 +202,9 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListManagedAccounts.go b/service/mgn/api_op_ListManagedAccounts.go index 607020f2980..5c6966bbe57 100644 --- a/service/mgn/api_op_ListManagedAccounts.go +++ b/service/mgn/api_op_ListManagedAccounts.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListManagedAccountsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListManagedAccounts(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListManagedAccountsMiddlewares(stack *middleware.St return nil } -// ListManagedAccountsAPIClient is a client that implements the -// ListManagedAccounts operation. -type ListManagedAccountsAPIClient interface { - ListManagedAccounts(context.Context, *ListManagedAccountsInput, ...func(*Options)) (*ListManagedAccountsOutput, error) -} - -var _ ListManagedAccountsAPIClient = (*Client)(nil) - // ListManagedAccountsPaginatorOptions is the paginator options for // ListManagedAccounts type ListManagedAccountsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListManagedAccountsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListManagedAccountsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListManagedAccountsAPIClient is a client that implements the +// ListManagedAccounts operation. +type ListManagedAccountsAPIClient interface { + ListManagedAccounts(context.Context, *ListManagedAccountsInput, ...func(*Options)) (*ListManagedAccountsOutput, error) +} + +var _ ListManagedAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListSourceServerActions.go b/service/mgn/api_op_ListSourceServerActions.go index 13fe9a8ec3c..84778697fa5 100644 --- a/service/mgn/api_op_ListSourceServerActions.go +++ b/service/mgn/api_op_ListSourceServerActions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListSourceServerActionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSourceServerActionsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListSourceServerActionsMiddlewares(stack *middlewar return nil } -// ListSourceServerActionsAPIClient is a client that implements the -// ListSourceServerActions operation. -type ListSourceServerActionsAPIClient interface { - ListSourceServerActions(context.Context, *ListSourceServerActionsInput, ...func(*Options)) (*ListSourceServerActionsOutput, error) -} - -var _ ListSourceServerActionsAPIClient = (*Client)(nil) - // ListSourceServerActionsPaginatorOptions is the paginator options for // ListSourceServerActions type ListSourceServerActionsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListSourceServerActionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSourceServerActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListSourceServerActionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSourceServerActionsAPIClient is a client that implements the +// ListSourceServerActions operation. +type ListSourceServerActionsAPIClient interface { + ListSourceServerActions(context.Context, *ListSourceServerActionsInput, ...func(*Options)) (*ListSourceServerActionsOutput, error) +} + +var _ ListSourceServerActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSourceServerActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListTagsForResource.go b/service/mgn/api_op_ListTagsForResource.go index ae10d7ee191..7ee9d31b675 100644 --- a/service/mgn/api_op_ListTagsForResource.go +++ b/service/mgn/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_ListTemplateActions.go b/service/mgn/api_op_ListTemplateActions.go index 4ea82b2f108..59bba05933b 100644 --- a/service/mgn/api_op_ListTemplateActions.go +++ b/service/mgn/api_op_ListTemplateActions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListTemplateActionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateActionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListTemplateActionsMiddlewares(stack *middleware.St return nil } -// ListTemplateActionsAPIClient is a client that implements the -// ListTemplateActions operation. -type ListTemplateActionsAPIClient interface { - ListTemplateActions(context.Context, *ListTemplateActionsInput, ...func(*Options)) (*ListTemplateActionsOutput, error) -} - -var _ ListTemplateActionsAPIClient = (*Client)(nil) - // ListTemplateActionsPaginatorOptions is the paginator options for // ListTemplateActions type ListTemplateActionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListTemplateActionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListTemplateActionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTemplateActionsAPIClient is a client that implements the +// ListTemplateActions operation. +type ListTemplateActionsAPIClient interface { + ListTemplateActions(context.Context, *ListTemplateActionsInput, ...func(*Options)) (*ListTemplateActionsOutput, error) +} + +var _ ListTemplateActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_ListWaves.go b/service/mgn/api_op_ListWaves.go index a187fd7914b..52c3354fb4c 100644 --- a/service/mgn/api_op_ListWaves.go +++ b/service/mgn/api_op_ListWaves.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListWavesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWaves(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListWavesMiddlewares(stack *middleware.Stack, optio return nil } -// ListWavesAPIClient is a client that implements the ListWaves operation. -type ListWavesAPIClient interface { - ListWaves(context.Context, *ListWavesInput, ...func(*Options)) (*ListWavesOutput, error) -} - -var _ ListWavesAPIClient = (*Client)(nil) - // ListWavesPaginatorOptions is the paginator options for ListWaves type ListWavesPaginatorOptions struct { // Maximum results to return when listing waves. @@ -207,6 +203,9 @@ func (p *ListWavesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWaves(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListWavesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListWavesAPIClient is a client that implements the ListWaves operation. +type ListWavesAPIClient interface { + ListWaves(context.Context, *ListWavesInput, ...func(*Options)) (*ListWavesOutput, error) +} + +var _ ListWavesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWaves(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mgn/api_op_MarkAsArchived.go b/service/mgn/api_op_MarkAsArchived.go index 87d9a03cf7d..33ec71c7389 100644 --- a/service/mgn/api_op_MarkAsArchived.go +++ b/service/mgn/api_op_MarkAsArchived.go @@ -150,6 +150,9 @@ func (c *Client) addOperationMarkAsArchivedMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMarkAsArchivedValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_PauseReplication.go b/service/mgn/api_op_PauseReplication.go index 2a3f82341da..2939e20c621 100644 --- a/service/mgn/api_op_PauseReplication.go +++ b/service/mgn/api_op_PauseReplication.go @@ -148,6 +148,9 @@ func (c *Client) addOperationPauseReplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPauseReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_PutSourceServerAction.go b/service/mgn/api_op_PutSourceServerAction.go index 182f4853637..0118f802781 100644 --- a/service/mgn/api_op_PutSourceServerAction.go +++ b/service/mgn/api_op_PutSourceServerAction.go @@ -186,6 +186,9 @@ func (c *Client) addOperationPutSourceServerActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSourceServerActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_PutTemplateAction.go b/service/mgn/api_op_PutTemplateAction.go index ee72a2fa617..f15c9f5f2d7 100644 --- a/service/mgn/api_op_PutTemplateAction.go +++ b/service/mgn/api_op_PutTemplateAction.go @@ -189,6 +189,9 @@ func (c *Client) addOperationPutTemplateActionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutTemplateActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_RemoveSourceServerAction.go b/service/mgn/api_op_RemoveSourceServerAction.go index 737ca981aaa..e2794185ae1 100644 --- a/service/mgn/api_op_RemoveSourceServerAction.go +++ b/service/mgn/api_op_RemoveSourceServerAction.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRemoveSourceServerActionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveSourceServerActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_RemoveTemplateAction.go b/service/mgn/api_op_RemoveTemplateAction.go index 2df1bc8a246..a14eec50719 100644 --- a/service/mgn/api_op_RemoveTemplateAction.go +++ b/service/mgn/api_op_RemoveTemplateAction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRemoveTemplateActionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTemplateActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_ResumeReplication.go b/service/mgn/api_op_ResumeReplication.go index 4eab051b5c9..affc776aff0 100644 --- a/service/mgn/api_op_ResumeReplication.go +++ b/service/mgn/api_op_ResumeReplication.go @@ -148,6 +148,9 @@ func (c *Client) addOperationResumeReplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_RetryDataReplication.go b/service/mgn/api_op_RetryDataReplication.go index d5fa56ea1a7..b2ab73e9f0b 100644 --- a/service/mgn/api_op_RetryDataReplication.go +++ b/service/mgn/api_op_RetryDataReplication.go @@ -151,6 +151,9 @@ func (c *Client) addOperationRetryDataReplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetryDataReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_StartCutover.go b/service/mgn/api_op_StartCutover.go index ebe18fd3394..5126e9fdb79 100644 --- a/service/mgn/api_op_StartCutover.go +++ b/service/mgn/api_op_StartCutover.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartCutoverMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCutoverValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_StartExport.go b/service/mgn/api_op_StartExport.go index 13d59f61fc8..c7a080db9ab 100644 --- a/service/mgn/api_op_StartExport.go +++ b/service/mgn/api_op_StartExport.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartExportMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_StartImport.go b/service/mgn/api_op_StartImport.go index 16c169364c0..e0f6ba766cb 100644 --- a/service/mgn/api_op_StartImport.go +++ b/service/mgn/api_op_StartImport.go @@ -111,6 +111,9 @@ func (c *Client) addOperationStartImportMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartImportMiddleware(stack, options); err != nil { return err } diff --git a/service/mgn/api_op_StartReplication.go b/service/mgn/api_op_StartReplication.go index 4fa44ca6f47..8ad9a9336c6 100644 --- a/service/mgn/api_op_StartReplication.go +++ b/service/mgn/api_op_StartReplication.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStartReplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_StartTest.go b/service/mgn/api_op_StartTest.go index d42c335ea38..99285f213f4 100644 --- a/service/mgn/api_op_StartTest.go +++ b/service/mgn/api_op_StartTest.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStartTestMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTestValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_StopReplication.go b/service/mgn/api_op_StopReplication.go index 136b488d70a..66e88c3fe92 100644 --- a/service/mgn/api_op_StopReplication.go +++ b/service/mgn/api_op_StopReplication.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStopReplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_TagResource.go b/service/mgn/api_op_TagResource.go index bd3489b7ff5..2982fde2783 100644 --- a/service/mgn/api_op_TagResource.go +++ b/service/mgn/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_TerminateTargetInstances.go b/service/mgn/api_op_TerminateTargetInstances.go index 9a8fc258461..81bd14cd652 100644 --- a/service/mgn/api_op_TerminateTargetInstances.go +++ b/service/mgn/api_op_TerminateTargetInstances.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTerminateTargetInstancesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateTargetInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UnarchiveApplication.go b/service/mgn/api_op_UnarchiveApplication.go index 5651523e981..0171b725a7c 100644 --- a/service/mgn/api_op_UnarchiveApplication.go +++ b/service/mgn/api_op_UnarchiveApplication.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUnarchiveApplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnarchiveApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UnarchiveWave.go b/service/mgn/api_op_UnarchiveWave.go index 856c5bf923d..40ec848dd71 100644 --- a/service/mgn/api_op_UnarchiveWave.go +++ b/service/mgn/api_op_UnarchiveWave.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUnarchiveWaveMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnarchiveWaveValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UntagResource.go b/service/mgn/api_op_UntagResource.go index 3e29195992f..944e6c761a8 100644 --- a/service/mgn/api_op_UntagResource.go +++ b/service/mgn/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateApplication.go b/service/mgn/api_op_UpdateApplication.go index db49bded594..a989a12576d 100644 --- a/service/mgn/api_op_UpdateApplication.go +++ b/service/mgn/api_op_UpdateApplication.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateConnector.go b/service/mgn/api_op_UpdateConnector.go index c60d90a9247..9191e45f0d2 100644 --- a/service/mgn/api_op_UpdateConnector.go +++ b/service/mgn/api_op_UpdateConnector.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateLaunchConfiguration.go b/service/mgn/api_op_UpdateLaunchConfiguration.go index 230f78c5222..b122f617370 100644 --- a/service/mgn/api_op_UpdateLaunchConfiguration.go +++ b/service/mgn/api_op_UpdateLaunchConfiguration.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateLaunchConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLaunchConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateLaunchConfigurationTemplate.go b/service/mgn/api_op_UpdateLaunchConfigurationTemplate.go index b76b2915edc..d91208c5922 100644 --- a/service/mgn/api_op_UpdateLaunchConfigurationTemplate.go +++ b/service/mgn/api_op_UpdateLaunchConfigurationTemplate.go @@ -195,6 +195,9 @@ func (c *Client) addOperationUpdateLaunchConfigurationTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLaunchConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateReplicationConfiguration.go b/service/mgn/api_op_UpdateReplicationConfiguration.go index a71f9cd7fac..ada163359e1 100644 --- a/service/mgn/api_op_UpdateReplicationConfiguration.go +++ b/service/mgn/api_op_UpdateReplicationConfiguration.go @@ -201,6 +201,9 @@ func (c *Client) addOperationUpdateReplicationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReplicationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateReplicationConfigurationTemplate.go b/service/mgn/api_op_UpdateReplicationConfigurationTemplate.go index d848d2e2b46..de87a5d5175 100644 --- a/service/mgn/api_op_UpdateReplicationConfigurationTemplate.go +++ b/service/mgn/api_op_UpdateReplicationConfigurationTemplate.go @@ -201,6 +201,9 @@ func (c *Client) addOperationUpdateReplicationConfigurationTemplateMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReplicationConfigurationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateSourceServer.go b/service/mgn/api_op_UpdateSourceServer.go index 432a3fb8514..ce73ecb74d4 100644 --- a/service/mgn/api_op_UpdateSourceServer.go +++ b/service/mgn/api_op_UpdateSourceServer.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateSourceServerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSourceServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateSourceServerReplicationType.go b/service/mgn/api_op_UpdateSourceServerReplicationType.go index f66fc2f45fe..714db39aa82 100644 --- a/service/mgn/api_op_UpdateSourceServerReplicationType.go +++ b/service/mgn/api_op_UpdateSourceServerReplicationType.go @@ -154,6 +154,9 @@ func (c *Client) addOperationUpdateSourceServerReplicationTypeMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSourceServerReplicationTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mgn/api_op_UpdateWave.go b/service/mgn/api_op_UpdateWave.go index a8d0516ea32..164d45f0dc2 100644 --- a/service/mgn/api_op_UpdateWave.go +++ b/service/mgn/api_op_UpdateWave.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateWaveMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWaveValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_client.go b/service/migrationhub/api_client.go index 3862059c80f..bee50783b86 100644 --- a/service/migrationhub/api_client.go +++ b/service/migrationhub/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/migrationhub/api_op_AssociateCreatedArtifact.go b/service/migrationhub/api_op_AssociateCreatedArtifact.go index 7ae72f19ea5..9689334d379 100644 --- a/service/migrationhub/api_op_AssociateCreatedArtifact.go +++ b/service/migrationhub/api_op_AssociateCreatedArtifact.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAssociateCreatedArtifactMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateCreatedArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_AssociateDiscoveredResource.go b/service/migrationhub/api_op_AssociateDiscoveredResource.go index bd4b07ee3dc..d07915d66da 100644 --- a/service/migrationhub/api_op_AssociateDiscoveredResource.go +++ b/service/migrationhub/api_op_AssociateDiscoveredResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssociateDiscoveredResourceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDiscoveredResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_CreateProgressUpdateStream.go b/service/migrationhub/api_op_CreateProgressUpdateStream.go index 5cd2d227a7d..04a93d7215f 100644 --- a/service/migrationhub/api_op_CreateProgressUpdateStream.go +++ b/service/migrationhub/api_op_CreateProgressUpdateStream.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateProgressUpdateStreamMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProgressUpdateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_DeleteProgressUpdateStream.go b/service/migrationhub/api_op_DeleteProgressUpdateStream.go index c40ce71d0ca..e72992fabc1 100644 --- a/service/migrationhub/api_op_DeleteProgressUpdateStream.go +++ b/service/migrationhub/api_op_DeleteProgressUpdateStream.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteProgressUpdateStreamMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProgressUpdateStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_DescribeApplicationState.go b/service/migrationhub/api_op_DescribeApplicationState.go index 72d8ccebf4a..c07c13ca6b6 100644 --- a/service/migrationhub/api_op_DescribeApplicationState.go +++ b/service/migrationhub/api_op_DescribeApplicationState.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeApplicationStateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_DescribeMigrationTask.go b/service/migrationhub/api_op_DescribeMigrationTask.go index 51347c37f9d..9c4306dd130 100644 --- a/service/migrationhub/api_op_DescribeMigrationTask.go +++ b/service/migrationhub/api_op_DescribeMigrationTask.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeMigrationTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMigrationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_DisassociateCreatedArtifact.go b/service/migrationhub/api_op_DisassociateCreatedArtifact.go index ef6e0f95abb..ef6bb7d169e 100644 --- a/service/migrationhub/api_op_DisassociateCreatedArtifact.go +++ b/service/migrationhub/api_op_DisassociateCreatedArtifact.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDisassociateCreatedArtifactMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateCreatedArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_DisassociateDiscoveredResource.go b/service/migrationhub/api_op_DisassociateDiscoveredResource.go index b52cb0cc1e0..595b3a0801c 100644 --- a/service/migrationhub/api_op_DisassociateDiscoveredResource.go +++ b/service/migrationhub/api_op_DisassociateDiscoveredResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDisassociateDiscoveredResourceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDiscoveredResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_ImportMigrationTask.go b/service/migrationhub/api_op_ImportMigrationTask.go index 5686f2703cf..052c1544624 100644 --- a/service/migrationhub/api_op_ImportMigrationTask.go +++ b/service/migrationhub/api_op_ImportMigrationTask.go @@ -115,6 +115,9 @@ func (c *Client) addOperationImportMigrationTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportMigrationTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_ListApplicationStates.go b/service/migrationhub/api_op_ListApplicationStates.go index b3d05071906..ba86c424f55 100644 --- a/service/migrationhub/api_op_ListApplicationStates.go +++ b/service/migrationhub/api_op_ListApplicationStates.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListApplicationStatesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationStates(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListApplicationStatesMiddlewares(stack *middleware. return nil } -// ListApplicationStatesAPIClient is a client that implements the -// ListApplicationStates operation. -type ListApplicationStatesAPIClient interface { - ListApplicationStates(context.Context, *ListApplicationStatesInput, ...func(*Options)) (*ListApplicationStatesOutput, error) -} - -var _ ListApplicationStatesAPIClient = (*Client)(nil) - // ListApplicationStatesPaginatorOptions is the paginator options for // ListApplicationStates type ListApplicationStatesPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListApplicationStatesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationStates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListApplicationStatesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListApplicationStatesAPIClient is a client that implements the +// ListApplicationStates operation. +type ListApplicationStatesAPIClient interface { + ListApplicationStates(context.Context, *ListApplicationStatesInput, ...func(*Options)) (*ListApplicationStatesOutput, error) +} + +var _ ListApplicationStatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationStates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhub/api_op_ListCreatedArtifacts.go b/service/migrationhub/api_op_ListCreatedArtifacts.go index 9f96481e6e9..1f8c15f6612 100644 --- a/service/migrationhub/api_op_ListCreatedArtifacts.go +++ b/service/migrationhub/api_op_ListCreatedArtifacts.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListCreatedArtifactsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCreatedArtifactsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListCreatedArtifactsMiddlewares(stack *middleware.S return nil } -// ListCreatedArtifactsAPIClient is a client that implements the -// ListCreatedArtifacts operation. -type ListCreatedArtifactsAPIClient interface { - ListCreatedArtifacts(context.Context, *ListCreatedArtifactsInput, ...func(*Options)) (*ListCreatedArtifactsOutput, error) -} - -var _ ListCreatedArtifactsAPIClient = (*Client)(nil) - // ListCreatedArtifactsPaginatorOptions is the paginator options for // ListCreatedArtifacts type ListCreatedArtifactsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListCreatedArtifactsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCreatedArtifacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListCreatedArtifactsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListCreatedArtifactsAPIClient is a client that implements the +// ListCreatedArtifacts operation. +type ListCreatedArtifactsAPIClient interface { + ListCreatedArtifacts(context.Context, *ListCreatedArtifactsInput, ...func(*Options)) (*ListCreatedArtifactsOutput, error) +} + +var _ ListCreatedArtifactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCreatedArtifacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhub/api_op_ListDiscoveredResources.go b/service/migrationhub/api_op_ListDiscoveredResources.go index 1caad55125e..66022c11f3a 100644 --- a/service/migrationhub/api_op_ListDiscoveredResources.go +++ b/service/migrationhub/api_op_ListDiscoveredResources.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDiscoveredResourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDiscoveredResourcesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListDiscoveredResourcesMiddlewares(stack *middlewar return nil } -// ListDiscoveredResourcesAPIClient is a client that implements the -// ListDiscoveredResources operation. -type ListDiscoveredResourcesAPIClient interface { - ListDiscoveredResources(context.Context, *ListDiscoveredResourcesInput, ...func(*Options)) (*ListDiscoveredResourcesOutput, error) -} - -var _ ListDiscoveredResourcesAPIClient = (*Client)(nil) - // ListDiscoveredResourcesPaginatorOptions is the paginator options for // ListDiscoveredResources type ListDiscoveredResourcesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDiscoveredResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListDiscoveredResourcesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListDiscoveredResourcesAPIClient is a client that implements the +// ListDiscoveredResources operation. +type ListDiscoveredResourcesAPIClient interface { + ListDiscoveredResources(context.Context, *ListDiscoveredResourcesInput, ...func(*Options)) (*ListDiscoveredResourcesOutput, error) +} + +var _ ListDiscoveredResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDiscoveredResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhub/api_op_ListMigrationTasks.go b/service/migrationhub/api_op_ListMigrationTasks.go index 1321586979c..5063d779438 100644 --- a/service/migrationhub/api_op_ListMigrationTasks.go +++ b/service/migrationhub/api_op_ListMigrationTasks.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListMigrationTasksMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMigrationTasks(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListMigrationTasksMiddlewares(stack *middleware.Sta return nil } -// ListMigrationTasksAPIClient is a client that implements the ListMigrationTasks -// operation. -type ListMigrationTasksAPIClient interface { - ListMigrationTasks(context.Context, *ListMigrationTasksInput, ...func(*Options)) (*ListMigrationTasksOutput, error) -} - -var _ ListMigrationTasksAPIClient = (*Client)(nil) - // ListMigrationTasksPaginatorOptions is the paginator options for // ListMigrationTasks type ListMigrationTasksPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListMigrationTasksPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMigrationTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListMigrationTasksPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListMigrationTasksAPIClient is a client that implements the ListMigrationTasks +// operation. +type ListMigrationTasksAPIClient interface { + ListMigrationTasks(context.Context, *ListMigrationTasksInput, ...func(*Options)) (*ListMigrationTasksOutput, error) +} + +var _ ListMigrationTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMigrationTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhub/api_op_ListProgressUpdateStreams.go b/service/migrationhub/api_op_ListProgressUpdateStreams.go index dce140697ed..6f9ce4d3778 100644 --- a/service/migrationhub/api_op_ListProgressUpdateStreams.go +++ b/service/migrationhub/api_op_ListProgressUpdateStreams.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListProgressUpdateStreamsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProgressUpdateStreams(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListProgressUpdateStreamsMiddlewares(stack *middlew return nil } -// ListProgressUpdateStreamsAPIClient is a client that implements the -// ListProgressUpdateStreams operation. -type ListProgressUpdateStreamsAPIClient interface { - ListProgressUpdateStreams(context.Context, *ListProgressUpdateStreamsInput, ...func(*Options)) (*ListProgressUpdateStreamsOutput, error) -} - -var _ ListProgressUpdateStreamsAPIClient = (*Client)(nil) - // ListProgressUpdateStreamsPaginatorOptions is the paginator options for // ListProgressUpdateStreams type ListProgressUpdateStreamsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListProgressUpdateStreamsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProgressUpdateStreams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListProgressUpdateStreamsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListProgressUpdateStreamsAPIClient is a client that implements the +// ListProgressUpdateStreams operation. +type ListProgressUpdateStreamsAPIClient interface { + ListProgressUpdateStreams(context.Context, *ListProgressUpdateStreamsInput, ...func(*Options)) (*ListProgressUpdateStreamsOutput, error) +} + +var _ ListProgressUpdateStreamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProgressUpdateStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhub/api_op_NotifyApplicationState.go b/service/migrationhub/api_op_NotifyApplicationState.go index c3cd89a7224..d0bd668a926 100644 --- a/service/migrationhub/api_op_NotifyApplicationState.go +++ b/service/migrationhub/api_op_NotifyApplicationState.go @@ -118,6 +118,9 @@ func (c *Client) addOperationNotifyApplicationStateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyApplicationStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_NotifyMigrationTaskState.go b/service/migrationhub/api_op_NotifyMigrationTaskState.go index b0bb85df009..98050415e04 100644 --- a/service/migrationhub/api_op_NotifyMigrationTaskState.go +++ b/service/migrationhub/api_op_NotifyMigrationTaskState.go @@ -139,6 +139,9 @@ func (c *Client) addOperationNotifyMigrationTaskStateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyMigrationTaskStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhub/api_op_PutResourceAttributes.go b/service/migrationhub/api_op_PutResourceAttributes.go index c5f34eb34d2..e502e8aeb0a 100644 --- a/service/migrationhub/api_op_PutResourceAttributes.go +++ b/service/migrationhub/api_op_PutResourceAttributes.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutResourceAttributesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourceAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubconfig/api_client.go b/service/migrationhubconfig/api_client.go index 14ff0c92da8..02acf4f1caf 100644 --- a/service/migrationhubconfig/api_client.go +++ b/service/migrationhubconfig/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/migrationhubconfig/api_op_CreateHomeRegionControl.go b/service/migrationhubconfig/api_op_CreateHomeRegionControl.go index 4f4c343b597..cca7e0052bb 100644 --- a/service/migrationhubconfig/api_op_CreateHomeRegionControl.go +++ b/service/migrationhubconfig/api_op_CreateHomeRegionControl.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateHomeRegionControlMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHomeRegionControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go b/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go index 6b6a1542557..4081df5694a 100644 --- a/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go +++ b/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteHomeRegionControlMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHomeRegionControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go b/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go index 9979432e5b9..192db682881 100644 --- a/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go +++ b/service/migrationhubconfig/api_op_DescribeHomeRegionControls.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeHomeRegionControlsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHomeRegionControlsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeHomeRegionControlsMiddlewares(stack *middle return nil } -// DescribeHomeRegionControlsAPIClient is a client that implements the -// DescribeHomeRegionControls operation. -type DescribeHomeRegionControlsAPIClient interface { - DescribeHomeRegionControls(context.Context, *DescribeHomeRegionControlsInput, ...func(*Options)) (*DescribeHomeRegionControlsOutput, error) -} - -var _ DescribeHomeRegionControlsAPIClient = (*Client)(nil) - // DescribeHomeRegionControlsPaginatorOptions is the paginator options for // DescribeHomeRegionControls type DescribeHomeRegionControlsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeHomeRegionControlsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeHomeRegionControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeHomeRegionControlsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeHomeRegionControlsAPIClient is a client that implements the +// DescribeHomeRegionControls operation. +type DescribeHomeRegionControlsAPIClient interface { + DescribeHomeRegionControls(context.Context, *DescribeHomeRegionControlsInput, ...func(*Options)) (*DescribeHomeRegionControlsOutput, error) +} + +var _ DescribeHomeRegionControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeHomeRegionControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubconfig/api_op_GetHomeRegion.go b/service/migrationhubconfig/api_op_GetHomeRegion.go index a004827b4d0..e2c9eac1890 100644 --- a/service/migrationhubconfig/api_op_GetHomeRegion.go +++ b/service/migrationhubconfig/api_op_GetHomeRegion.go @@ -103,6 +103,9 @@ func (c *Client) addOperationGetHomeRegionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHomeRegion(options.Region), middleware.Before); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_client.go b/service/migrationhuborchestrator/api_client.go index 2fef49eb220..cab61b20b27 100644 --- a/service/migrationhuborchestrator/api_client.go +++ b/service/migrationhuborchestrator/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/migrationhuborchestrator/api_op_CreateTemplate.go b/service/migrationhuborchestrator/api_op_CreateTemplate.go index 3d65da4cd06..a4d4ef780c8 100644 --- a/service/migrationhuborchestrator/api_op_CreateTemplate.go +++ b/service/migrationhuborchestrator/api_op_CreateTemplate.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_CreateWorkflow.go b/service/migrationhuborchestrator/api_op_CreateWorkflow.go index 5cf0b209fec..744c5a53594 100644 --- a/service/migrationhuborchestrator/api_op_CreateWorkflow.go +++ b/service/migrationhuborchestrator/api_op_CreateWorkflow.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_CreateWorkflowStep.go b/service/migrationhuborchestrator/api_op_CreateWorkflowStep.go index 1357e0bcb7c..fe244c50930 100644 --- a/service/migrationhuborchestrator/api_op_CreateWorkflowStep.go +++ b/service/migrationhuborchestrator/api_op_CreateWorkflowStep.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateWorkflowStepMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkflowStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_CreateWorkflowStepGroup.go b/service/migrationhuborchestrator/api_op_CreateWorkflowStepGroup.go index 0003f8fe207..6abad0547cd 100644 --- a/service/migrationhuborchestrator/api_op_CreateWorkflowStepGroup.go +++ b/service/migrationhuborchestrator/api_op_CreateWorkflowStepGroup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateWorkflowStepGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkflowStepGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_DeleteTemplate.go b/service/migrationhuborchestrator/api_op_DeleteTemplate.go index e91f558479d..aad5df34167 100644 --- a/service/migrationhuborchestrator/api_op_DeleteTemplate.go +++ b/service/migrationhuborchestrator/api_op_DeleteTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_DeleteWorkflow.go b/service/migrationhuborchestrator/api_op_DeleteWorkflow.go index 81aaeb92a20..8623c3e6b17 100644 --- a/service/migrationhuborchestrator/api_op_DeleteWorkflow.go +++ b/service/migrationhuborchestrator/api_op_DeleteWorkflow.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_DeleteWorkflowStep.go b/service/migrationhuborchestrator/api_op_DeleteWorkflowStep.go index b3333c03a8a..b353073d2c7 100644 --- a/service/migrationhuborchestrator/api_op_DeleteWorkflowStep.go +++ b/service/migrationhuborchestrator/api_op_DeleteWorkflowStep.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteWorkflowStepMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_DeleteWorkflowStepGroup.go b/service/migrationhuborchestrator/api_op_DeleteWorkflowStepGroup.go index 71c32ff6d1c..fb1188c574c 100644 --- a/service/migrationhuborchestrator/api_op_DeleteWorkflowStepGroup.go +++ b/service/migrationhuborchestrator/api_op_DeleteWorkflowStepGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteWorkflowStepGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowStepGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_GetTemplate.go b/service/migrationhuborchestrator/api_op_GetTemplate.go index df854b0348d..8aa462fdbdb 100644 --- a/service/migrationhuborchestrator/api_op_GetTemplate.go +++ b/service/migrationhuborchestrator/api_op_GetTemplate.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetTemplateMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_GetTemplateStep.go b/service/migrationhuborchestrator/api_op_GetTemplateStep.go index 8cb94853ff0..4c8823c2778 100644 --- a/service/migrationhuborchestrator/api_op_GetTemplateStep.go +++ b/service/migrationhuborchestrator/api_op_GetTemplateStep.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetTemplateStepMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_GetTemplateStepGroup.go b/service/migrationhuborchestrator/api_op_GetTemplateStepGroup.go index 13460bceca2..1af31a4cbdb 100644 --- a/service/migrationhuborchestrator/api_op_GetTemplateStepGroup.go +++ b/service/migrationhuborchestrator/api_op_GetTemplateStepGroup.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetTemplateStepGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateStepGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_GetWorkflow.go b/service/migrationhuborchestrator/api_op_GetWorkflow.go index 27f2d92984e..cd97a881d15 100644 --- a/service/migrationhuborchestrator/api_op_GetWorkflow.go +++ b/service/migrationhuborchestrator/api_op_GetWorkflow.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_GetWorkflowStep.go b/service/migrationhuborchestrator/api_op_GetWorkflowStep.go index b29f47b98bb..50d2ac06304 100644 --- a/service/migrationhuborchestrator/api_op_GetWorkflowStep.go +++ b/service/migrationhuborchestrator/api_op_GetWorkflowStep.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetWorkflowStepMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_GetWorkflowStepGroup.go b/service/migrationhuborchestrator/api_op_GetWorkflowStepGroup.go index 45ff4fc1df7..d91762c3cca 100644 --- a/service/migrationhuborchestrator/api_op_GetWorkflowStepGroup.go +++ b/service/migrationhuborchestrator/api_op_GetWorkflowStepGroup.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetWorkflowStepGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowStepGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_ListPlugins.go b/service/migrationhuborchestrator/api_op_ListPlugins.go index f83918ab559..5c68897b294 100644 --- a/service/migrationhuborchestrator/api_op_ListPlugins.go +++ b/service/migrationhuborchestrator/api_op_ListPlugins.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListPluginsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlugins(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListPluginsMiddlewares(stack *middleware.Stack, opt return nil } -// ListPluginsAPIClient is a client that implements the ListPlugins operation. -type ListPluginsAPIClient interface { - ListPlugins(context.Context, *ListPluginsInput, ...func(*Options)) (*ListPluginsOutput, error) -} - -var _ ListPluginsAPIClient = (*Client)(nil) - // ListPluginsPaginatorOptions is the paginator options for ListPlugins type ListPluginsPaginatorOptions struct { // The maximum number of plugins that can be returned. @@ -197,6 +193,9 @@ func (p *ListPluginsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlugins(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -216,6 +215,13 @@ func (p *ListPluginsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListPluginsAPIClient is a client that implements the ListPlugins operation. +type ListPluginsAPIClient interface { + ListPlugins(context.Context, *ListPluginsInput, ...func(*Options)) (*ListPluginsOutput, error) +} + +var _ ListPluginsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlugins(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_ListTagsForResource.go b/service/migrationhuborchestrator/api_op_ListTagsForResource.go index fa623139d98..2bd6a6f4623 100644 --- a/service/migrationhuborchestrator/api_op_ListTagsForResource.go +++ b/service/migrationhuborchestrator/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_ListTemplateStepGroups.go b/service/migrationhuborchestrator/api_op_ListTemplateStepGroups.go index d84c0bd128d..683125fde8f 100644 --- a/service/migrationhuborchestrator/api_op_ListTemplateStepGroups.go +++ b/service/migrationhuborchestrator/api_op_ListTemplateStepGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTemplateStepGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateStepGroupsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTemplateStepGroupsMiddlewares(stack *middleware return nil } -// ListTemplateStepGroupsAPIClient is a client that implements the -// ListTemplateStepGroups operation. -type ListTemplateStepGroupsAPIClient interface { - ListTemplateStepGroups(context.Context, *ListTemplateStepGroupsInput, ...func(*Options)) (*ListTemplateStepGroupsOutput, error) -} - -var _ ListTemplateStepGroupsAPIClient = (*Client)(nil) - // ListTemplateStepGroupsPaginatorOptions is the paginator options for // ListTemplateStepGroups type ListTemplateStepGroupsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListTemplateStepGroupsPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateStepGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListTemplateStepGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListTemplateStepGroupsAPIClient is a client that implements the +// ListTemplateStepGroups operation. +type ListTemplateStepGroupsAPIClient interface { + ListTemplateStepGroups(context.Context, *ListTemplateStepGroupsInput, ...func(*Options)) (*ListTemplateStepGroupsOutput, error) +} + +var _ ListTemplateStepGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateStepGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_ListTemplateSteps.go b/service/migrationhuborchestrator/api_op_ListTemplateSteps.go index c124300038c..cf5be4bbde8 100644 --- a/service/migrationhuborchestrator/api_op_ListTemplateSteps.go +++ b/service/migrationhuborchestrator/api_op_ListTemplateSteps.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTemplateStepsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateStepsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListTemplateStepsMiddlewares(stack *middleware.Stac return nil } -// ListTemplateStepsAPIClient is a client that implements the ListTemplateSteps -// operation. -type ListTemplateStepsAPIClient interface { - ListTemplateSteps(context.Context, *ListTemplateStepsInput, ...func(*Options)) (*ListTemplateStepsOutput, error) -} - -var _ ListTemplateStepsAPIClient = (*Client)(nil) - // ListTemplateStepsPaginatorOptions is the paginator options for ListTemplateSteps type ListTemplateStepsPaginatorOptions struct { // The maximum number of results that can be returned. @@ -211,6 +206,9 @@ func (p *ListTemplateStepsPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListTemplateStepsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListTemplateStepsAPIClient is a client that implements the ListTemplateSteps +// operation. +type ListTemplateStepsAPIClient interface { + ListTemplateSteps(context.Context, *ListTemplateStepsInput, ...func(*Options)) (*ListTemplateStepsOutput, error) +} + +var _ ListTemplateStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_ListTemplates.go b/service/migrationhuborchestrator/api_op_ListTemplates.go index 8ca9bd80c84..59d16fdd9e3 100644 --- a/service/migrationhuborchestrator/api_op_ListTemplates.go +++ b/service/migrationhuborchestrator/api_op_ListTemplates.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTemplates(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o return nil } -// ListTemplatesAPIClient is a client that implements the ListTemplates operation. -type ListTemplatesAPIClient interface { - ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) -} - -var _ ListTemplatesAPIClient = (*Client)(nil) - // ListTemplatesPaginatorOptions is the paginator options for ListTemplates type ListTemplatesPaginatorOptions struct { // The maximum number of results that can be returned. @@ -203,6 +199,9 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListTemplatesAPIClient is a client that implements the ListTemplates operation. +type ListTemplatesAPIClient interface { + ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) +} + +var _ ListTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_ListWorkflowStepGroups.go b/service/migrationhuborchestrator/api_op_ListWorkflowStepGroups.go index d1bf0623ea3..4d9866b4511 100644 --- a/service/migrationhuborchestrator/api_op_ListWorkflowStepGroups.go +++ b/service/migrationhuborchestrator/api_op_ListWorkflowStepGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListWorkflowStepGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowStepGroupsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListWorkflowStepGroupsMiddlewares(stack *middleware return nil } -// ListWorkflowStepGroupsAPIClient is a client that implements the -// ListWorkflowStepGroups operation. -type ListWorkflowStepGroupsAPIClient interface { - ListWorkflowStepGroups(context.Context, *ListWorkflowStepGroupsInput, ...func(*Options)) (*ListWorkflowStepGroupsOutput, error) -} - -var _ ListWorkflowStepGroupsAPIClient = (*Client)(nil) - // ListWorkflowStepGroupsPaginatorOptions is the paginator options for // ListWorkflowStepGroups type ListWorkflowStepGroupsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListWorkflowStepGroupsPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowStepGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListWorkflowStepGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListWorkflowStepGroupsAPIClient is a client that implements the +// ListWorkflowStepGroups operation. +type ListWorkflowStepGroupsAPIClient interface { + ListWorkflowStepGroups(context.Context, *ListWorkflowStepGroupsInput, ...func(*Options)) (*ListWorkflowStepGroupsOutput, error) +} + +var _ ListWorkflowStepGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowStepGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_ListWorkflowSteps.go b/service/migrationhuborchestrator/api_op_ListWorkflowSteps.go index f8e82e801fa..5c5414d32d2 100644 --- a/service/migrationhuborchestrator/api_op_ListWorkflowSteps.go +++ b/service/migrationhuborchestrator/api_op_ListWorkflowSteps.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListWorkflowStepsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowStepsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListWorkflowStepsMiddlewares(stack *middleware.Stac return nil } -// ListWorkflowStepsAPIClient is a client that implements the ListWorkflowSteps -// operation. -type ListWorkflowStepsAPIClient interface { - ListWorkflowSteps(context.Context, *ListWorkflowStepsInput, ...func(*Options)) (*ListWorkflowStepsOutput, error) -} - -var _ ListWorkflowStepsAPIClient = (*Client)(nil) - // ListWorkflowStepsPaginatorOptions is the paginator options for ListWorkflowSteps type ListWorkflowStepsPaginatorOptions struct { // The maximum number of results that can be returned. @@ -213,6 +208,9 @@ func (p *ListWorkflowStepsPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListWorkflowStepsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListWorkflowStepsAPIClient is a client that implements the ListWorkflowSteps +// operation. +type ListWorkflowStepsAPIClient interface { + ListWorkflowSteps(context.Context, *ListWorkflowStepsInput, ...func(*Options)) (*ListWorkflowStepsOutput, error) +} + +var _ ListWorkflowStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_ListWorkflows.go b/service/migrationhuborchestrator/api_op_ListWorkflows.go index d06bb872ef7..ec4fb16a53e 100644 --- a/service/migrationhuborchestrator/api_op_ListWorkflows.go +++ b/service/migrationhuborchestrator/api_op_ListWorkflows.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkflows(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. -type ListWorkflowsAPIClient interface { - ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) -} - -var _ ListWorkflowsAPIClient = (*Client)(nil) - // ListWorkflowsPaginatorOptions is the paginator options for ListWorkflows type ListWorkflowsPaginatorOptions struct { // The maximum number of results that can be returned. @@ -211,6 +207,9 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. +type ListWorkflowsAPIClient interface { + ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) +} + +var _ ListWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhuborchestrator/api_op_RetryWorkflowStep.go b/service/migrationhuborchestrator/api_op_RetryWorkflowStep.go index efc8184eeec..a917b3c9109 100644 --- a/service/migrationhuborchestrator/api_op_RetryWorkflowStep.go +++ b/service/migrationhuborchestrator/api_op_RetryWorkflowStep.go @@ -125,6 +125,9 @@ func (c *Client) addOperationRetryWorkflowStepMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetryWorkflowStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_StartWorkflow.go b/service/migrationhuborchestrator/api_op_StartWorkflow.go index 7afa7b383d6..9e98b586474 100644 --- a/service/migrationhuborchestrator/api_op_StartWorkflow.go +++ b/service/migrationhuborchestrator/api_op_StartWorkflow.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartWorkflowMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_StopWorkflow.go b/service/migrationhuborchestrator/api_op_StopWorkflow.go index fdefc277568..f32ed6cb3e7 100644 --- a/service/migrationhuborchestrator/api_op_StopWorkflow.go +++ b/service/migrationhuborchestrator/api_op_StopWorkflow.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStopWorkflowMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_TagResource.go b/service/migrationhuborchestrator/api_op_TagResource.go index 01209d0ebec..a2208098e4e 100644 --- a/service/migrationhuborchestrator/api_op_TagResource.go +++ b/service/migrationhuborchestrator/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_UntagResource.go b/service/migrationhuborchestrator/api_op_UntagResource.go index 7c5fb6c914d..5759bba6757 100644 --- a/service/migrationhuborchestrator/api_op_UntagResource.go +++ b/service/migrationhuborchestrator/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_UpdateTemplate.go b/service/migrationhuborchestrator/api_op_UpdateTemplate.go index ee4a3197e86..bec4048637d 100644 --- a/service/migrationhuborchestrator/api_op_UpdateTemplate.go +++ b/service/migrationhuborchestrator/api_op_UpdateTemplate.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_UpdateWorkflow.go b/service/migrationhuborchestrator/api_op_UpdateWorkflow.go index c8edec05f7b..af996e928d1 100644 --- a/service/migrationhuborchestrator/api_op_UpdateWorkflow.go +++ b/service/migrationhuborchestrator/api_op_UpdateWorkflow.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_UpdateWorkflowStep.go b/service/migrationhuborchestrator/api_op_UpdateWorkflowStep.go index d5f71390d0b..be10669f8d1 100644 --- a/service/migrationhuborchestrator/api_op_UpdateWorkflowStep.go +++ b/service/migrationhuborchestrator/api_op_UpdateWorkflowStep.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateWorkflowStepMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkflowStepValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhuborchestrator/api_op_UpdateWorkflowStepGroup.go b/service/migrationhuborchestrator/api_op_UpdateWorkflowStepGroup.go index 2bb994f807d..bb5e44eb8c2 100644 --- a/service/migrationhuborchestrator/api_op_UpdateWorkflowStepGroup.go +++ b/service/migrationhuborchestrator/api_op_UpdateWorkflowStepGroup.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateWorkflowStepGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkflowStepGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_client.go b/service/migrationhubrefactorspaces/api_client.go index bc38b9faf0c..ec5614a5d67 100644 --- a/service/migrationhubrefactorspaces/api_client.go +++ b/service/migrationhubrefactorspaces/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/migrationhubrefactorspaces/api_op_CreateApplication.go b/service/migrationhubrefactorspaces/api_op_CreateApplication.go index 0bcc52ad12d..449780c0b21 100644 --- a/service/migrationhubrefactorspaces/api_op_CreateApplication.go +++ b/service/migrationhubrefactorspaces/api_op_CreateApplication.go @@ -190,6 +190,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go b/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go index d24336ba361..4aba64c67f8 100644 --- a/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go +++ b/service/migrationhubrefactorspaces/api_op_CreateEnvironment.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEnvironmentMiddleware(stack, options); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_CreateRoute.go b/service/migrationhubrefactorspaces/api_op_CreateRoute.go index b29798611f6..f3c35d71b88 100644 --- a/service/migrationhubrefactorspaces/api_op_CreateRoute.go +++ b/service/migrationhubrefactorspaces/api_op_CreateRoute.go @@ -266,6 +266,9 @@ func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRouteMiddleware(stack, options); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_CreateService.go b/service/migrationhubrefactorspaces/api_op_CreateService.go index 45a9eb6058c..140d53e129d 100644 --- a/service/migrationhubrefactorspaces/api_op_CreateService.go +++ b/service/migrationhubrefactorspaces/api_op_CreateService.go @@ -200,6 +200,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceMiddleware(stack, options); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_DeleteApplication.go b/service/migrationhubrefactorspaces/api_op_DeleteApplication.go index e48153dd78e..2d078a5c54f 100644 --- a/service/migrationhubrefactorspaces/api_op_DeleteApplication.go +++ b/service/migrationhubrefactorspaces/api_op_DeleteApplication.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go b/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go index 129cd52a704..6e3e547bfd3 100644 --- a/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go +++ b/service/migrationhubrefactorspaces/api_op_DeleteEnvironment.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go b/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go index c606aece7ec..2b6a2b18667 100644 --- a/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go +++ b/service/migrationhubrefactorspaces/api_op_DeleteResourcePolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_DeleteRoute.go b/service/migrationhubrefactorspaces/api_op_DeleteRoute.go index 952155c27bb..59edf3b0a8f 100644 --- a/service/migrationhubrefactorspaces/api_op_DeleteRoute.go +++ b/service/migrationhubrefactorspaces/api_op_DeleteRoute.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_DeleteService.go b/service/migrationhubrefactorspaces/api_op_DeleteService.go index 4e5abb57bb4..bf04aa2690f 100644 --- a/service/migrationhubrefactorspaces/api_op_DeleteService.go +++ b/service/migrationhubrefactorspaces/api_op_DeleteService.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_GetApplication.go b/service/migrationhubrefactorspaces/api_op_GetApplication.go index b714ffe760c..1488bb2da82 100644 --- a/service/migrationhubrefactorspaces/api_op_GetApplication.go +++ b/service/migrationhubrefactorspaces/api_op_GetApplication.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_GetEnvironment.go b/service/migrationhubrefactorspaces/api_op_GetEnvironment.go index 54212a7293a..8d15f8da7e5 100644 --- a/service/migrationhubrefactorspaces/api_op_GetEnvironment.go +++ b/service/migrationhubrefactorspaces/api_op_GetEnvironment.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go b/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go index 9f7b1952a58..e7abfed29e5 100644 --- a/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go +++ b/service/migrationhubrefactorspaces/api_op_GetResourcePolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_GetRoute.go b/service/migrationhubrefactorspaces/api_op_GetRoute.go index bda1a9236f4..a743c158d41 100644 --- a/service/migrationhubrefactorspaces/api_op_GetRoute.go +++ b/service/migrationhubrefactorspaces/api_op_GetRoute.go @@ -182,6 +182,9 @@ func (c *Client) addOperationGetRouteMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_GetService.go b/service/migrationhubrefactorspaces/api_op_GetService.go index 46f932c47d0..cec45029760 100644 --- a/service/migrationhubrefactorspaces/api_op_GetService.go +++ b/service/migrationhubrefactorspaces/api_op_GetService.go @@ -173,6 +173,9 @@ func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_ListApplications.go b/service/migrationhubrefactorspaces/api_op_ListApplications.go index 45158bfdddc..2d54a050965 100644 --- a/service/migrationhubrefactorspaces/api_op_ListApplications.go +++ b/service/migrationhubrefactorspaces/api_op_ListApplications.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -213,6 +208,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go b/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go index 1f89e0b50ad..99fe822fd8e 100644 --- a/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go +++ b/service/migrationhubrefactorspaces/api_op_ListEnvironmentVpcs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListEnvironmentVpcsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentVpcsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListEnvironmentVpcsMiddlewares(stack *middleware.St return nil } -// ListEnvironmentVpcsAPIClient is a client that implements the -// ListEnvironmentVpcs operation. -type ListEnvironmentVpcsAPIClient interface { - ListEnvironmentVpcs(context.Context, *ListEnvironmentVpcsInput, ...func(*Options)) (*ListEnvironmentVpcsOutput, error) -} - -var _ ListEnvironmentVpcsAPIClient = (*Client)(nil) - // ListEnvironmentVpcsPaginatorOptions is the paginator options for // ListEnvironmentVpcs type ListEnvironmentVpcsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListEnvironmentVpcsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentVpcs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListEnvironmentVpcsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEnvironmentVpcsAPIClient is a client that implements the +// ListEnvironmentVpcs operation. +type ListEnvironmentVpcsAPIClient interface { + ListEnvironmentVpcs(context.Context, *ListEnvironmentVpcsInput, ...func(*Options)) (*ListEnvironmentVpcsOutput, error) +} + +var _ ListEnvironmentVpcsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentVpcs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubrefactorspaces/api_op_ListEnvironments.go b/service/migrationhubrefactorspaces/api_op_ListEnvironments.go index 0cfe70faf85..3c8f6cbc75b 100644 --- a/service/migrationhubrefactorspaces/api_op_ListEnvironments.go +++ b/service/migrationhubrefactorspaces/api_op_ListEnvironments.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironments(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -205,6 +200,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubrefactorspaces/api_op_ListRoutes.go b/service/migrationhubrefactorspaces/api_op_ListRoutes.go index 4b4463bd38c..ac38412982b 100644 --- a/service/migrationhubrefactorspaces/api_op_ListRoutes.go +++ b/service/migrationhubrefactorspaces/api_op_ListRoutes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListRoutesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoutesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListRoutesMiddlewares(stack *middleware.Stack, opti return nil } -// ListRoutesAPIClient is a client that implements the ListRoutes operation. -type ListRoutesAPIClient interface { - ListRoutes(context.Context, *ListRoutesInput, ...func(*Options)) (*ListRoutesOutput, error) -} - -var _ ListRoutesAPIClient = (*Client)(nil) - // ListRoutesPaginatorOptions is the paginator options for ListRoutes type ListRoutesPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -217,6 +213,9 @@ func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoutes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListRoutesAPIClient is a client that implements the ListRoutes operation. +type ListRoutesAPIClient interface { + ListRoutes(context.Context, *ListRoutesInput, ...func(*Options)) (*ListRoutesOutput, error) +} + +var _ ListRoutesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoutes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubrefactorspaces/api_op_ListServices.go b/service/migrationhubrefactorspaces/api_op_ListServices.go index 0b237e86e03..a0ecaba15ea 100644 --- a/service/migrationhubrefactorspaces/api_op_ListServices.go +++ b/service/migrationhubrefactorspaces/api_op_ListServices.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -217,6 +213,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go b/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go index 33de9c800a6..342590516d5 100644 --- a/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go +++ b/service/migrationhubrefactorspaces/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go b/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go index 791ec3304de..023e2209925 100644 --- a/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go +++ b/service/migrationhubrefactorspaces/api_op_PutResourcePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_TagResource.go b/service/migrationhubrefactorspaces/api_op_TagResource.go index 027d29a67b8..5d3deaffe49 100644 --- a/service/migrationhubrefactorspaces/api_op_TagResource.go +++ b/service/migrationhubrefactorspaces/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_UntagResource.go b/service/migrationhubrefactorspaces/api_op_UntagResource.go index 643693ad0b3..310c983e98a 100644 --- a/service/migrationhubrefactorspaces/api_op_UntagResource.go +++ b/service/migrationhubrefactorspaces/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubrefactorspaces/api_op_UpdateRoute.go b/service/migrationhubrefactorspaces/api_op_UpdateRoute.go index a31361ea519..aa27b55c236 100644 --- a/service/migrationhubrefactorspaces/api_op_UpdateRoute.go +++ b/service/migrationhubrefactorspaces/api_op_UpdateRoute.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateRouteMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRouteValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_client.go b/service/migrationhubstrategy/api_client.go index 8eefd1a083e..1069f0c8290 100644 --- a/service/migrationhubstrategy/api_client.go +++ b/service/migrationhubstrategy/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/migrationhubstrategy/api_op_GetApplicationComponentDetails.go b/service/migrationhubstrategy/api_op_GetApplicationComponentDetails.go index 807f41d6049..8850876f0ab 100644 --- a/service/migrationhubstrategy/api_op_GetApplicationComponentDetails.go +++ b/service/migrationhubstrategy/api_op_GetApplicationComponentDetails.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetApplicationComponentDetailsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationComponentDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetApplicationComponentStrategies.go b/service/migrationhubstrategy/api_op_GetApplicationComponentStrategies.go index bf251af8f15..8b695a4c616 100644 --- a/service/migrationhubstrategy/api_op_GetApplicationComponentStrategies.go +++ b/service/migrationhubstrategy/api_op_GetApplicationComponentStrategies.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetApplicationComponentStrategiesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationComponentStrategiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetAssessment.go b/service/migrationhubstrategy/api_op_GetAssessment.go index 803999053ed..bdfc562adbe 100644 --- a/service/migrationhubstrategy/api_op_GetAssessment.go +++ b/service/migrationhubstrategy/api_op_GetAssessment.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAssessmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetImportFileTask.go b/service/migrationhubstrategy/api_op_GetImportFileTask.go index ee4204c5f56..681223b6d24 100644 --- a/service/migrationhubstrategy/api_op_GetImportFileTask.go +++ b/service/migrationhubstrategy/api_op_GetImportFileTask.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetImportFileTaskMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportFileTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetLatestAssessmentId.go b/service/migrationhubstrategy/api_op_GetLatestAssessmentId.go index 6755591f2cb..7390c53199f 100644 --- a/service/migrationhubstrategy/api_op_GetLatestAssessmentId.go +++ b/service/migrationhubstrategy/api_op_GetLatestAssessmentId.go @@ -99,6 +99,9 @@ func (c *Client) addOperationGetLatestAssessmentIdMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLatestAssessmentId(options.Region), middleware.Before); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetPortfolioPreferences.go b/service/migrationhubstrategy/api_op_GetPortfolioPreferences.go index 7298b1bcd75..e6945393f0e 100644 --- a/service/migrationhubstrategy/api_op_GetPortfolioPreferences.go +++ b/service/migrationhubstrategy/api_op_GetPortfolioPreferences.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetPortfolioPreferencesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPortfolioPreferences(options.Region), middleware.Before); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetPortfolioSummary.go b/service/migrationhubstrategy/api_op_GetPortfolioSummary.go index a82ee30b17f..f71e0c799d8 100644 --- a/service/migrationhubstrategy/api_op_GetPortfolioSummary.go +++ b/service/migrationhubstrategy/api_op_GetPortfolioSummary.go @@ -103,6 +103,9 @@ func (c *Client) addOperationGetPortfolioSummaryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPortfolioSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetRecommendationReportDetails.go b/service/migrationhubstrategy/api_op_GetRecommendationReportDetails.go index a53f783f79a..166ae5b439b 100644 --- a/service/migrationhubstrategy/api_op_GetRecommendationReportDetails.go +++ b/service/migrationhubstrategy/api_op_GetRecommendationReportDetails.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetRecommendationReportDetailsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationReportDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_GetServerDetails.go b/service/migrationhubstrategy/api_op_GetServerDetails.go index bc9763b7526..21a8739eef3 100644 --- a/service/migrationhubstrategy/api_op_GetServerDetails.go +++ b/service/migrationhubstrategy/api_op_GetServerDetails.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetServerDetailsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServerDetailsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetServerDetailsMiddlewares(stack *middleware.Stack return nil } -// GetServerDetailsAPIClient is a client that implements the GetServerDetails -// operation. -type GetServerDetailsAPIClient interface { - GetServerDetails(context.Context, *GetServerDetailsInput, ...func(*Options)) (*GetServerDetailsOutput, error) -} - -var _ GetServerDetailsAPIClient = (*Client)(nil) - // GetServerDetailsPaginatorOptions is the paginator options for GetServerDetails type GetServerDetailsPaginatorOptions struct { // The maximum number of items to include in the response. The maximum value is @@ -220,6 +215,9 @@ func (p *GetServerDetailsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetServerDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *GetServerDetailsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetServerDetailsAPIClient is a client that implements the GetServerDetails +// operation. +type GetServerDetailsAPIClient interface { + GetServerDetails(context.Context, *GetServerDetailsInput, ...func(*Options)) (*GetServerDetailsOutput, error) +} + +var _ GetServerDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetServerDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubstrategy/api_op_GetServerStrategies.go b/service/migrationhubstrategy/api_op_GetServerStrategies.go index a010e077660..dc17c00f392 100644 --- a/service/migrationhubstrategy/api_op_GetServerStrategies.go +++ b/service/migrationhubstrategy/api_op_GetServerStrategies.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetServerStrategiesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServerStrategiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_ListAnalyzableServers.go b/service/migrationhubstrategy/api_op_ListAnalyzableServers.go index be27b8c6f07..150eea8d25d 100644 --- a/service/migrationhubstrategy/api_op_ListAnalyzableServers.go +++ b/service/migrationhubstrategy/api_op_ListAnalyzableServers.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListAnalyzableServersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnalyzableServers(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAnalyzableServersMiddlewares(stack *middleware. return nil } -// ListAnalyzableServersAPIClient is a client that implements the -// ListAnalyzableServers operation. -type ListAnalyzableServersAPIClient interface { - ListAnalyzableServers(context.Context, *ListAnalyzableServersInput, ...func(*Options)) (*ListAnalyzableServersOutput, error) -} - -var _ ListAnalyzableServersAPIClient = (*Client)(nil) - // ListAnalyzableServersPaginatorOptions is the paginator options for // ListAnalyzableServers type ListAnalyzableServersPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAnalyzableServersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnalyzableServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAnalyzableServersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAnalyzableServersAPIClient is a client that implements the +// ListAnalyzableServers operation. +type ListAnalyzableServersAPIClient interface { + ListAnalyzableServers(context.Context, *ListAnalyzableServersInput, ...func(*Options)) (*ListAnalyzableServersOutput, error) +} + +var _ ListAnalyzableServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnalyzableServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubstrategy/api_op_ListApplicationComponents.go b/service/migrationhubstrategy/api_op_ListApplicationComponents.go index 12109e630a4..1380467295b 100644 --- a/service/migrationhubstrategy/api_op_ListApplicationComponents.go +++ b/service/migrationhubstrategy/api_op_ListApplicationComponents.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListApplicationComponentsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationComponents(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListApplicationComponentsMiddlewares(stack *middlew return nil } -// ListApplicationComponentsAPIClient is a client that implements the -// ListApplicationComponents operation. -type ListApplicationComponentsAPIClient interface { - ListApplicationComponents(context.Context, *ListApplicationComponentsInput, ...func(*Options)) (*ListApplicationComponentsOutput, error) -} - -var _ ListApplicationComponentsAPIClient = (*Client)(nil) - // ListApplicationComponentsPaginatorOptions is the paginator options for // ListApplicationComponents type ListApplicationComponentsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListApplicationComponentsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListApplicationComponentsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListApplicationComponentsAPIClient is a client that implements the +// ListApplicationComponents operation. +type ListApplicationComponentsAPIClient interface { + ListApplicationComponents(context.Context, *ListApplicationComponentsInput, ...func(*Options)) (*ListApplicationComponentsOutput, error) +} + +var _ ListApplicationComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubstrategy/api_op_ListCollectors.go b/service/migrationhubstrategy/api_op_ListCollectors.go index 2479d87a0f7..49d411efe6c 100644 --- a/service/migrationhubstrategy/api_op_ListCollectors.go +++ b/service/migrationhubstrategy/api_op_ListCollectors.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListCollectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCollectors(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListCollectorsMiddlewares(stack *middleware.Stack, return nil } -// ListCollectorsAPIClient is a client that implements the ListCollectors -// operation. -type ListCollectorsAPIClient interface { - ListCollectors(context.Context, *ListCollectorsInput, ...func(*Options)) (*ListCollectorsOutput, error) -} - -var _ ListCollectorsAPIClient = (*Client)(nil) - // ListCollectorsPaginatorOptions is the paginator options for ListCollectors type ListCollectorsPaginatorOptions struct { // The maximum number of items to include in the response. The maximum value is @@ -208,6 +203,9 @@ func (p *ListCollectorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListCollectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListCollectorsAPIClient is a client that implements the ListCollectors +// operation. +type ListCollectorsAPIClient interface { + ListCollectors(context.Context, *ListCollectorsInput, ...func(*Options)) (*ListCollectorsOutput, error) +} + +var _ ListCollectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubstrategy/api_op_ListImportFileTask.go b/service/migrationhubstrategy/api_op_ListImportFileTask.go index c9c348b2793..c6fc8460f89 100644 --- a/service/migrationhubstrategy/api_op_ListImportFileTask.go +++ b/service/migrationhubstrategy/api_op_ListImportFileTask.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListImportFileTaskMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImportFileTask(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListImportFileTaskMiddlewares(stack *middleware.Sta return nil } -// ListImportFileTaskAPIClient is a client that implements the ListImportFileTask -// operation. -type ListImportFileTaskAPIClient interface { - ListImportFileTask(context.Context, *ListImportFileTaskInput, ...func(*Options)) (*ListImportFileTaskOutput, error) -} - -var _ ListImportFileTaskAPIClient = (*Client)(nil) - // ListImportFileTaskPaginatorOptions is the paginator options for // ListImportFileTask type ListImportFileTaskPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListImportFileTaskPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportFileTask(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListImportFileTaskPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListImportFileTaskAPIClient is a client that implements the ListImportFileTask +// operation. +type ListImportFileTaskAPIClient interface { + ListImportFileTask(context.Context, *ListImportFileTaskInput, ...func(*Options)) (*ListImportFileTaskOutput, error) +} + +var _ ListImportFileTaskAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportFileTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubstrategy/api_op_ListServers.go b/service/migrationhubstrategy/api_op_ListServers.go index 47dd6e5cf6f..9a48eba6ab0 100644 --- a/service/migrationhubstrategy/api_op_ListServers.go +++ b/service/migrationhubstrategy/api_op_ListServers.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListServersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServers(options.Region), middleware.Before); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListServersMiddlewares(stack *middleware.Stack, opt return nil } -// ListServersAPIClient is a client that implements the ListServers operation. -type ListServersAPIClient interface { - ListServers(context.Context, *ListServersInput, ...func(*Options)) (*ListServersOutput, error) -} - -var _ ListServersAPIClient = (*Client)(nil) - // ListServersPaginatorOptions is the paginator options for ListServers type ListServersPaginatorOptions struct { // The maximum number of items to include in the response. The maximum value is @@ -222,6 +218,9 @@ func (p *ListServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListServersAPIClient is a client that implements the ListServers operation. +type ListServersAPIClient interface { + ListServers(context.Context, *ListServersInput, ...func(*Options)) (*ListServersOutput, error) +} + +var _ ListServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/migrationhubstrategy/api_op_PutPortfolioPreferences.go b/service/migrationhubstrategy/api_op_PutPortfolioPreferences.go index 78ac36183ec..f4aa65c5f3b 100644 --- a/service/migrationhubstrategy/api_op_PutPortfolioPreferences.go +++ b/service/migrationhubstrategy/api_op_PutPortfolioPreferences.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutPortfolioPreferencesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPortfolioPreferencesValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_StartAssessment.go b/service/migrationhubstrategy/api_op_StartAssessment.go index 54818b371c8..295380ba615 100644 --- a/service/migrationhubstrategy/api_op_StartAssessment.go +++ b/service/migrationhubstrategy/api_op_StartAssessment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartAssessmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_StartImportFileTask.go b/service/migrationhubstrategy/api_op_StartImportFileTask.go index ce288e9c19f..0dbd803dc54 100644 --- a/service/migrationhubstrategy/api_op_StartImportFileTask.go +++ b/service/migrationhubstrategy/api_op_StartImportFileTask.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartImportFileTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImportFileTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_StartRecommendationReportGeneration.go b/service/migrationhubstrategy/api_op_StartRecommendationReportGeneration.go index 75535c5a38c..8996345430c 100644 --- a/service/migrationhubstrategy/api_op_StartRecommendationReportGeneration.go +++ b/service/migrationhubstrategy/api_op_StartRecommendationReportGeneration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartRecommendationReportGenerationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartRecommendationReportGeneration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_StopAssessment.go b/service/migrationhubstrategy/api_op_StopAssessment.go index da359e200cb..c0a38232956 100644 --- a/service/migrationhubstrategy/api_op_StopAssessment.go +++ b/service/migrationhubstrategy/api_op_StopAssessment.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopAssessmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_UpdateApplicationComponentConfig.go b/service/migrationhubstrategy/api_op_UpdateApplicationComponentConfig.go index 0bf3554bc97..66b8e02ddac 100644 --- a/service/migrationhubstrategy/api_op_UpdateApplicationComponentConfig.go +++ b/service/migrationhubstrategy/api_op_UpdateApplicationComponentConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateApplicationComponentConfigMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationComponentConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/migrationhubstrategy/api_op_UpdateServerConfig.go b/service/migrationhubstrategy/api_op_UpdateServerConfig.go index e0ad7e856c2..20b80e638d7 100644 --- a/service/migrationhubstrategy/api_op_UpdateServerConfig.go +++ b/service/migrationhubstrategy/api_op_UpdateServerConfig.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateServerConfigMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServerConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/mobile/api_client.go b/service/mobile/api_client.go index 7581f036d43..7a79b8f545d 100644 --- a/service/mobile/api_client.go +++ b/service/mobile/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mobile/api_op_CreateProject.go b/service/mobile/api_op_CreateProject.go index 17ede5243b5..b7a6280bf5e 100644 --- a/service/mobile/api_op_CreateProject.go +++ b/service/mobile/api_op_CreateProject.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateProject(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mobile/api_op_DeleteProject.go b/service/mobile/api_op_DeleteProject.go index cfb2d2f1f3e..684c4ab51ab 100644 --- a/service/mobile/api_op_DeleteProject.go +++ b/service/mobile/api_op_DeleteProject.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mobile/api_op_DescribeBundle.go b/service/mobile/api_op_DescribeBundle.go index 7ef1b8d0eb0..b367c019981 100644 --- a/service/mobile/api_op_DescribeBundle.go +++ b/service/mobile/api_op_DescribeBundle.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeBundleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/mobile/api_op_DescribeProject.go b/service/mobile/api_op_DescribeProject.go index 793e5104c68..785ac9912d1 100644 --- a/service/mobile/api_op_DescribeProject.go +++ b/service/mobile/api_op_DescribeProject.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mobile/api_op_ExportBundle.go b/service/mobile/api_op_ExportBundle.go index d75231bbccb..0a698c15b98 100644 --- a/service/mobile/api_op_ExportBundle.go +++ b/service/mobile/api_op_ExportBundle.go @@ -122,6 +122,9 @@ func (c *Client) addOperationExportBundleMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/mobile/api_op_ExportProject.go b/service/mobile/api_op_ExportProject.go index ea7b6502f9a..deb5fd9a63e 100644 --- a/service/mobile/api_op_ExportProject.go +++ b/service/mobile/api_op_ExportProject.go @@ -122,6 +122,9 @@ func (c *Client) addOperationExportProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mobile/api_op_ListBundles.go b/service/mobile/api_op_ListBundles.go index 977eb767b35..b82d1649b80 100644 --- a/service/mobile/api_op_ListBundles.go +++ b/service/mobile/api_op_ListBundles.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListBundlesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBundles(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListBundlesMiddlewares(stack *middleware.Stack, opt return nil } -// ListBundlesAPIClient is a client that implements the ListBundles operation. -type ListBundlesAPIClient interface { - ListBundles(context.Context, *ListBundlesInput, ...func(*Options)) (*ListBundlesOutput, error) -} - -var _ ListBundlesAPIClient = (*Client)(nil) - // ListBundlesPaginatorOptions is the paginator options for ListBundles type ListBundlesPaginatorOptions struct { // Maximum number of records to list in a single response. @@ -202,6 +198,9 @@ func (p *ListBundlesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBundles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +220,13 @@ func (p *ListBundlesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListBundlesAPIClient is a client that implements the ListBundles operation. +type ListBundlesAPIClient interface { + ListBundles(context.Context, *ListBundlesInput, ...func(*Options)) (*ListBundlesOutput, error) +} + +var _ ListBundlesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBundles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mobile/api_op_ListProjects.go b/service/mobile/api_op_ListProjects.go index 569fcc842ac..29da16aca7a 100644 --- a/service/mobile/api_op_ListProjects.go +++ b/service/mobile/api_op_ListProjects.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // Maximum number of records to list in a single response. @@ -203,6 +199,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mobile/api_op_UpdateProject.go b/service/mobile/api_op_UpdateProject.go index 52bafd48be1..b5ecbd0228d 100644 --- a/service/mobile/api_op_UpdateProject.go +++ b/service/mobile/api_op_UpdateProject.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_client.go b/service/mq/api_client.go index 5b933617ac4..a38f0effc59 100644 --- a/service/mq/api_client.go +++ b/service/mq/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/mq/api_op_CreateBroker.go b/service/mq/api_op_CreateBroker.go index d13575c4959..bc968c3d34f 100644 --- a/service/mq/api_op_CreateBroker.go +++ b/service/mq/api_op_CreateBroker.go @@ -267,6 +267,9 @@ func (c *Client) addOperationCreateBrokerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateBrokerMiddleware(stack, options); err != nil { return err } diff --git a/service/mq/api_op_CreateConfiguration.go b/service/mq/api_op_CreateConfiguration.go index fd4237d0141..c2732eaedf7 100644 --- a/service/mq/api_op_CreateConfiguration.go +++ b/service/mq/api_op_CreateConfiguration.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateConfigurationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_CreateTags.go b/service/mq/api_op_CreateTags.go index ede619c7af7..d76d46efb38 100644 --- a/service/mq/api_op_CreateTags.go +++ b/service/mq/api_op_CreateTags.go @@ -105,6 +105,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_CreateUser.go b/service/mq/api_op_CreateUser.go index 839b3bba24c..c77b5890c9e 100644 --- a/service/mq/api_op_CreateUser.go +++ b/service/mq/api_op_CreateUser.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DeleteBroker.go b/service/mq/api_op_DeleteBroker.go index 692b0de5dfb..70ec33a4135 100644 --- a/service/mq/api_op_DeleteBroker.go +++ b/service/mq/api_op_DeleteBroker.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteBrokerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBrokerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DeleteTags.go b/service/mq/api_op_DeleteTags.go index 3e8efc97462..b4eab76e70e 100644 --- a/service/mq/api_op_DeleteTags.go +++ b/service/mq/api_op_DeleteTags.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DeleteUser.go b/service/mq/api_op_DeleteUser.go index 77b067bc916..bc6293473ac 100644 --- a/service/mq/api_op_DeleteUser.go +++ b/service/mq/api_op_DeleteUser.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DescribeBroker.go b/service/mq/api_op_DescribeBroker.go index 958d68a15c0..ce2bf58280d 100644 --- a/service/mq/api_op_DescribeBroker.go +++ b/service/mq/api_op_DescribeBroker.go @@ -226,6 +226,9 @@ func (c *Client) addOperationDescribeBrokerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBrokerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DescribeBrokerEngineTypes.go b/service/mq/api_op_DescribeBrokerEngineTypes.go index 2fdcdb8e80d..9fb2b61f002 100644 --- a/service/mq/api_op_DescribeBrokerEngineTypes.go +++ b/service/mq/api_op_DescribeBrokerEngineTypes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeBrokerEngineTypesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBrokerEngineTypes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mq/api_op_DescribeBrokerInstanceOptions.go b/service/mq/api_op_DescribeBrokerInstanceOptions.go index d078eec2438..0d80c731104 100644 --- a/service/mq/api_op_DescribeBrokerInstanceOptions.go +++ b/service/mq/api_op_DescribeBrokerInstanceOptions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeBrokerInstanceOptionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBrokerInstanceOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mq/api_op_DescribeConfiguration.go b/service/mq/api_op_DescribeConfiguration.go index c7d0583d0f4..56f47aba3db 100644 --- a/service/mq/api_op_DescribeConfiguration.go +++ b/service/mq/api_op_DescribeConfiguration.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeConfigurationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DescribeConfigurationRevision.go b/service/mq/api_op_DescribeConfigurationRevision.go index c2a7a44d65b..ee1ef300b18 100644 --- a/service/mq/api_op_DescribeConfigurationRevision.go +++ b/service/mq/api_op_DescribeConfigurationRevision.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeConfigurationRevisionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_DescribeUser.go b/service/mq/api_op_DescribeUser.go index 5a251b62f0b..96b5e169f40 100644 --- a/service/mq/api_op_DescribeUser.go +++ b/service/mq/api_op_DescribeUser.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_ListBrokers.go b/service/mq/api_op_ListBrokers.go index 39ba9fc6542..19d740fbb01 100644 --- a/service/mq/api_op_ListBrokers.go +++ b/service/mq/api_op_ListBrokers.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListBrokersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBrokers(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListBrokersMiddlewares(stack *middleware.Stack, opt return nil } -// ListBrokersAPIClient is a client that implements the ListBrokers operation. -type ListBrokersAPIClient interface { - ListBrokers(context.Context, *ListBrokersInput, ...func(*Options)) (*ListBrokersOutput, error) -} - -var _ ListBrokersAPIClient = (*Client)(nil) - // ListBrokersPaginatorOptions is the paginator options for ListBrokers type ListBrokersPaginatorOptions struct { // The maximum number of brokers that Amazon MQ can return per page (20 by @@ -205,6 +201,9 @@ func (p *ListBrokersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBrokers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListBrokersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListBrokersAPIClient is a client that implements the ListBrokers operation. +type ListBrokersAPIClient interface { + ListBrokers(context.Context, *ListBrokersInput, ...func(*Options)) (*ListBrokersOutput, error) +} + +var _ ListBrokersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBrokers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mq/api_op_ListConfigurationRevisions.go b/service/mq/api_op_ListConfigurationRevisions.go index a2796313fde..5b9859ff885 100644 --- a/service/mq/api_op_ListConfigurationRevisions.go +++ b/service/mq/api_op_ListConfigurationRevisions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListConfigurationRevisionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConfigurationRevisionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_ListConfigurations.go b/service/mq/api_op_ListConfigurations.go index abd52ff811a..890425aa07f 100644 --- a/service/mq/api_op_ListConfigurations.go +++ b/service/mq/api_op_ListConfigurations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListConfigurationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mq/api_op_ListTags.go b/service/mq/api_op_ListTags.go index 0b286b0f65f..dba7213486f 100644 --- a/service/mq/api_op_ListTags.go +++ b/service/mq/api_op_ListTags.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_ListUsers.go b/service/mq/api_op_ListUsers.go index 79c647127ee..83ceb3da898 100644 --- a/service/mq/api_op_ListUsers.go +++ b/service/mq/api_op_ListUsers.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_Promote.go b/service/mq/api_op_Promote.go index e4c7b853983..dabdddfef09 100644 --- a/service/mq/api_op_Promote.go +++ b/service/mq/api_op_Promote.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPromoteMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPromoteValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_RebootBroker.go b/service/mq/api_op_RebootBroker.go index 2e060c8ecf2..a8009300c5b 100644 --- a/service/mq/api_op_RebootBroker.go +++ b/service/mq/api_op_RebootBroker.go @@ -101,6 +101,9 @@ func (c *Client) addOperationRebootBrokerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootBrokerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_UpdateBroker.go b/service/mq/api_op_UpdateBroker.go index a2cd0a3cb50..b29c7ffd304 100644 --- a/service/mq/api_op_UpdateBroker.go +++ b/service/mq/api_op_UpdateBroker.go @@ -200,6 +200,9 @@ func (c *Client) addOperationUpdateBrokerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBrokerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_UpdateConfiguration.go b/service/mq/api_op_UpdateConfiguration.go index a1ca65c95f9..1b9b220104a 100644 --- a/service/mq/api_op_UpdateConfiguration.go +++ b/service/mq/api_op_UpdateConfiguration.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateConfigurationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mq/api_op_UpdateUser.go b/service/mq/api_op_UpdateUser.go index e024fc0785b..4068a62ce8b 100644 --- a/service/mq/api_op_UpdateUser.go +++ b/service/mq/api_op_UpdateUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_client.go b/service/mturk/api_client.go index 98f48b6dbdf..6a8faf08597 100644 --- a/service/mturk/api_client.go +++ b/service/mturk/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mturk/api_op_AcceptQualificationRequest.go b/service/mturk/api_op_AcceptQualificationRequest.go index ef6826008d2..14a0a1751a8 100644 --- a/service/mturk/api_op_AcceptQualificationRequest.go +++ b/service/mturk/api_op_AcceptQualificationRequest.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAcceptQualificationRequestMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptQualificationRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_ApproveAssignment.go b/service/mturk/api_op_ApproveAssignment.go index 31e672f8bc6..df64a63b847 100644 --- a/service/mturk/api_op_ApproveAssignment.go +++ b/service/mturk/api_op_ApproveAssignment.go @@ -130,6 +130,9 @@ func (c *Client) addOperationApproveAssignmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApproveAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_AssociateQualificationWithWorker.go b/service/mturk/api_op_AssociateQualificationWithWorker.go index a4fa628964c..79d51a42fef 100644 --- a/service/mturk/api_op_AssociateQualificationWithWorker.go +++ b/service/mturk/api_op_AssociateQualificationWithWorker.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAssociateQualificationWithWorkerMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateQualificationWithWorkerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_CreateAdditionalAssignmentsForHIT.go b/service/mturk/api_op_CreateAdditionalAssignmentsForHIT.go index beac5602b79..12dc7012936 100644 --- a/service/mturk/api_op_CreateAdditionalAssignmentsForHIT.go +++ b/service/mturk/api_op_CreateAdditionalAssignmentsForHIT.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateAdditionalAssignmentsForHITMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAdditionalAssignmentsForHITValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_CreateHIT.go b/service/mturk/api_op_CreateHIT.go index 5f7cf9b0f55..d86bd820478 100644 --- a/service/mturk/api_op_CreateHIT.go +++ b/service/mturk/api_op_CreateHIT.go @@ -238,6 +238,9 @@ func (c *Client) addOperationCreateHITMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHITValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_CreateHITType.go b/service/mturk/api_op_CreateHITType.go index 4776a8a0898..10b6c2d2913 100644 --- a/service/mturk/api_op_CreateHITType.go +++ b/service/mturk/api_op_CreateHITType.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateHITTypeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHITTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_CreateHITWithHITType.go b/service/mturk/api_op_CreateHITWithHITType.go index 137993e6306..ef69b3341e0 100644 --- a/service/mturk/api_op_CreateHITWithHITType.go +++ b/service/mturk/api_op_CreateHITWithHITType.go @@ -188,6 +188,9 @@ func (c *Client) addOperationCreateHITWithHITTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHITWithHITTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_CreateQualificationType.go b/service/mturk/api_op_CreateQualificationType.go index 82a2523c0dc..403ee45fdd2 100644 --- a/service/mturk/api_op_CreateQualificationType.go +++ b/service/mturk/api_op_CreateQualificationType.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateQualificationTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateQualificationTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_CreateWorkerBlock.go b/service/mturk/api_op_CreateWorkerBlock.go index 4daddd29a55..7030a48a16c 100644 --- a/service/mturk/api_op_CreateWorkerBlock.go +++ b/service/mturk/api_op_CreateWorkerBlock.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateWorkerBlockMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkerBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_DeleteHIT.go b/service/mturk/api_op_DeleteHIT.go index 04bd3e6386b..65e5c99c451 100644 --- a/service/mturk/api_op_DeleteHIT.go +++ b/service/mturk/api_op_DeleteHIT.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteHITMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHITValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_DeleteQualificationType.go b/service/mturk/api_op_DeleteQualificationType.go index e0776037db9..2ac5f591099 100644 --- a/service/mturk/api_op_DeleteQualificationType.go +++ b/service/mturk/api_op_DeleteQualificationType.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteQualificationTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQualificationTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_DeleteWorkerBlock.go b/service/mturk/api_op_DeleteWorkerBlock.go index dd7a785246f..e4403458fde 100644 --- a/service/mturk/api_op_DeleteWorkerBlock.go +++ b/service/mturk/api_op_DeleteWorkerBlock.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteWorkerBlockMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkerBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_DisassociateQualificationFromWorker.go b/service/mturk/api_op_DisassociateQualificationFromWorker.go index d8b09dd112f..1fc626af36d 100644 --- a/service/mturk/api_op_DisassociateQualificationFromWorker.go +++ b/service/mturk/api_op_DisassociateQualificationFromWorker.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisassociateQualificationFromWorkerMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateQualificationFromWorkerValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_GetAccountBalance.go b/service/mturk/api_op_GetAccountBalance.go index 4e91d48643c..b9d6ca15cf4 100644 --- a/service/mturk/api_op_GetAccountBalance.go +++ b/service/mturk/api_op_GetAccountBalance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetAccountBalanceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountBalance(options.Region), middleware.Before); err != nil { return err } diff --git a/service/mturk/api_op_GetAssignment.go b/service/mturk/api_op_GetAssignment.go index 9f108ec6292..e9eb6a0bb35 100644 --- a/service/mturk/api_op_GetAssignment.go +++ b/service/mturk/api_op_GetAssignment.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetAssignmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_GetFileUploadURL.go b/service/mturk/api_op_GetFileUploadURL.go index 391fe390adb..71286bcb5a0 100644 --- a/service/mturk/api_op_GetFileUploadURL.go +++ b/service/mturk/api_op_GetFileUploadURL.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetFileUploadURLMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFileUploadURLValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_GetHIT.go b/service/mturk/api_op_GetHIT.go index ce2d2ab023e..48cbf8e993a 100644 --- a/service/mturk/api_op_GetHIT.go +++ b/service/mturk/api_op_GetHIT.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetHITMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHITValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_GetQualificationScore.go b/service/mturk/api_op_GetQualificationScore.go index 00301bc31b7..45d80094259 100644 --- a/service/mturk/api_op_GetQualificationScore.go +++ b/service/mturk/api_op_GetQualificationScore.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetQualificationScoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQualificationScoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_GetQualificationType.go b/service/mturk/api_op_GetQualificationType.go index e7bbe333a59..70a94dbd8c4 100644 --- a/service/mturk/api_op_GetQualificationType.go +++ b/service/mturk/api_op_GetQualificationType.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetQualificationTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQualificationTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_ListAssignmentsForHIT.go b/service/mturk/api_op_ListAssignmentsForHIT.go index 1109014b3c8..17baee94c65 100644 --- a/service/mturk/api_op_ListAssignmentsForHIT.go +++ b/service/mturk/api_op_ListAssignmentsForHIT.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListAssignmentsForHITMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssignmentsForHITValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListAssignmentsForHITMiddlewares(stack *middleware. return nil } -// ListAssignmentsForHITAPIClient is a client that implements the -// ListAssignmentsForHIT operation. -type ListAssignmentsForHITAPIClient interface { - ListAssignmentsForHIT(context.Context, *ListAssignmentsForHITInput, ...func(*Options)) (*ListAssignmentsForHITOutput, error) -} - -var _ ListAssignmentsForHITAPIClient = (*Client)(nil) - // ListAssignmentsForHITPaginatorOptions is the paginator options for // ListAssignmentsForHIT type ListAssignmentsForHITPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListAssignmentsForHITPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssignmentsForHIT(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListAssignmentsForHITPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAssignmentsForHITAPIClient is a client that implements the +// ListAssignmentsForHIT operation. +type ListAssignmentsForHITAPIClient interface { + ListAssignmentsForHIT(context.Context, *ListAssignmentsForHITInput, ...func(*Options)) (*ListAssignmentsForHITOutput, error) +} + +var _ ListAssignmentsForHITAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssignmentsForHIT(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListBonusPayments.go b/service/mturk/api_op_ListBonusPayments.go index d9c11b81140..e7ba497c87e 100644 --- a/service/mturk/api_op_ListBonusPayments.go +++ b/service/mturk/api_op_ListBonusPayments.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListBonusPaymentsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBonusPayments(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListBonusPaymentsMiddlewares(stack *middleware.Stac return nil } -// ListBonusPaymentsAPIClient is a client that implements the ListBonusPayments -// operation. -type ListBonusPaymentsAPIClient interface { - ListBonusPayments(context.Context, *ListBonusPaymentsInput, ...func(*Options)) (*ListBonusPaymentsOutput, error) -} - -var _ ListBonusPaymentsAPIClient = (*Client)(nil) - // ListBonusPaymentsPaginatorOptions is the paginator options for ListBonusPayments type ListBonusPaymentsPaginatorOptions struct { Limit int32 @@ -220,6 +215,9 @@ func (p *ListBonusPaymentsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBonusPayments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListBonusPaymentsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListBonusPaymentsAPIClient is a client that implements the ListBonusPayments +// operation. +type ListBonusPaymentsAPIClient interface { + ListBonusPayments(context.Context, *ListBonusPaymentsInput, ...func(*Options)) (*ListBonusPaymentsOutput, error) +} + +var _ ListBonusPaymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBonusPayments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListHITs.go b/service/mturk/api_op_ListHITs.go index 409ba85c4a4..939e57d8262 100644 --- a/service/mturk/api_op_ListHITs.go +++ b/service/mturk/api_op_ListHITs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListHITsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHITs(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListHITsMiddlewares(stack *middleware.Stack, option return nil } -// ListHITsAPIClient is a client that implements the ListHITs operation. -type ListHITsAPIClient interface { - ListHITs(context.Context, *ListHITsInput, ...func(*Options)) (*ListHITsOutput, error) -} - -var _ ListHITsAPIClient = (*Client)(nil) - // ListHITsPaginatorOptions is the paginator options for ListHITs type ListHITsPaginatorOptions struct { Limit int32 @@ -207,6 +203,9 @@ func (p *ListHITsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHITs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListHITsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListHITsAPIClient is a client that implements the ListHITs operation. +type ListHITsAPIClient interface { + ListHITs(context.Context, *ListHITsInput, ...func(*Options)) (*ListHITsOutput, error) +} + +var _ ListHITsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHITs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListHITsForQualificationType.go b/service/mturk/api_op_ListHITsForQualificationType.go index 1a309805c64..a86adf567d8 100644 --- a/service/mturk/api_op_ListHITsForQualificationType.go +++ b/service/mturk/api_op_ListHITsForQualificationType.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListHITsForQualificationTypeMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHITsForQualificationTypeValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListHITsForQualificationTypeMiddlewares(stack *midd return nil } -// ListHITsForQualificationTypeAPIClient is a client that implements the -// ListHITsForQualificationType operation. -type ListHITsForQualificationTypeAPIClient interface { - ListHITsForQualificationType(context.Context, *ListHITsForQualificationTypeInput, ...func(*Options)) (*ListHITsForQualificationTypeOutput, error) -} - -var _ ListHITsForQualificationTypeAPIClient = (*Client)(nil) - // ListHITsForQualificationTypePaginatorOptions is the paginator options for // ListHITsForQualificationType type ListHITsForQualificationTypePaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListHITsForQualificationTypePaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHITsForQualificationType(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListHITsForQualificationTypePaginator) NextPage(ctx context.Context, op return result, nil } +// ListHITsForQualificationTypeAPIClient is a client that implements the +// ListHITsForQualificationType operation. +type ListHITsForQualificationTypeAPIClient interface { + ListHITsForQualificationType(context.Context, *ListHITsForQualificationTypeInput, ...func(*Options)) (*ListHITsForQualificationTypeOutput, error) +} + +var _ ListHITsForQualificationTypeAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHITsForQualificationType(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListQualificationRequests.go b/service/mturk/api_op_ListQualificationRequests.go index 8b23d632527..3d00a5f1300 100644 --- a/service/mturk/api_op_ListQualificationRequests.go +++ b/service/mturk/api_op_ListQualificationRequests.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListQualificationRequestsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQualificationRequests(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListQualificationRequestsMiddlewares(stack *middlew return nil } -// ListQualificationRequestsAPIClient is a client that implements the -// ListQualificationRequests operation. -type ListQualificationRequestsAPIClient interface { - ListQualificationRequests(context.Context, *ListQualificationRequestsInput, ...func(*Options)) (*ListQualificationRequestsOutput, error) -} - -var _ ListQualificationRequestsAPIClient = (*Client)(nil) - // ListQualificationRequestsPaginatorOptions is the paginator options for // ListQualificationRequests type ListQualificationRequestsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListQualificationRequestsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQualificationRequests(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListQualificationRequestsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListQualificationRequestsAPIClient is a client that implements the +// ListQualificationRequests operation. +type ListQualificationRequestsAPIClient interface { + ListQualificationRequests(context.Context, *ListQualificationRequestsInput, ...func(*Options)) (*ListQualificationRequestsOutput, error) +} + +var _ ListQualificationRequestsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQualificationRequests(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListQualificationTypes.go b/service/mturk/api_op_ListQualificationTypes.go index d43adb60f2d..b7cf738c240 100644 --- a/service/mturk/api_op_ListQualificationTypes.go +++ b/service/mturk/api_op_ListQualificationTypes.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListQualificationTypesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQualificationTypesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListQualificationTypesMiddlewares(stack *middleware return nil } -// ListQualificationTypesAPIClient is a client that implements the -// ListQualificationTypes operation. -type ListQualificationTypesAPIClient interface { - ListQualificationTypes(context.Context, *ListQualificationTypesInput, ...func(*Options)) (*ListQualificationTypesOutput, error) -} - -var _ ListQualificationTypesAPIClient = (*Client)(nil) - // ListQualificationTypesPaginatorOptions is the paginator options for // ListQualificationTypes type ListQualificationTypesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListQualificationTypesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQualificationTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListQualificationTypesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListQualificationTypesAPIClient is a client that implements the +// ListQualificationTypes operation. +type ListQualificationTypesAPIClient interface { + ListQualificationTypes(context.Context, *ListQualificationTypesInput, ...func(*Options)) (*ListQualificationTypesOutput, error) +} + +var _ ListQualificationTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQualificationTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListReviewPolicyResultsForHIT.go b/service/mturk/api_op_ListReviewPolicyResultsForHIT.go index 8ebda4d4169..d985e9c1834 100644 --- a/service/mturk/api_op_ListReviewPolicyResultsForHIT.go +++ b/service/mturk/api_op_ListReviewPolicyResultsForHIT.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListReviewPolicyResultsForHITMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListReviewPolicyResultsForHITValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListReviewPolicyResultsForHITMiddlewares(stack *mid return nil } -// ListReviewPolicyResultsForHITAPIClient is a client that implements the -// ListReviewPolicyResultsForHIT operation. -type ListReviewPolicyResultsForHITAPIClient interface { - ListReviewPolicyResultsForHIT(context.Context, *ListReviewPolicyResultsForHITInput, ...func(*Options)) (*ListReviewPolicyResultsForHITOutput, error) -} - -var _ ListReviewPolicyResultsForHITAPIClient = (*Client)(nil) - // ListReviewPolicyResultsForHITPaginatorOptions is the paginator options for // ListReviewPolicyResultsForHIT type ListReviewPolicyResultsForHITPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListReviewPolicyResultsForHITPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReviewPolicyResultsForHIT(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListReviewPolicyResultsForHITPaginator) NextPage(ctx context.Context, o return result, nil } +// ListReviewPolicyResultsForHITAPIClient is a client that implements the +// ListReviewPolicyResultsForHIT operation. +type ListReviewPolicyResultsForHITAPIClient interface { + ListReviewPolicyResultsForHIT(context.Context, *ListReviewPolicyResultsForHITInput, ...func(*Options)) (*ListReviewPolicyResultsForHITOutput, error) +} + +var _ ListReviewPolicyResultsForHITAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReviewPolicyResultsForHIT(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListReviewableHITs.go b/service/mturk/api_op_ListReviewableHITs.go index 188fd173416..3e3444c2a90 100644 --- a/service/mturk/api_op_ListReviewableHITs.go +++ b/service/mturk/api_op_ListReviewableHITs.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListReviewableHITsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReviewableHITs(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListReviewableHITsMiddlewares(stack *middleware.Sta return nil } -// ListReviewableHITsAPIClient is a client that implements the ListReviewableHITs -// operation. -type ListReviewableHITsAPIClient interface { - ListReviewableHITs(context.Context, *ListReviewableHITsInput, ...func(*Options)) (*ListReviewableHITsOutput, error) -} - -var _ ListReviewableHITsAPIClient = (*Client)(nil) - // ListReviewableHITsPaginatorOptions is the paginator options for // ListReviewableHITs type ListReviewableHITsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListReviewableHITsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReviewableHITs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListReviewableHITsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListReviewableHITsAPIClient is a client that implements the ListReviewableHITs +// operation. +type ListReviewableHITsAPIClient interface { + ListReviewableHITs(context.Context, *ListReviewableHITsInput, ...func(*Options)) (*ListReviewableHITsOutput, error) +} + +var _ ListReviewableHITsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReviewableHITs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListWorkerBlocks.go b/service/mturk/api_op_ListWorkerBlocks.go index 897ad39263d..a0f64d19b1b 100644 --- a/service/mturk/api_op_ListWorkerBlocks.go +++ b/service/mturk/api_op_ListWorkerBlocks.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListWorkerBlocksMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkerBlocks(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListWorkerBlocksMiddlewares(stack *middleware.Stack return nil } -// ListWorkerBlocksAPIClient is a client that implements the ListWorkerBlocks -// operation. -type ListWorkerBlocksAPIClient interface { - ListWorkerBlocks(context.Context, *ListWorkerBlocksInput, ...func(*Options)) (*ListWorkerBlocksOutput, error) -} - -var _ ListWorkerBlocksAPIClient = (*Client)(nil) - // ListWorkerBlocksPaginatorOptions is the paginator options for ListWorkerBlocks type ListWorkerBlocksPaginatorOptions struct { Limit int32 @@ -207,6 +202,9 @@ func (p *ListWorkerBlocksPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkerBlocks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListWorkerBlocksPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListWorkerBlocksAPIClient is a client that implements the ListWorkerBlocks +// operation. +type ListWorkerBlocksAPIClient interface { + ListWorkerBlocks(context.Context, *ListWorkerBlocksInput, ...func(*Options)) (*ListWorkerBlocksOutput, error) +} + +var _ ListWorkerBlocksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkerBlocks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_ListWorkersWithQualificationType.go b/service/mturk/api_op_ListWorkersWithQualificationType.go index e700ac9ba1b..34a7123b865 100644 --- a/service/mturk/api_op_ListWorkersWithQualificationType.go +++ b/service/mturk/api_op_ListWorkersWithQualificationType.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListWorkersWithQualificationTypeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkersWithQualificationTypeValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListWorkersWithQualificationTypeMiddlewares(stack * return nil } -// ListWorkersWithQualificationTypeAPIClient is a client that implements the -// ListWorkersWithQualificationType operation. -type ListWorkersWithQualificationTypeAPIClient interface { - ListWorkersWithQualificationType(context.Context, *ListWorkersWithQualificationTypeInput, ...func(*Options)) (*ListWorkersWithQualificationTypeOutput, error) -} - -var _ ListWorkersWithQualificationTypeAPIClient = (*Client)(nil) - // ListWorkersWithQualificationTypePaginatorOptions is the paginator options for // ListWorkersWithQualificationType type ListWorkersWithQualificationTypePaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListWorkersWithQualificationTypePaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkersWithQualificationType(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListWorkersWithQualificationTypePaginator) NextPage(ctx context.Context return result, nil } +// ListWorkersWithQualificationTypeAPIClient is a client that implements the +// ListWorkersWithQualificationType operation. +type ListWorkersWithQualificationTypeAPIClient interface { + ListWorkersWithQualificationType(context.Context, *ListWorkersWithQualificationTypeInput, ...func(*Options)) (*ListWorkersWithQualificationTypeOutput, error) +} + +var _ ListWorkersWithQualificationTypeAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkersWithQualificationType(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mturk/api_op_NotifyWorkers.go b/service/mturk/api_op_NotifyWorkers.go index e2797b98508..75458c87455 100644 --- a/service/mturk/api_op_NotifyWorkers.go +++ b/service/mturk/api_op_NotifyWorkers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationNotifyWorkersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyWorkersValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_RejectAssignment.go b/service/mturk/api_op_RejectAssignment.go index 90829c7201b..69d8a67c601 100644 --- a/service/mturk/api_op_RejectAssignment.go +++ b/service/mturk/api_op_RejectAssignment.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRejectAssignmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_RejectQualificationRequest.go b/service/mturk/api_op_RejectQualificationRequest.go index a5ee61026e4..58efa6f02f8 100644 --- a/service/mturk/api_op_RejectQualificationRequest.go +++ b/service/mturk/api_op_RejectQualificationRequest.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRejectQualificationRequestMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectQualificationRequestValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_SendBonus.go b/service/mturk/api_op_SendBonus.go index c29dfb0eb12..32a2e782a29 100644 --- a/service/mturk/api_op_SendBonus.go +++ b/service/mturk/api_op_SendBonus.go @@ -136,6 +136,9 @@ func (c *Client) addOperationSendBonusMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendBonusValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_SendTestEventNotification.go b/service/mturk/api_op_SendTestEventNotification.go index 3f950e2e6f3..d3a5a92db66 100644 --- a/service/mturk/api_op_SendTestEventNotification.go +++ b/service/mturk/api_op_SendTestEventNotification.go @@ -118,6 +118,9 @@ func (c *Client) addOperationSendTestEventNotificationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendTestEventNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_UpdateExpirationForHIT.go b/service/mturk/api_op_UpdateExpirationForHIT.go index c0c498eb9df..bcd5f3e3b40 100644 --- a/service/mturk/api_op_UpdateExpirationForHIT.go +++ b/service/mturk/api_op_UpdateExpirationForHIT.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateExpirationForHITMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExpirationForHITValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_UpdateHITReviewStatus.go b/service/mturk/api_op_UpdateHITReviewStatus.go index 4582435459c..95fc4769b4d 100644 --- a/service/mturk/api_op_UpdateHITReviewStatus.go +++ b/service/mturk/api_op_UpdateHITReviewStatus.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateHITReviewStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHITReviewStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_UpdateHITTypeOfHIT.go b/service/mturk/api_op_UpdateHITTypeOfHIT.go index 7d4af4701e7..f451df15082 100644 --- a/service/mturk/api_op_UpdateHITTypeOfHIT.go +++ b/service/mturk/api_op_UpdateHITTypeOfHIT.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateHITTypeOfHITMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHITTypeOfHITValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_UpdateNotificationSettings.go b/service/mturk/api_op_UpdateNotificationSettings.go index cb2d52f00c9..557484037cf 100644 --- a/service/mturk/api_op_UpdateNotificationSettings.go +++ b/service/mturk/api_op_UpdateNotificationSettings.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateNotificationSettingsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotificationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/mturk/api_op_UpdateQualificationType.go b/service/mturk/api_op_UpdateQualificationType.go index 1bb3cd0570c..4686733b23d 100644 --- a/service/mturk/api_op_UpdateQualificationType.go +++ b/service/mturk/api_op_UpdateQualificationType.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateQualificationTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQualificationTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_client.go b/service/mwaa/api_client.go index 5bf5f7937de..84deee12f1b 100644 --- a/service/mwaa/api_client.go +++ b/service/mwaa/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/mwaa/api_op_CreateCliToken.go b/service/mwaa/api_op_CreateCliToken.go index 75274382d7e..1bcefb54ed4 100644 --- a/service/mwaa/api_op_CreateCliToken.go +++ b/service/mwaa/api_op_CreateCliToken.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateCliTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateCliTokenMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_CreateEnvironment.go b/service/mwaa/api_op_CreateEnvironment.go index c8d516cb3c7..0f0b5ced7aa 100644 --- a/service/mwaa/api_op_CreateEnvironment.go +++ b/service/mwaa/api_op_CreateEnvironment.go @@ -307,6 +307,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_CreateWebLoginToken.go b/service/mwaa/api_op_CreateWebLoginToken.go index 49d4c61f79d..f86627ee0d4 100644 --- a/service/mwaa/api_op_CreateWebLoginToken.go +++ b/service/mwaa/api_op_CreateWebLoginToken.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateWebLoginTokenMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateWebLoginTokenMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_DeleteEnvironment.go b/service/mwaa/api_op_DeleteEnvironment.go index 4b76407b86a..35c95d9e1b2 100644 --- a/service/mwaa/api_op_DeleteEnvironment.go +++ b/service/mwaa/api_op_DeleteEnvironment.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_GetEnvironment.go b/service/mwaa/api_op_GetEnvironment.go index e0d9b8a3db9..ff96ee0d6bc 100644 --- a/service/mwaa/api_op_GetEnvironment.go +++ b/service/mwaa/api_op_GetEnvironment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_ListEnvironments.go b/service/mwaa/api_op_ListEnvironments.go index 4ca0a65cb41..9d8227ebd6f 100644 --- a/service/mwaa/api_op_ListEnvironments.go +++ b/service/mwaa/api_op_ListEnvironments.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListEnvironmentsMiddleware(stack); err != nil { return err } @@ -136,41 +139,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListEnvironmentsMiddleware struct { -} - -func (*endpointPrefix_opListEnvironmentsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListEnvironmentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListEnvironmentsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListEnvironmentsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of results to retrieve per page. For example, 5 environments @@ -235,6 +203,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +225,41 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListEnvironmentsMiddleware struct { +} + +func (*endpointPrefix_opListEnvironmentsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListEnvironmentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListEnvironmentsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListEnvironmentsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/mwaa/api_op_ListTagsForResource.go b/service/mwaa/api_op_ListTagsForResource.go index b3015c46e81..988a2a5ba82 100644 --- a/service/mwaa/api_op_ListTagsForResource.go +++ b/service/mwaa/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_PublishMetrics.go b/service/mwaa/api_op_PublishMetrics.go index c1981641e9d..f0f35618686 100644 --- a/service/mwaa/api_op_PublishMetrics.go +++ b/service/mwaa/api_op_PublishMetrics.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPublishMetricsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPublishMetricsMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_TagResource.go b/service/mwaa/api_op_TagResource.go index e93f2f3d9f3..3ca47de391e 100644 --- a/service/mwaa/api_op_TagResource.go +++ b/service/mwaa/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_UntagResource.go b/service/mwaa/api_op_UntagResource.go index 701a1c6a380..1d205801b06 100644 --- a/service/mwaa/api_op_UntagResource.go +++ b/service/mwaa/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/mwaa/api_op_UpdateEnvironment.go b/service/mwaa/api_op_UpdateEnvironment.go index c882585ae41..13a0d485c23 100644 --- a/service/mwaa/api_op_UpdateEnvironment.go +++ b/service/mwaa/api_op_UpdateEnvironment.go @@ -266,6 +266,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_client.go b/service/neptune/api_client.go index 92e3c450f87..88313a9a993 100644 --- a/service/neptune/api_client.go +++ b/service/neptune/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/neptune/api_op_AddRoleToDBCluster.go b/service/neptune/api_op_AddRoleToDBCluster.go index bf60c3f8780..44f03024ace 100644 --- a/service/neptune/api_op_AddRoleToDBCluster.go +++ b/service/neptune/api_op_AddRoleToDBCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAddRoleToDBClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddRoleToDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_AddSourceIdentifierToSubscription.go b/service/neptune/api_op_AddSourceIdentifierToSubscription.go index 51ad735cee8..473224b052c 100644 --- a/service/neptune/api_op_AddSourceIdentifierToSubscription.go +++ b/service/neptune/api_op_AddSourceIdentifierToSubscription.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAddSourceIdentifierToSubscriptionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddSourceIdentifierToSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_AddTagsToResource.go b/service/neptune/api_op_AddTagsToResource.go index e665875fce2..cd91cc35410 100644 --- a/service/neptune/api_op_AddTagsToResource.go +++ b/service/neptune/api_op_AddTagsToResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ApplyPendingMaintenanceAction.go b/service/neptune/api_op_ApplyPendingMaintenanceAction.go index 543f5dfc2c1..8e95373b322 100644 --- a/service/neptune/api_op_ApplyPendingMaintenanceAction.go +++ b/service/neptune/api_op_ApplyPendingMaintenanceAction.go @@ -132,6 +132,9 @@ func (c *Client) addOperationApplyPendingMaintenanceActionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplyPendingMaintenanceActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CopyDBClusterParameterGroup.go b/service/neptune/api_op_CopyDBClusterParameterGroup.go index d73223d26f9..2649be9dfd0 100644 --- a/service/neptune/api_op_CopyDBClusterParameterGroup.go +++ b/service/neptune/api_op_CopyDBClusterParameterGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCopyDBClusterParameterGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CopyDBClusterSnapshot.go b/service/neptune/api_op_CopyDBClusterSnapshot.go index 4630e3574fe..ec17ed17751 100644 --- a/service/neptune/api_op_CopyDBClusterSnapshot.go +++ b/service/neptune/api_op_CopyDBClusterSnapshot.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCopyDBClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CopyDBParameterGroup.go b/service/neptune/api_op_CopyDBParameterGroup.go index c3c3acc9f42..ddb71cfc163 100644 --- a/service/neptune/api_op_CopyDBParameterGroup.go +++ b/service/neptune/api_op_CopyDBParameterGroup.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCopyDBParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBCluster.go b/service/neptune/api_op_CreateDBCluster.go index aa67e97cc09..c0ad9418cb5 100644 --- a/service/neptune/api_op_CreateDBCluster.go +++ b/service/neptune/api_op_CreateDBCluster.go @@ -329,6 +329,9 @@ func (c *Client) addOperationCreateDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBClusterEndpoint.go b/service/neptune/api_op_CreateDBClusterEndpoint.go index e4c216ae8cb..46b64cf849d 100644 --- a/service/neptune/api_op_CreateDBClusterEndpoint.go +++ b/service/neptune/api_op_CreateDBClusterEndpoint.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreateDBClusterEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBClusterParameterGroup.go b/service/neptune/api_op_CreateDBClusterParameterGroup.go index 54fb8e0ef01..6157f2d2688 100644 --- a/service/neptune/api_op_CreateDBClusterParameterGroup.go +++ b/service/neptune/api_op_CreateDBClusterParameterGroup.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBClusterSnapshot.go b/service/neptune/api_op_CreateDBClusterSnapshot.go index 16426575ad0..e2f81ad1c8b 100644 --- a/service/neptune/api_op_CreateDBClusterSnapshot.go +++ b/service/neptune/api_op_CreateDBClusterSnapshot.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateDBClusterSnapshotMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBInstance.go b/service/neptune/api_op_CreateDBInstance.go index bd73eecf855..28361a9d5bb 100644 --- a/service/neptune/api_op_CreateDBInstance.go +++ b/service/neptune/api_op_CreateDBInstance.go @@ -373,6 +373,9 @@ func (c *Client) addOperationCreateDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBParameterGroup.go b/service/neptune/api_op_CreateDBParameterGroup.go index 695018115b5..09a6164cf3e 100644 --- a/service/neptune/api_op_CreateDBParameterGroup.go +++ b/service/neptune/api_op_CreateDBParameterGroup.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateDBParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateDBSubnetGroup.go b/service/neptune/api_op_CreateDBSubnetGroup.go index 2b6001fa802..651be2e267c 100644 --- a/service/neptune/api_op_CreateDBSubnetGroup.go +++ b/service/neptune/api_op_CreateDBSubnetGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateEventSubscription.go b/service/neptune/api_op_CreateEventSubscription.go index dfcf89f43b0..3a3e7767fde 100644 --- a/service/neptune/api_op_CreateEventSubscription.go +++ b/service/neptune/api_op_CreateEventSubscription.go @@ -172,6 +172,9 @@ func (c *Client) addOperationCreateEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_CreateGlobalCluster.go b/service/neptune/api_op_CreateGlobalCluster.go index 4ad24f4a53d..13783e55d08 100644 --- a/service/neptune/api_op_CreateGlobalCluster.go +++ b/service/neptune/api_op_CreateGlobalCluster.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBCluster.go b/service/neptune/api_op_DeleteDBCluster.go index 6cb7755fe7b..a0675c57ba4 100644 --- a/service/neptune/api_op_DeleteDBCluster.go +++ b/service/neptune/api_op_DeleteDBCluster.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDeleteDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBClusterEndpoint.go b/service/neptune/api_op_DeleteDBClusterEndpoint.go index 2c5e87b2b3c..543bb820d7f 100644 --- a/service/neptune/api_op_DeleteDBClusterEndpoint.go +++ b/service/neptune/api_op_DeleteDBClusterEndpoint.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDeleteDBClusterEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBClusterParameterGroup.go b/service/neptune/api_op_DeleteDBClusterParameterGroup.go index 837a282f1b2..264fa60f27a 100644 --- a/service/neptune/api_op_DeleteDBClusterParameterGroup.go +++ b/service/neptune/api_op_DeleteDBClusterParameterGroup.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBClusterSnapshot.go b/service/neptune/api_op_DeleteDBClusterSnapshot.go index f8e8463f467..d5ee9402cb8 100644 --- a/service/neptune/api_op_DeleteDBClusterSnapshot.go +++ b/service/neptune/api_op_DeleteDBClusterSnapshot.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteDBClusterSnapshotMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBInstance.go b/service/neptune/api_op_DeleteDBInstance.go index 5904600b883..ec2f93796ff 100644 --- a/service/neptune/api_op_DeleteDBInstance.go +++ b/service/neptune/api_op_DeleteDBInstance.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDeleteDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBParameterGroup.go b/service/neptune/api_op_DeleteDBParameterGroup.go index 3f65862cdef..6c8b3cca33d 100644 --- a/service/neptune/api_op_DeleteDBParameterGroup.go +++ b/service/neptune/api_op_DeleteDBParameterGroup.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDBParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteDBSubnetGroup.go b/service/neptune/api_op_DeleteDBSubnetGroup.go index dc676c01ae3..5cc9e6ec26c 100644 --- a/service/neptune/api_op_DeleteDBSubnetGroup.go +++ b/service/neptune/api_op_DeleteDBSubnetGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteEventSubscription.go b/service/neptune/api_op_DeleteEventSubscription.go index 936370a07a5..bea4eee974b 100644 --- a/service/neptune/api_op_DeleteEventSubscription.go +++ b/service/neptune/api_op_DeleteEventSubscription.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DeleteGlobalCluster.go b/service/neptune/api_op_DeleteGlobalCluster.go index 5d4ede9f308..3b079623069 100644 --- a/service/neptune/api_op_DeleteGlobalCluster.go +++ b/service/neptune/api_op_DeleteGlobalCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DescribeDBClusterEndpoints.go b/service/neptune/api_op_DescribeDBClusterEndpoints.go index 688f2fd850c..ca0e97dfcb2 100644 --- a/service/neptune/api_op_DescribeDBClusterEndpoints.go +++ b/service/neptune/api_op_DescribeDBClusterEndpoints.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeDBClusterEndpointsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterEndpointsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationDescribeDBClusterEndpointsMiddlewares(stack *middle return nil } -// DescribeDBClusterEndpointsAPIClient is a client that implements the -// DescribeDBClusterEndpoints operation. -type DescribeDBClusterEndpointsAPIClient interface { - DescribeDBClusterEndpoints(context.Context, *DescribeDBClusterEndpointsInput, ...func(*Options)) (*DescribeDBClusterEndpointsOutput, error) -} - -var _ DescribeDBClusterEndpointsAPIClient = (*Client)(nil) - // DescribeDBClusterEndpointsPaginatorOptions is the paginator options for // DescribeDBClusterEndpoints type DescribeDBClusterEndpointsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeDBClusterEndpointsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeDBClusterEndpointsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeDBClusterEndpointsAPIClient is a client that implements the +// DescribeDBClusterEndpoints operation. +type DescribeDBClusterEndpointsAPIClient interface { + DescribeDBClusterEndpoints(context.Context, *DescribeDBClusterEndpointsInput, ...func(*Options)) (*DescribeDBClusterEndpointsOutput, error) +} + +var _ DescribeDBClusterEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBClusterParameterGroups.go b/service/neptune/api_op_DescribeDBClusterParameterGroups.go index 5289ff64512..b7a5248b5c6 100644 --- a/service/neptune/api_op_DescribeDBClusterParameterGroups.go +++ b/service/neptune/api_op_DescribeDBClusterParameterGroups.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeDBClusterParameterGroupsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterParameterGroupsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeDBClusterParameterGroupsMiddlewares(stack * return nil } -// DescribeDBClusterParameterGroupsAPIClient is a client that implements the -// DescribeDBClusterParameterGroups operation. -type DescribeDBClusterParameterGroupsAPIClient interface { - DescribeDBClusterParameterGroups(context.Context, *DescribeDBClusterParameterGroupsInput, ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) -} - -var _ DescribeDBClusterParameterGroupsAPIClient = (*Client)(nil) - // DescribeDBClusterParameterGroupsPaginatorOptions is the paginator options for // DescribeDBClusterParameterGroups type DescribeDBClusterParameterGroupsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeDBClusterParameterGroupsAPIClient is a client that implements the +// DescribeDBClusterParameterGroups operation. +type DescribeDBClusterParameterGroupsAPIClient interface { + DescribeDBClusterParameterGroups(context.Context, *DescribeDBClusterParameterGroupsInput, ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) +} + +var _ DescribeDBClusterParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBClusterParameters.go b/service/neptune/api_op_DescribeDBClusterParameters.go index 413cc48bf75..8fd08536b38 100644 --- a/service/neptune/api_op_DescribeDBClusterParameters.go +++ b/service/neptune/api_op_DescribeDBClusterParameters.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeDBClusterParametersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterParametersValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationDescribeDBClusterParametersMiddlewares(stack *middl return nil } -// DescribeDBClusterParametersAPIClient is a client that implements the -// DescribeDBClusterParameters operation. -type DescribeDBClusterParametersAPIClient interface { - DescribeDBClusterParameters(context.Context, *DescribeDBClusterParametersInput, ...func(*Options)) (*DescribeDBClusterParametersOutput, error) -} - -var _ DescribeDBClusterParametersAPIClient = (*Client)(nil) - // DescribeDBClusterParametersPaginatorOptions is the paginator options for // DescribeDBClusterParameters type DescribeDBClusterParametersPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeDBClusterParametersAPIClient is a client that implements the +// DescribeDBClusterParameters operation. +type DescribeDBClusterParametersAPIClient interface { + DescribeDBClusterParameters(context.Context, *DescribeDBClusterParametersInput, ...func(*Options)) (*DescribeDBClusterParametersOutput, error) +} + +var _ DescribeDBClusterParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBClusterSnapshotAttributes.go b/service/neptune/api_op_DescribeDBClusterSnapshotAttributes.go index 4e0fd28fef3..9bd9e88bcdf 100644 --- a/service/neptune/api_op_DescribeDBClusterSnapshotAttributes.go +++ b/service/neptune/api_op_DescribeDBClusterSnapshotAttributes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeDBClusterSnapshotAttributesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterSnapshotAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DescribeDBClusterSnapshots.go b/service/neptune/api_op_DescribeDBClusterSnapshots.go index c513f9864b6..74ba0a9e8bf 100644 --- a/service/neptune/api_op_DescribeDBClusterSnapshots.go +++ b/service/neptune/api_op_DescribeDBClusterSnapshots.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterSnapshotsValidationMiddleware(stack); err != nil { return err } @@ -210,14 +213,6 @@ func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middle return nil } -// DescribeDBClusterSnapshotsAPIClient is a client that implements the -// DescribeDBClusterSnapshots operation. -type DescribeDBClusterSnapshotsAPIClient interface { - DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) -} - -var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil) - // DescribeDBClusterSnapshotsPaginatorOptions is the paginator options for // DescribeDBClusterSnapshots type DescribeDBClusterSnapshotsPaginatorOptions struct { @@ -290,6 +285,9 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -309,6 +307,14 @@ func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeDBClusterSnapshotsAPIClient is a client that implements the +// DescribeDBClusterSnapshots operation. +type DescribeDBClusterSnapshotsAPIClient interface { + DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) +} + +var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBClusters.go b/service/neptune/api_op_DescribeDBClusters.go index a553978ebae..e8b02339694 100644 --- a/service/neptune/api_op_DescribeDBClusters.go +++ b/service/neptune/api_op_DescribeDBClusters.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClustersValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Sta return nil } -// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters -// operation. -type DescribeDBClustersAPIClient interface { - DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error) -} - -var _ DescribeDBClustersAPIClient = (*Client)(nil) - // DescribeDBClustersPaginatorOptions is the paginator options for // DescribeDBClusters type DescribeDBClustersPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters +// operation. +type DescribeDBClustersAPIClient interface { + DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error) +} + +var _ DescribeDBClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBEngineVersions.go b/service/neptune/api_op_DescribeDBEngineVersions.go index 07c05653137..3622a811d22 100644 --- a/service/neptune/api_op_DescribeDBEngineVersions.go +++ b/service/neptune/api_op_DescribeDBEngineVersions.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBEngineVersionsValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middlewa return nil } -// DescribeDBEngineVersionsAPIClient is a client that implements the -// DescribeDBEngineVersions operation. -type DescribeDBEngineVersionsAPIClient interface { - DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) -} - -var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil) - // DescribeDBEngineVersionsPaginatorOptions is the paginator options for // DescribeDBEngineVersions type DescribeDBEngineVersionsPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDBEngineVersionsAPIClient is a client that implements the +// DescribeDBEngineVersions operation. +type DescribeDBEngineVersionsAPIClient interface { + DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) +} + +var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBInstances.go b/service/neptune/api_op_DescribeDBInstances.go index f8d026f2369..b15d395a9f2 100644 --- a/service/neptune/api_op_DescribeDBInstances.go +++ b/service/neptune/api_op_DescribeDBInstances.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBInstancesValidationMiddleware(stack); err != nil { return err } @@ -177,103 +180,6 @@ func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.St return nil } -// DescribeDBInstancesAPIClient is a client that implements the -// DescribeDBInstances operation. -type DescribeDBInstancesAPIClient interface { - DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error) -} - -var _ DescribeDBInstancesAPIClient = (*Client)(nil) - -// DescribeDBInstancesPaginatorOptions is the paginator options for -// DescribeDBInstances -type DescribeDBInstancesPaginatorOptions struct { - // The maximum number of records to include in the response. If more records - // exist than the specified MaxRecords value, a pagination token called a marker - // is included in the response so that the remaining results can be retrieved. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances -type DescribeDBInstancesPaginator struct { - options DescribeDBInstancesPaginatorOptions - client DescribeDBInstancesAPIClient - params *DescribeDBInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator -func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator { - if params == nil { - params = &DescribeDBInstancesInput{} - } - - options := DescribeDBInstancesPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDBInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDBInstances page. -func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeDBInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DBInstanceAvailableWaiterOptions are waiter options for // DBInstanceAvailableWaiter type DBInstanceAvailableWaiterOptions struct { @@ -391,7 +297,13 @@ func (w *DBInstanceAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -699,7 +611,13 @@ func (w *DBInstanceDeletedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -880,6 +798,106 @@ func dBInstanceDeletedStateRetryable(ctx context.Context, input *DescribeDBInsta return true, nil } +// DescribeDBInstancesPaginatorOptions is the paginator options for +// DescribeDBInstances +type DescribeDBInstancesPaginatorOptions struct { + // The maximum number of records to include in the response. If more records + // exist than the specified MaxRecords value, a pagination token called a marker + // is included in the response so that the remaining results can be retrieved. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances +type DescribeDBInstancesPaginator struct { + options DescribeDBInstancesPaginatorOptions + client DescribeDBInstancesAPIClient + params *DescribeDBInstancesInput + nextToken *string + firstPage bool +} + +// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator +func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator { + if params == nil { + params = &DescribeDBInstancesInput{} + } + + options := DescribeDBInstancesPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDBInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDBInstancesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDBInstances page. +func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDBInstances(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDBInstancesAPIClient is a client that implements the +// DescribeDBInstances operation. +type DescribeDBInstancesAPIClient interface { + DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error) +} + +var _ DescribeDBInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBParameterGroups.go b/service/neptune/api_op_DescribeDBParameterGroups.go index e433dc3c343..09d0cded676 100644 --- a/service/neptune/api_op_DescribeDBParameterGroups.go +++ b/service/neptune/api_op_DescribeDBParameterGroups.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeDBParameterGroupsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBParameterGroupsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeDBParameterGroupsMiddlewares(stack *middlew return nil } -// DescribeDBParameterGroupsAPIClient is a client that implements the -// DescribeDBParameterGroups operation. -type DescribeDBParameterGroupsAPIClient interface { - DescribeDBParameterGroups(context.Context, *DescribeDBParameterGroupsInput, ...func(*Options)) (*DescribeDBParameterGroupsOutput, error) -} - -var _ DescribeDBParameterGroupsAPIClient = (*Client)(nil) - // DescribeDBParameterGroupsPaginatorOptions is the paginator options for // DescribeDBParameterGroups type DescribeDBParameterGroupsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeDBParameterGroupsAPIClient is a client that implements the +// DescribeDBParameterGroups operation. +type DescribeDBParameterGroupsAPIClient interface { + DescribeDBParameterGroups(context.Context, *DescribeDBParameterGroupsInput, ...func(*Options)) (*DescribeDBParameterGroupsOutput, error) +} + +var _ DescribeDBParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBParameters.go b/service/neptune/api_op_DescribeDBParameters.go index dfb1c1b0ddb..616d7158344 100644 --- a/service/neptune/api_op_DescribeDBParameters.go +++ b/service/neptune/api_op_DescribeDBParameters.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeDBParametersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBParametersValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeDBParametersMiddlewares(stack *middleware.S return nil } -// DescribeDBParametersAPIClient is a client that implements the -// DescribeDBParameters operation. -type DescribeDBParametersAPIClient interface { - DescribeDBParameters(context.Context, *DescribeDBParametersInput, ...func(*Options)) (*DescribeDBParametersOutput, error) -} - -var _ DescribeDBParametersAPIClient = (*Client)(nil) - // DescribeDBParametersPaginatorOptions is the paginator options for // DescribeDBParameters type DescribeDBParametersPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeDBParametersAPIClient is a client that implements the +// DescribeDBParameters operation. +type DescribeDBParametersAPIClient interface { + DescribeDBParameters(context.Context, *DescribeDBParametersInput, ...func(*Options)) (*DescribeDBParametersOutput, error) +} + +var _ DescribeDBParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeDBSubnetGroups.go b/service/neptune/api_op_DescribeDBSubnetGroups.go index a3cba595d98..f4cb4e4711c 100644 --- a/service/neptune/api_op_DescribeDBSubnetGroups.go +++ b/service/neptune/api_op_DescribeDBSubnetGroups.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSubnetGroupsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware return nil } -// DescribeDBSubnetGroupsAPIClient is a client that implements the -// DescribeDBSubnetGroups operation. -type DescribeDBSubnetGroupsAPIClient interface { - DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) -} - -var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil) - // DescribeDBSubnetGroupsPaginatorOptions is the paginator options for // DescribeDBSubnetGroups type DescribeDBSubnetGroupsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeDBSubnetGroupsAPIClient is a client that implements the +// DescribeDBSubnetGroups operation. +type DescribeDBSubnetGroupsAPIClient interface { + DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) +} + +var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeEngineDefaultClusterParameters.go b/service/neptune/api_op_DescribeEngineDefaultClusterParameters.go index e0d535fe79f..9172b223770 100644 --- a/service/neptune/api_op_DescribeEngineDefaultClusterParameters.go +++ b/service/neptune/api_op_DescribeEngineDefaultClusterParameters.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeEngineDefaultClusterParametersMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngineDefaultClusterParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DescribeEngineDefaultParameters.go b/service/neptune/api_op_DescribeEngineDefaultParameters.go index 0f3a1e35065..f5552bfc126 100644 --- a/service/neptune/api_op_DescribeEngineDefaultParameters.go +++ b/service/neptune/api_op_DescribeEngineDefaultParameters.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngineDefaultParametersValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *m return nil } -// DescribeEngineDefaultParametersAPIClient is a client that implements the -// DescribeEngineDefaultParameters operation. -type DescribeEngineDefaultParametersAPIClient interface { - DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) -} - -var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil) - // DescribeEngineDefaultParametersPaginatorOptions is the paginator options for // DescribeEngineDefaultParameters type DescribeEngineDefaultParametersPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEngineDefaultParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeEngineDefaultParametersAPIClient is a client that implements the +// DescribeEngineDefaultParameters operation. +type DescribeEngineDefaultParametersAPIClient interface { + DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) +} + +var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEngineDefaultParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeEventCategories.go b/service/neptune/api_op_DescribeEventCategories.go index 0c4aec8754f..75ea5bec93b 100644 --- a/service/neptune/api_op_DescribeEventCategories.go +++ b/service/neptune/api_op_DescribeEventCategories.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeEventCategoriesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventCategoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_DescribeEventSubscriptions.go b/service/neptune/api_op_DescribeEventSubscriptions.go index 8fbc7ee44ea..9a2307028e0 100644 --- a/service/neptune/api_op_DescribeEventSubscriptions.go +++ b/service/neptune/api_op_DescribeEventSubscriptions.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle return nil } -// DescribeEventSubscriptionsAPIClient is a client that implements the -// DescribeEventSubscriptions operation. -type DescribeEventSubscriptionsAPIClient interface { - DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) -} - -var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) - // DescribeEventSubscriptionsPaginatorOptions is the paginator options for // DescribeEventSubscriptions type DescribeEventSubscriptionsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeEventSubscriptionsAPIClient is a client that implements the +// DescribeEventSubscriptions operation. +type DescribeEventSubscriptionsAPIClient interface { + DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) +} + +var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeEvents.go b/service/neptune/api_op_DescribeEvents.go index 78d261cf915..67f8ce5043e 100644 --- a/service/neptune/api_op_DescribeEvents.go +++ b/service/neptune/api_op_DescribeEvents.go @@ -178,6 +178,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventsValidationMiddleware(stack); err != nil { return err } @@ -202,14 +205,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of records to include in the response. If more records @@ -279,6 +274,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -298,6 +296,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeGlobalClusters.go b/service/neptune/api_op_DescribeGlobalClusters.go index ae07c84b2e9..03c688fcaa6 100644 --- a/service/neptune/api_op_DescribeGlobalClusters.go +++ b/service/neptune/api_op_DescribeGlobalClusters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGlobalClusters(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware return nil } -// DescribeGlobalClustersAPIClient is a client that implements the -// DescribeGlobalClusters operation. -type DescribeGlobalClustersAPIClient interface { - DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error) -} - -var _ DescribeGlobalClustersAPIClient = (*Client)(nil) - // DescribeGlobalClustersPaginatorOptions is the paginator options for // DescribeGlobalClusters type DescribeGlobalClustersPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGlobalClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeGlobalClustersAPIClient is a client that implements the +// DescribeGlobalClusters operation. +type DescribeGlobalClustersAPIClient interface { + DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error) +} + +var _ DescribeGlobalClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGlobalClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go b/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go index 815cb1ff8ca..7139592c0d4 100644 --- a/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/neptune/api_op_DescribeOrderableDBInstanceOptions.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrderableDBInstanceOptionsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack return nil } -// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the -// DescribeOrderableDBInstanceOptions operation. -type DescribeOrderableDBInstanceOptionsAPIClient interface { - DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) -} - -var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil) - // DescribeOrderableDBInstanceOptionsPaginatorOptions is the paginator options for // DescribeOrderableDBInstanceOptions type DescribeOrderableDBInstanceOptionsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrderableDBInstanceOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the +// DescribeOrderableDBInstanceOptions operation. +type DescribeOrderableDBInstanceOptionsAPIClient interface { + DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) +} + +var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrderableDBInstanceOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribePendingMaintenanceActions.go b/service/neptune/api_op_DescribePendingMaintenanceActions.go index 1503a0ca931..9eae7d3370c 100644 --- a/service/neptune/api_op_DescribePendingMaintenanceActions.go +++ b/service/neptune/api_op_DescribePendingMaintenanceActions.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePendingMaintenanceActionsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack return nil } -// DescribePendingMaintenanceActionsAPIClient is a client that implements the -// DescribePendingMaintenanceActions operation. -type DescribePendingMaintenanceActionsAPIClient interface { - DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) -} - -var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) - // DescribePendingMaintenanceActionsPaginatorOptions is the paginator options for // DescribePendingMaintenanceActions type DescribePendingMaintenanceActionsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePendingMaintenanceActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribePendingMaintenanceActionsAPIClient is a client that implements the +// DescribePendingMaintenanceActions operation. +type DescribePendingMaintenanceActionsAPIClient interface { + DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) +} + +var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePendingMaintenanceActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptune/api_op_DescribeValidDBInstanceModifications.go b/service/neptune/api_op_DescribeValidDBInstanceModifications.go index 59ee4afc16a..28512b8ec32 100644 --- a/service/neptune/api_op_DescribeValidDBInstanceModifications.go +++ b/service/neptune/api_op_DescribeValidDBInstanceModifications.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeValidDBInstanceModificationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeValidDBInstanceModificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_FailoverDBCluster.go b/service/neptune/api_op_FailoverDBCluster.go index f0d64cb06b4..6d653dfc28a 100644 --- a/service/neptune/api_op_FailoverDBCluster.go +++ b/service/neptune/api_op_FailoverDBCluster.go @@ -127,6 +127,9 @@ func (c *Client) addOperationFailoverDBClusterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFailoverDBCluster(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptune/api_op_FailoverGlobalCluster.go b/service/neptune/api_op_FailoverGlobalCluster.go index b1ab92dc591..87879d88d4c 100644 --- a/service/neptune/api_op_FailoverGlobalCluster.go +++ b/service/neptune/api_op_FailoverGlobalCluster.go @@ -131,6 +131,9 @@ func (c *Client) addOperationFailoverGlobalClusterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFailoverGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ListTagsForResource.go b/service/neptune/api_op_ListTagsForResource.go index c387827d46f..a6e789f1c14 100644 --- a/service/neptune/api_op_ListTagsForResource.go +++ b/service/neptune/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBCluster.go b/service/neptune/api_op_ModifyDBCluster.go index 741566416c6..2e2fa693297 100644 --- a/service/neptune/api_op_ModifyDBCluster.go +++ b/service/neptune/api_op_ModifyDBCluster.go @@ -276,6 +276,9 @@ func (c *Client) addOperationModifyDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBClusterEndpoint.go b/service/neptune/api_op_ModifyDBClusterEndpoint.go index 4772f6a524a..3f6f25053d5 100644 --- a/service/neptune/api_op_ModifyDBClusterEndpoint.go +++ b/service/neptune/api_op_ModifyDBClusterEndpoint.go @@ -166,6 +166,9 @@ func (c *Client) addOperationModifyDBClusterEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBClusterParameterGroup.go b/service/neptune/api_op_ModifyDBClusterParameterGroup.go index c536225da7c..960b29dc37f 100644 --- a/service/neptune/api_op_ModifyDBClusterParameterGroup.go +++ b/service/neptune/api_op_ModifyDBClusterParameterGroup.go @@ -139,6 +139,9 @@ func (c *Client) addOperationModifyDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBClusterSnapshotAttribute.go b/service/neptune/api_op_ModifyDBClusterSnapshotAttribute.go index 06285434537..8a3a4f02921 100644 --- a/service/neptune/api_op_ModifyDBClusterSnapshotAttribute.go +++ b/service/neptune/api_op_ModifyDBClusterSnapshotAttribute.go @@ -155,6 +155,9 @@ func (c *Client) addOperationModifyDBClusterSnapshotAttributeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBInstance.go b/service/neptune/api_op_ModifyDBInstance.go index 7f15ec51b30..7045f83e59b 100644 --- a/service/neptune/api_op_ModifyDBInstance.go +++ b/service/neptune/api_op_ModifyDBInstance.go @@ -377,6 +377,9 @@ func (c *Client) addOperationModifyDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBParameterGroup.go b/service/neptune/api_op_ModifyDBParameterGroup.go index abaac1028c0..9833b0a03be 100644 --- a/service/neptune/api_op_ModifyDBParameterGroup.go +++ b/service/neptune/api_op_ModifyDBParameterGroup.go @@ -141,6 +141,9 @@ func (c *Client) addOperationModifyDBParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyDBSubnetGroup.go b/service/neptune/api_op_ModifyDBSubnetGroup.go index 6270e8e5303..fee1e74bd1f 100644 --- a/service/neptune/api_op_ModifyDBSubnetGroup.go +++ b/service/neptune/api_op_ModifyDBSubnetGroup.go @@ -123,6 +123,9 @@ func (c *Client) addOperationModifyDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyEventSubscription.go b/service/neptune/api_op_ModifyEventSubscription.go index c490630de35..16eb7a6a96a 100644 --- a/service/neptune/api_op_ModifyEventSubscription.go +++ b/service/neptune/api_op_ModifyEventSubscription.go @@ -131,6 +131,9 @@ func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ModifyGlobalCluster.go b/service/neptune/api_op_ModifyGlobalCluster.go index c0f23ae2e76..071f77510a0 100644 --- a/service/neptune/api_op_ModifyGlobalCluster.go +++ b/service/neptune/api_op_ModifyGlobalCluster.go @@ -150,6 +150,9 @@ func (c *Client) addOperationModifyGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_PromoteReadReplicaDBCluster.go b/service/neptune/api_op_PromoteReadReplicaDBCluster.go index 39a61daa646..a288f78526a 100644 --- a/service/neptune/api_op_PromoteReadReplicaDBCluster.go +++ b/service/neptune/api_op_PromoteReadReplicaDBCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPromoteReadReplicaDBClusterMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPromoteReadReplicaDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RebootDBInstance.go b/service/neptune/api_op_RebootDBInstance.go index 3038f16c2d8..7bae34df472 100644 --- a/service/neptune/api_op_RebootDBInstance.go +++ b/service/neptune/api_op_RebootDBInstance.go @@ -125,6 +125,9 @@ func (c *Client) addOperationRebootDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RemoveFromGlobalCluster.go b/service/neptune/api_op_RemoveFromGlobalCluster.go index dd89e57c9e6..ae23a80c1a5 100644 --- a/service/neptune/api_op_RemoveFromGlobalCluster.go +++ b/service/neptune/api_op_RemoveFromGlobalCluster.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRemoveFromGlobalClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveFromGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RemoveRoleFromDBCluster.go b/service/neptune/api_op_RemoveRoleFromDBCluster.go index 8138fda77a9..6578bc6f296 100644 --- a/service/neptune/api_op_RemoveRoleFromDBCluster.go +++ b/service/neptune/api_op_RemoveRoleFromDBCluster.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRemoveRoleFromDBClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRoleFromDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RemoveSourceIdentifierFromSubscription.go b/service/neptune/api_op_RemoveSourceIdentifierFromSubscription.go index c0b82b7b500..b13b0dbcb03 100644 --- a/service/neptune/api_op_RemoveSourceIdentifierFromSubscription.go +++ b/service/neptune/api_op_RemoveSourceIdentifierFromSubscription.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RemoveTagsFromResource.go b/service/neptune/api_op_RemoveTagsFromResource.go index ee88b7daa98..f281ef49d79 100644 --- a/service/neptune/api_op_RemoveTagsFromResource.go +++ b/service/neptune/api_op_RemoveTagsFromResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ResetDBClusterParameterGroup.go b/service/neptune/api_op_ResetDBClusterParameterGroup.go index b44b71b40ae..b667716aeab 100644 --- a/service/neptune/api_op_ResetDBClusterParameterGroup.go +++ b/service/neptune/api_op_ResetDBClusterParameterGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationResetDBClusterParameterGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_ResetDBParameterGroup.go b/service/neptune/api_op_ResetDBParameterGroup.go index 62f69b30915..72481972de9 100644 --- a/service/neptune/api_op_ResetDBParameterGroup.go +++ b/service/neptune/api_op_ResetDBParameterGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationResetDBParameterGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RestoreDBClusterFromSnapshot.go b/service/neptune/api_op_RestoreDBClusterFromSnapshot.go index 00cca23ea5c..0d823550d3d 100644 --- a/service/neptune/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/neptune/api_op_RestoreDBClusterFromSnapshot.go @@ -240,6 +240,9 @@ func (c *Client) addOperationRestoreDBClusterFromSnapshotMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_RestoreDBClusterToPointInTime.go b/service/neptune/api_op_RestoreDBClusterToPointInTime.go index f0ba6f0d7b1..ca9acfd2149 100644 --- a/service/neptune/api_op_RestoreDBClusterToPointInTime.go +++ b/service/neptune/api_op_RestoreDBClusterToPointInTime.go @@ -259,6 +259,9 @@ func (c *Client) addOperationRestoreDBClusterToPointInTimeMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_StartDBCluster.go b/service/neptune/api_op_StartDBCluster.go index ff1f70668c5..bf815b3555e 100644 --- a/service/neptune/api_op_StartDBCluster.go +++ b/service/neptune/api_op_StartDBCluster.go @@ -110,6 +110,9 @@ func (c *Client) addOperationStartDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptune/api_op_StopDBCluster.go b/service/neptune/api_op_StopDBCluster.go index 51a5821eb96..ea0c0d0d9d4 100644 --- a/service/neptune/api_op_StopDBCluster.go +++ b/service/neptune/api_op_StopDBCluster.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStopDBClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_client.go b/service/neptunedata/api_client.go index 9f4868bccb4..c71153caf2b 100644 --- a/service/neptunedata/api_client.go +++ b/service/neptunedata/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/neptunedata/api_op_CancelGremlinQuery.go b/service/neptunedata/api_op_CancelGremlinQuery.go index 73154a35d83..7c1f7638414 100644 --- a/service/neptunedata/api_op_CancelGremlinQuery.go +++ b/service/neptunedata/api_op_CancelGremlinQuery.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCancelGremlinQueryMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelGremlinQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_CancelLoaderJob.go b/service/neptunedata/api_op_CancelLoaderJob.go index 1fb1b4a37d9..8949998d543 100644 --- a/service/neptunedata/api_op_CancelLoaderJob.go +++ b/service/neptunedata/api_op_CancelLoaderJob.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCancelLoaderJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelLoaderJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_CancelMLDataProcessingJob.go b/service/neptunedata/api_op_CancelMLDataProcessingJob.go index 407e0e5215c..c4a5f0e57b8 100644 --- a/service/neptunedata/api_op_CancelMLDataProcessingJob.go +++ b/service/neptunedata/api_op_CancelMLDataProcessingJob.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCancelMLDataProcessingJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMLDataProcessingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_CancelMLModelTrainingJob.go b/service/neptunedata/api_op_CancelMLModelTrainingJob.go index 3917bf4991c..dd5d20405f8 100644 --- a/service/neptunedata/api_op_CancelMLModelTrainingJob.go +++ b/service/neptunedata/api_op_CancelMLModelTrainingJob.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCancelMLModelTrainingJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMLModelTrainingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_CancelMLModelTransformJob.go b/service/neptunedata/api_op_CancelMLModelTransformJob.go index 675b2be036c..e6e1454e350 100644 --- a/service/neptunedata/api_op_CancelMLModelTransformJob.go +++ b/service/neptunedata/api_op_CancelMLModelTransformJob.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCancelMLModelTransformJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMLModelTransformJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_CancelOpenCypherQuery.go b/service/neptunedata/api_op_CancelOpenCypherQuery.go index 871214e6d9e..5fbebf849f0 100644 --- a/service/neptunedata/api_op_CancelOpenCypherQuery.go +++ b/service/neptunedata/api_op_CancelOpenCypherQuery.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCancelOpenCypherQueryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelOpenCypherQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_CreateMLEndpoint.go b/service/neptunedata/api_op_CreateMLEndpoint.go index 4ac405de3d4..7b9a9c67df0 100644 --- a/service/neptunedata/api_op_CreateMLEndpoint.go +++ b/service/neptunedata/api_op_CreateMLEndpoint.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateMLEndpointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMLEndpoint(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_DeleteMLEndpoint.go b/service/neptunedata/api_op_DeleteMLEndpoint.go index 54afd362b8f..5215af14711 100644 --- a/service/neptunedata/api_op_DeleteMLEndpoint.go +++ b/service/neptunedata/api_op_DeleteMLEndpoint.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteMLEndpointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMLEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_DeletePropertygraphStatistics.go b/service/neptunedata/api_op_DeletePropertygraphStatistics.go index f9cca26877e..31a353a0411 100644 --- a/service/neptunedata/api_op_DeletePropertygraphStatistics.go +++ b/service/neptunedata/api_op_DeletePropertygraphStatistics.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeletePropertygraphStatisticsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePropertygraphStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_DeleteSparqlStatistics.go b/service/neptunedata/api_op_DeleteSparqlStatistics.go index fe8c318cabd..6583b535d0d 100644 --- a/service/neptunedata/api_op_DeleteSparqlStatistics.go +++ b/service/neptunedata/api_op_DeleteSparqlStatistics.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteSparqlStatisticsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSparqlStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ExecuteFastReset.go b/service/neptunedata/api_op_ExecuteFastReset.go index 82c35b9d1a9..576adbf5349 100644 --- a/service/neptunedata/api_op_ExecuteFastReset.go +++ b/service/neptunedata/api_op_ExecuteFastReset.go @@ -136,6 +136,9 @@ func (c *Client) addOperationExecuteFastResetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteFastResetValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_ExecuteGremlinExplainQuery.go b/service/neptunedata/api_op_ExecuteGremlinExplainQuery.go index 71a8ee8e8fa..2ee651d4a3b 100644 --- a/service/neptunedata/api_op_ExecuteGremlinExplainQuery.go +++ b/service/neptunedata/api_op_ExecuteGremlinExplainQuery.go @@ -140,6 +140,9 @@ func (c *Client) addOperationExecuteGremlinExplainQueryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteGremlinExplainQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_ExecuteGremlinProfileQuery.go b/service/neptunedata/api_op_ExecuteGremlinProfileQuery.go index ce7c00832ef..9d71e4f8aad 100644 --- a/service/neptunedata/api_op_ExecuteGremlinProfileQuery.go +++ b/service/neptunedata/api_op_ExecuteGremlinProfileQuery.go @@ -141,6 +141,9 @@ func (c *Client) addOperationExecuteGremlinProfileQueryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteGremlinProfileQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_ExecuteGremlinQuery.go b/service/neptunedata/api_op_ExecuteGremlinQuery.go index 8cf5ed15309..2546b8392b9 100644 --- a/service/neptunedata/api_op_ExecuteGremlinQuery.go +++ b/service/neptunedata/api_op_ExecuteGremlinQuery.go @@ -153,6 +153,9 @@ func (c *Client) addOperationExecuteGremlinQueryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteGremlinQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_ExecuteOpenCypherExplainQuery.go b/service/neptunedata/api_op_ExecuteOpenCypherExplainQuery.go index 386ec676ff6..3a3470569bb 100644 --- a/service/neptunedata/api_op_ExecuteOpenCypherExplainQuery.go +++ b/service/neptunedata/api_op_ExecuteOpenCypherExplainQuery.go @@ -128,6 +128,9 @@ func (c *Client) addOperationExecuteOpenCypherExplainQueryMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteOpenCypherExplainQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_ExecuteOpenCypherQuery.go b/service/neptunedata/api_op_ExecuteOpenCypherQuery.go index 500b8638dfe..674c361f444 100644 --- a/service/neptunedata/api_op_ExecuteOpenCypherQuery.go +++ b/service/neptunedata/api_op_ExecuteOpenCypherQuery.go @@ -144,6 +144,9 @@ func (c *Client) addOperationExecuteOpenCypherQueryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteOpenCypherQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetEngineStatus.go b/service/neptunedata/api_op_GetEngineStatus.go index 32d2debf4ad..8459e80a924 100644 --- a/service/neptunedata/api_op_GetEngineStatus.go +++ b/service/neptunedata/api_op_GetEngineStatus.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetEngineStatusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEngineStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_GetGremlinQueryStatus.go b/service/neptunedata/api_op_GetGremlinQueryStatus.go index 3ac92c718cc..d5735d37302 100644 --- a/service/neptunedata/api_op_GetGremlinQueryStatus.go +++ b/service/neptunedata/api_op_GetGremlinQueryStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetGremlinQueryStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGremlinQueryStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetLoaderJobStatus.go b/service/neptunedata/api_op_GetLoaderJobStatus.go index ed18438c431..0796965b99a 100644 --- a/service/neptunedata/api_op_GetLoaderJobStatus.go +++ b/service/neptunedata/api_op_GetLoaderJobStatus.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetLoaderJobStatusMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoaderJobStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetMLDataProcessingJob.go b/service/neptunedata/api_op_GetMLDataProcessingJob.go index 9870f1ed7cb..bd4d7f8a223 100644 --- a/service/neptunedata/api_op_GetMLDataProcessingJob.go +++ b/service/neptunedata/api_op_GetMLDataProcessingJob.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetMLDataProcessingJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLDataProcessingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetMLEndpoint.go b/service/neptunedata/api_op_GetMLEndpoint.go index 41dca0f0284..d1202749715 100644 --- a/service/neptunedata/api_op_GetMLEndpoint.go +++ b/service/neptunedata/api_op_GetMLEndpoint.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetMLEndpointMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetMLModelTrainingJob.go b/service/neptunedata/api_op_GetMLModelTrainingJob.go index 12ec332a49d..1dc7672ed99 100644 --- a/service/neptunedata/api_op_GetMLModelTrainingJob.go +++ b/service/neptunedata/api_op_GetMLModelTrainingJob.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetMLModelTrainingJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLModelTrainingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetMLModelTransformJob.go b/service/neptunedata/api_op_GetMLModelTransformJob.go index e3bdeb0f99c..13bf45513be 100644 --- a/service/neptunedata/api_op_GetMLModelTransformJob.go +++ b/service/neptunedata/api_op_GetMLModelTransformJob.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetMLModelTransformJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMLModelTransformJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetOpenCypherQueryStatus.go b/service/neptunedata/api_op_GetOpenCypherQueryStatus.go index 7f7db61d925..4d034f16d56 100644 --- a/service/neptunedata/api_op_GetOpenCypherQueryStatus.go +++ b/service/neptunedata/api_op_GetOpenCypherQueryStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetOpenCypherQueryStatusMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpenCypherQueryStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_GetPropertygraphStatistics.go b/service/neptunedata/api_op_GetPropertygraphStatistics.go index 1b710dd2328..9b5bedd6783 100644 --- a/service/neptunedata/api_op_GetPropertygraphStatistics.go +++ b/service/neptunedata/api_op_GetPropertygraphStatistics.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPropertygraphStatisticsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPropertygraphStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_GetPropertygraphStream.go b/service/neptunedata/api_op_GetPropertygraphStream.go index a9eea333a0b..8562c60d217 100644 --- a/service/neptunedata/api_op_GetPropertygraphStream.go +++ b/service/neptunedata/api_op_GetPropertygraphStream.go @@ -200,6 +200,9 @@ func (c *Client) addOperationGetPropertygraphStreamMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPropertygraphStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_GetPropertygraphSummary.go b/service/neptunedata/api_op_GetPropertygraphSummary.go index 7b531a3fb75..2540b300da4 100644 --- a/service/neptunedata/api_op_GetPropertygraphSummary.go +++ b/service/neptunedata/api_op_GetPropertygraphSummary.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetPropertygraphSummaryMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPropertygraphSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_GetRDFGraphSummary.go b/service/neptunedata/api_op_GetRDFGraphSummary.go index 98190aa379f..8d49dca0c82 100644 --- a/service/neptunedata/api_op_GetRDFGraphSummary.go +++ b/service/neptunedata/api_op_GetRDFGraphSummary.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetRDFGraphSummaryMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRDFGraphSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_GetSparqlStatistics.go b/service/neptunedata/api_op_GetSparqlStatistics.go index 76421b06109..381c2f70f0d 100644 --- a/service/neptunedata/api_op_GetSparqlStatistics.go +++ b/service/neptunedata/api_op_GetSparqlStatistics.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSparqlStatisticsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSparqlStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_GetSparqlStream.go b/service/neptunedata/api_op_GetSparqlStream.go index 5adaea3c96e..d6ade9fc63c 100644 --- a/service/neptunedata/api_op_GetSparqlStream.go +++ b/service/neptunedata/api_op_GetSparqlStream.go @@ -189,6 +189,9 @@ func (c *Client) addOperationGetSparqlStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSparqlStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListGremlinQueries.go b/service/neptunedata/api_op_ListGremlinQueries.go index 2636c1df439..af8fb115b9e 100644 --- a/service/neptunedata/api_op_ListGremlinQueries.go +++ b/service/neptunedata/api_op_ListGremlinQueries.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListGremlinQueriesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGremlinQueries(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListLoaderJobs.go b/service/neptunedata/api_op_ListLoaderJobs.go index b0f5b0b7698..41d79604438 100644 --- a/service/neptunedata/api_op_ListLoaderJobs.go +++ b/service/neptunedata/api_op_ListLoaderJobs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListLoaderJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoaderJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListMLDataProcessingJobs.go b/service/neptunedata/api_op_ListMLDataProcessingJobs.go index eddc311bc68..40bdb6cce97 100644 --- a/service/neptunedata/api_op_ListMLDataProcessingJobs.go +++ b/service/neptunedata/api_op_ListMLDataProcessingJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListMLDataProcessingJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMLDataProcessingJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListMLEndpoints.go b/service/neptunedata/api_op_ListMLEndpoints.go index 960f421346a..614ed3e45dd 100644 --- a/service/neptunedata/api_op_ListMLEndpoints.go +++ b/service/neptunedata/api_op_ListMLEndpoints.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListMLEndpointsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMLEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListMLModelTrainingJobs.go b/service/neptunedata/api_op_ListMLModelTrainingJobs.go index ed85a8f1b6f..f8ea73b390a 100644 --- a/service/neptunedata/api_op_ListMLModelTrainingJobs.go +++ b/service/neptunedata/api_op_ListMLModelTrainingJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListMLModelTrainingJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMLModelTrainingJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListMLModelTransformJobs.go b/service/neptunedata/api_op_ListMLModelTransformJobs.go index 418f842ba3d..aa795f2e3c7 100644 --- a/service/neptunedata/api_op_ListMLModelTransformJobs.go +++ b/service/neptunedata/api_op_ListMLModelTransformJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListMLModelTransformJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMLModelTransformJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ListOpenCypherQueries.go b/service/neptunedata/api_op_ListOpenCypherQueries.go index 7377327290b..1e3e4b35daf 100644 --- a/service/neptunedata/api_op_ListOpenCypherQueries.go +++ b/service/neptunedata/api_op_ListOpenCypherQueries.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListOpenCypherQueriesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOpenCypherQueries(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ManagePropertygraphStatistics.go b/service/neptunedata/api_op_ManagePropertygraphStatistics.go index c4ea203cdc5..7f7dbbc47fe 100644 --- a/service/neptunedata/api_op_ManagePropertygraphStatistics.go +++ b/service/neptunedata/api_op_ManagePropertygraphStatistics.go @@ -116,6 +116,9 @@ func (c *Client) addOperationManagePropertygraphStatisticsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opManagePropertygraphStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_ManageSparqlStatistics.go b/service/neptunedata/api_op_ManageSparqlStatistics.go index dabf7f1b71d..e8b174a4767 100644 --- a/service/neptunedata/api_op_ManageSparqlStatistics.go +++ b/service/neptunedata/api_op_ManageSparqlStatistics.go @@ -116,6 +116,9 @@ func (c *Client) addOperationManageSparqlStatisticsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opManageSparqlStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/neptunedata/api_op_StartLoaderJob.go b/service/neptunedata/api_op_StartLoaderJob.go index 2a4acb6d3bb..84a77ec856b 100644 --- a/service/neptunedata/api_op_StartLoaderJob.go +++ b/service/neptunedata/api_op_StartLoaderJob.go @@ -360,6 +360,9 @@ func (c *Client) addOperationStartLoaderJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartLoaderJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_StartMLDataProcessingJob.go b/service/neptunedata/api_op_StartMLDataProcessingJob.go index b9f526feedb..481d5250122 100644 --- a/service/neptunedata/api_op_StartMLDataProcessingJob.go +++ b/service/neptunedata/api_op_StartMLDataProcessingJob.go @@ -183,6 +183,9 @@ func (c *Client) addOperationStartMLDataProcessingJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMLDataProcessingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_StartMLModelTrainingJob.go b/service/neptunedata/api_op_StartMLModelTrainingJob.go index d1467afe283..149a54242b8 100644 --- a/service/neptunedata/api_op_StartMLModelTrainingJob.go +++ b/service/neptunedata/api_op_StartMLModelTrainingJob.go @@ -195,6 +195,9 @@ func (c *Client) addOperationStartMLModelTrainingJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMLModelTrainingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunedata/api_op_StartMLModelTransformJob.go b/service/neptunedata/api_op_StartMLModelTransformJob.go index 94aed7cacd2..d2be1a4b678 100644 --- a/service/neptunedata/api_op_StartMLModelTransformJob.go +++ b/service/neptunedata/api_op_StartMLModelTransformJob.go @@ -175,6 +175,9 @@ func (c *Client) addOperationStartMLModelTransformJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMLModelTransformJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_client.go b/service/neptunegraph/api_client.go index 1ebefa0f919..4f49b6e036e 100644 --- a/service/neptunegraph/api_client.go +++ b/service/neptunegraph/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/neptunegraph/api_op_CancelImportTask.go b/service/neptunegraph/api_op_CancelImportTask.go index bbde57c75ee..9960bc6e7d7 100644 --- a/service/neptunegraph/api_op_CancelImportTask.go +++ b/service/neptunegraph/api_op_CancelImportTask.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCancelImportTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_CancelQuery.go b/service/neptunegraph/api_op_CancelQuery.go index 354f101f0be..ea4a297f1e8 100644 --- a/service/neptunegraph/api_op_CancelQuery.go +++ b/service/neptunegraph/api_op_CancelQuery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelQueryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCancelQueryMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_CreateGraph.go b/service/neptunegraph/api_op_CreateGraph.go index 0c685893cd0..756c0c85cb4 100644 --- a/service/neptunegraph/api_op_CreateGraph.go +++ b/service/neptunegraph/api_op_CreateGraph.go @@ -211,6 +211,9 @@ func (c *Client) addOperationCreateGraphMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGraphValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_CreateGraphSnapshot.go b/service/neptunegraph/api_op_CreateGraphSnapshot.go index a5bf58dadaf..707f061d032 100644 --- a/service/neptunegraph/api_op_CreateGraphSnapshot.go +++ b/service/neptunegraph/api_op_CreateGraphSnapshot.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateGraphSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGraphSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_CreateGraphUsingImportTask.go b/service/neptunegraph/api_op_CreateGraphUsingImportTask.go index ee8475008e9..688d5533f6d 100644 --- a/service/neptunegraph/api_op_CreateGraphUsingImportTask.go +++ b/service/neptunegraph/api_op_CreateGraphUsingImportTask.go @@ -225,6 +225,9 @@ func (c *Client) addOperationCreateGraphUsingImportTaskMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGraphUsingImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_CreatePrivateGraphEndpoint.go b/service/neptunegraph/api_op_CreatePrivateGraphEndpoint.go index fec246013d4..a3418f1681e 100644 --- a/service/neptunegraph/api_op_CreatePrivateGraphEndpoint.go +++ b/service/neptunegraph/api_op_CreatePrivateGraphEndpoint.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreatePrivateGraphEndpointMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePrivateGraphEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_DeleteGraph.go b/service/neptunegraph/api_op_DeleteGraph.go index 76f660aa709..1e0a12877c0 100644 --- a/service/neptunegraph/api_op_DeleteGraph.go +++ b/service/neptunegraph/api_op_DeleteGraph.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDeleteGraphMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGraphValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_DeleteGraphSnapshot.go b/service/neptunegraph/api_op_DeleteGraphSnapshot.go index b911ab09605..b8aa029c7ed 100644 --- a/service/neptunegraph/api_op_DeleteGraphSnapshot.go +++ b/service/neptunegraph/api_op_DeleteGraphSnapshot.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDeleteGraphSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGraphSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_DeletePrivateGraphEndpoint.go b/service/neptunegraph/api_op_DeletePrivateGraphEndpoint.go index a523485de4a..46c8f878e7a 100644 --- a/service/neptunegraph/api_op_DeletePrivateGraphEndpoint.go +++ b/service/neptunegraph/api_op_DeletePrivateGraphEndpoint.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeletePrivateGraphEndpointMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePrivateGraphEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_ExecuteQuery.go b/service/neptunegraph/api_op_ExecuteQuery.go index 88bfb7636df..d63dd8cae64 100644 --- a/service/neptunegraph/api_op_ExecuteQuery.go +++ b/service/neptunegraph/api_op_ExecuteQuery.go @@ -155,6 +155,9 @@ func (c *Client) addOperationExecuteQueryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opExecuteQueryMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_GetGraph.go b/service/neptunegraph/api_op_GetGraph.go index c4e53b4363d..864e044d0d5 100644 --- a/service/neptunegraph/api_op_GetGraph.go +++ b/service/neptunegraph/api_op_GetGraph.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetGraphMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGraphValidationMiddleware(stack); err != nil { return err } @@ -193,13 +196,6 @@ func (c *Client) addOperationGetGraphMiddlewares(stack *middleware.Stack, option return nil } -// GetGraphAPIClient is a client that implements the GetGraph operation. -type GetGraphAPIClient interface { - GetGraph(context.Context, *GetGraphInput, ...func(*Options)) (*GetGraphOutput, error) -} - -var _ GetGraphAPIClient = (*Client)(nil) - // GraphAvailableWaiterOptions are waiter options for GraphAvailableWaiter type GraphAvailableWaiterOptions struct { @@ -315,7 +311,13 @@ func (w *GraphAvailableWaiter) WaitForOutput(ctx context.Context, params *GetGra } out, err := w.client.GetGraph(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -521,7 +523,13 @@ func (w *GraphDeletedWaiter) WaitForOutput(ctx context.Context, params *GetGraph } out, err := w.client.GetGraph(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -590,6 +598,13 @@ func graphDeletedStateRetryable(ctx context.Context, input *GetGraphInput, outpu return true, nil } +// GetGraphAPIClient is a client that implements the GetGraph operation. +type GetGraphAPIClient interface { + GetGraph(context.Context, *GetGraphInput, ...func(*Options)) (*GetGraphOutput, error) +} + +var _ GetGraphAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetGraph(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_GetGraphSnapshot.go b/service/neptunegraph/api_op_GetGraphSnapshot.go index a26ac12e024..1bd6f0c0284 100644 --- a/service/neptunegraph/api_op_GetGraphSnapshot.go +++ b/service/neptunegraph/api_op_GetGraphSnapshot.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetGraphSnapshotMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGraphSnapshotValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationGetGraphSnapshotMiddlewares(stack *middleware.Stack return nil } -// GetGraphSnapshotAPIClient is a client that implements the GetGraphSnapshot -// operation. -type GetGraphSnapshotAPIClient interface { - GetGraphSnapshot(context.Context, *GetGraphSnapshotInput, ...func(*Options)) (*GetGraphSnapshotOutput, error) -} - -var _ GetGraphSnapshotAPIClient = (*Client)(nil) - // GraphSnapshotAvailableWaiterOptions are waiter options for // GraphSnapshotAvailableWaiter type GraphSnapshotAvailableWaiterOptions struct { @@ -295,7 +290,13 @@ func (w *GraphSnapshotAvailableWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetGraphSnapshot(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -504,7 +505,13 @@ func (w *GraphSnapshotDeletedWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetGraphSnapshot(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -573,6 +580,14 @@ func graphSnapshotDeletedStateRetryable(ctx context.Context, input *GetGraphSnap return true, nil } +// GetGraphSnapshotAPIClient is a client that implements the GetGraphSnapshot +// operation. +type GetGraphSnapshotAPIClient interface { + GetGraphSnapshot(context.Context, *GetGraphSnapshotInput, ...func(*Options)) (*GetGraphSnapshotOutput, error) +} + +var _ GetGraphSnapshotAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetGraphSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_GetGraphSummary.go b/service/neptunegraph/api_op_GetGraphSummary.go index e49b286d146..43495121691 100644 --- a/service/neptunegraph/api_op_GetGraphSummary.go +++ b/service/neptunegraph/api_op_GetGraphSummary.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetGraphSummaryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetGraphSummaryMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_GetImportTask.go b/service/neptunegraph/api_op_GetImportTask.go index 20486fa1c5f..dfd96d6d6fc 100644 --- a/service/neptunegraph/api_op_GetImportTask.go +++ b/service/neptunegraph/api_op_GetImportTask.go @@ -188,6 +188,9 @@ func (c *Client) addOperationGetImportTaskMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportTaskValidationMiddleware(stack); err != nil { return err } @@ -212,13 +215,6 @@ func (c *Client) addOperationGetImportTaskMiddlewares(stack *middleware.Stack, o return nil } -// GetImportTaskAPIClient is a client that implements the GetImportTask operation. -type GetImportTaskAPIClient interface { - GetImportTask(context.Context, *GetImportTaskInput, ...func(*Options)) (*GetImportTaskOutput, error) -} - -var _ GetImportTaskAPIClient = (*Client)(nil) - // ImportTaskSuccessfulWaiterOptions are waiter options for // ImportTaskSuccessfulWaiter type ImportTaskSuccessfulWaiterOptions struct { @@ -336,7 +332,13 @@ func (w *ImportTaskSuccessfulWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetImportTask(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -579,7 +581,13 @@ func (w *ImportTaskCancelledWaiter) WaitForOutput(ctx context.Context, params *G } out, err := w.client.GetImportTask(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -658,6 +666,13 @@ func importTaskCancelledStateRetryable(ctx context.Context, input *GetImportTask return true, nil } +// GetImportTaskAPIClient is a client that implements the GetImportTask operation. +type GetImportTaskAPIClient interface { + GetImportTask(context.Context, *GetImportTaskInput, ...func(*Options)) (*GetImportTaskOutput, error) +} + +var _ GetImportTaskAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetImportTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go b/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go index 71ec9e21238..99022765395 100644 --- a/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go +++ b/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetPrivateGraphEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPrivateGraphEndpointValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationGetPrivateGraphEndpointMiddlewares(stack *middlewar return nil } -// GetPrivateGraphEndpointAPIClient is a client that implements the -// GetPrivateGraphEndpoint operation. -type GetPrivateGraphEndpointAPIClient interface { - GetPrivateGraphEndpoint(context.Context, *GetPrivateGraphEndpointInput, ...func(*Options)) (*GetPrivateGraphEndpointOutput, error) -} - -var _ GetPrivateGraphEndpointAPIClient = (*Client)(nil) - // PrivateGraphEndpointAvailableWaiterOptions are waiter options for // PrivateGraphEndpointAvailableWaiter type PrivateGraphEndpointAvailableWaiterOptions struct { @@ -290,7 +285,13 @@ func (w *PrivateGraphEndpointAvailableWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetPrivateGraphEndpoint(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -501,7 +502,13 @@ func (w *PrivateGraphEndpointDeletedWaiter) WaitForOutput(ctx context.Context, p } out, err := w.client.GetPrivateGraphEndpoint(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -570,6 +577,14 @@ func privateGraphEndpointDeletedStateRetryable(ctx context.Context, input *GetPr return true, nil } +// GetPrivateGraphEndpointAPIClient is a client that implements the +// GetPrivateGraphEndpoint operation. +type GetPrivateGraphEndpointAPIClient interface { + GetPrivateGraphEndpoint(context.Context, *GetPrivateGraphEndpointInput, ...func(*Options)) (*GetPrivateGraphEndpointOutput, error) +} + +var _ GetPrivateGraphEndpointAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPrivateGraphEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_GetQuery.go b/service/neptunegraph/api_op_GetQuery.go index 16b7a5635bf..ff13ce13abe 100644 --- a/service/neptunegraph/api_op_GetQuery.go +++ b/service/neptunegraph/api_op_GetQuery.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetQueryMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetQueryMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_ListGraphSnapshots.go b/service/neptunegraph/api_op_ListGraphSnapshots.go index c7b480f767c..9e6f3c92506 100644 --- a/service/neptunegraph/api_op_ListGraphSnapshots.go +++ b/service/neptunegraph/api_op_ListGraphSnapshots.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListGraphSnapshotsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGraphSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListGraphSnapshotsMiddlewares(stack *middleware.Sta return nil } -// ListGraphSnapshotsAPIClient is a client that implements the ListGraphSnapshots -// operation. -type ListGraphSnapshotsAPIClient interface { - ListGraphSnapshots(context.Context, *ListGraphSnapshotsInput, ...func(*Options)) (*ListGraphSnapshotsOutput, error) -} - -var _ ListGraphSnapshotsAPIClient = (*Client)(nil) - // ListGraphSnapshotsPaginatorOptions is the paginator options for // ListGraphSnapshots type ListGraphSnapshotsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListGraphSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGraphSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListGraphSnapshotsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListGraphSnapshotsAPIClient is a client that implements the ListGraphSnapshots +// operation. +type ListGraphSnapshotsAPIClient interface { + ListGraphSnapshots(context.Context, *ListGraphSnapshotsInput, ...func(*Options)) (*ListGraphSnapshotsOutput, error) +} + +var _ ListGraphSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGraphSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_ListGraphs.go b/service/neptunegraph/api_op_ListGraphs.go index cd3f0f96526..d046ffebae9 100644 --- a/service/neptunegraph/api_op_ListGraphs.go +++ b/service/neptunegraph/api_op_ListGraphs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListGraphsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGraphs(options.Region), middleware.Before); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListGraphsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGraphsAPIClient is a client that implements the ListGraphs operation. -type ListGraphsAPIClient interface { - ListGraphs(context.Context, *ListGraphsInput, ...func(*Options)) (*ListGraphsOutput, error) -} - -var _ ListGraphsAPIClient = (*Client)(nil) - // ListGraphsPaginatorOptions is the paginator options for ListGraphs type ListGraphsPaginatorOptions struct { // The total number of records to return in the command's output. @@ -227,6 +223,9 @@ func (p *ListGraphsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGraphs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *ListGraphsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGraphsAPIClient is a client that implements the ListGraphs operation. +type ListGraphsAPIClient interface { + ListGraphs(context.Context, *ListGraphsInput, ...func(*Options)) (*ListGraphsOutput, error) +} + +var _ ListGraphsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGraphs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_ListImportTasks.go b/service/neptunegraph/api_op_ListImportTasks.go index 73cc2b42cd5..027797168b6 100644 --- a/service/neptunegraph/api_op_ListImportTasks.go +++ b/service/neptunegraph/api_op_ListImportTasks.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListImportTasksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImportTasks(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListImportTasksMiddlewares(stack *middleware.Stack, return nil } -// ListImportTasksAPIClient is a client that implements the ListImportTasks -// operation. -type ListImportTasksAPIClient interface { - ListImportTasks(context.Context, *ListImportTasksInput, ...func(*Options)) (*ListImportTasksOutput, error) -} - -var _ ListImportTasksAPIClient = (*Client)(nil) - // ListImportTasksPaginatorOptions is the paginator options for ListImportTasks type ListImportTasksPaginatorOptions struct { // The total number of records to return in the command's output. @@ -228,6 +223,9 @@ func (p *ListImportTasksPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListImportTasksPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListImportTasksAPIClient is a client that implements the ListImportTasks +// operation. +type ListImportTasksAPIClient interface { + ListImportTasks(context.Context, *ListImportTasksInput, ...func(*Options)) (*ListImportTasksOutput, error) +} + +var _ ListImportTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_ListPrivateGraphEndpoints.go b/service/neptunegraph/api_op_ListPrivateGraphEndpoints.go index 3ac5305185b..54b72089072 100644 --- a/service/neptunegraph/api_op_ListPrivateGraphEndpoints.go +++ b/service/neptunegraph/api_op_ListPrivateGraphEndpoints.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListPrivateGraphEndpointsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrivateGraphEndpointsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListPrivateGraphEndpointsMiddlewares(stack *middlew return nil } -// ListPrivateGraphEndpointsAPIClient is a client that implements the -// ListPrivateGraphEndpoints operation. -type ListPrivateGraphEndpointsAPIClient interface { - ListPrivateGraphEndpoints(context.Context, *ListPrivateGraphEndpointsInput, ...func(*Options)) (*ListPrivateGraphEndpointsOutput, error) -} - -var _ ListPrivateGraphEndpointsAPIClient = (*Client)(nil) - // ListPrivateGraphEndpointsPaginatorOptions is the paginator options for // ListPrivateGraphEndpoints type ListPrivateGraphEndpointsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListPrivateGraphEndpointsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrivateGraphEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListPrivateGraphEndpointsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListPrivateGraphEndpointsAPIClient is a client that implements the +// ListPrivateGraphEndpoints operation. +type ListPrivateGraphEndpointsAPIClient interface { + ListPrivateGraphEndpoints(context.Context, *ListPrivateGraphEndpointsInput, ...func(*Options)) (*ListPrivateGraphEndpointsOutput, error) +} + +var _ ListPrivateGraphEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrivateGraphEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/neptunegraph/api_op_ListQueries.go b/service/neptunegraph/api_op_ListQueries.go index f7f3dd4c1a2..4b88c1b797b 100644 --- a/service/neptunegraph/api_op_ListQueries.go +++ b/service/neptunegraph/api_op_ListQueries.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListQueriesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListQueriesMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_ListTagsForResource.go b/service/neptunegraph/api_op_ListTagsForResource.go index 133314ea2de..66f4f32d8a1 100644 --- a/service/neptunegraph/api_op_ListTagsForResource.go +++ b/service/neptunegraph/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_ResetGraph.go b/service/neptunegraph/api_op_ResetGraph.go index 6f30447c44f..d6eab0362bf 100644 --- a/service/neptunegraph/api_op_ResetGraph.go +++ b/service/neptunegraph/api_op_ResetGraph.go @@ -170,6 +170,9 @@ func (c *Client) addOperationResetGraphMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetGraphValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go b/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go index 65df1981adf..5c403da9990 100644 --- a/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go +++ b/service/neptunegraph/api_op_RestoreGraphFromSnapshot.go @@ -196,6 +196,9 @@ func (c *Client) addOperationRestoreGraphFromSnapshotMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreGraphFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_StartImportTask.go b/service/neptunegraph/api_op_StartImportTask.go index b6f81304cdd..c110a7caf51 100644 --- a/service/neptunegraph/api_op_StartImportTask.go +++ b/service/neptunegraph/api_op_StartImportTask.go @@ -167,6 +167,9 @@ func (c *Client) addOperationStartImportTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartImportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_TagResource.go b/service/neptunegraph/api_op_TagResource.go index 6d337511499..fd92f7fc23f 100644 --- a/service/neptunegraph/api_op_TagResource.go +++ b/service/neptunegraph/api_op_TagResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_UntagResource.go b/service/neptunegraph/api_op_UntagResource.go index ab66d341f6d..54f5c0bb1fd 100644 --- a/service/neptunegraph/api_op_UntagResource.go +++ b/service/neptunegraph/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/neptunegraph/api_op_UpdateGraph.go b/service/neptunegraph/api_op_UpdateGraph.go index 5ccef6775aa..f470611651c 100644 --- a/service/neptunegraph/api_op_UpdateGraph.go +++ b/service/neptunegraph/api_op_UpdateGraph.go @@ -177,6 +177,9 @@ func (c *Client) addOperationUpdateGraphMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGraphValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_client.go b/service/networkfirewall/api_client.go index 71d9b954e2f..46a217b1632 100644 --- a/service/networkfirewall/api_client.go +++ b/service/networkfirewall/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/networkfirewall/api_op_AssociateFirewallPolicy.go b/service/networkfirewall/api_op_AssociateFirewallPolicy.go index 3c6658cceea..dbbb7ade391 100644 --- a/service/networkfirewall/api_op_AssociateFirewallPolicy.go +++ b/service/networkfirewall/api_op_AssociateFirewallPolicy.go @@ -160,6 +160,9 @@ func (c *Client) addOperationAssociateFirewallPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateFirewallPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_AssociateSubnets.go b/service/networkfirewall/api_op_AssociateSubnets.go index 95377825872..c2bc605110b 100644 --- a/service/networkfirewall/api_op_AssociateSubnets.go +++ b/service/networkfirewall/api_op_AssociateSubnets.go @@ -162,6 +162,9 @@ func (c *Client) addOperationAssociateSubnetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateSubnetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_CreateFirewall.go b/service/networkfirewall/api_op_CreateFirewall.go index cc7ae6f063e..f103c7772e3 100644 --- a/service/networkfirewall/api_op_CreateFirewall.go +++ b/service/networkfirewall/api_op_CreateFirewall.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateFirewallMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFirewallValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_CreateFirewallPolicy.go b/service/networkfirewall/api_op_CreateFirewallPolicy.go index 94a9bdb077f..43256a7b223 100644 --- a/service/networkfirewall/api_op_CreateFirewallPolicy.go +++ b/service/networkfirewall/api_op_CreateFirewallPolicy.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateFirewallPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFirewallPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_CreateRuleGroup.go b/service/networkfirewall/api_op_CreateRuleGroup.go index 17063c12f1a..11a44f7c8a9 100644 --- a/service/networkfirewall/api_op_CreateRuleGroup.go +++ b/service/networkfirewall/api_op_CreateRuleGroup.go @@ -232,6 +232,9 @@ func (c *Client) addOperationCreateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go b/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go index 143bd66b4c7..a2c25ee22ef 100644 --- a/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_CreateTLSInspectionConfiguration.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateTLSInspectionConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTLSInspectionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_DeleteFirewall.go b/service/networkfirewall/api_op_DeleteFirewall.go index 2a867dcbadd..214392b7ac9 100644 --- a/service/networkfirewall/api_op_DeleteFirewall.go +++ b/service/networkfirewall/api_op_DeleteFirewall.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteFirewallMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFirewall(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DeleteFirewallPolicy.go b/service/networkfirewall/api_op_DeleteFirewallPolicy.go index f38dd711ae9..57fbb58c7bb 100644 --- a/service/networkfirewall/api_op_DeleteFirewallPolicy.go +++ b/service/networkfirewall/api_op_DeleteFirewallPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteFirewallPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFirewallPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DeleteResourcePolicy.go b/service/networkfirewall/api_op_DeleteResourcePolicy.go index e4d830c9d2a..6088a5981dc 100644 --- a/service/networkfirewall/api_op_DeleteResourcePolicy.go +++ b/service/networkfirewall/api_op_DeleteResourcePolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_DeleteRuleGroup.go b/service/networkfirewall/api_op_DeleteRuleGroup.go index b872291fb2e..917cc8a34ea 100644 --- a/service/networkfirewall/api_op_DeleteRuleGroup.go +++ b/service/networkfirewall/api_op_DeleteRuleGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRuleGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DeleteTLSInspectionConfiguration.go b/service/networkfirewall/api_op_DeleteTLSInspectionConfiguration.go index 9c789beb362..74b39ff32ff 100644 --- a/service/networkfirewall/api_op_DeleteTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_DeleteTLSInspectionConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteTLSInspectionConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTLSInspectionConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeFirewall.go b/service/networkfirewall/api_op_DescribeFirewall.go index 82e684d12ab..78477d97bf3 100644 --- a/service/networkfirewall/api_op_DescribeFirewall.go +++ b/service/networkfirewall/api_op_DescribeFirewall.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeFirewallMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFirewall(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeFirewallPolicy.go b/service/networkfirewall/api_op_DescribeFirewallPolicy.go index 9cf4677cdb0..df5c6140f29 100644 --- a/service/networkfirewall/api_op_DescribeFirewallPolicy.go +++ b/service/networkfirewall/api_op_DescribeFirewallPolicy.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeFirewallPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFirewallPolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeLoggingConfiguration.go b/service/networkfirewall/api_op_DescribeLoggingConfiguration.go index 93721bfcfa6..f21bfe2c1b1 100644 --- a/service/networkfirewall/api_op_DescribeLoggingConfiguration.go +++ b/service/networkfirewall/api_op_DescribeLoggingConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeLoggingConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLoggingConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeResourcePolicy.go b/service/networkfirewall/api_op_DescribeResourcePolicy.go index 337374c5fb3..5d2c3955223 100644 --- a/service/networkfirewall/api_op_DescribeResourcePolicy.go +++ b/service/networkfirewall/api_op_DescribeResourcePolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeRuleGroup.go b/service/networkfirewall/api_op_DescribeRuleGroup.go index dbac5d44a00..31a01bbf063 100644 --- a/service/networkfirewall/api_op_DescribeRuleGroup.go +++ b/service/networkfirewall/api_op_DescribeRuleGroup.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDescribeRuleGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRuleGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeRuleGroupMetadata.go b/service/networkfirewall/api_op_DescribeRuleGroupMetadata.go index 77b8a532a13..e376cb9e663 100644 --- a/service/networkfirewall/api_op_DescribeRuleGroupMetadata.go +++ b/service/networkfirewall/api_op_DescribeRuleGroupMetadata.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeRuleGroupMetadataMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRuleGroupMetadata(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go b/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go index 8a7244ef7b8..f7249ebd749 100644 --- a/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_DescribeTLSInspectionConfiguration.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeTLSInspectionConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTLSInspectionConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_DisassociateSubnets.go b/service/networkfirewall/api_op_DisassociateSubnets.go index 563cd4dabde..d16404231e7 100644 --- a/service/networkfirewall/api_op_DisassociateSubnets.go +++ b/service/networkfirewall/api_op_DisassociateSubnets.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDisassociateSubnetsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateSubnetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_ListFirewallPolicies.go b/service/networkfirewall/api_op_ListFirewallPolicies.go index 86593b53688..9ed7cf1fcfb 100644 --- a/service/networkfirewall/api_op_ListFirewallPolicies.go +++ b/service/networkfirewall/api_op_ListFirewallPolicies.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListFirewallPoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFirewallPolicies(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListFirewallPoliciesMiddlewares(stack *middleware.S return nil } -// ListFirewallPoliciesAPIClient is a client that implements the -// ListFirewallPolicies operation. -type ListFirewallPoliciesAPIClient interface { - ListFirewallPolicies(context.Context, *ListFirewallPoliciesInput, ...func(*Options)) (*ListFirewallPoliciesOutput, error) -} - -var _ ListFirewallPoliciesAPIClient = (*Client)(nil) - // ListFirewallPoliciesPaginatorOptions is the paginator options for // ListFirewallPolicies type ListFirewallPoliciesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListFirewallPoliciesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListFirewallPoliciesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListFirewallPoliciesAPIClient is a client that implements the +// ListFirewallPolicies operation. +type ListFirewallPoliciesAPIClient interface { + ListFirewallPolicies(context.Context, *ListFirewallPoliciesInput, ...func(*Options)) (*ListFirewallPoliciesOutput, error) +} + +var _ ListFirewallPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkfirewall/api_op_ListFirewalls.go b/service/networkfirewall/api_op_ListFirewalls.go index 48ade35a182..61f986268bb 100644 --- a/service/networkfirewall/api_op_ListFirewalls.go +++ b/service/networkfirewall/api_op_ListFirewalls.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFirewallsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFirewalls(options.Region), middleware.Before); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListFirewallsMiddlewares(stack *middleware.Stack, o return nil } -// ListFirewallsAPIClient is a client that implements the ListFirewalls operation. -type ListFirewallsAPIClient interface { - ListFirewalls(context.Context, *ListFirewallsInput, ...func(*Options)) (*ListFirewallsOutput, error) -} - -var _ ListFirewallsAPIClient = (*Client)(nil) - // ListFirewallsPaginatorOptions is the paginator options for ListFirewalls type ListFirewallsPaginatorOptions struct { // The maximum number of objects that you want Network Firewall to return for this @@ -226,6 +222,9 @@ func (p *ListFirewallsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewalls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListFirewallsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListFirewallsAPIClient is a client that implements the ListFirewalls operation. +type ListFirewallsAPIClient interface { + ListFirewalls(context.Context, *ListFirewallsInput, ...func(*Options)) (*ListFirewallsOutput, error) +} + +var _ ListFirewallsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewalls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkfirewall/api_op_ListRuleGroups.go b/service/networkfirewall/api_op_ListRuleGroups.go index 410be8df7aa..bbe1c36f70f 100644 --- a/service/networkfirewall/api_op_ListRuleGroups.go +++ b/service/networkfirewall/api_op_ListRuleGroups.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRuleGroups(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, return nil } -// ListRuleGroupsAPIClient is a client that implements the ListRuleGroups -// operation. -type ListRuleGroupsAPIClient interface { - ListRuleGroups(context.Context, *ListRuleGroupsInput, ...func(*Options)) (*ListRuleGroupsOutput, error) -} - -var _ ListRuleGroupsAPIClient = (*Client)(nil) - // ListRuleGroupsPaginatorOptions is the paginator options for ListRuleGroups type ListRuleGroupsPaginatorOptions struct { // The maximum number of objects that you want Network Firewall to return for this @@ -232,6 +227,9 @@ func (p *ListRuleGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRuleGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListRuleGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListRuleGroupsAPIClient is a client that implements the ListRuleGroups +// operation. +type ListRuleGroupsAPIClient interface { + ListRuleGroups(context.Context, *ListRuleGroupsInput, ...func(*Options)) (*ListRuleGroupsOutput, error) +} + +var _ ListRuleGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRuleGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkfirewall/api_op_ListTLSInspectionConfigurations.go b/service/networkfirewall/api_op_ListTLSInspectionConfigurations.go index 3a663a61be2..0b577b39d09 100644 --- a/service/networkfirewall/api_op_ListTLSInspectionConfigurations.go +++ b/service/networkfirewall/api_op_ListTLSInspectionConfigurations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListTLSInspectionConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTLSInspectionConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListTLSInspectionConfigurationsMiddlewares(stack *m return nil } -// ListTLSInspectionConfigurationsAPIClient is a client that implements the -// ListTLSInspectionConfigurations operation. -type ListTLSInspectionConfigurationsAPIClient interface { - ListTLSInspectionConfigurations(context.Context, *ListTLSInspectionConfigurationsInput, ...func(*Options)) (*ListTLSInspectionConfigurationsOutput, error) -} - -var _ ListTLSInspectionConfigurationsAPIClient = (*Client)(nil) - // ListTLSInspectionConfigurationsPaginatorOptions is the paginator options for // ListTLSInspectionConfigurations type ListTLSInspectionConfigurationsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListTLSInspectionConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTLSInspectionConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListTLSInspectionConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListTLSInspectionConfigurationsAPIClient is a client that implements the +// ListTLSInspectionConfigurations operation. +type ListTLSInspectionConfigurationsAPIClient interface { + ListTLSInspectionConfigurations(context.Context, *ListTLSInspectionConfigurationsInput, ...func(*Options)) (*ListTLSInspectionConfigurationsOutput, error) +} + +var _ ListTLSInspectionConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTLSInspectionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkfirewall/api_op_ListTagsForResource.go b/service/networkfirewall/api_op_ListTagsForResource.go index 1fc5750b7d9..08b9766fcf6 100644 --- a/service/networkfirewall/api_op_ListTagsForResource.go +++ b/service/networkfirewall/api_op_ListTagsForResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkfirewall/api_op_PutResourcePolicy.go b/service/networkfirewall/api_op_PutResourcePolicy.go index 95db48fe03b..afbbbbeebe7 100644 --- a/service/networkfirewall/api_op_PutResourcePolicy.go +++ b/service/networkfirewall/api_op_PutResourcePolicy.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_TagResource.go b/service/networkfirewall/api_op_TagResource.go index bd2cadf4954..3ae5a6738cf 100644 --- a/service/networkfirewall/api_op_TagResource.go +++ b/service/networkfirewall/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UntagResource.go b/service/networkfirewall/api_op_UntagResource.go index 70948d132e0..745bc240819 100644 --- a/service/networkfirewall/api_op_UntagResource.go +++ b/service/networkfirewall/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateFirewallDeleteProtection.go b/service/networkfirewall/api_op_UpdateFirewallDeleteProtection.go index dd6c0543fff..d17758e8672 100644 --- a/service/networkfirewall/api_op_UpdateFirewallDeleteProtection.go +++ b/service/networkfirewall/api_op_UpdateFirewallDeleteProtection.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdateFirewallDeleteProtectionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallDeleteProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateFirewallDescription.go b/service/networkfirewall/api_op_UpdateFirewallDescription.go index 8168bcf6c83..c431770d4aa 100644 --- a/service/networkfirewall/api_op_UpdateFirewallDescription.go +++ b/service/networkfirewall/api_op_UpdateFirewallDescription.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateFirewallDescriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFirewallDescription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateFirewallEncryptionConfiguration.go b/service/networkfirewall/api_op_UpdateFirewallEncryptionConfiguration.go index 726a386dfb2..1aec9df6bf5 100644 --- a/service/networkfirewall/api_op_UpdateFirewallEncryptionConfiguration.go +++ b/service/networkfirewall/api_op_UpdateFirewallEncryptionConfiguration.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateFirewallEncryptionConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallEncryptionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateFirewallPolicy.go b/service/networkfirewall/api_op_UpdateFirewallPolicy.go index 42e9b85dc1b..aeeca07dd07 100644 --- a/service/networkfirewall/api_op_UpdateFirewallPolicy.go +++ b/service/networkfirewall/api_op_UpdateFirewallPolicy.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateFirewallPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateFirewallPolicyChangeProtection.go b/service/networkfirewall/api_op_UpdateFirewallPolicyChangeProtection.go index c5accb4a746..2c03aab8b0e 100644 --- a/service/networkfirewall/api_op_UpdateFirewallPolicyChangeProtection.go +++ b/service/networkfirewall/api_op_UpdateFirewallPolicyChangeProtection.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdateFirewallPolicyChangeProtectionMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallPolicyChangeProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateLoggingConfiguration.go b/service/networkfirewall/api_op_UpdateLoggingConfiguration.go index a8f36bf4df4..67efcf017b9 100644 --- a/service/networkfirewall/api_op_UpdateLoggingConfiguration.go +++ b/service/networkfirewall/api_op_UpdateLoggingConfiguration.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateRuleGroup.go b/service/networkfirewall/api_op_UpdateRuleGroup.go index 27b7069c092..ed1873e674a 100644 --- a/service/networkfirewall/api_op_UpdateRuleGroup.go +++ b/service/networkfirewall/api_op_UpdateRuleGroup.go @@ -206,6 +206,9 @@ func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go b/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go index 68f497a6f26..12b4c7baf01 100644 --- a/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go +++ b/service/networkfirewall/api_op_UpdateSubnetChangeProtection.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateSubnetChangeProtectionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubnetChangeProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go b/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go index 2bdc364bafb..63b138b255a 100644 --- a/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go +++ b/service/networkfirewall/api_op_UpdateTLSInspectionConfiguration.go @@ -177,6 +177,9 @@ func (c *Client) addOperationUpdateTLSInspectionConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTLSInspectionConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_client.go b/service/networkmanager/api_client.go index afea687d289..afe9b5c4458 100644 --- a/service/networkmanager/api_client.go +++ b/service/networkmanager/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/networkmanager/api_op_AcceptAttachment.go b/service/networkmanager/api_op_AcceptAttachment.go index b6ffca9a810..a0783ce2655 100644 --- a/service/networkmanager/api_op_AcceptAttachment.go +++ b/service/networkmanager/api_op_AcceptAttachment.go @@ -109,6 +109,9 @@ func (c *Client) addOperationAcceptAttachmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_AssociateConnectPeer.go b/service/networkmanager/api_op_AssociateConnectPeer.go index d066eae3e84..91a10c27b77 100644 --- a/service/networkmanager/api_op_AssociateConnectPeer.go +++ b/service/networkmanager/api_op_AssociateConnectPeer.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAssociateConnectPeerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_AssociateCustomerGateway.go b/service/networkmanager/api_op_AssociateCustomerGateway.go index ff6870c9073..8f2695293c5 100644 --- a/service/networkmanager/api_op_AssociateCustomerGateway.go +++ b/service/networkmanager/api_op_AssociateCustomerGateway.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAssociateCustomerGatewayMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateCustomerGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_AssociateLink.go b/service/networkmanager/api_op_AssociateLink.go index ce83c6cd9cc..4376e9d2337 100644 --- a/service/networkmanager/api_op_AssociateLink.go +++ b/service/networkmanager/api_op_AssociateLink.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssociateLinkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_AssociateTransitGatewayConnectPeer.go b/service/networkmanager/api_op_AssociateTransitGatewayConnectPeer.go index ba48cbccb42..4e9e9a13c0b 100644 --- a/service/networkmanager/api_op_AssociateTransitGatewayConnectPeer.go +++ b/service/networkmanager/api_op_AssociateTransitGatewayConnectPeer.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateTransitGatewayConnectPeerMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateConnectAttachment.go b/service/networkmanager/api_op_CreateConnectAttachment.go index fe836fa5f3c..12fc1508868 100644 --- a/service/networkmanager/api_op_CreateConnectAttachment.go +++ b/service/networkmanager/api_op_CreateConnectAttachment.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateConnectAttachmentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConnectAttachmentMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateConnectPeer.go b/service/networkmanager/api_op_CreateConnectPeer.go index 052aca0c780..7bcc6c1bfbc 100644 --- a/service/networkmanager/api_op_CreateConnectPeer.go +++ b/service/networkmanager/api_op_CreateConnectPeer.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateConnectPeerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConnectPeerMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateConnection.go b/service/networkmanager/api_op_CreateConnection.go index 802d44f9b35..786c14317ae 100644 --- a/service/networkmanager/api_op_CreateConnection.go +++ b/service/networkmanager/api_op_CreateConnection.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateCoreNetwork.go b/service/networkmanager/api_op_CreateCoreNetwork.go index 435cb6b2fd6..ae30a579f72 100644 --- a/service/networkmanager/api_op_CreateCoreNetwork.go +++ b/service/networkmanager/api_op_CreateCoreNetwork.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateCoreNetworkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCoreNetworkMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateDevice.go b/service/networkmanager/api_op_CreateDevice.go index 1028a550af5..2c8015f28b5 100644 --- a/service/networkmanager/api_op_CreateDevice.go +++ b/service/networkmanager/api_op_CreateDevice.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateGlobalNetwork.go b/service/networkmanager/api_op_CreateGlobalNetwork.go index fe79a6fba8a..ef3c0d89080 100644 --- a/service/networkmanager/api_op_CreateGlobalNetwork.go +++ b/service/networkmanager/api_op_CreateGlobalNetwork.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateGlobalNetworkMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGlobalNetwork(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateLink.go b/service/networkmanager/api_op_CreateLink.go index 69c91563246..78414d5b512 100644 --- a/service/networkmanager/api_op_CreateLink.go +++ b/service/networkmanager/api_op_CreateLink.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateSite.go b/service/networkmanager/api_op_CreateSite.go index 73c099bf1df..58b7bfb0e67 100644 --- a/service/networkmanager/api_op_CreateSite.go +++ b/service/networkmanager/api_op_CreateSite.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateSiteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go b/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go index 3847f20110e..eae02bb845f 100644 --- a/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go +++ b/service/networkmanager/api_op_CreateSiteToSiteVpnAttachment.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateSiteToSiteVpnAttachmentMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSiteToSiteVpnAttachmentMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateTransitGatewayPeering.go b/service/networkmanager/api_op_CreateTransitGatewayPeering.go index 02f30750272..28b6fb6951e 100644 --- a/service/networkmanager/api_op_CreateTransitGatewayPeering.go +++ b/service/networkmanager/api_op_CreateTransitGatewayPeering.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateTransitGatewayPeeringMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTransitGatewayPeeringMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateTransitGatewayRouteTableAttachment.go b/service/networkmanager/api_op_CreateTransitGatewayRouteTableAttachment.go index 8044632f298..f832d169b71 100644 --- a/service/networkmanager/api_op_CreateTransitGatewayRouteTableAttachment.go +++ b/service/networkmanager/api_op_CreateTransitGatewayRouteTableAttachment.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateTransitGatewayRouteTableAttachmentMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTransitGatewayRouteTableAttachmentMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_CreateVpcAttachment.go b/service/networkmanager/api_op_CreateVpcAttachment.go index 93203280863..c7c109fa56f 100644 --- a/service/networkmanager/api_op_CreateVpcAttachment.go +++ b/service/networkmanager/api_op_CreateVpcAttachment.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateVpcAttachmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVpcAttachmentMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteAttachment.go b/service/networkmanager/api_op_DeleteAttachment.go index 7ac35e1a88c..dbbd49f018a 100644 --- a/service/networkmanager/api_op_DeleteAttachment.go +++ b/service/networkmanager/api_op_DeleteAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAttachmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteConnectPeer.go b/service/networkmanager/api_op_DeleteConnectPeer.go index cd22f05fdd3..ce30801f559 100644 --- a/service/networkmanager/api_op_DeleteConnectPeer.go +++ b/service/networkmanager/api_op_DeleteConnectPeer.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteConnectPeerMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteConnection.go b/service/networkmanager/api_op_DeleteConnection.go index 59849cf841a..a484270283c 100644 --- a/service/networkmanager/api_op_DeleteConnection.go +++ b/service/networkmanager/api_op_DeleteConnection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteCoreNetwork.go b/service/networkmanager/api_op_DeleteCoreNetwork.go index 15228046a56..52e7be0d959 100644 --- a/service/networkmanager/api_op_DeleteCoreNetwork.go +++ b/service/networkmanager/api_op_DeleteCoreNetwork.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteCoreNetworkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCoreNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go b/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go index 0e68d723602..3ca421632ba 100644 --- a/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go +++ b/service/networkmanager/api_op_DeleteCoreNetworkPolicyVersion.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteCoreNetworkPolicyVersionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCoreNetworkPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteDevice.go b/service/networkmanager/api_op_DeleteDevice.go index aa41e00b4ca..ea9301e94a6 100644 --- a/service/networkmanager/api_op_DeleteDevice.go +++ b/service/networkmanager/api_op_DeleteDevice.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteGlobalNetwork.go b/service/networkmanager/api_op_DeleteGlobalNetwork.go index d215d587031..8720c57b9ff 100644 --- a/service/networkmanager/api_op_DeleteGlobalNetwork.go +++ b/service/networkmanager/api_op_DeleteGlobalNetwork.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteGlobalNetworkMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlobalNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteLink.go b/service/networkmanager/api_op_DeleteLink.go index 7723f9f8cab..d4df2d2fac9 100644 --- a/service/networkmanager/api_op_DeleteLink.go +++ b/service/networkmanager/api_op_DeleteLink.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeletePeering.go b/service/networkmanager/api_op_DeletePeering.go index 385bef6922c..bd4f350b2da 100644 --- a/service/networkmanager/api_op_DeletePeering.go +++ b/service/networkmanager/api_op_DeletePeering.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePeeringMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePeeringValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteResourcePolicy.go b/service/networkmanager/api_op_DeleteResourcePolicy.go index 981189fa0f4..ea1f0755c25 100644 --- a/service/networkmanager/api_op_DeleteResourcePolicy.go +++ b/service/networkmanager/api_op_DeleteResourcePolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeleteSite.go b/service/networkmanager/api_op_DeleteSite.go index 5af92f9b96d..2e8fed0daee 100644 --- a/service/networkmanager/api_op_DeleteSite.go +++ b/service/networkmanager/api_op_DeleteSite.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteSiteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DeregisterTransitGateway.go b/service/networkmanager/api_op_DeregisterTransitGateway.go index 272aa9a2f87..fb77971727c 100644 --- a/service/networkmanager/api_op_DeregisterTransitGateway.go +++ b/service/networkmanager/api_op_DeregisterTransitGateway.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeregisterTransitGatewayMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterTransitGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DescribeGlobalNetworks.go b/service/networkmanager/api_op_DescribeGlobalNetworks.go index 2666aa2071e..462bdc2c520 100644 --- a/service/networkmanager/api_op_DescribeGlobalNetworks.go +++ b/service/networkmanager/api_op_DescribeGlobalNetworks.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeGlobalNetworksMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGlobalNetworks(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeGlobalNetworksMiddlewares(stack *middleware return nil } -// DescribeGlobalNetworksAPIClient is a client that implements the -// DescribeGlobalNetworks operation. -type DescribeGlobalNetworksAPIClient interface { - DescribeGlobalNetworks(context.Context, *DescribeGlobalNetworksInput, ...func(*Options)) (*DescribeGlobalNetworksOutput, error) -} - -var _ DescribeGlobalNetworksAPIClient = (*Client)(nil) - // DescribeGlobalNetworksPaginatorOptions is the paginator options for // DescribeGlobalNetworks type DescribeGlobalNetworksPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *DescribeGlobalNetworksPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGlobalNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeGlobalNetworksPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeGlobalNetworksAPIClient is a client that implements the +// DescribeGlobalNetworks operation. +type DescribeGlobalNetworksAPIClient interface { + DescribeGlobalNetworks(context.Context, *DescribeGlobalNetworksInput, ...func(*Options)) (*DescribeGlobalNetworksOutput, error) +} + +var _ DescribeGlobalNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGlobalNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_DisassociateConnectPeer.go b/service/networkmanager/api_op_DisassociateConnectPeer.go index 83425458288..4d0f292a5a9 100644 --- a/service/networkmanager/api_op_DisassociateConnectPeer.go +++ b/service/networkmanager/api_op_DisassociateConnectPeer.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateConnectPeerMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DisassociateCustomerGateway.go b/service/networkmanager/api_op_DisassociateCustomerGateway.go index 2585afc51a6..623876930ef 100644 --- a/service/networkmanager/api_op_DisassociateCustomerGateway.go +++ b/service/networkmanager/api_op_DisassociateCustomerGateway.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateCustomerGatewayMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateCustomerGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DisassociateLink.go b/service/networkmanager/api_op_DisassociateLink.go index 231fb2174fd..0d6b9ae301e 100644 --- a/service/networkmanager/api_op_DisassociateLink.go +++ b/service/networkmanager/api_op_DisassociateLink.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateLinkMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_DisassociateTransitGatewayConnectPeer.go b/service/networkmanager/api_op_DisassociateTransitGatewayConnectPeer.go index 88f398e988b..c990d3bc57f 100644 --- a/service/networkmanager/api_op_DisassociateTransitGatewayConnectPeer.go +++ b/service/networkmanager/api_op_DisassociateTransitGatewayConnectPeer.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateTransitGatewayConnectPeerMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go b/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go index 25f53df7de2..fcce3e6e946 100644 --- a/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go +++ b/service/networkmanager/api_op_ExecuteCoreNetworkChangeSet.go @@ -107,6 +107,9 @@ func (c *Client) addOperationExecuteCoreNetworkChangeSetMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteCoreNetworkChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetConnectAttachment.go b/service/networkmanager/api_op_GetConnectAttachment.go index f4d37e6ce2d..dd3499b0caa 100644 --- a/service/networkmanager/api_op_GetConnectAttachment.go +++ b/service/networkmanager/api_op_GetConnectAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetConnectAttachmentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetConnectPeer.go b/service/networkmanager/api_op_GetConnectPeer.go index 801f7e6b2d2..f2ea516fba7 100644 --- a/service/networkmanager/api_op_GetConnectPeer.go +++ b/service/networkmanager/api_op_GetConnectPeer.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetConnectPeerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectPeerValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetConnectPeerAssociations.go b/service/networkmanager/api_op_GetConnectPeerAssociations.go index db7960d00b9..50762d81254 100644 --- a/service/networkmanager/api_op_GetConnectPeerAssociations.go +++ b/service/networkmanager/api_op_GetConnectPeerAssociations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetConnectPeerAssociationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectPeerAssociationsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetConnectPeerAssociationsMiddlewares(stack *middle return nil } -// GetConnectPeerAssociationsAPIClient is a client that implements the -// GetConnectPeerAssociations operation. -type GetConnectPeerAssociationsAPIClient interface { - GetConnectPeerAssociations(context.Context, *GetConnectPeerAssociationsInput, ...func(*Options)) (*GetConnectPeerAssociationsOutput, error) -} - -var _ GetConnectPeerAssociationsAPIClient = (*Client)(nil) - // GetConnectPeerAssociationsPaginatorOptions is the paginator options for // GetConnectPeerAssociations type GetConnectPeerAssociationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *GetConnectPeerAssociationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConnectPeerAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetConnectPeerAssociationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// GetConnectPeerAssociationsAPIClient is a client that implements the +// GetConnectPeerAssociations operation. +type GetConnectPeerAssociationsAPIClient interface { + GetConnectPeerAssociations(context.Context, *GetConnectPeerAssociationsInput, ...func(*Options)) (*GetConnectPeerAssociationsOutput, error) +} + +var _ GetConnectPeerAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConnectPeerAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetConnections.go b/service/networkmanager/api_op_GetConnections.go index a70d1eeadcc..ca320557636 100644 --- a/service/networkmanager/api_op_GetConnections.go +++ b/service/networkmanager/api_op_GetConnections.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetConnectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetConnectionsMiddlewares(stack *middleware.Stack, return nil } -// GetConnectionsAPIClient is a client that implements the GetConnections -// operation. -type GetConnectionsAPIClient interface { - GetConnections(context.Context, *GetConnectionsInput, ...func(*Options)) (*GetConnectionsOutput, error) -} - -var _ GetConnectionsAPIClient = (*Client)(nil) - // GetConnectionsPaginatorOptions is the paginator options for GetConnections type GetConnectionsPaginatorOptions struct { // The maximum number of results to return. @@ -216,6 +211,9 @@ func (p *GetConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// GetConnectionsAPIClient is a client that implements the GetConnections +// operation. +type GetConnectionsAPIClient interface { + GetConnections(context.Context, *GetConnectionsInput, ...func(*Options)) (*GetConnectionsOutput, error) +} + +var _ GetConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetCoreNetwork.go b/service/networkmanager/api_op_GetCoreNetwork.go index 68e43195b06..63d8cd20d3d 100644 --- a/service/networkmanager/api_op_GetCoreNetwork.go +++ b/service/networkmanager/api_op_GetCoreNetwork.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetCoreNetworkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetCoreNetworkChangeEvents.go b/service/networkmanager/api_op_GetCoreNetworkChangeEvents.go index 6a3065c2235..1cafed7dc56 100644 --- a/service/networkmanager/api_op_GetCoreNetworkChangeEvents.go +++ b/service/networkmanager/api_op_GetCoreNetworkChangeEvents.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetCoreNetworkChangeEventsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreNetworkChangeEventsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationGetCoreNetworkChangeEventsMiddlewares(stack *middle return nil } -// GetCoreNetworkChangeEventsAPIClient is a client that implements the -// GetCoreNetworkChangeEvents operation. -type GetCoreNetworkChangeEventsAPIClient interface { - GetCoreNetworkChangeEvents(context.Context, *GetCoreNetworkChangeEventsInput, ...func(*Options)) (*GetCoreNetworkChangeEventsOutput, error) -} - -var _ GetCoreNetworkChangeEventsAPIClient = (*Client)(nil) - // GetCoreNetworkChangeEventsPaginatorOptions is the paginator options for // GetCoreNetworkChangeEvents type GetCoreNetworkChangeEventsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetCoreNetworkChangeEventsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCoreNetworkChangeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetCoreNetworkChangeEventsPaginator) NextPage(ctx context.Context, optF return result, nil } +// GetCoreNetworkChangeEventsAPIClient is a client that implements the +// GetCoreNetworkChangeEvents operation. +type GetCoreNetworkChangeEventsAPIClient interface { + GetCoreNetworkChangeEvents(context.Context, *GetCoreNetworkChangeEventsInput, ...func(*Options)) (*GetCoreNetworkChangeEventsOutput, error) +} + +var _ GetCoreNetworkChangeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCoreNetworkChangeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetCoreNetworkChangeSet.go b/service/networkmanager/api_op_GetCoreNetworkChangeSet.go index 4f02ea2deab..7c40c6873d2 100644 --- a/service/networkmanager/api_op_GetCoreNetworkChangeSet.go +++ b/service/networkmanager/api_op_GetCoreNetworkChangeSet.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetCoreNetworkChangeSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreNetworkChangeSetValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetCoreNetworkChangeSetMiddlewares(stack *middlewar return nil } -// GetCoreNetworkChangeSetAPIClient is a client that implements the -// GetCoreNetworkChangeSet operation. -type GetCoreNetworkChangeSetAPIClient interface { - GetCoreNetworkChangeSet(context.Context, *GetCoreNetworkChangeSetInput, ...func(*Options)) (*GetCoreNetworkChangeSetOutput, error) -} - -var _ GetCoreNetworkChangeSetAPIClient = (*Client)(nil) - // GetCoreNetworkChangeSetPaginatorOptions is the paginator options for // GetCoreNetworkChangeSet type GetCoreNetworkChangeSetPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetCoreNetworkChangeSetPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCoreNetworkChangeSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetCoreNetworkChangeSetPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetCoreNetworkChangeSetAPIClient is a client that implements the +// GetCoreNetworkChangeSet operation. +type GetCoreNetworkChangeSetAPIClient interface { + GetCoreNetworkChangeSet(context.Context, *GetCoreNetworkChangeSetInput, ...func(*Options)) (*GetCoreNetworkChangeSetOutput, error) +} + +var _ GetCoreNetworkChangeSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCoreNetworkChangeSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetCoreNetworkPolicy.go b/service/networkmanager/api_op_GetCoreNetworkPolicy.go index e2d13e2bc8b..2868b5709bf 100644 --- a/service/networkmanager/api_op_GetCoreNetworkPolicy.go +++ b/service/networkmanager/api_op_GetCoreNetworkPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetCoreNetworkPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCoreNetworkPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetCustomerGatewayAssociations.go b/service/networkmanager/api_op_GetCustomerGatewayAssociations.go index fe955053dd5..6df662ccd3d 100644 --- a/service/networkmanager/api_op_GetCustomerGatewayAssociations.go +++ b/service/networkmanager/api_op_GetCustomerGatewayAssociations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetCustomerGatewayAssociationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomerGatewayAssociationsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationGetCustomerGatewayAssociationsMiddlewares(stack *mi return nil } -// GetCustomerGatewayAssociationsAPIClient is a client that implements the -// GetCustomerGatewayAssociations operation. -type GetCustomerGatewayAssociationsAPIClient interface { - GetCustomerGatewayAssociations(context.Context, *GetCustomerGatewayAssociationsInput, ...func(*Options)) (*GetCustomerGatewayAssociationsOutput, error) -} - -var _ GetCustomerGatewayAssociationsAPIClient = (*Client)(nil) - // GetCustomerGatewayAssociationsPaginatorOptions is the paginator options for // GetCustomerGatewayAssociations type GetCustomerGatewayAssociationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *GetCustomerGatewayAssociationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCustomerGatewayAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *GetCustomerGatewayAssociationsPaginator) NextPage(ctx context.Context, return result, nil } +// GetCustomerGatewayAssociationsAPIClient is a client that implements the +// GetCustomerGatewayAssociations operation. +type GetCustomerGatewayAssociationsAPIClient interface { + GetCustomerGatewayAssociations(context.Context, *GetCustomerGatewayAssociationsInput, ...func(*Options)) (*GetCustomerGatewayAssociationsOutput, error) +} + +var _ GetCustomerGatewayAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCustomerGatewayAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetDevices.go b/service/networkmanager/api_op_GetDevices.go index c9c40b06ee4..007cd40fe98 100644 --- a/service/networkmanager/api_op_GetDevices.go +++ b/service/networkmanager/api_op_GetDevices.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetDevicesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDevicesValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationGetDevicesMiddlewares(stack *middleware.Stack, opti return nil } -// GetDevicesAPIClient is a client that implements the GetDevices operation. -type GetDevicesAPIClient interface { - GetDevices(context.Context, *GetDevicesInput, ...func(*Options)) (*GetDevicesOutput, error) -} - -var _ GetDevicesAPIClient = (*Client)(nil) - // GetDevicesPaginatorOptions is the paginator options for GetDevices type GetDevicesPaginatorOptions struct { // The maximum number of results to return. @@ -215,6 +211,9 @@ func (p *GetDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *GetDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// GetDevicesAPIClient is a client that implements the GetDevices operation. +type GetDevicesAPIClient interface { + GetDevices(context.Context, *GetDevicesInput, ...func(*Options)) (*GetDevicesOutput, error) +} + +var _ GetDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetLinkAssociations.go b/service/networkmanager/api_op_GetLinkAssociations.go index 6dec27cb7b1..7287fa52805 100644 --- a/service/networkmanager/api_op_GetLinkAssociations.go +++ b/service/networkmanager/api_op_GetLinkAssociations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetLinkAssociationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLinkAssociationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetLinkAssociationsMiddlewares(stack *middleware.St return nil } -// GetLinkAssociationsAPIClient is a client that implements the -// GetLinkAssociations operation. -type GetLinkAssociationsAPIClient interface { - GetLinkAssociations(context.Context, *GetLinkAssociationsInput, ...func(*Options)) (*GetLinkAssociationsOutput, error) -} - -var _ GetLinkAssociationsAPIClient = (*Client)(nil) - // GetLinkAssociationsPaginatorOptions is the paginator options for // GetLinkAssociations type GetLinkAssociationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetLinkAssociationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetLinkAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetLinkAssociationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetLinkAssociationsAPIClient is a client that implements the +// GetLinkAssociations operation. +type GetLinkAssociationsAPIClient interface { + GetLinkAssociations(context.Context, *GetLinkAssociationsInput, ...func(*Options)) (*GetLinkAssociationsOutput, error) +} + +var _ GetLinkAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLinkAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetLinks.go b/service/networkmanager/api_op_GetLinks.go index 635a92882f9..992fcf3a865 100644 --- a/service/networkmanager/api_op_GetLinks.go +++ b/service/networkmanager/api_op_GetLinks.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetLinksMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLinksValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationGetLinksMiddlewares(stack *middleware.Stack, option return nil } -// GetLinksAPIClient is a client that implements the GetLinks operation. -type GetLinksAPIClient interface { - GetLinks(context.Context, *GetLinksInput, ...func(*Options)) (*GetLinksOutput, error) -} - -var _ GetLinksAPIClient = (*Client)(nil) - // GetLinksPaginatorOptions is the paginator options for GetLinks type GetLinksPaginatorOptions struct { // The maximum number of results to return. @@ -224,6 +220,9 @@ func (p *GetLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *GetLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// GetLinksAPIClient is a client that implements the GetLinks operation. +type GetLinksAPIClient interface { + GetLinks(context.Context, *GetLinksInput, ...func(*Options)) (*GetLinksOutput, error) +} + +var _ GetLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetNetworkResourceCounts.go b/service/networkmanager/api_op_GetNetworkResourceCounts.go index 92f1a84cb4e..9d154a6ec97 100644 --- a/service/networkmanager/api_op_GetNetworkResourceCounts.go +++ b/service/networkmanager/api_op_GetNetworkResourceCounts.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetNetworkResourceCountsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkResourceCountsValidationMiddleware(stack); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationGetNetworkResourceCountsMiddlewares(stack *middlewa return nil } -// GetNetworkResourceCountsAPIClient is a client that implements the -// GetNetworkResourceCounts operation. -type GetNetworkResourceCountsAPIClient interface { - GetNetworkResourceCounts(context.Context, *GetNetworkResourceCountsInput, ...func(*Options)) (*GetNetworkResourceCountsOutput, error) -} - -var _ GetNetworkResourceCountsAPIClient = (*Client)(nil) - // GetNetworkResourceCountsPaginatorOptions is the paginator options for // GetNetworkResourceCounts type GetNetworkResourceCountsPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *GetNetworkResourceCountsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetNetworkResourceCounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *GetNetworkResourceCountsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetNetworkResourceCountsAPIClient is a client that implements the +// GetNetworkResourceCounts operation. +type GetNetworkResourceCountsAPIClient interface { + GetNetworkResourceCounts(context.Context, *GetNetworkResourceCountsInput, ...func(*Options)) (*GetNetworkResourceCountsOutput, error) +} + +var _ GetNetworkResourceCountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetNetworkResourceCounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetNetworkResourceRelationships.go b/service/networkmanager/api_op_GetNetworkResourceRelationships.go index c0e3ada0bed..5ce85d9c4a8 100644 --- a/service/networkmanager/api_op_GetNetworkResourceRelationships.go +++ b/service/networkmanager/api_op_GetNetworkResourceRelationships.go @@ -173,6 +173,9 @@ func (c *Client) addOperationGetNetworkResourceRelationshipsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkResourceRelationshipsValidationMiddleware(stack); err != nil { return err } @@ -197,14 +200,6 @@ func (c *Client) addOperationGetNetworkResourceRelationshipsMiddlewares(stack *m return nil } -// GetNetworkResourceRelationshipsAPIClient is a client that implements the -// GetNetworkResourceRelationships operation. -type GetNetworkResourceRelationshipsAPIClient interface { - GetNetworkResourceRelationships(context.Context, *GetNetworkResourceRelationshipsInput, ...func(*Options)) (*GetNetworkResourceRelationshipsOutput, error) -} - -var _ GetNetworkResourceRelationshipsAPIClient = (*Client)(nil) - // GetNetworkResourceRelationshipsPaginatorOptions is the paginator options for // GetNetworkResourceRelationships type GetNetworkResourceRelationshipsPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *GetNetworkResourceRelationshipsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetNetworkResourceRelationships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *GetNetworkResourceRelationshipsPaginator) NextPage(ctx context.Context, return result, nil } +// GetNetworkResourceRelationshipsAPIClient is a client that implements the +// GetNetworkResourceRelationships operation. +type GetNetworkResourceRelationshipsAPIClient interface { + GetNetworkResourceRelationships(context.Context, *GetNetworkResourceRelationshipsInput, ...func(*Options)) (*GetNetworkResourceRelationshipsOutput, error) +} + +var _ GetNetworkResourceRelationshipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetNetworkResourceRelationships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetNetworkResources.go b/service/networkmanager/api_op_GetNetworkResources.go index 3f0a4cb019f..326e731fd2b 100644 --- a/service/networkmanager/api_op_GetNetworkResources.go +++ b/service/networkmanager/api_op_GetNetworkResources.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetNetworkResourcesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkResourcesValidationMiddleware(stack); err != nil { return err } @@ -200,14 +203,6 @@ func (c *Client) addOperationGetNetworkResourcesMiddlewares(stack *middleware.St return nil } -// GetNetworkResourcesAPIClient is a client that implements the -// GetNetworkResources operation. -type GetNetworkResourcesAPIClient interface { - GetNetworkResources(context.Context, *GetNetworkResourcesInput, ...func(*Options)) (*GetNetworkResourcesOutput, error) -} - -var _ GetNetworkResourcesAPIClient = (*Client)(nil) - // GetNetworkResourcesPaginatorOptions is the paginator options for // GetNetworkResources type GetNetworkResourcesPaginatorOptions struct { @@ -272,6 +267,9 @@ func (p *GetNetworkResourcesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetNetworkResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -291,6 +289,14 @@ func (p *GetNetworkResourcesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetNetworkResourcesAPIClient is a client that implements the +// GetNetworkResources operation. +type GetNetworkResourcesAPIClient interface { + GetNetworkResources(context.Context, *GetNetworkResourcesInput, ...func(*Options)) (*GetNetworkResourcesOutput, error) +} + +var _ GetNetworkResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetNetworkResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetNetworkRoutes.go b/service/networkmanager/api_op_GetNetworkRoutes.go index 7aa5b10ce7a..323af4386ba 100644 --- a/service/networkmanager/api_op_GetNetworkRoutes.go +++ b/service/networkmanager/api_op_GetNetworkRoutes.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetNetworkRoutesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkRoutesValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetNetworkTelemetry.go b/service/networkmanager/api_op_GetNetworkTelemetry.go index 31c57d4aa83..5bbdce65528 100644 --- a/service/networkmanager/api_op_GetNetworkTelemetry.go +++ b/service/networkmanager/api_op_GetNetworkTelemetry.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetNetworkTelemetryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkTelemetryValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationGetNetworkTelemetryMiddlewares(stack *middleware.St return nil } -// GetNetworkTelemetryAPIClient is a client that implements the -// GetNetworkTelemetry operation. -type GetNetworkTelemetryAPIClient interface { - GetNetworkTelemetry(context.Context, *GetNetworkTelemetryInput, ...func(*Options)) (*GetNetworkTelemetryOutput, error) -} - -var _ GetNetworkTelemetryAPIClient = (*Client)(nil) - // GetNetworkTelemetryPaginatorOptions is the paginator options for // GetNetworkTelemetry type GetNetworkTelemetryPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *GetNetworkTelemetryPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetNetworkTelemetry(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *GetNetworkTelemetryPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetNetworkTelemetryAPIClient is a client that implements the +// GetNetworkTelemetry operation. +type GetNetworkTelemetryAPIClient interface { + GetNetworkTelemetry(context.Context, *GetNetworkTelemetryInput, ...func(*Options)) (*GetNetworkTelemetryOutput, error) +} + +var _ GetNetworkTelemetryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetNetworkTelemetry(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetResourcePolicy.go b/service/networkmanager/api_op_GetResourcePolicy.go index 128a9bef1a7..939d2af77bd 100644 --- a/service/networkmanager/api_op_GetResourcePolicy.go +++ b/service/networkmanager/api_op_GetResourcePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetRouteAnalysis.go b/service/networkmanager/api_op_GetRouteAnalysis.go index ac4ada90330..17ea4863e03 100644 --- a/service/networkmanager/api_op_GetRouteAnalysis.go +++ b/service/networkmanager/api_op_GetRouteAnalysis.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetRouteAnalysisMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRouteAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go b/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go index 51a6aed1e03..ac767032982 100644 --- a/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go +++ b/service/networkmanager/api_op_GetSiteToSiteVpnAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetSiteToSiteVpnAttachmentMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSiteToSiteVpnAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetSites.go b/service/networkmanager/api_op_GetSites.go index 3def7f98191..ef1839cfd00 100644 --- a/service/networkmanager/api_op_GetSites.go +++ b/service/networkmanager/api_op_GetSites.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetSitesMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSitesValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationGetSitesMiddlewares(stack *middleware.Stack, option return nil } -// GetSitesAPIClient is a client that implements the GetSites operation. -type GetSitesAPIClient interface { - GetSites(context.Context, *GetSitesInput, ...func(*Options)) (*GetSitesOutput, error) -} - -var _ GetSitesAPIClient = (*Client)(nil) - // GetSitesPaginatorOptions is the paginator options for GetSites type GetSitesPaginatorOptions struct { // The maximum number of results to return. @@ -212,6 +208,9 @@ func (p *GetSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSites(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *GetSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// GetSitesAPIClient is a client that implements the GetSites operation. +type GetSitesAPIClient interface { + GetSites(context.Context, *GetSitesInput, ...func(*Options)) (*GetSitesOutput, error) +} + +var _ GetSitesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go b/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go index ae2f6e15bd2..2e1e641ef77 100644 --- a/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go +++ b/service/networkmanager/api_op_GetTransitGatewayConnectPeerAssociations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetTransitGatewayConnectPeerAssociationsMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayConnectPeerAssociationsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationGetTransitGatewayConnectPeerAssociationsMiddlewares return nil } -// GetTransitGatewayConnectPeerAssociationsAPIClient is a client that implements -// the GetTransitGatewayConnectPeerAssociations operation. -type GetTransitGatewayConnectPeerAssociationsAPIClient interface { - GetTransitGatewayConnectPeerAssociations(context.Context, *GetTransitGatewayConnectPeerAssociationsInput, ...func(*Options)) (*GetTransitGatewayConnectPeerAssociationsOutput, error) -} - -var _ GetTransitGatewayConnectPeerAssociationsAPIClient = (*Client)(nil) - // GetTransitGatewayConnectPeerAssociationsPaginatorOptions is the paginator // options for GetTransitGatewayConnectPeerAssociations type GetTransitGatewayConnectPeerAssociationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *GetTransitGatewayConnectPeerAssociationsPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayConnectPeerAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *GetTransitGatewayConnectPeerAssociationsPaginator) NextPage(ctx context return result, nil } +// GetTransitGatewayConnectPeerAssociationsAPIClient is a client that implements +// the GetTransitGatewayConnectPeerAssociations operation. +type GetTransitGatewayConnectPeerAssociationsAPIClient interface { + GetTransitGatewayConnectPeerAssociations(context.Context, *GetTransitGatewayConnectPeerAssociationsInput, ...func(*Options)) (*GetTransitGatewayConnectPeerAssociationsOutput, error) +} + +var _ GetTransitGatewayConnectPeerAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayConnectPeerAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetTransitGatewayPeering.go b/service/networkmanager/api_op_GetTransitGatewayPeering.go index 61dc3a2213c..510a2c3c446 100644 --- a/service/networkmanager/api_op_GetTransitGatewayPeering.go +++ b/service/networkmanager/api_op_GetTransitGatewayPeering.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetTransitGatewayPeeringMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayPeeringValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetTransitGatewayRegistrations.go b/service/networkmanager/api_op_GetTransitGatewayRegistrations.go index 8ddd04b353c..ee56d3b992a 100644 --- a/service/networkmanager/api_op_GetTransitGatewayRegistrations.go +++ b/service/networkmanager/api_op_GetTransitGatewayRegistrations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetTransitGatewayRegistrationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayRegistrationsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationGetTransitGatewayRegistrationsMiddlewares(stack *mi return nil } -// GetTransitGatewayRegistrationsAPIClient is a client that implements the -// GetTransitGatewayRegistrations operation. -type GetTransitGatewayRegistrationsAPIClient interface { - GetTransitGatewayRegistrations(context.Context, *GetTransitGatewayRegistrationsInput, ...func(*Options)) (*GetTransitGatewayRegistrationsOutput, error) -} - -var _ GetTransitGatewayRegistrationsAPIClient = (*Client)(nil) - // GetTransitGatewayRegistrationsPaginatorOptions is the paginator options for // GetTransitGatewayRegistrations type GetTransitGatewayRegistrationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetTransitGatewayRegistrationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTransitGatewayRegistrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetTransitGatewayRegistrationsPaginator) NextPage(ctx context.Context, return result, nil } +// GetTransitGatewayRegistrationsAPIClient is a client that implements the +// GetTransitGatewayRegistrations operation. +type GetTransitGatewayRegistrationsAPIClient interface { + GetTransitGatewayRegistrations(context.Context, *GetTransitGatewayRegistrationsInput, ...func(*Options)) (*GetTransitGatewayRegistrationsOutput, error) +} + +var _ GetTransitGatewayRegistrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTransitGatewayRegistrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_GetTransitGatewayRouteTableAttachment.go b/service/networkmanager/api_op_GetTransitGatewayRouteTableAttachment.go index 3c00b45acdb..1f41824ea3c 100644 --- a/service/networkmanager/api_op_GetTransitGatewayRouteTableAttachment.go +++ b/service/networkmanager/api_op_GetTransitGatewayRouteTableAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetTransitGatewayRouteTableAttachmentMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTransitGatewayRouteTableAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_GetVpcAttachment.go b/service/networkmanager/api_op_GetVpcAttachment.go index 153a8f72281..cf69b46e5f0 100644 --- a/service/networkmanager/api_op_GetVpcAttachment.go +++ b/service/networkmanager/api_op_GetVpcAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetVpcAttachmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_ListAttachments.go b/service/networkmanager/api_op_ListAttachments.go index 45c9b7a529f..16af837d14e 100644 --- a/service/networkmanager/api_op_ListAttachments.go +++ b/service/networkmanager/api_op_ListAttachments.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAttachmentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttachments(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAttachmentsMiddlewares(stack *middleware.Stack, return nil } -// ListAttachmentsAPIClient is a client that implements the ListAttachments -// operation. -type ListAttachmentsAPIClient interface { - ListAttachments(context.Context, *ListAttachmentsInput, ...func(*Options)) (*ListAttachmentsOutput, error) -} - -var _ ListAttachmentsAPIClient = (*Client)(nil) - // ListAttachmentsPaginatorOptions is the paginator options for ListAttachments type ListAttachmentsPaginatorOptions struct { // The maximum number of results to return. @@ -214,6 +209,9 @@ func (p *ListAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListAttachmentsAPIClient is a client that implements the ListAttachments +// operation. +type ListAttachmentsAPIClient interface { + ListAttachments(context.Context, *ListAttachmentsInput, ...func(*Options)) (*ListAttachmentsOutput, error) +} + +var _ ListAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_ListConnectPeers.go b/service/networkmanager/api_op_ListConnectPeers.go index 57ae7f20017..d4654bdd735 100644 --- a/service/networkmanager/api_op_ListConnectPeers.go +++ b/service/networkmanager/api_op_ListConnectPeers.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListConnectPeersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectPeers(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListConnectPeersMiddlewares(stack *middleware.Stack return nil } -// ListConnectPeersAPIClient is a client that implements the ListConnectPeers -// operation. -type ListConnectPeersAPIClient interface { - ListConnectPeers(context.Context, *ListConnectPeersInput, ...func(*Options)) (*ListConnectPeersOutput, error) -} - -var _ ListConnectPeersAPIClient = (*Client)(nil) - // ListConnectPeersPaginatorOptions is the paginator options for ListConnectPeers type ListConnectPeersPaginatorOptions struct { // The maximum number of results to return. @@ -208,6 +203,9 @@ func (p *ListConnectPeersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectPeers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListConnectPeersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListConnectPeersAPIClient is a client that implements the ListConnectPeers +// operation. +type ListConnectPeersAPIClient interface { + ListConnectPeers(context.Context, *ListConnectPeersInput, ...func(*Options)) (*ListConnectPeersOutput, error) +} + +var _ ListConnectPeersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectPeers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go b/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go index aa4d9f9cdaa..b21316baa4a 100644 --- a/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go +++ b/service/networkmanager/api_op_ListCoreNetworkPolicyVersions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListCoreNetworkPolicyVersionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCoreNetworkPolicyVersionsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListCoreNetworkPolicyVersionsMiddlewares(stack *mid return nil } -// ListCoreNetworkPolicyVersionsAPIClient is a client that implements the -// ListCoreNetworkPolicyVersions operation. -type ListCoreNetworkPolicyVersionsAPIClient interface { - ListCoreNetworkPolicyVersions(context.Context, *ListCoreNetworkPolicyVersionsInput, ...func(*Options)) (*ListCoreNetworkPolicyVersionsOutput, error) -} - -var _ ListCoreNetworkPolicyVersionsAPIClient = (*Client)(nil) - // ListCoreNetworkPolicyVersionsPaginatorOptions is the paginator options for // ListCoreNetworkPolicyVersions type ListCoreNetworkPolicyVersionsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListCoreNetworkPolicyVersionsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCoreNetworkPolicyVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListCoreNetworkPolicyVersionsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListCoreNetworkPolicyVersionsAPIClient is a client that implements the +// ListCoreNetworkPolicyVersions operation. +type ListCoreNetworkPolicyVersionsAPIClient interface { + ListCoreNetworkPolicyVersions(context.Context, *ListCoreNetworkPolicyVersionsInput, ...func(*Options)) (*ListCoreNetworkPolicyVersionsOutput, error) +} + +var _ ListCoreNetworkPolicyVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCoreNetworkPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_ListCoreNetworks.go b/service/networkmanager/api_op_ListCoreNetworks.go index 9b04bfe3c70..85373b71bb8 100644 --- a/service/networkmanager/api_op_ListCoreNetworks.go +++ b/service/networkmanager/api_op_ListCoreNetworks.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListCoreNetworksMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCoreNetworks(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListCoreNetworksMiddlewares(stack *middleware.Stack return nil } -// ListCoreNetworksAPIClient is a client that implements the ListCoreNetworks -// operation. -type ListCoreNetworksAPIClient interface { - ListCoreNetworks(context.Context, *ListCoreNetworksInput, ...func(*Options)) (*ListCoreNetworksOutput, error) -} - -var _ ListCoreNetworksAPIClient = (*Client)(nil) - // ListCoreNetworksPaginatorOptions is the paginator options for ListCoreNetworks type ListCoreNetworksPaginatorOptions struct { // The maximum number of results to return. @@ -202,6 +197,9 @@ func (p *ListCoreNetworksPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCoreNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListCoreNetworksPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCoreNetworksAPIClient is a client that implements the ListCoreNetworks +// operation. +type ListCoreNetworksAPIClient interface { + ListCoreNetworks(context.Context, *ListCoreNetworksInput, ...func(*Options)) (*ListCoreNetworksOutput, error) +} + +var _ ListCoreNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCoreNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_ListOrganizationServiceAccessStatus.go b/service/networkmanager/api_op_ListOrganizationServiceAccessStatus.go index 2ab9adb6841..498179eebe7 100644 --- a/service/networkmanager/api_op_ListOrganizationServiceAccessStatus.go +++ b/service/networkmanager/api_op_ListOrganizationServiceAccessStatus.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListOrganizationServiceAccessStatusMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationServiceAccessStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/networkmanager/api_op_ListPeerings.go b/service/networkmanager/api_op_ListPeerings.go index 2c215c6f93e..f3ea427db1a 100644 --- a/service/networkmanager/api_op_ListPeerings.go +++ b/service/networkmanager/api_op_ListPeerings.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPeeringsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPeerings(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListPeeringsMiddlewares(stack *middleware.Stack, op return nil } -// ListPeeringsAPIClient is a client that implements the ListPeerings operation. -type ListPeeringsAPIClient interface { - ListPeerings(context.Context, *ListPeeringsInput, ...func(*Options)) (*ListPeeringsOutput, error) -} - -var _ ListPeeringsAPIClient = (*Client)(nil) - // ListPeeringsPaginatorOptions is the paginator options for ListPeerings type ListPeeringsPaginatorOptions struct { // The maximum number of results to return. @@ -213,6 +209,9 @@ func (p *ListPeeringsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPeerings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListPeeringsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPeeringsAPIClient is a client that implements the ListPeerings operation. +type ListPeeringsAPIClient interface { + ListPeerings(context.Context, *ListPeeringsInput, ...func(*Options)) (*ListPeeringsOutput, error) +} + +var _ ListPeeringsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPeerings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmanager/api_op_ListTagsForResource.go b/service/networkmanager/api_op_ListTagsForResource.go index 03d9f1e4a42..3d57feeb0f7 100644 --- a/service/networkmanager/api_op_ListTagsForResource.go +++ b/service/networkmanager/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_PutCoreNetworkPolicy.go b/service/networkmanager/api_op_PutCoreNetworkPolicy.go index 4cd402385ef..92162abd49a 100644 --- a/service/networkmanager/api_op_PutCoreNetworkPolicy.go +++ b/service/networkmanager/api_op_PutCoreNetworkPolicy.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutCoreNetworkPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutCoreNetworkPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmanager/api_op_PutResourcePolicy.go b/service/networkmanager/api_op_PutResourcePolicy.go index 06a3da1aa4b..b7d594203b5 100644 --- a/service/networkmanager/api_op_PutResourcePolicy.go +++ b/service/networkmanager/api_op_PutResourcePolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_RegisterTransitGateway.go b/service/networkmanager/api_op_RegisterTransitGateway.go index ecd7fd15599..8841403a4e2 100644 --- a/service/networkmanager/api_op_RegisterTransitGateway.go +++ b/service/networkmanager/api_op_RegisterTransitGateway.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRegisterTransitGatewayMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTransitGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_RejectAttachment.go b/service/networkmanager/api_op_RejectAttachment.go index a58e4ec2fb8..03bf71498eb 100644 --- a/service/networkmanager/api_op_RejectAttachment.go +++ b/service/networkmanager/api_op_RejectAttachment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRejectAttachmentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go b/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go index bae7a333153..c5345e11f23 100644 --- a/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go +++ b/service/networkmanager/api_op_RestoreCoreNetworkPolicyVersion.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRestoreCoreNetworkPolicyVersionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreCoreNetworkPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go b/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go index 08da2f16295..63b44a473d6 100644 --- a/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go +++ b/service/networkmanager/api_op_StartOrganizationServiceAccessUpdate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartOrganizationServiceAccessUpdateMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartOrganizationServiceAccessUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_StartRouteAnalysis.go b/service/networkmanager/api_op_StartRouteAnalysis.go index e3ac5ab2cfb..63867f88bd1 100644 --- a/service/networkmanager/api_op_StartRouteAnalysis.go +++ b/service/networkmanager/api_op_StartRouteAnalysis.go @@ -126,6 +126,9 @@ func (c *Client) addOperationStartRouteAnalysisMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRouteAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_TagResource.go b/service/networkmanager/api_op_TagResource.go index b935b6da330..ceed8fcd121 100644 --- a/service/networkmanager/api_op_TagResource.go +++ b/service/networkmanager/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UntagResource.go b/service/networkmanager/api_op_UntagResource.go index 22c4fd3b140..ec3a08eb326 100644 --- a/service/networkmanager/api_op_UntagResource.go +++ b/service/networkmanager/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateConnection.go b/service/networkmanager/api_op_UpdateConnection.go index ec353a05cfa..a4d3a49bcff 100644 --- a/service/networkmanager/api_op_UpdateConnection.go +++ b/service/networkmanager/api_op_UpdateConnection.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateConnectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateCoreNetwork.go b/service/networkmanager/api_op_UpdateCoreNetwork.go index daf3f4724de..625f19a2b55 100644 --- a/service/networkmanager/api_op_UpdateCoreNetwork.go +++ b/service/networkmanager/api_op_UpdateCoreNetwork.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateCoreNetworkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCoreNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateDevice.go b/service/networkmanager/api_op_UpdateDevice.go index 9d1365200bb..2447cd63660 100644 --- a/service/networkmanager/api_op_UpdateDevice.go +++ b/service/networkmanager/api_op_UpdateDevice.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateGlobalNetwork.go b/service/networkmanager/api_op_UpdateGlobalNetwork.go index ef969867e46..f43c4c4a375 100644 --- a/service/networkmanager/api_op_UpdateGlobalNetwork.go +++ b/service/networkmanager/api_op_UpdateGlobalNetwork.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateGlobalNetworkMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGlobalNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateLink.go b/service/networkmanager/api_op_UpdateLink.go index e9514a69897..a3860a2c1c9 100644 --- a/service/networkmanager/api_op_UpdateLink.go +++ b/service/networkmanager/api_op_UpdateLink.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateNetworkResourceMetadata.go b/service/networkmanager/api_op_UpdateNetworkResourceMetadata.go index 4892205f605..dcad1de5018 100644 --- a/service/networkmanager/api_op_UpdateNetworkResourceMetadata.go +++ b/service/networkmanager/api_op_UpdateNetworkResourceMetadata.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateNetworkResourceMetadataMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNetworkResourceMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateSite.go b/service/networkmanager/api_op_UpdateSite.go index 19813d35b3d..86a9c60752c 100644 --- a/service/networkmanager/api_op_UpdateSite.go +++ b/service/networkmanager/api_op_UpdateSite.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateSiteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmanager/api_op_UpdateVpcAttachment.go b/service/networkmanager/api_op_UpdateVpcAttachment.go index c962e7e3436..5ce7f4e79c7 100644 --- a/service/networkmanager/api_op_UpdateVpcAttachment.go +++ b/service/networkmanager/api_op_UpdateVpcAttachment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateVpcAttachmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVpcAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_client.go b/service/networkmonitor/api_client.go index d3732df9659..aff9b8e8981 100644 --- a/service/networkmonitor/api_client.go +++ b/service/networkmonitor/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/networkmonitor/api_op_CreateMonitor.go b/service/networkmonitor/api_op_CreateMonitor.go index 65dc7faa160..eb309e5aad7 100644 --- a/service/networkmonitor/api_op_CreateMonitor.go +++ b/service/networkmonitor/api_op_CreateMonitor.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMonitorMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmonitor/api_op_CreateProbe.go b/service/networkmonitor/api_op_CreateProbe.go index 22215a979fc..01af65b68f7 100644 --- a/service/networkmonitor/api_op_CreateProbe.go +++ b/service/networkmonitor/api_op_CreateProbe.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateProbeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProbeMiddleware(stack, options); err != nil { return err } diff --git a/service/networkmonitor/api_op_DeleteMonitor.go b/service/networkmonitor/api_op_DeleteMonitor.go index cfe888e48be..a9f13ca9584 100644 --- a/service/networkmonitor/api_op_DeleteMonitor.go +++ b/service/networkmonitor/api_op_DeleteMonitor.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_DeleteProbe.go b/service/networkmonitor/api_op_DeleteProbe.go index 412b865f9bb..4e875e38ed4 100644 --- a/service/networkmonitor/api_op_DeleteProbe.go +++ b/service/networkmonitor/api_op_DeleteProbe.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteProbeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProbeValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_GetMonitor.go b/service/networkmonitor/api_op_GetMonitor.go index 91a30373ae8..53b4bf8693e 100644 --- a/service/networkmonitor/api_op_GetMonitor.go +++ b/service/networkmonitor/api_op_GetMonitor.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetMonitorMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_GetProbe.go b/service/networkmonitor/api_op_GetProbe.go index d356731fd09..cdceca18acf 100644 --- a/service/networkmonitor/api_op_GetProbe.go +++ b/service/networkmonitor/api_op_GetProbe.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetProbeMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProbeValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_ListMonitors.go b/service/networkmonitor/api_op_ListMonitors.go index 2d1b8a15770..babcce43267 100644 --- a/service/networkmonitor/api_op_ListMonitors.go +++ b/service/networkmonitor/api_op_ListMonitors.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMonitors(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListMonitorsMiddlewares(stack *middleware.Stack, op return nil } -// ListMonitorsAPIClient is a client that implements the ListMonitors operation. -type ListMonitorsAPIClient interface { - ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) -} - -var _ ListMonitorsAPIClient = (*Client)(nil) - // ListMonitorsPaginatorOptions is the paginator options for ListMonitors type ListMonitorsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -212,6 +208,9 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListMonitorsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListMonitorsAPIClient is a client that implements the ListMonitors operation. +type ListMonitorsAPIClient interface { + ListMonitors(context.Context, *ListMonitorsInput, ...func(*Options)) (*ListMonitorsOutput, error) +} + +var _ ListMonitorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/networkmonitor/api_op_ListTagsForResource.go b/service/networkmonitor/api_op_ListTagsForResource.go index 806951fc05b..003fdde6624 100644 --- a/service/networkmonitor/api_op_ListTagsForResource.go +++ b/service/networkmonitor/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_TagResource.go b/service/networkmonitor/api_op_TagResource.go index 29192df71d1..1d17c1938ed 100644 --- a/service/networkmonitor/api_op_TagResource.go +++ b/service/networkmonitor/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_UntagResource.go b/service/networkmonitor/api_op_UntagResource.go index 57cf27a3f7e..7bcb4ea6ac3 100644 --- a/service/networkmonitor/api_op_UntagResource.go +++ b/service/networkmonitor/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_UpdateMonitor.go b/service/networkmonitor/api_op_UpdateMonitor.go index ca7c62e0141..d372bc178a6 100644 --- a/service/networkmonitor/api_op_UpdateMonitor.go +++ b/service/networkmonitor/api_op_UpdateMonitor.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/networkmonitor/api_op_UpdateProbe.go b/service/networkmonitor/api_op_UpdateProbe.go index 213eab48d37..7479f7af7df 100644 --- a/service/networkmonitor/api_op_UpdateProbe.go +++ b/service/networkmonitor/api_op_UpdateProbe.go @@ -192,6 +192,9 @@ func (c *Client) addOperationUpdateProbeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProbeValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_client.go b/service/nimble/api_client.go index 595b007bcbb..216f11576e6 100644 --- a/service/nimble/api_client.go +++ b/service/nimble/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/nimble/api_op_AcceptEulas.go b/service/nimble/api_op_AcceptEulas.go index 179471c06c5..3b607c070a7 100644 --- a/service/nimble/api_op_AcceptEulas.go +++ b/service/nimble/api_op_AcceptEulas.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAcceptEulasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAcceptEulasMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_CreateLaunchProfile.go b/service/nimble/api_op_CreateLaunchProfile.go index 312aa9f0d1d..f4dc4fd1b45 100644 --- a/service/nimble/api_op_CreateLaunchProfile.go +++ b/service/nimble/api_op_CreateLaunchProfile.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateLaunchProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLaunchProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_CreateStreamingImage.go b/service/nimble/api_op_CreateStreamingImage.go index 2c7bf57d047..a6f1528f357 100644 --- a/service/nimble/api_op_CreateStreamingImage.go +++ b/service/nimble/api_op_CreateStreamingImage.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateStreamingImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStreamingImageMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_CreateStreamingSession.go b/service/nimble/api_op_CreateStreamingSession.go index 4e233ebcf49..145e73d86bf 100644 --- a/service/nimble/api_op_CreateStreamingSession.go +++ b/service/nimble/api_op_CreateStreamingSession.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateStreamingSessionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStreamingSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_CreateStreamingSessionStream.go b/service/nimble/api_op_CreateStreamingSessionStream.go index 716f1be677c..f2055f5b512 100644 --- a/service/nimble/api_op_CreateStreamingSessionStream.go +++ b/service/nimble/api_op_CreateStreamingSessionStream.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateStreamingSessionStreamMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStreamingSessionStreamMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_CreateStudio.go b/service/nimble/api_op_CreateStudio.go index 2b617a8ad4e..274b5939c77 100644 --- a/service/nimble/api_op_CreateStudio.go +++ b/service/nimble/api_op_CreateStudio.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateStudioMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStudioMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_CreateStudioComponent.go b/service/nimble/api_op_CreateStudioComponent.go index ae3f053ab87..202ca994caf 100644 --- a/service/nimble/api_op_CreateStudioComponent.go +++ b/service/nimble/api_op_CreateStudioComponent.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateStudioComponentMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateStudioComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteLaunchProfile.go b/service/nimble/api_op_DeleteLaunchProfile.go index 230f5a1dfe1..aef7463aed1 100644 --- a/service/nimble/api_op_DeleteLaunchProfile.go +++ b/service/nimble/api_op_DeleteLaunchProfile.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteLaunchProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteLaunchProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteLaunchProfileMember.go b/service/nimble/api_op_DeleteLaunchProfileMember.go index e791d422e86..853222b5214 100644 --- a/service/nimble/api_op_DeleteLaunchProfileMember.go +++ b/service/nimble/api_op_DeleteLaunchProfileMember.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteLaunchProfileMemberMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteLaunchProfileMemberMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteStreamingImage.go b/service/nimble/api_op_DeleteStreamingImage.go index 41f99f7577f..68457c3d19a 100644 --- a/service/nimble/api_op_DeleteStreamingImage.go +++ b/service/nimble/api_op_DeleteStreamingImage.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteStreamingImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStreamingImageMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteStreamingSession.go b/service/nimble/api_op_DeleteStreamingSession.go index 86355acdb5d..d77f525665a 100644 --- a/service/nimble/api_op_DeleteStreamingSession.go +++ b/service/nimble/api_op_DeleteStreamingSession.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteStreamingSessionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStreamingSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteStudio.go b/service/nimble/api_op_DeleteStudio.go index c79875a4504..baa15d0221c 100644 --- a/service/nimble/api_op_DeleteStudio.go +++ b/service/nimble/api_op_DeleteStudio.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteStudioMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStudioMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteStudioComponent.go b/service/nimble/api_op_DeleteStudioComponent.go index c0f30d45d77..0f79234c7da 100644 --- a/service/nimble/api_op_DeleteStudioComponent.go +++ b/service/nimble/api_op_DeleteStudioComponent.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteStudioComponentMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStudioComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_DeleteStudioMember.go b/service/nimble/api_op_DeleteStudioMember.go index bfcc352f420..9e622958608 100644 --- a/service/nimble/api_op_DeleteStudioMember.go +++ b/service/nimble/api_op_DeleteStudioMember.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteStudioMemberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteStudioMemberMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_GetEula.go b/service/nimble/api_op_GetEula.go index 46237c9eb38..ca50bbae113 100644 --- a/service/nimble/api_op_GetEula.go +++ b/service/nimble/api_op_GetEula.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetEulaMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEulaValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_GetLaunchProfile.go b/service/nimble/api_op_GetLaunchProfile.go index 038eeb0e062..4d7371cc6ec 100644 --- a/service/nimble/api_op_GetLaunchProfile.go +++ b/service/nimble/api_op_GetLaunchProfile.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetLaunchProfileMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchProfileValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetLaunchProfileMiddlewares(stack *middleware.Stack return nil } -// GetLaunchProfileAPIClient is a client that implements the GetLaunchProfile -// operation. -type GetLaunchProfileAPIClient interface { - GetLaunchProfile(context.Context, *GetLaunchProfileInput, ...func(*Options)) (*GetLaunchProfileOutput, error) -} - -var _ GetLaunchProfileAPIClient = (*Client)(nil) - // LaunchProfileReadyWaiterOptions are waiter options for LaunchProfileReadyWaiter type LaunchProfileReadyWaiterOptions struct { @@ -262,7 +257,13 @@ func (w *LaunchProfileReadyWaiter) WaitForOutput(ctx context.Context, params *Ge } out, err := w.client.GetLaunchProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -471,7 +472,13 @@ func (w *LaunchProfileDeletedWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetLaunchProfile(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -546,6 +553,14 @@ func launchProfileDeletedStateRetryable(ctx context.Context, input *GetLaunchPro return true, nil } +// GetLaunchProfileAPIClient is a client that implements the GetLaunchProfile +// operation. +type GetLaunchProfileAPIClient interface { + GetLaunchProfile(context.Context, *GetLaunchProfileInput, ...func(*Options)) (*GetLaunchProfileOutput, error) +} + +var _ GetLaunchProfileAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLaunchProfile(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_GetLaunchProfileDetails.go b/service/nimble/api_op_GetLaunchProfileDetails.go index 64c84e63cb9..9fa379a3495 100644 --- a/service/nimble/api_op_GetLaunchProfileDetails.go +++ b/service/nimble/api_op_GetLaunchProfileDetails.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetLaunchProfileDetailsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchProfileDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_GetLaunchProfileInitialization.go b/service/nimble/api_op_GetLaunchProfileInitialization.go index 1b4fcd93738..eff114e3350 100644 --- a/service/nimble/api_op_GetLaunchProfileInitialization.go +++ b/service/nimble/api_op_GetLaunchProfileInitialization.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetLaunchProfileInitializationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchProfileInitializationValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_GetLaunchProfileMember.go b/service/nimble/api_op_GetLaunchProfileMember.go index faf6627f153..f18136ebdd5 100644 --- a/service/nimble/api_op_GetLaunchProfileMember.go +++ b/service/nimble/api_op_GetLaunchProfileMember.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetLaunchProfileMemberMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLaunchProfileMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_GetStreamingImage.go b/service/nimble/api_op_GetStreamingImage.go index 38c359ec7a2..cac13635edb 100644 --- a/service/nimble/api_op_GetStreamingImage.go +++ b/service/nimble/api_op_GetStreamingImage.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetStreamingImageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamingImageValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetStreamingImageMiddlewares(stack *middleware.Stac return nil } -// GetStreamingImageAPIClient is a client that implements the GetStreamingImage -// operation. -type GetStreamingImageAPIClient interface { - GetStreamingImage(context.Context, *GetStreamingImageInput, ...func(*Options)) (*GetStreamingImageOutput, error) -} - -var _ GetStreamingImageAPIClient = (*Client)(nil) - // StreamingImageReadyWaiterOptions are waiter options for // StreamingImageReadyWaiter type StreamingImageReadyWaiterOptions struct { @@ -264,7 +259,13 @@ func (w *StreamingImageReadyWaiter) WaitForOutput(ctx context.Context, params *G } out, err := w.client.GetStreamingImage(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -473,7 +474,13 @@ func (w *StreamingImageDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetStreamingImage(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -548,6 +555,14 @@ func streamingImageDeletedStateRetryable(ctx context.Context, input *GetStreamin return true, nil } +// GetStreamingImageAPIClient is a client that implements the GetStreamingImage +// operation. +type GetStreamingImageAPIClient interface { + GetStreamingImage(context.Context, *GetStreamingImageInput, ...func(*Options)) (*GetStreamingImageOutput, error) +} + +var _ GetStreamingImageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStreamingImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_GetStreamingSession.go b/service/nimble/api_op_GetStreamingSession.go index 0d8eed46160..f59845ad9da 100644 --- a/service/nimble/api_op_GetStreamingSession.go +++ b/service/nimble/api_op_GetStreamingSession.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetStreamingSessionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamingSessionValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetStreamingSessionMiddlewares(stack *middleware.St return nil } -// GetStreamingSessionAPIClient is a client that implements the -// GetStreamingSession operation. -type GetStreamingSessionAPIClient interface { - GetStreamingSession(context.Context, *GetStreamingSessionInput, ...func(*Options)) (*GetStreamingSessionOutput, error) -} - -var _ GetStreamingSessionAPIClient = (*Client)(nil) - // StreamingSessionReadyWaiterOptions are waiter options for // StreamingSessionReadyWaiter type StreamingSessionReadyWaiterOptions struct { @@ -267,7 +262,13 @@ func (w *StreamingSessionReadyWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetStreamingSession(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -476,7 +477,13 @@ func (w *StreamingSessionStoppedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.GetStreamingSession(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -668,7 +675,13 @@ func (w *StreamingSessionDeletedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.GetStreamingSession(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -743,6 +756,14 @@ func streamingSessionDeletedStateRetryable(ctx context.Context, input *GetStream return true, nil } +// GetStreamingSessionAPIClient is a client that implements the +// GetStreamingSession operation. +type GetStreamingSessionAPIClient interface { + GetStreamingSession(context.Context, *GetStreamingSessionInput, ...func(*Options)) (*GetStreamingSessionOutput, error) +} + +var _ GetStreamingSessionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStreamingSession(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_GetStreamingSessionBackup.go b/service/nimble/api_op_GetStreamingSessionBackup.go index 8d67be21b19..d25714f080b 100644 --- a/service/nimble/api_op_GetStreamingSessionBackup.go +++ b/service/nimble/api_op_GetStreamingSessionBackup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetStreamingSessionBackupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamingSessionBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_GetStreamingSessionStream.go b/service/nimble/api_op_GetStreamingSessionStream.go index 501ea253b51..157f9f2059b 100644 --- a/service/nimble/api_op_GetStreamingSessionStream.go +++ b/service/nimble/api_op_GetStreamingSessionStream.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetStreamingSessionStreamMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStreamingSessionStreamValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationGetStreamingSessionStreamMiddlewares(stack *middlew return nil } -// GetStreamingSessionStreamAPIClient is a client that implements the -// GetStreamingSessionStream operation. -type GetStreamingSessionStreamAPIClient interface { - GetStreamingSessionStream(context.Context, *GetStreamingSessionStreamInput, ...func(*Options)) (*GetStreamingSessionStreamOutput, error) -} - -var _ GetStreamingSessionStreamAPIClient = (*Client)(nil) - // StreamingSessionStreamReadyWaiterOptions are waiter options for // StreamingSessionStreamReadyWaiter type StreamingSessionStreamReadyWaiterOptions struct { @@ -277,7 +272,13 @@ func (w *StreamingSessionStreamReadyWaiter) WaitForOutput(ctx context.Context, p } out, err := w.client.GetStreamingSessionStream(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -352,6 +353,14 @@ func streamingSessionStreamReadyStateRetryable(ctx context.Context, input *GetSt return true, nil } +// GetStreamingSessionStreamAPIClient is a client that implements the +// GetStreamingSessionStream operation. +type GetStreamingSessionStreamAPIClient interface { + GetStreamingSessionStream(context.Context, *GetStreamingSessionStreamInput, ...func(*Options)) (*GetStreamingSessionStreamOutput, error) +} + +var _ GetStreamingSessionStreamAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStreamingSessionStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_GetStudio.go b/service/nimble/api_op_GetStudio.go index 4f7f9db3433..7d939ad7b3a 100644 --- a/service/nimble/api_op_GetStudio.go +++ b/service/nimble/api_op_GetStudio.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetStudioMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStudioValidationMiddleware(stack); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationGetStudioMiddlewares(stack *middleware.Stack, optio return nil } -// GetStudioAPIClient is a client that implements the GetStudio operation. -type GetStudioAPIClient interface { - GetStudio(context.Context, *GetStudioInput, ...func(*Options)) (*GetStudioOutput, error) -} - -var _ GetStudioAPIClient = (*Client)(nil) - // StudioReadyWaiterOptions are waiter options for StudioReadyWaiter type StudioReadyWaiterOptions struct { @@ -257,7 +253,13 @@ func (w *StudioReadyWaiter) WaitForOutput(ctx context.Context, params *GetStudio } out, err := w.client.GetStudio(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -464,7 +466,13 @@ func (w *StudioDeletedWaiter) WaitForOutput(ctx context.Context, params *GetStud } out, err := w.client.GetStudio(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -539,6 +547,13 @@ func studioDeletedStateRetryable(ctx context.Context, input *GetStudioInput, out return true, nil } +// GetStudioAPIClient is a client that implements the GetStudio operation. +type GetStudioAPIClient interface { + GetStudio(context.Context, *GetStudioInput, ...func(*Options)) (*GetStudioOutput, error) +} + +var _ GetStudioAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStudio(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_GetStudioComponent.go b/service/nimble/api_op_GetStudioComponent.go index 8bdfc243564..66284375353 100644 --- a/service/nimble/api_op_GetStudioComponent.go +++ b/service/nimble/api_op_GetStudioComponent.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetStudioComponentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStudioComponentValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetStudioComponentMiddlewares(stack *middleware.Sta return nil } -// GetStudioComponentAPIClient is a client that implements the GetStudioComponent -// operation. -type GetStudioComponentAPIClient interface { - GetStudioComponent(context.Context, *GetStudioComponentInput, ...func(*Options)) (*GetStudioComponentOutput, error) -} - -var _ GetStudioComponentAPIClient = (*Client)(nil) - // StudioComponentReadyWaiterOptions are waiter options for // StudioComponentReadyWaiter type StudioComponentReadyWaiterOptions struct { @@ -264,7 +259,13 @@ func (w *StudioComponentReadyWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.GetStudioComponent(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -473,7 +474,13 @@ func (w *StudioComponentDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetStudioComponent(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -548,6 +555,14 @@ func studioComponentDeletedStateRetryable(ctx context.Context, input *GetStudioC return true, nil } +// GetStudioComponentAPIClient is a client that implements the GetStudioComponent +// operation. +type GetStudioComponentAPIClient interface { + GetStudioComponent(context.Context, *GetStudioComponentInput, ...func(*Options)) (*GetStudioComponentOutput, error) +} + +var _ GetStudioComponentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStudioComponent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_GetStudioMember.go b/service/nimble/api_op_GetStudioMember.go index e26e77090f7..32641a05e89 100644 --- a/service/nimble/api_op_GetStudioMember.go +++ b/service/nimble/api_op_GetStudioMember.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetStudioMemberMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStudioMemberValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_ListEulaAcceptances.go b/service/nimble/api_op_ListEulaAcceptances.go index f8035ac151b..f194b1b6d99 100644 --- a/service/nimble/api_op_ListEulaAcceptances.go +++ b/service/nimble/api_op_ListEulaAcceptances.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEulaAcceptancesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEulaAcceptancesValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListEulaAcceptancesMiddlewares(stack *middleware.St return nil } -// ListEulaAcceptancesAPIClient is a client that implements the -// ListEulaAcceptances operation. -type ListEulaAcceptancesAPIClient interface { - ListEulaAcceptances(context.Context, *ListEulaAcceptancesInput, ...func(*Options)) (*ListEulaAcceptancesOutput, error) -} - -var _ ListEulaAcceptancesAPIClient = (*Client)(nil) - // ListEulaAcceptancesPaginatorOptions is the paginator options for // ListEulaAcceptances type ListEulaAcceptancesPaginatorOptions struct { @@ -199,6 +194,9 @@ func (p *ListEulaAcceptancesPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEulaAcceptances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +216,14 @@ func (p *ListEulaAcceptancesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEulaAcceptancesAPIClient is a client that implements the +// ListEulaAcceptances operation. +type ListEulaAcceptancesAPIClient interface { + ListEulaAcceptances(context.Context, *ListEulaAcceptancesInput, ...func(*Options)) (*ListEulaAcceptancesOutput, error) +} + +var _ ListEulaAcceptancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEulaAcceptances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListEulas.go b/service/nimble/api_op_ListEulas.go index cdaa7d1463f..bf99e8c410e 100644 --- a/service/nimble/api_op_ListEulas.go +++ b/service/nimble/api_op_ListEulas.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListEulasMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEulas(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListEulasMiddlewares(stack *middleware.Stack, optio return nil } -// ListEulasAPIClient is a client that implements the ListEulas operation. -type ListEulasAPIClient interface { - ListEulas(context.Context, *ListEulasInput, ...func(*Options)) (*ListEulasOutput, error) -} - -var _ ListEulasAPIClient = (*Client)(nil) - // ListEulasPaginatorOptions is the paginator options for ListEulas type ListEulasPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -189,6 +185,9 @@ func (p *ListEulasPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEulas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -208,6 +207,13 @@ func (p *ListEulasPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListEulasAPIClient is a client that implements the ListEulas operation. +type ListEulasAPIClient interface { + ListEulas(context.Context, *ListEulasInput, ...func(*Options)) (*ListEulasOutput, error) +} + +var _ ListEulasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEulas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListLaunchProfileMembers.go b/service/nimble/api_op_ListLaunchProfileMembers.go index bbfb3838bd9..9daa3ea49b0 100644 --- a/service/nimble/api_op_ListLaunchProfileMembers.go +++ b/service/nimble/api_op_ListLaunchProfileMembers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListLaunchProfileMembersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLaunchProfileMembersValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListLaunchProfileMembersMiddlewares(stack *middlewa return nil } -// ListLaunchProfileMembersAPIClient is a client that implements the -// ListLaunchProfileMembers operation. -type ListLaunchProfileMembersAPIClient interface { - ListLaunchProfileMembers(context.Context, *ListLaunchProfileMembersInput, ...func(*Options)) (*ListLaunchProfileMembersOutput, error) -} - -var _ ListLaunchProfileMembersAPIClient = (*Client)(nil) - // ListLaunchProfileMembersPaginatorOptions is the paginator options for // ListLaunchProfileMembers type ListLaunchProfileMembersPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListLaunchProfileMembersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLaunchProfileMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListLaunchProfileMembersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListLaunchProfileMembersAPIClient is a client that implements the +// ListLaunchProfileMembers operation. +type ListLaunchProfileMembersAPIClient interface { + ListLaunchProfileMembers(context.Context, *ListLaunchProfileMembersInput, ...func(*Options)) (*ListLaunchProfileMembersOutput, error) +} + +var _ ListLaunchProfileMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLaunchProfileMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListLaunchProfiles.go b/service/nimble/api_op_ListLaunchProfiles.go index aa7e154a69b..d00e51d7578 100644 --- a/service/nimble/api_op_ListLaunchProfiles.go +++ b/service/nimble/api_op_ListLaunchProfiles.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListLaunchProfilesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLaunchProfilesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListLaunchProfilesMiddlewares(stack *middleware.Sta return nil } -// ListLaunchProfilesAPIClient is a client that implements the ListLaunchProfiles -// operation. -type ListLaunchProfilesAPIClient interface { - ListLaunchProfiles(context.Context, *ListLaunchProfilesInput, ...func(*Options)) (*ListLaunchProfilesOutput, error) -} - -var _ ListLaunchProfilesAPIClient = (*Client)(nil) - // ListLaunchProfilesPaginatorOptions is the paginator options for // ListLaunchProfiles type ListLaunchProfilesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListLaunchProfilesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLaunchProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListLaunchProfilesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListLaunchProfilesAPIClient is a client that implements the ListLaunchProfiles +// operation. +type ListLaunchProfilesAPIClient interface { + ListLaunchProfiles(context.Context, *ListLaunchProfilesInput, ...func(*Options)) (*ListLaunchProfilesOutput, error) +} + +var _ ListLaunchProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLaunchProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListStreamingImages.go b/service/nimble/api_op_ListStreamingImages.go index 6ea08a20bcc..109519c23e1 100644 --- a/service/nimble/api_op_ListStreamingImages.go +++ b/service/nimble/api_op_ListStreamingImages.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListStreamingImagesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStreamingImagesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListStreamingImagesMiddlewares(stack *middleware.St return nil } -// ListStreamingImagesAPIClient is a client that implements the -// ListStreamingImages operation. -type ListStreamingImagesAPIClient interface { - ListStreamingImages(context.Context, *ListStreamingImagesInput, ...func(*Options)) (*ListStreamingImagesOutput, error) -} - -var _ ListStreamingImagesAPIClient = (*Client)(nil) - // ListStreamingImagesPaginatorOptions is the paginator options for // ListStreamingImages type ListStreamingImagesPaginatorOptions struct { @@ -202,6 +197,9 @@ func (p *ListStreamingImagesPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamingImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListStreamingImagesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListStreamingImagesAPIClient is a client that implements the +// ListStreamingImages operation. +type ListStreamingImagesAPIClient interface { + ListStreamingImages(context.Context, *ListStreamingImagesInput, ...func(*Options)) (*ListStreamingImagesOutput, error) +} + +var _ ListStreamingImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamingImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListStreamingSessionBackups.go b/service/nimble/api_op_ListStreamingSessionBackups.go index 712daf788e7..1ee96641783 100644 --- a/service/nimble/api_op_ListStreamingSessionBackups.go +++ b/service/nimble/api_op_ListStreamingSessionBackups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListStreamingSessionBackupsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStreamingSessionBackupsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListStreamingSessionBackupsMiddlewares(stack *middl return nil } -// ListStreamingSessionBackupsAPIClient is a client that implements the -// ListStreamingSessionBackups operation. -type ListStreamingSessionBackupsAPIClient interface { - ListStreamingSessionBackups(context.Context, *ListStreamingSessionBackupsInput, ...func(*Options)) (*ListStreamingSessionBackupsOutput, error) -} - -var _ ListStreamingSessionBackupsAPIClient = (*Client)(nil) - // ListStreamingSessionBackupsPaginatorOptions is the paginator options for // ListStreamingSessionBackups type ListStreamingSessionBackupsPaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *ListStreamingSessionBackupsPaginator) NextPage(ctx context.Context, opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamingSessionBackups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *ListStreamingSessionBackupsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListStreamingSessionBackupsAPIClient is a client that implements the +// ListStreamingSessionBackups operation. +type ListStreamingSessionBackupsAPIClient interface { + ListStreamingSessionBackups(context.Context, *ListStreamingSessionBackupsInput, ...func(*Options)) (*ListStreamingSessionBackupsOutput, error) +} + +var _ ListStreamingSessionBackupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamingSessionBackups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListStreamingSessions.go b/service/nimble/api_op_ListStreamingSessions.go index df8ba1fecf8..f39daa4f10c 100644 --- a/service/nimble/api_op_ListStreamingSessions.go +++ b/service/nimble/api_op_ListStreamingSessions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListStreamingSessionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStreamingSessionsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListStreamingSessionsMiddlewares(stack *middleware. return nil } -// ListStreamingSessionsAPIClient is a client that implements the -// ListStreamingSessions operation. -type ListStreamingSessionsAPIClient interface { - ListStreamingSessions(context.Context, *ListStreamingSessionsInput, ...func(*Options)) (*ListStreamingSessionsOutput, error) -} - -var _ ListStreamingSessionsAPIClient = (*Client)(nil) - // ListStreamingSessionsPaginatorOptions is the paginator options for // ListStreamingSessions type ListStreamingSessionsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListStreamingSessionsPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamingSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListStreamingSessionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListStreamingSessionsAPIClient is a client that implements the +// ListStreamingSessions operation. +type ListStreamingSessionsAPIClient interface { + ListStreamingSessions(context.Context, *ListStreamingSessionsInput, ...func(*Options)) (*ListStreamingSessionsOutput, error) +} + +var _ ListStreamingSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamingSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListStudioComponents.go b/service/nimble/api_op_ListStudioComponents.go index b3ada7125b0..a5c83c593a1 100644 --- a/service/nimble/api_op_ListStudioComponents.go +++ b/service/nimble/api_op_ListStudioComponents.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListStudioComponentsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStudioComponentsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListStudioComponentsMiddlewares(stack *middleware.S return nil } -// ListStudioComponentsAPIClient is a client that implements the -// ListStudioComponents operation. -type ListStudioComponentsAPIClient interface { - ListStudioComponents(context.Context, *ListStudioComponentsInput, ...func(*Options)) (*ListStudioComponentsOutput, error) -} - -var _ ListStudioComponentsAPIClient = (*Client)(nil) - // ListStudioComponentsPaginatorOptions is the paginator options for // ListStudioComponents type ListStudioComponentsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListStudioComponentsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStudioComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListStudioComponentsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListStudioComponentsAPIClient is a client that implements the +// ListStudioComponents operation. +type ListStudioComponentsAPIClient interface { + ListStudioComponents(context.Context, *ListStudioComponentsInput, ...func(*Options)) (*ListStudioComponentsOutput, error) +} + +var _ ListStudioComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStudioComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListStudioMembers.go b/service/nimble/api_op_ListStudioMembers.go index e3b33e6815c..54ade56553b 100644 --- a/service/nimble/api_op_ListStudioMembers.go +++ b/service/nimble/api_op_ListStudioMembers.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListStudioMembersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStudioMembersValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListStudioMembersMiddlewares(stack *middleware.Stac return nil } -// ListStudioMembersAPIClient is a client that implements the ListStudioMembers -// operation. -type ListStudioMembersAPIClient interface { - ListStudioMembers(context.Context, *ListStudioMembersInput, ...func(*Options)) (*ListStudioMembersOutput, error) -} - -var _ ListStudioMembersAPIClient = (*Client)(nil) - // ListStudioMembersPaginatorOptions is the paginator options for ListStudioMembers type ListStudioMembersPaginatorOptions struct { // The max number of results to return in the response. @@ -212,6 +207,9 @@ func (p *ListStudioMembersPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStudioMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListStudioMembersPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListStudioMembersAPIClient is a client that implements the ListStudioMembers +// operation. +type ListStudioMembersAPIClient interface { + ListStudioMembers(context.Context, *ListStudioMembersInput, ...func(*Options)) (*ListStudioMembersOutput, error) +} + +var _ ListStudioMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStudioMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListStudios.go b/service/nimble/api_op_ListStudios.go index 1ac5af1b4ef..ee91954c6ea 100644 --- a/service/nimble/api_op_ListStudios.go +++ b/service/nimble/api_op_ListStudios.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListStudiosMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudios(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListStudiosMiddlewares(stack *middleware.Stack, opt return nil } -// ListStudiosAPIClient is a client that implements the ListStudios operation. -type ListStudiosAPIClient interface { - ListStudios(context.Context, *ListStudiosInput, ...func(*Options)) (*ListStudiosOutput, error) -} - -var _ ListStudiosAPIClient = (*Client)(nil) - // ListStudiosPaginatorOptions is the paginator options for ListStudios type ListStudiosPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -189,6 +185,9 @@ func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStudios(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -208,6 +207,13 @@ func (p *ListStudiosPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListStudiosAPIClient is a client that implements the ListStudios operation. +type ListStudiosAPIClient interface { + ListStudios(context.Context, *ListStudiosInput, ...func(*Options)) (*ListStudiosOutput, error) +} + +var _ ListStudiosAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStudios(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/nimble/api_op_ListTagsForResource.go b/service/nimble/api_op_ListTagsForResource.go index 14aec038c72..6f2a92c73b8 100644 --- a/service/nimble/api_op_ListTagsForResource.go +++ b/service/nimble/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_PutLaunchProfileMembers.go b/service/nimble/api_op_PutLaunchProfileMembers.go index 07e8ca2e759..99418434b57 100644 --- a/service/nimble/api_op_PutLaunchProfileMembers.go +++ b/service/nimble/api_op_PutLaunchProfileMembers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutLaunchProfileMembersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutLaunchProfileMembersMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_PutStudioMembers.go b/service/nimble/api_op_PutStudioMembers.go index 3120c01c1d6..d3c704d1231 100644 --- a/service/nimble/api_op_PutStudioMembers.go +++ b/service/nimble/api_op_PutStudioMembers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutStudioMembersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutStudioMembersMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_StartStreamingSession.go b/service/nimble/api_op_StartStreamingSession.go index ebedee2aecd..0c3d14eb0f3 100644 --- a/service/nimble/api_op_StartStreamingSession.go +++ b/service/nimble/api_op_StartStreamingSession.go @@ -123,6 +123,9 @@ func (c *Client) addOperationStartStreamingSessionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartStreamingSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go index 313a4187fa3..1212a3974dc 100644 --- a/service/nimble/api_op_StartStudioSSOConfigurationRepair.go +++ b/service/nimble/api_op_StartStudioSSOConfigurationRepair.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStartStudioSSOConfigurationRepairMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartStudioSSOConfigurationRepairMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_StopStreamingSession.go b/service/nimble/api_op_StopStreamingSession.go index eca78c0aa88..fa2a79860e2 100644 --- a/service/nimble/api_op_StopStreamingSession.go +++ b/service/nimble/api_op_StopStreamingSession.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStopStreamingSessionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStopStreamingSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_TagResource.go b/service/nimble/api_op_TagResource.go index 638e9bdd9b6..400018f1fac 100644 --- a/service/nimble/api_op_TagResource.go +++ b/service/nimble/api_op_TagResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_UntagResource.go b/service/nimble/api_op_UntagResource.go index 4a294dde084..dd3ce729ee5 100644 --- a/service/nimble/api_op_UntagResource.go +++ b/service/nimble/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/nimble/api_op_UpdateLaunchProfile.go b/service/nimble/api_op_UpdateLaunchProfile.go index 5c6bf4d8a15..516a8e56076 100644 --- a/service/nimble/api_op_UpdateLaunchProfile.go +++ b/service/nimble/api_op_UpdateLaunchProfile.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateLaunchProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateLaunchProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_UpdateLaunchProfileMember.go b/service/nimble/api_op_UpdateLaunchProfileMember.go index 204151b6b13..8fc19d241ac 100644 --- a/service/nimble/api_op_UpdateLaunchProfileMember.go +++ b/service/nimble/api_op_UpdateLaunchProfileMember.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateLaunchProfileMemberMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateLaunchProfileMemberMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_UpdateStreamingImage.go b/service/nimble/api_op_UpdateStreamingImage.go index 1b96e28d7b0..02857651450 100644 --- a/service/nimble/api_op_UpdateStreamingImage.go +++ b/service/nimble/api_op_UpdateStreamingImage.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateStreamingImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateStreamingImageMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_UpdateStudio.go b/service/nimble/api_op_UpdateStudio.go index 84d9bbceb4d..7e17cbfd122 100644 --- a/service/nimble/api_op_UpdateStudio.go +++ b/service/nimble/api_op_UpdateStudio.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateStudioMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateStudioMiddleware(stack, options); err != nil { return err } diff --git a/service/nimble/api_op_UpdateStudioComponent.go b/service/nimble/api_op_UpdateStudioComponent.go index 8a88b8dbebb..fa8ed553ac9 100644 --- a/service/nimble/api_op_UpdateStudioComponent.go +++ b/service/nimble/api_op_UpdateStudioComponent.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateStudioComponentMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateStudioComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/oam/api_client.go b/service/oam/api_client.go index f466908de3e..ccef521cde2 100644 --- a/service/oam/api_client.go +++ b/service/oam/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/oam/api_op_CreateLink.go b/service/oam/api_op_CreateLink.go index a9644cef198..5a87529f26a 100644 --- a/service/oam/api_op_CreateLink.go +++ b/service/oam/api_op_CreateLink.go @@ -190,6 +190,9 @@ func (c *Client) addOperationCreateLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_CreateSink.go b/service/oam/api_op_CreateSink.go index 020d1a86b0e..33e062ab624 100644 --- a/service/oam/api_op_CreateSink.go +++ b/service/oam/api_op_CreateSink.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateSinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_DeleteLink.go b/service/oam/api_op_DeleteLink.go index c38a83cd2be..941d4de5d5c 100644 --- a/service/oam/api_op_DeleteLink.go +++ b/service/oam/api_op_DeleteLink.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_DeleteSink.go b/service/oam/api_op_DeleteSink.go index d9e786f8a93..805178d609d 100644 --- a/service/oam/api_op_DeleteSink.go +++ b/service/oam/api_op_DeleteSink.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteSinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_GetLink.go b/service/oam/api_op_GetLink.go index 0752d0e48d4..9b77003f4dc 100644 --- a/service/oam/api_op_GetLink.go +++ b/service/oam/api_op_GetLink.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetLinkMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_GetSink.go b/service/oam/api_op_GetSink.go index 73345a02a31..85de750a0af 100644 --- a/service/oam/api_op_GetSink.go +++ b/service/oam/api_op_GetSink.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSinkMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_GetSinkPolicy.go b/service/oam/api_op_GetSinkPolicy.go index b5167dd4ec0..4edc5716d3f 100644 --- a/service/oam/api_op_GetSinkPolicy.go +++ b/service/oam/api_op_GetSinkPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetSinkPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSinkPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_ListAttachedLinks.go b/service/oam/api_op_ListAttachedLinks.go index 8afc1a1a350..617959b80ae 100644 --- a/service/oam/api_op_ListAttachedLinks.go +++ b/service/oam/api_op_ListAttachedLinks.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListAttachedLinksMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttachedLinksValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListAttachedLinksMiddlewares(stack *middleware.Stac return nil } -// ListAttachedLinksAPIClient is a client that implements the ListAttachedLinks -// operation. -type ListAttachedLinksAPIClient interface { - ListAttachedLinks(context.Context, *ListAttachedLinksInput, ...func(*Options)) (*ListAttachedLinksOutput, error) -} - -var _ ListAttachedLinksAPIClient = (*Client)(nil) - // ListAttachedLinksPaginatorOptions is the paginator options for ListAttachedLinks type ListAttachedLinksPaginatorOptions struct { // Limits the number of returned links to the specified number. @@ -222,6 +217,9 @@ func (p *ListAttachedLinksPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttachedLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListAttachedLinksPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListAttachedLinksAPIClient is a client that implements the ListAttachedLinks +// operation. +type ListAttachedLinksAPIClient interface { + ListAttachedLinks(context.Context, *ListAttachedLinksInput, ...func(*Options)) (*ListAttachedLinksOutput, error) +} + +var _ ListAttachedLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttachedLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/oam/api_op_ListLinks.go b/service/oam/api_op_ListLinks.go index 21748d7e6d7..68bb50a3580 100644 --- a/service/oam/api_op_ListLinks.go +++ b/service/oam/api_op_ListLinks.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListLinksMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLinks(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListLinksMiddlewares(stack *middleware.Stack, optio return nil } -// ListLinksAPIClient is a client that implements the ListLinks operation. -type ListLinksAPIClient interface { - ListLinks(context.Context, *ListLinksInput, ...func(*Options)) (*ListLinksOutput, error) -} - -var _ ListLinksAPIClient = (*Client)(nil) - // ListLinksPaginatorOptions is the paginator options for ListLinks type ListLinksPaginatorOptions struct { // Limits the number of returned links to the specified number. @@ -210,6 +206,9 @@ func (p *ListLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListLinksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListLinksAPIClient is a client that implements the ListLinks operation. +type ListLinksAPIClient interface { + ListLinks(context.Context, *ListLinksInput, ...func(*Options)) (*ListLinksOutput, error) +} + +var _ ListLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/oam/api_op_ListSinks.go b/service/oam/api_op_ListSinks.go index 0ec4d030d8b..e76fe6bce9b 100644 --- a/service/oam/api_op_ListSinks.go +++ b/service/oam/api_op_ListSinks.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListSinksMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSinks(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListSinksMiddlewares(stack *middleware.Stack, optio return nil } -// ListSinksAPIClient is a client that implements the ListSinks operation. -type ListSinksAPIClient interface { - ListSinks(context.Context, *ListSinksInput, ...func(*Options)) (*ListSinksOutput, error) -} - -var _ ListSinksAPIClient = (*Client)(nil) - // ListSinksPaginatorOptions is the paginator options for ListSinks type ListSinksPaginatorOptions struct { // Limits the number of returned links to the specified number. @@ -205,6 +201,9 @@ func (p *ListSinksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListSinksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListSinksAPIClient is a client that implements the ListSinks operation. +type ListSinksAPIClient interface { + ListSinks(context.Context, *ListSinksInput, ...func(*Options)) (*ListSinksOutput, error) +} + +var _ ListSinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/oam/api_op_ListTagsForResource.go b/service/oam/api_op_ListTagsForResource.go index 2da8b626f9c..d1720df3995 100644 --- a/service/oam/api_op_ListTagsForResource.go +++ b/service/oam/api_op_ListTagsForResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_PutSinkPolicy.go b/service/oam/api_op_PutSinkPolicy.go index f3846f6f18a..b7bb6877533 100644 --- a/service/oam/api_op_PutSinkPolicy.go +++ b/service/oam/api_op_PutSinkPolicy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutSinkPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSinkPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_TagResource.go b/service/oam/api_op_TagResource.go index 6007218c6f9..e36dfb322ba 100644 --- a/service/oam/api_op_TagResource.go +++ b/service/oam/api_op_TagResource.go @@ -134,6 +134,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_UntagResource.go b/service/oam/api_op_UntagResource.go index f7ddaf75598..465e3ba5988 100644 --- a/service/oam/api_op_UntagResource.go +++ b/service/oam/api_op_UntagResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/oam/api_op_UpdateLink.go b/service/oam/api_op_UpdateLink.go index 82df4eaad65..216337f59b4 100644 --- a/service/oam/api_op_UpdateLink.go +++ b/service/oam/api_op_UpdateLink.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateLinkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLinkValidationMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_client.go b/service/omics/api_client.go index 8195ea42d06..e5a5018b924 100644 --- a/service/omics/api_client.go +++ b/service/omics/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/omics/api_op_AbortMultipartReadSetUpload.go b/service/omics/api_op_AbortMultipartReadSetUpload.go index c2d8d65f498..d25ed09c735 100644 --- a/service/omics/api_op_AbortMultipartReadSetUpload.go +++ b/service/omics/api_op_AbortMultipartReadSetUpload.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAbortMultipartReadSetUploadMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAbortMultipartReadSetUploadMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_AcceptShare.go b/service/omics/api_op_AcceptShare.go index 12fb903b415..4df367c5ae6 100644 --- a/service/omics/api_op_AcceptShare.go +++ b/service/omics/api_op_AcceptShare.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAcceptShareMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opAcceptShareMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_BatchDeleteReadSet.go b/service/omics/api_op_BatchDeleteReadSet.go index 0a215a5b912..6e1daa56cb5 100644 --- a/service/omics/api_op_BatchDeleteReadSet.go +++ b/service/omics/api_op_BatchDeleteReadSet.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchDeleteReadSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opBatchDeleteReadSetMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CancelAnnotationImportJob.go b/service/omics/api_op_CancelAnnotationImportJob.go index 3851ddedf4f..cdc7330dfd0 100644 --- a/service/omics/api_op_CancelAnnotationImportJob.go +++ b/service/omics/api_op_CancelAnnotationImportJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelAnnotationImportJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCancelAnnotationImportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CancelRun.go b/service/omics/api_op_CancelRun.go index 223d71e11b5..1548604c548 100644 --- a/service/omics/api_op_CancelRun.go +++ b/service/omics/api_op_CancelRun.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelRunMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCancelRunMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CancelVariantImportJob.go b/service/omics/api_op_CancelVariantImportJob.go index e80c4859298..c7e8964d0aa 100644 --- a/service/omics/api_op_CancelVariantImportJob.go +++ b/service/omics/api_op_CancelVariantImportJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelVariantImportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCancelVariantImportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CompleteMultipartReadSetUpload.go b/service/omics/api_op_CompleteMultipartReadSetUpload.go index 2e129ad40d9..218831f4a75 100644 --- a/service/omics/api_op_CompleteMultipartReadSetUpload.go +++ b/service/omics/api_op_CompleteMultipartReadSetUpload.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCompleteMultipartReadSetUploadMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCompleteMultipartReadSetUploadMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateAnnotationStore.go b/service/omics/api_op_CreateAnnotationStore.go index d9ddca842cd..2d1471285cd 100644 --- a/service/omics/api_op_CreateAnnotationStore.go +++ b/service/omics/api_op_CreateAnnotationStore.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateAnnotationStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAnnotationStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateAnnotationStoreVersion.go b/service/omics/api_op_CreateAnnotationStoreVersion.go index 991234ee1af..9e596022dc1 100644 --- a/service/omics/api_op_CreateAnnotationStoreVersion.go +++ b/service/omics/api_op_CreateAnnotationStoreVersion.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateAnnotationStoreVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAnnotationStoreVersionMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateMultipartReadSetUpload.go b/service/omics/api_op_CreateMultipartReadSetUpload.go index d0e2e843eec..d1f0850be19 100644 --- a/service/omics/api_op_CreateMultipartReadSetUpload.go +++ b/service/omics/api_op_CreateMultipartReadSetUpload.go @@ -188,6 +188,9 @@ func (c *Client) addOperationCreateMultipartReadSetUploadMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateMultipartReadSetUploadMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateReferenceStore.go b/service/omics/api_op_CreateReferenceStore.go index b9a9951bb69..dc9679790aa 100644 --- a/service/omics/api_op_CreateReferenceStore.go +++ b/service/omics/api_op_CreateReferenceStore.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateReferenceStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateReferenceStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateRunGroup.go b/service/omics/api_op_CreateRunGroup.go index d1bf9129040..37076bee732 100644 --- a/service/omics/api_op_CreateRunGroup.go +++ b/service/omics/api_op_CreateRunGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateRunGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateRunGroupMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateSequenceStore.go b/service/omics/api_op_CreateSequenceStore.go index cf1a133ee5e..08f07cdcdd8 100644 --- a/service/omics/api_op_CreateSequenceStore.go +++ b/service/omics/api_op_CreateSequenceStore.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateSequenceStoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateSequenceStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateShare.go b/service/omics/api_op_CreateShare.go index 4176be0718b..233f396b5a0 100644 --- a/service/omics/api_op_CreateShare.go +++ b/service/omics/api_op_CreateShare.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateShareMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateShareMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateVariantStore.go b/service/omics/api_op_CreateVariantStore.go index 784b9f7ac98..864812f9270 100644 --- a/service/omics/api_op_CreateVariantStore.go +++ b/service/omics/api_op_CreateVariantStore.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateVariantStoreMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateVariantStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_CreateWorkflow.go b/service/omics/api_op_CreateWorkflow.go index 51b14554867..31cd6b3c7d2 100644 --- a/service/omics/api_op_CreateWorkflow.go +++ b/service/omics/api_op_CreateWorkflow.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateWorkflowMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteAnnotationStore.go b/service/omics/api_op_DeleteAnnotationStore.go index a7811fac067..f8e84de3955 100644 --- a/service/omics/api_op_DeleteAnnotationStore.go +++ b/service/omics/api_op_DeleteAnnotationStore.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAnnotationStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAnnotationStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteAnnotationStoreVersions.go b/service/omics/api_op_DeleteAnnotationStoreVersions.go index 153923f9315..e41f1e68916 100644 --- a/service/omics/api_op_DeleteAnnotationStoreVersions.go +++ b/service/omics/api_op_DeleteAnnotationStoreVersions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteAnnotationStoreVersionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAnnotationStoreVersionsMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteReference.go b/service/omics/api_op_DeleteReference.go index 8324e7d3f45..5d7a28a8432 100644 --- a/service/omics/api_op_DeleteReference.go +++ b/service/omics/api_op_DeleteReference.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteReferenceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteReferenceMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteReferenceStore.go b/service/omics/api_op_DeleteReferenceStore.go index 46690859962..7ca6a371e81 100644 --- a/service/omics/api_op_DeleteReferenceStore.go +++ b/service/omics/api_op_DeleteReferenceStore.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteReferenceStoreMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteReferenceStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteRun.go b/service/omics/api_op_DeleteRun.go index 586511608cc..fbf0c49d4a6 100644 --- a/service/omics/api_op_DeleteRun.go +++ b/service/omics/api_op_DeleteRun.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRunMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteRunMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteRunGroup.go b/service/omics/api_op_DeleteRunGroup.go index 497d8b2294c..335bd1e79a8 100644 --- a/service/omics/api_op_DeleteRunGroup.go +++ b/service/omics/api_op_DeleteRunGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRunGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteRunGroupMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteSequenceStore.go b/service/omics/api_op_DeleteSequenceStore.go index b8272163fde..c542574a866 100644 --- a/service/omics/api_op_DeleteSequenceStore.go +++ b/service/omics/api_op_DeleteSequenceStore.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSequenceStoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteSequenceStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteShare.go b/service/omics/api_op_DeleteShare.go index 6367ab8eea3..820442f7c07 100644 --- a/service/omics/api_op_DeleteShare.go +++ b/service/omics/api_op_DeleteShare.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteShareMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteShareMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteVariantStore.go b/service/omics/api_op_DeleteVariantStore.go index 6d245d3674a..045657cf152 100644 --- a/service/omics/api_op_DeleteVariantStore.go +++ b/service/omics/api_op_DeleteVariantStore.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteVariantStoreMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteVariantStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_DeleteWorkflow.go b/service/omics/api_op_DeleteWorkflow.go index 8ab022475ff..198cff9dc01 100644 --- a/service/omics/api_op_DeleteWorkflow.go +++ b/service/omics/api_op_DeleteWorkflow.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteWorkflowMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetAnnotationImportJob.go b/service/omics/api_op_GetAnnotationImportJob.go index 3b85d981404..e07ddc816ba 100644 --- a/service/omics/api_op_GetAnnotationImportJob.go +++ b/service/omics/api_op_GetAnnotationImportJob.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetAnnotationImportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAnnotationImportJobMiddleware(stack); err != nil { return err } @@ -197,41 +200,6 @@ func (c *Client) addOperationGetAnnotationImportJobMiddlewares(stack *middleware return nil } -type endpointPrefix_opGetAnnotationImportJobMiddleware struct { -} - -func (*endpointPrefix_opGetAnnotationImportJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetAnnotationImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetAnnotationImportJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetAnnotationImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetAnnotationImportJobAPIClient is a client that implements the -// GetAnnotationImportJob operation. -type GetAnnotationImportJobAPIClient interface { - GetAnnotationImportJob(context.Context, *GetAnnotationImportJobInput, ...func(*Options)) (*GetAnnotationImportJobOutput, error) -} - -var _ GetAnnotationImportJobAPIClient = (*Client)(nil) - // AnnotationImportJobCreatedWaiterOptions are waiter options for // AnnotationImportJobCreatedWaiter type AnnotationImportJobCreatedWaiterOptions struct { @@ -351,7 +319,13 @@ func (w *AnnotationImportJobCreatedWaiter) WaitForOutput(ctx context.Context, pa } out, err := w.client.GetAnnotationImportJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -477,6 +451,41 @@ func annotationImportJobCreatedStateRetryable(ctx context.Context, input *GetAnn return true, nil } +type endpointPrefix_opGetAnnotationImportJobMiddleware struct { +} + +func (*endpointPrefix_opGetAnnotationImportJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetAnnotationImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetAnnotationImportJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetAnnotationImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetAnnotationImportJobAPIClient is a client that implements the +// GetAnnotationImportJob operation. +type GetAnnotationImportJobAPIClient interface { + GetAnnotationImportJob(context.Context, *GetAnnotationImportJobInput, ...func(*Options)) (*GetAnnotationImportJobOutput, error) +} + +var _ GetAnnotationImportJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAnnotationImportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetAnnotationStore.go b/service/omics/api_op_GetAnnotationStore.go index b20547e8752..73516ed047a 100644 --- a/service/omics/api_op_GetAnnotationStore.go +++ b/service/omics/api_op_GetAnnotationStore.go @@ -179,6 +179,9 @@ func (c *Client) addOperationGetAnnotationStoreMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAnnotationStoreMiddleware(stack); err != nil { return err } @@ -206,41 +209,6 @@ func (c *Client) addOperationGetAnnotationStoreMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opGetAnnotationStoreMiddleware struct { -} - -func (*endpointPrefix_opGetAnnotationStoreMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetAnnotationStoreMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetAnnotationStoreMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetAnnotationStoreMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetAnnotationStoreAPIClient is a client that implements the GetAnnotationStore -// operation. -type GetAnnotationStoreAPIClient interface { - GetAnnotationStore(context.Context, *GetAnnotationStoreInput, ...func(*Options)) (*GetAnnotationStoreOutput, error) -} - -var _ GetAnnotationStoreAPIClient = (*Client)(nil) - // AnnotationStoreCreatedWaiterOptions are waiter options for // AnnotationStoreCreatedWaiter type AnnotationStoreCreatedWaiterOptions struct { @@ -358,7 +326,13 @@ func (w *AnnotationStoreCreatedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetAnnotationStore(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -584,7 +558,13 @@ func (w *AnnotationStoreDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.GetAnnotationStore(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -666,6 +646,41 @@ func annotationStoreDeletedStateRetryable(ctx context.Context, input *GetAnnotat return true, nil } +type endpointPrefix_opGetAnnotationStoreMiddleware struct { +} + +func (*endpointPrefix_opGetAnnotationStoreMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetAnnotationStoreMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetAnnotationStoreMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetAnnotationStoreMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetAnnotationStoreAPIClient is a client that implements the GetAnnotationStore +// operation. +type GetAnnotationStoreAPIClient interface { + GetAnnotationStore(context.Context, *GetAnnotationStoreInput, ...func(*Options)) (*GetAnnotationStoreOutput, error) +} + +var _ GetAnnotationStoreAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAnnotationStore(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetAnnotationStoreVersion.go b/service/omics/api_op_GetAnnotationStoreVersion.go index 6bf2b9df596..5d5297f5ade 100644 --- a/service/omics/api_op_GetAnnotationStoreVersion.go +++ b/service/omics/api_op_GetAnnotationStoreVersion.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGetAnnotationStoreVersionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAnnotationStoreVersionMiddleware(stack); err != nil { return err } @@ -203,41 +206,6 @@ func (c *Client) addOperationGetAnnotationStoreVersionMiddlewares(stack *middlew return nil } -type endpointPrefix_opGetAnnotationStoreVersionMiddleware struct { -} - -func (*endpointPrefix_opGetAnnotationStoreVersionMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetAnnotationStoreVersionMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetAnnotationStoreVersionMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetAnnotationStoreVersionMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetAnnotationStoreVersionAPIClient is a client that implements the -// GetAnnotationStoreVersion operation. -type GetAnnotationStoreVersionAPIClient interface { - GetAnnotationStoreVersion(context.Context, *GetAnnotationStoreVersionInput, ...func(*Options)) (*GetAnnotationStoreVersionOutput, error) -} - -var _ GetAnnotationStoreVersionAPIClient = (*Client)(nil) - // AnnotationStoreVersionCreatedWaiterOptions are waiter options for // AnnotationStoreVersionCreatedWaiter type AnnotationStoreVersionCreatedWaiterOptions struct { @@ -358,7 +326,13 @@ func (w *AnnotationStoreVersionCreatedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetAnnotationStoreVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -587,7 +561,13 @@ func (w *AnnotationStoreVersionDeletedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetAnnotationStoreVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -669,6 +649,41 @@ func annotationStoreVersionDeletedStateRetryable(ctx context.Context, input *Get return true, nil } +type endpointPrefix_opGetAnnotationStoreVersionMiddleware struct { +} + +func (*endpointPrefix_opGetAnnotationStoreVersionMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetAnnotationStoreVersionMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetAnnotationStoreVersionMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetAnnotationStoreVersionMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetAnnotationStoreVersionAPIClient is a client that implements the +// GetAnnotationStoreVersion operation. +type GetAnnotationStoreVersionAPIClient interface { + GetAnnotationStoreVersion(context.Context, *GetAnnotationStoreVersionInput, ...func(*Options)) (*GetAnnotationStoreVersionOutput, error) +} + +var _ GetAnnotationStoreVersionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAnnotationStoreVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetReadSet.go b/service/omics/api_op_GetReadSet.go index 04154ca5e21..16b6d7e4599 100644 --- a/service/omics/api_op_GetReadSet.go +++ b/service/omics/api_op_GetReadSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetReadSetMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReadSetMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetReadSetActivationJob.go b/service/omics/api_op_GetReadSetActivationJob.go index 252cf6f0c4b..18764a66f3f 100644 --- a/service/omics/api_op_GetReadSetActivationJob.go +++ b/service/omics/api_op_GetReadSetActivationJob.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetReadSetActivationJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReadSetActivationJobMiddleware(stack); err != nil { return err } @@ -168,41 +171,6 @@ func (c *Client) addOperationGetReadSetActivationJobMiddlewares(stack *middlewar return nil } -type endpointPrefix_opGetReadSetActivationJobMiddleware struct { -} - -func (*endpointPrefix_opGetReadSetActivationJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetReadSetActivationJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetReadSetActivationJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetReadSetActivationJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetReadSetActivationJobAPIClient is a client that implements the -// GetReadSetActivationJob operation. -type GetReadSetActivationJobAPIClient interface { - GetReadSetActivationJob(context.Context, *GetReadSetActivationJobInput, ...func(*Options)) (*GetReadSetActivationJobOutput, error) -} - -var _ GetReadSetActivationJobAPIClient = (*Client)(nil) - // ReadSetActivationJobCompletedWaiterOptions are waiter options for // ReadSetActivationJobCompletedWaiter type ReadSetActivationJobCompletedWaiterOptions struct { @@ -323,7 +291,13 @@ func (w *ReadSetActivationJobCompletedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetReadSetActivationJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -483,6 +457,41 @@ func readSetActivationJobCompletedStateRetryable(ctx context.Context, input *Get return true, nil } +type endpointPrefix_opGetReadSetActivationJobMiddleware struct { +} + +func (*endpointPrefix_opGetReadSetActivationJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetReadSetActivationJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetReadSetActivationJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetReadSetActivationJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetReadSetActivationJobAPIClient is a client that implements the +// GetReadSetActivationJob operation. +type GetReadSetActivationJobAPIClient interface { + GetReadSetActivationJob(context.Context, *GetReadSetActivationJobInput, ...func(*Options)) (*GetReadSetActivationJobOutput, error) +} + +var _ GetReadSetActivationJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReadSetActivationJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetReadSetExportJob.go b/service/omics/api_op_GetReadSetExportJob.go index e8f41aab7fc..13fbf592618 100644 --- a/service/omics/api_op_GetReadSetExportJob.go +++ b/service/omics/api_op_GetReadSetExportJob.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetReadSetExportJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReadSetExportJobMiddleware(stack); err != nil { return err } @@ -173,41 +176,6 @@ func (c *Client) addOperationGetReadSetExportJobMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opGetReadSetExportJobMiddleware struct { -} - -func (*endpointPrefix_opGetReadSetExportJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetReadSetExportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetReadSetExportJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetReadSetExportJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetReadSetExportJobAPIClient is a client that implements the -// GetReadSetExportJob operation. -type GetReadSetExportJobAPIClient interface { - GetReadSetExportJob(context.Context, *GetReadSetExportJobInput, ...func(*Options)) (*GetReadSetExportJobOutput, error) -} - -var _ GetReadSetExportJobAPIClient = (*Client)(nil) - // ReadSetExportJobCompletedWaiterOptions are waiter options for // ReadSetExportJobCompletedWaiter type ReadSetExportJobCompletedWaiterOptions struct { @@ -326,7 +294,13 @@ func (w *ReadSetExportJobCompletedWaiter) WaitForOutput(ctx context.Context, par } out, err := w.client.GetReadSetExportJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -486,6 +460,41 @@ func readSetExportJobCompletedStateRetryable(ctx context.Context, input *GetRead return true, nil } +type endpointPrefix_opGetReadSetExportJobMiddleware struct { +} + +func (*endpointPrefix_opGetReadSetExportJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetReadSetExportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetReadSetExportJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetReadSetExportJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetReadSetExportJobAPIClient is a client that implements the +// GetReadSetExportJob operation. +type GetReadSetExportJobAPIClient interface { + GetReadSetExportJob(context.Context, *GetReadSetExportJobInput, ...func(*Options)) (*GetReadSetExportJobOutput, error) +} + +var _ GetReadSetExportJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReadSetExportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetReadSetImportJob.go b/service/omics/api_op_GetReadSetImportJob.go index f66359cc64a..426bd9e117e 100644 --- a/service/omics/api_op_GetReadSetImportJob.go +++ b/service/omics/api_op_GetReadSetImportJob.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetReadSetImportJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReadSetImportJobMiddleware(stack); err != nil { return err } @@ -175,41 +178,6 @@ func (c *Client) addOperationGetReadSetImportJobMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opGetReadSetImportJobMiddleware struct { -} - -func (*endpointPrefix_opGetReadSetImportJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetReadSetImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetReadSetImportJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetReadSetImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetReadSetImportJobAPIClient is a client that implements the -// GetReadSetImportJob operation. -type GetReadSetImportJobAPIClient interface { - GetReadSetImportJob(context.Context, *GetReadSetImportJobInput, ...func(*Options)) (*GetReadSetImportJobOutput, error) -} - -var _ GetReadSetImportJobAPIClient = (*Client)(nil) - // ReadSetImportJobCompletedWaiterOptions are waiter options for // ReadSetImportJobCompletedWaiter type ReadSetImportJobCompletedWaiterOptions struct { @@ -328,7 +296,13 @@ func (w *ReadSetImportJobCompletedWaiter) WaitForOutput(ctx context.Context, par } out, err := w.client.GetReadSetImportJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -488,6 +462,41 @@ func readSetImportJobCompletedStateRetryable(ctx context.Context, input *GetRead return true, nil } +type endpointPrefix_opGetReadSetImportJobMiddleware struct { +} + +func (*endpointPrefix_opGetReadSetImportJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetReadSetImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetReadSetImportJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetReadSetImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetReadSetImportJobAPIClient is a client that implements the +// GetReadSetImportJob operation. +type GetReadSetImportJobAPIClient interface { + GetReadSetImportJob(context.Context, *GetReadSetImportJobInput, ...func(*Options)) (*GetReadSetImportJobOutput, error) +} + +var _ GetReadSetImportJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReadSetImportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetReadSetMetadata.go b/service/omics/api_op_GetReadSetMetadata.go index 90c3fd82b7a..dd7a23ec88a 100644 --- a/service/omics/api_op_GetReadSetMetadata.go +++ b/service/omics/api_op_GetReadSetMetadata.go @@ -171,6 +171,9 @@ func (c *Client) addOperationGetReadSetMetadataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReadSetMetadataMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetReference.go b/service/omics/api_op_GetReference.go index 96922f0ae69..a0595539f7e 100644 --- a/service/omics/api_op_GetReference.go +++ b/service/omics/api_op_GetReference.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetReferenceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReferenceMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetReferenceImportJob.go b/service/omics/api_op_GetReferenceImportJob.go index d0175d9e32b..7324ddded1e 100644 --- a/service/omics/api_op_GetReferenceImportJob.go +++ b/service/omics/api_op_GetReferenceImportJob.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetReferenceImportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReferenceImportJobMiddleware(stack); err != nil { return err } @@ -175,41 +178,6 @@ func (c *Client) addOperationGetReferenceImportJobMiddlewares(stack *middleware. return nil } -type endpointPrefix_opGetReferenceImportJobMiddleware struct { -} - -func (*endpointPrefix_opGetReferenceImportJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetReferenceImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetReferenceImportJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetReferenceImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetReferenceImportJobAPIClient is a client that implements the -// GetReferenceImportJob operation. -type GetReferenceImportJobAPIClient interface { - GetReferenceImportJob(context.Context, *GetReferenceImportJobInput, ...func(*Options)) (*GetReferenceImportJobOutput, error) -} - -var _ GetReferenceImportJobAPIClient = (*Client)(nil) - // ReferenceImportJobCompletedWaiterOptions are waiter options for // ReferenceImportJobCompletedWaiter type ReferenceImportJobCompletedWaiterOptions struct { @@ -329,7 +297,13 @@ func (w *ReferenceImportJobCompletedWaiter) WaitForOutput(ctx context.Context, p } out, err := w.client.GetReferenceImportJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -489,6 +463,41 @@ func referenceImportJobCompletedStateRetryable(ctx context.Context, input *GetRe return true, nil } +type endpointPrefix_opGetReferenceImportJobMiddleware struct { +} + +func (*endpointPrefix_opGetReferenceImportJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetReferenceImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetReferenceImportJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetReferenceImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetReferenceImportJobAPIClient is a client that implements the +// GetReferenceImportJob operation. +type GetReferenceImportJobAPIClient interface { + GetReferenceImportJob(context.Context, *GetReferenceImportJobInput, ...func(*Options)) (*GetReferenceImportJobOutput, error) +} + +var _ GetReferenceImportJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReferenceImportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetReferenceMetadata.go b/service/omics/api_op_GetReferenceMetadata.go index 0f251a243a9..0179fd87339 100644 --- a/service/omics/api_op_GetReferenceMetadata.go +++ b/service/omics/api_op_GetReferenceMetadata.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetReferenceMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReferenceMetadataMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetReferenceStore.go b/service/omics/api_op_GetReferenceStore.go index 30809d9dda7..582d110189e 100644 --- a/service/omics/api_op_GetReferenceStore.go +++ b/service/omics/api_op_GetReferenceStore.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetReferenceStoreMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetReferenceStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetRun.go b/service/omics/api_op_GetRun.go index 0d634e9ecdf..c0bac78ec10 100644 --- a/service/omics/api_op_GetRun.go +++ b/service/omics/api_op_GetRun.go @@ -207,6 +207,9 @@ func (c *Client) addOperationGetRunMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetRunMiddleware(stack); err != nil { return err } @@ -234,40 +237,6 @@ func (c *Client) addOperationGetRunMiddlewares(stack *middleware.Stack, options return nil } -type endpointPrefix_opGetRunMiddleware struct { -} - -func (*endpointPrefix_opGetRunMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetRunMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetRunMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetRunMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetRunAPIClient is a client that implements the GetRun operation. -type GetRunAPIClient interface { - GetRun(context.Context, *GetRunInput, ...func(*Options)) (*GetRunOutput, error) -} - -var _ GetRunAPIClient = (*Client)(nil) - // RunRunningWaiterOptions are waiter options for RunRunningWaiter type RunRunningWaiterOptions struct { @@ -382,7 +351,13 @@ func (w *RunRunningWaiter) WaitForOutput(ctx context.Context, params *GetRunInpu } out, err := w.client.GetRun(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -622,7 +597,13 @@ func (w *RunCompletedWaiter) WaitForOutput(ctx context.Context, params *GetRunIn } out, err := w.client.GetRun(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -765,6 +746,40 @@ func runCompletedStateRetryable(ctx context.Context, input *GetRunInput, output return true, nil } +type endpointPrefix_opGetRunMiddleware struct { +} + +func (*endpointPrefix_opGetRunMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetRunMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetRunMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetRunMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetRunAPIClient is a client that implements the GetRun operation. +type GetRunAPIClient interface { + GetRun(context.Context, *GetRunInput, ...func(*Options)) (*GetRunOutput, error) +} + +var _ GetRunAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRun(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetRunGroup.go b/service/omics/api_op_GetRunGroup.go index c40c2aae2b4..eb89418ed60 100644 --- a/service/omics/api_op_GetRunGroup.go +++ b/service/omics/api_op_GetRunGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetRunGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetRunGroupMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetRunTask.go b/service/omics/api_op_GetRunTask.go index 8e608cfd75d..798180e3145 100644 --- a/service/omics/api_op_GetRunTask.go +++ b/service/omics/api_op_GetRunTask.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetRunTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetRunTaskMiddleware(stack); err != nil { return err } @@ -178,40 +181,6 @@ func (c *Client) addOperationGetRunTaskMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opGetRunTaskMiddleware struct { -} - -func (*endpointPrefix_opGetRunTaskMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetRunTaskMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetRunTaskMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetRunTaskMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetRunTaskAPIClient is a client that implements the GetRunTask operation. -type GetRunTaskAPIClient interface { - GetRunTask(context.Context, *GetRunTaskInput, ...func(*Options)) (*GetRunTaskOutput, error) -} - -var _ GetRunTaskAPIClient = (*Client)(nil) - // TaskRunningWaiterOptions are waiter options for TaskRunningWaiter type TaskRunningWaiterOptions struct { @@ -326,7 +295,13 @@ func (w *TaskRunningWaiter) WaitForOutput(ctx context.Context, params *GetRunTas } out, err := w.client.GetRunTask(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -567,7 +542,13 @@ func (w *TaskCompletedWaiter) WaitForOutput(ctx context.Context, params *GetRunT } out, err := w.client.GetRunTask(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -710,6 +691,40 @@ func taskCompletedStateRetryable(ctx context.Context, input *GetRunTaskInput, ou return true, nil } +type endpointPrefix_opGetRunTaskMiddleware struct { +} + +func (*endpointPrefix_opGetRunTaskMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetRunTaskMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetRunTaskMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetRunTaskMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetRunTaskAPIClient is a client that implements the GetRunTask operation. +type GetRunTaskAPIClient interface { + GetRunTask(context.Context, *GetRunTaskInput, ...func(*Options)) (*GetRunTaskOutput, error) +} + +var _ GetRunTaskAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRunTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetSequenceStore.go b/service/omics/api_op_GetSequenceStore.go index a61834fb1c7..19412e9ac2d 100644 --- a/service/omics/api_op_GetSequenceStore.go +++ b/service/omics/api_op_GetSequenceStore.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetSequenceStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSequenceStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetShare.go b/service/omics/api_op_GetShare.go index 050c35bfe31..73a2156485b 100644 --- a/service/omics/api_op_GetShare.go +++ b/service/omics/api_op_GetShare.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetShareMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetShareMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_GetVariantImportJob.go b/service/omics/api_op_GetVariantImportJob.go index c89b30c9371..85252aa6dae 100644 --- a/service/omics/api_op_GetVariantImportJob.go +++ b/service/omics/api_op_GetVariantImportJob.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetVariantImportJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetVariantImportJobMiddleware(stack); err != nil { return err } @@ -185,41 +188,6 @@ func (c *Client) addOperationGetVariantImportJobMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opGetVariantImportJobMiddleware struct { -} - -func (*endpointPrefix_opGetVariantImportJobMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetVariantImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetVariantImportJobMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetVariantImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetVariantImportJobAPIClient is a client that implements the -// GetVariantImportJob operation. -type GetVariantImportJobAPIClient interface { - GetVariantImportJob(context.Context, *GetVariantImportJobInput, ...func(*Options)) (*GetVariantImportJobOutput, error) -} - -var _ GetVariantImportJobAPIClient = (*Client)(nil) - // VariantImportJobCreatedWaiterOptions are waiter options for // VariantImportJobCreatedWaiter type VariantImportJobCreatedWaiterOptions struct { @@ -337,7 +305,13 @@ func (w *VariantImportJobCreatedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.GetVariantImportJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -463,6 +437,41 @@ func variantImportJobCreatedStateRetryable(ctx context.Context, input *GetVarian return true, nil } +type endpointPrefix_opGetVariantImportJobMiddleware struct { +} + +func (*endpointPrefix_opGetVariantImportJobMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetVariantImportJobMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetVariantImportJobMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetVariantImportJobMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetVariantImportJobAPIClient is a client that implements the +// GetVariantImportJob operation. +type GetVariantImportJobAPIClient interface { + GetVariantImportJob(context.Context, *GetVariantImportJobInput, ...func(*Options)) (*GetVariantImportJobOutput, error) +} + +var _ GetVariantImportJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetVariantImportJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetVariantStore.go b/service/omics/api_op_GetVariantStore.go index 843bf6725c1..1935133ee6f 100644 --- a/service/omics/api_op_GetVariantStore.go +++ b/service/omics/api_op_GetVariantStore.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetVariantStoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetVariantStoreMiddleware(stack); err != nil { return err } @@ -195,41 +198,6 @@ func (c *Client) addOperationGetVariantStoreMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opGetVariantStoreMiddleware struct { -} - -func (*endpointPrefix_opGetVariantStoreMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetVariantStoreMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetVariantStoreMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetVariantStoreMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetVariantStoreAPIClient is a client that implements the GetVariantStore -// operation. -type GetVariantStoreAPIClient interface { - GetVariantStore(context.Context, *GetVariantStoreInput, ...func(*Options)) (*GetVariantStoreOutput, error) -} - -var _ GetVariantStoreAPIClient = (*Client)(nil) - // VariantStoreCreatedWaiterOptions are waiter options for // VariantStoreCreatedWaiter type VariantStoreCreatedWaiterOptions struct { @@ -347,7 +315,13 @@ func (w *VariantStoreCreatedWaiter) WaitForOutput(ctx context.Context, params *G } out, err := w.client.GetVariantStore(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -573,7 +547,13 @@ func (w *VariantStoreDeletedWaiter) WaitForOutput(ctx context.Context, params *G } out, err := w.client.GetVariantStore(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -655,6 +635,41 @@ func variantStoreDeletedStateRetryable(ctx context.Context, input *GetVariantSto return true, nil } +type endpointPrefix_opGetVariantStoreMiddleware struct { +} + +func (*endpointPrefix_opGetVariantStoreMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetVariantStoreMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetVariantStoreMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetVariantStoreMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetVariantStoreAPIClient is a client that implements the GetVariantStore +// operation. +type GetVariantStoreAPIClient interface { + GetVariantStore(context.Context, *GetVariantStoreInput, ...func(*Options)) (*GetVariantStoreOutput, error) +} + +var _ GetVariantStoreAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetVariantStore(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_GetWorkflow.go b/service/omics/api_op_GetWorkflow.go index 9d8c1d17e4b..2259fee15b6 100644 --- a/service/omics/api_op_GetWorkflow.go +++ b/service/omics/api_op_GetWorkflow.go @@ -169,6 +169,9 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetWorkflowMiddleware(stack); err != nil { return err } @@ -196,40 +199,6 @@ func (c *Client) addOperationGetWorkflowMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opGetWorkflowMiddleware struct { -} - -func (*endpointPrefix_opGetWorkflowMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetWorkflowMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetWorkflowMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetWorkflowMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// GetWorkflowAPIClient is a client that implements the GetWorkflow operation. -type GetWorkflowAPIClient interface { - GetWorkflow(context.Context, *GetWorkflowInput, ...func(*Options)) (*GetWorkflowOutput, error) -} - -var _ GetWorkflowAPIClient = (*Client)(nil) - // WorkflowActiveWaiterOptions are waiter options for WorkflowActiveWaiter type WorkflowActiveWaiterOptions struct { @@ -345,7 +314,13 @@ func (w *WorkflowActiveWaiter) WaitForOutput(ctx context.Context, params *GetWor } out, err := w.client.GetWorkflow(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -454,6 +429,40 @@ func workflowActiveStateRetryable(ctx context.Context, input *GetWorkflowInput, return true, nil } +type endpointPrefix_opGetWorkflowMiddleware struct { +} + +func (*endpointPrefix_opGetWorkflowMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetWorkflowMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opGetWorkflowMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opGetWorkflowMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// GetWorkflowAPIClient is a client that implements the GetWorkflow operation. +type GetWorkflowAPIClient interface { + GetWorkflow(context.Context, *GetWorkflowInput, ...func(*Options)) (*GetWorkflowOutput, error) +} + +var _ GetWorkflowAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetWorkflow(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListAnnotationImportJobs.go b/service/omics/api_op_ListAnnotationImportJobs.go index a60d52011bc..4538ff1bca4 100644 --- a/service/omics/api_op_ListAnnotationImportJobs.go +++ b/service/omics/api_op_ListAnnotationImportJobs.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAnnotationImportJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAnnotationImportJobsMiddleware(stack); err != nil { return err } @@ -142,41 +145,6 @@ func (c *Client) addOperationListAnnotationImportJobsMiddlewares(stack *middlewa return nil } -type endpointPrefix_opListAnnotationImportJobsMiddleware struct { -} - -func (*endpointPrefix_opListAnnotationImportJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAnnotationImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAnnotationImportJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAnnotationImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAnnotationImportJobsAPIClient is a client that implements the -// ListAnnotationImportJobs operation. -type ListAnnotationImportJobsAPIClient interface { - ListAnnotationImportJobs(context.Context, *ListAnnotationImportJobsInput, ...func(*Options)) (*ListAnnotationImportJobsOutput, error) -} - -var _ ListAnnotationImportJobsAPIClient = (*Client)(nil) - // ListAnnotationImportJobsPaginatorOptions is the paginator options for // ListAnnotationImportJobs type ListAnnotationImportJobsPaginatorOptions struct { @@ -242,6 +210,9 @@ func (p *ListAnnotationImportJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnnotationImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +232,41 @@ func (p *ListAnnotationImportJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opListAnnotationImportJobsMiddleware struct { +} + +func (*endpointPrefix_opListAnnotationImportJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAnnotationImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAnnotationImportJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAnnotationImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAnnotationImportJobsAPIClient is a client that implements the +// ListAnnotationImportJobs operation. +type ListAnnotationImportJobsAPIClient interface { + ListAnnotationImportJobs(context.Context, *ListAnnotationImportJobsInput, ...func(*Options)) (*ListAnnotationImportJobsOutput, error) +} + +var _ ListAnnotationImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnnotationImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListAnnotationStoreVersions.go b/service/omics/api_op_ListAnnotationStoreVersions.go index e23a66f3cb4..11ec7378933 100644 --- a/service/omics/api_op_ListAnnotationStoreVersions.go +++ b/service/omics/api_op_ListAnnotationStoreVersions.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListAnnotationStoreVersionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAnnotationStoreVersionsMiddleware(stack); err != nil { return err } @@ -148,41 +151,6 @@ func (c *Client) addOperationListAnnotationStoreVersionsMiddlewares(stack *middl return nil } -type endpointPrefix_opListAnnotationStoreVersionsMiddleware struct { -} - -func (*endpointPrefix_opListAnnotationStoreVersionsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAnnotationStoreVersionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAnnotationStoreVersionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAnnotationStoreVersionsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAnnotationStoreVersionsAPIClient is a client that implements the -// ListAnnotationStoreVersions operation. -type ListAnnotationStoreVersionsAPIClient interface { - ListAnnotationStoreVersions(context.Context, *ListAnnotationStoreVersionsInput, ...func(*Options)) (*ListAnnotationStoreVersionsOutput, error) -} - -var _ ListAnnotationStoreVersionsAPIClient = (*Client)(nil) - // ListAnnotationStoreVersionsPaginatorOptions is the paginator options for // ListAnnotationStoreVersions type ListAnnotationStoreVersionsPaginatorOptions struct { @@ -250,6 +218,9 @@ func (p *ListAnnotationStoreVersionsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnnotationStoreVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +240,41 @@ func (p *ListAnnotationStoreVersionsPaginator) NextPage(ctx context.Context, opt return result, nil } +type endpointPrefix_opListAnnotationStoreVersionsMiddleware struct { +} + +func (*endpointPrefix_opListAnnotationStoreVersionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAnnotationStoreVersionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAnnotationStoreVersionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAnnotationStoreVersionsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAnnotationStoreVersionsAPIClient is a client that implements the +// ListAnnotationStoreVersions operation. +type ListAnnotationStoreVersionsAPIClient interface { + ListAnnotationStoreVersions(context.Context, *ListAnnotationStoreVersionsInput, ...func(*Options)) (*ListAnnotationStoreVersionsOutput, error) +} + +var _ ListAnnotationStoreVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnnotationStoreVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListAnnotationStores.go b/service/omics/api_op_ListAnnotationStores.go index 241d3a80f19..826a4e42572 100644 --- a/service/omics/api_op_ListAnnotationStores.go +++ b/service/omics/api_op_ListAnnotationStores.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAnnotationStoresMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAnnotationStoresMiddleware(stack); err != nil { return err } @@ -141,41 +144,6 @@ func (c *Client) addOperationListAnnotationStoresMiddlewares(stack *middleware.S return nil } -type endpointPrefix_opListAnnotationStoresMiddleware struct { -} - -func (*endpointPrefix_opListAnnotationStoresMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAnnotationStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAnnotationStoresMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAnnotationStoresMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAnnotationStoresAPIClient is a client that implements the -// ListAnnotationStores operation. -type ListAnnotationStoresAPIClient interface { - ListAnnotationStores(context.Context, *ListAnnotationStoresInput, ...func(*Options)) (*ListAnnotationStoresOutput, error) -} - -var _ ListAnnotationStoresAPIClient = (*Client)(nil) - // ListAnnotationStoresPaginatorOptions is the paginator options for // ListAnnotationStores type ListAnnotationStoresPaginatorOptions struct { @@ -240,6 +208,9 @@ func (p *ListAnnotationStoresPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnnotationStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +230,41 @@ func (p *ListAnnotationStoresPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +type endpointPrefix_opListAnnotationStoresMiddleware struct { +} + +func (*endpointPrefix_opListAnnotationStoresMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAnnotationStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAnnotationStoresMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAnnotationStoresMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAnnotationStoresAPIClient is a client that implements the +// ListAnnotationStores operation. +type ListAnnotationStoresAPIClient interface { + ListAnnotationStores(context.Context, *ListAnnotationStoresInput, ...func(*Options)) (*ListAnnotationStoresOutput, error) +} + +var _ ListAnnotationStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnnotationStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListMultipartReadSetUploads.go b/service/omics/api_op_ListMultipartReadSetUploads.go index 97b09474b2d..2ba4b4773f8 100644 --- a/service/omics/api_op_ListMultipartReadSetUploads.go +++ b/service/omics/api_op_ListMultipartReadSetUploads.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListMultipartReadSetUploadsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListMultipartReadSetUploadsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListMultipartReadSetUploadsMiddlewares(stack *middl return nil } -type endpointPrefix_opListMultipartReadSetUploadsMiddleware struct { -} - -func (*endpointPrefix_opListMultipartReadSetUploadsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMultipartReadSetUploadsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListMultipartReadSetUploadsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListMultipartReadSetUploadsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListMultipartReadSetUploadsAPIClient is a client that implements the -// ListMultipartReadSetUploads operation. -type ListMultipartReadSetUploadsAPIClient interface { - ListMultipartReadSetUploads(context.Context, *ListMultipartReadSetUploadsInput, ...func(*Options)) (*ListMultipartReadSetUploadsOutput, error) -} - -var _ ListMultipartReadSetUploadsAPIClient = (*Client)(nil) - // ListMultipartReadSetUploadsPaginatorOptions is the paginator options for // ListMultipartReadSetUploads type ListMultipartReadSetUploadsPaginatorOptions struct { @@ -247,6 +215,9 @@ func (p *ListMultipartReadSetUploadsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMultipartReadSetUploads(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +237,41 @@ func (p *ListMultipartReadSetUploadsPaginator) NextPage(ctx context.Context, opt return result, nil } +type endpointPrefix_opListMultipartReadSetUploadsMiddleware struct { +} + +func (*endpointPrefix_opListMultipartReadSetUploadsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListMultipartReadSetUploadsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListMultipartReadSetUploadsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListMultipartReadSetUploadsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListMultipartReadSetUploadsAPIClient is a client that implements the +// ListMultipartReadSetUploads operation. +type ListMultipartReadSetUploadsAPIClient interface { + ListMultipartReadSetUploads(context.Context, *ListMultipartReadSetUploadsInput, ...func(*Options)) (*ListMultipartReadSetUploadsOutput, error) +} + +var _ ListMultipartReadSetUploadsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMultipartReadSetUploads(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReadSetActivationJobs.go b/service/omics/api_op_ListReadSetActivationJobs.go index 5a3973d3eb4..8f4b720f654 100644 --- a/service/omics/api_op_ListReadSetActivationJobs.go +++ b/service/omics/api_op_ListReadSetActivationJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListReadSetActivationJobsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReadSetActivationJobsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListReadSetActivationJobsMiddlewares(stack *middlew return nil } -type endpointPrefix_opListReadSetActivationJobsMiddleware struct { -} - -func (*endpointPrefix_opListReadSetActivationJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReadSetActivationJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReadSetActivationJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReadSetActivationJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReadSetActivationJobsAPIClient is a client that implements the -// ListReadSetActivationJobs operation. -type ListReadSetActivationJobsAPIClient interface { - ListReadSetActivationJobs(context.Context, *ListReadSetActivationJobsInput, ...func(*Options)) (*ListReadSetActivationJobsOutput, error) -} - -var _ ListReadSetActivationJobsAPIClient = (*Client)(nil) - // ListReadSetActivationJobsPaginatorOptions is the paginator options for // ListReadSetActivationJobs type ListReadSetActivationJobsPaginatorOptions struct { @@ -246,6 +214,9 @@ func (p *ListReadSetActivationJobsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReadSetActivationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +236,41 @@ func (p *ListReadSetActivationJobsPaginator) NextPage(ctx context.Context, optFn return result, nil } +type endpointPrefix_opListReadSetActivationJobsMiddleware struct { +} + +func (*endpointPrefix_opListReadSetActivationJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReadSetActivationJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReadSetActivationJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReadSetActivationJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReadSetActivationJobsAPIClient is a client that implements the +// ListReadSetActivationJobs operation. +type ListReadSetActivationJobsAPIClient interface { + ListReadSetActivationJobs(context.Context, *ListReadSetActivationJobsInput, ...func(*Options)) (*ListReadSetActivationJobsOutput, error) +} + +var _ ListReadSetActivationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReadSetActivationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReadSetExportJobs.go b/service/omics/api_op_ListReadSetExportJobs.go index 96f7d403d06..d28d850a4d2 100644 --- a/service/omics/api_op_ListReadSetExportJobs.go +++ b/service/omics/api_op_ListReadSetExportJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListReadSetExportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReadSetExportJobsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListReadSetExportJobsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListReadSetExportJobsMiddleware struct { -} - -func (*endpointPrefix_opListReadSetExportJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReadSetExportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReadSetExportJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReadSetExportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReadSetExportJobsAPIClient is a client that implements the -// ListReadSetExportJobs operation. -type ListReadSetExportJobsAPIClient interface { - ListReadSetExportJobs(context.Context, *ListReadSetExportJobsInput, ...func(*Options)) (*ListReadSetExportJobsOutput, error) -} - -var _ ListReadSetExportJobsAPIClient = (*Client)(nil) - // ListReadSetExportJobsPaginatorOptions is the paginator options for // ListReadSetExportJobs type ListReadSetExportJobsPaginatorOptions struct { @@ -245,6 +213,9 @@ func (p *ListReadSetExportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReadSetExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +235,41 @@ func (p *ListReadSetExportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListReadSetExportJobsMiddleware struct { +} + +func (*endpointPrefix_opListReadSetExportJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReadSetExportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReadSetExportJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReadSetExportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReadSetExportJobsAPIClient is a client that implements the +// ListReadSetExportJobs operation. +type ListReadSetExportJobsAPIClient interface { + ListReadSetExportJobs(context.Context, *ListReadSetExportJobsInput, ...func(*Options)) (*ListReadSetExportJobsOutput, error) +} + +var _ ListReadSetExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReadSetExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReadSetImportJobs.go b/service/omics/api_op_ListReadSetImportJobs.go index ff641f2e35a..d16973bacf1 100644 --- a/service/omics/api_op_ListReadSetImportJobs.go +++ b/service/omics/api_op_ListReadSetImportJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListReadSetImportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReadSetImportJobsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListReadSetImportJobsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListReadSetImportJobsMiddleware struct { -} - -func (*endpointPrefix_opListReadSetImportJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReadSetImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReadSetImportJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReadSetImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReadSetImportJobsAPIClient is a client that implements the -// ListReadSetImportJobs operation. -type ListReadSetImportJobsAPIClient interface { - ListReadSetImportJobs(context.Context, *ListReadSetImportJobsInput, ...func(*Options)) (*ListReadSetImportJobsOutput, error) -} - -var _ ListReadSetImportJobsAPIClient = (*Client)(nil) - // ListReadSetImportJobsPaginatorOptions is the paginator options for // ListReadSetImportJobs type ListReadSetImportJobsPaginatorOptions struct { @@ -245,6 +213,9 @@ func (p *ListReadSetImportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReadSetImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +235,41 @@ func (p *ListReadSetImportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListReadSetImportJobsMiddleware struct { +} + +func (*endpointPrefix_opListReadSetImportJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReadSetImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReadSetImportJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReadSetImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReadSetImportJobsAPIClient is a client that implements the +// ListReadSetImportJobs operation. +type ListReadSetImportJobsAPIClient interface { + ListReadSetImportJobs(context.Context, *ListReadSetImportJobsInput, ...func(*Options)) (*ListReadSetImportJobsOutput, error) +} + +var _ ListReadSetImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReadSetImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReadSetUploadParts.go b/service/omics/api_op_ListReadSetUploadParts.go index e6b6f12409b..8764b6524da 100644 --- a/service/omics/api_op_ListReadSetUploadParts.go +++ b/service/omics/api_op_ListReadSetUploadParts.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListReadSetUploadPartsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReadSetUploadPartsMiddleware(stack); err != nil { return err } @@ -158,41 +161,6 @@ func (c *Client) addOperationListReadSetUploadPartsMiddlewares(stack *middleware return nil } -type endpointPrefix_opListReadSetUploadPartsMiddleware struct { -} - -func (*endpointPrefix_opListReadSetUploadPartsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReadSetUploadPartsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReadSetUploadPartsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReadSetUploadPartsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReadSetUploadPartsAPIClient is a client that implements the -// ListReadSetUploadParts operation. -type ListReadSetUploadPartsAPIClient interface { - ListReadSetUploadParts(context.Context, *ListReadSetUploadPartsInput, ...func(*Options)) (*ListReadSetUploadPartsOutput, error) -} - -var _ ListReadSetUploadPartsAPIClient = (*Client)(nil) - // ListReadSetUploadPartsPaginatorOptions is the paginator options for // ListReadSetUploadParts type ListReadSetUploadPartsPaginatorOptions struct { @@ -257,6 +225,9 @@ func (p *ListReadSetUploadPartsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReadSetUploadParts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +247,41 @@ func (p *ListReadSetUploadPartsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +type endpointPrefix_opListReadSetUploadPartsMiddleware struct { +} + +func (*endpointPrefix_opListReadSetUploadPartsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReadSetUploadPartsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReadSetUploadPartsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReadSetUploadPartsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReadSetUploadPartsAPIClient is a client that implements the +// ListReadSetUploadParts operation. +type ListReadSetUploadPartsAPIClient interface { + ListReadSetUploadParts(context.Context, *ListReadSetUploadPartsInput, ...func(*Options)) (*ListReadSetUploadPartsOutput, error) +} + +var _ ListReadSetUploadPartsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReadSetUploadParts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReadSets.go b/service/omics/api_op_ListReadSets.go index 87c229365c4..969c12c54fb 100644 --- a/service/omics/api_op_ListReadSets.go +++ b/service/omics/api_op_ListReadSets.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListReadSetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReadSetsMiddleware(stack); err != nil { return err } @@ -148,40 +151,6 @@ func (c *Client) addOperationListReadSetsMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListReadSetsMiddleware struct { -} - -func (*endpointPrefix_opListReadSetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReadSetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReadSetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReadSetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReadSetsAPIClient is a client that implements the ListReadSets operation. -type ListReadSetsAPIClient interface { - ListReadSets(context.Context, *ListReadSetsInput, ...func(*Options)) (*ListReadSetsOutput, error) -} - -var _ ListReadSetsAPIClient = (*Client)(nil) - // ListReadSetsPaginatorOptions is the paginator options for ListReadSets type ListReadSetsPaginatorOptions struct { // The maximum number of read sets to return in one page of results. @@ -245,6 +214,9 @@ func (p *ListReadSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReadSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +236,40 @@ func (p *ListReadSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListReadSetsMiddleware struct { +} + +func (*endpointPrefix_opListReadSetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReadSetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReadSetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReadSetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReadSetsAPIClient is a client that implements the ListReadSets operation. +type ListReadSetsAPIClient interface { + ListReadSets(context.Context, *ListReadSetsInput, ...func(*Options)) (*ListReadSetsOutput, error) +} + +var _ ListReadSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReadSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReferenceImportJobs.go b/service/omics/api_op_ListReferenceImportJobs.go index b6eeb2028a9..16001c35056 100644 --- a/service/omics/api_op_ListReferenceImportJobs.go +++ b/service/omics/api_op_ListReferenceImportJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListReferenceImportJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReferenceImportJobsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListReferenceImportJobsMiddlewares(stack *middlewar return nil } -type endpointPrefix_opListReferenceImportJobsMiddleware struct { -} - -func (*endpointPrefix_opListReferenceImportJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReferenceImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReferenceImportJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReferenceImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReferenceImportJobsAPIClient is a client that implements the -// ListReferenceImportJobs operation. -type ListReferenceImportJobsAPIClient interface { - ListReferenceImportJobs(context.Context, *ListReferenceImportJobsInput, ...func(*Options)) (*ListReferenceImportJobsOutput, error) -} - -var _ ListReferenceImportJobsAPIClient = (*Client)(nil) - // ListReferenceImportJobsPaginatorOptions is the paginator options for // ListReferenceImportJobs type ListReferenceImportJobsPaginatorOptions struct { @@ -246,6 +214,9 @@ func (p *ListReferenceImportJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReferenceImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +236,41 @@ func (p *ListReferenceImportJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +type endpointPrefix_opListReferenceImportJobsMiddleware struct { +} + +func (*endpointPrefix_opListReferenceImportJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReferenceImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReferenceImportJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReferenceImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReferenceImportJobsAPIClient is a client that implements the +// ListReferenceImportJobs operation. +type ListReferenceImportJobsAPIClient interface { + ListReferenceImportJobs(context.Context, *ListReferenceImportJobsInput, ...func(*Options)) (*ListReferenceImportJobsOutput, error) +} + +var _ ListReferenceImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReferenceImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReferenceStores.go b/service/omics/api_op_ListReferenceStores.go index 128f1e36d37..644b46a68e7 100644 --- a/service/omics/api_op_ListReferenceStores.go +++ b/service/omics/api_op_ListReferenceStores.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListReferenceStoresMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReferenceStoresMiddleware(stack); err != nil { return err } @@ -140,41 +143,6 @@ func (c *Client) addOperationListReferenceStoresMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListReferenceStoresMiddleware struct { -} - -func (*endpointPrefix_opListReferenceStoresMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReferenceStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReferenceStoresMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReferenceStoresMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReferenceStoresAPIClient is a client that implements the -// ListReferenceStores operation. -type ListReferenceStoresAPIClient interface { - ListReferenceStores(context.Context, *ListReferenceStoresInput, ...func(*Options)) (*ListReferenceStoresOutput, error) -} - -var _ ListReferenceStoresAPIClient = (*Client)(nil) - // ListReferenceStoresPaginatorOptions is the paginator options for // ListReferenceStores type ListReferenceStoresPaginatorOptions struct { @@ -239,6 +207,9 @@ func (p *ListReferenceStoresPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReferenceStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +229,41 @@ func (p *ListReferenceStoresPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListReferenceStoresMiddleware struct { +} + +func (*endpointPrefix_opListReferenceStoresMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReferenceStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReferenceStoresMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReferenceStoresMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReferenceStoresAPIClient is a client that implements the +// ListReferenceStores operation. +type ListReferenceStoresAPIClient interface { + ListReferenceStores(context.Context, *ListReferenceStoresInput, ...func(*Options)) (*ListReferenceStoresOutput, error) +} + +var _ ListReferenceStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReferenceStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListReferences.go b/service/omics/api_op_ListReferences.go index 32126a052d6..5854ae432c2 100644 --- a/service/omics/api_op_ListReferences.go +++ b/service/omics/api_op_ListReferences.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListReferencesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListReferencesMiddleware(stack); err != nil { return err } @@ -148,41 +151,6 @@ func (c *Client) addOperationListReferencesMiddlewares(stack *middleware.Stack, return nil } -type endpointPrefix_opListReferencesMiddleware struct { -} - -func (*endpointPrefix_opListReferencesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListReferencesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListReferencesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListReferencesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListReferencesAPIClient is a client that implements the ListReferences -// operation. -type ListReferencesAPIClient interface { - ListReferences(context.Context, *ListReferencesInput, ...func(*Options)) (*ListReferencesOutput, error) -} - -var _ ListReferencesAPIClient = (*Client)(nil) - // ListReferencesPaginatorOptions is the paginator options for ListReferences type ListReferencesPaginatorOptions struct { // The maximum number of references to return in one page of results. @@ -246,6 +214,9 @@ func (p *ListReferencesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReferences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +236,41 @@ func (p *ListReferencesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +type endpointPrefix_opListReferencesMiddleware struct { +} + +func (*endpointPrefix_opListReferencesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListReferencesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListReferencesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListReferencesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListReferencesAPIClient is a client that implements the ListReferences +// operation. +type ListReferencesAPIClient interface { + ListReferences(context.Context, *ListReferencesInput, ...func(*Options)) (*ListReferencesOutput, error) +} + +var _ ListReferencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReferences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListRunGroups.go b/service/omics/api_op_ListRunGroups.go index 87b32b189f0..922a1f749e1 100644 --- a/service/omics/api_op_ListRunGroups.go +++ b/service/omics/api_op_ListRunGroups.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRunGroupsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListRunGroupsMiddleware(stack); err != nil { return err } @@ -138,40 +141,6 @@ func (c *Client) addOperationListRunGroupsMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opListRunGroupsMiddleware struct { -} - -func (*endpointPrefix_opListRunGroupsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListRunGroupsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListRunGroupsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListRunGroupsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListRunGroupsAPIClient is a client that implements the ListRunGroups operation. -type ListRunGroupsAPIClient interface { - ListRunGroups(context.Context, *ListRunGroupsInput, ...func(*Options)) (*ListRunGroupsOutput, error) -} - -var _ ListRunGroupsAPIClient = (*Client)(nil) - // ListRunGroupsPaginatorOptions is the paginator options for ListRunGroups type ListRunGroupsPaginatorOptions struct { // The maximum number of run groups to return in one page of results. @@ -235,6 +204,9 @@ func (p *ListRunGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRunGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +226,40 @@ func (p *ListRunGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +type endpointPrefix_opListRunGroupsMiddleware struct { +} + +func (*endpointPrefix_opListRunGroupsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListRunGroupsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListRunGroupsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListRunGroupsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListRunGroupsAPIClient is a client that implements the ListRunGroups operation. +type ListRunGroupsAPIClient interface { + ListRunGroups(context.Context, *ListRunGroupsInput, ...func(*Options)) (*ListRunGroupsOutput, error) +} + +var _ ListRunGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRunGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListRunTasks.go b/service/omics/api_op_ListRunTasks.go index 8452389ba38..6530406346a 100644 --- a/service/omics/api_op_ListRunTasks.go +++ b/service/omics/api_op_ListRunTasks.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListRunTasksMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListRunTasksMiddleware(stack); err != nil { return err } @@ -146,40 +149,6 @@ func (c *Client) addOperationListRunTasksMiddlewares(stack *middleware.Stack, op return nil } -type endpointPrefix_opListRunTasksMiddleware struct { -} - -func (*endpointPrefix_opListRunTasksMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListRunTasksMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListRunTasksMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListRunTasksMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListRunTasksAPIClient is a client that implements the ListRunTasks operation. -type ListRunTasksAPIClient interface { - ListRunTasks(context.Context, *ListRunTasksInput, ...func(*Options)) (*ListRunTasksOutput, error) -} - -var _ ListRunTasksAPIClient = (*Client)(nil) - // ListRunTasksPaginatorOptions is the paginator options for ListRunTasks type ListRunTasksPaginatorOptions struct { // The maximum number of run tasks to return in one page of results. @@ -243,6 +212,9 @@ func (p *ListRunTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRunTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +234,40 @@ func (p *ListRunTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +type endpointPrefix_opListRunTasksMiddleware struct { +} + +func (*endpointPrefix_opListRunTasksMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListRunTasksMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListRunTasksMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListRunTasksMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListRunTasksAPIClient is a client that implements the ListRunTasks operation. +type ListRunTasksAPIClient interface { + ListRunTasks(context.Context, *ListRunTasksInput, ...func(*Options)) (*ListRunTasksOutput, error) +} + +var _ ListRunTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRunTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListRuns.go b/service/omics/api_op_ListRuns.go index 21e5b3859ed..7827d52402e 100644 --- a/service/omics/api_op_ListRuns.go +++ b/service/omics/api_op_ListRuns.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRunsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListRunsMiddleware(stack); err != nil { return err } @@ -144,40 +147,6 @@ func (c *Client) addOperationListRunsMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opListRunsMiddleware struct { -} - -func (*endpointPrefix_opListRunsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListRunsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListRunsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListRunsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListRunsAPIClient is a client that implements the ListRuns operation. -type ListRunsAPIClient interface { - ListRuns(context.Context, *ListRunsInput, ...func(*Options)) (*ListRunsOutput, error) -} - -var _ ListRunsAPIClient = (*Client)(nil) - // ListRunsPaginatorOptions is the paginator options for ListRuns type ListRunsPaginatorOptions struct { // The maximum number of runs to return in one page of results. @@ -241,6 +210,9 @@ func (p *ListRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +232,40 @@ func (p *ListRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +type endpointPrefix_opListRunsMiddleware struct { +} + +func (*endpointPrefix_opListRunsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListRunsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListRunsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListRunsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListRunsAPIClient is a client that implements the ListRuns operation. +type ListRunsAPIClient interface { + ListRuns(context.Context, *ListRunsInput, ...func(*Options)) (*ListRunsOutput, error) +} + +var _ ListRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListSequenceStores.go b/service/omics/api_op_ListSequenceStores.go index d959d59b6f1..3cf6588f451 100644 --- a/service/omics/api_op_ListSequenceStores.go +++ b/service/omics/api_op_ListSequenceStores.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListSequenceStoresMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSequenceStoresMiddleware(stack); err != nil { return err } @@ -140,41 +143,6 @@ func (c *Client) addOperationListSequenceStoresMiddlewares(stack *middleware.Sta return nil } -type endpointPrefix_opListSequenceStoresMiddleware struct { -} - -func (*endpointPrefix_opListSequenceStoresMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSequenceStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "control-storage-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSequenceStoresMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSequenceStoresMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSequenceStoresAPIClient is a client that implements the ListSequenceStores -// operation. -type ListSequenceStoresAPIClient interface { - ListSequenceStores(context.Context, *ListSequenceStoresInput, ...func(*Options)) (*ListSequenceStoresOutput, error) -} - -var _ ListSequenceStoresAPIClient = (*Client)(nil) - // ListSequenceStoresPaginatorOptions is the paginator options for // ListSequenceStores type ListSequenceStoresPaginatorOptions struct { @@ -239,6 +207,9 @@ func (p *ListSequenceStoresPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSequenceStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +229,41 @@ func (p *ListSequenceStoresPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +type endpointPrefix_opListSequenceStoresMiddleware struct { +} + +func (*endpointPrefix_opListSequenceStoresMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSequenceStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "control-storage-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSequenceStoresMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSequenceStoresMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSequenceStoresAPIClient is a client that implements the ListSequenceStores +// operation. +type ListSequenceStoresAPIClient interface { + ListSequenceStores(context.Context, *ListSequenceStoresInput, ...func(*Options)) (*ListSequenceStoresOutput, error) +} + +var _ ListSequenceStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSequenceStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListShares.go b/service/omics/api_op_ListShares.go index e3924218784..64a50df0e74 100644 --- a/service/omics/api_op_ListShares.go +++ b/service/omics/api_op_ListShares.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListSharesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSharesMiddleware(stack); err != nil { return err } @@ -150,40 +153,6 @@ func (c *Client) addOperationListSharesMiddlewares(stack *middleware.Stack, opti return nil } -type endpointPrefix_opListSharesMiddleware struct { -} - -func (*endpointPrefix_opListSharesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSharesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSharesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSharesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSharesAPIClient is a client that implements the ListShares operation. -type ListSharesAPIClient interface { - ListShares(context.Context, *ListSharesInput, ...func(*Options)) (*ListSharesOutput, error) -} - -var _ ListSharesAPIClient = (*Client)(nil) - // ListSharesPaginatorOptions is the paginator options for ListShares type ListSharesPaginatorOptions struct { // The maximum number of shares to return in one page of results. @@ -247,6 +216,9 @@ func (p *ListSharesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +238,40 @@ func (p *ListSharesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +type endpointPrefix_opListSharesMiddleware struct { +} + +func (*endpointPrefix_opListSharesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSharesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSharesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSharesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSharesAPIClient is a client that implements the ListShares operation. +type ListSharesAPIClient interface { + ListShares(context.Context, *ListSharesInput, ...func(*Options)) (*ListSharesOutput, error) +} + +var _ ListSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListTagsForResource.go b/service/omics/api_op_ListTagsForResource.go index e5aa5558e8e..48e58fc0d13 100644 --- a/service/omics/api_op_ListTagsForResource.go +++ b/service/omics/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_ListVariantImportJobs.go b/service/omics/api_op_ListVariantImportJobs.go index a192a6a4cb3..575259e794e 100644 --- a/service/omics/api_op_ListVariantImportJobs.go +++ b/service/omics/api_op_ListVariantImportJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListVariantImportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListVariantImportJobsMiddleware(stack); err != nil { return err } @@ -141,41 +144,6 @@ func (c *Client) addOperationListVariantImportJobsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListVariantImportJobsMiddleware struct { -} - -func (*endpointPrefix_opListVariantImportJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListVariantImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListVariantImportJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListVariantImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListVariantImportJobsAPIClient is a client that implements the -// ListVariantImportJobs operation. -type ListVariantImportJobsAPIClient interface { - ListVariantImportJobs(context.Context, *ListVariantImportJobsInput, ...func(*Options)) (*ListVariantImportJobsOutput, error) -} - -var _ ListVariantImportJobsAPIClient = (*Client)(nil) - // ListVariantImportJobsPaginatorOptions is the paginator options for // ListVariantImportJobs type ListVariantImportJobsPaginatorOptions struct { @@ -240,6 +208,9 @@ func (p *ListVariantImportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVariantImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +230,41 @@ func (p *ListVariantImportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListVariantImportJobsMiddleware struct { +} + +func (*endpointPrefix_opListVariantImportJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListVariantImportJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListVariantImportJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListVariantImportJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListVariantImportJobsAPIClient is a client that implements the +// ListVariantImportJobs operation. +type ListVariantImportJobsAPIClient interface { + ListVariantImportJobs(context.Context, *ListVariantImportJobsInput, ...func(*Options)) (*ListVariantImportJobsOutput, error) +} + +var _ ListVariantImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVariantImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListVariantStores.go b/service/omics/api_op_ListVariantStores.go index 4cb122b9096..ff73de56aea 100644 --- a/service/omics/api_op_ListVariantStores.go +++ b/service/omics/api_op_ListVariantStores.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListVariantStoresMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListVariantStoresMiddleware(stack); err != nil { return err } @@ -141,41 +144,6 @@ func (c *Client) addOperationListVariantStoresMiddlewares(stack *middleware.Stac return nil } -type endpointPrefix_opListVariantStoresMiddleware struct { -} - -func (*endpointPrefix_opListVariantStoresMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListVariantStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "analytics-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListVariantStoresMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListVariantStoresMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListVariantStoresAPIClient is a client that implements the ListVariantStores -// operation. -type ListVariantStoresAPIClient interface { - ListVariantStores(context.Context, *ListVariantStoresInput, ...func(*Options)) (*ListVariantStoresOutput, error) -} - -var _ ListVariantStoresAPIClient = (*Client)(nil) - // ListVariantStoresPaginatorOptions is the paginator options for ListVariantStores type ListVariantStoresPaginatorOptions struct { // The maximum number of stores to return in one page of results. @@ -239,6 +207,9 @@ func (p *ListVariantStoresPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVariantStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +229,41 @@ func (p *ListVariantStoresPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +type endpointPrefix_opListVariantStoresMiddleware struct { +} + +func (*endpointPrefix_opListVariantStoresMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListVariantStoresMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListVariantStoresMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListVariantStoresMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListVariantStoresAPIClient is a client that implements the ListVariantStores +// operation. +type ListVariantStoresAPIClient interface { + ListVariantStores(context.Context, *ListVariantStoresInput, ...func(*Options)) (*ListVariantStoresOutput, error) +} + +var _ ListVariantStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVariantStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_ListWorkflows.go b/service/omics/api_op_ListWorkflows.go index 6e4b4f558c5..99e133cb7a8 100644 --- a/service/omics/api_op_ListWorkflows.go +++ b/service/omics/api_op_ListWorkflows.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListWorkflowsMiddleware(stack); err != nil { return err } @@ -141,40 +144,6 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o return nil } -type endpointPrefix_opListWorkflowsMiddleware struct { -} - -func (*endpointPrefix_opListWorkflowsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListWorkflowsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "workflows-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListWorkflowsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListWorkflowsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. -type ListWorkflowsAPIClient interface { - ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) -} - -var _ ListWorkflowsAPIClient = (*Client)(nil) - // ListWorkflowsPaginatorOptions is the paginator options for ListWorkflows type ListWorkflowsPaginatorOptions struct { // The maximum number of workflows to return in one page of results. @@ -238,6 +207,9 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +229,40 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +type endpointPrefix_opListWorkflowsMiddleware struct { +} + +func (*endpointPrefix_opListWorkflowsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListWorkflowsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "workflows-" + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListWorkflowsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListWorkflowsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. +type ListWorkflowsAPIClient interface { + ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) +} + +var _ ListWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/omics/api_op_StartAnnotationImportJob.go b/service/omics/api_op_StartAnnotationImportJob.go index 814cdbb35ec..fc8a0b6a738 100644 --- a/service/omics/api_op_StartAnnotationImportJob.go +++ b/service/omics/api_op_StartAnnotationImportJob.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartAnnotationImportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartAnnotationImportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_StartReadSetActivationJob.go b/service/omics/api_op_StartReadSetActivationJob.go index cd843567bfc..d77c4a97a9c 100644 --- a/service/omics/api_op_StartReadSetActivationJob.go +++ b/service/omics/api_op_StartReadSetActivationJob.go @@ -134,6 +134,9 @@ func (c *Client) addOperationStartReadSetActivationJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartReadSetActivationJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_StartReadSetExportJob.go b/service/omics/api_op_StartReadSetExportJob.go index 6cee03f1921..75d40b60535 100644 --- a/service/omics/api_op_StartReadSetExportJob.go +++ b/service/omics/api_op_StartReadSetExportJob.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStartReadSetExportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartReadSetExportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_StartReadSetImportJob.go b/service/omics/api_op_StartReadSetImportJob.go index d9a84cd6294..2734f8c84b2 100644 --- a/service/omics/api_op_StartReadSetImportJob.go +++ b/service/omics/api_op_StartReadSetImportJob.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartReadSetImportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartReadSetImportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_StartReferenceImportJob.go b/service/omics/api_op_StartReferenceImportJob.go index b3b7f7575ba..e5271664425 100644 --- a/service/omics/api_op_StartReferenceImportJob.go +++ b/service/omics/api_op_StartReferenceImportJob.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartReferenceImportJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartReferenceImportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_StartRun.go b/service/omics/api_op_StartRun.go index 26ad810f50c..c39362d4122 100644 --- a/service/omics/api_op_StartRun.go +++ b/service/omics/api_op_StartRun.go @@ -190,6 +190,9 @@ func (c *Client) addOperationStartRunMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartRunMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_StartVariantImportJob.go b/service/omics/api_op_StartVariantImportJob.go index 321f3ca0477..3ef0313edbc 100644 --- a/service/omics/api_op_StartVariantImportJob.go +++ b/service/omics/api_op_StartVariantImportJob.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStartVariantImportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartVariantImportJobMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_TagResource.go b/service/omics/api_op_TagResource.go index 007898960b8..857de7ca370 100644 --- a/service/omics/api_op_TagResource.go +++ b/service/omics/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UntagResource.go b/service/omics/api_op_UntagResource.go index 4fefa47ee71..89de89fe3dc 100644 --- a/service/omics/api_op_UntagResource.go +++ b/service/omics/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UpdateAnnotationStore.go b/service/omics/api_op_UpdateAnnotationStore.go index 5bf99db0f88..0d3f69022ca 100644 --- a/service/omics/api_op_UpdateAnnotationStore.go +++ b/service/omics/api_op_UpdateAnnotationStore.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateAnnotationStoreMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAnnotationStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UpdateAnnotationStoreVersion.go b/service/omics/api_op_UpdateAnnotationStoreVersion.go index 8af1609c18f..6596e4992eb 100644 --- a/service/omics/api_op_UpdateAnnotationStoreVersion.go +++ b/service/omics/api_op_UpdateAnnotationStoreVersion.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateAnnotationStoreVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateAnnotationStoreVersionMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UpdateRunGroup.go b/service/omics/api_op_UpdateRunGroup.go index 8a5a8067834..bd08b55c9e5 100644 --- a/service/omics/api_op_UpdateRunGroup.go +++ b/service/omics/api_op_UpdateRunGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateRunGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateRunGroupMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UpdateVariantStore.go b/service/omics/api_op_UpdateVariantStore.go index 371d695f848..bfc8b3b70d5 100644 --- a/service/omics/api_op_UpdateVariantStore.go +++ b/service/omics/api_op_UpdateVariantStore.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateVariantStoreMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateVariantStoreMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UpdateWorkflow.go b/service/omics/api_op_UpdateWorkflow.go index 43138d02655..954f7176a0b 100644 --- a/service/omics/api_op_UpdateWorkflow.go +++ b/service/omics/api_op_UpdateWorkflow.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateWorkflowMiddleware(stack); err != nil { return err } diff --git a/service/omics/api_op_UploadReadSetPart.go b/service/omics/api_op_UploadReadSetPart.go index c916ac9ca42..0cc581815b5 100644 --- a/service/omics/api_op_UploadReadSetPart.go +++ b/service/omics/api_op_UploadReadSetPart.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUploadReadSetPartMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUploadReadSetPartMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_client.go b/service/opensearch/api_client.go index 420ed6c05a5..ed7af42806d 100644 --- a/service/opensearch/api_client.go +++ b/service/opensearch/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/opensearch/api_op_AcceptInboundConnection.go b/service/opensearch/api_op_AcceptInboundConnection.go index 18e323b4b81..5f18fb720dc 100644 --- a/service/opensearch/api_op_AcceptInboundConnection.go +++ b/service/opensearch/api_op_AcceptInboundConnection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAcceptInboundConnectionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInboundConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_AddDataSource.go b/service/opensearch/api_op_AddDataSource.go index 1f0baaa3df9..af2728d4ad2 100644 --- a/service/opensearch/api_op_AddDataSource.go +++ b/service/opensearch/api_op_AddDataSource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAddDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_AddTags.go b/service/opensearch/api_op_AddTags.go index b7109751007..dd04ac96def 100644 --- a/service/opensearch/api_op_AddTags.go +++ b/service/opensearch/api_op_AddTags.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_AssociatePackage.go b/service/opensearch/api_op_AssociatePackage.go index 3840eba6d93..7725e4ab47f 100644 --- a/service/opensearch/api_op_AssociatePackage.go +++ b/service/opensearch/api_op_AssociatePackage.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociatePackageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go b/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go index 8ce77b7d9f3..efecba987c5 100644 --- a/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go +++ b/service/opensearch/api_op_AuthorizeVpcEndpointAccess.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAuthorizeVpcEndpointAccessMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeVpcEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_CancelDomainConfigChange.go b/service/opensearch/api_op_CancelDomainConfigChange.go index 949d7ebc932..ac15fa2162d 100644 --- a/service/opensearch/api_op_CancelDomainConfigChange.go +++ b/service/opensearch/api_op_CancelDomainConfigChange.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelDomainConfigChangeMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDomainConfigChangeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_CancelServiceSoftwareUpdate.go b/service/opensearch/api_op_CancelServiceSoftwareUpdate.go index 9282a23f3da..7f2b980d4db 100644 --- a/service/opensearch/api_op_CancelServiceSoftwareUpdate.go +++ b/service/opensearch/api_op_CancelServiceSoftwareUpdate.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelServiceSoftwareUpdateMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelServiceSoftwareUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_CreateDomain.go b/service/opensearch/api_op_CreateDomain.go index f6df3a34fc7..2018e876430 100644 --- a/service/opensearch/api_op_CreateDomain.go +++ b/service/opensearch/api_op_CreateDomain.go @@ -212,6 +212,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_CreateOutboundConnection.go b/service/opensearch/api_op_CreateOutboundConnection.go index a1c9730fdfb..d4c63e7ee4d 100644 --- a/service/opensearch/api_op_CreateOutboundConnection.go +++ b/service/opensearch/api_op_CreateOutboundConnection.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateOutboundConnectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOutboundConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_CreatePackage.go b/service/opensearch/api_op_CreatePackage.go index 79a10d85004..acfba1bf30b 100644 --- a/service/opensearch/api_op_CreatePackage.go +++ b/service/opensearch/api_op_CreatePackage.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_CreateVpcEndpoint.go b/service/opensearch/api_op_CreateVpcEndpoint.go index cb95f6ae2a1..5ee9009febc 100644 --- a/service/opensearch/api_op_CreateVpcEndpoint.go +++ b/service/opensearch/api_op_CreateVpcEndpoint.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DeleteDataSource.go b/service/opensearch/api_op_DeleteDataSource.go index 20f10790eb1..d64c8b7ea47 100644 --- a/service/opensearch/api_op_DeleteDataSource.go +++ b/service/opensearch/api_op_DeleteDataSource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DeleteDomain.go b/service/opensearch/api_op_DeleteDomain.go index c7d2b27bdfa..cef289388c6 100644 --- a/service/opensearch/api_op_DeleteDomain.go +++ b/service/opensearch/api_op_DeleteDomain.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DeleteInboundConnection.go b/service/opensearch/api_op_DeleteInboundConnection.go index d8d8d467322..cef936a8bf4 100644 --- a/service/opensearch/api_op_DeleteInboundConnection.go +++ b/service/opensearch/api_op_DeleteInboundConnection.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteInboundConnectionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInboundConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DeleteOutboundConnection.go b/service/opensearch/api_op_DeleteOutboundConnection.go index 998491eb6b5..398d1260186 100644 --- a/service/opensearch/api_op_DeleteOutboundConnection.go +++ b/service/opensearch/api_op_DeleteOutboundConnection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteOutboundConnectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOutboundConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DeletePackage.go b/service/opensearch/api_op_DeletePackage.go index 41a485db271..7e97d643ce0 100644 --- a/service/opensearch/api_op_DeletePackage.go +++ b/service/opensearch/api_op_DeletePackage.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeletePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DeleteVpcEndpoint.go b/service/opensearch/api_op_DeleteVpcEndpoint.go index d1993219dc4..0e567265b81 100644 --- a/service/opensearch/api_op_DeleteVpcEndpoint.go +++ b/service/opensearch/api_op_DeleteVpcEndpoint.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDomain.go b/service/opensearch/api_op_DescribeDomain.go index c55551727c9..44c136e6703 100644 --- a/service/opensearch/api_op_DescribeDomain.go +++ b/service/opensearch/api_op_DescribeDomain.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDomainAutoTunes.go b/service/opensearch/api_op_DescribeDomainAutoTunes.go index 94fee526df0..ff033a3843b 100644 --- a/service/opensearch/api_op_DescribeDomainAutoTunes.go +++ b/service/opensearch/api_op_DescribeDomainAutoTunes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDomainAutoTunesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainAutoTunesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeDomainAutoTunesMiddlewares(stack *middlewar return nil } -// DescribeDomainAutoTunesAPIClient is a client that implements the -// DescribeDomainAutoTunes operation. -type DescribeDomainAutoTunesAPIClient interface { - DescribeDomainAutoTunes(context.Context, *DescribeDomainAutoTunesInput, ...func(*Options)) (*DescribeDomainAutoTunesOutput, error) -} - -var _ DescribeDomainAutoTunesAPIClient = (*Client)(nil) - // DescribeDomainAutoTunesPaginatorOptions is the paginator options for // DescribeDomainAutoTunes type DescribeDomainAutoTunesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDomainAutoTunes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeDomainAutoTunesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDomainAutoTunesAPIClient is a client that implements the +// DescribeDomainAutoTunes operation. +type DescribeDomainAutoTunesAPIClient interface { + DescribeDomainAutoTunes(context.Context, *DescribeDomainAutoTunesInput, ...func(*Options)) (*DescribeDomainAutoTunesOutput, error) +} + +var _ DescribeDomainAutoTunesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDomainAutoTunes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_DescribeDomainChangeProgress.go b/service/opensearch/api_op_DescribeDomainChangeProgress.go index ab43f2de036..4a409caf66b 100644 --- a/service/opensearch/api_op_DescribeDomainChangeProgress.go +++ b/service/opensearch/api_op_DescribeDomainChangeProgress.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDomainChangeProgressMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainChangeProgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDomainConfig.go b/service/opensearch/api_op_DescribeDomainConfig.go index aab7c6f7c07..63b228e0faf 100644 --- a/service/opensearch/api_op_DescribeDomainConfig.go +++ b/service/opensearch/api_op_DescribeDomainConfig.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeDomainConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDomainHealth.go b/service/opensearch/api_op_DescribeDomainHealth.go index a80ad94ec44..b4c8b6240fc 100644 --- a/service/opensearch/api_op_DescribeDomainHealth.go +++ b/service/opensearch/api_op_DescribeDomainHealth.go @@ -171,6 +171,9 @@ func (c *Client) addOperationDescribeDomainHealthMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainHealthValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDomainNodes.go b/service/opensearch/api_op_DescribeDomainNodes.go index c6a833fabcf..051c0d9a24b 100644 --- a/service/opensearch/api_op_DescribeDomainNodes.go +++ b/service/opensearch/api_op_DescribeDomainNodes.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeDomainNodesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainNodesValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDomains.go b/service/opensearch/api_op_DescribeDomains.go index 48f3c76f440..37d9c5bea2a 100644 --- a/service/opensearch/api_op_DescribeDomains.go +++ b/service/opensearch/api_op_DescribeDomains.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeDomainsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeDryRunProgress.go b/service/opensearch/api_op_DescribeDryRunProgress.go index e6c8150e834..10cc7b1d4aa 100644 --- a/service/opensearch/api_op_DescribeDryRunProgress.go +++ b/service/opensearch/api_op_DescribeDryRunProgress.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeDryRunProgressMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDryRunProgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeInboundConnections.go b/service/opensearch/api_op_DescribeInboundConnections.go index 75ad0f2d929..e65af0bfedb 100644 --- a/service/opensearch/api_op_DescribeInboundConnections.go +++ b/service/opensearch/api_op_DescribeInboundConnections.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeInboundConnectionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInboundConnections(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeInboundConnectionsMiddlewares(stack *middle return nil } -// DescribeInboundConnectionsAPIClient is a client that implements the -// DescribeInboundConnections operation. -type DescribeInboundConnectionsAPIClient interface { - DescribeInboundConnections(context.Context, *DescribeInboundConnectionsInput, ...func(*Options)) (*DescribeInboundConnectionsOutput, error) -} - -var _ DescribeInboundConnectionsAPIClient = (*Client)(nil) - // DescribeInboundConnectionsPaginatorOptions is the paginator options for // DescribeInboundConnections type DescribeInboundConnectionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeInboundConnectionsPaginator) NextPage(ctx context.Context, optF params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInboundConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeInboundConnectionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeInboundConnectionsAPIClient is a client that implements the +// DescribeInboundConnections operation. +type DescribeInboundConnectionsAPIClient interface { + DescribeInboundConnections(context.Context, *DescribeInboundConnectionsInput, ...func(*Options)) (*DescribeInboundConnectionsOutput, error) +} + +var _ DescribeInboundConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInboundConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_DescribeInstanceTypeLimits.go b/service/opensearch/api_op_DescribeInstanceTypeLimits.go index 09ad7e092cc..5d2da0cfbde 100644 --- a/service/opensearch/api_op_DescribeInstanceTypeLimits.go +++ b/service/opensearch/api_op_DescribeInstanceTypeLimits.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeInstanceTypeLimitsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceTypeLimitsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DescribeOutboundConnections.go b/service/opensearch/api_op_DescribeOutboundConnections.go index 146cc33f034..a7e2ce62adb 100644 --- a/service/opensearch/api_op_DescribeOutboundConnections.go +++ b/service/opensearch/api_op_DescribeOutboundConnections.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeOutboundConnectionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOutboundConnections(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeOutboundConnectionsMiddlewares(stack *middl return nil } -// DescribeOutboundConnectionsAPIClient is a client that implements the -// DescribeOutboundConnections operation. -type DescribeOutboundConnectionsAPIClient interface { - DescribeOutboundConnections(context.Context, *DescribeOutboundConnectionsInput, ...func(*Options)) (*DescribeOutboundConnectionsOutput, error) -} - -var _ DescribeOutboundConnectionsAPIClient = (*Client)(nil) - // DescribeOutboundConnectionsPaginatorOptions is the paginator options for // DescribeOutboundConnections type DescribeOutboundConnectionsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeOutboundConnectionsPaginator) NextPage(ctx context.Context, opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOutboundConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeOutboundConnectionsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeOutboundConnectionsAPIClient is a client that implements the +// DescribeOutboundConnections operation. +type DescribeOutboundConnectionsAPIClient interface { + DescribeOutboundConnections(context.Context, *DescribeOutboundConnectionsInput, ...func(*Options)) (*DescribeOutboundConnectionsOutput, error) +} + +var _ DescribeOutboundConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOutboundConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_DescribePackages.go b/service/opensearch/api_op_DescribePackages.go index 5759e7996fd..f49792f49bd 100644 --- a/service/opensearch/api_op_DescribePackages.go +++ b/service/opensearch/api_op_DescribePackages.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribePackagesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePackages(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribePackagesMiddlewares(stack *middleware.Stack return nil } -// DescribePackagesAPIClient is a client that implements the DescribePackages -// operation. -type DescribePackagesAPIClient interface { - DescribePackages(context.Context, *DescribePackagesInput, ...func(*Options)) (*DescribePackagesOutput, error) -} - -var _ DescribePackagesAPIClient = (*Client)(nil) - // DescribePackagesPaginatorOptions is the paginator options for DescribePackages type DescribePackagesPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -212,6 +207,9 @@ func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribePackagesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribePackagesAPIClient is a client that implements the DescribePackages +// operation. +type DescribePackagesAPIClient interface { + DescribePackages(context.Context, *DescribePackagesInput, ...func(*Options)) (*DescribePackagesOutput, error) +} + +var _ DescribePackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_DescribeReservedInstanceOfferings.go b/service/opensearch/api_op_DescribeReservedInstanceOfferings.go index 0082b31e433..0d1175893b1 100644 --- a/service/opensearch/api_op_DescribeReservedInstanceOfferings.go +++ b/service/opensearch/api_op_DescribeReservedInstanceOfferings.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeReservedInstanceOfferingsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstanceOfferings(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeReservedInstanceOfferingsMiddlewares(stack return nil } -// DescribeReservedInstanceOfferingsAPIClient is a client that implements the -// DescribeReservedInstanceOfferings operation. -type DescribeReservedInstanceOfferingsAPIClient interface { - DescribeReservedInstanceOfferings(context.Context, *DescribeReservedInstanceOfferingsInput, ...func(*Options)) (*DescribeReservedInstanceOfferingsOutput, error) -} - -var _ DescribeReservedInstanceOfferingsAPIClient = (*Client)(nil) - // DescribeReservedInstanceOfferingsPaginatorOptions is the paginator options for // DescribeReservedInstanceOfferings type DescribeReservedInstanceOfferingsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeReservedInstanceOfferingsPaginator) NextPage(ctx context.Contex params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedInstanceOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeReservedInstanceOfferingsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeReservedInstanceOfferingsAPIClient is a client that implements the +// DescribeReservedInstanceOfferings operation. +type DescribeReservedInstanceOfferingsAPIClient interface { + DescribeReservedInstanceOfferings(context.Context, *DescribeReservedInstanceOfferingsInput, ...func(*Options)) (*DescribeReservedInstanceOfferingsOutput, error) +} + +var _ DescribeReservedInstanceOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedInstanceOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_DescribeReservedInstances.go b/service/opensearch/api_op_DescribeReservedInstances.go index 643b7c8eea5..c2f08018d77 100644 --- a/service/opensearch/api_op_DescribeReservedInstances.go +++ b/service/opensearch/api_op_DescribeReservedInstances.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeReservedInstancesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstances(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeReservedInstancesMiddlewares(stack *middlew return nil } -// DescribeReservedInstancesAPIClient is a client that implements the -// DescribeReservedInstances operation. -type DescribeReservedInstancesAPIClient interface { - DescribeReservedInstances(context.Context, *DescribeReservedInstancesInput, ...func(*Options)) (*DescribeReservedInstancesOutput, error) -} - -var _ DescribeReservedInstancesAPIClient = (*Client)(nil) - // DescribeReservedInstancesPaginatorOptions is the paginator options for // DescribeReservedInstances type DescribeReservedInstancesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeReservedInstancesPaginator) NextPage(ctx context.Context, optFn params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeReservedInstancesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeReservedInstancesAPIClient is a client that implements the +// DescribeReservedInstances operation. +type DescribeReservedInstancesAPIClient interface { + DescribeReservedInstances(context.Context, *DescribeReservedInstancesInput, ...func(*Options)) (*DescribeReservedInstancesOutput, error) +} + +var _ DescribeReservedInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_DescribeVpcEndpoints.go b/service/opensearch/api_op_DescribeVpcEndpoints.go index 60e571c05ca..19e15ddb89c 100644 --- a/service/opensearch/api_op_DescribeVpcEndpoints.go +++ b/service/opensearch/api_op_DescribeVpcEndpoints.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeVpcEndpointsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVpcEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_DissociatePackage.go b/service/opensearch/api_op_DissociatePackage.go index 8242c84b1ba..4c4b2855047 100644 --- a/service/opensearch/api_op_DissociatePackage.go +++ b/service/opensearch/api_op_DissociatePackage.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDissociatePackageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDissociatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_GetCompatibleVersions.go b/service/opensearch/api_op_GetCompatibleVersions.go index f4292f29487..805d2135de7 100644 --- a/service/opensearch/api_op_GetCompatibleVersions.go +++ b/service/opensearch/api_op_GetCompatibleVersions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetCompatibleVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCompatibleVersions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearch/api_op_GetDataSource.go b/service/opensearch/api_op_GetDataSource.go index 9cd821411a0..e6dbbaa10cd 100644 --- a/service/opensearch/api_op_GetDataSource.go +++ b/service/opensearch/api_op_GetDataSource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_GetDomainMaintenanceStatus.go b/service/opensearch/api_op_GetDomainMaintenanceStatus.go index 43f11186a10..1095aca425b 100644 --- a/service/opensearch/api_op_GetDomainMaintenanceStatus.go +++ b/service/opensearch/api_op_GetDomainMaintenanceStatus.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetDomainMaintenanceStatusMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainMaintenanceStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_GetPackageVersionHistory.go b/service/opensearch/api_op_GetPackageVersionHistory.go index 9e56627eca4..80d5b8104ce 100644 --- a/service/opensearch/api_op_GetPackageVersionHistory.go +++ b/service/opensearch/api_op_GetPackageVersionHistory.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetPackageVersionHistoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPackageVersionHistoryValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationGetPackageVersionHistoryMiddlewares(stack *middlewa return nil } -// GetPackageVersionHistoryAPIClient is a client that implements the -// GetPackageVersionHistory operation. -type GetPackageVersionHistoryAPIClient interface { - GetPackageVersionHistory(context.Context, *GetPackageVersionHistoryInput, ...func(*Options)) (*GetPackageVersionHistoryOutput, error) -} - -var _ GetPackageVersionHistoryAPIClient = (*Client)(nil) - // GetPackageVersionHistoryPaginatorOptions is the paginator options for // GetPackageVersionHistory type GetPackageVersionHistoryPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPackageVersionHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *GetPackageVersionHistoryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetPackageVersionHistoryAPIClient is a client that implements the +// GetPackageVersionHistory operation. +type GetPackageVersionHistoryAPIClient interface { + GetPackageVersionHistory(context.Context, *GetPackageVersionHistoryInput, ...func(*Options)) (*GetPackageVersionHistoryOutput, error) +} + +var _ GetPackageVersionHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPackageVersionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_GetUpgradeHistory.go b/service/opensearch/api_op_GetUpgradeHistory.go index 29299ad1eb8..e56cccf1986 100644 --- a/service/opensearch/api_op_GetUpgradeHistory.go +++ b/service/opensearch/api_op_GetUpgradeHistory.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetUpgradeHistoryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUpgradeHistoryValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetUpgradeHistoryMiddlewares(stack *middleware.Stac return nil } -// GetUpgradeHistoryAPIClient is a client that implements the GetUpgradeHistory -// operation. -type GetUpgradeHistoryAPIClient interface { - GetUpgradeHistory(context.Context, *GetUpgradeHistoryInput, ...func(*Options)) (*GetUpgradeHistoryOutput, error) -} - -var _ GetUpgradeHistoryAPIClient = (*Client)(nil) - // GetUpgradeHistoryPaginatorOptions is the paginator options for GetUpgradeHistory type GetUpgradeHistoryPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -216,6 +211,9 @@ func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetUpgradeHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetUpgradeHistoryPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetUpgradeHistoryAPIClient is a client that implements the GetUpgradeHistory +// operation. +type GetUpgradeHistoryAPIClient interface { + GetUpgradeHistory(context.Context, *GetUpgradeHistoryInput, ...func(*Options)) (*GetUpgradeHistoryOutput, error) +} + +var _ GetUpgradeHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetUpgradeHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_GetUpgradeStatus.go b/service/opensearch/api_op_GetUpgradeStatus.go index 69eae669b28..be6e7106e88 100644 --- a/service/opensearch/api_op_GetUpgradeStatus.go +++ b/service/opensearch/api_op_GetUpgradeStatus.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetUpgradeStatusMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUpgradeStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_ListDataSources.go b/service/opensearch/api_op_ListDataSources.go index fd5a307c0c5..0bbf0b1179a 100644 --- a/service/opensearch/api_op_ListDataSources.go +++ b/service/opensearch/api_op_ListDataSources.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_ListDomainMaintenances.go b/service/opensearch/api_op_ListDomainMaintenances.go index 2b28c400361..cc6e6a61d89 100644 --- a/service/opensearch/api_op_ListDomainMaintenances.go +++ b/service/opensearch/api_op_ListDomainMaintenances.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListDomainMaintenancesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainMaintenancesValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListDomainMaintenancesMiddlewares(stack *middleware return nil } -// ListDomainMaintenancesAPIClient is a client that implements the -// ListDomainMaintenances operation. -type ListDomainMaintenancesAPIClient interface { - ListDomainMaintenances(context.Context, *ListDomainMaintenancesInput, ...func(*Options)) (*ListDomainMaintenancesOutput, error) -} - -var _ ListDomainMaintenancesAPIClient = (*Client)(nil) - // ListDomainMaintenancesPaginatorOptions is the paginator options for // ListDomainMaintenances type ListDomainMaintenancesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListDomainMaintenancesPaginator) NextPage(ctx context.Context, optFns . params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainMaintenances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListDomainMaintenancesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDomainMaintenancesAPIClient is a client that implements the +// ListDomainMaintenances operation. +type ListDomainMaintenancesAPIClient interface { + ListDomainMaintenances(context.Context, *ListDomainMaintenancesInput, ...func(*Options)) (*ListDomainMaintenancesOutput, error) +} + +var _ ListDomainMaintenancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainMaintenances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_ListDomainNames.go b/service/opensearch/api_op_ListDomainNames.go index 76ad798abc0..ddbd0096733 100644 --- a/service/opensearch/api_op_ListDomainNames.go +++ b/service/opensearch/api_op_ListDomainNames.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListDomainNamesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomainNames(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearch/api_op_ListDomainsForPackage.go b/service/opensearch/api_op_ListDomainsForPackage.go index 4f51ba030f6..317c3163e90 100644 --- a/service/opensearch/api_op_ListDomainsForPackage.go +++ b/service/opensearch/api_op_ListDomainsForPackage.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListDomainsForPackageMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainsForPackageValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListDomainsForPackageMiddlewares(stack *middleware. return nil } -// ListDomainsForPackageAPIClient is a client that implements the -// ListDomainsForPackage operation. -type ListDomainsForPackageAPIClient interface { - ListDomainsForPackage(context.Context, *ListDomainsForPackageInput, ...func(*Options)) (*ListDomainsForPackageOutput, error) -} - -var _ ListDomainsForPackageAPIClient = (*Client)(nil) - // ListDomainsForPackagePaginatorOptions is the paginator options for // ListDomainsForPackage type ListDomainsForPackagePaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns .. params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainsForPackage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListDomainsForPackagePaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDomainsForPackageAPIClient is a client that implements the +// ListDomainsForPackage operation. +type ListDomainsForPackageAPIClient interface { + ListDomainsForPackage(context.Context, *ListDomainsForPackageInput, ...func(*Options)) (*ListDomainsForPackageOutput, error) +} + +var _ ListDomainsForPackageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainsForPackage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_ListInstanceTypeDetails.go b/service/opensearch/api_op_ListInstanceTypeDetails.go index 3f184e305c8..3078006f300 100644 --- a/service/opensearch/api_op_ListInstanceTypeDetails.go +++ b/service/opensearch/api_op_ListInstanceTypeDetails.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListInstanceTypeDetailsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstanceTypeDetailsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListInstanceTypeDetailsMiddlewares(stack *middlewar return nil } -// ListInstanceTypeDetailsAPIClient is a client that implements the -// ListInstanceTypeDetails operation. -type ListInstanceTypeDetailsAPIClient interface { - ListInstanceTypeDetails(context.Context, *ListInstanceTypeDetailsInput, ...func(*Options)) (*ListInstanceTypeDetailsOutput, error) -} - -var _ ListInstanceTypeDetailsAPIClient = (*Client)(nil) - // ListInstanceTypeDetailsPaginatorOptions is the paginator options for // ListInstanceTypeDetails type ListInstanceTypeDetailsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListInstanceTypeDetailsPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstanceTypeDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListInstanceTypeDetailsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInstanceTypeDetailsAPIClient is a client that implements the +// ListInstanceTypeDetails operation. +type ListInstanceTypeDetailsAPIClient interface { + ListInstanceTypeDetails(context.Context, *ListInstanceTypeDetailsInput, ...func(*Options)) (*ListInstanceTypeDetailsOutput, error) +} + +var _ ListInstanceTypeDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstanceTypeDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_ListPackagesForDomain.go b/service/opensearch/api_op_ListPackagesForDomain.go index 280984d2d4f..81594c97f61 100644 --- a/service/opensearch/api_op_ListPackagesForDomain.go +++ b/service/opensearch/api_op_ListPackagesForDomain.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListPackagesForDomainMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPackagesForDomainValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListPackagesForDomainMiddlewares(stack *middleware. return nil } -// ListPackagesForDomainAPIClient is a client that implements the -// ListPackagesForDomain operation. -type ListPackagesForDomainAPIClient interface { - ListPackagesForDomain(context.Context, *ListPackagesForDomainInput, ...func(*Options)) (*ListPackagesForDomainOutput, error) -} - -var _ ListPackagesForDomainAPIClient = (*Client)(nil) - // ListPackagesForDomainPaginatorOptions is the paginator options for // ListPackagesForDomain type ListPackagesForDomainPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns .. params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackagesForDomain(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListPackagesForDomainPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPackagesForDomainAPIClient is a client that implements the +// ListPackagesForDomain operation. +type ListPackagesForDomainAPIClient interface { + ListPackagesForDomain(context.Context, *ListPackagesForDomainInput, ...func(*Options)) (*ListPackagesForDomainOutput, error) +} + +var _ ListPackagesForDomainAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackagesForDomain(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_ListScheduledActions.go b/service/opensearch/api_op_ListScheduledActions.go index 3bbc570e2f1..5ade34eceb8 100644 --- a/service/opensearch/api_op_ListScheduledActions.go +++ b/service/opensearch/api_op_ListScheduledActions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListScheduledActionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListScheduledActionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListScheduledActionsMiddlewares(stack *middleware.S return nil } -// ListScheduledActionsAPIClient is a client that implements the -// ListScheduledActions operation. -type ListScheduledActionsAPIClient interface { - ListScheduledActions(context.Context, *ListScheduledActionsInput, ...func(*Options)) (*ListScheduledActionsOutput, error) -} - -var _ ListScheduledActionsAPIClient = (*Client)(nil) - // ListScheduledActionsPaginatorOptions is the paginator options for // ListScheduledActions type ListScheduledActionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListScheduledActionsPaginator) NextPage(ctx context.Context, optFns ... params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScheduledActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListScheduledActionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListScheduledActionsAPIClient is a client that implements the +// ListScheduledActions operation. +type ListScheduledActionsAPIClient interface { + ListScheduledActions(context.Context, *ListScheduledActionsInput, ...func(*Options)) (*ListScheduledActionsOutput, error) +} + +var _ ListScheduledActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_ListTags.go b/service/opensearch/api_op_ListTags.go index 4cbbf510a5a..184cbb3ef6d 100644 --- a/service/opensearch/api_op_ListTags.go +++ b/service/opensearch/api_op_ListTags.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_ListVersions.go b/service/opensearch/api_op_ListVersions.go index 121f807a788..a5a65f90ae5 100644 --- a/service/opensearch/api_op_ListVersions.go +++ b/service/opensearch/api_op_ListVersions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListVersionsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVersions(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListVersionsMiddlewares(stack *middleware.Stack, op return nil } -// ListVersionsAPIClient is a client that implements the ListVersions operation. -type ListVersionsAPIClient interface { - ListVersions(context.Context, *ListVersionsInput, ...func(*Options)) (*ListVersionsOutput, error) -} - -var _ ListVersionsAPIClient = (*Client)(nil) - // ListVersionsPaginatorOptions is the paginator options for ListVersions type ListVersionsPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -207,6 +203,9 @@ func (p *ListVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListVersionsAPIClient is a client that implements the ListVersions operation. +type ListVersionsAPIClient interface { + ListVersions(context.Context, *ListVersionsInput, ...func(*Options)) (*ListVersionsOutput, error) +} + +var _ ListVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearch/api_op_ListVpcEndpointAccess.go b/service/opensearch/api_op_ListVpcEndpointAccess.go index 8e48ee83716..70273fb78d1 100644 --- a/service/opensearch/api_op_ListVpcEndpointAccess.go +++ b/service/opensearch/api_op_ListVpcEndpointAccess.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListVpcEndpointAccessMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVpcEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_ListVpcEndpoints.go b/service/opensearch/api_op_ListVpcEndpoints.go index 66122f32593..9c8f2283ea1 100644 --- a/service/opensearch/api_op_ListVpcEndpoints.go +++ b/service/opensearch/api_op_ListVpcEndpoints.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListVpcEndpointsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVpcEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearch/api_op_ListVpcEndpointsForDomain.go b/service/opensearch/api_op_ListVpcEndpointsForDomain.go index 9921a95da60..f660ad36a58 100644 --- a/service/opensearch/api_op_ListVpcEndpointsForDomain.go +++ b/service/opensearch/api_op_ListVpcEndpointsForDomain.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListVpcEndpointsForDomainMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVpcEndpointsForDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_PurchaseReservedInstanceOffering.go b/service/opensearch/api_op_PurchaseReservedInstanceOffering.go index 0b81f1e8bdc..bd08bd36f77 100644 --- a/service/opensearch/api_op_PurchaseReservedInstanceOffering.go +++ b/service/opensearch/api_op_PurchaseReservedInstanceOffering.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPurchaseReservedInstanceOfferingMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedInstanceOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_RejectInboundConnection.go b/service/opensearch/api_op_RejectInboundConnection.go index 7e03989c62c..8322a605b94 100644 --- a/service/opensearch/api_op_RejectInboundConnection.go +++ b/service/opensearch/api_op_RejectInboundConnection.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRejectInboundConnectionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectInboundConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_RemoveTags.go b/service/opensearch/api_op_RemoveTags.go index 521101050f0..d944dbc6eb3 100644 --- a/service/opensearch/api_op_RemoveTags.go +++ b/service/opensearch/api_op_RemoveTags.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRemoveTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_RevokeVpcEndpointAccess.go b/service/opensearch/api_op_RevokeVpcEndpointAccess.go index 4cc3d012a69..591750b44ef 100644 --- a/service/opensearch/api_op_RevokeVpcEndpointAccess.go +++ b/service/opensearch/api_op_RevokeVpcEndpointAccess.go @@ -107,6 +107,9 @@ func (c *Client) addOperationRevokeVpcEndpointAccessMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeVpcEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_StartDomainMaintenance.go b/service/opensearch/api_op_StartDomainMaintenance.go index df63e31c071..057e4ad819d 100644 --- a/service/opensearch/api_op_StartDomainMaintenance.go +++ b/service/opensearch/api_op_StartDomainMaintenance.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartDomainMaintenanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDomainMaintenanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_StartServiceSoftwareUpdate.go b/service/opensearch/api_op_StartServiceSoftwareUpdate.go index 7fc6c52eab2..4d8f05cf1f1 100644 --- a/service/opensearch/api_op_StartServiceSoftwareUpdate.go +++ b/service/opensearch/api_op_StartServiceSoftwareUpdate.go @@ -134,6 +134,9 @@ func (c *Client) addOperationStartServiceSoftwareUpdateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartServiceSoftwareUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_UpdateDataSource.go b/service/opensearch/api_op_UpdateDataSource.go index 487605582c6..fe2ec4b8715 100644 --- a/service/opensearch/api_op_UpdateDataSource.go +++ b/service/opensearch/api_op_UpdateDataSource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_UpdateDomainConfig.go b/service/opensearch/api_op_UpdateDomainConfig.go index f27daaa6ef1..913f2706ebb 100644 --- a/service/opensearch/api_op_UpdateDomainConfig.go +++ b/service/opensearch/api_op_UpdateDomainConfig.go @@ -212,6 +212,9 @@ func (c *Client) addOperationUpdateDomainConfigMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_UpdatePackage.go b/service/opensearch/api_op_UpdatePackage.go index b68d95cbd83..ca94a5c6cf7 100644 --- a/service/opensearch/api_op_UpdatePackage.go +++ b/service/opensearch/api_op_UpdatePackage.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_UpdateScheduledAction.go b/service/opensearch/api_op_UpdateScheduledAction.go index 37ed0e505d8..b82d982cc03 100644 --- a/service/opensearch/api_op_UpdateScheduledAction.go +++ b/service/opensearch/api_op_UpdateScheduledAction.go @@ -147,6 +147,9 @@ func (c *Client) addOperationUpdateScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_UpdateVpcEndpoint.go b/service/opensearch/api_op_UpdateVpcEndpoint.go index c245e04c38e..40dec035be8 100644 --- a/service/opensearch/api_op_UpdateVpcEndpoint.go +++ b/service/opensearch/api_op_UpdateVpcEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearch/api_op_UpgradeDomain.go b/service/opensearch/api_op_UpgradeDomain.go index fcc0c4a31c9..a0500019f3d 100644 --- a/service/opensearch/api_op_UpgradeDomain.go +++ b/service/opensearch/api_op_UpgradeDomain.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpgradeDomainMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpgradeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_client.go b/service/opensearchserverless/api_client.go index fcd0be9360b..d4385205231 100644 --- a/service/opensearchserverless/api_client.go +++ b/service/opensearchserverless/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/opensearchserverless/api_op_BatchGetCollection.go b/service/opensearchserverless/api_op_BatchGetCollection.go index e133630317a..676f5644706 100644 --- a/service/opensearchserverless/api_op_BatchGetCollection.go +++ b/service/opensearchserverless/api_op_BatchGetCollection.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchGetCollectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetCollection(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go b/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go index d4a573a897c..93d3d6bd5de 100644 --- a/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go +++ b/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchGetEffectiveLifecyclePolicyMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetEffectiveLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go b/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go index aa0dcf3601f..3103720cdb2 100644 --- a/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go +++ b/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchGetLifecyclePolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetLifecyclePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_BatchGetVpcEndpoint.go b/service/opensearchserverless/api_op_BatchGetVpcEndpoint.go index 90175d05c90..663b983384b 100644 --- a/service/opensearchserverless/api_op_BatchGetVpcEndpoint.go +++ b/service/opensearchserverless/api_op_BatchGetVpcEndpoint.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchGetVpcEndpointMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetVpcEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_CreateAccessPolicy.go b/service/opensearchserverless/api_op_CreateAccessPolicy.go index 1a83f1c8594..396bf9e7bfd 100644 --- a/service/opensearchserverless/api_op_CreateAccessPolicy.go +++ b/service/opensearchserverless/api_op_CreateAccessPolicy.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateAccessPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_CreateCollection.go b/service/opensearchserverless/api_op_CreateCollection.go index 9ea7f3e79b1..4b1b1b173ed 100644 --- a/service/opensearchserverless/api_op_CreateCollection.go +++ b/service/opensearchserverless/api_op_CreateCollection.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateCollectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateCollectionMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_CreateLifecyclePolicy.go b/service/opensearchserverless/api_op_CreateLifecyclePolicy.go index 1919a882b45..dbddd22c6c0 100644 --- a/service/opensearchserverless/api_op_CreateLifecyclePolicy.go +++ b/service/opensearchserverless/api_op_CreateLifecyclePolicy.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLifecyclePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_CreateSecurityConfig.go b/service/opensearchserverless/api_op_CreateSecurityConfig.go index 6131dd7271a..999212ffeca 100644 --- a/service/opensearchserverless/api_op_CreateSecurityConfig.go +++ b/service/opensearchserverless/api_op_CreateSecurityConfig.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateSecurityConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSecurityConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_CreateSecurityPolicy.go b/service/opensearchserverless/api_op_CreateSecurityPolicy.go index 9d65485c48a..f25823d6ba4 100644 --- a/service/opensearchserverless/api_op_CreateSecurityPolicy.go +++ b/service/opensearchserverless/api_op_CreateSecurityPolicy.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateSecurityPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSecurityPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_CreateVpcEndpoint.go b/service/opensearchserverless/api_op_CreateVpcEndpoint.go index b1c868eb054..eee76119f49 100644 --- a/service/opensearchserverless/api_op_CreateVpcEndpoint.go +++ b/service/opensearchserverless/api_op_CreateVpcEndpoint.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVpcEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_DeleteAccessPolicy.go b/service/opensearchserverless/api_op_DeleteAccessPolicy.go index 68c27c61de5..8e2cfa94f63 100644 --- a/service/opensearchserverless/api_op_DeleteAccessPolicy.go +++ b/service/opensearchserverless/api_op_DeleteAccessPolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteAccessPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAccessPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_DeleteCollection.go b/service/opensearchserverless/api_op_DeleteCollection.go index 6e05ca6a2db..d9f39e97adc 100644 --- a/service/opensearchserverless/api_op_DeleteCollection.go +++ b/service/opensearchserverless/api_op_DeleteCollection.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteCollectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteCollectionMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go b/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go index c77ec7625d1..2bc611be5bb 100644 --- a/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go +++ b/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteLifecyclePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_DeleteSecurityConfig.go b/service/opensearchserverless/api_op_DeleteSecurityConfig.go index a43b117b1ea..9ca0be1dad5 100644 --- a/service/opensearchserverless/api_op_DeleteSecurityConfig.go +++ b/service/opensearchserverless/api_op_DeleteSecurityConfig.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSecurityConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteSecurityConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_DeleteSecurityPolicy.go b/service/opensearchserverless/api_op_DeleteSecurityPolicy.go index 1b9955e3968..6c47a0d0fd9 100644 --- a/service/opensearchserverless/api_op_DeleteSecurityPolicy.go +++ b/service/opensearchserverless/api_op_DeleteSecurityPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSecurityPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteSecurityPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_DeleteVpcEndpoint.go b/service/opensearchserverless/api_op_DeleteVpcEndpoint.go index 4816d6a30f8..520775dfb52 100644 --- a/service/opensearchserverless/api_op_DeleteVpcEndpoint.go +++ b/service/opensearchserverless/api_op_DeleteVpcEndpoint.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteVpcEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_GetAccessPolicy.go b/service/opensearchserverless/api_op_GetAccessPolicy.go index 06adbc302d1..247e878ba05 100644 --- a/service/opensearchserverless/api_op_GetAccessPolicy.go +++ b/service/opensearchserverless/api_op_GetAccessPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetAccessPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_GetAccountSettings.go b/service/opensearchserverless/api_op_GetAccountSettings.go index dc961398df6..2cc8e90e2d3 100644 --- a/service/opensearchserverless/api_op_GetAccountSettings.go +++ b/service/opensearchserverless/api_op_GetAccountSettings.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearchserverless/api_op_GetPoliciesStats.go b/service/opensearchserverless/api_op_GetPoliciesStats.go index a3875ede048..41b5d01edbe 100644 --- a/service/opensearchserverless/api_op_GetPoliciesStats.go +++ b/service/opensearchserverless/api_op_GetPoliciesStats.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetPoliciesStatsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPoliciesStats(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearchserverless/api_op_GetSecurityConfig.go b/service/opensearchserverless/api_op_GetSecurityConfig.go index 76df60706d2..638329b3255 100644 --- a/service/opensearchserverless/api_op_GetSecurityConfig.go +++ b/service/opensearchserverless/api_op_GetSecurityConfig.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetSecurityConfigMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSecurityConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_GetSecurityPolicy.go b/service/opensearchserverless/api_op_GetSecurityPolicy.go index 144d9ebea2c..72ed51bf7fe 100644 --- a/service/opensearchserverless/api_op_GetSecurityPolicy.go +++ b/service/opensearchserverless/api_op_GetSecurityPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSecurityPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSecurityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_ListAccessPolicies.go b/service/opensearchserverless/api_op_ListAccessPolicies.go index ea55d0c7fde..8fe81452ffd 100644 --- a/service/opensearchserverless/api_op_ListAccessPolicies.go +++ b/service/opensearchserverless/api_op_ListAccessPolicies.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessPoliciesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListAccessPoliciesMiddlewares(stack *middleware.Sta return nil } -// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies -// operation. -type ListAccessPoliciesAPIClient interface { - ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) -} - -var _ ListAccessPoliciesAPIClient = (*Client)(nil) - // ListAccessPoliciesPaginatorOptions is the paginator options for // ListAccessPolicies type ListAccessPoliciesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListAccessPoliciesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAccessPoliciesAPIClient is a client that implements the ListAccessPolicies +// operation. +type ListAccessPoliciesAPIClient interface { + ListAccessPolicies(context.Context, *ListAccessPoliciesInput, ...func(*Options)) (*ListAccessPoliciesOutput, error) +} + +var _ ListAccessPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearchserverless/api_op_ListCollections.go b/service/opensearchserverless/api_op_ListCollections.go index f508ec59a02..ac0df91f887 100644 --- a/service/opensearchserverless/api_op_ListCollections.go +++ b/service/opensearchserverless/api_op_ListCollections.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListCollectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCollections(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListCollectionsMiddlewares(stack *middleware.Stack, return nil } -// ListCollectionsAPIClient is a client that implements the ListCollections -// operation. -type ListCollectionsAPIClient interface { - ListCollections(context.Context, *ListCollectionsInput, ...func(*Options)) (*ListCollectionsOutput, error) -} - -var _ ListCollectionsAPIClient = (*Client)(nil) - // ListCollectionsPaginatorOptions is the paginator options for ListCollections type ListCollectionsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -203,6 +198,9 @@ func (p *ListCollectionsPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListCollectionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListCollectionsAPIClient is a client that implements the ListCollections +// operation. +type ListCollectionsAPIClient interface { + ListCollections(context.Context, *ListCollectionsInput, ...func(*Options)) (*ListCollectionsOutput, error) +} + +var _ ListCollectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearchserverless/api_op_ListLifecyclePolicies.go b/service/opensearchserverless/api_op_ListLifecyclePolicies.go index af487b0f034..9d08e7169dd 100644 --- a/service/opensearchserverless/api_op_ListLifecyclePolicies.go +++ b/service/opensearchserverless/api_op_ListLifecyclePolicies.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListLifecyclePoliciesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLifecyclePoliciesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListLifecyclePoliciesMiddlewares(stack *middleware. return nil } -// ListLifecyclePoliciesAPIClient is a client that implements the -// ListLifecyclePolicies operation. -type ListLifecyclePoliciesAPIClient interface { - ListLifecyclePolicies(context.Context, *ListLifecyclePoliciesInput, ...func(*Options)) (*ListLifecyclePoliciesOutput, error) -} - -var _ ListLifecyclePoliciesAPIClient = (*Client)(nil) - // ListLifecyclePoliciesPaginatorOptions is the paginator options for // ListLifecyclePolicies type ListLifecyclePoliciesPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListLifecyclePoliciesPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLifecyclePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListLifecyclePoliciesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListLifecyclePoliciesAPIClient is a client that implements the +// ListLifecyclePolicies operation. +type ListLifecyclePoliciesAPIClient interface { + ListLifecyclePolicies(context.Context, *ListLifecyclePoliciesInput, ...func(*Options)) (*ListLifecyclePoliciesOutput, error) +} + +var _ ListLifecyclePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLifecyclePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearchserverless/api_op_ListSecurityConfigs.go b/service/opensearchserverless/api_op_ListSecurityConfigs.go index b3ac17a5407..8da095d4002 100644 --- a/service/opensearchserverless/api_op_ListSecurityConfigs.go +++ b/service/opensearchserverless/api_op_ListSecurityConfigs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListSecurityConfigsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityConfigsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListSecurityConfigsMiddlewares(stack *middleware.St return nil } -// ListSecurityConfigsAPIClient is a client that implements the -// ListSecurityConfigs operation. -type ListSecurityConfigsAPIClient interface { - ListSecurityConfigs(context.Context, *ListSecurityConfigsInput, ...func(*Options)) (*ListSecurityConfigsOutput, error) -} - -var _ ListSecurityConfigsAPIClient = (*Client)(nil) - // ListSecurityConfigsPaginatorOptions is the paginator options for // ListSecurityConfigs type ListSecurityConfigsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListSecurityConfigsPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListSecurityConfigsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListSecurityConfigsAPIClient is a client that implements the +// ListSecurityConfigs operation. +type ListSecurityConfigsAPIClient interface { + ListSecurityConfigs(context.Context, *ListSecurityConfigsInput, ...func(*Options)) (*ListSecurityConfigsOutput, error) +} + +var _ ListSecurityConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearchserverless/api_op_ListSecurityPolicies.go b/service/opensearchserverless/api_op_ListSecurityPolicies.go index fa71c175496..191ac5018fc 100644 --- a/service/opensearchserverless/api_op_ListSecurityPolicies.go +++ b/service/opensearchserverless/api_op_ListSecurityPolicies.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListSecurityPoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecurityPoliciesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListSecurityPoliciesMiddlewares(stack *middleware.S return nil } -// ListSecurityPoliciesAPIClient is a client that implements the -// ListSecurityPolicies operation. -type ListSecurityPoliciesAPIClient interface { - ListSecurityPolicies(context.Context, *ListSecurityPoliciesInput, ...func(*Options)) (*ListSecurityPoliciesOutput, error) -} - -var _ ListSecurityPoliciesAPIClient = (*Client)(nil) - // ListSecurityPoliciesPaginatorOptions is the paginator options for // ListSecurityPolicies type ListSecurityPoliciesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListSecurityPoliciesPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListSecurityPoliciesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSecurityPoliciesAPIClient is a client that implements the +// ListSecurityPolicies operation. +type ListSecurityPoliciesAPIClient interface { + ListSecurityPolicies(context.Context, *ListSecurityPoliciesInput, ...func(*Options)) (*ListSecurityPoliciesOutput, error) +} + +var _ ListSecurityPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearchserverless/api_op_ListTagsForResource.go b/service/opensearchserverless/api_op_ListTagsForResource.go index a6cf004af0d..3a69577bed8 100644 --- a/service/opensearchserverless/api_op_ListTagsForResource.go +++ b/service/opensearchserverless/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_ListVpcEndpoints.go b/service/opensearchserverless/api_op_ListVpcEndpoints.go index e782935f372..46a0ee7b1a4 100644 --- a/service/opensearchserverless/api_op_ListVpcEndpoints.go +++ b/service/opensearchserverless/api_op_ListVpcEndpoints.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListVpcEndpointsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVpcEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListVpcEndpointsMiddlewares(stack *middleware.Stack return nil } -// ListVpcEndpointsAPIClient is a client that implements the ListVpcEndpoints -// operation. -type ListVpcEndpointsAPIClient interface { - ListVpcEndpoints(context.Context, *ListVpcEndpointsInput, ...func(*Options)) (*ListVpcEndpointsOutput, error) -} - -var _ ListVpcEndpointsAPIClient = (*Client)(nil) - // ListVpcEndpointsPaginatorOptions is the paginator options for ListVpcEndpoints type ListVpcEndpointsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -202,6 +197,9 @@ func (p *ListVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVpcEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListVpcEndpointsAPIClient is a client that implements the ListVpcEndpoints +// operation. +type ListVpcEndpointsAPIClient interface { + ListVpcEndpoints(context.Context, *ListVpcEndpointsInput, ...func(*Options)) (*ListVpcEndpointsOutput, error) +} + +var _ ListVpcEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVpcEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opensearchserverless/api_op_TagResource.go b/service/opensearchserverless/api_op_TagResource.go index a42b0a4975b..f166aa6fa8b 100644 --- a/service/opensearchserverless/api_op_TagResource.go +++ b/service/opensearchserverless/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UntagResource.go b/service/opensearchserverless/api_op_UntagResource.go index 792bf92dc5c..f9640acf7fd 100644 --- a/service/opensearchserverless/api_op_UntagResource.go +++ b/service/opensearchserverless/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateAccessPolicy.go b/service/opensearchserverless/api_op_UpdateAccessPolicy.go index 40400cd1637..75474cd151f 100644 --- a/service/opensearchserverless/api_op_UpdateAccessPolicy.go +++ b/service/opensearchserverless/api_op_UpdateAccessPolicy.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateAccessPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateAccessPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateAccountSettings.go b/service/opensearchserverless/api_op_UpdateAccountSettings.go index 26d61c3bf18..29a1422c00a 100644 --- a/service/opensearchserverless/api_op_UpdateAccountSettings.go +++ b/service/opensearchserverless/api_op_UpdateAccountSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateCollection.go b/service/opensearchserverless/api_op_UpdateCollection.go index eb3a19fc876..71b95d54253 100644 --- a/service/opensearchserverless/api_op_UpdateCollection.go +++ b/service/opensearchserverless/api_op_UpdateCollection.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateCollectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateCollectionMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go b/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go index bf6da6cc2f8..6c7d8340c5c 100644 --- a/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go +++ b/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateLifecyclePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateLifecyclePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateSecurityConfig.go b/service/opensearchserverless/api_op_UpdateSecurityConfig.go index d8840168669..6ad4691a438 100644 --- a/service/opensearchserverless/api_op_UpdateSecurityConfig.go +++ b/service/opensearchserverless/api_op_UpdateSecurityConfig.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSecurityConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateSecurityConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateSecurityPolicy.go b/service/opensearchserverless/api_op_UpdateSecurityPolicy.go index 8a523a24ee1..fd8038feb82 100644 --- a/service/opensearchserverless/api_op_UpdateSecurityPolicy.go +++ b/service/opensearchserverless/api_op_UpdateSecurityPolicy.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateSecurityPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateSecurityPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/opensearchserverless/api_op_UpdateVpcEndpoint.go b/service/opensearchserverless/api_op_UpdateVpcEndpoint.go index 62f5f36f62e..fe4295437d3 100644 --- a/service/opensearchserverless/api_op_UpdateVpcEndpoint.go +++ b/service/opensearchserverless/api_op_UpdateVpcEndpoint.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateVpcEndpointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateVpcEndpointMiddleware(stack, options); err != nil { return err } diff --git a/service/opsworks/api_client.go b/service/opsworks/api_client.go index d36f78a4a34..4fcfbb5e03d 100644 --- a/service/opsworks/api_client.go +++ b/service/opsworks/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/opsworks/api_op_AssignInstance.go b/service/opsworks/api_op_AssignInstance.go index d2be8cc37e5..ebc0453c6e1 100644 --- a/service/opsworks/api_op_AssignInstance.go +++ b/service/opsworks/api_op_AssignInstance.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAssignInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssignInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_AssignVolume.go b/service/opsworks/api_op_AssignVolume.go index 09c395389ac..d50bf982d2c 100644 --- a/service/opsworks/api_op_AssignVolume.go +++ b/service/opsworks/api_op_AssignVolume.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssignVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssignVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_AssociateElasticIp.go b/service/opsworks/api_op_AssociateElasticIp.go index 8ca0434d35e..d0c4a8866eb 100644 --- a/service/opsworks/api_op_AssociateElasticIp.go +++ b/service/opsworks/api_op_AssociateElasticIp.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAssociateElasticIpMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateElasticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_AttachElasticLoadBalancer.go b/service/opsworks/api_op_AttachElasticLoadBalancer.go index 2ad0950aa31..d1796007568 100644 --- a/service/opsworks/api_op_AttachElasticLoadBalancer.go +++ b/service/opsworks/api_op_AttachElasticLoadBalancer.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAttachElasticLoadBalancerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachElasticLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CloneStack.go b/service/opsworks/api_op_CloneStack.go index 656593b6a7b..25e1b5a5a95 100644 --- a/service/opsworks/api_op_CloneStack.go +++ b/service/opsworks/api_op_CloneStack.go @@ -359,6 +359,9 @@ func (c *Client) addOperationCloneStackMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloneStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CreateApp.go b/service/opsworks/api_op_CreateApp.go index 2bfb59ab1b4..2ae410200f3 100644 --- a/service/opsworks/api_op_CreateApp.go +++ b/service/opsworks/api_op_CreateApp.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CreateDeployment.go b/service/opsworks/api_op_CreateDeployment.go index 552b423fe57..9becd7a9006 100644 --- a/service/opsworks/api_op_CreateDeployment.go +++ b/service/opsworks/api_op_CreateDeployment.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CreateInstance.go b/service/opsworks/api_op_CreateInstance.go index c6515973874..b253818b8c4 100644 --- a/service/opsworks/api_op_CreateInstance.go +++ b/service/opsworks/api_op_CreateInstance.go @@ -261,6 +261,9 @@ func (c *Client) addOperationCreateInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CreateLayer.go b/service/opsworks/api_op_CreateLayer.go index d0f0509fc68..302012c78db 100644 --- a/service/opsworks/api_op_CreateLayer.go +++ b/service/opsworks/api_op_CreateLayer.go @@ -216,6 +216,9 @@ func (c *Client) addOperationCreateLayerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLayerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CreateStack.go b/service/opsworks/api_op_CreateStack.go index 5b3c694ec28..142727ff89a 100644 --- a/service/opsworks/api_op_CreateStack.go +++ b/service/opsworks/api_op_CreateStack.go @@ -360,6 +360,9 @@ func (c *Client) addOperationCreateStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_CreateUserProfile.go b/service/opsworks/api_op_CreateUserProfile.go index 35c822748fb..e4d2bdf27ad 100644 --- a/service/opsworks/api_op_CreateUserProfile.go +++ b/service/opsworks/api_op_CreateUserProfile.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeleteApp.go b/service/opsworks/api_op_DeleteApp.go index a711f476bb7..fa953f9f33a 100644 --- a/service/opsworks/api_op_DeleteApp.go +++ b/service/opsworks/api_op_DeleteApp.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeleteInstance.go b/service/opsworks/api_op_DeleteInstance.go index f9e3c70f9e4..e16892b6f43 100644 --- a/service/opsworks/api_op_DeleteInstance.go +++ b/service/opsworks/api_op_DeleteInstance.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeleteLayer.go b/service/opsworks/api_op_DeleteLayer.go index 0e3b7ef0705..a3e1631efbd 100644 --- a/service/opsworks/api_op_DeleteLayer.go +++ b/service/opsworks/api_op_DeleteLayer.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteLayerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLayerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeleteStack.go b/service/opsworks/api_op_DeleteStack.go index 9b6786e89ec..2708919f488 100644 --- a/service/opsworks/api_op_DeleteStack.go +++ b/service/opsworks/api_op_DeleteStack.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeleteUserProfile.go b/service/opsworks/api_op_DeleteUserProfile.go index 6cba9e67876..29be2f6a107 100644 --- a/service/opsworks/api_op_DeleteUserProfile.go +++ b/service/opsworks/api_op_DeleteUserProfile.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeregisterEcsCluster.go b/service/opsworks/api_op_DeregisterEcsCluster.go index 1006db9fe62..518a70dc308 100644 --- a/service/opsworks/api_op_DeregisterEcsCluster.go +++ b/service/opsworks/api_op_DeregisterEcsCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeregisterEcsClusterMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterEcsClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeregisterElasticIp.go b/service/opsworks/api_op_DeregisterElasticIp.go index 2fc06be9824..e84d116858e 100644 --- a/service/opsworks/api_op_DeregisterElasticIp.go +++ b/service/opsworks/api_op_DeregisterElasticIp.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeregisterElasticIpMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterElasticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeregisterInstance.go b/service/opsworks/api_op_DeregisterInstance.go index afbf9abf0b0..511e2ab7401 100644 --- a/service/opsworks/api_op_DeregisterInstance.go +++ b/service/opsworks/api_op_DeregisterInstance.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeregisterInstanceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeregisterRdsDbInstance.go b/service/opsworks/api_op_DeregisterRdsDbInstance.go index f87e305e9c2..e8a34a2906a 100644 --- a/service/opsworks/api_op_DeregisterRdsDbInstance.go +++ b/service/opsworks/api_op_DeregisterRdsDbInstance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeregisterRdsDbInstanceMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterRdsDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DeregisterVolume.go b/service/opsworks/api_op_DeregisterVolume.go index 7c2e30daa9f..3e90c016802 100644 --- a/service/opsworks/api_op_DeregisterVolume.go +++ b/service/opsworks/api_op_DeregisterVolume.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeregisterVolumeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeAgentVersions.go b/service/opsworks/api_op_DescribeAgentVersions.go index 0c869e0c5aa..a28a5a8f7d6 100644 --- a/service/opsworks/api_op_DescribeAgentVersions.go +++ b/service/opsworks/api_op_DescribeAgentVersions.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeAgentVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAgentVersions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeApps.go b/service/opsworks/api_op_DescribeApps.go index 416d725b23d..c1e4d88afdc 100644 --- a/service/opsworks/api_op_DescribeApps.go +++ b/service/opsworks/api_op_DescribeApps.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeAppsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApps(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationDescribeAppsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeAppsAPIClient is a client that implements the DescribeApps operation. -type DescribeAppsAPIClient interface { - DescribeApps(context.Context, *DescribeAppsInput, ...func(*Options)) (*DescribeAppsOutput, error) -} - -var _ DescribeAppsAPIClient = (*Client)(nil) - // AppExistsWaiterOptions are waiter options for AppExistsWaiter type AppExistsWaiterOptions struct { @@ -264,7 +260,13 @@ func (w *AppExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeApp } out, err := w.client.DescribeApps(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -313,6 +315,13 @@ func appExistsStateRetryable(ctx context.Context, input *DescribeAppsInput, outp return true, nil } +// DescribeAppsAPIClient is a client that implements the DescribeApps operation. +type DescribeAppsAPIClient interface { + DescribeApps(context.Context, *DescribeAppsInput, ...func(*Options)) (*DescribeAppsOutput, error) +} + +var _ DescribeAppsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeApps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworks/api_op_DescribeCommands.go b/service/opsworks/api_op_DescribeCommands.go index eab003f9572..359e3504042 100644 --- a/service/opsworks/api_op_DescribeCommands.go +++ b/service/opsworks/api_op_DescribeCommands.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeCommandsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCommands(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeDeployments.go b/service/opsworks/api_op_DescribeDeployments.go index 66dde7f3eee..7458a206293 100644 --- a/service/opsworks/api_op_DescribeDeployments.go +++ b/service/opsworks/api_op_DescribeDeployments.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeDeploymentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDeployments(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeDeploymentsMiddlewares(stack *middleware.St return nil } -// DescribeDeploymentsAPIClient is a client that implements the -// DescribeDeployments operation. -type DescribeDeploymentsAPIClient interface { - DescribeDeployments(context.Context, *DescribeDeploymentsInput, ...func(*Options)) (*DescribeDeploymentsOutput, error) -} - -var _ DescribeDeploymentsAPIClient = (*Client)(nil) - // DeploymentSuccessfulWaiterOptions are waiter options for // DeploymentSuccessfulWaiter type DeploymentSuccessfulWaiterOptions struct { @@ -273,7 +268,13 @@ func (w *DeploymentSuccessfulWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeDeployments(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -370,6 +371,14 @@ func deploymentSuccessfulStateRetryable(ctx context.Context, input *DescribeDepl return true, nil } +// DescribeDeploymentsAPIClient is a client that implements the +// DescribeDeployments operation. +type DescribeDeploymentsAPIClient interface { + DescribeDeployments(context.Context, *DescribeDeploymentsInput, ...func(*Options)) (*DescribeDeploymentsOutput, error) +} + +var _ DescribeDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworks/api_op_DescribeEcsClusters.go b/service/opsworks/api_op_DescribeEcsClusters.go index 96332cc06a1..ed848237320 100644 --- a/service/opsworks/api_op_DescribeEcsClusters.go +++ b/service/opsworks/api_op_DescribeEcsClusters.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeEcsClustersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEcsClusters(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeEcsClustersMiddlewares(stack *middleware.St return nil } -// DescribeEcsClustersAPIClient is a client that implements the -// DescribeEcsClusters operation. -type DescribeEcsClustersAPIClient interface { - DescribeEcsClusters(context.Context, *DescribeEcsClustersInput, ...func(*Options)) (*DescribeEcsClustersOutput, error) -} - -var _ DescribeEcsClustersAPIClient = (*Client)(nil) - // DescribeEcsClustersPaginatorOptions is the paginator options for // DescribeEcsClusters type DescribeEcsClustersPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeEcsClustersPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEcsClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeEcsClustersPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeEcsClustersAPIClient is a client that implements the +// DescribeEcsClusters operation. +type DescribeEcsClustersAPIClient interface { + DescribeEcsClusters(context.Context, *DescribeEcsClustersInput, ...func(*Options)) (*DescribeEcsClustersOutput, error) +} + +var _ DescribeEcsClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEcsClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworks/api_op_DescribeElasticIps.go b/service/opsworks/api_op_DescribeElasticIps.go index dd233f8b1c2..8c9a223003a 100644 --- a/service/opsworks/api_op_DescribeElasticIps.go +++ b/service/opsworks/api_op_DescribeElasticIps.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeElasticIpsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeElasticIps(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeElasticLoadBalancers.go b/service/opsworks/api_op_DescribeElasticLoadBalancers.go index 27226c79d61..5d6eb7bd48f 100644 --- a/service/opsworks/api_op_DescribeElasticLoadBalancers.go +++ b/service/opsworks/api_op_DescribeElasticLoadBalancers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeElasticLoadBalancersMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeElasticLoadBalancers(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeInstances.go b/service/opsworks/api_op_DescribeInstances.go index 3e1d54b9671..39440953ba2 100644 --- a/service/opsworks/api_op_DescribeInstances.go +++ b/service/opsworks/api_op_DescribeInstances.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstances(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stac return nil } -// DescribeInstancesAPIClient is a client that implements the DescribeInstances -// operation. -type DescribeInstancesAPIClient interface { - DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) -} - -var _ DescribeInstancesAPIClient = (*Client)(nil) - // InstanceOnlineWaiterOptions are waiter options for InstanceOnlineWaiter type InstanceOnlineWaiterOptions struct { @@ -272,7 +267,13 @@ func (w *InstanceOnlineWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -652,7 +653,13 @@ func (w *InstanceRegisteredWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1008,7 +1015,13 @@ func (w *InstanceStoppedWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1388,7 +1401,13 @@ func (w *InstanceTerminatedWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1660,6 +1679,14 @@ func instanceTerminatedStateRetryable(ctx context.Context, input *DescribeInstan return true, nil } +// DescribeInstancesAPIClient is a client that implements the DescribeInstances +// operation. +type DescribeInstancesAPIClient interface { + DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) +} + +var _ DescribeInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworks/api_op_DescribeLayers.go b/service/opsworks/api_op_DescribeLayers.go index d8c108336d3..4d756be7f02 100644 --- a/service/opsworks/api_op_DescribeLayers.go +++ b/service/opsworks/api_op_DescribeLayers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeLayersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLayers(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeLoadBasedAutoScaling.go b/service/opsworks/api_op_DescribeLoadBasedAutoScaling.go index 4cacf87c0fd..47cbeeb45d1 100644 --- a/service/opsworks/api_op_DescribeLoadBasedAutoScaling.go +++ b/service/opsworks/api_op_DescribeLoadBasedAutoScaling.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeLoadBasedAutoScalingMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoadBasedAutoScalingValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeMyUserProfile.go b/service/opsworks/api_op_DescribeMyUserProfile.go index ad0e3e86f63..0a8321bf8c1 100644 --- a/service/opsworks/api_op_DescribeMyUserProfile.go +++ b/service/opsworks/api_op_DescribeMyUserProfile.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeMyUserProfileMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMyUserProfile(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeOperatingSystems.go b/service/opsworks/api_op_DescribeOperatingSystems.go index 8f8d7173ad6..30325ebd113 100644 --- a/service/opsworks/api_op_DescribeOperatingSystems.go +++ b/service/opsworks/api_op_DescribeOperatingSystems.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDescribeOperatingSystemsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOperatingSystems(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribePermissions.go b/service/opsworks/api_op_DescribePermissions.go index 7f958f4abee..3e8f4b48b2c 100644 --- a/service/opsworks/api_op_DescribePermissions.go +++ b/service/opsworks/api_op_DescribePermissions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribePermissionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePermissions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeRaidArrays.go b/service/opsworks/api_op_DescribeRaidArrays.go index dc2406ee88e..7d79c384a3b 100644 --- a/service/opsworks/api_op_DescribeRaidArrays.go +++ b/service/opsworks/api_op_DescribeRaidArrays.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeRaidArraysMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRaidArrays(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeRdsDbInstances.go b/service/opsworks/api_op_DescribeRdsDbInstances.go index a51a792d0bf..d4ea8de6d6f 100644 --- a/service/opsworks/api_op_DescribeRdsDbInstances.go +++ b/service/opsworks/api_op_DescribeRdsDbInstances.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeRdsDbInstancesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRdsDbInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeServiceErrors.go b/service/opsworks/api_op_DescribeServiceErrors.go index 9a4d2cfbc0a..ccd3cde99eb 100644 --- a/service/opsworks/api_op_DescribeServiceErrors.go +++ b/service/opsworks/api_op_DescribeServiceErrors.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeServiceErrorsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServiceErrors(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeStackProvisioningParameters.go b/service/opsworks/api_op_DescribeStackProvisioningParameters.go index 05a9ba3d382..01d7f90cab5 100644 --- a/service/opsworks/api_op_DescribeStackProvisioningParameters.go +++ b/service/opsworks/api_op_DescribeStackProvisioningParameters.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeStackProvisioningParametersMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackProvisioningParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeStackSummary.go b/service/opsworks/api_op_DescribeStackSummary.go index b9fc7152291..181602951df 100644 --- a/service/opsworks/api_op_DescribeStackSummary.go +++ b/service/opsworks/api_op_DescribeStackSummary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeStackSummaryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStackSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeStacks.go b/service/opsworks/api_op_DescribeStacks.go index bb5d6d4936b..525211bee69 100644 --- a/service/opsworks/api_op_DescribeStacks.go +++ b/service/opsworks/api_op_DescribeStacks.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeStacksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStacks(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeTimeBasedAutoScaling.go b/service/opsworks/api_op_DescribeTimeBasedAutoScaling.go index 9f2bcdfdc54..d7d4ba2d7d7 100644 --- a/service/opsworks/api_op_DescribeTimeBasedAutoScaling.go +++ b/service/opsworks/api_op_DescribeTimeBasedAutoScaling.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeTimeBasedAutoScalingMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTimeBasedAutoScalingValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeUserProfiles.go b/service/opsworks/api_op_DescribeUserProfiles.go index 091bb3e3d2d..178344088e2 100644 --- a/service/opsworks/api_op_DescribeUserProfiles.go +++ b/service/opsworks/api_op_DescribeUserProfiles.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeUserProfilesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUserProfiles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DescribeVolumes.go b/service/opsworks/api_op_DescribeVolumes.go index 924cadbe5b9..33d3ff8eb42 100644 --- a/service/opsworks/api_op_DescribeVolumes.go +++ b/service/opsworks/api_op_DescribeVolumes.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_DetachElasticLoadBalancer.go b/service/opsworks/api_op_DetachElasticLoadBalancer.go index 5144adfef01..12985afab02 100644 --- a/service/opsworks/api_op_DetachElasticLoadBalancer.go +++ b/service/opsworks/api_op_DetachElasticLoadBalancer.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDetachElasticLoadBalancerMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachElasticLoadBalancerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_DisassociateElasticIp.go b/service/opsworks/api_op_DisassociateElasticIp.go index 77597518496..0b34efdb974 100644 --- a/service/opsworks/api_op_DisassociateElasticIp.go +++ b/service/opsworks/api_op_DisassociateElasticIp.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisassociateElasticIpMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateElasticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_GetHostnameSuggestion.go b/service/opsworks/api_op_GetHostnameSuggestion.go index 82609c542f5..93a9dc61952 100644 --- a/service/opsworks/api_op_GetHostnameSuggestion.go +++ b/service/opsworks/api_op_GetHostnameSuggestion.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetHostnameSuggestionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostnameSuggestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_GrantAccess.go b/service/opsworks/api_op_GrantAccess.go index 83c97b6be7b..c133abcede9 100644 --- a/service/opsworks/api_op_GrantAccess.go +++ b/service/opsworks/api_op_GrantAccess.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGrantAccessMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGrantAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_ListTags.go b/service/opsworks/api_op_ListTags.go index 9d2e09e3ed8..311035016c9 100644 --- a/service/opsworks/api_op_ListTags.go +++ b/service/opsworks/api_op_ListTags.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_RebootInstance.go b/service/opsworks/api_op_RebootInstance.go index 80ba304f0a7..effcc247246 100644 --- a/service/opsworks/api_op_RebootInstance.go +++ b/service/opsworks/api_op_RebootInstance.go @@ -108,6 +108,9 @@ func (c *Client) addOperationRebootInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_RegisterEcsCluster.go b/service/opsworks/api_op_RegisterEcsCluster.go index 95ce10bc9ed..c5557670de8 100644 --- a/service/opsworks/api_op_RegisterEcsCluster.go +++ b/service/opsworks/api_op_RegisterEcsCluster.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRegisterEcsClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterEcsClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_RegisterElasticIp.go b/service/opsworks/api_op_RegisterElasticIp.go index b3e0ebcbfbb..1ba06806ef7 100644 --- a/service/opsworks/api_op_RegisterElasticIp.go +++ b/service/opsworks/api_op_RegisterElasticIp.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRegisterElasticIpMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterElasticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_RegisterInstance.go b/service/opsworks/api_op_RegisterInstance.go index 75274478f32..5c7676025c6 100644 --- a/service/opsworks/api_op_RegisterInstance.go +++ b/service/opsworks/api_op_RegisterInstance.go @@ -152,6 +152,9 @@ func (c *Client) addOperationRegisterInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_RegisterRdsDbInstance.go b/service/opsworks/api_op_RegisterRdsDbInstance.go index 1c1950230ea..fcc3546481c 100644 --- a/service/opsworks/api_op_RegisterRdsDbInstance.go +++ b/service/opsworks/api_op_RegisterRdsDbInstance.go @@ -122,6 +122,9 @@ func (c *Client) addOperationRegisterRdsDbInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterRdsDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_RegisterVolume.go b/service/opsworks/api_op_RegisterVolume.go index 7a616e5c006..661efebbc32 100644 --- a/service/opsworks/api_op_RegisterVolume.go +++ b/service/opsworks/api_op_RegisterVolume.go @@ -118,6 +118,9 @@ func (c *Client) addOperationRegisterVolumeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_SetLoadBasedAutoScaling.go b/service/opsworks/api_op_SetLoadBasedAutoScaling.go index bbac030b335..eed0c65fa02 100644 --- a/service/opsworks/api_op_SetLoadBasedAutoScaling.go +++ b/service/opsworks/api_op_SetLoadBasedAutoScaling.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSetLoadBasedAutoScalingMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLoadBasedAutoScalingValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_SetPermission.go b/service/opsworks/api_op_SetPermission.go index 90177faa4e2..6a43c27c7d9 100644 --- a/service/opsworks/api_op_SetPermission.go +++ b/service/opsworks/api_op_SetPermission.go @@ -137,6 +137,9 @@ func (c *Client) addOperationSetPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_SetTimeBasedAutoScaling.go b/service/opsworks/api_op_SetTimeBasedAutoScaling.go index 4dbc262bc63..a4f32f9b8e1 100644 --- a/service/opsworks/api_op_SetTimeBasedAutoScaling.go +++ b/service/opsworks/api_op_SetTimeBasedAutoScaling.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSetTimeBasedAutoScalingMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTimeBasedAutoScalingValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_StartInstance.go b/service/opsworks/api_op_StartInstance.go index d3ea021a651..b43eceb27af 100644 --- a/service/opsworks/api_op_StartInstance.go +++ b/service/opsworks/api_op_StartInstance.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartInstanceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_StartStack.go b/service/opsworks/api_op_StartStack.go index 09659d7a43c..79e9d71ecf7 100644 --- a/service/opsworks/api_op_StartStack.go +++ b/service/opsworks/api_op_StartStack.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartStackMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_StopInstance.go b/service/opsworks/api_op_StopInstance.go index dc14c56bae9..c9055fb4e47 100644 --- a/service/opsworks/api_op_StopInstance.go +++ b/service/opsworks/api_op_StopInstance.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStopInstanceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_StopStack.go b/service/opsworks/api_op_StopStack.go index 52f56d10bbb..087d377e827 100644 --- a/service/opsworks/api_op_StopStack.go +++ b/service/opsworks/api_op_StopStack.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopStackMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_TagResource.go b/service/opsworks/api_op_TagResource.go index 327e70d1a22..ac7cf3c5d68 100644 --- a/service/opsworks/api_op_TagResource.go +++ b/service/opsworks/api_op_TagResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UnassignInstance.go b/service/opsworks/api_op_UnassignInstance.go index 4af860da17d..0fe22f99ab7 100644 --- a/service/opsworks/api_op_UnassignInstance.go +++ b/service/opsworks/api_op_UnassignInstance.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUnassignInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnassignInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UnassignVolume.go b/service/opsworks/api_op_UnassignVolume.go index 655815838e3..5d9672561e3 100644 --- a/service/opsworks/api_op_UnassignVolume.go +++ b/service/opsworks/api_op_UnassignVolume.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUnassignVolumeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnassignVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UntagResource.go b/service/opsworks/api_op_UntagResource.go index cdb72795343..2b631c46913 100644 --- a/service/opsworks/api_op_UntagResource.go +++ b/service/opsworks/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateApp.go b/service/opsworks/api_op_UpdateApp.go index 408e0eca35c..1c1d345d6d1 100644 --- a/service/opsworks/api_op_UpdateApp.go +++ b/service/opsworks/api_op_UpdateApp.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateElasticIp.go b/service/opsworks/api_op_UpdateElasticIp.go index f696fa0d065..a56d6827f13 100644 --- a/service/opsworks/api_op_UpdateElasticIp.go +++ b/service/opsworks/api_op_UpdateElasticIp.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateElasticIpMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateElasticIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateInstance.go b/service/opsworks/api_op_UpdateInstance.go index 281a0ec9567..ea8af8c22d1 100644 --- a/service/opsworks/api_op_UpdateInstance.go +++ b/service/opsworks/api_op_UpdateInstance.go @@ -212,6 +212,9 @@ func (c *Client) addOperationUpdateInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateLayer.go b/service/opsworks/api_op_UpdateLayer.go index 8dafbcf6f8a..2611b102844 100644 --- a/service/opsworks/api_op_UpdateLayer.go +++ b/service/opsworks/api_op_UpdateLayer.go @@ -188,6 +188,9 @@ func (c *Client) addOperationUpdateLayerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLayerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateMyUserProfile.go b/service/opsworks/api_op_UpdateMyUserProfile.go index b94f31deb55..73478330a3f 100644 --- a/service/opsworks/api_op_UpdateMyUserProfile.go +++ b/service/opsworks/api_op_UpdateMyUserProfile.go @@ -105,6 +105,9 @@ func (c *Client) addOperationUpdateMyUserProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMyUserProfile(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateRdsDbInstance.go b/service/opsworks/api_op_UpdateRdsDbInstance.go index 3b83d764f9a..8b3daf3ad70 100644 --- a/service/opsworks/api_op_UpdateRdsDbInstance.go +++ b/service/opsworks/api_op_UpdateRdsDbInstance.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateRdsDbInstanceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRdsDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateStack.go b/service/opsworks/api_op_UpdateStack.go index 120ced17351..272b1aa92c6 100644 --- a/service/opsworks/api_op_UpdateStack.go +++ b/service/opsworks/api_op_UpdateStack.go @@ -295,6 +295,9 @@ func (c *Client) addOperationUpdateStackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateUserProfile.go b/service/opsworks/api_op_UpdateUserProfile.go index 95df8c712b3..a4ca326f069 100644 --- a/service/opsworks/api_op_UpdateUserProfile.go +++ b/service/opsworks/api_op_UpdateUserProfile.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworks/api_op_UpdateVolume.go b/service/opsworks/api_op_UpdateVolume.go index e7c1c926e00..2351f87910b 100644 --- a/service/opsworks/api_op_UpdateVolume.go +++ b/service/opsworks/api_op_UpdateVolume.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_client.go b/service/opsworkscm/api_client.go index 5225a1f1f24..5b72e8ea6b1 100644 --- a/service/opsworkscm/api_client.go +++ b/service/opsworkscm/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/opsworkscm/api_op_AssociateNode.go b/service/opsworkscm/api_op_AssociateNode.go index 92ad7db3341..b0784a0216d 100644 --- a/service/opsworkscm/api_op_AssociateNode.go +++ b/service/opsworkscm/api_op_AssociateNode.go @@ -153,6 +153,9 @@ func (c *Client) addOperationAssociateNodeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_CreateBackup.go b/service/opsworkscm/api_op_CreateBackup.go index a6f9e73b911..3c042a2a2a9 100644 --- a/service/opsworkscm/api_op_CreateBackup.go +++ b/service/opsworkscm/api_op_CreateBackup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_CreateServer.go b/service/opsworkscm/api_op_CreateServer.go index 6ec01085db4..8048b514a50 100644 --- a/service/opsworkscm/api_op_CreateServer.go +++ b/service/opsworkscm/api_op_CreateServer.go @@ -338,6 +338,9 @@ func (c *Client) addOperationCreateServerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_DeleteBackup.go b/service/opsworkscm/api_op_DeleteBackup.go index efcf5423ee2..95c5a5b6be3 100644 --- a/service/opsworkscm/api_op_DeleteBackup.go +++ b/service/opsworkscm/api_op_DeleteBackup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteBackupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_DeleteServer.go b/service/opsworkscm/api_op_DeleteServer.go index 3672ca7176c..e05fda91fd1 100644 --- a/service/opsworkscm/api_op_DeleteServer.go +++ b/service/opsworkscm/api_op_DeleteServer.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteServerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_DescribeAccountAttributes.go b/service/opsworkscm/api_op_DescribeAccountAttributes.go index beda6b63e5f..8da3d9fcd75 100644 --- a/service/opsworkscm/api_op_DescribeAccountAttributes.go +++ b/service/opsworkscm/api_op_DescribeAccountAttributes.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/opsworkscm/api_op_DescribeBackups.go b/service/opsworkscm/api_op_DescribeBackups.go index 2e2e7cc8897..21ff9e42f95 100644 --- a/service/opsworkscm/api_op_DescribeBackups.go +++ b/service/opsworkscm/api_op_DescribeBackups.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeBackupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBackups(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeBackupsMiddlewares(stack *middleware.Stack, return nil } -// DescribeBackupsAPIClient is a client that implements the DescribeBackups -// operation. -type DescribeBackupsAPIClient interface { - DescribeBackups(context.Context, *DescribeBackupsInput, ...func(*Options)) (*DescribeBackupsOutput, error) -} - -var _ DescribeBackupsAPIClient = (*Client)(nil) - // DescribeBackupsPaginatorOptions is the paginator options for DescribeBackups type DescribeBackupsPaginatorOptions struct { // This is not currently implemented for DescribeBackups requests. @@ -215,6 +210,9 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBackups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeBackupsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeBackupsAPIClient is a client that implements the DescribeBackups +// operation. +type DescribeBackupsAPIClient interface { + DescribeBackups(context.Context, *DescribeBackupsInput, ...func(*Options)) (*DescribeBackupsOutput, error) +} + +var _ DescribeBackupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBackups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworkscm/api_op_DescribeEvents.go b/service/opsworkscm/api_op_DescribeEvents.go index 7bb5d2dd928..3ca16282d8e 100644 --- a/service/opsworkscm/api_op_DescribeEvents.go +++ b/service/opsworkscm/api_op_DescribeEvents.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // To receive a paginated response, use this parameter to specify the maximum @@ -235,6 +230,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go b/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go index 819c20534f1..a42537f9da2 100644 --- a/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go +++ b/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeNodeAssociationStatusMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNodeAssociationStatusValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeNodeAssociationStatusMiddlewares(stack *mid return nil } -// DescribeNodeAssociationStatusAPIClient is a client that implements the -// DescribeNodeAssociationStatus operation. -type DescribeNodeAssociationStatusAPIClient interface { - DescribeNodeAssociationStatus(context.Context, *DescribeNodeAssociationStatusInput, ...func(*Options)) (*DescribeNodeAssociationStatusOutput, error) -} - -var _ DescribeNodeAssociationStatusAPIClient = (*Client)(nil) - // NodeAssociatedWaiterOptions are waiter options for NodeAssociatedWaiter type NodeAssociatedWaiterOptions struct { @@ -282,7 +277,13 @@ func (w *NodeAssociatedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeNodeAssociationStatus(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -357,6 +358,14 @@ func nodeAssociatedStateRetryable(ctx context.Context, input *DescribeNodeAssoci return true, nil } +// DescribeNodeAssociationStatusAPIClient is a client that implements the +// DescribeNodeAssociationStatus operation. +type DescribeNodeAssociationStatusAPIClient interface { + DescribeNodeAssociationStatus(context.Context, *DescribeNodeAssociationStatusInput, ...func(*Options)) (*DescribeNodeAssociationStatusOutput, error) +} + +var _ DescribeNodeAssociationStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNodeAssociationStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworkscm/api_op_DescribeServers.go b/service/opsworkscm/api_op_DescribeServers.go index 09f31865394..b5264094754 100644 --- a/service/opsworkscm/api_op_DescribeServers.go +++ b/service/opsworkscm/api_op_DescribeServers.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeServersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServers(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeServersMiddlewares(stack *middleware.Stack, return nil } -// DescribeServersAPIClient is a client that implements the DescribeServers -// operation. -type DescribeServersAPIClient interface { - DescribeServers(context.Context, *DescribeServersInput, ...func(*Options)) (*DescribeServersOutput, error) -} - -var _ DescribeServersAPIClient = (*Client)(nil) - // DescribeServersPaginatorOptions is the paginator options for DescribeServers type DescribeServersPaginatorOptions struct { // This is not currently implemented for DescribeServers requests. @@ -231,6 +226,9 @@ func (p *DescribeServersPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeServersPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// DescribeServersAPIClient is a client that implements the DescribeServers +// operation. +type DescribeServersAPIClient interface { + DescribeServers(context.Context, *DescribeServersInput, ...func(*Options)) (*DescribeServersOutput, error) +} + +var _ DescribeServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworkscm/api_op_DisassociateNode.go b/service/opsworkscm/api_op_DisassociateNode.go index d394d4bb3e9..f7fab32e716 100644 --- a/service/opsworkscm/api_op_DisassociateNode.go +++ b/service/opsworkscm/api_op_DisassociateNode.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDisassociateNodeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_ExportServerEngineAttribute.go b/service/opsworkscm/api_op_ExportServerEngineAttribute.go index 8266b4171fd..ecc26e54955 100644 --- a/service/opsworkscm/api_op_ExportServerEngineAttribute.go +++ b/service/opsworkscm/api_op_ExportServerEngineAttribute.go @@ -147,6 +147,9 @@ func (c *Client) addOperationExportServerEngineAttributeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportServerEngineAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_ListTagsForResource.go b/service/opsworkscm/api_op_ListTagsForResource.go index fce21cf322d..3702d859e77 100644 --- a/service/opsworkscm/api_op_ListTagsForResource.go +++ b/service/opsworkscm/api_op_ListTagsForResource.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/opsworkscm/api_op_RestoreServer.go b/service/opsworkscm/api_op_RestoreServer.go index 01c7bd477ea..418fd7acd52 100644 --- a/service/opsworkscm/api_op_RestoreServer.go +++ b/service/opsworkscm/api_op_RestoreServer.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRestoreServerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_StartMaintenance.go b/service/opsworkscm/api_op_StartMaintenance.go index 10ce9418478..e18ed031a86 100644 --- a/service/opsworkscm/api_op_StartMaintenance.go +++ b/service/opsworkscm/api_op_StartMaintenance.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartMaintenanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMaintenanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_TagResource.go b/service/opsworkscm/api_op_TagResource.go index 30b25aa4ea0..378259a385c 100644 --- a/service/opsworkscm/api_op_TagResource.go +++ b/service/opsworkscm/api_op_TagResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_UntagResource.go b/service/opsworkscm/api_op_UntagResource.go index ed4f8cffb5c..0440ec201cc 100644 --- a/service/opsworkscm/api_op_UntagResource.go +++ b/service/opsworkscm/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_UpdateServer.go b/service/opsworkscm/api_op_UpdateServer.go index 34640578860..c19e9df6f13 100644 --- a/service/opsworkscm/api_op_UpdateServer.go +++ b/service/opsworkscm/api_op_UpdateServer.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateServerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/opsworkscm/api_op_UpdateServerEngineAttributes.go b/service/opsworkscm/api_op_UpdateServerEngineAttributes.go index 40122a4b268..8eb3697c7a1 100644 --- a/service/opsworkscm/api_op_UpdateServerEngineAttributes.go +++ b/service/opsworkscm/api_op_UpdateServerEngineAttributes.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateServerEngineAttributesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServerEngineAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_client.go b/service/organizations/api_client.go index 85c99294b34..5423ef19c3e 100644 --- a/service/organizations/api_client.go +++ b/service/organizations/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/organizations/api_op_AcceptHandshake.go b/service/organizations/api_op_AcceptHandshake.go index 32652cc4a78..f280b4af851 100644 --- a/service/organizations/api_op_AcceptHandshake.go +++ b/service/organizations/api_op_AcceptHandshake.go @@ -142,6 +142,9 @@ func (c *Client) addOperationAcceptHandshakeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptHandshakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_AttachPolicy.go b/service/organizations/api_op_AttachPolicy.go index 7ec4427d956..7928d61bb68 100644 --- a/service/organizations/api_op_AttachPolicy.go +++ b/service/organizations/api_op_AttachPolicy.go @@ -146,6 +146,9 @@ func (c *Client) addOperationAttachPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_CancelHandshake.go b/service/organizations/api_op_CancelHandshake.go index 5f488aa5e66..a88d6f3b5ab 100644 --- a/service/organizations/api_op_CancelHandshake.go +++ b/service/organizations/api_op_CancelHandshake.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCancelHandshakeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelHandshakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_CloseAccount.go b/service/organizations/api_op_CloseAccount.go index 820e4e61a21..076b4343478 100644 --- a/service/organizations/api_op_CloseAccount.go +++ b/service/organizations/api_op_CloseAccount.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCloseAccountMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloseAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_CreateAccount.go b/service/organizations/api_op_CreateAccount.go index e54ccb8d185..0995c100503 100644 --- a/service/organizations/api_op_CreateAccount.go +++ b/service/organizations/api_op_CreateAccount.go @@ -265,6 +265,9 @@ func (c *Client) addOperationCreateAccountMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_CreateGovCloudAccount.go b/service/organizations/api_op_CreateGovCloudAccount.go index 618dd379beb..6093bf38999 100644 --- a/service/organizations/api_op_CreateGovCloudAccount.go +++ b/service/organizations/api_op_CreateGovCloudAccount.go @@ -316,6 +316,9 @@ func (c *Client) addOperationCreateGovCloudAccountMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGovCloudAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_CreateOrganization.go b/service/organizations/api_op_CreateOrganization.go index dfe37cb4442..954c15ee2fa 100644 --- a/service/organizations/api_op_CreateOrganization.go +++ b/service/organizations/api_op_CreateOrganization.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateOrganizationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_CreateOrganizationalUnit.go b/service/organizations/api_op_CreateOrganizationalUnit.go index bfe5825ad3b..504836bf983 100644 --- a/service/organizations/api_op_CreateOrganizationalUnit.go +++ b/service/organizations/api_op_CreateOrganizationalUnit.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateOrganizationalUnitMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOrganizationalUnitValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_CreatePolicy.go b/service/organizations/api_op_CreatePolicy.go index f848c15084f..2fa0f70214b 100644 --- a/service/organizations/api_op_CreatePolicy.go +++ b/service/organizations/api_op_CreatePolicy.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DeclineHandshake.go b/service/organizations/api_op_DeclineHandshake.go index 92249791110..de31c21fedd 100644 --- a/service/organizations/api_op_DeclineHandshake.go +++ b/service/organizations/api_op_DeclineHandshake.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeclineHandshakeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeclineHandshakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DeleteOrganization.go b/service/organizations/api_op_DeleteOrganization.go index f4d54c14d5d..8e759dc6fd8 100644 --- a/service/organizations/api_op_DeleteOrganization.go +++ b/service/organizations/api_op_DeleteOrganization.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteOrganizationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_DeleteOrganizationalUnit.go b/service/organizations/api_op_DeleteOrganizationalUnit.go index 682596d6c45..5cc677d1260 100644 --- a/service/organizations/api_op_DeleteOrganizationalUnit.go +++ b/service/organizations/api_op_DeleteOrganizationalUnit.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteOrganizationalUnitMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOrganizationalUnitValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DeletePolicy.go b/service/organizations/api_op_DeletePolicy.go index 13a7541f595..c71f558e359 100644 --- a/service/organizations/api_op_DeletePolicy.go +++ b/service/organizations/api_op_DeletePolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DeleteResourcePolicy.go b/service/organizations/api_op_DeleteResourcePolicy.go index 2657b5558f5..1b22ad20d56 100644 --- a/service/organizations/api_op_DeleteResourcePolicy.go +++ b/service/organizations/api_op_DeleteResourcePolicy.go @@ -97,6 +97,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_DeregisterDelegatedAdministrator.go b/service/organizations/api_op_DeregisterDelegatedAdministrator.go index dc4c0a2603c..4181e490cc6 100644 --- a/service/organizations/api_op_DeregisterDelegatedAdministrator.go +++ b/service/organizations/api_op_DeregisterDelegatedAdministrator.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeregisterDelegatedAdministratorMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterDelegatedAdministratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribeAccount.go b/service/organizations/api_op_DescribeAccount.go index 5cc7ec48bcd..2adc03c41ca 100644 --- a/service/organizations/api_op_DescribeAccount.go +++ b/service/organizations/api_op_DescribeAccount.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAccountMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribeCreateAccountStatus.go b/service/organizations/api_op_DescribeCreateAccountStatus.go index 9627894fa05..8d3f38bd88c 100644 --- a/service/organizations/api_op_DescribeCreateAccountStatus.go +++ b/service/organizations/api_op_DescribeCreateAccountStatus.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeCreateAccountStatusMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCreateAccountStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribeEffectivePolicy.go b/service/organizations/api_op_DescribeEffectivePolicy.go index 18f16542ec9..26afbc2c015 100644 --- a/service/organizations/api_op_DescribeEffectivePolicy.go +++ b/service/organizations/api_op_DescribeEffectivePolicy.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeEffectivePolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEffectivePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribeHandshake.go b/service/organizations/api_op_DescribeHandshake.go index 63dbc8ea55e..bcecb66b328 100644 --- a/service/organizations/api_op_DescribeHandshake.go +++ b/service/organizations/api_op_DescribeHandshake.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeHandshakeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHandshakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribeOrganization.go b/service/organizations/api_op_DescribeOrganization.go index b84c47918c1..878c37d0b5c 100644 --- a/service/organizations/api_op_DescribeOrganization.go +++ b/service/organizations/api_op_DescribeOrganization.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeOrganizationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_DescribeOrganizationalUnit.go b/service/organizations/api_op_DescribeOrganizationalUnit.go index c813585c01f..e1bef40d846 100644 --- a/service/organizations/api_op_DescribeOrganizationalUnit.go +++ b/service/organizations/api_op_DescribeOrganizationalUnit.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeOrganizationalUnitMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationalUnitValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribePolicy.go b/service/organizations/api_op_DescribePolicy.go index 352c374f10b..a064978c03b 100644 --- a/service/organizations/api_op_DescribePolicy.go +++ b/service/organizations/api_op_DescribePolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribePolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DescribeResourcePolicy.go b/service/organizations/api_op_DescribeResourcePolicy.go index 1b69fa29e35..78550e50a20 100644 --- a/service/organizations/api_op_DescribeResourcePolicy.go +++ b/service/organizations/api_op_DescribeResourcePolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_DetachPolicy.go b/service/organizations/api_op_DetachPolicy.go index e4c45eb8b26..e1ade31ff3a 100644 --- a/service/organizations/api_op_DetachPolicy.go +++ b/service/organizations/api_op_DetachPolicy.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDetachPolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DisableAWSServiceAccess.go b/service/organizations/api_op_DisableAWSServiceAccess.go index fcde652b172..ed3f6e9bee2 100644 --- a/service/organizations/api_op_DisableAWSServiceAccess.go +++ b/service/organizations/api_op_DisableAWSServiceAccess.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDisableAWSServiceAccessMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableAWSServiceAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_DisablePolicyType.go b/service/organizations/api_op_DisablePolicyType.go index a2e80479235..445234d9e0c 100644 --- a/service/organizations/api_op_DisablePolicyType.go +++ b/service/organizations/api_op_DisablePolicyType.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDisablePolicyTypeMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisablePolicyTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_EnableAWSServiceAccess.go b/service/organizations/api_op_EnableAWSServiceAccess.go index a80ea547e46..d76266dd1c0 100644 --- a/service/organizations/api_op_EnableAWSServiceAccess.go +++ b/service/organizations/api_op_EnableAWSServiceAccess.go @@ -125,6 +125,9 @@ func (c *Client) addOperationEnableAWSServiceAccessMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableAWSServiceAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_EnableAllFeatures.go b/service/organizations/api_op_EnableAllFeatures.go index f87b419bb03..91661c724e0 100644 --- a/service/organizations/api_op_EnableAllFeatures.go +++ b/service/organizations/api_op_EnableAllFeatures.go @@ -131,6 +131,9 @@ func (c *Client) addOperationEnableAllFeaturesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAllFeatures(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_EnablePolicyType.go b/service/organizations/api_op_EnablePolicyType.go index ac4e69c9017..c9d4a78f750 100644 --- a/service/organizations/api_op_EnablePolicyType.go +++ b/service/organizations/api_op_EnablePolicyType.go @@ -145,6 +145,9 @@ func (c *Client) addOperationEnablePolicyTypeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnablePolicyTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_InviteAccountToOrganization.go b/service/organizations/api_op_InviteAccountToOrganization.go index 54bba0af35b..e9be1b99215 100644 --- a/service/organizations/api_op_InviteAccountToOrganization.go +++ b/service/organizations/api_op_InviteAccountToOrganization.go @@ -168,6 +168,9 @@ func (c *Client) addOperationInviteAccountToOrganizationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInviteAccountToOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_LeaveOrganization.go b/service/organizations/api_op_LeaveOrganization.go index 0a144ea926a..30c860288bc 100644 --- a/service/organizations/api_op_LeaveOrganization.go +++ b/service/organizations/api_op_LeaveOrganization.go @@ -148,6 +148,9 @@ func (c *Client) addOperationLeaveOrganizationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLeaveOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/organizations/api_op_ListAWSServiceAccessForOrganization.go b/service/organizations/api_op_ListAWSServiceAccessForOrganization.go index 02fb12966f5..4329d7c76ec 100644 --- a/service/organizations/api_op_ListAWSServiceAccessForOrganization.go +++ b/service/organizations/api_op_ListAWSServiceAccessForOrganization.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListAWSServiceAccessForOrganizationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAWSServiceAccessForOrganization(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListAWSServiceAccessForOrganizationMiddlewares(stac return nil } -// ListAWSServiceAccessForOrganizationAPIClient is a client that implements the -// ListAWSServiceAccessForOrganization operation. -type ListAWSServiceAccessForOrganizationAPIClient interface { - ListAWSServiceAccessForOrganization(context.Context, *ListAWSServiceAccessForOrganizationInput, ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) -} - -var _ ListAWSServiceAccessForOrganizationAPIClient = (*Client)(nil) - // ListAWSServiceAccessForOrganizationPaginatorOptions is the paginator options // for ListAWSServiceAccessForOrganization type ListAWSServiceAccessForOrganizationPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListAWSServiceAccessForOrganizationPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAWSServiceAccessForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListAWSServiceAccessForOrganizationPaginator) NextPage(ctx context.Cont return result, nil } +// ListAWSServiceAccessForOrganizationAPIClient is a client that implements the +// ListAWSServiceAccessForOrganization operation. +type ListAWSServiceAccessForOrganizationAPIClient interface { + ListAWSServiceAccessForOrganization(context.Context, *ListAWSServiceAccessForOrganizationInput, ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) +} + +var _ ListAWSServiceAccessForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAWSServiceAccessForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListAccounts.go b/service/organizations/api_op_ListAccounts.go index f3f29bcddd6..02a9dce162f 100644 --- a/service/organizations/api_op_ListAccounts.go +++ b/service/organizations/api_op_ListAccounts.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op return nil } -// ListAccountsAPIClient is a client that implements the ListAccounts operation. -type ListAccountsAPIClient interface { - ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) -} - -var _ ListAccountsAPIClient = (*Client)(nil) - // ListAccountsPaginatorOptions is the paginator options for ListAccounts type ListAccountsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -233,6 +229,9 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +251,13 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAccountsAPIClient is a client that implements the ListAccounts operation. +type ListAccountsAPIClient interface { + ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) +} + +var _ ListAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListAccountsForParent.go b/service/organizations/api_op_ListAccountsForParent.go index a711440577c..bb698d06e56 100644 --- a/service/organizations/api_op_ListAccountsForParent.go +++ b/service/organizations/api_op_ListAccountsForParent.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListAccountsForParentMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountsForParentValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListAccountsForParentMiddlewares(stack *middleware. return nil } -// ListAccountsForParentAPIClient is a client that implements the -// ListAccountsForParent operation. -type ListAccountsForParentAPIClient interface { - ListAccountsForParent(context.Context, *ListAccountsForParentInput, ...func(*Options)) (*ListAccountsForParentOutput, error) -} - -var _ ListAccountsForParentAPIClient = (*Client)(nil) - // ListAccountsForParentPaginatorOptions is the paginator options for // ListAccountsForParent type ListAccountsForParentPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListAccountsForParentPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountsForParent(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListAccountsForParentPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListAccountsForParentAPIClient is a client that implements the +// ListAccountsForParent operation. +type ListAccountsForParentAPIClient interface { + ListAccountsForParent(context.Context, *ListAccountsForParentInput, ...func(*Options)) (*ListAccountsForParentOutput, error) +} + +var _ ListAccountsForParentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountsForParent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListChildren.go b/service/organizations/api_op_ListChildren.go index 24094d71eda..0811aff779b 100644 --- a/service/organizations/api_op_ListChildren.go +++ b/service/organizations/api_op_ListChildren.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListChildrenMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChildrenValidationMiddleware(stack); err != nil { return err } @@ -182,13 +185,6 @@ func (c *Client) addOperationListChildrenMiddlewares(stack *middleware.Stack, op return nil } -// ListChildrenAPIClient is a client that implements the ListChildren operation. -type ListChildrenAPIClient interface { - ListChildren(context.Context, *ListChildrenInput, ...func(*Options)) (*ListChildrenOutput, error) -} - -var _ ListChildrenAPIClient = (*Client)(nil) - // ListChildrenPaginatorOptions is the paginator options for ListChildren type ListChildrenPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -260,6 +256,9 @@ func (p *ListChildrenPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChildren(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +278,13 @@ func (p *ListChildrenPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListChildrenAPIClient is a client that implements the ListChildren operation. +type ListChildrenAPIClient interface { + ListChildren(context.Context, *ListChildrenInput, ...func(*Options)) (*ListChildrenOutput, error) +} + +var _ ListChildrenAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChildren(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListCreateAccountStatus.go b/service/organizations/api_op_ListCreateAccountStatus.go index 85e6cfa455b..d0122e1490a 100644 --- a/service/organizations/api_op_ListCreateAccountStatus.go +++ b/service/organizations/api_op_ListCreateAccountStatus.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListCreateAccountStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCreateAccountStatus(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListCreateAccountStatusMiddlewares(stack *middlewar return nil } -// ListCreateAccountStatusAPIClient is a client that implements the -// ListCreateAccountStatus operation. -type ListCreateAccountStatusAPIClient interface { - ListCreateAccountStatus(context.Context, *ListCreateAccountStatusInput, ...func(*Options)) (*ListCreateAccountStatusOutput, error) -} - -var _ ListCreateAccountStatusAPIClient = (*Client)(nil) - // ListCreateAccountStatusPaginatorOptions is the paginator options for // ListCreateAccountStatus type ListCreateAccountStatusPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListCreateAccountStatusPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCreateAccountStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListCreateAccountStatusPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListCreateAccountStatusAPIClient is a client that implements the +// ListCreateAccountStatus operation. +type ListCreateAccountStatusAPIClient interface { + ListCreateAccountStatus(context.Context, *ListCreateAccountStatusInput, ...func(*Options)) (*ListCreateAccountStatusOutput, error) +} + +var _ ListCreateAccountStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCreateAccountStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListDelegatedAdministrators.go b/service/organizations/api_op_ListDelegatedAdministrators.go index 6128f7024e4..1efae2d99ae 100644 --- a/service/organizations/api_op_ListDelegatedAdministrators.go +++ b/service/organizations/api_op_ListDelegatedAdministrators.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListDelegatedAdministratorsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedAdministrators(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListDelegatedAdministratorsMiddlewares(stack *middl return nil } -// ListDelegatedAdministratorsAPIClient is a client that implements the -// ListDelegatedAdministrators operation. -type ListDelegatedAdministratorsAPIClient interface { - ListDelegatedAdministrators(context.Context, *ListDelegatedAdministratorsInput, ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) -} - -var _ ListDelegatedAdministratorsAPIClient = (*Client)(nil) - // ListDelegatedAdministratorsPaginatorOptions is the paginator options for // ListDelegatedAdministrators type ListDelegatedAdministratorsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListDelegatedAdministratorsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDelegatedAdministrators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListDelegatedAdministratorsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListDelegatedAdministratorsAPIClient is a client that implements the +// ListDelegatedAdministrators operation. +type ListDelegatedAdministratorsAPIClient interface { + ListDelegatedAdministrators(context.Context, *ListDelegatedAdministratorsInput, ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) +} + +var _ ListDelegatedAdministratorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDelegatedAdministrators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListDelegatedServicesForAccount.go b/service/organizations/api_op_ListDelegatedServicesForAccount.go index ff313afbb62..7d54a929d84 100644 --- a/service/organizations/api_op_ListDelegatedServicesForAccount.go +++ b/service/organizations/api_op_ListDelegatedServicesForAccount.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListDelegatedServicesForAccountMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDelegatedServicesForAccountValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListDelegatedServicesForAccountMiddlewares(stack *m return nil } -// ListDelegatedServicesForAccountAPIClient is a client that implements the -// ListDelegatedServicesForAccount operation. -type ListDelegatedServicesForAccountAPIClient interface { - ListDelegatedServicesForAccount(context.Context, *ListDelegatedServicesForAccountInput, ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) -} - -var _ ListDelegatedServicesForAccountAPIClient = (*Client)(nil) - // ListDelegatedServicesForAccountPaginatorOptions is the paginator options for // ListDelegatedServicesForAccount type ListDelegatedServicesForAccountPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListDelegatedServicesForAccountPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDelegatedServicesForAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListDelegatedServicesForAccountPaginator) NextPage(ctx context.Context, return result, nil } +// ListDelegatedServicesForAccountAPIClient is a client that implements the +// ListDelegatedServicesForAccount operation. +type ListDelegatedServicesForAccountAPIClient interface { + ListDelegatedServicesForAccount(context.Context, *ListDelegatedServicesForAccountInput, ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) +} + +var _ ListDelegatedServicesForAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDelegatedServicesForAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListHandshakesForAccount.go b/service/organizations/api_op_ListHandshakesForAccount.go index aa335c3aeb1..93153637e2a 100644 --- a/service/organizations/api_op_ListHandshakesForAccount.go +++ b/service/organizations/api_op_ListHandshakesForAccount.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListHandshakesForAccountMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHandshakesForAccount(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListHandshakesForAccountMiddlewares(stack *middlewa return nil } -// ListHandshakesForAccountAPIClient is a client that implements the -// ListHandshakesForAccount operation. -type ListHandshakesForAccountAPIClient interface { - ListHandshakesForAccount(context.Context, *ListHandshakesForAccountInput, ...func(*Options)) (*ListHandshakesForAccountOutput, error) -} - -var _ ListHandshakesForAccountAPIClient = (*Client)(nil) - // ListHandshakesForAccountPaginatorOptions is the paginator options for // ListHandshakesForAccount type ListHandshakesForAccountPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListHandshakesForAccountPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHandshakesForAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListHandshakesForAccountPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListHandshakesForAccountAPIClient is a client that implements the +// ListHandshakesForAccount operation. +type ListHandshakesForAccountAPIClient interface { + ListHandshakesForAccount(context.Context, *ListHandshakesForAccountInput, ...func(*Options)) (*ListHandshakesForAccountOutput, error) +} + +var _ ListHandshakesForAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHandshakesForAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListHandshakesForOrganization.go b/service/organizations/api_op_ListHandshakesForOrganization.go index c022f432431..cbec879a10e 100644 --- a/service/organizations/api_op_ListHandshakesForOrganization.go +++ b/service/organizations/api_op_ListHandshakesForOrganization.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListHandshakesForOrganizationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHandshakesForOrganization(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListHandshakesForOrganizationMiddlewares(stack *mid return nil } -// ListHandshakesForOrganizationAPIClient is a client that implements the -// ListHandshakesForOrganization operation. -type ListHandshakesForOrganizationAPIClient interface { - ListHandshakesForOrganization(context.Context, *ListHandshakesForOrganizationInput, ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) -} - -var _ ListHandshakesForOrganizationAPIClient = (*Client)(nil) - // ListHandshakesForOrganizationPaginatorOptions is the paginator options for // ListHandshakesForOrganization type ListHandshakesForOrganizationPaginatorOptions struct { @@ -252,6 +247,9 @@ func (p *ListHandshakesForOrganizationPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHandshakesForOrganization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *ListHandshakesForOrganizationPaginator) NextPage(ctx context.Context, o return result, nil } +// ListHandshakesForOrganizationAPIClient is a client that implements the +// ListHandshakesForOrganization operation. +type ListHandshakesForOrganizationAPIClient interface { + ListHandshakesForOrganization(context.Context, *ListHandshakesForOrganizationInput, ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) +} + +var _ ListHandshakesForOrganizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHandshakesForOrganization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListOrganizationalUnitsForParent.go b/service/organizations/api_op_ListOrganizationalUnitsForParent.go index d5b17298a63..9f59da7be70 100644 --- a/service/organizations/api_op_ListOrganizationalUnitsForParent.go +++ b/service/organizations/api_op_ListOrganizationalUnitsForParent.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListOrganizationalUnitsForParentMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrganizationalUnitsForParentValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListOrganizationalUnitsForParentMiddlewares(stack * return nil } -// ListOrganizationalUnitsForParentAPIClient is a client that implements the -// ListOrganizationalUnitsForParent operation. -type ListOrganizationalUnitsForParentAPIClient interface { - ListOrganizationalUnitsForParent(context.Context, *ListOrganizationalUnitsForParentInput, ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) -} - -var _ ListOrganizationalUnitsForParentAPIClient = (*Client)(nil) - // ListOrganizationalUnitsForParentPaginatorOptions is the paginator options for // ListOrganizationalUnitsForParent type ListOrganizationalUnitsForParentPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *ListOrganizationalUnitsForParentPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationalUnitsForParent(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *ListOrganizationalUnitsForParentPaginator) NextPage(ctx context.Context return result, nil } +// ListOrganizationalUnitsForParentAPIClient is a client that implements the +// ListOrganizationalUnitsForParent operation. +type ListOrganizationalUnitsForParentAPIClient interface { + ListOrganizationalUnitsForParent(context.Context, *ListOrganizationalUnitsForParentInput, ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) +} + +var _ ListOrganizationalUnitsForParentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationalUnitsForParent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListParents.go b/service/organizations/api_op_ListParents.go index 28598fa66f2..5c25c964113 100644 --- a/service/organizations/api_op_ListParents.go +++ b/service/organizations/api_op_ListParents.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListParentsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListParentsValidationMiddleware(stack); err != nil { return err } @@ -178,13 +181,6 @@ func (c *Client) addOperationListParentsMiddlewares(stack *middleware.Stack, opt return nil } -// ListParentsAPIClient is a client that implements the ListParents operation. -type ListParentsAPIClient interface { - ListParents(context.Context, *ListParentsInput, ...func(*Options)) (*ListParentsOutput, error) -} - -var _ ListParentsAPIClient = (*Client)(nil) - // ListParentsPaginatorOptions is the paginator options for ListParents type ListParentsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -256,6 +252,9 @@ func (p *ListParentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +274,13 @@ func (p *ListParentsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListParentsAPIClient is a client that implements the ListParents operation. +type ListParentsAPIClient interface { + ListParents(context.Context, *ListParentsInput, ...func(*Options)) (*ListParentsOutput, error) +} + +var _ ListParentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListPolicies.go b/service/organizations/api_op_ListPolicies.go index aca620cb6ba..5c8fdb284e2 100644 --- a/service/organizations/api_op_ListPolicies.go +++ b/service/organizations/api_op_ListPolicies.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesValidationMiddleware(stack); err != nil { return err } @@ -177,13 +180,6 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op return nil } -// ListPoliciesAPIClient is a client that implements the ListPolicies operation. -type ListPoliciesAPIClient interface { - ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) -} - -var _ ListPoliciesAPIClient = (*Client)(nil) - // ListPoliciesPaginatorOptions is the paginator options for ListPolicies type ListPoliciesPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -255,6 +251,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +273,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListPoliciesForTarget.go b/service/organizations/api_op_ListPoliciesForTarget.go index 6347be759a3..1b4d6d41a87 100644 --- a/service/organizations/api_op_ListPoliciesForTarget.go +++ b/service/organizations/api_op_ListPoliciesForTarget.go @@ -174,6 +174,9 @@ func (c *Client) addOperationListPoliciesForTargetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesForTargetValidationMiddleware(stack); err != nil { return err } @@ -198,14 +201,6 @@ func (c *Client) addOperationListPoliciesForTargetMiddlewares(stack *middleware. return nil } -// ListPoliciesForTargetAPIClient is a client that implements the -// ListPoliciesForTarget operation. -type ListPoliciesForTargetAPIClient interface { - ListPoliciesForTarget(context.Context, *ListPoliciesForTargetInput, ...func(*Options)) (*ListPoliciesForTargetOutput, error) -} - -var _ ListPoliciesForTargetAPIClient = (*Client)(nil) - // ListPoliciesForTargetPaginatorOptions is the paginator options for // ListPoliciesForTarget type ListPoliciesForTargetPaginatorOptions struct { @@ -278,6 +273,9 @@ func (p *ListPoliciesForTargetPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPoliciesForTarget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -297,6 +295,14 @@ func (p *ListPoliciesForTargetPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPoliciesForTargetAPIClient is a client that implements the +// ListPoliciesForTarget operation. +type ListPoliciesForTargetAPIClient interface { + ListPoliciesForTarget(context.Context, *ListPoliciesForTargetInput, ...func(*Options)) (*ListPoliciesForTargetOutput, error) +} + +var _ ListPoliciesForTargetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPoliciesForTarget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListRoots.go b/service/organizations/api_op_ListRoots.go index eae8b34c813..788094ef019 100644 --- a/service/organizations/api_op_ListRoots.go +++ b/service/organizations/api_op_ListRoots.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRootsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoots(options.Region), middleware.Before); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListRootsMiddlewares(stack *middleware.Stack, optio return nil } -// ListRootsAPIClient is a client that implements the ListRoots operation. -type ListRootsAPIClient interface { - ListRoots(context.Context, *ListRootsInput, ...func(*Options)) (*ListRootsOutput, error) -} - -var _ ListRootsAPIClient = (*Client)(nil) - // ListRootsPaginatorOptions is the paginator options for ListRoots type ListRootsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -238,6 +234,9 @@ func (p *ListRootsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +256,13 @@ func (p *ListRootsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRootsAPIClient is a client that implements the ListRoots operation. +type ListRootsAPIClient interface { + ListRoots(context.Context, *ListRootsInput, ...func(*Options)) (*ListRootsOutput, error) +} + +var _ ListRootsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListTagsForResource.go b/service/organizations/api_op_ListTagsForResource.go index 7a57cd5be22..70f715ed09c 100644 --- a/service/organizations/api_op_ListTagsForResource.go +++ b/service/organizations/api_op_ListTagsForResource.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_ListTargetsForPolicy.go b/service/organizations/api_op_ListTargetsForPolicy.go index f89b10c94fc..b7361e12562 100644 --- a/service/organizations/api_op_ListTargetsForPolicy.go +++ b/service/organizations/api_op_ListTargetsForPolicy.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsForPolicyValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.S return nil } -// ListTargetsForPolicyAPIClient is a client that implements the -// ListTargetsForPolicy operation. -type ListTargetsForPolicyAPIClient interface { - ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error) -} - -var _ ListTargetsForPolicyAPIClient = (*Client)(nil) - // ListTargetsForPolicyPaginatorOptions is the paginator options for // ListTargetsForPolicy type ListTargetsForPolicyPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetsForPolicy(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTargetsForPolicyAPIClient is a client that implements the +// ListTargetsForPolicy operation. +type ListTargetsForPolicyAPIClient interface { + ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error) +} + +var _ ListTargetsForPolicyAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetsForPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/organizations/api_op_MoveAccount.go b/service/organizations/api_op_MoveAccount.go index 6ea41478df6..2fc65adc63b 100644 --- a/service/organizations/api_op_MoveAccount.go +++ b/service/organizations/api_op_MoveAccount.go @@ -144,6 +144,9 @@ func (c *Client) addOperationMoveAccountMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMoveAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_PutResourcePolicy.go b/service/organizations/api_op_PutResourcePolicy.go index e4bdf8dc4ed..fa022c322e1 100644 --- a/service/organizations/api_op_PutResourcePolicy.go +++ b/service/organizations/api_op_PutResourcePolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_RegisterDelegatedAdministrator.go b/service/organizations/api_op_RegisterDelegatedAdministrator.go index 30a0ec1e9cf..823e747f326 100644 --- a/service/organizations/api_op_RegisterDelegatedAdministrator.go +++ b/service/organizations/api_op_RegisterDelegatedAdministrator.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRegisterDelegatedAdministratorMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDelegatedAdministratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_RemoveAccountFromOrganization.go b/service/organizations/api_op_RemoveAccountFromOrganization.go index ef40afcf16b..07857a1af66 100644 --- a/service/organizations/api_op_RemoveAccountFromOrganization.go +++ b/service/organizations/api_op_RemoveAccountFromOrganization.go @@ -133,6 +133,9 @@ func (c *Client) addOperationRemoveAccountFromOrganizationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAccountFromOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_TagResource.go b/service/organizations/api_op_TagResource.go index 4fb343d8f66..e1f524d9d5f 100644 --- a/service/organizations/api_op_TagResource.go +++ b/service/organizations/api_op_TagResource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_UntagResource.go b/service/organizations/api_op_UntagResource.go index caa4ee619b7..bc6993ed1a0 100644 --- a/service/organizations/api_op_UntagResource.go +++ b/service/organizations/api_op_UntagResource.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_UpdateOrganizationalUnit.go b/service/organizations/api_op_UpdateOrganizationalUnit.go index fe9b1d13342..126ec3d742d 100644 --- a/service/organizations/api_op_UpdateOrganizationalUnit.go +++ b/service/organizations/api_op_UpdateOrganizationalUnit.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateOrganizationalUnitMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationalUnitValidationMiddleware(stack); err != nil { return err } diff --git a/service/organizations/api_op_UpdatePolicy.go b/service/organizations/api_op_UpdatePolicy.go index dbc7c2b8959..103f3df50ea 100644 --- a/service/organizations/api_op_UpdatePolicy.go +++ b/service/organizations/api_op_UpdatePolicy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdatePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_client.go b/service/osis/api_client.go index c1a8b5ad41d..44cfe12429d 100644 --- a/service/osis/api_client.go +++ b/service/osis/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/osis/api_op_CreatePipeline.go b/service/osis/api_op_CreatePipeline.go index ab434a12a9c..57eb953047a 100644 --- a/service/osis/api_op_CreatePipeline.go +++ b/service/osis/api_op_CreatePipeline.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_DeletePipeline.go b/service/osis/api_op_DeletePipeline.go index 34e91e867c8..84cea2300f9 100644 --- a/service/osis/api_op_DeletePipeline.go +++ b/service/osis/api_op_DeletePipeline.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeletePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_GetPipeline.go b/service/osis/api_op_GetPipeline.go index 1b858012efd..314a1abd493 100644 --- a/service/osis/api_op_GetPipeline.go +++ b/service/osis/api_op_GetPipeline.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetPipelineMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_GetPipelineBlueprint.go b/service/osis/api_op_GetPipelineBlueprint.go index 4d9967bf6c5..ee914fb2692 100644 --- a/service/osis/api_op_GetPipelineBlueprint.go +++ b/service/osis/api_op_GetPipelineBlueprint.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPipelineBlueprintMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineBlueprintValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_GetPipelineChangeProgress.go b/service/osis/api_op_GetPipelineChangeProgress.go index ee5801f3c6f..1d5101b16e0 100644 --- a/service/osis/api_op_GetPipelineChangeProgress.go +++ b/service/osis/api_op_GetPipelineChangeProgress.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetPipelineChangeProgressMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPipelineChangeProgressValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_ListPipelineBlueprints.go b/service/osis/api_op_ListPipelineBlueprints.go index 3bdf3eadc74..5e725cc4123 100644 --- a/service/osis/api_op_ListPipelineBlueprints.go +++ b/service/osis/api_op_ListPipelineBlueprints.go @@ -103,6 +103,9 @@ func (c *Client) addOperationListPipelineBlueprintsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelineBlueprints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/osis/api_op_ListPipelines.go b/service/osis/api_op_ListPipelines.go index 92b1ef30c99..26aef07c494 100644 --- a/service/osis/api_op_ListPipelines.go +++ b/service/osis/api_op_ListPipelines.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelines(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o return nil } -// ListPipelinesAPIClient is a client that implements the ListPipelines operation. -type ListPipelinesAPIClient interface { - ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) -} - -var _ ListPipelinesAPIClient = (*Client)(nil) - // ListPipelinesPaginatorOptions is the paginator options for ListPipelines type ListPipelinesPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -210,6 +206,9 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListPipelinesAPIClient is a client that implements the ListPipelines operation. +type ListPipelinesAPIClient interface { + ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) +} + +var _ ListPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/osis/api_op_ListTagsForResource.go b/service/osis/api_op_ListTagsForResource.go index 754046560a5..2e237c41204 100644 --- a/service/osis/api_op_ListTagsForResource.go +++ b/service/osis/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_StartPipeline.go b/service/osis/api_op_StartPipeline.go index 3313ff017fd..94deb6b530a 100644 --- a/service/osis/api_op_StartPipeline.go +++ b/service/osis/api_op_StartPipeline.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStartPipelineMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_StopPipeline.go b/service/osis/api_op_StopPipeline.go index 8bf7cba63c1..2c9a67ee125 100644 --- a/service/osis/api_op_StopPipeline.go +++ b/service/osis/api_op_StopPipeline.go @@ -108,6 +108,9 @@ func (c *Client) addOperationStopPipelineMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopPipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_TagResource.go b/service/osis/api_op_TagResource.go index d46ad59e792..461be4aec98 100644 --- a/service/osis/api_op_TagResource.go +++ b/service/osis/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_UntagResource.go b/service/osis/api_op_UntagResource.go index 26f4611cdf6..25e899c5fdc 100644 --- a/service/osis/api_op_UntagResource.go +++ b/service/osis/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_UpdatePipeline.go b/service/osis/api_op_UpdatePipeline.go index 72c3df9444d..9a2949f5595 100644 --- a/service/osis/api_op_UpdatePipeline.go +++ b/service/osis/api_op_UpdatePipeline.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/osis/api_op_ValidatePipeline.go b/service/osis/api_op_ValidatePipeline.go index 5cd61ebedfd..a18ec92c1ff 100644 --- a/service/osis/api_op_ValidatePipeline.go +++ b/service/osis/api_op_ValidatePipeline.go @@ -114,6 +114,9 @@ func (c *Client) addOperationValidatePipelineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_client.go b/service/outposts/api_client.go index 96ee90c274e..63f56c30282 100644 --- a/service/outposts/api_client.go +++ b/service/outposts/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/outposts/api_op_CancelCapacityTask.go b/service/outposts/api_op_CancelCapacityTask.go index da5bef11363..e7e1f46c536 100644 --- a/service/outposts/api_op_CancelCapacityTask.go +++ b/service/outposts/api_op_CancelCapacityTask.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCancelCapacityTaskMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelCapacityTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_CancelOrder.go b/service/outposts/api_op_CancelOrder.go index 253dc88417f..345e7069820 100644 --- a/service/outposts/api_op_CancelOrder.go +++ b/service/outposts/api_op_CancelOrder.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelOrderMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_CreateOrder.go b/service/outposts/api_op_CreateOrder.go index 97b118f7d09..1bed4dbd8db 100644 --- a/service/outposts/api_op_CreateOrder.go +++ b/service/outposts/api_op_CreateOrder.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateOrderMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_CreateOutpost.go b/service/outposts/api_op_CreateOutpost.go index 4c9e80aabcb..163200d6313 100644 --- a/service/outposts/api_op_CreateOutpost.go +++ b/service/outposts/api_op_CreateOutpost.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateOutpostMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOutpostValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_CreateSite.go b/service/outposts/api_op_CreateSite.go index aebe7d59603..857bbd9a93c 100644 --- a/service/outposts/api_op_CreateSite.go +++ b/service/outposts/api_op_CreateSite.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateSiteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_DeleteOutpost.go b/service/outposts/api_op_DeleteOutpost.go index dc6e725abef..a0d3b053d19 100644 --- a/service/outposts/api_op_DeleteOutpost.go +++ b/service/outposts/api_op_DeleteOutpost.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteOutpostMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOutpostValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_DeleteSite.go b/service/outposts/api_op_DeleteSite.go index ed96ee5bfcc..517f0912275 100644 --- a/service/outposts/api_op_DeleteSite.go +++ b/service/outposts/api_op_DeleteSite.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSiteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetCapacityTask.go b/service/outposts/api_op_GetCapacityTask.go index d774817edfc..c1164e8fd8f 100644 --- a/service/outposts/api_op_GetCapacityTask.go +++ b/service/outposts/api_op_GetCapacityTask.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetCapacityTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCapacityTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetCatalogItem.go b/service/outposts/api_op_GetCatalogItem.go index 9cf8d595196..cbe9a89d240 100644 --- a/service/outposts/api_op_GetCatalogItem.go +++ b/service/outposts/api_op_GetCatalogItem.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetCatalogItemMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCatalogItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetConnection.go b/service/outposts/api_op_GetConnection.go index bf3a5f11628..dc2321c6865 100644 --- a/service/outposts/api_op_GetConnection.go +++ b/service/outposts/api_op_GetConnection.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetConnectionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetOrder.go b/service/outposts/api_op_GetOrder.go index cced86acfa9..f656011058f 100644 --- a/service/outposts/api_op_GetOrder.go +++ b/service/outposts/api_op_GetOrder.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetOrderMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetOutpost.go b/service/outposts/api_op_GetOutpost.go index be216f8a20e..2e256bf8a0b 100644 --- a/service/outposts/api_op_GetOutpost.go +++ b/service/outposts/api_op_GetOutpost.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetOutpostMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOutpostValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetOutpostInstanceTypes.go b/service/outposts/api_op_GetOutpostInstanceTypes.go index da1954d0426..bce1bb78121 100644 --- a/service/outposts/api_op_GetOutpostInstanceTypes.go +++ b/service/outposts/api_op_GetOutpostInstanceTypes.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetOutpostInstanceTypesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOutpostInstanceTypesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetOutpostInstanceTypesMiddlewares(stack *middlewar return nil } -// GetOutpostInstanceTypesAPIClient is a client that implements the -// GetOutpostInstanceTypes operation. -type GetOutpostInstanceTypesAPIClient interface { - GetOutpostInstanceTypes(context.Context, *GetOutpostInstanceTypesInput, ...func(*Options)) (*GetOutpostInstanceTypesOutput, error) -} - -var _ GetOutpostInstanceTypesAPIClient = (*Client)(nil) - // GetOutpostInstanceTypesPaginatorOptions is the paginator options for // GetOutpostInstanceTypes type GetOutpostInstanceTypesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetOutpostInstanceTypesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOutpostInstanceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetOutpostInstanceTypesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetOutpostInstanceTypesAPIClient is a client that implements the +// GetOutpostInstanceTypes operation. +type GetOutpostInstanceTypesAPIClient interface { + GetOutpostInstanceTypes(context.Context, *GetOutpostInstanceTypesInput, ...func(*Options)) (*GetOutpostInstanceTypesOutput, error) +} + +var _ GetOutpostInstanceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOutpostInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go b/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go index 083ab22b7b1..9b22e854e14 100644 --- a/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go +++ b/service/outposts/api_op_GetOutpostSupportedInstanceTypes.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetOutpostSupportedInstanceTypesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOutpostSupportedInstanceTypesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetOutpostSupportedInstanceTypesMiddlewares(stack * return nil } -// GetOutpostSupportedInstanceTypesAPIClient is a client that implements the -// GetOutpostSupportedInstanceTypes operation. -type GetOutpostSupportedInstanceTypesAPIClient interface { - GetOutpostSupportedInstanceTypes(context.Context, *GetOutpostSupportedInstanceTypesInput, ...func(*Options)) (*GetOutpostSupportedInstanceTypesOutput, error) -} - -var _ GetOutpostSupportedInstanceTypesAPIClient = (*Client)(nil) - // GetOutpostSupportedInstanceTypesPaginatorOptions is the paginator options for // GetOutpostSupportedInstanceTypes type GetOutpostSupportedInstanceTypesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *GetOutpostSupportedInstanceTypesPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOutpostSupportedInstanceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *GetOutpostSupportedInstanceTypesPaginator) NextPage(ctx context.Context return result, nil } +// GetOutpostSupportedInstanceTypesAPIClient is a client that implements the +// GetOutpostSupportedInstanceTypes operation. +type GetOutpostSupportedInstanceTypesAPIClient interface { + GetOutpostSupportedInstanceTypes(context.Context, *GetOutpostSupportedInstanceTypesInput, ...func(*Options)) (*GetOutpostSupportedInstanceTypesOutput, error) +} + +var _ GetOutpostSupportedInstanceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOutpostSupportedInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_GetSite.go b/service/outposts/api_op_GetSite.go index e5771aee534..417848bf4fc 100644 --- a/service/outposts/api_op_GetSite.go +++ b/service/outposts/api_op_GetSite.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetSiteMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_GetSiteAddress.go b/service/outposts/api_op_GetSiteAddress.go index d9085913069..d983f40c132 100644 --- a/service/outposts/api_op_GetSiteAddress.go +++ b/service/outposts/api_op_GetSiteAddress.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetSiteAddressMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSiteAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_ListAssets.go b/service/outposts/api_op_ListAssets.go index ddb1753d7a5..838e9c7e99e 100644 --- a/service/outposts/api_op_ListAssets.go +++ b/service/outposts/api_op_ListAssets.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssetsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListAssetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListAssetsAPIClient is a client that implements the ListAssets operation. -type ListAssetsAPIClient interface { - ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) -} - -var _ ListAssetsAPIClient = (*Client)(nil) - // ListAssetsPaginatorOptions is the paginator options for ListAssets type ListAssetsPaginatorOptions struct { // The maximum page size. @@ -220,6 +216,9 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListAssetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListAssetsAPIClient is a client that implements the ListAssets operation. +type ListAssetsAPIClient interface { + ListAssets(context.Context, *ListAssetsInput, ...func(*Options)) (*ListAssetsOutput, error) +} + +var _ ListAssetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_ListCapacityTasks.go b/service/outposts/api_op_ListCapacityTasks.go index 363461f819f..2145397b5f0 100644 --- a/service/outposts/api_op_ListCapacityTasks.go +++ b/service/outposts/api_op_ListCapacityTasks.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListCapacityTasksMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCapacityTasks(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListCapacityTasksMiddlewares(stack *middleware.Stac return nil } -// ListCapacityTasksAPIClient is a client that implements the ListCapacityTasks -// operation. -type ListCapacityTasksAPIClient interface { - ListCapacityTasks(context.Context, *ListCapacityTasksInput, ...func(*Options)) (*ListCapacityTasksOutput, error) -} - -var _ ListCapacityTasksAPIClient = (*Client)(nil) - // ListCapacityTasksPaginatorOptions is the paginator options for ListCapacityTasks type ListCapacityTasksPaginatorOptions struct { // The maximum page size. @@ -213,6 +208,9 @@ func (p *ListCapacityTasksPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCapacityTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListCapacityTasksPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListCapacityTasksAPIClient is a client that implements the ListCapacityTasks +// operation. +type ListCapacityTasksAPIClient interface { + ListCapacityTasks(context.Context, *ListCapacityTasksInput, ...func(*Options)) (*ListCapacityTasksOutput, error) +} + +var _ ListCapacityTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCapacityTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_ListCatalogItems.go b/service/outposts/api_op_ListCatalogItems.go index c8cf2d525cd..7c05fdf4ef9 100644 --- a/service/outposts/api_op_ListCatalogItems.go +++ b/service/outposts/api_op_ListCatalogItems.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCatalogItemsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCatalogItems(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCatalogItemsMiddlewares(stack *middleware.Stack return nil } -// ListCatalogItemsAPIClient is a client that implements the ListCatalogItems -// operation. -type ListCatalogItemsAPIClient interface { - ListCatalogItems(context.Context, *ListCatalogItemsInput, ...func(*Options)) (*ListCatalogItemsOutput, error) -} - -var _ ListCatalogItemsAPIClient = (*Client)(nil) - // ListCatalogItemsPaginatorOptions is the paginator options for ListCatalogItems type ListCatalogItemsPaginatorOptions struct { // The maximum page size. @@ -216,6 +211,9 @@ func (p *ListCatalogItemsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCatalogItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListCatalogItemsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCatalogItemsAPIClient is a client that implements the ListCatalogItems +// operation. +type ListCatalogItemsAPIClient interface { + ListCatalogItems(context.Context, *ListCatalogItemsInput, ...func(*Options)) (*ListCatalogItemsOutput, error) +} + +var _ ListCatalogItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCatalogItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_ListOrders.go b/service/outposts/api_op_ListOrders.go index 4cc42747a77..b52f3fe9f84 100644 --- a/service/outposts/api_op_ListOrders.go +++ b/service/outposts/api_op_ListOrders.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListOrdersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrders(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListOrdersMiddlewares(stack *middleware.Stack, opti return nil } -// ListOrdersAPIClient is a client that implements the ListOrders operation. -type ListOrdersAPIClient interface { - ListOrders(context.Context, *ListOrdersInput, ...func(*Options)) (*ListOrdersOutput, error) -} - -var _ ListOrdersAPIClient = (*Client)(nil) - // ListOrdersPaginatorOptions is the paginator options for ListOrders type ListOrdersPaginatorOptions struct { // The maximum page size. @@ -204,6 +200,9 @@ func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListOrdersAPIClient is a client that implements the ListOrders operation. +type ListOrdersAPIClient interface { + ListOrders(context.Context, *ListOrdersInput, ...func(*Options)) (*ListOrdersOutput, error) +} + +var _ ListOrdersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_ListOutposts.go b/service/outposts/api_op_ListOutposts.go index 55f7e185b99..1f11199e232 100644 --- a/service/outposts/api_op_ListOutposts.go +++ b/service/outposts/api_op_ListOutposts.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListOutpostsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOutposts(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListOutpostsMiddlewares(stack *middleware.Stack, op return nil } -// ListOutpostsAPIClient is a client that implements the ListOutposts operation. -type ListOutpostsAPIClient interface { - ListOutposts(context.Context, *ListOutpostsInput, ...func(*Options)) (*ListOutpostsOutput, error) -} - -var _ ListOutpostsAPIClient = (*Client)(nil) - // ListOutpostsPaginatorOptions is the paginator options for ListOutposts type ListOutpostsPaginatorOptions struct { // The maximum page size. @@ -215,6 +211,9 @@ func (p *ListOutpostsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOutposts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListOutpostsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListOutpostsAPIClient is a client that implements the ListOutposts operation. +type ListOutpostsAPIClient interface { + ListOutposts(context.Context, *ListOutpostsInput, ...func(*Options)) (*ListOutpostsOutput, error) +} + +var _ ListOutpostsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOutposts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_ListSites.go b/service/outposts/api_op_ListSites.go index 8f976e23828..43c601f543a 100644 --- a/service/outposts/api_op_ListSites.go +++ b/service/outposts/api_op_ListSites.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListSitesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSites(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListSitesMiddlewares(stack *middleware.Stack, optio return nil } -// ListSitesAPIClient is a client that implements the ListSites operation. -type ListSitesAPIClient interface { - ListSites(context.Context, *ListSitesInput, ...func(*Options)) (*ListSitesOutput, error) -} - -var _ ListSitesAPIClient = (*Client)(nil) - // ListSitesPaginatorOptions is the paginator options for ListSites type ListSitesPaginatorOptions struct { // The maximum page size. @@ -216,6 +212,9 @@ func (p *ListSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSites(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListSitesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListSitesAPIClient is a client that implements the ListSites operation. +type ListSitesAPIClient interface { + ListSites(context.Context, *ListSitesInput, ...func(*Options)) (*ListSitesOutput, error) +} + +var _ ListSitesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/outposts/api_op_ListTagsForResource.go b/service/outposts/api_op_ListTagsForResource.go index 7d5d75d20ad..088f4383944 100644 --- a/service/outposts/api_op_ListTagsForResource.go +++ b/service/outposts/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_StartCapacityTask.go b/service/outposts/api_op_StartCapacityTask.go index 7175773fc3c..6b5d236457e 100644 --- a/service/outposts/api_op_StartCapacityTask.go +++ b/service/outposts/api_op_StartCapacityTask.go @@ -153,6 +153,9 @@ func (c *Client) addOperationStartCapacityTaskMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCapacityTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_StartConnection.go b/service/outposts/api_op_StartConnection.go index d97f65c783a..e3cf02a55ee 100644 --- a/service/outposts/api_op_StartConnection.go +++ b/service/outposts/api_op_StartConnection.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartConnectionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_TagResource.go b/service/outposts/api_op_TagResource.go index d5380533b70..577027ddee1 100644 --- a/service/outposts/api_op_TagResource.go +++ b/service/outposts/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_UntagResource.go b/service/outposts/api_op_UntagResource.go index c4afbb4285d..4d13480c512 100644 --- a/service/outposts/api_op_UntagResource.go +++ b/service/outposts/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_UpdateOutpost.go b/service/outposts/api_op_UpdateOutpost.go index b87b715a717..67db321f902 100644 --- a/service/outposts/api_op_UpdateOutpost.go +++ b/service/outposts/api_op_UpdateOutpost.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateOutpostMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOutpostValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_UpdateSite.go b/service/outposts/api_op_UpdateSite.go index ef985db509a..4bdacddbcb9 100644 --- a/service/outposts/api_op_UpdateSite.go +++ b/service/outposts/api_op_UpdateSite.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateSiteMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_UpdateSiteAddress.go b/service/outposts/api_op_UpdateSiteAddress.go index ab65a29a0e8..b452cb65f6e 100644 --- a/service/outposts/api_op_UpdateSiteAddress.go +++ b/service/outposts/api_op_UpdateSiteAddress.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateSiteAddressMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSiteAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go b/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go index 18480b2c1bf..152d75741ed 100644 --- a/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go +++ b/service/outposts/api_op_UpdateSiteRackPhysicalProperties.go @@ -200,6 +200,9 @@ func (c *Client) addOperationUpdateSiteRackPhysicalPropertiesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSiteRackPhysicalPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_client.go b/service/panorama/api_client.go index f30ed80c152..673fca54903 100644 --- a/service/panorama/api_client.go +++ b/service/panorama/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/panorama/api_op_CreateApplicationInstance.go b/service/panorama/api_op_CreateApplicationInstance.go index 54e5a99090a..e92e74ecf03 100644 --- a/service/panorama/api_op_CreateApplicationInstance.go +++ b/service/panorama/api_op_CreateApplicationInstance.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateApplicationInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_CreateJobForDevices.go b/service/panorama/api_op_CreateJobForDevices.go index 4ad62c50dc6..e402fcd347e 100644 --- a/service/panorama/api_op_CreateJobForDevices.go +++ b/service/panorama/api_op_CreateJobForDevices.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateJobForDevicesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobForDevicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_CreateNodeFromTemplateJob.go b/service/panorama/api_op_CreateNodeFromTemplateJob.go index 8e7836f8d1c..3b1c23dbc67 100644 --- a/service/panorama/api_op_CreateNodeFromTemplateJob.go +++ b/service/panorama/api_op_CreateNodeFromTemplateJob.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateNodeFromTemplateJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNodeFromTemplateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_CreatePackage.go b/service/panorama/api_op_CreatePackage.go index 1d7a54535af..3bd1348123b 100644 --- a/service/panorama/api_op_CreatePackage.go +++ b/service/panorama/api_op_CreatePackage.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreatePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_CreatePackageImportJob.go b/service/panorama/api_op_CreatePackageImportJob.go index 7b0bc749cde..106c5e8c126 100644 --- a/service/panorama/api_op_CreatePackageImportJob.go +++ b/service/panorama/api_op_CreatePackageImportJob.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreatePackageImportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePackageImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DeleteDevice.go b/service/panorama/api_op_DeleteDevice.go index b69c8c22f3d..e7bfe124300 100644 --- a/service/panorama/api_op_DeleteDevice.go +++ b/service/panorama/api_op_DeleteDevice.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DeletePackage.go b/service/panorama/api_op_DeletePackage.go index d1fa8b63f6f..436c38a56cf 100644 --- a/service/panorama/api_op_DeletePackage.go +++ b/service/panorama/api_op_DeletePackage.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeletePackageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DeregisterPackageVersion.go b/service/panorama/api_op_DeregisterPackageVersion.go index 1f463ad4e7c..b081eb67ee3 100644 --- a/service/panorama/api_op_DeregisterPackageVersion.go +++ b/service/panorama/api_op_DeregisterPackageVersion.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeregisterPackageVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterPackageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribeApplicationInstance.go b/service/panorama/api_op_DescribeApplicationInstance.go index 344df83c751..ce7bcc1ac5f 100644 --- a/service/panorama/api_op_DescribeApplicationInstance.go +++ b/service/panorama/api_op_DescribeApplicationInstance.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeApplicationInstanceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribeApplicationInstanceDetails.go b/service/panorama/api_op_DescribeApplicationInstanceDetails.go index 558e7f7f124..53d6db3d9f1 100644 --- a/service/panorama/api_op_DescribeApplicationInstanceDetails.go +++ b/service/panorama/api_op_DescribeApplicationInstanceDetails.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeApplicationInstanceDetailsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationInstanceDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribeDevice.go b/service/panorama/api_op_DescribeDevice.go index 92adaae5b57..39cd19e0345 100644 --- a/service/panorama/api_op_DescribeDevice.go +++ b/service/panorama/api_op_DescribeDevice.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribeDeviceJob.go b/service/panorama/api_op_DescribeDeviceJob.go index 0f024da9fcc..a9251bbb490 100644 --- a/service/panorama/api_op_DescribeDeviceJob.go +++ b/service/panorama/api_op_DescribeDeviceJob.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeDeviceJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribeNode.go b/service/panorama/api_op_DescribeNode.go index 479cca19884..ab93aff7b6f 100644 --- a/service/panorama/api_op_DescribeNode.go +++ b/service/panorama/api_op_DescribeNode.go @@ -173,6 +173,9 @@ func (c *Client) addOperationDescribeNodeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribeNodeFromTemplateJob.go b/service/panorama/api_op_DescribeNodeFromTemplateJob.go index 8845f1da16f..648ad62df65 100644 --- a/service/panorama/api_op_DescribeNodeFromTemplateJob.go +++ b/service/panorama/api_op_DescribeNodeFromTemplateJob.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeNodeFromTemplateJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNodeFromTemplateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribePackage.go b/service/panorama/api_op_DescribePackage.go index e267dbbca48..6bd3ee0b9d8 100644 --- a/service/panorama/api_op_DescribePackage.go +++ b/service/panorama/api_op_DescribePackage.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribePackageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribePackageImportJob.go b/service/panorama/api_op_DescribePackageImportJob.go index 5a5c72625fb..9b3133051c0 100644 --- a/service/panorama/api_op_DescribePackageImportJob.go +++ b/service/panorama/api_op_DescribePackageImportJob.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribePackageImportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackageImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_DescribePackageVersion.go b/service/panorama/api_op_DescribePackageVersion.go index 883671f580b..80dad4a94ee 100644 --- a/service/panorama/api_op_DescribePackageVersion.go +++ b/service/panorama/api_op_DescribePackageVersion.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribePackageVersionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePackageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_ListApplicationInstanceDependencies.go b/service/panorama/api_op_ListApplicationInstanceDependencies.go index 363081c8b0d..77a933e5248 100644 --- a/service/panorama/api_op_ListApplicationInstanceDependencies.go +++ b/service/panorama/api_op_ListApplicationInstanceDependencies.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListApplicationInstanceDependenciesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationInstanceDependenciesValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListApplicationInstanceDependenciesMiddlewares(stac return nil } -// ListApplicationInstanceDependenciesAPIClient is a client that implements the -// ListApplicationInstanceDependencies operation. -type ListApplicationInstanceDependenciesAPIClient interface { - ListApplicationInstanceDependencies(context.Context, *ListApplicationInstanceDependenciesInput, ...func(*Options)) (*ListApplicationInstanceDependenciesOutput, error) -} - -var _ ListApplicationInstanceDependenciesAPIClient = (*Client)(nil) - // ListApplicationInstanceDependenciesPaginatorOptions is the paginator options // for ListApplicationInstanceDependencies type ListApplicationInstanceDependenciesPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListApplicationInstanceDependenciesPaginator) NextPage(ctx context.Cont params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationInstanceDependencies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListApplicationInstanceDependenciesPaginator) NextPage(ctx context.Cont return result, nil } +// ListApplicationInstanceDependenciesAPIClient is a client that implements the +// ListApplicationInstanceDependencies operation. +type ListApplicationInstanceDependenciesAPIClient interface { + ListApplicationInstanceDependencies(context.Context, *ListApplicationInstanceDependenciesInput, ...func(*Options)) (*ListApplicationInstanceDependenciesOutput, error) +} + +var _ ListApplicationInstanceDependenciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationInstanceDependencies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListApplicationInstanceNodeInstances.go b/service/panorama/api_op_ListApplicationInstanceNodeInstances.go index ab89a213381..69225aa2931 100644 --- a/service/panorama/api_op_ListApplicationInstanceNodeInstances.go +++ b/service/panorama/api_op_ListApplicationInstanceNodeInstances.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListApplicationInstanceNodeInstancesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationInstanceNodeInstancesValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListApplicationInstanceNodeInstancesMiddlewares(sta return nil } -// ListApplicationInstanceNodeInstancesAPIClient is a client that implements the -// ListApplicationInstanceNodeInstances operation. -type ListApplicationInstanceNodeInstancesAPIClient interface { - ListApplicationInstanceNodeInstances(context.Context, *ListApplicationInstanceNodeInstancesInput, ...func(*Options)) (*ListApplicationInstanceNodeInstancesOutput, error) -} - -var _ ListApplicationInstanceNodeInstancesAPIClient = (*Client)(nil) - // ListApplicationInstanceNodeInstancesPaginatorOptions is the paginator options // for ListApplicationInstanceNodeInstances type ListApplicationInstanceNodeInstancesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListApplicationInstanceNodeInstancesPaginator) NextPage(ctx context.Con params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationInstanceNodeInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListApplicationInstanceNodeInstancesPaginator) NextPage(ctx context.Con return result, nil } +// ListApplicationInstanceNodeInstancesAPIClient is a client that implements the +// ListApplicationInstanceNodeInstances operation. +type ListApplicationInstanceNodeInstancesAPIClient interface { + ListApplicationInstanceNodeInstances(context.Context, *ListApplicationInstanceNodeInstancesInput, ...func(*Options)) (*ListApplicationInstanceNodeInstancesOutput, error) +} + +var _ ListApplicationInstanceNodeInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationInstanceNodeInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListApplicationInstances.go b/service/panorama/api_op_ListApplicationInstances.go index ebf24441683..9aac70beeb6 100644 --- a/service/panorama/api_op_ListApplicationInstances.go +++ b/service/panorama/api_op_ListApplicationInstances.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListApplicationInstancesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationInstances(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListApplicationInstancesMiddlewares(stack *middlewa return nil } -// ListApplicationInstancesAPIClient is a client that implements the -// ListApplicationInstances operation. -type ListApplicationInstancesAPIClient interface { - ListApplicationInstances(context.Context, *ListApplicationInstancesInput, ...func(*Options)) (*ListApplicationInstancesOutput, error) -} - -var _ ListApplicationInstancesAPIClient = (*Client)(nil) - // ListApplicationInstancesPaginatorOptions is the paginator options for // ListApplicationInstances type ListApplicationInstancesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListApplicationInstancesPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListApplicationInstancesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationInstancesAPIClient is a client that implements the +// ListApplicationInstances operation. +type ListApplicationInstancesAPIClient interface { + ListApplicationInstances(context.Context, *ListApplicationInstancesInput, ...func(*Options)) (*ListApplicationInstancesOutput, error) +} + +var _ ListApplicationInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListDevices.go b/service/panorama/api_op_ListDevices.go index 401816a96ba..f74e395e242 100644 --- a/service/panorama/api_op_ListDevices.go +++ b/service/panorama/api_op_ListDevices.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevices(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListDevicesAPIClient is a client that implements the ListDevices operation. -type ListDevicesAPIClient interface { - ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) -} - -var _ ListDevicesAPIClient = (*Client)(nil) - // ListDevicesPaginatorOptions is the paginator options for ListDevices type ListDevicesPaginatorOptions struct { // The maximum number of devices to return in one page of results. @@ -213,6 +209,9 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListDevicesJobs.go b/service/panorama/api_op_ListDevicesJobs.go index 15c386e40df..28e6f260a3b 100644 --- a/service/panorama/api_op_ListDevicesJobs.go +++ b/service/panorama/api_op_ListDevicesJobs.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListDevicesJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevicesJobs(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListDevicesJobsMiddlewares(stack *middleware.Stack, return nil } -// ListDevicesJobsAPIClient is a client that implements the ListDevicesJobs -// operation. -type ListDevicesJobsAPIClient interface { - ListDevicesJobs(context.Context, *ListDevicesJobsInput, ...func(*Options)) (*ListDevicesJobsOutput, error) -} - -var _ ListDevicesJobsAPIClient = (*Client)(nil) - // ListDevicesJobsPaginatorOptions is the paginator options for ListDevicesJobs type ListDevicesJobsPaginatorOptions struct { // The maximum number of device jobs to return in one page of results. @@ -202,6 +197,9 @@ func (p *ListDevicesJobsPaginator) NextPage(ctx context.Context, optFns ...func( params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevicesJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListDevicesJobsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDevicesJobsAPIClient is a client that implements the ListDevicesJobs +// operation. +type ListDevicesJobsAPIClient interface { + ListDevicesJobs(context.Context, *ListDevicesJobsInput, ...func(*Options)) (*ListDevicesJobsOutput, error) +} + +var _ ListDevicesJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevicesJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListNodeFromTemplateJobs.go b/service/panorama/api_op_ListNodeFromTemplateJobs.go index 6e92612b35d..292f18ed5f6 100644 --- a/service/panorama/api_op_ListNodeFromTemplateJobs.go +++ b/service/panorama/api_op_ListNodeFromTemplateJobs.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListNodeFromTemplateJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodeFromTemplateJobs(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListNodeFromTemplateJobsMiddlewares(stack *middlewa return nil } -// ListNodeFromTemplateJobsAPIClient is a client that implements the -// ListNodeFromTemplateJobs operation. -type ListNodeFromTemplateJobsAPIClient interface { - ListNodeFromTemplateJobs(context.Context, *ListNodeFromTemplateJobsInput, ...func(*Options)) (*ListNodeFromTemplateJobsOutput, error) -} - -var _ ListNodeFromTemplateJobsAPIClient = (*Client)(nil) - // ListNodeFromTemplateJobsPaginatorOptions is the paginator options for // ListNodeFromTemplateJobs type ListNodeFromTemplateJobsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListNodeFromTemplateJobsPaginator) NextPage(ctx context.Context, optFns params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNodeFromTemplateJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListNodeFromTemplateJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListNodeFromTemplateJobsAPIClient is a client that implements the +// ListNodeFromTemplateJobs operation. +type ListNodeFromTemplateJobsAPIClient interface { + ListNodeFromTemplateJobs(context.Context, *ListNodeFromTemplateJobsInput, ...func(*Options)) (*ListNodeFromTemplateJobsOutput, error) +} + +var _ ListNodeFromTemplateJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNodeFromTemplateJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListNodes.go b/service/panorama/api_op_ListNodes.go index 75d72245478..2e68670d080 100644 --- a/service/panorama/api_op_ListNodes.go +++ b/service/panorama/api_op_ListNodes.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNodes(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListNodesMiddlewares(stack *middleware.Stack, optio return nil } -// ListNodesAPIClient is a client that implements the ListNodes operation. -type ListNodesAPIClient interface { - ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) -} - -var _ ListNodesAPIClient = (*Client)(nil) - // ListNodesPaginatorOptions is the paginator options for ListNodes type ListNodesPaginatorOptions struct { // The maximum number of nodes to return in one page of results. @@ -213,6 +209,9 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListNodesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListNodesAPIClient is a client that implements the ListNodes operation. +type ListNodesAPIClient interface { + ListNodes(context.Context, *ListNodesInput, ...func(*Options)) (*ListNodesOutput, error) +} + +var _ ListNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListPackageImportJobs.go b/service/panorama/api_op_ListPackageImportJobs.go index b8501287e2a..60f38c0c70c 100644 --- a/service/panorama/api_op_ListPackageImportJobs.go +++ b/service/panorama/api_op_ListPackageImportJobs.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListPackageImportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackageImportJobs(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListPackageImportJobsMiddlewares(stack *middleware. return nil } -// ListPackageImportJobsAPIClient is a client that implements the -// ListPackageImportJobs operation. -type ListPackageImportJobsAPIClient interface { - ListPackageImportJobs(context.Context, *ListPackageImportJobsInput, ...func(*Options)) (*ListPackageImportJobsOutput, error) -} - -var _ ListPackageImportJobsAPIClient = (*Client)(nil) - // ListPackageImportJobsPaginatorOptions is the paginator options for // ListPackageImportJobs type ListPackageImportJobsPaginatorOptions struct { @@ -202,6 +197,9 @@ func (p *ListPackageImportJobsPaginator) NextPage(ctx context.Context, optFns .. params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackageImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListPackageImportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPackageImportJobsAPIClient is a client that implements the +// ListPackageImportJobs operation. +type ListPackageImportJobsAPIClient interface { + ListPackageImportJobs(context.Context, *ListPackageImportJobsInput, ...func(*Options)) (*ListPackageImportJobsOutput, error) +} + +var _ ListPackageImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackageImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListPackages.go b/service/panorama/api_op_ListPackages.go index 3712582f17a..3db6b44f5e0 100644 --- a/service/panorama/api_op_ListPackages.go +++ b/service/panorama/api_op_ListPackages.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListPackagesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPackages(options.Region), middleware.Before); err != nil { return err } @@ -132,13 +135,6 @@ func (c *Client) addOperationListPackagesMiddlewares(stack *middleware.Stack, op return nil } -// ListPackagesAPIClient is a client that implements the ListPackages operation. -type ListPackagesAPIClient interface { - ListPackages(context.Context, *ListPackagesInput, ...func(*Options)) (*ListPackagesOutput, error) -} - -var _ ListPackagesAPIClient = (*Client)(nil) - // ListPackagesPaginatorOptions is the paginator options for ListPackages type ListPackagesPaginatorOptions struct { // The maximum number of packages to return in one page of results. @@ -198,6 +194,9 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -217,6 +216,13 @@ func (p *ListPackagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPackagesAPIClient is a client that implements the ListPackages operation. +type ListPackagesAPIClient interface { + ListPackages(context.Context, *ListPackagesInput, ...func(*Options)) (*ListPackagesOutput, error) +} + +var _ ListPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/panorama/api_op_ListTagsForResource.go b/service/panorama/api_op_ListTagsForResource.go index 8a72ef1502f..d008341d7ff 100644 --- a/service/panorama/api_op_ListTagsForResource.go +++ b/service/panorama/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_ProvisionDevice.go b/service/panorama/api_op_ProvisionDevice.go index 723ff01073d..ed9ca81ac17 100644 --- a/service/panorama/api_op_ProvisionDevice.go +++ b/service/panorama/api_op_ProvisionDevice.go @@ -135,6 +135,9 @@ func (c *Client) addOperationProvisionDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_RegisterPackageVersion.go b/service/panorama/api_op_RegisterPackageVersion.go index 7b6cefbc086..58990864f9e 100644 --- a/service/panorama/api_op_RegisterPackageVersion.go +++ b/service/panorama/api_op_RegisterPackageVersion.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRegisterPackageVersionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterPackageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_RemoveApplicationInstance.go b/service/panorama/api_op_RemoveApplicationInstance.go index 4a991c6f16c..22dc1e8389a 100644 --- a/service/panorama/api_op_RemoveApplicationInstance.go +++ b/service/panorama/api_op_RemoveApplicationInstance.go @@ -101,6 +101,9 @@ func (c *Client) addOperationRemoveApplicationInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveApplicationInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go b/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go index 67eb4e3a34d..02b0f56db12 100644 --- a/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go +++ b/service/panorama/api_op_SignalApplicationInstanceNodeInstances.go @@ -113,6 +113,9 @@ func (c *Client) addOperationSignalApplicationInstanceNodeInstancesMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignalApplicationInstanceNodeInstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_TagResource.go b/service/panorama/api_op_TagResource.go index ebf60532f90..5832c435a5e 100644 --- a/service/panorama/api_op_TagResource.go +++ b/service/panorama/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_UntagResource.go b/service/panorama/api_op_UntagResource.go index 4a565c5b9ba..18e24c14735 100644 --- a/service/panorama/api_op_UntagResource.go +++ b/service/panorama/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/panorama/api_op_UpdateDeviceMetadata.go b/service/panorama/api_op_UpdateDeviceMetadata.go index d85ea3163cb..c880fb99fb8 100644 --- a/service/panorama/api_op_UpdateDeviceMetadata.go +++ b/service/panorama/api_op_UpdateDeviceMetadata.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateDeviceMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_client.go b/service/paymentcryptography/api_client.go index bf562cc1cb1..94aa547c2bd 100644 --- a/service/paymentcryptography/api_client.go +++ b/service/paymentcryptography/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/paymentcryptography/api_op_CreateAlias.go b/service/paymentcryptography/api_op_CreateAlias.go index 5456a33eeba..192dde04659 100644 --- a/service/paymentcryptography/api_op_CreateAlias.go +++ b/service/paymentcryptography/api_op_CreateAlias.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_CreateKey.go b/service/paymentcryptography/api_op_CreateKey.go index 95e62d1964c..624ebb17a70 100644 --- a/service/paymentcryptography/api_op_CreateKey.go +++ b/service/paymentcryptography/api_op_CreateKey.go @@ -185,6 +185,9 @@ func (c *Client) addOperationCreateKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_DeleteAlias.go b/service/paymentcryptography/api_op_DeleteAlias.go index db2c834cdc9..2a5731c6799 100644 --- a/service/paymentcryptography/api_op_DeleteAlias.go +++ b/service/paymentcryptography/api_op_DeleteAlias.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_DeleteKey.go b/service/paymentcryptography/api_op_DeleteKey.go index de0625313d7..5417670427b 100644 --- a/service/paymentcryptography/api_op_DeleteKey.go +++ b/service/paymentcryptography/api_op_DeleteKey.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDeleteKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_ExportKey.go b/service/paymentcryptography/api_op_ExportKey.go index 10999b13140..b1c3a2253b1 100644 --- a/service/paymentcryptography/api_op_ExportKey.go +++ b/service/paymentcryptography/api_op_ExportKey.go @@ -275,6 +275,9 @@ func (c *Client) addOperationExportKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_GetAlias.go b/service/paymentcryptography/api_op_GetAlias.go index f0c51025d27..81c2888a44f 100644 --- a/service/paymentcryptography/api_op_GetAlias.go +++ b/service/paymentcryptography/api_op_GetAlias.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetAliasMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_GetKey.go b/service/paymentcryptography/api_op_GetKey.go index d8ad2d6e9ce..62c1a9eb523 100644 --- a/service/paymentcryptography/api_op_GetKey.go +++ b/service/paymentcryptography/api_op_GetKey.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetKeyMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_GetParametersForExport.go b/service/paymentcryptography/api_op_GetParametersForExport.go index 90cd03ea7bf..622f4f49fe2 100644 --- a/service/paymentcryptography/api_op_GetParametersForExport.go +++ b/service/paymentcryptography/api_op_GetParametersForExport.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetParametersForExportMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParametersForExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_GetParametersForImport.go b/service/paymentcryptography/api_op_GetParametersForImport.go index 49714c9446e..c490d1116e0 100644 --- a/service/paymentcryptography/api_op_GetParametersForImport.go +++ b/service/paymentcryptography/api_op_GetParametersForImport.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetParametersForImportMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParametersForImportValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_GetPublicKeyCertificate.go b/service/paymentcryptography/api_op_GetPublicKeyCertificate.go index c671bbd4f67..2ce7724b993 100644 --- a/service/paymentcryptography/api_op_GetPublicKeyCertificate.go +++ b/service/paymentcryptography/api_op_GetPublicKeyCertificate.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetPublicKeyCertificateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPublicKeyCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_ImportKey.go b/service/paymentcryptography/api_op_ImportKey.go index c241d4debfa..812b83b70e0 100644 --- a/service/paymentcryptography/api_op_ImportKey.go +++ b/service/paymentcryptography/api_op_ImportKey.go @@ -303,6 +303,9 @@ func (c *Client) addOperationImportKeyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_ListAliases.go b/service/paymentcryptography/api_op_ListAliases.go index 3b51ad2231e..71af3c903a1 100644 --- a/service/paymentcryptography/api_op_ListAliases.go +++ b/service/paymentcryptography/api_op_ListAliases.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(options.Region), middleware.Before); err != nil { return err } @@ -169,13 +172,6 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt return nil } -// ListAliasesAPIClient is a client that implements the ListAliases operation. -type ListAliasesAPIClient interface { - ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) -} - -var _ ListAliasesAPIClient = (*Client)(nil) - // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -244,6 +240,9 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +262,13 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/paymentcryptography/api_op_ListKeys.go b/service/paymentcryptography/api_op_ListKeys.go index 19cee4d6e18..f43d3210518 100644 --- a/service/paymentcryptography/api_op_ListKeys.go +++ b/service/paymentcryptography/api_op_ListKeys.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeys(options.Region), middleware.Before); err != nil { return err } @@ -167,13 +170,6 @@ func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, option return nil } -// ListKeysAPIClient is a client that implements the ListKeys operation. -type ListKeysAPIClient interface { - ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) -} - -var _ ListKeysAPIClient = (*Client)(nil) - // ListKeysPaginatorOptions is the paginator options for ListKeys type ListKeysPaginatorOptions struct { // Use this parameter to specify the maximum number of items to return. When this @@ -242,6 +238,9 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +260,13 @@ func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListKeysAPIClient is a client that implements the ListKeys operation. +type ListKeysAPIClient interface { + ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error) +} + +var _ ListKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/paymentcryptography/api_op_ListTagsForResource.go b/service/paymentcryptography/api_op_ListTagsForResource.go index a8acec8df31..1b3f09b3663 100644 --- a/service/paymentcryptography/api_op_ListTagsForResource.go +++ b/service/paymentcryptography/api_op_ListTagsForResource.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/paymentcryptography/api_op_RestoreKey.go b/service/paymentcryptography/api_op_RestoreKey.go index 780e8f60da4..1a60d23ad73 100644 --- a/service/paymentcryptography/api_op_RestoreKey.go +++ b/service/paymentcryptography/api_op_RestoreKey.go @@ -131,6 +131,9 @@ func (c *Client) addOperationRestoreKeyMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_StartKeyUsage.go b/service/paymentcryptography/api_op_StartKeyUsage.go index c53e40f636c..a9d666f5f34 100644 --- a/service/paymentcryptography/api_op_StartKeyUsage.go +++ b/service/paymentcryptography/api_op_StartKeyUsage.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStartKeyUsageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartKeyUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_StopKeyUsage.go b/service/paymentcryptography/api_op_StopKeyUsage.go index d09a100cfa1..9106685a789 100644 --- a/service/paymentcryptography/api_op_StopKeyUsage.go +++ b/service/paymentcryptography/api_op_StopKeyUsage.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStopKeyUsageMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopKeyUsageValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_TagResource.go b/service/paymentcryptography/api_op_TagResource.go index e543442da39..3472dd5b9e0 100644 --- a/service/paymentcryptography/api_op_TagResource.go +++ b/service/paymentcryptography/api_op_TagResource.go @@ -143,6 +143,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_UntagResource.go b/service/paymentcryptography/api_op_UntagResource.go index 7d992461526..4aad034faff 100644 --- a/service/paymentcryptography/api_op_UntagResource.go +++ b/service/paymentcryptography/api_op_UntagResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptography/api_op_UpdateAlias.go b/service/paymentcryptography/api_op_UpdateAlias.go index ed1723419da..b89866269df 100644 --- a/service/paymentcryptography/api_op_UpdateAlias.go +++ b/service/paymentcryptography/api_op_UpdateAlias.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_client.go b/service/paymentcryptographydata/api_client.go index 1431fa9d651..2aa622f839c 100644 --- a/service/paymentcryptographydata/api_client.go +++ b/service/paymentcryptographydata/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/paymentcryptographydata/api_op_DecryptData.go b/service/paymentcryptographydata/api_op_DecryptData.go index 505057d68a6..a43bbd9e7cf 100644 --- a/service/paymentcryptographydata/api_op_DecryptData.go +++ b/service/paymentcryptographydata/api_op_DecryptData.go @@ -175,6 +175,9 @@ func (c *Client) addOperationDecryptDataMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecryptDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_EncryptData.go b/service/paymentcryptographydata/api_op_EncryptData.go index 2b0d4de219a..6281c908adf 100644 --- a/service/paymentcryptographydata/api_op_EncryptData.go +++ b/service/paymentcryptographydata/api_op_EncryptData.go @@ -187,6 +187,9 @@ func (c *Client) addOperationEncryptDataMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEncryptDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_GenerateCardValidationData.go b/service/paymentcryptographydata/api_op_GenerateCardValidationData.go index 2d77d5a6b20..965c70884bf 100644 --- a/service/paymentcryptographydata/api_op_GenerateCardValidationData.go +++ b/service/paymentcryptographydata/api_op_GenerateCardValidationData.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGenerateCardValidationDataMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateCardValidationDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_GenerateMac.go b/service/paymentcryptographydata/api_op_GenerateMac.go index 6c9f0797b92..e3bba115051 100644 --- a/service/paymentcryptographydata/api_op_GenerateMac.go +++ b/service/paymentcryptographydata/api_op_GenerateMac.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGenerateMacMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateMacValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_GeneratePinData.go b/service/paymentcryptographydata/api_op_GeneratePinData.go index 4cff169a335..60ca1d37cf8 100644 --- a/service/paymentcryptographydata/api_op_GeneratePinData.go +++ b/service/paymentcryptographydata/api_op_GeneratePinData.go @@ -209,6 +209,9 @@ func (c *Client) addOperationGeneratePinDataMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGeneratePinDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_ReEncryptData.go b/service/paymentcryptographydata/api_op_ReEncryptData.go index 66cd42d0819..6bea2d015c5 100644 --- a/service/paymentcryptographydata/api_op_ReEncryptData.go +++ b/service/paymentcryptographydata/api_op_ReEncryptData.go @@ -183,6 +183,9 @@ func (c *Client) addOperationReEncryptDataMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReEncryptDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_TranslatePinData.go b/service/paymentcryptographydata/api_op_TranslatePinData.go index 7571986a0bd..cef89ac0e31 100644 --- a/service/paymentcryptographydata/api_op_TranslatePinData.go +++ b/service/paymentcryptographydata/api_op_TranslatePinData.go @@ -192,6 +192,9 @@ func (c *Client) addOperationTranslatePinDataMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTranslatePinDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_VerifyAuthRequestCryptogram.go b/service/paymentcryptographydata/api_op_VerifyAuthRequestCryptogram.go index 003b2cb2570..4496bd75642 100644 --- a/service/paymentcryptographydata/api_op_VerifyAuthRequestCryptogram.go +++ b/service/paymentcryptographydata/api_op_VerifyAuthRequestCryptogram.go @@ -189,6 +189,9 @@ func (c *Client) addOperationVerifyAuthRequestCryptogramMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyAuthRequestCryptogramValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_VerifyCardValidationData.go b/service/paymentcryptographydata/api_op_VerifyCardValidationData.go index 51def3c00b4..a23a243ad9f 100644 --- a/service/paymentcryptographydata/api_op_VerifyCardValidationData.go +++ b/service/paymentcryptographydata/api_op_VerifyCardValidationData.go @@ -168,6 +168,9 @@ func (c *Client) addOperationVerifyCardValidationDataMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyCardValidationDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_VerifyMac.go b/service/paymentcryptographydata/api_op_VerifyMac.go index 4c2b82fc8df..05aa351c8d3 100644 --- a/service/paymentcryptographydata/api_op_VerifyMac.go +++ b/service/paymentcryptographydata/api_op_VerifyMac.go @@ -158,6 +158,9 @@ func (c *Client) addOperationVerifyMacMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyMacValidationMiddleware(stack); err != nil { return err } diff --git a/service/paymentcryptographydata/api_op_VerifyPinData.go b/service/paymentcryptographydata/api_op_VerifyPinData.go index db9b4faecd9..76fcc067644 100644 --- a/service/paymentcryptographydata/api_op_VerifyPinData.go +++ b/service/paymentcryptographydata/api_op_VerifyPinData.go @@ -202,6 +202,9 @@ func (c *Client) addOperationVerifyPinDataMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyPinDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_client.go b/service/pcaconnectorad/api_client.go index 982d646feec..2b6eccb3659 100644 --- a/service/pcaconnectorad/api_client.go +++ b/service/pcaconnectorad/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/pcaconnectorad/api_op_CreateConnector.go b/service/pcaconnectorad/api_op_CreateConnector.go index fcb6925b6ae..7921d76b6d3 100644 --- a/service/pcaconnectorad/api_op_CreateConnector.go +++ b/service/pcaconnectorad/api_op_CreateConnector.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConnectorMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_CreateDirectoryRegistration.go b/service/pcaconnectorad/api_op_CreateDirectoryRegistration.go index 73d9388b18f..86f910ae531 100644 --- a/service/pcaconnectorad/api_op_CreateDirectoryRegistration.go +++ b/service/pcaconnectorad/api_op_CreateDirectoryRegistration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateDirectoryRegistrationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDirectoryRegistrationMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_CreateServicePrincipalName.go b/service/pcaconnectorad/api_op_CreateServicePrincipalName.go index f4a51bf4c0e..4682401628d 100644 --- a/service/pcaconnectorad/api_op_CreateServicePrincipalName.go +++ b/service/pcaconnectorad/api_op_CreateServicePrincipalName.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateServicePrincipalNameMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServicePrincipalNameMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_CreateTemplate.go b/service/pcaconnectorad/api_op_CreateTemplate.go index da3bda95976..7ac5d022102 100644 --- a/service/pcaconnectorad/api_op_CreateTemplate.go +++ b/service/pcaconnectorad/api_op_CreateTemplate.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_CreateTemplateGroupAccessControlEntry.go b/service/pcaconnectorad/api_op_CreateTemplateGroupAccessControlEntry.go index 3bffdd71e48..b1f4f234cd5 100644 --- a/service/pcaconnectorad/api_op_CreateTemplateGroupAccessControlEntry.go +++ b/service/pcaconnectorad/api_op_CreateTemplateGroupAccessControlEntry.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateTemplateGroupAccessControlEntryMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTemplateGroupAccessControlEntryMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_DeleteConnector.go b/service/pcaconnectorad/api_op_DeleteConnector.go index 0bcafd4659b..7d2d6220138 100644 --- a/service/pcaconnectorad/api_op_DeleteConnector.go +++ b/service/pcaconnectorad/api_op_DeleteConnector.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_DeleteDirectoryRegistration.go b/service/pcaconnectorad/api_op_DeleteDirectoryRegistration.go index fed8abbcb49..617d1d23ec1 100644 --- a/service/pcaconnectorad/api_op_DeleteDirectoryRegistration.go +++ b/service/pcaconnectorad/api_op_DeleteDirectoryRegistration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDirectoryRegistrationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDirectoryRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_DeleteServicePrincipalName.go b/service/pcaconnectorad/api_op_DeleteServicePrincipalName.go index 3b7b8ace357..b50b888985f 100644 --- a/service/pcaconnectorad/api_op_DeleteServicePrincipalName.go +++ b/service/pcaconnectorad/api_op_DeleteServicePrincipalName.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteServicePrincipalNameMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServicePrincipalNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_DeleteTemplate.go b/service/pcaconnectorad/api_op_DeleteTemplate.go index 2f4327dfaf3..61dd7f1289e 100644 --- a/service/pcaconnectorad/api_op_DeleteTemplate.go +++ b/service/pcaconnectorad/api_op_DeleteTemplate.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_DeleteTemplateGroupAccessControlEntry.go b/service/pcaconnectorad/api_op_DeleteTemplateGroupAccessControlEntry.go index 1ec42fd425a..950d452306d 100644 --- a/service/pcaconnectorad/api_op_DeleteTemplateGroupAccessControlEntry.go +++ b/service/pcaconnectorad/api_op_DeleteTemplateGroupAccessControlEntry.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTemplateGroupAccessControlEntryMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateGroupAccessControlEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_GetConnector.go b/service/pcaconnectorad/api_op_GetConnector.go index 3aaaf2adca9..1928e76c654 100644 --- a/service/pcaconnectorad/api_op_GetConnector.go +++ b/service/pcaconnectorad/api_op_GetConnector.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetConnectorMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_GetDirectoryRegistration.go b/service/pcaconnectorad/api_op_GetDirectoryRegistration.go index 39a17ecafbd..92afe33363d 100644 --- a/service/pcaconnectorad/api_op_GetDirectoryRegistration.go +++ b/service/pcaconnectorad/api_op_GetDirectoryRegistration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetDirectoryRegistrationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDirectoryRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_GetServicePrincipalName.go b/service/pcaconnectorad/api_op_GetServicePrincipalName.go index 271bc5c29ec..14735d2c004 100644 --- a/service/pcaconnectorad/api_op_GetServicePrincipalName.go +++ b/service/pcaconnectorad/api_op_GetServicePrincipalName.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetServicePrincipalNameMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServicePrincipalNameValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_GetTemplate.go b/service/pcaconnectorad/api_op_GetTemplate.go index f37bf16f1fd..7c895a59da4 100644 --- a/service/pcaconnectorad/api_op_GetTemplate.go +++ b/service/pcaconnectorad/api_op_GetTemplate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetTemplateMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_GetTemplateGroupAccessControlEntry.go b/service/pcaconnectorad/api_op_GetTemplateGroupAccessControlEntry.go index 401bab44ba4..d90224f0332 100644 --- a/service/pcaconnectorad/api_op_GetTemplateGroupAccessControlEntry.go +++ b/service/pcaconnectorad/api_op_GetTemplateGroupAccessControlEntry.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetTemplateGroupAccessControlEntryMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateGroupAccessControlEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_ListConnectors.go b/service/pcaconnectorad/api_op_ListConnectors.go index bf3f1782450..51069ea46da 100644 --- a/service/pcaconnectorad/api_op_ListConnectors.go +++ b/service/pcaconnectorad/api_op_ListConnectors.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectors(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectorsAPIClient is a client that implements the ListConnectors -// operation. -type ListConnectorsAPIClient interface { - ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) -} - -var _ ListConnectorsAPIClient = (*Client)(nil) - // ListConnectorsPaginatorOptions is the paginator options for ListConnectors type ListConnectorsPaginatorOptions struct { // Use this parameter when paginating results to specify the maximum number of @@ -214,6 +209,9 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListConnectorsAPIClient is a client that implements the ListConnectors +// operation. +type ListConnectorsAPIClient interface { + ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) +} + +var _ ListConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorad/api_op_ListDirectoryRegistrations.go b/service/pcaconnectorad/api_op_ListDirectoryRegistrations.go index 0f3af5eefe5..65c2915b522 100644 --- a/service/pcaconnectorad/api_op_ListDirectoryRegistrations.go +++ b/service/pcaconnectorad/api_op_ListDirectoryRegistrations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDirectoryRegistrationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDirectoryRegistrations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDirectoryRegistrationsMiddlewares(stack *middle return nil } -// ListDirectoryRegistrationsAPIClient is a client that implements the -// ListDirectoryRegistrations operation. -type ListDirectoryRegistrationsAPIClient interface { - ListDirectoryRegistrations(context.Context, *ListDirectoryRegistrationsInput, ...func(*Options)) (*ListDirectoryRegistrationsOutput, error) -} - -var _ ListDirectoryRegistrationsAPIClient = (*Client)(nil) - // ListDirectoryRegistrationsPaginatorOptions is the paginator options for // ListDirectoryRegistrations type ListDirectoryRegistrationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListDirectoryRegistrationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDirectoryRegistrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListDirectoryRegistrationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListDirectoryRegistrationsAPIClient is a client that implements the +// ListDirectoryRegistrations operation. +type ListDirectoryRegistrationsAPIClient interface { + ListDirectoryRegistrations(context.Context, *ListDirectoryRegistrationsInput, ...func(*Options)) (*ListDirectoryRegistrationsOutput, error) +} + +var _ ListDirectoryRegistrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDirectoryRegistrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorad/api_op_ListServicePrincipalNames.go b/service/pcaconnectorad/api_op_ListServicePrincipalNames.go index 2fc45ef5a30..74a44ea05ad 100644 --- a/service/pcaconnectorad/api_op_ListServicePrincipalNames.go +++ b/service/pcaconnectorad/api_op_ListServicePrincipalNames.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListServicePrincipalNamesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicePrincipalNamesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListServicePrincipalNamesMiddlewares(stack *middlew return nil } -// ListServicePrincipalNamesAPIClient is a client that implements the -// ListServicePrincipalNames operation. -type ListServicePrincipalNamesAPIClient interface { - ListServicePrincipalNames(context.Context, *ListServicePrincipalNamesInput, ...func(*Options)) (*ListServicePrincipalNamesOutput, error) -} - -var _ ListServicePrincipalNamesAPIClient = (*Client)(nil) - // ListServicePrincipalNamesPaginatorOptions is the paginator options for // ListServicePrincipalNames type ListServicePrincipalNamesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListServicePrincipalNamesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServicePrincipalNames(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListServicePrincipalNamesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListServicePrincipalNamesAPIClient is a client that implements the +// ListServicePrincipalNames operation. +type ListServicePrincipalNamesAPIClient interface { + ListServicePrincipalNames(context.Context, *ListServicePrincipalNamesInput, ...func(*Options)) (*ListServicePrincipalNamesOutput, error) +} + +var _ ListServicePrincipalNamesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServicePrincipalNames(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorad/api_op_ListTagsForResource.go b/service/pcaconnectorad/api_op_ListTagsForResource.go index 7f0445040bb..e32a04c8c2d 100644 --- a/service/pcaconnectorad/api_op_ListTagsForResource.go +++ b/service/pcaconnectorad/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_ListTemplateGroupAccessControlEntries.go b/service/pcaconnectorad/api_op_ListTemplateGroupAccessControlEntries.go index 5a957a79b3d..91a4919092c 100644 --- a/service/pcaconnectorad/api_op_ListTemplateGroupAccessControlEntries.go +++ b/service/pcaconnectorad/api_op_ListTemplateGroupAccessControlEntries.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListTemplateGroupAccessControlEntriesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateGroupAccessControlEntriesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListTemplateGroupAccessControlEntriesMiddlewares(st return nil } -// ListTemplateGroupAccessControlEntriesAPIClient is a client that implements the -// ListTemplateGroupAccessControlEntries operation. -type ListTemplateGroupAccessControlEntriesAPIClient interface { - ListTemplateGroupAccessControlEntries(context.Context, *ListTemplateGroupAccessControlEntriesInput, ...func(*Options)) (*ListTemplateGroupAccessControlEntriesOutput, error) -} - -var _ ListTemplateGroupAccessControlEntriesAPIClient = (*Client)(nil) - // ListTemplateGroupAccessControlEntriesPaginatorOptions is the paginator options // for ListTemplateGroupAccessControlEntries type ListTemplateGroupAccessControlEntriesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListTemplateGroupAccessControlEntriesPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateGroupAccessControlEntries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListTemplateGroupAccessControlEntriesPaginator) NextPage(ctx context.Co return result, nil } +// ListTemplateGroupAccessControlEntriesAPIClient is a client that implements the +// ListTemplateGroupAccessControlEntries operation. +type ListTemplateGroupAccessControlEntriesAPIClient interface { + ListTemplateGroupAccessControlEntries(context.Context, *ListTemplateGroupAccessControlEntriesInput, ...func(*Options)) (*ListTemplateGroupAccessControlEntriesOutput, error) +} + +var _ ListTemplateGroupAccessControlEntriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateGroupAccessControlEntries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorad/api_op_ListTemplates.go b/service/pcaconnectorad/api_op_ListTemplates.go index a40e023720d..ed4be3c9f4d 100644 --- a/service/pcaconnectorad/api_op_ListTemplates.go +++ b/service/pcaconnectorad/api_op_ListTemplates.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplatesValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o return nil } -// ListTemplatesAPIClient is a client that implements the ListTemplates operation. -type ListTemplatesAPIClient interface { - ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) -} - -var _ ListTemplatesAPIClient = (*Client)(nil) - // ListTemplatesPaginatorOptions is the paginator options for ListTemplates type ListTemplatesPaginatorOptions struct { // Use this parameter when paginating results to specify the maximum number of @@ -221,6 +217,9 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListTemplatesAPIClient is a client that implements the ListTemplates operation. +type ListTemplatesAPIClient interface { + ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) +} + +var _ ListTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorad/api_op_TagResource.go b/service/pcaconnectorad/api_op_TagResource.go index eae0b1f1ad4..a8412d65013 100644 --- a/service/pcaconnectorad/api_op_TagResource.go +++ b/service/pcaconnectorad/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_UntagResource.go b/service/pcaconnectorad/api_op_UntagResource.go index bb82d478e5a..c1e485aa0bb 100644 --- a/service/pcaconnectorad/api_op_UntagResource.go +++ b/service/pcaconnectorad/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_UpdateTemplate.go b/service/pcaconnectorad/api_op_UpdateTemplate.go index d5d70e73862..0181b259f27 100644 --- a/service/pcaconnectorad/api_op_UpdateTemplate.go +++ b/service/pcaconnectorad/api_op_UpdateTemplate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorad/api_op_UpdateTemplateGroupAccessControlEntry.go b/service/pcaconnectorad/api_op_UpdateTemplateGroupAccessControlEntry.go index fb334b6ebeb..9b4041e35b3 100644 --- a/service/pcaconnectorad/api_op_UpdateTemplateGroupAccessControlEntry.go +++ b/service/pcaconnectorad/api_op_UpdateTemplateGroupAccessControlEntry.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateTemplateGroupAccessControlEntryMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateGroupAccessControlEntryValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_client.go b/service/pcaconnectorscep/api_client.go index 310056cb9fd..16bf3b169f0 100644 --- a/service/pcaconnectorscep/api_client.go +++ b/service/pcaconnectorscep/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/pcaconnectorscep/api_op_CreateChallenge.go b/service/pcaconnectorscep/api_op_CreateChallenge.go index 7a1f8cd7275..a6090124be1 100644 --- a/service/pcaconnectorscep/api_op_CreateChallenge.go +++ b/service/pcaconnectorscep/api_op_CreateChallenge.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateChallengeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateChallengeMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_CreateConnector.go b/service/pcaconnectorscep/api_op_CreateConnector.go index 561debb20dc..2d8b4d3b3d2 100644 --- a/service/pcaconnectorscep/api_op_CreateConnector.go +++ b/service/pcaconnectorscep/api_op_CreateConnector.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConnectorMiddleware(stack, options); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_DeleteChallenge.go b/service/pcaconnectorscep/api_op_DeleteChallenge.go index 620e575de93..7bb5b311109 100644 --- a/service/pcaconnectorscep/api_op_DeleteChallenge.go +++ b/service/pcaconnectorscep/api_op_DeleteChallenge.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteChallengeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChallengeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_DeleteConnector.go b/service/pcaconnectorscep/api_op_DeleteConnector.go index 5df1e5bba61..04527b056ff 100644 --- a/service/pcaconnectorscep/api_op_DeleteConnector.go +++ b/service/pcaconnectorscep/api_op_DeleteConnector.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_GetChallengeMetadata.go b/service/pcaconnectorscep/api_op_GetChallengeMetadata.go index c6affd27141..e2565a5b1c1 100644 --- a/service/pcaconnectorscep/api_op_GetChallengeMetadata.go +++ b/service/pcaconnectorscep/api_op_GetChallengeMetadata.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetChallengeMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChallengeMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_GetChallengePassword.go b/service/pcaconnectorscep/api_op_GetChallengePassword.go index db080af9273..da9ad90ebe3 100644 --- a/service/pcaconnectorscep/api_op_GetChallengePassword.go +++ b/service/pcaconnectorscep/api_op_GetChallengePassword.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetChallengePasswordMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChallengePasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_GetConnector.go b/service/pcaconnectorscep/api_op_GetConnector.go index 5e7025ca789..b7b2a471fce 100644 --- a/service/pcaconnectorscep/api_op_GetConnector.go +++ b/service/pcaconnectorscep/api_op_GetConnector.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetConnectorMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_ListChallengeMetadata.go b/service/pcaconnectorscep/api_op_ListChallengeMetadata.go index 872ad10190c..76540b11d6b 100644 --- a/service/pcaconnectorscep/api_op_ListChallengeMetadata.go +++ b/service/pcaconnectorscep/api_op_ListChallengeMetadata.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListChallengeMetadataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListChallengeMetadataValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListChallengeMetadataMiddlewares(stack *middleware. return nil } -// ListChallengeMetadataAPIClient is a client that implements the -// ListChallengeMetadata operation. -type ListChallengeMetadataAPIClient interface { - ListChallengeMetadata(context.Context, *ListChallengeMetadataInput, ...func(*Options)) (*ListChallengeMetadataOutput, error) -} - -var _ ListChallengeMetadataAPIClient = (*Client)(nil) - // ListChallengeMetadataPaginatorOptions is the paginator options for // ListChallengeMetadata type ListChallengeMetadataPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListChallengeMetadataPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChallengeMetadata(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListChallengeMetadataPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListChallengeMetadataAPIClient is a client that implements the +// ListChallengeMetadata operation. +type ListChallengeMetadataAPIClient interface { + ListChallengeMetadata(context.Context, *ListChallengeMetadataInput, ...func(*Options)) (*ListChallengeMetadataOutput, error) +} + +var _ ListChallengeMetadataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChallengeMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorscep/api_op_ListConnectors.go b/service/pcaconnectorscep/api_op_ListConnectors.go index 2d8197898a2..6401d97f328 100644 --- a/service/pcaconnectorscep/api_op_ListConnectors.go +++ b/service/pcaconnectorscep/api_op_ListConnectors.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectors(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectorsAPIClient is a client that implements the ListConnectors -// operation. -type ListConnectorsAPIClient interface { - ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) -} - -var _ ListConnectorsAPIClient = (*Client)(nil) - // ListConnectorsPaginatorOptions is the paginator options for ListConnectors type ListConnectorsPaginatorOptions struct { // The maximum number of objects that you want Connector for SCEP to return for @@ -216,6 +211,9 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListConnectorsAPIClient is a client that implements the ListConnectors +// operation. +type ListConnectorsAPIClient interface { + ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) +} + +var _ ListConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pcaconnectorscep/api_op_ListTagsForResource.go b/service/pcaconnectorscep/api_op_ListTagsForResource.go index f39749cc338..d4bc2420da1 100644 --- a/service/pcaconnectorscep/api_op_ListTagsForResource.go +++ b/service/pcaconnectorscep/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_TagResource.go b/service/pcaconnectorscep/api_op_TagResource.go index 380388849a0..17602e9f01f 100644 --- a/service/pcaconnectorscep/api_op_TagResource.go +++ b/service/pcaconnectorscep/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pcaconnectorscep/api_op_UntagResource.go b/service/pcaconnectorscep/api_op_UntagResource.go index a04c4b7573f..c7c1f478286 100644 --- a/service/pcaconnectorscep/api_op_UntagResource.go +++ b/service/pcaconnectorscep/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_client.go b/service/personalize/api_client.go index ab3a020c6b4..b693544d81c 100644 --- a/service/personalize/api_client.go +++ b/service/personalize/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/personalize/api_op_CreateBatchInferenceJob.go b/service/personalize/api_op_CreateBatchInferenceJob.go index c822093e0a0..08ac2fbb832 100644 --- a/service/personalize/api_op_CreateBatchInferenceJob.go +++ b/service/personalize/api_op_CreateBatchInferenceJob.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateBatchInferenceJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBatchInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateBatchSegmentJob.go b/service/personalize/api_op_CreateBatchSegmentJob.go index cf5c985ffc0..5dde119b948 100644 --- a/service/personalize/api_op_CreateBatchSegmentJob.go +++ b/service/personalize/api_op_CreateBatchSegmentJob.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateBatchSegmentJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBatchSegmentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateCampaign.go b/service/personalize/api_op_CreateCampaign.go index f66b26866bc..24b8f6c7fc0 100644 --- a/service/personalize/api_op_CreateCampaign.go +++ b/service/personalize/api_op_CreateCampaign.go @@ -202,6 +202,9 @@ func (c *Client) addOperationCreateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateDataDeletionJob.go b/service/personalize/api_op_CreateDataDeletionJob.go index 6e91eb5794c..b34ecc71ac7 100644 --- a/service/personalize/api_op_CreateDataDeletionJob.go +++ b/service/personalize/api_op_CreateDataDeletionJob.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateDataDeletionJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataDeletionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateDataset.go b/service/personalize/api_op_CreateDataset.go index 9ea75cec5fb..7cdf53cd2eb 100644 --- a/service/personalize/api_op_CreateDataset.go +++ b/service/personalize/api_op_CreateDataset.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateDatasetExportJob.go b/service/personalize/api_op_CreateDatasetExportJob.go index 4698e802643..d93dde918a3 100644 --- a/service/personalize/api_op_CreateDatasetExportJob.go +++ b/service/personalize/api_op_CreateDatasetExportJob.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateDatasetExportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateDatasetGroup.go b/service/personalize/api_op_CreateDatasetGroup.go index 91ed2d0e9b8..7c70c763d31 100644 --- a/service/personalize/api_op_CreateDatasetGroup.go +++ b/service/personalize/api_op_CreateDatasetGroup.go @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateDatasetGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateDatasetImportJob.go b/service/personalize/api_op_CreateDatasetImportJob.go index 37b97fbb685..fb79db71c0c 100644 --- a/service/personalize/api_op_CreateDatasetImportJob.go +++ b/service/personalize/api_op_CreateDatasetImportJob.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateDatasetImportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateEventTracker.go b/service/personalize/api_op_CreateEventTracker.go index 050513d5970..c4ecd8e9b21 100644 --- a/service/personalize/api_op_CreateEventTracker.go +++ b/service/personalize/api_op_CreateEventTracker.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateEventTrackerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventTrackerValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateFilter.go b/service/personalize/api_op_CreateFilter.go index d86ec5fe2f8..9a71b1ec827 100644 --- a/service/personalize/api_op_CreateFilter.go +++ b/service/personalize/api_op_CreateFilter.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateMetricAttribution.go b/service/personalize/api_op_CreateMetricAttribution.go index 96e6908d356..4dfb03db058 100644 --- a/service/personalize/api_op_CreateMetricAttribution.go +++ b/service/personalize/api_op_CreateMetricAttribution.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateMetricAttributionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMetricAttributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateRecommender.go b/service/personalize/api_op_CreateRecommender.go index 843489764fc..355e0278bfe 100644 --- a/service/personalize/api_op_CreateRecommender.go +++ b/service/personalize/api_op_CreateRecommender.go @@ -194,6 +194,9 @@ func (c *Client) addOperationCreateRecommenderMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRecommenderValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateSchema.go b/service/personalize/api_op_CreateSchema.go index 707fd7509ec..b604ac17fc3 100644 --- a/service/personalize/api_op_CreateSchema.go +++ b/service/personalize/api_op_CreateSchema.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateSolution.go b/service/personalize/api_op_CreateSolution.go index 4e457f47e88..48b5e0d628a 100644 --- a/service/personalize/api_op_CreateSolution.go +++ b/service/personalize/api_op_CreateSolution.go @@ -247,6 +247,9 @@ func (c *Client) addOperationCreateSolutionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSolutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_CreateSolutionVersion.go b/service/personalize/api_op_CreateSolutionVersion.go index 2665ab6e9de..61ce772293b 100644 --- a/service/personalize/api_op_CreateSolutionVersion.go +++ b/service/personalize/api_op_CreateSolutionVersion.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateSolutionVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSolutionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteCampaign.go b/service/personalize/api_op_DeleteCampaign.go index 9a49b3082f2..a226e3dcfa1 100644 --- a/service/personalize/api_op_DeleteCampaign.go +++ b/service/personalize/api_op_DeleteCampaign.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteDataset.go b/service/personalize/api_op_DeleteDataset.go index c1c35a6496e..fc221203817 100644 --- a/service/personalize/api_op_DeleteDataset.go +++ b/service/personalize/api_op_DeleteDataset.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteDatasetGroup.go b/service/personalize/api_op_DeleteDatasetGroup.go index 1aac36d6b4f..8f21dcefdc4 100644 --- a/service/personalize/api_op_DeleteDatasetGroup.go +++ b/service/personalize/api_op_DeleteDatasetGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteDatasetGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteEventTracker.go b/service/personalize/api_op_DeleteEventTracker.go index cb2c6186b04..96df2861ad1 100644 --- a/service/personalize/api_op_DeleteEventTracker.go +++ b/service/personalize/api_op_DeleteEventTracker.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteEventTrackerMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventTrackerValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteFilter.go b/service/personalize/api_op_DeleteFilter.go index 49745b8c11e..03842a23699 100644 --- a/service/personalize/api_op_DeleteFilter.go +++ b/service/personalize/api_op_DeleteFilter.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFilterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteMetricAttribution.go b/service/personalize/api_op_DeleteMetricAttribution.go index bd2713338b0..c8920fee2f5 100644 --- a/service/personalize/api_op_DeleteMetricAttribution.go +++ b/service/personalize/api_op_DeleteMetricAttribution.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteMetricAttributionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMetricAttributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteRecommender.go b/service/personalize/api_op_DeleteRecommender.go index a54ef4674b9..f89fbd42dd8 100644 --- a/service/personalize/api_op_DeleteRecommender.go +++ b/service/personalize/api_op_DeleteRecommender.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteRecommenderMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecommenderValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteSchema.go b/service/personalize/api_op_DeleteSchema.go index 423eb2f48a1..1834490df75 100644 --- a/service/personalize/api_op_DeleteSchema.go +++ b/service/personalize/api_op_DeleteSchema.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DeleteSolution.go b/service/personalize/api_op_DeleteSolution.go index 1ba1b2e43c2..bdf1a3ffaf8 100644 --- a/service/personalize/api_op_DeleteSolution.go +++ b/service/personalize/api_op_DeleteSolution.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteSolutionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSolutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeAlgorithm.go b/service/personalize/api_op_DescribeAlgorithm.go index 7d78951f93e..246491732dc 100644 --- a/service/personalize/api_op_DescribeAlgorithm.go +++ b/service/personalize/api_op_DescribeAlgorithm.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeAlgorithmMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlgorithmValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeBatchInferenceJob.go b/service/personalize/api_op_DescribeBatchInferenceJob.go index cf515acb7d7..5dad8a70b0f 100644 --- a/service/personalize/api_op_DescribeBatchInferenceJob.go +++ b/service/personalize/api_op_DescribeBatchInferenceJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeBatchInferenceJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBatchInferenceJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeBatchSegmentJob.go b/service/personalize/api_op_DescribeBatchSegmentJob.go index 49ed5a86e84..ea5f68c1aec 100644 --- a/service/personalize/api_op_DescribeBatchSegmentJob.go +++ b/service/personalize/api_op_DescribeBatchSegmentJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeBatchSegmentJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBatchSegmentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeCampaign.go b/service/personalize/api_op_DescribeCampaign.go index 11b60f09012..4e8aaa4ef04 100644 --- a/service/personalize/api_op_DescribeCampaign.go +++ b/service/personalize/api_op_DescribeCampaign.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeCampaignMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeDataDeletionJob.go b/service/personalize/api_op_DescribeDataDeletionJob.go index 003e71c9154..5f3d17b6329 100644 --- a/service/personalize/api_op_DescribeDataDeletionJob.go +++ b/service/personalize/api_op_DescribeDataDeletionJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDataDeletionJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataDeletionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeDataset.go b/service/personalize/api_op_DescribeDataset.go index 7c27e034a7c..4783ac9c6fc 100644 --- a/service/personalize/api_op_DescribeDataset.go +++ b/service/personalize/api_op_DescribeDataset.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeDatasetExportJob.go b/service/personalize/api_op_DescribeDatasetExportJob.go index 34402fb79f9..5d02c94861a 100644 --- a/service/personalize/api_op_DescribeDatasetExportJob.go +++ b/service/personalize/api_op_DescribeDatasetExportJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDatasetExportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeDatasetGroup.go b/service/personalize/api_op_DescribeDatasetGroup.go index 205034dd981..74a8d130297 100644 --- a/service/personalize/api_op_DescribeDatasetGroup.go +++ b/service/personalize/api_op_DescribeDatasetGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeDatasetGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeDatasetImportJob.go b/service/personalize/api_op_DescribeDatasetImportJob.go index 749b466d995..193bef3f954 100644 --- a/service/personalize/api_op_DescribeDatasetImportJob.go +++ b/service/personalize/api_op_DescribeDatasetImportJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDatasetImportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeEventTracker.go b/service/personalize/api_op_DescribeEventTracker.go index c4d5a8319da..121a4932c71 100644 --- a/service/personalize/api_op_DescribeEventTracker.go +++ b/service/personalize/api_op_DescribeEventTracker.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeEventTrackerMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventTrackerValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeFeatureTransformation.go b/service/personalize/api_op_DescribeFeatureTransformation.go index 8c85a25335e..404f3af336b 100644 --- a/service/personalize/api_op_DescribeFeatureTransformation.go +++ b/service/personalize/api_op_DescribeFeatureTransformation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeFeatureTransformationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFeatureTransformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeFilter.go b/service/personalize/api_op_DescribeFilter.go index 48fafbfda3a..47c5330dadd 100644 --- a/service/personalize/api_op_DescribeFilter.go +++ b/service/personalize/api_op_DescribeFilter.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeFilterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeMetricAttribution.go b/service/personalize/api_op_DescribeMetricAttribution.go index 369608ca8fe..dc4e11d5db3 100644 --- a/service/personalize/api_op_DescribeMetricAttribution.go +++ b/service/personalize/api_op_DescribeMetricAttribution.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeMetricAttributionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMetricAttributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeRecipe.go b/service/personalize/api_op_DescribeRecipe.go index c27a82be39e..6df741f522f 100644 --- a/service/personalize/api_op_DescribeRecipe.go +++ b/service/personalize/api_op_DescribeRecipe.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeRecipeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeRecommender.go b/service/personalize/api_op_DescribeRecommender.go index 215239b07e6..e0c1c3a993e 100644 --- a/service/personalize/api_op_DescribeRecommender.go +++ b/service/personalize/api_op_DescribeRecommender.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeRecommenderMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecommenderValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeSchema.go b/service/personalize/api_op_DescribeSchema.go index 13321595948..94dc2f354dd 100644 --- a/service/personalize/api_op_DescribeSchema.go +++ b/service/personalize/api_op_DescribeSchema.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeSchemaMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeSolution.go b/service/personalize/api_op_DescribeSolution.go index b5585565333..adab05af0ad 100644 --- a/service/personalize/api_op_DescribeSolution.go +++ b/service/personalize/api_op_DescribeSolution.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeSolutionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSolutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_DescribeSolutionVersion.go b/service/personalize/api_op_DescribeSolutionVersion.go index 0fb196add7a..758c4ef7aea 100644 --- a/service/personalize/api_op_DescribeSolutionVersion.go +++ b/service/personalize/api_op_DescribeSolutionVersion.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeSolutionVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSolutionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_GetSolutionMetrics.go b/service/personalize/api_op_GetSolutionMetrics.go index 73825522822..0d44744af62 100644 --- a/service/personalize/api_op_GetSolutionMetrics.go +++ b/service/personalize/api_op_GetSolutionMetrics.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSolutionMetricsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolutionMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_ListBatchInferenceJobs.go b/service/personalize/api_op_ListBatchInferenceJobs.go index 06a08442121..dda4db982a2 100644 --- a/service/personalize/api_op_ListBatchInferenceJobs.go +++ b/service/personalize/api_op_ListBatchInferenceJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListBatchInferenceJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBatchInferenceJobs(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListBatchInferenceJobsMiddlewares(stack *middleware return nil } -// ListBatchInferenceJobsAPIClient is a client that implements the -// ListBatchInferenceJobs operation. -type ListBatchInferenceJobsAPIClient interface { - ListBatchInferenceJobs(context.Context, *ListBatchInferenceJobsInput, ...func(*Options)) (*ListBatchInferenceJobsOutput, error) -} - -var _ ListBatchInferenceJobsAPIClient = (*Client)(nil) - // ListBatchInferenceJobsPaginatorOptions is the paginator options for // ListBatchInferenceJobs type ListBatchInferenceJobsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListBatchInferenceJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBatchInferenceJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListBatchInferenceJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBatchInferenceJobsAPIClient is a client that implements the +// ListBatchInferenceJobs operation. +type ListBatchInferenceJobsAPIClient interface { + ListBatchInferenceJobs(context.Context, *ListBatchInferenceJobsInput, ...func(*Options)) (*ListBatchInferenceJobsOutput, error) +} + +var _ ListBatchInferenceJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBatchInferenceJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListBatchSegmentJobs.go b/service/personalize/api_op_ListBatchSegmentJobs.go index b94a32792ab..957ae151d99 100644 --- a/service/personalize/api_op_ListBatchSegmentJobs.go +++ b/service/personalize/api_op_ListBatchSegmentJobs.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListBatchSegmentJobsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBatchSegmentJobs(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListBatchSegmentJobsMiddlewares(stack *middleware.S return nil } -// ListBatchSegmentJobsAPIClient is a client that implements the -// ListBatchSegmentJobs operation. -type ListBatchSegmentJobsAPIClient interface { - ListBatchSegmentJobs(context.Context, *ListBatchSegmentJobsInput, ...func(*Options)) (*ListBatchSegmentJobsOutput, error) -} - -var _ ListBatchSegmentJobsAPIClient = (*Client)(nil) - // ListBatchSegmentJobsPaginatorOptions is the paginator options for // ListBatchSegmentJobs type ListBatchSegmentJobsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListBatchSegmentJobsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBatchSegmentJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListBatchSegmentJobsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListBatchSegmentJobsAPIClient is a client that implements the +// ListBatchSegmentJobs operation. +type ListBatchSegmentJobsAPIClient interface { + ListBatchSegmentJobs(context.Context, *ListBatchSegmentJobsInput, ...func(*Options)) (*ListBatchSegmentJobsOutput, error) +} + +var _ ListBatchSegmentJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBatchSegmentJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListCampaigns.go b/service/personalize/api_op_ListCampaigns.go index 3546bf03134..f3b80bc19e6 100644 --- a/service/personalize/api_op_ListCampaigns.go +++ b/service/personalize/api_op_ListCampaigns.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListCampaignsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCampaigns(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListCampaignsMiddlewares(stack *middleware.Stack, o return nil } -// ListCampaignsAPIClient is a client that implements the ListCampaigns operation. -type ListCampaignsAPIClient interface { - ListCampaigns(context.Context, *ListCampaignsInput, ...func(*Options)) (*ListCampaignsOutput, error) -} - -var _ ListCampaignsAPIClient = (*Client)(nil) - // ListCampaignsPaginatorOptions is the paginator options for ListCampaigns type ListCampaignsPaginatorOptions struct { // The maximum number of campaigns to return. @@ -214,6 +210,9 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCampaigns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListCampaignsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListCampaignsAPIClient is a client that implements the ListCampaigns operation. +type ListCampaignsAPIClient interface { + ListCampaigns(context.Context, *ListCampaignsInput, ...func(*Options)) (*ListCampaignsOutput, error) +} + +var _ ListCampaignsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCampaigns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListDataDeletionJobs.go b/service/personalize/api_op_ListDataDeletionJobs.go index 8b182b50072..027189c0f54 100644 --- a/service/personalize/api_op_ListDataDeletionJobs.go +++ b/service/personalize/api_op_ListDataDeletionJobs.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDataDeletionJobsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataDeletionJobs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/personalize/api_op_ListDatasetExportJobs.go b/service/personalize/api_op_ListDatasetExportJobs.go index d40eab70e45..2382a08df65 100644 --- a/service/personalize/api_op_ListDatasetExportJobs.go +++ b/service/personalize/api_op_ListDatasetExportJobs.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDatasetExportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasetExportJobs(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListDatasetExportJobsMiddlewares(stack *middleware. return nil } -// ListDatasetExportJobsAPIClient is a client that implements the -// ListDatasetExportJobs operation. -type ListDatasetExportJobsAPIClient interface { - ListDatasetExportJobs(context.Context, *ListDatasetExportJobsInput, ...func(*Options)) (*ListDatasetExportJobsOutput, error) -} - -var _ ListDatasetExportJobsAPIClient = (*Client)(nil) - // ListDatasetExportJobsPaginatorOptions is the paginator options for // ListDatasetExportJobs type ListDatasetExportJobsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDatasetExportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDatasetExportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDatasetExportJobsAPIClient is a client that implements the +// ListDatasetExportJobs operation. +type ListDatasetExportJobsAPIClient interface { + ListDatasetExportJobs(context.Context, *ListDatasetExportJobsInput, ...func(*Options)) (*ListDatasetExportJobsOutput, error) +} + +var _ ListDatasetExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListDatasetGroups.go b/service/personalize/api_op_ListDatasetGroups.go index 4cc4720b8d9..3bf04088cba 100644 --- a/service/personalize/api_op_ListDatasetGroups.go +++ b/service/personalize/api_op_ListDatasetGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDatasetGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasetGroups(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListDatasetGroupsMiddlewares(stack *middleware.Stac return nil } -// ListDatasetGroupsAPIClient is a client that implements the ListDatasetGroups -// operation. -type ListDatasetGroupsAPIClient interface { - ListDatasetGroups(context.Context, *ListDatasetGroupsInput, ...func(*Options)) (*ListDatasetGroupsOutput, error) -} - -var _ ListDatasetGroupsAPIClient = (*Client)(nil) - // ListDatasetGroupsPaginatorOptions is the paginator options for ListDatasetGroups type ListDatasetGroupsPaginatorOptions struct { // The maximum number of dataset groups to return. @@ -207,6 +202,9 @@ func (p *ListDatasetGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListDatasetGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListDatasetGroupsAPIClient is a client that implements the ListDatasetGroups +// operation. +type ListDatasetGroupsAPIClient interface { + ListDatasetGroups(context.Context, *ListDatasetGroupsInput, ...func(*Options)) (*ListDatasetGroupsOutput, error) +} + +var _ ListDatasetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListDatasetImportJobs.go b/service/personalize/api_op_ListDatasetImportJobs.go index 35dccebca0b..8a2dee2aba0 100644 --- a/service/personalize/api_op_ListDatasetImportJobs.go +++ b/service/personalize/api_op_ListDatasetImportJobs.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDatasetImportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasetImportJobs(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListDatasetImportJobsMiddlewares(stack *middleware. return nil } -// ListDatasetImportJobsAPIClient is a client that implements the -// ListDatasetImportJobs operation. -type ListDatasetImportJobsAPIClient interface { - ListDatasetImportJobs(context.Context, *ListDatasetImportJobsInput, ...func(*Options)) (*ListDatasetImportJobsOutput, error) -} - -var _ ListDatasetImportJobsAPIClient = (*Client)(nil) - // ListDatasetImportJobsPaginatorOptions is the paginator options for // ListDatasetImportJobs type ListDatasetImportJobsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDatasetImportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDatasetImportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDatasetImportJobsAPIClient is a client that implements the +// ListDatasetImportJobs operation. +type ListDatasetImportJobsAPIClient interface { + ListDatasetImportJobs(context.Context, *ListDatasetImportJobsInput, ...func(*Options)) (*ListDatasetImportJobsOutput, error) +} + +var _ ListDatasetImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListDatasets.go b/service/personalize/api_op_ListDatasets.go index 0126af965f1..7c18d59b43b 100644 --- a/service/personalize/api_op_ListDatasets.go +++ b/service/personalize/api_op_ListDatasets.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatasets(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListDatasetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDatasetsAPIClient is a client that implements the ListDatasets operation. -type ListDatasetsAPIClient interface { - ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) -} - -var _ ListDatasetsAPIClient = (*Client)(nil) - // ListDatasetsPaginatorOptions is the paginator options for ListDatasets type ListDatasetsPaginatorOptions struct { // The maximum number of datasets to return. @@ -210,6 +206,9 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListDatasetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDatasetsAPIClient is a client that implements the ListDatasets operation. +type ListDatasetsAPIClient interface { + ListDatasets(context.Context, *ListDatasetsInput, ...func(*Options)) (*ListDatasetsOutput, error) +} + +var _ ListDatasetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListEventTrackers.go b/service/personalize/api_op_ListEventTrackers.go index f5f8e5bde75..c748d9584a5 100644 --- a/service/personalize/api_op_ListEventTrackers.go +++ b/service/personalize/api_op_ListEventTrackers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEventTrackersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventTrackers(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListEventTrackersMiddlewares(stack *middleware.Stac return nil } -// ListEventTrackersAPIClient is a client that implements the ListEventTrackers -// operation. -type ListEventTrackersAPIClient interface { - ListEventTrackers(context.Context, *ListEventTrackersInput, ...func(*Options)) (*ListEventTrackersOutput, error) -} - -var _ ListEventTrackersAPIClient = (*Client)(nil) - // ListEventTrackersPaginatorOptions is the paginator options for ListEventTrackers type ListEventTrackersPaginatorOptions struct { // The maximum number of event trackers to return. @@ -210,6 +205,9 @@ func (p *ListEventTrackersPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEventTrackers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListEventTrackersPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListEventTrackersAPIClient is a client that implements the ListEventTrackers +// operation. +type ListEventTrackersAPIClient interface { + ListEventTrackers(context.Context, *ListEventTrackersInput, ...func(*Options)) (*ListEventTrackersOutput, error) +} + +var _ ListEventTrackersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEventTrackers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListFilters.go b/service/personalize/api_op_ListFilters.go index 65f605b3149..a93e33902c4 100644 --- a/service/personalize/api_op_ListFilters.go +++ b/service/personalize/api_op_ListFilters.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFilters(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListFiltersMiddlewares(stack *middleware.Stack, opt return nil } -// ListFiltersAPIClient is a client that implements the ListFilters operation. -type ListFiltersAPIClient interface { - ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) -} - -var _ ListFiltersAPIClient = (*Client)(nil) - // ListFiltersPaginatorOptions is the paginator options for ListFilters type ListFiltersPaginatorOptions struct { // The maximum number of filters to return. @@ -205,6 +201,9 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListFiltersAPIClient is a client that implements the ListFilters operation. +type ListFiltersAPIClient interface { + ListFilters(context.Context, *ListFiltersInput, ...func(*Options)) (*ListFiltersOutput, error) +} + +var _ ListFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListMetricAttributionMetrics.go b/service/personalize/api_op_ListMetricAttributionMetrics.go index 7bfa1f6ea31..55b6e8c3186 100644 --- a/service/personalize/api_op_ListMetricAttributionMetrics.go +++ b/service/personalize/api_op_ListMetricAttributionMetrics.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListMetricAttributionMetricsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMetricAttributionMetrics(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListMetricAttributionMetricsMiddlewares(stack *midd return nil } -// ListMetricAttributionMetricsAPIClient is a client that implements the -// ListMetricAttributionMetrics operation. -type ListMetricAttributionMetricsAPIClient interface { - ListMetricAttributionMetrics(context.Context, *ListMetricAttributionMetricsInput, ...func(*Options)) (*ListMetricAttributionMetricsOutput, error) -} - -var _ ListMetricAttributionMetricsAPIClient = (*Client)(nil) - // ListMetricAttributionMetricsPaginatorOptions is the paginator options for // ListMetricAttributionMetrics type ListMetricAttributionMetricsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListMetricAttributionMetricsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetricAttributionMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListMetricAttributionMetricsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListMetricAttributionMetricsAPIClient is a client that implements the +// ListMetricAttributionMetrics operation. +type ListMetricAttributionMetricsAPIClient interface { + ListMetricAttributionMetrics(context.Context, *ListMetricAttributionMetricsInput, ...func(*Options)) (*ListMetricAttributionMetricsOutput, error) +} + +var _ ListMetricAttributionMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetricAttributionMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListMetricAttributions.go b/service/personalize/api_op_ListMetricAttributions.go index 7dafeecf5d6..3008c58d671 100644 --- a/service/personalize/api_op_ListMetricAttributions.go +++ b/service/personalize/api_op_ListMetricAttributions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListMetricAttributionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMetricAttributions(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListMetricAttributionsMiddlewares(stack *middleware return nil } -// ListMetricAttributionsAPIClient is a client that implements the -// ListMetricAttributions operation. -type ListMetricAttributionsAPIClient interface { - ListMetricAttributions(context.Context, *ListMetricAttributionsInput, ...func(*Options)) (*ListMetricAttributionsOutput, error) -} - -var _ ListMetricAttributionsAPIClient = (*Client)(nil) - // ListMetricAttributionsPaginatorOptions is the paginator options for // ListMetricAttributions type ListMetricAttributionsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListMetricAttributionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMetricAttributions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListMetricAttributionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListMetricAttributionsAPIClient is a client that implements the +// ListMetricAttributions operation. +type ListMetricAttributionsAPIClient interface { + ListMetricAttributions(context.Context, *ListMetricAttributionsInput, ...func(*Options)) (*ListMetricAttributionsOutput, error) +} + +var _ ListMetricAttributionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMetricAttributions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListRecipes.go b/service/personalize/api_op_ListRecipes.go index f2facdc7f94..a73ed7f669d 100644 --- a/service/personalize/api_op_ListRecipes.go +++ b/service/personalize/api_op_ListRecipes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRecipesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecipes(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListRecipesMiddlewares(stack *middleware.Stack, opt return nil } -// ListRecipesAPIClient is a client that implements the ListRecipes operation. -type ListRecipesAPIClient interface { - ListRecipes(context.Context, *ListRecipesInput, ...func(*Options)) (*ListRecipesOutput, error) -} - -var _ ListRecipesAPIClient = (*Client)(nil) - // ListRecipesPaginatorOptions is the paginator options for ListRecipes type ListRecipesPaginatorOptions struct { // The maximum number of recipes to return. @@ -211,6 +207,9 @@ func (p *ListRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecipes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListRecipesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListRecipesAPIClient is a client that implements the ListRecipes operation. +type ListRecipesAPIClient interface { + ListRecipes(context.Context, *ListRecipesInput, ...func(*Options)) (*ListRecipesOutput, error) +} + +var _ ListRecipesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecipes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListRecommenders.go b/service/personalize/api_op_ListRecommenders.go index 3b2159e6ce1..04bec65ef50 100644 --- a/service/personalize/api_op_ListRecommenders.go +++ b/service/personalize/api_op_ListRecommenders.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListRecommendersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommenders(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListRecommendersMiddlewares(stack *middleware.Stack return nil } -// ListRecommendersAPIClient is a client that implements the ListRecommenders -// operation. -type ListRecommendersAPIClient interface { - ListRecommenders(context.Context, *ListRecommendersInput, ...func(*Options)) (*ListRecommendersOutput, error) -} - -var _ ListRecommendersAPIClient = (*Client)(nil) - // ListRecommendersPaginatorOptions is the paginator options for ListRecommenders type ListRecommendersPaginatorOptions struct { // The maximum number of recommenders to return. @@ -213,6 +208,9 @@ func (p *ListRecommendersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommenders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListRecommendersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRecommendersAPIClient is a client that implements the ListRecommenders +// operation. +type ListRecommendersAPIClient interface { + ListRecommenders(context.Context, *ListRecommendersInput, ...func(*Options)) (*ListRecommendersOutput, error) +} + +var _ ListRecommendersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommenders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListSchemas.go b/service/personalize/api_op_ListSchemas.go index f22e8f055aa..7c045095dfc 100644 --- a/service/personalize/api_op_ListSchemas.go +++ b/service/personalize/api_op_ListSchemas.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchemas(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt return nil } -// ListSchemasAPIClient is a client that implements the ListSchemas operation. -type ListSchemasAPIClient interface { - ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) -} - -var _ ListSchemasAPIClient = (*Client)(nil) - // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { // The maximum number of schemas to return. @@ -206,6 +202,9 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSchemasAPIClient is a client that implements the ListSchemas operation. +type ListSchemasAPIClient interface { + ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) +} + +var _ ListSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListSolutionVersions.go b/service/personalize/api_op_ListSolutionVersions.go index 2c3e919793c..35391c25044 100644 --- a/service/personalize/api_op_ListSolutionVersions.go +++ b/service/personalize/api_op_ListSolutionVersions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListSolutionVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolutionVersions(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListSolutionVersionsMiddlewares(stack *middleware.S return nil } -// ListSolutionVersionsAPIClient is a client that implements the -// ListSolutionVersions operation. -type ListSolutionVersionsAPIClient interface { - ListSolutionVersions(context.Context, *ListSolutionVersionsInput, ...func(*Options)) (*ListSolutionVersionsOutput, error) -} - -var _ ListSolutionVersionsAPIClient = (*Client)(nil) - // ListSolutionVersionsPaginatorOptions is the paginator options for // ListSolutionVersions type ListSolutionVersionsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListSolutionVersionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolutionVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListSolutionVersionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSolutionVersionsAPIClient is a client that implements the +// ListSolutionVersions operation. +type ListSolutionVersionsAPIClient interface { + ListSolutionVersions(context.Context, *ListSolutionVersionsInput, ...func(*Options)) (*ListSolutionVersionsOutput, error) +} + +var _ ListSolutionVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolutionVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListSolutions.go b/service/personalize/api_op_ListSolutions.go index 2e0f84592ff..6e491d8a5e3 100644 --- a/service/personalize/api_op_ListSolutions.go +++ b/service/personalize/api_op_ListSolutions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListSolutionsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolutions(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListSolutionsMiddlewares(stack *middleware.Stack, o return nil } -// ListSolutionsAPIClient is a client that implements the ListSolutions operation. -type ListSolutionsAPIClient interface { - ListSolutions(context.Context, *ListSolutionsInput, ...func(*Options)) (*ListSolutionsOutput, error) -} - -var _ ListSolutionsAPIClient = (*Client)(nil) - // ListSolutionsPaginatorOptions is the paginator options for ListSolutions type ListSolutionsPaginatorOptions struct { // The maximum number of solutions to return. @@ -210,6 +206,9 @@ func (p *ListSolutionsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListSolutionsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListSolutionsAPIClient is a client that implements the ListSolutions operation. +type ListSolutionsAPIClient interface { + ListSolutions(context.Context, *ListSolutionsInput, ...func(*Options)) (*ListSolutionsOutput, error) +} + +var _ ListSolutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/personalize/api_op_ListTagsForResource.go b/service/personalize/api_op_ListTagsForResource.go index 02a78e0d3dc..5abdfaff319 100644 --- a/service/personalize/api_op_ListTagsForResource.go +++ b/service/personalize/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_StartRecommender.go b/service/personalize/api_op_StartRecommender.go index 452e735308c..08410a9f146 100644 --- a/service/personalize/api_op_StartRecommender.go +++ b/service/personalize/api_op_StartRecommender.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartRecommenderMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartRecommenderValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_StopRecommender.go b/service/personalize/api_op_StopRecommender.go index 001173106a4..c3b36dcc53f 100644 --- a/service/personalize/api_op_StopRecommender.go +++ b/service/personalize/api_op_StopRecommender.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopRecommenderMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopRecommenderValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_StopSolutionVersionCreation.go b/service/personalize/api_op_StopSolutionVersionCreation.go index d1ad3e13b51..6d941a4d6c9 100644 --- a/service/personalize/api_op_StopSolutionVersionCreation.go +++ b/service/personalize/api_op_StopSolutionVersionCreation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStopSolutionVersionCreationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSolutionVersionCreationValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_TagResource.go b/service/personalize/api_op_TagResource.go index 0f385063be5..a1590b4f7db 100644 --- a/service/personalize/api_op_TagResource.go +++ b/service/personalize/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_UntagResource.go b/service/personalize/api_op_UntagResource.go index 236c3ac818b..cd1f35c6c36 100644 --- a/service/personalize/api_op_UntagResource.go +++ b/service/personalize/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_UpdateCampaign.go b/service/personalize/api_op_UpdateCampaign.go index a0318e132f0..c8af5af50e8 100644 --- a/service/personalize/api_op_UpdateCampaign.go +++ b/service/personalize/api_op_UpdateCampaign.go @@ -157,6 +157,9 @@ func (c *Client) addOperationUpdateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_UpdateDataset.go b/service/personalize/api_op_UpdateDataset.go index 658281bf247..e87ca5c275d 100644 --- a/service/personalize/api_op_UpdateDataset.go +++ b/service/personalize/api_op_UpdateDataset.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_UpdateMetricAttribution.go b/service/personalize/api_op_UpdateMetricAttribution.go index 2dd2e733d37..ef28950ef0f 100644 --- a/service/personalize/api_op_UpdateMetricAttribution.go +++ b/service/personalize/api_op_UpdateMetricAttribution.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateMetricAttributionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMetricAttributionValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalize/api_op_UpdateRecommender.go b/service/personalize/api_op_UpdateRecommender.go index fb9e5dcc2e5..5661dc1539a 100644 --- a/service/personalize/api_op_UpdateRecommender.go +++ b/service/personalize/api_op_UpdateRecommender.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateRecommenderMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecommenderValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeevents/api_client.go b/service/personalizeevents/api_client.go index 1067e889bb2..b7d8ddd03d1 100644 --- a/service/personalizeevents/api_client.go +++ b/service/personalizeevents/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/personalizeevents/api_op_PutActionInteractions.go b/service/personalizeevents/api_op_PutActionInteractions.go index 84b2b2ef239..0a7a6fe76d7 100644 --- a/service/personalizeevents/api_op_PutActionInteractions.go +++ b/service/personalizeevents/api_op_PutActionInteractions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutActionInteractionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutActionInteractionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeevents/api_op_PutActions.go b/service/personalizeevents/api_op_PutActions.go index c07faac2a1f..f4d8e1bbc73 100644 --- a/service/personalizeevents/api_op_PutActions.go +++ b/service/personalizeevents/api_op_PutActions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutActionsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutActionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeevents/api_op_PutEvents.go b/service/personalizeevents/api_op_PutEvents.go index 34e997fd3c8..3f262380c3d 100644 --- a/service/personalizeevents/api_op_PutEvents.go +++ b/service/personalizeevents/api_op_PutEvents.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutEventsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeevents/api_op_PutItems.go b/service/personalizeevents/api_op_PutItems.go index 112eaf430df..ab41bbc46c1 100644 --- a/service/personalizeevents/api_op_PutItems.go +++ b/service/personalizeevents/api_op_PutItems.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutItemsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutItemsValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeevents/api_op_PutUsers.go b/service/personalizeevents/api_op_PutUsers.go index 49ecbc96666..4a72bef7441 100644 --- a/service/personalizeevents/api_op_PutUsers.go +++ b/service/personalizeevents/api_op_PutUsers.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutUsersMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeruntime/api_client.go b/service/personalizeruntime/api_client.go index e5ef1ace62f..82cadfcdc82 100644 --- a/service/personalizeruntime/api_client.go +++ b/service/personalizeruntime/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/personalizeruntime/api_op_GetActionRecommendations.go b/service/personalizeruntime/api_op_GetActionRecommendations.go index 6259459a371..fe8fa146cc3 100644 --- a/service/personalizeruntime/api_op_GetActionRecommendations.go +++ b/service/personalizeruntime/api_op_GetActionRecommendations.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetActionRecommendationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetActionRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/personalizeruntime/api_op_GetPersonalizedRanking.go b/service/personalizeruntime/api_op_GetPersonalizedRanking.go index a87dcb9b84f..ff3701d741f 100644 --- a/service/personalizeruntime/api_op_GetPersonalizedRanking.go +++ b/service/personalizeruntime/api_op_GetPersonalizedRanking.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetPersonalizedRankingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPersonalizedRankingValidationMiddleware(stack); err != nil { return err } diff --git a/service/personalizeruntime/api_op_GetRecommendations.go b/service/personalizeruntime/api_op_GetRecommendations.go index 1bd624a4e5b..cbcf5790871 100644 --- a/service/personalizeruntime/api_op_GetRecommendations.go +++ b/service/personalizeruntime/api_op_GetRecommendations.go @@ -191,6 +191,9 @@ func (c *Client) addOperationGetRecommendationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRecommendations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pi/api_client.go b/service/pi/api_client.go index 3db164786c2..2d817ae02e3 100644 --- a/service/pi/api_client.go +++ b/service/pi/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/pi/api_op_CreatePerformanceAnalysisReport.go b/service/pi/api_op_CreatePerformanceAnalysisReport.go index abf4615ab27..9f70f94c7cc 100644 --- a/service/pi/api_op_CreatePerformanceAnalysisReport.go +++ b/service/pi/api_op_CreatePerformanceAnalysisReport.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreatePerformanceAnalysisReportMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePerformanceAnalysisReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_DeletePerformanceAnalysisReport.go b/service/pi/api_op_DeletePerformanceAnalysisReport.go index 60f44d9a466..84b15cf6526 100644 --- a/service/pi/api_op_DeletePerformanceAnalysisReport.go +++ b/service/pi/api_op_DeletePerformanceAnalysisReport.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeletePerformanceAnalysisReportMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePerformanceAnalysisReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_DescribeDimensionKeys.go b/service/pi/api_op_DescribeDimensionKeys.go index b686e0d3ca6..397423eeec7 100644 --- a/service/pi/api_op_DescribeDimensionKeys.go +++ b/service/pi/api_op_DescribeDimensionKeys.go @@ -237,6 +237,9 @@ func (c *Client) addOperationDescribeDimensionKeysMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDimensionKeysValidationMiddleware(stack); err != nil { return err } @@ -261,14 +264,6 @@ func (c *Client) addOperationDescribeDimensionKeysMiddlewares(stack *middleware. return nil } -// DescribeDimensionKeysAPIClient is a client that implements the -// DescribeDimensionKeys operation. -type DescribeDimensionKeysAPIClient interface { - DescribeDimensionKeys(context.Context, *DescribeDimensionKeysInput, ...func(*Options)) (*DescribeDimensionKeysOutput, error) -} - -var _ DescribeDimensionKeysAPIClient = (*Client)(nil) - // DescribeDimensionKeysPaginatorOptions is the paginator options for // DescribeDimensionKeys type DescribeDimensionKeysPaginatorOptions struct { @@ -335,6 +330,9 @@ func (p *DescribeDimensionKeysPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDimensionKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -354,6 +352,14 @@ func (p *DescribeDimensionKeysPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeDimensionKeysAPIClient is a client that implements the +// DescribeDimensionKeys operation. +type DescribeDimensionKeysAPIClient interface { + DescribeDimensionKeys(context.Context, *DescribeDimensionKeysInput, ...func(*Options)) (*DescribeDimensionKeysOutput, error) +} + +var _ DescribeDimensionKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDimensionKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pi/api_op_GetDimensionKeyDetails.go b/service/pi/api_op_GetDimensionKeyDetails.go index 5c6690cf2af..1fa08587e32 100644 --- a/service/pi/api_op_GetDimensionKeyDetails.go +++ b/service/pi/api_op_GetDimensionKeyDetails.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetDimensionKeyDetailsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDimensionKeyDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_GetPerformanceAnalysisReport.go b/service/pi/api_op_GetPerformanceAnalysisReport.go index 946feab41a7..84a9bc437f9 100644 --- a/service/pi/api_op_GetPerformanceAnalysisReport.go +++ b/service/pi/api_op_GetPerformanceAnalysisReport.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetPerformanceAnalysisReportMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPerformanceAnalysisReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_GetResourceMetadata.go b/service/pi/api_op_GetResourceMetadata.go index d2e85166993..24453627297 100644 --- a/service/pi/api_op_GetResourceMetadata.go +++ b/service/pi/api_op_GetResourceMetadata.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetResourceMetadataMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_GetResourceMetrics.go b/service/pi/api_op_GetResourceMetrics.go index ab45bd17f92..5537c4bf2bb 100644 --- a/service/pi/api_op_GetResourceMetrics.go +++ b/service/pi/api_op_GetResourceMetrics.go @@ -214,6 +214,9 @@ func (c *Client) addOperationGetResourceMetricsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceMetricsValidationMiddleware(stack); err != nil { return err } @@ -238,14 +241,6 @@ func (c *Client) addOperationGetResourceMetricsMiddlewares(stack *middleware.Sta return nil } -// GetResourceMetricsAPIClient is a client that implements the GetResourceMetrics -// operation. -type GetResourceMetricsAPIClient interface { - GetResourceMetrics(context.Context, *GetResourceMetricsInput, ...func(*Options)) (*GetResourceMetricsOutput, error) -} - -var _ GetResourceMetricsAPIClient = (*Client)(nil) - // GetResourceMetricsPaginatorOptions is the paginator options for // GetResourceMetrics type GetResourceMetricsPaginatorOptions struct { @@ -312,6 +307,9 @@ func (p *GetResourceMetricsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourceMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -331,6 +329,14 @@ func (p *GetResourceMetricsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetResourceMetricsAPIClient is a client that implements the GetResourceMetrics +// operation. +type GetResourceMetricsAPIClient interface { + GetResourceMetrics(context.Context, *GetResourceMetricsInput, ...func(*Options)) (*GetResourceMetricsOutput, error) +} + +var _ GetResourceMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pi/api_op_ListAvailableResourceDimensions.go b/service/pi/api_op_ListAvailableResourceDimensions.go index 3b41e791b6e..9be94a53165 100644 --- a/service/pi/api_op_ListAvailableResourceDimensions.go +++ b/service/pi/api_op_ListAvailableResourceDimensions.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListAvailableResourceDimensionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAvailableResourceDimensionsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListAvailableResourceDimensionsMiddlewares(stack *m return nil } -// ListAvailableResourceDimensionsAPIClient is a client that implements the -// ListAvailableResourceDimensions operation. -type ListAvailableResourceDimensionsAPIClient interface { - ListAvailableResourceDimensions(context.Context, *ListAvailableResourceDimensionsInput, ...func(*Options)) (*ListAvailableResourceDimensionsOutput, error) -} - -var _ ListAvailableResourceDimensionsAPIClient = (*Client)(nil) - // ListAvailableResourceDimensionsPaginatorOptions is the paginator options for // ListAvailableResourceDimensions type ListAvailableResourceDimensionsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *ListAvailableResourceDimensionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAvailableResourceDimensions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListAvailableResourceDimensionsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAvailableResourceDimensionsAPIClient is a client that implements the +// ListAvailableResourceDimensions operation. +type ListAvailableResourceDimensionsAPIClient interface { + ListAvailableResourceDimensions(context.Context, *ListAvailableResourceDimensionsInput, ...func(*Options)) (*ListAvailableResourceDimensionsOutput, error) +} + +var _ ListAvailableResourceDimensionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAvailableResourceDimensions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pi/api_op_ListAvailableResourceMetrics.go b/service/pi/api_op_ListAvailableResourceMetrics.go index 2fba6defa21..4f554bc9a16 100644 --- a/service/pi/api_op_ListAvailableResourceMetrics.go +++ b/service/pi/api_op_ListAvailableResourceMetrics.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListAvailableResourceMetricsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAvailableResourceMetricsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListAvailableResourceMetricsMiddlewares(stack *midd return nil } -// ListAvailableResourceMetricsAPIClient is a client that implements the -// ListAvailableResourceMetrics operation. -type ListAvailableResourceMetricsAPIClient interface { - ListAvailableResourceMetrics(context.Context, *ListAvailableResourceMetricsInput, ...func(*Options)) (*ListAvailableResourceMetricsOutput, error) -} - -var _ ListAvailableResourceMetricsAPIClient = (*Client)(nil) - // ListAvailableResourceMetricsPaginatorOptions is the paginator options for // ListAvailableResourceMetrics type ListAvailableResourceMetricsPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *ListAvailableResourceMetricsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAvailableResourceMetrics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *ListAvailableResourceMetricsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListAvailableResourceMetricsAPIClient is a client that implements the +// ListAvailableResourceMetrics operation. +type ListAvailableResourceMetricsAPIClient interface { + ListAvailableResourceMetrics(context.Context, *ListAvailableResourceMetricsInput, ...func(*Options)) (*ListAvailableResourceMetricsOutput, error) +} + +var _ ListAvailableResourceMetricsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAvailableResourceMetrics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pi/api_op_ListPerformanceAnalysisReports.go b/service/pi/api_op_ListPerformanceAnalysisReports.go index 35695ed6e96..3728fcabc88 100644 --- a/service/pi/api_op_ListPerformanceAnalysisReports.go +++ b/service/pi/api_op_ListPerformanceAnalysisReports.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListPerformanceAnalysisReportsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPerformanceAnalysisReportsValidationMiddleware(stack); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListPerformanceAnalysisReportsMiddlewares(stack *mi return nil } -// ListPerformanceAnalysisReportsAPIClient is a client that implements the -// ListPerformanceAnalysisReports operation. -type ListPerformanceAnalysisReportsAPIClient interface { - ListPerformanceAnalysisReports(context.Context, *ListPerformanceAnalysisReportsInput, ...func(*Options)) (*ListPerformanceAnalysisReportsOutput, error) -} - -var _ ListPerformanceAnalysisReportsAPIClient = (*Client)(nil) - // ListPerformanceAnalysisReportsPaginatorOptions is the paginator options for // ListPerformanceAnalysisReports type ListPerformanceAnalysisReportsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListPerformanceAnalysisReportsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPerformanceAnalysisReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListPerformanceAnalysisReportsPaginator) NextPage(ctx context.Context, return result, nil } +// ListPerformanceAnalysisReportsAPIClient is a client that implements the +// ListPerformanceAnalysisReports operation. +type ListPerformanceAnalysisReportsAPIClient interface { + ListPerformanceAnalysisReports(context.Context, *ListPerformanceAnalysisReportsInput, ...func(*Options)) (*ListPerformanceAnalysisReportsOutput, error) +} + +var _ ListPerformanceAnalysisReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPerformanceAnalysisReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pi/api_op_ListTagsForResource.go b/service/pi/api_op_ListTagsForResource.go index a917ce14954..99cad79ee6b 100644 --- a/service/pi/api_op_ListTagsForResource.go +++ b/service/pi/api_op_ListTagsForResource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_TagResource.go b/service/pi/api_op_TagResource.go index eb65aed82a8..1fda3eb8b4e 100644 --- a/service/pi/api_op_TagResource.go +++ b/service/pi/api_op_TagResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pi/api_op_UntagResource.go b/service/pi/api_op_UntagResource.go index ab51b2d94e8..bc1a46482b4 100644 --- a/service/pi/api_op_UntagResource.go +++ b/service/pi/api_op_UntagResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_client.go b/service/pinpoint/api_client.go index b2bdadd1d05..69e216a77ff 100644 --- a/service/pinpoint/api_client.go +++ b/service/pinpoint/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/pinpoint/api_op_CreateApp.go b/service/pinpoint/api_op_CreateApp.go index c4b9db966a7..7814a9968da 100644 --- a/service/pinpoint/api_op_CreateApp.go +++ b/service/pinpoint/api_op_CreateApp.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateCampaign.go b/service/pinpoint/api_op_CreateCampaign.go index d8c6fe03860..7fa3708c467 100644 --- a/service/pinpoint/api_op_CreateCampaign.go +++ b/service/pinpoint/api_op_CreateCampaign.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateEmailTemplate.go b/service/pinpoint/api_op_CreateEmailTemplate.go index be6614b59a3..309a85cb9e5 100644 --- a/service/pinpoint/api_op_CreateEmailTemplate.go +++ b/service/pinpoint/api_op_CreateEmailTemplate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateEmailTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateExportJob.go b/service/pinpoint/api_op_CreateExportJob.go index 8ca47cb1b7a..8e21658dd16 100644 --- a/service/pinpoint/api_op_CreateExportJob.go +++ b/service/pinpoint/api_op_CreateExportJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateExportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateImportJob.go b/service/pinpoint/api_op_CreateImportJob.go index 5d767645fe1..45c2f160842 100644 --- a/service/pinpoint/api_op_CreateImportJob.go +++ b/service/pinpoint/api_op_CreateImportJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateImportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateInAppTemplate.go b/service/pinpoint/api_op_CreateInAppTemplate.go index becb572655a..640c9942a55 100644 --- a/service/pinpoint/api_op_CreateInAppTemplate.go +++ b/service/pinpoint/api_op_CreateInAppTemplate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateInAppTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInAppTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateJourney.go b/service/pinpoint/api_op_CreateJourney.go index 761dff7258c..2dc86da7f60 100644 --- a/service/pinpoint/api_op_CreateJourney.go +++ b/service/pinpoint/api_op_CreateJourney.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateJourneyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJourneyValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreatePushTemplate.go b/service/pinpoint/api_op_CreatePushTemplate.go index 99fbd4cc9bd..c35de4a96b2 100644 --- a/service/pinpoint/api_op_CreatePushTemplate.go +++ b/service/pinpoint/api_op_CreatePushTemplate.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreatePushTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePushTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateRecommenderConfiguration.go b/service/pinpoint/api_op_CreateRecommenderConfiguration.go index 2272db68675..8211ff061a4 100644 --- a/service/pinpoint/api_op_CreateRecommenderConfiguration.go +++ b/service/pinpoint/api_op_CreateRecommenderConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateRecommenderConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRecommenderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateSegment.go b/service/pinpoint/api_op_CreateSegment.go index a05f9bb513a..36a102d1b4b 100644 --- a/service/pinpoint/api_op_CreateSegment.go +++ b/service/pinpoint/api_op_CreateSegment.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateSegmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateSmsTemplate.go b/service/pinpoint/api_op_CreateSmsTemplate.go index 8773d207275..a9014902a13 100644 --- a/service/pinpoint/api_op_CreateSmsTemplate.go +++ b/service/pinpoint/api_op_CreateSmsTemplate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateSmsTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSmsTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_CreateVoiceTemplate.go b/service/pinpoint/api_op_CreateVoiceTemplate.go index 5d6c09d6af1..a7bc30611a0 100644 --- a/service/pinpoint/api_op_CreateVoiceTemplate.go +++ b/service/pinpoint/api_op_CreateVoiceTemplate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateVoiceTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVoiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteAdmChannel.go b/service/pinpoint/api_op_DeleteAdmChannel.go index a86413596b0..c4e11bac0a6 100644 --- a/service/pinpoint/api_op_DeleteAdmChannel.go +++ b/service/pinpoint/api_op_DeleteAdmChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAdmChannelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAdmChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteApnsChannel.go b/service/pinpoint/api_op_DeleteApnsChannel.go index d389fb22446..73354c69643 100644 --- a/service/pinpoint/api_op_DeleteApnsChannel.go +++ b/service/pinpoint/api_op_DeleteApnsChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteApnsChannelMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApnsChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteApnsSandboxChannel.go b/service/pinpoint/api_op_DeleteApnsSandboxChannel.go index 518c971660d..db376821998 100644 --- a/service/pinpoint/api_op_DeleteApnsSandboxChannel.go +++ b/service/pinpoint/api_op_DeleteApnsSandboxChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteApnsSandboxChannelMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApnsSandboxChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteApnsVoipChannel.go b/service/pinpoint/api_op_DeleteApnsVoipChannel.go index 223353215df..a9ae68fbc2c 100644 --- a/service/pinpoint/api_op_DeleteApnsVoipChannel.go +++ b/service/pinpoint/api_op_DeleteApnsVoipChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteApnsVoipChannelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApnsVoipChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteApnsVoipSandboxChannel.go b/service/pinpoint/api_op_DeleteApnsVoipSandboxChannel.go index 52af9743361..c92078da18c 100644 --- a/service/pinpoint/api_op_DeleteApnsVoipSandboxChannel.go +++ b/service/pinpoint/api_op_DeleteApnsVoipSandboxChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteApnsVoipSandboxChannelMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApnsVoipSandboxChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteApp.go b/service/pinpoint/api_op_DeleteApp.go index 1e9324a9ee9..4a70e2a027f 100644 --- a/service/pinpoint/api_op_DeleteApp.go +++ b/service/pinpoint/api_op_DeleteApp.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteBaiduChannel.go b/service/pinpoint/api_op_DeleteBaiduChannel.go index 86b5b2d3137..4e882b9295a 100644 --- a/service/pinpoint/api_op_DeleteBaiduChannel.go +++ b/service/pinpoint/api_op_DeleteBaiduChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteBaiduChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBaiduChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteCampaign.go b/service/pinpoint/api_op_DeleteCampaign.go index 37f56587ff1..9fbea570171 100644 --- a/service/pinpoint/api_op_DeleteCampaign.go +++ b/service/pinpoint/api_op_DeleteCampaign.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteEmailChannel.go b/service/pinpoint/api_op_DeleteEmailChannel.go index c8de6122ab7..dc1d768ca36 100644 --- a/service/pinpoint/api_op_DeleteEmailChannel.go +++ b/service/pinpoint/api_op_DeleteEmailChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteEmailChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteEmailTemplate.go b/service/pinpoint/api_op_DeleteEmailTemplate.go index 1570af6456e..9761a57d503 100644 --- a/service/pinpoint/api_op_DeleteEmailTemplate.go +++ b/service/pinpoint/api_op_DeleteEmailTemplate.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteEmailTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteEndpoint.go b/service/pinpoint/api_op_DeleteEndpoint.go index 263ae16a058..26fdecce0f3 100644 --- a/service/pinpoint/api_op_DeleteEndpoint.go +++ b/service/pinpoint/api_op_DeleteEndpoint.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteEventStream.go b/service/pinpoint/api_op_DeleteEventStream.go index 7047cc91b50..f1930356e30 100644 --- a/service/pinpoint/api_op_DeleteEventStream.go +++ b/service/pinpoint/api_op_DeleteEventStream.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteEventStreamMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteGcmChannel.go b/service/pinpoint/api_op_DeleteGcmChannel.go index f68fc84d794..e6c5f596b6a 100644 --- a/service/pinpoint/api_op_DeleteGcmChannel.go +++ b/service/pinpoint/api_op_DeleteGcmChannel.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteGcmChannelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGcmChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteInAppTemplate.go b/service/pinpoint/api_op_DeleteInAppTemplate.go index 298a70d751d..4ad110b64f3 100644 --- a/service/pinpoint/api_op_DeleteInAppTemplate.go +++ b/service/pinpoint/api_op_DeleteInAppTemplate.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteInAppTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInAppTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteJourney.go b/service/pinpoint/api_op_DeleteJourney.go index 589ef2923f5..b7205ca4aa7 100644 --- a/service/pinpoint/api_op_DeleteJourney.go +++ b/service/pinpoint/api_op_DeleteJourney.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteJourneyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteJourneyValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeletePushTemplate.go b/service/pinpoint/api_op_DeletePushTemplate.go index 775f96d8bae..a75680b20b7 100644 --- a/service/pinpoint/api_op_DeletePushTemplate.go +++ b/service/pinpoint/api_op_DeletePushTemplate.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeletePushTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePushTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteRecommenderConfiguration.go b/service/pinpoint/api_op_DeleteRecommenderConfiguration.go index 5f24c324e2f..3d87c208140 100644 --- a/service/pinpoint/api_op_DeleteRecommenderConfiguration.go +++ b/service/pinpoint/api_op_DeleteRecommenderConfiguration.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteRecommenderConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecommenderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteSegment.go b/service/pinpoint/api_op_DeleteSegment.go index bb48919ca57..901ed0dd4cc 100644 --- a/service/pinpoint/api_op_DeleteSegment.go +++ b/service/pinpoint/api_op_DeleteSegment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteSegmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteSmsChannel.go b/service/pinpoint/api_op_DeleteSmsChannel.go index ca13b4a2800..9ded6d6dd65 100644 --- a/service/pinpoint/api_op_DeleteSmsChannel.go +++ b/service/pinpoint/api_op_DeleteSmsChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteSmsChannelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSmsChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteSmsTemplate.go b/service/pinpoint/api_op_DeleteSmsTemplate.go index fe171dd4b49..de567c7b3ad 100644 --- a/service/pinpoint/api_op_DeleteSmsTemplate.go +++ b/service/pinpoint/api_op_DeleteSmsTemplate.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteSmsTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSmsTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteUserEndpoints.go b/service/pinpoint/api_op_DeleteUserEndpoints.go index 34a5ebd054e..bcde00b2aec 100644 --- a/service/pinpoint/api_op_DeleteUserEndpoints.go +++ b/service/pinpoint/api_op_DeleteUserEndpoints.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteUserEndpointsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteVoiceChannel.go b/service/pinpoint/api_op_DeleteVoiceChannel.go index db2abccca43..b187f150d13 100644 --- a/service/pinpoint/api_op_DeleteVoiceChannel.go +++ b/service/pinpoint/api_op_DeleteVoiceChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteVoiceChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_DeleteVoiceTemplate.go b/service/pinpoint/api_op_DeleteVoiceTemplate.go index 36a154c1c66..e44648e048b 100644 --- a/service/pinpoint/api_op_DeleteVoiceTemplate.go +++ b/service/pinpoint/api_op_DeleteVoiceTemplate.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteVoiceTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVoiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetAdmChannel.go b/service/pinpoint/api_op_GetAdmChannel.go index 087d2b78887..d966bd3127c 100644 --- a/service/pinpoint/api_op_GetAdmChannel.go +++ b/service/pinpoint/api_op_GetAdmChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetAdmChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAdmChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApnsChannel.go b/service/pinpoint/api_op_GetApnsChannel.go index 83f0880da44..b7fc8360a0f 100644 --- a/service/pinpoint/api_op_GetApnsChannel.go +++ b/service/pinpoint/api_op_GetApnsChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetApnsChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApnsChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApnsSandboxChannel.go b/service/pinpoint/api_op_GetApnsSandboxChannel.go index e4a234d98f3..08831b31a9f 100644 --- a/service/pinpoint/api_op_GetApnsSandboxChannel.go +++ b/service/pinpoint/api_op_GetApnsSandboxChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetApnsSandboxChannelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApnsSandboxChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApnsVoipChannel.go b/service/pinpoint/api_op_GetApnsVoipChannel.go index b372380a766..fc5f7ccb08d 100644 --- a/service/pinpoint/api_op_GetApnsVoipChannel.go +++ b/service/pinpoint/api_op_GetApnsVoipChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetApnsVoipChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApnsVoipChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApnsVoipSandboxChannel.go b/service/pinpoint/api_op_GetApnsVoipSandboxChannel.go index f5ae54a470f..5feff98bcbb 100644 --- a/service/pinpoint/api_op_GetApnsVoipSandboxChannel.go +++ b/service/pinpoint/api_op_GetApnsVoipSandboxChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetApnsVoipSandboxChannelMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApnsVoipSandboxChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApp.go b/service/pinpoint/api_op_GetApp.go index bf0d6323e07..b8bb9090cb8 100644 --- a/service/pinpoint/api_op_GetApp.go +++ b/service/pinpoint/api_op_GetApp.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetAppMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApplicationDateRangeKpi.go b/service/pinpoint/api_op_GetApplicationDateRangeKpi.go index 4fb2cb05711..50055932aa7 100644 --- a/service/pinpoint/api_op_GetApplicationDateRangeKpi.go +++ b/service/pinpoint/api_op_GetApplicationDateRangeKpi.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetApplicationDateRangeKpiMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationDateRangeKpiValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApplicationSettings.go b/service/pinpoint/api_op_GetApplicationSettings.go index f68f9c4f857..d926a6c2da8 100644 --- a/service/pinpoint/api_op_GetApplicationSettings.go +++ b/service/pinpoint/api_op_GetApplicationSettings.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetApplicationSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetApps.go b/service/pinpoint/api_op_GetApps.go index 091c9288e48..1411be59c70 100644 --- a/service/pinpoint/api_op_GetApps.go +++ b/service/pinpoint/api_op_GetApps.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetAppsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApps(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpoint/api_op_GetBaiduChannel.go b/service/pinpoint/api_op_GetBaiduChannel.go index 727bf104c5c..d58b68bfb65 100644 --- a/service/pinpoint/api_op_GetBaiduChannel.go +++ b/service/pinpoint/api_op_GetBaiduChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetBaiduChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBaiduChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetCampaign.go b/service/pinpoint/api_op_GetCampaign.go index 3a0253ac0d4..06baea6b2f1 100644 --- a/service/pinpoint/api_op_GetCampaign.go +++ b/service/pinpoint/api_op_GetCampaign.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetCampaignMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetCampaignActivities.go b/service/pinpoint/api_op_GetCampaignActivities.go index 5f9444af784..1cff9239c04 100644 --- a/service/pinpoint/api_op_GetCampaignActivities.go +++ b/service/pinpoint/api_op_GetCampaignActivities.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetCampaignActivitiesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignActivitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetCampaignDateRangeKpi.go b/service/pinpoint/api_op_GetCampaignDateRangeKpi.go index 88e4bcf1eb4..21d2f616491 100644 --- a/service/pinpoint/api_op_GetCampaignDateRangeKpi.go +++ b/service/pinpoint/api_op_GetCampaignDateRangeKpi.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetCampaignDateRangeKpiMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignDateRangeKpiValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetCampaignVersion.go b/service/pinpoint/api_op_GetCampaignVersion.go index 420287f15b9..1276eea5216 100644 --- a/service/pinpoint/api_op_GetCampaignVersion.go +++ b/service/pinpoint/api_op_GetCampaignVersion.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetCampaignVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetCampaignVersions.go b/service/pinpoint/api_op_GetCampaignVersions.go index 8aed9b54b21..726820f61c4 100644 --- a/service/pinpoint/api_op_GetCampaignVersions.go +++ b/service/pinpoint/api_op_GetCampaignVersions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetCampaignVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetCampaigns.go b/service/pinpoint/api_op_GetCampaigns.go index 29956cb8b5a..400f6e24451 100644 --- a/service/pinpoint/api_op_GetCampaigns.go +++ b/service/pinpoint/api_op_GetCampaigns.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetCampaignsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCampaignsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetChannels.go b/service/pinpoint/api_op_GetChannels.go index cc6f546ae07..16e6b8717f0 100644 --- a/service/pinpoint/api_op_GetChannels.go +++ b/service/pinpoint/api_op_GetChannels.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetChannelsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChannelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetEmailChannel.go b/service/pinpoint/api_op_GetEmailChannel.go index 3fe00352407..6dcbb1f2993 100644 --- a/service/pinpoint/api_op_GetEmailChannel.go +++ b/service/pinpoint/api_op_GetEmailChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetEmailChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEmailChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetEmailTemplate.go b/service/pinpoint/api_op_GetEmailTemplate.go index 57382003d0b..746be02c679 100644 --- a/service/pinpoint/api_op_GetEmailTemplate.go +++ b/service/pinpoint/api_op_GetEmailTemplate.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetEmailTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetEndpoint.go b/service/pinpoint/api_op_GetEndpoint.go index bfb87b5b634..63de78df32f 100644 --- a/service/pinpoint/api_op_GetEndpoint.go +++ b/service/pinpoint/api_op_GetEndpoint.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetEndpointMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetEventStream.go b/service/pinpoint/api_op_GetEventStream.go index 29570c446a1..6c4e1e5b1b9 100644 --- a/service/pinpoint/api_op_GetEventStream.go +++ b/service/pinpoint/api_op_GetEventStream.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetEventStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEventStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetExportJob.go b/service/pinpoint/api_op_GetExportJob.go index ca2a6fa9b6b..fe1502a3ffe 100644 --- a/service/pinpoint/api_op_GetExportJob.go +++ b/service/pinpoint/api_op_GetExportJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetExportJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetExportJobs.go b/service/pinpoint/api_op_GetExportJobs.go index ba16702f88e..9d57db4a44f 100644 --- a/service/pinpoint/api_op_GetExportJobs.go +++ b/service/pinpoint/api_op_GetExportJobs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetExportJobsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExportJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetGcmChannel.go b/service/pinpoint/api_op_GetGcmChannel.go index fd4280a6ffc..edf0c57f485 100644 --- a/service/pinpoint/api_op_GetGcmChannel.go +++ b/service/pinpoint/api_op_GetGcmChannel.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetGcmChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGcmChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetImportJob.go b/service/pinpoint/api_op_GetImportJob.go index 47d833f12ad..48548521f9b 100644 --- a/service/pinpoint/api_op_GetImportJob.go +++ b/service/pinpoint/api_op_GetImportJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetImportJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetImportJobs.go b/service/pinpoint/api_op_GetImportJobs.go index 12cc7893f41..b1dc8f48fd8 100644 --- a/service/pinpoint/api_op_GetImportJobs.go +++ b/service/pinpoint/api_op_GetImportJobs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetImportJobsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetInAppMessages.go b/service/pinpoint/api_op_GetInAppMessages.go index 3470292e159..a43caed331a 100644 --- a/service/pinpoint/api_op_GetInAppMessages.go +++ b/service/pinpoint/api_op_GetInAppMessages.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetInAppMessagesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInAppMessagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetInAppTemplate.go b/service/pinpoint/api_op_GetInAppTemplate.go index 78b419d5ae7..b6df57ef368 100644 --- a/service/pinpoint/api_op_GetInAppTemplate.go +++ b/service/pinpoint/api_op_GetInAppTemplate.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetInAppTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInAppTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourney.go b/service/pinpoint/api_op_GetJourney.go index 3f9b4f2d910..2134c20b093 100644 --- a/service/pinpoint/api_op_GetJourney.go +++ b/service/pinpoint/api_op_GetJourney.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetJourneyMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourneyDateRangeKpi.go b/service/pinpoint/api_op_GetJourneyDateRangeKpi.go index a0d2c79a646..020c9c7b4b8 100644 --- a/service/pinpoint/api_op_GetJourneyDateRangeKpi.go +++ b/service/pinpoint/api_op_GetJourneyDateRangeKpi.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetJourneyDateRangeKpiMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyDateRangeKpiValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourneyExecutionActivityMetrics.go b/service/pinpoint/api_op_GetJourneyExecutionActivityMetrics.go index 827c3035c0c..014a826293d 100644 --- a/service/pinpoint/api_op_GetJourneyExecutionActivityMetrics.go +++ b/service/pinpoint/api_op_GetJourneyExecutionActivityMetrics.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetJourneyExecutionActivityMetricsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyExecutionActivityMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourneyExecutionMetrics.go b/service/pinpoint/api_op_GetJourneyExecutionMetrics.go index a95d4f4d13f..856f7a966b6 100644 --- a/service/pinpoint/api_op_GetJourneyExecutionMetrics.go +++ b/service/pinpoint/api_op_GetJourneyExecutionMetrics.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetJourneyExecutionMetricsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyExecutionMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourneyRunExecutionActivityMetrics.go b/service/pinpoint/api_op_GetJourneyRunExecutionActivityMetrics.go index 53df26f9c5a..d14ed4c9322 100644 --- a/service/pinpoint/api_op_GetJourneyRunExecutionActivityMetrics.go +++ b/service/pinpoint/api_op_GetJourneyRunExecutionActivityMetrics.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetJourneyRunExecutionActivityMetricsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyRunExecutionActivityMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourneyRunExecutionMetrics.go b/service/pinpoint/api_op_GetJourneyRunExecutionMetrics.go index 5bf4c0503b8..09ef682f3e0 100644 --- a/service/pinpoint/api_op_GetJourneyRunExecutionMetrics.go +++ b/service/pinpoint/api_op_GetJourneyRunExecutionMetrics.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetJourneyRunExecutionMetricsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyRunExecutionMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetJourneyRuns.go b/service/pinpoint/api_op_GetJourneyRuns.go index 03b28cce742..684e2e03a18 100644 --- a/service/pinpoint/api_op_GetJourneyRuns.go +++ b/service/pinpoint/api_op_GetJourneyRuns.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetJourneyRunsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJourneyRunsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetPushTemplate.go b/service/pinpoint/api_op_GetPushTemplate.go index 247580c1e68..09c97330de8 100644 --- a/service/pinpoint/api_op_GetPushTemplate.go +++ b/service/pinpoint/api_op_GetPushTemplate.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetPushTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPushTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetRecommenderConfiguration.go b/service/pinpoint/api_op_GetRecommenderConfiguration.go index 9f51096fb27..30b6eb039fc 100644 --- a/service/pinpoint/api_op_GetRecommenderConfiguration.go +++ b/service/pinpoint/api_op_GetRecommenderConfiguration.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetRecommenderConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommenderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetRecommenderConfigurations.go b/service/pinpoint/api_op_GetRecommenderConfigurations.go index fea32a1d75a..c8cf40d9aa6 100644 --- a/service/pinpoint/api_op_GetRecommenderConfigurations.go +++ b/service/pinpoint/api_op_GetRecommenderConfigurations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetRecommenderConfigurationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRecommenderConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSegment.go b/service/pinpoint/api_op_GetSegment.go index d7b17372ee9..8f25cb9406e 100644 --- a/service/pinpoint/api_op_GetSegment.go +++ b/service/pinpoint/api_op_GetSegment.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetSegmentMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSegmentExportJobs.go b/service/pinpoint/api_op_GetSegmentExportJobs.go index 5a7de79fba3..5d07d4b1d62 100644 --- a/service/pinpoint/api_op_GetSegmentExportJobs.go +++ b/service/pinpoint/api_op_GetSegmentExportJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetSegmentExportJobsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentExportJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSegmentImportJobs.go b/service/pinpoint/api_op_GetSegmentImportJobs.go index df2b96c55b1..4ff05dc808e 100644 --- a/service/pinpoint/api_op_GetSegmentImportJobs.go +++ b/service/pinpoint/api_op_GetSegmentImportJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetSegmentImportJobsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentImportJobsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSegmentVersion.go b/service/pinpoint/api_op_GetSegmentVersion.go index df2563b5e2e..8117f5515ce 100644 --- a/service/pinpoint/api_op_GetSegmentVersion.go +++ b/service/pinpoint/api_op_GetSegmentVersion.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetSegmentVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSegmentVersions.go b/service/pinpoint/api_op_GetSegmentVersions.go index 07962fbcd40..b9e3a615131 100644 --- a/service/pinpoint/api_op_GetSegmentVersions.go +++ b/service/pinpoint/api_op_GetSegmentVersions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetSegmentVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSegments.go b/service/pinpoint/api_op_GetSegments.go index 54a92be7027..ff8bf58b23c 100644 --- a/service/pinpoint/api_op_GetSegments.go +++ b/service/pinpoint/api_op_GetSegments.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSegmentsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSmsChannel.go b/service/pinpoint/api_op_GetSmsChannel.go index 10ad753fe41..88544d2a3ae 100644 --- a/service/pinpoint/api_op_GetSmsChannel.go +++ b/service/pinpoint/api_op_GetSmsChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetSmsChannelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSmsChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetSmsTemplate.go b/service/pinpoint/api_op_GetSmsTemplate.go index 6314b02ce95..96df98e4a8e 100644 --- a/service/pinpoint/api_op_GetSmsTemplate.go +++ b/service/pinpoint/api_op_GetSmsTemplate.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetSmsTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSmsTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetUserEndpoints.go b/service/pinpoint/api_op_GetUserEndpoints.go index 06780616252..249aeae23eb 100644 --- a/service/pinpoint/api_op_GetUserEndpoints.go +++ b/service/pinpoint/api_op_GetUserEndpoints.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetUserEndpointsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserEndpointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetVoiceChannel.go b/service/pinpoint/api_op_GetVoiceChannel.go index 2f94d4c369f..3f4f581a33b 100644 --- a/service/pinpoint/api_op_GetVoiceChannel.go +++ b/service/pinpoint/api_op_GetVoiceChannel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetVoiceChannelMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_GetVoiceTemplate.go b/service/pinpoint/api_op_GetVoiceTemplate.go index f85fdbe5466..d86fcfa00ce 100644 --- a/service/pinpoint/api_op_GetVoiceTemplate.go +++ b/service/pinpoint/api_op_GetVoiceTemplate.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetVoiceTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVoiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_ListJourneys.go b/service/pinpoint/api_op_ListJourneys.go index ae1491c57a4..a21c94715e9 100644 --- a/service/pinpoint/api_op_ListJourneys.go +++ b/service/pinpoint/api_op_ListJourneys.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListJourneysMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJourneysValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_ListTagsForResource.go b/service/pinpoint/api_op_ListTagsForResource.go index d47eeef502e..caa738a085f 100644 --- a/service/pinpoint/api_op_ListTagsForResource.go +++ b/service/pinpoint/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_ListTemplateVersions.go b/service/pinpoint/api_op_ListTemplateVersions.go index 814c31317b7..b949f5f02a3 100644 --- a/service/pinpoint/api_op_ListTemplateVersions.go +++ b/service/pinpoint/api_op_ListTemplateVersions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListTemplateVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_ListTemplates.go b/service/pinpoint/api_op_ListTemplates.go index c59c61154c5..28f38e4d18a 100644 --- a/service/pinpoint/api_op_ListTemplates.go +++ b/service/pinpoint/api_op_ListTemplates.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTemplates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpoint/api_op_PhoneNumberValidate.go b/service/pinpoint/api_op_PhoneNumberValidate.go index c980d7dba7f..881d326fa8b 100644 --- a/service/pinpoint/api_op_PhoneNumberValidate.go +++ b/service/pinpoint/api_op_PhoneNumberValidate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPhoneNumberValidateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPhoneNumberValidateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_PutEventStream.go b/service/pinpoint/api_op_PutEventStream.go index 0f295f48e4b..94f8b119d37 100644 --- a/service/pinpoint/api_op_PutEventStream.go +++ b/service/pinpoint/api_op_PutEventStream.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutEventStreamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_PutEvents.go b/service/pinpoint/api_op_PutEvents.go index 14714134bd6..ccda992b6a2 100644 --- a/service/pinpoint/api_op_PutEvents.go +++ b/service/pinpoint/api_op_PutEvents.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutEventsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEventsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_RemoveAttributes.go b/service/pinpoint/api_op_RemoveAttributes.go index 826b15bf798..883e85c378e 100644 --- a/service/pinpoint/api_op_RemoveAttributes.go +++ b/service/pinpoint/api_op_RemoveAttributes.go @@ -134,6 +134,9 @@ func (c *Client) addOperationRemoveAttributesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_SendMessages.go b/service/pinpoint/api_op_SendMessages.go index caa4cea9ff9..6b0d06f63ba 100644 --- a/service/pinpoint/api_op_SendMessages.go +++ b/service/pinpoint/api_op_SendMessages.go @@ -115,6 +115,9 @@ func (c *Client) addOperationSendMessagesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendMessagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_SendOTPMessage.go b/service/pinpoint/api_op_SendOTPMessage.go index afe15322ffa..226dc30f743 100644 --- a/service/pinpoint/api_op_SendOTPMessage.go +++ b/service/pinpoint/api_op_SendOTPMessage.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSendOTPMessageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendOTPMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_SendUsersMessages.go b/service/pinpoint/api_op_SendUsersMessages.go index fbb554a8018..6f06d62fa88 100644 --- a/service/pinpoint/api_op_SendUsersMessages.go +++ b/service/pinpoint/api_op_SendUsersMessages.go @@ -115,6 +115,9 @@ func (c *Client) addOperationSendUsersMessagesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendUsersMessagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_TagResource.go b/service/pinpoint/api_op_TagResource.go index b44b24db373..97aa1640151 100644 --- a/service/pinpoint/api_op_TagResource.go +++ b/service/pinpoint/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UntagResource.go b/service/pinpoint/api_op_UntagResource.go index af688c6ba1f..e6689c91f99 100644 --- a/service/pinpoint/api_op_UntagResource.go +++ b/service/pinpoint/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateAdmChannel.go b/service/pinpoint/api_op_UpdateAdmChannel.go index 9f414887ed1..5752107116d 100644 --- a/service/pinpoint/api_op_UpdateAdmChannel.go +++ b/service/pinpoint/api_op_UpdateAdmChannel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateAdmChannelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAdmChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateApnsChannel.go b/service/pinpoint/api_op_UpdateApnsChannel.go index 3982a7d3c4e..0dd6b5980a1 100644 --- a/service/pinpoint/api_op_UpdateApnsChannel.go +++ b/service/pinpoint/api_op_UpdateApnsChannel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateApnsChannelMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApnsChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateApnsSandboxChannel.go b/service/pinpoint/api_op_UpdateApnsSandboxChannel.go index bf7515525aa..73a47549a98 100644 --- a/service/pinpoint/api_op_UpdateApnsSandboxChannel.go +++ b/service/pinpoint/api_op_UpdateApnsSandboxChannel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateApnsSandboxChannelMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApnsSandboxChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateApnsVoipChannel.go b/service/pinpoint/api_op_UpdateApnsVoipChannel.go index f9d6af6c5d3..56eb38176b7 100644 --- a/service/pinpoint/api_op_UpdateApnsVoipChannel.go +++ b/service/pinpoint/api_op_UpdateApnsVoipChannel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateApnsVoipChannelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApnsVoipChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateApnsVoipSandboxChannel.go b/service/pinpoint/api_op_UpdateApnsVoipSandboxChannel.go index 0e00b9255c5..b1b12266fe5 100644 --- a/service/pinpoint/api_op_UpdateApnsVoipSandboxChannel.go +++ b/service/pinpoint/api_op_UpdateApnsVoipSandboxChannel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateApnsVoipSandboxChannelMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApnsVoipSandboxChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateApplicationSettings.go b/service/pinpoint/api_op_UpdateApplicationSettings.go index 84eb4b782b9..723a3683bc4 100644 --- a/service/pinpoint/api_op_UpdateApplicationSettings.go +++ b/service/pinpoint/api_op_UpdateApplicationSettings.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateApplicationSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateBaiduChannel.go b/service/pinpoint/api_op_UpdateBaiduChannel.go index 10a48788872..8eb4b1f44c3 100644 --- a/service/pinpoint/api_op_UpdateBaiduChannel.go +++ b/service/pinpoint/api_op_UpdateBaiduChannel.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateBaiduChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBaiduChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateCampaign.go b/service/pinpoint/api_op_UpdateCampaign.go index ea78154bf8f..dff14567871 100644 --- a/service/pinpoint/api_op_UpdateCampaign.go +++ b/service/pinpoint/api_op_UpdateCampaign.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateCampaignMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateEmailChannel.go b/service/pinpoint/api_op_UpdateEmailChannel.go index a24be5486f1..ecb2e75775e 100644 --- a/service/pinpoint/api_op_UpdateEmailChannel.go +++ b/service/pinpoint/api_op_UpdateEmailChannel.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateEmailChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEmailChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateEmailTemplate.go b/service/pinpoint/api_op_UpdateEmailTemplate.go index c4dd0a96ad8..1075cdda107 100644 --- a/service/pinpoint/api_op_UpdateEmailTemplate.go +++ b/service/pinpoint/api_op_UpdateEmailTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateEmailTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateEndpoint.go b/service/pinpoint/api_op_UpdateEndpoint.go index bc7334c3b50..80273620c70 100644 --- a/service/pinpoint/api_op_UpdateEndpoint.go +++ b/service/pinpoint/api_op_UpdateEndpoint.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateEndpointsBatch.go b/service/pinpoint/api_op_UpdateEndpointsBatch.go index c8867d7f8e5..68c427db308 100644 --- a/service/pinpoint/api_op_UpdateEndpointsBatch.go +++ b/service/pinpoint/api_op_UpdateEndpointsBatch.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateEndpointsBatchMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointsBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateGcmChannel.go b/service/pinpoint/api_op_UpdateGcmChannel.go index 19c023c63cd..7b57e0d1e93 100644 --- a/service/pinpoint/api_op_UpdateGcmChannel.go +++ b/service/pinpoint/api_op_UpdateGcmChannel.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateGcmChannelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGcmChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateInAppTemplate.go b/service/pinpoint/api_op_UpdateInAppTemplate.go index e908e6cb11f..56c08404c5a 100644 --- a/service/pinpoint/api_op_UpdateInAppTemplate.go +++ b/service/pinpoint/api_op_UpdateInAppTemplate.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateInAppTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInAppTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateJourney.go b/service/pinpoint/api_op_UpdateJourney.go index 8956815a791..b31566053d2 100644 --- a/service/pinpoint/api_op_UpdateJourney.go +++ b/service/pinpoint/api_op_UpdateJourney.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateJourneyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJourneyValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateJourneyState.go b/service/pinpoint/api_op_UpdateJourneyState.go index 8c0b714fe88..8761946b951 100644 --- a/service/pinpoint/api_op_UpdateJourneyState.go +++ b/service/pinpoint/api_op_UpdateJourneyState.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateJourneyStateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJourneyStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdatePushTemplate.go b/service/pinpoint/api_op_UpdatePushTemplate.go index d167391b15b..25868ce87ca 100644 --- a/service/pinpoint/api_op_UpdatePushTemplate.go +++ b/service/pinpoint/api_op_UpdatePushTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdatePushTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePushTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateRecommenderConfiguration.go b/service/pinpoint/api_op_UpdateRecommenderConfiguration.go index fc2912f22bd..4a67c5edf7e 100644 --- a/service/pinpoint/api_op_UpdateRecommenderConfiguration.go +++ b/service/pinpoint/api_op_UpdateRecommenderConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateRecommenderConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecommenderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateSegment.go b/service/pinpoint/api_op_UpdateSegment.go index 843e1a6b80c..b8457a4663b 100644 --- a/service/pinpoint/api_op_UpdateSegment.go +++ b/service/pinpoint/api_op_UpdateSegment.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateSegmentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSegmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateSmsChannel.go b/service/pinpoint/api_op_UpdateSmsChannel.go index b633e9f5206..e13ce0b25f7 100644 --- a/service/pinpoint/api_op_UpdateSmsChannel.go +++ b/service/pinpoint/api_op_UpdateSmsChannel.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateSmsChannelMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSmsChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateSmsTemplate.go b/service/pinpoint/api_op_UpdateSmsTemplate.go index a5acf906257..79722da38e7 100644 --- a/service/pinpoint/api_op_UpdateSmsTemplate.go +++ b/service/pinpoint/api_op_UpdateSmsTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateSmsTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSmsTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateTemplateActiveVersion.go b/service/pinpoint/api_op_UpdateTemplateActiveVersion.go index 8a34365494a..d861fd4c4b7 100644 --- a/service/pinpoint/api_op_UpdateTemplateActiveVersion.go +++ b/service/pinpoint/api_op_UpdateTemplateActiveVersion.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateTemplateActiveVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateActiveVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateVoiceChannel.go b/service/pinpoint/api_op_UpdateVoiceChannel.go index 648224cd801..d2b0d4be79f 100644 --- a/service/pinpoint/api_op_UpdateVoiceChannel.go +++ b/service/pinpoint/api_op_UpdateVoiceChannel.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateVoiceChannelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_UpdateVoiceTemplate.go b/service/pinpoint/api_op_UpdateVoiceTemplate.go index 2c0134023f0..183a72c00da 100644 --- a/service/pinpoint/api_op_UpdateVoiceTemplate.go +++ b/service/pinpoint/api_op_UpdateVoiceTemplate.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateVoiceTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVoiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpoint/api_op_VerifyOTPMessage.go b/service/pinpoint/api_op_VerifyOTPMessage.go index 297b12c96be..01b45dda590 100644 --- a/service/pinpoint/api_op_VerifyOTPMessage.go +++ b/service/pinpoint/api_op_VerifyOTPMessage.go @@ -113,6 +113,9 @@ func (c *Client) addOperationVerifyOTPMessageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyOTPMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_client.go b/service/pinpointemail/api_client.go index 3d78f2f2d47..5d57f95d1c0 100644 --- a/service/pinpointemail/api_client.go +++ b/service/pinpointemail/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/pinpointemail/api_op_CreateConfigurationSet.go b/service/pinpointemail/api_op_CreateConfigurationSet.go index c51f08f1ec6..dd31140acc7 100644 --- a/service/pinpointemail/api_op_CreateConfigurationSet.go +++ b/service/pinpointemail/api_op_CreateConfigurationSet.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_CreateConfigurationSetEventDestination.go b/service/pinpointemail/api_op_CreateConfigurationSetEventDestination.go index 2c5da8f409e..53722081dbd 100644 --- a/service/pinpointemail/api_op_CreateConfigurationSetEventDestination.go +++ b/service/pinpointemail/api_op_CreateConfigurationSetEventDestination.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_CreateDedicatedIpPool.go b/service/pinpointemail/api_op_CreateDedicatedIpPool.go index 3766a506a92..d133dd7c986 100644 --- a/service/pinpointemail/api_op_CreateDedicatedIpPool.go +++ b/service/pinpointemail/api_op_CreateDedicatedIpPool.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateDedicatedIpPoolMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDedicatedIpPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_CreateDeliverabilityTestReport.go b/service/pinpointemail/api_op_CreateDeliverabilityTestReport.go index 719c8717592..06dc8879e63 100644 --- a/service/pinpointemail/api_op_CreateDeliverabilityTestReport.go +++ b/service/pinpointemail/api_op_CreateDeliverabilityTestReport.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateDeliverabilityTestReportMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeliverabilityTestReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_CreateEmailIdentity.go b/service/pinpointemail/api_op_CreateEmailIdentity.go index b5e82024862..c21a5fac7be 100644 --- a/service/pinpointemail/api_op_CreateEmailIdentity.go +++ b/service/pinpointemail/api_op_CreateEmailIdentity.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateEmailIdentityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_DeleteConfigurationSet.go b/service/pinpointemail/api_op_DeleteConfigurationSet.go index 9633b228192..03cf6e5af4b 100644 --- a/service/pinpointemail/api_op_DeleteConfigurationSet.go +++ b/service/pinpointemail/api_op_DeleteConfigurationSet.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_DeleteConfigurationSetEventDestination.go b/service/pinpointemail/api_op_DeleteConfigurationSetEventDestination.go index 2fb5f2d4c21..89a1941d9ab 100644 --- a/service/pinpointemail/api_op_DeleteConfigurationSetEventDestination.go +++ b/service/pinpointemail/api_op_DeleteConfigurationSetEventDestination.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_DeleteDedicatedIpPool.go b/service/pinpointemail/api_op_DeleteDedicatedIpPool.go index b60db5f27d2..0a6700e3bff 100644 --- a/service/pinpointemail/api_op_DeleteDedicatedIpPool.go +++ b/service/pinpointemail/api_op_DeleteDedicatedIpPool.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDedicatedIpPoolMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDedicatedIpPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_DeleteEmailIdentity.go b/service/pinpointemail/api_op_DeleteEmailIdentity.go index 33c638d0806..7f67ccfba25 100644 --- a/service/pinpointemail/api_op_DeleteEmailIdentity.go +++ b/service/pinpointemail/api_op_DeleteEmailIdentity.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteEmailIdentityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetAccount.go b/service/pinpointemail/api_op_GetAccount.go index 240d721c28b..4056239ca6e 100644 --- a/service/pinpointemail/api_op_GetAccount.go +++ b/service/pinpointemail/api_op_GetAccount.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetAccountMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetBlacklistReports.go b/service/pinpointemail/api_op_GetBlacklistReports.go index 4a8ba7e50f2..e44d9c5dcdb 100644 --- a/service/pinpointemail/api_op_GetBlacklistReports.go +++ b/service/pinpointemail/api_op_GetBlacklistReports.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetBlacklistReportsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlacklistReportsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetConfigurationSet.go b/service/pinpointemail/api_op_GetConfigurationSet.go index f5443b5fcbe..ac4f5e22878 100644 --- a/service/pinpointemail/api_op_GetConfigurationSet.go +++ b/service/pinpointemail/api_op_GetConfigurationSet.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetConfigurationSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetConfigurationSetEventDestinations.go b/service/pinpointemail/api_op_GetConfigurationSetEventDestinations.go index 56945ad86dc..5742c9c0ad5 100644 --- a/service/pinpointemail/api_op_GetConfigurationSetEventDestinations.go +++ b/service/pinpointemail/api_op_GetConfigurationSetEventDestinations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetConfigurationSetEventDestinationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationSetEventDestinationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetDedicatedIp.go b/service/pinpointemail/api_op_GetDedicatedIp.go index 5e18e8d2734..acc156d5aa2 100644 --- a/service/pinpointemail/api_op_GetDedicatedIp.go +++ b/service/pinpointemail/api_op_GetDedicatedIp.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDedicatedIpMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDedicatedIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetDedicatedIps.go b/service/pinpointemail/api_op_GetDedicatedIps.go index 9902356b149..fdef08122c7 100644 --- a/service/pinpointemail/api_op_GetDedicatedIps.go +++ b/service/pinpointemail/api_op_GetDedicatedIps.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetDedicatedIpsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDedicatedIps(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetDedicatedIpsMiddlewares(stack *middleware.Stack, return nil } -// GetDedicatedIpsAPIClient is a client that implements the GetDedicatedIps -// operation. -type GetDedicatedIpsAPIClient interface { - GetDedicatedIps(context.Context, *GetDedicatedIpsInput, ...func(*Options)) (*GetDedicatedIpsOutput, error) -} - -var _ GetDedicatedIpsAPIClient = (*Client)(nil) - // GetDedicatedIpsPaginatorOptions is the paginator options for GetDedicatedIps type GetDedicatedIpsPaginatorOptions struct { // The number of results to show in a single call to GetDedicatedIpsRequest . If @@ -219,6 +214,9 @@ func (p *GetDedicatedIpsPaginator) NextPage(ctx context.Context, optFns ...func( } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDedicatedIps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *GetDedicatedIpsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetDedicatedIpsAPIClient is a client that implements the GetDedicatedIps +// operation. +type GetDedicatedIpsAPIClient interface { + GetDedicatedIps(context.Context, *GetDedicatedIpsInput, ...func(*Options)) (*GetDedicatedIpsOutput, error) +} + +var _ GetDedicatedIpsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDedicatedIps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointemail/api_op_GetDeliverabilityDashboardOptions.go b/service/pinpointemail/api_op_GetDeliverabilityDashboardOptions.go index 85319c5ff78..d18e77ca2f0 100644 --- a/service/pinpointemail/api_op_GetDeliverabilityDashboardOptions.go +++ b/service/pinpointemail/api_op_GetDeliverabilityDashboardOptions.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetDeliverabilityDashboardOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeliverabilityDashboardOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetDeliverabilityTestReport.go b/service/pinpointemail/api_op_GetDeliverabilityTestReport.go index f32d2566fc8..ac85eef7bb1 100644 --- a/service/pinpointemail/api_op_GetDeliverabilityTestReport.go +++ b/service/pinpointemail/api_op_GetDeliverabilityTestReport.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetDeliverabilityTestReportMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeliverabilityTestReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetDomainDeliverabilityCampaign.go b/service/pinpointemail/api_op_GetDomainDeliverabilityCampaign.go index 2b0bb30eab9..3a5a3f223fd 100644 --- a/service/pinpointemail/api_op_GetDomainDeliverabilityCampaign.go +++ b/service/pinpointemail/api_op_GetDomainDeliverabilityCampaign.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetDomainDeliverabilityCampaignMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainDeliverabilityCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetDomainStatisticsReport.go b/service/pinpointemail/api_op_GetDomainStatisticsReport.go index e1776afe62c..c63595cdfd3 100644 --- a/service/pinpointemail/api_op_GetDomainStatisticsReport.go +++ b/service/pinpointemail/api_op_GetDomainStatisticsReport.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetDomainStatisticsReportMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainStatisticsReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_GetEmailIdentity.go b/service/pinpointemail/api_op_GetEmailIdentity.go index 8519e3bde24..ce31ba09950 100644 --- a/service/pinpointemail/api_op_GetEmailIdentity.go +++ b/service/pinpointemail/api_op_GetEmailIdentity.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetEmailIdentityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_ListConfigurationSets.go b/service/pinpointemail/api_op_ListConfigurationSets.go index 670d6ec2ad8..c17f26efb1d 100644 --- a/service/pinpointemail/api_op_ListConfigurationSets.go +++ b/service/pinpointemail/api_op_ListConfigurationSets.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationSets(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware. return nil } -// ListConfigurationSetsAPIClient is a client that implements the -// ListConfigurationSets operation. -type ListConfigurationSetsAPIClient interface { - ListConfigurationSets(context.Context, *ListConfigurationSetsInput, ...func(*Options)) (*ListConfigurationSetsOutput, error) -} - -var _ ListConfigurationSetsAPIClient = (*Client)(nil) - // ListConfigurationSetsPaginatorOptions is the paginator options for // ListConfigurationSets type ListConfigurationSetsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListConfigurationSetsPaginator) NextPage(ctx context.Context, optFns .. } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListConfigurationSetsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListConfigurationSetsAPIClient is a client that implements the +// ListConfigurationSets operation. +type ListConfigurationSetsAPIClient interface { + ListConfigurationSets(context.Context, *ListConfigurationSetsInput, ...func(*Options)) (*ListConfigurationSetsOutput, error) +} + +var _ ListConfigurationSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointemail/api_op_ListDedicatedIpPools.go b/service/pinpointemail/api_op_ListDedicatedIpPools.go index f3c2e4c4249..13edf2cec9d 100644 --- a/service/pinpointemail/api_op_ListDedicatedIpPools.go +++ b/service/pinpointemail/api_op_ListDedicatedIpPools.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDedicatedIpPoolsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDedicatedIpPools(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDedicatedIpPoolsMiddlewares(stack *middleware.S return nil } -// ListDedicatedIpPoolsAPIClient is a client that implements the -// ListDedicatedIpPools operation. -type ListDedicatedIpPoolsAPIClient interface { - ListDedicatedIpPools(context.Context, *ListDedicatedIpPoolsInput, ...func(*Options)) (*ListDedicatedIpPoolsOutput, error) -} - -var _ ListDedicatedIpPoolsAPIClient = (*Client)(nil) - // ListDedicatedIpPoolsPaginatorOptions is the paginator options for // ListDedicatedIpPools type ListDedicatedIpPoolsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDedicatedIpPoolsPaginator) NextPage(ctx context.Context, optFns ... } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDedicatedIpPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDedicatedIpPoolsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDedicatedIpPoolsAPIClient is a client that implements the +// ListDedicatedIpPools operation. +type ListDedicatedIpPoolsAPIClient interface { + ListDedicatedIpPools(context.Context, *ListDedicatedIpPoolsInput, ...func(*Options)) (*ListDedicatedIpPoolsOutput, error) +} + +var _ ListDedicatedIpPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDedicatedIpPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointemail/api_op_ListDeliverabilityTestReports.go b/service/pinpointemail/api_op_ListDeliverabilityTestReports.go index 9e722e038d8..a0eb303895f 100644 --- a/service/pinpointemail/api_op_ListDeliverabilityTestReports.go +++ b/service/pinpointemail/api_op_ListDeliverabilityTestReports.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListDeliverabilityTestReportsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeliverabilityTestReports(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListDeliverabilityTestReportsMiddlewares(stack *mid return nil } -// ListDeliverabilityTestReportsAPIClient is a client that implements the -// ListDeliverabilityTestReports operation. -type ListDeliverabilityTestReportsAPIClient interface { - ListDeliverabilityTestReports(context.Context, *ListDeliverabilityTestReportsInput, ...func(*Options)) (*ListDeliverabilityTestReportsOutput, error) -} - -var _ ListDeliverabilityTestReportsAPIClient = (*Client)(nil) - // ListDeliverabilityTestReportsPaginatorOptions is the paginator options for // ListDeliverabilityTestReports type ListDeliverabilityTestReportsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListDeliverabilityTestReportsPaginator) NextPage(ctx context.Context, o } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeliverabilityTestReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListDeliverabilityTestReportsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListDeliverabilityTestReportsAPIClient is a client that implements the +// ListDeliverabilityTestReports operation. +type ListDeliverabilityTestReportsAPIClient interface { + ListDeliverabilityTestReports(context.Context, *ListDeliverabilityTestReportsInput, ...func(*Options)) (*ListDeliverabilityTestReportsOutput, error) +} + +var _ ListDeliverabilityTestReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeliverabilityTestReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go b/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go index addfbba3f70..4634ff47815 100644 --- a/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go +++ b/service/pinpointemail/api_op_ListDomainDeliverabilityCampaigns.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListDomainDeliverabilityCampaignsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainDeliverabilityCampaignsValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListDomainDeliverabilityCampaignsMiddlewares(stack return nil } -// ListDomainDeliverabilityCampaignsAPIClient is a client that implements the -// ListDomainDeliverabilityCampaigns operation. -type ListDomainDeliverabilityCampaignsAPIClient interface { - ListDomainDeliverabilityCampaigns(context.Context, *ListDomainDeliverabilityCampaignsInput, ...func(*Options)) (*ListDomainDeliverabilityCampaignsOutput, error) -} - -var _ ListDomainDeliverabilityCampaignsAPIClient = (*Client)(nil) - // ListDomainDeliverabilityCampaignsPaginatorOptions is the paginator options for // ListDomainDeliverabilityCampaigns type ListDomainDeliverabilityCampaignsPaginatorOptions struct { @@ -251,6 +246,9 @@ func (p *ListDomainDeliverabilityCampaignsPaginator) NextPage(ctx context.Contex } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainDeliverabilityCampaigns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *ListDomainDeliverabilityCampaignsPaginator) NextPage(ctx context.Contex return result, nil } +// ListDomainDeliverabilityCampaignsAPIClient is a client that implements the +// ListDomainDeliverabilityCampaigns operation. +type ListDomainDeliverabilityCampaignsAPIClient interface { + ListDomainDeliverabilityCampaigns(context.Context, *ListDomainDeliverabilityCampaignsInput, ...func(*Options)) (*ListDomainDeliverabilityCampaignsOutput, error) +} + +var _ ListDomainDeliverabilityCampaignsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainDeliverabilityCampaigns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointemail/api_op_ListEmailIdentities.go b/service/pinpointemail/api_op_ListEmailIdentities.go index 081491a59c6..b504c7e51c5 100644 --- a/service/pinpointemail/api_op_ListEmailIdentities.go +++ b/service/pinpointemail/api_op_ListEmailIdentities.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListEmailIdentitiesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEmailIdentities(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListEmailIdentitiesMiddlewares(stack *middleware.St return nil } -// ListEmailIdentitiesAPIClient is a client that implements the -// ListEmailIdentities operation. -type ListEmailIdentitiesAPIClient interface { - ListEmailIdentities(context.Context, *ListEmailIdentitiesInput, ...func(*Options)) (*ListEmailIdentitiesOutput, error) -} - -var _ ListEmailIdentitiesAPIClient = (*Client)(nil) - // ListEmailIdentitiesPaginatorOptions is the paginator options for // ListEmailIdentities type ListEmailIdentitiesPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListEmailIdentitiesPaginator) NextPage(ctx context.Context, optFns ...f } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEmailIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListEmailIdentitiesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEmailIdentitiesAPIClient is a client that implements the +// ListEmailIdentities operation. +type ListEmailIdentitiesAPIClient interface { + ListEmailIdentities(context.Context, *ListEmailIdentitiesInput, ...func(*Options)) (*ListEmailIdentitiesOutput, error) +} + +var _ ListEmailIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEmailIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointemail/api_op_ListTagsForResource.go b/service/pinpointemail/api_op_ListTagsForResource.go index 5685e486bf5..4e4417f610e 100644 --- a/service/pinpointemail/api_op_ListTagsForResource.go +++ b/service/pinpointemail/api_op_ListTagsForResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutAccountDedicatedIpWarmupAttributes.go b/service/pinpointemail/api_op_PutAccountDedicatedIpWarmupAttributes.go index 1f518f84e62..0940a6e735d 100644 --- a/service/pinpointemail/api_op_PutAccountDedicatedIpWarmupAttributes.go +++ b/service/pinpointemail/api_op_PutAccountDedicatedIpWarmupAttributes.go @@ -105,6 +105,9 @@ func (c *Client) addOperationPutAccountDedicatedIpWarmupAttributesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountDedicatedIpWarmupAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutAccountSendingAttributes.go b/service/pinpointemail/api_op_PutAccountSendingAttributes.go index c5400b10d11..c883be6bfc9 100644 --- a/service/pinpointemail/api_op_PutAccountSendingAttributes.go +++ b/service/pinpointemail/api_op_PutAccountSendingAttributes.go @@ -106,6 +106,9 @@ func (c *Client) addOperationPutAccountSendingAttributesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountSendingAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutConfigurationSetDeliveryOptions.go b/service/pinpointemail/api_op_PutConfigurationSetDeliveryOptions.go index 8e2f5103cd2..582fd2aa2f1 100644 --- a/service/pinpointemail/api_op_PutConfigurationSetDeliveryOptions.go +++ b/service/pinpointemail/api_op_PutConfigurationSetDeliveryOptions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutConfigurationSetDeliveryOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetDeliveryOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutConfigurationSetReputationOptions.go b/service/pinpointemail/api_op_PutConfigurationSetReputationOptions.go index b57f6d5d734..d629150688a 100644 --- a/service/pinpointemail/api_op_PutConfigurationSetReputationOptions.go +++ b/service/pinpointemail/api_op_PutConfigurationSetReputationOptions.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutConfigurationSetReputationOptionsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetReputationOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutConfigurationSetSendingOptions.go b/service/pinpointemail/api_op_PutConfigurationSetSendingOptions.go index 3215d55d898..76545c97bf1 100644 --- a/service/pinpointemail/api_op_PutConfigurationSetSendingOptions.go +++ b/service/pinpointemail/api_op_PutConfigurationSetSendingOptions.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutConfigurationSetSendingOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetSendingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutConfigurationSetTrackingOptions.go b/service/pinpointemail/api_op_PutConfigurationSetTrackingOptions.go index b1c75c3d20e..ab922da678d 100644 --- a/service/pinpointemail/api_op_PutConfigurationSetTrackingOptions.go +++ b/service/pinpointemail/api_op_PutConfigurationSetTrackingOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutConfigurationSetTrackingOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutDedicatedIpInPool.go b/service/pinpointemail/api_op_PutDedicatedIpInPool.go index 094da9938f0..f72c22c7671 100644 --- a/service/pinpointemail/api_op_PutDedicatedIpInPool.go +++ b/service/pinpointemail/api_op_PutDedicatedIpInPool.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutDedicatedIpInPoolMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDedicatedIpInPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go b/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go index 1572eaf6e32..596aa94b6ff 100644 --- a/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go +++ b/service/pinpointemail/api_op_PutDedicatedIpWarmupAttributes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutDedicatedIpWarmupAttributesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDedicatedIpWarmupAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutDeliverabilityDashboardOption.go b/service/pinpointemail/api_op_PutDeliverabilityDashboardOption.go index 7191cf97c6b..8c24fd5d918 100644 --- a/service/pinpointemail/api_op_PutDeliverabilityDashboardOption.go +++ b/service/pinpointemail/api_op_PutDeliverabilityDashboardOption.go @@ -132,6 +132,9 @@ func (c *Client) addOperationPutDeliverabilityDashboardOptionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDeliverabilityDashboardOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutEmailIdentityDkimAttributes.go b/service/pinpointemail/api_op_PutEmailIdentityDkimAttributes.go index eb3f6ced814..bdb2dc4a3e2 100644 --- a/service/pinpointemail/api_op_PutEmailIdentityDkimAttributes.go +++ b/service/pinpointemail/api_op_PutEmailIdentityDkimAttributes.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutEmailIdentityDkimAttributesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityDkimAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutEmailIdentityFeedbackAttributes.go b/service/pinpointemail/api_op_PutEmailIdentityFeedbackAttributes.go index ac523437a24..7012ee4210c 100644 --- a/service/pinpointemail/api_op_PutEmailIdentityFeedbackAttributes.go +++ b/service/pinpointemail/api_op_PutEmailIdentityFeedbackAttributes.go @@ -134,6 +134,9 @@ func (c *Client) addOperationPutEmailIdentityFeedbackAttributesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityFeedbackAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_PutEmailIdentityMailFromAttributes.go b/service/pinpointemail/api_op_PutEmailIdentityMailFromAttributes.go index 415c8b3a2bd..63a59d985a6 100644 --- a/service/pinpointemail/api_op_PutEmailIdentityMailFromAttributes.go +++ b/service/pinpointemail/api_op_PutEmailIdentityMailFromAttributes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPutEmailIdentityMailFromAttributesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityMailFromAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_SendEmail.go b/service/pinpointemail/api_op_SendEmail.go index 7c7bdfc9c12..20bd9db6022 100644 --- a/service/pinpointemail/api_op_SendEmail.go +++ b/service/pinpointemail/api_op_SendEmail.go @@ -151,6 +151,9 @@ func (c *Client) addOperationSendEmailMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_TagResource.go b/service/pinpointemail/api_op_TagResource.go index d9831a316a9..2875f7e248d 100644 --- a/service/pinpointemail/api_op_TagResource.go +++ b/service/pinpointemail/api_op_TagResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_UntagResource.go b/service/pinpointemail/api_op_UntagResource.go index cdd140e2427..5d14370930c 100644 --- a/service/pinpointemail/api_op_UntagResource.go +++ b/service/pinpointemail/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointemail/api_op_UpdateConfigurationSetEventDestination.go b/service/pinpointemail/api_op_UpdateConfigurationSetEventDestination.go index 0a3628a8ab1..5612258927c 100644 --- a/service/pinpointemail/api_op_UpdateConfigurationSetEventDestination.go +++ b/service/pinpointemail/api_op_UpdateConfigurationSetEventDestination.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_client.go b/service/pinpointsmsvoice/api_client.go index 552b5815d31..6fe49eb677f 100644 --- a/service/pinpointsmsvoice/api_client.go +++ b/service/pinpointsmsvoice/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/pinpointsmsvoice/api_op_CreateConfigurationSet.go b/service/pinpointsmsvoice/api_op_CreateConfigurationSet.go index 23a888cc52f..5b317da2c8f 100644 --- a/service/pinpointsmsvoice/api_op_CreateConfigurationSet.go +++ b/service/pinpointsmsvoice/api_op_CreateConfigurationSet.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCreateConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConfigurationSet(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_CreateConfigurationSetEventDestination.go b/service/pinpointsmsvoice/api_op_CreateConfigurationSetEventDestination.go index 0c9b983c42c..ee7593b536c 100644 --- a/service/pinpointsmsvoice/api_op_CreateConfigurationSetEventDestination.go +++ b/service/pinpointsmsvoice/api_op_CreateConfigurationSetEventDestination.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_DeleteConfigurationSet.go b/service/pinpointsmsvoice/api_op_DeleteConfigurationSet.go index 74c99e33bec..73451ad98c9 100644 --- a/service/pinpointsmsvoice/api_op_DeleteConfigurationSet.go +++ b/service/pinpointsmsvoice/api_op_DeleteConfigurationSet.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_DeleteConfigurationSetEventDestination.go b/service/pinpointsmsvoice/api_op_DeleteConfigurationSetEventDestination.go index dd0d43727a8..5d07e963fa3 100644 --- a/service/pinpointsmsvoice/api_op_DeleteConfigurationSetEventDestination.go +++ b/service/pinpointsmsvoice/api_op_DeleteConfigurationSetEventDestination.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_GetConfigurationSetEventDestinations.go b/service/pinpointsmsvoice/api_op_GetConfigurationSetEventDestinations.go index b786071776f..0c931af8efe 100644 --- a/service/pinpointsmsvoice/api_op_GetConfigurationSetEventDestinations.go +++ b/service/pinpointsmsvoice/api_op_GetConfigurationSetEventDestinations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetConfigurationSetEventDestinationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationSetEventDestinationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_ListConfigurationSets.go b/service/pinpointsmsvoice/api_op_ListConfigurationSets.go index ed0dd07f064..3257913544d 100644 --- a/service/pinpointsmsvoice/api_op_ListConfigurationSets.go +++ b/service/pinpointsmsvoice/api_op_ListConfigurationSets.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_SendVoiceMessage.go b/service/pinpointsmsvoice/api_op_SendVoiceMessage.go index 30716ff56f5..c1ab57f2529 100644 --- a/service/pinpointsmsvoice/api_op_SendVoiceMessage.go +++ b/service/pinpointsmsvoice/api_op_SendVoiceMessage.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSendVoiceMessageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendVoiceMessage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoice/api_op_UpdateConfigurationSetEventDestination.go b/service/pinpointsmsvoice/api_op_UpdateConfigurationSetEventDestination.go index f74a9551024..3674dec884d 100644 --- a/service/pinpointsmsvoice/api_op_UpdateConfigurationSetEventDestination.go +++ b/service/pinpointsmsvoice/api_op_UpdateConfigurationSetEventDestination.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_client.go b/service/pinpointsmsvoicev2/api_client.go index 26700f4aa73..84c6fc14ea8 100644 --- a/service/pinpointsmsvoicev2/api_client.go +++ b/service/pinpointsmsvoicev2/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/pinpointsmsvoicev2/api_op_AssociateOriginationIdentity.go b/service/pinpointsmsvoicev2/api_op_AssociateOriginationIdentity.go index 4b4e77aab2e..81e1db2176e 100644 --- a/service/pinpointsmsvoicev2/api_op_AssociateOriginationIdentity.go +++ b/service/pinpointsmsvoicev2/api_op_AssociateOriginationIdentity.go @@ -146,6 +146,9 @@ func (c *Client) addOperationAssociateOriginationIdentityMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateOriginationIdentityMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go index 0bfba36ad0d..d08518217bd 100644 --- a/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_AssociateProtectConfiguration.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAssociateProtectConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateProtectConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateConfigurationSet.go b/service/pinpointsmsvoicev2/api_op_CreateConfigurationSet.go index b345ddd3e66..32dfa67a607 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateConfigurationSet.go +++ b/service/pinpointsmsvoicev2/api_op_CreateConfigurationSet.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConfigurationSetMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go b/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go index 8f716696f9f..1721e1f8734 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go +++ b/service/pinpointsmsvoicev2/api_op_CreateEventDestination.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateEventDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEventDestinationMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateOptOutList.go b/service/pinpointsmsvoicev2/api_op_CreateOptOutList.go index 0511adf2980..8f6298fcf9f 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateOptOutList.go +++ b/service/pinpointsmsvoicev2/api_op_CreateOptOutList.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateOptOutListMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateOptOutListMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreatePool.go b/service/pinpointsmsvoicev2/api_op_CreatePool.go index 68d397101bf..792fe6fb45a 100644 --- a/service/pinpointsmsvoicev2/api_op_CreatePool.go +++ b/service/pinpointsmsvoicev2/api_op_CreatePool.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreatePoolMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePoolMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go index b0e076dd57f..df1a96562d8 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_CreateProtectConfiguration.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateProtectConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProtectConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateRegistration.go b/service/pinpointsmsvoicev2/api_op_CreateRegistration.go index 93b06fe1324..4f3f5a7adc8 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateRegistration.go +++ b/service/pinpointsmsvoicev2/api_op_CreateRegistration.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateRegistrationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRegistrationMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateRegistrationAssociation.go b/service/pinpointsmsvoicev2/api_op_CreateRegistrationAssociation.go index 791c8d37fa3..c456093b1a8 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateRegistrationAssociation.go +++ b/service/pinpointsmsvoicev2/api_op_CreateRegistrationAssociation.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateRegistrationAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegistrationAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateRegistrationAttachment.go b/service/pinpointsmsvoicev2/api_op_CreateRegistrationAttachment.go index c6b34464c4e..ee50ae330d7 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateRegistrationAttachment.go +++ b/service/pinpointsmsvoicev2/api_op_CreateRegistrationAttachment.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateRegistrationAttachmentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRegistrationAttachmentMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateRegistrationVersion.go b/service/pinpointsmsvoicev2/api_op_CreateRegistrationVersion.go index dd792eb6637..1e3bceec4a5 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateRegistrationVersion.go +++ b/service/pinpointsmsvoicev2/api_op_CreateRegistrationVersion.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateRegistrationVersionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegistrationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_CreateVerifiedDestinationNumber.go b/service/pinpointsmsvoicev2/api_op_CreateVerifiedDestinationNumber.go index ad834548cf1..fac2f5a5649 100644 --- a/service/pinpointsmsvoicev2/api_op_CreateVerifiedDestinationNumber.go +++ b/service/pinpointsmsvoicev2/api_op_CreateVerifiedDestinationNumber.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateVerifiedDestinationNumberMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateVerifiedDestinationNumberMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go index 97c8e979aa5..d59e51bf13a 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteAccountDefaultProtectConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteAccountDefaultProtectConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountDefaultProtectConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteConfigurationSet.go b/service/pinpointsmsvoicev2/api_op_DeleteConfigurationSet.go index f0b568881f1..a5b76730d04 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteConfigurationSet.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteConfigurationSet.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteDefaultMessageType.go b/service/pinpointsmsvoicev2/api_op_DeleteDefaultMessageType.go index 8d665fcc2ea..0fea04fffd8 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteDefaultMessageType.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteDefaultMessageType.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteDefaultMessageTypeMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDefaultMessageTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteDefaultSenderId.go b/service/pinpointsmsvoicev2/api_op_DeleteDefaultSenderId.go index 8aaccf73f31..dc3dfdd12f4 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteDefaultSenderId.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteDefaultSenderId.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteDefaultSenderIdMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDefaultSenderIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteEventDestination.go b/service/pinpointsmsvoicev2/api_op_DeleteEventDestination.go index c335106e55b..997911c1670 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteEventDestination.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteEventDestination.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteEventDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteKeyword.go b/service/pinpointsmsvoicev2/api_op_DeleteKeyword.go index aedbcf4912f..52ab5cd4373 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteKeyword.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteKeyword.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteKeywordMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeywordValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go index fbe6ec0a68d..4a52c69c4ff 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteMediaMessageSpendLimitOverride.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteMediaMessageSpendLimitOverrideMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMediaMessageSpendLimitOverride(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteOptOutList.go b/service/pinpointsmsvoicev2/api_op_DeleteOptOutList.go index f49ee7f433c..eb42cb12c68 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteOptOutList.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteOptOutList.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteOptOutListMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOptOutListValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteOptedOutNumber.go b/service/pinpointsmsvoicev2/api_op_DeleteOptedOutNumber.go index dbf7324aadc..7f4da383062 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteOptedOutNumber.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteOptedOutNumber.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteOptedOutNumberMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOptedOutNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeletePool.go b/service/pinpointsmsvoicev2/api_op_DeletePool.go index a08c06c11cb..c7843d22b69 100644 --- a/service/pinpointsmsvoicev2/api_op_DeletePool.go +++ b/service/pinpointsmsvoicev2/api_op_DeletePool.go @@ -162,6 +162,9 @@ func (c *Client) addOperationDeletePoolMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go index 6776125db26..33a6cd372d8 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteProtectConfiguration.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteProtectConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProtectConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteRegistration.go b/service/pinpointsmsvoicev2/api_op_DeleteRegistration.go index 2b6fb08e0d4..3759653a469 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteRegistration.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteRegistration.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDeleteRegistrationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteRegistrationAttachment.go b/service/pinpointsmsvoicev2/api_op_DeleteRegistrationAttachment.go index 749eefd5f23..b9bc0a4165a 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteRegistrationAttachment.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteRegistrationAttachment.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDeleteRegistrationAttachmentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegistrationAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteRegistrationFieldValue.go b/service/pinpointsmsvoicev2/api_op_DeleteRegistrationFieldValue.go index f14eaf58b97..42c7df31eda 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteRegistrationFieldValue.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteRegistrationFieldValue.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteRegistrationFieldValueMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegistrationFieldValueValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteTextMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_DeleteTextMessageSpendLimitOverride.go index 0f6da157793..aa645d6f11d 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteTextMessageSpendLimitOverride.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteTextMessageSpendLimitOverride.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteTextMessageSpendLimitOverrideMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTextMessageSpendLimitOverride(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteVerifiedDestinationNumber.go b/service/pinpointsmsvoicev2/api_op_DeleteVerifiedDestinationNumber.go index ddb347812dc..578bcf2b4fc 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteVerifiedDestinationNumber.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteVerifiedDestinationNumber.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteVerifiedDestinationNumberMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVerifiedDestinationNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DeleteVoiceMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_DeleteVoiceMessageSpendLimitOverride.go index d5abf8419de..3cf00f486d0 100644 --- a/service/pinpointsmsvoicev2/api_op_DeleteVoiceMessageSpendLimitOverride.go +++ b/service/pinpointsmsvoicev2/api_op_DeleteVoiceMessageSpendLimitOverride.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteVoiceMessageSpendLimitOverrideMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceMessageSpendLimitOverride(options.Region), middleware.Before); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DescribeAccountAttributes.go b/service/pinpointsmsvoicev2/api_op_DescribeAccountAttributes.go index 4cf11335b22..9aa44a205b8 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeAccountAttributes.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeAccountAttributes.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew return nil } -// DescribeAccountAttributesAPIClient is a client that implements the -// DescribeAccountAttributes operation. -type DescribeAccountAttributesAPIClient interface { - DescribeAccountAttributes(context.Context, *DescribeAccountAttributesInput, ...func(*Options)) (*DescribeAccountAttributesOutput, error) -} - -var _ DescribeAccountAttributesAPIClient = (*Client)(nil) - // DescribeAccountAttributesPaginatorOptions is the paginator options for // DescribeAccountAttributes type DescribeAccountAttributesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *DescribeAccountAttributesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAccountAttributes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeAccountAttributesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeAccountAttributesAPIClient is a client that implements the +// DescribeAccountAttributes operation. +type DescribeAccountAttributesAPIClient interface { + DescribeAccountAttributes(context.Context, *DescribeAccountAttributesInput, ...func(*Options)) (*DescribeAccountAttributesOutput, error) +} + +var _ DescribeAccountAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAccountAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeAccountLimits.go b/service/pinpointsmsvoicev2/api_op_DescribeAccountLimits.go index ee32a1fd79e..6e42f02a065 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeAccountLimits.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeAccountLimits.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountLimits(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeAccountLimitsMiddlewares(stack *middleware. return nil } -// DescribeAccountLimitsAPIClient is a client that implements the -// DescribeAccountLimits operation. -type DescribeAccountLimitsAPIClient interface { - DescribeAccountLimits(context.Context, *DescribeAccountLimitsInput, ...func(*Options)) (*DescribeAccountLimitsOutput, error) -} - -var _ DescribeAccountLimitsAPIClient = (*Client)(nil) - // DescribeAccountLimitsPaginatorOptions is the paginator options for // DescribeAccountLimits type DescribeAccountLimitsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *DescribeAccountLimitsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAccountLimits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeAccountLimitsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeAccountLimitsAPIClient is a client that implements the +// DescribeAccountLimits operation. +type DescribeAccountLimitsAPIClient interface { + DescribeAccountLimits(context.Context, *DescribeAccountLimitsInput, ...func(*Options)) (*DescribeAccountLimitsOutput, error) +} + +var _ DescribeAccountLimitsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAccountLimits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeConfigurationSets.go b/service/pinpointsmsvoicev2/api_op_DescribeConfigurationSets.go index d465109eb16..fa78dbec04d 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeConfigurationSets.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeConfigurationSets.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeConfigurationSetsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationSetsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeConfigurationSetsMiddlewares(stack *middlew return nil } -// DescribeConfigurationSetsAPIClient is a client that implements the -// DescribeConfigurationSets operation. -type DescribeConfigurationSetsAPIClient interface { - DescribeConfigurationSets(context.Context, *DescribeConfigurationSetsInput, ...func(*Options)) (*DescribeConfigurationSetsOutput, error) -} - -var _ DescribeConfigurationSetsAPIClient = (*Client)(nil) - // DescribeConfigurationSetsPaginatorOptions is the paginator options for // DescribeConfigurationSets type DescribeConfigurationSetsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeConfigurationSetsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeConfigurationSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeConfigurationSetsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeConfigurationSetsAPIClient is a client that implements the +// DescribeConfigurationSets operation. +type DescribeConfigurationSetsAPIClient interface { + DescribeConfigurationSets(context.Context, *DescribeConfigurationSetsInput, ...func(*Options)) (*DescribeConfigurationSetsOutput, error) +} + +var _ DescribeConfigurationSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeConfigurationSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeKeywords.go b/service/pinpointsmsvoicev2/api_op_DescribeKeywords.go index 1a4cc08b9fd..d0e1448986b 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeKeywords.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeKeywords.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeKeywordsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKeywordsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeKeywordsMiddlewares(stack *middleware.Stack return nil } -// DescribeKeywordsAPIClient is a client that implements the DescribeKeywords -// operation. -type DescribeKeywordsAPIClient interface { - DescribeKeywords(context.Context, *DescribeKeywordsInput, ...func(*Options)) (*DescribeKeywordsOutput, error) -} - -var _ DescribeKeywordsAPIClient = (*Client)(nil) - // DescribeKeywordsPaginatorOptions is the paginator options for DescribeKeywords type DescribeKeywordsPaginatorOptions struct { // The maximum number of results to return per each request. @@ -235,6 +230,9 @@ func (p *DescribeKeywordsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeKeywords(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeKeywordsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeKeywordsAPIClient is a client that implements the DescribeKeywords +// operation. +type DescribeKeywordsAPIClient interface { + DescribeKeywords(context.Context, *DescribeKeywordsInput, ...func(*Options)) (*DescribeKeywordsOutput, error) +} + +var _ DescribeKeywordsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeKeywords(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeOptOutLists.go b/service/pinpointsmsvoicev2/api_op_DescribeOptOutLists.go index ac95807626b..3b17ec2ffe9 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeOptOutLists.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeOptOutLists.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeOptOutListsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOptOutLists(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeOptOutListsMiddlewares(stack *middleware.St return nil } -// DescribeOptOutListsAPIClient is a client that implements the -// DescribeOptOutLists operation. -type DescribeOptOutListsAPIClient interface { - DescribeOptOutLists(context.Context, *DescribeOptOutListsInput, ...func(*Options)) (*DescribeOptOutListsOutput, error) -} - -var _ DescribeOptOutListsAPIClient = (*Client)(nil) - // DescribeOptOutListsPaginatorOptions is the paginator options for // DescribeOptOutLists type DescribeOptOutListsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeOptOutListsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOptOutLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeOptOutListsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeOptOutListsAPIClient is a client that implements the +// DescribeOptOutLists operation. +type DescribeOptOutListsAPIClient interface { + DescribeOptOutLists(context.Context, *DescribeOptOutListsInput, ...func(*Options)) (*DescribeOptOutListsOutput, error) +} + +var _ DescribeOptOutListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOptOutLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeOptedOutNumbers.go b/service/pinpointsmsvoicev2/api_op_DescribeOptedOutNumbers.go index 7bebe7f587b..c1a0488a1e5 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeOptedOutNumbers.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeOptedOutNumbers.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeOptedOutNumbersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOptedOutNumbersValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeOptedOutNumbersMiddlewares(stack *middlewar return nil } -// DescribeOptedOutNumbersAPIClient is a client that implements the -// DescribeOptedOutNumbers operation. -type DescribeOptedOutNumbersAPIClient interface { - DescribeOptedOutNumbers(context.Context, *DescribeOptedOutNumbersInput, ...func(*Options)) (*DescribeOptedOutNumbersOutput, error) -} - -var _ DescribeOptedOutNumbersAPIClient = (*Client)(nil) - // DescribeOptedOutNumbersPaginatorOptions is the paginator options for // DescribeOptedOutNumbers type DescribeOptedOutNumbersPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeOptedOutNumbersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOptedOutNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeOptedOutNumbersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeOptedOutNumbersAPIClient is a client that implements the +// DescribeOptedOutNumbers operation. +type DescribeOptedOutNumbersAPIClient interface { + DescribeOptedOutNumbers(context.Context, *DescribeOptedOutNumbersInput, ...func(*Options)) (*DescribeOptedOutNumbersOutput, error) +} + +var _ DescribeOptedOutNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOptedOutNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribePhoneNumbers.go b/service/pinpointsmsvoicev2/api_op_DescribePhoneNumbers.go index 15ed015ca9a..4bb53c90e35 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribePhoneNumbers.go +++ b/service/pinpointsmsvoicev2/api_op_DescribePhoneNumbers.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribePhoneNumbersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePhoneNumbersValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationDescribePhoneNumbersMiddlewares(stack *middleware.S return nil } -// DescribePhoneNumbersAPIClient is a client that implements the -// DescribePhoneNumbers operation. -type DescribePhoneNumbersAPIClient interface { - DescribePhoneNumbers(context.Context, *DescribePhoneNumbersInput, ...func(*Options)) (*DescribePhoneNumbersOutput, error) -} - -var _ DescribePhoneNumbersAPIClient = (*Client)(nil) - // DescribePhoneNumbersPaginatorOptions is the paginator options for // DescribePhoneNumbers type DescribePhoneNumbersPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribePhoneNumbersPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribePhoneNumbersPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribePhoneNumbersAPIClient is a client that implements the +// DescribePhoneNumbers operation. +type DescribePhoneNumbersAPIClient interface { + DescribePhoneNumbers(context.Context, *DescribePhoneNumbersInput, ...func(*Options)) (*DescribePhoneNumbersOutput, error) +} + +var _ DescribePhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribePools.go b/service/pinpointsmsvoicev2/api_op_DescribePools.go index e15158a2484..e06ab46abce 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribePools.go +++ b/service/pinpointsmsvoicev2/api_op_DescribePools.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribePoolsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePoolsValidationMiddleware(stack); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationDescribePoolsMiddlewares(stack *middleware.Stack, o return nil } -// DescribePoolsAPIClient is a client that implements the DescribePools operation. -type DescribePoolsAPIClient interface { - DescribePools(context.Context, *DescribePoolsInput, ...func(*Options)) (*DescribePoolsOutput, error) -} - -var _ DescribePoolsAPIClient = (*Client)(nil) - // DescribePoolsPaginatorOptions is the paginator options for DescribePools type DescribePoolsPaginatorOptions struct { // The maximum number of results to return per each request. @@ -226,6 +222,9 @@ func (p *DescribePoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *DescribePoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribePoolsAPIClient is a client that implements the DescribePools operation. +type DescribePoolsAPIClient interface { + DescribePools(context.Context, *DescribePoolsInput, ...func(*Options)) (*DescribePoolsOutput, error) +} + +var _ DescribePoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go b/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go index 9f872ebe365..1f122ce81f8 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeProtectConfigurations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeProtectConfigurationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProtectConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeProtectConfigurationsMiddlewares(stack *mid return nil } -// DescribeProtectConfigurationsAPIClient is a client that implements the -// DescribeProtectConfigurations operation. -type DescribeProtectConfigurationsAPIClient interface { - DescribeProtectConfigurations(context.Context, *DescribeProtectConfigurationsInput, ...func(*Options)) (*DescribeProtectConfigurationsOutput, error) -} - -var _ DescribeProtectConfigurationsAPIClient = (*Client)(nil) - // DescribeProtectConfigurationsPaginatorOptions is the paginator options for // DescribeProtectConfigurations type DescribeProtectConfigurationsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *DescribeProtectConfigurationsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeProtectConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeProtectConfigurationsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeProtectConfigurationsAPIClient is a client that implements the +// DescribeProtectConfigurations operation. +type DescribeProtectConfigurationsAPIClient interface { + DescribeProtectConfigurations(context.Context, *DescribeProtectConfigurationsInput, ...func(*Options)) (*DescribeProtectConfigurationsOutput, error) +} + +var _ DescribeProtectConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeProtectConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationAttachments.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationAttachments.go index 7ddaa6b2351..e5ea0d850b2 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationAttachments.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationAttachments.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeRegistrationAttachmentsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationAttachmentsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeRegistrationAttachmentsMiddlewares(stack *m return nil } -// DescribeRegistrationAttachmentsAPIClient is a client that implements the -// DescribeRegistrationAttachments operation. -type DescribeRegistrationAttachmentsAPIClient interface { - DescribeRegistrationAttachments(context.Context, *DescribeRegistrationAttachmentsInput, ...func(*Options)) (*DescribeRegistrationAttachmentsOutput, error) -} - -var _ DescribeRegistrationAttachmentsAPIClient = (*Client)(nil) - // DescribeRegistrationAttachmentsPaginatorOptions is the paginator options for // DescribeRegistrationAttachments type DescribeRegistrationAttachmentsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeRegistrationAttachmentsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrationAttachments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeRegistrationAttachmentsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeRegistrationAttachmentsAPIClient is a client that implements the +// DescribeRegistrationAttachments operation. +type DescribeRegistrationAttachmentsAPIClient interface { + DescribeRegistrationAttachments(context.Context, *DescribeRegistrationAttachmentsInput, ...func(*Options)) (*DescribeRegistrationAttachmentsOutput, error) +} + +var _ DescribeRegistrationAttachmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrationAttachments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldDefinitions.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldDefinitions.go index 83adaa241a9..a3f36788562 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldDefinitions.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldDefinitions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeRegistrationFieldDefinitionsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationFieldDefinitionsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeRegistrationFieldDefinitionsMiddlewares(sta return nil } -// DescribeRegistrationFieldDefinitionsAPIClient is a client that implements the -// DescribeRegistrationFieldDefinitions operation. -type DescribeRegistrationFieldDefinitionsAPIClient interface { - DescribeRegistrationFieldDefinitions(context.Context, *DescribeRegistrationFieldDefinitionsInput, ...func(*Options)) (*DescribeRegistrationFieldDefinitionsOutput, error) -} - -var _ DescribeRegistrationFieldDefinitionsAPIClient = (*Client)(nil) - // DescribeRegistrationFieldDefinitionsPaginatorOptions is the paginator options // for DescribeRegistrationFieldDefinitions type DescribeRegistrationFieldDefinitionsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeRegistrationFieldDefinitionsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrationFieldDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeRegistrationFieldDefinitionsPaginator) NextPage(ctx context.Con return result, nil } +// DescribeRegistrationFieldDefinitionsAPIClient is a client that implements the +// DescribeRegistrationFieldDefinitions operation. +type DescribeRegistrationFieldDefinitionsAPIClient interface { + DescribeRegistrationFieldDefinitions(context.Context, *DescribeRegistrationFieldDefinitionsInput, ...func(*Options)) (*DescribeRegistrationFieldDefinitionsOutput, error) +} + +var _ DescribeRegistrationFieldDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrationFieldDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldValues.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldValues.go index f6c23aa073b..c4ee976154c 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldValues.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationFieldValues.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeRegistrationFieldValuesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationFieldValuesValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationDescribeRegistrationFieldValuesMiddlewares(stack *m return nil } -// DescribeRegistrationFieldValuesAPIClient is a client that implements the -// DescribeRegistrationFieldValues operation. -type DescribeRegistrationFieldValuesAPIClient interface { - DescribeRegistrationFieldValues(context.Context, *DescribeRegistrationFieldValuesInput, ...func(*Options)) (*DescribeRegistrationFieldValuesOutput, error) -} - -var _ DescribeRegistrationFieldValuesAPIClient = (*Client)(nil) - // DescribeRegistrationFieldValuesPaginatorOptions is the paginator options for // DescribeRegistrationFieldValues type DescribeRegistrationFieldValuesPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeRegistrationFieldValuesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrationFieldValues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeRegistrationFieldValuesPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeRegistrationFieldValuesAPIClient is a client that implements the +// DescribeRegistrationFieldValues operation. +type DescribeRegistrationFieldValuesAPIClient interface { + DescribeRegistrationFieldValues(context.Context, *DescribeRegistrationFieldValuesInput, ...func(*Options)) (*DescribeRegistrationFieldValuesOutput, error) +} + +var _ DescribeRegistrationFieldValuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrationFieldValues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationSectionDefinitions.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationSectionDefinitions.go index a2ea41222db..afb6bdcf5bd 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationSectionDefinitions.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationSectionDefinitions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeRegistrationSectionDefinitionsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationSectionDefinitionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeRegistrationSectionDefinitionsMiddlewares(s return nil } -// DescribeRegistrationSectionDefinitionsAPIClient is a client that implements the -// DescribeRegistrationSectionDefinitions operation. -type DescribeRegistrationSectionDefinitionsAPIClient interface { - DescribeRegistrationSectionDefinitions(context.Context, *DescribeRegistrationSectionDefinitionsInput, ...func(*Options)) (*DescribeRegistrationSectionDefinitionsOutput, error) -} - -var _ DescribeRegistrationSectionDefinitionsAPIClient = (*Client)(nil) - // DescribeRegistrationSectionDefinitionsPaginatorOptions is the paginator options // for DescribeRegistrationSectionDefinitions type DescribeRegistrationSectionDefinitionsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeRegistrationSectionDefinitionsPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrationSectionDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeRegistrationSectionDefinitionsPaginator) NextPage(ctx context.C return result, nil } +// DescribeRegistrationSectionDefinitionsAPIClient is a client that implements the +// DescribeRegistrationSectionDefinitions operation. +type DescribeRegistrationSectionDefinitionsAPIClient interface { + DescribeRegistrationSectionDefinitions(context.Context, *DescribeRegistrationSectionDefinitionsInput, ...func(*Options)) (*DescribeRegistrationSectionDefinitionsOutput, error) +} + +var _ DescribeRegistrationSectionDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrationSectionDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationTypeDefinitions.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationTypeDefinitions.go index 7b254a17201..63fac514dae 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationTypeDefinitions.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationTypeDefinitions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeRegistrationTypeDefinitionsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationTypeDefinitionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeRegistrationTypeDefinitionsMiddlewares(stac return nil } -// DescribeRegistrationTypeDefinitionsAPIClient is a client that implements the -// DescribeRegistrationTypeDefinitions operation. -type DescribeRegistrationTypeDefinitionsAPIClient interface { - DescribeRegistrationTypeDefinitions(context.Context, *DescribeRegistrationTypeDefinitionsInput, ...func(*Options)) (*DescribeRegistrationTypeDefinitionsOutput, error) -} - -var _ DescribeRegistrationTypeDefinitionsAPIClient = (*Client)(nil) - // DescribeRegistrationTypeDefinitionsPaginatorOptions is the paginator options // for DescribeRegistrationTypeDefinitions type DescribeRegistrationTypeDefinitionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeRegistrationTypeDefinitionsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrationTypeDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeRegistrationTypeDefinitionsPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeRegistrationTypeDefinitionsAPIClient is a client that implements the +// DescribeRegistrationTypeDefinitions operation. +type DescribeRegistrationTypeDefinitionsAPIClient interface { + DescribeRegistrationTypeDefinitions(context.Context, *DescribeRegistrationTypeDefinitionsInput, ...func(*Options)) (*DescribeRegistrationTypeDefinitionsOutput, error) +} + +var _ DescribeRegistrationTypeDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrationTypeDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationVersions.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationVersions.go index 7027000b4b7..5795addf2a8 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrationVersions.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrationVersions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeRegistrationVersionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationVersionsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeRegistrationVersionsMiddlewares(stack *midd return nil } -// DescribeRegistrationVersionsAPIClient is a client that implements the -// DescribeRegistrationVersions operation. -type DescribeRegistrationVersionsAPIClient interface { - DescribeRegistrationVersions(context.Context, *DescribeRegistrationVersionsInput, ...func(*Options)) (*DescribeRegistrationVersionsOutput, error) -} - -var _ DescribeRegistrationVersionsAPIClient = (*Client)(nil) - // DescribeRegistrationVersionsPaginatorOptions is the paginator options for // DescribeRegistrationVersions type DescribeRegistrationVersionsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeRegistrationVersionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrationVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeRegistrationVersionsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeRegistrationVersionsAPIClient is a client that implements the +// DescribeRegistrationVersions operation. +type DescribeRegistrationVersionsAPIClient interface { + DescribeRegistrationVersions(context.Context, *DescribeRegistrationVersionsInput, ...func(*Options)) (*DescribeRegistrationVersionsOutput, error) +} + +var _ DescribeRegistrationVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeRegistrations.go b/service/pinpointsmsvoicev2/api_op_DescribeRegistrations.go index b2dd052ae6f..0cb504111bf 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeRegistrations.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeRegistrations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeRegistrationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistrationsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeRegistrationsMiddlewares(stack *middleware. return nil } -// DescribeRegistrationsAPIClient is a client that implements the -// DescribeRegistrations operation. -type DescribeRegistrationsAPIClient interface { - DescribeRegistrations(context.Context, *DescribeRegistrationsInput, ...func(*Options)) (*DescribeRegistrationsOutput, error) -} - -var _ DescribeRegistrationsAPIClient = (*Client)(nil) - // DescribeRegistrationsPaginatorOptions is the paginator options for // DescribeRegistrations type DescribeRegistrationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeRegistrationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRegistrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeRegistrationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeRegistrationsAPIClient is a client that implements the +// DescribeRegistrations operation. +type DescribeRegistrationsAPIClient interface { + DescribeRegistrations(context.Context, *DescribeRegistrationsInput, ...func(*Options)) (*DescribeRegistrationsOutput, error) +} + +var _ DescribeRegistrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRegistrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeSenderIds.go b/service/pinpointsmsvoicev2/api_op_DescribeSenderIds.go index 54ba644f9fc..d06b759d11a 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeSenderIds.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeSenderIds.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeSenderIdsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSenderIdsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeSenderIdsMiddlewares(stack *middleware.Stac return nil } -// DescribeSenderIdsAPIClient is a client that implements the DescribeSenderIds -// operation. -type DescribeSenderIdsAPIClient interface { - DescribeSenderIds(context.Context, *DescribeSenderIdsInput, ...func(*Options)) (*DescribeSenderIdsOutput, error) -} - -var _ DescribeSenderIdsAPIClient = (*Client)(nil) - // DescribeSenderIdsPaginatorOptions is the paginator options for DescribeSenderIds type DescribeSenderIdsPaginatorOptions struct { // The maximum number of results to return per each request. @@ -222,6 +217,9 @@ func (p *DescribeSenderIdsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSenderIds(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeSenderIdsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeSenderIdsAPIClient is a client that implements the DescribeSenderIds +// operation. +type DescribeSenderIdsAPIClient interface { + DescribeSenderIds(context.Context, *DescribeSenderIdsInput, ...func(*Options)) (*DescribeSenderIdsOutput, error) +} + +var _ DescribeSenderIdsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSenderIds(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeSpendLimits.go b/service/pinpointsmsvoicev2/api_op_DescribeSpendLimits.go index 5c9365e76a5..5838d83595f 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeSpendLimits.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeSpendLimits.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeSpendLimitsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpendLimits(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeSpendLimitsMiddlewares(stack *middleware.St return nil } -// DescribeSpendLimitsAPIClient is a client that implements the -// DescribeSpendLimits operation. -type DescribeSpendLimitsAPIClient interface { - DescribeSpendLimits(context.Context, *DescribeSpendLimitsInput, ...func(*Options)) (*DescribeSpendLimitsOutput, error) -} - -var _ DescribeSpendLimitsAPIClient = (*Client)(nil) - // DescribeSpendLimitsPaginatorOptions is the paginator options for // DescribeSpendLimits type DescribeSpendLimitsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *DescribeSpendLimitsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSpendLimits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *DescribeSpendLimitsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeSpendLimitsAPIClient is a client that implements the +// DescribeSpendLimits operation. +type DescribeSpendLimitsAPIClient interface { + DescribeSpendLimits(context.Context, *DescribeSpendLimitsInput, ...func(*Options)) (*DescribeSpendLimitsOutput, error) +} + +var _ DescribeSpendLimitsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSpendLimits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DescribeVerifiedDestinationNumbers.go b/service/pinpointsmsvoicev2/api_op_DescribeVerifiedDestinationNumbers.go index ffa9e66aa79..05abd2d85fb 100644 --- a/service/pinpointsmsvoicev2/api_op_DescribeVerifiedDestinationNumbers.go +++ b/service/pinpointsmsvoicev2/api_op_DescribeVerifiedDestinationNumbers.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeVerifiedDestinationNumbersMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVerifiedDestinationNumbersValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeVerifiedDestinationNumbersMiddlewares(stack return nil } -// DescribeVerifiedDestinationNumbersAPIClient is a client that implements the -// DescribeVerifiedDestinationNumbers operation. -type DescribeVerifiedDestinationNumbersAPIClient interface { - DescribeVerifiedDestinationNumbers(context.Context, *DescribeVerifiedDestinationNumbersInput, ...func(*Options)) (*DescribeVerifiedDestinationNumbersOutput, error) -} - -var _ DescribeVerifiedDestinationNumbersAPIClient = (*Client)(nil) - // DescribeVerifiedDestinationNumbersPaginatorOptions is the paginator options for // DescribeVerifiedDestinationNumbers type DescribeVerifiedDestinationNumbersPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeVerifiedDestinationNumbersPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVerifiedDestinationNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeVerifiedDestinationNumbersPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeVerifiedDestinationNumbersAPIClient is a client that implements the +// DescribeVerifiedDestinationNumbers operation. +type DescribeVerifiedDestinationNumbersAPIClient interface { + DescribeVerifiedDestinationNumbers(context.Context, *DescribeVerifiedDestinationNumbersInput, ...func(*Options)) (*DescribeVerifiedDestinationNumbersOutput, error) +} + +var _ DescribeVerifiedDestinationNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVerifiedDestinationNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_DisassociateOriginationIdentity.go b/service/pinpointsmsvoicev2/api_op_DisassociateOriginationIdentity.go index 59903b88628..285b592d734 100644 --- a/service/pinpointsmsvoicev2/api_op_DisassociateOriginationIdentity.go +++ b/service/pinpointsmsvoicev2/api_op_DisassociateOriginationIdentity.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDisassociateOriginationIdentityMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateOriginationIdentityMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go index d9052dc729d..16854ff757f 100644 --- a/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_DisassociateProtectConfiguration.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDisassociateProtectConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateProtectConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_DiscardRegistrationVersion.go b/service/pinpointsmsvoicev2/api_op_DiscardRegistrationVersion.go index 29be0f33711..9b4d3637cce 100644 --- a/service/pinpointsmsvoicev2/api_op_DiscardRegistrationVersion.go +++ b/service/pinpointsmsvoicev2/api_op_DiscardRegistrationVersion.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDiscardRegistrationVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDiscardRegistrationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go b/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go index d2072c24eb8..cf5d263a138 100644 --- a/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go +++ b/service/pinpointsmsvoicev2/api_op_GetProtectConfigurationCountryRuleSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetProtectConfigurationCountryRuleSetMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProtectConfigurationCountryRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_ListPoolOriginationIdentities.go b/service/pinpointsmsvoicev2/api_op_ListPoolOriginationIdentities.go index 60756643562..903bec2fdf2 100644 --- a/service/pinpointsmsvoicev2/api_op_ListPoolOriginationIdentities.go +++ b/service/pinpointsmsvoicev2/api_op_ListPoolOriginationIdentities.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListPoolOriginationIdentitiesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoolOriginationIdentitiesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListPoolOriginationIdentitiesMiddlewares(stack *mid return nil } -// ListPoolOriginationIdentitiesAPIClient is a client that implements the -// ListPoolOriginationIdentities operation. -type ListPoolOriginationIdentitiesAPIClient interface { - ListPoolOriginationIdentities(context.Context, *ListPoolOriginationIdentitiesInput, ...func(*Options)) (*ListPoolOriginationIdentitiesOutput, error) -} - -var _ ListPoolOriginationIdentitiesAPIClient = (*Client)(nil) - // ListPoolOriginationIdentitiesPaginatorOptions is the paginator options for // ListPoolOriginationIdentities type ListPoolOriginationIdentitiesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListPoolOriginationIdentitiesPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPoolOriginationIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListPoolOriginationIdentitiesPaginator) NextPage(ctx context.Context, o return result, nil } +// ListPoolOriginationIdentitiesAPIClient is a client that implements the +// ListPoolOriginationIdentities operation. +type ListPoolOriginationIdentitiesAPIClient interface { + ListPoolOriginationIdentities(context.Context, *ListPoolOriginationIdentitiesInput, ...func(*Options)) (*ListPoolOriginationIdentitiesOutput, error) +} + +var _ ListPoolOriginationIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPoolOriginationIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_ListRegistrationAssociations.go b/service/pinpointsmsvoicev2/api_op_ListRegistrationAssociations.go index 31bead35f9a..4661de2ebde 100644 --- a/service/pinpointsmsvoicev2/api_op_ListRegistrationAssociations.go +++ b/service/pinpointsmsvoicev2/api_op_ListRegistrationAssociations.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListRegistrationAssociationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRegistrationAssociationsValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListRegistrationAssociationsMiddlewares(stack *midd return nil } -// ListRegistrationAssociationsAPIClient is a client that implements the -// ListRegistrationAssociations operation. -type ListRegistrationAssociationsAPIClient interface { - ListRegistrationAssociations(context.Context, *ListRegistrationAssociationsInput, ...func(*Options)) (*ListRegistrationAssociationsOutput, error) -} - -var _ ListRegistrationAssociationsAPIClient = (*Client)(nil) - // ListRegistrationAssociationsPaginatorOptions is the paginator options for // ListRegistrationAssociations type ListRegistrationAssociationsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListRegistrationAssociationsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRegistrationAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListRegistrationAssociationsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListRegistrationAssociationsAPIClient is a client that implements the +// ListRegistrationAssociations operation. +type ListRegistrationAssociationsAPIClient interface { + ListRegistrationAssociations(context.Context, *ListRegistrationAssociationsInput, ...func(*Options)) (*ListRegistrationAssociationsOutput, error) +} + +var _ ListRegistrationAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRegistrationAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pinpointsmsvoicev2/api_op_ListTagsForResource.go b/service/pinpointsmsvoicev2/api_op_ListTagsForResource.go index b63ae932544..898d4cb5493 100644 --- a/service/pinpointsmsvoicev2/api_op_ListTagsForResource.go +++ b/service/pinpointsmsvoicev2/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_PutKeyword.go b/service/pinpointsmsvoicev2/api_op_PutKeyword.go index 74d037ac9aa..d13cc018bcc 100644 --- a/service/pinpointsmsvoicev2/api_op_PutKeyword.go +++ b/service/pinpointsmsvoicev2/api_op_PutKeyword.go @@ -148,6 +148,9 @@ func (c *Client) addOperationPutKeywordMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutKeywordValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_PutOptedOutNumber.go b/service/pinpointsmsvoicev2/api_op_PutOptedOutNumber.go index dbb674eccb2..95c0e6e7adf 100644 --- a/service/pinpointsmsvoicev2/api_op_PutOptedOutNumber.go +++ b/service/pinpointsmsvoicev2/api_op_PutOptedOutNumber.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutOptedOutNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutOptedOutNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_PutRegistrationFieldValue.go b/service/pinpointsmsvoicev2/api_op_PutRegistrationFieldValue.go index 684080cb923..c491b4f60bd 100644 --- a/service/pinpointsmsvoicev2/api_op_PutRegistrationFieldValue.go +++ b/service/pinpointsmsvoicev2/api_op_PutRegistrationFieldValue.go @@ -145,6 +145,9 @@ func (c *Client) addOperationPutRegistrationFieldValueMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRegistrationFieldValueValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_ReleasePhoneNumber.go b/service/pinpointsmsvoicev2/api_op_ReleasePhoneNumber.go index 42f783d6538..6cee2a43349 100644 --- a/service/pinpointsmsvoicev2/api_op_ReleasePhoneNumber.go +++ b/service/pinpointsmsvoicev2/api_op_ReleasePhoneNumber.go @@ -166,6 +166,9 @@ func (c *Client) addOperationReleasePhoneNumberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReleasePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_ReleaseSenderId.go b/service/pinpointsmsvoicev2/api_op_ReleaseSenderId.go index 18cd9bb5f66..46e0f73e459 100644 --- a/service/pinpointsmsvoicev2/api_op_ReleaseSenderId.go +++ b/service/pinpointsmsvoicev2/api_op_ReleaseSenderId.go @@ -143,6 +143,9 @@ func (c *Client) addOperationReleaseSenderIdMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReleaseSenderIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_RequestPhoneNumber.go b/service/pinpointsmsvoicev2/api_op_RequestPhoneNumber.go index fc1ba1acd04..4d0d11e3222 100644 --- a/service/pinpointsmsvoicev2/api_op_RequestPhoneNumber.go +++ b/service/pinpointsmsvoicev2/api_op_RequestPhoneNumber.go @@ -221,6 +221,9 @@ func (c *Client) addOperationRequestPhoneNumberMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRequestPhoneNumberMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_RequestSenderId.go b/service/pinpointsmsvoicev2/api_op_RequestSenderId.go index ade47512bf3..9c251c6ce48 100644 --- a/service/pinpointsmsvoicev2/api_op_RequestSenderId.go +++ b/service/pinpointsmsvoicev2/api_op_RequestSenderId.go @@ -166,6 +166,9 @@ func (c *Client) addOperationRequestSenderIdMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRequestSenderIdMiddleware(stack, options); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SendDestinationNumberVerificationCode.go b/service/pinpointsmsvoicev2/api_op_SendDestinationNumberVerificationCode.go index fadd00298c5..8ab25524e93 100644 --- a/service/pinpointsmsvoicev2/api_op_SendDestinationNumberVerificationCode.go +++ b/service/pinpointsmsvoicev2/api_op_SendDestinationNumberVerificationCode.go @@ -139,6 +139,9 @@ func (c *Client) addOperationSendDestinationNumberVerificationCodeMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendDestinationNumberVerificationCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go b/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go index 801ecb6131a..5dc7821b0aa 100644 --- a/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go +++ b/service/pinpointsmsvoicev2/api_op_SendMediaMessage.go @@ -147,6 +147,9 @@ func (c *Client) addOperationSendMediaMessageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendMediaMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SendTextMessage.go b/service/pinpointsmsvoicev2/api_op_SendTextMessage.go index e9308bc5071..5509bd3cda6 100644 --- a/service/pinpointsmsvoicev2/api_op_SendTextMessage.go +++ b/service/pinpointsmsvoicev2/api_op_SendTextMessage.go @@ -158,6 +158,9 @@ func (c *Client) addOperationSendTextMessageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendTextMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go b/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go index e1315e7e0d3..fbfe939f954 100644 --- a/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go +++ b/service/pinpointsmsvoicev2/api_op_SendVoiceMessage.go @@ -154,6 +154,9 @@ func (c *Client) addOperationSendVoiceMessageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendVoiceMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go index 49fab57d023..75a9f6325c5 100644 --- a/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_SetAccountDefaultProtectConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationSetAccountDefaultProtectConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetAccountDefaultProtectConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SetDefaultMessageType.go b/service/pinpointsmsvoicev2/api_op_SetDefaultMessageType.go index 3460fb7e904..43a1202b138 100644 --- a/service/pinpointsmsvoicev2/api_op_SetDefaultMessageType.go +++ b/service/pinpointsmsvoicev2/api_op_SetDefaultMessageType.go @@ -126,6 +126,9 @@ func (c *Client) addOperationSetDefaultMessageTypeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultMessageTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SetDefaultSenderId.go b/service/pinpointsmsvoicev2/api_op_SetDefaultSenderId.go index e582ccf25bd..b6137e4af55 100644 --- a/service/pinpointsmsvoicev2/api_op_SetDefaultSenderId.go +++ b/service/pinpointsmsvoicev2/api_op_SetDefaultSenderId.go @@ -126,6 +126,9 @@ func (c *Client) addOperationSetDefaultSenderIdMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultSenderIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go index e0e46767f88..12604b85f0a 100644 --- a/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go +++ b/service/pinpointsmsvoicev2/api_op_SetMediaMessageSpendLimitOverride.go @@ -107,6 +107,9 @@ func (c *Client) addOperationSetMediaMessageSpendLimitOverrideMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetMediaMessageSpendLimitOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SetTextMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_SetTextMessageSpendLimitOverride.go index b5fc9bedea8..5df8f3f55b4 100644 --- a/service/pinpointsmsvoicev2/api_op_SetTextMessageSpendLimitOverride.go +++ b/service/pinpointsmsvoicev2/api_op_SetTextMessageSpendLimitOverride.go @@ -107,6 +107,9 @@ func (c *Client) addOperationSetTextMessageSpendLimitOverrideMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTextMessageSpendLimitOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SetVoiceMessageSpendLimitOverride.go b/service/pinpointsmsvoicev2/api_op_SetVoiceMessageSpendLimitOverride.go index 7140d76f162..f8f3226cb81 100644 --- a/service/pinpointsmsvoicev2/api_op_SetVoiceMessageSpendLimitOverride.go +++ b/service/pinpointsmsvoicev2/api_op_SetVoiceMessageSpendLimitOverride.go @@ -107,6 +107,9 @@ func (c *Client) addOperationSetVoiceMessageSpendLimitOverrideMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetVoiceMessageSpendLimitOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_SubmitRegistrationVersion.go b/service/pinpointsmsvoicev2/api_op_SubmitRegistrationVersion.go index a0342ad412f..e4ef893841b 100644 --- a/service/pinpointsmsvoicev2/api_op_SubmitRegistrationVersion.go +++ b/service/pinpointsmsvoicev2/api_op_SubmitRegistrationVersion.go @@ -147,6 +147,9 @@ func (c *Client) addOperationSubmitRegistrationVersionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubmitRegistrationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_TagResource.go b/service/pinpointsmsvoicev2/api_op_TagResource.go index 858b93da70c..0be8fc540b4 100644 --- a/service/pinpointsmsvoicev2/api_op_TagResource.go +++ b/service/pinpointsmsvoicev2/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UntagResource.go b/service/pinpointsmsvoicev2/api_op_UntagResource.go index eeb8f9c9c8b..2d5285277e8 100644 --- a/service/pinpointsmsvoicev2/api_op_UntagResource.go +++ b/service/pinpointsmsvoicev2/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UpdateEventDestination.go b/service/pinpointsmsvoicev2/api_op_UpdateEventDestination.go index ac158d69d3a..366fd780e30 100644 --- a/service/pinpointsmsvoicev2/api_op_UpdateEventDestination.go +++ b/service/pinpointsmsvoicev2/api_op_UpdateEventDestination.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateEventDestinationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UpdatePhoneNumber.go b/service/pinpointsmsvoicev2/api_op_UpdatePhoneNumber.go index 8baa3108b25..f0a686d472c 100644 --- a/service/pinpointsmsvoicev2/api_op_UpdatePhoneNumber.go +++ b/service/pinpointsmsvoicev2/api_op_UpdatePhoneNumber.go @@ -195,6 +195,9 @@ func (c *Client) addOperationUpdatePhoneNumberMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UpdatePool.go b/service/pinpointsmsvoicev2/api_op_UpdatePool.go index dc4fc65a31c..a951a9abc8a 100644 --- a/service/pinpointsmsvoicev2/api_op_UpdatePool.go +++ b/service/pinpointsmsvoicev2/api_op_UpdatePool.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdatePoolMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go index 6fea3068197..4d64c3edd1b 100644 --- a/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go +++ b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateProtectConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProtectConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go index 7df23b59b26..8cf6de5c085 100644 --- a/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go +++ b/service/pinpointsmsvoicev2/api_op_UpdateProtectConfigurationCountryRuleSet.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateProtectConfigurationCountryRuleSetMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProtectConfigurationCountryRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_UpdateSenderId.go b/service/pinpointsmsvoicev2/api_op_UpdateSenderId.go index 916b46608c2..16287b7a25f 100644 --- a/service/pinpointsmsvoicev2/api_op_UpdateSenderId.go +++ b/service/pinpointsmsvoicev2/api_op_UpdateSenderId.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateSenderIdMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSenderIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/pinpointsmsvoicev2/api_op_VerifyDestinationNumber.go b/service/pinpointsmsvoicev2/api_op_VerifyDestinationNumber.go index 156013a61c2..1f170afb02e 100644 --- a/service/pinpointsmsvoicev2/api_op_VerifyDestinationNumber.go +++ b/service/pinpointsmsvoicev2/api_op_VerifyDestinationNumber.go @@ -138,6 +138,9 @@ func (c *Client) addOperationVerifyDestinationNumberMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyDestinationNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_client.go b/service/pipes/api_client.go index ad847d9c24f..cb0260e0461 100644 --- a/service/pipes/api_client.go +++ b/service/pipes/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/pipes/api_op_CreatePipe.go b/service/pipes/api_op_CreatePipe.go index ee5a3686631..2c073d04d92 100644 --- a/service/pipes/api_op_CreatePipe.go +++ b/service/pipes/api_op_CreatePipe.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreatePipeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_DeletePipe.go b/service/pipes/api_op_DeletePipe.go index 6e9de3c3d22..02f09b596f1 100644 --- a/service/pipes/api_op_DeletePipe.go +++ b/service/pipes/api_op_DeletePipe.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeletePipeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_DescribePipe.go b/service/pipes/api_op_DescribePipe.go index a9f60dfee20..36669d18e2f 100644 --- a/service/pipes/api_op_DescribePipe.go +++ b/service/pipes/api_op_DescribePipe.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribePipeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_ListPipes.go b/service/pipes/api_op_ListPipes.go index 79a7636d524..1b33eb464ee 100644 --- a/service/pipes/api_op_ListPipes.go +++ b/service/pipes/api_op_ListPipes.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListPipesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipes(options.Region), middleware.Before); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListPipesMiddlewares(stack *middleware.Stack, optio return nil } -// ListPipesAPIClient is a client that implements the ListPipes operation. -type ListPipesAPIClient interface { - ListPipes(context.Context, *ListPipesInput, ...func(*Options)) (*ListPipesOutput, error) -} - -var _ ListPipesAPIClient = (*Client)(nil) - // ListPipesPaginatorOptions is the paginator options for ListPipes type ListPipesPaginatorOptions struct { // The maximum number of pipes to include in the response. @@ -229,6 +225,9 @@ func (p *ListPipesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *ListPipesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListPipesAPIClient is a client that implements the ListPipes operation. +type ListPipesAPIClient interface { + ListPipes(context.Context, *ListPipesInput, ...func(*Options)) (*ListPipesOutput, error) +} + +var _ ListPipesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pipes/api_op_ListTagsForResource.go b/service/pipes/api_op_ListTagsForResource.go index e25a716e4bf..7fb115b71d1 100644 --- a/service/pipes/api_op_ListTagsForResource.go +++ b/service/pipes/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_StartPipe.go b/service/pipes/api_op_StartPipe.go index 47200112c8d..ff3b326ff53 100644 --- a/service/pipes/api_op_StartPipe.go +++ b/service/pipes/api_op_StartPipe.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStartPipeMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartPipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_StopPipe.go b/service/pipes/api_op_StopPipe.go index ce7175b8d07..ec75a9ab598 100644 --- a/service/pipes/api_op_StopPipe.go +++ b/service/pipes/api_op_StopPipe.go @@ -124,6 +124,9 @@ func (c *Client) addOperationStopPipeMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopPipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_TagResource.go b/service/pipes/api_op_TagResource.go index 0442b0a8397..70ce0a14213 100644 --- a/service/pipes/api_op_TagResource.go +++ b/service/pipes/api_op_TagResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_UntagResource.go b/service/pipes/api_op_UntagResource.go index 9ba612e79e5..249b199cbc5 100644 --- a/service/pipes/api_op_UntagResource.go +++ b/service/pipes/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/pipes/api_op_UpdatePipe.go b/service/pipes/api_op_UpdatePipe.go index a86eea75fa0..177e0592887 100644 --- a/service/pipes/api_op_UpdatePipe.go +++ b/service/pipes/api_op_UpdatePipe.go @@ -170,6 +170,9 @@ func (c *Client) addOperationUpdatePipeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipeValidationMiddleware(stack); err != nil { return err } diff --git a/service/polly/api_client.go b/service/polly/api_client.go index 713e8d6a733..19d3af86bef 100644 --- a/service/polly/api_client.go +++ b/service/polly/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/polly/api_op_DeleteLexicon.go b/service/polly/api_op_DeleteLexicon.go index f9f414d26df..71b3c9541c7 100644 --- a/service/polly/api_op_DeleteLexicon.go +++ b/service/polly/api_op_DeleteLexicon.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteLexiconMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLexiconValidationMiddleware(stack); err != nil { return err } diff --git a/service/polly/api_op_DescribeVoices.go b/service/polly/api_op_DescribeVoices.go index 902894d48bd..b8582db7eb9 100644 --- a/service/polly/api_op_DescribeVoices.go +++ b/service/polly/api_op_DescribeVoices.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeVoicesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVoices(options.Region), middleware.Before); err != nil { return err } diff --git a/service/polly/api_op_GetLexicon.go b/service/polly/api_op_GetLexicon.go index 273e0e63f5d..faaa3c6ec74 100644 --- a/service/polly/api_op_GetLexicon.go +++ b/service/polly/api_op_GetLexicon.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetLexiconMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLexiconValidationMiddleware(stack); err != nil { return err } diff --git a/service/polly/api_op_GetSpeechSynthesisTask.go b/service/polly/api_op_GetSpeechSynthesisTask.go index 45877005d32..8bfb645c81e 100644 --- a/service/polly/api_op_GetSpeechSynthesisTask.go +++ b/service/polly/api_op_GetSpeechSynthesisTask.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSpeechSynthesisTaskMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSpeechSynthesisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/polly/api_op_ListLexicons.go b/service/polly/api_op_ListLexicons.go index 90eb0c8695e..75421fe8f78 100644 --- a/service/polly/api_op_ListLexicons.go +++ b/service/polly/api_op_ListLexicons.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListLexiconsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLexicons(options.Region), middleware.Before); err != nil { return err } diff --git a/service/polly/api_op_ListSpeechSynthesisTasks.go b/service/polly/api_op_ListSpeechSynthesisTasks.go index 651d134ad87..afaf74f44e2 100644 --- a/service/polly/api_op_ListSpeechSynthesisTasks.go +++ b/service/polly/api_op_ListSpeechSynthesisTasks.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListSpeechSynthesisTasksMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSpeechSynthesisTasks(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListSpeechSynthesisTasksMiddlewares(stack *middlewa return nil } -// ListSpeechSynthesisTasksAPIClient is a client that implements the -// ListSpeechSynthesisTasks operation. -type ListSpeechSynthesisTasksAPIClient interface { - ListSpeechSynthesisTasks(context.Context, *ListSpeechSynthesisTasksInput, ...func(*Options)) (*ListSpeechSynthesisTasksOutput, error) -} - -var _ ListSpeechSynthesisTasksAPIClient = (*Client)(nil) - // ListSpeechSynthesisTasksPaginatorOptions is the paginator options for // ListSpeechSynthesisTasks type ListSpeechSynthesisTasksPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListSpeechSynthesisTasksPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSpeechSynthesisTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListSpeechSynthesisTasksPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSpeechSynthesisTasksAPIClient is a client that implements the +// ListSpeechSynthesisTasks operation. +type ListSpeechSynthesisTasksAPIClient interface { + ListSpeechSynthesisTasks(context.Context, *ListSpeechSynthesisTasksInput, ...func(*Options)) (*ListSpeechSynthesisTasksOutput, error) +} + +var _ ListSpeechSynthesisTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSpeechSynthesisTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/polly/api_op_PutLexicon.go b/service/polly/api_op_PutLexicon.go index 4e14e5cc86f..2c51aaa5326 100644 --- a/service/polly/api_op_PutLexicon.go +++ b/service/polly/api_op_PutLexicon.go @@ -115,6 +115,9 @@ func (c *Client) addOperationPutLexiconMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLexiconValidationMiddleware(stack); err != nil { return err } diff --git a/service/polly/api_op_StartSpeechSynthesisTask.go b/service/polly/api_op_StartSpeechSynthesisTask.go index e14dbbf935a..cba48f84939 100644 --- a/service/polly/api_op_StartSpeechSynthesisTask.go +++ b/service/polly/api_op_StartSpeechSynthesisTask.go @@ -178,6 +178,9 @@ func (c *Client) addOperationStartSpeechSynthesisTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSpeechSynthesisTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/polly/api_op_SynthesizeSpeech.go b/service/polly/api_op_SynthesizeSpeech.go index d1d6ce7f2dc..749cb960b94 100644 --- a/service/polly/api_op_SynthesizeSpeech.go +++ b/service/polly/api_op_SynthesizeSpeech.go @@ -203,6 +203,9 @@ func (c *Client) addOperationSynthesizeSpeechMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSynthesizeSpeechValidationMiddleware(stack); err != nil { return err } diff --git a/service/pricing/api_client.go b/service/pricing/api_client.go index ad0276a714c..fd56588fe2d 100644 --- a/service/pricing/api_client.go +++ b/service/pricing/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/pricing/api_op_DescribeServices.go b/service/pricing/api_op_DescribeServices.go index 26d2910e75f..5dd8f3d2d20 100644 --- a/service/pricing/api_op_DescribeServices.go +++ b/service/pricing/api_op_DescribeServices.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeServicesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServices(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeServicesMiddlewares(stack *middleware.Stack return nil } -// DescribeServicesAPIClient is a client that implements the DescribeServices -// operation. -type DescribeServicesAPIClient interface { - DescribeServices(context.Context, *DescribeServicesInput, ...func(*Options)) (*DescribeServicesOutput, error) -} - -var _ DescribeServicesAPIClient = (*Client)(nil) - // DescribeServicesPaginatorOptions is the paginator options for DescribeServices type DescribeServicesPaginatorOptions struct { // The maximum number of results that you want returned in the response. @@ -222,6 +217,9 @@ func (p *DescribeServicesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeServicesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeServicesAPIClient is a client that implements the DescribeServices +// operation. +type DescribeServicesAPIClient interface { + DescribeServices(context.Context, *DescribeServicesInput, ...func(*Options)) (*DescribeServicesOutput, error) +} + +var _ DescribeServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pricing/api_op_GetAttributeValues.go b/service/pricing/api_op_GetAttributeValues.go index 230e37fc71d..c406d50ae97 100644 --- a/service/pricing/api_op_GetAttributeValues.go +++ b/service/pricing/api_op_GetAttributeValues.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetAttributeValuesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAttributeValuesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationGetAttributeValuesMiddlewares(stack *middleware.Sta return nil } -// GetAttributeValuesAPIClient is a client that implements the GetAttributeValues -// operation. -type GetAttributeValuesAPIClient interface { - GetAttributeValues(context.Context, *GetAttributeValuesInput, ...func(*Options)) (*GetAttributeValuesOutput, error) -} - -var _ GetAttributeValuesAPIClient = (*Client)(nil) - // GetAttributeValuesPaginatorOptions is the paginator options for // GetAttributeValues type GetAttributeValuesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *GetAttributeValuesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAttributeValues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *GetAttributeValuesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetAttributeValuesAPIClient is a client that implements the GetAttributeValues +// operation. +type GetAttributeValuesAPIClient interface { + GetAttributeValues(context.Context, *GetAttributeValuesInput, ...func(*Options)) (*GetAttributeValuesOutput, error) +} + +var _ GetAttributeValuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAttributeValues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pricing/api_op_GetPriceListFileUrl.go b/service/pricing/api_op_GetPriceListFileUrl.go index 48dc4f887f9..d0e0e70bb24 100644 --- a/service/pricing/api_op_GetPriceListFileUrl.go +++ b/service/pricing/api_op_GetPriceListFileUrl.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetPriceListFileUrlMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPriceListFileUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/pricing/api_op_GetProducts.go b/service/pricing/api_op_GetProducts.go index 86f6c447036..4df3a423627 100644 --- a/service/pricing/api_op_GetProducts.go +++ b/service/pricing/api_op_GetProducts.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetProductsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProductsValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationGetProductsMiddlewares(stack *middleware.Stack, opt return nil } -// GetProductsAPIClient is a client that implements the GetProducts operation. -type GetProductsAPIClient interface { - GetProducts(context.Context, *GetProductsInput, ...func(*Options)) (*GetProductsOutput, error) -} - -var _ GetProductsAPIClient = (*Client)(nil) - // GetProductsPaginatorOptions is the paginator options for GetProducts type GetProductsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -223,6 +219,9 @@ func (p *GetProductsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetProducts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *GetProductsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetProductsAPIClient is a client that implements the GetProducts operation. +type GetProductsAPIClient interface { + GetProducts(context.Context, *GetProductsInput, ...func(*Options)) (*GetProductsOutput, error) +} + +var _ GetProductsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetProducts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/pricing/api_op_ListPriceLists.go b/service/pricing/api_op_ListPriceLists.go index 7d46115b318..49d95040075 100644 --- a/service/pricing/api_op_ListPriceLists.go +++ b/service/pricing/api_op_ListPriceLists.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListPriceListsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPriceListsValidationMiddleware(stack); err != nil { return err } @@ -185,14 +188,6 @@ func (c *Client) addOperationListPriceListsMiddlewares(stack *middleware.Stack, return nil } -// ListPriceListsAPIClient is a client that implements the ListPriceLists -// operation. -type ListPriceListsAPIClient interface { - ListPriceLists(context.Context, *ListPriceListsInput, ...func(*Options)) (*ListPriceListsOutput, error) -} - -var _ ListPriceListsAPIClient = (*Client)(nil) - // ListPriceListsPaginatorOptions is the paginator options for ListPriceLists type ListPriceListsPaginatorOptions struct { // The maximum number of results to return in the response. @@ -256,6 +251,9 @@ func (p *ListPriceListsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPriceLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *ListPriceListsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPriceListsAPIClient is a client that implements the ListPriceLists +// operation. +type ListPriceListsAPIClient interface { + ListPriceLists(context.Context, *ListPriceListsInput, ...func(*Options)) (*ListPriceListsOutput, error) +} + +var _ ListPriceListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPriceLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/privatenetworks/api_client.go b/service/privatenetworks/api_client.go index 4eb26f52a5f..3e8db040299 100644 --- a/service/privatenetworks/api_client.go +++ b/service/privatenetworks/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go b/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go index 31d91b28e2e..84428eb4b6c 100644 --- a/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go +++ b/service/privatenetworks/api_op_AcknowledgeOrderReceipt.go @@ -108,6 +108,9 @@ func (c *Client) addOperationAcknowledgeOrderReceiptMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcknowledgeOrderReceiptValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_ActivateDeviceIdentifier.go b/service/privatenetworks/api_op_ActivateDeviceIdentifier.go index aba02dae5ac..949ffd4b7c8 100644 --- a/service/privatenetworks/api_op_ActivateDeviceIdentifier.go +++ b/service/privatenetworks/api_op_ActivateDeviceIdentifier.go @@ -117,6 +117,9 @@ func (c *Client) addOperationActivateDeviceIdentifierMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateDeviceIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_ActivateNetworkSite.go b/service/privatenetworks/api_op_ActivateNetworkSite.go index 025ac96331f..e253d2dbd1b 100644 --- a/service/privatenetworks/api_op_ActivateNetworkSite.go +++ b/service/privatenetworks/api_op_ActivateNetworkSite.go @@ -137,6 +137,9 @@ func (c *Client) addOperationActivateNetworkSiteMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateNetworkSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_ConfigureAccessPoint.go b/service/privatenetworks/api_op_ConfigureAccessPoint.go index 02ae9b1c906..71835b1d065 100644 --- a/service/privatenetworks/api_op_ConfigureAccessPoint.go +++ b/service/privatenetworks/api_op_ConfigureAccessPoint.go @@ -133,6 +133,9 @@ func (c *Client) addOperationConfigureAccessPointMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfigureAccessPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_CreateNetwork.go b/service/privatenetworks/api_op_CreateNetwork.go index 59405786112..82c14be8b57 100644 --- a/service/privatenetworks/api_op_CreateNetwork.go +++ b/service/privatenetworks/api_op_CreateNetwork.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateNetworkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_CreateNetworkSite.go b/service/privatenetworks/api_op_CreateNetworkSite.go index b8c7cfdcc12..daa660dcb64 100644 --- a/service/privatenetworks/api_op_CreateNetworkSite.go +++ b/service/privatenetworks/api_op_CreateNetworkSite.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateNetworkSiteMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNetworkSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go b/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go index bd72e88daba..0c042f75b3e 100644 --- a/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go +++ b/service/privatenetworks/api_op_DeactivateDeviceIdentifier.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeactivateDeviceIdentifierMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateDeviceIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_DeleteNetwork.go b/service/privatenetworks/api_op_DeleteNetwork.go index a174f0db642..eefa5daaa10 100644 --- a/service/privatenetworks/api_op_DeleteNetwork.go +++ b/service/privatenetworks/api_op_DeleteNetwork.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteNetworkMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_DeleteNetworkSite.go b/service/privatenetworks/api_op_DeleteNetworkSite.go index 31a9a19e887..8e00150ac58 100644 --- a/service/privatenetworks/api_op_DeleteNetworkSite.go +++ b/service/privatenetworks/api_op_DeleteNetworkSite.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteNetworkSiteMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_GetDeviceIdentifier.go b/service/privatenetworks/api_op_GetDeviceIdentifier.go index 331e48ae9e4..56aa63e0f9d 100644 --- a/service/privatenetworks/api_op_GetDeviceIdentifier.go +++ b/service/privatenetworks/api_op_GetDeviceIdentifier.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetDeviceIdentifierMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceIdentifierValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_GetNetwork.go b/service/privatenetworks/api_op_GetNetwork.go index 8c25406b393..b8be2b2dce1 100644 --- a/service/privatenetworks/api_op_GetNetwork.go +++ b/service/privatenetworks/api_op_GetNetwork.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetNetworkMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_GetNetworkResource.go b/service/privatenetworks/api_op_GetNetworkResource.go index 821b818c51b..c118f1b7750 100644 --- a/service/privatenetworks/api_op_GetNetworkResource.go +++ b/service/privatenetworks/api_op_GetNetworkResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetNetworkResourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_GetNetworkSite.go b/service/privatenetworks/api_op_GetNetworkSite.go index 1da99403212..60f0fcb8826 100644 --- a/service/privatenetworks/api_op_GetNetworkSite.go +++ b/service/privatenetworks/api_op_GetNetworkSite.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetNetworkSiteMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_GetOrder.go b/service/privatenetworks/api_op_GetOrder.go index 7530d633c62..56f030b3829 100644 --- a/service/privatenetworks/api_op_GetOrder.go +++ b/service/privatenetworks/api_op_GetOrder.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetOrderMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrderValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_ListDeviceIdentifiers.go b/service/privatenetworks/api_op_ListDeviceIdentifiers.go index 01a64dad122..a89d1728efe 100644 --- a/service/privatenetworks/api_op_ListDeviceIdentifiers.go +++ b/service/privatenetworks/api_op_ListDeviceIdentifiers.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListDeviceIdentifiersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeviceIdentifiersValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListDeviceIdentifiersMiddlewares(stack *middleware. return nil } -// ListDeviceIdentifiersAPIClient is a client that implements the -// ListDeviceIdentifiers operation. -type ListDeviceIdentifiersAPIClient interface { - ListDeviceIdentifiers(context.Context, *ListDeviceIdentifiersInput, ...func(*Options)) (*ListDeviceIdentifiersOutput, error) -} - -var _ ListDeviceIdentifiersAPIClient = (*Client)(nil) - // ListDeviceIdentifiersPaginatorOptions is the paginator options for // ListDeviceIdentifiers type ListDeviceIdentifiersPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListDeviceIdentifiersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeviceIdentifiers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListDeviceIdentifiersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDeviceIdentifiersAPIClient is a client that implements the +// ListDeviceIdentifiers operation. +type ListDeviceIdentifiersAPIClient interface { + ListDeviceIdentifiers(context.Context, *ListDeviceIdentifiersInput, ...func(*Options)) (*ListDeviceIdentifiersOutput, error) +} + +var _ ListDeviceIdentifiersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeviceIdentifiers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/privatenetworks/api_op_ListNetworkResources.go b/service/privatenetworks/api_op_ListNetworkResources.go index 91ad41eb89c..6de54805ce9 100644 --- a/service/privatenetworks/api_op_ListNetworkResources.go +++ b/service/privatenetworks/api_op_ListNetworkResources.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListNetworkResourcesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNetworkResourcesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListNetworkResourcesMiddlewares(stack *middleware.S return nil } -// ListNetworkResourcesAPIClient is a client that implements the -// ListNetworkResources operation. -type ListNetworkResourcesAPIClient interface { - ListNetworkResources(context.Context, *ListNetworkResourcesInput, ...func(*Options)) (*ListNetworkResourcesOutput, error) -} - -var _ ListNetworkResourcesAPIClient = (*Client)(nil) - // ListNetworkResourcesPaginatorOptions is the paginator options for // ListNetworkResources type ListNetworkResourcesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListNetworkResourcesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNetworkResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListNetworkResourcesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListNetworkResourcesAPIClient is a client that implements the +// ListNetworkResources operation. +type ListNetworkResourcesAPIClient interface { + ListNetworkResources(context.Context, *ListNetworkResourcesInput, ...func(*Options)) (*ListNetworkResourcesOutput, error) +} + +var _ ListNetworkResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNetworkResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/privatenetworks/api_op_ListNetworkSites.go b/service/privatenetworks/api_op_ListNetworkSites.go index e1aebc77c45..85b689b3d71 100644 --- a/service/privatenetworks/api_op_ListNetworkSites.go +++ b/service/privatenetworks/api_op_ListNetworkSites.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListNetworkSitesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNetworkSitesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListNetworkSitesMiddlewares(stack *middleware.Stack return nil } -// ListNetworkSitesAPIClient is a client that implements the ListNetworkSites -// operation. -type ListNetworkSitesAPIClient interface { - ListNetworkSites(context.Context, *ListNetworkSitesInput, ...func(*Options)) (*ListNetworkSitesOutput, error) -} - -var _ ListNetworkSitesAPIClient = (*Client)(nil) - // ListNetworkSitesPaginatorOptions is the paginator options for ListNetworkSites type ListNetworkSitesPaginatorOptions struct { // The maximum number of results to return. @@ -222,6 +217,9 @@ func (p *ListNetworkSitesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNetworkSites(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListNetworkSitesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListNetworkSitesAPIClient is a client that implements the ListNetworkSites +// operation. +type ListNetworkSitesAPIClient interface { + ListNetworkSites(context.Context, *ListNetworkSitesInput, ...func(*Options)) (*ListNetworkSitesOutput, error) +} + +var _ ListNetworkSitesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNetworkSites(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/privatenetworks/api_op_ListNetworks.go b/service/privatenetworks/api_op_ListNetworks.go index 01bb6e0d3b1..d2f6ca955c4 100644 --- a/service/privatenetworks/api_op_ListNetworks.go +++ b/service/privatenetworks/api_op_ListNetworks.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListNetworksMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworks(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListNetworksMiddlewares(stack *middleware.Stack, op return nil } -// ListNetworksAPIClient is a client that implements the ListNetworks operation. -type ListNetworksAPIClient interface { - ListNetworks(context.Context, *ListNetworksInput, ...func(*Options)) (*ListNetworksOutput, error) -} - -var _ ListNetworksAPIClient = (*Client)(nil) - // ListNetworksPaginatorOptions is the paginator options for ListNetworks type ListNetworksPaginatorOptions struct { // The maximum number of results to return. @@ -212,6 +208,9 @@ func (p *ListNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListNetworksAPIClient is a client that implements the ListNetworks operation. +type ListNetworksAPIClient interface { + ListNetworks(context.Context, *ListNetworksInput, ...func(*Options)) (*ListNetworksOutput, error) +} + +var _ ListNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/privatenetworks/api_op_ListOrders.go b/service/privatenetworks/api_op_ListOrders.go index 606a75c8237..e2da9c6b77b 100644 --- a/service/privatenetworks/api_op_ListOrders.go +++ b/service/privatenetworks/api_op_ListOrders.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListOrdersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrdersValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListOrdersMiddlewares(stack *middleware.Stack, opti return nil } -// ListOrdersAPIClient is a client that implements the ListOrders operation. -type ListOrdersAPIClient interface { - ListOrders(context.Context, *ListOrdersInput, ...func(*Options)) (*ListOrdersOutput, error) -} - -var _ ListOrdersAPIClient = (*Client)(nil) - // ListOrdersPaginatorOptions is the paginator options for ListOrders type ListOrdersPaginatorOptions struct { // The maximum number of results to return. @@ -225,6 +221,9 @@ func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListOrdersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListOrdersAPIClient is a client that implements the ListOrders operation. +type ListOrdersAPIClient interface { + ListOrders(context.Context, *ListOrdersInput, ...func(*Options)) (*ListOrdersOutput, error) +} + +var _ ListOrdersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/privatenetworks/api_op_ListTagsForResource.go b/service/privatenetworks/api_op_ListTagsForResource.go index 8cc50fe7ea6..2ecc5e1437c 100644 --- a/service/privatenetworks/api_op_ListTagsForResource.go +++ b/service/privatenetworks/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_Ping.go b/service/privatenetworks/api_op_Ping.go index e5984badcd3..ca5dedd1bd2 100644 --- a/service/privatenetworks/api_op_Ping.go +++ b/service/privatenetworks/api_op_Ping.go @@ -99,6 +99,9 @@ func (c *Client) addOperationPingMiddlewares(stack *middleware.Stack, options Op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPing(options.Region), middleware.Before); err != nil { return err } diff --git a/service/privatenetworks/api_op_StartNetworkResourceUpdate.go b/service/privatenetworks/api_op_StartNetworkResourceUpdate.go index c0c29e5948c..7897a0ee332 100644 --- a/service/privatenetworks/api_op_StartNetworkResourceUpdate.go +++ b/service/privatenetworks/api_op_StartNetworkResourceUpdate.go @@ -172,6 +172,9 @@ func (c *Client) addOperationStartNetworkResourceUpdateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartNetworkResourceUpdateValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_TagResource.go b/service/privatenetworks/api_op_TagResource.go index c95aeb07cee..66efc8876f2 100644 --- a/service/privatenetworks/api_op_TagResource.go +++ b/service/privatenetworks/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_UntagResource.go b/service/privatenetworks/api_op_UntagResource.go index 0ca0f75b241..98d9b18d044 100644 --- a/service/privatenetworks/api_op_UntagResource.go +++ b/service/privatenetworks/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_UpdateNetworkSite.go b/service/privatenetworks/api_op_UpdateNetworkSite.go index cef63fc6852..920686f740d 100644 --- a/service/privatenetworks/api_op_UpdateNetworkSite.go +++ b/service/privatenetworks/api_op_UpdateNetworkSite.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateNetworkSiteMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNetworkSiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/privatenetworks/api_op_UpdateNetworkSitePlan.go b/service/privatenetworks/api_op_UpdateNetworkSitePlan.go index f7f4f77df43..bb129f10294 100644 --- a/service/privatenetworks/api_op_UpdateNetworkSitePlan.go +++ b/service/privatenetworks/api_op_UpdateNetworkSitePlan.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateNetworkSitePlanMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNetworkSitePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_client.go b/service/proton/api_client.go index 64fac0ce7a0..1e1105be5ab 100644 --- a/service/proton/api_client.go +++ b/service/proton/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/proton/api_op_AcceptEnvironmentAccountConnection.go b/service/proton/api_op_AcceptEnvironmentAccountConnection.go index 553c625b079..9e37bb708cc 100644 --- a/service/proton/api_op_AcceptEnvironmentAccountConnection.go +++ b/service/proton/api_op_AcceptEnvironmentAccountConnection.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAcceptEnvironmentAccountConnectionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptEnvironmentAccountConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CancelComponentDeployment.go b/service/proton/api_op_CancelComponentDeployment.go index 34d8e4a8be1..8094f0f8194 100644 --- a/service/proton/api_op_CancelComponentDeployment.go +++ b/service/proton/api_op_CancelComponentDeployment.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCancelComponentDeploymentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelComponentDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CancelEnvironmentDeployment.go b/service/proton/api_op_CancelEnvironmentDeployment.go index 05f8ec63b7e..32fb5b46b10 100644 --- a/service/proton/api_op_CancelEnvironmentDeployment.go +++ b/service/proton/api_op_CancelEnvironmentDeployment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCancelEnvironmentDeploymentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelEnvironmentDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CancelServiceInstanceDeployment.go b/service/proton/api_op_CancelServiceInstanceDeployment.go index c8f478cc868..a74d84e4ded 100644 --- a/service/proton/api_op_CancelServiceInstanceDeployment.go +++ b/service/proton/api_op_CancelServiceInstanceDeployment.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCancelServiceInstanceDeploymentMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelServiceInstanceDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CancelServicePipelineDeployment.go b/service/proton/api_op_CancelServicePipelineDeployment.go index 89f2e276f3e..c21d74b8def 100644 --- a/service/proton/api_op_CancelServicePipelineDeployment.go +++ b/service/proton/api_op_CancelServicePipelineDeployment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCancelServicePipelineDeploymentMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelServicePipelineDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateComponent.go b/service/proton/api_op_CreateComponent.go index 1e9f787614f..d1bb1a35749 100644 --- a/service/proton/api_op_CreateComponent.go +++ b/service/proton/api_op_CreateComponent.go @@ -168,6 +168,9 @@ func (c *Client) addOperationCreateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_CreateEnvironment.go b/service/proton/api_op_CreateEnvironment.go index e42bab28209..76c30549118 100644 --- a/service/proton/api_op_CreateEnvironment.go +++ b/service/proton/api_op_CreateEnvironment.go @@ -208,6 +208,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateEnvironmentAccountConnection.go b/service/proton/api_op_CreateEnvironmentAccountConnection.go index a7195d10956..8938b1c1caa 100644 --- a/service/proton/api_op_CreateEnvironmentAccountConnection.go +++ b/service/proton/api_op_CreateEnvironmentAccountConnection.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateEnvironmentAccountConnectionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEnvironmentAccountConnectionMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_CreateEnvironmentTemplate.go b/service/proton/api_op_CreateEnvironmentTemplate.go index 4b5f7a496b7..ba924f53397 100644 --- a/service/proton/api_op_CreateEnvironmentTemplate.go +++ b/service/proton/api_op_CreateEnvironmentTemplate.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateEnvironmentTemplateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEnvironmentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateEnvironmentTemplateVersion.go b/service/proton/api_op_CreateEnvironmentTemplateVersion.go index 82248e9f235..7611beee6d9 100644 --- a/service/proton/api_op_CreateEnvironmentTemplateVersion.go +++ b/service/proton/api_op_CreateEnvironmentTemplateVersion.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateEnvironmentTemplateVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateEnvironmentTemplateVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_CreateRepository.go b/service/proton/api_op_CreateRepository.go index ab3f22503ae..9227638d3f4 100644 --- a/service/proton/api_op_CreateRepository.go +++ b/service/proton/api_op_CreateRepository.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateService.go b/service/proton/api_op_CreateService.go index 343150233f5..dbcebe52b97 100644 --- a/service/proton/api_op_CreateService.go +++ b/service/proton/api_op_CreateService.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateServiceInstance.go b/service/proton/api_op_CreateServiceInstance.go index e8001da0114..9785107aeff 100644 --- a/service/proton/api_op_CreateServiceInstance.go +++ b/service/proton/api_op_CreateServiceInstance.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateServiceInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_CreateServiceSyncConfig.go b/service/proton/api_op_CreateServiceSyncConfig.go index f35613fc771..9259e6293a9 100644 --- a/service/proton/api_op_CreateServiceSyncConfig.go +++ b/service/proton/api_op_CreateServiceSyncConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateServiceSyncConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateServiceTemplate.go b/service/proton/api_op_CreateServiceTemplate.go index d9e2179a9e8..4ab129939a0 100644 --- a/service/proton/api_op_CreateServiceTemplate.go +++ b/service/proton/api_op_CreateServiceTemplate.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateServiceTemplateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_CreateServiceTemplateVersion.go b/service/proton/api_op_CreateServiceTemplateVersion.go index 3e34ba09811..aaf67f259ee 100644 --- a/service/proton/api_op_CreateServiceTemplateVersion.go +++ b/service/proton/api_op_CreateServiceTemplateVersion.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateServiceTemplateVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceTemplateVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_CreateTemplateSyncConfig.go b/service/proton/api_op_CreateTemplateSyncConfig.go index 7948a1419d8..f2bc5e69407 100644 --- a/service/proton/api_op_CreateTemplateSyncConfig.go +++ b/service/proton/api_op_CreateTemplateSyncConfig.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateTemplateSyncConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTemplateSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteComponent.go b/service/proton/api_op_DeleteComponent.go index c630058a645..2f37a5c220b 100644 --- a/service/proton/api_op_DeleteComponent.go +++ b/service/proton/api_op_DeleteComponent.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteDeployment.go b/service/proton/api_op_DeleteDeployment.go index c6180d4c78b..44ebdedad6c 100644 --- a/service/proton/api_op_DeleteDeployment.go +++ b/service/proton/api_op_DeleteDeployment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDeploymentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteEnvironment.go b/service/proton/api_op_DeleteEnvironment.go index 54953d708a2..20193fc9583 100644 --- a/service/proton/api_op_DeleteEnvironment.go +++ b/service/proton/api_op_DeleteEnvironment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteEnvironmentAccountConnection.go b/service/proton/api_op_DeleteEnvironmentAccountConnection.go index 9d8d821841a..995e0d2091d 100644 --- a/service/proton/api_op_DeleteEnvironmentAccountConnection.go +++ b/service/proton/api_op_DeleteEnvironmentAccountConnection.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteEnvironmentAccountConnectionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentAccountConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteEnvironmentTemplate.go b/service/proton/api_op_DeleteEnvironmentTemplate.go index 17d24959b59..c399042d900 100644 --- a/service/proton/api_op_DeleteEnvironmentTemplate.go +++ b/service/proton/api_op_DeleteEnvironmentTemplate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEnvironmentTemplateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteEnvironmentTemplateVersion.go b/service/proton/api_op_DeleteEnvironmentTemplateVersion.go index 7c559d02511..65d77a36392 100644 --- a/service/proton/api_op_DeleteEnvironmentTemplateVersion.go +++ b/service/proton/api_op_DeleteEnvironmentTemplateVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteEnvironmentTemplateVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEnvironmentTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteRepository.go b/service/proton/api_op_DeleteRepository.go index 41be141f6f2..8385c46be0d 100644 --- a/service/proton/api_op_DeleteRepository.go +++ b/service/proton/api_op_DeleteRepository.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteRepositoryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteService.go b/service/proton/api_op_DeleteService.go index 04ef058e625..5e14a36d231 100644 --- a/service/proton/api_op_DeleteService.go +++ b/service/proton/api_op_DeleteService.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteServiceSyncConfig.go b/service/proton/api_op_DeleteServiceSyncConfig.go index 8e042547f49..1e8ff25b2cc 100644 --- a/service/proton/api_op_DeleteServiceSyncConfig.go +++ b/service/proton/api_op_DeleteServiceSyncConfig.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteServiceSyncConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteServiceTemplate.go b/service/proton/api_op_DeleteServiceTemplate.go index 79b00557547..9fc7fdd48c4 100644 --- a/service/proton/api_op_DeleteServiceTemplate.go +++ b/service/proton/api_op_DeleteServiceTemplate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteServiceTemplateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteServiceTemplateVersion.go b/service/proton/api_op_DeleteServiceTemplateVersion.go index e4575305c10..11f3ec5402e 100644 --- a/service/proton/api_op_DeleteServiceTemplateVersion.go +++ b/service/proton/api_op_DeleteServiceTemplateVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteServiceTemplateVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_DeleteTemplateSyncConfig.go b/service/proton/api_op_DeleteTemplateSyncConfig.go index 2fa07ef75be..19083e4e782 100644 --- a/service/proton/api_op_DeleteTemplateSyncConfig.go +++ b/service/proton/api_op_DeleteTemplateSyncConfig.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteTemplateSyncConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetAccountSettings.go b/service/proton/api_op_GetAccountSettings.go index 050122a260c..3bbeef14ccf 100644 --- a/service/proton/api_op_GetAccountSettings.go +++ b/service/proton/api_op_GetAccountSettings.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/proton/api_op_GetComponent.go b/service/proton/api_op_GetComponent.go index a19cf63488b..7aaf977dadd 100644 --- a/service/proton/api_op_GetComponent.go +++ b/service/proton/api_op_GetComponent.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentValidationMiddleware(stack); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, op return nil } -// GetComponentAPIClient is a client that implements the GetComponent operation. -type GetComponentAPIClient interface { - GetComponent(context.Context, *GetComponentInput, ...func(*Options)) (*GetComponentOutput, error) -} - -var _ GetComponentAPIClient = (*Client)(nil) - // ComponentDeployedWaiterOptions are waiter options for ComponentDeployedWaiter type ComponentDeployedWaiterOptions struct { @@ -261,7 +257,13 @@ func (w *ComponentDeployedWaiter) WaitForOutput(ctx context.Context, params *Get } out, err := w.client.GetComponent(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -451,7 +453,13 @@ func (w *ComponentDeletedWaiter) WaitForOutput(ctx context.Context, params *GetC } out, err := w.client.GetComponent(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -516,6 +524,13 @@ func componentDeletedStateRetryable(ctx context.Context, input *GetComponentInpu return true, nil } +// GetComponentAPIClient is a client that implements the GetComponent operation. +type GetComponentAPIClient interface { + GetComponent(context.Context, *GetComponentInput, ...func(*Options)) (*GetComponentOutput, error) +} + +var _ GetComponentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetComponent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_GetDeployment.go b/service/proton/api_op_GetDeployment.go index d29f5d65043..ef3512bc31e 100644 --- a/service/proton/api_op_GetDeployment.go +++ b/service/proton/api_op_GetDeployment.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetDeploymentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetEnvironment.go b/service/proton/api_op_GetEnvironment.go index 746f9a39f2e..e75a53ea84b 100644 --- a/service/proton/api_op_GetEnvironment.go +++ b/service/proton/api_op_GetEnvironment.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentValidationMiddleware(stack); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, return nil } -// GetEnvironmentAPIClient is a client that implements the GetEnvironment -// operation. -type GetEnvironmentAPIClient interface { - GetEnvironment(context.Context, *GetEnvironmentInput, ...func(*Options)) (*GetEnvironmentOutput, error) -} - -var _ GetEnvironmentAPIClient = (*Client)(nil) - // EnvironmentDeployedWaiterOptions are waiter options for // EnvironmentDeployedWaiter type EnvironmentDeployedWaiterOptions struct { @@ -261,7 +256,13 @@ func (w *EnvironmentDeployedWaiter) WaitForOutput(ctx context.Context, params *G } out, err := w.client.GetEnvironment(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -336,6 +337,14 @@ func environmentDeployedStateRetryable(ctx context.Context, input *GetEnvironmen return true, nil } +// GetEnvironmentAPIClient is a client that implements the GetEnvironment +// operation. +type GetEnvironmentAPIClient interface { + GetEnvironment(context.Context, *GetEnvironmentInput, ...func(*Options)) (*GetEnvironmentOutput, error) +} + +var _ GetEnvironmentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEnvironment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_GetEnvironmentAccountConnection.go b/service/proton/api_op_GetEnvironmentAccountConnection.go index 26d4a9cd1eb..6841c26bcdd 100644 --- a/service/proton/api_op_GetEnvironmentAccountConnection.go +++ b/service/proton/api_op_GetEnvironmentAccountConnection.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetEnvironmentAccountConnectionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentAccountConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetEnvironmentTemplate.go b/service/proton/api_op_GetEnvironmentTemplate.go index 5ba473072ba..1e823f7dc0f 100644 --- a/service/proton/api_op_GetEnvironmentTemplate.go +++ b/service/proton/api_op_GetEnvironmentTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetEnvironmentTemplateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetEnvironmentTemplateVersion.go b/service/proton/api_op_GetEnvironmentTemplateVersion.go index 02cc6da0bba..7045e25ca2a 100644 --- a/service/proton/api_op_GetEnvironmentTemplateVersion.go +++ b/service/proton/api_op_GetEnvironmentTemplateVersion.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetEnvironmentTemplateVersionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEnvironmentTemplateVersionValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationGetEnvironmentTemplateVersionMiddlewares(stack *mid return nil } -// GetEnvironmentTemplateVersionAPIClient is a client that implements the -// GetEnvironmentTemplateVersion operation. -type GetEnvironmentTemplateVersionAPIClient interface { - GetEnvironmentTemplateVersion(context.Context, *GetEnvironmentTemplateVersionInput, ...func(*Options)) (*GetEnvironmentTemplateVersionOutput, error) -} - -var _ GetEnvironmentTemplateVersionAPIClient = (*Client)(nil) - // EnvironmentTemplateVersionRegisteredWaiterOptions are waiter options for // EnvironmentTemplateVersionRegisteredWaiter type EnvironmentTemplateVersionRegisteredWaiterOptions struct { @@ -275,7 +270,13 @@ func (w *EnvironmentTemplateVersionRegisteredWaiter) WaitForOutput(ctx context.C } out, err := w.client.GetEnvironmentTemplateVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -367,6 +368,14 @@ func environmentTemplateVersionRegisteredStateRetryable(ctx context.Context, inp return true, nil } +// GetEnvironmentTemplateVersionAPIClient is a client that implements the +// GetEnvironmentTemplateVersion operation. +type GetEnvironmentTemplateVersionAPIClient interface { + GetEnvironmentTemplateVersion(context.Context, *GetEnvironmentTemplateVersionInput, ...func(*Options)) (*GetEnvironmentTemplateVersionOutput, error) +} + +var _ GetEnvironmentTemplateVersionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEnvironmentTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_GetRepository.go b/service/proton/api_op_GetRepository.go index 7123f2a311e..67491ba8db1 100644 --- a/service/proton/api_op_GetRepository.go +++ b/service/proton/api_op_GetRepository.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetRepositoryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetRepositorySyncStatus.go b/service/proton/api_op_GetRepositorySyncStatus.go index b31bc0e6c36..ae58f567423 100644 --- a/service/proton/api_op_GetRepositorySyncStatus.go +++ b/service/proton/api_op_GetRepositorySyncStatus.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetRepositorySyncStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRepositorySyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetResourcesSummary.go b/service/proton/api_op_GetResourcesSummary.go index ae03e0e4af2..d91f95a804f 100644 --- a/service/proton/api_op_GetResourcesSummary.go +++ b/service/proton/api_op_GetResourcesSummary.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetResourcesSummaryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcesSummary(options.Region), middleware.Before); err != nil { return err } diff --git a/service/proton/api_op_GetService.go b/service/proton/api_op_GetService.go index bafe63f5640..61b4c410a25 100644 --- a/service/proton/api_op_GetService.go +++ b/service/proton/api_op_GetService.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceValidationMiddleware(stack); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, opti return nil } -// GetServiceAPIClient is a client that implements the GetService operation. -type GetServiceAPIClient interface { - GetService(context.Context, *GetServiceInput, ...func(*Options)) (*GetServiceOutput, error) -} - -var _ GetServiceAPIClient = (*Client)(nil) - // ServiceCreatedWaiterOptions are waiter options for ServiceCreatedWaiter type ServiceCreatedWaiterOptions struct { @@ -257,7 +253,13 @@ func (w *ServiceCreatedWaiter) WaitForOutput(ctx context.Context, params *GetSer } out, err := w.client.GetService(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -481,7 +483,13 @@ func (w *ServiceUpdatedWaiter) WaitForOutput(ctx context.Context, params *GetSer } out, err := w.client.GetService(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -722,7 +730,13 @@ func (w *ServiceDeletedWaiter) WaitForOutput(ctx context.Context, params *GetSer } out, err := w.client.GetService(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -904,7 +918,13 @@ func (w *ServicePipelineDeployedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.GetService(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -979,6 +999,13 @@ func servicePipelineDeployedStateRetryable(ctx context.Context, input *GetServic return true, nil } +// GetServiceAPIClient is a client that implements the GetService operation. +type GetServiceAPIClient interface { + GetService(context.Context, *GetServiceInput, ...func(*Options)) (*GetServiceOutput, error) +} + +var _ GetServiceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetService(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_GetServiceInstance.go b/service/proton/api_op_GetServiceInstance.go index e3741f91c29..4742cc4134b 100644 --- a/service/proton/api_op_GetServiceInstance.go +++ b/service/proton/api_op_GetServiceInstance.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetServiceInstanceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceInstanceValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationGetServiceInstanceMiddlewares(stack *middleware.Sta return nil } -// GetServiceInstanceAPIClient is a client that implements the GetServiceInstance -// operation. -type GetServiceInstanceAPIClient interface { - GetServiceInstance(context.Context, *GetServiceInstanceInput, ...func(*Options)) (*GetServiceInstanceOutput, error) -} - -var _ GetServiceInstanceAPIClient = (*Client)(nil) - // ServiceInstanceDeployedWaiterOptions are waiter options for // ServiceInstanceDeployedWaiter type ServiceInstanceDeployedWaiterOptions struct { @@ -267,7 +262,13 @@ func (w *ServiceInstanceDeployedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.GetServiceInstance(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -342,6 +343,14 @@ func serviceInstanceDeployedStateRetryable(ctx context.Context, input *GetServic return true, nil } +// GetServiceInstanceAPIClient is a client that implements the GetServiceInstance +// operation. +type GetServiceInstanceAPIClient interface { + GetServiceInstance(context.Context, *GetServiceInstanceInput, ...func(*Options)) (*GetServiceInstanceOutput, error) +} + +var _ GetServiceInstanceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetServiceInstance(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_GetServiceInstanceSyncStatus.go b/service/proton/api_op_GetServiceInstanceSyncStatus.go index 7f96188af0a..75e965b7078 100644 --- a/service/proton/api_op_GetServiceInstanceSyncStatus.go +++ b/service/proton/api_op_GetServiceInstanceSyncStatus.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetServiceInstanceSyncStatusMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceInstanceSyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetServiceSyncBlockerSummary.go b/service/proton/api_op_GetServiceSyncBlockerSummary.go index 0212da7b040..fabb70b6571 100644 --- a/service/proton/api_op_GetServiceSyncBlockerSummary.go +++ b/service/proton/api_op_GetServiceSyncBlockerSummary.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetServiceSyncBlockerSummaryMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceSyncBlockerSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetServiceSyncConfig.go b/service/proton/api_op_GetServiceSyncConfig.go index e79d0833bba..811e12a28f2 100644 --- a/service/proton/api_op_GetServiceSyncConfig.go +++ b/service/proton/api_op_GetServiceSyncConfig.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetServiceSyncConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetServiceTemplate.go b/service/proton/api_op_GetServiceTemplate.go index 79b06b58203..1747e259436 100644 --- a/service/proton/api_op_GetServiceTemplate.go +++ b/service/proton/api_op_GetServiceTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetServiceTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetServiceTemplateVersion.go b/service/proton/api_op_GetServiceTemplateVersion.go index 4cc1f4b6be0..57aba2de450 100644 --- a/service/proton/api_op_GetServiceTemplateVersion.go +++ b/service/proton/api_op_GetServiceTemplateVersion.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetServiceTemplateVersionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceTemplateVersionValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationGetServiceTemplateVersionMiddlewares(stack *middlew return nil } -// GetServiceTemplateVersionAPIClient is a client that implements the -// GetServiceTemplateVersion operation. -type GetServiceTemplateVersionAPIClient interface { - GetServiceTemplateVersion(context.Context, *GetServiceTemplateVersionInput, ...func(*Options)) (*GetServiceTemplateVersionOutput, error) -} - -var _ GetServiceTemplateVersionAPIClient = (*Client)(nil) - // ServiceTemplateVersionRegisteredWaiterOptions are waiter options for // ServiceTemplateVersionRegisteredWaiter type ServiceTemplateVersionRegisteredWaiterOptions struct { @@ -275,7 +270,13 @@ func (w *ServiceTemplateVersionRegisteredWaiter) WaitForOutput(ctx context.Conte } out, err := w.client.GetServiceTemplateVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -367,6 +368,14 @@ func serviceTemplateVersionRegisteredStateRetryable(ctx context.Context, input * return true, nil } +// GetServiceTemplateVersionAPIClient is a client that implements the +// GetServiceTemplateVersion operation. +type GetServiceTemplateVersionAPIClient interface { + GetServiceTemplateVersion(context.Context, *GetServiceTemplateVersionInput, ...func(*Options)) (*GetServiceTemplateVersionOutput, error) +} + +var _ GetServiceTemplateVersionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetServiceTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_GetTemplateSyncConfig.go b/service/proton/api_op_GetTemplateSyncConfig.go index 51d239a6c69..282ad57ebee 100644 --- a/service/proton/api_op_GetTemplateSyncConfig.go +++ b/service/proton/api_op_GetTemplateSyncConfig.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetTemplateSyncConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_GetTemplateSyncStatus.go b/service/proton/api_op_GetTemplateSyncStatus.go index 34b6ec2d9e3..379e8ddd029 100644 --- a/service/proton/api_op_GetTemplateSyncStatus.go +++ b/service/proton/api_op_GetTemplateSyncStatus.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetTemplateSyncStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateSyncStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_ListComponentOutputs.go b/service/proton/api_op_ListComponentOutputs.go index 94d5a30ee44..49ab0dce79e 100644 --- a/service/proton/api_op_ListComponentOutputs.go +++ b/service/proton/api_op_ListComponentOutputs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListComponentOutputsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComponentOutputsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListComponentOutputsMiddlewares(stack *middleware.S return nil } -// ListComponentOutputsAPIClient is a client that implements the -// ListComponentOutputs operation. -type ListComponentOutputsAPIClient interface { - ListComponentOutputs(context.Context, *ListComponentOutputsInput, ...func(*Options)) (*ListComponentOutputsOutput, error) -} - -var _ ListComponentOutputsAPIClient = (*Client)(nil) - // ListComponentOutputsPaginatorOptions is the paginator options for // ListComponentOutputs type ListComponentOutputsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListComponentOutputsPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponentOutputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListComponentOutputsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListComponentOutputsAPIClient is a client that implements the +// ListComponentOutputs operation. +type ListComponentOutputsAPIClient interface { + ListComponentOutputs(context.Context, *ListComponentOutputsInput, ...func(*Options)) (*ListComponentOutputsOutput, error) +} + +var _ ListComponentOutputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponentOutputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListComponentProvisionedResources.go b/service/proton/api_op_ListComponentProvisionedResources.go index 7f1e6e64145..33a587ecd80 100644 --- a/service/proton/api_op_ListComponentProvisionedResources.go +++ b/service/proton/api_op_ListComponentProvisionedResources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListComponentProvisionedResourcesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListComponentProvisionedResourcesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListComponentProvisionedResourcesMiddlewares(stack return nil } -// ListComponentProvisionedResourcesAPIClient is a client that implements the -// ListComponentProvisionedResources operation. -type ListComponentProvisionedResourcesAPIClient interface { - ListComponentProvisionedResources(context.Context, *ListComponentProvisionedResourcesInput, ...func(*Options)) (*ListComponentProvisionedResourcesOutput, error) -} - -var _ ListComponentProvisionedResourcesAPIClient = (*Client)(nil) - // ListComponentProvisionedResourcesPaginatorOptions is the paginator options for // ListComponentProvisionedResources type ListComponentProvisionedResourcesPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListComponentProvisionedResourcesPaginator) NextPage(ctx context.Contex params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponentProvisionedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListComponentProvisionedResourcesPaginator) NextPage(ctx context.Contex return result, nil } +// ListComponentProvisionedResourcesAPIClient is a client that implements the +// ListComponentProvisionedResources operation. +type ListComponentProvisionedResourcesAPIClient interface { + ListComponentProvisionedResources(context.Context, *ListComponentProvisionedResourcesInput, ...func(*Options)) (*ListComponentProvisionedResourcesOutput, error) +} + +var _ ListComponentProvisionedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponentProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListComponents.go b/service/proton/api_op_ListComponents.go index 75a3321096f..1c079f53c0d 100644 --- a/service/proton/api_op_ListComponents.go +++ b/service/proton/api_op_ListComponents.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponents(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum number of components to list. @@ -223,6 +218,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListDeployments.go b/service/proton/api_op_ListDeployments.go index ddb1629d239..25e77a21e34 100644 --- a/service/proton/api_op_ListDeployments.go +++ b/service/proton/api_op_ListDeployments.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeployments(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListDeploymentsMiddlewares(stack *middleware.Stack, return nil } -// ListDeploymentsAPIClient is a client that implements the ListDeployments -// operation. -type ListDeploymentsAPIClient interface { - ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) -} - -var _ ListDeploymentsAPIClient = (*Client)(nil) - // ListDeploymentsPaginatorOptions is the paginator options for ListDeployments type ListDeploymentsPaginatorOptions struct { // The maximum number of deployments to list. @@ -223,6 +218,9 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListDeploymentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDeploymentsAPIClient is a client that implements the ListDeployments +// operation. +type ListDeploymentsAPIClient interface { + ListDeployments(context.Context, *ListDeploymentsInput, ...func(*Options)) (*ListDeploymentsOutput, error) +} + +var _ ListDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListEnvironmentAccountConnections.go b/service/proton/api_op_ListEnvironmentAccountConnections.go index ad89d7e2127..10a1250c2a4 100644 --- a/service/proton/api_op_ListEnvironmentAccountConnections.go +++ b/service/proton/api_op_ListEnvironmentAccountConnections.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListEnvironmentAccountConnectionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentAccountConnectionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListEnvironmentAccountConnectionsMiddlewares(stack return nil } -// ListEnvironmentAccountConnectionsAPIClient is a client that implements the -// ListEnvironmentAccountConnections operation. -type ListEnvironmentAccountConnectionsAPIClient interface { - ListEnvironmentAccountConnections(context.Context, *ListEnvironmentAccountConnectionsInput, ...func(*Options)) (*ListEnvironmentAccountConnectionsOutput, error) -} - -var _ ListEnvironmentAccountConnectionsAPIClient = (*Client)(nil) - // ListEnvironmentAccountConnectionsPaginatorOptions is the paginator options for // ListEnvironmentAccountConnections type ListEnvironmentAccountConnectionsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListEnvironmentAccountConnectionsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentAccountConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListEnvironmentAccountConnectionsPaginator) NextPage(ctx context.Contex return result, nil } +// ListEnvironmentAccountConnectionsAPIClient is a client that implements the +// ListEnvironmentAccountConnections operation. +type ListEnvironmentAccountConnectionsAPIClient interface { + ListEnvironmentAccountConnections(context.Context, *ListEnvironmentAccountConnectionsInput, ...func(*Options)) (*ListEnvironmentAccountConnectionsOutput, error) +} + +var _ ListEnvironmentAccountConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentAccountConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListEnvironmentOutputs.go b/service/proton/api_op_ListEnvironmentOutputs.go index 5cae7e6fc60..76d75f6071b 100644 --- a/service/proton/api_op_ListEnvironmentOutputs.go +++ b/service/proton/api_op_ListEnvironmentOutputs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListEnvironmentOutputsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentOutputsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListEnvironmentOutputsMiddlewares(stack *middleware return nil } -// ListEnvironmentOutputsAPIClient is a client that implements the -// ListEnvironmentOutputs operation. -type ListEnvironmentOutputsAPIClient interface { - ListEnvironmentOutputs(context.Context, *ListEnvironmentOutputsInput, ...func(*Options)) (*ListEnvironmentOutputsOutput, error) -} - -var _ ListEnvironmentOutputsAPIClient = (*Client)(nil) - // ListEnvironmentOutputsPaginatorOptions is the paginator options for // ListEnvironmentOutputs type ListEnvironmentOutputsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListEnvironmentOutputsPaginator) NextPage(ctx context.Context, optFns . params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentOutputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListEnvironmentOutputsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListEnvironmentOutputsAPIClient is a client that implements the +// ListEnvironmentOutputs operation. +type ListEnvironmentOutputsAPIClient interface { + ListEnvironmentOutputs(context.Context, *ListEnvironmentOutputsInput, ...func(*Options)) (*ListEnvironmentOutputsOutput, error) +} + +var _ ListEnvironmentOutputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentOutputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListEnvironmentProvisionedResources.go b/service/proton/api_op_ListEnvironmentProvisionedResources.go index 2cbecf62e9d..421faccd09b 100644 --- a/service/proton/api_op_ListEnvironmentProvisionedResources.go +++ b/service/proton/api_op_ListEnvironmentProvisionedResources.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListEnvironmentProvisionedResourcesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentProvisionedResourcesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListEnvironmentProvisionedResourcesMiddlewares(stac return nil } -// ListEnvironmentProvisionedResourcesAPIClient is a client that implements the -// ListEnvironmentProvisionedResources operation. -type ListEnvironmentProvisionedResourcesAPIClient interface { - ListEnvironmentProvisionedResources(context.Context, *ListEnvironmentProvisionedResourcesInput, ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) -} - -var _ ListEnvironmentProvisionedResourcesAPIClient = (*Client)(nil) - // ListEnvironmentProvisionedResourcesPaginatorOptions is the paginator options // for ListEnvironmentProvisionedResources type ListEnvironmentProvisionedResourcesPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListEnvironmentProvisionedResourcesPaginator) NextPage(ctx context.Cont params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentProvisionedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListEnvironmentProvisionedResourcesPaginator) NextPage(ctx context.Cont return result, nil } +// ListEnvironmentProvisionedResourcesAPIClient is a client that implements the +// ListEnvironmentProvisionedResources operation. +type ListEnvironmentProvisionedResourcesAPIClient interface { + ListEnvironmentProvisionedResources(context.Context, *ListEnvironmentProvisionedResourcesInput, ...func(*Options)) (*ListEnvironmentProvisionedResourcesOutput, error) +} + +var _ ListEnvironmentProvisionedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListEnvironmentTemplateVersions.go b/service/proton/api_op_ListEnvironmentTemplateVersions.go index c7d3b063835..8401d605a71 100644 --- a/service/proton/api_op_ListEnvironmentTemplateVersions.go +++ b/service/proton/api_op_ListEnvironmentTemplateVersions.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListEnvironmentTemplateVersionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentTemplateVersionsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListEnvironmentTemplateVersionsMiddlewares(stack *m return nil } -// ListEnvironmentTemplateVersionsAPIClient is a client that implements the -// ListEnvironmentTemplateVersions operation. -type ListEnvironmentTemplateVersionsAPIClient interface { - ListEnvironmentTemplateVersions(context.Context, *ListEnvironmentTemplateVersionsInput, ...func(*Options)) (*ListEnvironmentTemplateVersionsOutput, error) -} - -var _ ListEnvironmentTemplateVersionsAPIClient = (*Client)(nil) - // ListEnvironmentTemplateVersionsPaginatorOptions is the paginator options for // ListEnvironmentTemplateVersions type ListEnvironmentTemplateVersionsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListEnvironmentTemplateVersionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentTemplateVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListEnvironmentTemplateVersionsPaginator) NextPage(ctx context.Context, return result, nil } +// ListEnvironmentTemplateVersionsAPIClient is a client that implements the +// ListEnvironmentTemplateVersions operation. +type ListEnvironmentTemplateVersionsAPIClient interface { + ListEnvironmentTemplateVersions(context.Context, *ListEnvironmentTemplateVersionsInput, ...func(*Options)) (*ListEnvironmentTemplateVersionsOutput, error) +} + +var _ ListEnvironmentTemplateVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListEnvironmentTemplates.go b/service/proton/api_op_ListEnvironmentTemplates.go index 80380a5a23b..b39375b5a4c 100644 --- a/service/proton/api_op_ListEnvironmentTemplates.go +++ b/service/proton/api_op_ListEnvironmentTemplates.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListEnvironmentTemplatesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnvironmentTemplates(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListEnvironmentTemplatesMiddlewares(stack *middlewa return nil } -// ListEnvironmentTemplatesAPIClient is a client that implements the -// ListEnvironmentTemplates operation. -type ListEnvironmentTemplatesAPIClient interface { - ListEnvironmentTemplates(context.Context, *ListEnvironmentTemplatesInput, ...func(*Options)) (*ListEnvironmentTemplatesOutput, error) -} - -var _ ListEnvironmentTemplatesAPIClient = (*Client)(nil) - // ListEnvironmentTemplatesPaginatorOptions is the paginator options for // ListEnvironmentTemplates type ListEnvironmentTemplatesPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListEnvironmentTemplatesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironmentTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListEnvironmentTemplatesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEnvironmentTemplatesAPIClient is a client that implements the +// ListEnvironmentTemplates operation. +type ListEnvironmentTemplatesAPIClient interface { + ListEnvironmentTemplates(context.Context, *ListEnvironmentTemplatesInput, ...func(*Options)) (*ListEnvironmentTemplatesOutput, error) +} + +var _ ListEnvironmentTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironmentTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListEnvironments.go b/service/proton/api_op_ListEnvironments.go index d4693b3a9b8..cee76606eaa 100644 --- a/service/proton/api_op_ListEnvironments.go +++ b/service/proton/api_op_ListEnvironments.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEnvironmentsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of environments to list. @@ -212,6 +207,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListRepositories.go b/service/proton/api_op_ListRepositories.go index 710a0d57488..317da2483c6 100644 --- a/service/proton/api_op_ListRepositories.go +++ b/service/proton/api_op_ListRepositories.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRepositories(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListRepositoriesMiddlewares(stack *middleware.Stack return nil } -// ListRepositoriesAPIClient is a client that implements the ListRepositories -// operation. -type ListRepositoriesAPIClient interface { - ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) -} - -var _ ListRepositoriesAPIClient = (*Client)(nil) - // ListRepositoriesPaginatorOptions is the paginator options for ListRepositories type ListRepositoriesPaginatorOptions struct { // The maximum number of repositories to list. @@ -206,6 +201,9 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListRepositoriesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRepositoriesAPIClient is a client that implements the ListRepositories +// operation. +type ListRepositoriesAPIClient interface { + ListRepositories(context.Context, *ListRepositoriesInput, ...func(*Options)) (*ListRepositoriesOutput, error) +} + +var _ ListRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListRepositorySyncDefinitions.go b/service/proton/api_op_ListRepositorySyncDefinitions.go index 9021b0820df..8b5ac84376d 100644 --- a/service/proton/api_op_ListRepositorySyncDefinitions.go +++ b/service/proton/api_op_ListRepositorySyncDefinitions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListRepositorySyncDefinitionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRepositorySyncDefinitionsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListRepositorySyncDefinitionsMiddlewares(stack *mid return nil } -// ListRepositorySyncDefinitionsAPIClient is a client that implements the -// ListRepositorySyncDefinitions operation. -type ListRepositorySyncDefinitionsAPIClient interface { - ListRepositorySyncDefinitions(context.Context, *ListRepositorySyncDefinitionsInput, ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) -} - -var _ ListRepositorySyncDefinitionsAPIClient = (*Client)(nil) - // ListRepositorySyncDefinitionsPaginatorOptions is the paginator options for // ListRepositorySyncDefinitions type ListRepositorySyncDefinitionsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListRepositorySyncDefinitionsPaginator) NextPage(ctx context.Context, o params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRepositorySyncDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListRepositorySyncDefinitionsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListRepositorySyncDefinitionsAPIClient is a client that implements the +// ListRepositorySyncDefinitions operation. +type ListRepositorySyncDefinitionsAPIClient interface { + ListRepositorySyncDefinitions(context.Context, *ListRepositorySyncDefinitionsInput, ...func(*Options)) (*ListRepositorySyncDefinitionsOutput, error) +} + +var _ ListRepositorySyncDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRepositorySyncDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServiceInstanceOutputs.go b/service/proton/api_op_ListServiceInstanceOutputs.go index 8430e86a4d9..e02fb096b44 100644 --- a/service/proton/api_op_ListServiceInstanceOutputs.go +++ b/service/proton/api_op_ListServiceInstanceOutputs.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListServiceInstanceOutputsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceInstanceOutputsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListServiceInstanceOutputsMiddlewares(stack *middle return nil } -// ListServiceInstanceOutputsAPIClient is a client that implements the -// ListServiceInstanceOutputs operation. -type ListServiceInstanceOutputsAPIClient interface { - ListServiceInstanceOutputs(context.Context, *ListServiceInstanceOutputsInput, ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) -} - -var _ ListServiceInstanceOutputsAPIClient = (*Client)(nil) - // ListServiceInstanceOutputsPaginatorOptions is the paginator options for // ListServiceInstanceOutputs type ListServiceInstanceOutputsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListServiceInstanceOutputsPaginator) NextPage(ctx context.Context, optF params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceInstanceOutputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListServiceInstanceOutputsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListServiceInstanceOutputsAPIClient is a client that implements the +// ListServiceInstanceOutputs operation. +type ListServiceInstanceOutputsAPIClient interface { + ListServiceInstanceOutputs(context.Context, *ListServiceInstanceOutputsInput, ...func(*Options)) (*ListServiceInstanceOutputsOutput, error) +} + +var _ ListServiceInstanceOutputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceInstanceOutputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServiceInstanceProvisionedResources.go b/service/proton/api_op_ListServiceInstanceProvisionedResources.go index 0dee4cd5713..4383beabc7b 100644 --- a/service/proton/api_op_ListServiceInstanceProvisionedResources.go +++ b/service/proton/api_op_ListServiceInstanceProvisionedResources.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListServiceInstanceProvisionedResourcesMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceInstanceProvisionedResourcesValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListServiceInstanceProvisionedResourcesMiddlewares( return nil } -// ListServiceInstanceProvisionedResourcesAPIClient is a client that implements -// the ListServiceInstanceProvisionedResources operation. -type ListServiceInstanceProvisionedResourcesAPIClient interface { - ListServiceInstanceProvisionedResources(context.Context, *ListServiceInstanceProvisionedResourcesInput, ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) -} - -var _ ListServiceInstanceProvisionedResourcesAPIClient = (*Client)(nil) - // ListServiceInstanceProvisionedResourcesPaginatorOptions is the paginator // options for ListServiceInstanceProvisionedResources type ListServiceInstanceProvisionedResourcesPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListServiceInstanceProvisionedResourcesPaginator) NextPage(ctx context. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceInstanceProvisionedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListServiceInstanceProvisionedResourcesPaginator) NextPage(ctx context. return result, nil } +// ListServiceInstanceProvisionedResourcesAPIClient is a client that implements +// the ListServiceInstanceProvisionedResources operation. +type ListServiceInstanceProvisionedResourcesAPIClient interface { + ListServiceInstanceProvisionedResources(context.Context, *ListServiceInstanceProvisionedResourcesInput, ...func(*Options)) (*ListServiceInstanceProvisionedResourcesOutput, error) +} + +var _ ListServiceInstanceProvisionedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceInstanceProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServiceInstances.go b/service/proton/api_op_ListServiceInstances.go index 8985bf16fa3..30203fc00cb 100644 --- a/service/proton/api_op_ListServiceInstances.go +++ b/service/proton/api_op_ListServiceInstances.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListServiceInstancesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceInstances(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListServiceInstancesMiddlewares(stack *middleware.S return nil } -// ListServiceInstancesAPIClient is a client that implements the -// ListServiceInstances operation. -type ListServiceInstancesAPIClient interface { - ListServiceInstances(context.Context, *ListServiceInstancesInput, ...func(*Options)) (*ListServiceInstancesOutput, error) -} - -var _ ListServiceInstancesAPIClient = (*Client)(nil) - // ListServiceInstancesPaginatorOptions is the paginator options for // ListServiceInstances type ListServiceInstancesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListServiceInstancesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListServiceInstancesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListServiceInstancesAPIClient is a client that implements the +// ListServiceInstances operation. +type ListServiceInstancesAPIClient interface { + ListServiceInstances(context.Context, *ListServiceInstancesInput, ...func(*Options)) (*ListServiceInstancesOutput, error) +} + +var _ ListServiceInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServicePipelineOutputs.go b/service/proton/api_op_ListServicePipelineOutputs.go index 36171809680..2353b6f0475 100644 --- a/service/proton/api_op_ListServicePipelineOutputs.go +++ b/service/proton/api_op_ListServicePipelineOutputs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListServicePipelineOutputsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicePipelineOutputsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListServicePipelineOutputsMiddlewares(stack *middle return nil } -// ListServicePipelineOutputsAPIClient is a client that implements the -// ListServicePipelineOutputs operation. -type ListServicePipelineOutputsAPIClient interface { - ListServicePipelineOutputs(context.Context, *ListServicePipelineOutputsInput, ...func(*Options)) (*ListServicePipelineOutputsOutput, error) -} - -var _ ListServicePipelineOutputsAPIClient = (*Client)(nil) - // ListServicePipelineOutputsPaginatorOptions is the paginator options for // ListServicePipelineOutputs type ListServicePipelineOutputsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListServicePipelineOutputsPaginator) NextPage(ctx context.Context, optF params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServicePipelineOutputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListServicePipelineOutputsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListServicePipelineOutputsAPIClient is a client that implements the +// ListServicePipelineOutputs operation. +type ListServicePipelineOutputsAPIClient interface { + ListServicePipelineOutputs(context.Context, *ListServicePipelineOutputsInput, ...func(*Options)) (*ListServicePipelineOutputsOutput, error) +} + +var _ ListServicePipelineOutputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServicePipelineOutputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServicePipelineProvisionedResources.go b/service/proton/api_op_ListServicePipelineProvisionedResources.go index 9659b333c2c..15a305eb33d 100644 --- a/service/proton/api_op_ListServicePipelineProvisionedResources.go +++ b/service/proton/api_op_ListServicePipelineProvisionedResources.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListServicePipelineProvisionedResourcesMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicePipelineProvisionedResourcesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListServicePipelineProvisionedResourcesMiddlewares( return nil } -// ListServicePipelineProvisionedResourcesAPIClient is a client that implements -// the ListServicePipelineProvisionedResources operation. -type ListServicePipelineProvisionedResourcesAPIClient interface { - ListServicePipelineProvisionedResources(context.Context, *ListServicePipelineProvisionedResourcesInput, ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) -} - -var _ ListServicePipelineProvisionedResourcesAPIClient = (*Client)(nil) - // ListServicePipelineProvisionedResourcesPaginatorOptions is the paginator // options for ListServicePipelineProvisionedResources type ListServicePipelineProvisionedResourcesPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListServicePipelineProvisionedResourcesPaginator) NextPage(ctx context. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServicePipelineProvisionedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListServicePipelineProvisionedResourcesPaginator) NextPage(ctx context. return result, nil } +// ListServicePipelineProvisionedResourcesAPIClient is a client that implements +// the ListServicePipelineProvisionedResources operation. +type ListServicePipelineProvisionedResourcesAPIClient interface { + ListServicePipelineProvisionedResources(context.Context, *ListServicePipelineProvisionedResourcesInput, ...func(*Options)) (*ListServicePipelineProvisionedResourcesOutput, error) +} + +var _ ListServicePipelineProvisionedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServicePipelineProvisionedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServiceTemplateVersions.go b/service/proton/api_op_ListServiceTemplateVersions.go index 7db1f9b5ab9..3a9dda4264d 100644 --- a/service/proton/api_op_ListServiceTemplateVersions.go +++ b/service/proton/api_op_ListServiceTemplateVersions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListServiceTemplateVersionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceTemplateVersionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListServiceTemplateVersionsMiddlewares(stack *middl return nil } -// ListServiceTemplateVersionsAPIClient is a client that implements the -// ListServiceTemplateVersions operation. -type ListServiceTemplateVersionsAPIClient interface { - ListServiceTemplateVersions(context.Context, *ListServiceTemplateVersionsInput, ...func(*Options)) (*ListServiceTemplateVersionsOutput, error) -} - -var _ ListServiceTemplateVersionsAPIClient = (*Client)(nil) - // ListServiceTemplateVersionsPaginatorOptions is the paginator options for // ListServiceTemplateVersions type ListServiceTemplateVersionsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListServiceTemplateVersionsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceTemplateVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListServiceTemplateVersionsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListServiceTemplateVersionsAPIClient is a client that implements the +// ListServiceTemplateVersions operation. +type ListServiceTemplateVersionsAPIClient interface { + ListServiceTemplateVersions(context.Context, *ListServiceTemplateVersionsInput, ...func(*Options)) (*ListServiceTemplateVersionsOutput, error) +} + +var _ ListServiceTemplateVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServiceTemplates.go b/service/proton/api_op_ListServiceTemplates.go index e97a4fdae8c..6a79d3804b4 100644 --- a/service/proton/api_op_ListServiceTemplates.go +++ b/service/proton/api_op_ListServiceTemplates.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListServiceTemplatesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceTemplates(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListServiceTemplatesMiddlewares(stack *middleware.S return nil } -// ListServiceTemplatesAPIClient is a client that implements the -// ListServiceTemplates operation. -type ListServiceTemplatesAPIClient interface { - ListServiceTemplates(context.Context, *ListServiceTemplatesInput, ...func(*Options)) (*ListServiceTemplatesOutput, error) -} - -var _ ListServiceTemplatesAPIClient = (*Client)(nil) - // ListServiceTemplatesPaginatorOptions is the paginator options for // ListServiceTemplates type ListServiceTemplatesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListServiceTemplatesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListServiceTemplatesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListServiceTemplatesAPIClient is a client that implements the +// ListServiceTemplates operation. +type ListServiceTemplatesAPIClient interface { + ListServiceTemplates(context.Context, *ListServiceTemplatesInput, ...func(*Options)) (*ListServiceTemplatesOutput, error) +} + +var _ ListServiceTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListServices.go b/service/proton/api_op_ListServices.go index 8412999109d..181035fee3c 100644 --- a/service/proton/api_op_ListServices.go +++ b/service/proton/api_op_ListServices.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServices(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of services to list. @@ -205,6 +201,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_ListTagsForResource.go b/service/proton/api_op_ListTagsForResource.go index 3b37750f122..bf31fbe9770 100644 --- a/service/proton/api_op_ListTagsForResource.go +++ b/service/proton/api_op_ListTagsForResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/proton/api_op_NotifyResourceDeploymentStatusChange.go b/service/proton/api_op_NotifyResourceDeploymentStatusChange.go index 087bbbb7051..f86bfab6bdb 100644 --- a/service/proton/api_op_NotifyResourceDeploymentStatusChange.go +++ b/service/proton/api_op_NotifyResourceDeploymentStatusChange.go @@ -119,6 +119,9 @@ func (c *Client) addOperationNotifyResourceDeploymentStatusChangeMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyResourceDeploymentStatusChangeValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_RejectEnvironmentAccountConnection.go b/service/proton/api_op_RejectEnvironmentAccountConnection.go index c1a55e44e64..baaa6455296 100644 --- a/service/proton/api_op_RejectEnvironmentAccountConnection.go +++ b/service/proton/api_op_RejectEnvironmentAccountConnection.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRejectEnvironmentAccountConnectionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectEnvironmentAccountConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_TagResource.go b/service/proton/api_op_TagResource.go index 330722740da..ad3b1b0ec62 100644 --- a/service/proton/api_op_TagResource.go +++ b/service/proton/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UntagResource.go b/service/proton/api_op_UntagResource.go index a79fc023711..e0f1fc956d6 100644 --- a/service/proton/api_op_UntagResource.go +++ b/service/proton/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateAccountSettings.go b/service/proton/api_op_UpdateAccountSettings.go index 6e0ea010d9f..c5d259a7c3b 100644 --- a/service/proton/api_op_UpdateAccountSettings.go +++ b/service/proton/api_op_UpdateAccountSettings.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccountSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateComponent.go b/service/proton/api_op_UpdateComponent.go index a0c4ceff1e9..7b8c6ce97cb 100644 --- a/service/proton/api_op_UpdateComponent.go +++ b/service/proton/api_op_UpdateComponent.go @@ -169,6 +169,9 @@ func (c *Client) addOperationUpdateComponentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_UpdateEnvironment.go b/service/proton/api_op_UpdateEnvironment.go index 4ef69652956..7718f9ca135 100644 --- a/service/proton/api_op_UpdateEnvironment.go +++ b/service/proton/api_op_UpdateEnvironment.go @@ -242,6 +242,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateEnvironmentAccountConnection.go b/service/proton/api_op_UpdateEnvironmentAccountConnection.go index a9a17f88eeb..1ff9a0b2fa5 100644 --- a/service/proton/api_op_UpdateEnvironmentAccountConnection.go +++ b/service/proton/api_op_UpdateEnvironmentAccountConnection.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateEnvironmentAccountConnectionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentAccountConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateEnvironmentTemplate.go b/service/proton/api_op_UpdateEnvironmentTemplate.go index 25a05b75bf4..46ab3a678db 100644 --- a/service/proton/api_op_UpdateEnvironmentTemplate.go +++ b/service/proton/api_op_UpdateEnvironmentTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateEnvironmentTemplateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateEnvironmentTemplateVersion.go b/service/proton/api_op_UpdateEnvironmentTemplateVersion.go index 9a73b48399d..0c6ff7f2382 100644 --- a/service/proton/api_op_UpdateEnvironmentTemplateVersion.go +++ b/service/proton/api_op_UpdateEnvironmentTemplateVersion.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateEnvironmentTemplateVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEnvironmentTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateService.go b/service/proton/api_op_UpdateService.go index fdab474f232..b48fd0a8598 100644 --- a/service/proton/api_op_UpdateService.go +++ b/service/proton/api_op_UpdateService.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateServiceInstance.go b/service/proton/api_op_UpdateServiceInstance.go index 1ed115869db..c3b41f8f2b2 100644 --- a/service/proton/api_op_UpdateServiceInstance.go +++ b/service/proton/api_op_UpdateServiceInstance.go @@ -168,6 +168,9 @@ func (c *Client) addOperationUpdateServiceInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateServiceInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/proton/api_op_UpdateServicePipeline.go b/service/proton/api_op_UpdateServicePipeline.go index 113ac721ef3..a08a60b98b5 100644 --- a/service/proton/api_op_UpdateServicePipeline.go +++ b/service/proton/api_op_UpdateServicePipeline.go @@ -184,6 +184,9 @@ func (c *Client) addOperationUpdateServicePipelineMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServicePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateServiceSyncBlocker.go b/service/proton/api_op_UpdateServiceSyncBlocker.go index 0fe2c152399..0dbc49f0859 100644 --- a/service/proton/api_op_UpdateServiceSyncBlocker.go +++ b/service/proton/api_op_UpdateServiceSyncBlocker.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateServiceSyncBlockerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSyncBlockerValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateServiceSyncConfig.go b/service/proton/api_op_UpdateServiceSyncConfig.go index 5f30b58e5d6..070325e0e6b 100644 --- a/service/proton/api_op_UpdateServiceSyncConfig.go +++ b/service/proton/api_op_UpdateServiceSyncConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateServiceSyncConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateServiceTemplate.go b/service/proton/api_op_UpdateServiceTemplate.go index 0fcdb145ef8..e293317b6ac 100644 --- a/service/proton/api_op_UpdateServiceTemplate.go +++ b/service/proton/api_op_UpdateServiceTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateServiceTemplateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateServiceTemplateVersion.go b/service/proton/api_op_UpdateServiceTemplateVersion.go index 5189007c1f5..bf3c109d9ae 100644 --- a/service/proton/api_op_UpdateServiceTemplateVersion.go +++ b/service/proton/api_op_UpdateServiceTemplateVersion.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateServiceTemplateVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceTemplateVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/proton/api_op_UpdateTemplateSyncConfig.go b/service/proton/api_op_UpdateTemplateSyncConfig.go index 5b29216682b..aabb9bc4305 100644 --- a/service/proton/api_op_UpdateTemplateSyncConfig.go +++ b/service/proton/api_op_UpdateTemplateSyncConfig.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateTemplateSyncConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateSyncConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_client.go b/service/qbusiness/api_client.go index 95e31258fb4..a5ecd86bbba 100644 --- a/service/qbusiness/api_client.go +++ b/service/qbusiness/api_client.go @@ -456,6 +456,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -548,6 +572,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/qbusiness/api_op_BatchDeleteDocument.go b/service/qbusiness/api_op_BatchDeleteDocument.go index f68901a0659..ac889edcd72 100644 --- a/service/qbusiness/api_op_BatchDeleteDocument.go +++ b/service/qbusiness/api_op_BatchDeleteDocument.go @@ -126,6 +126,9 @@ func (c *Client) addOperationBatchDeleteDocumentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_BatchPutDocument.go b/service/qbusiness/api_op_BatchPutDocument.go index b5ca7eef7d2..c66ad717e9c 100644 --- a/service/qbusiness/api_op_BatchPutDocument.go +++ b/service/qbusiness/api_op_BatchPutDocument.go @@ -138,6 +138,9 @@ func (c *Client) addOperationBatchPutDocumentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_Chat.go b/service/qbusiness/api_op_Chat.go index 5794d584089..8979c2448fd 100644 --- a/service/qbusiness/api_op_Chat.go +++ b/service/qbusiness/api_op_Chat.go @@ -132,6 +132,9 @@ func (c *Client) addOperationChatMiddlewares(stack *middleware.Stack, options Op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opChatMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_ChatSync.go b/service/qbusiness/api_op_ChatSync.go index 8be2c0860e1..a399ec602bf 100644 --- a/service/qbusiness/api_op_ChatSync.go +++ b/service/qbusiness/api_op_ChatSync.go @@ -188,6 +188,9 @@ func (c *Client) addOperationChatSyncMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opChatSyncMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreateApplication.go b/service/qbusiness/api_op_CreateApplication.go index 55976078352..c946906ec31 100644 --- a/service/qbusiness/api_op_CreateApplication.go +++ b/service/qbusiness/api_op_CreateApplication.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreateDataSource.go b/service/qbusiness/api_op_CreateDataSource.go index 38787f5ade4..5e349215150 100644 --- a/service/qbusiness/api_op_CreateDataSource.go +++ b/service/qbusiness/api_op_CreateDataSource.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDataSourceMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreateIndex.go b/service/qbusiness/api_op_CreateIndex.go index 09a1d313ae9..435bc4faf27 100644 --- a/service/qbusiness/api_op_CreateIndex.go +++ b/service/qbusiness/api_op_CreateIndex.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIndexMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreatePlugin.go b/service/qbusiness/api_op_CreatePlugin.go index 12e829bede9..ba1182692c9 100644 --- a/service/qbusiness/api_op_CreatePlugin.go +++ b/service/qbusiness/api_op_CreatePlugin.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreatePluginMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePluginMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreateRetriever.go b/service/qbusiness/api_op_CreateRetriever.go index ba44aec9d0a..de590371444 100644 --- a/service/qbusiness/api_op_CreateRetriever.go +++ b/service/qbusiness/api_op_CreateRetriever.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateRetrieverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRetrieverMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreateUser.go b/service/qbusiness/api_op_CreateUser.go index 1577f8c987d..1f9c7d993b0 100644 --- a/service/qbusiness/api_op_CreateUser.go +++ b/service/qbusiness/api_op_CreateUser.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateUserMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_CreateWebExperience.go b/service/qbusiness/api_op_CreateWebExperience.go index ca3012cac73..796fb742130 100644 --- a/service/qbusiness/api_op_CreateWebExperience.go +++ b/service/qbusiness/api_op_CreateWebExperience.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateWebExperienceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWebExperienceMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteApplication.go b/service/qbusiness/api_op_DeleteApplication.go index 664f248219f..385663ba16a 100644 --- a/service/qbusiness/api_op_DeleteApplication.go +++ b/service/qbusiness/api_op_DeleteApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteChatControlsConfiguration.go b/service/qbusiness/api_op_DeleteChatControlsConfiguration.go index 4c80ef217f9..22058233cd0 100644 --- a/service/qbusiness/api_op_DeleteChatControlsConfiguration.go +++ b/service/qbusiness/api_op_DeleteChatControlsConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteChatControlsConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChatControlsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteConversation.go b/service/qbusiness/api_op_DeleteConversation.go index a8c16764195..ebdaaa98e91 100644 --- a/service/qbusiness/api_op_DeleteConversation.go +++ b/service/qbusiness/api_op_DeleteConversation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteConversationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConversationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteDataSource.go b/service/qbusiness/api_op_DeleteDataSource.go index b09faba7b2c..3122ef21841 100644 --- a/service/qbusiness/api_op_DeleteDataSource.go +++ b/service/qbusiness/api_op_DeleteDataSource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteGroup.go b/service/qbusiness/api_op_DeleteGroup.go index 6c7102a1d66..a5ac9003d38 100644 --- a/service/qbusiness/api_op_DeleteGroup.go +++ b/service/qbusiness/api_op_DeleteGroup.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteIndex.go b/service/qbusiness/api_op_DeleteIndex.go index 79618627ff4..95f8416ebb8 100644 --- a/service/qbusiness/api_op_DeleteIndex.go +++ b/service/qbusiness/api_op_DeleteIndex.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeletePlugin.go b/service/qbusiness/api_op_DeletePlugin.go index 58396ef9230..2f402914ff2 100644 --- a/service/qbusiness/api_op_DeletePlugin.go +++ b/service/qbusiness/api_op_DeletePlugin.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePluginMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePluginValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteRetriever.go b/service/qbusiness/api_op_DeleteRetriever.go index 1a831d5f663..01bc2ee3dd9 100644 --- a/service/qbusiness/api_op_DeleteRetriever.go +++ b/service/qbusiness/api_op_DeleteRetriever.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRetrieverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRetrieverValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteUser.go b/service/qbusiness/api_op_DeleteUser.go index a135083ef74..8f886c672ad 100644 --- a/service/qbusiness/api_op_DeleteUser.go +++ b/service/qbusiness/api_op_DeleteUser.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_DeleteWebExperience.go b/service/qbusiness/api_op_DeleteWebExperience.go index 7c9ae05bd7c..2342adfe02a 100644 --- a/service/qbusiness/api_op_DeleteWebExperience.go +++ b/service/qbusiness/api_op_DeleteWebExperience.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteWebExperienceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetApplication.go b/service/qbusiness/api_op_GetApplication.go index 9fdae943cad..016f4117415 100644 --- a/service/qbusiness/api_op_GetApplication.go +++ b/service/qbusiness/api_op_GetApplication.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetChatControlsConfiguration.go b/service/qbusiness/api_op_GetChatControlsConfiguration.go index a71c326ed31..3b0938d9290 100644 --- a/service/qbusiness/api_op_GetChatControlsConfiguration.go +++ b/service/qbusiness/api_op_GetChatControlsConfiguration.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetChatControlsConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChatControlsConfigurationValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationGetChatControlsConfigurationMiddlewares(stack *midd return nil } -// GetChatControlsConfigurationAPIClient is a client that implements the -// GetChatControlsConfiguration operation. -type GetChatControlsConfigurationAPIClient interface { - GetChatControlsConfiguration(context.Context, *GetChatControlsConfigurationInput, ...func(*Options)) (*GetChatControlsConfigurationOutput, error) -} - -var _ GetChatControlsConfigurationAPIClient = (*Client)(nil) - // GetChatControlsConfigurationPaginatorOptions is the paginator options for // GetChatControlsConfiguration type GetChatControlsConfigurationPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *GetChatControlsConfigurationPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetChatControlsConfiguration(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *GetChatControlsConfigurationPaginator) NextPage(ctx context.Context, op return result, nil } +// GetChatControlsConfigurationAPIClient is a client that implements the +// GetChatControlsConfiguration operation. +type GetChatControlsConfigurationAPIClient interface { + GetChatControlsConfiguration(context.Context, *GetChatControlsConfigurationInput, ...func(*Options)) (*GetChatControlsConfigurationOutput, error) +} + +var _ GetChatControlsConfigurationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetChatControlsConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_GetDataSource.go b/service/qbusiness/api_op_GetDataSource.go index 74dfa71e281..3ba0b6d7366 100644 --- a/service/qbusiness/api_op_GetDataSource.go +++ b/service/qbusiness/api_op_GetDataSource.go @@ -173,6 +173,9 @@ func (c *Client) addOperationGetDataSourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetGroup.go b/service/qbusiness/api_op_GetGroup.go index fd1c2fee897..2e2f88ce274 100644 --- a/service/qbusiness/api_op_GetGroup.go +++ b/service/qbusiness/api_op_GetGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetIndex.go b/service/qbusiness/api_op_GetIndex.go index 7cff3a48ded..d93dd374b49 100644 --- a/service/qbusiness/api_op_GetIndex.go +++ b/service/qbusiness/api_op_GetIndex.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetIndexMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetPlugin.go b/service/qbusiness/api_op_GetPlugin.go index 2b7c01ff92e..5743891d457 100644 --- a/service/qbusiness/api_op_GetPlugin.go +++ b/service/qbusiness/api_op_GetPlugin.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetPluginMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPluginValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetRetriever.go b/service/qbusiness/api_op_GetRetriever.go index 024b7762095..95c269b1812 100644 --- a/service/qbusiness/api_op_GetRetriever.go +++ b/service/qbusiness/api_op_GetRetriever.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetRetrieverMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRetrieverValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetUser.go b/service/qbusiness/api_op_GetUser.go index 25c0e4dde9f..644377749d3 100644 --- a/service/qbusiness/api_op_GetUser.go +++ b/service/qbusiness/api_op_GetUser.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetUserMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_GetWebExperience.go b/service/qbusiness/api_op_GetWebExperience.go index 43591256c11..e20f444f447 100644 --- a/service/qbusiness/api_op_GetWebExperience.go +++ b/service/qbusiness/api_op_GetWebExperience.go @@ -164,6 +164,9 @@ func (c *Client) addOperationGetWebExperienceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_ListApplications.go b/service/qbusiness/api_op_ListApplications.go index ca31ac2e7a6..7c289afd90c 100644 --- a/service/qbusiness/api_op_ListApplications.go +++ b/service/qbusiness/api_op_ListApplications.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of Amazon Q Business applications to return. @@ -207,6 +202,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListConversations.go b/service/qbusiness/api_op_ListConversations.go index 430a03125ef..801b114896d 100644 --- a/service/qbusiness/api_op_ListConversations.go +++ b/service/qbusiness/api_op_ListConversations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListConversationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConversationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListConversationsMiddlewares(stack *middleware.Stac return nil } -// ListConversationsAPIClient is a client that implements the ListConversations -// operation. -type ListConversationsAPIClient interface { - ListConversations(context.Context, *ListConversationsInput, ...func(*Options)) (*ListConversationsOutput, error) -} - -var _ ListConversationsAPIClient = (*Client)(nil) - // ListConversationsPaginatorOptions is the paginator options for ListConversations type ListConversationsPaginatorOptions struct { // The maximum number of Amazon Q Business conversations to return. @@ -219,6 +214,9 @@ func (p *ListConversationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConversations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListConversationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListConversationsAPIClient is a client that implements the ListConversations +// operation. +type ListConversationsAPIClient interface { + ListConversations(context.Context, *ListConversationsInput, ...func(*Options)) (*ListConversationsOutput, error) +} + +var _ ListConversationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConversations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListDataSourceSyncJobs.go b/service/qbusiness/api_op_ListDataSourceSyncJobs.go index e095989cbad..bbc9e9adb47 100644 --- a/service/qbusiness/api_op_ListDataSourceSyncJobs.go +++ b/service/qbusiness/api_op_ListDataSourceSyncJobs.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListDataSourceSyncJobsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourceSyncJobsValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListDataSourceSyncJobsMiddlewares(stack *middleware return nil } -// ListDataSourceSyncJobsAPIClient is a client that implements the -// ListDataSourceSyncJobs operation. -type ListDataSourceSyncJobsAPIClient interface { - ListDataSourceSyncJobs(context.Context, *ListDataSourceSyncJobsInput, ...func(*Options)) (*ListDataSourceSyncJobsOutput, error) -} - -var _ ListDataSourceSyncJobsAPIClient = (*Client)(nil) - // ListDataSourceSyncJobsPaginatorOptions is the paginator options for // ListDataSourceSyncJobs type ListDataSourceSyncJobsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListDataSourceSyncJobsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSourceSyncJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListDataSourceSyncJobsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDataSourceSyncJobsAPIClient is a client that implements the +// ListDataSourceSyncJobs operation. +type ListDataSourceSyncJobsAPIClient interface { + ListDataSourceSyncJobs(context.Context, *ListDataSourceSyncJobsInput, ...func(*Options)) (*ListDataSourceSyncJobsOutput, error) +} + +var _ ListDataSourceSyncJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSourceSyncJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListDataSources.go b/service/qbusiness/api_op_ListDataSources.go index 594ba0589e2..087ac3c1d5d 100644 --- a/service/qbusiness/api_op_ListDataSources.go +++ b/service/qbusiness/api_op_ListDataSources.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListDataSourcesAPIClient is a client that implements the ListDataSources -// operation. -type ListDataSourcesAPIClient interface { - ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) -} - -var _ ListDataSourcesAPIClient = (*Client)(nil) - // ListDataSourcesPaginatorOptions is the paginator options for ListDataSources type ListDataSourcesPaginatorOptions struct { // The maximum number of data source connectors to return. @@ -221,6 +216,9 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDataSourcesAPIClient is a client that implements the ListDataSources +// operation. +type ListDataSourcesAPIClient interface { + ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) +} + +var _ ListDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListDocuments.go b/service/qbusiness/api_op_ListDocuments.go index dfe20101972..a97ba2d034e 100644 --- a/service/qbusiness/api_op_ListDocuments.go +++ b/service/qbusiness/api_op_ListDocuments.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDocumentsValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o return nil } -// ListDocumentsAPIClient is a client that implements the ListDocuments operation. -type ListDocumentsAPIClient interface { - ListDocuments(context.Context, *ListDocumentsInput, ...func(*Options)) (*ListDocumentsOutput, error) -} - -var _ ListDocumentsAPIClient = (*Client)(nil) - // ListDocumentsPaginatorOptions is the paginator options for ListDocuments type ListDocumentsPaginatorOptions struct { // The maximum number of documents to return. @@ -221,6 +217,9 @@ func (p *ListDocumentsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDocuments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListDocumentsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDocumentsAPIClient is a client that implements the ListDocuments operation. +type ListDocumentsAPIClient interface { + ListDocuments(context.Context, *ListDocumentsInput, ...func(*Options)) (*ListDocumentsOutput, error) +} + +var _ ListDocumentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDocuments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListGroups.go b/service/qbusiness/api_op_ListGroups.go index b80ecb5a4b1..4c89bbca8b2 100644 --- a/service/qbusiness/api_op_ListGroups.go +++ b/service/qbusiness/api_op_ListGroups.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The maximum number of returned groups that are mapped to users. @@ -229,6 +225,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListIndices.go b/service/qbusiness/api_op_ListIndices.go index 3055ea082ed..8204c32bd68 100644 --- a/service/qbusiness/api_op_ListIndices.go +++ b/service/qbusiness/api_op_ListIndices.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIndicesValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListIndicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListIndicesAPIClient is a client that implements the ListIndices operation. -type ListIndicesAPIClient interface { - ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) -} - -var _ ListIndicesAPIClient = (*Client)(nil) - // ListIndicesPaginatorOptions is the paginator options for ListIndices type ListIndicesPaginatorOptions struct { // The maximum number of indices to return. @@ -212,6 +208,9 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIndices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListIndicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListIndicesAPIClient is a client that implements the ListIndices operation. +type ListIndicesAPIClient interface { + ListIndices(context.Context, *ListIndicesInput, ...func(*Options)) (*ListIndicesOutput, error) +} + +var _ ListIndicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIndices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListMessages.go b/service/qbusiness/api_op_ListMessages.go index 2d820d0d669..f1b9d4d4c13 100644 --- a/service/qbusiness/api_op_ListMessages.go +++ b/service/qbusiness/api_op_ListMessages.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListMessagesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMessagesValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListMessagesMiddlewares(stack *middleware.Stack, op return nil } -// ListMessagesAPIClient is a client that implements the ListMessages operation. -type ListMessagesAPIClient interface { - ListMessages(context.Context, *ListMessagesInput, ...func(*Options)) (*ListMessagesOutput, error) -} - -var _ ListMessagesAPIClient = (*Client)(nil) - // ListMessagesPaginatorOptions is the paginator options for ListMessages type ListMessagesPaginatorOptions struct { // The maximum number of messages to return. @@ -220,6 +216,9 @@ func (p *ListMessagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMessages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListMessagesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListMessagesAPIClient is a client that implements the ListMessages operation. +type ListMessagesAPIClient interface { + ListMessages(context.Context, *ListMessagesInput, ...func(*Options)) (*ListMessagesOutput, error) +} + +var _ ListMessagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMessages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListPlugins.go b/service/qbusiness/api_op_ListPlugins.go index 49d8cfc0646..0d11aafb639 100644 --- a/service/qbusiness/api_op_ListPlugins.go +++ b/service/qbusiness/api_op_ListPlugins.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPluginsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPluginsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListPluginsMiddlewares(stack *middleware.Stack, opt return nil } -// ListPluginsAPIClient is a client that implements the ListPlugins operation. -type ListPluginsAPIClient interface { - ListPlugins(context.Context, *ListPluginsInput, ...func(*Options)) (*ListPluginsOutput, error) -} - -var _ ListPluginsAPIClient = (*Client)(nil) - // ListPluginsPaginatorOptions is the paginator options for ListPlugins type ListPluginsPaginatorOptions struct { // The maximum number of documents to return. @@ -213,6 +209,9 @@ func (p *ListPluginsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlugins(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListPluginsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListPluginsAPIClient is a client that implements the ListPlugins operation. +type ListPluginsAPIClient interface { + ListPlugins(context.Context, *ListPluginsInput, ...func(*Options)) (*ListPluginsOutput, error) +} + +var _ ListPluginsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlugins(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListRetrievers.go b/service/qbusiness/api_op_ListRetrievers.go index 11bf9f49746..1630a5820ec 100644 --- a/service/qbusiness/api_op_ListRetrievers.go +++ b/service/qbusiness/api_op_ListRetrievers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRetrieversMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRetrieversValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListRetrieversMiddlewares(stack *middleware.Stack, return nil } -// ListRetrieversAPIClient is a client that implements the ListRetrievers -// operation. -type ListRetrieversAPIClient interface { - ListRetrievers(context.Context, *ListRetrieversInput, ...func(*Options)) (*ListRetrieversOutput, error) -} - -var _ ListRetrieversAPIClient = (*Client)(nil) - // ListRetrieversPaginatorOptions is the paginator options for ListRetrievers type ListRetrieversPaginatorOptions struct { // The maximum number of retrievers returned. @@ -213,6 +208,9 @@ func (p *ListRetrieversPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRetrievers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListRetrieversPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListRetrieversAPIClient is a client that implements the ListRetrievers +// operation. +type ListRetrieversAPIClient interface { + ListRetrievers(context.Context, *ListRetrieversInput, ...func(*Options)) (*ListRetrieversOutput, error) +} + +var _ ListRetrieversAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRetrievers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_ListTagsForResource.go b/service/qbusiness/api_op_ListTagsForResource.go index d4e426ceef3..56b08e0e40d 100644 --- a/service/qbusiness/api_op_ListTagsForResource.go +++ b/service/qbusiness/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_ListWebExperiences.go b/service/qbusiness/api_op_ListWebExperiences.go index b4a320a3fee..d99c3c7a828 100644 --- a/service/qbusiness/api_op_ListWebExperiences.go +++ b/service/qbusiness/api_op_ListWebExperiences.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListWebExperiencesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWebExperiencesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListWebExperiencesMiddlewares(stack *middleware.Sta return nil } -// ListWebExperiencesAPIClient is a client that implements the ListWebExperiences -// operation. -type ListWebExperiencesAPIClient interface { - ListWebExperiences(context.Context, *ListWebExperiencesInput, ...func(*Options)) (*ListWebExperiencesOutput, error) -} - -var _ ListWebExperiencesAPIClient = (*Client)(nil) - // ListWebExperiencesPaginatorOptions is the paginator options for // ListWebExperiences type ListWebExperiencesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListWebExperiencesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWebExperiences(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListWebExperiencesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListWebExperiencesAPIClient is a client that implements the ListWebExperiences +// operation. +type ListWebExperiencesAPIClient interface { + ListWebExperiences(context.Context, *ListWebExperiencesInput, ...func(*Options)) (*ListWebExperiencesOutput, error) +} + +var _ ListWebExperiencesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWebExperiences(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qbusiness/api_op_PutFeedback.go b/service/qbusiness/api_op_PutFeedback.go index c0448c2f7cc..39621d07944 100644 --- a/service/qbusiness/api_op_PutFeedback.go +++ b/service/qbusiness/api_op_PutFeedback.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPutFeedbackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_PutGroup.go b/service/qbusiness/api_op_PutGroup.go index cfa00a0ab45..00db463eb98 100644 --- a/service/qbusiness/api_op_PutGroup.go +++ b/service/qbusiness/api_op_PutGroup.go @@ -146,6 +146,9 @@ func (c *Client) addOperationPutGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_StartDataSourceSyncJob.go b/service/qbusiness/api_op_StartDataSourceSyncJob.go index 7766726e839..0834b29ee71 100644 --- a/service/qbusiness/api_op_StartDataSourceSyncJob.go +++ b/service/qbusiness/api_op_StartDataSourceSyncJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartDataSourceSyncJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDataSourceSyncJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_StopDataSourceSyncJob.go b/service/qbusiness/api_op_StopDataSourceSyncJob.go index 15362174ee9..b76bfed9048 100644 --- a/service/qbusiness/api_op_StopDataSourceSyncJob.go +++ b/service/qbusiness/api_op_StopDataSourceSyncJob.go @@ -114,6 +114,9 @@ func (c *Client) addOperationStopDataSourceSyncJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDataSourceSyncJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_TagResource.go b/service/qbusiness/api_op_TagResource.go index 6fd01b03d1b..860ba6fab9b 100644 --- a/service/qbusiness/api_op_TagResource.go +++ b/service/qbusiness/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UntagResource.go b/service/qbusiness/api_op_UntagResource.go index 340b8e7e14f..8bc7e031e2b 100644 --- a/service/qbusiness/api_op_UntagResource.go +++ b/service/qbusiness/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateApplication.go b/service/qbusiness/api_op_UpdateApplication.go index 538d945934d..56b737dc59d 100644 --- a/service/qbusiness/api_op_UpdateApplication.go +++ b/service/qbusiness/api_op_UpdateApplication.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateChatControlsConfiguration.go b/service/qbusiness/api_op_UpdateChatControlsConfiguration.go index 6b49561b780..0152fab38f8 100644 --- a/service/qbusiness/api_op_UpdateChatControlsConfiguration.go +++ b/service/qbusiness/api_op_UpdateChatControlsConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateChatControlsConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateChatControlsConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateDataSource.go b/service/qbusiness/api_op_UpdateDataSource.go index 30225ed501b..2d40b3f67e8 100644 --- a/service/qbusiness/api_op_UpdateDataSource.go +++ b/service/qbusiness/api_op_UpdateDataSource.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateIndex.go b/service/qbusiness/api_op_UpdateIndex.go index a4afcd2b664..76bb653607a 100644 --- a/service/qbusiness/api_op_UpdateIndex.go +++ b/service/qbusiness/api_op_UpdateIndex.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdatePlugin.go b/service/qbusiness/api_op_UpdatePlugin.go index b31f8f33cb9..ddb6ceb5538 100644 --- a/service/qbusiness/api_op_UpdatePlugin.go +++ b/service/qbusiness/api_op_UpdatePlugin.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdatePluginMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePluginValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateRetriever.go b/service/qbusiness/api_op_UpdateRetriever.go index 030a3c0296b..6f1ac8e31d0 100644 --- a/service/qbusiness/api_op_UpdateRetriever.go +++ b/service/qbusiness/api_op_UpdateRetriever.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateRetrieverMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRetrieverValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateUser.go b/service/qbusiness/api_op_UpdateUser.go index 60357d3f838..c71001b3ead 100644 --- a/service/qbusiness/api_op_UpdateUser.go +++ b/service/qbusiness/api_op_UpdateUser.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/qbusiness/api_op_UpdateWebExperience.go b/service/qbusiness/api_op_UpdateWebExperience.go index 9ff6e8ce105..479fb206bbe 100644 --- a/service/qbusiness/api_op_UpdateWebExperience.go +++ b/service/qbusiness/api_op_UpdateWebExperience.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateWebExperienceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWebExperienceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_client.go b/service/qconnect/api_client.go index c27b0d7afdb..10220b49157 100644 --- a/service/qconnect/api_client.go +++ b/service/qconnect/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/qconnect/api_op_CreateAssistant.go b/service/qconnect/api_op_CreateAssistant.go index ae60578ecb2..a0384d49f30 100644 --- a/service/qconnect/api_op_CreateAssistant.go +++ b/service/qconnect/api_op_CreateAssistant.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateAssistantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAssistantMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_CreateAssistantAssociation.go b/service/qconnect/api_op_CreateAssistantAssociation.go index a69ba6ee650..8a47d661eb6 100644 --- a/service/qconnect/api_op_CreateAssistantAssociation.go +++ b/service/qconnect/api_op_CreateAssistantAssociation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateAssistantAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAssistantAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_CreateContent.go b/service/qconnect/api_op_CreateContent.go index 50321877289..437f88a564e 100644 --- a/service/qconnect/api_op_CreateContent.go +++ b/service/qconnect/api_op_CreateContent.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateContentMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_CreateKnowledgeBase.go b/service/qconnect/api_op_CreateKnowledgeBase.go index c2befe75096..18c3f06df2c 100644 --- a/service/qconnect/api_op_CreateKnowledgeBase.go +++ b/service/qconnect/api_op_CreateKnowledgeBase.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKnowledgeBaseMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_CreateQuickResponse.go b/service/qconnect/api_op_CreateQuickResponse.go index 3324f5261a9..f1a1937f3ed 100644 --- a/service/qconnect/api_op_CreateQuickResponse.go +++ b/service/qconnect/api_op_CreateQuickResponse.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateQuickResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateQuickResponseMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_CreateSession.go b/service/qconnect/api_op_CreateSession.go index b5f04430798..e8f065488b9 100644 --- a/service/qconnect/api_op_CreateSession.go +++ b/service/qconnect/api_op_CreateSession.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_DeleteAssistant.go b/service/qconnect/api_op_DeleteAssistant.go index 05094122c26..c572ab48416 100644 --- a/service/qconnect/api_op_DeleteAssistant.go +++ b/service/qconnect/api_op_DeleteAssistant.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAssistantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssistantValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_DeleteAssistantAssociation.go b/service/qconnect/api_op_DeleteAssistantAssociation.go index 44d2ad9782d..697dd2a4e18 100644 --- a/service/qconnect/api_op_DeleteAssistantAssociation.go +++ b/service/qconnect/api_op_DeleteAssistantAssociation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAssistantAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssistantAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_DeleteContent.go b/service/qconnect/api_op_DeleteContent.go index 16fbe0cd817..99e1552467b 100644 --- a/service/qconnect/api_op_DeleteContent.go +++ b/service/qconnect/api_op_DeleteContent.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_DeleteImportJob.go b/service/qconnect/api_op_DeleteImportJob.go index 1be9b805556..5f492122355 100644 --- a/service/qconnect/api_op_DeleteImportJob.go +++ b/service/qconnect/api_op_DeleteImportJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteImportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_DeleteKnowledgeBase.go b/service/qconnect/api_op_DeleteKnowledgeBase.go index 0d69a1e5041..60ff75cf21e 100644 --- a/service/qconnect/api_op_DeleteKnowledgeBase.go +++ b/service/qconnect/api_op_DeleteKnowledgeBase.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_DeleteQuickResponse.go b/service/qconnect/api_op_DeleteQuickResponse.go index 2ee96652b6b..a52d18aadac 100644 --- a/service/qconnect/api_op_DeleteQuickResponse.go +++ b/service/qconnect/api_op_DeleteQuickResponse.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteQuickResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQuickResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetAssistant.go b/service/qconnect/api_op_GetAssistant.go index 6006e68dde1..25c3f920d34 100644 --- a/service/qconnect/api_op_GetAssistant.go +++ b/service/qconnect/api_op_GetAssistant.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetAssistantMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssistantValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetAssistantAssociation.go b/service/qconnect/api_op_GetAssistantAssociation.go index b48c5d443e4..32da50ef180 100644 --- a/service/qconnect/api_op_GetAssistantAssociation.go +++ b/service/qconnect/api_op_GetAssistantAssociation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetAssistantAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssistantAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetContent.go b/service/qconnect/api_op_GetContent.go index c8731368d71..e4a4f6942bb 100644 --- a/service/qconnect/api_op_GetContent.go +++ b/service/qconnect/api_op_GetContent.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetContentMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetContentSummary.go b/service/qconnect/api_op_GetContentSummary.go index d58b1afc3e9..b66bd0d3dc7 100644 --- a/service/qconnect/api_op_GetContentSummary.go +++ b/service/qconnect/api_op_GetContentSummary.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetContentSummaryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContentSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetImportJob.go b/service/qconnect/api_op_GetImportJob.go index 7cf99e740f9..5c5cae14d8f 100644 --- a/service/qconnect/api_op_GetImportJob.go +++ b/service/qconnect/api_op_GetImportJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetImportJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetKnowledgeBase.go b/service/qconnect/api_op_GetKnowledgeBase.go index 5a108d25f0c..ea26520f5c0 100644 --- a/service/qconnect/api_op_GetKnowledgeBase.go +++ b/service/qconnect/api_op_GetKnowledgeBase.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetKnowledgeBaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetQuickResponse.go b/service/qconnect/api_op_GetQuickResponse.go index bd7b1756a93..93b08e687de 100644 --- a/service/qconnect/api_op_GetQuickResponse.go +++ b/service/qconnect/api_op_GetQuickResponse.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetQuickResponseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQuickResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetRecommendations.go b/service/qconnect/api_op_GetRecommendations.go index 8a41c65ac45..2d093565129 100644 --- a/service/qconnect/api_op_GetRecommendations.go +++ b/service/qconnect/api_op_GetRecommendations.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetRecommendationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_GetSession.go b/service/qconnect/api_op_GetSession.go index 21426cc5ce0..366b7f660ae 100644 --- a/service/qconnect/api_op_GetSession.go +++ b/service/qconnect/api_op_GetSession.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_ListAssistantAssociations.go b/service/qconnect/api_op_ListAssistantAssociations.go index d6c1c7a64c9..615a6cf7c7e 100644 --- a/service/qconnect/api_op_ListAssistantAssociations.go +++ b/service/qconnect/api_op_ListAssistantAssociations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAssistantAssociationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssistantAssociationsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAssistantAssociationsMiddlewares(stack *middlew return nil } -// ListAssistantAssociationsAPIClient is a client that implements the -// ListAssistantAssociations operation. -type ListAssistantAssociationsAPIClient interface { - ListAssistantAssociations(context.Context, *ListAssistantAssociationsInput, ...func(*Options)) (*ListAssistantAssociationsOutput, error) -} - -var _ ListAssistantAssociationsAPIClient = (*Client)(nil) - // ListAssistantAssociationsPaginatorOptions is the paginator options for // ListAssistantAssociations type ListAssistantAssociationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListAssistantAssociationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssistantAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListAssistantAssociationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAssistantAssociationsAPIClient is a client that implements the +// ListAssistantAssociations operation. +type ListAssistantAssociationsAPIClient interface { + ListAssistantAssociations(context.Context, *ListAssistantAssociationsInput, ...func(*Options)) (*ListAssistantAssociationsOutput, error) +} + +var _ ListAssistantAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssistantAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_ListAssistants.go b/service/qconnect/api_op_ListAssistants.go index bf2973975d9..4065bca5fe7 100644 --- a/service/qconnect/api_op_ListAssistants.go +++ b/service/qconnect/api_op_ListAssistants.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAssistantsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssistants(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListAssistantsMiddlewares(stack *middleware.Stack, return nil } -// ListAssistantsAPIClient is a client that implements the ListAssistants -// operation. -type ListAssistantsAPIClient interface { - ListAssistants(context.Context, *ListAssistantsInput, ...func(*Options)) (*ListAssistantsOutput, error) -} - -var _ ListAssistantsAPIClient = (*Client)(nil) - // ListAssistantsPaginatorOptions is the paginator options for ListAssistants type ListAssistantsPaginatorOptions struct { // The maximum number of results to return per page. @@ -205,6 +200,9 @@ func (p *ListAssistantsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssistants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListAssistantsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAssistantsAPIClient is a client that implements the ListAssistants +// operation. +type ListAssistantsAPIClient interface { + ListAssistants(context.Context, *ListAssistantsInput, ...func(*Options)) (*ListAssistantsOutput, error) +} + +var _ ListAssistantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssistants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_ListContents.go b/service/qconnect/api_op_ListContents.go index a3bc21b9320..79c1c7757f5 100644 --- a/service/qconnect/api_op_ListContents.go +++ b/service/qconnect/api_op_ListContents.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListContentsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContentsValidationMiddleware(stack); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListContentsMiddlewares(stack *middleware.Stack, op return nil } -// ListContentsAPIClient is a client that implements the ListContents operation. -type ListContentsAPIClient interface { - ListContents(context.Context, *ListContentsInput, ...func(*Options)) (*ListContentsOutput, error) -} - -var _ ListContentsAPIClient = (*Client)(nil) - // ListContentsPaginatorOptions is the paginator options for ListContents type ListContentsPaginatorOptions struct { // The maximum number of results to return per page. @@ -213,6 +209,9 @@ func (p *ListContentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListContentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListContentsAPIClient is a client that implements the ListContents operation. +type ListContentsAPIClient interface { + ListContents(context.Context, *ListContentsInput, ...func(*Options)) (*ListContentsOutput, error) +} + +var _ ListContentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_ListImportJobs.go b/service/qconnect/api_op_ListImportJobs.go index 90a5b84dd4f..26c329a878b 100644 --- a/service/qconnect/api_op_ListImportJobs.go +++ b/service/qconnect/api_op_ListImportJobs.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListImportJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImportJobsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListImportJobsMiddlewares(stack *middleware.Stack, return nil } -// ListImportJobsAPIClient is a client that implements the ListImportJobs -// operation. -type ListImportJobsAPIClient interface { - ListImportJobs(context.Context, *ListImportJobsInput, ...func(*Options)) (*ListImportJobsOutput, error) -} - -var _ ListImportJobsAPIClient = (*Client)(nil) - // ListImportJobsPaginatorOptions is the paginator options for ListImportJobs type ListImportJobsPaginatorOptions struct { // The maximum number of results to return per page. @@ -215,6 +210,9 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListImportJobsAPIClient is a client that implements the ListImportJobs +// operation. +type ListImportJobsAPIClient interface { + ListImportJobs(context.Context, *ListImportJobsInput, ...func(*Options)) (*ListImportJobsOutput, error) +} + +var _ ListImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_ListKnowledgeBases.go b/service/qconnect/api_op_ListKnowledgeBases.go index c5a399e3913..8764fb8a7a4 100644 --- a/service/qconnect/api_op_ListKnowledgeBases.go +++ b/service/qconnect/api_op_ListKnowledgeBases.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListKnowledgeBasesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKnowledgeBases(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListKnowledgeBasesMiddlewares(stack *middleware.Sta return nil } -// ListKnowledgeBasesAPIClient is a client that implements the ListKnowledgeBases -// operation. -type ListKnowledgeBasesAPIClient interface { - ListKnowledgeBases(context.Context, *ListKnowledgeBasesInput, ...func(*Options)) (*ListKnowledgeBasesOutput, error) -} - -var _ ListKnowledgeBasesAPIClient = (*Client)(nil) - // ListKnowledgeBasesPaginatorOptions is the paginator options for // ListKnowledgeBases type ListKnowledgeBasesPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKnowledgeBases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListKnowledgeBasesAPIClient is a client that implements the ListKnowledgeBases +// operation. +type ListKnowledgeBasesAPIClient interface { + ListKnowledgeBases(context.Context, *ListKnowledgeBasesInput, ...func(*Options)) (*ListKnowledgeBasesOutput, error) +} + +var _ ListKnowledgeBasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKnowledgeBases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_ListQuickResponses.go b/service/qconnect/api_op_ListQuickResponses.go index c1f5fdaabf4..575bac9e082 100644 --- a/service/qconnect/api_op_ListQuickResponses.go +++ b/service/qconnect/api_op_ListQuickResponses.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListQuickResponsesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQuickResponsesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListQuickResponsesMiddlewares(stack *middleware.Sta return nil } -// ListQuickResponsesAPIClient is a client that implements the ListQuickResponses -// operation. -type ListQuickResponsesAPIClient interface { - ListQuickResponses(context.Context, *ListQuickResponsesInput, ...func(*Options)) (*ListQuickResponsesOutput, error) -} - -var _ ListQuickResponsesAPIClient = (*Client)(nil) - // ListQuickResponsesPaginatorOptions is the paginator options for // ListQuickResponses type ListQuickResponsesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListQuickResponsesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQuickResponses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListQuickResponsesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListQuickResponsesAPIClient is a client that implements the ListQuickResponses +// operation. +type ListQuickResponsesAPIClient interface { + ListQuickResponses(context.Context, *ListQuickResponsesInput, ...func(*Options)) (*ListQuickResponsesOutput, error) +} + +var _ ListQuickResponsesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQuickResponses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_ListTagsForResource.go b/service/qconnect/api_op_ListTagsForResource.go index d21bb15a9dd..12124aaab8b 100644 --- a/service/qconnect/api_op_ListTagsForResource.go +++ b/service/qconnect/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_NotifyRecommendationsReceived.go b/service/qconnect/api_op_NotifyRecommendationsReceived.go index 307682cf6e0..cbbfbd9cc35 100644 --- a/service/qconnect/api_op_NotifyRecommendationsReceived.go +++ b/service/qconnect/api_op_NotifyRecommendationsReceived.go @@ -126,6 +126,9 @@ func (c *Client) addOperationNotifyRecommendationsReceivedMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyRecommendationsReceivedValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_PutFeedback.go b/service/qconnect/api_op_PutFeedback.go index 422e8b513ac..4519d759436 100644 --- a/service/qconnect/api_op_PutFeedback.go +++ b/service/qconnect/api_op_PutFeedback.go @@ -144,6 +144,9 @@ func (c *Client) addOperationPutFeedbackMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFeedbackValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_QueryAssistant.go b/service/qconnect/api_op_QueryAssistant.go index 7e3ac7b25d3..57f9dae1173 100644 --- a/service/qconnect/api_op_QueryAssistant.go +++ b/service/qconnect/api_op_QueryAssistant.go @@ -144,6 +144,9 @@ func (c *Client) addOperationQueryAssistantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryAssistantValidationMiddleware(stack); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationQueryAssistantMiddlewares(stack *middleware.Stack, return nil } -// QueryAssistantAPIClient is a client that implements the QueryAssistant -// operation. -type QueryAssistantAPIClient interface { - QueryAssistant(context.Context, *QueryAssistantInput, ...func(*Options)) (*QueryAssistantOutput, error) -} - -var _ QueryAssistantAPIClient = (*Client)(nil) - // QueryAssistantPaginatorOptions is the paginator options for QueryAssistant type QueryAssistantPaginatorOptions struct { // The maximum number of results to return per page. @@ -239,6 +234,9 @@ func (p *QueryAssistantPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.QueryAssistant(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *QueryAssistantPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// QueryAssistantAPIClient is a client that implements the QueryAssistant +// operation. +type QueryAssistantAPIClient interface { + QueryAssistant(context.Context, *QueryAssistantInput, ...func(*Options)) (*QueryAssistantOutput, error) +} + +var _ QueryAssistantAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opQueryAssistant(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_RemoveKnowledgeBaseTemplateUri.go b/service/qconnect/api_op_RemoveKnowledgeBaseTemplateUri.go index c7cc9a1d58d..acdbbc0d48a 100644 --- a/service/qconnect/api_op_RemoveKnowledgeBaseTemplateUri.go +++ b/service/qconnect/api_op_RemoveKnowledgeBaseTemplateUri.go @@ -102,6 +102,9 @@ func (c *Client) addOperationRemoveKnowledgeBaseTemplateUriMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveKnowledgeBaseTemplateUriValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_SearchContent.go b/service/qconnect/api_op_SearchContent.go index 70871ccab88..9b8ff6db96f 100644 --- a/service/qconnect/api_op_SearchContent.go +++ b/service/qconnect/api_op_SearchContent.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSearchContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchContentValidationMiddleware(stack); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationSearchContentMiddlewares(stack *middleware.Stack, o return nil } -// SearchContentAPIClient is a client that implements the SearchContent operation. -type SearchContentAPIClient interface { - SearchContent(context.Context, *SearchContentInput, ...func(*Options)) (*SearchContentOutput, error) -} - -var _ SearchContentAPIClient = (*Client)(nil) - // SearchContentPaginatorOptions is the paginator options for SearchContent type SearchContentPaginatorOptions struct { // The maximum number of results to return per page. @@ -219,6 +215,9 @@ func (p *SearchContentPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchContent(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *SearchContentPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// SearchContentAPIClient is a client that implements the SearchContent operation. +type SearchContentAPIClient interface { + SearchContent(context.Context, *SearchContentInput, ...func(*Options)) (*SearchContentOutput, error) +} + +var _ SearchContentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchContent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_SearchQuickResponses.go b/service/qconnect/api_op_SearchQuickResponses.go index 774848b3ae8..551faa14494 100644 --- a/service/qconnect/api_op_SearchQuickResponses.go +++ b/service/qconnect/api_op_SearchQuickResponses.go @@ -131,6 +131,9 @@ func (c *Client) addOperationSearchQuickResponsesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchQuickResponsesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationSearchQuickResponsesMiddlewares(stack *middleware.S return nil } -// SearchQuickResponsesAPIClient is a client that implements the -// SearchQuickResponses operation. -type SearchQuickResponsesAPIClient interface { - SearchQuickResponses(context.Context, *SearchQuickResponsesInput, ...func(*Options)) (*SearchQuickResponsesOutput, error) -} - -var _ SearchQuickResponsesAPIClient = (*Client)(nil) - // SearchQuickResponsesPaginatorOptions is the paginator options for // SearchQuickResponses type SearchQuickResponsesPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *SearchQuickResponsesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchQuickResponses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *SearchQuickResponsesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SearchQuickResponsesAPIClient is a client that implements the +// SearchQuickResponses operation. +type SearchQuickResponsesAPIClient interface { + SearchQuickResponses(context.Context, *SearchQuickResponsesInput, ...func(*Options)) (*SearchQuickResponsesOutput, error) +} + +var _ SearchQuickResponsesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchQuickResponses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_SearchSessions.go b/service/qconnect/api_op_SearchSessions.go index ef9b53b3278..39ca1ac84fb 100644 --- a/service/qconnect/api_op_SearchSessions.go +++ b/service/qconnect/api_op_SearchSessions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSearchSessionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchSessionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationSearchSessionsMiddlewares(stack *middleware.Stack, return nil } -// SearchSessionsAPIClient is a client that implements the SearchSessions -// operation. -type SearchSessionsAPIClient interface { - SearchSessions(context.Context, *SearchSessionsInput, ...func(*Options)) (*SearchSessionsOutput, error) -} - -var _ SearchSessionsAPIClient = (*Client)(nil) - // SearchSessionsPaginatorOptions is the paginator options for SearchSessions type SearchSessionsPaginatorOptions struct { // The maximum number of results to return per page. @@ -219,6 +214,9 @@ func (p *SearchSessionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *SearchSessionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchSessionsAPIClient is a client that implements the SearchSessions +// operation. +type SearchSessionsAPIClient interface { + SearchSessions(context.Context, *SearchSessionsInput, ...func(*Options)) (*SearchSessionsOutput, error) +} + +var _ SearchSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qconnect/api_op_StartContentUpload.go b/service/qconnect/api_op_StartContentUpload.go index 8d6696792ac..69b00dc05d6 100644 --- a/service/qconnect/api_op_StartContentUpload.go +++ b/service/qconnect/api_op_StartContentUpload.go @@ -140,6 +140,9 @@ func (c *Client) addOperationStartContentUploadMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartContentUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_StartImportJob.go b/service/qconnect/api_op_StartImportJob.go index 94b7bc0f664..f2acd3f92d9 100644 --- a/service/qconnect/api_op_StartImportJob.go +++ b/service/qconnect/api_op_StartImportJob.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartImportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartImportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/qconnect/api_op_TagResource.go b/service/qconnect/api_op_TagResource.go index d1fced3cbff..33ae6d68078 100644 --- a/service/qconnect/api_op_TagResource.go +++ b/service/qconnect/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_UntagResource.go b/service/qconnect/api_op_UntagResource.go index a5fbaa6c90c..3dc21cb2b0f 100644 --- a/service/qconnect/api_op_UntagResource.go +++ b/service/qconnect/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_UpdateContent.go b/service/qconnect/api_op_UpdateContent.go index 07323c8bacf..5a3027f7330 100644 --- a/service/qconnect/api_op_UpdateContent.go +++ b/service/qconnect/api_op_UpdateContent.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_UpdateKnowledgeBaseTemplateUri.go b/service/qconnect/api_op_UpdateKnowledgeBaseTemplateUri.go index 9998633739b..e1a26cb9eae 100644 --- a/service/qconnect/api_op_UpdateKnowledgeBaseTemplateUri.go +++ b/service/qconnect/api_op_UpdateKnowledgeBaseTemplateUri.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateKnowledgeBaseTemplateUriMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKnowledgeBaseTemplateUriValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_UpdateQuickResponse.go b/service/qconnect/api_op_UpdateQuickResponse.go index 1e436501f62..9ac1ff28636 100644 --- a/service/qconnect/api_op_UpdateQuickResponse.go +++ b/service/qconnect/api_op_UpdateQuickResponse.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateQuickResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQuickResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/qconnect/api_op_UpdateSession.go b/service/qconnect/api_op_UpdateSession.go index 3d14c846c3e..fba99fc7f08 100644 --- a/service/qconnect/api_op_UpdateSession.go +++ b/service/qconnect/api_op_UpdateSession.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_client.go b/service/qldb/api_client.go index 1e6e4d7c379..b252c9e68a3 100644 --- a/service/qldb/api_client.go +++ b/service/qldb/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/qldb/api_op_CancelJournalKinesisStream.go b/service/qldb/api_op_CancelJournalKinesisStream.go index fce4d73a73c..1aeb0eaca67 100644 --- a/service/qldb/api_op_CancelJournalKinesisStream.go +++ b/service/qldb/api_op_CancelJournalKinesisStream.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCancelJournalKinesisStreamMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJournalKinesisStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_CreateLedger.go b/service/qldb/api_op_CreateLedger.go index 47c4817451a..ec97445e970 100644 --- a/service/qldb/api_op_CreateLedger.go +++ b/service/qldb/api_op_CreateLedger.go @@ -219,6 +219,9 @@ func (c *Client) addOperationCreateLedgerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLedgerValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_DeleteLedger.go b/service/qldb/api_op_DeleteLedger.go index 3b4cf2a01ef..92c321617bd 100644 --- a/service/qldb/api_op_DeleteLedger.go +++ b/service/qldb/api_op_DeleteLedger.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteLedgerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLedgerValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_DescribeJournalKinesisStream.go b/service/qldb/api_op_DescribeJournalKinesisStream.go index 890c25e91a4..8003b163de8 100644 --- a/service/qldb/api_op_DescribeJournalKinesisStream.go +++ b/service/qldb/api_op_DescribeJournalKinesisStream.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeJournalKinesisStreamMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJournalKinesisStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_DescribeJournalS3Export.go b/service/qldb/api_op_DescribeJournalS3Export.go index 6b0505af9eb..5cd2598e8ad 100644 --- a/service/qldb/api_op_DescribeJournalS3Export.go +++ b/service/qldb/api_op_DescribeJournalS3Export.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeJournalS3ExportMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJournalS3ExportValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_DescribeLedger.go b/service/qldb/api_op_DescribeLedger.go index 0051d8c929c..8492896517b 100644 --- a/service/qldb/api_op_DescribeLedger.go +++ b/service/qldb/api_op_DescribeLedger.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeLedgerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLedgerValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_ExportJournalToS3.go b/service/qldb/api_op_ExportJournalToS3.go index 07004b520eb..b445a0c2a46 100644 --- a/service/qldb/api_op_ExportJournalToS3.go +++ b/service/qldb/api_op_ExportJournalToS3.go @@ -185,6 +185,9 @@ func (c *Client) addOperationExportJournalToS3Middlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportJournalToS3ValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_GetBlock.go b/service/qldb/api_op_GetBlock.go index f573e851143..a1e9a1a3f49 100644 --- a/service/qldb/api_op_GetBlock.go +++ b/service/qldb/api_op_GetBlock.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetBlockMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_GetDigest.go b/service/qldb/api_op_GetDigest.go index 0ca220accf3..fe3c0190f5e 100644 --- a/service/qldb/api_op_GetDigest.go +++ b/service/qldb/api_op_GetDigest.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetDigestMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDigestValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_GetRevision.go b/service/qldb/api_op_GetRevision.go index a9ecce8a0ad..f28b275a0cd 100644 --- a/service/qldb/api_op_GetRevision.go +++ b/service/qldb/api_op_GetRevision.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetRevisionMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go b/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go index 199d76caf18..75d4489c886 100644 --- a/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go +++ b/service/qldb/api_op_ListJournalKinesisStreamsForLedger.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListJournalKinesisStreamsForLedgerMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJournalKinesisStreamsForLedgerValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListJournalKinesisStreamsForLedgerMiddlewares(stack return nil } -// ListJournalKinesisStreamsForLedgerAPIClient is a client that implements the -// ListJournalKinesisStreamsForLedger operation. -type ListJournalKinesisStreamsForLedgerAPIClient interface { - ListJournalKinesisStreamsForLedger(context.Context, *ListJournalKinesisStreamsForLedgerInput, ...func(*Options)) (*ListJournalKinesisStreamsForLedgerOutput, error) -} - -var _ ListJournalKinesisStreamsForLedgerAPIClient = (*Client)(nil) - // ListJournalKinesisStreamsForLedgerPaginatorOptions is the paginator options for // ListJournalKinesisStreamsForLedger type ListJournalKinesisStreamsForLedgerPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListJournalKinesisStreamsForLedgerPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJournalKinesisStreamsForLedger(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListJournalKinesisStreamsForLedgerPaginator) NextPage(ctx context.Conte return result, nil } +// ListJournalKinesisStreamsForLedgerAPIClient is a client that implements the +// ListJournalKinesisStreamsForLedger operation. +type ListJournalKinesisStreamsForLedgerAPIClient interface { + ListJournalKinesisStreamsForLedger(context.Context, *ListJournalKinesisStreamsForLedgerInput, ...func(*Options)) (*ListJournalKinesisStreamsForLedgerOutput, error) +} + +var _ ListJournalKinesisStreamsForLedgerAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJournalKinesisStreamsForLedger(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qldb/api_op_ListJournalS3Exports.go b/service/qldb/api_op_ListJournalS3Exports.go index 8ac59f5fc1f..59d4aacd9b7 100644 --- a/service/qldb/api_op_ListJournalS3Exports.go +++ b/service/qldb/api_op_ListJournalS3Exports.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListJournalS3ExportsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJournalS3Exports(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListJournalS3ExportsMiddlewares(stack *middleware.S return nil } -// ListJournalS3ExportsAPIClient is a client that implements the -// ListJournalS3Exports operation. -type ListJournalS3ExportsAPIClient interface { - ListJournalS3Exports(context.Context, *ListJournalS3ExportsInput, ...func(*Options)) (*ListJournalS3ExportsOutput, error) -} - -var _ ListJournalS3ExportsAPIClient = (*Client)(nil) - // ListJournalS3ExportsPaginatorOptions is the paginator options for // ListJournalS3Exports type ListJournalS3ExportsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListJournalS3ExportsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJournalS3Exports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListJournalS3ExportsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListJournalS3ExportsAPIClient is a client that implements the +// ListJournalS3Exports operation. +type ListJournalS3ExportsAPIClient interface { + ListJournalS3Exports(context.Context, *ListJournalS3ExportsInput, ...func(*Options)) (*ListJournalS3ExportsOutput, error) +} + +var _ ListJournalS3ExportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJournalS3Exports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qldb/api_op_ListJournalS3ExportsForLedger.go b/service/qldb/api_op_ListJournalS3ExportsForLedger.go index 59f54be40ce..8ab568ed56a 100644 --- a/service/qldb/api_op_ListJournalS3ExportsForLedger.go +++ b/service/qldb/api_op_ListJournalS3ExportsForLedger.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListJournalS3ExportsForLedgerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListJournalS3ExportsForLedgerValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListJournalS3ExportsForLedgerMiddlewares(stack *mid return nil } -// ListJournalS3ExportsForLedgerAPIClient is a client that implements the -// ListJournalS3ExportsForLedger operation. -type ListJournalS3ExportsForLedgerAPIClient interface { - ListJournalS3ExportsForLedger(context.Context, *ListJournalS3ExportsForLedgerInput, ...func(*Options)) (*ListJournalS3ExportsForLedgerOutput, error) -} - -var _ ListJournalS3ExportsForLedgerAPIClient = (*Client)(nil) - // ListJournalS3ExportsForLedgerPaginatorOptions is the paginator options for // ListJournalS3ExportsForLedger type ListJournalS3ExportsForLedgerPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListJournalS3ExportsForLedgerPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJournalS3ExportsForLedger(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListJournalS3ExportsForLedgerPaginator) NextPage(ctx context.Context, o return result, nil } +// ListJournalS3ExportsForLedgerAPIClient is a client that implements the +// ListJournalS3ExportsForLedger operation. +type ListJournalS3ExportsForLedgerAPIClient interface { + ListJournalS3ExportsForLedger(context.Context, *ListJournalS3ExportsForLedgerInput, ...func(*Options)) (*ListJournalS3ExportsForLedgerOutput, error) +} + +var _ ListJournalS3ExportsForLedgerAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJournalS3ExportsForLedger(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qldb/api_op_ListLedgers.go b/service/qldb/api_op_ListLedgers.go index be61fff370b..92113c6a8a9 100644 --- a/service/qldb/api_op_ListLedgers.go +++ b/service/qldb/api_op_ListLedgers.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListLedgersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLedgers(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListLedgersMiddlewares(stack *middleware.Stack, opt return nil } -// ListLedgersAPIClient is a client that implements the ListLedgers operation. -type ListLedgersAPIClient interface { - ListLedgers(context.Context, *ListLedgersInput, ...func(*Options)) (*ListLedgersOutput, error) -} - -var _ ListLedgersAPIClient = (*Client)(nil) - // ListLedgersPaginatorOptions is the paginator options for ListLedgers type ListLedgersPaginatorOptions struct { // The maximum number of results to return in a single ListLedgers request. (The @@ -217,6 +213,9 @@ func (p *ListLedgersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLedgers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListLedgersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListLedgersAPIClient is a client that implements the ListLedgers operation. +type ListLedgersAPIClient interface { + ListLedgers(context.Context, *ListLedgersInput, ...func(*Options)) (*ListLedgersOutput, error) +} + +var _ ListLedgersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLedgers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/qldb/api_op_ListTagsForResource.go b/service/qldb/api_op_ListTagsForResource.go index 1c6b525723f..1201aba58ad 100644 --- a/service/qldb/api_op_ListTagsForResource.go +++ b/service/qldb/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_StreamJournalToKinesis.go b/service/qldb/api_op_StreamJournalToKinesis.go index 1c31348995c..7f07f62a692 100644 --- a/service/qldb/api_op_StreamJournalToKinesis.go +++ b/service/qldb/api_op_StreamJournalToKinesis.go @@ -163,6 +163,9 @@ func (c *Client) addOperationStreamJournalToKinesisMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStreamJournalToKinesisValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_TagResource.go b/service/qldb/api_op_TagResource.go index 1a2b1a3ccff..80700c2ac3f 100644 --- a/service/qldb/api_op_TagResource.go +++ b/service/qldb/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_UntagResource.go b/service/qldb/api_op_UntagResource.go index cb585da0d61..244caaecbde 100644 --- a/service/qldb/api_op_UntagResource.go +++ b/service/qldb/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_UpdateLedger.go b/service/qldb/api_op_UpdateLedger.go index 98f4bf4b605..c3e640847a8 100644 --- a/service/qldb/api_op_UpdateLedger.go +++ b/service/qldb/api_op_UpdateLedger.go @@ -178,6 +178,9 @@ func (c *Client) addOperationUpdateLedgerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLedgerValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldb/api_op_UpdateLedgerPermissionsMode.go b/service/qldb/api_op_UpdateLedgerPermissionsMode.go index 65137e6d139..ff47f6cd8e7 100644 --- a/service/qldb/api_op_UpdateLedgerPermissionsMode.go +++ b/service/qldb/api_op_UpdateLedgerPermissionsMode.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateLedgerPermissionsModeMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLedgerPermissionsModeValidationMiddleware(stack); err != nil { return err } diff --git a/service/qldbsession/api_client.go b/service/qldbsession/api_client.go index 61a4d60fe1b..c47839c3507 100644 --- a/service/qldbsession/api_client.go +++ b/service/qldbsession/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/qldbsession/api_op_SendCommand.go b/service/qldbsession/api_op_SendCommand.go index d59594a7434..674b7ae7be9 100644 --- a/service/qldbsession/api_op_SendCommand.go +++ b/service/qldbsession/api_op_SendCommand.go @@ -165,6 +165,9 @@ func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendCommandValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_client.go b/service/quicksight/api_client.go index c741ff1a844..c73faf82c9c 100644 --- a/service/quicksight/api_client.go +++ b/service/quicksight/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/quicksight/api_op_CancelIngestion.go b/service/quicksight/api_op_CancelIngestion.go index 67adb69e746..19fc65cbf3a 100644 --- a/service/quicksight/api_op_CancelIngestion.go +++ b/service/quicksight/api_op_CancelIngestion.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCancelIngestionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateAccountCustomization.go b/service/quicksight/api_op_CreateAccountCustomization.go index d5011f2b0db..5502ef0a97d 100644 --- a/service/quicksight/api_op_CreateAccountCustomization.go +++ b/service/quicksight/api_op_CreateAccountCustomization.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateAccountCustomizationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountCustomizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateAccountSubscription.go b/service/quicksight/api_op_CreateAccountSubscription.go index 610270577c2..1430bdde444 100644 --- a/service/quicksight/api_op_CreateAccountSubscription.go +++ b/service/quicksight/api_op_CreateAccountSubscription.go @@ -285,6 +285,9 @@ func (c *Client) addOperationCreateAccountSubscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateAnalysis.go b/service/quicksight/api_op_CreateAnalysis.go index 5752735753e..1d4c6448f35 100644 --- a/service/quicksight/api_op_CreateAnalysis.go +++ b/service/quicksight/api_op_CreateAnalysis.go @@ -176,6 +176,9 @@ func (c *Client) addOperationCreateAnalysisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateDashboard.go b/service/quicksight/api_op_CreateDashboard.go index 96c90914a72..37d670d2788 100644 --- a/service/quicksight/api_op_CreateDashboard.go +++ b/service/quicksight/api_op_CreateDashboard.go @@ -224,6 +224,9 @@ func (c *Client) addOperationCreateDashboardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDashboardValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateDataSet.go b/service/quicksight/api_op_CreateDataSet.go index e0c6c49a610..f1dd91d606e 100644 --- a/service/quicksight/api_op_CreateDataSet.go +++ b/service/quicksight/api_op_CreateDataSet.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateDataSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateDataSource.go b/service/quicksight/api_op_CreateDataSource.go index 1cce3e19170..7a170b66f57 100644 --- a/service/quicksight/api_op_CreateDataSource.go +++ b/service/quicksight/api_op_CreateDataSource.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateFolder.go b/service/quicksight/api_op_CreateFolder.go index 0394fe484c7..c2ec759b1c9 100644 --- a/service/quicksight/api_op_CreateFolder.go +++ b/service/quicksight/api_op_CreateFolder.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateFolderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateFolderMembership.go b/service/quicksight/api_op_CreateFolderMembership.go index aa2d24d4728..973266c6f30 100644 --- a/service/quicksight/api_op_CreateFolderMembership.go +++ b/service/quicksight/api_op_CreateFolderMembership.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateFolderMembershipMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFolderMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateGroup.go b/service/quicksight/api_op_CreateGroup.go index a7ceaf026a4..8a4894f7251 100644 --- a/service/quicksight/api_op_CreateGroup.go +++ b/service/quicksight/api_op_CreateGroup.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateGroupMembership.go b/service/quicksight/api_op_CreateGroupMembership.go index 2e12eefad9d..e6228f603a5 100644 --- a/service/quicksight/api_op_CreateGroupMembership.go +++ b/service/quicksight/api_op_CreateGroupMembership.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateGroupMembershipMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateIAMPolicyAssignment.go b/service/quicksight/api_op_CreateIAMPolicyAssignment.go index 140bfb999a2..84f26b0ea0e 100644 --- a/service/quicksight/api_op_CreateIAMPolicyAssignment.go +++ b/service/quicksight/api_op_CreateIAMPolicyAssignment.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateIAMPolicyAssignmentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIAMPolicyAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateIngestion.go b/service/quicksight/api_op_CreateIngestion.go index 7827b851e6f..a38c9b426ad 100644 --- a/service/quicksight/api_op_CreateIngestion.go +++ b/service/quicksight/api_op_CreateIngestion.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateIngestionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateNamespace.go b/service/quicksight/api_op_CreateNamespace.go index 04bd2e40990..549f67ff77d 100644 --- a/service/quicksight/api_op_CreateNamespace.go +++ b/service/quicksight/api_op_CreateNamespace.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateRefreshSchedule.go b/service/quicksight/api_op_CreateRefreshSchedule.go index b896567bc80..4d19ef7007c 100644 --- a/service/quicksight/api_op_CreateRefreshSchedule.go +++ b/service/quicksight/api_op_CreateRefreshSchedule.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateRefreshScheduleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateRoleMembership.go b/service/quicksight/api_op_CreateRoleMembership.go index 3a9cbc36cbb..bdfaca301d8 100644 --- a/service/quicksight/api_op_CreateRoleMembership.go +++ b/service/quicksight/api_op_CreateRoleMembership.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateRoleMembershipMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRoleMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateTemplate.go b/service/quicksight/api_op_CreateTemplate.go index 9dbdbdd84f3..a64a7fda6d1 100644 --- a/service/quicksight/api_op_CreateTemplate.go +++ b/service/quicksight/api_op_CreateTemplate.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateTemplateAlias.go b/service/quicksight/api_op_CreateTemplateAlias.go index c8e8192a1c5..40efecaff16 100644 --- a/service/quicksight/api_op_CreateTemplateAlias.go +++ b/service/quicksight/api_op_CreateTemplateAlias.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateTemplateAliasMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTemplateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateTheme.go b/service/quicksight/api_op_CreateTheme.go index 595329a6492..7a497ecb27b 100644 --- a/service/quicksight/api_op_CreateTheme.go +++ b/service/quicksight/api_op_CreateTheme.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateThemeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateThemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateThemeAlias.go b/service/quicksight/api_op_CreateThemeAlias.go index 19ff9dc3c04..3f27d0407a6 100644 --- a/service/quicksight/api_op_CreateThemeAlias.go +++ b/service/quicksight/api_op_CreateThemeAlias.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateThemeAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateThemeAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateTopic.go b/service/quicksight/api_op_CreateTopic.go index a761548b9f8..6c4b2ae11d4 100644 --- a/service/quicksight/api_op_CreateTopic.go +++ b/service/quicksight/api_op_CreateTopic.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateTopicMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateTopicRefreshSchedule.go b/service/quicksight/api_op_CreateTopicRefreshSchedule.go index fbb19b5ea9c..fcf0827b02f 100644 --- a/service/quicksight/api_op_CreateTopicRefreshSchedule.go +++ b/service/quicksight/api_op_CreateTopicRefreshSchedule.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateTopicRefreshScheduleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTopicRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_CreateVPCConnection.go b/service/quicksight/api_op_CreateVPCConnection.go index 0345bc3bc52..db182ec246d 100644 --- a/service/quicksight/api_op_CreateVPCConnection.go +++ b/service/quicksight/api_op_CreateVPCConnection.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateVPCConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVPCConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteAccountCustomization.go b/service/quicksight/api_op_DeleteAccountCustomization.go index c08c3b3f6a5..440d694ad33 100644 --- a/service/quicksight/api_op_DeleteAccountCustomization.go +++ b/service/quicksight/api_op_DeleteAccountCustomization.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAccountCustomizationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountCustomizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteAccountSubscription.go b/service/quicksight/api_op_DeleteAccountSubscription.go index 9a320a3c5c1..b806a1ae2cd 100644 --- a/service/quicksight/api_op_DeleteAccountSubscription.go +++ b/service/quicksight/api_op_DeleteAccountSubscription.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAccountSubscriptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteAnalysis.go b/service/quicksight/api_op_DeleteAnalysis.go index 615ca6832eb..d1188512fd5 100644 --- a/service/quicksight/api_op_DeleteAnalysis.go +++ b/service/quicksight/api_op_DeleteAnalysis.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDeleteAnalysisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteDashboard.go b/service/quicksight/api_op_DeleteDashboard.go index 9ec27f823a1..5b579281f10 100644 --- a/service/quicksight/api_op_DeleteDashboard.go +++ b/service/quicksight/api_op_DeleteDashboard.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteDashboardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDashboardValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteDataSet.go b/service/quicksight/api_op_DeleteDataSet.go index 72f15f98a7d..cdc4969b6d5 100644 --- a/service/quicksight/api_op_DeleteDataSet.go +++ b/service/quicksight/api_op_DeleteDataSet.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteDataSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteDataSetRefreshProperties.go b/service/quicksight/api_op_DeleteDataSetRefreshProperties.go index f3d07289ac4..d5371bc50a7 100644 --- a/service/quicksight/api_op_DeleteDataSetRefreshProperties.go +++ b/service/quicksight/api_op_DeleteDataSetRefreshProperties.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDataSetRefreshPropertiesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSetRefreshPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteDataSource.go b/service/quicksight/api_op_DeleteDataSource.go index e4ab8c8739f..e307f883b15 100644 --- a/service/quicksight/api_op_DeleteDataSource.go +++ b/service/quicksight/api_op_DeleteDataSource.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteFolder.go b/service/quicksight/api_op_DeleteFolder.go index bfda2042576..5382ec85a81 100644 --- a/service/quicksight/api_op_DeleteFolder.go +++ b/service/quicksight/api_op_DeleteFolder.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteFolderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteFolderMembership.go b/service/quicksight/api_op_DeleteFolderMembership.go index 3e722c3f407..f089359a7a9 100644 --- a/service/quicksight/api_op_DeleteFolderMembership.go +++ b/service/quicksight/api_op_DeleteFolderMembership.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteFolderMembershipMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFolderMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteGroup.go b/service/quicksight/api_op_DeleteGroup.go index b4994b71a32..8652c6d8dca 100644 --- a/service/quicksight/api_op_DeleteGroup.go +++ b/service/quicksight/api_op_DeleteGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteGroupMembership.go b/service/quicksight/api_op_DeleteGroupMembership.go index 09c8735f0fb..24deac4e909 100644 --- a/service/quicksight/api_op_DeleteGroupMembership.go +++ b/service/quicksight/api_op_DeleteGroupMembership.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteGroupMembershipMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteIAMPolicyAssignment.go b/service/quicksight/api_op_DeleteIAMPolicyAssignment.go index c54bb6785df..aa86593ac76 100644 --- a/service/quicksight/api_op_DeleteIAMPolicyAssignment.go +++ b/service/quicksight/api_op_DeleteIAMPolicyAssignment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteIAMPolicyAssignmentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIAMPolicyAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteIdentityPropagationConfig.go b/service/quicksight/api_op_DeleteIdentityPropagationConfig.go index 00a66bd9fb5..2b0e18ae2ca 100644 --- a/service/quicksight/api_op_DeleteIdentityPropagationConfig.go +++ b/service/quicksight/api_op_DeleteIdentityPropagationConfig.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteIdentityPropagationConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentityPropagationConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteNamespace.go b/service/quicksight/api_op_DeleteNamespace.go index d907ee3f340..6534d3d7b2c 100644 --- a/service/quicksight/api_op_DeleteNamespace.go +++ b/service/quicksight/api_op_DeleteNamespace.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteRefreshSchedule.go b/service/quicksight/api_op_DeleteRefreshSchedule.go index 0eb6fabece3..a2833aa3b70 100644 --- a/service/quicksight/api_op_DeleteRefreshSchedule.go +++ b/service/quicksight/api_op_DeleteRefreshSchedule.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteRefreshScheduleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteRoleCustomPermission.go b/service/quicksight/api_op_DeleteRoleCustomPermission.go index 6f9a9aee328..a19c37686cf 100644 --- a/service/quicksight/api_op_DeleteRoleCustomPermission.go +++ b/service/quicksight/api_op_DeleteRoleCustomPermission.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteRoleCustomPermissionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoleCustomPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteRoleMembership.go b/service/quicksight/api_op_DeleteRoleMembership.go index a8f7652aa81..1520be6d0e2 100644 --- a/service/quicksight/api_op_DeleteRoleMembership.go +++ b/service/quicksight/api_op_DeleteRoleMembership.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteRoleMembershipMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoleMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteTemplate.go b/service/quicksight/api_op_DeleteTemplate.go index a7d23f69f8c..26bdb67dd89 100644 --- a/service/quicksight/api_op_DeleteTemplate.go +++ b/service/quicksight/api_op_DeleteTemplate.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteTemplateAlias.go b/service/quicksight/api_op_DeleteTemplateAlias.go index 91c32b76600..8e437565980 100644 --- a/service/quicksight/api_op_DeleteTemplateAlias.go +++ b/service/quicksight/api_op_DeleteTemplateAlias.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteTemplateAliasMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteTheme.go b/service/quicksight/api_op_DeleteTheme.go index 756e438169d..c018eca7fcf 100644 --- a/service/quicksight/api_op_DeleteTheme.go +++ b/service/quicksight/api_op_DeleteTheme.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteThemeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteThemeAlias.go b/service/quicksight/api_op_DeleteThemeAlias.go index 30be91b6f65..176b85edc3c 100644 --- a/service/quicksight/api_op_DeleteThemeAlias.go +++ b/service/quicksight/api_op_DeleteThemeAlias.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteThemeAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteThemeAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteTopic.go b/service/quicksight/api_op_DeleteTopic.go index b0a5a835099..ff632c1a7d5 100644 --- a/service/quicksight/api_op_DeleteTopic.go +++ b/service/quicksight/api_op_DeleteTopic.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteTopicMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteTopicRefreshSchedule.go b/service/quicksight/api_op_DeleteTopicRefreshSchedule.go index edee98b987c..633bc3ae76f 100644 --- a/service/quicksight/api_op_DeleteTopicRefreshSchedule.go +++ b/service/quicksight/api_op_DeleteTopicRefreshSchedule.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteTopicRefreshScheduleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTopicRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteUser.go b/service/quicksight/api_op_DeleteUser.go index 48f92628405..16c47d1dbd3 100644 --- a/service/quicksight/api_op_DeleteUser.go +++ b/service/quicksight/api_op_DeleteUser.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteUserByPrincipalId.go b/service/quicksight/api_op_DeleteUserByPrincipalId.go index c63622cd084..407acd87dd0 100644 --- a/service/quicksight/api_op_DeleteUserByPrincipalId.go +++ b/service/quicksight/api_op_DeleteUserByPrincipalId.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteUserByPrincipalIdMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserByPrincipalIdValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DeleteVPCConnection.go b/service/quicksight/api_op_DeleteVPCConnection.go index 379ae11ee8f..9afbf230fce 100644 --- a/service/quicksight/api_op_DeleteVPCConnection.go +++ b/service/quicksight/api_op_DeleteVPCConnection.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteVPCConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVPCConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAccountCustomization.go b/service/quicksight/api_op_DescribeAccountCustomization.go index d5501fc52c0..7973531d788 100644 --- a/service/quicksight/api_op_DescribeAccountCustomization.go +++ b/service/quicksight/api_op_DescribeAccountCustomization.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeAccountCustomizationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountCustomizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAccountSettings.go b/service/quicksight/api_op_DescribeAccountSettings.go index a085b05a14e..ae7d3fa9c6a 100644 --- a/service/quicksight/api_op_DescribeAccountSettings.go +++ b/service/quicksight/api_op_DescribeAccountSettings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeAccountSettingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAccountSubscription.go b/service/quicksight/api_op_DescribeAccountSubscription.go index d9dd69b4fae..3361d7d88f2 100644 --- a/service/quicksight/api_op_DescribeAccountSubscription.go +++ b/service/quicksight/api_op_DescribeAccountSubscription.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeAccountSubscriptionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAnalysis.go b/service/quicksight/api_op_DescribeAnalysis.go index 2413e456944..b252ae08f08 100644 --- a/service/quicksight/api_op_DescribeAnalysis.go +++ b/service/quicksight/api_op_DescribeAnalysis.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeAnalysisMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAnalysisDefinition.go b/service/quicksight/api_op_DescribeAnalysisDefinition.go index 86d776b5c14..9082e571064 100644 --- a/service/quicksight/api_op_DescribeAnalysisDefinition.go +++ b/service/quicksight/api_op_DescribeAnalysisDefinition.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeAnalysisDefinitionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnalysisDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAnalysisPermissions.go b/service/quicksight/api_op_DescribeAnalysisPermissions.go index 4676e493026..7370c870792 100644 --- a/service/quicksight/api_op_DescribeAnalysisPermissions.go +++ b/service/quicksight/api_op_DescribeAnalysisPermissions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeAnalysisPermissionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAnalysisPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAssetBundleExportJob.go b/service/quicksight/api_op_DescribeAssetBundleExportJob.go index 441c70efc9a..eac120ca93b 100644 --- a/service/quicksight/api_op_DescribeAssetBundleExportJob.go +++ b/service/quicksight/api_op_DescribeAssetBundleExportJob.go @@ -194,6 +194,9 @@ func (c *Client) addOperationDescribeAssetBundleExportJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssetBundleExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeAssetBundleImportJob.go b/service/quicksight/api_op_DescribeAssetBundleImportJob.go index c66cd699ba1..a777d53cb2e 100644 --- a/service/quicksight/api_op_DescribeAssetBundleImportJob.go +++ b/service/quicksight/api_op_DescribeAssetBundleImportJob.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeAssetBundleImportJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssetBundleImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDashboard.go b/service/quicksight/api_op_DescribeDashboard.go index 845e40987a7..6f0e530c38f 100644 --- a/service/quicksight/api_op_DescribeDashboard.go +++ b/service/quicksight/api_op_DescribeDashboard.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDashboardMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDashboardValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDashboardDefinition.go b/service/quicksight/api_op_DescribeDashboardDefinition.go index c880b1c3f7a..c655dfd4d7e 100644 --- a/service/quicksight/api_op_DescribeDashboardDefinition.go +++ b/service/quicksight/api_op_DescribeDashboardDefinition.go @@ -178,6 +178,9 @@ func (c *Client) addOperationDescribeDashboardDefinitionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDashboardDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDashboardPermissions.go b/service/quicksight/api_op_DescribeDashboardPermissions.go index 58c1bcd4202..fdaf876f664 100644 --- a/service/quicksight/api_op_DescribeDashboardPermissions.go +++ b/service/quicksight/api_op_DescribeDashboardPermissions.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeDashboardPermissionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDashboardPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDashboardSnapshotJob.go b/service/quicksight/api_op_DescribeDashboardSnapshotJob.go index 48fb144922e..9fe9dd1fdd3 100644 --- a/service/quicksight/api_op_DescribeDashboardSnapshotJob.go +++ b/service/quicksight/api_op_DescribeDashboardSnapshotJob.go @@ -166,6 +166,9 @@ func (c *Client) addOperationDescribeDashboardSnapshotJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDashboardSnapshotJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go b/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go index 2fe9510cb59..54143b132bd 100644 --- a/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go +++ b/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeDashboardSnapshotJobResultMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDashboardSnapshotJobResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDataSet.go b/service/quicksight/api_op_DescribeDataSet.go index 41ae572b783..b179a7d5499 100644 --- a/service/quicksight/api_op_DescribeDataSet.go +++ b/service/quicksight/api_op_DescribeDataSet.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeDataSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDataSetPermissions.go b/service/quicksight/api_op_DescribeDataSetPermissions.go index 183f817fee8..a8d5f488a52 100644 --- a/service/quicksight/api_op_DescribeDataSetPermissions.go +++ b/service/quicksight/api_op_DescribeDataSetPermissions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeDataSetPermissionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataSetPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDataSetRefreshProperties.go b/service/quicksight/api_op_DescribeDataSetRefreshProperties.go index f2a6b6a8b54..cdf8e0c8cdf 100644 --- a/service/quicksight/api_op_DescribeDataSetRefreshProperties.go +++ b/service/quicksight/api_op_DescribeDataSetRefreshProperties.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeDataSetRefreshPropertiesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataSetRefreshPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDataSource.go b/service/quicksight/api_op_DescribeDataSource.go index efab9890fed..6b15b268d78 100644 --- a/service/quicksight/api_op_DescribeDataSource.go +++ b/service/quicksight/api_op_DescribeDataSource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeDataSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeDataSourcePermissions.go b/service/quicksight/api_op_DescribeDataSourcePermissions.go index 8eb3f39e701..d1bc7821ddd 100644 --- a/service/quicksight/api_op_DescribeDataSourcePermissions.go +++ b/service/quicksight/api_op_DescribeDataSourcePermissions.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDataSourcePermissionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataSourcePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeFolder.go b/service/quicksight/api_op_DescribeFolder.go index 26edf4188ab..3fbbe20e85b 100644 --- a/service/quicksight/api_op_DescribeFolder.go +++ b/service/quicksight/api_op_DescribeFolder.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeFolderMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeFolderPermissions.go b/service/quicksight/api_op_DescribeFolderPermissions.go index f99701c04b7..9ed1f50a1bc 100644 --- a/service/quicksight/api_op_DescribeFolderPermissions.go +++ b/service/quicksight/api_op_DescribeFolderPermissions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeFolderPermissionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFolderPermissionsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationDescribeFolderPermissionsMiddlewares(stack *middlew return nil } -// DescribeFolderPermissionsAPIClient is a client that implements the -// DescribeFolderPermissions operation. -type DescribeFolderPermissionsAPIClient interface { - DescribeFolderPermissions(context.Context, *DescribeFolderPermissionsInput, ...func(*Options)) (*DescribeFolderPermissionsOutput, error) -} - -var _ DescribeFolderPermissionsAPIClient = (*Client)(nil) - // DescribeFolderPermissionsPaginatorOptions is the paginator options for // DescribeFolderPermissions type DescribeFolderPermissionsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeFolderPermissionsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFolderPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeFolderPermissionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeFolderPermissionsAPIClient is a client that implements the +// DescribeFolderPermissions operation. +type DescribeFolderPermissionsAPIClient interface { + DescribeFolderPermissions(context.Context, *DescribeFolderPermissionsInput, ...func(*Options)) (*DescribeFolderPermissionsOutput, error) +} + +var _ DescribeFolderPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFolderPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_DescribeFolderResolvedPermissions.go b/service/quicksight/api_op_DescribeFolderResolvedPermissions.go index 0b83f3d9872..9acc596cb42 100644 --- a/service/quicksight/api_op_DescribeFolderResolvedPermissions.go +++ b/service/quicksight/api_op_DescribeFolderResolvedPermissions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeFolderResolvedPermissionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFolderResolvedPermissionsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationDescribeFolderResolvedPermissionsMiddlewares(stack return nil } -// DescribeFolderResolvedPermissionsAPIClient is a client that implements the -// DescribeFolderResolvedPermissions operation. -type DescribeFolderResolvedPermissionsAPIClient interface { - DescribeFolderResolvedPermissions(context.Context, *DescribeFolderResolvedPermissionsInput, ...func(*Options)) (*DescribeFolderResolvedPermissionsOutput, error) -} - -var _ DescribeFolderResolvedPermissionsAPIClient = (*Client)(nil) - // DescribeFolderResolvedPermissionsPaginatorOptions is the paginator options for // DescribeFolderResolvedPermissions type DescribeFolderResolvedPermissionsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeFolderResolvedPermissionsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFolderResolvedPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeFolderResolvedPermissionsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeFolderResolvedPermissionsAPIClient is a client that implements the +// DescribeFolderResolvedPermissions operation. +type DescribeFolderResolvedPermissionsAPIClient interface { + DescribeFolderResolvedPermissions(context.Context, *DescribeFolderResolvedPermissionsInput, ...func(*Options)) (*DescribeFolderResolvedPermissionsOutput, error) +} + +var _ DescribeFolderResolvedPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFolderResolvedPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_DescribeGroup.go b/service/quicksight/api_op_DescribeGroup.go index 8a2d53ccfec..c28a9fcc489 100644 --- a/service/quicksight/api_op_DescribeGroup.go +++ b/service/quicksight/api_op_DescribeGroup.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeGroupMembership.go b/service/quicksight/api_op_DescribeGroupMembership.go index 9006e8c33a2..b5c4477f9c6 100644 --- a/service/quicksight/api_op_DescribeGroupMembership.go +++ b/service/quicksight/api_op_DescribeGroupMembership.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeGroupMembershipMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupMembershipValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeIAMPolicyAssignment.go b/service/quicksight/api_op_DescribeIAMPolicyAssignment.go index 5fd94582a3e..52116e7d46c 100644 --- a/service/quicksight/api_op_DescribeIAMPolicyAssignment.go +++ b/service/quicksight/api_op_DescribeIAMPolicyAssignment.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeIAMPolicyAssignmentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIAMPolicyAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeIngestion.go b/service/quicksight/api_op_DescribeIngestion.go index a9067ea65ec..017f4e4e4f1 100644 --- a/service/quicksight/api_op_DescribeIngestion.go +++ b/service/quicksight/api_op_DescribeIngestion.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeIngestionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIngestionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeIpRestriction.go b/service/quicksight/api_op_DescribeIpRestriction.go index 68edf76246c..548dc961851 100644 --- a/service/quicksight/api_op_DescribeIpRestriction.go +++ b/service/quicksight/api_op_DescribeIpRestriction.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeIpRestrictionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIpRestrictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeKeyRegistration.go b/service/quicksight/api_op_DescribeKeyRegistration.go index 9958f8176a0..6a40d13808b 100644 --- a/service/quicksight/api_op_DescribeKeyRegistration.go +++ b/service/quicksight/api_op_DescribeKeyRegistration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeKeyRegistrationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeKeyRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeNamespace.go b/service/quicksight/api_op_DescribeNamespace.go index 262f8659bd5..9558345dcbf 100644 --- a/service/quicksight/api_op_DescribeNamespace.go +++ b/service/quicksight/api_op_DescribeNamespace.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeNamespaceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeRefreshSchedule.go b/service/quicksight/api_op_DescribeRefreshSchedule.go index e37c9735218..b2d7cda900a 100644 --- a/service/quicksight/api_op_DescribeRefreshSchedule.go +++ b/service/quicksight/api_op_DescribeRefreshSchedule.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeRefreshScheduleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeRoleCustomPermission.go b/service/quicksight/api_op_DescribeRoleCustomPermission.go index cda7883628b..532a2475e41 100644 --- a/service/quicksight/api_op_DescribeRoleCustomPermission.go +++ b/service/quicksight/api_op_DescribeRoleCustomPermission.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeRoleCustomPermissionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRoleCustomPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTemplate.go b/service/quicksight/api_op_DescribeTemplate.go index c0cb91295bd..efebc3c7aab 100644 --- a/service/quicksight/api_op_DescribeTemplate.go +++ b/service/quicksight/api_op_DescribeTemplate.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTemplateAlias.go b/service/quicksight/api_op_DescribeTemplateAlias.go index a6f6a4ccf8a..2d9cb7df45b 100644 --- a/service/quicksight/api_op_DescribeTemplateAlias.go +++ b/service/quicksight/api_op_DescribeTemplateAlias.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeTemplateAliasMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTemplateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTemplateDefinition.go b/service/quicksight/api_op_DescribeTemplateDefinition.go index 6749448d2ad..1a97f3bc3f2 100644 --- a/service/quicksight/api_op_DescribeTemplateDefinition.go +++ b/service/quicksight/api_op_DescribeTemplateDefinition.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeTemplateDefinitionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTemplateDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTemplatePermissions.go b/service/quicksight/api_op_DescribeTemplatePermissions.go index e36400e75d0..8de6f0c0d0e 100644 --- a/service/quicksight/api_op_DescribeTemplatePermissions.go +++ b/service/quicksight/api_op_DescribeTemplatePermissions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeTemplatePermissionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTemplatePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTheme.go b/service/quicksight/api_op_DescribeTheme.go index 341d9a2d1d6..cc5d7bc2ab6 100644 --- a/service/quicksight/api_op_DescribeTheme.go +++ b/service/quicksight/api_op_DescribeTheme.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeThemeMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeThemeAlias.go b/service/quicksight/api_op_DescribeThemeAlias.go index a659f03c87a..306aab34db5 100644 --- a/service/quicksight/api_op_DescribeThemeAlias.go +++ b/service/quicksight/api_op_DescribeThemeAlias.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeThemeAliasMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThemeAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeThemePermissions.go b/service/quicksight/api_op_DescribeThemePermissions.go index 753d51415b9..ea57857b957 100644 --- a/service/quicksight/api_op_DescribeThemePermissions.go +++ b/service/quicksight/api_op_DescribeThemePermissions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeThemePermissionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeThemePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTopic.go b/service/quicksight/api_op_DescribeTopic.go index 0058ffe4c60..2c3a8590c64 100644 --- a/service/quicksight/api_op_DescribeTopic.go +++ b/service/quicksight/api_op_DescribeTopic.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeTopicMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTopicPermissions.go b/service/quicksight/api_op_DescribeTopicPermissions.go index 8a0cf39d794..69b74fb74bb 100644 --- a/service/quicksight/api_op_DescribeTopicPermissions.go +++ b/service/quicksight/api_op_DescribeTopicPermissions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeTopicPermissionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTopicPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTopicRefresh.go b/service/quicksight/api_op_DescribeTopicRefresh.go index 1724d6105b0..a0dbcaf7924 100644 --- a/service/quicksight/api_op_DescribeTopicRefresh.go +++ b/service/quicksight/api_op_DescribeTopicRefresh.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeTopicRefreshMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTopicRefreshValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeTopicRefreshSchedule.go b/service/quicksight/api_op_DescribeTopicRefreshSchedule.go index 64a6d0d2eaa..006123e4921 100644 --- a/service/quicksight/api_op_DescribeTopicRefreshSchedule.go +++ b/service/quicksight/api_op_DescribeTopicRefreshSchedule.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeTopicRefreshScheduleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTopicRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeUser.go b/service/quicksight/api_op_DescribeUser.go index 642a9da21df..2099973f0c1 100644 --- a/service/quicksight/api_op_DescribeUser.go +++ b/service/quicksight/api_op_DescribeUser.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_DescribeVPCConnection.go b/service/quicksight/api_op_DescribeVPCConnection.go index 5c7ed477bd0..5a9772e09a8 100644 --- a/service/quicksight/api_op_DescribeVPCConnection.go +++ b/service/quicksight/api_op_DescribeVPCConnection.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeVPCConnectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVPCConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_GenerateEmbedUrlForAnonymousUser.go b/service/quicksight/api_op_GenerateEmbedUrlForAnonymousUser.go index 88228ca5d0c..e3622990bac 100644 --- a/service/quicksight/api_op_GenerateEmbedUrlForAnonymousUser.go +++ b/service/quicksight/api_op_GenerateEmbedUrlForAnonymousUser.go @@ -200,6 +200,9 @@ func (c *Client) addOperationGenerateEmbedUrlForAnonymousUserMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateEmbedUrlForAnonymousUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go b/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go index 80f27f1a205..126507a3304 100644 --- a/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go +++ b/service/quicksight/api_op_GenerateEmbedUrlForRegisteredUser.go @@ -176,6 +176,9 @@ func (c *Client) addOperationGenerateEmbedUrlForRegisteredUserMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateEmbedUrlForRegisteredUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_GetDashboardEmbedUrl.go b/service/quicksight/api_op_GetDashboardEmbedUrl.go index e70bef97b46..c833ba61169 100644 --- a/service/quicksight/api_op_GetDashboardEmbedUrl.go +++ b/service/quicksight/api_op_GetDashboardEmbedUrl.go @@ -202,6 +202,9 @@ func (c *Client) addOperationGetDashboardEmbedUrlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDashboardEmbedUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_GetSessionEmbedUrl.go b/service/quicksight/api_op_GetSessionEmbedUrl.go index 92097e6103c..689302d5544 100644 --- a/service/quicksight/api_op_GetSessionEmbedUrl.go +++ b/service/quicksight/api_op_GetSessionEmbedUrl.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetSessionEmbedUrlMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionEmbedUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_ListAnalyses.go b/service/quicksight/api_op_ListAnalyses.go index b77c93ce3ec..b96610dc584 100644 --- a/service/quicksight/api_op_ListAnalyses.go +++ b/service/quicksight/api_op_ListAnalyses.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAnalysesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnalysesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListAnalysesMiddlewares(stack *middleware.Stack, op return nil } -// ListAnalysesAPIClient is a client that implements the ListAnalyses operation. -type ListAnalysesAPIClient interface { - ListAnalyses(context.Context, *ListAnalysesInput, ...func(*Options)) (*ListAnalysesOutput, error) -} - -var _ ListAnalysesAPIClient = (*Client)(nil) - // ListAnalysesPaginatorOptions is the paginator options for ListAnalyses type ListAnalysesPaginatorOptions struct { // The maximum number of results to return. @@ -216,6 +212,9 @@ func (p *ListAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnalyses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAnalysesAPIClient is a client that implements the ListAnalyses operation. +type ListAnalysesAPIClient interface { + ListAnalyses(context.Context, *ListAnalysesInput, ...func(*Options)) (*ListAnalysesOutput, error) +} + +var _ ListAnalysesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListAssetBundleExportJobs.go b/service/quicksight/api_op_ListAssetBundleExportJobs.go index 4ede8cb9184..f848650dd20 100644 --- a/service/quicksight/api_op_ListAssetBundleExportJobs.go +++ b/service/quicksight/api_op_ListAssetBundleExportJobs.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAssetBundleExportJobsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssetBundleExportJobsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListAssetBundleExportJobsMiddlewares(stack *middlew return nil } -// ListAssetBundleExportJobsAPIClient is a client that implements the -// ListAssetBundleExportJobs operation. -type ListAssetBundleExportJobsAPIClient interface { - ListAssetBundleExportJobs(context.Context, *ListAssetBundleExportJobsInput, ...func(*Options)) (*ListAssetBundleExportJobsOutput, error) -} - -var _ ListAssetBundleExportJobsAPIClient = (*Client)(nil) - // ListAssetBundleExportJobsPaginatorOptions is the paginator options for // ListAssetBundleExportJobs type ListAssetBundleExportJobsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListAssetBundleExportJobsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetBundleExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListAssetBundleExportJobsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAssetBundleExportJobsAPIClient is a client that implements the +// ListAssetBundleExportJobs operation. +type ListAssetBundleExportJobsAPIClient interface { + ListAssetBundleExportJobs(context.Context, *ListAssetBundleExportJobsInput, ...func(*Options)) (*ListAssetBundleExportJobsOutput, error) +} + +var _ ListAssetBundleExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetBundleExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListAssetBundleImportJobs.go b/service/quicksight/api_op_ListAssetBundleImportJobs.go index aaae85fc097..4be82274460 100644 --- a/service/quicksight/api_op_ListAssetBundleImportJobs.go +++ b/service/quicksight/api_op_ListAssetBundleImportJobs.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAssetBundleImportJobsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssetBundleImportJobsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAssetBundleImportJobsMiddlewares(stack *middlew return nil } -// ListAssetBundleImportJobsAPIClient is a client that implements the -// ListAssetBundleImportJobs operation. -type ListAssetBundleImportJobsAPIClient interface { - ListAssetBundleImportJobs(context.Context, *ListAssetBundleImportJobsInput, ...func(*Options)) (*ListAssetBundleImportJobsOutput, error) -} - -var _ ListAssetBundleImportJobsAPIClient = (*Client)(nil) - // ListAssetBundleImportJobsPaginatorOptions is the paginator options for // ListAssetBundleImportJobs type ListAssetBundleImportJobsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListAssetBundleImportJobsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssetBundleImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListAssetBundleImportJobsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAssetBundleImportJobsAPIClient is a client that implements the +// ListAssetBundleImportJobs operation. +type ListAssetBundleImportJobsAPIClient interface { + ListAssetBundleImportJobs(context.Context, *ListAssetBundleImportJobsInput, ...func(*Options)) (*ListAssetBundleImportJobsOutput, error) +} + +var _ ListAssetBundleImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssetBundleImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListDashboardVersions.go b/service/quicksight/api_op_ListDashboardVersions.go index faa4e237cc3..c8043ae7e02 100644 --- a/service/quicksight/api_op_ListDashboardVersions.go +++ b/service/quicksight/api_op_ListDashboardVersions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListDashboardVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDashboardVersionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListDashboardVersionsMiddlewares(stack *middleware. return nil } -// ListDashboardVersionsAPIClient is a client that implements the -// ListDashboardVersions operation. -type ListDashboardVersionsAPIClient interface { - ListDashboardVersions(context.Context, *ListDashboardVersionsInput, ...func(*Options)) (*ListDashboardVersionsOutput, error) -} - -var _ ListDashboardVersionsAPIClient = (*Client)(nil) - // ListDashboardVersionsPaginatorOptions is the paginator options for // ListDashboardVersions type ListDashboardVersionsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListDashboardVersionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDashboardVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListDashboardVersionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDashboardVersionsAPIClient is a client that implements the +// ListDashboardVersions operation. +type ListDashboardVersionsAPIClient interface { + ListDashboardVersions(context.Context, *ListDashboardVersionsInput, ...func(*Options)) (*ListDashboardVersionsOutput, error) +} + +var _ ListDashboardVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDashboardVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListDashboards.go b/service/quicksight/api_op_ListDashboards.go index 82e63ee0c1a..679afe48527 100644 --- a/service/quicksight/api_op_ListDashboards.go +++ b/service/quicksight/api_op_ListDashboards.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListDashboardsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDashboardsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListDashboardsMiddlewares(stack *middleware.Stack, return nil } -// ListDashboardsAPIClient is a client that implements the ListDashboards -// operation. -type ListDashboardsAPIClient interface { - ListDashboards(context.Context, *ListDashboardsInput, ...func(*Options)) (*ListDashboardsOutput, error) -} - -var _ ListDashboardsAPIClient = (*Client)(nil) - // ListDashboardsPaginatorOptions is the paginator options for ListDashboards type ListDashboardsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -218,6 +213,9 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDashboards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListDashboardsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListDashboardsAPIClient is a client that implements the ListDashboards +// operation. +type ListDashboardsAPIClient interface { + ListDashboards(context.Context, *ListDashboardsInput, ...func(*Options)) (*ListDashboardsOutput, error) +} + +var _ ListDashboardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDashboards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListDataSets.go b/service/quicksight/api_op_ListDataSets.go index 9109172a797..563dbcda2b5 100644 --- a/service/quicksight/api_op_ListDataSets.go +++ b/service/quicksight/api_op_ListDataSets.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListDataSetsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSetsValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListDataSetsMiddlewares(stack *middleware.Stack, op return nil } -// ListDataSetsAPIClient is a client that implements the ListDataSets operation. -type ListDataSetsAPIClient interface { - ListDataSets(context.Context, *ListDataSetsInput, ...func(*Options)) (*ListDataSetsOutput, error) -} - -var _ ListDataSetsAPIClient = (*Client)(nil) - // ListDataSetsPaginatorOptions is the paginator options for ListDataSets type ListDataSetsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -218,6 +214,9 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListDataSetsAPIClient is a client that implements the ListDataSets operation. +type ListDataSetsAPIClient interface { + ListDataSets(context.Context, *ListDataSetsInput, ...func(*Options)) (*ListDataSetsOutput, error) +} + +var _ ListDataSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListDataSources.go b/service/quicksight/api_op_ListDataSources.go index 70ea3350715..5afdfef51d0 100644 --- a/service/quicksight/api_op_ListDataSources.go +++ b/service/quicksight/api_op_ListDataSources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDataSourcesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListDataSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListDataSourcesAPIClient is a client that implements the ListDataSources -// operation. -type ListDataSourcesAPIClient interface { - ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) -} - -var _ ListDataSourcesAPIClient = (*Client)(nil) - // ListDataSourcesPaginatorOptions is the paginator options for ListDataSources type ListDataSourcesPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -217,6 +212,9 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListDataSourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDataSourcesAPIClient is a client that implements the ListDataSources +// operation. +type ListDataSourcesAPIClient interface { + ListDataSources(context.Context, *ListDataSourcesInput, ...func(*Options)) (*ListDataSourcesOutput, error) +} + +var _ ListDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListFolderMembers.go b/service/quicksight/api_op_ListFolderMembers.go index ddacbbd0d84..495abdce7d4 100644 --- a/service/quicksight/api_op_ListFolderMembers.go +++ b/service/quicksight/api_op_ListFolderMembers.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListFolderMembersMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFolderMembersValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListFolderMembersMiddlewares(stack *middleware.Stac return nil } -// ListFolderMembersAPIClient is a client that implements the ListFolderMembers -// operation. -type ListFolderMembersAPIClient interface { - ListFolderMembers(context.Context, *ListFolderMembersInput, ...func(*Options)) (*ListFolderMembersOutput, error) -} - -var _ ListFolderMembersAPIClient = (*Client)(nil) - // ListFolderMembersPaginatorOptions is the paginator options for ListFolderMembers type ListFolderMembersPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -222,6 +217,9 @@ func (p *ListFolderMembersPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFolderMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListFolderMembersPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListFolderMembersAPIClient is a client that implements the ListFolderMembers +// operation. +type ListFolderMembersAPIClient interface { + ListFolderMembers(context.Context, *ListFolderMembersInput, ...func(*Options)) (*ListFolderMembersOutput, error) +} + +var _ ListFolderMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFolderMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListFolders.go b/service/quicksight/api_op_ListFolders.go index e383c5e6c9c..32ce79cbb6c 100644 --- a/service/quicksight/api_op_ListFolders.go +++ b/service/quicksight/api_op_ListFolders.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListFoldersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFoldersValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListFoldersMiddlewares(stack *middleware.Stack, opt return nil } -// ListFoldersAPIClient is a client that implements the ListFolders operation. -type ListFoldersAPIClient interface { - ListFolders(context.Context, *ListFoldersInput, ...func(*Options)) (*ListFoldersOutput, error) -} - -var _ ListFoldersAPIClient = (*Client)(nil) - // ListFoldersPaginatorOptions is the paginator options for ListFolders type ListFoldersPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -216,6 +212,9 @@ func (p *ListFoldersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFolders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListFoldersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListFoldersAPIClient is a client that implements the ListFolders operation. +type ListFoldersAPIClient interface { + ListFolders(context.Context, *ListFoldersInput, ...func(*Options)) (*ListFoldersOutput, error) +} + +var _ ListFoldersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFolders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListGroupMemberships.go b/service/quicksight/api_op_ListGroupMemberships.go index 516ecf2a19b..564c8361670 100644 --- a/service/quicksight/api_op_ListGroupMemberships.go +++ b/service/quicksight/api_op_ListGroupMemberships.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupMembershipsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S return nil } -// ListGroupMembershipsAPIClient is a client that implements the -// ListGroupMemberships operation. -type ListGroupMembershipsAPIClient interface { - ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) -} - -var _ ListGroupMembershipsAPIClient = (*Client)(nil) - // ListGroupMembershipsPaginatorOptions is the paginator options for // ListGroupMemberships type ListGroupMembershipsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListGroupMembershipsAPIClient is a client that implements the +// ListGroupMemberships operation. +type ListGroupMembershipsAPIClient interface { + ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) +} + +var _ ListGroupMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListGroups.go b/service/quicksight/api_op_ListGroups.go index 86fac43b02a..829474141b3 100644 --- a/service/quicksight/api_op_ListGroups.go +++ b/service/quicksight/api_op_ListGroups.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The maximum number of results to return. @@ -222,6 +218,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListIAMPolicyAssignments.go b/service/quicksight/api_op_ListIAMPolicyAssignments.go index 1965410affe..e9316e86196 100644 --- a/service/quicksight/api_op_ListIAMPolicyAssignments.go +++ b/service/quicksight/api_op_ListIAMPolicyAssignments.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListIAMPolicyAssignmentsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIAMPolicyAssignmentsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListIAMPolicyAssignmentsMiddlewares(stack *middlewa return nil } -// ListIAMPolicyAssignmentsAPIClient is a client that implements the -// ListIAMPolicyAssignments operation. -type ListIAMPolicyAssignmentsAPIClient interface { - ListIAMPolicyAssignments(context.Context, *ListIAMPolicyAssignmentsInput, ...func(*Options)) (*ListIAMPolicyAssignmentsOutput, error) -} - -var _ ListIAMPolicyAssignmentsAPIClient = (*Client)(nil) - // ListIAMPolicyAssignmentsPaginatorOptions is the paginator options for // ListIAMPolicyAssignments type ListIAMPolicyAssignmentsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListIAMPolicyAssignmentsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIAMPolicyAssignments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListIAMPolicyAssignmentsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListIAMPolicyAssignmentsAPIClient is a client that implements the +// ListIAMPolicyAssignments operation. +type ListIAMPolicyAssignmentsAPIClient interface { + ListIAMPolicyAssignments(context.Context, *ListIAMPolicyAssignmentsInput, ...func(*Options)) (*ListIAMPolicyAssignmentsOutput, error) +} + +var _ ListIAMPolicyAssignmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIAMPolicyAssignments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go b/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go index 3411b88474b..c55aca2a45f 100644 --- a/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go +++ b/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListIAMPolicyAssignmentsForUserMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIAMPolicyAssignmentsForUserValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListIAMPolicyAssignmentsForUserMiddlewares(stack *m return nil } -// ListIAMPolicyAssignmentsForUserAPIClient is a client that implements the -// ListIAMPolicyAssignmentsForUser operation. -type ListIAMPolicyAssignmentsForUserAPIClient interface { - ListIAMPolicyAssignmentsForUser(context.Context, *ListIAMPolicyAssignmentsForUserInput, ...func(*Options)) (*ListIAMPolicyAssignmentsForUserOutput, error) -} - -var _ ListIAMPolicyAssignmentsForUserAPIClient = (*Client)(nil) - // ListIAMPolicyAssignmentsForUserPaginatorOptions is the paginator options for // ListIAMPolicyAssignmentsForUser type ListIAMPolicyAssignmentsForUserPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListIAMPolicyAssignmentsForUserPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIAMPolicyAssignmentsForUser(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListIAMPolicyAssignmentsForUserPaginator) NextPage(ctx context.Context, return result, nil } +// ListIAMPolicyAssignmentsForUserAPIClient is a client that implements the +// ListIAMPolicyAssignmentsForUser operation. +type ListIAMPolicyAssignmentsForUserAPIClient interface { + ListIAMPolicyAssignmentsForUser(context.Context, *ListIAMPolicyAssignmentsForUserInput, ...func(*Options)) (*ListIAMPolicyAssignmentsForUserOutput, error) +} + +var _ ListIAMPolicyAssignmentsForUserAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIAMPolicyAssignmentsForUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListIdentityPropagationConfigs.go b/service/quicksight/api_op_ListIdentityPropagationConfigs.go index e33eb411271..486aabf2419 100644 --- a/service/quicksight/api_op_ListIdentityPropagationConfigs.go +++ b/service/quicksight/api_op_ListIdentityPropagationConfigs.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListIdentityPropagationConfigsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityPropagationConfigsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_ListIngestions.go b/service/quicksight/api_op_ListIngestions.go index eec9a0cf601..0fa516a2441 100644 --- a/service/quicksight/api_op_ListIngestions.go +++ b/service/quicksight/api_op_ListIngestions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListIngestionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIngestionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListIngestionsMiddlewares(stack *middleware.Stack, return nil } -// ListIngestionsAPIClient is a client that implements the ListIngestions -// operation. -type ListIngestionsAPIClient interface { - ListIngestions(context.Context, *ListIngestionsInput, ...func(*Options)) (*ListIngestionsOutput, error) -} - -var _ ListIngestionsAPIClient = (*Client)(nil) - // ListIngestionsPaginatorOptions is the paginator options for ListIngestions type ListIngestionsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -221,6 +216,9 @@ func (p *ListIngestionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIngestions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListIngestionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListIngestionsAPIClient is a client that implements the ListIngestions +// operation. +type ListIngestionsAPIClient interface { + ListIngestions(context.Context, *ListIngestionsInput, ...func(*Options)) (*ListIngestionsOutput, error) +} + +var _ ListIngestionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIngestions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListNamespaces.go b/service/quicksight/api_op_ListNamespaces.go index a8384b1a81f..4c26e12f665 100644 --- a/service/quicksight/api_op_ListNamespaces.go +++ b/service/quicksight/api_op_ListNamespaces.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListNamespacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNamespacesValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListNamespacesMiddlewares(stack *middleware.Stack, return nil } -// ListNamespacesAPIClient is a client that implements the ListNamespaces -// operation. -type ListNamespacesAPIClient interface { - ListNamespaces(context.Context, *ListNamespacesInput, ...func(*Options)) (*ListNamespacesOutput, error) -} - -var _ ListNamespacesAPIClient = (*Client)(nil) - // ListNamespacesPaginatorOptions is the paginator options for ListNamespaces type ListNamespacesPaginatorOptions struct { // The maximum number of results to return. @@ -231,6 +226,9 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNamespaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListNamespacesAPIClient is a client that implements the ListNamespaces +// operation. +type ListNamespacesAPIClient interface { + ListNamespaces(context.Context, *ListNamespacesInput, ...func(*Options)) (*ListNamespacesOutput, error) +} + +var _ ListNamespacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListRefreshSchedules.go b/service/quicksight/api_op_ListRefreshSchedules.go index 34e6c27f434..1737d435130 100644 --- a/service/quicksight/api_op_ListRefreshSchedules.go +++ b/service/quicksight/api_op_ListRefreshSchedules.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRefreshSchedulesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRefreshSchedulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_ListRoleMemberships.go b/service/quicksight/api_op_ListRoleMemberships.go index 9824c4db41a..64b0a89946e 100644 --- a/service/quicksight/api_op_ListRoleMemberships.go +++ b/service/quicksight/api_op_ListRoleMemberships.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListRoleMembershipsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoleMembershipsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListRoleMembershipsMiddlewares(stack *middleware.St return nil } -// ListRoleMembershipsAPIClient is a client that implements the -// ListRoleMemberships operation. -type ListRoleMembershipsAPIClient interface { - ListRoleMemberships(context.Context, *ListRoleMembershipsInput, ...func(*Options)) (*ListRoleMembershipsOutput, error) -} - -var _ ListRoleMembershipsAPIClient = (*Client)(nil) - // ListRoleMembershipsPaginatorOptions is the paginator options for // ListRoleMemberships type ListRoleMembershipsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListRoleMembershipsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoleMemberships(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListRoleMembershipsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRoleMembershipsAPIClient is a client that implements the +// ListRoleMemberships operation. +type ListRoleMembershipsAPIClient interface { + ListRoleMemberships(context.Context, *ListRoleMembershipsInput, ...func(*Options)) (*ListRoleMembershipsOutput, error) +} + +var _ ListRoleMembershipsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoleMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListTagsForResource.go b/service/quicksight/api_op_ListTagsForResource.go index 65934dca049..cb09d8becf4 100644 --- a/service/quicksight/api_op_ListTagsForResource.go +++ b/service/quicksight/api_op_ListTagsForResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_ListTemplateAliases.go b/service/quicksight/api_op_ListTemplateAliases.go index 0411d21cfc4..2b3fdd70c7b 100644 --- a/service/quicksight/api_op_ListTemplateAliases.go +++ b/service/quicksight/api_op_ListTemplateAliases.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListTemplateAliasesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateAliasesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListTemplateAliasesMiddlewares(stack *middleware.St return nil } -// ListTemplateAliasesAPIClient is a client that implements the -// ListTemplateAliases operation. -type ListTemplateAliasesAPIClient interface { - ListTemplateAliases(context.Context, *ListTemplateAliasesInput, ...func(*Options)) (*ListTemplateAliasesOutput, error) -} - -var _ ListTemplateAliasesAPIClient = (*Client)(nil) - // ListTemplateAliasesPaginatorOptions is the paginator options for // ListTemplateAliases type ListTemplateAliasesPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListTemplateAliasesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListTemplateAliasesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTemplateAliasesAPIClient is a client that implements the +// ListTemplateAliases operation. +type ListTemplateAliasesAPIClient interface { + ListTemplateAliases(context.Context, *ListTemplateAliasesInput, ...func(*Options)) (*ListTemplateAliasesOutput, error) +} + +var _ ListTemplateAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListTemplateVersions.go b/service/quicksight/api_op_ListTemplateVersions.go index f8f07962cc4..22fc0385cb5 100644 --- a/service/quicksight/api_op_ListTemplateVersions.go +++ b/service/quicksight/api_op_ListTemplateVersions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListTemplateVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateVersionsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListTemplateVersionsMiddlewares(stack *middleware.S return nil } -// ListTemplateVersionsAPIClient is a client that implements the -// ListTemplateVersions operation. -type ListTemplateVersionsAPIClient interface { - ListTemplateVersions(context.Context, *ListTemplateVersionsInput, ...func(*Options)) (*ListTemplateVersionsOutput, error) -} - -var _ ListTemplateVersionsAPIClient = (*Client)(nil) - // ListTemplateVersionsPaginatorOptions is the paginator options for // ListTemplateVersions type ListTemplateVersionsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTemplateVersionsAPIClient is a client that implements the +// ListTemplateVersions operation. +type ListTemplateVersionsAPIClient interface { + ListTemplateVersions(context.Context, *ListTemplateVersionsInput, ...func(*Options)) (*ListTemplateVersionsOutput, error) +} + +var _ ListTemplateVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListTemplates.go b/service/quicksight/api_op_ListTemplates.go index 8c1d963bddc..c563896575f 100644 --- a/service/quicksight/api_op_ListTemplates.go +++ b/service/quicksight/api_op_ListTemplates.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplatesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o return nil } -// ListTemplatesAPIClient is a client that implements the ListTemplates operation. -type ListTemplatesAPIClient interface { - ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) -} - -var _ ListTemplatesAPIClient = (*Client)(nil) - // ListTemplatesPaginatorOptions is the paginator options for ListTemplates type ListTemplatesPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -216,6 +212,9 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListTemplatesAPIClient is a client that implements the ListTemplates operation. +type ListTemplatesAPIClient interface { + ListTemplates(context.Context, *ListTemplatesInput, ...func(*Options)) (*ListTemplatesOutput, error) +} + +var _ ListTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListThemeAliases.go b/service/quicksight/api_op_ListThemeAliases.go index 4c57667809b..0838f2187fd 100644 --- a/service/quicksight/api_op_ListThemeAliases.go +++ b/service/quicksight/api_op_ListThemeAliases.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListThemeAliasesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThemeAliasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_ListThemeVersions.go b/service/quicksight/api_op_ListThemeVersions.go index 3fe68c79db8..2bfe4e283df 100644 --- a/service/quicksight/api_op_ListThemeVersions.go +++ b/service/quicksight/api_op_ListThemeVersions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListThemeVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThemeVersionsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListThemeVersionsMiddlewares(stack *middleware.Stac return nil } -// ListThemeVersionsAPIClient is a client that implements the ListThemeVersions -// operation. -type ListThemeVersionsAPIClient interface { - ListThemeVersions(context.Context, *ListThemeVersionsInput, ...func(*Options)) (*ListThemeVersionsOutput, error) -} - -var _ ListThemeVersionsAPIClient = (*Client)(nil) - // ListThemeVersionsPaginatorOptions is the paginator options for ListThemeVersions type ListThemeVersionsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -222,6 +217,9 @@ func (p *ListThemeVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThemeVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListThemeVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListThemeVersionsAPIClient is a client that implements the ListThemeVersions +// operation. +type ListThemeVersionsAPIClient interface { + ListThemeVersions(context.Context, *ListThemeVersionsInput, ...func(*Options)) (*ListThemeVersionsOutput, error) +} + +var _ ListThemeVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThemeVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListThemes.go b/service/quicksight/api_op_ListThemes.go index 607befcc1f8..11156c916e5 100644 --- a/service/quicksight/api_op_ListThemes.go +++ b/service/quicksight/api_op_ListThemes.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListThemesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListThemesValidationMiddleware(stack); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListThemesMiddlewares(stack *middleware.Stack, opti return nil } -// ListThemesAPIClient is a client that implements the ListThemes operation. -type ListThemesAPIClient interface { - ListThemes(context.Context, *ListThemesInput, ...func(*Options)) (*ListThemesOutput, error) -} - -var _ ListThemesAPIClient = (*Client)(nil) - // ListThemesPaginatorOptions is the paginator options for ListThemes type ListThemesPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -225,6 +221,9 @@ func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListThemes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListThemesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListThemesAPIClient is a client that implements the ListThemes operation. +type ListThemesAPIClient interface { + ListThemes(context.Context, *ListThemesInput, ...func(*Options)) (*ListThemesOutput, error) +} + +var _ ListThemesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListThemes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListTopicRefreshSchedules.go b/service/quicksight/api_op_ListTopicRefreshSchedules.go index 5172670096e..d10c9a22a7e 100644 --- a/service/quicksight/api_op_ListTopicRefreshSchedules.go +++ b/service/quicksight/api_op_ListTopicRefreshSchedules.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListTopicRefreshSchedulesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTopicRefreshSchedulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_ListTopics.go b/service/quicksight/api_op_ListTopics.go index f03036aba38..5137cb7747a 100644 --- a/service/quicksight/api_op_ListTopics.go +++ b/service/quicksight/api_op_ListTopics.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTopicsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTopicsValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListTopicsMiddlewares(stack *middleware.Stack, opti return nil } -// ListTopicsAPIClient is a client that implements the ListTopics operation. -type ListTopicsAPIClient interface { - ListTopics(context.Context, *ListTopicsInput, ...func(*Options)) (*ListTopicsOutput, error) -} - -var _ ListTopicsAPIClient = (*Client)(nil) - // ListTopicsPaginatorOptions is the paginator options for ListTopics type ListTopicsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -216,6 +212,9 @@ func (p *ListTopicsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTopics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListTopicsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTopicsAPIClient is a client that implements the ListTopics operation. +type ListTopicsAPIClient interface { + ListTopics(context.Context, *ListTopicsInput, ...func(*Options)) (*ListTopicsOutput, error) +} + +var _ ListTopicsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTopics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListUserGroups.go b/service/quicksight/api_op_ListUserGroups.go index a4f7abaf1b5..0a490260d97 100644 --- a/service/quicksight/api_op_ListUserGroups.go +++ b/service/quicksight/api_op_ListUserGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListUserGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUserGroupsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListUserGroupsMiddlewares(stack *middleware.Stack, return nil } -// ListUserGroupsAPIClient is a client that implements the ListUserGroups -// operation. -type ListUserGroupsAPIClient interface { - ListUserGroups(context.Context, *ListUserGroupsInput, ...func(*Options)) (*ListUserGroupsOutput, error) -} - -var _ ListUserGroupsAPIClient = (*Client)(nil) - // ListUserGroupsPaginatorOptions is the paginator options for ListUserGroups type ListUserGroupsPaginatorOptions struct { // The maximum number of results to return from this request. @@ -229,6 +224,9 @@ func (p *ListUserGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListUserGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListUserGroupsAPIClient is a client that implements the ListUserGroups +// operation. +type ListUserGroupsAPIClient interface { + ListUserGroups(context.Context, *ListUserGroupsInput, ...func(*Options)) (*ListUserGroupsOutput, error) +} + +var _ ListUserGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListUsers.go b/service/quicksight/api_op_ListUsers.go index 0f3a955ea2a..f663f386c86 100644 --- a/service/quicksight/api_op_ListUsers.go +++ b/service/quicksight/api_op_ListUsers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to return from this request. @@ -222,6 +218,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListVPCConnections.go b/service/quicksight/api_op_ListVPCConnections.go index efd046dec2c..f9acf51277f 100644 --- a/service/quicksight/api_op_ListVPCConnections.go +++ b/service/quicksight/api_op_ListVPCConnections.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListVPCConnectionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVPCConnectionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListVPCConnectionsMiddlewares(stack *middleware.Sta return nil } -// ListVPCConnectionsAPIClient is a client that implements the ListVPCConnections -// operation. -type ListVPCConnectionsAPIClient interface { - ListVPCConnections(context.Context, *ListVPCConnectionsInput, ...func(*Options)) (*ListVPCConnectionsOutput, error) -} - -var _ ListVPCConnectionsAPIClient = (*Client)(nil) - // ListVPCConnectionsPaginatorOptions is the paginator options for // ListVPCConnections type ListVPCConnectionsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListVPCConnectionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVPCConnections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListVPCConnectionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListVPCConnectionsAPIClient is a client that implements the ListVPCConnections +// operation. +type ListVPCConnectionsAPIClient interface { + ListVPCConnections(context.Context, *ListVPCConnectionsInput, ...func(*Options)) (*ListVPCConnectionsOutput, error) +} + +var _ ListVPCConnectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVPCConnections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_PutDataSetRefreshProperties.go b/service/quicksight/api_op_PutDataSetRefreshProperties.go index e8ffd64f4c1..2a45de77db4 100644 --- a/service/quicksight/api_op_PutDataSetRefreshProperties.go +++ b/service/quicksight/api_op_PutDataSetRefreshProperties.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutDataSetRefreshPropertiesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDataSetRefreshPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_RegisterUser.go b/service/quicksight/api_op_RegisterUser.go index 5f1c78d7331..8eb5de2dacd 100644 --- a/service/quicksight/api_op_RegisterUser.go +++ b/service/quicksight/api_op_RegisterUser.go @@ -249,6 +249,9 @@ func (c *Client) addOperationRegisterUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_RestoreAnalysis.go b/service/quicksight/api_op_RestoreAnalysis.go index 8b337521861..19e22e7b6d3 100644 --- a/service/quicksight/api_op_RestoreAnalysis.go +++ b/service/quicksight/api_op_RestoreAnalysis.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRestoreAnalysisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_SearchAnalyses.go b/service/quicksight/api_op_SearchAnalyses.go index dbccc8dea0c..a4ece0cc85a 100644 --- a/service/quicksight/api_op_SearchAnalyses.go +++ b/service/quicksight/api_op_SearchAnalyses.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSearchAnalysesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchAnalysesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationSearchAnalysesMiddlewares(stack *middleware.Stack, return nil } -// SearchAnalysesAPIClient is a client that implements the SearchAnalyses -// operation. -type SearchAnalysesAPIClient interface { - SearchAnalyses(context.Context, *SearchAnalysesInput, ...func(*Options)) (*SearchAnalysesOutput, error) -} - -var _ SearchAnalysesAPIClient = (*Client)(nil) - // SearchAnalysesPaginatorOptions is the paginator options for SearchAnalyses type SearchAnalysesPaginatorOptions struct { // The maximum number of results to return. @@ -225,6 +220,9 @@ func (p *SearchAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchAnalyses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *SearchAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchAnalysesAPIClient is a client that implements the SearchAnalyses +// operation. +type SearchAnalysesAPIClient interface { + SearchAnalyses(context.Context, *SearchAnalysesInput, ...func(*Options)) (*SearchAnalysesOutput, error) +} + +var _ SearchAnalysesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_SearchDashboards.go b/service/quicksight/api_op_SearchDashboards.go index dc1002adc10..59519e394d7 100644 --- a/service/quicksight/api_op_SearchDashboards.go +++ b/service/quicksight/api_op_SearchDashboards.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSearchDashboardsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchDashboardsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationSearchDashboardsMiddlewares(stack *middleware.Stack return nil } -// SearchDashboardsAPIClient is a client that implements the SearchDashboards -// operation. -type SearchDashboardsAPIClient interface { - SearchDashboards(context.Context, *SearchDashboardsInput, ...func(*Options)) (*SearchDashboardsOutput, error) -} - -var _ SearchDashboardsAPIClient = (*Client)(nil) - // SearchDashboardsPaginatorOptions is the paginator options for SearchDashboards type SearchDashboardsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -228,6 +223,9 @@ func (p *SearchDashboardsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchDashboards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *SearchDashboardsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// SearchDashboardsAPIClient is a client that implements the SearchDashboards +// operation. +type SearchDashboardsAPIClient interface { + SearchDashboards(context.Context, *SearchDashboardsInput, ...func(*Options)) (*SearchDashboardsOutput, error) +} + +var _ SearchDashboardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchDashboards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_SearchDataSets.go b/service/quicksight/api_op_SearchDataSets.go index 8994956c1fa..5ca223ef8d3 100644 --- a/service/quicksight/api_op_SearchDataSets.go +++ b/service/quicksight/api_op_SearchDataSets.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSearchDataSetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchDataSetsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationSearchDataSetsMiddlewares(stack *middleware.Stack, return nil } -// SearchDataSetsAPIClient is a client that implements the SearchDataSets -// operation. -type SearchDataSetsAPIClient interface { - SearchDataSets(context.Context, *SearchDataSetsInput, ...func(*Options)) (*SearchDataSetsOutput, error) -} - -var _ SearchDataSetsAPIClient = (*Client)(nil) - // SearchDataSetsPaginatorOptions is the paginator options for SearchDataSets type SearchDataSetsPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -222,6 +217,9 @@ func (p *SearchDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchDataSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *SearchDataSetsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchDataSetsAPIClient is a client that implements the SearchDataSets +// operation. +type SearchDataSetsAPIClient interface { + SearchDataSets(context.Context, *SearchDataSetsInput, ...func(*Options)) (*SearchDataSetsOutput, error) +} + +var _ SearchDataSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchDataSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_SearchDataSources.go b/service/quicksight/api_op_SearchDataSources.go index 7a4f4b986e1..f17347a5792 100644 --- a/service/quicksight/api_op_SearchDataSources.go +++ b/service/quicksight/api_op_SearchDataSources.go @@ -127,6 +127,9 @@ func (c *Client) addOperationSearchDataSourcesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchDataSourcesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationSearchDataSourcesMiddlewares(stack *middleware.Stac return nil } -// SearchDataSourcesAPIClient is a client that implements the SearchDataSources -// operation. -type SearchDataSourcesAPIClient interface { - SearchDataSources(context.Context, *SearchDataSourcesInput, ...func(*Options)) (*SearchDataSourcesOutput, error) -} - -var _ SearchDataSourcesAPIClient = (*Client)(nil) - // SearchDataSourcesPaginatorOptions is the paginator options for SearchDataSources type SearchDataSourcesPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -222,6 +217,9 @@ func (p *SearchDataSourcesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchDataSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *SearchDataSourcesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// SearchDataSourcesAPIClient is a client that implements the SearchDataSources +// operation. +type SearchDataSourcesAPIClient interface { + SearchDataSources(context.Context, *SearchDataSourcesInput, ...func(*Options)) (*SearchDataSourcesOutput, error) +} + +var _ SearchDataSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchDataSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_SearchFolders.go b/service/quicksight/api_op_SearchFolders.go index 52dcbc63938..3a642d21831 100644 --- a/service/quicksight/api_op_SearchFolders.go +++ b/service/quicksight/api_op_SearchFolders.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSearchFoldersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchFoldersValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationSearchFoldersMiddlewares(stack *middleware.Stack, o return nil } -// SearchFoldersAPIClient is a client that implements the SearchFolders operation. -type SearchFoldersAPIClient interface { - SearchFolders(context.Context, *SearchFoldersInput, ...func(*Options)) (*SearchFoldersOutput, error) -} - -var _ SearchFoldersAPIClient = (*Client)(nil) - // SearchFoldersPaginatorOptions is the paginator options for SearchFolders type SearchFoldersPaginatorOptions struct { // The maximum number of results to be returned per request. @@ -224,6 +220,9 @@ func (p *SearchFoldersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchFolders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *SearchFoldersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// SearchFoldersAPIClient is a client that implements the SearchFolders operation. +type SearchFoldersAPIClient interface { + SearchFolders(context.Context, *SearchFoldersInput, ...func(*Options)) (*SearchFoldersOutput, error) +} + +var _ SearchFoldersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchFolders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_SearchGroups.go b/service/quicksight/api_op_SearchGroups.go index 5306f49c273..8b638bf9886 100644 --- a/service/quicksight/api_op_SearchGroups.go +++ b/service/quicksight/api_op_SearchGroups.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSearchGroupsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchGroupsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationSearchGroupsMiddlewares(stack *middleware.Stack, op return nil } -// SearchGroupsAPIClient is a client that implements the SearchGroups operation. -type SearchGroupsAPIClient interface { - SearchGroups(context.Context, *SearchGroupsInput, ...func(*Options)) (*SearchGroupsOutput, error) -} - -var _ SearchGroupsAPIClient = (*Client)(nil) - // SearchGroupsPaginatorOptions is the paginator options for SearchGroups type SearchGroupsPaginatorOptions struct { // The maximum number of results to return from this request. @@ -229,6 +225,9 @@ func (p *SearchGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *SearchGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// SearchGroupsAPIClient is a client that implements the SearchGroups operation. +type SearchGroupsAPIClient interface { + SearchGroups(context.Context, *SearchGroupsInput, ...func(*Options)) (*SearchGroupsOutput, error) +} + +var _ SearchGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_StartAssetBundleExportJob.go b/service/quicksight/api_op_StartAssetBundleExportJob.go index 66f73f9410b..9daa7d64e91 100644 --- a/service/quicksight/api_op_StartAssetBundleExportJob.go +++ b/service/quicksight/api_op_StartAssetBundleExportJob.go @@ -192,6 +192,9 @@ func (c *Client) addOperationStartAssetBundleExportJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAssetBundleExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_StartAssetBundleImportJob.go b/service/quicksight/api_op_StartAssetBundleImportJob.go index 95288ca278f..0ff20ca2a4d 100644 --- a/service/quicksight/api_op_StartAssetBundleImportJob.go +++ b/service/quicksight/api_op_StartAssetBundleImportJob.go @@ -164,6 +164,9 @@ func (c *Client) addOperationStartAssetBundleImportJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAssetBundleImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_StartDashboardSnapshotJob.go b/service/quicksight/api_op_StartDashboardSnapshotJob.go index c246fa4839c..fdd14eb86af 100644 --- a/service/quicksight/api_op_StartDashboardSnapshotJob.go +++ b/service/quicksight/api_op_StartDashboardSnapshotJob.go @@ -220,6 +220,9 @@ func (c *Client) addOperationStartDashboardSnapshotJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDashboardSnapshotJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_TagResource.go b/service/quicksight/api_op_TagResource.go index d232c86a9ac..ed397874bac 100644 --- a/service/quicksight/api_op_TagResource.go +++ b/service/quicksight/api_op_TagResource.go @@ -137,6 +137,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UntagResource.go b/service/quicksight/api_op_UntagResource.go index 2ff7c235138..f3d386b82ae 100644 --- a/service/quicksight/api_op_UntagResource.go +++ b/service/quicksight/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateAccountCustomization.go b/service/quicksight/api_op_UpdateAccountCustomization.go index 04985247b0d..4a9d4d8c43d 100644 --- a/service/quicksight/api_op_UpdateAccountCustomization.go +++ b/service/quicksight/api_op_UpdateAccountCustomization.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateAccountCustomizationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccountCustomizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateAccountSettings.go b/service/quicksight/api_op_UpdateAccountSettings.go index 9b6eeac11fe..b185382bd0b 100644 --- a/service/quicksight/api_op_UpdateAccountSettings.go +++ b/service/quicksight/api_op_UpdateAccountSettings.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccountSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateAnalysis.go b/service/quicksight/api_op_UpdateAnalysis.go index 3b2aeabdc3d..9c78d061d66 100644 --- a/service/quicksight/api_op_UpdateAnalysis.go +++ b/service/quicksight/api_op_UpdateAnalysis.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateAnalysisMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateAnalysisPermissions.go b/service/quicksight/api_op_UpdateAnalysisPermissions.go index 1f4b942385c..76f400081eb 100644 --- a/service/quicksight/api_op_UpdateAnalysisPermissions.go +++ b/service/quicksight/api_op_UpdateAnalysisPermissions.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateAnalysisPermissionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnalysisPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDashboard.go b/service/quicksight/api_op_UpdateDashboard.go index c598aa56dd4..9b476545b88 100644 --- a/service/quicksight/api_op_UpdateDashboard.go +++ b/service/quicksight/api_op_UpdateDashboard.go @@ -193,6 +193,9 @@ func (c *Client) addOperationUpdateDashboardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDashboardValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDashboardLinks.go b/service/quicksight/api_op_UpdateDashboardLinks.go index 40f96a7c9b9..9620104b9c0 100644 --- a/service/quicksight/api_op_UpdateDashboardLinks.go +++ b/service/quicksight/api_op_UpdateDashboardLinks.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateDashboardLinksMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDashboardLinksValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDashboardPermissions.go b/service/quicksight/api_op_UpdateDashboardPermissions.go index c51951f60cf..d5813a867cb 100644 --- a/service/quicksight/api_op_UpdateDashboardPermissions.go +++ b/service/quicksight/api_op_UpdateDashboardPermissions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateDashboardPermissionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDashboardPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDashboardPublishedVersion.go b/service/quicksight/api_op_UpdateDashboardPublishedVersion.go index fcb60708fa3..f984f10cd3d 100644 --- a/service/quicksight/api_op_UpdateDashboardPublishedVersion.go +++ b/service/quicksight/api_op_UpdateDashboardPublishedVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateDashboardPublishedVersionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDashboardPublishedVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDataSet.go b/service/quicksight/api_op_UpdateDataSet.go index de472151a0b..ba792a98bfb 100644 --- a/service/quicksight/api_op_UpdateDataSet.go +++ b/service/quicksight/api_op_UpdateDataSet.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateDataSetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDataSetPermissions.go b/service/quicksight/api_op_UpdateDataSetPermissions.go index 4b296c1c009..12116adef2c 100644 --- a/service/quicksight/api_op_UpdateDataSetPermissions.go +++ b/service/quicksight/api_op_UpdateDataSetPermissions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateDataSetPermissionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSetPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDataSource.go b/service/quicksight/api_op_UpdateDataSource.go index 07f8b891734..5f4e555d8a4 100644 --- a/service/quicksight/api_op_UpdateDataSource.go +++ b/service/quicksight/api_op_UpdateDataSource.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateDataSourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateDataSourcePermissions.go b/service/quicksight/api_op_UpdateDataSourcePermissions.go index da0863fa818..c7a15aa22a4 100644 --- a/service/quicksight/api_op_UpdateDataSourcePermissions.go +++ b/service/quicksight/api_op_UpdateDataSourcePermissions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateDataSourcePermissionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataSourcePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateFolder.go b/service/quicksight/api_op_UpdateFolder.go index 5e2b2837fa9..a02f0e60213 100644 --- a/service/quicksight/api_op_UpdateFolder.go +++ b/service/quicksight/api_op_UpdateFolder.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateFolderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateFolderPermissions.go b/service/quicksight/api_op_UpdateFolderPermissions.go index 4041d437b73..83c3aa5c4c6 100644 --- a/service/quicksight/api_op_UpdateFolderPermissions.go +++ b/service/quicksight/api_op_UpdateFolderPermissions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateFolderPermissionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFolderPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateGroup.go b/service/quicksight/api_op_UpdateGroup.go index fb89495589b..dafd1350fdb 100644 --- a/service/quicksight/api_op_UpdateGroup.go +++ b/service/quicksight/api_op_UpdateGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateIAMPolicyAssignment.go b/service/quicksight/api_op_UpdateIAMPolicyAssignment.go index 40c76e4cb7e..7c28c234f57 100644 --- a/service/quicksight/api_op_UpdateIAMPolicyAssignment.go +++ b/service/quicksight/api_op_UpdateIAMPolicyAssignment.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateIAMPolicyAssignmentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIAMPolicyAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateIdentityPropagationConfig.go b/service/quicksight/api_op_UpdateIdentityPropagationConfig.go index f8c28808f32..50f1e8740c5 100644 --- a/service/quicksight/api_op_UpdateIdentityPropagationConfig.go +++ b/service/quicksight/api_op_UpdateIdentityPropagationConfig.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateIdentityPropagationConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdentityPropagationConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateIpRestriction.go b/service/quicksight/api_op_UpdateIpRestriction.go index bf199d0898b..d6c84848290 100644 --- a/service/quicksight/api_op_UpdateIpRestriction.go +++ b/service/quicksight/api_op_UpdateIpRestriction.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateIpRestrictionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIpRestrictionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateKeyRegistration.go b/service/quicksight/api_op_UpdateKeyRegistration.go index e500fad7042..fb06d8639f3 100644 --- a/service/quicksight/api_op_UpdateKeyRegistration.go +++ b/service/quicksight/api_op_UpdateKeyRegistration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateKeyRegistrationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKeyRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdatePublicSharingSettings.go b/service/quicksight/api_op_UpdatePublicSharingSettings.go index 6ecd538eb74..77a59501080 100644 --- a/service/quicksight/api_op_UpdatePublicSharingSettings.go +++ b/service/quicksight/api_op_UpdatePublicSharingSettings.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdatePublicSharingSettingsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePublicSharingSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateRefreshSchedule.go b/service/quicksight/api_op_UpdateRefreshSchedule.go index 20c7d300a25..9c7973e26b6 100644 --- a/service/quicksight/api_op_UpdateRefreshSchedule.go +++ b/service/quicksight/api_op_UpdateRefreshSchedule.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateRefreshScheduleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateRoleCustomPermission.go b/service/quicksight/api_op_UpdateRoleCustomPermission.go index 9a0a954e490..753786837b3 100644 --- a/service/quicksight/api_op_UpdateRoleCustomPermission.go +++ b/service/quicksight/api_op_UpdateRoleCustomPermission.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateRoleCustomPermissionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoleCustomPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go b/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go index e5faee350c2..16ff54a6db5 100644 --- a/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go +++ b/service/quicksight/api_op_UpdateSPICECapacityConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateSPICECapacityConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSPICECapacityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTemplate.go b/service/quicksight/api_op_UpdateTemplate.go index 9d57cd6f028..ed3b606a074 100644 --- a/service/quicksight/api_op_UpdateTemplate.go +++ b/service/quicksight/api_op_UpdateTemplate.go @@ -161,6 +161,9 @@ func (c *Client) addOperationUpdateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTemplateAlias.go b/service/quicksight/api_op_UpdateTemplateAlias.go index b8bb692246b..e665159fc73 100644 --- a/service/quicksight/api_op_UpdateTemplateAlias.go +++ b/service/quicksight/api_op_UpdateTemplateAlias.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateTemplateAliasMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTemplatePermissions.go b/service/quicksight/api_op_UpdateTemplatePermissions.go index eea97283b44..7e3653e94bd 100644 --- a/service/quicksight/api_op_UpdateTemplatePermissions.go +++ b/service/quicksight/api_op_UpdateTemplatePermissions.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateTemplatePermissionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplatePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTheme.go b/service/quicksight/api_op_UpdateTheme.go index 6a89af9e991..e57406a5575 100644 --- a/service/quicksight/api_op_UpdateTheme.go +++ b/service/quicksight/api_op_UpdateTheme.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateThemeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThemeValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateThemeAlias.go b/service/quicksight/api_op_UpdateThemeAlias.go index 1a74ac1ed9b..28edfa902c3 100644 --- a/service/quicksight/api_op_UpdateThemeAlias.go +++ b/service/quicksight/api_op_UpdateThemeAlias.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateThemeAliasMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThemeAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateThemePermissions.go b/service/quicksight/api_op_UpdateThemePermissions.go index 79421d143f1..055963790aa 100644 --- a/service/quicksight/api_op_UpdateThemePermissions.go +++ b/service/quicksight/api_op_UpdateThemePermissions.go @@ -169,6 +169,9 @@ func (c *Client) addOperationUpdateThemePermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateThemePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTopic.go b/service/quicksight/api_op_UpdateTopic.go index b51ddbf2385..4ac40c4c96d 100644 --- a/service/quicksight/api_op_UpdateTopic.go +++ b/service/quicksight/api_op_UpdateTopic.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateTopicMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTopicPermissions.go b/service/quicksight/api_op_UpdateTopicPermissions.go index 7aa121e6de8..14bfa347c9b 100644 --- a/service/quicksight/api_op_UpdateTopicPermissions.go +++ b/service/quicksight/api_op_UpdateTopicPermissions.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateTopicPermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTopicPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateTopicRefreshSchedule.go b/service/quicksight/api_op_UpdateTopicRefreshSchedule.go index b18165fcb42..9b8acc92e41 100644 --- a/service/quicksight/api_op_UpdateTopicRefreshSchedule.go +++ b/service/quicksight/api_op_UpdateTopicRefreshSchedule.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateTopicRefreshScheduleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTopicRefreshScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateUser.go b/service/quicksight/api_op_UpdateUser.go index 5ff585387b9..fda4ae75537 100644 --- a/service/quicksight/api_op_UpdateUser.go +++ b/service/quicksight/api_op_UpdateUser.go @@ -219,6 +219,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/quicksight/api_op_UpdateVPCConnection.go b/service/quicksight/api_op_UpdateVPCConnection.go index ac9b055f445..f69872ec471 100644 --- a/service/quicksight/api_op_UpdateVPCConnection.go +++ b/service/quicksight/api_op_UpdateVPCConnection.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateVPCConnectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVPCConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_client.go b/service/ram/api_client.go index 91ff3b0a3a7..ce1fb63819e 100644 --- a/service/ram/api_client.go +++ b/service/ram/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ram/api_op_AcceptResourceShareInvitation.go b/service/ram/api_op_AcceptResourceShareInvitation.go index d9b1d056f4b..73f5687f505 100644 --- a/service/ram/api_op_AcceptResourceShareInvitation.go +++ b/service/ram/api_op_AcceptResourceShareInvitation.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAcceptResourceShareInvitationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptResourceShareInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_AssociateResourceShare.go b/service/ram/api_op_AssociateResourceShare.go index 5e6e3381d3e..cd3cd6a4844 100644 --- a/service/ram/api_op_AssociateResourceShare.go +++ b/service/ram/api_op_AssociateResourceShare.go @@ -170,6 +170,9 @@ func (c *Client) addOperationAssociateResourceShareMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResourceShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_AssociateResourceSharePermission.go b/service/ram/api_op_AssociateResourceSharePermission.go index 9ffcc505a8f..00f36b12716 100644 --- a/service/ram/api_op_AssociateResourceSharePermission.go +++ b/service/ram/api_op_AssociateResourceSharePermission.go @@ -166,6 +166,9 @@ func (c *Client) addOperationAssociateResourceSharePermissionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResourceSharePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_CreatePermission.go b/service/ram/api_op_CreatePermission.go index b054a4b52ae..6c7662a696c 100644 --- a/service/ram/api_op_CreatePermission.go +++ b/service/ram/api_op_CreatePermission.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreatePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_CreatePermissionVersion.go b/service/ram/api_op_CreatePermissionVersion.go index f720bce66b3..bc6b4ca0eb1 100644 --- a/service/ram/api_op_CreatePermissionVersion.go +++ b/service/ram/api_op_CreatePermissionVersion.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreatePermissionVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePermissionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_CreateResourceShare.go b/service/ram/api_op_CreateResourceShare.go index 35a77f31762..51d105b5fac 100644 --- a/service/ram/api_op_CreateResourceShare.go +++ b/service/ram/api_op_CreateResourceShare.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateResourceShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_DeletePermission.go b/service/ram/api_op_DeletePermission.go index e42225d1881..7c692f5a1da 100644 --- a/service/ram/api_op_DeletePermission.go +++ b/service/ram/api_op_DeletePermission.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeletePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_DeletePermissionVersion.go b/service/ram/api_op_DeletePermissionVersion.go index 2bddde2b3c2..618703922a0 100644 --- a/service/ram/api_op_DeletePermissionVersion.go +++ b/service/ram/api_op_DeletePermissionVersion.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDeletePermissionVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_DeleteResourceShare.go b/service/ram/api_op_DeleteResourceShare.go index 30026959d62..072e2d76cb8 100644 --- a/service/ram/api_op_DeleteResourceShare.go +++ b/service/ram/api_op_DeleteResourceShare.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteResourceShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_DisassociateResourceShare.go b/service/ram/api_op_DisassociateResourceShare.go index ab4698339df..b638c80d524 100644 --- a/service/ram/api_op_DisassociateResourceShare.go +++ b/service/ram/api_op_DisassociateResourceShare.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDisassociateResourceShareMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResourceShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_DisassociateResourceSharePermission.go b/service/ram/api_op_DisassociateResourceSharePermission.go index c1edeca172d..23bda7f9591 100644 --- a/service/ram/api_op_DisassociateResourceSharePermission.go +++ b/service/ram/api_op_DisassociateResourceSharePermission.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDisassociateResourceSharePermissionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResourceSharePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_EnableSharingWithAwsOrganization.go b/service/ram/api_op_EnableSharingWithAwsOrganization.go index 8d2905da394..c8c5ee8f441 100644 --- a/service/ram/api_op_EnableSharingWithAwsOrganization.go +++ b/service/ram/api_op_EnableSharingWithAwsOrganization.go @@ -112,6 +112,9 @@ func (c *Client) addOperationEnableSharingWithAwsOrganizationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSharingWithAwsOrganization(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ram/api_op_GetPermission.go b/service/ram/api_op_GetPermission.go index fe9ce170158..ff20d194b8b 100644 --- a/service/ram/api_op_GetPermission.go +++ b/service/ram/api_op_GetPermission.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_GetResourcePolicies.go b/service/ram/api_op_GetResourcePolicies.go index ca3e0131d71..c50f89ae4ae 100644 --- a/service/ram/api_op_GetResourcePolicies.go +++ b/service/ram/api_op_GetResourcePolicies.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St return nil } -// GetResourcePoliciesAPIClient is a client that implements the -// GetResourcePolicies operation. -type GetResourcePoliciesAPIClient interface { - GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) -} - -var _ GetResourcePoliciesAPIClient = (*Client)(nil) - // GetResourcePoliciesPaginatorOptions is the paginator options for // GetResourcePolicies type GetResourcePoliciesPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetResourcePoliciesAPIClient is a client that implements the +// GetResourcePolicies operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_GetResourceShareAssociations.go b/service/ram/api_op_GetResourceShareAssociations.go index bde7c8bd764..706963161df 100644 --- a/service/ram/api_op_GetResourceShareAssociations.go +++ b/service/ram/api_op_GetResourceShareAssociations.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetResourceShareAssociationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceShareAssociationsValidationMiddleware(stack); err != nil { return err } @@ -185,14 +188,6 @@ func (c *Client) addOperationGetResourceShareAssociationsMiddlewares(stack *midd return nil } -// GetResourceShareAssociationsAPIClient is a client that implements the -// GetResourceShareAssociations operation. -type GetResourceShareAssociationsAPIClient interface { - GetResourceShareAssociations(context.Context, *GetResourceShareAssociationsInput, ...func(*Options)) (*GetResourceShareAssociationsOutput, error) -} - -var _ GetResourceShareAssociationsAPIClient = (*Client)(nil) - // GetResourceShareAssociationsPaginatorOptions is the paginator options for // GetResourceShareAssociations type GetResourceShareAssociationsPaginatorOptions struct { @@ -267,6 +262,9 @@ func (p *GetResourceShareAssociationsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourceShareAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +284,14 @@ func (p *GetResourceShareAssociationsPaginator) NextPage(ctx context.Context, op return result, nil } +// GetResourceShareAssociationsAPIClient is a client that implements the +// GetResourceShareAssociations operation. +type GetResourceShareAssociationsAPIClient interface { + GetResourceShareAssociations(context.Context, *GetResourceShareAssociationsInput, ...func(*Options)) (*GetResourceShareAssociationsOutput, error) +} + +var _ GetResourceShareAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceShareAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_GetResourceShareInvitations.go b/service/ram/api_op_GetResourceShareInvitations.go index 79918292b2a..cfa3a890da1 100644 --- a/service/ram/api_op_GetResourceShareInvitations.go +++ b/service/ram/api_op_GetResourceShareInvitations.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetResourceShareInvitationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourceShareInvitations(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationGetResourceShareInvitationsMiddlewares(stack *middl return nil } -// GetResourceShareInvitationsAPIClient is a client that implements the -// GetResourceShareInvitations operation. -type GetResourceShareInvitationsAPIClient interface { - GetResourceShareInvitations(context.Context, *GetResourceShareInvitationsInput, ...func(*Options)) (*GetResourceShareInvitationsOutput, error) -} - -var _ GetResourceShareInvitationsAPIClient = (*Client)(nil) - // GetResourceShareInvitationsPaginatorOptions is the paginator options for // GetResourceShareInvitations type GetResourceShareInvitationsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *GetResourceShareInvitationsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourceShareInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *GetResourceShareInvitationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetResourceShareInvitationsAPIClient is a client that implements the +// GetResourceShareInvitations operation. +type GetResourceShareInvitationsAPIClient interface { + GetResourceShareInvitations(context.Context, *GetResourceShareInvitationsInput, ...func(*Options)) (*GetResourceShareInvitationsOutput, error) +} + +var _ GetResourceShareInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceShareInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_GetResourceShares.go b/service/ram/api_op_GetResourceShares.go index 71491585f96..fa72db032be 100644 --- a/service/ram/api_op_GetResourceShares.go +++ b/service/ram/api_op_GetResourceShares.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetResourceSharesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceSharesValidationMiddleware(stack); err != nil { return err } @@ -187,14 +190,6 @@ func (c *Client) addOperationGetResourceSharesMiddlewares(stack *middleware.Stac return nil } -// GetResourceSharesAPIClient is a client that implements the GetResourceShares -// operation. -type GetResourceSharesAPIClient interface { - GetResourceShares(context.Context, *GetResourceSharesInput, ...func(*Options)) (*GetResourceSharesOutput, error) -} - -var _ GetResourceSharesAPIClient = (*Client)(nil) - // GetResourceSharesPaginatorOptions is the paginator options for GetResourceShares type GetResourceSharesPaginatorOptions struct { // Specifies the total number of results that you want included on each page of @@ -266,6 +261,9 @@ func (p *GetResourceSharesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourceShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +283,14 @@ func (p *GetResourceSharesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetResourceSharesAPIClient is a client that implements the GetResourceShares +// operation. +type GetResourceSharesAPIClient interface { + GetResourceShares(context.Context, *GetResourceSharesInput, ...func(*Options)) (*GetResourceSharesOutput, error) +} + +var _ GetResourceSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourceShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListPendingInvitationResources.go b/service/ram/api_op_ListPendingInvitationResources.go index a0a4eebc8b5..1f7058951f5 100644 --- a/service/ram/api_op_ListPendingInvitationResources.go +++ b/service/ram/api_op_ListPendingInvitationResources.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListPendingInvitationResourcesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPendingInvitationResourcesValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListPendingInvitationResourcesMiddlewares(stack *mi return nil } -// ListPendingInvitationResourcesAPIClient is a client that implements the -// ListPendingInvitationResources operation. -type ListPendingInvitationResourcesAPIClient interface { - ListPendingInvitationResources(context.Context, *ListPendingInvitationResourcesInput, ...func(*Options)) (*ListPendingInvitationResourcesOutput, error) -} - -var _ ListPendingInvitationResourcesAPIClient = (*Client)(nil) - // ListPendingInvitationResourcesPaginatorOptions is the paginator options for // ListPendingInvitationResources type ListPendingInvitationResourcesPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *ListPendingInvitationResourcesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPendingInvitationResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *ListPendingInvitationResourcesPaginator) NextPage(ctx context.Context, return result, nil } +// ListPendingInvitationResourcesAPIClient is a client that implements the +// ListPendingInvitationResources operation. +type ListPendingInvitationResourcesAPIClient interface { + ListPendingInvitationResources(context.Context, *ListPendingInvitationResourcesInput, ...func(*Options)) (*ListPendingInvitationResourcesOutput, error) +} + +var _ ListPendingInvitationResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPendingInvitationResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListPermissionAssociations.go b/service/ram/api_op_ListPermissionAssociations.go index 25f4dffda0a..1160d6dd451 100644 --- a/service/ram/api_op_ListPermissionAssociations.go +++ b/service/ram/api_op_ListPermissionAssociations.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListPermissionAssociationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPermissionAssociations(options.Region), middleware.Before); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListPermissionAssociationsMiddlewares(stack *middle return nil } -// ListPermissionAssociationsAPIClient is a client that implements the -// ListPermissionAssociations operation. -type ListPermissionAssociationsAPIClient interface { - ListPermissionAssociations(context.Context, *ListPermissionAssociationsInput, ...func(*Options)) (*ListPermissionAssociationsOutput, error) -} - -var _ ListPermissionAssociationsAPIClient = (*Client)(nil) - // ListPermissionAssociationsPaginatorOptions is the paginator options for // ListPermissionAssociations type ListPermissionAssociationsPaginatorOptions struct { @@ -261,6 +256,9 @@ func (p *ListPermissionAssociationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +278,14 @@ func (p *ListPermissionAssociationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPermissionAssociationsAPIClient is a client that implements the +// ListPermissionAssociations operation. +type ListPermissionAssociationsAPIClient interface { + ListPermissionAssociations(context.Context, *ListPermissionAssociationsInput, ...func(*Options)) (*ListPermissionAssociationsOutput, error) +} + +var _ ListPermissionAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListPermissionVersions.go b/service/ram/api_op_ListPermissionVersions.go index a93cc9ebb2c..0bcf9e7558a 100644 --- a/service/ram/api_op_ListPermissionVersions.go +++ b/service/ram/api_op_ListPermissionVersions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListPermissionVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionVersionsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListPermissionVersionsMiddlewares(stack *middleware return nil } -// ListPermissionVersionsAPIClient is a client that implements the -// ListPermissionVersions operation. -type ListPermissionVersionsAPIClient interface { - ListPermissionVersions(context.Context, *ListPermissionVersionsInput, ...func(*Options)) (*ListPermissionVersionsOutput, error) -} - -var _ ListPermissionVersionsAPIClient = (*Client)(nil) - // ListPermissionVersionsPaginatorOptions is the paginator options for // ListPermissionVersions type ListPermissionVersionsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListPermissionVersionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListPermissionVersionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListPermissionVersionsAPIClient is a client that implements the +// ListPermissionVersions operation. +type ListPermissionVersionsAPIClient interface { + ListPermissionVersions(context.Context, *ListPermissionVersionsInput, ...func(*Options)) (*ListPermissionVersionsOutput, error) +} + +var _ ListPermissionVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListPermissions.go b/service/ram/api_op_ListPermissions.go index 23449b789aa..8669a5d21ed 100644 --- a/service/ram/api_op_ListPermissions.go +++ b/service/ram/api_op_ListPermissions.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPermissions(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListPermissionsMiddlewares(stack *middleware.Stack, return nil } -// ListPermissionsAPIClient is a client that implements the ListPermissions -// operation. -type ListPermissionsAPIClient interface { - ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) -} - -var _ ListPermissionsAPIClient = (*Client)(nil) - // ListPermissionsPaginatorOptions is the paginator options for ListPermissions type ListPermissionsPaginatorOptions struct { // Specifies the total number of results that you want included on each page of @@ -245,6 +240,9 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListPermissionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListPermissionsAPIClient is a client that implements the ListPermissions +// operation. +type ListPermissionsAPIClient interface { + ListPermissions(context.Context, *ListPermissionsInput, ...func(*Options)) (*ListPermissionsOutput, error) +} + +var _ ListPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListPrincipals.go b/service/ram/api_op_ListPrincipals.go index 17cc5f9de99..b56d53d2693 100644 --- a/service/ram/api_op_ListPrincipals.go +++ b/service/ram/api_op_ListPrincipals.go @@ -177,6 +177,9 @@ func (c *Client) addOperationListPrincipalsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrincipalsValidationMiddleware(stack); err != nil { return err } @@ -201,14 +204,6 @@ func (c *Client) addOperationListPrincipalsMiddlewares(stack *middleware.Stack, return nil } -// ListPrincipalsAPIClient is a client that implements the ListPrincipals -// operation. -type ListPrincipalsAPIClient interface { - ListPrincipals(context.Context, *ListPrincipalsInput, ...func(*Options)) (*ListPrincipalsOutput, error) -} - -var _ ListPrincipalsAPIClient = (*Client)(nil) - // ListPrincipalsPaginatorOptions is the paginator options for ListPrincipals type ListPrincipalsPaginatorOptions struct { // Specifies the total number of results that you want included on each page of @@ -280,6 +275,9 @@ func (p *ListPrincipalsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrincipals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -299,6 +297,14 @@ func (p *ListPrincipalsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPrincipalsAPIClient is a client that implements the ListPrincipals +// operation. +type ListPrincipalsAPIClient interface { + ListPrincipals(context.Context, *ListPrincipalsInput, ...func(*Options)) (*ListPrincipalsOutput, error) +} + +var _ ListPrincipalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrincipals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListReplacePermissionAssociationsWork.go b/service/ram/api_op_ListReplacePermissionAssociationsWork.go index 055af8820c9..42ef049dc4e 100644 --- a/service/ram/api_op_ListReplacePermissionAssociationsWork.go +++ b/service/ram/api_op_ListReplacePermissionAssociationsWork.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListReplacePermissionAssociationsWorkMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReplacePermissionAssociationsWork(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListReplacePermissionAssociationsWorkMiddlewares(st return nil } -// ListReplacePermissionAssociationsWorkAPIClient is a client that implements the -// ListReplacePermissionAssociationsWork operation. -type ListReplacePermissionAssociationsWorkAPIClient interface { - ListReplacePermissionAssociationsWork(context.Context, *ListReplacePermissionAssociationsWorkInput, ...func(*Options)) (*ListReplacePermissionAssociationsWorkOutput, error) -} - -var _ ListReplacePermissionAssociationsWorkAPIClient = (*Client)(nil) - // ListReplacePermissionAssociationsWorkPaginatorOptions is the paginator options // for ListReplacePermissionAssociationsWork type ListReplacePermissionAssociationsWorkPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListReplacePermissionAssociationsWorkPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReplacePermissionAssociationsWork(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListReplacePermissionAssociationsWorkPaginator) NextPage(ctx context.Co return result, nil } +// ListReplacePermissionAssociationsWorkAPIClient is a client that implements the +// ListReplacePermissionAssociationsWork operation. +type ListReplacePermissionAssociationsWorkAPIClient interface { + ListReplacePermissionAssociationsWork(context.Context, *ListReplacePermissionAssociationsWorkInput, ...func(*Options)) (*ListReplacePermissionAssociationsWorkOutput, error) +} + +var _ ListReplacePermissionAssociationsWorkAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReplacePermissionAssociationsWork(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListResourceSharePermissions.go b/service/ram/api_op_ListResourceSharePermissions.go index 78588e683e4..f1f60fed3f1 100644 --- a/service/ram/api_op_ListResourceSharePermissions.go +++ b/service/ram/api_op_ListResourceSharePermissions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListResourceSharePermissionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceSharePermissionsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListResourceSharePermissionsMiddlewares(stack *midd return nil } -// ListResourceSharePermissionsAPIClient is a client that implements the -// ListResourceSharePermissions operation. -type ListResourceSharePermissionsAPIClient interface { - ListResourceSharePermissions(context.Context, *ListResourceSharePermissionsInput, ...func(*Options)) (*ListResourceSharePermissionsOutput, error) -} - -var _ ListResourceSharePermissionsAPIClient = (*Client)(nil) - // ListResourceSharePermissionsPaginatorOptions is the paginator options for // ListResourceSharePermissions type ListResourceSharePermissionsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListResourceSharePermissionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceSharePermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListResourceSharePermissionsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListResourceSharePermissionsAPIClient is a client that implements the +// ListResourceSharePermissions operation. +type ListResourceSharePermissionsAPIClient interface { + ListResourceSharePermissions(context.Context, *ListResourceSharePermissionsInput, ...func(*Options)) (*ListResourceSharePermissionsOutput, error) +} + +var _ ListResourceSharePermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceSharePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListResourceTypes.go b/service/ram/api_op_ListResourceTypes.go index e67a0c27a4f..fb9b1e2768d 100644 --- a/service/ram/api_op_ListResourceTypes.go +++ b/service/ram/api_op_ListResourceTypes.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListResourceTypesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceTypes(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListResourceTypesMiddlewares(stack *middleware.Stac return nil } -// ListResourceTypesAPIClient is a client that implements the ListResourceTypes -// operation. -type ListResourceTypesAPIClient interface { - ListResourceTypes(context.Context, *ListResourceTypesInput, ...func(*Options)) (*ListResourceTypesOutput, error) -} - -var _ ListResourceTypesAPIClient = (*Client)(nil) - // ListResourceTypesPaginatorOptions is the paginator options for ListResourceTypes type ListResourceTypesPaginatorOptions struct { // Specifies the total number of results that you want included on each page of @@ -239,6 +234,9 @@ func (p *ListResourceTypesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListResourceTypesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListResourceTypesAPIClient is a client that implements the ListResourceTypes +// operation. +type ListResourceTypesAPIClient interface { + ListResourceTypes(context.Context, *ListResourceTypesInput, ...func(*Options)) (*ListResourceTypesOutput, error) +} + +var _ ListResourceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_ListResources.go b/service/ram/api_op_ListResources.go index 995b24c2826..b7f81efdc7c 100644 --- a/service/ram/api_op_ListResources.go +++ b/service/ram/api_op_ListResources.go @@ -171,6 +171,9 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesValidationMiddleware(stack); err != nil { return err } @@ -195,13 +198,6 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o return nil } -// ListResourcesAPIClient is a client that implements the ListResources operation. -type ListResourcesAPIClient interface { - ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) -} - -var _ ListResourcesAPIClient = (*Client)(nil) - // ListResourcesPaginatorOptions is the paginator options for ListResources type ListResourcesPaginatorOptions struct { // Specifies the total number of results that you want included on each page of @@ -273,6 +269,9 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -292,6 +291,13 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListResourcesAPIClient is a client that implements the ListResources operation. +type ListResourcesAPIClient interface { + ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) +} + +var _ ListResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ram/api_op_PromotePermissionCreatedFromPolicy.go b/service/ram/api_op_PromotePermissionCreatedFromPolicy.go index 7562a7a7dcb..f809ff33bcb 100644 --- a/service/ram/api_op_PromotePermissionCreatedFromPolicy.go +++ b/service/ram/api_op_PromotePermissionCreatedFromPolicy.go @@ -160,6 +160,9 @@ func (c *Client) addOperationPromotePermissionCreatedFromPolicyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPromotePermissionCreatedFromPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go index 1a33906ef56..8803418d03b 100644 --- a/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go +++ b/service/ram/api_op_PromoteResourceShareCreatedFromPolicy.go @@ -123,6 +123,9 @@ func (c *Client) addOperationPromoteResourceShareCreatedFromPolicyMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPromoteResourceShareCreatedFromPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_RejectResourceShareInvitation.go b/service/ram/api_op_RejectResourceShareInvitation.go index 54ca6006c77..e18bf0522de 100644 --- a/service/ram/api_op_RejectResourceShareInvitation.go +++ b/service/ram/api_op_RejectResourceShareInvitation.go @@ -130,6 +130,9 @@ func (c *Client) addOperationRejectResourceShareInvitationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectResourceShareInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_ReplacePermissionAssociations.go b/service/ram/api_op_ReplacePermissionAssociations.go index 55f7e55f4e4..1ad1eee1171 100644 --- a/service/ram/api_op_ReplacePermissionAssociations.go +++ b/service/ram/api_op_ReplacePermissionAssociations.go @@ -161,6 +161,9 @@ func (c *Client) addOperationReplacePermissionAssociationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplacePermissionAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_SetDefaultPermissionVersion.go b/service/ram/api_op_SetDefaultPermissionVersion.go index 9ec912a158d..05735ecd708 100644 --- a/service/ram/api_op_SetDefaultPermissionVersion.go +++ b/service/ram/api_op_SetDefaultPermissionVersion.go @@ -139,6 +139,9 @@ func (c *Client) addOperationSetDefaultPermissionVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetDefaultPermissionVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_TagResource.go b/service/ram/api_op_TagResource.go index d0e2ad1ae29..2b7742d9140 100644 --- a/service/ram/api_op_TagResource.go +++ b/service/ram/api_op_TagResource.go @@ -121,6 +121,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_UntagResource.go b/service/ram/api_op_UntagResource.go index 0d6cd4f4254..7e66191bf7b 100644 --- a/service/ram/api_op_UntagResource.go +++ b/service/ram/api_op_UntagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ram/api_op_UpdateResourceShare.go b/service/ram/api_op_UpdateResourceShare.go index 51d2eeab104..cf0ec3d1214 100644 --- a/service/ram/api_op_UpdateResourceShare.go +++ b/service/ram/api_op_UpdateResourceShare.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateResourceShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_client.go b/service/rbin/api_client.go index 45306aeb5d5..3a929f3b83d 100644 --- a/service/rbin/api_client.go +++ b/service/rbin/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/rbin/api_op_CreateRule.go b/service/rbin/api_op_CreateRule.go index 104d98a58ad..607fca81af3 100644 --- a/service/rbin/api_op_CreateRule.go +++ b/service/rbin/api_op_CreateRule.go @@ -185,6 +185,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_DeleteRule.go b/service/rbin/api_op_DeleteRule.go index cdb06384e30..d8f70739275 100644 --- a/service/rbin/api_op_DeleteRule.go +++ b/service/rbin/api_op_DeleteRule.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_GetRule.go b/service/rbin/api_op_GetRule.go index 94b1144372f..d2cde52a59e 100644 --- a/service/rbin/api_op_GetRule.go +++ b/service/rbin/api_op_GetRule.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_ListRules.go b/service/rbin/api_op_ListRules.go index c22d14c889a..de30412e99e 100644 --- a/service/rbin/api_op_ListRules.go +++ b/service/rbin/api_op_ListRules.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRulesValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio return nil } -// ListRulesAPIClient is a client that implements the ListRules operation. -type ListRulesAPIClient interface { - ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) -} - -var _ ListRulesAPIClient = (*Client)(nil) - // ListRulesPaginatorOptions is the paginator options for ListRules type ListRulesPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -224,6 +220,9 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRulesAPIClient is a client that implements the ListRules operation. +type ListRulesAPIClient interface { + ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) +} + +var _ ListRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rbin/api_op_ListTagsForResource.go b/service/rbin/api_op_ListTagsForResource.go index 664587a99ec..66400247477 100644 --- a/service/rbin/api_op_ListTagsForResource.go +++ b/service/rbin/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_LockRule.go b/service/rbin/api_op_LockRule.go index 1f3a00ae261..b89eaa25a1f 100644 --- a/service/rbin/api_op_LockRule.go +++ b/service/rbin/api_op_LockRule.go @@ -151,6 +151,9 @@ func (c *Client) addOperationLockRuleMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLockRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_TagResource.go b/service/rbin/api_op_TagResource.go index 45f8dcb18a6..a85c7a4ff0a 100644 --- a/service/rbin/api_op_TagResource.go +++ b/service/rbin/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_UnlockRule.go b/service/rbin/api_op_UnlockRule.go index 386671d1ed6..a99ef51c23b 100644 --- a/service/rbin/api_op_UnlockRule.go +++ b/service/rbin/api_op_UnlockRule.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUnlockRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnlockRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_UntagResource.go b/service/rbin/api_op_UntagResource.go index 1592abf5420..d62c2ca9ecf 100644 --- a/service/rbin/api_op_UntagResource.go +++ b/service/rbin/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rbin/api_op_UpdateRule.go b/service/rbin/api_op_UpdateRule.go index dee89f9ec7e..90d42a19488 100644 --- a/service/rbin/api_op_UpdateRule.go +++ b/service/rbin/api_op_UpdateRule.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_client.go b/service/rds/api_client.go index a30db2a99ca..09a564f6221 100644 --- a/service/rds/api_client.go +++ b/service/rds/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -539,6 +563,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/rds/api_op_AddRoleToDBCluster.go b/service/rds/api_op_AddRoleToDBCluster.go index 0ca019bbcd6..ca80c5073ab 100644 --- a/service/rds/api_op_AddRoleToDBCluster.go +++ b/service/rds/api_op_AddRoleToDBCluster.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAddRoleToDBClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddRoleToDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_AddRoleToDBInstance.go b/service/rds/api_op_AddRoleToDBInstance.go index 7c0b3828c92..471e9756900 100644 --- a/service/rds/api_op_AddRoleToDBInstance.go +++ b/service/rds/api_op_AddRoleToDBInstance.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAddRoleToDBInstanceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddRoleToDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_AddSourceIdentifierToSubscription.go b/service/rds/api_op_AddSourceIdentifierToSubscription.go index 220d6074423..f27cc79bc3f 100644 --- a/service/rds/api_op_AddSourceIdentifierToSubscription.go +++ b/service/rds/api_op_AddSourceIdentifierToSubscription.go @@ -135,6 +135,9 @@ func (c *Client) addOperationAddSourceIdentifierToSubscriptionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddSourceIdentifierToSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_AddTagsToResource.go b/service/rds/api_op_AddTagsToResource.go index 03d70bc7a78..b5058891a0e 100644 --- a/service/rds/api_op_AddTagsToResource.go +++ b/service/rds/api_op_AddTagsToResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ApplyPendingMaintenanceAction.go b/service/rds/api_op_ApplyPendingMaintenanceAction.go index bb51ea24375..3036a55e768 100644 --- a/service/rds/api_op_ApplyPendingMaintenanceAction.go +++ b/service/rds/api_op_ApplyPendingMaintenanceAction.go @@ -133,6 +133,9 @@ func (c *Client) addOperationApplyPendingMaintenanceActionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpApplyPendingMaintenanceActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go index 0de12bff0ea..6dfc1ffe122 100644 --- a/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go +++ b/service/rds/api_op_AuthorizeDBSecurityGroupIngress.go @@ -152,6 +152,9 @@ func (c *Client) addOperationAuthorizeDBSecurityGroupIngressMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeDBSecurityGroupIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_BacktrackDBCluster.go b/service/rds/api_op_BacktrackDBCluster.go index 9b9a79ace22..e8f343f4c79 100644 --- a/service/rds/api_op_BacktrackDBCluster.go +++ b/service/rds/api_op_BacktrackDBCluster.go @@ -182,6 +182,9 @@ func (c *Client) addOperationBacktrackDBClusterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBacktrackDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CancelExportTask.go b/service/rds/api_op_CancelExportTask.go index 313b337689b..69ef482bfeb 100644 --- a/service/rds/api_op_CancelExportTask.go +++ b/service/rds/api_op_CancelExportTask.go @@ -188,6 +188,9 @@ func (c *Client) addOperationCancelExportTaskMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CopyDBClusterParameterGroup.go b/service/rds/api_op_CopyDBClusterParameterGroup.go index 119883829e0..a5e7c2deed8 100644 --- a/service/rds/api_op_CopyDBClusterParameterGroup.go +++ b/service/rds/api_op_CopyDBClusterParameterGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCopyDBClusterParameterGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CopyDBClusterSnapshot.go b/service/rds/api_op_CopyDBClusterSnapshot.go index 6d00684e885..c40a72d5ae3 100644 --- a/service/rds/api_op_CopyDBClusterSnapshot.go +++ b/service/rds/api_op_CopyDBClusterSnapshot.go @@ -275,6 +275,9 @@ func (c *Client) addOperationCopyDBClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CopyDBParameterGroup.go b/service/rds/api_op_CopyDBParameterGroup.go index 33b6cb38a18..d5e7b6a88df 100644 --- a/service/rds/api_op_CopyDBParameterGroup.go +++ b/service/rds/api_op_CopyDBParameterGroup.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCopyDBParameterGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CopyDBSnapshot.go b/service/rds/api_op_CopyDBSnapshot.go index cf844daaea9..3abc2d73794 100644 --- a/service/rds/api_op_CopyDBSnapshot.go +++ b/service/rds/api_op_CopyDBSnapshot.go @@ -281,6 +281,9 @@ func (c *Client) addOperationCopyDBSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyDBSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CopyOptionGroup.go b/service/rds/api_op_CopyOptionGroup.go index 9ce173723d8..e3848f87499 100644 --- a/service/rds/api_op_CopyOptionGroup.go +++ b/service/rds/api_op_CopyOptionGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCopyOptionGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyOptionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateBlueGreenDeployment.go b/service/rds/api_op_CreateBlueGreenDeployment.go index f4ea889b05d..54d0a124a10 100644 --- a/service/rds/api_op_CreateBlueGreenDeployment.go +++ b/service/rds/api_op_CreateBlueGreenDeployment.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateBlueGreenDeploymentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateBlueGreenDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateCustomDBEngineVersion.go b/service/rds/api_op_CreateCustomDBEngineVersion.go index 6037148dace..9b498b651c9 100644 --- a/service/rds/api_op_CreateCustomDBEngineVersion.go +++ b/service/rds/api_op_CreateCustomDBEngineVersion.go @@ -342,6 +342,9 @@ func (c *Client) addOperationCreateCustomDBEngineVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomDBEngineVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBCluster.go b/service/rds/api_op_CreateDBCluster.go index 94505a65f68..8f060cdb03a 100644 --- a/service/rds/api_op_CreateDBCluster.go +++ b/service/rds/api_op_CreateDBCluster.go @@ -922,6 +922,9 @@ func (c *Client) addOperationCreateDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBClusterEndpoint.go b/service/rds/api_op_CreateDBClusterEndpoint.go index e297916a91c..a4043eaf83c 100644 --- a/service/rds/api_op_CreateDBClusterEndpoint.go +++ b/service/rds/api_op_CreateDBClusterEndpoint.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateDBClusterEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBClusterParameterGroup.go b/service/rds/api_op_CreateDBClusterParameterGroup.go index b25f5f5570c..2af5faca5a6 100644 --- a/service/rds/api_op_CreateDBClusterParameterGroup.go +++ b/service/rds/api_op_CreateDBClusterParameterGroup.go @@ -207,6 +207,9 @@ func (c *Client) addOperationCreateDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBClusterSnapshot.go b/service/rds/api_op_CreateDBClusterSnapshot.go index 2700af07f64..98b295e8d96 100644 --- a/service/rds/api_op_CreateDBClusterSnapshot.go +++ b/service/rds/api_op_CreateDBClusterSnapshot.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateDBClusterSnapshotMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index fe9b5cc5ac1..6513108110e 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -1219,6 +1219,9 @@ func (c *Client) addOperationCreateDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBInstanceReadReplica.go b/service/rds/api_op_CreateDBInstanceReadReplica.go index 47ac234776b..767bf676bfd 100644 --- a/service/rds/api_op_CreateDBInstanceReadReplica.go +++ b/service/rds/api_op_CreateDBInstanceReadReplica.go @@ -702,6 +702,9 @@ func (c *Client) addOperationCreateDBInstanceReadReplicaMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBInstanceReadReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBParameterGroup.go b/service/rds/api_op_CreateDBParameterGroup.go index f1d2db802a0..34b0e43eff0 100644 --- a/service/rds/api_op_CreateDBParameterGroup.go +++ b/service/rds/api_op_CreateDBParameterGroup.go @@ -202,6 +202,9 @@ func (c *Client) addOperationCreateDBParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBProxy.go b/service/rds/api_op_CreateDBProxy.go index 7ac513991fa..157f3559ec2 100644 --- a/service/rds/api_op_CreateDBProxy.go +++ b/service/rds/api_op_CreateDBProxy.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateDBProxyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBProxyEndpoint.go b/service/rds/api_op_CreateDBProxyEndpoint.go index 52a249c3fa9..caeeafb2d44 100644 --- a/service/rds/api_op_CreateDBProxyEndpoint.go +++ b/service/rds/api_op_CreateDBProxyEndpoint.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateDBProxyEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBProxyEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBSecurityGroup.go b/service/rds/api_op_CreateDBSecurityGroup.go index 7d1b7c23d09..4acf70828db 100644 --- a/service/rds/api_op_CreateDBSecurityGroup.go +++ b/service/rds/api_op_CreateDBSecurityGroup.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateDBSecurityGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBShardGroup.go b/service/rds/api_op_CreateDBShardGroup.go index 79a5bb87ff1..d91d7a06859 100644 --- a/service/rds/api_op_CreateDBShardGroup.go +++ b/service/rds/api_op_CreateDBShardGroup.go @@ -211,6 +211,9 @@ func (c *Client) addOperationCreateDBShardGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBShardGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBSnapshot.go b/service/rds/api_op_CreateDBSnapshot.go index 9d60ae8f5cd..077903d6720 100644 --- a/service/rds/api_op_CreateDBSnapshot.go +++ b/service/rds/api_op_CreateDBSnapshot.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateDBSnapshotMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateDBSubnetGroup.go b/service/rds/api_op_CreateDBSubnetGroup.go index d28437a21a6..60c923ef8ab 100644 --- a/service/rds/api_op_CreateDBSubnetGroup.go +++ b/service/rds/api_op_CreateDBSubnetGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateEventSubscription.go b/service/rds/api_op_CreateEventSubscription.go index 8d95e5dac75..ca910b8cead 100644 --- a/service/rds/api_op_CreateEventSubscription.go +++ b/service/rds/api_op_CreateEventSubscription.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCreateEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateGlobalCluster.go b/service/rds/api_op_CreateGlobalCluster.go index 8a3189bfb82..f9035a367c8 100644 --- a/service/rds/api_op_CreateGlobalCluster.go +++ b/service/rds/api_op_CreateGlobalCluster.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGlobalCluster(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_CreateIntegration.go b/service/rds/api_op_CreateIntegration.go index c7ac1098da5..461706a7dff 100644 --- a/service/rds/api_op_CreateIntegration.go +++ b/service/rds/api_op_CreateIntegration.go @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateOptionGroup.go b/service/rds/api_op_CreateOptionGroup.go index 255a1ad2d13..ca756e85ec9 100644 --- a/service/rds/api_op_CreateOptionGroup.go +++ b/service/rds/api_op_CreateOptionGroup.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateOptionGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOptionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_CreateTenantDatabase.go b/service/rds/api_op_CreateTenantDatabase.go index 44edffe169d..b0410dae7d6 100644 --- a/service/rds/api_op_CreateTenantDatabase.go +++ b/service/rds/api_op_CreateTenantDatabase.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateTenantDatabaseMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTenantDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteBlueGreenDeployment.go b/service/rds/api_op_DeleteBlueGreenDeployment.go index cfeba6530ef..66e3751bf08 100644 --- a/service/rds/api_op_DeleteBlueGreenDeployment.go +++ b/service/rds/api_op_DeleteBlueGreenDeployment.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteBlueGreenDeploymentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBlueGreenDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteCustomDBEngineVersion.go b/service/rds/api_op_DeleteCustomDBEngineVersion.go index 0b7b1cebb1f..405482e4a24 100644 --- a/service/rds/api_op_DeleteCustomDBEngineVersion.go +++ b/service/rds/api_op_DeleteCustomDBEngineVersion.go @@ -288,6 +288,9 @@ func (c *Client) addOperationDeleteCustomDBEngineVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomDBEngineVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBCluster.go b/service/rds/api_op_DeleteDBCluster.go index 1a089db018d..944475347c3 100644 --- a/service/rds/api_op_DeleteDBCluster.go +++ b/service/rds/api_op_DeleteDBCluster.go @@ -174,6 +174,9 @@ func (c *Client) addOperationDeleteDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBClusterAutomatedBackup.go b/service/rds/api_op_DeleteDBClusterAutomatedBackup.go index 3d5f540cc2c..deb9641008c 100644 --- a/service/rds/api_op_DeleteDBClusterAutomatedBackup.go +++ b/service/rds/api_op_DeleteDBClusterAutomatedBackup.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDBClusterAutomatedBackupMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterAutomatedBackupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBClusterEndpoint.go b/service/rds/api_op_DeleteDBClusterEndpoint.go index 1fe24ac6067..b59304e5f88 100644 --- a/service/rds/api_op_DeleteDBClusterEndpoint.go +++ b/service/rds/api_op_DeleteDBClusterEndpoint.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDeleteDBClusterEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBClusterParameterGroup.go b/service/rds/api_op_DeleteDBClusterParameterGroup.go index 399fae87fcc..83c5d9be090 100644 --- a/service/rds/api_op_DeleteDBClusterParameterGroup.go +++ b/service/rds/api_op_DeleteDBClusterParameterGroup.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBClusterSnapshot.go b/service/rds/api_op_DeleteDBClusterSnapshot.go index 1c4714d9ab5..c9a0a12e6c1 100644 --- a/service/rds/api_op_DeleteDBClusterSnapshot.go +++ b/service/rds/api_op_DeleteDBClusterSnapshot.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteDBClusterSnapshotMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBInstance.go b/service/rds/api_op_DeleteDBInstance.go index 8692e5e59a7..0c1a9394af4 100644 --- a/service/rds/api_op_DeleteDBInstance.go +++ b/service/rds/api_op_DeleteDBInstance.go @@ -188,6 +188,9 @@ func (c *Client) addOperationDeleteDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBInstanceAutomatedBackup.go b/service/rds/api_op_DeleteDBInstanceAutomatedBackup.go index ddb7b5eb5fa..99cda0e1717 100644 --- a/service/rds/api_op_DeleteDBInstanceAutomatedBackup.go +++ b/service/rds/api_op_DeleteDBInstanceAutomatedBackup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteDBInstanceAutomatedBackupMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDBInstanceAutomatedBackup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBParameterGroup.go b/service/rds/api_op_DeleteDBParameterGroup.go index b6511baa5f2..1b19e095697 100644 --- a/service/rds/api_op_DeleteDBParameterGroup.go +++ b/service/rds/api_op_DeleteDBParameterGroup.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDBParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBProxy.go b/service/rds/api_op_DeleteDBProxy.go index caca7c928cf..10fd326f07d 100644 --- a/service/rds/api_op_DeleteDBProxy.go +++ b/service/rds/api_op_DeleteDBProxy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteDBProxyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBProxyEndpoint.go b/service/rds/api_op_DeleteDBProxyEndpoint.go index cf810b7d732..dffa85ee268 100644 --- a/service/rds/api_op_DeleteDBProxyEndpoint.go +++ b/service/rds/api_op_DeleteDBProxyEndpoint.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDBProxyEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBProxyEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBSecurityGroup.go b/service/rds/api_op_DeleteDBSecurityGroup.go index 2a55b5cfe9e..aff25bd4d71 100644 --- a/service/rds/api_op_DeleteDBSecurityGroup.go +++ b/service/rds/api_op_DeleteDBSecurityGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteDBSecurityGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBShardGroup.go b/service/rds/api_op_DeleteDBShardGroup.go index f19c39f2931..6ff7de51bf4 100644 --- a/service/rds/api_op_DeleteDBShardGroup.go +++ b/service/rds/api_op_DeleteDBShardGroup.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDeleteDBShardGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBShardGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBSnapshot.go b/service/rds/api_op_DeleteDBSnapshot.go index 6295c9adb24..d2012c61657 100644 --- a/service/rds/api_op_DeleteDBSnapshot.go +++ b/service/rds/api_op_DeleteDBSnapshot.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDBSnapshotMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteDBSubnetGroup.go b/service/rds/api_op_DeleteDBSubnetGroup.go index 34f05a93ff3..b717411b496 100644 --- a/service/rds/api_op_DeleteDBSubnetGroup.go +++ b/service/rds/api_op_DeleteDBSubnetGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteEventSubscription.go b/service/rds/api_op_DeleteEventSubscription.go index d47e84d0a33..bad3574e101 100644 --- a/service/rds/api_op_DeleteEventSubscription.go +++ b/service/rds/api_op_DeleteEventSubscription.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteGlobalCluster.go b/service/rds/api_op_DeleteGlobalCluster.go index b0bae443759..fe1a147ceb2 100644 --- a/service/rds/api_op_DeleteGlobalCluster.go +++ b/service/rds/api_op_DeleteGlobalCluster.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteIntegration.go b/service/rds/api_op_DeleteIntegration.go index 7e71bd0b85b..201a03c127b 100644 --- a/service/rds/api_op_DeleteIntegration.go +++ b/service/rds/api_op_DeleteIntegration.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDeleteIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteOptionGroup.go b/service/rds/api_op_DeleteOptionGroup.go index db6bfc02426..4697701944f 100644 --- a/service/rds/api_op_DeleteOptionGroup.go +++ b/service/rds/api_op_DeleteOptionGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteOptionGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOptionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeleteTenantDatabase.go b/service/rds/api_op_DeleteTenantDatabase.go index bcb3cb717be..9c55a2b0f2a 100644 --- a/service/rds/api_op_DeleteTenantDatabase.go +++ b/service/rds/api_op_DeleteTenantDatabase.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteTenantDatabaseMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTenantDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DeregisterDBProxyTargets.go b/service/rds/api_op_DeregisterDBProxyTargets.go index 01e9c03825d..172b55ffcea 100644 --- a/service/rds/api_op_DeregisterDBProxyTargets.go +++ b/service/rds/api_op_DeregisterDBProxyTargets.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeregisterDBProxyTargetsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterDBProxyTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DescribeAccountAttributes.go b/service/rds/api_op_DescribeAccountAttributes.go index d6720778985..d752fcc6487 100644 --- a/service/rds/api_op_DescribeAccountAttributes.go +++ b/service/rds/api_op_DescribeAccountAttributes.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_DescribeBlueGreenDeployments.go b/service/rds/api_op_DescribeBlueGreenDeployments.go index f337f5695a6..169d41f6824 100644 --- a/service/rds/api_op_DescribeBlueGreenDeployments.go +++ b/service/rds/api_op_DescribeBlueGreenDeployments.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDescribeBlueGreenDeploymentsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBlueGreenDeploymentsValidationMiddleware(stack); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationDescribeBlueGreenDeploymentsMiddlewares(stack *midd return nil } -// DescribeBlueGreenDeploymentsAPIClient is a client that implements the -// DescribeBlueGreenDeployments operation. -type DescribeBlueGreenDeploymentsAPIClient interface { - DescribeBlueGreenDeployments(context.Context, *DescribeBlueGreenDeploymentsInput, ...func(*Options)) (*DescribeBlueGreenDeploymentsOutput, error) -} - -var _ DescribeBlueGreenDeploymentsAPIClient = (*Client)(nil) - // DescribeBlueGreenDeploymentsPaginatorOptions is the paginator options for // DescribeBlueGreenDeployments type DescribeBlueGreenDeploymentsPaginatorOptions struct { @@ -267,6 +262,9 @@ func (p *DescribeBlueGreenDeploymentsPaginator) NextPage(ctx context.Context, op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeBlueGreenDeployments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +284,14 @@ func (p *DescribeBlueGreenDeploymentsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeBlueGreenDeploymentsAPIClient is a client that implements the +// DescribeBlueGreenDeployments operation. +type DescribeBlueGreenDeploymentsAPIClient interface { + DescribeBlueGreenDeployments(context.Context, *DescribeBlueGreenDeploymentsInput, ...func(*Options)) (*DescribeBlueGreenDeploymentsOutput, error) +} + +var _ DescribeBlueGreenDeploymentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeBlueGreenDeployments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeCertificates.go b/service/rds/api_op_DescribeCertificates.go index 900c997c638..a19e2e38328 100644 --- a/service/rds/api_op_DescribeCertificates.go +++ b/service/rds/api_op_DescribeCertificates.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeCertificatesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificatesValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeCertificatesMiddlewares(stack *middleware.S return nil } -// DescribeCertificatesAPIClient is a client that implements the -// DescribeCertificates operation. -type DescribeCertificatesAPIClient interface { - DescribeCertificates(context.Context, *DescribeCertificatesInput, ...func(*Options)) (*DescribeCertificatesOutput, error) -} - -var _ DescribeCertificatesAPIClient = (*Client)(nil) - // DescribeCertificatesPaginatorOptions is the paginator options for // DescribeCertificates type DescribeCertificatesPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *DescribeCertificatesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeCertificatesAPIClient is a client that implements the +// DescribeCertificates operation. +type DescribeCertificatesAPIClient interface { + DescribeCertificates(context.Context, *DescribeCertificatesInput, ...func(*Options)) (*DescribeCertificatesOutput, error) +} + +var _ DescribeCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusterAutomatedBackups.go b/service/rds/api_op_DescribeDBClusterAutomatedBackups.go index c4316bcae63..0fc90bd5a2e 100644 --- a/service/rds/api_op_DescribeDBClusterAutomatedBackups.go +++ b/service/rds/api_op_DescribeDBClusterAutomatedBackups.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeDBClusterAutomatedBackupsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterAutomatedBackupsValidationMiddleware(stack); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationDescribeDBClusterAutomatedBackupsMiddlewares(stack return nil } -// DescribeDBClusterAutomatedBackupsAPIClient is a client that implements the -// DescribeDBClusterAutomatedBackups operation. -type DescribeDBClusterAutomatedBackupsAPIClient interface { - DescribeDBClusterAutomatedBackups(context.Context, *DescribeDBClusterAutomatedBackupsInput, ...func(*Options)) (*DescribeDBClusterAutomatedBackupsOutput, error) -} - -var _ DescribeDBClusterAutomatedBackupsAPIClient = (*Client)(nil) - // DescribeDBClusterAutomatedBackupsPaginatorOptions is the paginator options for // DescribeDBClusterAutomatedBackups type DescribeDBClusterAutomatedBackupsPaginatorOptions struct { @@ -252,6 +247,9 @@ func (p *DescribeDBClusterAutomatedBackupsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterAutomatedBackups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *DescribeDBClusterAutomatedBackupsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeDBClusterAutomatedBackupsAPIClient is a client that implements the +// DescribeDBClusterAutomatedBackups operation. +type DescribeDBClusterAutomatedBackupsAPIClient interface { + DescribeDBClusterAutomatedBackups(context.Context, *DescribeDBClusterAutomatedBackupsInput, ...func(*Options)) (*DescribeDBClusterAutomatedBackupsOutput, error) +} + +var _ DescribeDBClusterAutomatedBackupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterAutomatedBackups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusterBacktracks.go b/service/rds/api_op_DescribeDBClusterBacktracks.go index 52e0257d9e4..cade5da6f04 100644 --- a/service/rds/api_op_DescribeDBClusterBacktracks.go +++ b/service/rds/api_op_DescribeDBClusterBacktracks.go @@ -177,6 +177,9 @@ func (c *Client) addOperationDescribeDBClusterBacktracksMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterBacktracksValidationMiddleware(stack); err != nil { return err } @@ -201,14 +204,6 @@ func (c *Client) addOperationDescribeDBClusterBacktracksMiddlewares(stack *middl return nil } -// DescribeDBClusterBacktracksAPIClient is a client that implements the -// DescribeDBClusterBacktracks operation. -type DescribeDBClusterBacktracksAPIClient interface { - DescribeDBClusterBacktracks(context.Context, *DescribeDBClusterBacktracksInput, ...func(*Options)) (*DescribeDBClusterBacktracksOutput, error) -} - -var _ DescribeDBClusterBacktracksAPIClient = (*Client)(nil) - // DescribeDBClusterBacktracksPaginatorOptions is the paginator options for // DescribeDBClusterBacktracks type DescribeDBClusterBacktracksPaginatorOptions struct { @@ -281,6 +276,9 @@ func (p *DescribeDBClusterBacktracksPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterBacktracks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -300,6 +298,14 @@ func (p *DescribeDBClusterBacktracksPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeDBClusterBacktracksAPIClient is a client that implements the +// DescribeDBClusterBacktracks operation. +type DescribeDBClusterBacktracksAPIClient interface { + DescribeDBClusterBacktracks(context.Context, *DescribeDBClusterBacktracksInput, ...func(*Options)) (*DescribeDBClusterBacktracksOutput, error) +} + +var _ DescribeDBClusterBacktracksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterBacktracks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusterEndpoints.go b/service/rds/api_op_DescribeDBClusterEndpoints.go index d828a9b084e..8045cf58ca8 100644 --- a/service/rds/api_op_DescribeDBClusterEndpoints.go +++ b/service/rds/api_op_DescribeDBClusterEndpoints.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeDBClusterEndpointsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterEndpointsValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationDescribeDBClusterEndpointsMiddlewares(stack *middle return nil } -// DescribeDBClusterEndpointsAPIClient is a client that implements the -// DescribeDBClusterEndpoints operation. -type DescribeDBClusterEndpointsAPIClient interface { - DescribeDBClusterEndpoints(context.Context, *DescribeDBClusterEndpointsInput, ...func(*Options)) (*DescribeDBClusterEndpointsOutput, error) -} - -var _ DescribeDBClusterEndpointsAPIClient = (*Client)(nil) - // DescribeDBClusterEndpointsPaginatorOptions is the paginator options for // DescribeDBClusterEndpoints type DescribeDBClusterEndpointsPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *DescribeDBClusterEndpointsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *DescribeDBClusterEndpointsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeDBClusterEndpointsAPIClient is a client that implements the +// DescribeDBClusterEndpoints operation. +type DescribeDBClusterEndpointsAPIClient interface { + DescribeDBClusterEndpoints(context.Context, *DescribeDBClusterEndpointsInput, ...func(*Options)) (*DescribeDBClusterEndpointsOutput, error) +} + +var _ DescribeDBClusterEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusterParameterGroups.go b/service/rds/api_op_DescribeDBClusterParameterGroups.go index 5bc13afddcb..6d56b954243 100644 --- a/service/rds/api_op_DescribeDBClusterParameterGroups.go +++ b/service/rds/api_op_DescribeDBClusterParameterGroups.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeDBClusterParameterGroupsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterParameterGroupsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeDBClusterParameterGroupsMiddlewares(stack * return nil } -// DescribeDBClusterParameterGroupsAPIClient is a client that implements the -// DescribeDBClusterParameterGroups operation. -type DescribeDBClusterParameterGroupsAPIClient interface { - DescribeDBClusterParameterGroups(context.Context, *DescribeDBClusterParameterGroupsInput, ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) -} - -var _ DescribeDBClusterParameterGroupsAPIClient = (*Client)(nil) - // DescribeDBClusterParameterGroupsPaginatorOptions is the paginator options for // DescribeDBClusterParameterGroups type DescribeDBClusterParameterGroupsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *DescribeDBClusterParameterGroupsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeDBClusterParameterGroupsAPIClient is a client that implements the +// DescribeDBClusterParameterGroups operation. +type DescribeDBClusterParameterGroupsAPIClient interface { + DescribeDBClusterParameterGroups(context.Context, *DescribeDBClusterParameterGroupsInput, ...func(*Options)) (*DescribeDBClusterParameterGroupsOutput, error) +} + +var _ DescribeDBClusterParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusterParameters.go b/service/rds/api_op_DescribeDBClusterParameters.go index e19f1eb0a3d..c0786c7d8a8 100644 --- a/service/rds/api_op_DescribeDBClusterParameters.go +++ b/service/rds/api_op_DescribeDBClusterParameters.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeDBClusterParametersMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterParametersValidationMiddleware(stack); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationDescribeDBClusterParametersMiddlewares(stack *middl return nil } -// DescribeDBClusterParametersAPIClient is a client that implements the -// DescribeDBClusterParameters operation. -type DescribeDBClusterParametersAPIClient interface { - DescribeDBClusterParameters(context.Context, *DescribeDBClusterParametersInput, ...func(*Options)) (*DescribeDBClusterParametersOutput, error) -} - -var _ DescribeDBClusterParametersAPIClient = (*Client)(nil) - // DescribeDBClusterParametersPaginatorOptions is the paginator options for // DescribeDBClusterParameters type DescribeDBClusterParametersPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBClusterParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *DescribeDBClusterParametersPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeDBClusterParametersAPIClient is a client that implements the +// DescribeDBClusterParameters operation. +type DescribeDBClusterParametersAPIClient interface { + DescribeDBClusterParameters(context.Context, *DescribeDBClusterParametersInput, ...func(*Options)) (*DescribeDBClusterParametersOutput, error) +} + +var _ DescribeDBClusterParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go b/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go index 6c973fe36ff..1b54fe05675 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go +++ b/service/rds/api_op_DescribeDBClusterSnapshotAttributes.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeDBClusterSnapshotAttributesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterSnapshotAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DescribeDBClusterSnapshots.go b/service/rds/api_op_DescribeDBClusterSnapshots.go index 9362efe589d..14867dc34ac 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshots.go +++ b/service/rds/api_op_DescribeDBClusterSnapshots.go @@ -217,6 +217,9 @@ func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClusterSnapshotsValidationMiddleware(stack); err != nil { return err } @@ -241,105 +244,6 @@ func (c *Client) addOperationDescribeDBClusterSnapshotsMiddlewares(stack *middle return nil } -// DescribeDBClusterSnapshotsAPIClient is a client that implements the -// DescribeDBClusterSnapshots operation. -type DescribeDBClusterSnapshotsAPIClient interface { - DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) -} - -var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil) - -// DescribeDBClusterSnapshotsPaginatorOptions is the paginator options for -// DescribeDBClusterSnapshots -type DescribeDBClusterSnapshotsPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a pagination token called a marker is - // included in the response so you can retrieve the remaining results. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDBClusterSnapshotsPaginator is a paginator for -// DescribeDBClusterSnapshots -type DescribeDBClusterSnapshotsPaginator struct { - options DescribeDBClusterSnapshotsPaginatorOptions - client DescribeDBClusterSnapshotsAPIClient - params *DescribeDBClusterSnapshotsInput - nextToken *string - firstPage bool -} - -// NewDescribeDBClusterSnapshotsPaginator returns a new -// DescribeDBClusterSnapshotsPaginator -func NewDescribeDBClusterSnapshotsPaginator(client DescribeDBClusterSnapshotsAPIClient, params *DescribeDBClusterSnapshotsInput, optFns ...func(*DescribeDBClusterSnapshotsPaginatorOptions)) *DescribeDBClusterSnapshotsPaginator { - if params == nil { - params = &DescribeDBClusterSnapshotsInput{} - } - - options := DescribeDBClusterSnapshotsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDBClusterSnapshotsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDBClusterSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDBClusterSnapshots page. -func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeDBClusterSnapshots(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DBClusterSnapshotAvailableWaiterOptions are waiter options for // DBClusterSnapshotAvailableWaiter type DBClusterSnapshotAvailableWaiterOptions struct { @@ -459,7 +363,13 @@ func (w *DBClusterSnapshotAvailableWaiter) WaitForOutput(ctx context.Context, pa } out, err := w.client.DescribeDBClusterSnapshots(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -769,7 +679,13 @@ func (w *DBClusterSnapshotDeletedWaiter) WaitForOutput(ctx context.Context, para } out, err := w.client.DescribeDBClusterSnapshots(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -934,6 +850,108 @@ func dBClusterSnapshotDeletedStateRetryable(ctx context.Context, input *Describe return true, nil } +// DescribeDBClusterSnapshotsPaginatorOptions is the paginator options for +// DescribeDBClusterSnapshots +type DescribeDBClusterSnapshotsPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a pagination token called a marker is + // included in the response so you can retrieve the remaining results. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDBClusterSnapshotsPaginator is a paginator for +// DescribeDBClusterSnapshots +type DescribeDBClusterSnapshotsPaginator struct { + options DescribeDBClusterSnapshotsPaginatorOptions + client DescribeDBClusterSnapshotsAPIClient + params *DescribeDBClusterSnapshotsInput + nextToken *string + firstPage bool +} + +// NewDescribeDBClusterSnapshotsPaginator returns a new +// DescribeDBClusterSnapshotsPaginator +func NewDescribeDBClusterSnapshotsPaginator(client DescribeDBClusterSnapshotsAPIClient, params *DescribeDBClusterSnapshotsInput, optFns ...func(*DescribeDBClusterSnapshotsPaginatorOptions)) *DescribeDBClusterSnapshotsPaginator { + if params == nil { + params = &DescribeDBClusterSnapshotsInput{} + } + + options := DescribeDBClusterSnapshotsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDBClusterSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDBClusterSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDBClusterSnapshots page. +func (p *DescribeDBClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDBClusterSnapshots(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDBClusterSnapshotsAPIClient is a client that implements the +// DescribeDBClusterSnapshots operation. +type DescribeDBClusterSnapshotsAPIClient interface { + DescribeDBClusterSnapshots(context.Context, *DescribeDBClusterSnapshotsInput, ...func(*Options)) (*DescribeDBClusterSnapshotsOutput, error) +} + +var _ DescribeDBClusterSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusterSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBClusters.go b/service/rds/api_op_DescribeDBClusters.go index 31184ef5e1c..ce334c91cbd 100644 --- a/service/rds/api_op_DescribeDBClusters.go +++ b/service/rds/api_op_DescribeDBClusters.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBClustersValidationMiddleware(stack); err != nil { return err } @@ -196,103 +199,6 @@ func (c *Client) addOperationDescribeDBClustersMiddlewares(stack *middleware.Sta return nil } -// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters -// operation. -type DescribeDBClustersAPIClient interface { - DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error) -} - -var _ DescribeDBClustersAPIClient = (*Client)(nil) - -// DescribeDBClustersPaginatorOptions is the paginator options for -// DescribeDBClusters -type DescribeDBClustersPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a pagination token called a marker is - // included in the response so you can retrieve the remaining results. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100 - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDBClustersPaginator is a paginator for DescribeDBClusters -type DescribeDBClustersPaginator struct { - options DescribeDBClustersPaginatorOptions - client DescribeDBClustersAPIClient - params *DescribeDBClustersInput - nextToken *string - firstPage bool -} - -// NewDescribeDBClustersPaginator returns a new DescribeDBClustersPaginator -func NewDescribeDBClustersPaginator(client DescribeDBClustersAPIClient, params *DescribeDBClustersInput, optFns ...func(*DescribeDBClustersPaginatorOptions)) *DescribeDBClustersPaginator { - if params == nil { - params = &DescribeDBClustersInput{} - } - - options := DescribeDBClustersPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDBClustersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDBClustersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDBClusters page. -func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBClustersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeDBClusters(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DBClusterAvailableWaiterOptions are waiter options for DBClusterAvailableWaiter type DBClusterAvailableWaiterOptions struct { @@ -408,7 +314,13 @@ func (w *DBClusterAvailableWaiter) WaitForOutput(ctx context.Context, params *De } out, err := w.client.DescribeDBClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -716,7 +628,13 @@ func (w *DBClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeDBClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -881,6 +799,106 @@ func dBClusterDeletedStateRetryable(ctx context.Context, input *DescribeDBCluste return true, nil } +// DescribeDBClustersPaginatorOptions is the paginator options for +// DescribeDBClusters +type DescribeDBClustersPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a pagination token called a marker is + // included in the response so you can retrieve the remaining results. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100 + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDBClustersPaginator is a paginator for DescribeDBClusters +type DescribeDBClustersPaginator struct { + options DescribeDBClustersPaginatorOptions + client DescribeDBClustersAPIClient + params *DescribeDBClustersInput + nextToken *string + firstPage bool +} + +// NewDescribeDBClustersPaginator returns a new DescribeDBClustersPaginator +func NewDescribeDBClustersPaginator(client DescribeDBClustersAPIClient, params *DescribeDBClustersInput, optFns ...func(*DescribeDBClustersPaginatorOptions)) *DescribeDBClustersPaginator { + if params == nil { + params = &DescribeDBClustersInput{} + } + + options := DescribeDBClustersPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDBClustersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDBClustersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDBClusters page. +func (p *DescribeDBClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBClustersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDBClusters(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDBClustersAPIClient is a client that implements the DescribeDBClusters +// operation. +type DescribeDBClustersAPIClient interface { + DescribeDBClusters(context.Context, *DescribeDBClustersInput, ...func(*Options)) (*DescribeDBClustersOutput, error) +} + +var _ DescribeDBClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBEngineVersions.go b/service/rds/api_op_DescribeDBEngineVersions.go index ca93a66e10e..83f952fe8f3 100644 --- a/service/rds/api_op_DescribeDBEngineVersions.go +++ b/service/rds/api_op_DescribeDBEngineVersions.go @@ -242,6 +242,9 @@ func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBEngineVersionsValidationMiddleware(stack); err != nil { return err } @@ -266,14 +269,6 @@ func (c *Client) addOperationDescribeDBEngineVersionsMiddlewares(stack *middlewa return nil } -// DescribeDBEngineVersionsAPIClient is a client that implements the -// DescribeDBEngineVersions operation. -type DescribeDBEngineVersionsAPIClient interface { - DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) -} - -var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil) - // DescribeDBEngineVersionsPaginatorOptions is the paginator options for // DescribeDBEngineVersions type DescribeDBEngineVersionsPaginatorOptions struct { @@ -345,6 +340,9 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBEngineVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -364,6 +362,14 @@ func (p *DescribeDBEngineVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDBEngineVersionsAPIClient is a client that implements the +// DescribeDBEngineVersions operation. +type DescribeDBEngineVersionsAPIClient interface { + DescribeDBEngineVersions(context.Context, *DescribeDBEngineVersionsInput, ...func(*Options)) (*DescribeDBEngineVersionsOutput, error) +} + +var _ DescribeDBEngineVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBEngineVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go b/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go index ca60db8bbc0..70b50b8bcc4 100644 --- a/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go +++ b/service/rds/api_op_DescribeDBInstanceAutomatedBackups.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDescribeDBInstanceAutomatedBackupsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBInstanceAutomatedBackupsValidationMiddleware(stack); err != nil { return err } @@ -192,14 +195,6 @@ func (c *Client) addOperationDescribeDBInstanceAutomatedBackupsMiddlewares(stack return nil } -// DescribeDBInstanceAutomatedBackupsAPIClient is a client that implements the -// DescribeDBInstanceAutomatedBackups operation. -type DescribeDBInstanceAutomatedBackupsAPIClient interface { - DescribeDBInstanceAutomatedBackups(context.Context, *DescribeDBInstanceAutomatedBackupsInput, ...func(*Options)) (*DescribeDBInstanceAutomatedBackupsOutput, error) -} - -var _ DescribeDBInstanceAutomatedBackupsAPIClient = (*Client)(nil) - // DescribeDBInstanceAutomatedBackupsPaginatorOptions is the paginator options for // DescribeDBInstanceAutomatedBackups type DescribeDBInstanceAutomatedBackupsPaginatorOptions struct { @@ -268,6 +263,9 @@ func (p *DescribeDBInstanceAutomatedBackupsPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBInstanceAutomatedBackups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -287,6 +285,14 @@ func (p *DescribeDBInstanceAutomatedBackupsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeDBInstanceAutomatedBackupsAPIClient is a client that implements the +// DescribeDBInstanceAutomatedBackups operation. +type DescribeDBInstanceAutomatedBackupsAPIClient interface { + DescribeDBInstanceAutomatedBackups(context.Context, *DescribeDBInstanceAutomatedBackupsInput, ...func(*Options)) (*DescribeDBInstanceAutomatedBackupsOutput, error) +} + +var _ DescribeDBInstanceAutomatedBackupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBInstanceAutomatedBackups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBInstances.go b/service/rds/api_op_DescribeDBInstances.go index e27a234f490..dd2163420e1 100644 --- a/service/rds/api_op_DescribeDBInstances.go +++ b/service/rds/api_op_DescribeDBInstances.go @@ -164,6 +164,9 @@ func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBInstancesValidationMiddleware(stack); err != nil { return err } @@ -188,103 +191,6 @@ func (c *Client) addOperationDescribeDBInstancesMiddlewares(stack *middleware.St return nil } -// DescribeDBInstancesAPIClient is a client that implements the -// DescribeDBInstances operation. -type DescribeDBInstancesAPIClient interface { - DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error) -} - -var _ DescribeDBInstancesAPIClient = (*Client)(nil) - -// DescribeDBInstancesPaginatorOptions is the paginator options for -// DescribeDBInstances -type DescribeDBInstancesPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a pagination token called a marker is - // included in the response so that you can retrieve the remaining results. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances -type DescribeDBInstancesPaginator struct { - options DescribeDBInstancesPaginatorOptions - client DescribeDBInstancesAPIClient - params *DescribeDBInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator -func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator { - if params == nil { - params = &DescribeDBInstancesInput{} - } - - options := DescribeDBInstancesPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDBInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDBInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDBInstances page. -func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeDBInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DBInstanceAvailableWaiterOptions are waiter options for // DBInstanceAvailableWaiter type DBInstanceAvailableWaiterOptions struct { @@ -402,7 +308,13 @@ func (w *DBInstanceAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -710,7 +622,13 @@ func (w *DBInstanceDeletedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeDBInstances(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -880,6 +798,106 @@ func dBInstanceDeletedStateRetryable(ctx context.Context, input *DescribeDBInsta return true, nil } +// DescribeDBInstancesPaginatorOptions is the paginator options for +// DescribeDBInstances +type DescribeDBInstancesPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a pagination token called a marker is + // included in the response so that you can retrieve the remaining results. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDBInstancesPaginator is a paginator for DescribeDBInstances +type DescribeDBInstancesPaginator struct { + options DescribeDBInstancesPaginatorOptions + client DescribeDBInstancesAPIClient + params *DescribeDBInstancesInput + nextToken *string + firstPage bool +} + +// NewDescribeDBInstancesPaginator returns a new DescribeDBInstancesPaginator +func NewDescribeDBInstancesPaginator(client DescribeDBInstancesAPIClient, params *DescribeDBInstancesInput, optFns ...func(*DescribeDBInstancesPaginatorOptions)) *DescribeDBInstancesPaginator { + if params == nil { + params = &DescribeDBInstancesInput{} + } + + options := DescribeDBInstancesPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDBInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDBInstancesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDBInstances page. +func (p *DescribeDBInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBInstancesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDBInstances(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDBInstancesAPIClient is a client that implements the +// DescribeDBInstances operation. +type DescribeDBInstancesAPIClient interface { + DescribeDBInstances(context.Context, *DescribeDBInstancesInput, ...func(*Options)) (*DescribeDBInstancesOutput, error) +} + +var _ DescribeDBInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBLogFiles.go b/service/rds/api_op_DescribeDBLogFiles.go index 2fe5660a8ef..922e75916b8 100644 --- a/service/rds/api_op_DescribeDBLogFiles.go +++ b/service/rds/api_op_DescribeDBLogFiles.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeDBLogFilesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBLogFilesValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeDBLogFilesMiddlewares(stack *middleware.Sta return nil } -// DescribeDBLogFilesAPIClient is a client that implements the DescribeDBLogFiles -// operation. -type DescribeDBLogFilesAPIClient interface { - DescribeDBLogFiles(context.Context, *DescribeDBLogFilesInput, ...func(*Options)) (*DescribeDBLogFilesOutput, error) -} - -var _ DescribeDBLogFilesAPIClient = (*Client)(nil) - // DescribeDBLogFilesPaginatorOptions is the paginator options for // DescribeDBLogFiles type DescribeDBLogFilesPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *DescribeDBLogFilesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBLogFiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *DescribeDBLogFilesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeDBLogFilesAPIClient is a client that implements the DescribeDBLogFiles +// operation. +type DescribeDBLogFilesAPIClient interface { + DescribeDBLogFiles(context.Context, *DescribeDBLogFilesInput, ...func(*Options)) (*DescribeDBLogFilesOutput, error) +} + +var _ DescribeDBLogFilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBLogFiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBParameterGroups.go b/service/rds/api_op_DescribeDBParameterGroups.go index d3ef75ba83f..9acb13bcc7e 100644 --- a/service/rds/api_op_DescribeDBParameterGroups.go +++ b/service/rds/api_op_DescribeDBParameterGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeDBParameterGroupsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBParameterGroupsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeDBParameterGroupsMiddlewares(stack *middlew return nil } -// DescribeDBParameterGroupsAPIClient is a client that implements the -// DescribeDBParameterGroups operation. -type DescribeDBParameterGroupsAPIClient interface { - DescribeDBParameterGroups(context.Context, *DescribeDBParameterGroupsInput, ...func(*Options)) (*DescribeDBParameterGroupsOutput, error) -} - -var _ DescribeDBParameterGroupsAPIClient = (*Client)(nil) - // DescribeDBParameterGroupsPaginatorOptions is the paginator options for // DescribeDBParameterGroups type DescribeDBParameterGroupsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeDBParameterGroupsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeDBParameterGroupsAPIClient is a client that implements the +// DescribeDBParameterGroups operation. +type DescribeDBParameterGroupsAPIClient interface { + DescribeDBParameterGroups(context.Context, *DescribeDBParameterGroupsInput, ...func(*Options)) (*DescribeDBParameterGroupsOutput, error) +} + +var _ DescribeDBParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBParameters.go b/service/rds/api_op_DescribeDBParameters.go index 0b0bb3dc2c0..290e4028a51 100644 --- a/service/rds/api_op_DescribeDBParameters.go +++ b/service/rds/api_op_DescribeDBParameters.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeDBParametersMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBParametersValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeDBParametersMiddlewares(stack *middleware.S return nil } -// DescribeDBParametersAPIClient is a client that implements the -// DescribeDBParameters operation. -type DescribeDBParametersAPIClient interface { - DescribeDBParameters(context.Context, *DescribeDBParametersInput, ...func(*Options)) (*DescribeDBParametersOutput, error) -} - -var _ DescribeDBParametersAPIClient = (*Client)(nil) - // DescribeDBParametersPaginatorOptions is the paginator options for // DescribeDBParameters type DescribeDBParametersPaginatorOptions struct { @@ -243,6 +238,9 @@ func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -262,6 +260,14 @@ func (p *DescribeDBParametersPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeDBParametersAPIClient is a client that implements the +// DescribeDBParameters operation. +type DescribeDBParametersAPIClient interface { + DescribeDBParameters(context.Context, *DescribeDBParametersInput, ...func(*Options)) (*DescribeDBParametersOutput, error) +} + +var _ DescribeDBParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBProxies.go b/service/rds/api_op_DescribeDBProxies.go index a0f7e4bdc6d..be66e686223 100644 --- a/service/rds/api_op_DescribeDBProxies.go +++ b/service/rds/api_op_DescribeDBProxies.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeDBProxiesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBProxiesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeDBProxiesMiddlewares(stack *middleware.Stac return nil } -// DescribeDBProxiesAPIClient is a client that implements the DescribeDBProxies -// operation. -type DescribeDBProxiesAPIClient interface { - DescribeDBProxies(context.Context, *DescribeDBProxiesInput, ...func(*Options)) (*DescribeDBProxiesOutput, error) -} - -var _ DescribeDBProxiesAPIClient = (*Client)(nil) - // DescribeDBProxiesPaginatorOptions is the paginator options for DescribeDBProxies type DescribeDBProxiesPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -228,6 +223,9 @@ func (p *DescribeDBProxiesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBProxies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeDBProxiesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeDBProxiesAPIClient is a client that implements the DescribeDBProxies +// operation. +type DescribeDBProxiesAPIClient interface { + DescribeDBProxies(context.Context, *DescribeDBProxiesInput, ...func(*Options)) (*DescribeDBProxiesOutput, error) +} + +var _ DescribeDBProxiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBProxies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBProxyEndpoints.go b/service/rds/api_op_DescribeDBProxyEndpoints.go index 10aaf40e373..6d5ba3e38d6 100644 --- a/service/rds/api_op_DescribeDBProxyEndpoints.go +++ b/service/rds/api_op_DescribeDBProxyEndpoints.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeDBProxyEndpointsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBProxyEndpointsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeDBProxyEndpointsMiddlewares(stack *middlewa return nil } -// DescribeDBProxyEndpointsAPIClient is a client that implements the -// DescribeDBProxyEndpoints operation. -type DescribeDBProxyEndpointsAPIClient interface { - DescribeDBProxyEndpoints(context.Context, *DescribeDBProxyEndpointsInput, ...func(*Options)) (*DescribeDBProxyEndpointsOutput, error) -} - -var _ DescribeDBProxyEndpointsAPIClient = (*Client)(nil) - // DescribeDBProxyEndpointsPaginatorOptions is the paginator options for // DescribeDBProxyEndpoints type DescribeDBProxyEndpointsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeDBProxyEndpointsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBProxyEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeDBProxyEndpointsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDBProxyEndpointsAPIClient is a client that implements the +// DescribeDBProxyEndpoints operation. +type DescribeDBProxyEndpointsAPIClient interface { + DescribeDBProxyEndpoints(context.Context, *DescribeDBProxyEndpointsInput, ...func(*Options)) (*DescribeDBProxyEndpointsOutput, error) +} + +var _ DescribeDBProxyEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBProxyEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBProxyTargetGroups.go b/service/rds/api_op_DescribeDBProxyTargetGroups.go index d1d35ad4c07..d4488f241a6 100644 --- a/service/rds/api_op_DescribeDBProxyTargetGroups.go +++ b/service/rds/api_op_DescribeDBProxyTargetGroups.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeDBProxyTargetGroupsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBProxyTargetGroupsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeDBProxyTargetGroupsMiddlewares(stack *middl return nil } -// DescribeDBProxyTargetGroupsAPIClient is a client that implements the -// DescribeDBProxyTargetGroups operation. -type DescribeDBProxyTargetGroupsAPIClient interface { - DescribeDBProxyTargetGroups(context.Context, *DescribeDBProxyTargetGroupsInput, ...func(*Options)) (*DescribeDBProxyTargetGroupsOutput, error) -} - -var _ DescribeDBProxyTargetGroupsAPIClient = (*Client)(nil) - // DescribeDBProxyTargetGroupsPaginatorOptions is the paginator options for // DescribeDBProxyTargetGroups type DescribeDBProxyTargetGroupsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeDBProxyTargetGroupsPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBProxyTargetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeDBProxyTargetGroupsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeDBProxyTargetGroupsAPIClient is a client that implements the +// DescribeDBProxyTargetGroups operation. +type DescribeDBProxyTargetGroupsAPIClient interface { + DescribeDBProxyTargetGroups(context.Context, *DescribeDBProxyTargetGroupsInput, ...func(*Options)) (*DescribeDBProxyTargetGroupsOutput, error) +} + +var _ DescribeDBProxyTargetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBProxyTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBProxyTargets.go b/service/rds/api_op_DescribeDBProxyTargets.go index 8e2a09420ee..1b93d760de9 100644 --- a/service/rds/api_op_DescribeDBProxyTargets.go +++ b/service/rds/api_op_DescribeDBProxyTargets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeDBProxyTargetsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBProxyTargetsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeDBProxyTargetsMiddlewares(stack *middleware return nil } -// DescribeDBProxyTargetsAPIClient is a client that implements the -// DescribeDBProxyTargets operation. -type DescribeDBProxyTargetsAPIClient interface { - DescribeDBProxyTargets(context.Context, *DescribeDBProxyTargetsInput, ...func(*Options)) (*DescribeDBProxyTargetsOutput, error) -} - -var _ DescribeDBProxyTargetsAPIClient = (*Client)(nil) - // DescribeDBProxyTargetsPaginatorOptions is the paginator options for // DescribeDBProxyTargets type DescribeDBProxyTargetsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeDBProxyTargetsPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBProxyTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeDBProxyTargetsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeDBProxyTargetsAPIClient is a client that implements the +// DescribeDBProxyTargets operation. +type DescribeDBProxyTargetsAPIClient interface { + DescribeDBProxyTargets(context.Context, *DescribeDBProxyTargetsInput, ...func(*Options)) (*DescribeDBProxyTargetsOutput, error) +} + +var _ DescribeDBProxyTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBProxyTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBRecommendations.go b/service/rds/api_op_DescribeDBRecommendations.go index 3394c77cb0c..0e12ac90565 100644 --- a/service/rds/api_op_DescribeDBRecommendations.go +++ b/service/rds/api_op_DescribeDBRecommendations.go @@ -213,6 +213,9 @@ func (c *Client) addOperationDescribeDBRecommendationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -237,14 +240,6 @@ func (c *Client) addOperationDescribeDBRecommendationsMiddlewares(stack *middlew return nil } -// DescribeDBRecommendationsAPIClient is a client that implements the -// DescribeDBRecommendations operation. -type DescribeDBRecommendationsAPIClient interface { - DescribeDBRecommendations(context.Context, *DescribeDBRecommendationsInput, ...func(*Options)) (*DescribeDBRecommendationsOutput, error) -} - -var _ DescribeDBRecommendationsAPIClient = (*Client)(nil) - // DescribeDBRecommendationsPaginatorOptions is the paginator options for // DescribeDBRecommendations type DescribeDBRecommendationsPaginatorOptions struct { @@ -313,6 +308,9 @@ func (p *DescribeDBRecommendationsPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -332,6 +330,14 @@ func (p *DescribeDBRecommendationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeDBRecommendationsAPIClient is a client that implements the +// DescribeDBRecommendations operation. +type DescribeDBRecommendationsAPIClient interface { + DescribeDBRecommendations(context.Context, *DescribeDBRecommendationsInput, ...func(*Options)) (*DescribeDBRecommendationsOutput, error) +} + +var _ DescribeDBRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBSecurityGroups.go b/service/rds/api_op_DescribeDBSecurityGroups.go index 8d5ed82f5b5..705174508f2 100644 --- a/service/rds/api_op_DescribeDBSecurityGroups.go +++ b/service/rds/api_op_DescribeDBSecurityGroups.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeDBSecurityGroupsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSecurityGroupsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeDBSecurityGroupsMiddlewares(stack *middlewa return nil } -// DescribeDBSecurityGroupsAPIClient is a client that implements the -// DescribeDBSecurityGroups operation. -type DescribeDBSecurityGroupsAPIClient interface { - DescribeDBSecurityGroups(context.Context, *DescribeDBSecurityGroupsInput, ...func(*Options)) (*DescribeDBSecurityGroupsOutput, error) -} - -var _ DescribeDBSecurityGroupsAPIClient = (*Client)(nil) - // DescribeDBSecurityGroupsPaginatorOptions is the paginator options for // DescribeDBSecurityGroups type DescribeDBSecurityGroupsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *DescribeDBSecurityGroupsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBSecurityGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *DescribeDBSecurityGroupsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDBSecurityGroupsAPIClient is a client that implements the +// DescribeDBSecurityGroups operation. +type DescribeDBSecurityGroupsAPIClient interface { + DescribeDBSecurityGroups(context.Context, *DescribeDBSecurityGroupsInput, ...func(*Options)) (*DescribeDBSecurityGroupsOutput, error) +} + +var _ DescribeDBSecurityGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBShardGroups.go b/service/rds/api_op_DescribeDBShardGroups.go index aaa40e3bdf0..bb52c26f3d2 100644 --- a/service/rds/api_op_DescribeDBShardGroups.go +++ b/service/rds/api_op_DescribeDBShardGroups.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeDBShardGroupsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBShardGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DescribeDBSnapshotAttributes.go b/service/rds/api_op_DescribeDBSnapshotAttributes.go index 835afa84871..f95c403a1bd 100644 --- a/service/rds/api_op_DescribeDBSnapshotAttributes.go +++ b/service/rds/api_op_DescribeDBSnapshotAttributes.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeDBSnapshotAttributesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSnapshotAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DescribeDBSnapshotTenantDatabases.go b/service/rds/api_op_DescribeDBSnapshotTenantDatabases.go index 216f18b8049..c165cb8a0df 100644 --- a/service/rds/api_op_DescribeDBSnapshotTenantDatabases.go +++ b/service/rds/api_op_DescribeDBSnapshotTenantDatabases.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeDBSnapshotTenantDatabasesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSnapshotTenantDatabasesValidationMiddleware(stack); err != nil { return err } @@ -210,14 +213,6 @@ func (c *Client) addOperationDescribeDBSnapshotTenantDatabasesMiddlewares(stack return nil } -// DescribeDBSnapshotTenantDatabasesAPIClient is a client that implements the -// DescribeDBSnapshotTenantDatabases operation. -type DescribeDBSnapshotTenantDatabasesAPIClient interface { - DescribeDBSnapshotTenantDatabases(context.Context, *DescribeDBSnapshotTenantDatabasesInput, ...func(*Options)) (*DescribeDBSnapshotTenantDatabasesOutput, error) -} - -var _ DescribeDBSnapshotTenantDatabasesAPIClient = (*Client)(nil) - // DescribeDBSnapshotTenantDatabasesPaginatorOptions is the paginator options for // DescribeDBSnapshotTenantDatabases type DescribeDBSnapshotTenantDatabasesPaginatorOptions struct { @@ -286,6 +281,9 @@ func (p *DescribeDBSnapshotTenantDatabasesPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBSnapshotTenantDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -305,6 +303,14 @@ func (p *DescribeDBSnapshotTenantDatabasesPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeDBSnapshotTenantDatabasesAPIClient is a client that implements the +// DescribeDBSnapshotTenantDatabases operation. +type DescribeDBSnapshotTenantDatabasesAPIClient interface { + DescribeDBSnapshotTenantDatabases(context.Context, *DescribeDBSnapshotTenantDatabasesInput, ...func(*Options)) (*DescribeDBSnapshotTenantDatabasesOutput, error) +} + +var _ DescribeDBSnapshotTenantDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBSnapshotTenantDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBSnapshots.go b/service/rds/api_op_DescribeDBSnapshots.go index 350b34137de..ef11920eb6a 100644 --- a/service/rds/api_op_DescribeDBSnapshots.go +++ b/service/rds/api_op_DescribeDBSnapshots.go @@ -223,6 +223,9 @@ func (c *Client) addOperationDescribeDBSnapshotsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSnapshotsValidationMiddleware(stack); err != nil { return err } @@ -247,103 +250,6 @@ func (c *Client) addOperationDescribeDBSnapshotsMiddlewares(stack *middleware.St return nil } -// DescribeDBSnapshotsAPIClient is a client that implements the -// DescribeDBSnapshots operation. -type DescribeDBSnapshotsAPIClient interface { - DescribeDBSnapshots(context.Context, *DescribeDBSnapshotsInput, ...func(*Options)) (*DescribeDBSnapshotsOutput, error) -} - -var _ DescribeDBSnapshotsAPIClient = (*Client)(nil) - -// DescribeDBSnapshotsPaginatorOptions is the paginator options for -// DescribeDBSnapshots -type DescribeDBSnapshotsPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a pagination token called a marker is - // included in the response so that you can retrieve the remaining results. - // - // Default: 100 - // - // Constraints: Minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDBSnapshotsPaginator is a paginator for DescribeDBSnapshots -type DescribeDBSnapshotsPaginator struct { - options DescribeDBSnapshotsPaginatorOptions - client DescribeDBSnapshotsAPIClient - params *DescribeDBSnapshotsInput - nextToken *string - firstPage bool -} - -// NewDescribeDBSnapshotsPaginator returns a new DescribeDBSnapshotsPaginator -func NewDescribeDBSnapshotsPaginator(client DescribeDBSnapshotsAPIClient, params *DescribeDBSnapshotsInput, optFns ...func(*DescribeDBSnapshotsPaginatorOptions)) *DescribeDBSnapshotsPaginator { - if params == nil { - params = &DescribeDBSnapshotsInput{} - } - - options := DescribeDBSnapshotsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDBSnapshotsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDBSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDBSnapshots page. -func (p *DescribeDBSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBSnapshotsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeDBSnapshots(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // DBSnapshotAvailableWaiterOptions are waiter options for // DBSnapshotAvailableWaiter type DBSnapshotAvailableWaiterOptions struct { @@ -461,7 +367,13 @@ func (w *DBSnapshotAvailableWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeDBSnapshots(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -769,7 +681,13 @@ func (w *DBSnapshotDeletedWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeDBSnapshots(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -939,6 +857,106 @@ func dBSnapshotDeletedStateRetryable(ctx context.Context, input *DescribeDBSnaps return true, nil } +// DescribeDBSnapshotsPaginatorOptions is the paginator options for +// DescribeDBSnapshots +type DescribeDBSnapshotsPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a pagination token called a marker is + // included in the response so that you can retrieve the remaining results. + // + // Default: 100 + // + // Constraints: Minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeDBSnapshotsPaginator is a paginator for DescribeDBSnapshots +type DescribeDBSnapshotsPaginator struct { + options DescribeDBSnapshotsPaginatorOptions + client DescribeDBSnapshotsAPIClient + params *DescribeDBSnapshotsInput + nextToken *string + firstPage bool +} + +// NewDescribeDBSnapshotsPaginator returns a new DescribeDBSnapshotsPaginator +func NewDescribeDBSnapshotsPaginator(client DescribeDBSnapshotsAPIClient, params *DescribeDBSnapshotsInput, optFns ...func(*DescribeDBSnapshotsPaginatorOptions)) *DescribeDBSnapshotsPaginator { + if params == nil { + params = &DescribeDBSnapshotsInput{} + } + + options := DescribeDBSnapshotsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeDBSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeDBSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeDBSnapshots page. +func (p *DescribeDBSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDBSnapshotsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeDBSnapshots(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeDBSnapshotsAPIClient is a client that implements the +// DescribeDBSnapshots operation. +type DescribeDBSnapshotsAPIClient interface { + DescribeDBSnapshots(context.Context, *DescribeDBSnapshotsInput, ...func(*Options)) (*DescribeDBSnapshotsOutput, error) +} + +var _ DescribeDBSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeDBSubnetGroups.go b/service/rds/api_op_DescribeDBSubnetGroups.go index 6e8f0539c9e..6bfde06901e 100644 --- a/service/rds/api_op_DescribeDBSubnetGroups.go +++ b/service/rds/api_op_DescribeDBSubnetGroups.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDBSubnetGroupsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationDescribeDBSubnetGroupsMiddlewares(stack *middleware return nil } -// DescribeDBSubnetGroupsAPIClient is a client that implements the -// DescribeDBSubnetGroups operation. -type DescribeDBSubnetGroupsAPIClient interface { - DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) -} - -var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil) - // DescribeDBSubnetGroupsPaginatorOptions is the paginator options for // DescribeDBSubnetGroups type DescribeDBSubnetGroupsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDBSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeDBSubnetGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeDBSubnetGroupsAPIClient is a client that implements the +// DescribeDBSubnetGroups operation. +type DescribeDBSubnetGroupsAPIClient interface { + DescribeDBSubnetGroups(context.Context, *DescribeDBSubnetGroupsInput, ...func(*Options)) (*DescribeDBSubnetGroupsOutput, error) +} + +var _ DescribeDBSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDBSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeEngineDefaultClusterParameters.go b/service/rds/api_op_DescribeEngineDefaultClusterParameters.go index 3d35bb0f67a..ef12e565fe3 100644 --- a/service/rds/api_op_DescribeEngineDefaultClusterParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultClusterParameters.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeEngineDefaultClusterParametersMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngineDefaultClusterParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DescribeEngineDefaultParameters.go b/service/rds/api_op_DescribeEngineDefaultParameters.go index f708831a9f8..cdd36fc7a2c 100644 --- a/service/rds/api_op_DescribeEngineDefaultParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultParameters.go @@ -226,6 +226,9 @@ func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngineDefaultParametersValidationMiddleware(stack); err != nil { return err } @@ -250,14 +253,6 @@ func (c *Client) addOperationDescribeEngineDefaultParametersMiddlewares(stack *m return nil } -// DescribeEngineDefaultParametersAPIClient is a client that implements the -// DescribeEngineDefaultParameters operation. -type DescribeEngineDefaultParametersAPIClient interface { - DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) -} - -var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil) - // DescribeEngineDefaultParametersPaginatorOptions is the paginator options for // DescribeEngineDefaultParameters type DescribeEngineDefaultParametersPaginatorOptions struct { @@ -330,6 +325,9 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEngineDefaultParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -352,6 +350,14 @@ func (p *DescribeEngineDefaultParametersPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeEngineDefaultParametersAPIClient is a client that implements the +// DescribeEngineDefaultParameters operation. +type DescribeEngineDefaultParametersAPIClient interface { + DescribeEngineDefaultParameters(context.Context, *DescribeEngineDefaultParametersInput, ...func(*Options)) (*DescribeEngineDefaultParametersOutput, error) +} + +var _ DescribeEngineDefaultParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEngineDefaultParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeEventCategories.go b/service/rds/api_op_DescribeEventCategories.go index d2f2a9b5c88..a553af8ad13 100644 --- a/service/rds/api_op_DescribeEventCategories.go +++ b/service/rds/api_op_DescribeEventCategories.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeEventCategoriesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventCategoriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DescribeEventSubscriptions.go b/service/rds/api_op_DescribeEventSubscriptions.go index c6bd88713bb..c6518b4a8c6 100644 --- a/service/rds/api_op_DescribeEventSubscriptions.go +++ b/service/rds/api_op_DescribeEventSubscriptions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle return nil } -// DescribeEventSubscriptionsAPIClient is a client that implements the -// DescribeEventSubscriptions operation. -type DescribeEventSubscriptionsAPIClient interface { - DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) -} - -var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) - // DescribeEventSubscriptionsPaginatorOptions is the paginator options for // DescribeEventSubscriptions type DescribeEventSubscriptionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeEventSubscriptionsAPIClient is a client that implements the +// DescribeEventSubscriptions operation. +type DescribeEventSubscriptionsAPIClient interface { + DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) +} + +var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeEvents.go b/service/rds/api_op_DescribeEvents.go index a091f458cab..8811bf8bc2a 100644 --- a/service/rds/api_op_DescribeEvents.go +++ b/service/rds/api_op_DescribeEvents.go @@ -196,6 +196,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEventsValidationMiddleware(stack); err != nil { return err } @@ -220,14 +223,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist @@ -297,6 +292,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -316,6 +314,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeExportTasks.go b/service/rds/api_op_DescribeExportTasks.go index 0562e898447..3af4cdcf361 100644 --- a/service/rds/api_op_DescribeExportTasks.go +++ b/service/rds/api_op_DescribeExportTasks.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExportTasksValidationMiddleware(stack); err != nil { return err } @@ -185,14 +188,6 @@ func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.St return nil } -// DescribeExportTasksAPIClient is a client that implements the -// DescribeExportTasks operation. -type DescribeExportTasksAPIClient interface { - DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) -} - -var _ DescribeExportTasksAPIClient = (*Client)(nil) - // DescribeExportTasksPaginatorOptions is the paginator options for // DescribeExportTasks type DescribeExportTasksPaginatorOptions struct { @@ -264,6 +259,9 @@ func (p *DescribeExportTasksPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeExportTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +281,14 @@ func (p *DescribeExportTasksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeExportTasksAPIClient is a client that implements the +// DescribeExportTasks operation. +type DescribeExportTasksAPIClient interface { + DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) +} + +var _ DescribeExportTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeGlobalClusters.go b/service/rds/api_op_DescribeGlobalClusters.go index 1bbc0de73c4..52f79ad79f7 100644 --- a/service/rds/api_op_DescribeGlobalClusters.go +++ b/service/rds/api_op_DescribeGlobalClusters.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGlobalClustersValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeGlobalClustersMiddlewares(stack *middleware return nil } -// DescribeGlobalClustersAPIClient is a client that implements the -// DescribeGlobalClusters operation. -type DescribeGlobalClustersAPIClient interface { - DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error) -} - -var _ DescribeGlobalClustersAPIClient = (*Client)(nil) - // DescribeGlobalClustersPaginatorOptions is the paginator options for // DescribeGlobalClusters type DescribeGlobalClustersPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGlobalClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *DescribeGlobalClustersPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeGlobalClustersAPIClient is a client that implements the +// DescribeGlobalClusters operation. +type DescribeGlobalClustersAPIClient interface { + DescribeGlobalClusters(context.Context, *DescribeGlobalClustersInput, ...func(*Options)) (*DescribeGlobalClustersOutput, error) +} + +var _ DescribeGlobalClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGlobalClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeIntegrations.go b/service/rds/api_op_DescribeIntegrations.go index cb5701677c0..a2676380e12 100644 --- a/service/rds/api_op_DescribeIntegrations.go +++ b/service/rds/api_op_DescribeIntegrations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeIntegrationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIntegrationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeIntegrationsMiddlewares(stack *middleware.S return nil } -// DescribeIntegrationsAPIClient is a client that implements the -// DescribeIntegrations operation. -type DescribeIntegrationsAPIClient interface { - DescribeIntegrations(context.Context, *DescribeIntegrationsInput, ...func(*Options)) (*DescribeIntegrationsOutput, error) -} - -var _ DescribeIntegrationsAPIClient = (*Client)(nil) - // DescribeIntegrationsPaginatorOptions is the paginator options for // DescribeIntegrations type DescribeIntegrationsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeIntegrationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeIntegrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeIntegrationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeIntegrationsAPIClient is a client that implements the +// DescribeIntegrations operation. +type DescribeIntegrationsAPIClient interface { + DescribeIntegrations(context.Context, *DescribeIntegrationsInput, ...func(*Options)) (*DescribeIntegrationsOutput, error) +} + +var _ DescribeIntegrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeIntegrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeOptionGroupOptions.go b/service/rds/api_op_DescribeOptionGroupOptions.go index 61f1ec8cb25..b6dcab7532c 100644 --- a/service/rds/api_op_DescribeOptionGroupOptions.go +++ b/service/rds/api_op_DescribeOptionGroupOptions.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeOptionGroupOptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOptionGroupOptionsValidationMiddleware(stack); err != nil { return err } @@ -184,14 +187,6 @@ func (c *Client) addOperationDescribeOptionGroupOptionsMiddlewares(stack *middle return nil } -// DescribeOptionGroupOptionsAPIClient is a client that implements the -// DescribeOptionGroupOptions operation. -type DescribeOptionGroupOptionsAPIClient interface { - DescribeOptionGroupOptions(context.Context, *DescribeOptionGroupOptionsInput, ...func(*Options)) (*DescribeOptionGroupOptionsOutput, error) -} - -var _ DescribeOptionGroupOptionsAPIClient = (*Client)(nil) - // DescribeOptionGroupOptionsPaginatorOptions is the paginator options for // DescribeOptionGroupOptions type DescribeOptionGroupOptionsPaginatorOptions struct { @@ -264,6 +259,9 @@ func (p *DescribeOptionGroupOptionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOptionGroupOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +281,14 @@ func (p *DescribeOptionGroupOptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeOptionGroupOptionsAPIClient is a client that implements the +// DescribeOptionGroupOptions operation. +type DescribeOptionGroupOptionsAPIClient interface { + DescribeOptionGroupOptions(context.Context, *DescribeOptionGroupOptionsInput, ...func(*Options)) (*DescribeOptionGroupOptionsOutput, error) +} + +var _ DescribeOptionGroupOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOptionGroupOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeOptionGroups.go b/service/rds/api_op_DescribeOptionGroups.go index f76e208e3ef..f7482b311fe 100644 --- a/service/rds/api_op_DescribeOptionGroups.go +++ b/service/rds/api_op_DescribeOptionGroups.go @@ -164,6 +164,9 @@ func (c *Client) addOperationDescribeOptionGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOptionGroupsValidationMiddleware(stack); err != nil { return err } @@ -188,14 +191,6 @@ func (c *Client) addOperationDescribeOptionGroupsMiddlewares(stack *middleware.S return nil } -// DescribeOptionGroupsAPIClient is a client that implements the -// DescribeOptionGroups operation. -type DescribeOptionGroupsAPIClient interface { - DescribeOptionGroups(context.Context, *DescribeOptionGroupsInput, ...func(*Options)) (*DescribeOptionGroupsOutput, error) -} - -var _ DescribeOptionGroupsAPIClient = (*Client)(nil) - // DescribeOptionGroupsPaginatorOptions is the paginator options for // DescribeOptionGroups type DescribeOptionGroupsPaginatorOptions struct { @@ -266,6 +261,9 @@ func (p *DescribeOptionGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOptionGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -285,6 +283,14 @@ func (p *DescribeOptionGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeOptionGroupsAPIClient is a client that implements the +// DescribeOptionGroups operation. +type DescribeOptionGroupsAPIClient interface { + DescribeOptionGroups(context.Context, *DescribeOptionGroupsInput, ...func(*Options)) (*DescribeOptionGroupsOutput, error) +} + +var _ DescribeOptionGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOptionGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go index bdaea7f2f8a..baf951f8eeb 100644 --- a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go @@ -200,6 +200,9 @@ func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrderableDBInstanceOptionsValidationMiddleware(stack); err != nil { return err } @@ -224,14 +227,6 @@ func (c *Client) addOperationDescribeOrderableDBInstanceOptionsMiddlewares(stack return nil } -// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the -// DescribeOrderableDBInstanceOptions operation. -type DescribeOrderableDBInstanceOptionsAPIClient interface { - DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) -} - -var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil) - // DescribeOrderableDBInstanceOptionsPaginatorOptions is the paginator options for // DescribeOrderableDBInstanceOptions type DescribeOrderableDBInstanceOptionsPaginatorOptions struct { @@ -304,6 +299,9 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrderableDBInstanceOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -323,6 +321,14 @@ func (p *DescribeOrderableDBInstanceOptionsPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeOrderableDBInstanceOptionsAPIClient is a client that implements the +// DescribeOrderableDBInstanceOptions operation. +type DescribeOrderableDBInstanceOptionsAPIClient interface { + DescribeOrderableDBInstanceOptions(context.Context, *DescribeOrderableDBInstanceOptionsInput, ...func(*Options)) (*DescribeOrderableDBInstanceOptionsOutput, error) +} + +var _ DescribeOrderableDBInstanceOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrderableDBInstanceOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribePendingMaintenanceActions.go b/service/rds/api_op_DescribePendingMaintenanceActions.go index 56db1bb95eb..92729fe8327 100644 --- a/service/rds/api_op_DescribePendingMaintenanceActions.go +++ b/service/rds/api_op_DescribePendingMaintenanceActions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePendingMaintenanceActionsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribePendingMaintenanceActionsMiddlewares(stack return nil } -// DescribePendingMaintenanceActionsAPIClient is a client that implements the -// DescribePendingMaintenanceActions operation. -type DescribePendingMaintenanceActionsAPIClient interface { - DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) -} - -var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) - // DescribePendingMaintenanceActionsPaginatorOptions is the paginator options for // DescribePendingMaintenanceActions type DescribePendingMaintenanceActionsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePendingMaintenanceActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *DescribePendingMaintenanceActionsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribePendingMaintenanceActionsAPIClient is a client that implements the +// DescribePendingMaintenanceActions operation. +type DescribePendingMaintenanceActionsAPIClient interface { + DescribePendingMaintenanceActions(context.Context, *DescribePendingMaintenanceActionsInput, ...func(*Options)) (*DescribePendingMaintenanceActionsOutput, error) +} + +var _ DescribePendingMaintenanceActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePendingMaintenanceActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeReservedDBInstances.go b/service/rds/api_op_DescribeReservedDBInstances.go index 9931e55e11b..340292dd6fa 100644 --- a/service/rds/api_op_DescribeReservedDBInstances.go +++ b/service/rds/api_op_DescribeReservedDBInstances.go @@ -164,6 +164,9 @@ func (c *Client) addOperationDescribeReservedDBInstancesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReservedDBInstancesValidationMiddleware(stack); err != nil { return err } @@ -188,14 +191,6 @@ func (c *Client) addOperationDescribeReservedDBInstancesMiddlewares(stack *middl return nil } -// DescribeReservedDBInstancesAPIClient is a client that implements the -// DescribeReservedDBInstances operation. -type DescribeReservedDBInstancesAPIClient interface { - DescribeReservedDBInstances(context.Context, *DescribeReservedDBInstancesInput, ...func(*Options)) (*DescribeReservedDBInstancesOutput, error) -} - -var _ DescribeReservedDBInstancesAPIClient = (*Client)(nil) - // DescribeReservedDBInstancesPaginatorOptions is the paginator options for // DescribeReservedDBInstances type DescribeReservedDBInstancesPaginatorOptions struct { @@ -268,6 +263,9 @@ func (p *DescribeReservedDBInstancesPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedDBInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -287,6 +285,14 @@ func (p *DescribeReservedDBInstancesPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeReservedDBInstancesAPIClient is a client that implements the +// DescribeReservedDBInstances operation. +type DescribeReservedDBInstancesAPIClient interface { + DescribeReservedDBInstances(context.Context, *DescribeReservedDBInstancesInput, ...func(*Options)) (*DescribeReservedDBInstancesOutput, error) +} + +var _ DescribeReservedDBInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedDBInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeReservedDBInstancesOfferings.go b/service/rds/api_op_DescribeReservedDBInstancesOfferings.go index 7f9f1490bab..c045fe7c769 100644 --- a/service/rds/api_op_DescribeReservedDBInstancesOfferings.go +++ b/service/rds/api_op_DescribeReservedDBInstancesOfferings.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeReservedDBInstancesOfferingsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReservedDBInstancesOfferingsValidationMiddleware(stack); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationDescribeReservedDBInstancesOfferingsMiddlewares(sta return nil } -// DescribeReservedDBInstancesOfferingsAPIClient is a client that implements the -// DescribeReservedDBInstancesOfferings operation. -type DescribeReservedDBInstancesOfferingsAPIClient interface { - DescribeReservedDBInstancesOfferings(context.Context, *DescribeReservedDBInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedDBInstancesOfferingsOutput, error) -} - -var _ DescribeReservedDBInstancesOfferingsAPIClient = (*Client)(nil) - // DescribeReservedDBInstancesOfferingsPaginatorOptions is the paginator options // for DescribeReservedDBInstancesOfferings type DescribeReservedDBInstancesOfferingsPaginatorOptions struct { @@ -260,6 +255,9 @@ func (p *DescribeReservedDBInstancesOfferingsPaginator) NextPage(ctx context.Con } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedDBInstancesOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -279,6 +277,14 @@ func (p *DescribeReservedDBInstancesOfferingsPaginator) NextPage(ctx context.Con return result, nil } +// DescribeReservedDBInstancesOfferingsAPIClient is a client that implements the +// DescribeReservedDBInstancesOfferings operation. +type DescribeReservedDBInstancesOfferingsAPIClient interface { + DescribeReservedDBInstancesOfferings(context.Context, *DescribeReservedDBInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedDBInstancesOfferingsOutput, error) +} + +var _ DescribeReservedDBInstancesOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedDBInstancesOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeSourceRegions.go b/service/rds/api_op_DescribeSourceRegions.go index 4c3986611d3..c89a6d98f41 100644 --- a/service/rds/api_op_DescribeSourceRegions.go +++ b/service/rds/api_op_DescribeSourceRegions.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeSourceRegionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSourceRegionsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeSourceRegionsMiddlewares(stack *middleware. return nil } -// DescribeSourceRegionsAPIClient is a client that implements the -// DescribeSourceRegions operation. -type DescribeSourceRegionsAPIClient interface { - DescribeSourceRegions(context.Context, *DescribeSourceRegionsInput, ...func(*Options)) (*DescribeSourceRegionsOutput, error) -} - -var _ DescribeSourceRegionsAPIClient = (*Client)(nil) - // DescribeSourceRegionsPaginatorOptions is the paginator options for // DescribeSourceRegions type DescribeSourceRegionsPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *DescribeSourceRegionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSourceRegions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *DescribeSourceRegionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeSourceRegionsAPIClient is a client that implements the +// DescribeSourceRegions operation. +type DescribeSourceRegionsAPIClient interface { + DescribeSourceRegions(context.Context, *DescribeSourceRegionsInput, ...func(*Options)) (*DescribeSourceRegionsOutput, error) +} + +var _ DescribeSourceRegionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSourceRegions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeTenantDatabases.go b/service/rds/api_op_DescribeTenantDatabases.go index 63df5562f27..b0b8d2780c1 100644 --- a/service/rds/api_op_DescribeTenantDatabases.go +++ b/service/rds/api_op_DescribeTenantDatabases.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeTenantDatabasesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTenantDatabasesValidationMiddleware(stack); err != nil { return err } @@ -172,100 +175,6 @@ func (c *Client) addOperationDescribeTenantDatabasesMiddlewares(stack *middlewar return nil } -// DescribeTenantDatabasesAPIClient is a client that implements the -// DescribeTenantDatabases operation. -type DescribeTenantDatabasesAPIClient interface { - DescribeTenantDatabases(context.Context, *DescribeTenantDatabasesInput, ...func(*Options)) (*DescribeTenantDatabasesOutput, error) -} - -var _ DescribeTenantDatabasesAPIClient = (*Client)(nil) - -// DescribeTenantDatabasesPaginatorOptions is the paginator options for -// DescribeTenantDatabases -type DescribeTenantDatabasesPaginatorOptions struct { - // The maximum number of records to include in the response. If more records exist - // than the specified MaxRecords value, a pagination token called a marker is - // included in the response so that you can retrieve the remaining results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTenantDatabasesPaginator is a paginator for DescribeTenantDatabases -type DescribeTenantDatabasesPaginator struct { - options DescribeTenantDatabasesPaginatorOptions - client DescribeTenantDatabasesAPIClient - params *DescribeTenantDatabasesInput - nextToken *string - firstPage bool -} - -// NewDescribeTenantDatabasesPaginator returns a new -// DescribeTenantDatabasesPaginator -func NewDescribeTenantDatabasesPaginator(client DescribeTenantDatabasesAPIClient, params *DescribeTenantDatabasesInput, optFns ...func(*DescribeTenantDatabasesPaginatorOptions)) *DescribeTenantDatabasesPaginator { - if params == nil { - params = &DescribeTenantDatabasesInput{} - } - - options := DescribeTenantDatabasesPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTenantDatabasesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTenantDatabasesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTenantDatabases page. -func (p *DescribeTenantDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTenantDatabasesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeTenantDatabases(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // TenantDatabaseAvailableWaiterOptions are waiter options for // TenantDatabaseAvailableWaiter type TenantDatabaseAvailableWaiterOptions struct { @@ -383,7 +292,13 @@ func (w *TenantDatabaseAvailableWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeTenantDatabases(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -645,7 +560,13 @@ func (w *TenantDatabaseDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeTenantDatabases(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -714,6 +635,103 @@ func tenantDatabaseDeletedStateRetryable(ctx context.Context, input *DescribeTen return true, nil } +// DescribeTenantDatabasesPaginatorOptions is the paginator options for +// DescribeTenantDatabases +type DescribeTenantDatabasesPaginatorOptions struct { + // The maximum number of records to include in the response. If more records exist + // than the specified MaxRecords value, a pagination token called a marker is + // included in the response so that you can retrieve the remaining results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeTenantDatabasesPaginator is a paginator for DescribeTenantDatabases +type DescribeTenantDatabasesPaginator struct { + options DescribeTenantDatabasesPaginatorOptions + client DescribeTenantDatabasesAPIClient + params *DescribeTenantDatabasesInput + nextToken *string + firstPage bool +} + +// NewDescribeTenantDatabasesPaginator returns a new +// DescribeTenantDatabasesPaginator +func NewDescribeTenantDatabasesPaginator(client DescribeTenantDatabasesAPIClient, params *DescribeTenantDatabasesInput, optFns ...func(*DescribeTenantDatabasesPaginatorOptions)) *DescribeTenantDatabasesPaginator { + if params == nil { + params = &DescribeTenantDatabasesInput{} + } + + options := DescribeTenantDatabasesPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeTenantDatabasesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeTenantDatabasesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeTenantDatabases page. +func (p *DescribeTenantDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTenantDatabasesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeTenantDatabases(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeTenantDatabasesAPIClient is a client that implements the +// DescribeTenantDatabases operation. +type DescribeTenantDatabasesAPIClient interface { + DescribeTenantDatabases(context.Context, *DescribeTenantDatabasesInput, ...func(*Options)) (*DescribeTenantDatabasesOutput, error) +} + +var _ DescribeTenantDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTenantDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_DescribeValidDBInstanceModifications.go b/service/rds/api_op_DescribeValidDBInstanceModifications.go index cc64c1f618c..27f0b02501c 100644 --- a/service/rds/api_op_DescribeValidDBInstanceModifications.go +++ b/service/rds/api_op_DescribeValidDBInstanceModifications.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeValidDBInstanceModificationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeValidDBInstanceModificationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DisableHttpEndpoint.go b/service/rds/api_op_DisableHttpEndpoint.go index 735a7b179e2..acc6a8ba54d 100644 --- a/service/rds/api_op_DisableHttpEndpoint.go +++ b/service/rds/api_op_DisableHttpEndpoint.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisableHttpEndpointMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableHttpEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_DownloadDBLogFilePortion.go b/service/rds/api_op_DownloadDBLogFilePortion.go index 4363ad1081d..1ef38e10c1a 100644 --- a/service/rds/api_op_DownloadDBLogFilePortion.go +++ b/service/rds/api_op_DownloadDBLogFilePortion.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDownloadDBLogFilePortionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDownloadDBLogFilePortionValidationMiddleware(stack); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationDownloadDBLogFilePortionMiddlewares(stack *middlewa return nil } -// DownloadDBLogFilePortionAPIClient is a client that implements the -// DownloadDBLogFilePortion operation. -type DownloadDBLogFilePortionAPIClient interface { - DownloadDBLogFilePortion(context.Context, *DownloadDBLogFilePortionInput, ...func(*Options)) (*DownloadDBLogFilePortionOutput, error) -} - -var _ DownloadDBLogFilePortionAPIClient = (*Client)(nil) - // DownloadDBLogFilePortionPaginatorOptions is the paginator options for // DownloadDBLogFilePortion type DownloadDBLogFilePortionPaginatorOptions struct { @@ -271,6 +266,9 @@ func (p *DownloadDBLogFilePortionPaginator) NextPage(ctx context.Context, optFns } params.NumberOfLines = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DownloadDBLogFilePortion(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *DownloadDBLogFilePortionPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DownloadDBLogFilePortionAPIClient is a client that implements the +// DownloadDBLogFilePortion operation. +type DownloadDBLogFilePortionAPIClient interface { + DownloadDBLogFilePortion(context.Context, *DownloadDBLogFilePortionInput, ...func(*Options)) (*DownloadDBLogFilePortionOutput, error) +} + +var _ DownloadDBLogFilePortionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDownloadDBLogFilePortion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rds/api_op_EnableHttpEndpoint.go b/service/rds/api_op_EnableHttpEndpoint.go index b8bebd83489..ea37887fdf1 100644 --- a/service/rds/api_op_EnableHttpEndpoint.go +++ b/service/rds/api_op_EnableHttpEndpoint.go @@ -121,6 +121,9 @@ func (c *Client) addOperationEnableHttpEndpointMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableHttpEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_FailoverDBCluster.go b/service/rds/api_op_FailoverDBCluster.go index 6affa162d28..6efeb334f92 100644 --- a/service/rds/api_op_FailoverDBCluster.go +++ b/service/rds/api_op_FailoverDBCluster.go @@ -167,6 +167,9 @@ func (c *Client) addOperationFailoverDBClusterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFailoverDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_FailoverGlobalCluster.go b/service/rds/api_op_FailoverGlobalCluster.go index 3deab18cb6d..88d0264a3a3 100644 --- a/service/rds/api_op_FailoverGlobalCluster.go +++ b/service/rds/api_op_FailoverGlobalCluster.go @@ -183,6 +183,9 @@ func (c *Client) addOperationFailoverGlobalClusterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFailoverGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ListTagsForResource.go b/service/rds/api_op_ListTagsForResource.go index f2c704055d7..f46182d581d 100644 --- a/service/rds/api_op_ListTagsForResource.go +++ b/service/rds/api_op_ListTagsForResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyActivityStream.go b/service/rds/api_op_ModifyActivityStream.go index c640ad5662d..a91b0bcf5b6 100644 --- a/service/rds/api_op_ModifyActivityStream.go +++ b/service/rds/api_op_ModifyActivityStream.go @@ -138,6 +138,9 @@ func (c *Client) addOperationModifyActivityStreamMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyActivityStream(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_ModifyCertificates.go b/service/rds/api_op_ModifyCertificates.go index b57bf068575..e542ed6a2bd 100644 --- a/service/rds/api_op_ModifyCertificates.go +++ b/service/rds/api_op_ModifyCertificates.go @@ -143,6 +143,9 @@ func (c *Client) addOperationModifyCertificatesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCertificates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_ModifyCurrentDBClusterCapacity.go b/service/rds/api_op_ModifyCurrentDBClusterCapacity.go index 05dbea0c570..8b7f8430f55 100644 --- a/service/rds/api_op_ModifyCurrentDBClusterCapacity.go +++ b/service/rds/api_op_ModifyCurrentDBClusterCapacity.go @@ -177,6 +177,9 @@ func (c *Client) addOperationModifyCurrentDBClusterCapacityMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCurrentDBClusterCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyCustomDBEngineVersion.go b/service/rds/api_op_ModifyCustomDBEngineVersion.go index 85736136312..e9a9e214f6c 100644 --- a/service/rds/api_op_ModifyCustomDBEngineVersion.go +++ b/service/rds/api_op_ModifyCustomDBEngineVersion.go @@ -299,6 +299,9 @@ func (c *Client) addOperationModifyCustomDBEngineVersionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCustomDBEngineVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBCluster.go b/service/rds/api_op_ModifyDBCluster.go index cec2397640a..d09f478a291 100644 --- a/service/rds/api_op_ModifyDBCluster.go +++ b/service/rds/api_op_ModifyDBCluster.go @@ -728,6 +728,9 @@ func (c *Client) addOperationModifyDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBClusterEndpoint.go b/service/rds/api_op_ModifyDBClusterEndpoint.go index ca0e023411e..1caa155af40 100644 --- a/service/rds/api_op_ModifyDBClusterEndpoint.go +++ b/service/rds/api_op_ModifyDBClusterEndpoint.go @@ -168,6 +168,9 @@ func (c *Client) addOperationModifyDBClusterEndpointMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBClusterParameterGroup.go b/service/rds/api_op_ModifyDBClusterParameterGroup.go index cb0d0154807..eabe12f7d80 100644 --- a/service/rds/api_op_ModifyDBClusterParameterGroup.go +++ b/service/rds/api_op_ModifyDBClusterParameterGroup.go @@ -161,6 +161,9 @@ func (c *Client) addOperationModifyDBClusterParameterGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go b/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go index b6e45322a02..85324a34c0f 100644 --- a/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go +++ b/service/rds/api_op_ModifyDBClusterSnapshotAttribute.go @@ -166,6 +166,9 @@ func (c *Client) addOperationModifyDBClusterSnapshotAttributeMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBInstance.go b/service/rds/api_op_ModifyDBInstance.go index 9a2585b42cd..d2c74233449 100644 --- a/service/rds/api_op_ModifyDBInstance.go +++ b/service/rds/api_op_ModifyDBInstance.go @@ -1050,6 +1050,9 @@ func (c *Client) addOperationModifyDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBParameterGroup.go b/service/rds/api_op_ModifyDBParameterGroup.go index 6de7ed74fca..7197a3d25fe 100644 --- a/service/rds/api_op_ModifyDBParameterGroup.go +++ b/service/rds/api_op_ModifyDBParameterGroup.go @@ -154,6 +154,9 @@ func (c *Client) addOperationModifyDBParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBProxy.go b/service/rds/api_op_ModifyDBProxy.go index 9567162390b..6de56d92433 100644 --- a/service/rds/api_op_ModifyDBProxy.go +++ b/service/rds/api_op_ModifyDBProxy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationModifyDBProxyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBProxyValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBProxyEndpoint.go b/service/rds/api_op_ModifyDBProxyEndpoint.go index 4963a910552..87e0a886c88 100644 --- a/service/rds/api_op_ModifyDBProxyEndpoint.go +++ b/service/rds/api_op_ModifyDBProxyEndpoint.go @@ -118,6 +118,9 @@ func (c *Client) addOperationModifyDBProxyEndpointMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBProxyEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBProxyTargetGroup.go b/service/rds/api_op_ModifyDBProxyTargetGroup.go index 0e6340b0e06..81c2e7fa627 100644 --- a/service/rds/api_op_ModifyDBProxyTargetGroup.go +++ b/service/rds/api_op_ModifyDBProxyTargetGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationModifyDBProxyTargetGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBProxyTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBRecommendation.go b/service/rds/api_op_ModifyDBRecommendation.go index a83d81f74d5..89e24f4c6ec 100644 --- a/service/rds/api_op_ModifyDBRecommendation.go +++ b/service/rds/api_op_ModifyDBRecommendation.go @@ -123,6 +123,9 @@ func (c *Client) addOperationModifyDBRecommendationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBShardGroup.go b/service/rds/api_op_ModifyDBShardGroup.go index c069ab04a38..776a477a7aa 100644 --- a/service/rds/api_op_ModifyDBShardGroup.go +++ b/service/rds/api_op_ModifyDBShardGroup.go @@ -156,6 +156,9 @@ func (c *Client) addOperationModifyDBShardGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBShardGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBSnapshot.go b/service/rds/api_op_ModifyDBSnapshot.go index c1755ae0754..1db6d97d1a7 100644 --- a/service/rds/api_op_ModifyDBSnapshot.go +++ b/service/rds/api_op_ModifyDBSnapshot.go @@ -152,6 +152,9 @@ func (c *Client) addOperationModifyDBSnapshotMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBSnapshotAttribute.go b/service/rds/api_op_ModifyDBSnapshotAttribute.go index d02c6efaa9b..dea1094ec88 100644 --- a/service/rds/api_op_ModifyDBSnapshotAttribute.go +++ b/service/rds/api_op_ModifyDBSnapshotAttribute.go @@ -162,6 +162,9 @@ func (c *Client) addOperationModifyDBSnapshotAttributeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBSnapshotAttributeValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyDBSubnetGroup.go b/service/rds/api_op_ModifyDBSubnetGroup.go index a1e2a308c10..0b59aaf5655 100644 --- a/service/rds/api_op_ModifyDBSubnetGroup.go +++ b/service/rds/api_op_ModifyDBSubnetGroup.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyDBSubnetGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDBSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyEventSubscription.go b/service/rds/api_op_ModifyEventSubscription.go index a1d584f4053..1bf5bddff87 100644 --- a/service/rds/api_op_ModifyEventSubscription.go +++ b/service/rds/api_op_ModifyEventSubscription.go @@ -140,6 +140,9 @@ func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyGlobalCluster.go b/service/rds/api_op_ModifyGlobalCluster.go index 5d0b004978a..39c7b9d3d34 100644 --- a/service/rds/api_op_ModifyGlobalCluster.go +++ b/service/rds/api_op_ModifyGlobalCluster.go @@ -161,6 +161,9 @@ func (c *Client) addOperationModifyGlobalClusterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyGlobalCluster(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_ModifyIntegration.go b/service/rds/api_op_ModifyIntegration.go index 7d52b35911c..e10165eb9e9 100644 --- a/service/rds/api_op_ModifyIntegration.go +++ b/service/rds/api_op_ModifyIntegration.go @@ -164,6 +164,9 @@ func (c *Client) addOperationModifyIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyIntegrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyOptionGroup.go b/service/rds/api_op_ModifyOptionGroup.go index dfc14268556..9d8dbee8ae0 100644 --- a/service/rds/api_op_ModifyOptionGroup.go +++ b/service/rds/api_op_ModifyOptionGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationModifyOptionGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyOptionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ModifyTenantDatabase.go b/service/rds/api_op_ModifyTenantDatabase.go index a279f83d228..852c7c6b35f 100644 --- a/service/rds/api_op_ModifyTenantDatabase.go +++ b/service/rds/api_op_ModifyTenantDatabase.go @@ -151,6 +151,9 @@ func (c *Client) addOperationModifyTenantDatabaseMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyTenantDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_PromoteReadReplica.go b/service/rds/api_op_PromoteReadReplica.go index 384728aac99..613b3f4d3db 100644 --- a/service/rds/api_op_PromoteReadReplica.go +++ b/service/rds/api_op_PromoteReadReplica.go @@ -162,6 +162,9 @@ func (c *Client) addOperationPromoteReadReplicaMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPromoteReadReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_PromoteReadReplicaDBCluster.go b/service/rds/api_op_PromoteReadReplicaDBCluster.go index 69560abf01b..14d12abb7ec 100644 --- a/service/rds/api_op_PromoteReadReplicaDBCluster.go +++ b/service/rds/api_op_PromoteReadReplicaDBCluster.go @@ -133,6 +133,9 @@ func (c *Client) addOperationPromoteReadReplicaDBClusterMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPromoteReadReplicaDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_PurchaseReservedDBInstancesOffering.go b/service/rds/api_op_PurchaseReservedDBInstancesOffering.go index 7de5fbd1be4..7d3b8f7a14e 100644 --- a/service/rds/api_op_PurchaseReservedDBInstancesOffering.go +++ b/service/rds/api_op_PurchaseReservedDBInstancesOffering.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPurchaseReservedDBInstancesOfferingMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedDBInstancesOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RebootDBCluster.go b/service/rds/api_op_RebootDBCluster.go index ca635921729..75c402af859 100644 --- a/service/rds/api_op_RebootDBCluster.go +++ b/service/rds/api_op_RebootDBCluster.go @@ -144,6 +144,9 @@ func (c *Client) addOperationRebootDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RebootDBInstance.go b/service/rds/api_op_RebootDBInstance.go index 0d35bd11705..e4ab7db794a 100644 --- a/service/rds/api_op_RebootDBInstance.go +++ b/service/rds/api_op_RebootDBInstance.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRebootDBInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RebootDBShardGroup.go b/service/rds/api_op_RebootDBShardGroup.go index 3f5b10a3b0f..f6ded15288d 100644 --- a/service/rds/api_op_RebootDBShardGroup.go +++ b/service/rds/api_op_RebootDBShardGroup.go @@ -155,6 +155,9 @@ func (c *Client) addOperationRebootDBShardGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootDBShardGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RegisterDBProxyTargets.go b/service/rds/api_op_RegisterDBProxyTargets.go index de31dceb852..36600dc852b 100644 --- a/service/rds/api_op_RegisterDBProxyTargets.go +++ b/service/rds/api_op_RegisterDBProxyTargets.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRegisterDBProxyTargetsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDBProxyTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RemoveFromGlobalCluster.go b/service/rds/api_op_RemoveFromGlobalCluster.go index efe30129893..d2440b02f88 100644 --- a/service/rds/api_op_RemoveFromGlobalCluster.go +++ b/service/rds/api_op_RemoveFromGlobalCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRemoveFromGlobalClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveFromGlobalCluster(options.Region), middleware.Before); err != nil { return err } diff --git a/service/rds/api_op_RemoveRoleFromDBCluster.go b/service/rds/api_op_RemoveRoleFromDBCluster.go index 755811f613c..67aa2f48065 100644 --- a/service/rds/api_op_RemoveRoleFromDBCluster.go +++ b/service/rds/api_op_RemoveRoleFromDBCluster.go @@ -121,6 +121,9 @@ func (c *Client) addOperationRemoveRoleFromDBClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRoleFromDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RemoveRoleFromDBInstance.go b/service/rds/api_op_RemoveRoleFromDBInstance.go index 961dcb19a42..01448e8400d 100644 --- a/service/rds/api_op_RemoveRoleFromDBInstance.go +++ b/service/rds/api_op_RemoveRoleFromDBInstance.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRemoveRoleFromDBInstanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRoleFromDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go b/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go index f8c50f3a20a..867a0e7e1df 100644 --- a/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go +++ b/service/rds/api_op_RemoveSourceIdentifierFromSubscription.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RemoveTagsFromResource.go b/service/rds/api_op_RemoveTagsFromResource.go index 21950163d16..44a57beb2d9 100644 --- a/service/rds/api_op_RemoveTagsFromResource.go +++ b/service/rds/api_op_RemoveTagsFromResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ResetDBClusterParameterGroup.go b/service/rds/api_op_ResetDBClusterParameterGroup.go index dde988018fe..95611fc6b74 100644 --- a/service/rds/api_op_ResetDBClusterParameterGroup.go +++ b/service/rds/api_op_ResetDBClusterParameterGroup.go @@ -144,6 +144,9 @@ func (c *Client) addOperationResetDBClusterParameterGroupMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_ResetDBParameterGroup.go b/service/rds/api_op_ResetDBParameterGroup.go index 3cc02532211..5cd17cbba54 100644 --- a/service/rds/api_op_ResetDBParameterGroup.go +++ b/service/rds/api_op_ResetDBParameterGroup.go @@ -149,6 +149,9 @@ func (c *Client) addOperationResetDBParameterGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetDBParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RestoreDBClusterFromS3.go b/service/rds/api_op_RestoreDBClusterFromS3.go index 0eee9825494..dce9e0aaec3 100644 --- a/service/rds/api_op_RestoreDBClusterFromS3.go +++ b/service/rds/api_op_RestoreDBClusterFromS3.go @@ -496,6 +496,9 @@ func (c *Client) addOperationRestoreDBClusterFromS3Middlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterFromS3ValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RestoreDBClusterFromSnapshot.go b/service/rds/api_op_RestoreDBClusterFromSnapshot.go index 0fd17b96008..ac83a7aa88b 100644 --- a/service/rds/api_op_RestoreDBClusterFromSnapshot.go +++ b/service/rds/api_op_RestoreDBClusterFromSnapshot.go @@ -551,6 +551,9 @@ func (c *Client) addOperationRestoreDBClusterFromSnapshotMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RestoreDBClusterToPointInTime.go b/service/rds/api_op_RestoreDBClusterToPointInTime.go index e7709906f35..68a150386e8 100644 --- a/service/rds/api_op_RestoreDBClusterToPointInTime.go +++ b/service/rds/api_op_RestoreDBClusterToPointInTime.go @@ -523,6 +523,9 @@ func (c *Client) addOperationRestoreDBClusterToPointInTimeMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go index 5b4977c6633..818f37372ba 100644 --- a/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go +++ b/service/rds/api_op_RestoreDBInstanceFromDBSnapshot.go @@ -619,6 +619,9 @@ func (c *Client) addOperationRestoreDBInstanceFromDBSnapshotMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBInstanceFromDBSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RestoreDBInstanceFromS3.go b/service/rds/api_op_RestoreDBInstanceFromS3.go index 10b2dc8a6b8..dc95fd57a05 100644 --- a/service/rds/api_op_RestoreDBInstanceFromS3.go +++ b/service/rds/api_op_RestoreDBInstanceFromS3.go @@ -595,6 +595,9 @@ func (c *Client) addOperationRestoreDBInstanceFromS3Middlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBInstanceFromS3ValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RestoreDBInstanceToPointInTime.go b/service/rds/api_op_RestoreDBInstanceToPointInTime.go index a9294afc023..36c9686fc0b 100644 --- a/service/rds/api_op_RestoreDBInstanceToPointInTime.go +++ b/service/rds/api_op_RestoreDBInstanceToPointInTime.go @@ -633,6 +633,9 @@ func (c *Client) addOperationRestoreDBInstanceToPointInTimeMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDBInstanceToPointInTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_RevokeDBSecurityGroupIngress.go b/service/rds/api_op_RevokeDBSecurityGroupIngress.go index 14a0c7424a0..4860ded4626 100644 --- a/service/rds/api_op_RevokeDBSecurityGroupIngress.go +++ b/service/rds/api_op_RevokeDBSecurityGroupIngress.go @@ -143,6 +143,9 @@ func (c *Client) addOperationRevokeDBSecurityGroupIngressMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeDBSecurityGroupIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StartActivityStream.go b/service/rds/api_op_StartActivityStream.go index 81500fbab09..d7d0523b2fe 100644 --- a/service/rds/api_op_StartActivityStream.go +++ b/service/rds/api_op_StartActivityStream.go @@ -154,6 +154,9 @@ func (c *Client) addOperationStartActivityStreamMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartActivityStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StartDBCluster.go b/service/rds/api_op_StartDBCluster.go index ab2aa8feb85..09939470438 100644 --- a/service/rds/api_op_StartDBCluster.go +++ b/service/rds/api_op_StartDBCluster.go @@ -135,6 +135,9 @@ func (c *Client) addOperationStartDBClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StartDBInstance.go b/service/rds/api_op_StartDBInstance.go index b1eec834b84..e9b23eb1660 100644 --- a/service/rds/api_op_StartDBInstance.go +++ b/service/rds/api_op_StartDBInstance.go @@ -120,6 +120,9 @@ func (c *Client) addOperationStartDBInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StartDBInstanceAutomatedBackupsReplication.go b/service/rds/api_op_StartDBInstanceAutomatedBackupsReplication.go index c5ec9452313..4fb7b98a7aa 100644 --- a/service/rds/api_op_StartDBInstanceAutomatedBackupsReplication.go +++ b/service/rds/api_op_StartDBInstanceAutomatedBackupsReplication.go @@ -147,6 +147,9 @@ func (c *Client) addOperationStartDBInstanceAutomatedBackupsReplicationMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDBInstanceAutomatedBackupsReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StartExportTask.go b/service/rds/api_op_StartExportTask.go index 944fda3b629..4202c748949 100644 --- a/service/rds/api_op_StartExportTask.go +++ b/service/rds/api_op_StartExportTask.go @@ -289,6 +289,9 @@ func (c *Client) addOperationStartExportTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExportTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StopActivityStream.go b/service/rds/api_op_StopActivityStream.go index 7f31f8a6f68..1c60c7198a5 100644 --- a/service/rds/api_op_StopActivityStream.go +++ b/service/rds/api_op_StopActivityStream.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStopActivityStreamMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopActivityStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StopDBCluster.go b/service/rds/api_op_StopDBCluster.go index 53984ee4ad5..fd990df3f2c 100644 --- a/service/rds/api_op_StopDBCluster.go +++ b/service/rds/api_op_StopDBCluster.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStopDBClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDBClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StopDBInstance.go b/service/rds/api_op_StopDBInstance.go index 421e261d965..7e2e41dccb6 100644 --- a/service/rds/api_op_StopDBInstance.go +++ b/service/rds/api_op_StopDBInstance.go @@ -126,6 +126,9 @@ func (c *Client) addOperationStopDBInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDBInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go b/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go index 9b993070f4d..075d0c58e24 100644 --- a/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go +++ b/service/rds/api_op_StopDBInstanceAutomatedBackupsReplication.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStopDBInstanceAutomatedBackupsReplicationMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDBInstanceAutomatedBackupsReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_SwitchoverBlueGreenDeployment.go b/service/rds/api_op_SwitchoverBlueGreenDeployment.go index 99eafb16b73..5084296de50 100644 --- a/service/rds/api_op_SwitchoverBlueGreenDeployment.go +++ b/service/rds/api_op_SwitchoverBlueGreenDeployment.go @@ -132,6 +132,9 @@ func (c *Client) addOperationSwitchoverBlueGreenDeploymentMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSwitchoverBlueGreenDeploymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_SwitchoverGlobalCluster.go b/service/rds/api_op_SwitchoverGlobalCluster.go index a91be9118f0..cb23bdea4fe 100644 --- a/service/rds/api_op_SwitchoverGlobalCluster.go +++ b/service/rds/api_op_SwitchoverGlobalCluster.go @@ -138,6 +138,9 @@ func (c *Client) addOperationSwitchoverGlobalClusterMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSwitchoverGlobalClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/rds/api_op_SwitchoverReadReplica.go b/service/rds/api_op_SwitchoverReadReplica.go index ef5c6d9ec0c..4b136fde74e 100644 --- a/service/rds/api_op_SwitchoverReadReplica.go +++ b/service/rds/api_op_SwitchoverReadReplica.go @@ -119,6 +119,9 @@ func (c *Client) addOperationSwitchoverReadReplicaMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSwitchoverReadReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/rdsdata/api_client.go b/service/rdsdata/api_client.go index c06cb2422a7..debdb46adc0 100644 --- a/service/rdsdata/api_client.go +++ b/service/rdsdata/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/rdsdata/api_op_BatchExecuteStatement.go b/service/rdsdata/api_op_BatchExecuteStatement.go index a002be2f59a..f23784b9a02 100644 --- a/service/rdsdata/api_op_BatchExecuteStatement.go +++ b/service/rdsdata/api_op_BatchExecuteStatement.go @@ -175,6 +175,9 @@ func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchExecuteStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/rdsdata/api_op_BeginTransaction.go b/service/rdsdata/api_op_BeginTransaction.go index b471a1617ee..44f7e037754 100644 --- a/service/rdsdata/api_op_BeginTransaction.go +++ b/service/rdsdata/api_op_BeginTransaction.go @@ -130,6 +130,9 @@ func (c *Client) addOperationBeginTransactionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBeginTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rdsdata/api_op_CommitTransaction.go b/service/rdsdata/api_op_CommitTransaction.go index bfdf4e1b684..d09ab455c65 100644 --- a/service/rdsdata/api_op_CommitTransaction.go +++ b/service/rdsdata/api_op_CommitTransaction.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCommitTransactionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCommitTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rdsdata/api_op_ExecuteSql.go b/service/rdsdata/api_op_ExecuteSql.go index 13c7302912d..88a87d774a3 100644 --- a/service/rdsdata/api_op_ExecuteSql.go +++ b/service/rdsdata/api_op_ExecuteSql.go @@ -143,6 +143,9 @@ func (c *Client) addOperationExecuteSqlMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteSqlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rdsdata/api_op_ExecuteStatement.go b/service/rdsdata/api_op_ExecuteStatement.go index 216cdd10fcc..d05bb85d245 100644 --- a/service/rdsdata/api_op_ExecuteStatement.go +++ b/service/rdsdata/api_op_ExecuteStatement.go @@ -202,6 +202,9 @@ func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExecuteStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/rdsdata/api_op_RollbackTransaction.go b/service/rdsdata/api_op_RollbackTransaction.go index bf79d5ce56d..bc2ec7411e8 100644 --- a/service/rdsdata/api_op_RollbackTransaction.go +++ b/service/rdsdata/api_op_RollbackTransaction.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRollbackTransactionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRollbackTransactionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_client.go b/service/redshift/api_client.go index b616ce9be99..4714b05bfbd 100644 --- a/service/redshift/api_client.go +++ b/service/redshift/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/redshift/api_op_AcceptReservedNodeExchange.go b/service/redshift/api_op_AcceptReservedNodeExchange.go index 69c03b7107d..21b2057c713 100644 --- a/service/redshift/api_op_AcceptReservedNodeExchange.go +++ b/service/redshift/api_op_AcceptReservedNodeExchange.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAcceptReservedNodeExchangeMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptReservedNodeExchangeValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_AddPartner.go b/service/redshift/api_op_AddPartner.go index 3011a8a5e6b..ee9d17966ab 100644 --- a/service/redshift/api_op_AddPartner.go +++ b/service/redshift/api_op_AddPartner.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAddPartnerMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddPartnerValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_AssociateDataShareConsumer.go b/service/redshift/api_op_AssociateDataShareConsumer.go index ad413da1ed4..5b474042f6f 100644 --- a/service/redshift/api_op_AssociateDataShareConsumer.go +++ b/service/redshift/api_op_AssociateDataShareConsumer.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAssociateDataShareConsumerMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDataShareConsumerValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go b/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go index e119892ada5..3d5850c727d 100644 --- a/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go +++ b/service/redshift/api_op_AuthorizeClusterSecurityGroupIngress.go @@ -139,6 +139,9 @@ func (c *Client) addOperationAuthorizeClusterSecurityGroupIngressMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeClusterSecurityGroupIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_AuthorizeDataShare.go b/service/redshift/api_op_AuthorizeDataShare.go index b2552b34f8c..4666ab2f014 100644 --- a/service/redshift/api_op_AuthorizeDataShare.go +++ b/service/redshift/api_op_AuthorizeDataShare.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAuthorizeDataShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeDataShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_AuthorizeEndpointAccess.go b/service/redshift/api_op_AuthorizeEndpointAccess.go index 5f708fcf6e5..748b9542938 100644 --- a/service/redshift/api_op_AuthorizeEndpointAccess.go +++ b/service/redshift/api_op_AuthorizeEndpointAccess.go @@ -140,6 +140,9 @@ func (c *Client) addOperationAuthorizeEndpointAccessMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_AuthorizeSnapshotAccess.go b/service/redshift/api_op_AuthorizeSnapshotAccess.go index 22e6f657efd..a0e06eedfad 100644 --- a/service/redshift/api_op_AuthorizeSnapshotAccess.go +++ b/service/redshift/api_op_AuthorizeSnapshotAccess.go @@ -133,6 +133,9 @@ func (c *Client) addOperationAuthorizeSnapshotAccessMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeSnapshotAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_BatchDeleteClusterSnapshots.go b/service/redshift/api_op_BatchDeleteClusterSnapshots.go index e69312850a0..4c62a77a107 100644 --- a/service/redshift/api_op_BatchDeleteClusterSnapshots.go +++ b/service/redshift/api_op_BatchDeleteClusterSnapshots.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchDeleteClusterSnapshotsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteClusterSnapshotsValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_BatchModifyClusterSnapshots.go b/service/redshift/api_op_BatchModifyClusterSnapshots.go index 19a0ffce0fa..2079e61a363 100644 --- a/service/redshift/api_op_BatchModifyClusterSnapshots.go +++ b/service/redshift/api_op_BatchModifyClusterSnapshots.go @@ -124,6 +124,9 @@ func (c *Client) addOperationBatchModifyClusterSnapshotsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchModifyClusterSnapshotsValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CancelResize.go b/service/redshift/api_op_CancelResize.go index 3cb2819ece2..f7956b528cb 100644 --- a/service/redshift/api_op_CancelResize.go +++ b/service/redshift/api_op_CancelResize.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCancelResizeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelResizeValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CopyClusterSnapshot.go b/service/redshift/api_op_CopyClusterSnapshot.go index dd6da56ef13..8ce2d97a7a1 100644 --- a/service/redshift/api_op_CopyClusterSnapshot.go +++ b/service/redshift/api_op_CopyClusterSnapshot.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCopyClusterSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateAuthenticationProfile.go b/service/redshift/api_op_CreateAuthenticationProfile.go index b4676d4a773..f367e2130d6 100644 --- a/service/redshift/api_op_CreateAuthenticationProfile.go +++ b/service/redshift/api_op_CreateAuthenticationProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateAuthenticationProfileMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAuthenticationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateCluster.go b/service/redshift/api_op_CreateCluster.go index 0ab24daec37..9c17319e095 100644 --- a/service/redshift/api_op_CreateCluster.go +++ b/service/redshift/api_op_CreateCluster.go @@ -454,6 +454,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateClusterParameterGroup.go b/service/redshift/api_op_CreateClusterParameterGroup.go index 2c452c31098..d87ebd30ffe 100644 --- a/service/redshift/api_op_CreateClusterParameterGroup.go +++ b/service/redshift/api_op_CreateClusterParameterGroup.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateClusterParameterGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateClusterSecurityGroup.go b/service/redshift/api_op_CreateClusterSecurityGroup.go index 3aa180ca920..ead9fa36768 100644 --- a/service/redshift/api_op_CreateClusterSecurityGroup.go +++ b/service/redshift/api_op_CreateClusterSecurityGroup.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateClusterSecurityGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateClusterSnapshot.go b/service/redshift/api_op_CreateClusterSnapshot.go index 400e1c85c1e..4de0c783542 100644 --- a/service/redshift/api_op_CreateClusterSnapshot.go +++ b/service/redshift/api_op_CreateClusterSnapshot.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateClusterSubnetGroup.go b/service/redshift/api_op_CreateClusterSubnetGroup.go index 01d7d8c29fc..15a5ae79ea4 100644 --- a/service/redshift/api_op_CreateClusterSubnetGroup.go +++ b/service/redshift/api_op_CreateClusterSubnetGroup.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateClusterSubnetGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateCustomDomainAssociation.go b/service/redshift/api_op_CreateCustomDomainAssociation.go index 5dd7688fff5..e0587e11aed 100644 --- a/service/redshift/api_op_CreateCustomDomainAssociation.go +++ b/service/redshift/api_op_CreateCustomDomainAssociation.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateCustomDomainAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateEndpointAccess.go b/service/redshift/api_op_CreateEndpointAccess.go index 0d56d432c98..1bd7be59ff0 100644 --- a/service/redshift/api_op_CreateEndpointAccess.go +++ b/service/redshift/api_op_CreateEndpointAccess.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateEventSubscription.go b/service/redshift/api_op_CreateEventSubscription.go index b36e0201aee..8d0e9258a3f 100644 --- a/service/redshift/api_op_CreateEventSubscription.go +++ b/service/redshift/api_op_CreateEventSubscription.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateHsmClientCertificate.go b/service/redshift/api_op_CreateHsmClientCertificate.go index a0dd236e802..f9a1a79d148 100644 --- a/service/redshift/api_op_CreateHsmClientCertificate.go +++ b/service/redshift/api_op_CreateHsmClientCertificate.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateHsmClientCertificateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHsmClientCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateHsmConfiguration.go b/service/redshift/api_op_CreateHsmConfiguration.go index 161a38d2a9d..0e955d27218 100644 --- a/service/redshift/api_op_CreateHsmConfiguration.go +++ b/service/redshift/api_op_CreateHsmConfiguration.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateHsmConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHsmConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateRedshiftIdcApplication.go b/service/redshift/api_op_CreateRedshiftIdcApplication.go index 46c0ac2c571..04a871b5c3e 100644 --- a/service/redshift/api_op_CreateRedshiftIdcApplication.go +++ b/service/redshift/api_op_CreateRedshiftIdcApplication.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateRedshiftIdcApplicationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRedshiftIdcApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateScheduledAction.go b/service/redshift/api_op_CreateScheduledAction.go index 12208670f7d..44e9ac4659e 100644 --- a/service/redshift/api_op_CreateScheduledAction.go +++ b/service/redshift/api_op_CreateScheduledAction.go @@ -195,6 +195,9 @@ func (c *Client) addOperationCreateScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateSnapshotCopyGrant.go b/service/redshift/api_op_CreateSnapshotCopyGrant.go index a9b38c1099c..f1a197cbf3e 100644 --- a/service/redshift/api_op_CreateSnapshotCopyGrant.go +++ b/service/redshift/api_op_CreateSnapshotCopyGrant.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateSnapshotCopyGrantMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotCopyGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateSnapshotSchedule.go b/service/redshift/api_op_CreateSnapshotSchedule.go index 69f67074637..dc2fba1149f 100644 --- a/service/redshift/api_op_CreateSnapshotSchedule.go +++ b/service/redshift/api_op_CreateSnapshotSchedule.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateSnapshotScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSnapshotSchedule(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_CreateTags.go b/service/redshift/api_op_CreateTags.go index 44fc285dfbb..9a700111ce4 100644 --- a/service/redshift/api_op_CreateTags.go +++ b/service/redshift/api_op_CreateTags.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_CreateUsageLimit.go b/service/redshift/api_op_CreateUsageLimit.go index 406f6395858..b23bbce9d4e 100644 --- a/service/redshift/api_op_CreateUsageLimit.go +++ b/service/redshift/api_op_CreateUsageLimit.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateUsageLimitMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeauthorizeDataShare.go b/service/redshift/api_op_DeauthorizeDataShare.go index d8726aa90ff..b0d3cfc85f1 100644 --- a/service/redshift/api_op_DeauthorizeDataShare.go +++ b/service/redshift/api_op_DeauthorizeDataShare.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeauthorizeDataShareMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeauthorizeDataShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteAuthenticationProfile.go b/service/redshift/api_op_DeleteAuthenticationProfile.go index dc033e8fb64..e944eac9c1e 100644 --- a/service/redshift/api_op_DeleteAuthenticationProfile.go +++ b/service/redshift/api_op_DeleteAuthenticationProfile.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteAuthenticationProfileMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAuthenticationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteCluster.go b/service/redshift/api_op_DeleteCluster.go index 31644fa2155..61b693e3314 100644 --- a/service/redshift/api_op_DeleteCluster.go +++ b/service/redshift/api_op_DeleteCluster.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteClusterParameterGroup.go b/service/redshift/api_op_DeleteClusterParameterGroup.go index c842fcff66d..8e9054f7f58 100644 --- a/service/redshift/api_op_DeleteClusterParameterGroup.go +++ b/service/redshift/api_op_DeleteClusterParameterGroup.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteClusterParameterGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteClusterSecurityGroup.go b/service/redshift/api_op_DeleteClusterSecurityGroup.go index deeacee03cb..b7ca73e70f0 100644 --- a/service/redshift/api_op_DeleteClusterSecurityGroup.go +++ b/service/redshift/api_op_DeleteClusterSecurityGroup.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteClusterSecurityGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterSecurityGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteClusterSnapshot.go b/service/redshift/api_op_DeleteClusterSnapshot.go index b6a00915b28..7a1d6b2b26d 100644 --- a/service/redshift/api_op_DeleteClusterSnapshot.go +++ b/service/redshift/api_op_DeleteClusterSnapshot.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteClusterSubnetGroup.go b/service/redshift/api_op_DeleteClusterSubnetGroup.go index c6107bda05b..ebb02c61e0a 100644 --- a/service/redshift/api_op_DeleteClusterSubnetGroup.go +++ b/service/redshift/api_op_DeleteClusterSubnetGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteClusterSubnetGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteCustomDomainAssociation.go b/service/redshift/api_op_DeleteCustomDomainAssociation.go index 8fa302bfd2c..a1e942ca9bb 100644 --- a/service/redshift/api_op_DeleteCustomDomainAssociation.go +++ b/service/redshift/api_op_DeleteCustomDomainAssociation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCustomDomainAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteEndpointAccess.go b/service/redshift/api_op_DeleteEndpointAccess.go index c1081f7e521..9765d5edffb 100644 --- a/service/redshift/api_op_DeleteEndpointAccess.go +++ b/service/redshift/api_op_DeleteEndpointAccess.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteEventSubscription.go b/service/redshift/api_op_DeleteEventSubscription.go index b838ebafe55..ffd1531401a 100644 --- a/service/redshift/api_op_DeleteEventSubscription.go +++ b/service/redshift/api_op_DeleteEventSubscription.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteHsmClientCertificate.go b/service/redshift/api_op_DeleteHsmClientCertificate.go index ba0b8a0e85f..c0624de84d9 100644 --- a/service/redshift/api_op_DeleteHsmClientCertificate.go +++ b/service/redshift/api_op_DeleteHsmClientCertificate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteHsmClientCertificateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHsmClientCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteHsmConfiguration.go b/service/redshift/api_op_DeleteHsmConfiguration.go index 1447f58938b..9d0f5b22e86 100644 --- a/service/redshift/api_op_DeleteHsmConfiguration.go +++ b/service/redshift/api_op_DeleteHsmConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteHsmConfigurationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHsmConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeletePartner.go b/service/redshift/api_op_DeletePartner.go index b83670e7dee..283fa9d691c 100644 --- a/service/redshift/api_op_DeletePartner.go +++ b/service/redshift/api_op_DeletePartner.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeletePartnerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePartnerValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteRedshiftIdcApplication.go b/service/redshift/api_op_DeleteRedshiftIdcApplication.go index bfc05e6cf64..f351c793471 100644 --- a/service/redshift/api_op_DeleteRedshiftIdcApplication.go +++ b/service/redshift/api_op_DeleteRedshiftIdcApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRedshiftIdcApplicationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRedshiftIdcApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteResourcePolicy.go b/service/redshift/api_op_DeleteResourcePolicy.go index 6acdf1f5a63..fea9362c5e6 100644 --- a/service/redshift/api_op_DeleteResourcePolicy.go +++ b/service/redshift/api_op_DeleteResourcePolicy.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteScheduledAction.go b/service/redshift/api_op_DeleteScheduledAction.go index 81b25a893d8..f9749f46764 100644 --- a/service/redshift/api_op_DeleteScheduledAction.go +++ b/service/redshift/api_op_DeleteScheduledAction.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteSnapshotCopyGrant.go b/service/redshift/api_op_DeleteSnapshotCopyGrant.go index 6c12829b6b5..82e04db7cef 100644 --- a/service/redshift/api_op_DeleteSnapshotCopyGrant.go +++ b/service/redshift/api_op_DeleteSnapshotCopyGrant.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteSnapshotCopyGrantMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotCopyGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteSnapshotSchedule.go b/service/redshift/api_op_DeleteSnapshotSchedule.go index 870c4cf742a..f7f28eec700 100644 --- a/service/redshift/api_op_DeleteSnapshotSchedule.go +++ b/service/redshift/api_op_DeleteSnapshotSchedule.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSnapshotScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteTags.go b/service/redshift/api_op_DeleteTags.go index 9ecfd7e692e..780d669573e 100644 --- a/service/redshift/api_op_DeleteTags.go +++ b/service/redshift/api_op_DeleteTags.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DeleteUsageLimit.go b/service/redshift/api_op_DeleteUsageLimit.go index a0286f26939..b20fe5d5202 100644 --- a/service/redshift/api_op_DeleteUsageLimit.go +++ b/service/redshift/api_op_DeleteUsageLimit.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteUsageLimitMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DescribeAccountAttributes.go b/service/redshift/api_op_DescribeAccountAttributes.go index 48ff03cfa1b..7cabcb0e7e3 100644 --- a/service/redshift/api_op_DescribeAccountAttributes.go +++ b/service/redshift/api_op_DescribeAccountAttributes.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_DescribeAuthenticationProfiles.go b/service/redshift/api_op_DescribeAuthenticationProfiles.go index 784ffdfb6ca..b46d195e47a 100644 --- a/service/redshift/api_op_DescribeAuthenticationProfiles.go +++ b/service/redshift/api_op_DescribeAuthenticationProfiles.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeAuthenticationProfilesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAuthenticationProfiles(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_DescribeClusterDbRevisions.go b/service/redshift/api_op_DescribeClusterDbRevisions.go index 2106baa96cf..c27361abfac 100644 --- a/service/redshift/api_op_DescribeClusterDbRevisions.go +++ b/service/redshift/api_op_DescribeClusterDbRevisions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeClusterDbRevisionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterDbRevisions(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeClusterDbRevisionsMiddlewares(stack *middle return nil } -// DescribeClusterDbRevisionsAPIClient is a client that implements the -// DescribeClusterDbRevisions operation. -type DescribeClusterDbRevisionsAPIClient interface { - DescribeClusterDbRevisions(context.Context, *DescribeClusterDbRevisionsInput, ...func(*Options)) (*DescribeClusterDbRevisionsOutput, error) -} - -var _ DescribeClusterDbRevisionsAPIClient = (*Client)(nil) - // DescribeClusterDbRevisionsPaginatorOptions is the paginator options for // DescribeClusterDbRevisions type DescribeClusterDbRevisionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *DescribeClusterDbRevisionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterDbRevisions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *DescribeClusterDbRevisionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeClusterDbRevisionsAPIClient is a client that implements the +// DescribeClusterDbRevisions operation. +type DescribeClusterDbRevisionsAPIClient interface { + DescribeClusterDbRevisions(context.Context, *DescribeClusterDbRevisionsInput, ...func(*Options)) (*DescribeClusterDbRevisionsOutput, error) +} + +var _ DescribeClusterDbRevisionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterDbRevisions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterParameterGroups.go b/service/redshift/api_op_DescribeClusterParameterGroups.go index 2ae9fe05029..99338e5b7de 100644 --- a/service/redshift/api_op_DescribeClusterParameterGroups.go +++ b/service/redshift/api_op_DescribeClusterParameterGroups.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeClusterParameterGroupsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterParameterGroups(options.Region), middleware.Before); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationDescribeClusterParameterGroupsMiddlewares(stack *mi return nil } -// DescribeClusterParameterGroupsAPIClient is a client that implements the -// DescribeClusterParameterGroups operation. -type DescribeClusterParameterGroupsAPIClient interface { - DescribeClusterParameterGroups(context.Context, *DescribeClusterParameterGroupsInput, ...func(*Options)) (*DescribeClusterParameterGroupsOutput, error) -} - -var _ DescribeClusterParameterGroupsAPIClient = (*Client)(nil) - // DescribeClusterParameterGroupsPaginatorOptions is the paginator options for // DescribeClusterParameterGroups type DescribeClusterParameterGroupsPaginatorOptions struct { @@ -267,6 +262,9 @@ func (p *DescribeClusterParameterGroupsPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +284,14 @@ func (p *DescribeClusterParameterGroupsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeClusterParameterGroupsAPIClient is a client that implements the +// DescribeClusterParameterGroups operation. +type DescribeClusterParameterGroupsAPIClient interface { + DescribeClusterParameterGroups(context.Context, *DescribeClusterParameterGroupsInput, ...func(*Options)) (*DescribeClusterParameterGroupsOutput, error) +} + +var _ DescribeClusterParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterParameters.go b/service/redshift/api_op_DescribeClusterParameters.go index e630731b01e..1df089061d4 100644 --- a/service/redshift/api_op_DescribeClusterParameters.go +++ b/service/redshift/api_op_DescribeClusterParameters.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeClusterParametersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterParametersValidationMiddleware(stack); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationDescribeClusterParametersMiddlewares(stack *middlew return nil } -// DescribeClusterParametersAPIClient is a client that implements the -// DescribeClusterParameters operation. -type DescribeClusterParametersAPIClient interface { - DescribeClusterParameters(context.Context, *DescribeClusterParametersInput, ...func(*Options)) (*DescribeClusterParametersOutput, error) -} - -var _ DescribeClusterParametersAPIClient = (*Client)(nil) - // DescribeClusterParametersPaginatorOptions is the paginator options for // DescribeClusterParameters type DescribeClusterParametersPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *DescribeClusterParametersPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *DescribeClusterParametersPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeClusterParametersAPIClient is a client that implements the +// DescribeClusterParameters operation. +type DescribeClusterParametersAPIClient interface { + DescribeClusterParameters(context.Context, *DescribeClusterParametersInput, ...func(*Options)) (*DescribeClusterParametersOutput, error) +} + +var _ DescribeClusterParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterSecurityGroups.go b/service/redshift/api_op_DescribeClusterSecurityGroups.go index dbff6c8e776..ee06370366f 100644 --- a/service/redshift/api_op_DescribeClusterSecurityGroups.go +++ b/service/redshift/api_op_DescribeClusterSecurityGroups.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDescribeClusterSecurityGroupsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterSecurityGroups(options.Region), middleware.Before); err != nil { return err } @@ -189,14 +192,6 @@ func (c *Client) addOperationDescribeClusterSecurityGroupsMiddlewares(stack *mid return nil } -// DescribeClusterSecurityGroupsAPIClient is a client that implements the -// DescribeClusterSecurityGroups operation. -type DescribeClusterSecurityGroupsAPIClient interface { - DescribeClusterSecurityGroups(context.Context, *DescribeClusterSecurityGroupsInput, ...func(*Options)) (*DescribeClusterSecurityGroupsOutput, error) -} - -var _ DescribeClusterSecurityGroupsAPIClient = (*Client)(nil) - // DescribeClusterSecurityGroupsPaginatorOptions is the paginator options for // DescribeClusterSecurityGroups type DescribeClusterSecurityGroupsPaginatorOptions struct { @@ -270,6 +265,9 @@ func (p *DescribeClusterSecurityGroupsPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterSecurityGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -289,6 +287,14 @@ func (p *DescribeClusterSecurityGroupsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeClusterSecurityGroupsAPIClient is a client that implements the +// DescribeClusterSecurityGroups operation. +type DescribeClusterSecurityGroupsAPIClient interface { + DescribeClusterSecurityGroups(context.Context, *DescribeClusterSecurityGroupsInput, ...func(*Options)) (*DescribeClusterSecurityGroupsOutput, error) +} + +var _ DescribeClusterSecurityGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterSnapshots.go b/service/redshift/api_op_DescribeClusterSnapshots.go index 5abe875b0e4..05de7a14121 100644 --- a/service/redshift/api_op_DescribeClusterSnapshots.go +++ b/service/redshift/api_op_DescribeClusterSnapshots.go @@ -221,6 +221,9 @@ func (c *Client) addOperationDescribeClusterSnapshotsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterSnapshotsValidationMiddleware(stack); err != nil { return err } @@ -245,105 +248,6 @@ func (c *Client) addOperationDescribeClusterSnapshotsMiddlewares(stack *middlewa return nil } -// DescribeClusterSnapshotsAPIClient is a client that implements the -// DescribeClusterSnapshots operation. -type DescribeClusterSnapshotsAPIClient interface { - DescribeClusterSnapshots(context.Context, *DescribeClusterSnapshotsInput, ...func(*Options)) (*DescribeClusterSnapshotsOutput, error) -} - -var _ DescribeClusterSnapshotsAPIClient = (*Client)(nil) - -// DescribeClusterSnapshotsPaginatorOptions is the paginator options for -// DescribeClusterSnapshots -type DescribeClusterSnapshotsPaginatorOptions struct { - // The maximum number of response records to return in each call. If the number of - // remaining response records exceeds the specified MaxRecords value, a value is - // returned in a marker field of the response. You can retrieve the next set of - // records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClusterSnapshotsPaginator is a paginator for DescribeClusterSnapshots -type DescribeClusterSnapshotsPaginator struct { - options DescribeClusterSnapshotsPaginatorOptions - client DescribeClusterSnapshotsAPIClient - params *DescribeClusterSnapshotsInput - nextToken *string - firstPage bool -} - -// NewDescribeClusterSnapshotsPaginator returns a new -// DescribeClusterSnapshotsPaginator -func NewDescribeClusterSnapshotsPaginator(client DescribeClusterSnapshotsAPIClient, params *DescribeClusterSnapshotsInput, optFns ...func(*DescribeClusterSnapshotsPaginatorOptions)) *DescribeClusterSnapshotsPaginator { - if params == nil { - params = &DescribeClusterSnapshotsInput{} - } - - options := DescribeClusterSnapshotsPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClusterSnapshotsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClusterSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClusterSnapshots page. -func (p *DescribeClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClusterSnapshotsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeClusterSnapshots(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // SnapshotAvailableWaiterOptions are waiter options for SnapshotAvailableWaiter type SnapshotAvailableWaiterOptions struct { @@ -459,7 +363,13 @@ func (w *SnapshotAvailableWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeClusterSnapshots(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -580,6 +490,108 @@ func snapshotAvailableStateRetryable(ctx context.Context, input *DescribeCluster return true, nil } +// DescribeClusterSnapshotsPaginatorOptions is the paginator options for +// DescribeClusterSnapshots +type DescribeClusterSnapshotsPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + // + // Default: 100 + // + // Constraints: minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeClusterSnapshotsPaginator is a paginator for DescribeClusterSnapshots +type DescribeClusterSnapshotsPaginator struct { + options DescribeClusterSnapshotsPaginatorOptions + client DescribeClusterSnapshotsAPIClient + params *DescribeClusterSnapshotsInput + nextToken *string + firstPage bool +} + +// NewDescribeClusterSnapshotsPaginator returns a new +// DescribeClusterSnapshotsPaginator +func NewDescribeClusterSnapshotsPaginator(client DescribeClusterSnapshotsAPIClient, params *DescribeClusterSnapshotsInput, optFns ...func(*DescribeClusterSnapshotsPaginatorOptions)) *DescribeClusterSnapshotsPaginator { + if params == nil { + params = &DescribeClusterSnapshotsInput{} + } + + options := DescribeClusterSnapshotsPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeClusterSnapshotsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeClusterSnapshotsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeClusterSnapshots page. +func (p *DescribeClusterSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClusterSnapshotsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeClusterSnapshots(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeClusterSnapshotsAPIClient is a client that implements the +// DescribeClusterSnapshots operation. +type DescribeClusterSnapshotsAPIClient interface { + DescribeClusterSnapshots(context.Context, *DescribeClusterSnapshotsInput, ...func(*Options)) (*DescribeClusterSnapshotsOutput, error) +} + +var _ DescribeClusterSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterSubnetGroups.go b/service/redshift/api_op_DescribeClusterSubnetGroups.go index df4e33461d9..c920f20aa73 100644 --- a/service/redshift/api_op_DescribeClusterSubnetGroups.go +++ b/service/redshift/api_op_DescribeClusterSubnetGroups.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeClusterSubnetGroupsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterSubnetGroups(options.Region), middleware.Before); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationDescribeClusterSubnetGroupsMiddlewares(stack *middl return nil } -// DescribeClusterSubnetGroupsAPIClient is a client that implements the -// DescribeClusterSubnetGroups operation. -type DescribeClusterSubnetGroupsAPIClient interface { - DescribeClusterSubnetGroups(context.Context, *DescribeClusterSubnetGroupsInput, ...func(*Options)) (*DescribeClusterSubnetGroupsOutput, error) -} - -var _ DescribeClusterSubnetGroupsAPIClient = (*Client)(nil) - // DescribeClusterSubnetGroupsPaginatorOptions is the paginator options for // DescribeClusterSubnetGroups type DescribeClusterSubnetGroupsPaginatorOptions struct { @@ -259,6 +254,9 @@ func (p *DescribeClusterSubnetGroupsPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterSubnetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *DescribeClusterSubnetGroupsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeClusterSubnetGroupsAPIClient is a client that implements the +// DescribeClusterSubnetGroups operation. +type DescribeClusterSubnetGroupsAPIClient interface { + DescribeClusterSubnetGroups(context.Context, *DescribeClusterSubnetGroupsInput, ...func(*Options)) (*DescribeClusterSubnetGroupsOutput, error) +} + +var _ DescribeClusterSubnetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterSubnetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterTracks.go b/service/redshift/api_op_DescribeClusterTracks.go index 25c59ecb5e1..772228f539a 100644 --- a/service/redshift/api_op_DescribeClusterTracks.go +++ b/service/redshift/api_op_DescribeClusterTracks.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeClusterTracksMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterTracks(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeClusterTracksMiddlewares(stack *middleware. return nil } -// DescribeClusterTracksAPIClient is a client that implements the -// DescribeClusterTracks operation. -type DescribeClusterTracksAPIClient interface { - DescribeClusterTracks(context.Context, *DescribeClusterTracksInput, ...func(*Options)) (*DescribeClusterTracksOutput, error) -} - -var _ DescribeClusterTracksAPIClient = (*Client)(nil) - // DescribeClusterTracksPaginatorOptions is the paginator options for // DescribeClusterTracks type DescribeClusterTracksPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *DescribeClusterTracksPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterTracks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *DescribeClusterTracksPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeClusterTracksAPIClient is a client that implements the +// DescribeClusterTracks operation. +type DescribeClusterTracksAPIClient interface { + DescribeClusterTracks(context.Context, *DescribeClusterTracksInput, ...func(*Options)) (*DescribeClusterTracksOutput, error) +} + +var _ DescribeClusterTracksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterTracks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusterVersions.go b/service/redshift/api_op_DescribeClusterVersions.go index b70faf47ab1..c25ea8dac0c 100644 --- a/service/redshift/api_op_DescribeClusterVersions.go +++ b/service/redshift/api_op_DescribeClusterVersions.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeClusterVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusterVersions(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationDescribeClusterVersionsMiddlewares(stack *middlewar return nil } -// DescribeClusterVersionsAPIClient is a client that implements the -// DescribeClusterVersions operation. -type DescribeClusterVersionsAPIClient interface { - DescribeClusterVersions(context.Context, *DescribeClusterVersionsInput, ...func(*Options)) (*DescribeClusterVersionsOutput, error) -} - -var _ DescribeClusterVersionsAPIClient = (*Client)(nil) - // DescribeClusterVersionsPaginatorOptions is the paginator options for // DescribeClusterVersions type DescribeClusterVersionsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeClusterVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeClusterVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeClusterVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeClusterVersionsAPIClient is a client that implements the +// DescribeClusterVersions operation. +type DescribeClusterVersionsAPIClient interface { + DescribeClusterVersions(context.Context, *DescribeClusterVersionsInput, ...func(*Options)) (*DescribeClusterVersionsOutput, error) +} + +var _ DescribeClusterVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusterVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeClusters.go b/service/redshift/api_op_DescribeClusters.go index ae6b03b0574..3a2db82d554 100644 --- a/service/redshift/api_op_DescribeClusters.go +++ b/service/redshift/api_op_DescribeClusters.go @@ -171,6 +171,9 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClusters(options.Region), middleware.Before); err != nil { return err } @@ -192,103 +195,6 @@ func (c *Client) addOperationDescribeClustersMiddlewares(stack *middleware.Stack return nil } -// DescribeClustersAPIClient is a client that implements the DescribeClusters -// operation. -type DescribeClustersAPIClient interface { - DescribeClusters(context.Context, *DescribeClustersInput, ...func(*Options)) (*DescribeClustersOutput, error) -} - -var _ DescribeClustersAPIClient = (*Client)(nil) - -// DescribeClustersPaginatorOptions is the paginator options for DescribeClusters -type DescribeClustersPaginatorOptions struct { - // The maximum number of response records to return in each call. If the number of - // remaining response records exceeds the specified MaxRecords value, a value is - // returned in a marker field of the response. You can retrieve the next set of - // records by retrying the command with the returned marker value. - // - // Default: 100 - // - // Constraints: minimum 20, maximum 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClustersPaginator is a paginator for DescribeClusters -type DescribeClustersPaginator struct { - options DescribeClustersPaginatorOptions - client DescribeClustersAPIClient - params *DescribeClustersInput - nextToken *string - firstPage bool -} - -// NewDescribeClustersPaginator returns a new DescribeClustersPaginator -func NewDescribeClustersPaginator(client DescribeClustersAPIClient, params *DescribeClustersInput, optFns ...func(*DescribeClustersPaginatorOptions)) *DescribeClustersPaginator { - if params == nil { - params = &DescribeClustersInput{} - } - - options := DescribeClustersPaginatorOptions{} - if params.MaxRecords != nil { - options.Limit = *params.MaxRecords - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClustersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClustersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClusters page. -func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClustersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxRecords = limit - - result, err := p.client.DescribeClusters(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.Marker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ClusterAvailableWaiterOptions are waiter options for ClusterAvailableWaiter type ClusterAvailableWaiterOptions struct { @@ -404,7 +310,13 @@ func (w *ClusterAvailableWaiter) WaitForOutput(ctx context.Context, params *Desc } out, err := w.client.DescribeClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -628,7 +540,13 @@ func (w *ClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -844,7 +762,13 @@ func (w *ClusterRestoredWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeClusters(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -941,6 +865,106 @@ func clusterRestoredStateRetryable(ctx context.Context, input *DescribeClustersI return true, nil } +// DescribeClustersPaginatorOptions is the paginator options for DescribeClusters +type DescribeClustersPaginatorOptions struct { + // The maximum number of response records to return in each call. If the number of + // remaining response records exceeds the specified MaxRecords value, a value is + // returned in a marker field of the response. You can retrieve the next set of + // records by retrying the command with the returned marker value. + // + // Default: 100 + // + // Constraints: minimum 20, maximum 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeClustersPaginator is a paginator for DescribeClusters +type DescribeClustersPaginator struct { + options DescribeClustersPaginatorOptions + client DescribeClustersAPIClient + params *DescribeClustersInput + nextToken *string + firstPage bool +} + +// NewDescribeClustersPaginator returns a new DescribeClustersPaginator +func NewDescribeClustersPaginator(client DescribeClustersAPIClient, params *DescribeClustersInput, optFns ...func(*DescribeClustersPaginatorOptions)) *DescribeClustersPaginator { + if params == nil { + params = &DescribeClustersInput{} + } + + options := DescribeClustersPaginatorOptions{} + if params.MaxRecords != nil { + options.Limit = *params.MaxRecords + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeClustersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeClustersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeClusters page. +func (p *DescribeClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClustersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxRecords = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeClusters(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.Marker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeClustersAPIClient is a client that implements the DescribeClusters +// operation. +type DescribeClustersAPIClient interface { + DescribeClusters(context.Context, *DescribeClustersInput, ...func(*Options)) (*DescribeClustersOutput, error) +} + +var _ DescribeClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeCustomDomainAssociations.go b/service/redshift/api_op_DescribeCustomDomainAssociations.go index 71321834aa6..0e33ef5ca9c 100644 --- a/service/redshift/api_op_DescribeCustomDomainAssociations.go +++ b/service/redshift/api_op_DescribeCustomDomainAssociations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeCustomDomainAssociationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomDomainAssociations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeCustomDomainAssociationsMiddlewares(stack * return nil } -// DescribeCustomDomainAssociationsAPIClient is a client that implements the -// DescribeCustomDomainAssociations operation. -type DescribeCustomDomainAssociationsAPIClient interface { - DescribeCustomDomainAssociations(context.Context, *DescribeCustomDomainAssociationsInput, ...func(*Options)) (*DescribeCustomDomainAssociationsOutput, error) -} - -var _ DescribeCustomDomainAssociationsAPIClient = (*Client)(nil) - // DescribeCustomDomainAssociationsPaginatorOptions is the paginator options for // DescribeCustomDomainAssociations type DescribeCustomDomainAssociationsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *DescribeCustomDomainAssociationsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCustomDomainAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *DescribeCustomDomainAssociationsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeCustomDomainAssociationsAPIClient is a client that implements the +// DescribeCustomDomainAssociations operation. +type DescribeCustomDomainAssociationsAPIClient interface { + DescribeCustomDomainAssociations(context.Context, *DescribeCustomDomainAssociationsInput, ...func(*Options)) (*DescribeCustomDomainAssociationsOutput, error) +} + +var _ DescribeCustomDomainAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCustomDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeDataShares.go b/service/redshift/api_op_DescribeDataShares.go index f8e57751de2..a6de92a6d3e 100644 --- a/service/redshift/api_op_DescribeDataShares.go +++ b/service/redshift/api_op_DescribeDataShares.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDataSharesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataShares(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeDataSharesMiddlewares(stack *middleware.Sta return nil } -// DescribeDataSharesAPIClient is a client that implements the DescribeDataShares -// operation. -type DescribeDataSharesAPIClient interface { - DescribeDataShares(context.Context, *DescribeDataSharesInput, ...func(*Options)) (*DescribeDataSharesOutput, error) -} - -var _ DescribeDataSharesAPIClient = (*Client)(nil) - // DescribeDataSharesPaginatorOptions is the paginator options for // DescribeDataShares type DescribeDataSharesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeDataSharesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDataShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeDataSharesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeDataSharesAPIClient is a client that implements the DescribeDataShares +// operation. +type DescribeDataSharesAPIClient interface { + DescribeDataShares(context.Context, *DescribeDataSharesInput, ...func(*Options)) (*DescribeDataSharesOutput, error) +} + +var _ DescribeDataSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeDataSharesForConsumer.go b/service/redshift/api_op_DescribeDataSharesForConsumer.go index 24f4c0ccc38..17108333f1a 100644 --- a/service/redshift/api_op_DescribeDataSharesForConsumer.go +++ b/service/redshift/api_op_DescribeDataSharesForConsumer.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeDataSharesForConsumerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataSharesForConsumer(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeDataSharesForConsumerMiddlewares(stack *mid return nil } -// DescribeDataSharesForConsumerAPIClient is a client that implements the -// DescribeDataSharesForConsumer operation. -type DescribeDataSharesForConsumerAPIClient interface { - DescribeDataSharesForConsumer(context.Context, *DescribeDataSharesForConsumerInput, ...func(*Options)) (*DescribeDataSharesForConsumerOutput, error) -} - -var _ DescribeDataSharesForConsumerAPIClient = (*Client)(nil) - // DescribeDataSharesForConsumerPaginatorOptions is the paginator options for // DescribeDataSharesForConsumer type DescribeDataSharesForConsumerPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeDataSharesForConsumerPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDataSharesForConsumer(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeDataSharesForConsumerPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeDataSharesForConsumerAPIClient is a client that implements the +// DescribeDataSharesForConsumer operation. +type DescribeDataSharesForConsumerAPIClient interface { + DescribeDataSharesForConsumer(context.Context, *DescribeDataSharesForConsumerInput, ...func(*Options)) (*DescribeDataSharesForConsumerOutput, error) +} + +var _ DescribeDataSharesForConsumerAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataSharesForConsumer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeDataSharesForProducer.go b/service/redshift/api_op_DescribeDataSharesForProducer.go index d201b4ee96e..6e3afbc2211 100644 --- a/service/redshift/api_op_DescribeDataSharesForProducer.go +++ b/service/redshift/api_op_DescribeDataSharesForProducer.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeDataSharesForProducerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDataSharesForProducer(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeDataSharesForProducerMiddlewares(stack *mid return nil } -// DescribeDataSharesForProducerAPIClient is a client that implements the -// DescribeDataSharesForProducer operation. -type DescribeDataSharesForProducerAPIClient interface { - DescribeDataSharesForProducer(context.Context, *DescribeDataSharesForProducerInput, ...func(*Options)) (*DescribeDataSharesForProducerOutput, error) -} - -var _ DescribeDataSharesForProducerAPIClient = (*Client)(nil) - // DescribeDataSharesForProducerPaginatorOptions is the paginator options for // DescribeDataSharesForProducer type DescribeDataSharesForProducerPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeDataSharesForProducerPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDataSharesForProducer(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeDataSharesForProducerPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeDataSharesForProducerAPIClient is a client that implements the +// DescribeDataSharesForProducer operation. +type DescribeDataSharesForProducerAPIClient interface { + DescribeDataSharesForProducer(context.Context, *DescribeDataSharesForProducerInput, ...func(*Options)) (*DescribeDataSharesForProducerOutput, error) +} + +var _ DescribeDataSharesForProducerAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDataSharesForProducer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeDefaultClusterParameters.go b/service/redshift/api_op_DescribeDefaultClusterParameters.go index d88cf8991bb..e949f579088 100644 --- a/service/redshift/api_op_DescribeDefaultClusterParameters.go +++ b/service/redshift/api_op_DescribeDefaultClusterParameters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeDefaultClusterParametersMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDefaultClusterParametersValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeDefaultClusterParametersMiddlewares(stack * return nil } -// DescribeDefaultClusterParametersAPIClient is a client that implements the -// DescribeDefaultClusterParameters operation. -type DescribeDefaultClusterParametersAPIClient interface { - DescribeDefaultClusterParameters(context.Context, *DescribeDefaultClusterParametersInput, ...func(*Options)) (*DescribeDefaultClusterParametersOutput, error) -} - -var _ DescribeDefaultClusterParametersAPIClient = (*Client)(nil) - // DescribeDefaultClusterParametersPaginatorOptions is the paginator options for // DescribeDefaultClusterParameters type DescribeDefaultClusterParametersPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeDefaultClusterParametersPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDefaultClusterParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeDefaultClusterParametersPaginator) NextPage(ctx context.Context return result, nil } +// DescribeDefaultClusterParametersAPIClient is a client that implements the +// DescribeDefaultClusterParameters operation. +type DescribeDefaultClusterParametersAPIClient interface { + DescribeDefaultClusterParameters(context.Context, *DescribeDefaultClusterParametersInput, ...func(*Options)) (*DescribeDefaultClusterParametersOutput, error) +} + +var _ DescribeDefaultClusterParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDefaultClusterParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeEndpointAccess.go b/service/redshift/api_op_DescribeEndpointAccess.go index 50b611e3f90..701d49ed36b 100644 --- a/service/redshift/api_op_DescribeEndpointAccess.go +++ b/service/redshift/api_op_DescribeEndpointAccess.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeEndpointAccessMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpointAccess(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeEndpointAccessMiddlewares(stack *middleware return nil } -// DescribeEndpointAccessAPIClient is a client that implements the -// DescribeEndpointAccess operation. -type DescribeEndpointAccessAPIClient interface { - DescribeEndpointAccess(context.Context, *DescribeEndpointAccessInput, ...func(*Options)) (*DescribeEndpointAccessOutput, error) -} - -var _ DescribeEndpointAccessAPIClient = (*Client)(nil) - // DescribeEndpointAccessPaginatorOptions is the paginator options for // DescribeEndpointAccess type DescribeEndpointAccessPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeEndpointAccessPaginator) NextPage(ctx context.Context, optFns . } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEndpointAccess(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeEndpointAccessPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeEndpointAccessAPIClient is a client that implements the +// DescribeEndpointAccess operation. +type DescribeEndpointAccessAPIClient interface { + DescribeEndpointAccess(context.Context, *DescribeEndpointAccessInput, ...func(*Options)) (*DescribeEndpointAccessOutput, error) +} + +var _ DescribeEndpointAccessAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeEndpointAuthorization.go b/service/redshift/api_op_DescribeEndpointAuthorization.go index 64157f9f9ed..84a529b546d 100644 --- a/service/redshift/api_op_DescribeEndpointAuthorization.go +++ b/service/redshift/api_op_DescribeEndpointAuthorization.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeEndpointAuthorizationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpointAuthorization(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeEndpointAuthorizationMiddlewares(stack *mid return nil } -// DescribeEndpointAuthorizationAPIClient is a client that implements the -// DescribeEndpointAuthorization operation. -type DescribeEndpointAuthorizationAPIClient interface { - DescribeEndpointAuthorization(context.Context, *DescribeEndpointAuthorizationInput, ...func(*Options)) (*DescribeEndpointAuthorizationOutput, error) -} - -var _ DescribeEndpointAuthorizationAPIClient = (*Client)(nil) - // DescribeEndpointAuthorizationPaginatorOptions is the paginator options for // DescribeEndpointAuthorization type DescribeEndpointAuthorizationPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeEndpointAuthorizationPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEndpointAuthorization(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeEndpointAuthorizationPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeEndpointAuthorizationAPIClient is a client that implements the +// DescribeEndpointAuthorization operation. +type DescribeEndpointAuthorizationAPIClient interface { + DescribeEndpointAuthorization(context.Context, *DescribeEndpointAuthorizationInput, ...func(*Options)) (*DescribeEndpointAuthorizationOutput, error) +} + +var _ DescribeEndpointAuthorizationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpointAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeEventCategories.go b/service/redshift/api_op_DescribeEventCategories.go index e3fb579dcec..206ea280b80 100644 --- a/service/redshift/api_op_DescribeEventCategories.go +++ b/service/redshift/api_op_DescribeEventCategories.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeEventCategoriesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventCategories(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_DescribeEventSubscriptions.go b/service/redshift/api_op_DescribeEventSubscriptions.go index 9fd393aa315..8001c6f251d 100644 --- a/service/redshift/api_op_DescribeEventSubscriptions.go +++ b/service/redshift/api_op_DescribeEventSubscriptions.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEventSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationDescribeEventSubscriptionsMiddlewares(stack *middle return nil } -// DescribeEventSubscriptionsAPIClient is a client that implements the -// DescribeEventSubscriptions operation. -type DescribeEventSubscriptionsAPIClient interface { - DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) -} - -var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) - // DescribeEventSubscriptionsPaginatorOptions is the paginator options for // DescribeEventSubscriptions type DescribeEventSubscriptionsPaginatorOptions struct { @@ -259,6 +254,9 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEventSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *DescribeEventSubscriptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeEventSubscriptionsAPIClient is a client that implements the +// DescribeEventSubscriptions operation. +type DescribeEventSubscriptionsAPIClient interface { + DescribeEventSubscriptions(context.Context, *DescribeEventSubscriptionsInput, ...func(*Options)) (*DescribeEventSubscriptionsOutput, error) +} + +var _ DescribeEventSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEventSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeEvents.go b/service/redshift/api_op_DescribeEvents.go index e60cf225f7f..ee2c721cd44 100644 --- a/service/redshift/api_op_DescribeEvents.go +++ b/service/redshift/api_op_DescribeEvents.go @@ -189,6 +189,9 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEvents(options.Region), middleware.Before); err != nil { return err } @@ -210,14 +213,6 @@ func (c *Client) addOperationDescribeEventsMiddlewares(stack *middleware.Stack, return nil } -// DescribeEventsAPIClient is a client that implements the DescribeEvents -// operation. -type DescribeEventsAPIClient interface { - DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) -} - -var _ DescribeEventsAPIClient = (*Client)(nil) - // DescribeEventsPaginatorOptions is the paginator options for DescribeEvents type DescribeEventsPaginatorOptions struct { // The maximum number of response records to return in each call. If the number of @@ -288,6 +283,9 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -307,6 +305,14 @@ func (p *DescribeEventsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeEventsAPIClient is a client that implements the DescribeEvents +// operation. +type DescribeEventsAPIClient interface { + DescribeEvents(context.Context, *DescribeEventsInput, ...func(*Options)) (*DescribeEventsOutput, error) +} + +var _ DescribeEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeHsmClientCertificates.go b/service/redshift/api_op_DescribeHsmClientCertificates.go index 9eb9ddc55d9..baad26391e9 100644 --- a/service/redshift/api_op_DescribeHsmClientCertificates.go +++ b/service/redshift/api_op_DescribeHsmClientCertificates.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeHsmClientCertificatesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHsmClientCertificates(options.Region), middleware.Before); err != nil { return err } @@ -181,14 +184,6 @@ func (c *Client) addOperationDescribeHsmClientCertificatesMiddlewares(stack *mid return nil } -// DescribeHsmClientCertificatesAPIClient is a client that implements the -// DescribeHsmClientCertificates operation. -type DescribeHsmClientCertificatesAPIClient interface { - DescribeHsmClientCertificates(context.Context, *DescribeHsmClientCertificatesInput, ...func(*Options)) (*DescribeHsmClientCertificatesOutput, error) -} - -var _ DescribeHsmClientCertificatesAPIClient = (*Client)(nil) - // DescribeHsmClientCertificatesPaginatorOptions is the paginator options for // DescribeHsmClientCertificates type DescribeHsmClientCertificatesPaginatorOptions struct { @@ -262,6 +257,9 @@ func (p *DescribeHsmClientCertificatesPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeHsmClientCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -281,6 +279,14 @@ func (p *DescribeHsmClientCertificatesPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeHsmClientCertificatesAPIClient is a client that implements the +// DescribeHsmClientCertificates operation. +type DescribeHsmClientCertificatesAPIClient interface { + DescribeHsmClientCertificates(context.Context, *DescribeHsmClientCertificatesInput, ...func(*Options)) (*DescribeHsmClientCertificatesOutput, error) +} + +var _ DescribeHsmClientCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeHsmClientCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeHsmConfigurations.go b/service/redshift/api_op_DescribeHsmConfigurations.go index d743941c0d1..898e4c9496b 100644 --- a/service/redshift/api_op_DescribeHsmConfigurations.go +++ b/service/redshift/api_op_DescribeHsmConfigurations.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeHsmConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHsmConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationDescribeHsmConfigurationsMiddlewares(stack *middlew return nil } -// DescribeHsmConfigurationsAPIClient is a client that implements the -// DescribeHsmConfigurations operation. -type DescribeHsmConfigurationsAPIClient interface { - DescribeHsmConfigurations(context.Context, *DescribeHsmConfigurationsInput, ...func(*Options)) (*DescribeHsmConfigurationsOutput, error) -} - -var _ DescribeHsmConfigurationsAPIClient = (*Client)(nil) - // DescribeHsmConfigurationsPaginatorOptions is the paginator options for // DescribeHsmConfigurations type DescribeHsmConfigurationsPaginatorOptions struct { @@ -259,6 +254,9 @@ func (p *DescribeHsmConfigurationsPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeHsmConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *DescribeHsmConfigurationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeHsmConfigurationsAPIClient is a client that implements the +// DescribeHsmConfigurations operation. +type DescribeHsmConfigurationsAPIClient interface { + DescribeHsmConfigurations(context.Context, *DescribeHsmConfigurationsInput, ...func(*Options)) (*DescribeHsmConfigurationsOutput, error) +} + +var _ DescribeHsmConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeHsmConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeInboundIntegrations.go b/service/redshift/api_op_DescribeInboundIntegrations.go index 2e64c079b51..5d12a1b4f38 100644 --- a/service/redshift/api_op_DescribeInboundIntegrations.go +++ b/service/redshift/api_op_DescribeInboundIntegrations.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeInboundIntegrationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInboundIntegrations(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeInboundIntegrationsMiddlewares(stack *middl return nil } -// DescribeInboundIntegrationsAPIClient is a client that implements the -// DescribeInboundIntegrations operation. -type DescribeInboundIntegrationsAPIClient interface { - DescribeInboundIntegrations(context.Context, *DescribeInboundIntegrationsInput, ...func(*Options)) (*DescribeInboundIntegrationsOutput, error) -} - -var _ DescribeInboundIntegrationsAPIClient = (*Client)(nil) - // DescribeInboundIntegrationsPaginatorOptions is the paginator options for // DescribeInboundIntegrations type DescribeInboundIntegrationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribeInboundIntegrationsPaginator) NextPage(ctx context.Context, opt } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInboundIntegrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribeInboundIntegrationsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeInboundIntegrationsAPIClient is a client that implements the +// DescribeInboundIntegrations operation. +type DescribeInboundIntegrationsAPIClient interface { + DescribeInboundIntegrations(context.Context, *DescribeInboundIntegrationsInput, ...func(*Options)) (*DescribeInboundIntegrationsOutput, error) +} + +var _ DescribeInboundIntegrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInboundIntegrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeLoggingStatus.go b/service/redshift/api_op_DescribeLoggingStatus.go index 303a0b6d1ca..86f6a7fe97a 100644 --- a/service/redshift/api_op_DescribeLoggingStatus.go +++ b/service/redshift/api_op_DescribeLoggingStatus.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeLoggingStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLoggingStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DescribeNodeConfigurationOptions.go b/service/redshift/api_op_DescribeNodeConfigurationOptions.go index 7040df9715a..415a40db8ef 100644 --- a/service/redshift/api_op_DescribeNodeConfigurationOptions.go +++ b/service/redshift/api_op_DescribeNodeConfigurationOptions.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeNodeConfigurationOptionsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNodeConfigurationOptionsValidationMiddleware(stack); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationDescribeNodeConfigurationOptionsMiddlewares(stack * return nil } -// DescribeNodeConfigurationOptionsAPIClient is a client that implements the -// DescribeNodeConfigurationOptions operation. -type DescribeNodeConfigurationOptionsAPIClient interface { - DescribeNodeConfigurationOptions(context.Context, *DescribeNodeConfigurationOptionsInput, ...func(*Options)) (*DescribeNodeConfigurationOptionsOutput, error) -} - -var _ DescribeNodeConfigurationOptionsAPIClient = (*Client)(nil) - // DescribeNodeConfigurationOptionsPaginatorOptions is the paginator options for // DescribeNodeConfigurationOptions type DescribeNodeConfigurationOptionsPaginatorOptions struct { @@ -258,6 +253,9 @@ func (p *DescribeNodeConfigurationOptionsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNodeConfigurationOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +275,14 @@ func (p *DescribeNodeConfigurationOptionsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeNodeConfigurationOptionsAPIClient is a client that implements the +// DescribeNodeConfigurationOptions operation. +type DescribeNodeConfigurationOptionsAPIClient interface { + DescribeNodeConfigurationOptions(context.Context, *DescribeNodeConfigurationOptionsInput, ...func(*Options)) (*DescribeNodeConfigurationOptionsOutput, error) +} + +var _ DescribeNodeConfigurationOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNodeConfigurationOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeOrderableClusterOptions.go b/service/redshift/api_op_DescribeOrderableClusterOptions.go index 849494c32a4..abbd45d2525 100644 --- a/service/redshift/api_op_DescribeOrderableClusterOptions.go +++ b/service/redshift/api_op_DescribeOrderableClusterOptions.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeOrderableClusterOptionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrderableClusterOptions(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeOrderableClusterOptionsMiddlewares(stack *m return nil } -// DescribeOrderableClusterOptionsAPIClient is a client that implements the -// DescribeOrderableClusterOptions operation. -type DescribeOrderableClusterOptionsAPIClient interface { - DescribeOrderableClusterOptions(context.Context, *DescribeOrderableClusterOptionsInput, ...func(*Options)) (*DescribeOrderableClusterOptionsOutput, error) -} - -var _ DescribeOrderableClusterOptionsAPIClient = (*Client)(nil) - // DescribeOrderableClusterOptionsPaginatorOptions is the paginator options for // DescribeOrderableClusterOptions type DescribeOrderableClusterOptionsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *DescribeOrderableClusterOptionsPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOrderableClusterOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *DescribeOrderableClusterOptionsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeOrderableClusterOptionsAPIClient is a client that implements the +// DescribeOrderableClusterOptions operation. +type DescribeOrderableClusterOptionsAPIClient interface { + DescribeOrderableClusterOptions(context.Context, *DescribeOrderableClusterOptionsInput, ...func(*Options)) (*DescribeOrderableClusterOptionsOutput, error) +} + +var _ DescribeOrderableClusterOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOrderableClusterOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribePartners.go b/service/redshift/api_op_DescribePartners.go index 3f95b49be2d..baccbfd8620 100644 --- a/service/redshift/api_op_DescribePartners.go +++ b/service/redshift/api_op_DescribePartners.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribePartnersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePartnersValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DescribeRedshiftIdcApplications.go b/service/redshift/api_op_DescribeRedshiftIdcApplications.go index 4b6475fd22b..511133d2cea 100644 --- a/service/redshift/api_op_DescribeRedshiftIdcApplications.go +++ b/service/redshift/api_op_DescribeRedshiftIdcApplications.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeRedshiftIdcApplicationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRedshiftIdcApplications(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationDescribeRedshiftIdcApplicationsMiddlewares(stack *m return nil } -// DescribeRedshiftIdcApplicationsAPIClient is a client that implements the -// DescribeRedshiftIdcApplications operation. -type DescribeRedshiftIdcApplicationsAPIClient interface { - DescribeRedshiftIdcApplications(context.Context, *DescribeRedshiftIdcApplicationsInput, ...func(*Options)) (*DescribeRedshiftIdcApplicationsOutput, error) -} - -var _ DescribeRedshiftIdcApplicationsAPIClient = (*Client)(nil) - // DescribeRedshiftIdcApplicationsPaginatorOptions is the paginator options for // DescribeRedshiftIdcApplications type DescribeRedshiftIdcApplicationsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeRedshiftIdcApplicationsPaginator) NextPage(ctx context.Context, } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRedshiftIdcApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeRedshiftIdcApplicationsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeRedshiftIdcApplicationsAPIClient is a client that implements the +// DescribeRedshiftIdcApplications operation. +type DescribeRedshiftIdcApplicationsAPIClient interface { + DescribeRedshiftIdcApplications(context.Context, *DescribeRedshiftIdcApplicationsInput, ...func(*Options)) (*DescribeRedshiftIdcApplicationsOutput, error) +} + +var _ DescribeRedshiftIdcApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRedshiftIdcApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go b/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go index 5ffa46afc4e..5d47284fe0c 100644 --- a/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go +++ b/service/redshift/api_op_DescribeReservedNodeExchangeStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeReservedNodeExchangeStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedNodeExchangeStatus(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeReservedNodeExchangeStatusMiddlewares(stack return nil } -// DescribeReservedNodeExchangeStatusAPIClient is a client that implements the -// DescribeReservedNodeExchangeStatus operation. -type DescribeReservedNodeExchangeStatusAPIClient interface { - DescribeReservedNodeExchangeStatus(context.Context, *DescribeReservedNodeExchangeStatusInput, ...func(*Options)) (*DescribeReservedNodeExchangeStatusOutput, error) -} - -var _ DescribeReservedNodeExchangeStatusAPIClient = (*Client)(nil) - // DescribeReservedNodeExchangeStatusPaginatorOptions is the paginator options for // DescribeReservedNodeExchangeStatus type DescribeReservedNodeExchangeStatusPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeReservedNodeExchangeStatusPaginator) NextPage(ctx context.Conte } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedNodeExchangeStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeReservedNodeExchangeStatusPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeReservedNodeExchangeStatusAPIClient is a client that implements the +// DescribeReservedNodeExchangeStatus operation. +type DescribeReservedNodeExchangeStatusAPIClient interface { + DescribeReservedNodeExchangeStatus(context.Context, *DescribeReservedNodeExchangeStatusInput, ...func(*Options)) (*DescribeReservedNodeExchangeStatusOutput, error) +} + +var _ DescribeReservedNodeExchangeStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedNodeExchangeStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeReservedNodeOfferings.go b/service/redshift/api_op_DescribeReservedNodeOfferings.go index 6fafd8a698d..bac5af45064 100644 --- a/service/redshift/api_op_DescribeReservedNodeOfferings.go +++ b/service/redshift/api_op_DescribeReservedNodeOfferings.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeReservedNodeOfferingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedNodeOfferings(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeReservedNodeOfferingsMiddlewares(stack *mid return nil } -// DescribeReservedNodeOfferingsAPIClient is a client that implements the -// DescribeReservedNodeOfferings operation. -type DescribeReservedNodeOfferingsAPIClient interface { - DescribeReservedNodeOfferings(context.Context, *DescribeReservedNodeOfferingsInput, ...func(*Options)) (*DescribeReservedNodeOfferingsOutput, error) -} - -var _ DescribeReservedNodeOfferingsAPIClient = (*Client)(nil) - // DescribeReservedNodeOfferingsPaginatorOptions is the paginator options for // DescribeReservedNodeOfferings type DescribeReservedNodeOfferingsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeReservedNodeOfferingsPaginator) NextPage(ctx context.Context, o } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedNodeOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeReservedNodeOfferingsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeReservedNodeOfferingsAPIClient is a client that implements the +// DescribeReservedNodeOfferings operation. +type DescribeReservedNodeOfferingsAPIClient interface { + DescribeReservedNodeOfferings(context.Context, *DescribeReservedNodeOfferingsInput, ...func(*Options)) (*DescribeReservedNodeOfferingsOutput, error) +} + +var _ DescribeReservedNodeOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedNodeOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeReservedNodes.go b/service/redshift/api_op_DescribeReservedNodes.go index 28575447f56..df17b86244c 100644 --- a/service/redshift/api_op_DescribeReservedNodes.go +++ b/service/redshift/api_op_DescribeReservedNodes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeReservedNodesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedNodes(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeReservedNodesMiddlewares(stack *middleware. return nil } -// DescribeReservedNodesAPIClient is a client that implements the -// DescribeReservedNodes operation. -type DescribeReservedNodesAPIClient interface { - DescribeReservedNodes(context.Context, *DescribeReservedNodesInput, ...func(*Options)) (*DescribeReservedNodesOutput, error) -} - -var _ DescribeReservedNodesAPIClient = (*Client)(nil) - // DescribeReservedNodesPaginatorOptions is the paginator options for // DescribeReservedNodes type DescribeReservedNodesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeReservedNodesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeReservedNodes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeReservedNodesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeReservedNodesAPIClient is a client that implements the +// DescribeReservedNodes operation. +type DescribeReservedNodesAPIClient interface { + DescribeReservedNodes(context.Context, *DescribeReservedNodesInput, ...func(*Options)) (*DescribeReservedNodesOutput, error) +} + +var _ DescribeReservedNodesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeReservedNodes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeResize.go b/service/redshift/api_op_DescribeResize.go index 48881c73c15..884b2f1c859 100644 --- a/service/redshift/api_op_DescribeResize.go +++ b/service/redshift/api_op_DescribeResize.go @@ -187,6 +187,9 @@ func (c *Client) addOperationDescribeResizeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResizeValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DescribeScheduledActions.go b/service/redshift/api_op_DescribeScheduledActions.go index e0c274f8a13..239c946786a 100644 --- a/service/redshift/api_op_DescribeScheduledActions.go +++ b/service/redshift/api_op_DescribeScheduledActions.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduledActionsValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationDescribeScheduledActionsMiddlewares(stack *middlewa return nil } -// DescribeScheduledActionsAPIClient is a client that implements the -// DescribeScheduledActions operation. -type DescribeScheduledActionsAPIClient interface { - DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error) -} - -var _ DescribeScheduledActionsAPIClient = (*Client)(nil) - // DescribeScheduledActionsPaginatorOptions is the paginator options for // DescribeScheduledActions type DescribeScheduledActionsPaginatorOptions struct { @@ -251,6 +246,9 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeScheduledActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *DescribeScheduledActionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeScheduledActionsAPIClient is a client that implements the +// DescribeScheduledActions operation. +type DescribeScheduledActionsAPIClient interface { + DescribeScheduledActions(context.Context, *DescribeScheduledActionsInput, ...func(*Options)) (*DescribeScheduledActionsOutput, error) +} + +var _ DescribeScheduledActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeSnapshotCopyGrants.go b/service/redshift/api_op_DescribeSnapshotCopyGrants.go index 4e7c2a8ed7b..5074fac4ba9 100644 --- a/service/redshift/api_op_DescribeSnapshotCopyGrants.go +++ b/service/redshift/api_op_DescribeSnapshotCopyGrants.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeSnapshotCopyGrantsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotCopyGrants(options.Region), middleware.Before); err != nil { return err } @@ -178,14 +181,6 @@ func (c *Client) addOperationDescribeSnapshotCopyGrantsMiddlewares(stack *middle return nil } -// DescribeSnapshotCopyGrantsAPIClient is a client that implements the -// DescribeSnapshotCopyGrants operation. -type DescribeSnapshotCopyGrantsAPIClient interface { - DescribeSnapshotCopyGrants(context.Context, *DescribeSnapshotCopyGrantsInput, ...func(*Options)) (*DescribeSnapshotCopyGrantsOutput, error) -} - -var _ DescribeSnapshotCopyGrantsAPIClient = (*Client)(nil) - // DescribeSnapshotCopyGrantsPaginatorOptions is the paginator options for // DescribeSnapshotCopyGrants type DescribeSnapshotCopyGrantsPaginatorOptions struct { @@ -259,6 +254,9 @@ func (p *DescribeSnapshotCopyGrantsPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshotCopyGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *DescribeSnapshotCopyGrantsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeSnapshotCopyGrantsAPIClient is a client that implements the +// DescribeSnapshotCopyGrants operation. +type DescribeSnapshotCopyGrantsAPIClient interface { + DescribeSnapshotCopyGrants(context.Context, *DescribeSnapshotCopyGrantsInput, ...func(*Options)) (*DescribeSnapshotCopyGrantsOutput, error) +} + +var _ DescribeSnapshotCopyGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshotCopyGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeSnapshotSchedules.go b/service/redshift/api_op_DescribeSnapshotSchedules.go index e7f33ca2129..464be84da10 100644 --- a/service/redshift/api_op_DescribeSnapshotSchedules.go +++ b/service/redshift/api_op_DescribeSnapshotSchedules.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeSnapshotSchedulesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotSchedules(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeSnapshotSchedulesMiddlewares(stack *middlew return nil } -// DescribeSnapshotSchedulesAPIClient is a client that implements the -// DescribeSnapshotSchedules operation. -type DescribeSnapshotSchedulesAPIClient interface { - DescribeSnapshotSchedules(context.Context, *DescribeSnapshotSchedulesInput, ...func(*Options)) (*DescribeSnapshotSchedulesOutput, error) -} - -var _ DescribeSnapshotSchedulesAPIClient = (*Client)(nil) - // DescribeSnapshotSchedulesPaginatorOptions is the paginator options for // DescribeSnapshotSchedules type DescribeSnapshotSchedulesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeSnapshotSchedulesPaginator) NextPage(ctx context.Context, optFn } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSnapshotSchedules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeSnapshotSchedulesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeSnapshotSchedulesAPIClient is a client that implements the +// DescribeSnapshotSchedules operation. +type DescribeSnapshotSchedulesAPIClient interface { + DescribeSnapshotSchedules(context.Context, *DescribeSnapshotSchedulesInput, ...func(*Options)) (*DescribeSnapshotSchedulesOutput, error) +} + +var _ DescribeSnapshotSchedulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSnapshotSchedules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeStorage.go b/service/redshift/api_op_DescribeStorage.go index 88093329b74..46e29ad44e9 100644 --- a/service/redshift/api_op_DescribeStorage.go +++ b/service/redshift/api_op_DescribeStorage.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDescribeStorageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStorage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_DescribeTableRestoreStatus.go b/service/redshift/api_op_DescribeTableRestoreStatus.go index 93d6abe87a5..41982766b07 100644 --- a/service/redshift/api_op_DescribeTableRestoreStatus.go +++ b/service/redshift/api_op_DescribeTableRestoreStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeTableRestoreStatusMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTableRestoreStatus(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeTableRestoreStatusMiddlewares(stack *middle return nil } -// DescribeTableRestoreStatusAPIClient is a client that implements the -// DescribeTableRestoreStatus operation. -type DescribeTableRestoreStatusAPIClient interface { - DescribeTableRestoreStatus(context.Context, *DescribeTableRestoreStatusInput, ...func(*Options)) (*DescribeTableRestoreStatusOutput, error) -} - -var _ DescribeTableRestoreStatusAPIClient = (*Client)(nil) - // DescribeTableRestoreStatusPaginatorOptions is the paginator options for // DescribeTableRestoreStatus type DescribeTableRestoreStatusPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeTableRestoreStatusPaginator) NextPage(ctx context.Context, optF } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTableRestoreStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeTableRestoreStatusPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeTableRestoreStatusAPIClient is a client that implements the +// DescribeTableRestoreStatus operation. +type DescribeTableRestoreStatusAPIClient interface { + DescribeTableRestoreStatus(context.Context, *DescribeTableRestoreStatusInput, ...func(*Options)) (*DescribeTableRestoreStatusOutput, error) +} + +var _ DescribeTableRestoreStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTableRestoreStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeTags.go b/service/redshift/api_op_DescribeTags.go index 9364ff9ef2f..e042f0a9543 100644 --- a/service/redshift/api_op_DescribeTags.go +++ b/service/redshift/api_op_DescribeTags.go @@ -191,6 +191,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTags(options.Region), middleware.Before); err != nil { return err } @@ -212,13 +215,6 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op return nil } -// DescribeTagsAPIClient is a client that implements the DescribeTags operation. -type DescribeTagsAPIClient interface { - DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) -} - -var _ DescribeTagsAPIClient = (*Client)(nil) - // DescribeTagsPaginatorOptions is the paginator options for DescribeTags type DescribeTagsPaginatorOptions struct { // The maximum number or response records to return in each call. If the number of @@ -285,6 +281,9 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -304,6 +303,13 @@ func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// DescribeTagsAPIClient is a client that implements the DescribeTags operation. +type DescribeTagsAPIClient interface { + DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) +} + +var _ DescribeTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DescribeUsageLimits.go b/service/redshift/api_op_DescribeUsageLimits.go index 1aef89a4ffa..6e706899b76 100644 --- a/service/redshift/api_op_DescribeUsageLimits.go +++ b/service/redshift/api_op_DescribeUsageLimits.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeUsageLimitsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUsageLimits(options.Region), middleware.Before); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationDescribeUsageLimitsMiddlewares(stack *middleware.St return nil } -// DescribeUsageLimitsAPIClient is a client that implements the -// DescribeUsageLimits operation. -type DescribeUsageLimitsAPIClient interface { - DescribeUsageLimits(context.Context, *DescribeUsageLimitsInput, ...func(*Options)) (*DescribeUsageLimitsOutput, error) -} - -var _ DescribeUsageLimitsAPIClient = (*Client)(nil) - // DescribeUsageLimitsPaginatorOptions is the paginator options for // DescribeUsageLimits type DescribeUsageLimitsPaginatorOptions struct { @@ -265,6 +260,9 @@ func (p *DescribeUsageLimitsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUsageLimits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -284,6 +282,14 @@ func (p *DescribeUsageLimitsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeUsageLimitsAPIClient is a client that implements the +// DescribeUsageLimits operation. +type DescribeUsageLimitsAPIClient interface { + DescribeUsageLimits(context.Context, *DescribeUsageLimitsInput, ...func(*Options)) (*DescribeUsageLimitsOutput, error) +} + +var _ DescribeUsageLimitsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUsageLimits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_DisableLogging.go b/service/redshift/api_op_DisableLogging.go index 1aa55c720d4..18a935aff9b 100644 --- a/service/redshift/api_op_DisableLogging.go +++ b/service/redshift/api_op_DisableLogging.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDisableLoggingMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DisableSnapshotCopy.go b/service/redshift/api_op_DisableSnapshotCopy.go index f0e3540fdb4..2e14885f8df 100644 --- a/service/redshift/api_op_DisableSnapshotCopy.go +++ b/service/redshift/api_op_DisableSnapshotCopy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisableSnapshotCopyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableSnapshotCopyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_DisassociateDataShareConsumer.go b/service/redshift/api_op_DisassociateDataShareConsumer.go index 7e5f176a2ad..6fd552ae2df 100644 --- a/service/redshift/api_op_DisassociateDataShareConsumer.go +++ b/service/redshift/api_op_DisassociateDataShareConsumer.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDisassociateDataShareConsumerMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDataShareConsumerValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_EnableLogging.go b/service/redshift/api_op_EnableLogging.go index fc82241455a..464c5410dd5 100644 --- a/service/redshift/api_op_EnableLogging.go +++ b/service/redshift/api_op_EnableLogging.go @@ -169,6 +169,9 @@ func (c *Client) addOperationEnableLoggingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_EnableSnapshotCopy.go b/service/redshift/api_op_EnableSnapshotCopy.go index bd74a2e6336..d786331442c 100644 --- a/service/redshift/api_op_EnableSnapshotCopy.go +++ b/service/redshift/api_op_EnableSnapshotCopy.go @@ -139,6 +139,9 @@ func (c *Client) addOperationEnableSnapshotCopyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableSnapshotCopyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_FailoverPrimaryCompute.go b/service/redshift/api_op_FailoverPrimaryCompute.go index 2814d710a9d..c15f0dcb2ad 100644 --- a/service/redshift/api_op_FailoverPrimaryCompute.go +++ b/service/redshift/api_op_FailoverPrimaryCompute.go @@ -108,6 +108,9 @@ func (c *Client) addOperationFailoverPrimaryComputeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpFailoverPrimaryComputeValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_GetClusterCredentials.go b/service/redshift/api_op_GetClusterCredentials.go index 1eb2f24eaf4..5e8bae5c214 100644 --- a/service/redshift/api_op_GetClusterCredentials.go +++ b/service/redshift/api_op_GetClusterCredentials.go @@ -230,6 +230,9 @@ func (c *Client) addOperationGetClusterCredentialsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetClusterCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_GetClusterCredentialsWithIAM.go b/service/redshift/api_op_GetClusterCredentialsWithIAM.go index e4a9612da7b..77b73432c66 100644 --- a/service/redshift/api_op_GetClusterCredentialsWithIAM.go +++ b/service/redshift/api_op_GetClusterCredentialsWithIAM.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetClusterCredentialsWithIAMMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetClusterCredentialsWithIAM(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go b/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go index d59d546d8a9..429d2c91366 100644 --- a/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go +++ b/service/redshift/api_op_GetReservedNodeExchangeConfigurationOptions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetReservedNodeExchangeConfigurationOptionsMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReservedNodeExchangeConfigurationOptionsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationGetReservedNodeExchangeConfigurationOptionsMiddlewa return nil } -// GetReservedNodeExchangeConfigurationOptionsAPIClient is a client that -// implements the GetReservedNodeExchangeConfigurationOptions operation. -type GetReservedNodeExchangeConfigurationOptionsAPIClient interface { - GetReservedNodeExchangeConfigurationOptions(context.Context, *GetReservedNodeExchangeConfigurationOptionsInput, ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) -} - -var _ GetReservedNodeExchangeConfigurationOptionsAPIClient = (*Client)(nil) - // GetReservedNodeExchangeConfigurationOptionsPaginatorOptions is the paginator // options for GetReservedNodeExchangeConfigurationOptions type GetReservedNodeExchangeConfigurationOptionsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) NextPage(ctx cont } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetReservedNodeExchangeConfigurationOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *GetReservedNodeExchangeConfigurationOptionsPaginator) NextPage(ctx cont return result, nil } +// GetReservedNodeExchangeConfigurationOptionsAPIClient is a client that +// implements the GetReservedNodeExchangeConfigurationOptions operation. +type GetReservedNodeExchangeConfigurationOptionsAPIClient interface { + GetReservedNodeExchangeConfigurationOptions(context.Context, *GetReservedNodeExchangeConfigurationOptionsInput, ...func(*Options)) (*GetReservedNodeExchangeConfigurationOptionsOutput, error) +} + +var _ GetReservedNodeExchangeConfigurationOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReservedNodeExchangeConfigurationOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_GetReservedNodeExchangeOfferings.go b/service/redshift/api_op_GetReservedNodeExchangeOfferings.go index 6362cb14677..6625551fa41 100644 --- a/service/redshift/api_op_GetReservedNodeExchangeOfferings.go +++ b/service/redshift/api_op_GetReservedNodeExchangeOfferings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetReservedNodeExchangeOfferingsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReservedNodeExchangeOfferingsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationGetReservedNodeExchangeOfferingsMiddlewares(stack * return nil } -// GetReservedNodeExchangeOfferingsAPIClient is a client that implements the -// GetReservedNodeExchangeOfferings operation. -type GetReservedNodeExchangeOfferingsAPIClient interface { - GetReservedNodeExchangeOfferings(context.Context, *GetReservedNodeExchangeOfferingsInput, ...func(*Options)) (*GetReservedNodeExchangeOfferingsOutput, error) -} - -var _ GetReservedNodeExchangeOfferingsAPIClient = (*Client)(nil) - // GetReservedNodeExchangeOfferingsPaginatorOptions is the paginator options for // GetReservedNodeExchangeOfferings type GetReservedNodeExchangeOfferingsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *GetReservedNodeExchangeOfferingsPaginator) NextPage(ctx context.Context } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetReservedNodeExchangeOfferings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *GetReservedNodeExchangeOfferingsPaginator) NextPage(ctx context.Context return result, nil } +// GetReservedNodeExchangeOfferingsAPIClient is a client that implements the +// GetReservedNodeExchangeOfferings operation. +type GetReservedNodeExchangeOfferingsAPIClient interface { + GetReservedNodeExchangeOfferings(context.Context, *GetReservedNodeExchangeOfferingsInput, ...func(*Options)) (*GetReservedNodeExchangeOfferingsOutput, error) +} + +var _ GetReservedNodeExchangeOfferingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReservedNodeExchangeOfferings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_GetResourcePolicy.go b/service/redshift/api_op_GetResourcePolicy.go index 2ba85c8ed16..61e1dec98ad 100644 --- a/service/redshift/api_op_GetResourcePolicy.go +++ b/service/redshift/api_op_GetResourcePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ListRecommendations.go b/service/redshift/api_op_ListRecommendations.go index 2c3aeb2077e..56590bfe02c 100644 --- a/service/redshift/api_op_ListRecommendations.go +++ b/service/redshift/api_op_ListRecommendations.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommendations(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St return nil } -// ListRecommendationsAPIClient is a client that implements the -// ListRecommendations operation. -type ListRecommendationsAPIClient interface { - ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) -} - -var _ ListRecommendationsAPIClient = (*Client)(nil) - // ListRecommendationsPaginatorOptions is the paginator options for // ListRecommendations type ListRecommendationsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxRecords = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRecommendationsAPIClient is a client that implements the +// ListRecommendations operation. +type ListRecommendationsAPIClient interface { + ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) +} + +var _ ListRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshift/api_op_ModifyAquaConfiguration.go b/service/redshift/api_op_ModifyAquaConfiguration.go index 8a2c6a75f16..8d86fae0b1c 100644 --- a/service/redshift/api_op_ModifyAquaConfiguration.go +++ b/service/redshift/api_op_ModifyAquaConfiguration.go @@ -113,6 +113,9 @@ func (c *Client) addOperationModifyAquaConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyAquaConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyAuthenticationProfile.go b/service/redshift/api_op_ModifyAuthenticationProfile.go index e372fa18eb0..95c4c2f36a1 100644 --- a/service/redshift/api_op_ModifyAuthenticationProfile.go +++ b/service/redshift/api_op_ModifyAuthenticationProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationModifyAuthenticationProfileMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyAuthenticationProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyCluster.go b/service/redshift/api_op_ModifyCluster.go index 24a122262dc..c03c4f29020 100644 --- a/service/redshift/api_op_ModifyCluster.go +++ b/service/redshift/api_op_ModifyCluster.go @@ -379,6 +379,9 @@ func (c *Client) addOperationModifyClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterDbRevision.go b/service/redshift/api_op_ModifyClusterDbRevision.go index 3e1205d57a2..554c4fd5716 100644 --- a/service/redshift/api_op_ModifyClusterDbRevision.go +++ b/service/redshift/api_op_ModifyClusterDbRevision.go @@ -115,6 +115,9 @@ func (c *Client) addOperationModifyClusterDbRevisionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterDbRevisionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterIamRoles.go b/service/redshift/api_op_ModifyClusterIamRoles.go index 58dc75c1095..54fefd55ab8 100644 --- a/service/redshift/api_op_ModifyClusterIamRoles.go +++ b/service/redshift/api_op_ModifyClusterIamRoles.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyClusterIamRolesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterIamRolesValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterMaintenance.go b/service/redshift/api_op_ModifyClusterMaintenance.go index be04638ac30..ed0b0974c5b 100644 --- a/service/redshift/api_op_ModifyClusterMaintenance.go +++ b/service/redshift/api_op_ModifyClusterMaintenance.go @@ -125,6 +125,9 @@ func (c *Client) addOperationModifyClusterMaintenanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterMaintenanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterParameterGroup.go b/service/redshift/api_op_ModifyClusterParameterGroup.go index 9c9ddd3b3a7..8c77cb43a48 100644 --- a/service/redshift/api_op_ModifyClusterParameterGroup.go +++ b/service/redshift/api_op_ModifyClusterParameterGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationModifyClusterParameterGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterSnapshot.go b/service/redshift/api_op_ModifyClusterSnapshot.go index 8b42d056247..968183cd55d 100644 --- a/service/redshift/api_op_ModifyClusterSnapshot.go +++ b/service/redshift/api_op_ModifyClusterSnapshot.go @@ -122,6 +122,9 @@ func (c *Client) addOperationModifyClusterSnapshotMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterSnapshotSchedule.go b/service/redshift/api_op_ModifyClusterSnapshotSchedule.go index 8d6f60e2104..1f06d8b2d1e 100644 --- a/service/redshift/api_op_ModifyClusterSnapshotSchedule.go +++ b/service/redshift/api_op_ModifyClusterSnapshotSchedule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationModifyClusterSnapshotScheduleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterSnapshotScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyClusterSubnetGroup.go b/service/redshift/api_op_ModifyClusterSubnetGroup.go index 2f766457e83..c872cf5f511 100644 --- a/service/redshift/api_op_ModifyClusterSubnetGroup.go +++ b/service/redshift/api_op_ModifyClusterSubnetGroup.go @@ -117,6 +117,9 @@ func (c *Client) addOperationModifyClusterSubnetGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClusterSubnetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyCustomDomainAssociation.go b/service/redshift/api_op_ModifyCustomDomainAssociation.go index 623038503f3..971571243fa 100644 --- a/service/redshift/api_op_ModifyCustomDomainAssociation.go +++ b/service/redshift/api_op_ModifyCustomDomainAssociation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationModifyCustomDomainAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyEndpointAccess.go b/service/redshift/api_op_ModifyEndpointAccess.go index 71d2643c98b..04adf10e3ad 100644 --- a/service/redshift/api_op_ModifyEndpointAccess.go +++ b/service/redshift/api_op_ModifyEndpointAccess.go @@ -140,6 +140,9 @@ func (c *Client) addOperationModifyEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyEventSubscription.go b/service/redshift/api_op_ModifyEventSubscription.go index 9b481fa1cb6..f701c97dcdb 100644 --- a/service/redshift/api_op_ModifyEventSubscription.go +++ b/service/redshift/api_op_ModifyEventSubscription.go @@ -147,6 +147,9 @@ func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyRedshiftIdcApplication.go b/service/redshift/api_op_ModifyRedshiftIdcApplication.go index 62392f4289c..7257ba70ce5 100644 --- a/service/redshift/api_op_ModifyRedshiftIdcApplication.go +++ b/service/redshift/api_op_ModifyRedshiftIdcApplication.go @@ -126,6 +126,9 @@ func (c *Client) addOperationModifyRedshiftIdcApplicationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyRedshiftIdcApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyScheduledAction.go b/service/redshift/api_op_ModifyScheduledAction.go index 7b1401e1155..bbf6128378a 100644 --- a/service/redshift/api_op_ModifyScheduledAction.go +++ b/service/redshift/api_op_ModifyScheduledAction.go @@ -186,6 +186,9 @@ func (c *Client) addOperationModifyScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go b/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go index eda40743381..9450c7c7b18 100644 --- a/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go +++ b/service/redshift/api_op_ModifySnapshotCopyRetentionPeriod.go @@ -148,6 +148,9 @@ func (c *Client) addOperationModifySnapshotCopyRetentionPeriodMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySnapshotCopyRetentionPeriodValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifySnapshotSchedule.go b/service/redshift/api_op_ModifySnapshotSchedule.go index 4a32e6265cf..a726380d051 100644 --- a/service/redshift/api_op_ModifySnapshotSchedule.go +++ b/service/redshift/api_op_ModifySnapshotSchedule.go @@ -135,6 +135,9 @@ func (c *Client) addOperationModifySnapshotScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySnapshotScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ModifyUsageLimit.go b/service/redshift/api_op_ModifyUsageLimit.go index 5c637baf16b..f849994f173 100644 --- a/service/redshift/api_op_ModifyUsageLimit.go +++ b/service/redshift/api_op_ModifyUsageLimit.go @@ -146,6 +146,9 @@ func (c *Client) addOperationModifyUsageLimitMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_PauseCluster.go b/service/redshift/api_op_PauseCluster.go index 88b9a01fb37..abb8f915150 100644 --- a/service/redshift/api_op_PauseCluster.go +++ b/service/redshift/api_op_PauseCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPauseClusterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPauseClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_PurchaseReservedNodeOffering.go b/service/redshift/api_op_PurchaseReservedNodeOffering.go index 160b2be4078..51f106873d6 100644 --- a/service/redshift/api_op_PurchaseReservedNodeOffering.go +++ b/service/redshift/api_op_PurchaseReservedNodeOffering.go @@ -121,6 +121,9 @@ func (c *Client) addOperationPurchaseReservedNodeOfferingMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurchaseReservedNodeOfferingValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_PutResourcePolicy.go b/service/redshift/api_op_PutResourcePolicy.go index 4ed16aeda6e..e273275256c 100644 --- a/service/redshift/api_op_PutResourcePolicy.go +++ b/service/redshift/api_op_PutResourcePolicy.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RebootCluster.go b/service/redshift/api_op_RebootCluster.go index 57ae11dee3d..41ac94bddd8 100644 --- a/service/redshift/api_op_RebootCluster.go +++ b/service/redshift/api_op_RebootCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRebootClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RejectDataShare.go b/service/redshift/api_op_RejectDataShare.go index ebfc992efd6..fa53991a4fd 100644 --- a/service/redshift/api_op_RejectDataShare.go +++ b/service/redshift/api_op_RejectDataShare.go @@ -120,6 +120,9 @@ func (c *Client) addOperationRejectDataShareMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectDataShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ResetClusterParameterGroup.go b/service/redshift/api_op_ResetClusterParameterGroup.go index 7a11ef8832f..ac2b9be46f8 100644 --- a/service/redshift/api_op_ResetClusterParameterGroup.go +++ b/service/redshift/api_op_ResetClusterParameterGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationResetClusterParameterGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetClusterParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ResizeCluster.go b/service/redshift/api_op_ResizeCluster.go index 94a8a5a8bc5..829acb6d449 100644 --- a/service/redshift/api_op_ResizeCluster.go +++ b/service/redshift/api_op_ResizeCluster.go @@ -149,6 +149,9 @@ func (c *Client) addOperationResizeClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResizeClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RestoreFromClusterSnapshot.go b/service/redshift/api_op_RestoreFromClusterSnapshot.go index 7d1a6ebca04..f272a51f05e 100644 --- a/service/redshift/api_op_RestoreFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreFromClusterSnapshot.go @@ -364,6 +364,9 @@ func (c *Client) addOperationRestoreFromClusterSnapshotMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreFromClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RestoreTableFromClusterSnapshot.go b/service/redshift/api_op_RestoreTableFromClusterSnapshot.go index 50a60386801..5f2d4829da3 100644 --- a/service/redshift/api_op_RestoreTableFromClusterSnapshot.go +++ b/service/redshift/api_op_RestoreTableFromClusterSnapshot.go @@ -159,6 +159,9 @@ func (c *Client) addOperationRestoreTableFromClusterSnapshotMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreTableFromClusterSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_ResumeCluster.go b/service/redshift/api_op_ResumeCluster.go index d8fa0e89dc7..75ea9047c0a 100644 --- a/service/redshift/api_op_ResumeCluster.go +++ b/service/redshift/api_op_ResumeCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationResumeClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go b/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go index 7f20f1c72a7..a6658ce5b14 100644 --- a/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go +++ b/service/redshift/api_op_RevokeClusterSecurityGroupIngress.go @@ -129,6 +129,9 @@ func (c *Client) addOperationRevokeClusterSecurityGroupIngressMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeClusterSecurityGroupIngressValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RevokeEndpointAccess.go b/service/redshift/api_op_RevokeEndpointAccess.go index 0fe8c802e78..a86c6dc9e54 100644 --- a/service/redshift/api_op_RevokeEndpointAccess.go +++ b/service/redshift/api_op_RevokeEndpointAccess.go @@ -142,6 +142,9 @@ func (c *Client) addOperationRevokeEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeEndpointAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshift/api_op_RevokeSnapshotAccess.go b/service/redshift/api_op_RevokeSnapshotAccess.go index 8051ddab0a9..f2ee5b77e75 100644 --- a/service/redshift/api_op_RevokeSnapshotAccess.go +++ b/service/redshift/api_op_RevokeSnapshotAccess.go @@ -126,6 +126,9 @@ func (c *Client) addOperationRevokeSnapshotAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeSnapshotAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_RotateEncryptionKey.go b/service/redshift/api_op_RotateEncryptionKey.go index cdf82daf4a1..c83b4552d04 100644 --- a/service/redshift/api_op_RotateEncryptionKey.go +++ b/service/redshift/api_op_RotateEncryptionKey.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRotateEncryptionKeyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRotateEncryptionKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshift/api_op_UpdatePartnerStatus.go b/service/redshift/api_op_UpdatePartnerStatus.go index b56073820e1..ff601a7d73d 100644 --- a/service/redshift/api_op_UpdatePartnerStatus.go +++ b/service/redshift/api_op_UpdatePartnerStatus.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdatePartnerStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePartnerStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftdata/api_client.go b/service/redshiftdata/api_client.go index b7dfb999267..f30996d71d4 100644 --- a/service/redshiftdata/api_client.go +++ b/service/redshiftdata/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/redshiftdata/api_op_BatchExecuteStatement.go b/service/redshiftdata/api_op_BatchExecuteStatement.go index f68cd0c4b0e..93f74420822 100644 --- a/service/redshiftdata/api_op_BatchExecuteStatement.go +++ b/service/redshiftdata/api_op_BatchExecuteStatement.go @@ -202,6 +202,9 @@ func (c *Client) addOperationBatchExecuteStatementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opBatchExecuteStatementMiddleware(stack, options); err != nil { return err } diff --git a/service/redshiftdata/api_op_CancelStatement.go b/service/redshiftdata/api_op_CancelStatement.go index 31a3cb6c8bb..3798927c212 100644 --- a/service/redshiftdata/api_op_CancelStatement.go +++ b/service/redshiftdata/api_op_CancelStatement.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCancelStatementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftdata/api_op_DescribeStatement.go b/service/redshiftdata/api_op_DescribeStatement.go index 7abbb769913..3e574dea3e9 100644 --- a/service/redshiftdata/api_op_DescribeStatement.go +++ b/service/redshiftdata/api_op_DescribeStatement.go @@ -202,6 +202,9 @@ func (c *Client) addOperationDescribeStatementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStatementValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftdata/api_op_DescribeTable.go b/service/redshiftdata/api_op_DescribeTable.go index 1405ab7552b..2472c911da2 100644 --- a/service/redshiftdata/api_op_DescribeTable.go +++ b/service/redshiftdata/api_op_DescribeTable.go @@ -195,6 +195,9 @@ func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTableValidationMiddleware(stack); err != nil { return err } @@ -219,13 +222,6 @@ func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, o return nil } -// DescribeTableAPIClient is a client that implements the DescribeTable operation. -type DescribeTableAPIClient interface { - DescribeTable(context.Context, *DescribeTableInput, ...func(*Options)) (*DescribeTableOutput, error) -} - -var _ DescribeTableAPIClient = (*Client)(nil) - // DescribeTablePaginatorOptions is the paginator options for DescribeTable type DescribeTablePaginatorOptions struct { // The maximum number of tables to return in the response. If more tables exist @@ -287,6 +283,9 @@ func (p *DescribeTablePaginator) NextPage(ctx context.Context, optFns ...func(*O params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTable(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -306,6 +305,13 @@ func (p *DescribeTablePaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeTableAPIClient is a client that implements the DescribeTable operation. +type DescribeTableAPIClient interface { + DescribeTable(context.Context, *DescribeTableInput, ...func(*Options)) (*DescribeTableOutput, error) +} + +var _ DescribeTableAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTable(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_ExecuteStatement.go b/service/redshiftdata/api_op_ExecuteStatement.go index 3b389add70a..2191c3fb0ed 100644 --- a/service/redshiftdata/api_op_ExecuteStatement.go +++ b/service/redshiftdata/api_op_ExecuteStatement.go @@ -201,6 +201,9 @@ func (c *Client) addOperationExecuteStatementMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExecuteStatementMiddleware(stack, options); err != nil { return err } diff --git a/service/redshiftdata/api_op_GetStatementResult.go b/service/redshiftdata/api_op_GetStatementResult.go index f0605cd0f37..9f8b6868e45 100644 --- a/service/redshiftdata/api_op_GetStatementResult.go +++ b/service/redshiftdata/api_op_GetStatementResult.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetStatementResultMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetStatementResultValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationGetStatementResultMiddlewares(stack *middleware.Sta return nil } -// GetStatementResultAPIClient is a client that implements the GetStatementResult -// operation. -type GetStatementResultAPIClient interface { - GetStatementResult(context.Context, *GetStatementResultInput, ...func(*Options)) (*GetStatementResultOutput, error) -} - -var _ GetStatementResultAPIClient = (*Client)(nil) - // GetStatementResultPaginatorOptions is the paginator options for // GetStatementResult type GetStatementResultPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *GetStatementResultPaginator) NextPage(ctx context.Context, optFns ...fu params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetStatementResult(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *GetStatementResultPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetStatementResultAPIClient is a client that implements the GetStatementResult +// operation. +type GetStatementResultAPIClient interface { + GetStatementResult(context.Context, *GetStatementResultInput, ...func(*Options)) (*GetStatementResultOutput, error) +} + +var _ GetStatementResultAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetStatementResult(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_ListDatabases.go b/service/redshiftdata/api_op_ListDatabases.go index 06887b5a0b4..5e43c93a1b4 100644 --- a/service/redshiftdata/api_op_ListDatabases.go +++ b/service/redshiftdata/api_op_ListDatabases.go @@ -176,6 +176,9 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatabasesValidationMiddleware(stack); err != nil { return err } @@ -200,13 +203,6 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o return nil } -// ListDatabasesAPIClient is a client that implements the ListDatabases operation. -type ListDatabasesAPIClient interface { - ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) -} - -var _ ListDatabasesAPIClient = (*Client)(nil) - // ListDatabasesPaginatorOptions is the paginator options for ListDatabases type ListDatabasesPaginatorOptions struct { // The maximum number of databases to return in the response. If more databases @@ -268,6 +264,9 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -287,6 +286,13 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDatabasesAPIClient is a client that implements the ListDatabases operation. +type ListDatabasesAPIClient interface { + ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) +} + +var _ ListDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_ListSchemas.go b/service/redshiftdata/api_op_ListSchemas.go index c6ba11c0d59..21344475e88 100644 --- a/service/redshiftdata/api_op_ListSchemas.go +++ b/service/redshiftdata/api_op_ListSchemas.go @@ -186,6 +186,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSchemasValidationMiddleware(stack); err != nil { return err } @@ -210,13 +213,6 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt return nil } -// ListSchemasAPIClient is a client that implements the ListSchemas operation. -type ListSchemasAPIClient interface { - ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) -} - -var _ ListSchemasAPIClient = (*Client)(nil) - // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { // The maximum number of schemas to return in the response. If more schemas exist @@ -278,6 +274,9 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -297,6 +296,13 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSchemasAPIClient is a client that implements the ListSchemas operation. +type ListSchemasAPIClient interface { + ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) +} + +var _ ListSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_ListStatements.go b/service/redshiftdata/api_op_ListStatements.go index b785f784e95..55efa70ad1a 100644 --- a/service/redshiftdata/api_op_ListStatements.go +++ b/service/redshiftdata/api_op_ListStatements.go @@ -160,6 +160,9 @@ func (c *Client) addOperationListStatementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStatements(options.Region), middleware.Before); err != nil { return err } @@ -181,14 +184,6 @@ func (c *Client) addOperationListStatementsMiddlewares(stack *middleware.Stack, return nil } -// ListStatementsAPIClient is a client that implements the ListStatements -// operation. -type ListStatementsAPIClient interface { - ListStatements(context.Context, *ListStatementsInput, ...func(*Options)) (*ListStatementsOutput, error) -} - -var _ ListStatementsAPIClient = (*Client)(nil) - // ListStatementsPaginatorOptions is the paginator options for ListStatements type ListStatementsPaginatorOptions struct { // The maximum number of SQL statements to return in the response. If more SQL @@ -250,6 +245,9 @@ func (p *ListStatementsPaginator) NextPage(ctx context.Context, optFns ...func(* params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStatements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListStatementsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListStatementsAPIClient is a client that implements the ListStatements +// operation. +type ListStatementsAPIClient interface { + ListStatements(context.Context, *ListStatementsInput, ...func(*Options)) (*ListStatementsOutput, error) +} + +var _ ListStatementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStatements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftdata/api_op_ListTables.go b/service/redshiftdata/api_op_ListTables.go index e084be01b49..4e83889c0ed 100644 --- a/service/redshiftdata/api_op_ListTables.go +++ b/service/redshiftdata/api_op_ListTables.go @@ -199,6 +199,9 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTablesValidationMiddleware(stack); err != nil { return err } @@ -223,13 +226,6 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti return nil } -// ListTablesAPIClient is a client that implements the ListTables operation. -type ListTablesAPIClient interface { - ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) -} - -var _ ListTablesAPIClient = (*Client)(nil) - // ListTablesPaginatorOptions is the paginator options for ListTables type ListTablesPaginatorOptions struct { // The maximum number of tables to return in the response. If more tables exist @@ -291,6 +287,9 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -310,6 +309,13 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTablesAPIClient is a client that implements the ListTables operation. +type ListTablesAPIClient interface { + ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) +} + +var _ ListTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_client.go b/service/redshiftserverless/api_client.go index cae72132512..bcd6f733349 100644 --- a/service/redshiftserverless/api_client.go +++ b/service/redshiftserverless/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/redshiftserverless/api_op_ConvertRecoveryPointToSnapshot.go b/service/redshiftserverless/api_op_ConvertRecoveryPointToSnapshot.go index 3478a250f4c..ab4a9f9633a 100644 --- a/service/redshiftserverless/api_op_ConvertRecoveryPointToSnapshot.go +++ b/service/redshiftserverless/api_op_ConvertRecoveryPointToSnapshot.go @@ -122,6 +122,9 @@ func (c *Client) addOperationConvertRecoveryPointToSnapshotMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConvertRecoveryPointToSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateCustomDomainAssociation.go b/service/redshiftserverless/api_op_CreateCustomDomainAssociation.go index 41d0ba9972b..26b7bb35895 100644 --- a/service/redshiftserverless/api_op_CreateCustomDomainAssociation.go +++ b/service/redshiftserverless/api_op_CreateCustomDomainAssociation.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateCustomDomainAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateEndpointAccess.go b/service/redshiftserverless/api_op_CreateEndpointAccess.go index 20266ae7967..0bed133de36 100644 --- a/service/redshiftserverless/api_op_CreateEndpointAccess.go +++ b/service/redshiftserverless/api_op_CreateEndpointAccess.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateNamespace.go b/service/redshiftserverless/api_op_CreateNamespace.go index 6c1ed5f1aab..4b8bc10a299 100644 --- a/service/redshiftserverless/api_op_CreateNamespace.go +++ b/service/redshiftserverless/api_op_CreateNamespace.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateScheduledAction.go b/service/redshiftserverless/api_op_CreateScheduledAction.go index 4506327aa2a..15f59c58e9a 100644 --- a/service/redshiftserverless/api_op_CreateScheduledAction.go +++ b/service/redshiftserverless/api_op_CreateScheduledAction.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateSnapshot.go b/service/redshiftserverless/api_op_CreateSnapshot.go index b6986d96e47..6690727ed34 100644 --- a/service/redshiftserverless/api_op_CreateSnapshot.go +++ b/service/redshiftserverless/api_op_CreateSnapshot.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateSnapshotCopyConfiguration.go b/service/redshiftserverless/api_op_CreateSnapshotCopyConfiguration.go index b7d1058be37..8ff8c2b28a2 100644 --- a/service/redshiftserverless/api_op_CreateSnapshotCopyConfiguration.go +++ b/service/redshiftserverless/api_op_CreateSnapshotCopyConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateSnapshotCopyConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotCopyConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateUsageLimit.go b/service/redshiftserverless/api_op_CreateUsageLimit.go index 102ef1bb844..1634306a0f3 100644 --- a/service/redshiftserverless/api_op_CreateUsageLimit.go +++ b/service/redshiftserverless/api_op_CreateUsageLimit.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateUsageLimitMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_CreateWorkgroup.go b/service/redshiftserverless/api_op_CreateWorkgroup.go index 14bac64898c..f4aae72386d 100644 --- a/service/redshiftserverless/api_op_CreateWorkgroup.go +++ b/service/redshiftserverless/api_op_CreateWorkgroup.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateWorkgroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkgroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteCustomDomainAssociation.go b/service/redshiftserverless/api_op_DeleteCustomDomainAssociation.go index 3aea236d16f..ffa0708bd49 100644 --- a/service/redshiftserverless/api_op_DeleteCustomDomainAssociation.go +++ b/service/redshiftserverless/api_op_DeleteCustomDomainAssociation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCustomDomainAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteEndpointAccess.go b/service/redshiftserverless/api_op_DeleteEndpointAccess.go index 45827da9a19..9159617f073 100644 --- a/service/redshiftserverless/api_op_DeleteEndpointAccess.go +++ b/service/redshiftserverless/api_op_DeleteEndpointAccess.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteNamespace.go b/service/redshiftserverless/api_op_DeleteNamespace.go index cdbaee8d203..a58f3eff7c4 100644 --- a/service/redshiftserverless/api_op_DeleteNamespace.go +++ b/service/redshiftserverless/api_op_DeleteNamespace.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteResourcePolicy.go b/service/redshiftserverless/api_op_DeleteResourcePolicy.go index 77b59d3a139..37caa4ab38a 100644 --- a/service/redshiftserverless/api_op_DeleteResourcePolicy.go +++ b/service/redshiftserverless/api_op_DeleteResourcePolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteScheduledAction.go b/service/redshiftserverless/api_op_DeleteScheduledAction.go index 5b6a614d97b..511f26d7d02 100644 --- a/service/redshiftserverless/api_op_DeleteScheduledAction.go +++ b/service/redshiftserverless/api_op_DeleteScheduledAction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteSnapshot.go b/service/redshiftserverless/api_op_DeleteSnapshot.go index 611f68e0f79..dea4c96b271 100644 --- a/service/redshiftserverless/api_op_DeleteSnapshot.go +++ b/service/redshiftserverless/api_op_DeleteSnapshot.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteSnapshotCopyConfiguration.go b/service/redshiftserverless/api_op_DeleteSnapshotCopyConfiguration.go index 78375f5c79f..c9d65062dc2 100644 --- a/service/redshiftserverless/api_op_DeleteSnapshotCopyConfiguration.go +++ b/service/redshiftserverless/api_op_DeleteSnapshotCopyConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSnapshotCopyConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotCopyConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteUsageLimit.go b/service/redshiftserverless/api_op_DeleteUsageLimit.go index 84da9610471..ac493ea62ca 100644 --- a/service/redshiftserverless/api_op_DeleteUsageLimit.go +++ b/service/redshiftserverless/api_op_DeleteUsageLimit.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteUsageLimitMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_DeleteWorkgroup.go b/service/redshiftserverless/api_op_DeleteWorkgroup.go index 52380533d04..d2231499627 100644 --- a/service/redshiftserverless/api_op_DeleteWorkgroup.go +++ b/service/redshiftserverless/api_op_DeleteWorkgroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteWorkgroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkgroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetCredentials.go b/service/redshiftserverless/api_op_GetCredentials.go index b35efad364d..f7b696f89c0 100644 --- a/service/redshiftserverless/api_op_GetCredentials.go +++ b/service/redshiftserverless/api_op_GetCredentials.go @@ -156,6 +156,9 @@ func (c *Client) addOperationGetCredentialsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCredentials(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetCustomDomainAssociation.go b/service/redshiftserverless/api_op_GetCustomDomainAssociation.go index 69c09966962..bcdf6e9df37 100644 --- a/service/redshiftserverless/api_op_GetCustomDomainAssociation.go +++ b/service/redshiftserverless/api_op_GetCustomDomainAssociation.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetCustomDomainAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetEndpointAccess.go b/service/redshiftserverless/api_op_GetEndpointAccess.go index fda95a82d6b..f4975c75f1a 100644 --- a/service/redshiftserverless/api_op_GetEndpointAccess.go +++ b/service/redshiftserverless/api_op_GetEndpointAccess.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetEndpointAccessMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetNamespace.go b/service/redshiftserverless/api_op_GetNamespace.go index 9fc82780c7a..23a92f48be3 100644 --- a/service/redshiftserverless/api_op_GetNamespace.go +++ b/service/redshiftserverless/api_op_GetNamespace.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetNamespaceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetRecoveryPoint.go b/service/redshiftserverless/api_op_GetRecoveryPoint.go index 0d8a4823d45..8cd848b6acc 100644 --- a/service/redshiftserverless/api_op_GetRecoveryPoint.go +++ b/service/redshiftserverless/api_op_GetRecoveryPoint.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetRecoveryPointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetResourcePolicy.go b/service/redshiftserverless/api_op_GetResourcePolicy.go index 3f1471b497a..70bbf675fd1 100644 --- a/service/redshiftserverless/api_op_GetResourcePolicy.go +++ b/service/redshiftserverless/api_op_GetResourcePolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetScheduledAction.go b/service/redshiftserverless/api_op_GetScheduledAction.go index 8838277fde8..b4b20feccbd 100644 --- a/service/redshiftserverless/api_op_GetScheduledAction.go +++ b/service/redshiftserverless/api_op_GetScheduledAction.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetScheduledActionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetSnapshot.go b/service/redshiftserverless/api_op_GetSnapshot.go index 90aaa09194a..c93a1427e4e 100644 --- a/service/redshiftserverless/api_op_GetSnapshot.go +++ b/service/redshiftserverless/api_op_GetSnapshot.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSnapshotMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSnapshot(options.Region), middleware.Before); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetTableRestoreStatus.go b/service/redshiftserverless/api_op_GetTableRestoreStatus.go index 1d56c1b8205..7236a6168fb 100644 --- a/service/redshiftserverless/api_op_GetTableRestoreStatus.go +++ b/service/redshiftserverless/api_op_GetTableRestoreStatus.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetTableRestoreStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTableRestoreStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetUsageLimit.go b/service/redshiftserverless/api_op_GetUsageLimit.go index e3b62b18986..8fffaefea12 100644 --- a/service/redshiftserverless/api_op_GetUsageLimit.go +++ b/service/redshiftserverless/api_op_GetUsageLimit.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetUsageLimitMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_GetWorkgroup.go b/service/redshiftserverless/api_op_GetWorkgroup.go index b3ab0466d1d..309190e54bd 100644 --- a/service/redshiftserverless/api_op_GetWorkgroup.go +++ b/service/redshiftserverless/api_op_GetWorkgroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetWorkgroupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkgroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_ListCustomDomainAssociations.go b/service/redshiftserverless/api_op_ListCustomDomainAssociations.go index 2d711127f33..a713dc3357e 100644 --- a/service/redshiftserverless/api_op_ListCustomDomainAssociations.go +++ b/service/redshiftserverless/api_op_ListCustomDomainAssociations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListCustomDomainAssociationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomDomainAssociations(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListCustomDomainAssociationsMiddlewares(stack *midd return nil } -// ListCustomDomainAssociationsAPIClient is a client that implements the -// ListCustomDomainAssociations operation. -type ListCustomDomainAssociationsAPIClient interface { - ListCustomDomainAssociations(context.Context, *ListCustomDomainAssociationsInput, ...func(*Options)) (*ListCustomDomainAssociationsOutput, error) -} - -var _ ListCustomDomainAssociationsAPIClient = (*Client)(nil) - // ListCustomDomainAssociationsPaginatorOptions is the paginator options for // ListCustomDomainAssociations type ListCustomDomainAssociationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListCustomDomainAssociationsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomDomainAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListCustomDomainAssociationsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListCustomDomainAssociationsAPIClient is a client that implements the +// ListCustomDomainAssociations operation. +type ListCustomDomainAssociationsAPIClient interface { + ListCustomDomainAssociations(context.Context, *ListCustomDomainAssociationsInput, ...func(*Options)) (*ListCustomDomainAssociationsOutput, error) +} + +var _ ListCustomDomainAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListEndpointAccess.go b/service/redshiftserverless/api_op_ListEndpointAccess.go index b132c732ef1..77e89429510 100644 --- a/service/redshiftserverless/api_op_ListEndpointAccess.go +++ b/service/redshiftserverless/api_op_ListEndpointAccess.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListEndpointAccessMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpointAccess(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListEndpointAccessMiddlewares(stack *middleware.Sta return nil } -// ListEndpointAccessAPIClient is a client that implements the ListEndpointAccess -// operation. -type ListEndpointAccessAPIClient interface { - ListEndpointAccess(context.Context, *ListEndpointAccessInput, ...func(*Options)) (*ListEndpointAccessOutput, error) -} - -var _ ListEndpointAccessAPIClient = (*Client)(nil) - // ListEndpointAccessPaginatorOptions is the paginator options for // ListEndpointAccess type ListEndpointAccessPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListEndpointAccessPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpointAccess(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListEndpointAccessPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEndpointAccessAPIClient is a client that implements the ListEndpointAccess +// operation. +type ListEndpointAccessAPIClient interface { + ListEndpointAccess(context.Context, *ListEndpointAccessInput, ...func(*Options)) (*ListEndpointAccessOutput, error) +} + +var _ ListEndpointAccessAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpointAccess(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListNamespaces.go b/service/redshiftserverless/api_op_ListNamespaces.go index 6af7c4f7007..d5723a39472 100644 --- a/service/redshiftserverless/api_op_ListNamespaces.go +++ b/service/redshiftserverless/api_op_ListNamespaces.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListNamespacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNamespaces(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListNamespacesMiddlewares(stack *middleware.Stack, return nil } -// ListNamespacesAPIClient is a client that implements the ListNamespaces -// operation. -type ListNamespacesAPIClient interface { - ListNamespaces(context.Context, *ListNamespacesInput, ...func(*Options)) (*ListNamespacesOutput, error) -} - -var _ ListNamespacesAPIClient = (*Client)(nil) - // ListNamespacesPaginatorOptions is the paginator options for ListNamespaces type ListNamespacesPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -210,6 +205,9 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNamespaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListNamespacesAPIClient is a client that implements the ListNamespaces +// operation. +type ListNamespacesAPIClient interface { + ListNamespaces(context.Context, *ListNamespacesInput, ...func(*Options)) (*ListNamespacesOutput, error) +} + +var _ ListNamespacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListRecoveryPoints.go b/service/redshiftserverless/api_op_ListRecoveryPoints.go index 1e92c02743f..06740729d02 100644 --- a/service/redshiftserverless/api_op_ListRecoveryPoints.go +++ b/service/redshiftserverless/api_op_ListRecoveryPoints.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRecoveryPointsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecoveryPoints(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListRecoveryPointsMiddlewares(stack *middleware.Sta return nil } -// ListRecoveryPointsAPIClient is a client that implements the ListRecoveryPoints -// operation. -type ListRecoveryPointsAPIClient interface { - ListRecoveryPoints(context.Context, *ListRecoveryPointsInput, ...func(*Options)) (*ListRecoveryPointsOutput, error) -} - -var _ ListRecoveryPointsAPIClient = (*Client)(nil) - // ListRecoveryPointsPaginatorOptions is the paginator options for // ListRecoveryPoints type ListRecoveryPointsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListRecoveryPointsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecoveryPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListRecoveryPointsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListRecoveryPointsAPIClient is a client that implements the ListRecoveryPoints +// operation. +type ListRecoveryPointsAPIClient interface { + ListRecoveryPoints(context.Context, *ListRecoveryPointsInput, ...func(*Options)) (*ListRecoveryPointsOutput, error) +} + +var _ ListRecoveryPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecoveryPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListScheduledActions.go b/service/redshiftserverless/api_op_ListScheduledActions.go index 998b2ae2194..2178cf02e58 100644 --- a/service/redshiftserverless/api_op_ListScheduledActions.go +++ b/service/redshiftserverless/api_op_ListScheduledActions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListScheduledActionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledActions(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListScheduledActionsMiddlewares(stack *middleware.S return nil } -// ListScheduledActionsAPIClient is a client that implements the -// ListScheduledActions operation. -type ListScheduledActionsAPIClient interface { - ListScheduledActions(context.Context, *ListScheduledActionsInput, ...func(*Options)) (*ListScheduledActionsOutput, error) -} - -var _ ListScheduledActionsAPIClient = (*Client)(nil) - // ListScheduledActionsPaginatorOptions is the paginator options for // ListScheduledActions type ListScheduledActionsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListScheduledActionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScheduledActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListScheduledActionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListScheduledActionsAPIClient is a client that implements the +// ListScheduledActions operation. +type ListScheduledActionsAPIClient interface { + ListScheduledActions(context.Context, *ListScheduledActionsInput, ...func(*Options)) (*ListScheduledActionsOutput, error) +} + +var _ ListScheduledActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScheduledActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListSnapshotCopyConfigurations.go b/service/redshiftserverless/api_op_ListSnapshotCopyConfigurations.go index 72ca25d093b..8cb3163c15e 100644 --- a/service/redshiftserverless/api_op_ListSnapshotCopyConfigurations.go +++ b/service/redshiftserverless/api_op_ListSnapshotCopyConfigurations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListSnapshotCopyConfigurationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSnapshotCopyConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListSnapshotCopyConfigurationsMiddlewares(stack *mi return nil } -// ListSnapshotCopyConfigurationsAPIClient is a client that implements the -// ListSnapshotCopyConfigurations operation. -type ListSnapshotCopyConfigurationsAPIClient interface { - ListSnapshotCopyConfigurations(context.Context, *ListSnapshotCopyConfigurationsInput, ...func(*Options)) (*ListSnapshotCopyConfigurationsOutput, error) -} - -var _ ListSnapshotCopyConfigurationsAPIClient = (*Client)(nil) - // ListSnapshotCopyConfigurationsPaginatorOptions is the paginator options for // ListSnapshotCopyConfigurations type ListSnapshotCopyConfigurationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListSnapshotCopyConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSnapshotCopyConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListSnapshotCopyConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListSnapshotCopyConfigurationsAPIClient is a client that implements the +// ListSnapshotCopyConfigurations operation. +type ListSnapshotCopyConfigurationsAPIClient interface { + ListSnapshotCopyConfigurations(context.Context, *ListSnapshotCopyConfigurationsInput, ...func(*Options)) (*ListSnapshotCopyConfigurationsOutput, error) +} + +var _ ListSnapshotCopyConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSnapshotCopyConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListSnapshots.go b/service/redshiftserverless/api_op_ListSnapshots.go index 8e051145a5f..81584de0284 100644 --- a/service/redshiftserverless/api_op_ListSnapshots.go +++ b/service/redshiftserverless/api_op_ListSnapshots.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListSnapshotsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSnapshots(options.Region), middleware.Before); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListSnapshotsMiddlewares(stack *middleware.Stack, o return nil } -// ListSnapshotsAPIClient is a client that implements the ListSnapshots operation. -type ListSnapshotsAPIClient interface { - ListSnapshots(context.Context, *ListSnapshotsInput, ...func(*Options)) (*ListSnapshotsOutput, error) -} - -var _ ListSnapshotsAPIClient = (*Client)(nil) - // ListSnapshotsPaginatorOptions is the paginator options for ListSnapshots type ListSnapshotsPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -224,6 +220,9 @@ func (p *ListSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSnapshots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListSnapshotsAPIClient is a client that implements the ListSnapshots operation. +type ListSnapshotsAPIClient interface { + ListSnapshots(context.Context, *ListSnapshotsInput, ...func(*Options)) (*ListSnapshotsOutput, error) +} + +var _ ListSnapshotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListTableRestoreStatus.go b/service/redshiftserverless/api_op_ListTableRestoreStatus.go index b73aacb565f..87f126be149 100644 --- a/service/redshiftserverless/api_op_ListTableRestoreStatus.go +++ b/service/redshiftserverless/api_op_ListTableRestoreStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTableRestoreStatusMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTableRestoreStatus(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListTableRestoreStatusMiddlewares(stack *middleware return nil } -// ListTableRestoreStatusAPIClient is a client that implements the -// ListTableRestoreStatus operation. -type ListTableRestoreStatusAPIClient interface { - ListTableRestoreStatus(context.Context, *ListTableRestoreStatusInput, ...func(*Options)) (*ListTableRestoreStatusOutput, error) -} - -var _ ListTableRestoreStatusAPIClient = (*Client)(nil) - // ListTableRestoreStatusPaginatorOptions is the paginator options for // ListTableRestoreStatus type ListTableRestoreStatusPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListTableRestoreStatusPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTableRestoreStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListTableRestoreStatusPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListTableRestoreStatusAPIClient is a client that implements the +// ListTableRestoreStatus operation. +type ListTableRestoreStatusAPIClient interface { + ListTableRestoreStatus(context.Context, *ListTableRestoreStatusInput, ...func(*Options)) (*ListTableRestoreStatusOutput, error) +} + +var _ ListTableRestoreStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTableRestoreStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListTagsForResource.go b/service/redshiftserverless/api_op_ListTagsForResource.go index 9c20df29735..12fd11603b8 100644 --- a/service/redshiftserverless/api_op_ListTagsForResource.go +++ b/service/redshiftserverless/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_ListUsageLimits.go b/service/redshiftserverless/api_op_ListUsageLimits.go index f8d95889a8d..acee1ed73c1 100644 --- a/service/redshiftserverless/api_op_ListUsageLimits.go +++ b/service/redshiftserverless/api_op_ListUsageLimits.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListUsageLimitsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUsageLimits(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListUsageLimitsMiddlewares(stack *middleware.Stack, return nil } -// ListUsageLimitsAPIClient is a client that implements the ListUsageLimits -// operation. -type ListUsageLimitsAPIClient interface { - ListUsageLimits(context.Context, *ListUsageLimitsInput, ...func(*Options)) (*ListUsageLimitsOutput, error) -} - -var _ ListUsageLimitsAPIClient = (*Client)(nil) - // ListUsageLimitsPaginatorOptions is the paginator options for ListUsageLimits type ListUsageLimitsPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -215,6 +210,9 @@ func (p *ListUsageLimitsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsageLimits(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListUsageLimitsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListUsageLimitsAPIClient is a client that implements the ListUsageLimits +// operation. +type ListUsageLimitsAPIClient interface { + ListUsageLimits(context.Context, *ListUsageLimitsInput, ...func(*Options)) (*ListUsageLimitsOutput, error) +} + +var _ ListUsageLimitsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsageLimits(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_ListWorkgroups.go b/service/redshiftserverless/api_op_ListWorkgroups.go index 2b11c729ec5..6d3c014aefe 100644 --- a/service/redshiftserverless/api_op_ListWorkgroups.go +++ b/service/redshiftserverless/api_op_ListWorkgroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListWorkgroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkgroups(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListWorkgroupsMiddlewares(stack *middleware.Stack, return nil } -// ListWorkgroupsAPIClient is a client that implements the ListWorkgroups -// operation. -type ListWorkgroupsAPIClient interface { - ListWorkgroups(context.Context, *ListWorkgroupsInput, ...func(*Options)) (*ListWorkgroupsOutput, error) -} - -var _ ListWorkgroupsAPIClient = (*Client)(nil) - // ListWorkgroupsPaginatorOptions is the paginator options for ListWorkgroups type ListWorkgroupsPaginatorOptions struct { // An optional parameter that specifies the maximum number of results to return. @@ -214,6 +209,9 @@ func (p *ListWorkgroupsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkgroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListWorkgroupsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListWorkgroupsAPIClient is a client that implements the ListWorkgroups +// operation. +type ListWorkgroupsAPIClient interface { + ListWorkgroups(context.Context, *ListWorkgroupsInput, ...func(*Options)) (*ListWorkgroupsOutput, error) +} + +var _ ListWorkgroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkgroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/redshiftserverless/api_op_PutResourcePolicy.go b/service/redshiftserverless/api_op_PutResourcePolicy.go index 467e5505696..37e2f166d73 100644 --- a/service/redshiftserverless/api_op_PutResourcePolicy.go +++ b/service/redshiftserverless/api_op_PutResourcePolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_RestoreFromRecoveryPoint.go b/service/redshiftserverless/api_op_RestoreFromRecoveryPoint.go index ae373fd500c..ac1f2ad471b 100644 --- a/service/redshiftserverless/api_op_RestoreFromRecoveryPoint.go +++ b/service/redshiftserverless/api_op_RestoreFromRecoveryPoint.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRestoreFromRecoveryPointMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreFromRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_RestoreFromSnapshot.go b/service/redshiftserverless/api_op_RestoreFromSnapshot.go index cd13d40ae64..bf1cd0200af 100644 --- a/service/redshiftserverless/api_op_RestoreFromSnapshot.go +++ b/service/redshiftserverless/api_op_RestoreFromSnapshot.go @@ -142,6 +142,9 @@ func (c *Client) addOperationRestoreFromSnapshotMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_RestoreTableFromRecoveryPoint.go b/service/redshiftserverless/api_op_RestoreTableFromRecoveryPoint.go index 3624e8bfa75..f2fc2820037 100644 --- a/service/redshiftserverless/api_op_RestoreTableFromRecoveryPoint.go +++ b/service/redshiftserverless/api_op_RestoreTableFromRecoveryPoint.go @@ -147,6 +147,9 @@ func (c *Client) addOperationRestoreTableFromRecoveryPointMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreTableFromRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_RestoreTableFromSnapshot.go b/service/redshiftserverless/api_op_RestoreTableFromSnapshot.go index bdbb3ea79b5..096cf78b1dd 100644 --- a/service/redshiftserverless/api_op_RestoreTableFromSnapshot.go +++ b/service/redshiftserverless/api_op_RestoreTableFromSnapshot.go @@ -148,6 +148,9 @@ func (c *Client) addOperationRestoreTableFromSnapshotMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreTableFromSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_TagResource.go b/service/redshiftserverless/api_op_TagResource.go index 0410b9aff57..cbfab11d365 100644 --- a/service/redshiftserverless/api_op_TagResource.go +++ b/service/redshiftserverless/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UntagResource.go b/service/redshiftserverless/api_op_UntagResource.go index 5c67e98d1a6..8cd47a97b0c 100644 --- a/service/redshiftserverless/api_op_UntagResource.go +++ b/service/redshiftserverless/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateCustomDomainAssociation.go b/service/redshiftserverless/api_op_UpdateCustomDomainAssociation.go index 28bcd65d0a9..3a4e89a333a 100644 --- a/service/redshiftserverless/api_op_UpdateCustomDomainAssociation.go +++ b/service/redshiftserverless/api_op_UpdateCustomDomainAssociation.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateCustomDomainAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomDomainAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateEndpointAccess.go b/service/redshiftserverless/api_op_UpdateEndpointAccess.go index e342893ad04..91bf0b5abaa 100644 --- a/service/redshiftserverless/api_op_UpdateEndpointAccess.go +++ b/service/redshiftserverless/api_op_UpdateEndpointAccess.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateEndpointAccessMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateNamespace.go b/service/redshiftserverless/api_op_UpdateNamespace.go index a3618698cb4..5408e5cf903 100644 --- a/service/redshiftserverless/api_op_UpdateNamespace.go +++ b/service/redshiftserverless/api_op_UpdateNamespace.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateScheduledAction.go b/service/redshiftserverless/api_op_UpdateScheduledAction.go index c0d5c996159..e07b12bd969 100644 --- a/service/redshiftserverless/api_op_UpdateScheduledAction.go +++ b/service/redshiftserverless/api_op_UpdateScheduledAction.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateScheduledActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScheduledActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateSnapshot.go b/service/redshiftserverless/api_op_UpdateSnapshot.go index 033bf20f169..c1cef0d116e 100644 --- a/service/redshiftserverless/api_op_UpdateSnapshot.go +++ b/service/redshiftserverless/api_op_UpdateSnapshot.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateSnapshotCopyConfiguration.go b/service/redshiftserverless/api_op_UpdateSnapshotCopyConfiguration.go index a8ca465de55..f12b59d2e31 100644 --- a/service/redshiftserverless/api_op_UpdateSnapshotCopyConfiguration.go +++ b/service/redshiftserverless/api_op_UpdateSnapshotCopyConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateSnapshotCopyConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSnapshotCopyConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateUsageLimit.go b/service/redshiftserverless/api_op_UpdateUsageLimit.go index e17c22f9b71..d6b5ea90766 100644 --- a/service/redshiftserverless/api_op_UpdateUsageLimit.go +++ b/service/redshiftserverless/api_op_UpdateUsageLimit.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateUsageLimitMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUsageLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/redshiftserverless/api_op_UpdateWorkgroup.go b/service/redshiftserverless/api_op_UpdateWorkgroup.go index 111ebc105cc..d9c896aa421 100644 --- a/service/redshiftserverless/api_op_UpdateWorkgroup.go +++ b/service/redshiftserverless/api_op_UpdateWorkgroup.go @@ -147,6 +147,9 @@ func (c *Client) addOperationUpdateWorkgroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkgroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_client.go b/service/rekognition/api_client.go index b0dc893cad6..692d2141519 100644 --- a/service/rekognition/api_client.go +++ b/service/rekognition/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/rekognition/api_op_AssociateFaces.go b/service/rekognition/api_op_AssociateFaces.go index 94c80cbfc57..4c63607399b 100644 --- a/service/rekognition/api_op_AssociateFaces.go +++ b/service/rekognition/api_op_AssociateFaces.go @@ -164,6 +164,9 @@ func (c *Client) addOperationAssociateFacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateFacesMiddleware(stack, options); err != nil { return err } diff --git a/service/rekognition/api_op_CompareFaces.go b/service/rekognition/api_op_CompareFaces.go index 7b87a176870..a5aea27607b 100644 --- a/service/rekognition/api_op_CompareFaces.go +++ b/service/rekognition/api_op_CompareFaces.go @@ -235,6 +235,9 @@ func (c *Client) addOperationCompareFacesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCompareFacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CopyProjectVersion.go b/service/rekognition/api_op_CopyProjectVersion.go index d4f4e282659..aed5dca554c 100644 --- a/service/rekognition/api_op_CopyProjectVersion.go +++ b/service/rekognition/api_op_CopyProjectVersion.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCopyProjectVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyProjectVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateCollection.go b/service/rekognition/api_op_CreateCollection.go index e4d8b253f44..15d88acdacb 100644 --- a/service/rekognition/api_op_CreateCollection.go +++ b/service/rekognition/api_op_CreateCollection.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateCollectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateDataset.go b/service/rekognition/api_op_CreateDataset.go index bebbefeeeef..2dc6f2ee098 100644 --- a/service/rekognition/api_op_CreateDataset.go +++ b/service/rekognition/api_op_CreateDataset.go @@ -145,6 +145,9 @@ func (c *Client) addOperationCreateDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateFaceLivenessSession.go b/service/rekognition/api_op_CreateFaceLivenessSession.go index 535a72f0a26..03284d9b5be 100644 --- a/service/rekognition/api_op_CreateFaceLivenessSession.go +++ b/service/rekognition/api_op_CreateFaceLivenessSession.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateFaceLivenessSessionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFaceLivenessSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateProject.go b/service/rekognition/api_op_CreateProject.go index 2177b5b3df5..08ed3dd2b03 100644 --- a/service/rekognition/api_op_CreateProject.go +++ b/service/rekognition/api_op_CreateProject.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateProjectVersion.go b/service/rekognition/api_op_CreateProjectVersion.go index e94d6c409a2..3a5c9090f3b 100644 --- a/service/rekognition/api_op_CreateProjectVersion.go +++ b/service/rekognition/api_op_CreateProjectVersion.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateProjectVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateStreamProcessor.go b/service/rekognition/api_op_CreateStreamProcessor.go index 09c164d7d26..d6f5cd7bc2b 100644 --- a/service/rekognition/api_op_CreateStreamProcessor.go +++ b/service/rekognition/api_op_CreateStreamProcessor.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateStreamProcessorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStreamProcessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_CreateUser.go b/service/rekognition/api_op_CreateUser.go index ade093fdc4c..7da825d6460 100644 --- a/service/rekognition/api_op_CreateUser.go +++ b/service/rekognition/api_op_CreateUser.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateUserMiddleware(stack, options); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteCollection.go b/service/rekognition/api_op_DeleteCollection.go index 1986f1ac0ea..8819c2c0cc6 100644 --- a/service/rekognition/api_op_DeleteCollection.go +++ b/service/rekognition/api_op_DeleteCollection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteCollectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteDataset.go b/service/rekognition/api_op_DeleteDataset.go index c96137d6cbd..524fe65e939 100644 --- a/service/rekognition/api_op_DeleteDataset.go +++ b/service/rekognition/api_op_DeleteDataset.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteDatasetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteFaces.go b/service/rekognition/api_op_DeleteFaces.go index e3e4a5bdeca..808bb3ee7ba 100644 --- a/service/rekognition/api_op_DeleteFaces.go +++ b/service/rekognition/api_op_DeleteFaces.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteFacesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteProject.go b/service/rekognition/api_op_DeleteProject.go index 7052b90f9ad..9d23737d64c 100644 --- a/service/rekognition/api_op_DeleteProject.go +++ b/service/rekognition/api_op_DeleteProject.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteProjectPolicy.go b/service/rekognition/api_op_DeleteProjectPolicy.go index 81465495277..73db589d97e 100644 --- a/service/rekognition/api_op_DeleteProjectPolicy.go +++ b/service/rekognition/api_op_DeleteProjectPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteProjectPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteProjectVersion.go b/service/rekognition/api_op_DeleteProjectVersion.go index c1c9ae13531..07929bf79f4 100644 --- a/service/rekognition/api_op_DeleteProjectVersion.go +++ b/service/rekognition/api_op_DeleteProjectVersion.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteProjectVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteStreamProcessor.go b/service/rekognition/api_op_DeleteStreamProcessor.go index 5b6026f1f1b..49a916b4049 100644 --- a/service/rekognition/api_op_DeleteStreamProcessor.go +++ b/service/rekognition/api_op_DeleteStreamProcessor.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteStreamProcessorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStreamProcessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DeleteUser.go b/service/rekognition/api_op_DeleteUser.go index a047029c811..aea083780aa 100644 --- a/service/rekognition/api_op_DeleteUser.go +++ b/service/rekognition/api_op_DeleteUser.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteUserMiddleware(stack, options); err != nil { return err } diff --git a/service/rekognition/api_op_DescribeCollection.go b/service/rekognition/api_op_DescribeCollection.go index 3a4313f3ff7..41eed98df63 100644 --- a/service/rekognition/api_op_DescribeCollection.go +++ b/service/rekognition/api_op_DescribeCollection.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeCollectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DescribeDataset.go b/service/rekognition/api_op_DescribeDataset.go index 1e91a7eb7ab..8d95b77cdee 100644 --- a/service/rekognition/api_op_DescribeDataset.go +++ b/service/rekognition/api_op_DescribeDataset.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeDatasetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatasetValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DescribeProjectVersions.go b/service/rekognition/api_op_DescribeProjectVersions.go index 9192db0aedf..a2e3bd4f480 100644 --- a/service/rekognition/api_op_DescribeProjectVersions.go +++ b/service/rekognition/api_op_DescribeProjectVersions.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeProjectVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectVersionsValidationMiddleware(stack); err != nil { return err } @@ -166,100 +169,6 @@ func (c *Client) addOperationDescribeProjectVersionsMiddlewares(stack *middlewar return nil } -// DescribeProjectVersionsAPIClient is a client that implements the -// DescribeProjectVersions operation. -type DescribeProjectVersionsAPIClient interface { - DescribeProjectVersions(context.Context, *DescribeProjectVersionsInput, ...func(*Options)) (*DescribeProjectVersionsOutput, error) -} - -var _ DescribeProjectVersionsAPIClient = (*Client)(nil) - -// DescribeProjectVersionsPaginatorOptions is the paginator options for -// DescribeProjectVersions -type DescribeProjectVersionsPaginatorOptions struct { - // The maximum number of results to return per paginated call. The largest value - // you can specify is 100. If you specify a value greater than 100, a - // ValidationException error occurs. The default value is 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeProjectVersionsPaginator is a paginator for DescribeProjectVersions -type DescribeProjectVersionsPaginator struct { - options DescribeProjectVersionsPaginatorOptions - client DescribeProjectVersionsAPIClient - params *DescribeProjectVersionsInput - nextToken *string - firstPage bool -} - -// NewDescribeProjectVersionsPaginator returns a new -// DescribeProjectVersionsPaginator -func NewDescribeProjectVersionsPaginator(client DescribeProjectVersionsAPIClient, params *DescribeProjectVersionsInput, optFns ...func(*DescribeProjectVersionsPaginatorOptions)) *DescribeProjectVersionsPaginator { - if params == nil { - params = &DescribeProjectVersionsInput{} - } - - options := DescribeProjectVersionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeProjectVersionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeProjectVersionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeProjectVersions page. -func (p *DescribeProjectVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeProjectVersionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeProjectVersions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - // ProjectVersionRunningWaiterOptions are waiter options for // ProjectVersionRunningWaiter type ProjectVersionRunningWaiterOptions struct { @@ -377,7 +286,13 @@ func (w *ProjectVersionRunningWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeProjectVersions(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -594,7 +509,13 @@ func (w *ProjectVersionTrainingCompletedWaiter) WaitForOutput(ctx context.Contex } out, err := w.client.DescribeProjectVersions(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -691,6 +612,103 @@ func projectVersionTrainingCompletedStateRetryable(ctx context.Context, input *D return true, nil } +// DescribeProjectVersionsPaginatorOptions is the paginator options for +// DescribeProjectVersions +type DescribeProjectVersionsPaginatorOptions struct { + // The maximum number of results to return per paginated call. The largest value + // you can specify is 100. If you specify a value greater than 100, a + // ValidationException error occurs. The default value is 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// DescribeProjectVersionsPaginator is a paginator for DescribeProjectVersions +type DescribeProjectVersionsPaginator struct { + options DescribeProjectVersionsPaginatorOptions + client DescribeProjectVersionsAPIClient + params *DescribeProjectVersionsInput + nextToken *string + firstPage bool +} + +// NewDescribeProjectVersionsPaginator returns a new +// DescribeProjectVersionsPaginator +func NewDescribeProjectVersionsPaginator(client DescribeProjectVersionsAPIClient, params *DescribeProjectVersionsInput, optFns ...func(*DescribeProjectVersionsPaginatorOptions)) *DescribeProjectVersionsPaginator { + if params == nil { + params = &DescribeProjectVersionsInput{} + } + + options := DescribeProjectVersionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeProjectVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeProjectVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeProjectVersions page. +func (p *DescribeProjectVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeProjectVersionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeProjectVersions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeProjectVersionsAPIClient is a client that implements the +// DescribeProjectVersions operation. +type DescribeProjectVersionsAPIClient interface { + DescribeProjectVersions(context.Context, *DescribeProjectVersionsInput, ...func(*Options)) (*DescribeProjectVersionsOutput, error) +} + +var _ DescribeProjectVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeProjectVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_DescribeProjects.go b/service/rekognition/api_op_DescribeProjects.go index 088ac615f15..3c30511c28a 100644 --- a/service/rekognition/api_op_DescribeProjects.go +++ b/service/rekognition/api_op_DescribeProjects.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeProjectsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProjects(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeProjectsMiddlewares(stack *middleware.Stack return nil } -// DescribeProjectsAPIClient is a client that implements the DescribeProjects -// operation. -type DescribeProjectsAPIClient interface { - DescribeProjects(context.Context, *DescribeProjectsInput, ...func(*Options)) (*DescribeProjectsOutput, error) -} - -var _ DescribeProjectsAPIClient = (*Client)(nil) - // DescribeProjectsPaginatorOptions is the paginator options for DescribeProjects type DescribeProjectsPaginatorOptions struct { // The maximum number of results to return per paginated call. The largest value @@ -223,6 +218,9 @@ func (p *DescribeProjectsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeProjectsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeProjectsAPIClient is a client that implements the DescribeProjects +// operation. +type DescribeProjectsAPIClient interface { + DescribeProjects(context.Context, *DescribeProjectsInput, ...func(*Options)) (*DescribeProjectsOutput, error) +} + +var _ DescribeProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_DescribeStreamProcessor.go b/service/rekognition/api_op_DescribeStreamProcessor.go index a374b9af859..8cf88fd5d68 100644 --- a/service/rekognition/api_op_DescribeStreamProcessor.go +++ b/service/rekognition/api_op_DescribeStreamProcessor.go @@ -169,6 +169,9 @@ func (c *Client) addOperationDescribeStreamProcessorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStreamProcessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DetectCustomLabels.go b/service/rekognition/api_op_DetectCustomLabels.go index 5ce47bcc3bc..fcf8b27e3d1 100644 --- a/service/rekognition/api_op_DetectCustomLabels.go +++ b/service/rekognition/api_op_DetectCustomLabels.go @@ -196,6 +196,9 @@ func (c *Client) addOperationDetectCustomLabelsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectCustomLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DetectFaces.go b/service/rekognition/api_op_DetectFaces.go index 6d4bba24c75..aaebf9a7c31 100644 --- a/service/rekognition/api_op_DetectFaces.go +++ b/service/rekognition/api_op_DetectFaces.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDetectFacesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectFacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DetectLabels.go b/service/rekognition/api_op_DetectLabels.go index 2455bd0243a..35d1cdb4921 100644 --- a/service/rekognition/api_op_DetectLabels.go +++ b/service/rekognition/api_op_DetectLabels.go @@ -273,6 +273,9 @@ func (c *Client) addOperationDetectLabelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DetectModerationLabels.go b/service/rekognition/api_op_DetectModerationLabels.go index 0ca1a4c6543..905e68ef44f 100644 --- a/service/rekognition/api_op_DetectModerationLabels.go +++ b/service/rekognition/api_op_DetectModerationLabels.go @@ -162,6 +162,9 @@ func (c *Client) addOperationDetectModerationLabelsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectModerationLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DetectProtectiveEquipment.go b/service/rekognition/api_op_DetectProtectiveEquipment.go index 7eaab3ad986..f425f2adb50 100644 --- a/service/rekognition/api_op_DetectProtectiveEquipment.go +++ b/service/rekognition/api_op_DetectProtectiveEquipment.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDetectProtectiveEquipmentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectProtectiveEquipmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DetectText.go b/service/rekognition/api_op_DetectText.go index c9ca1464370..90f1ddce07b 100644 --- a/service/rekognition/api_op_DetectText.go +++ b/service/rekognition/api_op_DetectText.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDetectTextMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectTextValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_DisassociateFaces.go b/service/rekognition/api_op_DisassociateFaces.go index a973778c098..e99e44f1389 100644 --- a/service/rekognition/api_op_DisassociateFaces.go +++ b/service/rekognition/api_op_DisassociateFaces.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDisassociateFacesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateFacesMiddleware(stack, options); err != nil { return err } diff --git a/service/rekognition/api_op_DistributeDatasetEntries.go b/service/rekognition/api_op_DistributeDatasetEntries.go index 10fe0153836..1d86a227b8e 100644 --- a/service/rekognition/api_op_DistributeDatasetEntries.go +++ b/service/rekognition/api_op_DistributeDatasetEntries.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDistributeDatasetEntriesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDistributeDatasetEntriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_GetCelebrityInfo.go b/service/rekognition/api_op_GetCelebrityInfo.go index 6a2aa3ab7d3..c38729b7dea 100644 --- a/service/rekognition/api_op_GetCelebrityInfo.go +++ b/service/rekognition/api_op_GetCelebrityInfo.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetCelebrityInfoMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCelebrityInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_GetCelebrityRecognition.go b/service/rekognition/api_op_GetCelebrityRecognition.go index 6ee18ac9882..c8f6d512b21 100644 --- a/service/rekognition/api_op_GetCelebrityRecognition.go +++ b/service/rekognition/api_op_GetCelebrityRecognition.go @@ -198,6 +198,9 @@ func (c *Client) addOperationGetCelebrityRecognitionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCelebrityRecognitionValidationMiddleware(stack); err != nil { return err } @@ -222,14 +225,6 @@ func (c *Client) addOperationGetCelebrityRecognitionMiddlewares(stack *middlewar return nil } -// GetCelebrityRecognitionAPIClient is a client that implements the -// GetCelebrityRecognition operation. -type GetCelebrityRecognitionAPIClient interface { - GetCelebrityRecognition(context.Context, *GetCelebrityRecognitionInput, ...func(*Options)) (*GetCelebrityRecognitionOutput, error) -} - -var _ GetCelebrityRecognitionAPIClient = (*Client)(nil) - // GetCelebrityRecognitionPaginatorOptions is the paginator options for // GetCelebrityRecognition type GetCelebrityRecognitionPaginatorOptions struct { @@ -297,6 +292,9 @@ func (p *GetCelebrityRecognitionPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCelebrityRecognition(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -316,6 +314,14 @@ func (p *GetCelebrityRecognitionPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetCelebrityRecognitionAPIClient is a client that implements the +// GetCelebrityRecognition operation. +type GetCelebrityRecognitionAPIClient interface { + GetCelebrityRecognition(context.Context, *GetCelebrityRecognitionInput, ...func(*Options)) (*GetCelebrityRecognitionOutput, error) +} + +var _ GetCelebrityRecognitionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCelebrityRecognition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetContentModeration.go b/service/rekognition/api_op_GetContentModeration.go index 33e0c9005d0..385ed199d4c 100644 --- a/service/rekognition/api_op_GetContentModeration.go +++ b/service/rekognition/api_op_GetContentModeration.go @@ -204,6 +204,9 @@ func (c *Client) addOperationGetContentModerationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContentModerationValidationMiddleware(stack); err != nil { return err } @@ -228,14 +231,6 @@ func (c *Client) addOperationGetContentModerationMiddlewares(stack *middleware.S return nil } -// GetContentModerationAPIClient is a client that implements the -// GetContentModeration operation. -type GetContentModerationAPIClient interface { - GetContentModeration(context.Context, *GetContentModerationInput, ...func(*Options)) (*GetContentModerationOutput, error) -} - -var _ GetContentModerationAPIClient = (*Client)(nil) - // GetContentModerationPaginatorOptions is the paginator options for // GetContentModeration type GetContentModerationPaginatorOptions struct { @@ -302,6 +297,9 @@ func (p *GetContentModerationPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetContentModeration(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -321,6 +319,14 @@ func (p *GetContentModerationPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// GetContentModerationAPIClient is a client that implements the +// GetContentModeration operation. +type GetContentModerationAPIClient interface { + GetContentModeration(context.Context, *GetContentModerationInput, ...func(*Options)) (*GetContentModerationOutput, error) +} + +var _ GetContentModerationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetContentModeration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetFaceDetection.go b/service/rekognition/api_op_GetFaceDetection.go index 4a92db8f2e8..4b37eb25a7d 100644 --- a/service/rekognition/api_op_GetFaceDetection.go +++ b/service/rekognition/api_op_GetFaceDetection.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetFaceDetectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFaceDetectionValidationMiddleware(stack); err != nil { return err } @@ -194,14 +197,6 @@ func (c *Client) addOperationGetFaceDetectionMiddlewares(stack *middleware.Stack return nil } -// GetFaceDetectionAPIClient is a client that implements the GetFaceDetection -// operation. -type GetFaceDetectionAPIClient interface { - GetFaceDetection(context.Context, *GetFaceDetectionInput, ...func(*Options)) (*GetFaceDetectionOutput, error) -} - -var _ GetFaceDetectionAPIClient = (*Client)(nil) - // GetFaceDetectionPaginatorOptions is the paginator options for GetFaceDetection type GetFaceDetectionPaginatorOptions struct { // Maximum number of results to return per paginated call. The largest value you @@ -267,6 +262,9 @@ func (p *GetFaceDetectionPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFaceDetection(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +284,14 @@ func (p *GetFaceDetectionPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetFaceDetectionAPIClient is a client that implements the GetFaceDetection +// operation. +type GetFaceDetectionAPIClient interface { + GetFaceDetection(context.Context, *GetFaceDetectionInput, ...func(*Options)) (*GetFaceDetectionOutput, error) +} + +var _ GetFaceDetectionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFaceDetection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetFaceLivenessSessionResults.go b/service/rekognition/api_op_GetFaceLivenessSessionResults.go index e4976384daf..82e54216df2 100644 --- a/service/rekognition/api_op_GetFaceLivenessSessionResults.go +++ b/service/rekognition/api_op_GetFaceLivenessSessionResults.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetFaceLivenessSessionResultsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFaceLivenessSessionResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_GetFaceSearch.go b/service/rekognition/api_op_GetFaceSearch.go index b1af8bca036..2d963eff2d9 100644 --- a/service/rekognition/api_op_GetFaceSearch.go +++ b/service/rekognition/api_op_GetFaceSearch.go @@ -186,6 +186,9 @@ func (c *Client) addOperationGetFaceSearchMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFaceSearchValidationMiddleware(stack); err != nil { return err } @@ -210,13 +213,6 @@ func (c *Client) addOperationGetFaceSearchMiddlewares(stack *middleware.Stack, o return nil } -// GetFaceSearchAPIClient is a client that implements the GetFaceSearch operation. -type GetFaceSearchAPIClient interface { - GetFaceSearch(context.Context, *GetFaceSearchInput, ...func(*Options)) (*GetFaceSearchOutput, error) -} - -var _ GetFaceSearchAPIClient = (*Client)(nil) - // GetFaceSearchPaginatorOptions is the paginator options for GetFaceSearch type GetFaceSearchPaginatorOptions struct { // Maximum number of results to return per paginated call. The largest value you @@ -282,6 +278,9 @@ func (p *GetFaceSearchPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFaceSearch(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -301,6 +300,13 @@ func (p *GetFaceSearchPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetFaceSearchAPIClient is a client that implements the GetFaceSearch operation. +type GetFaceSearchAPIClient interface { + GetFaceSearch(context.Context, *GetFaceSearchInput, ...func(*Options)) (*GetFaceSearchOutput, error) +} + +var _ GetFaceSearchAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFaceSearch(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetLabelDetection.go b/service/rekognition/api_op_GetLabelDetection.go index 961bc2edbc5..95806ded0fa 100644 --- a/service/rekognition/api_op_GetLabelDetection.go +++ b/service/rekognition/api_op_GetLabelDetection.go @@ -233,6 +233,9 @@ func (c *Client) addOperationGetLabelDetectionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLabelDetectionValidationMiddleware(stack); err != nil { return err } @@ -257,14 +260,6 @@ func (c *Client) addOperationGetLabelDetectionMiddlewares(stack *middleware.Stac return nil } -// GetLabelDetectionAPIClient is a client that implements the GetLabelDetection -// operation. -type GetLabelDetectionAPIClient interface { - GetLabelDetection(context.Context, *GetLabelDetectionInput, ...func(*Options)) (*GetLabelDetectionOutput, error) -} - -var _ GetLabelDetectionAPIClient = (*Client)(nil) - // GetLabelDetectionPaginatorOptions is the paginator options for GetLabelDetection type GetLabelDetectionPaginatorOptions struct { // Maximum number of results to return per paginated call. The largest value you @@ -330,6 +325,9 @@ func (p *GetLabelDetectionPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetLabelDetection(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -349,6 +347,14 @@ func (p *GetLabelDetectionPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetLabelDetectionAPIClient is a client that implements the GetLabelDetection +// operation. +type GetLabelDetectionAPIClient interface { + GetLabelDetection(context.Context, *GetLabelDetectionInput, ...func(*Options)) (*GetLabelDetectionOutput, error) +} + +var _ GetLabelDetectionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetLabelDetection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetMediaAnalysisJob.go b/service/rekognition/api_op_GetMediaAnalysisJob.go index 0293bd343e8..627dd092eb7 100644 --- a/service/rekognition/api_op_GetMediaAnalysisJob.go +++ b/service/rekognition/api_op_GetMediaAnalysisJob.go @@ -155,6 +155,9 @@ func (c *Client) addOperationGetMediaAnalysisJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMediaAnalysisJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_GetPersonTracking.go b/service/rekognition/api_op_GetPersonTracking.go index 1ebb03c4ec8..8f69c4ae33e 100644 --- a/service/rekognition/api_op_GetPersonTracking.go +++ b/service/rekognition/api_op_GetPersonTracking.go @@ -186,6 +186,9 @@ func (c *Client) addOperationGetPersonTrackingMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPersonTrackingValidationMiddleware(stack); err != nil { return err } @@ -210,14 +213,6 @@ func (c *Client) addOperationGetPersonTrackingMiddlewares(stack *middleware.Stac return nil } -// GetPersonTrackingAPIClient is a client that implements the GetPersonTracking -// operation. -type GetPersonTrackingAPIClient interface { - GetPersonTracking(context.Context, *GetPersonTrackingInput, ...func(*Options)) (*GetPersonTrackingOutput, error) -} - -var _ GetPersonTrackingAPIClient = (*Client)(nil) - // GetPersonTrackingPaginatorOptions is the paginator options for GetPersonTracking type GetPersonTrackingPaginatorOptions struct { // Maximum number of results to return per paginated call. The largest value you @@ -283,6 +278,9 @@ func (p *GetPersonTrackingPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetPersonTracking(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -302,6 +300,14 @@ func (p *GetPersonTrackingPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetPersonTrackingAPIClient is a client that implements the GetPersonTracking +// operation. +type GetPersonTrackingAPIClient interface { + GetPersonTracking(context.Context, *GetPersonTrackingInput, ...func(*Options)) (*GetPersonTrackingOutput, error) +} + +var _ GetPersonTrackingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetPersonTracking(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetSegmentDetection.go b/service/rekognition/api_op_GetSegmentDetection.go index 571b0f5217c..560a45cd4b5 100644 --- a/service/rekognition/api_op_GetSegmentDetection.go +++ b/service/rekognition/api_op_GetSegmentDetection.go @@ -193,6 +193,9 @@ func (c *Client) addOperationGetSegmentDetectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSegmentDetectionValidationMiddleware(stack); err != nil { return err } @@ -217,14 +220,6 @@ func (c *Client) addOperationGetSegmentDetectionMiddlewares(stack *middleware.St return nil } -// GetSegmentDetectionAPIClient is a client that implements the -// GetSegmentDetection operation. -type GetSegmentDetectionAPIClient interface { - GetSegmentDetection(context.Context, *GetSegmentDetectionInput, ...func(*Options)) (*GetSegmentDetectionOutput, error) -} - -var _ GetSegmentDetectionAPIClient = (*Client)(nil) - // GetSegmentDetectionPaginatorOptions is the paginator options for // GetSegmentDetection type GetSegmentDetectionPaginatorOptions struct { @@ -290,6 +285,9 @@ func (p *GetSegmentDetectionPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSegmentDetection(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -309,6 +307,14 @@ func (p *GetSegmentDetectionPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetSegmentDetectionAPIClient is a client that implements the +// GetSegmentDetection operation. +type GetSegmentDetectionAPIClient interface { + GetSegmentDetection(context.Context, *GetSegmentDetectionInput, ...func(*Options)) (*GetSegmentDetectionOutput, error) +} + +var _ GetSegmentDetectionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSegmentDetection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_GetTextDetection.go b/service/rekognition/api_op_GetTextDetection.go index dbbb9bf11cc..76938798749 100644 --- a/service/rekognition/api_op_GetTextDetection.go +++ b/service/rekognition/api_op_GetTextDetection.go @@ -175,6 +175,9 @@ func (c *Client) addOperationGetTextDetectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTextDetectionValidationMiddleware(stack); err != nil { return err } @@ -199,14 +202,6 @@ func (c *Client) addOperationGetTextDetectionMiddlewares(stack *middleware.Stack return nil } -// GetTextDetectionAPIClient is a client that implements the GetTextDetection -// operation. -type GetTextDetectionAPIClient interface { - GetTextDetection(context.Context, *GetTextDetectionInput, ...func(*Options)) (*GetTextDetectionOutput, error) -} - -var _ GetTextDetectionAPIClient = (*Client)(nil) - // GetTextDetectionPaginatorOptions is the paginator options for GetTextDetection type GetTextDetectionPaginatorOptions struct { // Maximum number of results to return per paginated call. The largest value you @@ -271,6 +266,9 @@ func (p *GetTextDetectionPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTextDetection(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +288,14 @@ func (p *GetTextDetectionPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetTextDetectionAPIClient is a client that implements the GetTextDetection +// operation. +type GetTextDetectionAPIClient interface { + GetTextDetection(context.Context, *GetTextDetectionInput, ...func(*Options)) (*GetTextDetectionOutput, error) +} + +var _ GetTextDetectionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTextDetection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_IndexFaces.go b/service/rekognition/api_op_IndexFaces.go index c623796e8ba..ddbc4dbf718 100644 --- a/service/rekognition/api_op_IndexFaces.go +++ b/service/rekognition/api_op_IndexFaces.go @@ -292,6 +292,9 @@ func (c *Client) addOperationIndexFacesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIndexFacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_ListCollections.go b/service/rekognition/api_op_ListCollections.go index 83f517a7476..356a5546036 100644 --- a/service/rekognition/api_op_ListCollections.go +++ b/service/rekognition/api_op_ListCollections.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCollectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCollections(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListCollectionsMiddlewares(stack *middleware.Stack, return nil } -// ListCollectionsAPIClient is a client that implements the ListCollections -// operation. -type ListCollectionsAPIClient interface { - ListCollections(context.Context, *ListCollectionsInput, ...func(*Options)) (*ListCollectionsOutput, error) -} - -var _ ListCollectionsAPIClient = (*Client)(nil) - // ListCollectionsPaginatorOptions is the paginator options for ListCollections type ListCollectionsPaginatorOptions struct { // Maximum number of collection IDs to return. @@ -216,6 +211,9 @@ func (p *ListCollectionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCollections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListCollectionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListCollectionsAPIClient is a client that implements the ListCollections +// operation. +type ListCollectionsAPIClient interface { + ListCollections(context.Context, *ListCollectionsInput, ...func(*Options)) (*ListCollectionsOutput, error) +} + +var _ ListCollectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCollections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListDatasetEntries.go b/service/rekognition/api_op_ListDatasetEntries.go index 0071b8936dc..ab44b79080a 100644 --- a/service/rekognition/api_op_ListDatasetEntries.go +++ b/service/rekognition/api_op_ListDatasetEntries.go @@ -159,6 +159,9 @@ func (c *Client) addOperationListDatasetEntriesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasetEntriesValidationMiddleware(stack); err != nil { return err } @@ -183,14 +186,6 @@ func (c *Client) addOperationListDatasetEntriesMiddlewares(stack *middleware.Sta return nil } -// ListDatasetEntriesAPIClient is a client that implements the ListDatasetEntries -// operation. -type ListDatasetEntriesAPIClient interface { - ListDatasetEntries(context.Context, *ListDatasetEntriesInput, ...func(*Options)) (*ListDatasetEntriesOutput, error) -} - -var _ ListDatasetEntriesAPIClient = (*Client)(nil) - // ListDatasetEntriesPaginatorOptions is the paginator options for // ListDatasetEntries type ListDatasetEntriesPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *ListDatasetEntriesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetEntries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *ListDatasetEntriesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListDatasetEntriesAPIClient is a client that implements the ListDatasetEntries +// operation. +type ListDatasetEntriesAPIClient interface { + ListDatasetEntries(context.Context, *ListDatasetEntriesInput, ...func(*Options)) (*ListDatasetEntriesOutput, error) +} + +var _ ListDatasetEntriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetEntries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListDatasetLabels.go b/service/rekognition/api_op_ListDatasetLabels.go index f353f1d17b0..bc386c0b31e 100644 --- a/service/rekognition/api_op_ListDatasetLabels.go +++ b/service/rekognition/api_op_ListDatasetLabels.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListDatasetLabelsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDatasetLabelsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListDatasetLabelsMiddlewares(stack *middleware.Stac return nil } -// ListDatasetLabelsAPIClient is a client that implements the ListDatasetLabels -// operation. -type ListDatasetLabelsAPIClient interface { - ListDatasetLabels(context.Context, *ListDatasetLabelsInput, ...func(*Options)) (*ListDatasetLabelsOutput, error) -} - -var _ ListDatasetLabelsAPIClient = (*Client)(nil) - // ListDatasetLabelsPaginatorOptions is the paginator options for ListDatasetLabels type ListDatasetLabelsPaginatorOptions struct { // The maximum number of results to return per paginated call. The largest value @@ -227,6 +222,9 @@ func (p *ListDatasetLabelsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatasetLabels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListDatasetLabelsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListDatasetLabelsAPIClient is a client that implements the ListDatasetLabels +// operation. +type ListDatasetLabelsAPIClient interface { + ListDatasetLabels(context.Context, *ListDatasetLabelsInput, ...func(*Options)) (*ListDatasetLabelsOutput, error) +} + +var _ ListDatasetLabelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatasetLabels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListFaces.go b/service/rekognition/api_op_ListFaces.go index 786bd33bc08..36a907a902d 100644 --- a/service/rekognition/api_op_ListFaces.go +++ b/service/rekognition/api_op_ListFaces.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListFacesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFacesValidationMiddleware(stack); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListFacesMiddlewares(stack *middleware.Stack, optio return nil } -// ListFacesAPIClient is a client that implements the ListFaces operation. -type ListFacesAPIClient interface { - ListFaces(context.Context, *ListFacesInput, ...func(*Options)) (*ListFacesOutput, error) -} - -var _ ListFacesAPIClient = (*Client)(nil) - // ListFacesPaginatorOptions is the paginator options for ListFaces type ListFacesPaginatorOptions struct { // Maximum number of faces to return. @@ -227,6 +223,9 @@ func (p *ListFacesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *ListFacesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListFacesAPIClient is a client that implements the ListFaces operation. +type ListFacesAPIClient interface { + ListFaces(context.Context, *ListFacesInput, ...func(*Options)) (*ListFacesOutput, error) +} + +var _ ListFacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListMediaAnalysisJobs.go b/service/rekognition/api_op_ListMediaAnalysisJobs.go index 525e98bc1a5..6a8d73a7f81 100644 --- a/service/rekognition/api_op_ListMediaAnalysisJobs.go +++ b/service/rekognition/api_op_ListMediaAnalysisJobs.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListMediaAnalysisJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaAnalysisJobs(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListMediaAnalysisJobsMiddlewares(stack *middleware. return nil } -// ListMediaAnalysisJobsAPIClient is a client that implements the -// ListMediaAnalysisJobs operation. -type ListMediaAnalysisJobsAPIClient interface { - ListMediaAnalysisJobs(context.Context, *ListMediaAnalysisJobsInput, ...func(*Options)) (*ListMediaAnalysisJobsOutput, error) -} - -var _ ListMediaAnalysisJobsAPIClient = (*Client)(nil) - // ListMediaAnalysisJobsPaginatorOptions is the paginator options for // ListMediaAnalysisJobs type ListMediaAnalysisJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListMediaAnalysisJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMediaAnalysisJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListMediaAnalysisJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListMediaAnalysisJobsAPIClient is a client that implements the +// ListMediaAnalysisJobs operation. +type ListMediaAnalysisJobsAPIClient interface { + ListMediaAnalysisJobs(context.Context, *ListMediaAnalysisJobsInput, ...func(*Options)) (*ListMediaAnalysisJobsOutput, error) +} + +var _ ListMediaAnalysisJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMediaAnalysisJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListProjectPolicies.go b/service/rekognition/api_op_ListProjectPolicies.go index c98b6716a58..5ed87e0cc6e 100644 --- a/service/rekognition/api_op_ListProjectPolicies.go +++ b/service/rekognition/api_op_ListProjectPolicies.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListProjectPoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProjectPoliciesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListProjectPoliciesMiddlewares(stack *middleware.St return nil } -// ListProjectPoliciesAPIClient is a client that implements the -// ListProjectPolicies operation. -type ListProjectPoliciesAPIClient interface { - ListProjectPolicies(context.Context, *ListProjectPoliciesInput, ...func(*Options)) (*ListProjectPoliciesOutput, error) -} - -var _ ListProjectPoliciesAPIClient = (*Client)(nil) - // ListProjectPoliciesPaginatorOptions is the paginator options for // ListProjectPolicies type ListProjectPoliciesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListProjectPoliciesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjectPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListProjectPoliciesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListProjectPoliciesAPIClient is a client that implements the +// ListProjectPolicies operation. +type ListProjectPoliciesAPIClient interface { + ListProjectPolicies(context.Context, *ListProjectPoliciesInput, ...func(*Options)) (*ListProjectPoliciesOutput, error) +} + +var _ ListProjectPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjectPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListStreamProcessors.go b/service/rekognition/api_op_ListStreamProcessors.go index b5ae160190a..3e6e0652f1a 100644 --- a/service/rekognition/api_op_ListStreamProcessors.go +++ b/service/rekognition/api_op_ListStreamProcessors.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListStreamProcessorsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreamProcessors(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListStreamProcessorsMiddlewares(stack *middleware.S return nil } -// ListStreamProcessorsAPIClient is a client that implements the -// ListStreamProcessors operation. -type ListStreamProcessorsAPIClient interface { - ListStreamProcessors(context.Context, *ListStreamProcessorsInput, ...func(*Options)) (*ListStreamProcessorsOutput, error) -} - -var _ ListStreamProcessorsAPIClient = (*Client)(nil) - // ListStreamProcessorsPaginatorOptions is the paginator options for // ListStreamProcessors type ListStreamProcessorsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListStreamProcessorsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStreamProcessors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListStreamProcessorsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListStreamProcessorsAPIClient is a client that implements the +// ListStreamProcessors operation. +type ListStreamProcessorsAPIClient interface { + ListStreamProcessors(context.Context, *ListStreamProcessorsInput, ...func(*Options)) (*ListStreamProcessorsOutput, error) +} + +var _ ListStreamProcessorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStreamProcessors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_ListTagsForResource.go b/service/rekognition/api_op_ListTagsForResource.go index d96af3f685b..8fc757b1eb0 100644 --- a/service/rekognition/api_op_ListTagsForResource.go +++ b/service/rekognition/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_ListUsers.go b/service/rekognition/api_op_ListUsers.go index c7574dc4add..4a73126cdfa 100644 --- a/service/rekognition/api_op_ListUsers.go +++ b/service/rekognition/api_op_ListUsers.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // Maximum number of UsersID to return. @@ -214,6 +210,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rekognition/api_op_PutProjectPolicy.go b/service/rekognition/api_op_PutProjectPolicy.go index c5e2edd868b..d22651998f3 100644 --- a/service/rekognition/api_op_PutProjectPolicy.go +++ b/service/rekognition/api_op_PutProjectPolicy.go @@ -149,6 +149,9 @@ func (c *Client) addOperationPutProjectPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutProjectPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_RecognizeCelebrities.go b/service/rekognition/api_op_RecognizeCelebrities.go index 209869ef652..9965febbb98 100644 --- a/service/rekognition/api_op_RecognizeCelebrities.go +++ b/service/rekognition/api_op_RecognizeCelebrities.go @@ -167,6 +167,9 @@ func (c *Client) addOperationRecognizeCelebritiesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRecognizeCelebritiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_SearchFaces.go b/service/rekognition/api_op_SearchFaces.go index 5b4fc598443..c4c411f7a08 100644 --- a/service/rekognition/api_op_SearchFaces.go +++ b/service/rekognition/api_op_SearchFaces.go @@ -146,6 +146,9 @@ func (c *Client) addOperationSearchFacesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchFacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_SearchFacesByImage.go b/service/rekognition/api_op_SearchFacesByImage.go index 7c72629bd78..173f40f7f23 100644 --- a/service/rekognition/api_op_SearchFacesByImage.go +++ b/service/rekognition/api_op_SearchFacesByImage.go @@ -193,6 +193,9 @@ func (c *Client) addOperationSearchFacesByImageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchFacesByImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_SearchUsers.go b/service/rekognition/api_op_SearchUsers.go index d54eef609ec..50b95e17bb1 100644 --- a/service/rekognition/api_op_SearchUsers.go +++ b/service/rekognition/api_op_SearchUsers.go @@ -137,6 +137,9 @@ func (c *Client) addOperationSearchUsersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchUsersValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_SearchUsersByImage.go b/service/rekognition/api_op_SearchUsersByImage.go index 23a475c0443..7f1000ce4dd 100644 --- a/service/rekognition/api_op_SearchUsersByImage.go +++ b/service/rekognition/api_op_SearchUsersByImage.go @@ -174,6 +174,9 @@ func (c *Client) addOperationSearchUsersByImageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchUsersByImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartCelebrityRecognition.go b/service/rekognition/api_op_StartCelebrityRecognition.go index 964d597c131..8dc8a4ef099 100644 --- a/service/rekognition/api_op_StartCelebrityRecognition.go +++ b/service/rekognition/api_op_StartCelebrityRecognition.go @@ -140,6 +140,9 @@ func (c *Client) addOperationStartCelebrityRecognitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCelebrityRecognitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartContentModeration.go b/service/rekognition/api_op_StartContentModeration.go index 12f49f7c37d..57289568e51 100644 --- a/service/rekognition/api_op_StartContentModeration.go +++ b/service/rekognition/api_op_StartContentModeration.go @@ -153,6 +153,9 @@ func (c *Client) addOperationStartContentModerationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartContentModerationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartFaceDetection.go b/service/rekognition/api_op_StartFaceDetection.go index 60903638994..797381d0bbc 100644 --- a/service/rekognition/api_op_StartFaceDetection.go +++ b/service/rekognition/api_op_StartFaceDetection.go @@ -147,6 +147,9 @@ func (c *Client) addOperationStartFaceDetectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFaceDetectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartFaceSearch.go b/service/rekognition/api_op_StartFaceSearch.go index 7ceb2e211f5..9f81bdaf179 100644 --- a/service/rekognition/api_op_StartFaceSearch.go +++ b/service/rekognition/api_op_StartFaceSearch.go @@ -148,6 +148,9 @@ func (c *Client) addOperationStartFaceSearchMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFaceSearchValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartLabelDetection.go b/service/rekognition/api_op_StartLabelDetection.go index ad145bd188e..52226fed417 100644 --- a/service/rekognition/api_op_StartLabelDetection.go +++ b/service/rekognition/api_op_StartLabelDetection.go @@ -175,6 +175,9 @@ func (c *Client) addOperationStartLabelDetectionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartLabelDetectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartMediaAnalysisJob.go b/service/rekognition/api_op_StartMediaAnalysisJob.go index cbe8ac04fcc..24ada834f74 100644 --- a/service/rekognition/api_op_StartMediaAnalysisJob.go +++ b/service/rekognition/api_op_StartMediaAnalysisJob.go @@ -134,6 +134,9 @@ func (c *Client) addOperationStartMediaAnalysisJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartMediaAnalysisJobMiddleware(stack, options); err != nil { return err } diff --git a/service/rekognition/api_op_StartPersonTracking.go b/service/rekognition/api_op_StartPersonTracking.go index eee1f04a791..fb9c03d4483 100644 --- a/service/rekognition/api_op_StartPersonTracking.go +++ b/service/rekognition/api_op_StartPersonTracking.go @@ -137,6 +137,9 @@ func (c *Client) addOperationStartPersonTrackingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartPersonTrackingValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartProjectVersion.go b/service/rekognition/api_op_StartProjectVersion.go index c86f19588c3..2aff9bdb248 100644 --- a/service/rekognition/api_op_StartProjectVersion.go +++ b/service/rekognition/api_op_StartProjectVersion.go @@ -132,6 +132,9 @@ func (c *Client) addOperationStartProjectVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartProjectVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartSegmentDetection.go b/service/rekognition/api_op_StartSegmentDetection.go index 6a8c9e9daa8..f00fcf77488 100644 --- a/service/rekognition/api_op_StartSegmentDetection.go +++ b/service/rekognition/api_op_StartSegmentDetection.go @@ -156,6 +156,9 @@ func (c *Client) addOperationStartSegmentDetectionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSegmentDetectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartStreamProcessor.go b/service/rekognition/api_op_StartStreamProcessor.go index 1fa67616a14..7132e244c0f 100644 --- a/service/rekognition/api_op_StartStreamProcessor.go +++ b/service/rekognition/api_op_StartStreamProcessor.go @@ -130,6 +130,9 @@ func (c *Client) addOperationStartStreamProcessorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartStreamProcessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StartTextDetection.go b/service/rekognition/api_op_StartTextDetection.go index 77a9e9de64c..b55dbd2d6cb 100644 --- a/service/rekognition/api_op_StartTextDetection.go +++ b/service/rekognition/api_op_StartTextDetection.go @@ -145,6 +145,9 @@ func (c *Client) addOperationStartTextDetectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTextDetectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StopProjectVersion.go b/service/rekognition/api_op_StopProjectVersion.go index dbf14e52a57..0167fbdcebd 100644 --- a/service/rekognition/api_op_StopProjectVersion.go +++ b/service/rekognition/api_op_StopProjectVersion.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStopProjectVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopProjectVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_StopStreamProcessor.go b/service/rekognition/api_op_StopStreamProcessor.go index da8f097f7b5..be5135a7acf 100644 --- a/service/rekognition/api_op_StopStreamProcessor.go +++ b/service/rekognition/api_op_StopStreamProcessor.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopStreamProcessorMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopStreamProcessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_TagResource.go b/service/rekognition/api_op_TagResource.go index ee2cca42998..0a1b30071cb 100644 --- a/service/rekognition/api_op_TagResource.go +++ b/service/rekognition/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_UntagResource.go b/service/rekognition/api_op_UntagResource.go index fa276e542f1..0cb83ac3b1f 100644 --- a/service/rekognition/api_op_UntagResource.go +++ b/service/rekognition/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_UpdateDatasetEntries.go b/service/rekognition/api_op_UpdateDatasetEntries.go index 8004af50744..7c904cb3085 100644 --- a/service/rekognition/api_op_UpdateDatasetEntries.go +++ b/service/rekognition/api_op_UpdateDatasetEntries.go @@ -135,6 +135,9 @@ func (c *Client) addOperationUpdateDatasetEntriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatasetEntriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/rekognition/api_op_UpdateStreamProcessor.go b/service/rekognition/api_op_UpdateStreamProcessor.go index de52b964b4f..74155b84c9a 100644 --- a/service/rekognition/api_op_UpdateStreamProcessor.go +++ b/service/rekognition/api_op_UpdateStreamProcessor.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateStreamProcessorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStreamProcessorValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_client.go b/service/repostspace/api_client.go index 34235db36b3..2afb0f7363c 100644 --- a/service/repostspace/api_client.go +++ b/service/repostspace/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/repostspace/api_op_CreateSpace.go b/service/repostspace/api_op_CreateSpace.go index 2392fba4273..5f6e7914f9f 100644 --- a/service/repostspace/api_op_CreateSpace.go +++ b/service/repostspace/api_op_CreateSpace.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_DeleteSpace.go b/service/repostspace/api_op_DeleteSpace.go index 09ff95d84be..50a13ad7443 100644 --- a/service/repostspace/api_op_DeleteSpace.go +++ b/service/repostspace/api_op_DeleteSpace.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_DeregisterAdmin.go b/service/repostspace/api_op_DeregisterAdmin.go index f54fcae54d5..5c704a2ba07 100644 --- a/service/repostspace/api_op_DeregisterAdmin.go +++ b/service/repostspace/api_op_DeregisterAdmin.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeregisterAdminMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_GetSpace.go b/service/repostspace/api_op_GetSpace.go index 1dff7fcac6c..5698ddc9676 100644 --- a/service/repostspace/api_op_GetSpace.go +++ b/service/repostspace/api_op_GetSpace.go @@ -190,6 +190,9 @@ func (c *Client) addOperationGetSpaceMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_ListSpaces.go b/service/repostspace/api_op_ListSpaces.go index feec56f2794..4b20e15fd76 100644 --- a/service/repostspace/api_op_ListSpaces.go +++ b/service/repostspace/api_op_ListSpaces.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSpacesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSpaces(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListSpacesMiddlewares(stack *middleware.Stack, opti return nil } -// ListSpacesAPIClient is a client that implements the ListSpaces operation. -type ListSpacesAPIClient interface { - ListSpaces(context.Context, *ListSpacesInput, ...func(*Options)) (*ListSpacesOutput, error) -} - -var _ ListSpacesAPIClient = (*Client)(nil) - // ListSpacesPaginatorOptions is the paginator options for ListSpaces type ListSpacesPaginatorOptions struct { // The maximum number of private re:Posts to include in the results. @@ -206,6 +202,9 @@ func (p *ListSpacesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSpaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListSpacesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListSpacesAPIClient is a client that implements the ListSpaces operation. +type ListSpacesAPIClient interface { + ListSpaces(context.Context, *ListSpacesInput, ...func(*Options)) (*ListSpacesOutput, error) +} + +var _ ListSpacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSpaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/repostspace/api_op_ListTagsForResource.go b/service/repostspace/api_op_ListTagsForResource.go index b5705d66b57..2380a90b391 100644 --- a/service/repostspace/api_op_ListTagsForResource.go +++ b/service/repostspace/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_RegisterAdmin.go b/service/repostspace/api_op_RegisterAdmin.go index 3f7453a6b96..5e83211bed0 100644 --- a/service/repostspace/api_op_RegisterAdmin.go +++ b/service/repostspace/api_op_RegisterAdmin.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRegisterAdminMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterAdminValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_SendInvites.go b/service/repostspace/api_op_SendInvites.go index 5fcc1c2f42c..56cc91e7fcf 100644 --- a/service/repostspace/api_op_SendInvites.go +++ b/service/repostspace/api_op_SendInvites.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSendInvitesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendInvitesValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_TagResource.go b/service/repostspace/api_op_TagResource.go index bc850d369ab..84bb6f0a967 100644 --- a/service/repostspace/api_op_TagResource.go +++ b/service/repostspace/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_UntagResource.go b/service/repostspace/api_op_UntagResource.go index c179ca09cdc..19c9d9f5036 100644 --- a/service/repostspace/api_op_UntagResource.go +++ b/service/repostspace/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/repostspace/api_op_UpdateSpace.go b/service/repostspace/api_op_UpdateSpace.go index 13bc5072b9a..57dab2fa97f 100644 --- a/service/repostspace/api_op_UpdateSpace.go +++ b/service/repostspace/api_op_UpdateSpace.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_client.go b/service/resiliencehub/api_client.go index f74465472e8..78e3a23167b 100644 --- a/service/resiliencehub/api_client.go +++ b/service/resiliencehub/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go b/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go index 7b6ac4918fe..fd37a2bd662 100644 --- a/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go +++ b/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go @@ -145,6 +145,9 @@ func (c *Client) addOperationAddDraftAppVersionResourceMappingsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddDraftAppVersionResourceMappingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_BatchUpdateRecommendationStatus.go b/service/resiliencehub/api_op_BatchUpdateRecommendationStatus.go index ba6128b603f..1b078594d9b 100644 --- a/service/resiliencehub/api_op_BatchUpdateRecommendationStatus.go +++ b/service/resiliencehub/api_op_BatchUpdateRecommendationStatus.go @@ -135,6 +135,9 @@ func (c *Client) addOperationBatchUpdateRecommendationStatusMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateRecommendationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_CreateApp.go b/service/resiliencehub/api_op_CreateApp.go index 1bf41e87d71..7808a0796a1 100644 --- a/service/resiliencehub/api_op_CreateApp.go +++ b/service/resiliencehub/api_op_CreateApp.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_CreateAppVersionAppComponent.go b/service/resiliencehub/api_op_CreateAppVersionAppComponent.go index 1b70be19fad..4fbab1abaa9 100644 --- a/service/resiliencehub/api_op_CreateAppVersionAppComponent.go +++ b/service/resiliencehub/api_op_CreateAppVersionAppComponent.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateAppVersionAppComponentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppVersionAppComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_CreateAppVersionResource.go b/service/resiliencehub/api_op_CreateAppVersionResource.go index 9394b0565b1..d08c87add63 100644 --- a/service/resiliencehub/api_op_CreateAppVersionResource.go +++ b/service/resiliencehub/api_op_CreateAppVersionResource.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateAppVersionResourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAppVersionResourceMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_CreateRecommendationTemplate.go b/service/resiliencehub/api_op_CreateRecommendationTemplate.go index 5de921a4968..7d9bb186703 100644 --- a/service/resiliencehub/api_op_CreateRecommendationTemplate.go +++ b/service/resiliencehub/api_op_CreateRecommendationTemplate.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateRecommendationTemplateMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRecommendationTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_CreateResiliencyPolicy.go b/service/resiliencehub/api_op_CreateResiliencyPolicy.go index 147d1e4a3a2..7ebddb755d5 100644 --- a/service/resiliencehub/api_op_CreateResiliencyPolicy.go +++ b/service/resiliencehub/api_op_CreateResiliencyPolicy.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateResiliencyPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateResiliencyPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteApp.go b/service/resiliencehub/api_op_DeleteApp.go index 16641e194aa..1c0e17eab5e 100644 --- a/service/resiliencehub/api_op_DeleteApp.go +++ b/service/resiliencehub/api_op_DeleteApp.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAppMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteAppAssessment.go b/service/resiliencehub/api_op_DeleteAppAssessment.go index 66569ede424..97965800c60 100644 --- a/service/resiliencehub/api_op_DeleteAppAssessment.go +++ b/service/resiliencehub/api_op_DeleteAppAssessment.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteAppAssessmentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAppAssessmentMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteAppInputSource.go b/service/resiliencehub/api_op_DeleteAppInputSource.go index 2c76e2b6dee..807dc705c12 100644 --- a/service/resiliencehub/api_op_DeleteAppInputSource.go +++ b/service/resiliencehub/api_op_DeleteAppInputSource.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDeleteAppInputSourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAppInputSourceMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteAppVersionAppComponent.go b/service/resiliencehub/api_op_DeleteAppVersionAppComponent.go index 0b5071abd3e..9c9c8cabb0d 100644 --- a/service/resiliencehub/api_op_DeleteAppVersionAppComponent.go +++ b/service/resiliencehub/api_op_DeleteAppVersionAppComponent.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDeleteAppVersionAppComponentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAppVersionAppComponentMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteAppVersionResource.go b/service/resiliencehub/api_op_DeleteAppVersionResource.go index 72f7127cfba..30f09a1b4a9 100644 --- a/service/resiliencehub/api_op_DeleteAppVersionResource.go +++ b/service/resiliencehub/api_op_DeleteAppVersionResource.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDeleteAppVersionResourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteAppVersionResourceMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteRecommendationTemplate.go b/service/resiliencehub/api_op_DeleteRecommendationTemplate.go index 8ee9807a496..0c463abed3f 100644 --- a/service/resiliencehub/api_op_DeleteRecommendationTemplate.go +++ b/service/resiliencehub/api_op_DeleteRecommendationTemplate.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteRecommendationTemplateMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteRecommendationTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DeleteResiliencyPolicy.go b/service/resiliencehub/api_op_DeleteResiliencyPolicy.go index 624bed31b4a..a0e5287e0f1 100644 --- a/service/resiliencehub/api_op_DeleteResiliencyPolicy.go +++ b/service/resiliencehub/api_op_DeleteResiliencyPolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteResiliencyPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteResiliencyPolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeApp.go b/service/resiliencehub/api_op_DescribeApp.go index 0c09ffe1be4..8ce87ca42b6 100644 --- a/service/resiliencehub/api_op_DescribeApp.go +++ b/service/resiliencehub/api_op_DescribeApp.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeAppMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeAppAssessment.go b/service/resiliencehub/api_op_DescribeAppAssessment.go index 858e67fc7f0..974776890ae 100644 --- a/service/resiliencehub/api_op_DescribeAppAssessment.go +++ b/service/resiliencehub/api_op_DescribeAppAssessment.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeAppAssessmentMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppAssessmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeAppVersion.go b/service/resiliencehub/api_op_DescribeAppVersion.go index 7c48f6a7af7..89b58072a36 100644 --- a/service/resiliencehub/api_op_DescribeAppVersion.go +++ b/service/resiliencehub/api_op_DescribeAppVersion.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeAppVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeAppVersionAppComponent.go b/service/resiliencehub/api_op_DescribeAppVersionAppComponent.go index 488fa43a3af..6318e9664a5 100644 --- a/service/resiliencehub/api_op_DescribeAppVersionAppComponent.go +++ b/service/resiliencehub/api_op_DescribeAppVersionAppComponent.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeAppVersionAppComponentMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppVersionAppComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeAppVersionResource.go b/service/resiliencehub/api_op_DescribeAppVersionResource.go index 5d7bb3fdeda..e8d0d4c8d0d 100644 --- a/service/resiliencehub/api_op_DescribeAppVersionResource.go +++ b/service/resiliencehub/api_op_DescribeAppVersionResource.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeAppVersionResourceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppVersionResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeAppVersionResourcesResolutionStatus.go b/service/resiliencehub/api_op_DescribeAppVersionResourcesResolutionStatus.go index 96957078be0..2f28515eca7 100644 --- a/service/resiliencehub/api_op_DescribeAppVersionResourcesResolutionStatus.go +++ b/service/resiliencehub/api_op_DescribeAppVersionResourcesResolutionStatus.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeAppVersionResourcesResolutionStatusMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppVersionResourcesResolutionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeAppVersionTemplate.go b/service/resiliencehub/api_op_DescribeAppVersionTemplate.go index 0f7f07ff00a..5b1cae7be16 100644 --- a/service/resiliencehub/api_op_DescribeAppVersionTemplate.go +++ b/service/resiliencehub/api_op_DescribeAppVersionTemplate.go @@ -335,6 +335,9 @@ func (c *Client) addOperationDescribeAppVersionTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppVersionTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeDraftAppVersionResourcesImportStatus.go b/service/resiliencehub/api_op_DescribeDraftAppVersionResourcesImportStatus.go index ce798c9eb91..a5e9a41ae73 100644 --- a/service/resiliencehub/api_op_DescribeDraftAppVersionResourcesImportStatus.go +++ b/service/resiliencehub/api_op_DescribeDraftAppVersionResourcesImportStatus.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeDraftAppVersionResourcesImportStatusMiddlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDraftAppVersionResourcesImportStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_DescribeResiliencyPolicy.go b/service/resiliencehub/api_op_DescribeResiliencyPolicy.go index c35199bb5bc..18cb6d8ae2e 100644 --- a/service/resiliencehub/api_op_DescribeResiliencyPolicy.go +++ b/service/resiliencehub/api_op_DescribeResiliencyPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeResiliencyPolicyMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResiliencyPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_ImportResourcesToDraftAppVersion.go b/service/resiliencehub/api_op_ImportResourcesToDraftAppVersion.go index fc25d8e09e9..8d05936cd99 100644 --- a/service/resiliencehub/api_op_ImportResourcesToDraftAppVersion.go +++ b/service/resiliencehub/api_op_ImportResourcesToDraftAppVersion.go @@ -156,6 +156,9 @@ func (c *Client) addOperationImportResourcesToDraftAppVersionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportResourcesToDraftAppVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_ListAlarmRecommendations.go b/service/resiliencehub/api_op_ListAlarmRecommendations.go index 601fb1b5237..bb83b0724e7 100644 --- a/service/resiliencehub/api_op_ListAlarmRecommendations.go +++ b/service/resiliencehub/api_op_ListAlarmRecommendations.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAlarmRecommendationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAlarmRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListAlarmRecommendationsMiddlewares(stack *middlewa return nil } -// ListAlarmRecommendationsAPIClient is a client that implements the -// ListAlarmRecommendations operation. -type ListAlarmRecommendationsAPIClient interface { - ListAlarmRecommendations(context.Context, *ListAlarmRecommendationsInput, ...func(*Options)) (*ListAlarmRecommendationsOutput, error) -} - -var _ ListAlarmRecommendationsAPIClient = (*Client)(nil) - // ListAlarmRecommendationsPaginatorOptions is the paginator options for // ListAlarmRecommendations type ListAlarmRecommendationsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAlarmRecommendationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAlarmRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAlarmRecommendationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAlarmRecommendationsAPIClient is a client that implements the +// ListAlarmRecommendations operation. +type ListAlarmRecommendationsAPIClient interface { + ListAlarmRecommendations(context.Context, *ListAlarmRecommendationsInput, ...func(*Options)) (*ListAlarmRecommendationsOutput, error) +} + +var _ ListAlarmRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAlarmRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go b/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go index c0845ef9e79..1136c19d6ce 100644 --- a/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go +++ b/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAppAssessmentComplianceDriftsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppAssessmentComplianceDriftsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAppAssessmentComplianceDriftsMiddlewares(stack return nil } -// ListAppAssessmentComplianceDriftsAPIClient is a client that implements the -// ListAppAssessmentComplianceDrifts operation. -type ListAppAssessmentComplianceDriftsAPIClient interface { - ListAppAssessmentComplianceDrifts(context.Context, *ListAppAssessmentComplianceDriftsInput, ...func(*Options)) (*ListAppAssessmentComplianceDriftsOutput, error) -} - -var _ ListAppAssessmentComplianceDriftsAPIClient = (*Client)(nil) - // ListAppAssessmentComplianceDriftsPaginatorOptions is the paginator options for // ListAppAssessmentComplianceDrifts type ListAppAssessmentComplianceDriftsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListAppAssessmentComplianceDriftsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppAssessmentComplianceDrifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListAppAssessmentComplianceDriftsPaginator) NextPage(ctx context.Contex return result, nil } +// ListAppAssessmentComplianceDriftsAPIClient is a client that implements the +// ListAppAssessmentComplianceDrifts operation. +type ListAppAssessmentComplianceDriftsAPIClient interface { + ListAppAssessmentComplianceDrifts(context.Context, *ListAppAssessmentComplianceDriftsInput, ...func(*Options)) (*ListAppAssessmentComplianceDriftsOutput, error) +} + +var _ ListAppAssessmentComplianceDriftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppAssessmentComplianceDrifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppAssessmentResourceDrifts.go b/service/resiliencehub/api_op_ListAppAssessmentResourceDrifts.go index 12c8292e194..3d000a6901f 100644 --- a/service/resiliencehub/api_op_ListAppAssessmentResourceDrifts.go +++ b/service/resiliencehub/api_op_ListAppAssessmentResourceDrifts.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAppAssessmentResourceDriftsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppAssessmentResourceDriftsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAppAssessmentResourceDriftsMiddlewares(stack *m return nil } -// ListAppAssessmentResourceDriftsAPIClient is a client that implements the -// ListAppAssessmentResourceDrifts operation. -type ListAppAssessmentResourceDriftsAPIClient interface { - ListAppAssessmentResourceDrifts(context.Context, *ListAppAssessmentResourceDriftsInput, ...func(*Options)) (*ListAppAssessmentResourceDriftsOutput, error) -} - -var _ ListAppAssessmentResourceDriftsAPIClient = (*Client)(nil) - // ListAppAssessmentResourceDriftsPaginatorOptions is the paginator options for // ListAppAssessmentResourceDrifts type ListAppAssessmentResourceDriftsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListAppAssessmentResourceDriftsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppAssessmentResourceDrifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListAppAssessmentResourceDriftsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAppAssessmentResourceDriftsAPIClient is a client that implements the +// ListAppAssessmentResourceDrifts operation. +type ListAppAssessmentResourceDriftsAPIClient interface { + ListAppAssessmentResourceDrifts(context.Context, *ListAppAssessmentResourceDriftsInput, ...func(*Options)) (*ListAppAssessmentResourceDriftsOutput, error) +} + +var _ ListAppAssessmentResourceDriftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppAssessmentResourceDrifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppAssessments.go b/service/resiliencehub/api_op_ListAppAssessments.go index d649739263e..6745320ee3e 100644 --- a/service/resiliencehub/api_op_ListAppAssessments.go +++ b/service/resiliencehub/api_op_ListAppAssessments.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListAppAssessmentsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppAssessments(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListAppAssessmentsMiddlewares(stack *middleware.Sta return nil } -// ListAppAssessmentsAPIClient is a client that implements the ListAppAssessments -// operation. -type ListAppAssessmentsAPIClient interface { - ListAppAssessments(context.Context, *ListAppAssessmentsInput, ...func(*Options)) (*ListAppAssessmentsOutput, error) -} - -var _ ListAppAssessmentsAPIClient = (*Client)(nil) - // ListAppAssessmentsPaginatorOptions is the paginator options for // ListAppAssessments type ListAppAssessmentsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListAppAssessmentsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppAssessments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListAppAssessmentsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListAppAssessmentsAPIClient is a client that implements the ListAppAssessments +// operation. +type ListAppAssessmentsAPIClient interface { + ListAppAssessments(context.Context, *ListAppAssessmentsInput, ...func(*Options)) (*ListAppAssessmentsOutput, error) +} + +var _ ListAppAssessmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppAssessments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppComponentCompliances.go b/service/resiliencehub/api_op_ListAppComponentCompliances.go index fa6b1fb4d1e..0bdd54cb53d 100644 --- a/service/resiliencehub/api_op_ListAppComponentCompliances.go +++ b/service/resiliencehub/api_op_ListAppComponentCompliances.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAppComponentCompliancesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppComponentCompliancesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListAppComponentCompliancesMiddlewares(stack *middl return nil } -// ListAppComponentCompliancesAPIClient is a client that implements the -// ListAppComponentCompliances operation. -type ListAppComponentCompliancesAPIClient interface { - ListAppComponentCompliances(context.Context, *ListAppComponentCompliancesInput, ...func(*Options)) (*ListAppComponentCompliancesOutput, error) -} - -var _ ListAppComponentCompliancesAPIClient = (*Client)(nil) - // ListAppComponentCompliancesPaginatorOptions is the paginator options for // ListAppComponentCompliances type ListAppComponentCompliancesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAppComponentCompliancesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppComponentCompliances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAppComponentCompliancesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListAppComponentCompliancesAPIClient is a client that implements the +// ListAppComponentCompliances operation. +type ListAppComponentCompliancesAPIClient interface { + ListAppComponentCompliances(context.Context, *ListAppComponentCompliancesInput, ...func(*Options)) (*ListAppComponentCompliancesOutput, error) +} + +var _ ListAppComponentCompliancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppComponentCompliances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppComponentRecommendations.go b/service/resiliencehub/api_op_ListAppComponentRecommendations.go index dfa47b51a26..b1d2aec57fc 100644 --- a/service/resiliencehub/api_op_ListAppComponentRecommendations.go +++ b/service/resiliencehub/api_op_ListAppComponentRecommendations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListAppComponentRecommendationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppComponentRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListAppComponentRecommendationsMiddlewares(stack *m return nil } -// ListAppComponentRecommendationsAPIClient is a client that implements the -// ListAppComponentRecommendations operation. -type ListAppComponentRecommendationsAPIClient interface { - ListAppComponentRecommendations(context.Context, *ListAppComponentRecommendationsInput, ...func(*Options)) (*ListAppComponentRecommendationsOutput, error) -} - -var _ ListAppComponentRecommendationsAPIClient = (*Client)(nil) - // ListAppComponentRecommendationsPaginatorOptions is the paginator options for // ListAppComponentRecommendations type ListAppComponentRecommendationsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAppComponentRecommendationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppComponentRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAppComponentRecommendationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAppComponentRecommendationsAPIClient is a client that implements the +// ListAppComponentRecommendations operation. +type ListAppComponentRecommendationsAPIClient interface { + ListAppComponentRecommendations(context.Context, *ListAppComponentRecommendationsInput, ...func(*Options)) (*ListAppComponentRecommendationsOutput, error) +} + +var _ ListAppComponentRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppComponentRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppInputSources.go b/service/resiliencehub/api_op_ListAppInputSources.go index bfd823de9bd..973d1a3d964 100644 --- a/service/resiliencehub/api_op_ListAppInputSources.go +++ b/service/resiliencehub/api_op_ListAppInputSources.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListAppInputSourcesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppInputSourcesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListAppInputSourcesMiddlewares(stack *middleware.St return nil } -// ListAppInputSourcesAPIClient is a client that implements the -// ListAppInputSources operation. -type ListAppInputSourcesAPIClient interface { - ListAppInputSources(context.Context, *ListAppInputSourcesInput, ...func(*Options)) (*ListAppInputSourcesOutput, error) -} - -var _ ListAppInputSourcesAPIClient = (*Client)(nil) - // ListAppInputSourcesPaginatorOptions is the paginator options for // ListAppInputSources type ListAppInputSourcesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListAppInputSourcesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppInputSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListAppInputSourcesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAppInputSourcesAPIClient is a client that implements the +// ListAppInputSources operation. +type ListAppInputSourcesAPIClient interface { + ListAppInputSources(context.Context, *ListAppInputSourcesInput, ...func(*Options)) (*ListAppInputSourcesOutput, error) +} + +var _ ListAppInputSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppInputSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppVersionAppComponents.go b/service/resiliencehub/api_op_ListAppVersionAppComponents.go index bc520dfdfee..fba1c04a3ed 100644 --- a/service/resiliencehub/api_op_ListAppVersionAppComponents.go +++ b/service/resiliencehub/api_op_ListAppVersionAppComponents.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListAppVersionAppComponentsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppVersionAppComponentsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListAppVersionAppComponentsMiddlewares(stack *middl return nil } -// ListAppVersionAppComponentsAPIClient is a client that implements the -// ListAppVersionAppComponents operation. -type ListAppVersionAppComponentsAPIClient interface { - ListAppVersionAppComponents(context.Context, *ListAppVersionAppComponentsInput, ...func(*Options)) (*ListAppVersionAppComponentsOutput, error) -} - -var _ ListAppVersionAppComponentsAPIClient = (*Client)(nil) - // ListAppVersionAppComponentsPaginatorOptions is the paginator options for // ListAppVersionAppComponents type ListAppVersionAppComponentsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListAppVersionAppComponentsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppVersionAppComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListAppVersionAppComponentsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListAppVersionAppComponentsAPIClient is a client that implements the +// ListAppVersionAppComponents operation. +type ListAppVersionAppComponentsAPIClient interface { + ListAppVersionAppComponents(context.Context, *ListAppVersionAppComponentsInput, ...func(*Options)) (*ListAppVersionAppComponentsOutput, error) +} + +var _ ListAppVersionAppComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppVersionAppComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppVersionResourceMappings.go b/service/resiliencehub/api_op_ListAppVersionResourceMappings.go index fe404ac9cf0..1ff2e28b071 100644 --- a/service/resiliencehub/api_op_ListAppVersionResourceMappings.go +++ b/service/resiliencehub/api_op_ListAppVersionResourceMappings.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListAppVersionResourceMappingsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppVersionResourceMappingsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListAppVersionResourceMappingsMiddlewares(stack *mi return nil } -// ListAppVersionResourceMappingsAPIClient is a client that implements the -// ListAppVersionResourceMappings operation. -type ListAppVersionResourceMappingsAPIClient interface { - ListAppVersionResourceMappings(context.Context, *ListAppVersionResourceMappingsInput, ...func(*Options)) (*ListAppVersionResourceMappingsOutput, error) -} - -var _ ListAppVersionResourceMappingsAPIClient = (*Client)(nil) - // ListAppVersionResourceMappingsPaginatorOptions is the paginator options for // ListAppVersionResourceMappings type ListAppVersionResourceMappingsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListAppVersionResourceMappingsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppVersionResourceMappings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListAppVersionResourceMappingsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAppVersionResourceMappingsAPIClient is a client that implements the +// ListAppVersionResourceMappings operation. +type ListAppVersionResourceMappingsAPIClient interface { + ListAppVersionResourceMappings(context.Context, *ListAppVersionResourceMappingsInput, ...func(*Options)) (*ListAppVersionResourceMappingsOutput, error) +} + +var _ ListAppVersionResourceMappingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppVersionResourceMappings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppVersionResources.go b/service/resiliencehub/api_op_ListAppVersionResources.go index 2182fef122e..3cb8a1a5a38 100644 --- a/service/resiliencehub/api_op_ListAppVersionResources.go +++ b/service/resiliencehub/api_op_ListAppVersionResources.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListAppVersionResourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppVersionResourcesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListAppVersionResourcesMiddlewares(stack *middlewar return nil } -// ListAppVersionResourcesAPIClient is a client that implements the -// ListAppVersionResources operation. -type ListAppVersionResourcesAPIClient interface { - ListAppVersionResources(context.Context, *ListAppVersionResourcesInput, ...func(*Options)) (*ListAppVersionResourcesOutput, error) -} - -var _ ListAppVersionResourcesAPIClient = (*Client)(nil) - // ListAppVersionResourcesPaginatorOptions is the paginator options for // ListAppVersionResources type ListAppVersionResourcesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListAppVersionResourcesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppVersionResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListAppVersionResourcesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAppVersionResourcesAPIClient is a client that implements the +// ListAppVersionResources operation. +type ListAppVersionResourcesAPIClient interface { + ListAppVersionResources(context.Context, *ListAppVersionResourcesInput, ...func(*Options)) (*ListAppVersionResourcesOutput, error) +} + +var _ ListAppVersionResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppVersionResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListAppVersions.go b/service/resiliencehub/api_op_ListAppVersions.go index 173f3db0ab5..8c976fa408d 100644 --- a/service/resiliencehub/api_op_ListAppVersions.go +++ b/service/resiliencehub/api_op_ListAppVersions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListAppVersionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppVersionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListAppVersionsMiddlewares(stack *middleware.Stack, return nil } -// ListAppVersionsAPIClient is a client that implements the ListAppVersions -// operation. -type ListAppVersionsAPIClient interface { - ListAppVersions(context.Context, *ListAppVersionsInput, ...func(*Options)) (*ListAppVersionsOutput, error) -} - -var _ ListAppVersionsAPIClient = (*Client)(nil) - // ListAppVersionsPaginatorOptions is the paginator options for ListAppVersions type ListAppVersionsPaginatorOptions struct { // Maximum number of results to include in the response. If more results exist @@ -228,6 +223,9 @@ func (p *ListAppVersionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListAppVersionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListAppVersionsAPIClient is a client that implements the ListAppVersions +// operation. +type ListAppVersionsAPIClient interface { + ListAppVersions(context.Context, *ListAppVersionsInput, ...func(*Options)) (*ListAppVersionsOutput, error) +} + +var _ ListAppVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListApps.go b/service/resiliencehub/api_op_ListApps.go index 48aca02d7fc..e0e2076c2fb 100644 --- a/service/resiliencehub/api_op_ListApps.go +++ b/service/resiliencehub/api_op_ListApps.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApps(options.Region), middleware.Before); err != nil { return err } @@ -168,13 +171,6 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option return nil } -// ListAppsAPIClient is a client that implements the ListApps operation. -type ListAppsAPIClient interface { - ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) -} - -var _ ListAppsAPIClient = (*Client)(nil) - // ListAppsPaginatorOptions is the paginator options for ListApps type ListAppsPaginatorOptions struct { // Maximum number of results to include in the response. If more results exist @@ -240,6 +236,9 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +258,13 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListAppsAPIClient is a client that implements the ListApps operation. +type ListAppsAPIClient interface { + ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) +} + +var _ ListAppsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListRecommendationTemplates.go b/service/resiliencehub/api_op_ListRecommendationTemplates.go index c3bf7c80f87..85ee3ee37ec 100644 --- a/service/resiliencehub/api_op_ListRecommendationTemplates.go +++ b/service/resiliencehub/api_op_ListRecommendationTemplates.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRecommendationTemplatesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommendationTemplates(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListRecommendationTemplatesMiddlewares(stack *middl return nil } -// ListRecommendationTemplatesAPIClient is a client that implements the -// ListRecommendationTemplates operation. -type ListRecommendationTemplatesAPIClient interface { - ListRecommendationTemplates(context.Context, *ListRecommendationTemplatesInput, ...func(*Options)) (*ListRecommendationTemplatesOutput, error) -} - -var _ ListRecommendationTemplatesAPIClient = (*Client)(nil) - // ListRecommendationTemplatesPaginatorOptions is the paginator options for // ListRecommendationTemplates type ListRecommendationTemplatesPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListRecommendationTemplatesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendationTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListRecommendationTemplatesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListRecommendationTemplatesAPIClient is a client that implements the +// ListRecommendationTemplates operation. +type ListRecommendationTemplatesAPIClient interface { + ListRecommendationTemplates(context.Context, *ListRecommendationTemplatesInput, ...func(*Options)) (*ListRecommendationTemplatesOutput, error) +} + +var _ ListRecommendationTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendationTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListResiliencyPolicies.go b/service/resiliencehub/api_op_ListResiliencyPolicies.go index 99512ec2ff8..656aa75f375 100644 --- a/service/resiliencehub/api_op_ListResiliencyPolicies.go +++ b/service/resiliencehub/api_op_ListResiliencyPolicies.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListResiliencyPoliciesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResiliencyPolicies(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListResiliencyPoliciesMiddlewares(stack *middleware return nil } -// ListResiliencyPoliciesAPIClient is a client that implements the -// ListResiliencyPolicies operation. -type ListResiliencyPoliciesAPIClient interface { - ListResiliencyPolicies(context.Context, *ListResiliencyPoliciesInput, ...func(*Options)) (*ListResiliencyPoliciesOutput, error) -} - -var _ ListResiliencyPoliciesAPIClient = (*Client)(nil) - // ListResiliencyPoliciesPaginatorOptions is the paginator options for // ListResiliencyPolicies type ListResiliencyPoliciesPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListResiliencyPoliciesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResiliencyPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListResiliencyPoliciesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListResiliencyPoliciesAPIClient is a client that implements the +// ListResiliencyPolicies operation. +type ListResiliencyPoliciesAPIClient interface { + ListResiliencyPolicies(context.Context, *ListResiliencyPoliciesInput, ...func(*Options)) (*ListResiliencyPoliciesOutput, error) +} + +var _ ListResiliencyPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResiliencyPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListSopRecommendations.go b/service/resiliencehub/api_op_ListSopRecommendations.go index cf341648a3f..43b77715e71 100644 --- a/service/resiliencehub/api_op_ListSopRecommendations.go +++ b/service/resiliencehub/api_op_ListSopRecommendations.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListSopRecommendationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSopRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListSopRecommendationsMiddlewares(stack *middleware return nil } -// ListSopRecommendationsAPIClient is a client that implements the -// ListSopRecommendations operation. -type ListSopRecommendationsAPIClient interface { - ListSopRecommendations(context.Context, *ListSopRecommendationsInput, ...func(*Options)) (*ListSopRecommendationsOutput, error) -} - -var _ ListSopRecommendationsAPIClient = (*Client)(nil) - // ListSopRecommendationsPaginatorOptions is the paginator options for // ListSopRecommendations type ListSopRecommendationsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListSopRecommendationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSopRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListSopRecommendationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSopRecommendationsAPIClient is a client that implements the +// ListSopRecommendations operation. +type ListSopRecommendationsAPIClient interface { + ListSopRecommendations(context.Context, *ListSopRecommendationsInput, ...func(*Options)) (*ListSopRecommendationsOutput, error) +} + +var _ ListSopRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSopRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go b/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go index e3b4852754b..b196d7e1a05 100644 --- a/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go +++ b/service/resiliencehub/api_op_ListSuggestedResiliencyPolicies.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListSuggestedResiliencyPoliciesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSuggestedResiliencyPolicies(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListSuggestedResiliencyPoliciesMiddlewares(stack *m return nil } -// ListSuggestedResiliencyPoliciesAPIClient is a client that implements the -// ListSuggestedResiliencyPolicies operation. -type ListSuggestedResiliencyPoliciesAPIClient interface { - ListSuggestedResiliencyPolicies(context.Context, *ListSuggestedResiliencyPoliciesInput, ...func(*Options)) (*ListSuggestedResiliencyPoliciesOutput, error) -} - -var _ ListSuggestedResiliencyPoliciesAPIClient = (*Client)(nil) - // ListSuggestedResiliencyPoliciesPaginatorOptions is the paginator options for // ListSuggestedResiliencyPolicies type ListSuggestedResiliencyPoliciesPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListSuggestedResiliencyPoliciesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSuggestedResiliencyPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListSuggestedResiliencyPoliciesPaginator) NextPage(ctx context.Context, return result, nil } +// ListSuggestedResiliencyPoliciesAPIClient is a client that implements the +// ListSuggestedResiliencyPolicies operation. +type ListSuggestedResiliencyPoliciesAPIClient interface { + ListSuggestedResiliencyPolicies(context.Context, *ListSuggestedResiliencyPoliciesInput, ...func(*Options)) (*ListSuggestedResiliencyPoliciesOutput, error) +} + +var _ ListSuggestedResiliencyPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSuggestedResiliencyPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListTagsForResource.go b/service/resiliencehub/api_op_ListTagsForResource.go index 4cd08d2515e..d59059f6fce 100644 --- a/service/resiliencehub/api_op_ListTagsForResource.go +++ b/service/resiliencehub/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_ListTestRecommendations.go b/service/resiliencehub/api_op_ListTestRecommendations.go index 432e6ce35dd..b3b435e29ce 100644 --- a/service/resiliencehub/api_op_ListTestRecommendations.go +++ b/service/resiliencehub/api_op_ListTestRecommendations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTestRecommendationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTestRecommendationsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListTestRecommendationsMiddlewares(stack *middlewar return nil } -// ListTestRecommendationsAPIClient is a client that implements the -// ListTestRecommendations operation. -type ListTestRecommendationsAPIClient interface { - ListTestRecommendations(context.Context, *ListTestRecommendationsInput, ...func(*Options)) (*ListTestRecommendationsOutput, error) -} - -var _ ListTestRecommendationsAPIClient = (*Client)(nil) - // ListTestRecommendationsPaginatorOptions is the paginator options for // ListTestRecommendations type ListTestRecommendationsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListTestRecommendationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTestRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListTestRecommendationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTestRecommendationsAPIClient is a client that implements the +// ListTestRecommendations operation. +type ListTestRecommendationsAPIClient interface { + ListTestRecommendations(context.Context, *ListTestRecommendationsInput, ...func(*Options)) (*ListTestRecommendationsOutput, error) +} + +var _ ListTestRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTestRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go b/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go index c7c16350dae..33f598fdba6 100644 --- a/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go +++ b/service/resiliencehub/api_op_ListUnsupportedAppVersionResources.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListUnsupportedAppVersionResourcesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUnsupportedAppVersionResourcesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListUnsupportedAppVersionResourcesMiddlewares(stack return nil } -// ListUnsupportedAppVersionResourcesAPIClient is a client that implements the -// ListUnsupportedAppVersionResources operation. -type ListUnsupportedAppVersionResourcesAPIClient interface { - ListUnsupportedAppVersionResources(context.Context, *ListUnsupportedAppVersionResourcesInput, ...func(*Options)) (*ListUnsupportedAppVersionResourcesOutput, error) -} - -var _ ListUnsupportedAppVersionResourcesAPIClient = (*Client)(nil) - // ListUnsupportedAppVersionResourcesPaginatorOptions is the paginator options for // ListUnsupportedAppVersionResources type ListUnsupportedAppVersionResourcesPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListUnsupportedAppVersionResourcesPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUnsupportedAppVersionResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListUnsupportedAppVersionResourcesPaginator) NextPage(ctx context.Conte return result, nil } +// ListUnsupportedAppVersionResourcesAPIClient is a client that implements the +// ListUnsupportedAppVersionResources operation. +type ListUnsupportedAppVersionResourcesAPIClient interface { + ListUnsupportedAppVersionResources(context.Context, *ListUnsupportedAppVersionResourcesInput, ...func(*Options)) (*ListUnsupportedAppVersionResourcesOutput, error) +} + +var _ ListUnsupportedAppVersionResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUnsupportedAppVersionResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resiliencehub/api_op_PublishAppVersion.go b/service/resiliencehub/api_op_PublishAppVersion.go index 33a6a501903..3b30b5fab6e 100644 --- a/service/resiliencehub/api_op_PublishAppVersion.go +++ b/service/resiliencehub/api_op_PublishAppVersion.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPublishAppVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishAppVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_PutDraftAppVersionTemplate.go b/service/resiliencehub/api_op_PutDraftAppVersionTemplate.go index b6d37b23f1c..5751f1e3f03 100644 --- a/service/resiliencehub/api_op_PutDraftAppVersionTemplate.go +++ b/service/resiliencehub/api_op_PutDraftAppVersionTemplate.go @@ -327,6 +327,9 @@ func (c *Client) addOperationPutDraftAppVersionTemplateMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDraftAppVersionTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_RemoveDraftAppVersionResourceMappings.go b/service/resiliencehub/api_op_RemoveDraftAppVersionResourceMappings.go index bc8f34cc71f..be9f1a4a3d4 100644 --- a/service/resiliencehub/api_op_RemoveDraftAppVersionResourceMappings.go +++ b/service/resiliencehub/api_op_RemoveDraftAppVersionResourceMappings.go @@ -142,6 +142,9 @@ func (c *Client) addOperationRemoveDraftAppVersionResourceMappingsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveDraftAppVersionResourceMappingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_ResolveAppVersionResources.go b/service/resiliencehub/api_op_ResolveAppVersionResources.go index c2b1eb3d6e4..9662b13428f 100644 --- a/service/resiliencehub/api_op_ResolveAppVersionResources.go +++ b/service/resiliencehub/api_op_ResolveAppVersionResources.go @@ -138,6 +138,9 @@ func (c *Client) addOperationResolveAppVersionResourcesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResolveAppVersionResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_StartAppAssessment.go b/service/resiliencehub/api_op_StartAppAssessment.go index a5150c7ba24..ac034585887 100644 --- a/service/resiliencehub/api_op_StartAppAssessment.go +++ b/service/resiliencehub/api_op_StartAppAssessment.go @@ -132,6 +132,9 @@ func (c *Client) addOperationStartAppAssessmentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartAppAssessmentMiddleware(stack, options); err != nil { return err } diff --git a/service/resiliencehub/api_op_TagResource.go b/service/resiliencehub/api_op_TagResource.go index a4a2738406a..d0b2997b14c 100644 --- a/service/resiliencehub/api_op_TagResource.go +++ b/service/resiliencehub/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_UntagResource.go b/service/resiliencehub/api_op_UntagResource.go index beb513cbd7a..31f70b7c194 100644 --- a/service/resiliencehub/api_op_UntagResource.go +++ b/service/resiliencehub/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_UpdateApp.go b/service/resiliencehub/api_op_UpdateApp.go index 7e9180ee3e8..3f1923b39e2 100644 --- a/service/resiliencehub/api_op_UpdateApp.go +++ b/service/resiliencehub/api_op_UpdateApp.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_UpdateAppVersion.go b/service/resiliencehub/api_op_UpdateAppVersion.go index 4affbd8542f..38fdea8a7eb 100644 --- a/service/resiliencehub/api_op_UpdateAppVersion.go +++ b/service/resiliencehub/api_op_UpdateAppVersion.go @@ -149,6 +149,9 @@ func (c *Client) addOperationUpdateAppVersionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_UpdateAppVersionAppComponent.go b/service/resiliencehub/api_op_UpdateAppVersionAppComponent.go index 242fc28af7b..dcbf3d6f332 100644 --- a/service/resiliencehub/api_op_UpdateAppVersionAppComponent.go +++ b/service/resiliencehub/api_op_UpdateAppVersionAppComponent.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateAppVersionAppComponentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppVersionAppComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_UpdateAppVersionResource.go b/service/resiliencehub/api_op_UpdateAppVersionResource.go index 3cd47a6e307..730388d7871 100644 --- a/service/resiliencehub/api_op_UpdateAppVersionResource.go +++ b/service/resiliencehub/api_op_UpdateAppVersionResource.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateAppVersionResourceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppVersionResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resiliencehub/api_op_UpdateResiliencyPolicy.go b/service/resiliencehub/api_op_UpdateResiliencyPolicy.go index 97c5462c39f..eb7f8701cd8 100644 --- a/service/resiliencehub/api_op_UpdateResiliencyPolicy.go +++ b/service/resiliencehub/api_op_UpdateResiliencyPolicy.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateResiliencyPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResiliencyPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_client.go b/service/resourceexplorer2/api_client.go index ec53d346882..03bcd901843 100644 --- a/service/resourceexplorer2/api_client.go +++ b/service/resourceexplorer2/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/resourceexplorer2/api_op_AssociateDefaultView.go b/service/resourceexplorer2/api_op_AssociateDefaultView.go index 7ec044016e4..4db32f28471 100644 --- a/service/resourceexplorer2/api_op_AssociateDefaultView.go +++ b/service/resourceexplorer2/api_op_AssociateDefaultView.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAssociateDefaultViewMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDefaultViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_BatchGetView.go b/service/resourceexplorer2/api_op_BatchGetView.go index 5b18f193e8f..e7423a17057 100644 --- a/service/resourceexplorer2/api_op_BatchGetView.go +++ b/service/resourceexplorer2/api_op_BatchGetView.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchGetViewMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetView(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_CreateIndex.go b/service/resourceexplorer2/api_op_CreateIndex.go index 759f93a0711..4f9fe1ff407 100644 --- a/service/resourceexplorer2/api_op_CreateIndex.go +++ b/service/resourceexplorer2/api_op_CreateIndex.go @@ -176,6 +176,9 @@ func (c *Client) addOperationCreateIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIndexMiddleware(stack, options); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_CreateView.go b/service/resourceexplorer2/api_op_CreateView.go index 7470da27b23..0923de7bbec 100644 --- a/service/resourceexplorer2/api_op_CreateView.go +++ b/service/resourceexplorer2/api_op_CreateView.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateViewMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateViewMiddleware(stack, options); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_DeleteIndex.go b/service/resourceexplorer2/api_op_DeleteIndex.go index 2d34fd25faf..da12c276078 100644 --- a/service/resourceexplorer2/api_op_DeleteIndex.go +++ b/service/resourceexplorer2/api_op_DeleteIndex.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteIndexMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIndexValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_DeleteView.go b/service/resourceexplorer2/api_op_DeleteView.go index bfee48213b4..4f471ba8380 100644 --- a/service/resourceexplorer2/api_op_DeleteView.go +++ b/service/resourceexplorer2/api_op_DeleteView.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteViewMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_DisassociateDefaultView.go b/service/resourceexplorer2/api_op_DisassociateDefaultView.go index ee14abf740d..fb319c7e50f 100644 --- a/service/resourceexplorer2/api_op_DisassociateDefaultView.go +++ b/service/resourceexplorer2/api_op_DisassociateDefaultView.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDisassociateDefaultViewMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateDefaultView(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go b/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go index d7cf225faa9..46cb7f63606 100644 --- a/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go +++ b/service/resourceexplorer2/api_op_GetAccountLevelServiceConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAccountLevelServiceConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountLevelServiceConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_GetDefaultView.go b/service/resourceexplorer2/api_op_GetDefaultView.go index 427b2edf4dc..019971a2fa0 100644 --- a/service/resourceexplorer2/api_op_GetDefaultView.go +++ b/service/resourceexplorer2/api_op_GetDefaultView.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetDefaultViewMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultView(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_GetIndex.go b/service/resourceexplorer2/api_op_GetIndex.go index 8172cc30836..b79a0003192 100644 --- a/service/resourceexplorer2/api_op_GetIndex.go +++ b/service/resourceexplorer2/api_op_GetIndex.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetIndexMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIndex(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_GetView.go b/service/resourceexplorer2/api_op_GetView.go index d0cae5a03ce..aacfe3db121 100644 --- a/service/resourceexplorer2/api_op_GetView.go +++ b/service/resourceexplorer2/api_op_GetView.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetViewMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_ListIndexes.go b/service/resourceexplorer2/api_op_ListIndexes.go index 5d77be2dbf3..0ab70e1fddc 100644 --- a/service/resourceexplorer2/api_op_ListIndexes.go +++ b/service/resourceexplorer2/api_op_ListIndexes.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListIndexesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIndexes(options.Region), middleware.Before); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListIndexesMiddlewares(stack *middleware.Stack, opt return nil } -// ListIndexesAPIClient is a client that implements the ListIndexes operation. -type ListIndexesAPIClient interface { - ListIndexes(context.Context, *ListIndexesInput, ...func(*Options)) (*ListIndexesOutput, error) -} - -var _ ListIndexesAPIClient = (*Client)(nil) - // ListIndexesPaginatorOptions is the paginator options for ListIndexes type ListIndexesPaginatorOptions struct { // The maximum number of results that you want included on each page of the @@ -239,6 +235,9 @@ func (p *ListIndexesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIndexes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +257,13 @@ func (p *ListIndexesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListIndexesAPIClient is a client that implements the ListIndexes operation. +type ListIndexesAPIClient interface { + ListIndexes(context.Context, *ListIndexesInput, ...func(*Options)) (*ListIndexesOutput, error) +} + +var _ ListIndexesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIndexes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourceexplorer2/api_op_ListIndexesForMembers.go b/service/resourceexplorer2/api_op_ListIndexesForMembers.go index a86bb8cf8cc..ae0221db987 100644 --- a/service/resourceexplorer2/api_op_ListIndexesForMembers.go +++ b/service/resourceexplorer2/api_op_ListIndexesForMembers.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListIndexesForMembersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIndexesForMembersValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListIndexesForMembersMiddlewares(stack *middleware. return nil } -// ListIndexesForMembersAPIClient is a client that implements the -// ListIndexesForMembers operation. -type ListIndexesForMembersAPIClient interface { - ListIndexesForMembers(context.Context, *ListIndexesForMembersInput, ...func(*Options)) (*ListIndexesForMembersOutput, error) -} - -var _ ListIndexesForMembersAPIClient = (*Client)(nil) - // ListIndexesForMembersPaginatorOptions is the paginator options for // ListIndexesForMembers type ListIndexesForMembersPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListIndexesForMembersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIndexesForMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListIndexesForMembersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListIndexesForMembersAPIClient is a client that implements the +// ListIndexesForMembers operation. +type ListIndexesForMembersAPIClient interface { + ListIndexesForMembers(context.Context, *ListIndexesForMembersInput, ...func(*Options)) (*ListIndexesForMembersOutput, error) +} + +var _ ListIndexesForMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIndexesForMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go b/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go index f38d7340734..d531e8930e9 100644 --- a/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go +++ b/service/resourceexplorer2/api_op_ListSupportedResourceTypes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListSupportedResourceTypesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSupportedResourceTypes(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListSupportedResourceTypesMiddlewares(stack *middle return nil } -// ListSupportedResourceTypesAPIClient is a client that implements the -// ListSupportedResourceTypes operation. -type ListSupportedResourceTypesAPIClient interface { - ListSupportedResourceTypes(context.Context, *ListSupportedResourceTypesInput, ...func(*Options)) (*ListSupportedResourceTypesOutput, error) -} - -var _ ListSupportedResourceTypesAPIClient = (*Client)(nil) - // ListSupportedResourceTypesPaginatorOptions is the paginator options for // ListSupportedResourceTypes type ListSupportedResourceTypesPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListSupportedResourceTypesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSupportedResourceTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListSupportedResourceTypesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSupportedResourceTypesAPIClient is a client that implements the +// ListSupportedResourceTypes operation. +type ListSupportedResourceTypesAPIClient interface { + ListSupportedResourceTypes(context.Context, *ListSupportedResourceTypesInput, ...func(*Options)) (*ListSupportedResourceTypesOutput, error) +} + +var _ ListSupportedResourceTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSupportedResourceTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourceexplorer2/api_op_ListTagsForResource.go b/service/resourceexplorer2/api_op_ListTagsForResource.go index 0a109eece5d..7a30530d985 100644 --- a/service/resourceexplorer2/api_op_ListTagsForResource.go +++ b/service/resourceexplorer2/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_ListViews.go b/service/resourceexplorer2/api_op_ListViews.go index 0937d1cc822..fd3099c8256 100644 --- a/service/resourceexplorer2/api_op_ListViews.go +++ b/service/resourceexplorer2/api_op_ListViews.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListViewsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListViews(options.Region), middleware.Before); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListViewsMiddlewares(stack *middleware.Stack, optio return nil } -// ListViewsAPIClient is a client that implements the ListViews operation. -type ListViewsAPIClient interface { - ListViews(context.Context, *ListViewsInput, ...func(*Options)) (*ListViewsOutput, error) -} - -var _ ListViewsAPIClient = (*Client)(nil) - // ListViewsPaginatorOptions is the paginator options for ListViews type ListViewsPaginatorOptions struct { // The maximum number of results that you want included on each page of the @@ -235,6 +231,9 @@ func (p *ListViewsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListViews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +253,13 @@ func (p *ListViewsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListViewsAPIClient is a client that implements the ListViews operation. +type ListViewsAPIClient interface { + ListViews(context.Context, *ListViewsInput, ...func(*Options)) (*ListViewsOutput, error) +} + +var _ ListViewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListViews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourceexplorer2/api_op_Search.go b/service/resourceexplorer2/api_op_Search.go index db568c4a5aa..4d7c9ab8efc 100644 --- a/service/resourceexplorer2/api_op_Search.go +++ b/service/resourceexplorer2/api_op_Search.go @@ -176,6 +176,9 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchValidationMiddleware(stack); err != nil { return err } @@ -200,13 +203,6 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options return nil } -// SearchAPIClient is a client that implements the Search operation. -type SearchAPIClient interface { - Search(context.Context, *SearchInput, ...func(*Options)) (*SearchOutput, error) -} - -var _ SearchAPIClient = (*Client)(nil) - // SearchPaginatorOptions is the paginator options for Search type SearchPaginatorOptions struct { // The maximum number of results that you want included on each page of the @@ -279,6 +275,9 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Search(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -298,6 +297,13 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) return result, nil } +// SearchAPIClient is a client that implements the Search operation. +type SearchAPIClient interface { + Search(context.Context, *SearchInput, ...func(*Options)) (*SearchOutput, error) +} + +var _ SearchAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearch(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourceexplorer2/api_op_TagResource.go b/service/resourceexplorer2/api_op_TagResource.go index e44c54367a6..049e9f7b0bd 100644 --- a/service/resourceexplorer2/api_op_TagResource.go +++ b/service/resourceexplorer2/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_UntagResource.go b/service/resourceexplorer2/api_op_UntagResource.go index 056e0c814e5..94ee6739a78 100644 --- a/service/resourceexplorer2/api_op_UntagResource.go +++ b/service/resourceexplorer2/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_UpdateIndexType.go b/service/resourceexplorer2/api_op_UpdateIndexType.go index 8c21d3dac33..632847b7dfc 100644 --- a/service/resourceexplorer2/api_op_UpdateIndexType.go +++ b/service/resourceexplorer2/api_op_UpdateIndexType.go @@ -185,6 +185,9 @@ func (c *Client) addOperationUpdateIndexTypeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIndexTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourceexplorer2/api_op_UpdateView.go b/service/resourceexplorer2/api_op_UpdateView.go index 3916456b306..f8c6433b9d8 100644 --- a/service/resourceexplorer2/api_op_UpdateView.go +++ b/service/resourceexplorer2/api_op_UpdateView.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateViewMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_client.go b/service/resourcegroups/api_client.go index cff35f9ae64..d7bd5ddb5c2 100644 --- a/service/resourcegroups/api_client.go +++ b/service/resourcegroups/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/resourcegroups/api_op_CreateGroup.go b/service/resourcegroups/api_op_CreateGroup.go index 676a0a89def..7828ed4c592 100644 --- a/service/resourcegroups/api_op_CreateGroup.go +++ b/service/resourcegroups/api_op_CreateGroup.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_DeleteGroup.go b/service/resourcegroups/api_op_DeleteGroup.go index 6796ead6ebd..228983b9a9c 100644 --- a/service/resourcegroups/api_op_DeleteGroup.go +++ b/service/resourcegroups/api_op_DeleteGroup.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_GetAccountSettings.go b/service/resourcegroups/api_op_GetAccountSettings.go index a8c513e210f..a9b7d86048d 100644 --- a/service/resourcegroups/api_op_GetAccountSettings.go +++ b/service/resourcegroups/api_op_GetAccountSettings.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetAccountSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_GetGroup.go b/service/resourcegroups/api_op_GetGroup.go index db5fde44116..dd38ad8407f 100644 --- a/service/resourcegroups/api_op_GetGroup.go +++ b/service/resourcegroups/api_op_GetGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_GetGroupConfiguration.go b/service/resourcegroups/api_op_GetGroupConfiguration.go index f015e3f96a6..347bf523435 100644 --- a/service/resourcegroups/api_op_GetGroupConfiguration.go +++ b/service/resourcegroups/api_op_GetGroupConfiguration.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetGroupConfigurationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_GetGroupQuery.go b/service/resourcegroups/api_op_GetGroupQuery.go index 62ab7dfe33e..d22dd1328cf 100644 --- a/service/resourcegroups/api_op_GetGroupQuery.go +++ b/service/resourcegroups/api_op_GetGroupQuery.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetGroupQueryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupQuery(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_GetTags.go b/service/resourcegroups/api_op_GetTags.go index 4d64659dd73..e7579e42d49 100644 --- a/service/resourcegroups/api_op_GetTags.go +++ b/service/resourcegroups/api_op_GetTags.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_GroupResources.go b/service/resourcegroups/api_op_GroupResources.go index 1a4a7d5f9ba..7b6e6101a4e 100644 --- a/service/resourcegroups/api_op_GroupResources.go +++ b/service/resourcegroups/api_op_GroupResources.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGroupResourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGroupResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_ListGroupResources.go b/service/resourcegroups/api_op_ListGroupResources.go index a276bbdd55b..0ce5093ccaa 100644 --- a/service/resourcegroups/api_op_ListGroupResources.go +++ b/service/resourcegroups/api_op_ListGroupResources.go @@ -183,6 +183,9 @@ func (c *Client) addOperationListGroupResourcesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupResourcesValidationMiddleware(stack); err != nil { return err } @@ -207,14 +210,6 @@ func (c *Client) addOperationListGroupResourcesMiddlewares(stack *middleware.Sta return nil } -// ListGroupResourcesAPIClient is a client that implements the ListGroupResources -// operation. -type ListGroupResourcesAPIClient interface { - ListGroupResources(context.Context, *ListGroupResourcesInput, ...func(*Options)) (*ListGroupResourcesOutput, error) -} - -var _ ListGroupResourcesAPIClient = (*Client)(nil) - // ListGroupResourcesPaginatorOptions is the paginator options for // ListGroupResources type ListGroupResourcesPaginatorOptions struct { @@ -287,6 +282,9 @@ func (p *ListGroupResourcesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -306,6 +304,14 @@ func (p *ListGroupResourcesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListGroupResourcesAPIClient is a client that implements the ListGroupResources +// operation. +type ListGroupResourcesAPIClient interface { + ListGroupResources(context.Context, *ListGroupResourcesInput, ...func(*Options)) (*ListGroupResourcesOutput, error) +} + +var _ ListGroupResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroups/api_op_ListGroups.go b/service/resourcegroups/api_op_ListGroups.go index fb7e082f8e0..340f978a341 100644 --- a/service/resourcegroups/api_op_ListGroups.go +++ b/service/resourcegroups/api_op_ListGroups.go @@ -162,6 +162,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -186,13 +189,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -264,6 +260,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -283,6 +282,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroups/api_op_PutGroupConfiguration.go b/service/resourcegroups/api_op_PutGroupConfiguration.go index daec16d25fd..0f91830c0a1 100644 --- a/service/resourcegroups/api_op_PutGroupConfiguration.go +++ b/service/resourcegroups/api_op_PutGroupConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutGroupConfigurationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutGroupConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_SearchResources.go b/service/resourcegroups/api_op_SearchResources.go index 13d92b929cd..82227c5b999 100644 --- a/service/resourcegroups/api_op_SearchResources.go +++ b/service/resourcegroups/api_op_SearchResources.go @@ -156,6 +156,9 @@ func (c *Client) addOperationSearchResourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchResourcesValidationMiddleware(stack); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationSearchResourcesMiddlewares(stack *middleware.Stack, return nil } -// SearchResourcesAPIClient is a client that implements the SearchResources -// operation. -type SearchResourcesAPIClient interface { - SearchResources(context.Context, *SearchResourcesInput, ...func(*Options)) (*SearchResourcesOutput, error) -} - -var _ SearchResourcesAPIClient = (*Client)(nil) - // SearchResourcesPaginatorOptions is the paginator options for SearchResources type SearchResourcesPaginatorOptions struct { // The total number of results that you want included on each page of the @@ -259,6 +254,9 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// SearchResourcesAPIClient is a client that implements the SearchResources +// operation. +type SearchResourcesAPIClient interface { + SearchResources(context.Context, *SearchResourcesInput, ...func(*Options)) (*SearchResourcesOutput, error) +} + +var _ SearchResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroups/api_op_Tag.go b/service/resourcegroups/api_op_Tag.go index 143d34546ac..df9a053a72b 100644 --- a/service/resourcegroups/api_op_Tag.go +++ b/service/resourcegroups/api_op_Tag.go @@ -127,6 +127,9 @@ func (c *Client) addOperationTagMiddlewares(stack *middleware.Stack, options Opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_UngroupResources.go b/service/resourcegroups/api_op_UngroupResources.go index 6d8f1f49e86..48340c1cbbf 100644 --- a/service/resourcegroups/api_op_UngroupResources.go +++ b/service/resourcegroups/api_op_UngroupResources.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUngroupResourcesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUngroupResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_Untag.go b/service/resourcegroups/api_op_Untag.go index abf51349fe9..f753d49c391 100644 --- a/service/resourcegroups/api_op_Untag.go +++ b/service/resourcegroups/api_op_Untag.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUntagMiddlewares(stack *middleware.Stack, options O if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroups/api_op_UpdateAccountSettings.go b/service/resourcegroups/api_op_UpdateAccountSettings.go index aeccef153ef..025401c28e5 100644 --- a/service/resourcegroups/api_op_UpdateAccountSettings.go +++ b/service/resourcegroups/api_op_UpdateAccountSettings.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_UpdateGroup.go b/service/resourcegroups/api_op_UpdateGroup.go index e168fd0881f..6ffdb212fa1 100644 --- a/service/resourcegroups/api_op_UpdateGroup.go +++ b/service/resourcegroups/api_op_UpdateGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroups/api_op_UpdateGroupQuery.go b/service/resourcegroups/api_op_UpdateGroupQuery.go index 1922d3bf1f8..6e605fbf89c 100644 --- a/service/resourcegroups/api_op_UpdateGroupQuery.go +++ b/service/resourcegroups/api_op_UpdateGroupQuery.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateGroupQueryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroupstaggingapi/api_client.go b/service/resourcegroupstaggingapi/api_client.go index a223be68057..7ad766fe044 100644 --- a/service/resourcegroupstaggingapi/api_client.go +++ b/service/resourcegroupstaggingapi/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/resourcegroupstaggingapi/api_op_DescribeReportCreation.go b/service/resourcegroupstaggingapi/api_op_DescribeReportCreation.go index 5a6946229a8..ec6a95f9abc 100644 --- a/service/resourcegroupstaggingapi/api_op_DescribeReportCreation.go +++ b/service/resourcegroupstaggingapi/api_op_DescribeReportCreation.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeReportCreationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReportCreation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go b/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go index fe808a1ad41..e066ca26e69 100644 --- a/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go +++ b/service/resourcegroupstaggingapi/api_op_GetComplianceSummary.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetComplianceSummaryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetComplianceSummary(options.Region), middleware.Before); err != nil { return err } @@ -199,14 +202,6 @@ func (c *Client) addOperationGetComplianceSummaryMiddlewares(stack *middleware.S return nil } -// GetComplianceSummaryAPIClient is a client that implements the -// GetComplianceSummary operation. -type GetComplianceSummaryAPIClient interface { - GetComplianceSummary(context.Context, *GetComplianceSummaryInput, ...func(*Options)) (*GetComplianceSummaryOutput, error) -} - -var _ GetComplianceSummaryAPIClient = (*Client)(nil) - // GetComplianceSummaryPaginatorOptions is the paginator options for // GetComplianceSummary type GetComplianceSummaryPaginatorOptions struct { @@ -275,6 +270,9 @@ func (p *GetComplianceSummaryPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetComplianceSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -294,6 +292,14 @@ func (p *GetComplianceSummaryPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// GetComplianceSummaryAPIClient is a client that implements the +// GetComplianceSummary operation. +type GetComplianceSummaryAPIClient interface { + GetComplianceSummary(context.Context, *GetComplianceSummaryInput, ...func(*Options)) (*GetComplianceSummaryOutput, error) +} + +var _ GetComplianceSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetComplianceSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroupstaggingapi/api_op_GetResources.go b/service/resourcegroupstaggingapi/api_op_GetResources.go index b60696c5c13..a539f673fcc 100644 --- a/service/resourcegroupstaggingapi/api_op_GetResources.go +++ b/service/resourcegroupstaggingapi/api_op_GetResources.go @@ -240,6 +240,9 @@ func (c *Client) addOperationGetResourcesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResources(options.Region), middleware.Before); err != nil { return err } @@ -261,13 +264,6 @@ func (c *Client) addOperationGetResourcesMiddlewares(stack *middleware.Stack, op return nil } -// GetResourcesAPIClient is a client that implements the GetResources operation. -type GetResourcesAPIClient interface { - GetResources(context.Context, *GetResourcesInput, ...func(*Options)) (*GetResourcesOutput, error) -} - -var _ GetResourcesAPIClient = (*Client)(nil) - // GetResourcesPaginatorOptions is the paginator options for GetResources type GetResourcesPaginatorOptions struct { // Specifies the maximum number of results to be returned in each page. A query @@ -335,6 +331,9 @@ func (p *GetResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.ResourcesPerPage = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -354,6 +353,13 @@ func (p *GetResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetResourcesAPIClient is a client that implements the GetResources operation. +type GetResourcesAPIClient interface { + GetResources(context.Context, *GetResourcesInput, ...func(*Options)) (*GetResourcesOutput, error) +} + +var _ GetResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroupstaggingapi/api_op_GetTagKeys.go b/service/resourcegroupstaggingapi/api_op_GetTagKeys.go index 54443440c59..8e76386fd66 100644 --- a/service/resourcegroupstaggingapi/api_op_GetTagKeys.go +++ b/service/resourcegroupstaggingapi/api_op_GetTagKeys.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetTagKeysMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTagKeys(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationGetTagKeysMiddlewares(stack *middleware.Stack, opti return nil } -// GetTagKeysAPIClient is a client that implements the GetTagKeys operation. -type GetTagKeysAPIClient interface { - GetTagKeys(context.Context, *GetTagKeysInput, ...func(*Options)) (*GetTagKeysOutput, error) -} - -var _ GetTagKeysAPIClient = (*Client)(nil) - // GetTagKeysPaginatorOptions is the paginator options for GetTagKeys type GetTagKeysPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -197,6 +193,9 @@ func (p *GetTagKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.PaginationToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTagKeys(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -216,6 +215,13 @@ func (p *GetTagKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// GetTagKeysAPIClient is a client that implements the GetTagKeys operation. +type GetTagKeysAPIClient interface { + GetTagKeys(context.Context, *GetTagKeysInput, ...func(*Options)) (*GetTagKeysOutput, error) +} + +var _ GetTagKeysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTagKeys(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroupstaggingapi/api_op_GetTagValues.go b/service/resourcegroupstaggingapi/api_op_GetTagValues.go index 0c2954f74ca..794eb237d66 100644 --- a/service/resourcegroupstaggingapi/api_op_GetTagValues.go +++ b/service/resourcegroupstaggingapi/api_op_GetTagValues.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetTagValuesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTagValuesValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationGetTagValuesMiddlewares(stack *middleware.Stack, op return nil } -// GetTagValuesAPIClient is a client that implements the GetTagValues operation. -type GetTagValuesAPIClient interface { - GetTagValues(context.Context, *GetTagValuesInput, ...func(*Options)) (*GetTagValuesOutput, error) -} - -var _ GetTagValuesAPIClient = (*Client)(nil) - // GetTagValuesPaginatorOptions is the paginator options for GetTagValues type GetTagValuesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -208,6 +204,9 @@ func (p *GetTagValuesPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.PaginationToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTagValues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *GetTagValuesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetTagValuesAPIClient is a client that implements the GetTagValues operation. +type GetTagValuesAPIClient interface { + GetTagValues(context.Context, *GetTagValuesInput, ...func(*Options)) (*GetTagValuesOutput, error) +} + +var _ GetTagValuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTagValues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/resourcegroupstaggingapi/api_op_StartReportCreation.go b/service/resourcegroupstaggingapi/api_op_StartReportCreation.go index c6496276fe1..f30f83f29ab 100644 --- a/service/resourcegroupstaggingapi/api_op_StartReportCreation.go +++ b/service/resourcegroupstaggingapi/api_op_StartReportCreation.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStartReportCreationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartReportCreationValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroupstaggingapi/api_op_TagResources.go b/service/resourcegroupstaggingapi/api_op_TagResources.go index d712b08e764..85d27e07139 100644 --- a/service/resourcegroupstaggingapi/api_op_TagResources.go +++ b/service/resourcegroupstaggingapi/api_op_TagResources.go @@ -155,6 +155,9 @@ func (c *Client) addOperationTagResourcesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/resourcegroupstaggingapi/api_op_UntagResources.go b/service/resourcegroupstaggingapi/api_op_UntagResources.go index 73168c02ba5..bb6fa471220 100644 --- a/service/resourcegroupstaggingapi/api_op_UntagResources.go +++ b/service/resourcegroupstaggingapi/api_op_UntagResources.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUntagResourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_client.go b/service/robomaker/api_client.go index 10f5b3864fe..f12871f3e81 100644 --- a/service/robomaker/api_client.go +++ b/service/robomaker/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/robomaker/api_op_BatchDeleteWorlds.go b/service/robomaker/api_op_BatchDeleteWorlds.go index 5dbd83fa38b..960cee39b39 100644 --- a/service/robomaker/api_op_BatchDeleteWorlds.go +++ b/service/robomaker/api_op_BatchDeleteWorlds.go @@ -106,6 +106,9 @@ func (c *Client) addOperationBatchDeleteWorldsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteWorldsValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_BatchDescribeSimulationJob.go b/service/robomaker/api_op_BatchDescribeSimulationJob.go index 51908a2667f..b285fa8c5cc 100644 --- a/service/robomaker/api_op_BatchDescribeSimulationJob.go +++ b/service/robomaker/api_op_BatchDescribeSimulationJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchDescribeSimulationJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDescribeSimulationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CancelDeploymentJob.go b/service/robomaker/api_op_CancelDeploymentJob.go index 2c00d223353..f8bf62167a6 100644 --- a/service/robomaker/api_op_CancelDeploymentJob.go +++ b/service/robomaker/api_op_CancelDeploymentJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationCancelDeploymentJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDeploymentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CancelSimulationJob.go b/service/robomaker/api_op_CancelSimulationJob.go index 6abec095d93..7cdc14ad04a 100644 --- a/service/robomaker/api_op_CancelSimulationJob.go +++ b/service/robomaker/api_op_CancelSimulationJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelSimulationJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSimulationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CancelSimulationJobBatch.go b/service/robomaker/api_op_CancelSimulationJobBatch.go index 5f24b491712..41978d34590 100644 --- a/service/robomaker/api_op_CancelSimulationJobBatch.go +++ b/service/robomaker/api_op_CancelSimulationJobBatch.go @@ -102,6 +102,9 @@ func (c *Client) addOperationCancelSimulationJobBatchMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSimulationJobBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CancelWorldExportJob.go b/service/robomaker/api_op_CancelWorldExportJob.go index 46ce44f51a8..a8584ac1f8b 100644 --- a/service/robomaker/api_op_CancelWorldExportJob.go +++ b/service/robomaker/api_op_CancelWorldExportJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelWorldExportJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelWorldExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CancelWorldGenerationJob.go b/service/robomaker/api_op_CancelWorldGenerationJob.go index 56545648a3c..619687ee787 100644 --- a/service/robomaker/api_op_CancelWorldGenerationJob.go +++ b/service/robomaker/api_op_CancelWorldGenerationJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationCancelWorldGenerationJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelWorldGenerationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateDeploymentJob.go b/service/robomaker/api_op_CreateDeploymentJob.go index a463ebcf283..47b1ce9106c 100644 --- a/service/robomaker/api_op_CreateDeploymentJob.go +++ b/service/robomaker/api_op_CreateDeploymentJob.go @@ -201,6 +201,9 @@ func (c *Client) addOperationCreateDeploymentJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDeploymentJobMiddleware(stack, options); err != nil { return err } diff --git a/service/robomaker/api_op_CreateFleet.go b/service/robomaker/api_op_CreateFleet.go index 831b364163b..e8376ab36f0 100644 --- a/service/robomaker/api_op_CreateFleet.go +++ b/service/robomaker/api_op_CreateFleet.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateRobot.go b/service/robomaker/api_op_CreateRobot.go index 6960d56450c..347f8042f50 100644 --- a/service/robomaker/api_op_CreateRobot.go +++ b/service/robomaker/api_op_CreateRobot.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateRobotMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRobotValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateRobotApplication.go b/service/robomaker/api_op_CreateRobotApplication.go index 6d38db8d158..333b923b785 100644 --- a/service/robomaker/api_op_CreateRobotApplication.go +++ b/service/robomaker/api_op_CreateRobotApplication.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateRobotApplicationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRobotApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateRobotApplicationVersion.go b/service/robomaker/api_op_CreateRobotApplicationVersion.go index f6b4758ad6a..688d2884a35 100644 --- a/service/robomaker/api_op_CreateRobotApplicationVersion.go +++ b/service/robomaker/api_op_CreateRobotApplicationVersion.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateRobotApplicationVersionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRobotApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateSimulationApplication.go b/service/robomaker/api_op_CreateSimulationApplication.go index 3c7d9db61bd..6f53f59fca3 100644 --- a/service/robomaker/api_op_CreateSimulationApplication.go +++ b/service/robomaker/api_op_CreateSimulationApplication.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateSimulationApplicationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSimulationApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateSimulationApplicationVersion.go b/service/robomaker/api_op_CreateSimulationApplicationVersion.go index d9bfb66a0f6..544b467125c 100644 --- a/service/robomaker/api_op_CreateSimulationApplicationVersion.go +++ b/service/robomaker/api_op_CreateSimulationApplicationVersion.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateSimulationApplicationVersionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSimulationApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_CreateSimulationJob.go b/service/robomaker/api_op_CreateSimulationJob.go index 2ec75b20cb8..47e71139b34 100644 --- a/service/robomaker/api_op_CreateSimulationJob.go +++ b/service/robomaker/api_op_CreateSimulationJob.go @@ -251,6 +251,9 @@ func (c *Client) addOperationCreateSimulationJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSimulationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/robomaker/api_op_CreateWorldExportJob.go b/service/robomaker/api_op_CreateWorldExportJob.go index 4ec2ce28480..d75456aa603 100644 --- a/service/robomaker/api_op_CreateWorldExportJob.go +++ b/service/robomaker/api_op_CreateWorldExportJob.go @@ -181,6 +181,9 @@ func (c *Client) addOperationCreateWorldExportJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorldExportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/robomaker/api_op_CreateWorldGenerationJob.go b/service/robomaker/api_op_CreateWorldGenerationJob.go index 586f311d55e..9a6cd9128a6 100644 --- a/service/robomaker/api_op_CreateWorldGenerationJob.go +++ b/service/robomaker/api_op_CreateWorldGenerationJob.go @@ -178,6 +178,9 @@ func (c *Client) addOperationCreateWorldGenerationJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorldGenerationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/robomaker/api_op_CreateWorldTemplate.go b/service/robomaker/api_op_CreateWorldTemplate.go index 93305ffb71e..b96e771746e 100644 --- a/service/robomaker/api_op_CreateWorldTemplate.go +++ b/service/robomaker/api_op_CreateWorldTemplate.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateWorldTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorldTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DeleteFleet.go b/service/robomaker/api_op_DeleteFleet.go index 8cba5aea6d8..27798c110aa 100644 --- a/service/robomaker/api_op_DeleteFleet.go +++ b/service/robomaker/api_op_DeleteFleet.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DeleteRobot.go b/service/robomaker/api_op_DeleteRobot.go index 93778b5edc0..3a37ee2a1ef 100644 --- a/service/robomaker/api_op_DeleteRobot.go +++ b/service/robomaker/api_op_DeleteRobot.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteRobotMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRobotValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DeleteRobotApplication.go b/service/robomaker/api_op_DeleteRobotApplication.go index 1f479d5de4d..5ece9728518 100644 --- a/service/robomaker/api_op_DeleteRobotApplication.go +++ b/service/robomaker/api_op_DeleteRobotApplication.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteRobotApplicationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRobotApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DeleteSimulationApplication.go b/service/robomaker/api_op_DeleteSimulationApplication.go index 88375eb173e..2113c636ef6 100644 --- a/service/robomaker/api_op_DeleteSimulationApplication.go +++ b/service/robomaker/api_op_DeleteSimulationApplication.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSimulationApplicationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSimulationApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DeleteWorldTemplate.go b/service/robomaker/api_op_DeleteWorldTemplate.go index c98112439f5..2e6801d7176 100644 --- a/service/robomaker/api_op_DeleteWorldTemplate.go +++ b/service/robomaker/api_op_DeleteWorldTemplate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteWorldTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorldTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DeregisterRobot.go b/service/robomaker/api_op_DeregisterRobot.go index c02d5e134e0..6e9a644c4f2 100644 --- a/service/robomaker/api_op_DeregisterRobot.go +++ b/service/robomaker/api_op_DeregisterRobot.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeregisterRobotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterRobotValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeDeploymentJob.go b/service/robomaker/api_op_DescribeDeploymentJob.go index a8ac2d2aae2..961082191f9 100644 --- a/service/robomaker/api_op_DescribeDeploymentJob.go +++ b/service/robomaker/api_op_DescribeDeploymentJob.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeDeploymentJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeploymentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeFleet.go b/service/robomaker/api_op_DescribeFleet.go index a058a5ba470..809e5edb88b 100644 --- a/service/robomaker/api_op_DescribeFleet.go +++ b/service/robomaker/api_op_DescribeFleet.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeFleetMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeRobot.go b/service/robomaker/api_op_DescribeRobot.go index dd277015d23..d405f0b35da 100644 --- a/service/robomaker/api_op_DescribeRobot.go +++ b/service/robomaker/api_op_DescribeRobot.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeRobotMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRobotValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeRobotApplication.go b/service/robomaker/api_op_DescribeRobotApplication.go index ea48ec73c6c..3819953a2ba 100644 --- a/service/robomaker/api_op_DescribeRobotApplication.go +++ b/service/robomaker/api_op_DescribeRobotApplication.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeRobotApplicationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRobotApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeSimulationApplication.go b/service/robomaker/api_op_DescribeSimulationApplication.go index 008598185e3..a2f4c2ff930 100644 --- a/service/robomaker/api_op_DescribeSimulationApplication.go +++ b/service/robomaker/api_op_DescribeSimulationApplication.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeSimulationApplicationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSimulationApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeSimulationJob.go b/service/robomaker/api_op_DescribeSimulationJob.go index 42868fefc23..0c37515499e 100644 --- a/service/robomaker/api_op_DescribeSimulationJob.go +++ b/service/robomaker/api_op_DescribeSimulationJob.go @@ -209,6 +209,9 @@ func (c *Client) addOperationDescribeSimulationJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSimulationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeSimulationJobBatch.go b/service/robomaker/api_op_DescribeSimulationJobBatch.go index 0bd1f752166..434de66d048 100644 --- a/service/robomaker/api_op_DescribeSimulationJobBatch.go +++ b/service/robomaker/api_op_DescribeSimulationJobBatch.go @@ -175,6 +175,9 @@ func (c *Client) addOperationDescribeSimulationJobBatchMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSimulationJobBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeWorld.go b/service/robomaker/api_op_DescribeWorld.go index b4006b4692a..46f5e4defa4 100644 --- a/service/robomaker/api_op_DescribeWorld.go +++ b/service/robomaker/api_op_DescribeWorld.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeWorldMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorldValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeWorldExportJob.go b/service/robomaker/api_op_DescribeWorldExportJob.go index d0bf73b58a0..246f4ba5490 100644 --- a/service/robomaker/api_op_DescribeWorldExportJob.go +++ b/service/robomaker/api_op_DescribeWorldExportJob.go @@ -162,6 +162,9 @@ func (c *Client) addOperationDescribeWorldExportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorldExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeWorldGenerationJob.go b/service/robomaker/api_op_DescribeWorldGenerationJob.go index c2740184b26..0dd846d69a0 100644 --- a/service/robomaker/api_op_DescribeWorldGenerationJob.go +++ b/service/robomaker/api_op_DescribeWorldGenerationJob.go @@ -166,6 +166,9 @@ func (c *Client) addOperationDescribeWorldGenerationJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorldGenerationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_DescribeWorldTemplate.go b/service/robomaker/api_op_DescribeWorldTemplate.go index 9e9a61164ef..7ed39ae328a 100644 --- a/service/robomaker/api_op_DescribeWorldTemplate.go +++ b/service/robomaker/api_op_DescribeWorldTemplate.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeWorldTemplateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorldTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_GetWorldTemplateBody.go b/service/robomaker/api_op_GetWorldTemplateBody.go index 7118c648d14..f0c3c40f4e0 100644 --- a/service/robomaker/api_op_GetWorldTemplateBody.go +++ b/service/robomaker/api_op_GetWorldTemplateBody.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetWorldTemplateBodyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetWorldTemplateBody(options.Region), middleware.Before); err != nil { return err } diff --git a/service/robomaker/api_op_ListDeploymentJobs.go b/service/robomaker/api_op_ListDeploymentJobs.go index a0491520887..2e372902b44 100644 --- a/service/robomaker/api_op_ListDeploymentJobs.go +++ b/service/robomaker/api_op_ListDeploymentJobs.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListDeploymentJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeploymentJobs(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListDeploymentJobsMiddlewares(stack *middleware.Sta return nil } -// ListDeploymentJobsAPIClient is a client that implements the ListDeploymentJobs -// operation. -type ListDeploymentJobsAPIClient interface { - ListDeploymentJobs(context.Context, *ListDeploymentJobsInput, ...func(*Options)) (*ListDeploymentJobsOutput, error) -} - -var _ ListDeploymentJobsAPIClient = (*Client)(nil) - // ListDeploymentJobsPaginatorOptions is the paginator options for // ListDeploymentJobs type ListDeploymentJobsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListDeploymentJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeploymentJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListDeploymentJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListDeploymentJobsAPIClient is a client that implements the ListDeploymentJobs +// operation. +type ListDeploymentJobsAPIClient interface { + ListDeploymentJobs(context.Context, *ListDeploymentJobsInput, ...func(*Options)) (*ListDeploymentJobsOutput, error) +} + +var _ ListDeploymentJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeploymentJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListFleets.go b/service/robomaker/api_op_ListFleets.go index e3f5f188bd5..320896c1a0f 100644 --- a/service/robomaker/api_op_ListFleets.go +++ b/service/robomaker/api_op_ListFleets.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleets(options.Region), middleware.Before); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListFleetsAPIClient is a client that implements the ListFleets operation. -type ListFleetsAPIClient interface { - ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) -} - -var _ ListFleetsAPIClient = (*Client)(nil) - // ListFleetsPaginatorOptions is the paginator options for ListFleets type ListFleetsPaginatorOptions struct { // When this parameter is used, ListFleets only returns maxResults results in a @@ -236,6 +232,9 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +254,13 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListRobotApplications.go b/service/robomaker/api_op_ListRobotApplications.go index 7615ba60c46..d3edd77a763 100644 --- a/service/robomaker/api_op_ListRobotApplications.go +++ b/service/robomaker/api_op_ListRobotApplications.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListRobotApplicationsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRobotApplications(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListRobotApplicationsMiddlewares(stack *middleware. return nil } -// ListRobotApplicationsAPIClient is a client that implements the -// ListRobotApplications operation. -type ListRobotApplicationsAPIClient interface { - ListRobotApplications(context.Context, *ListRobotApplicationsInput, ...func(*Options)) (*ListRobotApplicationsOutput, error) -} - -var _ ListRobotApplicationsAPIClient = (*Client)(nil) - // ListRobotApplicationsPaginatorOptions is the paginator options for // ListRobotApplications type ListRobotApplicationsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListRobotApplicationsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRobotApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListRobotApplicationsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListRobotApplicationsAPIClient is a client that implements the +// ListRobotApplications operation. +type ListRobotApplicationsAPIClient interface { + ListRobotApplications(context.Context, *ListRobotApplicationsInput, ...func(*Options)) (*ListRobotApplicationsOutput, error) +} + +var _ ListRobotApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRobotApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListRobots.go b/service/robomaker/api_op_ListRobots.go index 993792f2635..5cdbd6a725d 100644 --- a/service/robomaker/api_op_ListRobots.go +++ b/service/robomaker/api_op_ListRobots.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRobotsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRobots(options.Region), middleware.Before); err != nil { return err } @@ -160,13 +163,6 @@ func (c *Client) addOperationListRobotsMiddlewares(stack *middleware.Stack, opti return nil } -// ListRobotsAPIClient is a client that implements the ListRobots operation. -type ListRobotsAPIClient interface { - ListRobots(context.Context, *ListRobotsInput, ...func(*Options)) (*ListRobotsOutput, error) -} - -var _ ListRobotsAPIClient = (*Client)(nil) - // ListRobotsPaginatorOptions is the paginator options for ListRobots type ListRobotsPaginatorOptions struct { // When this parameter is used, ListRobots only returns maxResults results in a @@ -235,6 +231,9 @@ func (p *ListRobotsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRobots(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +253,13 @@ func (p *ListRobotsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListRobotsAPIClient is a client that implements the ListRobots operation. +type ListRobotsAPIClient interface { + ListRobots(context.Context, *ListRobotsInput, ...func(*Options)) (*ListRobotsOutput, error) +} + +var _ ListRobotsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRobots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListSimulationApplications.go b/service/robomaker/api_op_ListSimulationApplications.go index eb1450c8742..7f1f69c9332 100644 --- a/service/robomaker/api_op_ListSimulationApplications.go +++ b/service/robomaker/api_op_ListSimulationApplications.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListSimulationApplicationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSimulationApplications(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListSimulationApplicationsMiddlewares(stack *middle return nil } -// ListSimulationApplicationsAPIClient is a client that implements the -// ListSimulationApplications operation. -type ListSimulationApplicationsAPIClient interface { - ListSimulationApplications(context.Context, *ListSimulationApplicationsInput, ...func(*Options)) (*ListSimulationApplicationsOutput, error) -} - -var _ ListSimulationApplicationsAPIClient = (*Client)(nil) - // ListSimulationApplicationsPaginatorOptions is the paginator options for // ListSimulationApplications type ListSimulationApplicationsPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListSimulationApplicationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSimulationApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListSimulationApplicationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSimulationApplicationsAPIClient is a client that implements the +// ListSimulationApplications operation. +type ListSimulationApplicationsAPIClient interface { + ListSimulationApplications(context.Context, *ListSimulationApplicationsInput, ...func(*Options)) (*ListSimulationApplicationsOutput, error) +} + +var _ ListSimulationApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSimulationApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListSimulationJobBatches.go b/service/robomaker/api_op_ListSimulationJobBatches.go index 86f30736795..8095715964e 100644 --- a/service/robomaker/api_op_ListSimulationJobBatches.go +++ b/service/robomaker/api_op_ListSimulationJobBatches.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListSimulationJobBatchesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSimulationJobBatches(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListSimulationJobBatchesMiddlewares(stack *middlewa return nil } -// ListSimulationJobBatchesAPIClient is a client that implements the -// ListSimulationJobBatches operation. -type ListSimulationJobBatchesAPIClient interface { - ListSimulationJobBatches(context.Context, *ListSimulationJobBatchesInput, ...func(*Options)) (*ListSimulationJobBatchesOutput, error) -} - -var _ ListSimulationJobBatchesAPIClient = (*Client)(nil) - // ListSimulationJobBatchesPaginatorOptions is the paginator options for // ListSimulationJobBatches type ListSimulationJobBatchesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListSimulationJobBatchesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSimulationJobBatches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListSimulationJobBatchesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSimulationJobBatchesAPIClient is a client that implements the +// ListSimulationJobBatches operation. +type ListSimulationJobBatchesAPIClient interface { + ListSimulationJobBatches(context.Context, *ListSimulationJobBatchesInput, ...func(*Options)) (*ListSimulationJobBatchesOutput, error) +} + +var _ ListSimulationJobBatchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSimulationJobBatches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListSimulationJobs.go b/service/robomaker/api_op_ListSimulationJobs.go index bc3db9aebc0..2e95956da42 100644 --- a/service/robomaker/api_op_ListSimulationJobs.go +++ b/service/robomaker/api_op_ListSimulationJobs.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListSimulationJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSimulationJobs(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListSimulationJobsMiddlewares(stack *middleware.Sta return nil } -// ListSimulationJobsAPIClient is a client that implements the ListSimulationJobs -// operation. -type ListSimulationJobsAPIClient interface { - ListSimulationJobs(context.Context, *ListSimulationJobsInput, ...func(*Options)) (*ListSimulationJobsOutput, error) -} - -var _ ListSimulationJobsAPIClient = (*Client)(nil) - // ListSimulationJobsPaginatorOptions is the paginator options for // ListSimulationJobs type ListSimulationJobsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListSimulationJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSimulationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListSimulationJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSimulationJobsAPIClient is a client that implements the ListSimulationJobs +// operation. +type ListSimulationJobsAPIClient interface { + ListSimulationJobs(context.Context, *ListSimulationJobsInput, ...func(*Options)) (*ListSimulationJobsOutput, error) +} + +var _ ListSimulationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSimulationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListTagsForResource.go b/service/robomaker/api_op_ListTagsForResource.go index 275590d18ec..fe0ca70e9cb 100644 --- a/service/robomaker/api_op_ListTagsForResource.go +++ b/service/robomaker/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_ListWorldExportJobs.go b/service/robomaker/api_op_ListWorldExportJobs.go index 989ea90d1d0..9ddbe357bff 100644 --- a/service/robomaker/api_op_ListWorldExportJobs.go +++ b/service/robomaker/api_op_ListWorldExportJobs.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListWorldExportJobsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorldExportJobs(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListWorldExportJobsMiddlewares(stack *middleware.St return nil } -// ListWorldExportJobsAPIClient is a client that implements the -// ListWorldExportJobs operation. -type ListWorldExportJobsAPIClient interface { - ListWorldExportJobs(context.Context, *ListWorldExportJobsInput, ...func(*Options)) (*ListWorldExportJobsOutput, error) -} - -var _ ListWorldExportJobsAPIClient = (*Client)(nil) - // ListWorldExportJobsPaginatorOptions is the paginator options for // ListWorldExportJobs type ListWorldExportJobsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListWorldExportJobsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorldExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListWorldExportJobsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListWorldExportJobsAPIClient is a client that implements the +// ListWorldExportJobs operation. +type ListWorldExportJobsAPIClient interface { + ListWorldExportJobs(context.Context, *ListWorldExportJobsInput, ...func(*Options)) (*ListWorldExportJobsOutput, error) +} + +var _ ListWorldExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorldExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListWorldGenerationJobs.go b/service/robomaker/api_op_ListWorldGenerationJobs.go index 76e9ad23631..b46a435454a 100644 --- a/service/robomaker/api_op_ListWorldGenerationJobs.go +++ b/service/robomaker/api_op_ListWorldGenerationJobs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListWorldGenerationJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorldGenerationJobs(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListWorldGenerationJobsMiddlewares(stack *middlewar return nil } -// ListWorldGenerationJobsAPIClient is a client that implements the -// ListWorldGenerationJobs operation. -type ListWorldGenerationJobsAPIClient interface { - ListWorldGenerationJobs(context.Context, *ListWorldGenerationJobsInput, ...func(*Options)) (*ListWorldGenerationJobsOutput, error) -} - -var _ ListWorldGenerationJobsAPIClient = (*Client)(nil) - // ListWorldGenerationJobsPaginatorOptions is the paginator options for // ListWorldGenerationJobs type ListWorldGenerationJobsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListWorldGenerationJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorldGenerationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListWorldGenerationJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListWorldGenerationJobsAPIClient is a client that implements the +// ListWorldGenerationJobs operation. +type ListWorldGenerationJobsAPIClient interface { + ListWorldGenerationJobs(context.Context, *ListWorldGenerationJobsInput, ...func(*Options)) (*ListWorldGenerationJobsOutput, error) +} + +var _ ListWorldGenerationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorldGenerationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListWorldTemplates.go b/service/robomaker/api_op_ListWorldTemplates.go index fa150d2b868..c19f74a92ae 100644 --- a/service/robomaker/api_op_ListWorldTemplates.go +++ b/service/robomaker/api_op_ListWorldTemplates.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListWorldTemplatesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorldTemplates(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListWorldTemplatesMiddlewares(stack *middleware.Sta return nil } -// ListWorldTemplatesAPIClient is a client that implements the ListWorldTemplates -// operation. -type ListWorldTemplatesAPIClient interface { - ListWorldTemplates(context.Context, *ListWorldTemplatesInput, ...func(*Options)) (*ListWorldTemplatesOutput, error) -} - -var _ ListWorldTemplatesAPIClient = (*Client)(nil) - // ListWorldTemplatesPaginatorOptions is the paginator options for // ListWorldTemplates type ListWorldTemplatesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListWorldTemplatesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorldTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListWorldTemplatesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListWorldTemplatesAPIClient is a client that implements the ListWorldTemplates +// operation. +type ListWorldTemplatesAPIClient interface { + ListWorldTemplates(context.Context, *ListWorldTemplatesInput, ...func(*Options)) (*ListWorldTemplatesOutput, error) +} + +var _ ListWorldTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorldTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_ListWorlds.go b/service/robomaker/api_op_ListWorlds.go index 57495a6a702..b95a7c900ee 100644 --- a/service/robomaker/api_op_ListWorlds.go +++ b/service/robomaker/api_op_ListWorlds.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListWorldsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorlds(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListWorldsMiddlewares(stack *middleware.Stack, opti return nil } -// ListWorldsAPIClient is a client that implements the ListWorlds operation. -type ListWorldsAPIClient interface { - ListWorlds(context.Context, *ListWorldsInput, ...func(*Options)) (*ListWorldsOutput, error) -} - -var _ ListWorldsAPIClient = (*Client)(nil) - // ListWorldsPaginatorOptions is the paginator options for ListWorlds type ListWorldsPaginatorOptions struct { // When this parameter is used, ListWorlds only returns maxResults results in a @@ -222,6 +218,9 @@ func (p *ListWorldsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorlds(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListWorldsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListWorldsAPIClient is a client that implements the ListWorlds operation. +type ListWorldsAPIClient interface { + ListWorlds(context.Context, *ListWorldsInput, ...func(*Options)) (*ListWorldsOutput, error) +} + +var _ ListWorldsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorlds(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/robomaker/api_op_RegisterRobot.go b/service/robomaker/api_op_RegisterRobot.go index 80bce1d61b0..6290d934f77 100644 --- a/service/robomaker/api_op_RegisterRobot.go +++ b/service/robomaker/api_op_RegisterRobot.go @@ -119,6 +119,9 @@ func (c *Client) addOperationRegisterRobotMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterRobotValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_RestartSimulationJob.go b/service/robomaker/api_op_RestartSimulationJob.go index 989bdfbf2ac..91f0ad87ea6 100644 --- a/service/robomaker/api_op_RestartSimulationJob.go +++ b/service/robomaker/api_op_RestartSimulationJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationRestartSimulationJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestartSimulationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_StartSimulationJobBatch.go b/service/robomaker/api_op_StartSimulationJobBatch.go index 351df1d64ef..a54527abab5 100644 --- a/service/robomaker/api_op_StartSimulationJobBatch.go +++ b/service/robomaker/api_op_StartSimulationJobBatch.go @@ -183,6 +183,9 @@ func (c *Client) addOperationStartSimulationJobBatchMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSimulationJobBatchMiddleware(stack, options); err != nil { return err } diff --git a/service/robomaker/api_op_SyncDeploymentJob.go b/service/robomaker/api_op_SyncDeploymentJob.go index f2245b7aee6..566e6ec2927 100644 --- a/service/robomaker/api_op_SyncDeploymentJob.go +++ b/service/robomaker/api_op_SyncDeploymentJob.go @@ -176,6 +176,9 @@ func (c *Client) addOperationSyncDeploymentJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSyncDeploymentJobMiddleware(stack, options); err != nil { return err } diff --git a/service/robomaker/api_op_TagResource.go b/service/robomaker/api_op_TagResource.go index 9f747c17dc6..6ba58660549 100644 --- a/service/robomaker/api_op_TagResource.go +++ b/service/robomaker/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_UntagResource.go b/service/robomaker/api_op_UntagResource.go index 4055df1abdf..d7797161d15 100644 --- a/service/robomaker/api_op_UntagResource.go +++ b/service/robomaker/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_UpdateRobotApplication.go b/service/robomaker/api_op_UpdateRobotApplication.go index ad605eeabf6..a3c7041ee6e 100644 --- a/service/robomaker/api_op_UpdateRobotApplication.go +++ b/service/robomaker/api_op_UpdateRobotApplication.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateRobotApplicationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRobotApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_UpdateSimulationApplication.go b/service/robomaker/api_op_UpdateSimulationApplication.go index b1037ea1975..49cb368f032 100644 --- a/service/robomaker/api_op_UpdateSimulationApplication.go +++ b/service/robomaker/api_op_UpdateSimulationApplication.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateSimulationApplicationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSimulationApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/robomaker/api_op_UpdateWorldTemplate.go b/service/robomaker/api_op_UpdateWorldTemplate.go index e0c1b082f7a..a7a1cf59f3e 100644 --- a/service/robomaker/api_op_UpdateWorldTemplate.go +++ b/service/robomaker/api_op_UpdateWorldTemplate.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateWorldTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorldTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_client.go b/service/rolesanywhere/api_client.go index 9f83cd34583..07cc1279b06 100644 --- a/service/rolesanywhere/api_client.go +++ b/service/rolesanywhere/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/rolesanywhere/api_op_CreateProfile.go b/service/rolesanywhere/api_op_CreateProfile.go index d4a23e86577..73980087e56 100644 --- a/service/rolesanywhere/api_op_CreateProfile.go +++ b/service/rolesanywhere/api_op_CreateProfile.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_CreateTrustAnchor.go b/service/rolesanywhere/api_op_CreateTrustAnchor.go index a5368092136..e0521458012 100644 --- a/service/rolesanywhere/api_op_CreateTrustAnchor.go +++ b/service/rolesanywhere/api_op_CreateTrustAnchor.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateTrustAnchorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrustAnchorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DeleteAttributeMapping.go b/service/rolesanywhere/api_op_DeleteAttributeMapping.go index e9953873977..4f793918792 100644 --- a/service/rolesanywhere/api_op_DeleteAttributeMapping.go +++ b/service/rolesanywhere/api_op_DeleteAttributeMapping.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteAttributeMappingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttributeMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DeleteCrl.go b/service/rolesanywhere/api_op_DeleteCrl.go index c188a78d940..0e8a5bcaf9a 100644 --- a/service/rolesanywhere/api_op_DeleteCrl.go +++ b/service/rolesanywhere/api_op_DeleteCrl.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteCrlMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DeleteProfile.go b/service/rolesanywhere/api_op_DeleteProfile.go index 95fd34ca833..4ba960d4537 100644 --- a/service/rolesanywhere/api_op_DeleteProfile.go +++ b/service/rolesanywhere/api_op_DeleteProfile.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DeleteTrustAnchor.go b/service/rolesanywhere/api_op_DeleteTrustAnchor.go index a753986d92e..c4435ba66cf 100644 --- a/service/rolesanywhere/api_op_DeleteTrustAnchor.go +++ b/service/rolesanywhere/api_op_DeleteTrustAnchor.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteTrustAnchorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrustAnchorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DisableCrl.go b/service/rolesanywhere/api_op_DisableCrl.go index 8526c53f517..4e2056928db 100644 --- a/service/rolesanywhere/api_op_DisableCrl.go +++ b/service/rolesanywhere/api_op_DisableCrl.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisableCrlMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableCrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DisableProfile.go b/service/rolesanywhere/api_op_DisableProfile.go index 18ec3423484..88471fb93fb 100644 --- a/service/rolesanywhere/api_op_DisableProfile.go +++ b/service/rolesanywhere/api_op_DisableProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisableProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_DisableTrustAnchor.go b/service/rolesanywhere/api_op_DisableTrustAnchor.go index c6125d5c6c1..862226dc846 100644 --- a/service/rolesanywhere/api_op_DisableTrustAnchor.go +++ b/service/rolesanywhere/api_op_DisableTrustAnchor.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisableTrustAnchorMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableTrustAnchorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_EnableCrl.go b/service/rolesanywhere/api_op_EnableCrl.go index 60fd6835d67..e74aaedba20 100644 --- a/service/rolesanywhere/api_op_EnableCrl.go +++ b/service/rolesanywhere/api_op_EnableCrl.go @@ -112,6 +112,9 @@ func (c *Client) addOperationEnableCrlMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableCrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_EnableProfile.go b/service/rolesanywhere/api_op_EnableProfile.go index dadba567f71..de925010ef5 100644 --- a/service/rolesanywhere/api_op_EnableProfile.go +++ b/service/rolesanywhere/api_op_EnableProfile.go @@ -108,6 +108,9 @@ func (c *Client) addOperationEnableProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_EnableTrustAnchor.go b/service/rolesanywhere/api_op_EnableTrustAnchor.go index df6bbc751e8..f08085b2954 100644 --- a/service/rolesanywhere/api_op_EnableTrustAnchor.go +++ b/service/rolesanywhere/api_op_EnableTrustAnchor.go @@ -111,6 +111,9 @@ func (c *Client) addOperationEnableTrustAnchorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableTrustAnchorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_GetCrl.go b/service/rolesanywhere/api_op_GetCrl.go index f07dfcbefc7..6ce3fc0d87c 100644 --- a/service/rolesanywhere/api_op_GetCrl.go +++ b/service/rolesanywhere/api_op_GetCrl.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCrlMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_GetProfile.go b/service/rolesanywhere/api_op_GetProfile.go index ea857076d73..c9f5622bfe3 100644 --- a/service/rolesanywhere/api_op_GetProfile.go +++ b/service/rolesanywhere/api_op_GetProfile.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetProfileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_GetSubject.go b/service/rolesanywhere/api_op_GetSubject.go index fce3faf96e0..5c69d4ca517 100644 --- a/service/rolesanywhere/api_op_GetSubject.go +++ b/service/rolesanywhere/api_op_GetSubject.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetSubjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_GetTrustAnchor.go b/service/rolesanywhere/api_op_GetTrustAnchor.go index ab4a225aba9..ba863f8f8b0 100644 --- a/service/rolesanywhere/api_op_GetTrustAnchor.go +++ b/service/rolesanywhere/api_op_GetTrustAnchor.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetTrustAnchorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrustAnchorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_ImportCrl.go b/service/rolesanywhere/api_op_ImportCrl.go index 16e5279b2dd..94c51d186e4 100644 --- a/service/rolesanywhere/api_op_ImportCrl.go +++ b/service/rolesanywhere/api_op_ImportCrl.go @@ -131,6 +131,9 @@ func (c *Client) addOperationImportCrlMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportCrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_ListCrls.go b/service/rolesanywhere/api_op_ListCrls.go index 8d4a831f4ee..43103bebc58 100644 --- a/service/rolesanywhere/api_op_ListCrls.go +++ b/service/rolesanywhere/api_op_ListCrls.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCrlsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCrls(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListCrlsMiddlewares(stack *middleware.Stack, option return nil } -// ListCrlsAPIClient is a client that implements the ListCrls operation. -type ListCrlsAPIClient interface { - ListCrls(context.Context, *ListCrlsInput, ...func(*Options)) (*ListCrlsOutput, error) -} - -var _ ListCrlsAPIClient = (*Client)(nil) - // ListCrlsPaginatorOptions is the paginator options for ListCrls type ListCrlsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -196,6 +192,9 @@ func (p *ListCrlsPaginator) NextPage(ctx context.Context, optFns ...func(*Option params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCrls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -215,6 +214,13 @@ func (p *ListCrlsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListCrlsAPIClient is a client that implements the ListCrls operation. +type ListCrlsAPIClient interface { + ListCrls(context.Context, *ListCrlsInput, ...func(*Options)) (*ListCrlsOutput, error) +} + +var _ ListCrlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCrls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rolesanywhere/api_op_ListProfiles.go b/service/rolesanywhere/api_op_ListProfiles.go index c447a1704b5..45d9e7047fb 100644 --- a/service/rolesanywhere/api_op_ListProfiles.go +++ b/service/rolesanywhere/api_op_ListProfiles.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfiles(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op return nil } -// ListProfilesAPIClient is a client that implements the ListProfiles operation. -type ListProfilesAPIClient interface { - ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) -} - -var _ ListProfilesAPIClient = (*Client)(nil) - // ListProfilesPaginatorOptions is the paginator options for ListProfiles type ListProfilesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -195,6 +191,9 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +213,13 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProfilesAPIClient is a client that implements the ListProfiles operation. +type ListProfilesAPIClient interface { + ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) +} + +var _ ListProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rolesanywhere/api_op_ListSubjects.go b/service/rolesanywhere/api_op_ListSubjects.go index 2b3b25a3aac..1be446c4550 100644 --- a/service/rolesanywhere/api_op_ListSubjects.go +++ b/service/rolesanywhere/api_op_ListSubjects.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListSubjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubjects(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListSubjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListSubjectsAPIClient is a client that implements the ListSubjects operation. -type ListSubjectsAPIClient interface { - ListSubjects(context.Context, *ListSubjectsInput, ...func(*Options)) (*ListSubjectsOutput, error) -} - -var _ ListSubjectsAPIClient = (*Client)(nil) - // ListSubjectsPaginatorOptions is the paginator options for ListSubjects type ListSubjectsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -195,6 +191,9 @@ func (p *ListSubjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +213,13 @@ func (p *ListSubjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSubjectsAPIClient is a client that implements the ListSubjects operation. +type ListSubjectsAPIClient interface { + ListSubjects(context.Context, *ListSubjectsInput, ...func(*Options)) (*ListSubjectsOutput, error) +} + +var _ ListSubjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rolesanywhere/api_op_ListTagsForResource.go b/service/rolesanywhere/api_op_ListTagsForResource.go index c8917b23092..daa8ffe456a 100644 --- a/service/rolesanywhere/api_op_ListTagsForResource.go +++ b/service/rolesanywhere/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_ListTrustAnchors.go b/service/rolesanywhere/api_op_ListTrustAnchors.go index 6612d207ba4..526fcc7a753 100644 --- a/service/rolesanywhere/api_op_ListTrustAnchors.go +++ b/service/rolesanywhere/api_op_ListTrustAnchors.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTrustAnchorsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrustAnchors(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListTrustAnchorsMiddlewares(stack *middleware.Stack return nil } -// ListTrustAnchorsAPIClient is a client that implements the ListTrustAnchors -// operation. -type ListTrustAnchorsAPIClient interface { - ListTrustAnchors(context.Context, *ListTrustAnchorsInput, ...func(*Options)) (*ListTrustAnchorsOutput, error) -} - -var _ ListTrustAnchorsAPIClient = (*Client)(nil) - // ListTrustAnchorsPaginatorOptions is the paginator options for ListTrustAnchors type ListTrustAnchorsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -197,6 +192,9 @@ func (p *ListTrustAnchorsPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrustAnchors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -216,6 +214,14 @@ func (p *ListTrustAnchorsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTrustAnchorsAPIClient is a client that implements the ListTrustAnchors +// operation. +type ListTrustAnchorsAPIClient interface { + ListTrustAnchors(context.Context, *ListTrustAnchorsInput, ...func(*Options)) (*ListTrustAnchorsOutput, error) +} + +var _ ListTrustAnchorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrustAnchors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rolesanywhere/api_op_PutAttributeMapping.go b/service/rolesanywhere/api_op_PutAttributeMapping.go index ccbe39def99..05f99469363 100644 --- a/service/rolesanywhere/api_op_PutAttributeMapping.go +++ b/service/rolesanywhere/api_op_PutAttributeMapping.go @@ -120,6 +120,9 @@ func (c *Client) addOperationPutAttributeMappingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAttributeMappingValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_PutNotificationSettings.go b/service/rolesanywhere/api_op_PutNotificationSettings.go index 017f6d4a451..9c0dbfdc87d 100644 --- a/service/rolesanywhere/api_op_PutNotificationSettings.go +++ b/service/rolesanywhere/api_op_PutNotificationSettings.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutNotificationSettingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutNotificationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_ResetNotificationSettings.go b/service/rolesanywhere/api_op_ResetNotificationSettings.go index 077a7eba946..2b84b54fcf4 100644 --- a/service/rolesanywhere/api_op_ResetNotificationSettings.go +++ b/service/rolesanywhere/api_op_ResetNotificationSettings.go @@ -116,6 +116,9 @@ func (c *Client) addOperationResetNotificationSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetNotificationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_TagResource.go b/service/rolesanywhere/api_op_TagResource.go index 9b72c9c20fb..66eca2d77a5 100644 --- a/service/rolesanywhere/api_op_TagResource.go +++ b/service/rolesanywhere/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_UntagResource.go b/service/rolesanywhere/api_op_UntagResource.go index 2d88219111a..4b05586d464 100644 --- a/service/rolesanywhere/api_op_UntagResource.go +++ b/service/rolesanywhere/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_UpdateCrl.go b/service/rolesanywhere/api_op_UpdateCrl.go index c22ac6f30b5..a493b6d0603 100644 --- a/service/rolesanywhere/api_op_UpdateCrl.go +++ b/service/rolesanywhere/api_op_UpdateCrl.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateCrlMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_UpdateProfile.go b/service/rolesanywhere/api_op_UpdateProfile.go index 56beb958437..2076a274103 100644 --- a/service/rolesanywhere/api_op_UpdateProfile.go +++ b/service/rolesanywhere/api_op_UpdateProfile.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/rolesanywhere/api_op_UpdateTrustAnchor.go b/service/rolesanywhere/api_op_UpdateTrustAnchor.go index ee59f53568e..ab8e108a49c 100644 --- a/service/rolesanywhere/api_op_UpdateTrustAnchor.go +++ b/service/rolesanywhere/api_op_UpdateTrustAnchor.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateTrustAnchorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrustAnchorValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_client.go b/service/route53/api_client.go index 64e24f01557..39b937fabe4 100644 --- a/service/route53/api_client.go +++ b/service/route53/api_client.go @@ -452,6 +452,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -537,6 +561,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/route53/api_op_ActivateKeySigningKey.go b/service/route53/api_op_ActivateKeySigningKey.go index 44b0560fbf9..644645c24ca 100644 --- a/service/route53/api_op_ActivateKeySigningKey.go +++ b/service/route53/api_op_ActivateKeySigningKey.go @@ -117,6 +117,9 @@ func (c *Client) addOperationActivateKeySigningKeyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateKeySigningKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_AssociateVPCWithHostedZone.go b/service/route53/api_op_AssociateVPCWithHostedZone.go index 3da67873c95..8ce02382225 100644 --- a/service/route53/api_op_AssociateVPCWithHostedZone.go +++ b/service/route53/api_op_AssociateVPCWithHostedZone.go @@ -150,6 +150,9 @@ func (c *Client) addOperationAssociateVPCWithHostedZoneMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateVPCWithHostedZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ChangeCidrCollection.go b/service/route53/api_op_ChangeCidrCollection.go index 712ddcbc927..2fe6613eeae 100644 --- a/service/route53/api_op_ChangeCidrCollection.go +++ b/service/route53/api_op_ChangeCidrCollection.go @@ -149,6 +149,9 @@ func (c *Client) addOperationChangeCidrCollectionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangeCidrCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ChangeResourceRecordSets.go b/service/route53/api_op_ChangeResourceRecordSets.go index cc9326aea80..0a1b51bc1c5 100644 --- a/service/route53/api_op_ChangeResourceRecordSets.go +++ b/service/route53/api_op_ChangeResourceRecordSets.go @@ -204,6 +204,9 @@ func (c *Client) addOperationChangeResourceRecordSetsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangeResourceRecordSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ChangeTagsForResource.go b/service/route53/api_op_ChangeTagsForResource.go index 033adb999a8..387f5b9218f 100644 --- a/service/route53/api_op_ChangeTagsForResource.go +++ b/service/route53/api_op_ChangeTagsForResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationChangeTagsForResourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangeTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateCidrCollection.go b/service/route53/api_op_CreateCidrCollection.go index 591e4ff0b3d..9d0b63850b1 100644 --- a/service/route53/api_op_CreateCidrCollection.go +++ b/service/route53/api_op_CreateCidrCollection.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateCidrCollectionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCidrCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateHealthCheck.go b/service/route53/api_op_CreateHealthCheck.go index ea806050fbc..8b56a966ebc 100644 --- a/service/route53/api_op_CreateHealthCheck.go +++ b/service/route53/api_op_CreateHealthCheck.go @@ -176,6 +176,9 @@ func (c *Client) addOperationCreateHealthCheckMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateHostedZone.go b/service/route53/api_op_CreateHostedZone.go index ad902068b1b..465f14db67e 100644 --- a/service/route53/api_op_CreateHostedZone.go +++ b/service/route53/api_op_CreateHostedZone.go @@ -239,6 +239,9 @@ func (c *Client) addOperationCreateHostedZoneMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHostedZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateKeySigningKey.go b/service/route53/api_op_CreateKeySigningKey.go index 7b07c2f6278..7c46e828705 100644 --- a/service/route53/api_op_CreateKeySigningKey.go +++ b/service/route53/api_op_CreateKeySigningKey.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateKeySigningKeyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateKeySigningKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateQueryLoggingConfig.go b/service/route53/api_op_CreateQueryLoggingConfig.go index 6441d786ed5..9945003a09c 100644 --- a/service/route53/api_op_CreateQueryLoggingConfig.go +++ b/service/route53/api_op_CreateQueryLoggingConfig.go @@ -245,6 +245,9 @@ func (c *Client) addOperationCreateQueryLoggingConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateQueryLoggingConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateReusableDelegationSet.go b/service/route53/api_op_CreateReusableDelegationSet.go index 2cef1b6dc0c..bd6e394e47d 100644 --- a/service/route53/api_op_CreateReusableDelegationSet.go +++ b/service/route53/api_op_CreateReusableDelegationSet.go @@ -167,6 +167,9 @@ func (c *Client) addOperationCreateReusableDelegationSetMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReusableDelegationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateTrafficPolicy.go b/service/route53/api_op_CreateTrafficPolicy.go index 889f2bc3f59..7fd318e9a28 100644 --- a/service/route53/api_op_CreateTrafficPolicy.go +++ b/service/route53/api_op_CreateTrafficPolicy.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateTrafficPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrafficPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateTrafficPolicyInstance.go b/service/route53/api_op_CreateTrafficPolicyInstance.go index 73cdd7dff31..a1396c71aa7 100644 --- a/service/route53/api_op_CreateTrafficPolicyInstance.go +++ b/service/route53/api_op_CreateTrafficPolicyInstance.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateTrafficPolicyInstanceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrafficPolicyInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateTrafficPolicyVersion.go b/service/route53/api_op_CreateTrafficPolicyVersion.go index abd9a622ac0..81ff7c79811 100644 --- a/service/route53/api_op_CreateTrafficPolicyVersion.go +++ b/service/route53/api_op_CreateTrafficPolicyVersion.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateTrafficPolicyVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrafficPolicyVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_CreateVPCAssociationAuthorization.go b/service/route53/api_op_CreateVPCAssociationAuthorization.go index 029b33a8a23..6eadbccf9cd 100644 --- a/service/route53/api_op_CreateVPCAssociationAuthorization.go +++ b/service/route53/api_op_CreateVPCAssociationAuthorization.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateVPCAssociationAuthorizationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeactivateKeySigningKey.go b/service/route53/api_op_DeactivateKeySigningKey.go index 670f748696e..5ce189500c5 100644 --- a/service/route53/api_op_DeactivateKeySigningKey.go +++ b/service/route53/api_op_DeactivateKeySigningKey.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeactivateKeySigningKeyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateKeySigningKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteCidrCollection.go b/service/route53/api_op_DeleteCidrCollection.go index 15910f294f2..a60f3cfad02 100644 --- a/service/route53/api_op_DeleteCidrCollection.go +++ b/service/route53/api_op_DeleteCidrCollection.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteCidrCollectionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCidrCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteHealthCheck.go b/service/route53/api_op_DeleteHealthCheck.go index 650b525189e..6f0ad9cb07c 100644 --- a/service/route53/api_op_DeleteHealthCheck.go +++ b/service/route53/api_op_DeleteHealthCheck.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteHealthCheckMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteHostedZone.go b/service/route53/api_op_DeleteHostedZone.go index d1fc2297595..f014964b92e 100644 --- a/service/route53/api_op_DeleteHostedZone.go +++ b/service/route53/api_op_DeleteHostedZone.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDeleteHostedZoneMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHostedZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteKeySigningKey.go b/service/route53/api_op_DeleteKeySigningKey.go index 17d85323537..3e5ff92838a 100644 --- a/service/route53/api_op_DeleteKeySigningKey.go +++ b/service/route53/api_op_DeleteKeySigningKey.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteKeySigningKeyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKeySigningKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteQueryLoggingConfig.go b/service/route53/api_op_DeleteQueryLoggingConfig.go index 6492a2e2bf1..4ce8a954c9a 100644 --- a/service/route53/api_op_DeleteQueryLoggingConfig.go +++ b/service/route53/api_op_DeleteQueryLoggingConfig.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteQueryLoggingConfigMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueryLoggingConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteReusableDelegationSet.go b/service/route53/api_op_DeleteReusableDelegationSet.go index f9b04228970..98cdd38d5c7 100644 --- a/service/route53/api_op_DeleteReusableDelegationSet.go +++ b/service/route53/api_op_DeleteReusableDelegationSet.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteReusableDelegationSetMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReusableDelegationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteTrafficPolicy.go b/service/route53/api_op_DeleteTrafficPolicy.go index ee46ea7ee1c..5eadeed8cd6 100644 --- a/service/route53/api_op_DeleteTrafficPolicy.go +++ b/service/route53/api_op_DeleteTrafficPolicy.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteTrafficPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteTrafficPolicyInstance.go b/service/route53/api_op_DeleteTrafficPolicyInstance.go index 70be56bd263..e1fa03865da 100644 --- a/service/route53/api_op_DeleteTrafficPolicyInstance.go +++ b/service/route53/api_op_DeleteTrafficPolicyInstance.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteTrafficPolicyInstanceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DeleteVPCAssociationAuthorization.go b/service/route53/api_op_DeleteVPCAssociationAuthorization.go index 56da5228706..a3c38992eba 100644 --- a/service/route53/api_op_DeleteVPCAssociationAuthorization.go +++ b/service/route53/api_op_DeleteVPCAssociationAuthorization.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteVPCAssociationAuthorizationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DisableHostedZoneDNSSEC.go b/service/route53/api_op_DisableHostedZoneDNSSEC.go index 7f04c695b9d..347ae54bd13 100644 --- a/service/route53/api_op_DisableHostedZoneDNSSEC.go +++ b/service/route53/api_op_DisableHostedZoneDNSSEC.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisableHostedZoneDNSSECMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableHostedZoneDNSSECValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_DisassociateVPCFromHostedZone.go b/service/route53/api_op_DisassociateVPCFromHostedZone.go index 5baca8b11c4..ea7b654390f 100644 --- a/service/route53/api_op_DisassociateVPCFromHostedZone.go +++ b/service/route53/api_op_DisassociateVPCFromHostedZone.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDisassociateVPCFromHostedZoneMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_EnableHostedZoneDNSSEC.go b/service/route53/api_op_EnableHostedZoneDNSSEC.go index aa114173475..d7b52a5d776 100644 --- a/service/route53/api_op_EnableHostedZoneDNSSEC.go +++ b/service/route53/api_op_EnableHostedZoneDNSSEC.go @@ -109,6 +109,9 @@ func (c *Client) addOperationEnableHostedZoneDNSSECMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableHostedZoneDNSSECValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetAccountLimit.go b/service/route53/api_op_GetAccountLimit.go index 06aafe4ca4e..d4a2a775a53 100644 --- a/service/route53/api_op_GetAccountLimit.go +++ b/service/route53/api_op_GetAccountLimit.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetAccountLimitMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccountLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetChange.go b/service/route53/api_op_GetChange.go index 2f32ef937b3..e51691b8394 100644 --- a/service/route53/api_op_GetChange.go +++ b/service/route53/api_op_GetChange.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetChangeMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChangeValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationGetChangeMiddlewares(stack *middleware.Stack, optio return nil } -// GetChangeAPIClient is a client that implements the GetChange operation. -type GetChangeAPIClient interface { - GetChange(context.Context, *GetChangeInput, ...func(*Options)) (*GetChangeOutput, error) -} - -var _ GetChangeAPIClient = (*Client)(nil) - // ResourceRecordSetsChangedWaiterOptions are waiter options for // ResourceRecordSetsChangedWaiter type ResourceRecordSetsChangedWaiterOptions struct { @@ -276,7 +272,13 @@ func (w *ResourceRecordSetsChangedWaiter) WaitForOutput(ctx context.Context, par } out, err := w.client.GetChange(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -334,6 +336,13 @@ func resourceRecordSetsChangedStateRetryable(ctx context.Context, input *GetChan return true, nil } +// GetChangeAPIClient is a client that implements the GetChange operation. +type GetChangeAPIClient interface { + GetChange(context.Context, *GetChangeInput, ...func(*Options)) (*GetChangeOutput, error) +} + +var _ GetChangeAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetChange(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_GetCheckerIpRanges.go b/service/route53/api_op_GetCheckerIpRanges.go index 64e7bd5212f..867213fbc86 100644 --- a/service/route53/api_op_GetCheckerIpRanges.go +++ b/service/route53/api_op_GetCheckerIpRanges.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetCheckerIpRangesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCheckerIpRanges(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_GetDNSSEC.go b/service/route53/api_op_GetDNSSEC.go index 3d399d4aadc..daefff184cd 100644 --- a/service/route53/api_op_GetDNSSEC.go +++ b/service/route53/api_op_GetDNSSEC.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetDNSSECMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDNSSECValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetGeoLocation.go b/service/route53/api_op_GetGeoLocation.go index 28ffcfa9e61..643bcc3d002 100644 --- a/service/route53/api_op_GetGeoLocation.go +++ b/service/route53/api_op_GetGeoLocation.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetGeoLocationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGeoLocation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_GetHealthCheck.go b/service/route53/api_op_GetHealthCheck.go index 7046d1a96d9..ecd43def663 100644 --- a/service/route53/api_op_GetHealthCheck.go +++ b/service/route53/api_op_GetHealthCheck.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetHealthCheckMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetHealthCheckCount.go b/service/route53/api_op_GetHealthCheckCount.go index b4134f87e86..c36106700dc 100644 --- a/service/route53/api_op_GetHealthCheckCount.go +++ b/service/route53/api_op_GetHealthCheckCount.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetHealthCheckCountMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckCount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_GetHealthCheckLastFailureReason.go b/service/route53/api_op_GetHealthCheckLastFailureReason.go index 1eebd6d07e0..81bda56416c 100644 --- a/service/route53/api_op_GetHealthCheckLastFailureReason.go +++ b/service/route53/api_op_GetHealthCheckLastFailureReason.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetHealthCheckLastFailureReasonMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetHealthCheckStatus.go b/service/route53/api_op_GetHealthCheckStatus.go index 102ed64e748..58ae94ba31d 100644 --- a/service/route53/api_op_GetHealthCheckStatus.go +++ b/service/route53/api_op_GetHealthCheckStatus.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetHealthCheckStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHealthCheckStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetHostedZone.go b/service/route53/api_op_GetHostedZone.go index 958d1e154a7..3c1edea7361 100644 --- a/service/route53/api_op_GetHostedZone.go +++ b/service/route53/api_op_GetHostedZone.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetHostedZoneMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostedZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetHostedZoneCount.go b/service/route53/api_op_GetHostedZoneCount.go index 665eb4a17d8..d103c3c2448 100644 --- a/service/route53/api_op_GetHostedZoneCount.go +++ b/service/route53/api_op_GetHostedZoneCount.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetHostedZoneCountMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneCount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_GetHostedZoneLimit.go b/service/route53/api_op_GetHostedZoneLimit.go index 2b01975ef94..2c753cb94c2 100644 --- a/service/route53/api_op_GetHostedZoneLimit.go +++ b/service/route53/api_op_GetHostedZoneLimit.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetHostedZoneLimitMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetHostedZoneLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetQueryLoggingConfig.go b/service/route53/api_op_GetQueryLoggingConfig.go index 094ce343f83..e80134e87c6 100644 --- a/service/route53/api_op_GetQueryLoggingConfig.go +++ b/service/route53/api_op_GetQueryLoggingConfig.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetQueryLoggingConfigMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueryLoggingConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetReusableDelegationSet.go b/service/route53/api_op_GetReusableDelegationSet.go index 08d959ea36e..a1c4db26c4d 100644 --- a/service/route53/api_op_GetReusableDelegationSet.go +++ b/service/route53/api_op_GetReusableDelegationSet.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetReusableDelegationSetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReusableDelegationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetReusableDelegationSetLimit.go b/service/route53/api_op_GetReusableDelegationSetLimit.go index 193680afa42..a8f0b01b461 100644 --- a/service/route53/api_op_GetReusableDelegationSetLimit.go +++ b/service/route53/api_op_GetReusableDelegationSetLimit.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetReusableDelegationSetLimitMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReusableDelegationSetLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetTrafficPolicy.go b/service/route53/api_op_GetTrafficPolicy.go index c5e1d5afe5f..ba88d9f8cfa 100644 --- a/service/route53/api_op_GetTrafficPolicy.go +++ b/service/route53/api_op_GetTrafficPolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetTrafficPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrafficPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetTrafficPolicyInstance.go b/service/route53/api_op_GetTrafficPolicyInstance.go index 841f1d62ec9..dc96aae6592 100644 --- a/service/route53/api_op_GetTrafficPolicyInstance.go +++ b/service/route53/api_op_GetTrafficPolicyInstance.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetTrafficPolicyInstanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrafficPolicyInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_GetTrafficPolicyInstanceCount.go b/service/route53/api_op_GetTrafficPolicyInstanceCount.go index 2e889b56b46..d193f2b073f 100644 --- a/service/route53/api_op_GetTrafficPolicyInstanceCount.go +++ b/service/route53/api_op_GetTrafficPolicyInstanceCount.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetTrafficPolicyInstanceCountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_ListCidrBlocks.go b/service/route53/api_op_ListCidrBlocks.go index a0e17f588a9..71cf19e67e7 100644 --- a/service/route53/api_op_ListCidrBlocks.go +++ b/service/route53/api_op_ListCidrBlocks.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCidrBlocksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCidrBlocksValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListCidrBlocksMiddlewares(stack *middleware.Stack, return nil } -// ListCidrBlocksAPIClient is a client that implements the ListCidrBlocks -// operation. -type ListCidrBlocksAPIClient interface { - ListCidrBlocks(context.Context, *ListCidrBlocksInput, ...func(*Options)) (*ListCidrBlocksOutput, error) -} - -var _ ListCidrBlocksAPIClient = (*Client)(nil) - // ListCidrBlocksPaginatorOptions is the paginator options for ListCidrBlocks type ListCidrBlocksPaginatorOptions struct { // Maximum number of results you want returned. @@ -217,6 +212,9 @@ func (p *ListCidrBlocksPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCidrBlocks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListCidrBlocksPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListCidrBlocksAPIClient is a client that implements the ListCidrBlocks +// operation. +type ListCidrBlocksAPIClient interface { + ListCidrBlocks(context.Context, *ListCidrBlocksInput, ...func(*Options)) (*ListCidrBlocksOutput, error) +} + +var _ ListCidrBlocksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCidrBlocks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_ListCidrCollections.go b/service/route53/api_op_ListCidrCollections.go index 3988b8b92f3..2fdba85e682 100644 --- a/service/route53/api_op_ListCidrCollections.go +++ b/service/route53/api_op_ListCidrCollections.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListCidrCollectionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrCollections(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListCidrCollectionsMiddlewares(stack *middleware.St return nil } -// ListCidrCollectionsAPIClient is a client that implements the -// ListCidrCollections operation. -type ListCidrCollectionsAPIClient interface { - ListCidrCollections(context.Context, *ListCidrCollectionsInput, ...func(*Options)) (*ListCidrCollectionsOutput, error) -} - -var _ ListCidrCollectionsAPIClient = (*Client)(nil) - // ListCidrCollectionsPaginatorOptions is the paginator options for // ListCidrCollections type ListCidrCollectionsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListCidrCollectionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCidrCollections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListCidrCollectionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListCidrCollectionsAPIClient is a client that implements the +// ListCidrCollections operation. +type ListCidrCollectionsAPIClient interface { + ListCidrCollections(context.Context, *ListCidrCollectionsInput, ...func(*Options)) (*ListCidrCollectionsOutput, error) +} + +var _ ListCidrCollectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCidrCollections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_ListCidrLocations.go b/service/route53/api_op_ListCidrLocations.go index 675882d3fae..a948843c7f7 100644 --- a/service/route53/api_op_ListCidrLocations.go +++ b/service/route53/api_op_ListCidrLocations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCidrLocationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCidrLocationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListCidrLocationsMiddlewares(stack *middleware.Stac return nil } -// ListCidrLocationsAPIClient is a client that implements the ListCidrLocations -// operation. -type ListCidrLocationsAPIClient interface { - ListCidrLocations(context.Context, *ListCidrLocationsInput, ...func(*Options)) (*ListCidrLocationsOutput, error) -} - -var _ ListCidrLocationsAPIClient = (*Client)(nil) - // ListCidrLocationsPaginatorOptions is the paginator options for ListCidrLocations type ListCidrLocationsPaginatorOptions struct { // The maximum number of CIDR collection locations to return in the response. @@ -217,6 +212,9 @@ func (p *ListCidrLocationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCidrLocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListCidrLocationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListCidrLocationsAPIClient is a client that implements the ListCidrLocations +// operation. +type ListCidrLocationsAPIClient interface { + ListCidrLocations(context.Context, *ListCidrLocationsInput, ...func(*Options)) (*ListCidrLocationsOutput, error) +} + +var _ ListCidrLocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCidrLocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_ListGeoLocations.go b/service/route53/api_op_ListGeoLocations.go index fe2fdab2f6c..e9e33b6d4a2 100644 --- a/service/route53/api_op_ListGeoLocations.go +++ b/service/route53/api_op_ListGeoLocations.go @@ -181,6 +181,9 @@ func (c *Client) addOperationListGeoLocationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoLocations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_ListHealthChecks.go b/service/route53/api_op_ListHealthChecks.go index 9101416ba44..bd1aefbbb05 100644 --- a/service/route53/api_op_ListHealthChecks.go +++ b/service/route53/api_op_ListHealthChecks.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListHealthChecksMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHealthChecks(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListHealthChecksMiddlewares(stack *middleware.Stack return nil } -// ListHealthChecksAPIClient is a client that implements the ListHealthChecks -// operation. -type ListHealthChecksAPIClient interface { - ListHealthChecks(context.Context, *ListHealthChecksInput, ...func(*Options)) (*ListHealthChecksOutput, error) -} - -var _ ListHealthChecksAPIClient = (*Client)(nil) - // ListHealthChecksPaginatorOptions is the paginator options for ListHealthChecks type ListHealthChecksPaginatorOptions struct { // The maximum number of health checks that you want ListHealthChecks to return in @@ -245,6 +240,9 @@ func (p *ListHealthChecksPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHealthChecks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListHealthChecksPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListHealthChecksAPIClient is a client that implements the ListHealthChecks +// operation. +type ListHealthChecksAPIClient interface { + ListHealthChecks(context.Context, *ListHealthChecksInput, ...func(*Options)) (*ListHealthChecksOutput, error) +} + +var _ ListHealthChecksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHealthChecks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_ListHostedZones.go b/service/route53/api_op_ListHostedZones.go index a848d0f0eb5..d08b2ca937b 100644 --- a/service/route53/api_op_ListHostedZones.go +++ b/service/route53/api_op_ListHostedZones.go @@ -164,6 +164,9 @@ func (c *Client) addOperationListHostedZonesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZones(options.Region), middleware.Before); err != nil { return err } @@ -188,14 +191,6 @@ func (c *Client) addOperationListHostedZonesMiddlewares(stack *middleware.Stack, return nil } -// ListHostedZonesAPIClient is a client that implements the ListHostedZones -// operation. -type ListHostedZonesAPIClient interface { - ListHostedZones(context.Context, *ListHostedZonesInput, ...func(*Options)) (*ListHostedZonesOutput, error) -} - -var _ ListHostedZonesAPIClient = (*Client)(nil) - // ListHostedZonesPaginatorOptions is the paginator options for ListHostedZones type ListHostedZonesPaginatorOptions struct { // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to @@ -262,6 +257,9 @@ func (p *ListHostedZonesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHostedZones(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -281,6 +279,14 @@ func (p *ListHostedZonesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListHostedZonesAPIClient is a client that implements the ListHostedZones +// operation. +type ListHostedZonesAPIClient interface { + ListHostedZones(context.Context, *ListHostedZonesInput, ...func(*Options)) (*ListHostedZonesOutput, error) +} + +var _ ListHostedZonesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHostedZones(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_ListHostedZonesByName.go b/service/route53/api_op_ListHostedZonesByName.go index 26f697fac93..3f2734b366d 100644 --- a/service/route53/api_op_ListHostedZonesByName.go +++ b/service/route53/api_op_ListHostedZonesByName.go @@ -221,6 +221,9 @@ func (c *Client) addOperationListHostedZonesByNameMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByName(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_ListHostedZonesByVPC.go b/service/route53/api_op_ListHostedZonesByVPC.go index 1a1d425d34b..20c40c18e92 100644 --- a/service/route53/api_op_ListHostedZonesByVPC.go +++ b/service/route53/api_op_ListHostedZonesByVPC.go @@ -176,6 +176,9 @@ func (c *Client) addOperationListHostedZonesByVPCMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHostedZonesByVPCValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListQueryLoggingConfigs.go b/service/route53/api_op_ListQueryLoggingConfigs.go index 7a2d012c31b..a7a774f811d 100644 --- a/service/route53/api_op_ListQueryLoggingConfigs.go +++ b/service/route53/api_op_ListQueryLoggingConfigs.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListQueryLoggingConfigsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueryLoggingConfigs(options.Region), middleware.Before); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationListQueryLoggingConfigsMiddlewares(stack *middlewar return nil } -// ListQueryLoggingConfigsAPIClient is a client that implements the -// ListQueryLoggingConfigs operation. -type ListQueryLoggingConfigsAPIClient interface { - ListQueryLoggingConfigs(context.Context, *ListQueryLoggingConfigsInput, ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) -} - -var _ ListQueryLoggingConfigsAPIClient = (*Client)(nil) - // ListQueryLoggingConfigsPaginatorOptions is the paginator options for // ListQueryLoggingConfigs type ListQueryLoggingConfigsPaginatorOptions struct { @@ -261,6 +256,9 @@ func (p *ListQueryLoggingConfigsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueryLoggingConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -280,6 +278,14 @@ func (p *ListQueryLoggingConfigsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListQueryLoggingConfigsAPIClient is a client that implements the +// ListQueryLoggingConfigs operation. +type ListQueryLoggingConfigsAPIClient interface { + ListQueryLoggingConfigs(context.Context, *ListQueryLoggingConfigsInput, ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) +} + +var _ ListQueryLoggingConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueryLoggingConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53/api_op_ListResourceRecordSets.go b/service/route53/api_op_ListResourceRecordSets.go index 3e0d42cc9fb..3c71f453c1c 100644 --- a/service/route53/api_op_ListResourceRecordSets.go +++ b/service/route53/api_op_ListResourceRecordSets.go @@ -249,6 +249,9 @@ func (c *Client) addOperationListResourceRecordSetsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceRecordSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListReusableDelegationSets.go b/service/route53/api_op_ListReusableDelegationSets.go index 44d8ad7885f..f6a2be656f6 100644 --- a/service/route53/api_op_ListReusableDelegationSets.go +++ b/service/route53/api_op_ListReusableDelegationSets.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListReusableDelegationSetsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReusableDelegationSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_ListTagsForResource.go b/service/route53/api_op_ListTagsForResource.go index fef6ad59484..3d08ed34603 100644 --- a/service/route53/api_op_ListTagsForResource.go +++ b/service/route53/api_op_ListTagsForResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListTagsForResources.go b/service/route53/api_op_ListTagsForResources.go index 87e366db816..6437550b888 100644 --- a/service/route53/api_op_ListTagsForResources.go +++ b/service/route53/api_op_ListTagsForResources.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListTagsForResourcesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListTrafficPolicies.go b/service/route53/api_op_ListTrafficPolicies.go index 252618982c5..95bdadc5747 100644 --- a/service/route53/api_op_ListTrafficPolicies.go +++ b/service/route53/api_op_ListTrafficPolicies.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListTrafficPoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_ListTrafficPolicyInstances.go b/service/route53/api_op_ListTrafficPolicyInstances.go index 6b1ce93eacd..a5acc2f3ff8 100644 --- a/service/route53/api_op_ListTrafficPolicyInstances.go +++ b/service/route53/api_op_ListTrafficPolicyInstances.go @@ -189,6 +189,9 @@ func (c *Client) addOperationListTrafficPolicyInstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstances(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go b/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go index 077ded41e1d..4ec81571abc 100644 --- a/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go +++ b/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go @@ -178,6 +178,9 @@ func (c *Client) addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go b/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go index c51b33bae3e..6116e8f440b 100644 --- a/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go +++ b/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go @@ -206,6 +206,9 @@ func (c *Client) addOperationListTrafficPolicyInstancesByPolicyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListTrafficPolicyVersions.go b/service/route53/api_op_ListTrafficPolicyVersions.go index a4c525d33a4..a8e84302acd 100644 --- a/service/route53/api_op_ListTrafficPolicyVersions.go +++ b/service/route53/api_op_ListTrafficPolicyVersions.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListTrafficPolicyVersionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrafficPolicyVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_ListVPCAssociationAuthorizations.go b/service/route53/api_op_ListVPCAssociationAuthorizations.go index 293e41800fc..ff72eddd9f9 100644 --- a/service/route53/api_op_ListVPCAssociationAuthorizations.go +++ b/service/route53/api_op_ListVPCAssociationAuthorizations.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListVPCAssociationAuthorizationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVPCAssociationAuthorizationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_TestDNSAnswer.go b/service/route53/api_op_TestDNSAnswer.go index 12812d36d40..cebbb75a25c 100644 --- a/service/route53/api_op_TestDNSAnswer.go +++ b/service/route53/api_op_TestDNSAnswer.go @@ -190,6 +190,9 @@ func (c *Client) addOperationTestDNSAnswerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestDNSAnswerValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_UpdateHealthCheck.go b/service/route53/api_op_UpdateHealthCheck.go index e822fc4c958..520c9cf8abf 100644 --- a/service/route53/api_op_UpdateHealthCheck.go +++ b/service/route53/api_op_UpdateHealthCheck.go @@ -394,6 +394,9 @@ func (c *Client) addOperationUpdateHealthCheckMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_UpdateHostedZoneComment.go b/service/route53/api_op_UpdateHostedZoneComment.go index 9d5eda10b44..6222cf23e04 100644 --- a/service/route53/api_op_UpdateHostedZoneComment.go +++ b/service/route53/api_op_UpdateHostedZoneComment.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateHostedZoneCommentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHostedZoneCommentValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_UpdateTrafficPolicyComment.go b/service/route53/api_op_UpdateTrafficPolicyComment.go index 0e43225f108..d1dbbb1e381 100644 --- a/service/route53/api_op_UpdateTrafficPolicyComment.go +++ b/service/route53/api_op_UpdateTrafficPolicyComment.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateTrafficPolicyCommentMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrafficPolicyCommentValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53/api_op_UpdateTrafficPolicyInstance.go b/service/route53/api_op_UpdateTrafficPolicyInstance.go index 1f0b685fa9f..af8a3c861df 100644 --- a/service/route53/api_op_UpdateTrafficPolicyInstance.go +++ b/service/route53/api_op_UpdateTrafficPolicyInstance.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateTrafficPolicyInstanceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_client.go b/service/route53domains/api_client.go index 7a911de82ab..56934cca143 100644 --- a/service/route53domains/api_client.go +++ b/service/route53domains/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/route53domains/api_op_AcceptDomainTransferFromAnotherAwsAccount.go b/service/route53domains/api_op_AcceptDomainTransferFromAnotherAwsAccount.go index a7672985fed..0611f1f8d27 100644 --- a/service/route53domains/api_op_AcceptDomainTransferFromAnotherAwsAccount.go +++ b/service/route53domains/api_op_AcceptDomainTransferFromAnotherAwsAccount.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAcceptDomainTransferFromAnotherAwsAccountMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptDomainTransferFromAnotherAwsAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_AssociateDelegationSignerToDomain.go b/service/route53domains/api_op_AssociateDelegationSignerToDomain.go index 433ec30b3f8..a4b08ee35f2 100644 --- a/service/route53domains/api_op_AssociateDelegationSignerToDomain.go +++ b/service/route53domains/api_op_AssociateDelegationSignerToDomain.go @@ -124,6 +124,9 @@ func (c *Client) addOperationAssociateDelegationSignerToDomainMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDelegationSignerToDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_CancelDomainTransferToAnotherAwsAccount.go b/service/route53domains/api_op_CancelDomainTransferToAnotherAwsAccount.go index 8eaedc49e30..c2312c2a58b 100644 --- a/service/route53domains/api_op_CancelDomainTransferToAnotherAwsAccount.go +++ b/service/route53domains/api_op_CancelDomainTransferToAnotherAwsAccount.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCancelDomainTransferToAnotherAwsAccountMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelDomainTransferToAnotherAwsAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_CheckDomainAvailability.go b/service/route53domains/api_op_CheckDomainAvailability.go index 371ec05f658..71ccf6a937a 100644 --- a/service/route53domains/api_op_CheckDomainAvailability.go +++ b/service/route53domains/api_op_CheckDomainAvailability.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCheckDomainAvailabilityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckDomainAvailabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_CheckDomainTransferability.go b/service/route53domains/api_op_CheckDomainTransferability.go index 87321017b5c..587b5df8603 100644 --- a/service/route53domains/api_op_CheckDomainTransferability.go +++ b/service/route53domains/api_op_CheckDomainTransferability.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCheckDomainTransferabilityMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckDomainTransferabilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_DeleteDomain.go b/service/route53domains/api_op_DeleteDomain.go index a3f3c2678ae..eed633b118b 100644 --- a/service/route53domains/api_op_DeleteDomain.go +++ b/service/route53domains/api_op_DeleteDomain.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_DeleteTagsForDomain.go b/service/route53domains/api_op_DeleteTagsForDomain.go index 27e570e8012..44a3c0b6821 100644 --- a/service/route53domains/api_op_DeleteTagsForDomain.go +++ b/service/route53domains/api_op_DeleteTagsForDomain.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteTagsForDomainMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsForDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_DisableDomainAutoRenew.go b/service/route53domains/api_op_DisableDomainAutoRenew.go index 48f48b541da..7f7446f4fb3 100644 --- a/service/route53domains/api_op_DisableDomainAutoRenew.go +++ b/service/route53domains/api_op_DisableDomainAutoRenew.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDisableDomainAutoRenewMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableDomainAutoRenewValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_DisableDomainTransferLock.go b/service/route53domains/api_op_DisableDomainTransferLock.go index c8559d10895..568509e078d 100644 --- a/service/route53domains/api_op_DisableDomainTransferLock.go +++ b/service/route53domains/api_op_DisableDomainTransferLock.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisableDomainTransferLockMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableDomainTransferLockValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_DisassociateDelegationSignerFromDomain.go b/service/route53domains/api_op_DisassociateDelegationSignerFromDomain.go index f8897f9d548..cb19bbea0a7 100644 --- a/service/route53domains/api_op_DisassociateDelegationSignerFromDomain.go +++ b/service/route53domains/api_op_DisassociateDelegationSignerFromDomain.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateDelegationSignerFromDomainMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDelegationSignerFromDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_EnableDomainAutoRenew.go b/service/route53domains/api_op_EnableDomainAutoRenew.go index 4fb8e9814f3..88bbbaa5611 100644 --- a/service/route53domains/api_op_EnableDomainAutoRenew.go +++ b/service/route53domains/api_op_EnableDomainAutoRenew.go @@ -110,6 +110,9 @@ func (c *Client) addOperationEnableDomainAutoRenewMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableDomainAutoRenewValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_EnableDomainTransferLock.go b/service/route53domains/api_op_EnableDomainTransferLock.go index 5977a85b995..336ef1d2d0c 100644 --- a/service/route53domains/api_op_EnableDomainTransferLock.go +++ b/service/route53domains/api_op_EnableDomainTransferLock.go @@ -112,6 +112,9 @@ func (c *Client) addOperationEnableDomainTransferLockMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableDomainTransferLockValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_GetContactReachabilityStatus.go b/service/route53domains/api_op_GetContactReachabilityStatus.go index ca607435b08..0b82d76ca3e 100644 --- a/service/route53domains/api_op_GetContactReachabilityStatus.go +++ b/service/route53domains/api_op_GetContactReachabilityStatus.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetContactReachabilityStatusMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetContactReachabilityStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53domains/api_op_GetDomainDetail.go b/service/route53domains/api_op_GetDomainDetail.go index 16d918b9e8f..f0962eaf5ab 100644 --- a/service/route53domains/api_op_GetDomainDetail.go +++ b/service/route53domains/api_op_GetDomainDetail.go @@ -213,6 +213,9 @@ func (c *Client) addOperationGetDomainDetailMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainDetailValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_GetDomainSuggestions.go b/service/route53domains/api_op_GetDomainSuggestions.go index f43451bc44d..34820c8b590 100644 --- a/service/route53domains/api_op_GetDomainSuggestions.go +++ b/service/route53domains/api_op_GetDomainSuggestions.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetDomainSuggestionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainSuggestionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_GetOperationDetail.go b/service/route53domains/api_op_GetOperationDetail.go index c796fb2fad5..1e72db5e09a 100644 --- a/service/route53domains/api_op_GetOperationDetail.go +++ b/service/route53domains/api_op_GetOperationDetail.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetOperationDetailMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOperationDetailValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_ListDomains.go b/service/route53domains/api_op_ListDomains.go index 800a472bedc..3fabd8394bb 100644 --- a/service/route53domains/api_op_ListDomains.go +++ b/service/route53domains/api_op_ListDomains.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainsValidationMiddleware(stack); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // Number of domains to be returned. @@ -229,6 +225,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +247,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53domains/api_op_ListOperations.go b/service/route53domains/api_op_ListOperations.go index a9e7e0ac7d0..4b277ac6d69 100644 --- a/service/route53domains/api_op_ListOperations.go +++ b/service/route53domains/api_op_ListOperations.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOperations(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, return nil } -// ListOperationsAPIClient is a client that implements the ListOperations -// operation. -type ListOperationsAPIClient interface { - ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) -} - -var _ ListOperationsAPIClient = (*Client)(nil) - // ListOperationsPaginatorOptions is the paginator options for ListOperations type ListOperationsPaginatorOptions struct { // Number of domains to be returned. @@ -237,6 +232,9 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListOperationsAPIClient is a client that implements the ListOperations +// operation. +type ListOperationsAPIClient interface { + ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) +} + +var _ ListOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53domains/api_op_ListPrices.go b/service/route53domains/api_op_ListPrices.go index 379bf45e172..5b70b22b711 100644 --- a/service/route53domains/api_op_ListPrices.go +++ b/service/route53domains/api_op_ListPrices.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListPricesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPrices(options.Region), middleware.Before); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationListPricesMiddlewares(stack *middleware.Stack, opti return nil } -// ListPricesAPIClient is a client that implements the ListPrices operation. -type ListPricesAPIClient interface { - ListPrices(context.Context, *ListPricesInput, ...func(*Options)) (*ListPricesOutput, error) -} - -var _ ListPricesAPIClient = (*Client)(nil) - // ListPricesPaginatorOptions is the paginator options for ListPrices type ListPricesPaginatorOptions struct { // Number of Prices to be returned. @@ -233,6 +229,9 @@ func (p *ListPricesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +251,13 @@ func (p *ListPricesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListPricesAPIClient is a client that implements the ListPrices operation. +type ListPricesAPIClient interface { + ListPrices(context.Context, *ListPricesInput, ...func(*Options)) (*ListPricesOutput, error) +} + +var _ ListPricesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53domains/api_op_ListTagsForDomain.go b/service/route53domains/api_op_ListTagsForDomain.go index 83a2b7fa95d..2a37d2b6a3f 100644 --- a/service/route53domains/api_op_ListTagsForDomain.go +++ b/service/route53domains/api_op_ListTagsForDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForDomainMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_PushDomain.go b/service/route53domains/api_op_PushDomain.go index a01f9f3dd25..6d80aca19be 100644 --- a/service/route53domains/api_op_PushDomain.go +++ b/service/route53domains/api_op_PushDomain.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPushDomainMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPushDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_RegisterDomain.go b/service/route53domains/api_op_RegisterDomain.go index 5b9e3828659..2c22837faf7 100644 --- a/service/route53domains/api_op_RegisterDomain.go +++ b/service/route53domains/api_op_RegisterDomain.go @@ -253,6 +253,9 @@ func (c *Client) addOperationRegisterDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_RejectDomainTransferFromAnotherAwsAccount.go b/service/route53domains/api_op_RejectDomainTransferFromAnotherAwsAccount.go index d42edcd6716..f19ba4c4411 100644 --- a/service/route53domains/api_op_RejectDomainTransferFromAnotherAwsAccount.go +++ b/service/route53domains/api_op_RejectDomainTransferFromAnotherAwsAccount.go @@ -125,6 +125,9 @@ func (c *Client) addOperationRejectDomainTransferFromAnotherAwsAccountMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectDomainTransferFromAnotherAwsAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_RenewDomain.go b/service/route53domains/api_op_RenewDomain.go index f38fbf358d7..0bfd02cac21 100644 --- a/service/route53domains/api_op_RenewDomain.go +++ b/service/route53domains/api_op_RenewDomain.go @@ -133,6 +133,9 @@ func (c *Client) addOperationRenewDomainMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRenewDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_ResendContactReachabilityEmail.go b/service/route53domains/api_op_ResendContactReachabilityEmail.go index 1203e3003ca..e44302c5a9a 100644 --- a/service/route53domains/api_op_ResendContactReachabilityEmail.go +++ b/service/route53domains/api_op_ResendContactReachabilityEmail.go @@ -116,6 +116,9 @@ func (c *Client) addOperationResendContactReachabilityEmailMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResendContactReachabilityEmail(options.Region), middleware.Before); err != nil { return err } diff --git a/service/route53domains/api_op_ResendOperationAuthorization.go b/service/route53domains/api_op_ResendOperationAuthorization.go index 48bf905519e..ff39fd22640 100644 --- a/service/route53domains/api_op_ResendOperationAuthorization.go +++ b/service/route53domains/api_op_ResendOperationAuthorization.go @@ -101,6 +101,9 @@ func (c *Client) addOperationResendOperationAuthorizationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResendOperationAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_RetrieveDomainAuthCode.go b/service/route53domains/api_op_RetrieveDomainAuthCode.go index 57046f6d18d..4ed7f4efc23 100644 --- a/service/route53domains/api_op_RetrieveDomainAuthCode.go +++ b/service/route53domains/api_op_RetrieveDomainAuthCode.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRetrieveDomainAuthCodeMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveDomainAuthCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_TransferDomain.go b/service/route53domains/api_op_TransferDomain.go index 94f4b791dd0..0bf8cfada88 100644 --- a/service/route53domains/api_op_TransferDomain.go +++ b/service/route53domains/api_op_TransferDomain.go @@ -248,6 +248,9 @@ func (c *Client) addOperationTransferDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTransferDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_TransferDomainToAnotherAwsAccount.go b/service/route53domains/api_op_TransferDomainToAnotherAwsAccount.go index 448b5c245b4..d26fc942179 100644 --- a/service/route53domains/api_op_TransferDomainToAnotherAwsAccount.go +++ b/service/route53domains/api_op_TransferDomainToAnotherAwsAccount.go @@ -152,6 +152,9 @@ func (c *Client) addOperationTransferDomainToAnotherAwsAccountMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTransferDomainToAnotherAwsAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_UpdateDomainContact.go b/service/route53domains/api_op_UpdateDomainContact.go index 2f84813b2a4..6511307fb39 100644 --- a/service/route53domains/api_op_UpdateDomainContact.go +++ b/service/route53domains/api_op_UpdateDomainContact.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateDomainContactMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_UpdateDomainContactPrivacy.go b/service/route53domains/api_op_UpdateDomainContactPrivacy.go index f9808e4c390..4ef3d1ef82c 100644 --- a/service/route53domains/api_op_UpdateDomainContactPrivacy.go +++ b/service/route53domains/api_op_UpdateDomainContactPrivacy.go @@ -169,6 +169,9 @@ func (c *Client) addOperationUpdateDomainContactPrivacyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainContactPrivacyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_UpdateDomainNameservers.go b/service/route53domains/api_op_UpdateDomainNameservers.go index e45fd92ecce..be7d8ca9fa9 100644 --- a/service/route53domains/api_op_UpdateDomainNameservers.go +++ b/service/route53domains/api_op_UpdateDomainNameservers.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateDomainNameserversMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainNameserversValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_UpdateTagsForDomain.go b/service/route53domains/api_op_UpdateTagsForDomain.go index 96ca2879501..c2d2ba0b9de 100644 --- a/service/route53domains/api_op_UpdateTagsForDomain.go +++ b/service/route53domains/api_op_UpdateTagsForDomain.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateTagsForDomainMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTagsForDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53domains/api_op_ViewBilling.go b/service/route53domains/api_op_ViewBilling.go index d858e17e3f7..cdaa0be5302 100644 --- a/service/route53domains/api_op_ViewBilling.go +++ b/service/route53domains/api_op_ViewBilling.go @@ -137,6 +137,9 @@ func (c *Client) addOperationViewBillingMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opViewBilling(options.Region), middleware.Before); err != nil { return err } @@ -158,13 +161,6 @@ func (c *Client) addOperationViewBillingMiddlewares(stack *middleware.Stack, opt return nil } -// ViewBillingAPIClient is a client that implements the ViewBilling operation. -type ViewBillingAPIClient interface { - ViewBilling(context.Context, *ViewBillingInput, ...func(*Options)) (*ViewBillingOutput, error) -} - -var _ ViewBillingAPIClient = (*Client)(nil) - // ViewBillingPaginatorOptions is the paginator options for ViewBilling type ViewBillingPaginatorOptions struct { // The number of billing records to be returned. @@ -230,6 +226,9 @@ func (p *ViewBillingPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ViewBilling(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ViewBillingPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ViewBillingAPIClient is a client that implements the ViewBilling operation. +type ViewBillingAPIClient interface { + ViewBilling(context.Context, *ViewBillingInput, ...func(*Options)) (*ViewBillingOutput, error) +} + +var _ ViewBillingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opViewBilling(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53profiles/api_client.go b/service/route53profiles/api_client.go index 697a79df5d8..5a624655d68 100644 --- a/service/route53profiles/api_client.go +++ b/service/route53profiles/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/route53profiles/api_op_AssociateProfile.go b/service/route53profiles/api_op_AssociateProfile.go index b09b31a47a3..5e6e826c7fe 100644 --- a/service/route53profiles/api_op_AssociateProfile.go +++ b/service/route53profiles/api_op_AssociateProfile.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateProfileMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_AssociateResourceToProfile.go b/service/route53profiles/api_op_AssociateResourceToProfile.go index 10a2cac6a75..ebefdac07e7 100644 --- a/service/route53profiles/api_op_AssociateResourceToProfile.go +++ b/service/route53profiles/api_op_AssociateResourceToProfile.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAssociateResourceToProfileMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResourceToProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_CreateProfile.go b/service/route53profiles/api_op_CreateProfile.go index 5d86c8a8bb8..cb5c7657838 100644 --- a/service/route53profiles/api_op_CreateProfile.go +++ b/service/route53profiles/api_op_CreateProfile.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/route53profiles/api_op_DeleteProfile.go b/service/route53profiles/api_op_DeleteProfile.go index a4b88913d6d..184300dc7af 100644 --- a/service/route53profiles/api_op_DeleteProfile.go +++ b/service/route53profiles/api_op_DeleteProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_DisassociateProfile.go b/service/route53profiles/api_op_DisassociateProfile.go index b510ab69f06..7faeb4939e9 100644 --- a/service/route53profiles/api_op_DisassociateProfile.go +++ b/service/route53profiles/api_op_DisassociateProfile.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_DisassociateResourceFromProfile.go b/service/route53profiles/api_op_DisassociateResourceFromProfile.go index 83dfa2c030d..3dc11ff6ab8 100644 --- a/service/route53profiles/api_op_DisassociateResourceFromProfile.go +++ b/service/route53profiles/api_op_DisassociateResourceFromProfile.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisassociateResourceFromProfileMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResourceFromProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_GetProfile.go b/service/route53profiles/api_op_GetProfile.go index a8a40366c77..745e15355e5 100644 --- a/service/route53profiles/api_op_GetProfile.go +++ b/service/route53profiles/api_op_GetProfile.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetProfileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_GetProfileAssociation.go b/service/route53profiles/api_op_GetProfileAssociation.go index 4d00b52a9b5..cca5040a0d6 100644 --- a/service/route53profiles/api_op_GetProfileAssociation.go +++ b/service/route53profiles/api_op_GetProfileAssociation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetProfileAssociationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_GetProfileResourceAssociation.go b/service/route53profiles/api_op_GetProfileResourceAssociation.go index 4cffbb42756..790fd028c0a 100644 --- a/service/route53profiles/api_op_GetProfileResourceAssociation.go +++ b/service/route53profiles/api_op_GetProfileResourceAssociation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetProfileResourceAssociationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileResourceAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_ListProfileAssociations.go b/service/route53profiles/api_op_ListProfileAssociations.go index 2c11d72268b..0fd526c0cac 100644 --- a/service/route53profiles/api_op_ListProfileAssociations.go +++ b/service/route53profiles/api_op_ListProfileAssociations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListProfileAssociationsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfileAssociations(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListProfileAssociationsMiddlewares(stack *middlewar return nil } -// ListProfileAssociationsAPIClient is a client that implements the -// ListProfileAssociations operation. -type ListProfileAssociationsAPIClient interface { - ListProfileAssociations(context.Context, *ListProfileAssociationsInput, ...func(*Options)) (*ListProfileAssociationsOutput, error) -} - -var _ ListProfileAssociationsAPIClient = (*Client)(nil) - // ListProfileAssociationsPaginatorOptions is the paginator options for // ListProfileAssociations type ListProfileAssociationsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListProfileAssociationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfileAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListProfileAssociationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListProfileAssociationsAPIClient is a client that implements the +// ListProfileAssociations operation. +type ListProfileAssociationsAPIClient interface { + ListProfileAssociations(context.Context, *ListProfileAssociationsInput, ...func(*Options)) (*ListProfileAssociationsOutput, error) +} + +var _ ListProfileAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfileAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53profiles/api_op_ListProfileResourceAssociations.go b/service/route53profiles/api_op_ListProfileResourceAssociations.go index bb6574ea8b9..ba3245d8157 100644 --- a/service/route53profiles/api_op_ListProfileResourceAssociations.go +++ b/service/route53profiles/api_op_ListProfileResourceAssociations.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListProfileResourceAssociationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProfileResourceAssociationsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListProfileResourceAssociationsMiddlewares(stack *m return nil } -// ListProfileResourceAssociationsAPIClient is a client that implements the -// ListProfileResourceAssociations operation. -type ListProfileResourceAssociationsAPIClient interface { - ListProfileResourceAssociations(context.Context, *ListProfileResourceAssociationsInput, ...func(*Options)) (*ListProfileResourceAssociationsOutput, error) -} - -var _ ListProfileResourceAssociationsAPIClient = (*Client)(nil) - // ListProfileResourceAssociationsPaginatorOptions is the paginator options for // ListProfileResourceAssociations type ListProfileResourceAssociationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListProfileResourceAssociationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfileResourceAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListProfileResourceAssociationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListProfileResourceAssociationsAPIClient is a client that implements the +// ListProfileResourceAssociations operation. +type ListProfileResourceAssociationsAPIClient interface { + ListProfileResourceAssociations(context.Context, *ListProfileResourceAssociationsInput, ...func(*Options)) (*ListProfileResourceAssociationsOutput, error) +} + +var _ ListProfileResourceAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfileResourceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53profiles/api_op_ListProfiles.go b/service/route53profiles/api_op_ListProfiles.go index 2d062a597c5..cac229aba56 100644 --- a/service/route53profiles/api_op_ListProfiles.go +++ b/service/route53profiles/api_op_ListProfiles.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfiles(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op return nil } -// ListProfilesAPIClient is a client that implements the ListProfiles operation. -type ListProfilesAPIClient interface { - ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) -} - -var _ ListProfilesAPIClient = (*Client)(nil) - // ListProfilesPaginatorOptions is the paginator options for ListProfiles type ListProfilesPaginatorOptions struct { // The maximum number of objects that you want to return for this request. If @@ -218,6 +214,9 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProfilesAPIClient is a client that implements the ListProfiles operation. +type ListProfilesAPIClient interface { + ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) +} + +var _ ListProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53profiles/api_op_ListTagsForResource.go b/service/route53profiles/api_op_ListTagsForResource.go index bb5c3aeb071..00bef107f10 100644 --- a/service/route53profiles/api_op_ListTagsForResource.go +++ b/service/route53profiles/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_TagResource.go b/service/route53profiles/api_op_TagResource.go index 4dd4f23bed5..df785d0084c 100644 --- a/service/route53profiles/api_op_TagResource.go +++ b/service/route53profiles/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_UntagResource.go b/service/route53profiles/api_op_UntagResource.go index 5e788d76f5b..6c333a6d887 100644 --- a/service/route53profiles/api_op_UntagResource.go +++ b/service/route53profiles/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53profiles/api_op_UpdateProfileResourceAssociation.go b/service/route53profiles/api_op_UpdateProfileResourceAssociation.go index a76d1def699..b4215fae23a 100644 --- a/service/route53profiles/api_op_UpdateProfileResourceAssociation.go +++ b/service/route53profiles/api_op_UpdateProfileResourceAssociation.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateProfileResourceAssociationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileResourceAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycluster/api_client.go b/service/route53recoverycluster/api_client.go index fbfa2c882c5..7ccebde457d 100644 --- a/service/route53recoverycluster/api_client.go +++ b/service/route53recoverycluster/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/route53recoverycluster/api_op_GetRoutingControlState.go b/service/route53recoverycluster/api_op_GetRoutingControlState.go index 22b056fe738..0812f0cc049 100644 --- a/service/route53recoverycluster/api_op_GetRoutingControlState.go +++ b/service/route53recoverycluster/api_op_GetRoutingControlState.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetRoutingControlStateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoutingControlStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycluster/api_op_ListRoutingControls.go b/service/route53recoverycluster/api_op_ListRoutingControls.go index 2ee01580a05..e20b5793780 100644 --- a/service/route53recoverycluster/api_op_ListRoutingControls.go +++ b/service/route53recoverycluster/api_op_ListRoutingControls.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListRoutingControlsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoutingControls(options.Region), middleware.Before); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListRoutingControlsMiddlewares(stack *middleware.St return nil } -// ListRoutingControlsAPIClient is a client that implements the -// ListRoutingControls operation. -type ListRoutingControlsAPIClient interface { - ListRoutingControls(context.Context, *ListRoutingControlsInput, ...func(*Options)) (*ListRoutingControlsOutput, error) -} - -var _ ListRoutingControlsAPIClient = (*Client)(nil) - // ListRoutingControlsPaginatorOptions is the paginator options for // ListRoutingControls type ListRoutingControlsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListRoutingControlsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoutingControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListRoutingControlsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRoutingControlsAPIClient is a client that implements the +// ListRoutingControls operation. +type ListRoutingControlsAPIClient interface { + ListRoutingControls(context.Context, *ListRoutingControlsInput, ...func(*Options)) (*ListRoutingControlsOutput, error) +} + +var _ ListRoutingControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoutingControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycluster/api_op_UpdateRoutingControlState.go b/service/route53recoverycluster/api_op_UpdateRoutingControlState.go index 7e71fdbc9e5..338ac9090db 100644 --- a/service/route53recoverycluster/api_op_UpdateRoutingControlState.go +++ b/service/route53recoverycluster/api_op_UpdateRoutingControlState.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateRoutingControlStateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingControlStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycluster/api_op_UpdateRoutingControlStates.go b/service/route53recoverycluster/api_op_UpdateRoutingControlStates.go index 94a4f313b21..ceb6de708bd 100644 --- a/service/route53recoverycluster/api_op_UpdateRoutingControlStates.go +++ b/service/route53recoverycluster/api_op_UpdateRoutingControlStates.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateRoutingControlStatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingControlStatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_client.go b/service/route53recoverycontrolconfig/api_client.go index e1d2fb46057..a42ca126ae7 100644 --- a/service/route53recoverycontrolconfig/api_client.go +++ b/service/route53recoverycontrolconfig/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/route53recoverycontrolconfig/api_op_CreateCluster.go b/service/route53recoverycontrolconfig/api_op_CreateCluster.go index 462f3340146..08fa6a293b2 100644 --- a/service/route53recoverycontrolconfig/api_op_CreateCluster.go +++ b/service/route53recoverycontrolconfig/api_op_CreateCluster.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateClusterMiddleware(stack, options); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_CreateControlPanel.go b/service/route53recoverycontrolconfig/api_op_CreateControlPanel.go index 673eb5c4dc7..bf70917e60c 100644 --- a/service/route53recoverycontrolconfig/api_op_CreateControlPanel.go +++ b/service/route53recoverycontrolconfig/api_op_CreateControlPanel.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateControlPanelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateControlPanelMiddleware(stack, options); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_CreateRoutingControl.go b/service/route53recoverycontrolconfig/api_op_CreateRoutingControl.go index d7d1b8aa3b2..8652ffaef35 100644 --- a/service/route53recoverycontrolconfig/api_op_CreateRoutingControl.go +++ b/service/route53recoverycontrolconfig/api_op_CreateRoutingControl.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateRoutingControlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRoutingControlMiddleware(stack, options); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_CreateSafetyRule.go b/service/route53recoverycontrolconfig/api_op_CreateSafetyRule.go index 883c99fafe6..de395a8c60e 100644 --- a/service/route53recoverycontrolconfig/api_op_CreateSafetyRule.go +++ b/service/route53recoverycontrolconfig/api_op_CreateSafetyRule.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateSafetyRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSafetyRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_DeleteCluster.go b/service/route53recoverycontrolconfig/api_op_DeleteCluster.go index b20b5f5e540..43c098c16dd 100644 --- a/service/route53recoverycontrolconfig/api_op_DeleteCluster.go +++ b/service/route53recoverycontrolconfig/api_op_DeleteCluster.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_DeleteControlPanel.go b/service/route53recoverycontrolconfig/api_op_DeleteControlPanel.go index 1427e43f902..05b6728a298 100644 --- a/service/route53recoverycontrolconfig/api_op_DeleteControlPanel.go +++ b/service/route53recoverycontrolconfig/api_op_DeleteControlPanel.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteControlPanelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteControlPanelValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_DeleteRoutingControl.go b/service/route53recoverycontrolconfig/api_op_DeleteRoutingControl.go index d492567ebdd..e1f1d31d117 100644 --- a/service/route53recoverycontrolconfig/api_op_DeleteRoutingControl.go +++ b/service/route53recoverycontrolconfig/api_op_DeleteRoutingControl.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRoutingControlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRoutingControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_DeleteSafetyRule.go b/service/route53recoverycontrolconfig/api_op_DeleteSafetyRule.go index 58858e071b1..667293b7efd 100644 --- a/service/route53recoverycontrolconfig/api_op_DeleteSafetyRule.go +++ b/service/route53recoverycontrolconfig/api_op_DeleteSafetyRule.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteSafetyRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSafetyRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_DescribeCluster.go b/service/route53recoverycontrolconfig/api_op_DescribeCluster.go index 432aaf1fc9d..a41c30c4da9 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeCluster.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeCluster.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterValidationMiddleware(stack); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, return nil } -// DescribeClusterAPIClient is a client that implements the DescribeCluster -// operation. -type DescribeClusterAPIClient interface { - DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error) -} - -var _ DescribeClusterAPIClient = (*Client)(nil) - // ClusterCreatedWaiterOptions are waiter options for ClusterCreatedWaiter type ClusterCreatedWaiterOptions struct { @@ -259,7 +254,13 @@ func (w *ClusterCreatedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeCluster(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -456,7 +457,13 @@ func (w *ClusterDeletedWaiter) WaitForOutput(ctx context.Context, params *Descri } out, err := w.client.DescribeCluster(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -528,6 +535,14 @@ func clusterDeletedStateRetryable(ctx context.Context, input *DescribeClusterInp return true, nil } +// DescribeClusterAPIClient is a client that implements the DescribeCluster +// operation. +type DescribeClusterAPIClient interface { + DescribeCluster(context.Context, *DescribeClusterInput, ...func(*Options)) (*DescribeClusterOutput, error) +} + +var _ DescribeClusterAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go b/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go index 4ea26a16384..37b417c3da7 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeControlPanelMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeControlPanelValidationMiddleware(stack); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationDescribeControlPanelMiddlewares(stack *middleware.S return nil } -// DescribeControlPanelAPIClient is a client that implements the -// DescribeControlPanel operation. -type DescribeControlPanelAPIClient interface { - DescribeControlPanel(context.Context, *DescribeControlPanelInput, ...func(*Options)) (*DescribeControlPanelOutput, error) -} - -var _ DescribeControlPanelAPIClient = (*Client)(nil) - // ControlPanelCreatedWaiterOptions are waiter options for // ControlPanelCreatedWaiter type ControlPanelCreatedWaiterOptions struct { @@ -260,7 +255,13 @@ func (w *ControlPanelCreatedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeControlPanel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -459,7 +460,13 @@ func (w *ControlPanelDeletedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeControlPanel(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -531,6 +538,14 @@ func controlPanelDeletedStateRetryable(ctx context.Context, input *DescribeContr return true, nil } +// DescribeControlPanelAPIClient is a client that implements the +// DescribeControlPanel operation. +type DescribeControlPanelAPIClient interface { + DescribeControlPanel(context.Context, *DescribeControlPanelInput, ...func(*Options)) (*DescribeControlPanelOutput, error) +} + +var _ DescribeControlPanelAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeControlPanel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go b/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go index 77e449db942..856a3e247c5 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeRoutingControlMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRoutingControlValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeRoutingControlMiddlewares(stack *middleware return nil } -// DescribeRoutingControlAPIClient is a client that implements the -// DescribeRoutingControl operation. -type DescribeRoutingControlAPIClient interface { - DescribeRoutingControl(context.Context, *DescribeRoutingControlInput, ...func(*Options)) (*DescribeRoutingControlOutput, error) -} - -var _ DescribeRoutingControlAPIClient = (*Client)(nil) - // RoutingControlCreatedWaiterOptions are waiter options for // RoutingControlCreatedWaiter type RoutingControlCreatedWaiterOptions struct { @@ -265,7 +260,13 @@ func (w *RoutingControlCreatedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeRoutingControl(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -464,7 +465,13 @@ func (w *RoutingControlDeletedWaiter) WaitForOutput(ctx context.Context, params } out, err := w.client.DescribeRoutingControl(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -536,6 +543,14 @@ func routingControlDeletedStateRetryable(ctx context.Context, input *DescribeRou return true, nil } +// DescribeRoutingControlAPIClient is a client that implements the +// DescribeRoutingControl operation. +type DescribeRoutingControlAPIClient interface { + DescribeRoutingControl(context.Context, *DescribeRoutingControlInput, ...func(*Options)) (*DescribeRoutingControlOutput, error) +} + +var _ DescribeRoutingControlAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRoutingControl(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_DescribeSafetyRule.go b/service/route53recoverycontrolconfig/api_op_DescribeSafetyRule.go index 3961629a1af..4d21f480459 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeSafetyRule.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeSafetyRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeSafetyRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSafetyRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_GetResourcePolicy.go b/service/route53recoverycontrolconfig/api_op_GetResourcePolicy.go index 78b8921966a..70fc9b6da1b 100644 --- a/service/route53recoverycontrolconfig/api_op_GetResourcePolicy.go +++ b/service/route53recoverycontrolconfig/api_op_GetResourcePolicy.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go b/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go index a35656fbffc..2628ca91704 100644 --- a/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go +++ b/service/route53recoverycontrolconfig/api_op_ListAssociatedRoute53HealthChecks.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListAssociatedRoute53HealthChecksMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedRoute53HealthChecksValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListAssociatedRoute53HealthChecksMiddlewares(stack return nil } -// ListAssociatedRoute53HealthChecksAPIClient is a client that implements the -// ListAssociatedRoute53HealthChecks operation. -type ListAssociatedRoute53HealthChecksAPIClient interface { - ListAssociatedRoute53HealthChecks(context.Context, *ListAssociatedRoute53HealthChecksInput, ...func(*Options)) (*ListAssociatedRoute53HealthChecksOutput, error) -} - -var _ ListAssociatedRoute53HealthChecksAPIClient = (*Client)(nil) - // ListAssociatedRoute53HealthChecksPaginatorOptions is the paginator options for // ListAssociatedRoute53HealthChecks type ListAssociatedRoute53HealthChecksPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListAssociatedRoute53HealthChecksPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedRoute53HealthChecks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListAssociatedRoute53HealthChecksPaginator) NextPage(ctx context.Contex return result, nil } +// ListAssociatedRoute53HealthChecksAPIClient is a client that implements the +// ListAssociatedRoute53HealthChecks operation. +type ListAssociatedRoute53HealthChecksAPIClient interface { + ListAssociatedRoute53HealthChecks(context.Context, *ListAssociatedRoute53HealthChecksInput, ...func(*Options)) (*ListAssociatedRoute53HealthChecksOutput, error) +} + +var _ ListAssociatedRoute53HealthChecksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedRoute53HealthChecks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_ListClusters.go b/service/route53recoverycontrolconfig/api_op_ListClusters.go index 3cb67e81397..8d503a4c221 100644 --- a/service/route53recoverycontrolconfig/api_op_ListClusters.go +++ b/service/route53recoverycontrolconfig/api_op_ListClusters.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -201,6 +197,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_ListControlPanels.go b/service/route53recoverycontrolconfig/api_op_ListControlPanels.go index 146b50d1c1b..97424a5b99e 100644 --- a/service/route53recoverycontrolconfig/api_op_ListControlPanels.go +++ b/service/route53recoverycontrolconfig/api_op_ListControlPanels.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListControlPanelsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListControlPanels(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListControlPanelsMiddlewares(stack *middleware.Stac return nil } -// ListControlPanelsAPIClient is a client that implements the ListControlPanels -// operation. -type ListControlPanelsAPIClient interface { - ListControlPanels(context.Context, *ListControlPanelsInput, ...func(*Options)) (*ListControlPanelsOutput, error) -} - -var _ ListControlPanelsAPIClient = (*Client)(nil) - // ListControlPanelsPaginatorOptions is the paginator options for ListControlPanels type ListControlPanelsPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -205,6 +200,9 @@ func (p *ListControlPanelsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListControlPanels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListControlPanelsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListControlPanelsAPIClient is a client that implements the ListControlPanels +// operation. +type ListControlPanelsAPIClient interface { + ListControlPanels(context.Context, *ListControlPanelsInput, ...func(*Options)) (*ListControlPanelsOutput, error) +} + +var _ ListControlPanelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListControlPanels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go b/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go index a829fef78c2..d7a0ae5fb73 100644 --- a/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go +++ b/service/route53recoverycontrolconfig/api_op_ListRoutingControls.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListRoutingControlsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRoutingControlsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListRoutingControlsMiddlewares(stack *middleware.St return nil } -// ListRoutingControlsAPIClient is a client that implements the -// ListRoutingControls operation. -type ListRoutingControlsAPIClient interface { - ListRoutingControls(context.Context, *ListRoutingControlsInput, ...func(*Options)) (*ListRoutingControlsOutput, error) -} - -var _ ListRoutingControlsAPIClient = (*Client)(nil) - // ListRoutingControlsPaginatorOptions is the paginator options for // ListRoutingControls type ListRoutingControlsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListRoutingControlsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRoutingControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListRoutingControlsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRoutingControlsAPIClient is a client that implements the +// ListRoutingControls operation. +type ListRoutingControlsAPIClient interface { + ListRoutingControls(context.Context, *ListRoutingControlsInput, ...func(*Options)) (*ListRoutingControlsOutput, error) +} + +var _ ListRoutingControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRoutingControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go b/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go index e76bebb631c..088d8ff7923 100644 --- a/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go +++ b/service/route53recoverycontrolconfig/api_op_ListSafetyRules.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListSafetyRulesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSafetyRulesValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListSafetyRulesMiddlewares(stack *middleware.Stack, return nil } -// ListSafetyRulesAPIClient is a client that implements the ListSafetyRules -// operation. -type ListSafetyRulesAPIClient interface { - ListSafetyRules(context.Context, *ListSafetyRulesInput, ...func(*Options)) (*ListSafetyRulesOutput, error) -} - -var _ ListSafetyRulesAPIClient = (*Client)(nil) - // ListSafetyRulesPaginatorOptions is the paginator options for ListSafetyRules type ListSafetyRulesPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -211,6 +206,9 @@ func (p *ListSafetyRulesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSafetyRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListSafetyRulesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListSafetyRulesAPIClient is a client that implements the ListSafetyRules +// operation. +type ListSafetyRulesAPIClient interface { + ListSafetyRules(context.Context, *ListSafetyRulesInput, ...func(*Options)) (*ListSafetyRulesOutput, error) +} + +var _ ListSafetyRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSafetyRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoverycontrolconfig/api_op_ListTagsForResource.go b/service/route53recoverycontrolconfig/api_op_ListTagsForResource.go index 61b9b465e43..183a1a13439 100644 --- a/service/route53recoverycontrolconfig/api_op_ListTagsForResource.go +++ b/service/route53recoverycontrolconfig/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_TagResource.go b/service/route53recoverycontrolconfig/api_op_TagResource.go index 57fd1f9772d..7d05a49fd17 100644 --- a/service/route53recoverycontrolconfig/api_op_TagResource.go +++ b/service/route53recoverycontrolconfig/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_UntagResource.go b/service/route53recoverycontrolconfig/api_op_UntagResource.go index 9d2fa8b8afd..ce55ee55e87 100644 --- a/service/route53recoverycontrolconfig/api_op_UntagResource.go +++ b/service/route53recoverycontrolconfig/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_UpdateControlPanel.go b/service/route53recoverycontrolconfig/api_op_UpdateControlPanel.go index cd0a769c727..f88a504b1e0 100644 --- a/service/route53recoverycontrolconfig/api_op_UpdateControlPanel.go +++ b/service/route53recoverycontrolconfig/api_op_UpdateControlPanel.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateControlPanelMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateControlPanelValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_UpdateRoutingControl.go b/service/route53recoverycontrolconfig/api_op_UpdateRoutingControl.go index 6d36a501763..cb9e67459e2 100644 --- a/service/route53recoverycontrolconfig/api_op_UpdateRoutingControl.go +++ b/service/route53recoverycontrolconfig/api_op_UpdateRoutingControl.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateRoutingControlMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRoutingControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoverycontrolconfig/api_op_UpdateSafetyRule.go b/service/route53recoverycontrolconfig/api_op_UpdateSafetyRule.go index 75a2f87fbdd..faa5e7e4ed1 100644 --- a/service/route53recoverycontrolconfig/api_op_UpdateSafetyRule.go +++ b/service/route53recoverycontrolconfig/api_op_UpdateSafetyRule.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateSafetyRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSafetyRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_client.go b/service/route53recoveryreadiness/api_client.go index 117aed63169..abfed65894a 100644 --- a/service/route53recoveryreadiness/api_client.go +++ b/service/route53recoveryreadiness/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/route53recoveryreadiness/api_op_CreateCell.go b/service/route53recoveryreadiness/api_op_CreateCell.go index 061e38b05f4..bc41da27958 100644 --- a/service/route53recoveryreadiness/api_op_CreateCell.go +++ b/service/route53recoveryreadiness/api_op_CreateCell.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateCellMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCellValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_CreateCrossAccountAuthorization.go b/service/route53recoveryreadiness/api_op_CreateCrossAccountAuthorization.go index 2959c2cdbf5..a6eea6c61b0 100644 --- a/service/route53recoveryreadiness/api_op_CreateCrossAccountAuthorization.go +++ b/service/route53recoveryreadiness/api_op_CreateCrossAccountAuthorization.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCreateCrossAccountAuthorizationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCrossAccountAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_CreateReadinessCheck.go b/service/route53recoveryreadiness/api_op_CreateReadinessCheck.go index 8512535b11d..30bb6ad3657 100644 --- a/service/route53recoveryreadiness/api_op_CreateReadinessCheck.go +++ b/service/route53recoveryreadiness/api_op_CreateReadinessCheck.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateReadinessCheckMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReadinessCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_CreateRecoveryGroup.go b/service/route53recoveryreadiness/api_op_CreateRecoveryGroup.go index 3a2da69d358..9190630bd73 100644 --- a/service/route53recoveryreadiness/api_op_CreateRecoveryGroup.go +++ b/service/route53recoveryreadiness/api_op_CreateRecoveryGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateRecoveryGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRecoveryGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_CreateResourceSet.go b/service/route53recoveryreadiness/api_op_CreateResourceSet.go index dd3e5506342..99de61c14e1 100644 --- a/service/route53recoveryreadiness/api_op_CreateResourceSet.go +++ b/service/route53recoveryreadiness/api_op_CreateResourceSet.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateResourceSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_DeleteCell.go b/service/route53recoveryreadiness/api_op_DeleteCell.go index 6a761bc01a3..72ff14a3553 100644 --- a/service/route53recoveryreadiness/api_op_DeleteCell.go +++ b/service/route53recoveryreadiness/api_op_DeleteCell.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCellMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCellValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_DeleteCrossAccountAuthorization.go b/service/route53recoveryreadiness/api_op_DeleteCrossAccountAuthorization.go index 9cb54b23e80..1f10f4bfc92 100644 --- a/service/route53recoveryreadiness/api_op_DeleteCrossAccountAuthorization.go +++ b/service/route53recoveryreadiness/api_op_DeleteCrossAccountAuthorization.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCrossAccountAuthorizationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCrossAccountAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_DeleteReadinessCheck.go b/service/route53recoveryreadiness/api_op_DeleteReadinessCheck.go index 71ea77688fd..40c036911a8 100644 --- a/service/route53recoveryreadiness/api_op_DeleteReadinessCheck.go +++ b/service/route53recoveryreadiness/api_op_DeleteReadinessCheck.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteReadinessCheckMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReadinessCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_DeleteRecoveryGroup.go b/service/route53recoveryreadiness/api_op_DeleteRecoveryGroup.go index 7572ae654cc..9062f5c055c 100644 --- a/service/route53recoveryreadiness/api_op_DeleteRecoveryGroup.go +++ b/service/route53recoveryreadiness/api_op_DeleteRecoveryGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRecoveryGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecoveryGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_DeleteResourceSet.go b/service/route53recoveryreadiness/api_op_DeleteResourceSet.go index eaaca4c1b5f..bd225d26133 100644 --- a/service/route53recoveryreadiness/api_op_DeleteResourceSet.go +++ b/service/route53recoveryreadiness/api_op_DeleteResourceSet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteResourceSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_GetArchitectureRecommendations.go b/service/route53recoveryreadiness/api_op_GetArchitectureRecommendations.go index ce33b22fe4b..848b2703c53 100644 --- a/service/route53recoveryreadiness/api_op_GetArchitectureRecommendations.go +++ b/service/route53recoveryreadiness/api_op_GetArchitectureRecommendations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetArchitectureRecommendationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetArchitectureRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_GetCell.go b/service/route53recoveryreadiness/api_op_GetCell.go index 71bc9bbe326..6913406b608 100644 --- a/service/route53recoveryreadiness/api_op_GetCell.go +++ b/service/route53recoveryreadiness/api_op_GetCell.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetCellMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCellValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go b/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go index 89865e57951..b55d9e877e6 100644 --- a/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go +++ b/service/route53recoveryreadiness/api_op_GetCellReadinessSummary.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetCellReadinessSummaryMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCellReadinessSummaryValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationGetCellReadinessSummaryMiddlewares(stack *middlewar return nil } -// GetCellReadinessSummaryAPIClient is a client that implements the -// GetCellReadinessSummary operation. -type GetCellReadinessSummaryAPIClient interface { - GetCellReadinessSummary(context.Context, *GetCellReadinessSummaryInput, ...func(*Options)) (*GetCellReadinessSummaryOutput, error) -} - -var _ GetCellReadinessSummaryAPIClient = (*Client)(nil) - // GetCellReadinessSummaryPaginatorOptions is the paginator options for // GetCellReadinessSummary type GetCellReadinessSummaryPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *GetCellReadinessSummaryPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCellReadinessSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetCellReadinessSummaryPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetCellReadinessSummaryAPIClient is a client that implements the +// GetCellReadinessSummary operation. +type GetCellReadinessSummaryAPIClient interface { + GetCellReadinessSummary(context.Context, *GetCellReadinessSummaryInput, ...func(*Options)) (*GetCellReadinessSummaryOutput, error) +} + +var _ GetCellReadinessSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCellReadinessSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_GetReadinessCheck.go b/service/route53recoveryreadiness/api_op_GetReadinessCheck.go index cac4a975b1b..c3f5f40d30f 100644 --- a/service/route53recoveryreadiness/api_op_GetReadinessCheck.go +++ b/service/route53recoveryreadiness/api_op_GetReadinessCheck.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetReadinessCheckMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReadinessCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go b/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go index c497f6d3a6c..d74891e1624 100644 --- a/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go +++ b/service/route53recoveryreadiness/api_op_GetReadinessCheckResourceStatus.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetReadinessCheckResourceStatusMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReadinessCheckResourceStatusValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationGetReadinessCheckResourceStatusMiddlewares(stack *m return nil } -// GetReadinessCheckResourceStatusAPIClient is a client that implements the -// GetReadinessCheckResourceStatus operation. -type GetReadinessCheckResourceStatusAPIClient interface { - GetReadinessCheckResourceStatus(context.Context, *GetReadinessCheckResourceStatusInput, ...func(*Options)) (*GetReadinessCheckResourceStatusOutput, error) -} - -var _ GetReadinessCheckResourceStatusAPIClient = (*Client)(nil) - // GetReadinessCheckResourceStatusPaginatorOptions is the paginator options for // GetReadinessCheckResourceStatus type GetReadinessCheckResourceStatusPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetReadinessCheckResourceStatusPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetReadinessCheckResourceStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetReadinessCheckResourceStatusPaginator) NextPage(ctx context.Context, return result, nil } +// GetReadinessCheckResourceStatusAPIClient is a client that implements the +// GetReadinessCheckResourceStatus operation. +type GetReadinessCheckResourceStatusAPIClient interface { + GetReadinessCheckResourceStatus(context.Context, *GetReadinessCheckResourceStatusInput, ...func(*Options)) (*GetReadinessCheckResourceStatusOutput, error) +} + +var _ GetReadinessCheckResourceStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReadinessCheckResourceStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go b/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go index beabbe96e90..a34aff3aebf 100644 --- a/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go +++ b/service/route53recoveryreadiness/api_op_GetReadinessCheckStatus.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetReadinessCheckStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReadinessCheckStatusValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationGetReadinessCheckStatusMiddlewares(stack *middlewar return nil } -// GetReadinessCheckStatusAPIClient is a client that implements the -// GetReadinessCheckStatus operation. -type GetReadinessCheckStatusAPIClient interface { - GetReadinessCheckStatus(context.Context, *GetReadinessCheckStatusInput, ...func(*Options)) (*GetReadinessCheckStatusOutput, error) -} - -var _ GetReadinessCheckStatusAPIClient = (*Client)(nil) - // GetReadinessCheckStatusPaginatorOptions is the paginator options for // GetReadinessCheckStatus type GetReadinessCheckStatusPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *GetReadinessCheckStatusPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetReadinessCheckStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *GetReadinessCheckStatusPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetReadinessCheckStatusAPIClient is a client that implements the +// GetReadinessCheckStatus operation. +type GetReadinessCheckStatusAPIClient interface { + GetReadinessCheckStatus(context.Context, *GetReadinessCheckStatusInput, ...func(*Options)) (*GetReadinessCheckStatusOutput, error) +} + +var _ GetReadinessCheckStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReadinessCheckStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_GetRecoveryGroup.go b/service/route53recoveryreadiness/api_op_GetRecoveryGroup.go index 5c554ae682b..90dfd9f7046 100644 --- a/service/route53recoveryreadiness/api_op_GetRecoveryGroup.go +++ b/service/route53recoveryreadiness/api_op_GetRecoveryGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetRecoveryGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecoveryGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go b/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go index 7fd576319ea..23e254984bb 100644 --- a/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go +++ b/service/route53recoveryreadiness/api_op_GetRecoveryGroupReadinessSummary.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetRecoveryGroupReadinessSummaryMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecoveryGroupReadinessSummaryValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationGetRecoveryGroupReadinessSummaryMiddlewares(stack * return nil } -// GetRecoveryGroupReadinessSummaryAPIClient is a client that implements the -// GetRecoveryGroupReadinessSummary operation. -type GetRecoveryGroupReadinessSummaryAPIClient interface { - GetRecoveryGroupReadinessSummary(context.Context, *GetRecoveryGroupReadinessSummaryInput, ...func(*Options)) (*GetRecoveryGroupReadinessSummaryOutput, error) -} - -var _ GetRecoveryGroupReadinessSummaryAPIClient = (*Client)(nil) - // GetRecoveryGroupReadinessSummaryPaginatorOptions is the paginator options for // GetRecoveryGroupReadinessSummary type GetRecoveryGroupReadinessSummaryPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *GetRecoveryGroupReadinessSummaryPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetRecoveryGroupReadinessSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetRecoveryGroupReadinessSummaryPaginator) NextPage(ctx context.Context return result, nil } +// GetRecoveryGroupReadinessSummaryAPIClient is a client that implements the +// GetRecoveryGroupReadinessSummary operation. +type GetRecoveryGroupReadinessSummaryAPIClient interface { + GetRecoveryGroupReadinessSummary(context.Context, *GetRecoveryGroupReadinessSummaryInput, ...func(*Options)) (*GetRecoveryGroupReadinessSummaryOutput, error) +} + +var _ GetRecoveryGroupReadinessSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetRecoveryGroupReadinessSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_GetResourceSet.go b/service/route53recoveryreadiness/api_op_GetResourceSet.go index 166967e7056..ef002223a28 100644 --- a/service/route53recoveryreadiness/api_op_GetResourceSet.go +++ b/service/route53recoveryreadiness/api_op_GetResourceSet.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetResourceSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_ListCells.go b/service/route53recoveryreadiness/api_op_ListCells.go index 795ec7c9d4e..75e62254c33 100644 --- a/service/route53recoveryreadiness/api_op_ListCells.go +++ b/service/route53recoveryreadiness/api_op_ListCells.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListCellsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCells(options.Region), middleware.Before); err != nil { return err } @@ -131,13 +134,6 @@ func (c *Client) addOperationListCellsMiddlewares(stack *middleware.Stack, optio return nil } -// ListCellsAPIClient is a client that implements the ListCells operation. -type ListCellsAPIClient interface { - ListCells(context.Context, *ListCellsInput, ...func(*Options)) (*ListCellsOutput, error) -} - -var _ ListCellsAPIClient = (*Client)(nil) - // ListCellsPaginatorOptions is the paginator options for ListCells type ListCellsPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -201,6 +197,9 @@ func (p *ListCellsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCells(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +219,13 @@ func (p *ListCellsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListCellsAPIClient is a client that implements the ListCells operation. +type ListCellsAPIClient interface { + ListCells(context.Context, *ListCellsInput, ...func(*Options)) (*ListCellsOutput, error) +} + +var _ ListCellsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCells(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go b/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go index d3734447803..d4ea59ddeef 100644 --- a/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go +++ b/service/route53recoveryreadiness/api_op_ListCrossAccountAuthorizations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListCrossAccountAuthorizationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCrossAccountAuthorizations(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListCrossAccountAuthorizationsMiddlewares(stack *mi return nil } -// ListCrossAccountAuthorizationsAPIClient is a client that implements the -// ListCrossAccountAuthorizations operation. -type ListCrossAccountAuthorizationsAPIClient interface { - ListCrossAccountAuthorizations(context.Context, *ListCrossAccountAuthorizationsInput, ...func(*Options)) (*ListCrossAccountAuthorizationsOutput, error) -} - -var _ ListCrossAccountAuthorizationsAPIClient = (*Client)(nil) - // ListCrossAccountAuthorizationsPaginatorOptions is the paginator options for // ListCrossAccountAuthorizations type ListCrossAccountAuthorizationsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListCrossAccountAuthorizationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCrossAccountAuthorizations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListCrossAccountAuthorizationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListCrossAccountAuthorizationsAPIClient is a client that implements the +// ListCrossAccountAuthorizations operation. +type ListCrossAccountAuthorizationsAPIClient interface { + ListCrossAccountAuthorizations(context.Context, *ListCrossAccountAuthorizationsInput, ...func(*Options)) (*ListCrossAccountAuthorizationsOutput, error) +} + +var _ ListCrossAccountAuthorizationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCrossAccountAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_ListReadinessChecks.go b/service/route53recoveryreadiness/api_op_ListReadinessChecks.go index a798aefd673..434fbfd9f31 100644 --- a/service/route53recoveryreadiness/api_op_ListReadinessChecks.go +++ b/service/route53recoveryreadiness/api_op_ListReadinessChecks.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListReadinessChecksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReadinessChecks(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListReadinessChecksMiddlewares(stack *middleware.St return nil } -// ListReadinessChecksAPIClient is a client that implements the -// ListReadinessChecks operation. -type ListReadinessChecksAPIClient interface { - ListReadinessChecks(context.Context, *ListReadinessChecksInput, ...func(*Options)) (*ListReadinessChecksOutput, error) -} - -var _ ListReadinessChecksAPIClient = (*Client)(nil) - // ListReadinessChecksPaginatorOptions is the paginator options for // ListReadinessChecks type ListReadinessChecksPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListReadinessChecksPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReadinessChecks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListReadinessChecksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListReadinessChecksAPIClient is a client that implements the +// ListReadinessChecks operation. +type ListReadinessChecksAPIClient interface { + ListReadinessChecks(context.Context, *ListReadinessChecksInput, ...func(*Options)) (*ListReadinessChecksOutput, error) +} + +var _ ListReadinessChecksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReadinessChecks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go b/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go index 5a089af8813..18b87f9a0d8 100644 --- a/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go +++ b/service/route53recoveryreadiness/api_op_ListRecoveryGroups.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListRecoveryGroupsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecoveryGroups(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListRecoveryGroupsMiddlewares(stack *middleware.Sta return nil } -// ListRecoveryGroupsAPIClient is a client that implements the ListRecoveryGroups -// operation. -type ListRecoveryGroupsAPIClient interface { - ListRecoveryGroups(context.Context, *ListRecoveryGroupsInput, ...func(*Options)) (*ListRecoveryGroupsOutput, error) -} - -var _ ListRecoveryGroupsAPIClient = (*Client)(nil) - // ListRecoveryGroupsPaginatorOptions is the paginator options for // ListRecoveryGroups type ListRecoveryGroupsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListRecoveryGroupsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecoveryGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListRecoveryGroupsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListRecoveryGroupsAPIClient is a client that implements the ListRecoveryGroups +// operation. +type ListRecoveryGroupsAPIClient interface { + ListRecoveryGroups(context.Context, *ListRecoveryGroupsInput, ...func(*Options)) (*ListRecoveryGroupsOutput, error) +} + +var _ ListRecoveryGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecoveryGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_ListResourceSets.go b/service/route53recoveryreadiness/api_op_ListResourceSets.go index 6a35d7ee1d7..f7ff48056e6 100644 --- a/service/route53recoveryreadiness/api_op_ListResourceSets.go +++ b/service/route53recoveryreadiness/api_op_ListResourceSets.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListResourceSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceSets(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListResourceSetsMiddlewares(stack *middleware.Stack return nil } -// ListResourceSetsAPIClient is a client that implements the ListResourceSets -// operation. -type ListResourceSetsAPIClient interface { - ListResourceSets(context.Context, *ListResourceSetsInput, ...func(*Options)) (*ListResourceSetsOutput, error) -} - -var _ ListResourceSetsAPIClient = (*Client)(nil) - // ListResourceSetsPaginatorOptions is the paginator options for ListResourceSets type ListResourceSetsPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -202,6 +197,9 @@ func (p *ListResourceSetsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListResourceSetsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListResourceSetsAPIClient is a client that implements the ListResourceSets +// operation. +type ListResourceSetsAPIClient interface { + ListResourceSets(context.Context, *ListResourceSetsInput, ...func(*Options)) (*ListResourceSetsOutput, error) +} + +var _ ListResourceSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_ListRules.go b/service/route53recoveryreadiness/api_op_ListRules.go index 7463db6c75d..445d33b8c81 100644 --- a/service/route53recoveryreadiness/api_op_ListRules.go +++ b/service/route53recoveryreadiness/api_op_ListRules.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio return nil } -// ListRulesAPIClient is a client that implements the ListRules operation. -type ListRulesAPIClient interface { - ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) -} - -var _ ListRulesAPIClient = (*Client)(nil) - // ListRulesPaginatorOptions is the paginator options for ListRules type ListRulesPaginatorOptions struct { // The number of objects that you want to return with this call. @@ -205,6 +201,9 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +223,13 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRulesAPIClient is a client that implements the ListRules operation. +type ListRulesAPIClient interface { + ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) +} + +var _ ListRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53recoveryreadiness/api_op_ListTagsForResources.go b/service/route53recoveryreadiness/api_op_ListTagsForResources.go index 3dc16163f2d..e4499a2b086 100644 --- a/service/route53recoveryreadiness/api_op_ListTagsForResources.go +++ b/service/route53recoveryreadiness/api_op_ListTagsForResources.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourcesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourcesValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_TagResource.go b/service/route53recoveryreadiness/api_op_TagResource.go index 5c9986f3ad5..17be9777b21 100644 --- a/service/route53recoveryreadiness/api_op_TagResource.go +++ b/service/route53recoveryreadiness/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_UntagResource.go b/service/route53recoveryreadiness/api_op_UntagResource.go index d8df2a3f405..c190ccef39f 100644 --- a/service/route53recoveryreadiness/api_op_UntagResource.go +++ b/service/route53recoveryreadiness/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_UpdateCell.go b/service/route53recoveryreadiness/api_op_UpdateCell.go index 6833163a0cf..6df44b68188 100644 --- a/service/route53recoveryreadiness/api_op_UpdateCell.go +++ b/service/route53recoveryreadiness/api_op_UpdateCell.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateCellMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCellValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_UpdateReadinessCheck.go b/service/route53recoveryreadiness/api_op_UpdateReadinessCheck.go index 0952fceec0e..78ef830e7e4 100644 --- a/service/route53recoveryreadiness/api_op_UpdateReadinessCheck.go +++ b/service/route53recoveryreadiness/api_op_UpdateReadinessCheck.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateReadinessCheckMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReadinessCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_UpdateRecoveryGroup.go b/service/route53recoveryreadiness/api_op_UpdateRecoveryGroup.go index c53f9c45ab5..fec55681e24 100644 --- a/service/route53recoveryreadiness/api_op_UpdateRecoveryGroup.go +++ b/service/route53recoveryreadiness/api_op_UpdateRecoveryGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateRecoveryGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecoveryGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53recoveryreadiness/api_op_UpdateResourceSet.go b/service/route53recoveryreadiness/api_op_UpdateResourceSet.go index e43dba6b971..477a9cf2c06 100644 --- a/service/route53recoveryreadiness/api_op_UpdateResourceSet.go +++ b/service/route53recoveryreadiness/api_op_UpdateResourceSet.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateResourceSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_client.go b/service/route53resolver/api_client.go index 4382cc1c86f..37fa0030af0 100644 --- a/service/route53resolver/api_client.go +++ b/service/route53resolver/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/route53resolver/api_op_AssociateFirewallRuleGroup.go b/service/route53resolver/api_op_AssociateFirewallRuleGroup.go index ae00ccc3b3e..4aab85a0c9e 100644 --- a/service/route53resolver/api_op_AssociateFirewallRuleGroup.go +++ b/service/route53resolver/api_op_AssociateFirewallRuleGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationAssociateFirewallRuleGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateFirewallRuleGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/route53resolver/api_op_AssociateResolverEndpointIpAddress.go b/service/route53resolver/api_op_AssociateResolverEndpointIpAddress.go index 2e0dd46f16a..686908ec5dc 100644 --- a/service/route53resolver/api_op_AssociateResolverEndpointIpAddress.go +++ b/service/route53resolver/api_op_AssociateResolverEndpointIpAddress.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateResolverEndpointIpAddressMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResolverEndpointIpAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_AssociateResolverQueryLogConfig.go b/service/route53resolver/api_op_AssociateResolverQueryLogConfig.go index 6e511a842da..35ed98d552e 100644 --- a/service/route53resolver/api_op_AssociateResolverQueryLogConfig.go +++ b/service/route53resolver/api_op_AssociateResolverQueryLogConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateResolverQueryLogConfigMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResolverQueryLogConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_AssociateResolverRule.go b/service/route53resolver/api_op_AssociateResolverRule.go index 24287376579..6447825c127 100644 --- a/service/route53resolver/api_op_AssociateResolverRule.go +++ b/service/route53resolver/api_op_AssociateResolverRule.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAssociateResolverRuleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResolverRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateFirewallDomainList.go b/service/route53resolver/api_op_CreateFirewallDomainList.go index 7ff1a2a050b..10bee8e21f0 100644 --- a/service/route53resolver/api_op_CreateFirewallDomainList.go +++ b/service/route53resolver/api_op_CreateFirewallDomainList.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateFirewallDomainListMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFirewallDomainListMiddleware(stack, options); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateFirewallRule.go b/service/route53resolver/api_op_CreateFirewallRule.go index dfcdb806776..17d8be5fd13 100644 --- a/service/route53resolver/api_op_CreateFirewallRule.go +++ b/service/route53resolver/api_op_CreateFirewallRule.go @@ -232,6 +232,9 @@ func (c *Client) addOperationCreateFirewallRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFirewallRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateFirewallRuleGroup.go b/service/route53resolver/api_op_CreateFirewallRuleGroup.go index db594549b2a..8021739e5eb 100644 --- a/service/route53resolver/api_op_CreateFirewallRuleGroup.go +++ b/service/route53resolver/api_op_CreateFirewallRuleGroup.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateFirewallRuleGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateFirewallRuleGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateOutpostResolver.go b/service/route53resolver/api_op_CreateOutpostResolver.go index 783ac4cf7eb..84e99fd1e89 100644 --- a/service/route53resolver/api_op_CreateOutpostResolver.go +++ b/service/route53resolver/api_op_CreateOutpostResolver.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateOutpostResolverMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOutpostResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateResolverEndpoint.go b/service/route53resolver/api_op_CreateResolverEndpoint.go index 41d6dc7dcec..e1a05f4322a 100644 --- a/service/route53resolver/api_op_CreateResolverEndpoint.go +++ b/service/route53resolver/api_op_CreateResolverEndpoint.go @@ -203,6 +203,9 @@ func (c *Client) addOperationCreateResolverEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResolverEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateResolverQueryLogConfig.go b/service/route53resolver/api_op_CreateResolverQueryLogConfig.go index e6c7344ca0f..a4b4bbd5de9 100644 --- a/service/route53resolver/api_op_CreateResolverQueryLogConfig.go +++ b/service/route53resolver/api_op_CreateResolverQueryLogConfig.go @@ -155,6 +155,9 @@ func (c *Client) addOperationCreateResolverQueryLogConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateResolverQueryLogConfigMiddleware(stack, options); err != nil { return err } diff --git a/service/route53resolver/api_op_CreateResolverRule.go b/service/route53resolver/api_op_CreateResolverRule.go index fddd8dda9f5..08a763c7a45 100644 --- a/service/route53resolver/api_op_CreateResolverRule.go +++ b/service/route53resolver/api_op_CreateResolverRule.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateResolverRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResolverRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteFirewallDomainList.go b/service/route53resolver/api_op_DeleteFirewallDomainList.go index 18855342bd1..6f8589e19f9 100644 --- a/service/route53resolver/api_op_DeleteFirewallDomainList.go +++ b/service/route53resolver/api_op_DeleteFirewallDomainList.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFirewallDomainListMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFirewallDomainListValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteFirewallRule.go b/service/route53resolver/api_op_DeleteFirewallRule.go index 6bf0f373721..5bec6d61e08 100644 --- a/service/route53resolver/api_op_DeleteFirewallRule.go +++ b/service/route53resolver/api_op_DeleteFirewallRule.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDeleteFirewallRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFirewallRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteFirewallRuleGroup.go b/service/route53resolver/api_op_DeleteFirewallRuleGroup.go index 1590584cc54..4c16fe59599 100644 --- a/service/route53resolver/api_op_DeleteFirewallRuleGroup.go +++ b/service/route53resolver/api_op_DeleteFirewallRuleGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteFirewallRuleGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFirewallRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteOutpostResolver.go b/service/route53resolver/api_op_DeleteOutpostResolver.go index a8c22b27b0a..b53a1bbb0cd 100644 --- a/service/route53resolver/api_op_DeleteOutpostResolver.go +++ b/service/route53resolver/api_op_DeleteOutpostResolver.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteOutpostResolverMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOutpostResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteResolverEndpoint.go b/service/route53resolver/api_op_DeleteResolverEndpoint.go index 931da51b386..5642bfad5b5 100644 --- a/service/route53resolver/api_op_DeleteResolverEndpoint.go +++ b/service/route53resolver/api_op_DeleteResolverEndpoint.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteResolverEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResolverEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteResolverQueryLogConfig.go b/service/route53resolver/api_op_DeleteResolverQueryLogConfig.go index a39f7b30d5e..2bb113d24a4 100644 --- a/service/route53resolver/api_op_DeleteResolverQueryLogConfig.go +++ b/service/route53resolver/api_op_DeleteResolverQueryLogConfig.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteResolverQueryLogConfigMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResolverQueryLogConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DeleteResolverRule.go b/service/route53resolver/api_op_DeleteResolverRule.go index 8db1dd07810..768a8c4a443 100644 --- a/service/route53resolver/api_op_DeleteResolverRule.go +++ b/service/route53resolver/api_op_DeleteResolverRule.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteResolverRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResolverRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DisassociateFirewallRuleGroup.go b/service/route53resolver/api_op_DisassociateFirewallRuleGroup.go index 16c0ac6ede7..9ea06c169e9 100644 --- a/service/route53resolver/api_op_DisassociateFirewallRuleGroup.go +++ b/service/route53resolver/api_op_DisassociateFirewallRuleGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateFirewallRuleGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFirewallRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DisassociateResolverEndpointIpAddress.go b/service/route53resolver/api_op_DisassociateResolverEndpointIpAddress.go index 9ab8a6479b0..2372c27acf7 100644 --- a/service/route53resolver/api_op_DisassociateResolverEndpointIpAddress.go +++ b/service/route53resolver/api_op_DisassociateResolverEndpointIpAddress.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDisassociateResolverEndpointIpAddressMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResolverEndpointIpAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DisassociateResolverQueryLogConfig.go b/service/route53resolver/api_op_DisassociateResolverQueryLogConfig.go index 3386d8c8f6f..2cdfd0f1f33 100644 --- a/service/route53resolver/api_op_DisassociateResolverQueryLogConfig.go +++ b/service/route53resolver/api_op_DisassociateResolverQueryLogConfig.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDisassociateResolverQueryLogConfigMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResolverQueryLogConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_DisassociateResolverRule.go b/service/route53resolver/api_op_DisassociateResolverRule.go index bf02bf0a7f3..ca2c72e4616 100644 --- a/service/route53resolver/api_op_DisassociateResolverRule.go +++ b/service/route53resolver/api_op_DisassociateResolverRule.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateResolverRuleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResolverRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetFirewallConfig.go b/service/route53resolver/api_op_GetFirewallConfig.go index 9e5205fed6f..2ab5d4a1a05 100644 --- a/service/route53resolver/api_op_GetFirewallConfig.go +++ b/service/route53resolver/api_op_GetFirewallConfig.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetFirewallConfigMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFirewallConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetFirewallDomainList.go b/service/route53resolver/api_op_GetFirewallDomainList.go index fb73ff182ee..99354f4aa5e 100644 --- a/service/route53resolver/api_op_GetFirewallDomainList.go +++ b/service/route53resolver/api_op_GetFirewallDomainList.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetFirewallDomainListMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFirewallDomainListValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetFirewallRuleGroup.go b/service/route53resolver/api_op_GetFirewallRuleGroup.go index c680de0b0d7..055cf8f6155 100644 --- a/service/route53resolver/api_op_GetFirewallRuleGroup.go +++ b/service/route53resolver/api_op_GetFirewallRuleGroup.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetFirewallRuleGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFirewallRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetFirewallRuleGroupAssociation.go b/service/route53resolver/api_op_GetFirewallRuleGroupAssociation.go index d995dde20b3..c356bb80013 100644 --- a/service/route53resolver/api_op_GetFirewallRuleGroupAssociation.go +++ b/service/route53resolver/api_op_GetFirewallRuleGroupAssociation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetFirewallRuleGroupAssociationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFirewallRuleGroupAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetFirewallRuleGroupPolicy.go b/service/route53resolver/api_op_GetFirewallRuleGroupPolicy.go index 8b3d7072a1d..9a21bf6b543 100644 --- a/service/route53resolver/api_op_GetFirewallRuleGroupPolicy.go +++ b/service/route53resolver/api_op_GetFirewallRuleGroupPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetFirewallRuleGroupPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFirewallRuleGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetOutpostResolver.go b/service/route53resolver/api_op_GetOutpostResolver.go index 9ddf311b002..06f9db324a1 100644 --- a/service/route53resolver/api_op_GetOutpostResolver.go +++ b/service/route53resolver/api_op_GetOutpostResolver.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetOutpostResolverMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOutpostResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverConfig.go b/service/route53resolver/api_op_GetResolverConfig.go index 59a3eb6a28b..6fb6170b048 100644 --- a/service/route53resolver/api_op_GetResolverConfig.go +++ b/service/route53resolver/api_op_GetResolverConfig.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetResolverConfigMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverDnssecConfig.go b/service/route53resolver/api_op_GetResolverDnssecConfig.go index 6d57ffa60eb..2f72a4925e7 100644 --- a/service/route53resolver/api_op_GetResolverDnssecConfig.go +++ b/service/route53resolver/api_op_GetResolverDnssecConfig.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetResolverDnssecConfigMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverDnssecConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverEndpoint.go b/service/route53resolver/api_op_GetResolverEndpoint.go index d3337749fba..767554c5a88 100644 --- a/service/route53resolver/api_op_GetResolverEndpoint.go +++ b/service/route53resolver/api_op_GetResolverEndpoint.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetResolverEndpointMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverQueryLogConfig.go b/service/route53resolver/api_op_GetResolverQueryLogConfig.go index 9b243e1ae43..297677672a4 100644 --- a/service/route53resolver/api_op_GetResolverQueryLogConfig.go +++ b/service/route53resolver/api_op_GetResolverQueryLogConfig.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetResolverQueryLogConfigMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverQueryLogConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverQueryLogConfigAssociation.go b/service/route53resolver/api_op_GetResolverQueryLogConfigAssociation.go index 34d6e544f36..3f61819b6e1 100644 --- a/service/route53resolver/api_op_GetResolverQueryLogConfigAssociation.go +++ b/service/route53resolver/api_op_GetResolverQueryLogConfigAssociation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetResolverQueryLogConfigAssociationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverQueryLogConfigAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverQueryLogConfigPolicy.go b/service/route53resolver/api_op_GetResolverQueryLogConfigPolicy.go index 5c8a51d5a10..6c671285522 100644 --- a/service/route53resolver/api_op_GetResolverQueryLogConfigPolicy.go +++ b/service/route53resolver/api_op_GetResolverQueryLogConfigPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetResolverQueryLogConfigPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverQueryLogConfigPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverRule.go b/service/route53resolver/api_op_GetResolverRule.go index 4df749fe35c..d6574d26a05 100644 --- a/service/route53resolver/api_op_GetResolverRule.go +++ b/service/route53resolver/api_op_GetResolverRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetResolverRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverRuleAssociation.go b/service/route53resolver/api_op_GetResolverRuleAssociation.go index 10be694f68d..907b6de7c70 100644 --- a/service/route53resolver/api_op_GetResolverRuleAssociation.go +++ b/service/route53resolver/api_op_GetResolverRuleAssociation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetResolverRuleAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverRuleAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_GetResolverRulePolicy.go b/service/route53resolver/api_op_GetResolverRulePolicy.go index 8d6a1e1aecd..8dd29c1ad50 100644 --- a/service/route53resolver/api_op_GetResolverRulePolicy.go +++ b/service/route53resolver/api_op_GetResolverRulePolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetResolverRulePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResolverRulePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_ImportFirewallDomains.go b/service/route53resolver/api_op_ImportFirewallDomains.go index 0135e2bc3a3..44992ddb22b 100644 --- a/service/route53resolver/api_op_ImportFirewallDomains.go +++ b/service/route53resolver/api_op_ImportFirewallDomains.go @@ -143,6 +143,9 @@ func (c *Client) addOperationImportFirewallDomainsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportFirewallDomainsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_ListFirewallConfigs.go b/service/route53resolver/api_op_ListFirewallConfigs.go index 096c859b929..24f376660c3 100644 --- a/service/route53resolver/api_op_ListFirewallConfigs.go +++ b/service/route53resolver/api_op_ListFirewallConfigs.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListFirewallConfigsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFirewallConfigs(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListFirewallConfigsMiddlewares(stack *middleware.St return nil } -// ListFirewallConfigsAPIClient is a client that implements the -// ListFirewallConfigs operation. -type ListFirewallConfigsAPIClient interface { - ListFirewallConfigs(context.Context, *ListFirewallConfigsInput, ...func(*Options)) (*ListFirewallConfigsOutput, error) -} - -var _ ListFirewallConfigsAPIClient = (*Client)(nil) - // ListFirewallConfigsPaginatorOptions is the paginator options for // ListFirewallConfigs type ListFirewallConfigsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListFirewallConfigsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListFirewallConfigsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFirewallConfigsAPIClient is a client that implements the +// ListFirewallConfigs operation. +type ListFirewallConfigsAPIClient interface { + ListFirewallConfigs(context.Context, *ListFirewallConfigsInput, ...func(*Options)) (*ListFirewallConfigsOutput, error) +} + +var _ ListFirewallConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListFirewallDomainLists.go b/service/route53resolver/api_op_ListFirewallDomainLists.go index a7de40c9055..ef67d005434 100644 --- a/service/route53resolver/api_op_ListFirewallDomainLists.go +++ b/service/route53resolver/api_op_ListFirewallDomainLists.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListFirewallDomainListsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFirewallDomainLists(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListFirewallDomainListsMiddlewares(stack *middlewar return nil } -// ListFirewallDomainListsAPIClient is a client that implements the -// ListFirewallDomainLists operation. -type ListFirewallDomainListsAPIClient interface { - ListFirewallDomainLists(context.Context, *ListFirewallDomainListsInput, ...func(*Options)) (*ListFirewallDomainListsOutput, error) -} - -var _ ListFirewallDomainListsAPIClient = (*Client)(nil) - // ListFirewallDomainListsPaginatorOptions is the paginator options for // ListFirewallDomainLists type ListFirewallDomainListsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListFirewallDomainListsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallDomainLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListFirewallDomainListsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListFirewallDomainListsAPIClient is a client that implements the +// ListFirewallDomainLists operation. +type ListFirewallDomainListsAPIClient interface { + ListFirewallDomainLists(context.Context, *ListFirewallDomainListsInput, ...func(*Options)) (*ListFirewallDomainListsOutput, error) +} + +var _ ListFirewallDomainListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallDomainLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListFirewallDomains.go b/service/route53resolver/api_op_ListFirewallDomains.go index 5adc3dae404..090001e4f6c 100644 --- a/service/route53resolver/api_op_ListFirewallDomains.go +++ b/service/route53resolver/api_op_ListFirewallDomains.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListFirewallDomainsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFirewallDomainsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListFirewallDomainsMiddlewares(stack *middleware.St return nil } -// ListFirewallDomainsAPIClient is a client that implements the -// ListFirewallDomains operation. -type ListFirewallDomainsAPIClient interface { - ListFirewallDomains(context.Context, *ListFirewallDomainsInput, ...func(*Options)) (*ListFirewallDomainsOutput, error) -} - -var _ ListFirewallDomainsAPIClient = (*Client)(nil) - // ListFirewallDomainsPaginatorOptions is the paginator options for // ListFirewallDomains type ListFirewallDomainsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListFirewallDomainsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListFirewallDomainsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFirewallDomainsAPIClient is a client that implements the +// ListFirewallDomains operation. +type ListFirewallDomainsAPIClient interface { + ListFirewallDomains(context.Context, *ListFirewallDomainsInput, ...func(*Options)) (*ListFirewallDomainsOutput, error) +} + +var _ ListFirewallDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go b/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go index 0d33f2b7b99..28d8833ab1e 100644 --- a/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go +++ b/service/route53resolver/api_op_ListFirewallRuleGroupAssociations.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListFirewallRuleGroupAssociationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFirewallRuleGroupAssociations(options.Region), middleware.Before); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListFirewallRuleGroupAssociationsMiddlewares(stack return nil } -// ListFirewallRuleGroupAssociationsAPIClient is a client that implements the -// ListFirewallRuleGroupAssociations operation. -type ListFirewallRuleGroupAssociationsAPIClient interface { - ListFirewallRuleGroupAssociations(context.Context, *ListFirewallRuleGroupAssociationsInput, ...func(*Options)) (*ListFirewallRuleGroupAssociationsOutput, error) -} - -var _ ListFirewallRuleGroupAssociationsAPIClient = (*Client)(nil) - // ListFirewallRuleGroupAssociationsPaginatorOptions is the paginator options for // ListFirewallRuleGroupAssociations type ListFirewallRuleGroupAssociationsPaginatorOptions struct { @@ -250,6 +245,9 @@ func (p *ListFirewallRuleGroupAssociationsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallRuleGroupAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListFirewallRuleGroupAssociationsPaginator) NextPage(ctx context.Contex return result, nil } +// ListFirewallRuleGroupAssociationsAPIClient is a client that implements the +// ListFirewallRuleGroupAssociations operation. +type ListFirewallRuleGroupAssociationsAPIClient interface { + ListFirewallRuleGroupAssociations(context.Context, *ListFirewallRuleGroupAssociationsInput, ...func(*Options)) (*ListFirewallRuleGroupAssociationsOutput, error) +} + +var _ ListFirewallRuleGroupAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallRuleGroupAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListFirewallRuleGroups.go b/service/route53resolver/api_op_ListFirewallRuleGroups.go index 0f6071fb9d7..e5b3c8747b6 100644 --- a/service/route53resolver/api_op_ListFirewallRuleGroups.go +++ b/service/route53resolver/api_op_ListFirewallRuleGroups.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListFirewallRuleGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFirewallRuleGroups(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListFirewallRuleGroupsMiddlewares(stack *middleware return nil } -// ListFirewallRuleGroupsAPIClient is a client that implements the -// ListFirewallRuleGroups operation. -type ListFirewallRuleGroupsAPIClient interface { - ListFirewallRuleGroups(context.Context, *ListFirewallRuleGroupsInput, ...func(*Options)) (*ListFirewallRuleGroupsOutput, error) -} - -var _ ListFirewallRuleGroupsAPIClient = (*Client)(nil) - // ListFirewallRuleGroupsPaginatorOptions is the paginator options for // ListFirewallRuleGroups type ListFirewallRuleGroupsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListFirewallRuleGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallRuleGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListFirewallRuleGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListFirewallRuleGroupsAPIClient is a client that implements the +// ListFirewallRuleGroups operation. +type ListFirewallRuleGroupsAPIClient interface { + ListFirewallRuleGroups(context.Context, *ListFirewallRuleGroupsInput, ...func(*Options)) (*ListFirewallRuleGroupsOutput, error) +} + +var _ ListFirewallRuleGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallRuleGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListFirewallRules.go b/service/route53resolver/api_op_ListFirewallRules.go index dc7379ca226..6bff73866a9 100644 --- a/service/route53resolver/api_op_ListFirewallRules.go +++ b/service/route53resolver/api_op_ListFirewallRules.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListFirewallRulesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFirewallRulesValidationMiddleware(stack); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationListFirewallRulesMiddlewares(stack *middleware.Stac return nil } -// ListFirewallRulesAPIClient is a client that implements the ListFirewallRules -// operation. -type ListFirewallRulesAPIClient interface { - ListFirewallRules(context.Context, *ListFirewallRulesInput, ...func(*Options)) (*ListFirewallRulesOutput, error) -} - -var _ ListFirewallRulesAPIClient = (*Client)(nil) - // ListFirewallRulesPaginatorOptions is the paginator options for ListFirewallRules type ListFirewallRulesPaginatorOptions struct { // The maximum number of objects that you want Resolver to return for this @@ -259,6 +254,9 @@ func (p *ListFirewallRulesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFirewallRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *ListFirewallRulesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListFirewallRulesAPIClient is a client that implements the ListFirewallRules +// operation. +type ListFirewallRulesAPIClient interface { + ListFirewallRules(context.Context, *ListFirewallRulesInput, ...func(*Options)) (*ListFirewallRulesOutput, error) +} + +var _ ListFirewallRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFirewallRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListOutpostResolvers.go b/service/route53resolver/api_op_ListOutpostResolvers.go index 9692cac14ad..67cbe0051b5 100644 --- a/service/route53resolver/api_op_ListOutpostResolvers.go +++ b/service/route53resolver/api_op_ListOutpostResolvers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListOutpostResolversMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOutpostResolvers(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListOutpostResolversMiddlewares(stack *middleware.S return nil } -// ListOutpostResolversAPIClient is a client that implements the -// ListOutpostResolvers operation. -type ListOutpostResolversAPIClient interface { - ListOutpostResolvers(context.Context, *ListOutpostResolversInput, ...func(*Options)) (*ListOutpostResolversOutput, error) -} - -var _ ListOutpostResolversAPIClient = (*Client)(nil) - // ListOutpostResolversPaginatorOptions is the paginator options for // ListOutpostResolvers type ListOutpostResolversPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListOutpostResolversPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOutpostResolvers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListOutpostResolversPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListOutpostResolversAPIClient is a client that implements the +// ListOutpostResolvers operation. +type ListOutpostResolversAPIClient interface { + ListOutpostResolvers(context.Context, *ListOutpostResolversInput, ...func(*Options)) (*ListOutpostResolversOutput, error) +} + +var _ ListOutpostResolversAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOutpostResolvers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverConfigs.go b/service/route53resolver/api_op_ListResolverConfigs.go index 3d0759cc0e5..a28295590f9 100644 --- a/service/route53resolver/api_op_ListResolverConfigs.go +++ b/service/route53resolver/api_op_ListResolverConfigs.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListResolverConfigsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverConfigs(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListResolverConfigsMiddlewares(stack *middleware.St return nil } -// ListResolverConfigsAPIClient is a client that implements the -// ListResolverConfigs operation. -type ListResolverConfigsAPIClient interface { - ListResolverConfigs(context.Context, *ListResolverConfigsInput, ...func(*Options)) (*ListResolverConfigsOutput, error) -} - -var _ ListResolverConfigsAPIClient = (*Client)(nil) - // ListResolverConfigsPaginatorOptions is the paginator options for // ListResolverConfigs type ListResolverConfigsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListResolverConfigsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListResolverConfigsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListResolverConfigsAPIClient is a client that implements the +// ListResolverConfigs operation. +type ListResolverConfigsAPIClient interface { + ListResolverConfigs(context.Context, *ListResolverConfigsInput, ...func(*Options)) (*ListResolverConfigsOutput, error) +} + +var _ ListResolverConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverDnssecConfigs.go b/service/route53resolver/api_op_ListResolverDnssecConfigs.go index 19450e70089..271c355dc07 100644 --- a/service/route53resolver/api_op_ListResolverDnssecConfigs.go +++ b/service/route53resolver/api_op_ListResolverDnssecConfigs.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListResolverDnssecConfigsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverDnssecConfigs(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListResolverDnssecConfigsMiddlewares(stack *middlew return nil } -// ListResolverDnssecConfigsAPIClient is a client that implements the -// ListResolverDnssecConfigs operation. -type ListResolverDnssecConfigsAPIClient interface { - ListResolverDnssecConfigs(context.Context, *ListResolverDnssecConfigsInput, ...func(*Options)) (*ListResolverDnssecConfigsOutput, error) -} - -var _ ListResolverDnssecConfigsAPIClient = (*Client)(nil) - // ListResolverDnssecConfigsPaginatorOptions is the paginator options for // ListResolverDnssecConfigs type ListResolverDnssecConfigsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListResolverDnssecConfigsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverDnssecConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListResolverDnssecConfigsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListResolverDnssecConfigsAPIClient is a client that implements the +// ListResolverDnssecConfigs operation. +type ListResolverDnssecConfigsAPIClient interface { + ListResolverDnssecConfigs(context.Context, *ListResolverDnssecConfigsInput, ...func(*Options)) (*ListResolverDnssecConfigsOutput, error) +} + +var _ ListResolverDnssecConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverDnssecConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go b/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go index dd5c644962f..75c50b2c541 100644 --- a/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go +++ b/service/route53resolver/api_op_ListResolverEndpointIpAddresses.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListResolverEndpointIpAddressesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResolverEndpointIpAddressesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListResolverEndpointIpAddressesMiddlewares(stack *m return nil } -// ListResolverEndpointIpAddressesAPIClient is a client that implements the -// ListResolverEndpointIpAddresses operation. -type ListResolverEndpointIpAddressesAPIClient interface { - ListResolverEndpointIpAddresses(context.Context, *ListResolverEndpointIpAddressesInput, ...func(*Options)) (*ListResolverEndpointIpAddressesOutput, error) -} - -var _ ListResolverEndpointIpAddressesAPIClient = (*Client)(nil) - // ListResolverEndpointIpAddressesPaginatorOptions is the paginator options for // ListResolverEndpointIpAddresses type ListResolverEndpointIpAddressesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListResolverEndpointIpAddressesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverEndpointIpAddresses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListResolverEndpointIpAddressesPaginator) NextPage(ctx context.Context, return result, nil } +// ListResolverEndpointIpAddressesAPIClient is a client that implements the +// ListResolverEndpointIpAddresses operation. +type ListResolverEndpointIpAddressesAPIClient interface { + ListResolverEndpointIpAddresses(context.Context, *ListResolverEndpointIpAddressesInput, ...func(*Options)) (*ListResolverEndpointIpAddressesOutput, error) +} + +var _ ListResolverEndpointIpAddressesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverEndpointIpAddresses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverEndpoints.go b/service/route53resolver/api_op_ListResolverEndpoints.go index 23fe0623ac7..e0f91bec17b 100644 --- a/service/route53resolver/api_op_ListResolverEndpoints.go +++ b/service/route53resolver/api_op_ListResolverEndpoints.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListResolverEndpointsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListResolverEndpointsMiddlewares(stack *middleware. return nil } -// ListResolverEndpointsAPIClient is a client that implements the -// ListResolverEndpoints operation. -type ListResolverEndpointsAPIClient interface { - ListResolverEndpoints(context.Context, *ListResolverEndpointsInput, ...func(*Options)) (*ListResolverEndpointsOutput, error) -} - -var _ ListResolverEndpointsAPIClient = (*Client)(nil) - // ListResolverEndpointsPaginatorOptions is the paginator options for // ListResolverEndpoints type ListResolverEndpointsPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListResolverEndpointsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListResolverEndpointsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListResolverEndpointsAPIClient is a client that implements the +// ListResolverEndpoints operation. +type ListResolverEndpointsAPIClient interface { + ListResolverEndpoints(context.Context, *ListResolverEndpointsInput, ...func(*Options)) (*ListResolverEndpointsOutput, error) +} + +var _ ListResolverEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go b/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go index ebd22ff41a9..f231e120023 100644 --- a/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go +++ b/service/route53resolver/api_op_ListResolverQueryLogConfigAssociations.go @@ -199,6 +199,9 @@ func (c *Client) addOperationListResolverQueryLogConfigAssociationsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverQueryLogConfigAssociations(options.Region), middleware.Before); err != nil { return err } @@ -220,14 +223,6 @@ func (c *Client) addOperationListResolverQueryLogConfigAssociationsMiddlewares(s return nil } -// ListResolverQueryLogConfigAssociationsAPIClient is a client that implements the -// ListResolverQueryLogConfigAssociations operation. -type ListResolverQueryLogConfigAssociationsAPIClient interface { - ListResolverQueryLogConfigAssociations(context.Context, *ListResolverQueryLogConfigAssociationsInput, ...func(*Options)) (*ListResolverQueryLogConfigAssociationsOutput, error) -} - -var _ ListResolverQueryLogConfigAssociationsAPIClient = (*Client)(nil) - // ListResolverQueryLogConfigAssociationsPaginatorOptions is the paginator options // for ListResolverQueryLogConfigAssociations type ListResolverQueryLogConfigAssociationsPaginatorOptions struct { @@ -297,6 +292,9 @@ func (p *ListResolverQueryLogConfigAssociationsPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverQueryLogConfigAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -316,6 +314,14 @@ func (p *ListResolverQueryLogConfigAssociationsPaginator) NextPage(ctx context.C return result, nil } +// ListResolverQueryLogConfigAssociationsAPIClient is a client that implements the +// ListResolverQueryLogConfigAssociations operation. +type ListResolverQueryLogConfigAssociationsAPIClient interface { + ListResolverQueryLogConfigAssociations(context.Context, *ListResolverQueryLogConfigAssociationsInput, ...func(*Options)) (*ListResolverQueryLogConfigAssociationsOutput, error) +} + +var _ ListResolverQueryLogConfigAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverQueryLogConfigAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverQueryLogConfigs.go b/service/route53resolver/api_op_ListResolverQueryLogConfigs.go index 556caed6b68..a721a158bd3 100644 --- a/service/route53resolver/api_op_ListResolverQueryLogConfigs.go +++ b/service/route53resolver/api_op_ListResolverQueryLogConfigs.go @@ -202,6 +202,9 @@ func (c *Client) addOperationListResolverQueryLogConfigsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverQueryLogConfigs(options.Region), middleware.Before); err != nil { return err } @@ -223,14 +226,6 @@ func (c *Client) addOperationListResolverQueryLogConfigsMiddlewares(stack *middl return nil } -// ListResolverQueryLogConfigsAPIClient is a client that implements the -// ListResolverQueryLogConfigs operation. -type ListResolverQueryLogConfigsAPIClient interface { - ListResolverQueryLogConfigs(context.Context, *ListResolverQueryLogConfigsInput, ...func(*Options)) (*ListResolverQueryLogConfigsOutput, error) -} - -var _ ListResolverQueryLogConfigsAPIClient = (*Client)(nil) - // ListResolverQueryLogConfigsPaginatorOptions is the paginator options for // ListResolverQueryLogConfigs type ListResolverQueryLogConfigsPaginatorOptions struct { @@ -299,6 +294,9 @@ func (p *ListResolverQueryLogConfigsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverQueryLogConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -318,6 +316,14 @@ func (p *ListResolverQueryLogConfigsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListResolverQueryLogConfigsAPIClient is a client that implements the +// ListResolverQueryLogConfigs operation. +type ListResolverQueryLogConfigsAPIClient interface { + ListResolverQueryLogConfigs(context.Context, *ListResolverQueryLogConfigsInput, ...func(*Options)) (*ListResolverQueryLogConfigsOutput, error) +} + +var _ ListResolverQueryLogConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverQueryLogConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverRuleAssociations.go b/service/route53resolver/api_op_ListResolverRuleAssociations.go index a4723d16c6c..c9c89c4ad60 100644 --- a/service/route53resolver/api_op_ListResolverRuleAssociations.go +++ b/service/route53resolver/api_op_ListResolverRuleAssociations.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListResolverRuleAssociationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverRuleAssociations(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListResolverRuleAssociationsMiddlewares(stack *midd return nil } -// ListResolverRuleAssociationsAPIClient is a client that implements the -// ListResolverRuleAssociations operation. -type ListResolverRuleAssociationsAPIClient interface { - ListResolverRuleAssociations(context.Context, *ListResolverRuleAssociationsInput, ...func(*Options)) (*ListResolverRuleAssociationsOutput, error) -} - -var _ ListResolverRuleAssociationsAPIClient = (*Client)(nil) - // ListResolverRuleAssociationsPaginatorOptions is the paginator options for // ListResolverRuleAssociations type ListResolverRuleAssociationsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListResolverRuleAssociationsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverRuleAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListResolverRuleAssociationsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListResolverRuleAssociationsAPIClient is a client that implements the +// ListResolverRuleAssociations operation. +type ListResolverRuleAssociationsAPIClient interface { + ListResolverRuleAssociations(context.Context, *ListResolverRuleAssociationsInput, ...func(*Options)) (*ListResolverRuleAssociationsOutput, error) +} + +var _ ListResolverRuleAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverRuleAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListResolverRules.go b/service/route53resolver/api_op_ListResolverRules.go index f490a32d012..b941b01553a 100644 --- a/service/route53resolver/api_op_ListResolverRules.go +++ b/service/route53resolver/api_op_ListResolverRules.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListResolverRulesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResolverRules(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListResolverRulesMiddlewares(stack *middleware.Stac return nil } -// ListResolverRulesAPIClient is a client that implements the ListResolverRules -// operation. -type ListResolverRulesAPIClient interface { - ListResolverRules(context.Context, *ListResolverRulesInput, ...func(*Options)) (*ListResolverRulesOutput, error) -} - -var _ ListResolverRulesAPIClient = (*Client)(nil) - // ListResolverRulesPaginatorOptions is the paginator options for ListResolverRules type ListResolverRulesPaginatorOptions struct { // The maximum number of Resolver rules that you want to return in the response to @@ -225,6 +220,9 @@ func (p *ListResolverRulesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResolverRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListResolverRulesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListResolverRulesAPIClient is a client that implements the ListResolverRules +// operation. +type ListResolverRulesAPIClient interface { + ListResolverRules(context.Context, *ListResolverRulesInput, ...func(*Options)) (*ListResolverRulesOutput, error) +} + +var _ ListResolverRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResolverRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_ListTagsForResource.go b/service/route53resolver/api_op_ListTagsForResource.go index c350885eb80..615d440c207 100644 --- a/service/route53resolver/api_op_ListTagsForResource.go +++ b/service/route53resolver/api_op_ListTagsForResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/route53resolver/api_op_PutFirewallRuleGroupPolicy.go b/service/route53resolver/api_op_PutFirewallRuleGroupPolicy.go index d2b38a0ce4f..321c2f1abbe 100644 --- a/service/route53resolver/api_op_PutFirewallRuleGroupPolicy.go +++ b/service/route53resolver/api_op_PutFirewallRuleGroupPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutFirewallRuleGroupPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutFirewallRuleGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go b/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go index af1431cec81..c66458aa2bc 100644 --- a/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go +++ b/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutResolverQueryLogConfigPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResolverQueryLogConfigPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_PutResolverRulePolicy.go b/service/route53resolver/api_op_PutResolverRulePolicy.go index 5d704ff5f4a..fe4a047fb97 100644 --- a/service/route53resolver/api_op_PutResolverRulePolicy.go +++ b/service/route53resolver/api_op_PutResolverRulePolicy.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPutResolverRulePolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResolverRulePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_TagResource.go b/service/route53resolver/api_op_TagResource.go index 9244353e493..4ef63f61db4 100644 --- a/service/route53resolver/api_op_TagResource.go +++ b/service/route53resolver/api_op_TagResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UntagResource.go b/service/route53resolver/api_op_UntagResource.go index 91ebc3f94a5..6473ad78b6b 100644 --- a/service/route53resolver/api_op_UntagResource.go +++ b/service/route53resolver/api_op_UntagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateFirewallConfig.go b/service/route53resolver/api_op_UpdateFirewallConfig.go index aca5faf8922..7c47cf1e8ed 100644 --- a/service/route53resolver/api_op_UpdateFirewallConfig.go +++ b/service/route53resolver/api_op_UpdateFirewallConfig.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateFirewallConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateFirewallDomains.go b/service/route53resolver/api_op_UpdateFirewallDomains.go index cbacb091679..e22b5611e56 100644 --- a/service/route53resolver/api_op_UpdateFirewallDomains.go +++ b/service/route53resolver/api_op_UpdateFirewallDomains.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateFirewallDomainsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallDomainsValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateFirewallRule.go b/service/route53resolver/api_op_UpdateFirewallRule.go index 6fa61178ecc..acdc5e51a32 100644 --- a/service/route53resolver/api_op_UpdateFirewallRule.go +++ b/service/route53resolver/api_op_UpdateFirewallRule.go @@ -209,6 +209,9 @@ func (c *Client) addOperationUpdateFirewallRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateFirewallRuleGroupAssociation.go b/service/route53resolver/api_op_UpdateFirewallRuleGroupAssociation.go index f2a94ee3d5b..654d1ff1c60 100644 --- a/service/route53resolver/api_op_UpdateFirewallRuleGroupAssociation.go +++ b/service/route53resolver/api_op_UpdateFirewallRuleGroupAssociation.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateFirewallRuleGroupAssociationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFirewallRuleGroupAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateOutpostResolver.go b/service/route53resolver/api_op_UpdateOutpostResolver.go index a615bf88fe3..773e9201b2c 100644 --- a/service/route53resolver/api_op_UpdateOutpostResolver.go +++ b/service/route53resolver/api_op_UpdateOutpostResolver.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateOutpostResolverMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOutpostResolverValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateResolverConfig.go b/service/route53resolver/api_op_UpdateResolverConfig.go index 768107b36bc..6d1460beef0 100644 --- a/service/route53resolver/api_op_UpdateResolverConfig.go +++ b/service/route53resolver/api_op_UpdateResolverConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateResolverConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResolverConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateResolverDnssecConfig.go b/service/route53resolver/api_op_UpdateResolverDnssecConfig.go index 3cc22b521ae..0dc5c008421 100644 --- a/service/route53resolver/api_op_UpdateResolverDnssecConfig.go +++ b/service/route53resolver/api_op_UpdateResolverDnssecConfig.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateResolverDnssecConfigMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResolverDnssecConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateResolverEndpoint.go b/service/route53resolver/api_op_UpdateResolverEndpoint.go index 645736315b5..bc0c99fa21b 100644 --- a/service/route53resolver/api_op_UpdateResolverEndpoint.go +++ b/service/route53resolver/api_op_UpdateResolverEndpoint.go @@ -157,6 +157,9 @@ func (c *Client) addOperationUpdateResolverEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResolverEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/route53resolver/api_op_UpdateResolverRule.go b/service/route53resolver/api_op_UpdateResolverRule.go index df4cf74f8cf..e096f8669ea 100644 --- a/service/route53resolver/api_op_UpdateResolverRule.go +++ b/service/route53resolver/api_op_UpdateResolverRule.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateResolverRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResolverRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_client.go b/service/rum/api_client.go index ecfd39fee09..09962a381d4 100644 --- a/service/rum/api_client.go +++ b/service/rum/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/rum/api_op_BatchCreateRumMetricDefinitions.go b/service/rum/api_op_BatchCreateRumMetricDefinitions.go index 7a17bcca4de..6cc6931e79d 100644 --- a/service/rum/api_op_BatchCreateRumMetricDefinitions.go +++ b/service/rum/api_op_BatchCreateRumMetricDefinitions.go @@ -182,6 +182,9 @@ func (c *Client) addOperationBatchCreateRumMetricDefinitionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchCreateRumMetricDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_BatchDeleteRumMetricDefinitions.go b/service/rum/api_op_BatchDeleteRumMetricDefinitions.go index 613ea81718f..02165f63b72 100644 --- a/service/rum/api_op_BatchDeleteRumMetricDefinitions.go +++ b/service/rum/api_op_BatchDeleteRumMetricDefinitions.go @@ -139,6 +139,9 @@ func (c *Client) addOperationBatchDeleteRumMetricDefinitionsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteRumMetricDefinitionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_BatchGetRumMetricDefinitions.go b/service/rum/api_op_BatchGetRumMetricDefinitions.go index 810cfeb898e..0738487fee0 100644 --- a/service/rum/api_op_BatchGetRumMetricDefinitions.go +++ b/service/rum/api_op_BatchGetRumMetricDefinitions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationBatchGetRumMetricDefinitionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetRumMetricDefinitionsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationBatchGetRumMetricDefinitionsMiddlewares(stack *midd return nil } -// BatchGetRumMetricDefinitionsAPIClient is a client that implements the -// BatchGetRumMetricDefinitions operation. -type BatchGetRumMetricDefinitionsAPIClient interface { - BatchGetRumMetricDefinitions(context.Context, *BatchGetRumMetricDefinitionsInput, ...func(*Options)) (*BatchGetRumMetricDefinitionsOutput, error) -} - -var _ BatchGetRumMetricDefinitionsAPIClient = (*Client)(nil) - // BatchGetRumMetricDefinitionsPaginatorOptions is the paginator options for // BatchGetRumMetricDefinitions type BatchGetRumMetricDefinitionsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *BatchGetRumMetricDefinitionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.BatchGetRumMetricDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *BatchGetRumMetricDefinitionsPaginator) NextPage(ctx context.Context, op return result, nil } +// BatchGetRumMetricDefinitionsAPIClient is a client that implements the +// BatchGetRumMetricDefinitions operation. +type BatchGetRumMetricDefinitionsAPIClient interface { + BatchGetRumMetricDefinitions(context.Context, *BatchGetRumMetricDefinitionsInput, ...func(*Options)) (*BatchGetRumMetricDefinitionsOutput, error) +} + +var _ BatchGetRumMetricDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opBatchGetRumMetricDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rum/api_op_CreateAppMonitor.go b/service/rum/api_op_CreateAppMonitor.go index 6c589e840a2..117536e0d60 100644 --- a/service/rum/api_op_CreateAppMonitor.go +++ b/service/rum/api_op_CreateAppMonitor.go @@ -170,6 +170,9 @@ func (c *Client) addOperationCreateAppMonitorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_DeleteAppMonitor.go b/service/rum/api_op_DeleteAppMonitor.go index af5815c3693..a1549adad56 100644 --- a/service/rum/api_op_DeleteAppMonitor.go +++ b/service/rum/api_op_DeleteAppMonitor.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppMonitorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_DeleteRumMetricsDestination.go b/service/rum/api_op_DeleteRumMetricsDestination.go index e1d0f9d6169..bc199d0743a 100644 --- a/service/rum/api_op_DeleteRumMetricsDestination.go +++ b/service/rum/api_op_DeleteRumMetricsDestination.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteRumMetricsDestinationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRumMetricsDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_GetAppMonitor.go b/service/rum/api_op_GetAppMonitor.go index c885735212a..68cc33f64ee 100644 --- a/service/rum/api_op_GetAppMonitor.go +++ b/service/rum/api_op_GetAppMonitor.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAppMonitorMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_GetAppMonitorData.go b/service/rum/api_op_GetAppMonitorData.go index 3d662f97056..ba85aa5a92f 100644 --- a/service/rum/api_op_GetAppMonitorData.go +++ b/service/rum/api_op_GetAppMonitorData.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetAppMonitorDataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppMonitorDataValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationGetAppMonitorDataMiddlewares(stack *middleware.Stac return nil } -// GetAppMonitorDataAPIClient is a client that implements the GetAppMonitorData -// operation. -type GetAppMonitorDataAPIClient interface { - GetAppMonitorData(context.Context, *GetAppMonitorDataInput, ...func(*Options)) (*GetAppMonitorDataOutput, error) -} - -var _ GetAppMonitorDataAPIClient = (*Client)(nil) - // GetAppMonitorDataPaginatorOptions is the paginator options for GetAppMonitorData type GetAppMonitorDataPaginatorOptions struct { // The maximum number of results to return in one operation. @@ -218,6 +213,9 @@ func (p *GetAppMonitorDataPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetAppMonitorData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *GetAppMonitorDataPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetAppMonitorDataAPIClient is a client that implements the GetAppMonitorData +// operation. +type GetAppMonitorDataAPIClient interface { + GetAppMonitorData(context.Context, *GetAppMonitorDataInput, ...func(*Options)) (*GetAppMonitorDataOutput, error) +} + +var _ GetAppMonitorDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetAppMonitorData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rum/api_op_ListAppMonitors.go b/service/rum/api_op_ListAppMonitors.go index 1d372c46472..62c8dc4d199 100644 --- a/service/rum/api_op_ListAppMonitors.go +++ b/service/rum/api_op_ListAppMonitors.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAppMonitorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppMonitors(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListAppMonitorsMiddlewares(stack *middleware.Stack, return nil } -// ListAppMonitorsAPIClient is a client that implements the ListAppMonitors -// operation. -type ListAppMonitorsAPIClient interface { - ListAppMonitors(context.Context, *ListAppMonitorsInput, ...func(*Options)) (*ListAppMonitorsOutput, error) -} - -var _ ListAppMonitorsAPIClient = (*Client)(nil) - // ListAppMonitorsPaginatorOptions is the paginator options for ListAppMonitors type ListAppMonitorsPaginatorOptions struct { // The maximum number of results to return in one operation. The default is 50. @@ -206,6 +201,9 @@ func (p *ListAppMonitorsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppMonitors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListAppMonitorsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListAppMonitorsAPIClient is a client that implements the ListAppMonitors +// operation. +type ListAppMonitorsAPIClient interface { + ListAppMonitors(context.Context, *ListAppMonitorsInput, ...func(*Options)) (*ListAppMonitorsOutput, error) +} + +var _ ListAppMonitorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppMonitors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rum/api_op_ListRumMetricsDestinations.go b/service/rum/api_op_ListRumMetricsDestinations.go index 1fd6cddd706..e3dd2cb8aa7 100644 --- a/service/rum/api_op_ListRumMetricsDestinations.go +++ b/service/rum/api_op_ListRumMetricsDestinations.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListRumMetricsDestinationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRumMetricsDestinationsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListRumMetricsDestinationsMiddlewares(stack *middle return nil } -// ListRumMetricsDestinationsAPIClient is a client that implements the -// ListRumMetricsDestinations operation. -type ListRumMetricsDestinationsAPIClient interface { - ListRumMetricsDestinations(context.Context, *ListRumMetricsDestinationsInput, ...func(*Options)) (*ListRumMetricsDestinationsOutput, error) -} - -var _ ListRumMetricsDestinationsAPIClient = (*Client)(nil) - // ListRumMetricsDestinationsPaginatorOptions is the paginator options for // ListRumMetricsDestinations type ListRumMetricsDestinationsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListRumMetricsDestinationsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRumMetricsDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListRumMetricsDestinationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListRumMetricsDestinationsAPIClient is a client that implements the +// ListRumMetricsDestinations operation. +type ListRumMetricsDestinationsAPIClient interface { + ListRumMetricsDestinations(context.Context, *ListRumMetricsDestinationsInput, ...func(*Options)) (*ListRumMetricsDestinationsOutput, error) +} + +var _ ListRumMetricsDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRumMetricsDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/rum/api_op_ListTagsForResource.go b/service/rum/api_op_ListTagsForResource.go index 8f69117323e..f1f32d114d1 100644 --- a/service/rum/api_op_ListTagsForResource.go +++ b/service/rum/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_PutRumEvents.go b/service/rum/api_op_PutRumEvents.go index 8d85058418e..9c711be5163 100644 --- a/service/rum/api_op_PutRumEvents.go +++ b/service/rum/api_op_PutRumEvents.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPutRumEventsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutRumEventsMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_PutRumMetricsDestination.go b/service/rum/api_op_PutRumMetricsDestination.go index 68889934097..bf507e23a59 100644 --- a/service/rum/api_op_PutRumMetricsDestination.go +++ b/service/rum/api_op_PutRumMetricsDestination.go @@ -135,6 +135,9 @@ func (c *Client) addOperationPutRumMetricsDestinationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRumMetricsDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_TagResource.go b/service/rum/api_op_TagResource.go index dea58c014fd..a89d2d5bb47 100644 --- a/service/rum/api_op_TagResource.go +++ b/service/rum/api_op_TagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_UntagResource.go b/service/rum/api_op_UntagResource.go index 4c5801e6431..4e0aa762df4 100644 --- a/service/rum/api_op_UntagResource.go +++ b/service/rum/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_UpdateAppMonitor.go b/service/rum/api_op_UpdateAppMonitor.go index 728eba97713..9dafc3839b7 100644 --- a/service/rum/api_op_UpdateAppMonitor.go +++ b/service/rum/api_op_UpdateAppMonitor.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateAppMonitorMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppMonitorValidationMiddleware(stack); err != nil { return err } diff --git a/service/rum/api_op_UpdateRumMetricDefinition.go b/service/rum/api_op_UpdateRumMetricDefinition.go index cc04b78bbce..dda91283002 100644 --- a/service/rum/api_op_UpdateRumMetricDefinition.go +++ b/service/rum/api_op_UpdateRumMetricDefinition.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateRumMetricDefinitionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRumMetricDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_client.go b/service/s3/api_client.go index 27e934991a8..97730b2cc66 100644 --- a/service/s3/api_client.go +++ b/service/s3/api_client.go @@ -484,6 +484,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -619,6 +643,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addMetadataRetrieverMiddleware(stack *middleware.Stack) error { return s3shared.AddMetadataRetrieverMiddleware(stack) } diff --git a/service/s3/api_op_AbortMultipartUpload.go b/service/s3/api_op_AbortMultipartUpload.go index 1e11992e88b..d1344cb1120 100644 --- a/service/s3/api_op_AbortMultipartUpload.go +++ b/service/s3/api_op_AbortMultipartUpload.go @@ -236,6 +236,12 @@ func (c *Client) addOperationAbortMultipartUploadMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpAbortMultipartUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index 75da6e5d3b8..04b8657b87b 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -458,6 +458,12 @@ func (c *Client) addOperationCompleteMultipartUploadMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpCompleteMultipartUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_CopyObject.go b/service/s3/api_op_CopyObject.go index 432f3325efe..46562d8391f 100644 --- a/service/s3/api_op_CopyObject.go +++ b/service/s3/api_op_CopyObject.go @@ -875,6 +875,12 @@ func (c *Client) addOperationCopyObjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpCopyObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_CreateBucket.go b/service/s3/api_op_CreateBucket.go index 4729fe22ec8..f9be56fe417 100644 --- a/service/s3/api_op_CreateBucket.go +++ b/service/s3/api_op_CreateBucket.go @@ -312,6 +312,12 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpCreateBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_CreateMultipartUpload.go b/service/s3/api_op_CreateMultipartUpload.go index 682174c31d0..b9b6dcb2868 100644 --- a/service/s3/api_op_CreateMultipartUpload.go +++ b/service/s3/api_op_CreateMultipartUpload.go @@ -786,6 +786,12 @@ func (c *Client) addOperationCreateMultipartUploadMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpCreateMultipartUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_CreateSession.go b/service/s3/api_op_CreateSession.go index 77d55c7d08a..7030c9b8537 100644 --- a/service/s3/api_op_CreateSession.go +++ b/service/s3/api_op_CreateSession.go @@ -195,6 +195,12 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpCreateSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucket.go b/service/s3/api_op_DeleteBucket.go index de8c508a036..de383254d22 100644 --- a/service/s3/api_op_DeleteBucket.go +++ b/service/s3/api_op_DeleteBucket.go @@ -170,6 +170,12 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go index 44e7b026360..5214e2d5ab5 100644 --- a/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go @@ -147,6 +147,12 @@ func (c *Client) addOperationDeleteBucketAnalyticsConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketCors.go b/service/s3/api_op_DeleteBucketCors.go index e39370d9184..b46d3044b0a 100644 --- a/service/s3/api_op_DeleteBucketCors.go +++ b/service/s3/api_op_DeleteBucketCors.go @@ -135,6 +135,12 @@ func (c *Client) addOperationDeleteBucketCorsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketCorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketEncryption.go b/service/s3/api_op_DeleteBucketEncryption.go index c34a8ff1198..b799f56afc2 100644 --- a/service/s3/api_op_DeleteBucketEncryption.go +++ b/service/s3/api_op_DeleteBucketEncryption.go @@ -140,6 +140,12 @@ func (c *Client) addOperationDeleteBucketEncryptionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go index 281033ac11e..c6551c88598 100644 --- a/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go +++ b/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go @@ -149,6 +149,12 @@ func (c *Client) addOperationDeleteBucketIntelligentTieringConfigurationMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/service/s3/api_op_DeleteBucketInventoryConfiguration.go index ce5a5d954da..830dbe8a45e 100644 --- a/service/s3/api_op_DeleteBucketInventoryConfiguration.go +++ b/service/s3/api_op_DeleteBucketInventoryConfiguration.go @@ -147,6 +147,12 @@ func (c *Client) addOperationDeleteBucketInventoryConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketInventoryConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketLifecycle.go b/service/s3/api_op_DeleteBucketLifecycle.go index 12873608e60..cb43e414a3a 100644 --- a/service/s3/api_op_DeleteBucketLifecycle.go +++ b/service/s3/api_op_DeleteBucketLifecycle.go @@ -142,6 +142,12 @@ func (c *Client) addOperationDeleteBucketLifecycleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketLifecycleValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/service/s3/api_op_DeleteBucketMetricsConfiguration.go index 39866943c49..d38de5e70ff 100644 --- a/service/s3/api_op_DeleteBucketMetricsConfiguration.go +++ b/service/s3/api_op_DeleteBucketMetricsConfiguration.go @@ -151,6 +151,12 @@ func (c *Client) addOperationDeleteBucketMetricsConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketMetricsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketOwnershipControls.go b/service/s3/api_op_DeleteBucketOwnershipControls.go index 434d0e60af2..b13495e30da 100644 --- a/service/s3/api_op_DeleteBucketOwnershipControls.go +++ b/service/s3/api_op_DeleteBucketOwnershipControls.go @@ -132,6 +132,12 @@ func (c *Client) addOperationDeleteBucketOwnershipControlsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketOwnershipControlsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketPolicy.go b/service/s3/api_op_DeleteBucketPolicy.go index 68c9744a7ae..e30cf0cf60d 100644 --- a/service/s3/api_op_DeleteBucketPolicy.go +++ b/service/s3/api_op_DeleteBucketPolicy.go @@ -182,6 +182,12 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketReplication.go b/service/s3/api_op_DeleteBucketReplication.go index 8e4ea6dc20b..8ea04e8a26b 100644 --- a/service/s3/api_op_DeleteBucketReplication.go +++ b/service/s3/api_op_DeleteBucketReplication.go @@ -142,6 +142,12 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketTagging.go b/service/s3/api_op_DeleteBucketTagging.go index ad668c5ee8a..b3b0b10179c 100644 --- a/service/s3/api_op_DeleteBucketTagging.go +++ b/service/s3/api_op_DeleteBucketTagging.go @@ -132,6 +132,12 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketTaggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteBucketWebsite.go b/service/s3/api_op_DeleteBucketWebsite.go index af3a6f95ffb..c5df2daa922 100644 --- a/service/s3/api_op_DeleteBucketWebsite.go +++ b/service/s3/api_op_DeleteBucketWebsite.go @@ -141,6 +141,12 @@ func (c *Client) addOperationDeleteBucketWebsiteMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteBucketWebsiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteObject.go b/service/s3/api_op_DeleteObject.go index a331940c4b3..bae1eab7801 100644 --- a/service/s3/api_op_DeleteObject.go +++ b/service/s3/api_op_DeleteObject.go @@ -297,6 +297,12 @@ func (c *Client) addOperationDeleteObjectMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteObjectTagging.go b/service/s3/api_op_DeleteObjectTagging.go index 1dad368b3db..ed134ee08b7 100644 --- a/service/s3/api_op_DeleteObjectTagging.go +++ b/service/s3/api_op_DeleteObjectTagging.go @@ -168,6 +168,12 @@ func (c *Client) addOperationDeleteObjectTaggingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteObjectTaggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeleteObjects.go b/service/s3/api_op_DeleteObjects.go index 8d6df171a48..f49411450d7 100644 --- a/service/s3/api_op_DeleteObjects.go +++ b/service/s3/api_op_DeleteObjects.go @@ -334,6 +334,12 @@ func (c *Client) addOperationDeleteObjectsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeleteObjectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_DeletePublicAccessBlock.go b/service/s3/api_op_DeletePublicAccessBlock.go index af0d6ffe555..284a4c888ce 100644 --- a/service/s3/api_op_DeletePublicAccessBlock.go +++ b/service/s3/api_op_DeletePublicAccessBlock.go @@ -138,6 +138,12 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpDeletePublicAccessBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketAccelerateConfiguration.go b/service/s3/api_op_GetBucketAccelerateConfiguration.go index b98b6a3654a..8c969a6fc3e 100644 --- a/service/s3/api_op_GetBucketAccelerateConfiguration.go +++ b/service/s3/api_op_GetBucketAccelerateConfiguration.go @@ -169,6 +169,12 @@ func (c *Client) addOperationGetBucketAccelerateConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketAccelerateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketAcl.go b/service/s3/api_op_GetBucketAcl.go index e775ad14b5d..c3817050e53 100644 --- a/service/s3/api_op_GetBucketAcl.go +++ b/service/s3/api_op_GetBucketAcl.go @@ -164,6 +164,12 @@ func (c *Client) addOperationGetBucketAclMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketAclValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/service/s3/api_op_GetBucketAnalyticsConfiguration.go index 930a095528f..6f8c670504f 100644 --- a/service/s3/api_op_GetBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_GetBucketAnalyticsConfiguration.go @@ -153,6 +153,12 @@ func (c *Client) addOperationGetBucketAnalyticsConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketCors.go b/service/s3/api_op_GetBucketCors.go index 31aed8abb97..8916dc79dcb 100644 --- a/service/s3/api_op_GetBucketCors.go +++ b/service/s3/api_op_GetBucketCors.go @@ -163,6 +163,12 @@ func (c *Client) addOperationGetBucketCorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketCorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketEncryption.go b/service/s3/api_op_GetBucketEncryption.go index 1ecd4c8137d..7aa5497d154 100644 --- a/service/s3/api_op_GetBucketEncryption.go +++ b/service/s3/api_op_GetBucketEncryption.go @@ -145,6 +145,12 @@ func (c *Client) addOperationGetBucketEncryptionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go index 417f8c3b4f7..a8f30ee51cb 100644 --- a/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go +++ b/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go @@ -154,6 +154,12 @@ func (c *Client) addOperationGetBucketIntelligentTieringConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketInventoryConfiguration.go b/service/s3/api_op_GetBucketInventoryConfiguration.go index d21afa2c10d..04c94d19bd2 100644 --- a/service/s3/api_op_GetBucketInventoryConfiguration.go +++ b/service/s3/api_op_GetBucketInventoryConfiguration.go @@ -152,6 +152,12 @@ func (c *Client) addOperationGetBucketInventoryConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketInventoryConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketLifecycleConfiguration.go b/service/s3/api_op_GetBucketLifecycleConfiguration.go index ed0b0a0ceaa..1c206dcf3e1 100644 --- a/service/s3/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3/api_op_GetBucketLifecycleConfiguration.go @@ -166,6 +166,12 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketLifecycleConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketLocation.go b/service/s3/api_op_GetBucketLocation.go index 165bde561bd..b24abf45b65 100644 --- a/service/s3/api_op_GetBucketLocation.go +++ b/service/s3/api_op_GetBucketLocation.go @@ -173,6 +173,12 @@ func (c *Client) addOperationGetBucketLocationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketLocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketLogging.go b/service/s3/api_op_GetBucketLogging.go index 1b4e785f399..f29eff8d356 100644 --- a/service/s3/api_op_GetBucketLogging.go +++ b/service/s3/api_op_GetBucketLogging.go @@ -138,6 +138,12 @@ func (c *Client) addOperationGetBucketLoggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketMetricsConfiguration.go b/service/s3/api_op_GetBucketMetricsConfiguration.go index d07beb197c6..080409350bc 100644 --- a/service/s3/api_op_GetBucketMetricsConfiguration.go +++ b/service/s3/api_op_GetBucketMetricsConfiguration.go @@ -155,6 +155,12 @@ func (c *Client) addOperationGetBucketMetricsConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketMetricsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketNotificationConfiguration.go b/service/s3/api_op_GetBucketNotificationConfiguration.go index 437272d403d..0f6e784391a 100644 --- a/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -178,6 +178,12 @@ func (c *Client) addOperationGetBucketNotificationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketNotificationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketOwnershipControls.go b/service/s3/api_op_GetBucketOwnershipControls.go index 9d8ebd71045..252ed8432ec 100644 --- a/service/s3/api_op_GetBucketOwnershipControls.go +++ b/service/s3/api_op_GetBucketOwnershipControls.go @@ -138,6 +138,12 @@ func (c *Client) addOperationGetBucketOwnershipControlsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketOwnershipControlsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketPolicy.go b/service/s3/api_op_GetBucketPolicy.go index f5cd4792ef4..769c4cb0f8b 100644 --- a/service/s3/api_op_GetBucketPolicy.go +++ b/service/s3/api_op_GetBucketPolicy.go @@ -203,6 +203,12 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketPolicyStatus.go b/service/s3/api_op_GetBucketPolicyStatus.go index a59acdae460..dc73b85d4eb 100644 --- a/service/s3/api_op_GetBucketPolicyStatus.go +++ b/service/s3/api_op_GetBucketPolicyStatus.go @@ -146,6 +146,12 @@ func (c *Client) addOperationGetBucketPolicyStatusMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketPolicyStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketReplication.go b/service/s3/api_op_GetBucketReplication.go index 250215033b2..7affb7ffa2d 100644 --- a/service/s3/api_op_GetBucketReplication.go +++ b/service/s3/api_op_GetBucketReplication.go @@ -153,6 +153,12 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketRequestPayment.go b/service/s3/api_op_GetBucketRequestPayment.go index 239c138f43f..0982c5aa9a6 100644 --- a/service/s3/api_op_GetBucketRequestPayment.go +++ b/service/s3/api_op_GetBucketRequestPayment.go @@ -132,6 +132,12 @@ func (c *Client) addOperationGetBucketRequestPaymentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketRequestPaymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketTagging.go b/service/s3/api_op_GetBucketTagging.go index 6a5ff4d6c4d..2c75533c020 100644 --- a/service/s3/api_op_GetBucketTagging.go +++ b/service/s3/api_op_GetBucketTagging.go @@ -145,6 +145,12 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketTaggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketVersioning.go b/service/s3/api_op_GetBucketVersioning.go index 832a082bb8f..45ef5225458 100644 --- a/service/s3/api_op_GetBucketVersioning.go +++ b/service/s3/api_op_GetBucketVersioning.go @@ -147,6 +147,12 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketVersioningValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetBucketWebsite.go b/service/s3/api_op_GetBucketWebsite.go index 7c541b4c874..87a89a1cd46 100644 --- a/service/s3/api_op_GetBucketWebsite.go +++ b/service/s3/api_op_GetBucketWebsite.go @@ -151,6 +151,12 @@ func (c *Client) addOperationGetBucketWebsiteMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetBucketWebsiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObject.go b/service/s3/api_op_GetObject.go index 5267e2f0c0f..bb12b6b7f83 100644 --- a/service/s3/api_op_GetObject.go +++ b/service/s3/api_op_GetObject.go @@ -696,6 +696,12 @@ func (c *Client) addOperationGetObjectMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectAcl.go b/service/s3/api_op_GetObjectAcl.go index 94413a939ff..ce9c6ae09ae 100644 --- a/service/s3/api_op_GetObjectAcl.go +++ b/service/s3/api_op_GetObjectAcl.go @@ -196,6 +196,12 @@ func (c *Client) addOperationGetObjectAclMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectAclValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectAttributes.go b/service/s3/api_op_GetObjectAttributes.go index 1b915c5471a..cbe48692458 100644 --- a/service/s3/api_op_GetObjectAttributes.go +++ b/service/s3/api_op_GetObjectAttributes.go @@ -386,6 +386,12 @@ func (c *Client) addOperationGetObjectAttributesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectLegalHold.go b/service/s3/api_op_GetObjectLegalHold.go index de4e24a856e..ffcee213ab2 100644 --- a/service/s3/api_op_GetObjectLegalHold.go +++ b/service/s3/api_op_GetObjectLegalHold.go @@ -164,6 +164,12 @@ func (c *Client) addOperationGetObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectLegalHoldValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectLockConfiguration.go b/service/s3/api_op_GetObjectLockConfiguration.go index 8e1a18bbbd9..f43e2a92b19 100644 --- a/service/s3/api_op_GetObjectLockConfiguration.go +++ b/service/s3/api_op_GetObjectLockConfiguration.go @@ -143,6 +143,12 @@ func (c *Client) addOperationGetObjectLockConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectLockConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectRetention.go b/service/s3/api_op_GetObjectRetention.go index 1ece8690516..97201d69c38 100644 --- a/service/s3/api_op_GetObjectRetention.go +++ b/service/s3/api_op_GetObjectRetention.go @@ -164,6 +164,12 @@ func (c *Client) addOperationGetObjectRetentionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectRetentionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectTagging.go b/service/s3/api_op_GetObjectTagging.go index a3438b61cd8..484bb6fe587 100644 --- a/service/s3/api_op_GetObjectTagging.go +++ b/service/s3/api_op_GetObjectTagging.go @@ -194,6 +194,12 @@ func (c *Client) addOperationGetObjectTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectTaggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetObjectTorrent.go b/service/s3/api_op_GetObjectTorrent.go index ed78be1eed5..32317a1c9b4 100644 --- a/service/s3/api_op_GetObjectTorrent.go +++ b/service/s3/api_op_GetObjectTorrent.go @@ -159,6 +159,12 @@ func (c *Client) addOperationGetObjectTorrentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetObjectTorrentValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_GetPublicAccessBlock.go b/service/s3/api_op_GetPublicAccessBlock.go index 1c37730ed80..59ec3196092 100644 --- a/service/s3/api_op_GetPublicAccessBlock.go +++ b/service/s3/api_op_GetPublicAccessBlock.go @@ -155,6 +155,12 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpGetPublicAccessBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_HeadBucket.go b/service/s3/api_op_HeadBucket.go index a23b259563c..f8eb030f03c 100644 --- a/service/s3/api_op_HeadBucket.go +++ b/service/s3/api_op_HeadBucket.go @@ -233,6 +233,12 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpHeadBucketValidationMiddleware(stack); err != nil { return err } @@ -269,20 +275,6 @@ func (c *Client) addOperationHeadBucketMiddlewares(stack *middleware.Stack, opti return nil } -func (v *HeadBucketInput) bucket() (string, bool) { - if v.Bucket == nil { - return "", false - } - return *v.Bucket, true -} - -// HeadBucketAPIClient is a client that implements the HeadBucket operation. -type HeadBucketAPIClient interface { - HeadBucket(context.Context, *HeadBucketInput, ...func(*Options)) (*HeadBucketOutput, error) -} - -var _ HeadBucketAPIClient = (*Client)(nil) - // BucketExistsWaiterOptions are waiter options for BucketExistsWaiter type BucketExistsWaiterOptions struct { @@ -397,7 +389,13 @@ func (w *BucketExistsWaiter) WaitForOutput(ctx context.Context, params *HeadBuck } out, err := w.client.HeadBucket(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -564,7 +562,13 @@ func (w *BucketNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadB } out, err := w.client.HeadBucket(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -612,6 +616,20 @@ func bucketNotExistsStateRetryable(ctx context.Context, input *HeadBucketInput, return true, nil } +func (v *HeadBucketInput) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +// HeadBucketAPIClient is a client that implements the HeadBucket operation. +type HeadBucketAPIClient interface { + HeadBucket(context.Context, *HeadBucketInput, ...func(*Options)) (*HeadBucketOutput, error) +} + +var _ HeadBucketAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opHeadBucket(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3/api_op_HeadObject.go b/service/s3/api_op_HeadObject.go index 21bc28b06b4..cae826ad0b1 100644 --- a/service/s3/api_op_HeadObject.go +++ b/service/s3/api_op_HeadObject.go @@ -666,6 +666,12 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpHeadObjectValidationMiddleware(stack); err != nil { return err } @@ -702,20 +708,6 @@ func (c *Client) addOperationHeadObjectMiddlewares(stack *middleware.Stack, opti return nil } -func (v *HeadObjectInput) bucket() (string, bool) { - if v.Bucket == nil { - return "", false - } - return *v.Bucket, true -} - -// HeadObjectAPIClient is a client that implements the HeadObject operation. -type HeadObjectAPIClient interface { - HeadObject(context.Context, *HeadObjectInput, ...func(*Options)) (*HeadObjectOutput, error) -} - -var _ HeadObjectAPIClient = (*Client)(nil) - // ObjectExistsWaiterOptions are waiter options for ObjectExistsWaiter type ObjectExistsWaiterOptions struct { @@ -830,7 +822,13 @@ func (w *ObjectExistsWaiter) WaitForOutput(ctx context.Context, params *HeadObje } out, err := w.client.HeadObject(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -997,7 +995,13 @@ func (w *ObjectNotExistsWaiter) WaitForOutput(ctx context.Context, params *HeadO } out, err := w.client.HeadObject(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -1045,6 +1049,20 @@ func objectNotExistsStateRetryable(ctx context.Context, input *HeadObjectInput, return true, nil } +func (v *HeadObjectInput) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +// HeadObjectAPIClient is a client that implements the HeadObject operation. +type HeadObjectAPIClient interface { + HeadObject(context.Context, *HeadObjectInput, ...func(*Options)) (*HeadObjectOutput, error) +} + +var _ HeadObjectAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opHeadObject(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/service/s3/api_op_ListBucketAnalyticsConfigurations.go index 01245c4b374..9f2c709a574 100644 --- a/service/s3/api_op_ListBucketAnalyticsConfigurations.go +++ b/service/s3/api_op_ListBucketAnalyticsConfigurations.go @@ -173,6 +173,12 @@ func (c *Client) addOperationListBucketAnalyticsConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListBucketAnalyticsConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go index a8aab201763..dc39fef574f 100644 --- a/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go +++ b/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go @@ -167,6 +167,12 @@ func (c *Client) addOperationListBucketIntelligentTieringConfigurationsMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListBucketIntelligentTieringConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListBucketInventoryConfigurations.go b/service/s3/api_op_ListBucketInventoryConfigurations.go index bba0343b455..3b2300d5a6c 100644 --- a/service/s3/api_op_ListBucketInventoryConfigurations.go +++ b/service/s3/api_op_ListBucketInventoryConfigurations.go @@ -175,6 +175,12 @@ func (c *Client) addOperationListBucketInventoryConfigurationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListBucketInventoryConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListBucketMetricsConfigurations.go b/service/s3/api_op_ListBucketMetricsConfigurations.go index 5c76e076d75..49afb4b9565 100644 --- a/service/s3/api_op_ListBucketMetricsConfigurations.go +++ b/service/s3/api_op_ListBucketMetricsConfigurations.go @@ -177,6 +177,12 @@ func (c *Client) addOperationListBucketMetricsConfigurationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListBucketMetricsConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListBuckets.go b/service/s3/api_op_ListBuckets.go index 5ed39093dd5..8d2f98a8c00 100644 --- a/service/s3/api_op_ListBuckets.go +++ b/service/s3/api_op_ListBuckets.go @@ -115,6 +115,12 @@ func (c *Client) addOperationListBucketsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBuckets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/s3/api_op_ListDirectoryBuckets.go b/service/s3/api_op_ListDirectoryBuckets.go index 5e24e2dde24..5fdf9e6c7a2 100644 --- a/service/s3/api_op_ListDirectoryBuckets.go +++ b/service/s3/api_op_ListDirectoryBuckets.go @@ -147,6 +147,12 @@ func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDirectoryBuckets(options.Region), middleware.Before); err != nil { return err } @@ -180,14 +186,6 @@ func (c *Client) addOperationListDirectoryBucketsMiddlewares(stack *middleware.S return nil } -// ListDirectoryBucketsAPIClient is a client that implements the -// ListDirectoryBuckets operation. -type ListDirectoryBucketsAPIClient interface { - ListDirectoryBuckets(context.Context, *ListDirectoryBucketsInput, ...func(*Options)) (*ListDirectoryBucketsOutput, error) -} - -var _ ListDirectoryBucketsAPIClient = (*Client)(nil) - // ListDirectoryBucketsPaginatorOptions is the paginator options for // ListDirectoryBuckets type ListDirectoryBucketsPaginatorOptions struct { @@ -254,6 +252,9 @@ func (p *ListDirectoryBucketsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxDirectoryBuckets = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDirectoryBuckets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +274,14 @@ func (p *ListDirectoryBucketsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDirectoryBucketsAPIClient is a client that implements the +// ListDirectoryBuckets operation. +type ListDirectoryBucketsAPIClient interface { + ListDirectoryBuckets(context.Context, *ListDirectoryBucketsInput, ...func(*Options)) (*ListDirectoryBucketsOutput, error) +} + +var _ ListDirectoryBucketsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDirectoryBuckets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3/api_op_ListMultipartUploads.go b/service/s3/api_op_ListMultipartUploads.go index f9b103365ee..52b08494dcb 100644 --- a/service/s3/api_op_ListMultipartUploads.go +++ b/service/s3/api_op_ListMultipartUploads.go @@ -394,6 +394,12 @@ func (c *Client) addOperationListMultipartUploadsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListMultipartUploadsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListObjectVersions.go b/service/s3/api_op_ListObjectVersions.go index c2aef293e77..d2274c6b412 100644 --- a/service/s3/api_op_ListObjectVersions.go +++ b/service/s3/api_op_ListObjectVersions.go @@ -262,6 +262,12 @@ func (c *Client) addOperationListObjectVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListObjectVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListObjects.go b/service/s3/api_op_ListObjects.go index f0b5c36bcb5..dc022ddf452 100644 --- a/service/s3/api_op_ListObjects.go +++ b/service/s3/api_op_ListObjects.go @@ -277,6 +277,12 @@ func (c *Client) addOperationListObjectsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListObjectsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_ListObjectsV2.go b/service/s3/api_op_ListObjectsV2.go index 341eea32a74..314f1fc3733 100644 --- a/service/s3/api_op_ListObjectsV2.go +++ b/service/s3/api_op_ListObjectsV2.go @@ -374,6 +374,12 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListObjectsV2ValidationMiddleware(stack); err != nil { return err } @@ -410,20 +416,6 @@ func (c *Client) addOperationListObjectsV2Middlewares(stack *middleware.Stack, o return nil } -func (v *ListObjectsV2Input) bucket() (string, bool) { - if v.Bucket == nil { - return "", false - } - return *v.Bucket, true -} - -// ListObjectsV2APIClient is a client that implements the ListObjectsV2 operation. -type ListObjectsV2APIClient interface { - ListObjectsV2(context.Context, *ListObjectsV2Input, ...func(*Options)) (*ListObjectsV2Output, error) -} - -var _ ListObjectsV2APIClient = (*Client)(nil) - // ListObjectsV2PaginatorOptions is the paginator options for ListObjectsV2 type ListObjectsV2PaginatorOptions struct { // Sets the maximum number of keys returned in the response. By default, the @@ -489,6 +481,9 @@ func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxKeys = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListObjectsV2(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -511,6 +506,20 @@ func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +func (v *ListObjectsV2Input) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +// ListObjectsV2APIClient is a client that implements the ListObjectsV2 operation. +type ListObjectsV2APIClient interface { + ListObjectsV2(context.Context, *ListObjectsV2Input, ...func(*Options)) (*ListObjectsV2Output, error) +} + +var _ ListObjectsV2APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListObjectsV2(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3/api_op_ListParts.go b/service/s3/api_op_ListParts.go index c987fa2bc83..6b1fe316e02 100644 --- a/service/s3/api_op_ListParts.go +++ b/service/s3/api_op_ListParts.go @@ -361,6 +361,12 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpListPartsValidationMiddleware(stack); err != nil { return err } @@ -397,20 +403,6 @@ func (c *Client) addOperationListPartsMiddlewares(stack *middleware.Stack, optio return nil } -func (v *ListPartsInput) bucket() (string, bool) { - if v.Bucket == nil { - return "", false - } - return *v.Bucket, true -} - -// ListPartsAPIClient is a client that implements the ListParts operation. -type ListPartsAPIClient interface { - ListParts(context.Context, *ListPartsInput, ...func(*Options)) (*ListPartsOutput, error) -} - -var _ ListPartsAPIClient = (*Client)(nil) - // ListPartsPaginatorOptions is the paginator options for ListParts type ListPartsPaginatorOptions struct { // Sets the maximum number of parts to return. @@ -474,6 +466,9 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxParts = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -496,6 +491,20 @@ func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +func (v *ListPartsInput) bucket() (string, bool) { + if v.Bucket == nil { + return "", false + } + return *v.Bucket, true +} + +// ListPartsAPIClient is a client that implements the ListParts operation. +type ListPartsAPIClient interface { + ListParts(context.Context, *ListPartsInput, ...func(*Options)) (*ListPartsOutput, error) +} + +var _ ListPartsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3/api_op_PutBucketAccelerateConfiguration.go b/service/s3/api_op_PutBucketAccelerateConfiguration.go index 711d014f442..69069135142 100644 --- a/service/s3/api_op_PutBucketAccelerateConfiguration.go +++ b/service/s3/api_op_PutBucketAccelerateConfiguration.go @@ -175,6 +175,12 @@ func (c *Client) addOperationPutBucketAccelerateConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketAccelerateConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketAcl.go b/service/s3/api_op_PutBucketAcl.go index f91817bca15..cfdc1086122 100644 --- a/service/s3/api_op_PutBucketAcl.go +++ b/service/s3/api_op_PutBucketAcl.go @@ -319,6 +319,12 @@ func (c *Client) addOperationPutBucketAclMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketAclValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/service/s3/api_op_PutBucketAnalyticsConfiguration.go index 8b499c7f94a..00775bdc3f4 100644 --- a/service/s3/api_op_PutBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_PutBucketAnalyticsConfiguration.go @@ -188,6 +188,12 @@ func (c *Client) addOperationPutBucketAnalyticsConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketAnalyticsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketCors.go b/service/s3/api_op_PutBucketCors.go index a6188473566..ecb6b30b822 100644 --- a/service/s3/api_op_PutBucketCors.go +++ b/service/s3/api_op_PutBucketCors.go @@ -197,6 +197,12 @@ func (c *Client) addOperationPutBucketCorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketCorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketEncryption.go b/service/s3/api_op_PutBucketEncryption.go index 061b306760c..2cf8e9eb950 100644 --- a/service/s3/api_op_PutBucketEncryption.go +++ b/service/s3/api_op_PutBucketEncryption.go @@ -186,6 +186,12 @@ func (c *Client) addOperationPutBucketEncryptionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketEncryptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go index 25ff1f926cd..e7aefa40ca5 100644 --- a/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go +++ b/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go @@ -175,6 +175,12 @@ func (c *Client) addOperationPutBucketIntelligentTieringConfigurationMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketIntelligentTieringConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketInventoryConfiguration.go b/service/s3/api_op_PutBucketInventoryConfiguration.go index 5da573fde5f..f14c3e58e35 100644 --- a/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -197,6 +197,12 @@ func (c *Client) addOperationPutBucketInventoryConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketInventoryConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketLifecycleConfiguration.go b/service/s3/api_op_PutBucketLifecycleConfiguration.go index 5d02cf86c60..ad4e0186270 100644 --- a/service/s3/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3/api_op_PutBucketLifecycleConfiguration.go @@ -205,6 +205,12 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketLifecycleConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketLogging.go b/service/s3/api_op_PutBucketLogging.go index c7bccec45cf..97ad6a96584 100644 --- a/service/s3/api_op_PutBucketLogging.go +++ b/service/s3/api_op_PutBucketLogging.go @@ -204,6 +204,12 @@ func (c *Client) addOperationPutBucketLoggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketLoggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketMetricsConfiguration.go b/service/s3/api_op_PutBucketMetricsConfiguration.go index 1116c575dce..302bced6ec2 100644 --- a/service/s3/api_op_PutBucketMetricsConfiguration.go +++ b/service/s3/api_op_PutBucketMetricsConfiguration.go @@ -166,6 +166,12 @@ func (c *Client) addOperationPutBucketMetricsConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketMetricsConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketNotificationConfiguration.go b/service/s3/api_op_PutBucketNotificationConfiguration.go index 063e036d572..10ee67450a7 100644 --- a/service/s3/api_op_PutBucketNotificationConfiguration.go +++ b/service/s3/api_op_PutBucketNotificationConfiguration.go @@ -180,6 +180,12 @@ func (c *Client) addOperationPutBucketNotificationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketNotificationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketOwnershipControls.go b/service/s3/api_op_PutBucketOwnershipControls.go index 34cd88efb44..8f1f8aad2b5 100644 --- a/service/s3/api_op_PutBucketOwnershipControls.go +++ b/service/s3/api_op_PutBucketOwnershipControls.go @@ -146,6 +146,12 @@ func (c *Client) addOperationPutBucketOwnershipControlsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketOwnershipControlsValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketPolicy.go b/service/s3/api_op_PutBucketPolicy.go index 5103ef78a4b..7ab86cf17c4 100644 --- a/service/s3/api_op_PutBucketPolicy.go +++ b/service/s3/api_op_PutBucketPolicy.go @@ -244,6 +244,12 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketReplication.go b/service/s3/api_op_PutBucketReplication.go index 782cdbada70..02b202b7cb7 100644 --- a/service/s3/api_op_PutBucketReplication.go +++ b/service/s3/api_op_PutBucketReplication.go @@ -215,6 +215,12 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketRequestPayment.go b/service/s3/api_op_PutBucketRequestPayment.go index d52c2fdd01b..1d0949b2925 100644 --- a/service/s3/api_op_PutBucketRequestPayment.go +++ b/service/s3/api_op_PutBucketRequestPayment.go @@ -162,6 +162,12 @@ func (c *Client) addOperationPutBucketRequestPaymentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketRequestPaymentValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketTagging.go b/service/s3/api_op_PutBucketTagging.go index eb7f6537c33..f6ffa6b7bb9 100644 --- a/service/s3/api_op_PutBucketTagging.go +++ b/service/s3/api_op_PutBucketTagging.go @@ -194,6 +194,12 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketTaggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketVersioning.go b/service/s3/api_op_PutBucketVersioning.go index 2eb01c8e3df..3096bfd73e0 100644 --- a/service/s3/api_op_PutBucketVersioning.go +++ b/service/s3/api_op_PutBucketVersioning.go @@ -191,6 +191,12 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketVersioningValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutBucketWebsite.go b/service/s3/api_op_PutBucketWebsite.go index 295519d4f53..0945edb1a21 100644 --- a/service/s3/api_op_PutBucketWebsite.go +++ b/service/s3/api_op_PutBucketWebsite.go @@ -217,6 +217,12 @@ func (c *Client) addOperationPutBucketWebsiteMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutBucketWebsiteValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutObject.go b/service/s3/api_op_PutObject.go index f3976107604..fffa96a7aba 100644 --- a/service/s3/api_op_PutObject.go +++ b/service/s3/api_op_PutObject.go @@ -710,6 +710,12 @@ func (c *Client) addOperationPutObjectMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutObjectAcl.go b/service/s3/api_op_PutObjectAcl.go index 363c9a717ba..504d91bd140 100644 --- a/service/s3/api_op_PutObjectAcl.go +++ b/service/s3/api_op_PutObjectAcl.go @@ -371,6 +371,12 @@ func (c *Client) addOperationPutObjectAclMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutObjectAclValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutObjectLegalHold.go b/service/s3/api_op_PutObjectLegalHold.go index a51b89a1d30..c97c5b125dd 100644 --- a/service/s3/api_op_PutObjectLegalHold.go +++ b/service/s3/api_op_PutObjectLegalHold.go @@ -186,6 +186,12 @@ func (c *Client) addOperationPutObjectLegalHoldMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutObjectLegalHoldValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutObjectLockConfiguration.go b/service/s3/api_op_PutObjectLockConfiguration.go index 036a384fac6..6b81238d7f7 100644 --- a/service/s3/api_op_PutObjectLockConfiguration.go +++ b/service/s3/api_op_PutObjectLockConfiguration.go @@ -177,6 +177,12 @@ func (c *Client) addOperationPutObjectLockConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutObjectLockConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutObjectRetention.go b/service/s3/api_op_PutObjectRetention.go index 06d4d11ce61..be54b741b90 100644 --- a/service/s3/api_op_PutObjectRetention.go +++ b/service/s3/api_op_PutObjectRetention.go @@ -193,6 +193,12 @@ func (c *Client) addOperationPutObjectRetentionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutObjectRetentionValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutObjectTagging.go b/service/s3/api_op_PutObjectTagging.go index 321825d54ec..be9d01b112c 100644 --- a/service/s3/api_op_PutObjectTagging.go +++ b/service/s3/api_op_PutObjectTagging.go @@ -229,6 +229,12 @@ func (c *Client) addOperationPutObjectTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutObjectTaggingValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_PutPublicAccessBlock.go b/service/s3/api_op_PutPublicAccessBlock.go index 7e74907050e..33ac3513ad7 100644 --- a/service/s3/api_op_PutPublicAccessBlock.go +++ b/service/s3/api_op_PutPublicAccessBlock.go @@ -180,6 +180,12 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpPutPublicAccessBlockValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_RestoreObject.go b/service/s3/api_op_RestoreObject.go index 6c7466edbec..d468591a39f 100644 --- a/service/s3/api_op_RestoreObject.go +++ b/service/s3/api_op_RestoreObject.go @@ -331,6 +331,12 @@ func (c *Client) addOperationRestoreObjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpRestoreObjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_SelectObjectContent.go b/service/s3/api_op_SelectObjectContent.go index 59cf7074e66..da3c0574db1 100644 --- a/service/s3/api_op_SelectObjectContent.go +++ b/service/s3/api_op_SelectObjectContent.go @@ -281,6 +281,12 @@ func (c *Client) addOperationSelectObjectContentMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpSelectObjectContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_UploadPart.go b/service/s3/api_op_UploadPart.go index 5177bd762ae..c554106dd30 100644 --- a/service/s3/api_op_UploadPart.go +++ b/service/s3/api_op_UploadPart.go @@ -487,6 +487,12 @@ func (c *Client) addOperationUploadPartMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpUploadPartValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_UploadPartCopy.go b/service/s3/api_op_UploadPartCopy.go index 20602da135c..dc026920060 100644 --- a/service/s3/api_op_UploadPartCopy.go +++ b/service/s3/api_op_UploadPartCopy.go @@ -525,6 +525,12 @@ func (c *Client) addOperationUploadPartCopyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addOpUploadPartCopyValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3/api_op_WriteGetObjectResponse.go b/service/s3/api_op_WriteGetObjectResponse.go index b1b701abdab..5f065ee7918 100644 --- a/service/s3/api_op_WriteGetObjectResponse.go +++ b/service/s3/api_op_WriteGetObjectResponse.go @@ -400,6 +400,12 @@ func (c *Client) addOperationWriteGetObjectResponseMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIsExpressUserAgent(stack); err != nil { + return err + } if err = addEndpointPrefix_opWriteGetObjectResponseMiddleware(stack); err != nil { return err } diff --git a/service/s3/snapshot/api_op_AbortMultipartUpload.go.snap b/service/s3/snapshot/api_op_AbortMultipartUpload.go.snap index 92ecaf4f104..adc4f61ab38 100644 --- a/service/s3/snapshot/api_op_AbortMultipartUpload.go.snap +++ b/service/s3/snapshot/api_op_AbortMultipartUpload.go.snap @@ -15,6 +15,7 @@ AbortMultipartUpload OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_CompleteMultipartUpload.go.snap b/service/s3/snapshot/api_op_CompleteMultipartUpload.go.snap index 8672112396e..64896a0269b 100644 --- a/service/s3/snapshot/api_op_CompleteMultipartUpload.go.snap +++ b/service/s3/snapshot/api_op_CompleteMultipartUpload.go.snap @@ -15,6 +15,7 @@ CompleteMultipartUpload OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_CopyObject.go.snap b/service/s3/snapshot/api_op_CopyObject.go.snap index f3ed28e379e..de2130fa650 100644 --- a/service/s3/snapshot/api_op_CopyObject.go.snap +++ b/service/s3/snapshot/api_op_CopyObject.go.snap @@ -15,6 +15,7 @@ CopyObject OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_CreateBucket.go.snap b/service/s3/snapshot/api_op_CreateBucket.go.snap index 2827398a112..8fef26f22b2 100644 --- a/service/s3/snapshot/api_op_CreateBucket.go.snap +++ b/service/s3/snapshot/api_op_CreateBucket.go.snap @@ -15,6 +15,7 @@ CreateBucket OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_CreateMultipartUpload.go.snap b/service/s3/snapshot/api_op_CreateMultipartUpload.go.snap index 78ea52c037d..b7a6eea9257 100644 --- a/service/s3/snapshot/api_op_CreateMultipartUpload.go.snap +++ b/service/s3/snapshot/api_op_CreateMultipartUpload.go.snap @@ -16,6 +16,7 @@ CreateMultipartUpload OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_CreateSession.go.snap b/service/s3/snapshot/api_op_CreateSession.go.snap index b6a5dfde208..c5e4d03e8ef 100644 --- a/service/s3/snapshot/api_op_CreateSession.go.snap +++ b/service/s3/snapshot/api_op_CreateSession.go.snap @@ -15,6 +15,7 @@ CreateSession OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucket.go.snap b/service/s3/snapshot/api_op_DeleteBucket.go.snap index 3d3b4e8034a..2b394177257 100644 --- a/service/s3/snapshot/api_op_DeleteBucket.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucket.go.snap @@ -15,6 +15,7 @@ DeleteBucket OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketAnalyticsConfiguration.go.snap b/service/s3/snapshot/api_op_DeleteBucketAnalyticsConfiguration.go.snap index f09d2715f21..84ebc554d69 100644 --- a/service/s3/snapshot/api_op_DeleteBucketAnalyticsConfiguration.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketAnalyticsConfiguration.go.snap @@ -15,6 +15,7 @@ DeleteBucketAnalyticsConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketCors.go.snap b/service/s3/snapshot/api_op_DeleteBucketCors.go.snap index 4968e873078..8d40ac39fad 100644 --- a/service/s3/snapshot/api_op_DeleteBucketCors.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketCors.go.snap @@ -15,6 +15,7 @@ DeleteBucketCors OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketEncryption.go.snap b/service/s3/snapshot/api_op_DeleteBucketEncryption.go.snap index 430b358315b..6fb4cf7f6fc 100644 --- a/service/s3/snapshot/api_op_DeleteBucketEncryption.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketEncryption.go.snap @@ -15,6 +15,7 @@ DeleteBucketEncryption OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketIntelligentTieringConfiguration.go.snap b/service/s3/snapshot/api_op_DeleteBucketIntelligentTieringConfiguration.go.snap index b881b26b2c4..69c63913e78 100644 --- a/service/s3/snapshot/api_op_DeleteBucketIntelligentTieringConfiguration.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketIntelligentTieringConfiguration.go.snap @@ -15,6 +15,7 @@ DeleteBucketIntelligentTieringConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketInventoryConfiguration.go.snap b/service/s3/snapshot/api_op_DeleteBucketInventoryConfiguration.go.snap index b5bd0ba84b6..5e490b7c847 100644 --- a/service/s3/snapshot/api_op_DeleteBucketInventoryConfiguration.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketInventoryConfiguration.go.snap @@ -15,6 +15,7 @@ DeleteBucketInventoryConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketLifecycle.go.snap b/service/s3/snapshot/api_op_DeleteBucketLifecycle.go.snap index 1c3724db274..87593c10c72 100644 --- a/service/s3/snapshot/api_op_DeleteBucketLifecycle.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketLifecycle.go.snap @@ -15,6 +15,7 @@ DeleteBucketLifecycle OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketMetricsConfiguration.go.snap b/service/s3/snapshot/api_op_DeleteBucketMetricsConfiguration.go.snap index 06f7afcd4a2..41edf48ab4a 100644 --- a/service/s3/snapshot/api_op_DeleteBucketMetricsConfiguration.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketMetricsConfiguration.go.snap @@ -15,6 +15,7 @@ DeleteBucketMetricsConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketOwnershipControls.go.snap b/service/s3/snapshot/api_op_DeleteBucketOwnershipControls.go.snap index d85e75a11f6..965766f0f71 100644 --- a/service/s3/snapshot/api_op_DeleteBucketOwnershipControls.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketOwnershipControls.go.snap @@ -15,6 +15,7 @@ DeleteBucketOwnershipControls OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketPolicy.go.snap b/service/s3/snapshot/api_op_DeleteBucketPolicy.go.snap index 8e2a35d8789..7dd048a34ad 100644 --- a/service/s3/snapshot/api_op_DeleteBucketPolicy.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketPolicy.go.snap @@ -15,6 +15,7 @@ DeleteBucketPolicy OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketReplication.go.snap b/service/s3/snapshot/api_op_DeleteBucketReplication.go.snap index 2aa9e959e55..f1d2df567da 100644 --- a/service/s3/snapshot/api_op_DeleteBucketReplication.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketReplication.go.snap @@ -15,6 +15,7 @@ DeleteBucketReplication OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketTagging.go.snap b/service/s3/snapshot/api_op_DeleteBucketTagging.go.snap index 221c2c238da..f2cc3c89299 100644 --- a/service/s3/snapshot/api_op_DeleteBucketTagging.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketTagging.go.snap @@ -15,6 +15,7 @@ DeleteBucketTagging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteBucketWebsite.go.snap b/service/s3/snapshot/api_op_DeleteBucketWebsite.go.snap index c408ddb8e43..83619e3733f 100644 --- a/service/s3/snapshot/api_op_DeleteBucketWebsite.go.snap +++ b/service/s3/snapshot/api_op_DeleteBucketWebsite.go.snap @@ -15,6 +15,7 @@ DeleteBucketWebsite OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteObject.go.snap b/service/s3/snapshot/api_op_DeleteObject.go.snap index d37fefa27c2..84e2c5a760a 100644 --- a/service/s3/snapshot/api_op_DeleteObject.go.snap +++ b/service/s3/snapshot/api_op_DeleteObject.go.snap @@ -15,6 +15,7 @@ DeleteObject OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteObjectTagging.go.snap b/service/s3/snapshot/api_op_DeleteObjectTagging.go.snap index f3dd7367022..bb9263e68ba 100644 --- a/service/s3/snapshot/api_op_DeleteObjectTagging.go.snap +++ b/service/s3/snapshot/api_op_DeleteObjectTagging.go.snap @@ -15,6 +15,7 @@ DeleteObjectTagging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeleteObjects.go.snap b/service/s3/snapshot/api_op_DeleteObjects.go.snap index 3359099fddb..e9ad55700e4 100644 --- a/service/s3/snapshot/api_op_DeleteObjects.go.snap +++ b/service/s3/snapshot/api_op_DeleteObjects.go.snap @@ -16,6 +16,7 @@ DeleteObjects OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_DeletePublicAccessBlock.go.snap b/service/s3/snapshot/api_op_DeletePublicAccessBlock.go.snap index e9d563e2975..4b00379eadc 100644 --- a/service/s3/snapshot/api_op_DeletePublicAccessBlock.go.snap +++ b/service/s3/snapshot/api_op_DeletePublicAccessBlock.go.snap @@ -15,6 +15,7 @@ DeletePublicAccessBlock OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketAccelerateConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketAccelerateConfiguration.go.snap index e28c8b10fd8..c4371db4786 100644 --- a/service/s3/snapshot/api_op_GetBucketAccelerateConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketAccelerateConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketAccelerateConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketAcl.go.snap b/service/s3/snapshot/api_op_GetBucketAcl.go.snap index 424daa4c8e4..055a4b9ce72 100644 --- a/service/s3/snapshot/api_op_GetBucketAcl.go.snap +++ b/service/s3/snapshot/api_op_GetBucketAcl.go.snap @@ -15,6 +15,7 @@ GetBucketAcl OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketAnalyticsConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketAnalyticsConfiguration.go.snap index 739a7ee98ef..b30ab2bb521 100644 --- a/service/s3/snapshot/api_op_GetBucketAnalyticsConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketAnalyticsConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketAnalyticsConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketCors.go.snap b/service/s3/snapshot/api_op_GetBucketCors.go.snap index 08c0318725a..147ab26d55d 100644 --- a/service/s3/snapshot/api_op_GetBucketCors.go.snap +++ b/service/s3/snapshot/api_op_GetBucketCors.go.snap @@ -15,6 +15,7 @@ GetBucketCors OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketEncryption.go.snap b/service/s3/snapshot/api_op_GetBucketEncryption.go.snap index eca0bfba232..25f6e83a16b 100644 --- a/service/s3/snapshot/api_op_GetBucketEncryption.go.snap +++ b/service/s3/snapshot/api_op_GetBucketEncryption.go.snap @@ -15,6 +15,7 @@ GetBucketEncryption OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketIntelligentTieringConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketIntelligentTieringConfiguration.go.snap index ff1ebcb1e0b..25eb0d92aea 100644 --- a/service/s3/snapshot/api_op_GetBucketIntelligentTieringConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketIntelligentTieringConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketIntelligentTieringConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketInventoryConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketInventoryConfiguration.go.snap index 20f67fdce01..5c4984c1a89 100644 --- a/service/s3/snapshot/api_op_GetBucketInventoryConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketInventoryConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketInventoryConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketLifecycleConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketLifecycleConfiguration.go.snap index 3579d920509..6540c8c1848 100644 --- a/service/s3/snapshot/api_op_GetBucketLifecycleConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketLifecycleConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketLifecycleConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketLocation.go.snap b/service/s3/snapshot/api_op_GetBucketLocation.go.snap index d41204fd58a..908aa491246 100644 --- a/service/s3/snapshot/api_op_GetBucketLocation.go.snap +++ b/service/s3/snapshot/api_op_GetBucketLocation.go.snap @@ -15,6 +15,7 @@ GetBucketLocation OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketLogging.go.snap b/service/s3/snapshot/api_op_GetBucketLogging.go.snap index 5121fc89340..d57fd8cdd5d 100644 --- a/service/s3/snapshot/api_op_GetBucketLogging.go.snap +++ b/service/s3/snapshot/api_op_GetBucketLogging.go.snap @@ -15,6 +15,7 @@ GetBucketLogging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketMetricsConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketMetricsConfiguration.go.snap index eaf1b06978d..662fb0fe06c 100644 --- a/service/s3/snapshot/api_op_GetBucketMetricsConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketMetricsConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketMetricsConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketNotificationConfiguration.go.snap b/service/s3/snapshot/api_op_GetBucketNotificationConfiguration.go.snap index 0ffc61313a9..fe4d911818d 100644 --- a/service/s3/snapshot/api_op_GetBucketNotificationConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetBucketNotificationConfiguration.go.snap @@ -15,6 +15,7 @@ GetBucketNotificationConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketOwnershipControls.go.snap b/service/s3/snapshot/api_op_GetBucketOwnershipControls.go.snap index c244d5bdb21..393ef02ef0f 100644 --- a/service/s3/snapshot/api_op_GetBucketOwnershipControls.go.snap +++ b/service/s3/snapshot/api_op_GetBucketOwnershipControls.go.snap @@ -15,6 +15,7 @@ GetBucketOwnershipControls OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketPolicy.go.snap b/service/s3/snapshot/api_op_GetBucketPolicy.go.snap index 5a25572f84f..715fbe6fc14 100644 --- a/service/s3/snapshot/api_op_GetBucketPolicy.go.snap +++ b/service/s3/snapshot/api_op_GetBucketPolicy.go.snap @@ -15,6 +15,7 @@ GetBucketPolicy OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketPolicyStatus.go.snap b/service/s3/snapshot/api_op_GetBucketPolicyStatus.go.snap index bc410dd2219..e4c23cfb8bf 100644 --- a/service/s3/snapshot/api_op_GetBucketPolicyStatus.go.snap +++ b/service/s3/snapshot/api_op_GetBucketPolicyStatus.go.snap @@ -15,6 +15,7 @@ GetBucketPolicyStatus OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketReplication.go.snap b/service/s3/snapshot/api_op_GetBucketReplication.go.snap index 291d95c40f9..2a459fbd979 100644 --- a/service/s3/snapshot/api_op_GetBucketReplication.go.snap +++ b/service/s3/snapshot/api_op_GetBucketReplication.go.snap @@ -15,6 +15,7 @@ GetBucketReplication OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketRequestPayment.go.snap b/service/s3/snapshot/api_op_GetBucketRequestPayment.go.snap index bae573ae1db..a8fd3b97583 100644 --- a/service/s3/snapshot/api_op_GetBucketRequestPayment.go.snap +++ b/service/s3/snapshot/api_op_GetBucketRequestPayment.go.snap @@ -15,6 +15,7 @@ GetBucketRequestPayment OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketTagging.go.snap b/service/s3/snapshot/api_op_GetBucketTagging.go.snap index ed3fdf3a84e..a809e8d2ed7 100644 --- a/service/s3/snapshot/api_op_GetBucketTagging.go.snap +++ b/service/s3/snapshot/api_op_GetBucketTagging.go.snap @@ -15,6 +15,7 @@ GetBucketTagging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketVersioning.go.snap b/service/s3/snapshot/api_op_GetBucketVersioning.go.snap index 46fec78ad47..d167c601660 100644 --- a/service/s3/snapshot/api_op_GetBucketVersioning.go.snap +++ b/service/s3/snapshot/api_op_GetBucketVersioning.go.snap @@ -15,6 +15,7 @@ GetBucketVersioning OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetBucketWebsite.go.snap b/service/s3/snapshot/api_op_GetBucketWebsite.go.snap index 1d9c88cc95e..c1f27c52fb3 100644 --- a/service/s3/snapshot/api_op_GetBucketWebsite.go.snap +++ b/service/s3/snapshot/api_op_GetBucketWebsite.go.snap @@ -15,6 +15,7 @@ GetBucketWebsite OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObject.go.snap b/service/s3/snapshot/api_op_GetObject.go.snap index 538a79f3237..3f8e6e5733c 100644 --- a/service/s3/snapshot/api_op_GetObject.go.snap +++ b/service/s3/snapshot/api_op_GetObject.go.snap @@ -16,6 +16,7 @@ GetObject OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectAcl.go.snap b/service/s3/snapshot/api_op_GetObjectAcl.go.snap index 41a7bfd695e..91e92443383 100644 --- a/service/s3/snapshot/api_op_GetObjectAcl.go.snap +++ b/service/s3/snapshot/api_op_GetObjectAcl.go.snap @@ -15,6 +15,7 @@ GetObjectAcl OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectAttributes.go.snap b/service/s3/snapshot/api_op_GetObjectAttributes.go.snap index 043e3401b32..bd98c4a7acb 100644 --- a/service/s3/snapshot/api_op_GetObjectAttributes.go.snap +++ b/service/s3/snapshot/api_op_GetObjectAttributes.go.snap @@ -15,6 +15,7 @@ GetObjectAttributes OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectLegalHold.go.snap b/service/s3/snapshot/api_op_GetObjectLegalHold.go.snap index 22f2b029a35..2bd9ed900f8 100644 --- a/service/s3/snapshot/api_op_GetObjectLegalHold.go.snap +++ b/service/s3/snapshot/api_op_GetObjectLegalHold.go.snap @@ -15,6 +15,7 @@ GetObjectLegalHold OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectLockConfiguration.go.snap b/service/s3/snapshot/api_op_GetObjectLockConfiguration.go.snap index b06769dca7e..1192e6b66f5 100644 --- a/service/s3/snapshot/api_op_GetObjectLockConfiguration.go.snap +++ b/service/s3/snapshot/api_op_GetObjectLockConfiguration.go.snap @@ -15,6 +15,7 @@ GetObjectLockConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectRetention.go.snap b/service/s3/snapshot/api_op_GetObjectRetention.go.snap index 380ffca8f80..d8424290823 100644 --- a/service/s3/snapshot/api_op_GetObjectRetention.go.snap +++ b/service/s3/snapshot/api_op_GetObjectRetention.go.snap @@ -15,6 +15,7 @@ GetObjectRetention OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectTagging.go.snap b/service/s3/snapshot/api_op_GetObjectTagging.go.snap index ee82644345b..ff49b27730e 100644 --- a/service/s3/snapshot/api_op_GetObjectTagging.go.snap +++ b/service/s3/snapshot/api_op_GetObjectTagging.go.snap @@ -15,6 +15,7 @@ GetObjectTagging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetObjectTorrent.go.snap b/service/s3/snapshot/api_op_GetObjectTorrent.go.snap index 76e9ddefdc8..51760f71f49 100644 --- a/service/s3/snapshot/api_op_GetObjectTorrent.go.snap +++ b/service/s3/snapshot/api_op_GetObjectTorrent.go.snap @@ -15,6 +15,7 @@ GetObjectTorrent OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_GetPublicAccessBlock.go.snap b/service/s3/snapshot/api_op_GetPublicAccessBlock.go.snap index 2283e646d76..004e20c6fef 100644 --- a/service/s3/snapshot/api_op_GetPublicAccessBlock.go.snap +++ b/service/s3/snapshot/api_op_GetPublicAccessBlock.go.snap @@ -15,6 +15,7 @@ GetPublicAccessBlock OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_HeadBucket.go.snap b/service/s3/snapshot/api_op_HeadBucket.go.snap index 82d607cff61..8036a93a1e6 100644 --- a/service/s3/snapshot/api_op_HeadBucket.go.snap +++ b/service/s3/snapshot/api_op_HeadBucket.go.snap @@ -15,6 +15,7 @@ HeadBucket OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_HeadObject.go.snap b/service/s3/snapshot/api_op_HeadObject.go.snap index 42751e16ebd..cf6e1cbdb55 100644 --- a/service/s3/snapshot/api_op_HeadObject.go.snap +++ b/service/s3/snapshot/api_op_HeadObject.go.snap @@ -15,6 +15,7 @@ HeadObject OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListBucketAnalyticsConfigurations.go.snap b/service/s3/snapshot/api_op_ListBucketAnalyticsConfigurations.go.snap index 5abf18c6400..16433539cfd 100644 --- a/service/s3/snapshot/api_op_ListBucketAnalyticsConfigurations.go.snap +++ b/service/s3/snapshot/api_op_ListBucketAnalyticsConfigurations.go.snap @@ -15,6 +15,7 @@ ListBucketAnalyticsConfigurations OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListBucketIntelligentTieringConfigurations.go.snap b/service/s3/snapshot/api_op_ListBucketIntelligentTieringConfigurations.go.snap index a60ae31326f..a1633a7a301 100644 --- a/service/s3/snapshot/api_op_ListBucketIntelligentTieringConfigurations.go.snap +++ b/service/s3/snapshot/api_op_ListBucketIntelligentTieringConfigurations.go.snap @@ -15,6 +15,7 @@ ListBucketIntelligentTieringConfigurations OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListBucketInventoryConfigurations.go.snap b/service/s3/snapshot/api_op_ListBucketInventoryConfigurations.go.snap index 7a56ffe3fd0..7dd45cc07bd 100644 --- a/service/s3/snapshot/api_op_ListBucketInventoryConfigurations.go.snap +++ b/service/s3/snapshot/api_op_ListBucketInventoryConfigurations.go.snap @@ -15,6 +15,7 @@ ListBucketInventoryConfigurations OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListBucketMetricsConfigurations.go.snap b/service/s3/snapshot/api_op_ListBucketMetricsConfigurations.go.snap index 89b2d424c27..143b5e6f135 100644 --- a/service/s3/snapshot/api_op_ListBucketMetricsConfigurations.go.snap +++ b/service/s3/snapshot/api_op_ListBucketMetricsConfigurations.go.snap @@ -15,6 +15,7 @@ ListBucketMetricsConfigurations OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListBuckets.go.snap b/service/s3/snapshot/api_op_ListBuckets.go.snap index cc8a3f52d4a..911a9a49611 100644 --- a/service/s3/snapshot/api_op_ListBuckets.go.snap +++ b/service/s3/snapshot/api_op_ListBuckets.go.snap @@ -14,6 +14,7 @@ ListBuckets OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListDirectoryBuckets.go.snap b/service/s3/snapshot/api_op_ListDirectoryBuckets.go.snap index fdadb037e22..bac3e4973c1 100644 --- a/service/s3/snapshot/api_op_ListDirectoryBuckets.go.snap +++ b/service/s3/snapshot/api_op_ListDirectoryBuckets.go.snap @@ -14,6 +14,7 @@ ListDirectoryBuckets OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListMultipartUploads.go.snap b/service/s3/snapshot/api_op_ListMultipartUploads.go.snap index e5c33d776a3..03e30ad239b 100644 --- a/service/s3/snapshot/api_op_ListMultipartUploads.go.snap +++ b/service/s3/snapshot/api_op_ListMultipartUploads.go.snap @@ -15,6 +15,7 @@ ListMultipartUploads OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListObjectVersions.go.snap b/service/s3/snapshot/api_op_ListObjectVersions.go.snap index fbb8b176aa7..6a7e3c5420a 100644 --- a/service/s3/snapshot/api_op_ListObjectVersions.go.snap +++ b/service/s3/snapshot/api_op_ListObjectVersions.go.snap @@ -15,6 +15,7 @@ ListObjectVersions OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListObjects.go.snap b/service/s3/snapshot/api_op_ListObjects.go.snap index c5b8fa9f5fe..5a944f2c905 100644 --- a/service/s3/snapshot/api_op_ListObjects.go.snap +++ b/service/s3/snapshot/api_op_ListObjects.go.snap @@ -15,6 +15,7 @@ ListObjects OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListObjectsV2.go.snap b/service/s3/snapshot/api_op_ListObjectsV2.go.snap index eb317cb1f6f..61df640e04b 100644 --- a/service/s3/snapshot/api_op_ListObjectsV2.go.snap +++ b/service/s3/snapshot/api_op_ListObjectsV2.go.snap @@ -15,6 +15,7 @@ ListObjectsV2 OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_ListParts.go.snap b/service/s3/snapshot/api_op_ListParts.go.snap index 02f2d143947..070a7792a24 100644 --- a/service/s3/snapshot/api_op_ListParts.go.snap +++ b/service/s3/snapshot/api_op_ListParts.go.snap @@ -15,6 +15,7 @@ ListParts OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketAccelerateConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketAccelerateConfiguration.go.snap index 95048f659c1..1bd38dd9fe8 100644 --- a/service/s3/snapshot/api_op_PutBucketAccelerateConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketAccelerateConfiguration.go.snap @@ -16,6 +16,7 @@ PutBucketAccelerateConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketAcl.go.snap b/service/s3/snapshot/api_op_PutBucketAcl.go.snap index d3486631c5c..052cd088e88 100644 --- a/service/s3/snapshot/api_op_PutBucketAcl.go.snap +++ b/service/s3/snapshot/api_op_PutBucketAcl.go.snap @@ -16,6 +16,7 @@ PutBucketAcl OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketAnalyticsConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketAnalyticsConfiguration.go.snap index 3bd1241f825..3d549fe9d45 100644 --- a/service/s3/snapshot/api_op_PutBucketAnalyticsConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketAnalyticsConfiguration.go.snap @@ -15,6 +15,7 @@ PutBucketAnalyticsConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketCors.go.snap b/service/s3/snapshot/api_op_PutBucketCors.go.snap index 8fa01635d1a..bcb66ec7035 100644 --- a/service/s3/snapshot/api_op_PutBucketCors.go.snap +++ b/service/s3/snapshot/api_op_PutBucketCors.go.snap @@ -16,6 +16,7 @@ PutBucketCors OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketEncryption.go.snap b/service/s3/snapshot/api_op_PutBucketEncryption.go.snap index b90404941c8..8b4d9688932 100644 --- a/service/s3/snapshot/api_op_PutBucketEncryption.go.snap +++ b/service/s3/snapshot/api_op_PutBucketEncryption.go.snap @@ -16,6 +16,7 @@ PutBucketEncryption OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketIntelligentTieringConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketIntelligentTieringConfiguration.go.snap index 27a6ecd088a..6826938446e 100644 --- a/service/s3/snapshot/api_op_PutBucketIntelligentTieringConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketIntelligentTieringConfiguration.go.snap @@ -15,6 +15,7 @@ PutBucketIntelligentTieringConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketInventoryConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketInventoryConfiguration.go.snap index 3464bd7a191..313f82fd050 100644 --- a/service/s3/snapshot/api_op_PutBucketInventoryConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketInventoryConfiguration.go.snap @@ -15,6 +15,7 @@ PutBucketInventoryConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketLifecycleConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketLifecycleConfiguration.go.snap index f17649837e0..2d5b35b8807 100644 --- a/service/s3/snapshot/api_op_PutBucketLifecycleConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketLifecycleConfiguration.go.snap @@ -16,6 +16,7 @@ PutBucketLifecycleConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketLogging.go.snap b/service/s3/snapshot/api_op_PutBucketLogging.go.snap index 91a63efe412..3dfcaeb21ed 100644 --- a/service/s3/snapshot/api_op_PutBucketLogging.go.snap +++ b/service/s3/snapshot/api_op_PutBucketLogging.go.snap @@ -16,6 +16,7 @@ PutBucketLogging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketMetricsConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketMetricsConfiguration.go.snap index 9c2be94cf75..d1ac3bc650a 100644 --- a/service/s3/snapshot/api_op_PutBucketMetricsConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketMetricsConfiguration.go.snap @@ -15,6 +15,7 @@ PutBucketMetricsConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketNotificationConfiguration.go.snap b/service/s3/snapshot/api_op_PutBucketNotificationConfiguration.go.snap index 9377718778c..af63d648bfe 100644 --- a/service/s3/snapshot/api_op_PutBucketNotificationConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutBucketNotificationConfiguration.go.snap @@ -15,6 +15,7 @@ PutBucketNotificationConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketOwnershipControls.go.snap b/service/s3/snapshot/api_op_PutBucketOwnershipControls.go.snap index 50f44693532..7d9978ffaf8 100644 --- a/service/s3/snapshot/api_op_PutBucketOwnershipControls.go.snap +++ b/service/s3/snapshot/api_op_PutBucketOwnershipControls.go.snap @@ -16,6 +16,7 @@ PutBucketOwnershipControls OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketPolicy.go.snap b/service/s3/snapshot/api_op_PutBucketPolicy.go.snap index 6027fe04212..5e08c3630a1 100644 --- a/service/s3/snapshot/api_op_PutBucketPolicy.go.snap +++ b/service/s3/snapshot/api_op_PutBucketPolicy.go.snap @@ -16,6 +16,7 @@ PutBucketPolicy OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketReplication.go.snap b/service/s3/snapshot/api_op_PutBucketReplication.go.snap index 09e2986a797..b004cbfa96c 100644 --- a/service/s3/snapshot/api_op_PutBucketReplication.go.snap +++ b/service/s3/snapshot/api_op_PutBucketReplication.go.snap @@ -16,6 +16,7 @@ PutBucketReplication OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketRequestPayment.go.snap b/service/s3/snapshot/api_op_PutBucketRequestPayment.go.snap index c362481829c..9e38fb75e8a 100644 --- a/service/s3/snapshot/api_op_PutBucketRequestPayment.go.snap +++ b/service/s3/snapshot/api_op_PutBucketRequestPayment.go.snap @@ -16,6 +16,7 @@ PutBucketRequestPayment OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketTagging.go.snap b/service/s3/snapshot/api_op_PutBucketTagging.go.snap index fd5908883a2..6e575929b84 100644 --- a/service/s3/snapshot/api_op_PutBucketTagging.go.snap +++ b/service/s3/snapshot/api_op_PutBucketTagging.go.snap @@ -16,6 +16,7 @@ PutBucketTagging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketVersioning.go.snap b/service/s3/snapshot/api_op_PutBucketVersioning.go.snap index a016775ed49..22415ba7971 100644 --- a/service/s3/snapshot/api_op_PutBucketVersioning.go.snap +++ b/service/s3/snapshot/api_op_PutBucketVersioning.go.snap @@ -16,6 +16,7 @@ PutBucketVersioning OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutBucketWebsite.go.snap b/service/s3/snapshot/api_op_PutBucketWebsite.go.snap index e370009ea2a..42e36072fce 100644 --- a/service/s3/snapshot/api_op_PutBucketWebsite.go.snap +++ b/service/s3/snapshot/api_op_PutBucketWebsite.go.snap @@ -16,6 +16,7 @@ PutBucketWebsite OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutObject.go.snap b/service/s3/snapshot/api_op_PutObject.go.snap index 1b508e2d51e..e87107024e5 100644 --- a/service/s3/snapshot/api_op_PutObject.go.snap +++ b/service/s3/snapshot/api_op_PutObject.go.snap @@ -16,6 +16,7 @@ PutObject OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutObjectAcl.go.snap b/service/s3/snapshot/api_op_PutObjectAcl.go.snap index 0b1f3587cb8..ccd4f6c6d8f 100644 --- a/service/s3/snapshot/api_op_PutObjectAcl.go.snap +++ b/service/s3/snapshot/api_op_PutObjectAcl.go.snap @@ -16,6 +16,7 @@ PutObjectAcl OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutObjectLegalHold.go.snap b/service/s3/snapshot/api_op_PutObjectLegalHold.go.snap index 3f8bccced18..8a4d47fb13b 100644 --- a/service/s3/snapshot/api_op_PutObjectLegalHold.go.snap +++ b/service/s3/snapshot/api_op_PutObjectLegalHold.go.snap @@ -16,6 +16,7 @@ PutObjectLegalHold OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutObjectLockConfiguration.go.snap b/service/s3/snapshot/api_op_PutObjectLockConfiguration.go.snap index 3d424ce5147..a45f12e8d0f 100644 --- a/service/s3/snapshot/api_op_PutObjectLockConfiguration.go.snap +++ b/service/s3/snapshot/api_op_PutObjectLockConfiguration.go.snap @@ -16,6 +16,7 @@ PutObjectLockConfiguration OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutObjectRetention.go.snap b/service/s3/snapshot/api_op_PutObjectRetention.go.snap index df3f0a5277e..a8b7ef1e40c 100644 --- a/service/s3/snapshot/api_op_PutObjectRetention.go.snap +++ b/service/s3/snapshot/api_op_PutObjectRetention.go.snap @@ -16,6 +16,7 @@ PutObjectRetention OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutObjectTagging.go.snap b/service/s3/snapshot/api_op_PutObjectTagging.go.snap index 04233cea5a8..35624d585f6 100644 --- a/service/s3/snapshot/api_op_PutObjectTagging.go.snap +++ b/service/s3/snapshot/api_op_PutObjectTagging.go.snap @@ -16,6 +16,7 @@ PutObjectTagging OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_PutPublicAccessBlock.go.snap b/service/s3/snapshot/api_op_PutPublicAccessBlock.go.snap index 1afc7797d9a..9ab5312d114 100644 --- a/service/s3/snapshot/api_op_PutPublicAccessBlock.go.snap +++ b/service/s3/snapshot/api_op_PutPublicAccessBlock.go.snap @@ -16,6 +16,7 @@ PutPublicAccessBlock OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_RestoreObject.go.snap b/service/s3/snapshot/api_op_RestoreObject.go.snap index 661227a5d60..b9e6599ec72 100644 --- a/service/s3/snapshot/api_op_RestoreObject.go.snap +++ b/service/s3/snapshot/api_op_RestoreObject.go.snap @@ -16,6 +16,7 @@ RestoreObject OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_SelectObjectContent.go.snap b/service/s3/snapshot/api_op_SelectObjectContent.go.snap index d6f5a77ca92..8d6e39c0b7c 100644 --- a/service/s3/snapshot/api_op_SelectObjectContent.go.snap +++ b/service/s3/snapshot/api_op_SelectObjectContent.go.snap @@ -15,6 +15,7 @@ SelectObjectContent OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_UploadPart.go.snap b/service/s3/snapshot/api_op_UploadPart.go.snap index ba5a3c0e59e..c1173feadfd 100644 --- a/service/s3/snapshot/api_op_UploadPart.go.snap +++ b/service/s3/snapshot/api_op_UploadPart.go.snap @@ -16,6 +16,7 @@ UploadPart OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_UploadPartCopy.go.snap b/service/s3/snapshot/api_op_UploadPartCopy.go.snap index 61dd4939af7..61a466f81c5 100644 --- a/service/s3/snapshot/api_op_UploadPartCopy.go.snap +++ b/service/s3/snapshot/api_op_UploadPartCopy.go.snap @@ -15,6 +15,7 @@ UploadPartCopy OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3/snapshot/api_op_WriteGetObjectResponse.go.snap b/service/s3/snapshot/api_op_WriteGetObjectResponse.go.snap index 1a31be59a5f..42be790afd1 100644 --- a/service/s3/snapshot/api_op_WriteGetObjectResponse.go.snap +++ b/service/s3/snapshot/api_op_WriteGetObjectResponse.go.snap @@ -15,6 +15,7 @@ WriteGetObjectResponse OperationSerializer S3:UpdateEndpoint S3:RemoveBucketFromPathMiddleware + isExpressUserAgent Build stack step ClientRequestID ComputeContentLength diff --git a/service/s3control/api_client.go b/service/s3control/api_client.go index b647b2f5fad..ac801d7d310 100644 --- a/service/s3control/api_client.go +++ b/service/s3control/api_client.go @@ -457,6 +457,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -564,6 +588,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go b/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go index ad700383f4b..cc67908a490 100644 --- a/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go +++ b/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAssociateAccessGrantsIdentityCenterMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateAccessGrant.go b/service/s3control/api_op_CreateAccessGrant.go index 3b25aa1fcc5..836ef9a5bb1 100644 --- a/service/s3control/api_op_CreateAccessGrant.go +++ b/service/s3control/api_op_CreateAccessGrant.go @@ -237,6 +237,9 @@ func (c *Client) addOperationCreateAccessGrantMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateAccessGrantsInstance.go b/service/s3control/api_op_CreateAccessGrantsInstance.go index a178089f180..5ce14160c02 100644 --- a/service/s3control/api_op_CreateAccessGrantsInstance.go +++ b/service/s3control/api_op_CreateAccessGrantsInstance.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateAccessGrantsInstanceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateAccessGrantsLocation.go b/service/s3control/api_op_CreateAccessGrantsLocation.go index dc74cc7717e..b5160cee524 100644 --- a/service/s3control/api_op_CreateAccessGrantsLocation.go +++ b/service/s3control/api_op_CreateAccessGrantsLocation.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateAccessGrantsLocationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateAccessPoint.go b/service/s3control/api_op_CreateAccessPoint.go index f4faa623692..bf69bb6abb8 100644 --- a/service/s3control/api_op_CreateAccessPoint.go +++ b/service/s3control/api_op_CreateAccessPoint.go @@ -195,6 +195,9 @@ func (c *Client) addOperationCreateAccessPointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAccessPointMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateAccessPointForObjectLambda.go b/service/s3control/api_op_CreateAccessPointForObjectLambda.go index aea5f393732..49759c8cdc8 100644 --- a/service/s3control/api_op_CreateAccessPointForObjectLambda.go +++ b/service/s3control/api_op_CreateAccessPointForObjectLambda.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateAccessPointForObjectLambdaMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateAccessPointForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateBucket.go b/service/s3control/api_op_CreateBucket.go index 3c35a09855a..d74a9d5b7d3 100644 --- a/service/s3control/api_op_CreateBucket.go +++ b/service/s3control/api_op_CreateBucket.go @@ -221,6 +221,9 @@ func (c *Client) addOperationCreateBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateJob.go b/service/s3control/api_op_CreateJob.go index 00bd4d35eb6..dddc9a5645c 100644 --- a/service/s3control/api_op_CreateJob.go +++ b/service/s3control/api_op_CreateJob.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateJobMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateMultiRegionAccessPoint.go b/service/s3control/api_op_CreateMultiRegionAccessPoint.go index 11334123da1..ea501daffd1 100644 --- a/service/s3control/api_op_CreateMultiRegionAccessPoint.go +++ b/service/s3control/api_op_CreateMultiRegionAccessPoint.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateMultiRegionAccessPointMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_CreateStorageLensGroup.go b/service/s3control/api_op_CreateStorageLensGroup.go index 214b22d4720..a70c68bff92 100644 --- a/service/s3control/api_op_CreateStorageLensGroup.go +++ b/service/s3control/api_op_CreateStorageLensGroup.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCreateStorageLensGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateStorageLensGroupMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessGrant.go b/service/s3control/api_op_DeleteAccessGrant.go index 988ff84bde3..203ce489683 100644 --- a/service/s3control/api_op_DeleteAccessGrant.go +++ b/service/s3control/api_op_DeleteAccessGrant.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteAccessGrantMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessGrantsInstance.go b/service/s3control/api_op_DeleteAccessGrantsInstance.go index 84aaf743ae1..cdb6968525b 100644 --- a/service/s3control/api_op_DeleteAccessGrantsInstance.go +++ b/service/s3control/api_op_DeleteAccessGrantsInstance.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeleteAccessGrantsInstanceMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go b/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go index cc2070641a2..e0d1de823f3 100644 --- a/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go +++ b/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeleteAccessGrantsInstanceResourcePolicyMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessGrantsLocation.go b/service/s3control/api_op_DeleteAccessGrantsLocation.go index 317ee579fa5..060ae8d792c 100644 --- a/service/s3control/api_op_DeleteAccessGrantsLocation.go +++ b/service/s3control/api_op_DeleteAccessGrantsLocation.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteAccessGrantsLocationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessPoint.go b/service/s3control/api_op_DeleteAccessPoint.go index b7b51fc9095..1960267af2a 100644 --- a/service/s3control/api_op_DeleteAccessPoint.go +++ b/service/s3control/api_op_DeleteAccessPoint.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDeleteAccessPointMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAccessPointMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessPointForObjectLambda.go b/service/s3control/api_op_DeleteAccessPointForObjectLambda.go index 2bb0e617ba7..7d535df5257 100644 --- a/service/s3control/api_op_DeleteAccessPointForObjectLambda.go +++ b/service/s3control/api_op_DeleteAccessPointForObjectLambda.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteAccessPointForObjectLambdaMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAccessPointForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessPointPolicy.go b/service/s3control/api_op_DeleteAccessPointPolicy.go index 077712dfd2d..d6dfc769037 100644 --- a/service/s3control/api_op_DeleteAccessPointPolicy.go +++ b/service/s3control/api_op_DeleteAccessPointPolicy.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDeleteAccessPointPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAccessPointPolicyMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go index a2c3e0fe83e..0037d2c6ef8 100644 --- a/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteAccessPointPolicyForObjectLambdaMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteAccessPointPolicyForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteBucket.go b/service/s3control/api_op_DeleteBucket.go index 525e0fe99c4..c24c0d1e64d 100644 --- a/service/s3control/api_op_DeleteBucket.go +++ b/service/s3control/api_op_DeleteBucket.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDeleteBucketMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteBucketMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go b/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go index f2f601b8a13..801511e46d3 100644 --- a/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDeleteBucketLifecycleConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteBucketLifecycleConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteBucketPolicy.go b/service/s3control/api_op_DeleteBucketPolicy.go index 34631612c1a..7043b5cd641 100644 --- a/service/s3control/api_op_DeleteBucketPolicy.go +++ b/service/s3control/api_op_DeleteBucketPolicy.go @@ -170,6 +170,9 @@ func (c *Client) addOperationDeleteBucketPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteBucketPolicyMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteBucketReplication.go b/service/s3control/api_op_DeleteBucketReplication.go index 68e4b01a44b..df189518f24 100644 --- a/service/s3control/api_op_DeleteBucketReplication.go +++ b/service/s3control/api_op_DeleteBucketReplication.go @@ -172,6 +172,9 @@ func (c *Client) addOperationDeleteBucketReplicationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteBucketReplicationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteBucketTagging.go b/service/s3control/api_op_DeleteBucketTagging.go index 9f18156d915..60866a0c9df 100644 --- a/service/s3control/api_op_DeleteBucketTagging.go +++ b/service/s3control/api_op_DeleteBucketTagging.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDeleteBucketTaggingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteBucketTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteJobTagging.go b/service/s3control/api_op_DeleteJobTagging.go index 06c4db8410f..5ac621bf054 100644 --- a/service/s3control/api_op_DeleteJobTagging.go +++ b/service/s3control/api_op_DeleteJobTagging.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteJobTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteJobTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteMultiRegionAccessPoint.go b/service/s3control/api_op_DeleteMultiRegionAccessPoint.go index 9ba030aba65..63df78892a5 100644 --- a/service/s3control/api_op_DeleteMultiRegionAccessPoint.go +++ b/service/s3control/api_op_DeleteMultiRegionAccessPoint.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDeleteMultiRegionAccessPointMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeletePublicAccessBlock.go b/service/s3control/api_op_DeletePublicAccessBlock.go index 45e325bf166..6da14a9f8ae 100644 --- a/service/s3control/api_op_DeletePublicAccessBlock.go +++ b/service/s3control/api_op_DeletePublicAccessBlock.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeletePublicAccessBlockMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeletePublicAccessBlockMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteStorageLensConfiguration.go b/service/s3control/api_op_DeleteStorageLensConfiguration.go index 037c51ba522..281450a147a 100644 --- a/service/s3control/api_op_DeleteStorageLensConfiguration.go +++ b/service/s3control/api_op_DeleteStorageLensConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteStorageLensConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteStorageLensConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go b/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go index b088f2040d7..35e41268b4e 100644 --- a/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteStorageLensConfigurationTaggingMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteStorageLensConfigurationTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DeleteStorageLensGroup.go b/service/s3control/api_op_DeleteStorageLensGroup.go index 2ac7eed6222..fb148b575f2 100644 --- a/service/s3control/api_op_DeleteStorageLensGroup.go +++ b/service/s3control/api_op_DeleteStorageLensGroup.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteStorageLensGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteStorageLensGroupMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DescribeJob.go b/service/s3control/api_op_DescribeJob.go index d28bb2c68f8..6b1793a2018 100644 --- a/service/s3control/api_op_DescribeJob.go +++ b/service/s3control/api_op_DescribeJob.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeJobMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDescribeJobMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go b/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go index 8e63d1e87a6..7fc48d12910 100644 --- a/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go +++ b/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeMultiRegionAccessPointOperationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go b/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go index eae0aecc46c..e3ca5f4062c 100644 --- a/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go +++ b/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDissociateAccessGrantsIdentityCenterMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessGrant.go b/service/s3control/api_op_GetAccessGrant.go index 2ede35dd3a2..bb47faa12dd 100644 --- a/service/s3control/api_op_GetAccessGrant.go +++ b/service/s3control/api_op_GetAccessGrant.go @@ -173,6 +173,9 @@ func (c *Client) addOperationGetAccessGrantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessGrantsInstance.go b/service/s3control/api_op_GetAccessGrantsInstance.go index 17abdf77513..b616025db9a 100644 --- a/service/s3control/api_op_GetAccessGrantsInstance.go +++ b/service/s3control/api_op_GetAccessGrantsInstance.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetAccessGrantsInstanceMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go b/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go index 13e8b4421ce..e2b35ffe30e 100644 --- a/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go +++ b/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetAccessGrantsInstanceForPrefixMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go b/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go index f4d0d66b99b..a033261d512 100644 --- a/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go +++ b/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetAccessGrantsInstanceResourcePolicyMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessGrantsLocation.go b/service/s3control/api_op_GetAccessGrantsLocation.go index 3e976b650f3..d0ce2d23858 100644 --- a/service/s3control/api_op_GetAccessGrantsLocation.go +++ b/service/s3control/api_op_GetAccessGrantsLocation.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetAccessGrantsLocationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPoint.go b/service/s3control/api_op_GetAccessPoint.go index 68237ec7195..2ea37cc5265 100644 --- a/service/s3control/api_op_GetAccessPoint.go +++ b/service/s3control/api_op_GetAccessPoint.go @@ -206,6 +206,9 @@ func (c *Client) addOperationGetAccessPointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go b/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go index f5855039755..97c1eee3f05 100644 --- a/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetAccessPointConfigurationForObjectLambdaMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointConfigurationForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPointForObjectLambda.go b/service/s3control/api_op_GetAccessPointForObjectLambda.go index 990b5a34ba7..c57dabb633d 100644 --- a/service/s3control/api_op_GetAccessPointForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointForObjectLambda.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetAccessPointForObjectLambdaMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPointPolicy.go b/service/s3control/api_op_GetAccessPointPolicy.go index cfb52c06990..2dff36d5c35 100644 --- a/service/s3control/api_op_GetAccessPointPolicy.go +++ b/service/s3control/api_op_GetAccessPointPolicy.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetAccessPointPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointPolicyMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go index 71f92a20221..0525b77116f 100644 --- a/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetAccessPointPolicyForObjectLambdaMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointPolicyForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPointPolicyStatus.go b/service/s3control/api_op_GetAccessPointPolicyStatus.go index 8eff70e1dff..e880fd79a7e 100644 --- a/service/s3control/api_op_GetAccessPointPolicyStatus.go +++ b/service/s3control/api_op_GetAccessPointPolicyStatus.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetAccessPointPolicyStatusMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointPolicyStatusMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go b/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go index 53980b9b1b1..573bdfeabda 100644 --- a/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetAccessPointPolicyStatusForObjectLambdaMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetAccessPointPolicyStatusForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetBucket.go b/service/s3control/api_op_GetBucket.go index 4e59e58b534..d928e843770 100644 --- a/service/s3control/api_op_GetBucket.go +++ b/service/s3control/api_op_GetBucket.go @@ -175,6 +175,9 @@ func (c *Client) addOperationGetBucketMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBucketMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetBucketLifecycleConfiguration.go b/service/s3control/api_op_GetBucketLifecycleConfiguration.go index 0d657631851..77156ad11db 100644 --- a/service/s3control/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_GetBucketLifecycleConfiguration.go @@ -178,6 +178,9 @@ func (c *Client) addOperationGetBucketLifecycleConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBucketLifecycleConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetBucketPolicy.go b/service/s3control/api_op_GetBucketPolicy.go index c91d3fda801..837445486ed 100644 --- a/service/s3control/api_op_GetBucketPolicy.go +++ b/service/s3control/api_op_GetBucketPolicy.go @@ -179,6 +179,9 @@ func (c *Client) addOperationGetBucketPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBucketPolicyMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetBucketReplication.go b/service/s3control/api_op_GetBucketReplication.go index 5e0496b9393..13b59a6397c 100644 --- a/service/s3control/api_op_GetBucketReplication.go +++ b/service/s3control/api_op_GetBucketReplication.go @@ -187,6 +187,9 @@ func (c *Client) addOperationGetBucketReplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBucketReplicationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetBucketTagging.go b/service/s3control/api_op_GetBucketTagging.go index 3a4e3c44c60..a75582e1721 100644 --- a/service/s3control/api_op_GetBucketTagging.go +++ b/service/s3control/api_op_GetBucketTagging.go @@ -171,6 +171,9 @@ func (c *Client) addOperationGetBucketTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBucketTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetBucketVersioning.go b/service/s3control/api_op_GetBucketVersioning.go index aa572da2f70..dcee73f7417 100644 --- a/service/s3control/api_op_GetBucketVersioning.go +++ b/service/s3control/api_op_GetBucketVersioning.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetBucketVersioningMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetBucketVersioningMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetDataAccess.go b/service/s3control/api_op_GetDataAccess.go index 0fc43d514a0..aa27c498875 100644 --- a/service/s3control/api_op_GetDataAccess.go +++ b/service/s3control/api_op_GetDataAccess.go @@ -177,6 +177,9 @@ func (c *Client) addOperationGetDataAccessMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetJobTagging.go b/service/s3control/api_op_GetJobTagging.go index 3d2bedd3d1c..dcade27c2b4 100644 --- a/service/s3control/api_op_GetJobTagging.go +++ b/service/s3control/api_op_GetJobTagging.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetJobTaggingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetJobTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetMultiRegionAccessPoint.go b/service/s3control/api_op_GetMultiRegionAccessPoint.go index 2962297ae10..4ce1fb97797 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPoint.go +++ b/service/s3control/api_op_GetMultiRegionAccessPoint.go @@ -153,6 +153,9 @@ func (c *Client) addOperationGetMultiRegionAccessPointMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go b/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go index 31e2f864448..e7a8fa6cc1b 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetMultiRegionAccessPointPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go b/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go index e9cff7382c5..a4ddcb3e153 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetMultiRegionAccessPointPolicyStatusMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go b/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go index 44c5eaa37a7..4b310767031 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetMultiRegionAccessPointRoutesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetPublicAccessBlock.go b/service/s3control/api_op_GetPublicAccessBlock.go index 12680fc40a5..cc65f56da91 100644 --- a/service/s3control/api_op_GetPublicAccessBlock.go +++ b/service/s3control/api_op_GetPublicAccessBlock.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetPublicAccessBlockMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetPublicAccessBlockMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetStorageLensConfiguration.go b/service/s3control/api_op_GetStorageLensConfiguration.go index c7c27b1d0b7..6d859f9774a 100644 --- a/service/s3control/api_op_GetStorageLensConfiguration.go +++ b/service/s3control/api_op_GetStorageLensConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetStorageLensConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetStorageLensConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetStorageLensConfigurationTagging.go b/service/s3control/api_op_GetStorageLensConfigurationTagging.go index d8017f92b0f..d863755eceb 100644 --- a/service/s3control/api_op_GetStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_GetStorageLensConfigurationTagging.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetStorageLensConfigurationTaggingMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetStorageLensConfigurationTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_GetStorageLensGroup.go b/service/s3control/api_op_GetStorageLensGroup.go index b7c5f27a98a..bfbb50e2cbb 100644 --- a/service/s3control/api_op_GetStorageLensGroup.go +++ b/service/s3control/api_op_GetStorageLensGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetStorageLensGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetStorageLensGroupMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_ListAccessGrants.go b/service/s3control/api_op_ListAccessGrants.go index 9ebd07c2c60..e5960cbd516 100644 --- a/service/s3control/api_op_ListAccessGrants.go +++ b/service/s3control/api_op_ListAccessGrants.go @@ -179,6 +179,9 @@ func (c *Client) addOperationListAccessGrantsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } @@ -221,56 +224,6 @@ func (c *Client) addOperationListAccessGrantsMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListAccessGrantsMiddleware struct { -} - -func (*endpointPrefix_opListAccessGrantsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAccessGrantsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListAccessGrantsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAccessGrantsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAccessGrantsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAccessGrantsAPIClient is a client that implements the ListAccessGrants -// operation. -type ListAccessGrantsAPIClient interface { - ListAccessGrants(context.Context, *ListAccessGrantsInput, ...func(*Options)) (*ListAccessGrantsOutput, error) -} - -var _ ListAccessGrantsAPIClient = (*Client)(nil) - // ListAccessGrantsPaginatorOptions is the paginator options for ListAccessGrants type ListAccessGrantsPaginatorOptions struct { // The maximum number of access grants that you would like returned in the List @@ -332,6 +285,9 @@ func (p *ListAccessGrantsPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -351,6 +307,56 @@ func (p *ListAccessGrantsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListAccessGrantsMiddleware struct { +} + +func (*endpointPrefix_opListAccessGrantsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAccessGrantsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListAccessGrantsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAccessGrantsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAccessGrantsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAccessGrantsAPIClient is a client that implements the ListAccessGrants +// operation. +type ListAccessGrantsAPIClient interface { + ListAccessGrants(context.Context, *ListAccessGrantsInput, ...func(*Options)) (*ListAccessGrantsOutput, error) +} + +var _ ListAccessGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListAccessGrantsInstances.go b/service/s3control/api_op_ListAccessGrantsInstances.go index 22f066389ee..f66f6b499f3 100644 --- a/service/s3control/api_op_ListAccessGrantsInstances.go +++ b/service/s3control/api_op_ListAccessGrantsInstances.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListAccessGrantsInstancesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } @@ -181,56 +184,6 @@ func (c *Client) addOperationListAccessGrantsInstancesMiddlewares(stack *middlew return nil } -type endpointPrefix_opListAccessGrantsInstancesMiddleware struct { -} - -func (*endpointPrefix_opListAccessGrantsInstancesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAccessGrantsInstancesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListAccessGrantsInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAccessGrantsInstancesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAccessGrantsInstancesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAccessGrantsInstancesAPIClient is a client that implements the -// ListAccessGrantsInstances operation. -type ListAccessGrantsInstancesAPIClient interface { - ListAccessGrantsInstances(context.Context, *ListAccessGrantsInstancesInput, ...func(*Options)) (*ListAccessGrantsInstancesOutput, error) -} - -var _ ListAccessGrantsInstancesAPIClient = (*Client)(nil) - // ListAccessGrantsInstancesPaginatorOptions is the paginator options for // ListAccessGrantsInstances type ListAccessGrantsInstancesPaginatorOptions struct { @@ -294,6 +247,9 @@ func (p *ListAccessGrantsInstancesPaginator) NextPage(ctx context.Context, optFn params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessGrantsInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -313,6 +269,56 @@ func (p *ListAccessGrantsInstancesPaginator) NextPage(ctx context.Context, optFn return result, nil } +type endpointPrefix_opListAccessGrantsInstancesMiddleware struct { +} + +func (*endpointPrefix_opListAccessGrantsInstancesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAccessGrantsInstancesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListAccessGrantsInstancesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAccessGrantsInstancesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAccessGrantsInstancesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAccessGrantsInstancesAPIClient is a client that implements the +// ListAccessGrantsInstances operation. +type ListAccessGrantsInstancesAPIClient interface { + ListAccessGrantsInstances(context.Context, *ListAccessGrantsInstancesInput, ...func(*Options)) (*ListAccessGrantsInstancesOutput, error) +} + +var _ ListAccessGrantsInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessGrantsInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListAccessGrantsLocations.go b/service/s3control/api_op_ListAccessGrantsLocations.go index 607d28565e6..5b0000014b6 100644 --- a/service/s3control/api_op_ListAccessGrantsLocations.go +++ b/service/s3control/api_op_ListAccessGrantsLocations.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListAccessGrantsLocationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } @@ -187,56 +190,6 @@ func (c *Client) addOperationListAccessGrantsLocationsMiddlewares(stack *middlew return nil } -type endpointPrefix_opListAccessGrantsLocationsMiddleware struct { -} - -func (*endpointPrefix_opListAccessGrantsLocationsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAccessGrantsLocationsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListAccessGrantsLocationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAccessGrantsLocationsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAccessGrantsLocationsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAccessGrantsLocationsAPIClient is a client that implements the -// ListAccessGrantsLocations operation. -type ListAccessGrantsLocationsAPIClient interface { - ListAccessGrantsLocations(context.Context, *ListAccessGrantsLocationsInput, ...func(*Options)) (*ListAccessGrantsLocationsOutput, error) -} - -var _ ListAccessGrantsLocationsAPIClient = (*Client)(nil) - // ListAccessGrantsLocationsPaginatorOptions is the paginator options for // ListAccessGrantsLocations type ListAccessGrantsLocationsPaginatorOptions struct { @@ -300,6 +253,9 @@ func (p *ListAccessGrantsLocationsPaginator) NextPage(ctx context.Context, optFn params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessGrantsLocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -319,6 +275,56 @@ func (p *ListAccessGrantsLocationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +type endpointPrefix_opListAccessGrantsLocationsMiddleware struct { +} + +func (*endpointPrefix_opListAccessGrantsLocationsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAccessGrantsLocationsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListAccessGrantsLocationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAccessGrantsLocationsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAccessGrantsLocationsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAccessGrantsLocationsAPIClient is a client that implements the +// ListAccessGrantsLocations operation. +type ListAccessGrantsLocationsAPIClient interface { + ListAccessGrantsLocations(context.Context, *ListAccessGrantsLocationsInput, ...func(*Options)) (*ListAccessGrantsLocationsOutput, error) +} + +var _ ListAccessGrantsLocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessGrantsLocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListAccessPoints.go b/service/s3control/api_op_ListAccessPoints.go index 9dee72c782c..456bfefc5b2 100644 --- a/service/s3control/api_op_ListAccessPoints.go +++ b/service/s3control/api_op_ListAccessPoints.go @@ -179,6 +179,9 @@ func (c *Client) addOperationListAccessPointsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAccessPointsMiddleware(stack); err != nil { return err } @@ -218,68 +221,6 @@ func (c *Client) addOperationListAccessPointsMiddlewares(stack *middleware.Stack return nil } -func (m *ListAccessPointsInput) GetARNMember() (*string, bool) { - if m.Bucket == nil { - return nil, false - } - return m.Bucket, true -} - -func (m *ListAccessPointsInput) SetARNMember(v string) error { - m.Bucket = &v - return nil -} - -type endpointPrefix_opListAccessPointsMiddleware struct { -} - -func (*endpointPrefix_opListAccessPointsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAccessPointsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListAccessPointsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAccessPointsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAccessPointsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAccessPointsAPIClient is a client that implements the ListAccessPoints -// operation. -type ListAccessPointsAPIClient interface { - ListAccessPoints(context.Context, *ListAccessPointsInput, ...func(*Options)) (*ListAccessPointsOutput, error) -} - -var _ ListAccessPointsAPIClient = (*Client)(nil) - // ListAccessPointsPaginatorOptions is the paginator options for ListAccessPoints type ListAccessPointsPaginatorOptions struct { // The maximum number of access points that you want to include in the list. If @@ -342,6 +283,9 @@ func (p *ListAccessPointsPaginator) NextPage(ctx context.Context, optFns ...func params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -361,6 +305,68 @@ func (p *ListAccessPointsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +func (m *ListAccessPointsInput) GetARNMember() (*string, bool) { + if m.Bucket == nil { + return nil, false + } + return m.Bucket, true +} + +func (m *ListAccessPointsInput) SetARNMember(v string) error { + m.Bucket = &v + return nil +} + +type endpointPrefix_opListAccessPointsMiddleware struct { +} + +func (*endpointPrefix_opListAccessPointsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAccessPointsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListAccessPointsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAccessPointsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAccessPointsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAccessPointsAPIClient is a client that implements the ListAccessPoints +// operation. +type ListAccessPointsAPIClient interface { + ListAccessPoints(context.Context, *ListAccessPointsInput, ...func(*Options)) (*ListAccessPointsOutput, error) +} + +var _ ListAccessPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListAccessPointsForObjectLambda.go b/service/s3control/api_op_ListAccessPointsForObjectLambda.go index 7d770af6950..a31fe2eeb15 100644 --- a/service/s3control/api_op_ListAccessPointsForObjectLambda.go +++ b/service/s3control/api_op_ListAccessPointsForObjectLambda.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListAccessPointsForObjectLambdaMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListAccessPointsForObjectLambdaMiddleware(stack); err != nil { return err } @@ -193,56 +196,6 @@ func (c *Client) addOperationListAccessPointsForObjectLambdaMiddlewares(stack *m return nil } -type endpointPrefix_opListAccessPointsForObjectLambdaMiddleware struct { -} - -func (*endpointPrefix_opListAccessPointsForObjectLambdaMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAccessPointsForObjectLambdaMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListAccessPointsForObjectLambdaInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAccessPointsForObjectLambdaMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAccessPointsForObjectLambdaMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAccessPointsForObjectLambdaAPIClient is a client that implements the -// ListAccessPointsForObjectLambda operation. -type ListAccessPointsForObjectLambdaAPIClient interface { - ListAccessPointsForObjectLambda(context.Context, *ListAccessPointsForObjectLambdaInput, ...func(*Options)) (*ListAccessPointsForObjectLambdaOutput, error) -} - -var _ ListAccessPointsForObjectLambdaAPIClient = (*Client)(nil) - // ListAccessPointsForObjectLambdaPaginatorOptions is the paginator options for // ListAccessPointsForObjectLambda type ListAccessPointsForObjectLambdaPaginatorOptions struct { @@ -309,6 +262,9 @@ func (p *ListAccessPointsForObjectLambdaPaginator) NextPage(ctx context.Context, params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessPointsForObjectLambda(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -328,6 +284,56 @@ func (p *ListAccessPointsForObjectLambdaPaginator) NextPage(ctx context.Context, return result, nil } +type endpointPrefix_opListAccessPointsForObjectLambdaMiddleware struct { +} + +func (*endpointPrefix_opListAccessPointsForObjectLambdaMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAccessPointsForObjectLambdaMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListAccessPointsForObjectLambdaInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListAccessPointsForObjectLambdaMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListAccessPointsForObjectLambdaMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListAccessPointsForObjectLambdaAPIClient is a client that implements the +// ListAccessPointsForObjectLambda operation. +type ListAccessPointsForObjectLambdaAPIClient interface { + ListAccessPointsForObjectLambda(context.Context, *ListAccessPointsForObjectLambdaInput, ...func(*Options)) (*ListAccessPointsForObjectLambdaOutput, error) +} + +var _ ListAccessPointsForObjectLambdaAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessPointsForObjectLambda(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListJobs.go b/service/s3control/api_op_ListJobs.go index 1e5786d2e50..6dec676ac96 100644 --- a/service/s3control/api_op_ListJobs.go +++ b/service/s3control/api_op_ListJobs.go @@ -160,6 +160,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListJobsMiddleware(stack); err != nil { return err } @@ -199,55 +202,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -type endpointPrefix_opListJobsMiddleware struct { -} - -func (*endpointPrefix_opListJobsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListJobsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListJobsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListJobsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The maximum number of jobs that Amazon S3 will include in the List Jobs @@ -314,6 +268,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -333,6 +290,55 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +type endpointPrefix_opListJobsMiddleware struct { +} + +func (*endpointPrefix_opListJobsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListJobsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListJobsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListJobsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListJobsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListMultiRegionAccessPoints.go b/service/s3control/api_op_ListMultiRegionAccessPoints.go index 3978cf3ac30..36ec7b91259 100644 --- a/service/s3control/api_op_ListMultiRegionAccessPoints.go +++ b/service/s3control/api_op_ListMultiRegionAccessPoints.go @@ -157,6 +157,9 @@ func (c *Client) addOperationListMultiRegionAccessPointsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } @@ -199,56 +202,6 @@ func (c *Client) addOperationListMultiRegionAccessPointsMiddlewares(stack *middl return nil } -type endpointPrefix_opListMultiRegionAccessPointsMiddleware struct { -} - -func (*endpointPrefix_opListMultiRegionAccessPointsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListMultiRegionAccessPointsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListMultiRegionAccessPointsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListMultiRegionAccessPointsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListMultiRegionAccessPointsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListMultiRegionAccessPointsAPIClient is a client that implements the -// ListMultiRegionAccessPoints operation. -type ListMultiRegionAccessPointsAPIClient interface { - ListMultiRegionAccessPoints(context.Context, *ListMultiRegionAccessPointsInput, ...func(*Options)) (*ListMultiRegionAccessPointsOutput, error) -} - -var _ ListMultiRegionAccessPointsAPIClient = (*Client)(nil) - // ListMultiRegionAccessPointsPaginatorOptions is the paginator options for // ListMultiRegionAccessPoints type ListMultiRegionAccessPointsPaginatorOptions struct { @@ -311,6 +264,9 @@ func (p *ListMultiRegionAccessPointsPaginator) NextPage(ctx context.Context, opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMultiRegionAccessPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -330,6 +286,56 @@ func (p *ListMultiRegionAccessPointsPaginator) NextPage(ctx context.Context, opt return result, nil } +type endpointPrefix_opListMultiRegionAccessPointsMiddleware struct { +} + +func (*endpointPrefix_opListMultiRegionAccessPointsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListMultiRegionAccessPointsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListMultiRegionAccessPointsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListMultiRegionAccessPointsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListMultiRegionAccessPointsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListMultiRegionAccessPointsAPIClient is a client that implements the +// ListMultiRegionAccessPoints operation. +type ListMultiRegionAccessPointsAPIClient interface { + ListMultiRegionAccessPoints(context.Context, *ListMultiRegionAccessPointsInput, ...func(*Options)) (*ListMultiRegionAccessPointsOutput, error) +} + +var _ ListMultiRegionAccessPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMultiRegionAccessPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListRegionalBuckets.go b/service/s3control/api_op_ListRegionalBuckets.go index 773caee860d..176ba839f0d 100644 --- a/service/s3control/api_op_ListRegionalBuckets.go +++ b/service/s3control/api_op_ListRegionalBuckets.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListRegionalBucketsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListRegionalBucketsMiddleware(stack); err != nil { return err } @@ -186,56 +189,6 @@ func (c *Client) addOperationListRegionalBucketsMiddlewares(stack *middleware.St return nil } -type endpointPrefix_opListRegionalBucketsMiddleware struct { -} - -func (*endpointPrefix_opListRegionalBucketsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListRegionalBucketsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListRegionalBucketsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListRegionalBucketsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListRegionalBucketsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListRegionalBucketsAPIClient is a client that implements the -// ListRegionalBuckets operation. -type ListRegionalBucketsAPIClient interface { - ListRegionalBuckets(context.Context, *ListRegionalBucketsInput, ...func(*Options)) (*ListRegionalBucketsOutput, error) -} - -var _ ListRegionalBucketsAPIClient = (*Client)(nil) - // ListRegionalBucketsPaginatorOptions is the paginator options for // ListRegionalBuckets type ListRegionalBucketsPaginatorOptions struct { @@ -296,6 +249,9 @@ func (p *ListRegionalBucketsPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRegionalBuckets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -315,6 +271,56 @@ func (p *ListRegionalBucketsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +type endpointPrefix_opListRegionalBucketsMiddleware struct { +} + +func (*endpointPrefix_opListRegionalBucketsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListRegionalBucketsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListRegionalBucketsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListRegionalBucketsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListRegionalBucketsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListRegionalBucketsAPIClient is a client that implements the +// ListRegionalBuckets operation. +type ListRegionalBucketsAPIClient interface { + ListRegionalBuckets(context.Context, *ListRegionalBucketsInput, ...func(*Options)) (*ListRegionalBucketsOutput, error) +} + +var _ ListRegionalBucketsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRegionalBuckets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListStorageLensConfigurations.go b/service/s3control/api_op_ListStorageLensConfigurations.go index 3211a11d536..06c066d1202 100644 --- a/service/s3control/api_op_ListStorageLensConfigurations.go +++ b/service/s3control/api_op_ListStorageLensConfigurations.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListStorageLensConfigurationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStorageLensConfigurationsMiddleware(stack); err != nil { return err } @@ -176,56 +179,6 @@ func (c *Client) addOperationListStorageLensConfigurationsMiddlewares(stack *mid return nil } -type endpointPrefix_opListStorageLensConfigurationsMiddleware struct { -} - -func (*endpointPrefix_opListStorageLensConfigurationsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStorageLensConfigurationsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListStorageLensConfigurationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStorageLensConfigurationsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStorageLensConfigurationsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStorageLensConfigurationsAPIClient is a client that implements the -// ListStorageLensConfigurations operation. -type ListStorageLensConfigurationsAPIClient interface { - ListStorageLensConfigurations(context.Context, *ListStorageLensConfigurationsInput, ...func(*Options)) (*ListStorageLensConfigurationsOutput, error) -} - -var _ ListStorageLensConfigurationsAPIClient = (*Client)(nil) - // ListStorageLensConfigurationsPaginatorOptions is the paginator options for // ListStorageLensConfigurations type ListStorageLensConfigurationsPaginatorOptions struct { @@ -280,6 +233,9 @@ func (p *ListStorageLensConfigurationsPaginator) NextPage(ctx context.Context, o params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStorageLensConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -299,6 +255,56 @@ func (p *ListStorageLensConfigurationsPaginator) NextPage(ctx context.Context, o return result, nil } +type endpointPrefix_opListStorageLensConfigurationsMiddleware struct { +} + +func (*endpointPrefix_opListStorageLensConfigurationsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStorageLensConfigurationsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListStorageLensConfigurationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStorageLensConfigurationsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStorageLensConfigurationsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStorageLensConfigurationsAPIClient is a client that implements the +// ListStorageLensConfigurations operation. +type ListStorageLensConfigurationsAPIClient interface { + ListStorageLensConfigurations(context.Context, *ListStorageLensConfigurationsInput, ...func(*Options)) (*ListStorageLensConfigurationsOutput, error) +} + +var _ ListStorageLensConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStorageLensConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListStorageLensGroups.go b/service/s3control/api_op_ListStorageLensGroups.go index 1cc9a4eb79d..b6e917c8595 100644 --- a/service/s3control/api_op_ListStorageLensGroups.go +++ b/service/s3control/api_op_ListStorageLensGroups.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListStorageLensGroupsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListStorageLensGroupsMiddleware(stack); err != nil { return err } @@ -176,56 +179,6 @@ func (c *Client) addOperationListStorageLensGroupsMiddlewares(stack *middleware. return nil } -type endpointPrefix_opListStorageLensGroupsMiddleware struct { -} - -func (*endpointPrefix_opListStorageLensGroupsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListStorageLensGroupsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - opaqueInput := getOperationInput(ctx) - input, ok := opaqueInput.(*ListStorageLensGroupsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) - } - - var prefix strings.Builder - if input.AccountId == nil { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} - } else if !smithyhttp.ValidHostLabel(*input.AccountId) { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} - } else { - prefix.WriteString(*input.AccountId) - } - prefix.WriteString(".") - req.URL.Host = prefix.String() + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListStorageLensGroupsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListStorageLensGroupsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListStorageLensGroupsAPIClient is a client that implements the -// ListStorageLensGroups operation. -type ListStorageLensGroupsAPIClient interface { - ListStorageLensGroups(context.Context, *ListStorageLensGroupsInput, ...func(*Options)) (*ListStorageLensGroupsOutput, error) -} - -var _ ListStorageLensGroupsAPIClient = (*Client)(nil) - // ListStorageLensGroupsPaginatorOptions is the paginator options for // ListStorageLensGroups type ListStorageLensGroupsPaginatorOptions struct { @@ -278,6 +231,9 @@ func (p *ListStorageLensGroupsPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStorageLensGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -297,6 +253,56 @@ func (p *ListStorageLensGroupsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +type endpointPrefix_opListStorageLensGroupsMiddleware struct { +} + +func (*endpointPrefix_opListStorageLensGroupsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListStorageLensGroupsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + opaqueInput := getOperationInput(ctx) + input, ok := opaqueInput.(*ListStorageLensGroupsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input type %T", opaqueInput) + } + + var prefix strings.Builder + if input.AccountId == nil { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so may not be nil")} + } else if !smithyhttp.ValidHostLabel(*input.AccountId) { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("AccountId forms part of the endpoint host and so must match \"[a-zA-Z0-9-]{1,63}\", but was \"%s\"", *input.AccountId)} + } else { + prefix.WriteString(*input.AccountId) + } + prefix.WriteString(".") + req.URL.Host = prefix.String() + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListStorageLensGroupsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListStorageLensGroupsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListStorageLensGroupsAPIClient is a client that implements the +// ListStorageLensGroups operation. +type ListStorageLensGroupsAPIClient interface { + ListStorageLensGroups(context.Context, *ListStorageLensGroupsInput, ...func(*Options)) (*ListStorageLensGroupsOutput, error) +} + +var _ ListStorageLensGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStorageLensGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3control/api_op_ListTagsForResource.go b/service/s3control/api_op_ListTagsForResource.go index 49e57f900ee..118ff9a741c 100644 --- a/service/s3control/api_op_ListTagsForResource.go +++ b/service/s3control/api_op_ListTagsForResource.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go b/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go index aeafe93dd33..52d412baeec 100644 --- a/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go +++ b/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go @@ -137,6 +137,9 @@ func (c *Client) addOperationPutAccessGrantsInstanceResourcePolicyMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go b/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go index 1056fb9f916..a3e9fd920d1 100644 --- a/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go +++ b/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go @@ -134,6 +134,9 @@ func (c *Client) addOperationPutAccessPointConfigurationForObjectLambdaMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutAccessPointConfigurationForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutAccessPointPolicy.go b/service/s3control/api_op_PutAccessPointPolicy.go index b415d58e6c5..7ddd69313f2 100644 --- a/service/s3control/api_op_PutAccessPointPolicy.go +++ b/service/s3control/api_op_PutAccessPointPolicy.go @@ -162,6 +162,9 @@ func (c *Client) addOperationPutAccessPointPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutAccessPointPolicyMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go index 1552b825495..c72b3effda7 100644 --- a/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go @@ -138,6 +138,9 @@ func (c *Client) addOperationPutAccessPointPolicyForObjectLambdaMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutAccessPointPolicyForObjectLambdaMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutBucketLifecycleConfiguration.go b/service/s3control/api_op_PutBucketLifecycleConfiguration.go index 27e51e8eb9a..8714be3d4fe 100644 --- a/service/s3control/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_PutBucketLifecycleConfiguration.go @@ -149,6 +149,9 @@ func (c *Client) addOperationPutBucketLifecycleConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutBucketPolicy.go b/service/s3control/api_op_PutBucketPolicy.go index 50c82639a05..f2c8c814699 100644 --- a/service/s3control/api_op_PutBucketPolicy.go +++ b/service/s3control/api_op_PutBucketPolicy.go @@ -182,6 +182,9 @@ func (c *Client) addOperationPutBucketPolicyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutBucketReplication.go b/service/s3control/api_op_PutBucketReplication.go index 557d3f25976..9f0d85cf9bb 100644 --- a/service/s3control/api_op_PutBucketReplication.go +++ b/service/s3control/api_op_PutBucketReplication.go @@ -220,6 +220,9 @@ func (c *Client) addOperationPutBucketReplicationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutBucketTagging.go b/service/s3control/api_op_PutBucketTagging.go index 3094bdbc06a..22b25b5edfe 100644 --- a/service/s3control/api_op_PutBucketTagging.go +++ b/service/s3control/api_op_PutBucketTagging.go @@ -203,6 +203,9 @@ func (c *Client) addOperationPutBucketTaggingMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutBucketVersioning.go b/service/s3control/api_op_PutBucketVersioning.go index ab3b325e485..0900a6f295a 100644 --- a/service/s3control/api_op_PutBucketVersioning.go +++ b/service/s3control/api_op_PutBucketVersioning.go @@ -181,6 +181,9 @@ func (c *Client) addOperationPutBucketVersioningMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutJobTagging.go b/service/s3control/api_op_PutJobTagging.go index 79c56c0a13c..bca5ee6ea4f 100644 --- a/service/s3control/api_op_PutJobTagging.go +++ b/service/s3control/api_op_PutJobTagging.go @@ -173,6 +173,9 @@ func (c *Client) addOperationPutJobTaggingMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutJobTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go b/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go index bd721493e1f..c50bae02359 100644 --- a/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go +++ b/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutMultiRegionAccessPointPolicyMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutPublicAccessBlock.go b/service/s3control/api_op_PutPublicAccessBlock.go index 7313e8fa8a7..9881c1d8312 100644 --- a/service/s3control/api_op_PutPublicAccessBlock.go +++ b/service/s3control/api_op_PutPublicAccessBlock.go @@ -136,6 +136,9 @@ func (c *Client) addOperationPutPublicAccessBlockMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutPublicAccessBlockMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutStorageLensConfiguration.go b/service/s3control/api_op_PutStorageLensConfiguration.go index 0bc568b6a57..63ec340178c 100644 --- a/service/s3control/api_op_PutStorageLensConfiguration.go +++ b/service/s3control/api_op_PutStorageLensConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationPutStorageLensConfigurationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutStorageLensConfigurationMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_PutStorageLensConfigurationTagging.go b/service/s3control/api_op_PutStorageLensConfigurationTagging.go index fd64fb4c94c..08925432586 100644 --- a/service/s3control/api_op_PutStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_PutStorageLensConfigurationTagging.go @@ -137,6 +137,9 @@ func (c *Client) addOperationPutStorageLensConfigurationTaggingMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opPutStorageLensConfigurationTaggingMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go b/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go index 8772043f23c..b55fd6bc538 100644 --- a/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go +++ b/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go @@ -156,6 +156,9 @@ func (c *Client) addOperationSubmitMultiRegionAccessPointRoutesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_TagResource.go b/service/s3control/api_op_TagResource.go index de2945ac9f1..546ad6f27e3 100644 --- a/service/s3control/api_op_TagResource.go +++ b/service/s3control/api_op_TagResource.go @@ -148,6 +148,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_UntagResource.go b/service/s3control/api_op_UntagResource.go index cb3ca9ab05e..12b2b811e1e 100644 --- a/service/s3control/api_op_UntagResource.go +++ b/service/s3control/api_op_UntagResource.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_UpdateAccessGrantsLocation.go b/service/s3control/api_op_UpdateAccessGrantsLocation.go index b595f9d0894..c3cab0a19db 100644 --- a/service/s3control/api_op_UpdateAccessGrantsLocation.go +++ b/service/s3control/api_op_UpdateAccessGrantsLocation.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateAccessGrantsLocationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_UpdateJobPriority.go b/service/s3control/api_op_UpdateJobPriority.go index ea99185d4f9..cb84ddba7f6 100644 --- a/service/s3control/api_op_UpdateJobPriority.go +++ b/service/s3control/api_op_UpdateJobPriority.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateJobPriorityMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateJobPriorityMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_UpdateJobStatus.go b/service/s3control/api_op_UpdateJobStatus.go index 6055c0218fc..0d985188463 100644 --- a/service/s3control/api_op_UpdateJobStatus.go +++ b/service/s3control/api_op_UpdateJobStatus.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateJobStatusMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateJobStatusMiddleware(stack); err != nil { return err } diff --git a/service/s3control/api_op_UpdateStorageLensGroup.go b/service/s3control/api_op_UpdateStorageLensGroup.go index bd5850bf7ab..a807fa5577d 100644 --- a/service/s3control/api_op_UpdateStorageLensGroup.go +++ b/service/s3control/api_op_UpdateStorageLensGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateStorageLensGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateStorageLensGroupMiddleware(stack); err != nil { return err } diff --git a/service/s3outposts/api_client.go b/service/s3outposts/api_client.go index c868b6268ad..16130c95649 100644 --- a/service/s3outposts/api_client.go +++ b/service/s3outposts/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/s3outposts/api_op_CreateEndpoint.go b/service/s3outposts/api_op_CreateEndpoint.go index 8eed87ed476..f06b70bcf79 100644 --- a/service/s3outposts/api_op_CreateEndpoint.go +++ b/service/s3outposts/api_op_CreateEndpoint.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3outposts/api_op_DeleteEndpoint.go b/service/s3outposts/api_op_DeleteEndpoint.go index 85882f82201..d428358012a 100644 --- a/service/s3outposts/api_op_DeleteEndpoint.go +++ b/service/s3outposts/api_op_DeleteEndpoint.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/s3outposts/api_op_ListEndpoints.go b/service/s3outposts/api_op_ListEndpoints.go index 5bcefe6e7b4..d263437312e 100644 --- a/service/s3outposts/api_op_ListEndpoints.go +++ b/service/s3outposts/api_op_ListEndpoints.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -143,13 +146,6 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o return nil } -// ListEndpointsAPIClient is a client that implements the ListEndpoints operation. -type ListEndpointsAPIClient interface { - ListEndpoints(context.Context, *ListEndpointsInput, ...func(*Options)) (*ListEndpointsOutput, error) -} - -var _ ListEndpointsAPIClient = (*Client)(nil) - // ListEndpointsPaginatorOptions is the paginator options for ListEndpoints type ListEndpointsPaginatorOptions struct { // The maximum number of endpoints that will be returned in the response. @@ -209,6 +205,9 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +227,13 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListEndpointsAPIClient is a client that implements the ListEndpoints operation. +type ListEndpointsAPIClient interface { + ListEndpoints(context.Context, *ListEndpointsInput, ...func(*Options)) (*ListEndpointsOutput, error) +} + +var _ ListEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3outposts/api_op_ListOutpostsWithS3.go b/service/s3outposts/api_op_ListOutpostsWithS3.go index ecf5226bded..e2a768daa8c 100644 --- a/service/s3outposts/api_op_ListOutpostsWithS3.go +++ b/service/s3outposts/api_op_ListOutpostsWithS3.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListOutpostsWithS3Middlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOutpostsWithS3(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListOutpostsWithS3Middlewares(stack *middleware.Sta return nil } -// ListOutpostsWithS3APIClient is a client that implements the ListOutpostsWithS3 -// operation. -type ListOutpostsWithS3APIClient interface { - ListOutpostsWithS3(context.Context, *ListOutpostsWithS3Input, ...func(*Options)) (*ListOutpostsWithS3Output, error) -} - -var _ ListOutpostsWithS3APIClient = (*Client)(nil) - // ListOutpostsWithS3PaginatorOptions is the paginator options for // ListOutpostsWithS3 type ListOutpostsWithS3PaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListOutpostsWithS3Paginator) NextPage(ctx context.Context, optFns ...fu params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOutpostsWithS3(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListOutpostsWithS3Paginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListOutpostsWithS3APIClient is a client that implements the ListOutpostsWithS3 +// operation. +type ListOutpostsWithS3APIClient interface { + ListOutpostsWithS3(context.Context, *ListOutpostsWithS3Input, ...func(*Options)) (*ListOutpostsWithS3Output, error) +} + +var _ ListOutpostsWithS3APIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOutpostsWithS3(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/s3outposts/api_op_ListSharedEndpoints.go b/service/s3outposts/api_op_ListSharedEndpoints.go index 24d4307aee3..3929b203246 100644 --- a/service/s3outposts/api_op_ListSharedEndpoints.go +++ b/service/s3outposts/api_op_ListSharedEndpoints.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListSharedEndpointsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSharedEndpointsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListSharedEndpointsMiddlewares(stack *middleware.St return nil } -// ListSharedEndpointsAPIClient is a client that implements the -// ListSharedEndpoints operation. -type ListSharedEndpointsAPIClient interface { - ListSharedEndpoints(context.Context, *ListSharedEndpointsInput, ...func(*Options)) (*ListSharedEndpointsOutput, error) -} - -var _ ListSharedEndpointsAPIClient = (*Client)(nil) - // ListSharedEndpointsPaginatorOptions is the paginator options for // ListSharedEndpoints type ListSharedEndpointsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListSharedEndpointsPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSharedEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListSharedEndpointsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListSharedEndpointsAPIClient is a client that implements the +// ListSharedEndpoints operation. +type ListSharedEndpointsAPIClient interface { + ListSharedEndpoints(context.Context, *ListSharedEndpointsInput, ...func(*Options)) (*ListSharedEndpointsOutput, error) +} + +var _ ListSharedEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSharedEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_client.go b/service/sagemaker/api_client.go index bc6fb60db60..92a78ffd173 100644 --- a/service/sagemaker/api_client.go +++ b/service/sagemaker/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/sagemaker/api_op_AddAssociation.go b/service/sagemaker/api_op_AddAssociation.go index 795487e7834..16822a4af0d 100644 --- a/service/sagemaker/api_op_AddAssociation.go +++ b/service/sagemaker/api_op_AddAssociation.go @@ -137,6 +137,9 @@ func (c *Client) addOperationAddAssociationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_AddTags.go b/service/sagemaker/api_op_AddTags.go index e7e3595357e..486ae2520ee 100644 --- a/service/sagemaker/api_op_AddTags.go +++ b/service/sagemaker/api_op_AddTags.go @@ -142,6 +142,9 @@ func (c *Client) addOperationAddTagsMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_AssociateTrialComponent.go b/service/sagemaker/api_op_AssociateTrialComponent.go index ca731f5aca8..dc0652c9631 100644 --- a/service/sagemaker/api_op_AssociateTrialComponent.go +++ b/service/sagemaker/api_op_AssociateTrialComponent.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateTrialComponentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTrialComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_BatchDescribeModelPackage.go b/service/sagemaker/api_op_BatchDescribeModelPackage.go index 482b60e83d8..a43b91f4e37 100644 --- a/service/sagemaker/api_op_BatchDescribeModelPackage.go +++ b/service/sagemaker/api_op_BatchDescribeModelPackage.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchDescribeModelPackageMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDescribeModelPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateAction.go b/service/sagemaker/api_op_CreateAction.go index 4fcacd73f6f..ac1d09b4964 100644 --- a/service/sagemaker/api_op_CreateAction.go +++ b/service/sagemaker/api_op_CreateAction.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateActionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateAlgorithm.go b/service/sagemaker/api_op_CreateAlgorithm.go index ba6ea123238..5bdc4325a19 100644 --- a/service/sagemaker/api_op_CreateAlgorithm.go +++ b/service/sagemaker/api_op_CreateAlgorithm.go @@ -164,6 +164,9 @@ func (c *Client) addOperationCreateAlgorithmMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAlgorithmValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateApp.go b/service/sagemaker/api_op_CreateApp.go index abb92ddb39f..beab419b706 100644 --- a/service/sagemaker/api_op_CreateApp.go +++ b/service/sagemaker/api_op_CreateApp.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateAppImageConfig.go b/service/sagemaker/api_op_CreateAppImageConfig.go index 14307bb30b1..b86c5a2b942 100644 --- a/service/sagemaker/api_op_CreateAppImageConfig.go +++ b/service/sagemaker/api_op_CreateAppImageConfig.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateAppImageConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAppImageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateArtifact.go b/service/sagemaker/api_op_CreateArtifact.go index 3e87585c3e2..c0fe7c8cf9c 100644 --- a/service/sagemaker/api_op_CreateArtifact.go +++ b/service/sagemaker/api_op_CreateArtifact.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateArtifactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateAutoMLJob.go b/service/sagemaker/api_op_CreateAutoMLJob.go index bdb6cb76ec7..271404212f5 100644 --- a/service/sagemaker/api_op_CreateAutoMLJob.go +++ b/service/sagemaker/api_op_CreateAutoMLJob.go @@ -179,6 +179,9 @@ func (c *Client) addOperationCreateAutoMLJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAutoMLJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateAutoMLJobV2.go b/service/sagemaker/api_op_CreateAutoMLJobV2.go index e061f2703e0..8b93e9b646d 100644 --- a/service/sagemaker/api_op_CreateAutoMLJobV2.go +++ b/service/sagemaker/api_op_CreateAutoMLJobV2.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateAutoMLJobV2Middlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAutoMLJobV2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateCluster.go b/service/sagemaker/api_op_CreateCluster.go index c61ac5393a2..23b5bf5cdfa 100644 --- a/service/sagemaker/api_op_CreateCluster.go +++ b/service/sagemaker/api_op_CreateCluster.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateCodeRepository.go b/service/sagemaker/api_op_CreateCodeRepository.go index cdb20a39251..fbc29c3efe8 100644 --- a/service/sagemaker/api_op_CreateCodeRepository.go +++ b/service/sagemaker/api_op_CreateCodeRepository.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateCodeRepositoryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCodeRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateCompilationJob.go b/service/sagemaker/api_op_CreateCompilationJob.go index a4ec2d9035f..499cb3c32d9 100644 --- a/service/sagemaker/api_op_CreateCompilationJob.go +++ b/service/sagemaker/api_op_CreateCompilationJob.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCreateCompilationJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCompilationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateContext.go b/service/sagemaker/api_op_CreateContext.go index 6c7351de2a8..33ae622360a 100644 --- a/service/sagemaker/api_op_CreateContext.go +++ b/service/sagemaker/api_op_CreateContext.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateContextMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContextValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateDataQualityJobDefinition.go b/service/sagemaker/api_op_CreateDataQualityJobDefinition.go index 2f462afa4bd..8044b6939cf 100644 --- a/service/sagemaker/api_op_CreateDataQualityJobDefinition.go +++ b/service/sagemaker/api_op_CreateDataQualityJobDefinition.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateDataQualityJobDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataQualityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateDeviceFleet.go b/service/sagemaker/api_op_CreateDeviceFleet.go index ca84e27588d..93448149ebc 100644 --- a/service/sagemaker/api_op_CreateDeviceFleet.go +++ b/service/sagemaker/api_op_CreateDeviceFleet.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateDeviceFleetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeviceFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateDomain.go b/service/sagemaker/api_op_CreateDomain.go index 3374d263a6c..fd292932cd7 100644 --- a/service/sagemaker/api_op_CreateDomain.go +++ b/service/sagemaker/api_op_CreateDomain.go @@ -219,6 +219,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateEdgeDeploymentPlan.go b/service/sagemaker/api_op_CreateEdgeDeploymentPlan.go index f474716f3c5..2cd21a3f7dc 100644 --- a/service/sagemaker/api_op_CreateEdgeDeploymentPlan.go +++ b/service/sagemaker/api_op_CreateEdgeDeploymentPlan.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateEdgeDeploymentPlanMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEdgeDeploymentPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateEdgeDeploymentStage.go b/service/sagemaker/api_op_CreateEdgeDeploymentStage.go index e857c69adea..230a7d862a2 100644 --- a/service/sagemaker/api_op_CreateEdgeDeploymentStage.go +++ b/service/sagemaker/api_op_CreateEdgeDeploymentStage.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCreateEdgeDeploymentStageMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEdgeDeploymentStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateEdgePackagingJob.go b/service/sagemaker/api_op_CreateEdgePackagingJob.go index c70353c2b16..5a875e3e4cb 100644 --- a/service/sagemaker/api_op_CreateEdgePackagingJob.go +++ b/service/sagemaker/api_op_CreateEdgePackagingJob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateEdgePackagingJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEdgePackagingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateEndpoint.go b/service/sagemaker/api_op_CreateEndpoint.go index 463a0e6f8dd..5649d45d00e 100644 --- a/service/sagemaker/api_op_CreateEndpoint.go +++ b/service/sagemaker/api_op_CreateEndpoint.go @@ -200,6 +200,9 @@ func (c *Client) addOperationCreateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateEndpointConfig.go b/service/sagemaker/api_op_CreateEndpointConfig.go index f7be7c0bef2..e17255685eb 100644 --- a/service/sagemaker/api_op_CreateEndpointConfig.go +++ b/service/sagemaker/api_op_CreateEndpointConfig.go @@ -231,6 +231,9 @@ func (c *Client) addOperationCreateEndpointConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEndpointConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateExperiment.go b/service/sagemaker/api_op_CreateExperiment.go index fdbcbb8b2b6..668c9ef430b 100644 --- a/service/sagemaker/api_op_CreateExperiment.go +++ b/service/sagemaker/api_op_CreateExperiment.go @@ -153,6 +153,9 @@ func (c *Client) addOperationCreateExperimentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateFeatureGroup.go b/service/sagemaker/api_op_CreateFeatureGroup.go index 9dd72f19fe5..31fa3543164 100644 --- a/service/sagemaker/api_op_CreateFeatureGroup.go +++ b/service/sagemaker/api_op_CreateFeatureGroup.go @@ -238,6 +238,9 @@ func (c *Client) addOperationCreateFeatureGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFeatureGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateFlowDefinition.go b/service/sagemaker/api_op_CreateFlowDefinition.go index 9eb254af668..8df6a36185c 100644 --- a/service/sagemaker/api_op_CreateFlowDefinition.go +++ b/service/sagemaker/api_op_CreateFlowDefinition.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateFlowDefinitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFlowDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateHub.go b/service/sagemaker/api_op_CreateHub.go index fbb653c6b7d..8e1c9caf7e1 100644 --- a/service/sagemaker/api_op_CreateHub.go +++ b/service/sagemaker/api_op_CreateHub.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateHubMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHubValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateHumanTaskUi.go b/service/sagemaker/api_op_CreateHumanTaskUi.go index 52e4dff45a4..12ba98b6dad 100644 --- a/service/sagemaker/api_op_CreateHumanTaskUi.go +++ b/service/sagemaker/api_op_CreateHumanTaskUi.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateHumanTaskUiMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHumanTaskUiValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateHyperParameterTuningJob.go b/service/sagemaker/api_op_CreateHyperParameterTuningJob.go index bba54c5fb89..84b7d2d2ac0 100644 --- a/service/sagemaker/api_op_CreateHyperParameterTuningJob.go +++ b/service/sagemaker/api_op_CreateHyperParameterTuningJob.go @@ -213,6 +213,9 @@ func (c *Client) addOperationCreateHyperParameterTuningJobMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateHyperParameterTuningJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateImage.go b/service/sagemaker/api_op_CreateImage.go index dee9362fbd7..eeca289b1b1 100644 --- a/service/sagemaker/api_op_CreateImage.go +++ b/service/sagemaker/api_op_CreateImage.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateImageVersion.go b/service/sagemaker/api_op_CreateImageVersion.go index 6bb27cdf003..6837364e5da 100644 --- a/service/sagemaker/api_op_CreateImageVersion.go +++ b/service/sagemaker/api_op_CreateImageVersion.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateImageVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateImageVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateInferenceComponent.go b/service/sagemaker/api_op_CreateInferenceComponent.go index 756f892d064..d5eaf9c93d6 100644 --- a/service/sagemaker/api_op_CreateInferenceComponent.go +++ b/service/sagemaker/api_op_CreateInferenceComponent.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateInferenceComponentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInferenceComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateInferenceExperiment.go b/service/sagemaker/api_op_CreateInferenceExperiment.go index 7caa0a1ab01..c2c3b415271 100644 --- a/service/sagemaker/api_op_CreateInferenceExperiment.go +++ b/service/sagemaker/api_op_CreateInferenceExperiment.go @@ -225,6 +225,9 @@ func (c *Client) addOperationCreateInferenceExperimentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInferenceExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateInferenceRecommendationsJob.go b/service/sagemaker/api_op_CreateInferenceRecommendationsJob.go index 2c67b889120..f9e3c45e6f7 100644 --- a/service/sagemaker/api_op_CreateInferenceRecommendationsJob.go +++ b/service/sagemaker/api_op_CreateInferenceRecommendationsJob.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateInferenceRecommendationsJobMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInferenceRecommendationsJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateLabelingJob.go b/service/sagemaker/api_op_CreateLabelingJob.go index e8c4d2b437f..60c320cffb3 100644 --- a/service/sagemaker/api_op_CreateLabelingJob.go +++ b/service/sagemaker/api_op_CreateLabelingJob.go @@ -302,6 +302,9 @@ func (c *Client) addOperationCreateLabelingJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLabelingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModel.go b/service/sagemaker/api_op_CreateModel.go index 039ae3cd87c..5efa3a95aaf 100644 --- a/service/sagemaker/api_op_CreateModel.go +++ b/service/sagemaker/api_op_CreateModel.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelBiasJobDefinition.go b/service/sagemaker/api_op_CreateModelBiasJobDefinition.go index 8d9721757be..8e41ca6db56 100644 --- a/service/sagemaker/api_op_CreateModelBiasJobDefinition.go +++ b/service/sagemaker/api_op_CreateModelBiasJobDefinition.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateModelBiasJobDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelBiasJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelCard.go b/service/sagemaker/api_op_CreateModelCard.go index 930fad905a0..6cebc754e2a 100644 --- a/service/sagemaker/api_op_CreateModelCard.go +++ b/service/sagemaker/api_op_CreateModelCard.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateModelCardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelCardValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelCardExportJob.go b/service/sagemaker/api_op_CreateModelCardExportJob.go index d593394be07..880d27f9d02 100644 --- a/service/sagemaker/api_op_CreateModelCardExportJob.go +++ b/service/sagemaker/api_op_CreateModelCardExportJob.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateModelCardExportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelCardExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelExplainabilityJobDefinition.go b/service/sagemaker/api_op_CreateModelExplainabilityJobDefinition.go index 74ea07b3ed2..8c5913ae3d8 100644 --- a/service/sagemaker/api_op_CreateModelExplainabilityJobDefinition.go +++ b/service/sagemaker/api_op_CreateModelExplainabilityJobDefinition.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateModelExplainabilityJobDefinitionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelExplainabilityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelPackage.go b/service/sagemaker/api_op_CreateModelPackage.go index ca736e476fd..13da4ed0d88 100644 --- a/service/sagemaker/api_op_CreateModelPackage.go +++ b/service/sagemaker/api_op_CreateModelPackage.go @@ -252,6 +252,9 @@ func (c *Client) addOperationCreateModelPackageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateModelPackageMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelPackageGroup.go b/service/sagemaker/api_op_CreateModelPackageGroup.go index 9827d78cbf4..1099b5c0810 100644 --- a/service/sagemaker/api_op_CreateModelPackageGroup.go +++ b/service/sagemaker/api_op_CreateModelPackageGroup.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateModelPackageGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelPackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateModelQualityJobDefinition.go b/service/sagemaker/api_op_CreateModelQualityJobDefinition.go index f6b079160f7..84979d27239 100644 --- a/service/sagemaker/api_op_CreateModelQualityJobDefinition.go +++ b/service/sagemaker/api_op_CreateModelQualityJobDefinition.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateModelQualityJobDefinitionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateModelQualityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateMonitoringSchedule.go b/service/sagemaker/api_op_CreateMonitoringSchedule.go index 98787c85b4f..247b8d24a21 100644 --- a/service/sagemaker/api_op_CreateMonitoringSchedule.go +++ b/service/sagemaker/api_op_CreateMonitoringSchedule.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateMonitoringScheduleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMonitoringScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateNotebookInstance.go b/service/sagemaker/api_op_CreateNotebookInstance.go index 6ff2b7bcd90..35954ba433a 100644 --- a/service/sagemaker/api_op_CreateNotebookInstance.go +++ b/service/sagemaker/api_op_CreateNotebookInstance.go @@ -249,6 +249,9 @@ func (c *Client) addOperationCreateNotebookInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNotebookInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateNotebookInstanceLifecycleConfig.go b/service/sagemaker/api_op_CreateNotebookInstanceLifecycleConfig.go index b50e4447a6c..bcf662deef6 100644 --- a/service/sagemaker/api_op_CreateNotebookInstanceLifecycleConfig.go +++ b/service/sagemaker/api_op_CreateNotebookInstanceLifecycleConfig.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateNotebookInstanceLifecycleConfigMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNotebookInstanceLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreatePipeline.go b/service/sagemaker/api_op_CreatePipeline.go index 56c71e3fef9..71a5b2a1282 100644 --- a/service/sagemaker/api_op_CreatePipeline.go +++ b/service/sagemaker/api_op_CreatePipeline.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_CreatePresignedDomainUrl.go b/service/sagemaker/api_op_CreatePresignedDomainUrl.go index 97c8ad773ed..62ce805e703 100644 --- a/service/sagemaker/api_op_CreatePresignedDomainUrl.go +++ b/service/sagemaker/api_op_CreatePresignedDomainUrl.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreatePresignedDomainUrlMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePresignedDomainUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreatePresignedNotebookInstanceUrl.go b/service/sagemaker/api_op_CreatePresignedNotebookInstanceUrl.go index 832b511db4e..bcd7d803334 100644 --- a/service/sagemaker/api_op_CreatePresignedNotebookInstanceUrl.go +++ b/service/sagemaker/api_op_CreatePresignedNotebookInstanceUrl.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreatePresignedNotebookInstanceUrlMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePresignedNotebookInstanceUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateProcessingJob.go b/service/sagemaker/api_op_CreateProcessingJob.go index 41d4d8cdcdc..f8f22636116 100644 --- a/service/sagemaker/api_op_CreateProcessingJob.go +++ b/service/sagemaker/api_op_CreateProcessingJob.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateProcessingJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProcessingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateProject.go b/service/sagemaker/api_op_CreateProject.go index 06404b58e7e..f066e30fee3 100644 --- a/service/sagemaker/api_op_CreateProject.go +++ b/service/sagemaker/api_op_CreateProject.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateSpace.go b/service/sagemaker/api_op_CreateSpace.go index 3aa9a6da778..847bc7b903c 100644 --- a/service/sagemaker/api_op_CreateSpace.go +++ b/service/sagemaker/api_op_CreateSpace.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateStudioLifecycleConfig.go b/service/sagemaker/api_op_CreateStudioLifecycleConfig.go index ce187151057..91ab8088b73 100644 --- a/service/sagemaker/api_op_CreateStudioLifecycleConfig.go +++ b/service/sagemaker/api_op_CreateStudioLifecycleConfig.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateStudioLifecycleConfigMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStudioLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateTrainingJob.go b/service/sagemaker/api_op_CreateTrainingJob.go index 75df9b3ef99..d3a02ba783f 100644 --- a/service/sagemaker/api_op_CreateTrainingJob.go +++ b/service/sagemaker/api_op_CreateTrainingJob.go @@ -366,6 +366,9 @@ func (c *Client) addOperationCreateTrainingJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrainingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateTransformJob.go b/service/sagemaker/api_op_CreateTransformJob.go index 5e0044e6b47..f511f758b6b 100644 --- a/service/sagemaker/api_op_CreateTransformJob.go +++ b/service/sagemaker/api_op_CreateTransformJob.go @@ -241,6 +241,9 @@ func (c *Client) addOperationCreateTransformJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTransformJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateTrial.go b/service/sagemaker/api_op_CreateTrial.go index c1b4a2bbb53..a37a6ae1261 100644 --- a/service/sagemaker/api_op_CreateTrial.go +++ b/service/sagemaker/api_op_CreateTrial.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateTrialMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrialValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateTrialComponent.go b/service/sagemaker/api_op_CreateTrialComponent.go index 03478a15b27..6db176c9ee0 100644 --- a/service/sagemaker/api_op_CreateTrialComponent.go +++ b/service/sagemaker/api_op_CreateTrialComponent.go @@ -162,6 +162,9 @@ func (c *Client) addOperationCreateTrialComponentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTrialComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateUserProfile.go b/service/sagemaker/api_op_CreateUserProfile.go index d51f5d8eaa8..ed3f5008000 100644 --- a/service/sagemaker/api_op_CreateUserProfile.go +++ b/service/sagemaker/api_op_CreateUserProfile.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateWorkforce.go b/service/sagemaker/api_op_CreateWorkforce.go index 091c484af47..ebf97788a65 100644 --- a/service/sagemaker/api_op_CreateWorkforce.go +++ b/service/sagemaker/api_op_CreateWorkforce.go @@ -158,6 +158,9 @@ func (c *Client) addOperationCreateWorkforceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkforceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_CreateWorkteam.go b/service/sagemaker/api_op_CreateWorkteam.go index c7e8af0a090..45a42de2e3e 100644 --- a/service/sagemaker/api_op_CreateWorkteam.go +++ b/service/sagemaker/api_op_CreateWorkteam.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateWorkteamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkteamValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteAction.go b/service/sagemaker/api_op_DeleteAction.go index 000d44f3d48..2acec72ca8b 100644 --- a/service/sagemaker/api_op_DeleteAction.go +++ b/service/sagemaker/api_op_DeleteAction.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteActionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteAlgorithm.go b/service/sagemaker/api_op_DeleteAlgorithm.go index e6e811f445f..cf24c000a61 100644 --- a/service/sagemaker/api_op_DeleteAlgorithm.go +++ b/service/sagemaker/api_op_DeleteAlgorithm.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAlgorithmMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAlgorithmValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteApp.go b/service/sagemaker/api_op_DeleteApp.go index 94818940317..53de94a0d86 100644 --- a/service/sagemaker/api_op_DeleteApp.go +++ b/service/sagemaker/api_op_DeleteApp.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteAppImageConfig.go b/service/sagemaker/api_op_DeleteAppImageConfig.go index 1532a28a797..7454c925026 100644 --- a/service/sagemaker/api_op_DeleteAppImageConfig.go +++ b/service/sagemaker/api_op_DeleteAppImageConfig.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppImageConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppImageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteArtifact.go b/service/sagemaker/api_op_DeleteArtifact.go index 15587781967..27fa67bb1fd 100644 --- a/service/sagemaker/api_op_DeleteArtifact.go +++ b/service/sagemaker/api_op_DeleteArtifact.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteArtifactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteAssociation.go b/service/sagemaker/api_op_DeleteAssociation.go index 84c7d2efb7c..a9978f05ab6 100644 --- a/service/sagemaker/api_op_DeleteAssociation.go +++ b/service/sagemaker/api_op_DeleteAssociation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteCluster.go b/service/sagemaker/api_op_DeleteCluster.go index 86814becc1a..8d215af3820 100644 --- a/service/sagemaker/api_op_DeleteCluster.go +++ b/service/sagemaker/api_op_DeleteCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteCodeRepository.go b/service/sagemaker/api_op_DeleteCodeRepository.go index c6416687412..db4fd3a83d0 100644 --- a/service/sagemaker/api_op_DeleteCodeRepository.go +++ b/service/sagemaker/api_op_DeleteCodeRepository.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCodeRepositoryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCodeRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteCompilationJob.go b/service/sagemaker/api_op_DeleteCompilationJob.go index e66b5bb7ad3..3f7970478b5 100644 --- a/service/sagemaker/api_op_DeleteCompilationJob.go +++ b/service/sagemaker/api_op_DeleteCompilationJob.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteCompilationJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCompilationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteContext.go b/service/sagemaker/api_op_DeleteContext.go index fbea5f95e25..ecfbc774e80 100644 --- a/service/sagemaker/api_op_DeleteContext.go +++ b/service/sagemaker/api_op_DeleteContext.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteContextMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContextValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteDataQualityJobDefinition.go b/service/sagemaker/api_op_DeleteDataQualityJobDefinition.go index 0e0481aca5c..25edc87f546 100644 --- a/service/sagemaker/api_op_DeleteDataQualityJobDefinition.go +++ b/service/sagemaker/api_op_DeleteDataQualityJobDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDataQualityJobDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataQualityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteDeviceFleet.go b/service/sagemaker/api_op_DeleteDeviceFleet.go index 34674b34a0e..3ee4d8b711f 100644 --- a/service/sagemaker/api_op_DeleteDeviceFleet.go +++ b/service/sagemaker/api_op_DeleteDeviceFleet.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDeviceFleetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDeviceFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteDomain.go b/service/sagemaker/api_op_DeleteDomain.go index 9c3eb7e65a6..2e8622562e1 100644 --- a/service/sagemaker/api_op_DeleteDomain.go +++ b/service/sagemaker/api_op_DeleteDomain.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteEdgeDeploymentPlan.go b/service/sagemaker/api_op_DeleteEdgeDeploymentPlan.go index cacce60df55..ba71984b68b 100644 --- a/service/sagemaker/api_op_DeleteEdgeDeploymentPlan.go +++ b/service/sagemaker/api_op_DeleteEdgeDeploymentPlan.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteEdgeDeploymentPlanMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEdgeDeploymentPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteEdgeDeploymentStage.go b/service/sagemaker/api_op_DeleteEdgeDeploymentStage.go index af3f2bd302a..69d5860dec3 100644 --- a/service/sagemaker/api_op_DeleteEdgeDeploymentStage.go +++ b/service/sagemaker/api_op_DeleteEdgeDeploymentStage.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteEdgeDeploymentStageMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEdgeDeploymentStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteEndpoint.go b/service/sagemaker/api_op_DeleteEndpoint.go index fd36f4f7cda..a624503c433 100644 --- a/service/sagemaker/api_op_DeleteEndpoint.go +++ b/service/sagemaker/api_op_DeleteEndpoint.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteEndpointConfig.go b/service/sagemaker/api_op_DeleteEndpointConfig.go index f9fe997d70f..c8d798b9acb 100644 --- a/service/sagemaker/api_op_DeleteEndpointConfig.go +++ b/service/sagemaker/api_op_DeleteEndpointConfig.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteEndpointConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteExperiment.go b/service/sagemaker/api_op_DeleteExperiment.go index 94c2ccd5e31..5130ac07eaf 100644 --- a/service/sagemaker/api_op_DeleteExperiment.go +++ b/service/sagemaker/api_op_DeleteExperiment.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteExperimentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteFeatureGroup.go b/service/sagemaker/api_op_DeleteFeatureGroup.go index 7c80b5fda54..884b768effa 100644 --- a/service/sagemaker/api_op_DeleteFeatureGroup.go +++ b/service/sagemaker/api_op_DeleteFeatureGroup.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteFeatureGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFeatureGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteFlowDefinition.go b/service/sagemaker/api_op_DeleteFlowDefinition.go index 40a3bdba93f..2ad0bef8ef7 100644 --- a/service/sagemaker/api_op_DeleteFlowDefinition.go +++ b/service/sagemaker/api_op_DeleteFlowDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteFlowDefinitionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFlowDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteHub.go b/service/sagemaker/api_op_DeleteHub.go index d375639ce7b..c1a93691198 100644 --- a/service/sagemaker/api_op_DeleteHub.go +++ b/service/sagemaker/api_op_DeleteHub.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteHubMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHubValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteHubContent.go b/service/sagemaker/api_op_DeleteHubContent.go index 07517999323..46c8f65c125 100644 --- a/service/sagemaker/api_op_DeleteHubContent.go +++ b/service/sagemaker/api_op_DeleteHubContent.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteHubContentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHubContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteHumanTaskUi.go b/service/sagemaker/api_op_DeleteHumanTaskUi.go index 977d3fb4205..0ea5a1d07c0 100644 --- a/service/sagemaker/api_op_DeleteHumanTaskUi.go +++ b/service/sagemaker/api_op_DeleteHumanTaskUi.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteHumanTaskUiMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHumanTaskUiValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteHyperParameterTuningJob.go b/service/sagemaker/api_op_DeleteHyperParameterTuningJob.go index b0e1edc0914..b595333af5b 100644 --- a/service/sagemaker/api_op_DeleteHyperParameterTuningJob.go +++ b/service/sagemaker/api_op_DeleteHyperParameterTuningJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteHyperParameterTuningJobMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHyperParameterTuningJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteImage.go b/service/sagemaker/api_op_DeleteImage.go index eb9579efc41..11fa61e0e8c 100644 --- a/service/sagemaker/api_op_DeleteImage.go +++ b/service/sagemaker/api_op_DeleteImage.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteImageVersion.go b/service/sagemaker/api_op_DeleteImageVersion.go index 7b67572d567..cee2a2d0829 100644 --- a/service/sagemaker/api_op_DeleteImageVersion.go +++ b/service/sagemaker/api_op_DeleteImageVersion.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteImageVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteInferenceComponent.go b/service/sagemaker/api_op_DeleteInferenceComponent.go index 09d4fd817ec..a34f5b8e905 100644 --- a/service/sagemaker/api_op_DeleteInferenceComponent.go +++ b/service/sagemaker/api_op_DeleteInferenceComponent.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteInferenceComponentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInferenceComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteInferenceExperiment.go b/service/sagemaker/api_op_DeleteInferenceExperiment.go index b76223d0d67..90131081c63 100644 --- a/service/sagemaker/api_op_DeleteInferenceExperiment.go +++ b/service/sagemaker/api_op_DeleteInferenceExperiment.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteInferenceExperimentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInferenceExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModel.go b/service/sagemaker/api_op_DeleteModel.go index 4479c728c21..8b6765e9a99 100644 --- a/service/sagemaker/api_op_DeleteModel.go +++ b/service/sagemaker/api_op_DeleteModel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteModelMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelBiasJobDefinition.go b/service/sagemaker/api_op_DeleteModelBiasJobDefinition.go index cd2c8079c85..2df1217f5e6 100644 --- a/service/sagemaker/api_op_DeleteModelBiasJobDefinition.go +++ b/service/sagemaker/api_op_DeleteModelBiasJobDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteModelBiasJobDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelBiasJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelCard.go b/service/sagemaker/api_op_DeleteModelCard.go index 29edbb2698c..d5213b638d5 100644 --- a/service/sagemaker/api_op_DeleteModelCard.go +++ b/service/sagemaker/api_op_DeleteModelCard.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteModelCardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelCardValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelExplainabilityJobDefinition.go b/service/sagemaker/api_op_DeleteModelExplainabilityJobDefinition.go index 2ad82247628..f04b330caf9 100644 --- a/service/sagemaker/api_op_DeleteModelExplainabilityJobDefinition.go +++ b/service/sagemaker/api_op_DeleteModelExplainabilityJobDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteModelExplainabilityJobDefinitionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelExplainabilityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelPackage.go b/service/sagemaker/api_op_DeleteModelPackage.go index 0cda183dd49..20c95fb01dd 100644 --- a/service/sagemaker/api_op_DeleteModelPackage.go +++ b/service/sagemaker/api_op_DeleteModelPackage.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteModelPackageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelPackageGroup.go b/service/sagemaker/api_op_DeleteModelPackageGroup.go index f93d93dff56..17f090813e5 100644 --- a/service/sagemaker/api_op_DeleteModelPackageGroup.go +++ b/service/sagemaker/api_op_DeleteModelPackageGroup.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteModelPackageGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelPackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelPackageGroupPolicy.go b/service/sagemaker/api_op_DeleteModelPackageGroupPolicy.go index 12ac3463f43..11f1da1730e 100644 --- a/service/sagemaker/api_op_DeleteModelPackageGroupPolicy.go +++ b/service/sagemaker/api_op_DeleteModelPackageGroupPolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteModelPackageGroupPolicyMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelPackageGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteModelQualityJobDefinition.go b/service/sagemaker/api_op_DeleteModelQualityJobDefinition.go index 23b5f757fb9..4e12a9ebfab 100644 --- a/service/sagemaker/api_op_DeleteModelQualityJobDefinition.go +++ b/service/sagemaker/api_op_DeleteModelQualityJobDefinition.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteModelQualityJobDefinitionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteModelQualityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteMonitoringSchedule.go b/service/sagemaker/api_op_DeleteMonitoringSchedule.go index c9f4ca735b7..06d3e6a067b 100644 --- a/service/sagemaker/api_op_DeleteMonitoringSchedule.go +++ b/service/sagemaker/api_op_DeleteMonitoringSchedule.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteMonitoringScheduleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMonitoringScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteNotebookInstance.go b/service/sagemaker/api_op_DeleteNotebookInstance.go index f916735bf1e..e5ed3971880 100644 --- a/service/sagemaker/api_op_DeleteNotebookInstance.go +++ b/service/sagemaker/api_op_DeleteNotebookInstance.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteNotebookInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotebookInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteNotebookInstanceLifecycleConfig.go b/service/sagemaker/api_op_DeleteNotebookInstanceLifecycleConfig.go index afb4465c107..bf36990c32e 100644 --- a/service/sagemaker/api_op_DeleteNotebookInstanceLifecycleConfig.go +++ b/service/sagemaker/api_op_DeleteNotebookInstanceLifecycleConfig.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteNotebookInstanceLifecycleConfigMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotebookInstanceLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeletePipeline.go b/service/sagemaker/api_op_DeletePipeline.go index cb09c2138ed..caad399f4aa 100644 --- a/service/sagemaker/api_op_DeletePipeline.go +++ b/service/sagemaker/api_op_DeletePipeline.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeletePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeletePipelineMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteProject.go b/service/sagemaker/api_op_DeleteProject.go index b1f84fe29ae..477dc329312 100644 --- a/service/sagemaker/api_op_DeleteProject.go +++ b/service/sagemaker/api_op_DeleteProject.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteSpace.go b/service/sagemaker/api_op_DeleteSpace.go index c600c00b942..c00a5d905fc 100644 --- a/service/sagemaker/api_op_DeleteSpace.go +++ b/service/sagemaker/api_op_DeleteSpace.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteStudioLifecycleConfig.go b/service/sagemaker/api_op_DeleteStudioLifecycleConfig.go index 883864ed67b..0df98c59acd 100644 --- a/service/sagemaker/api_op_DeleteStudioLifecycleConfig.go +++ b/service/sagemaker/api_op_DeleteStudioLifecycleConfig.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteStudioLifecycleConfigMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStudioLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteTags.go b/service/sagemaker/api_op_DeleteTags.go index 7eb480b7232..cfc377d9bab 100644 --- a/service/sagemaker/api_op_DeleteTags.go +++ b/service/sagemaker/api_op_DeleteTags.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteTrial.go b/service/sagemaker/api_op_DeleteTrial.go index ea1a1043cac..3fb06f1e29a 100644 --- a/service/sagemaker/api_op_DeleteTrial.go +++ b/service/sagemaker/api_op_DeleteTrial.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteTrialMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrialValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteTrialComponent.go b/service/sagemaker/api_op_DeleteTrialComponent.go index 45991dcebaf..ca946e073d2 100644 --- a/service/sagemaker/api_op_DeleteTrialComponent.go +++ b/service/sagemaker/api_op_DeleteTrialComponent.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteTrialComponentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrialComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteUserProfile.go b/service/sagemaker/api_op_DeleteUserProfile.go index bf0d9416b9c..c2f054945c1 100644 --- a/service/sagemaker/api_op_DeleteUserProfile.go +++ b/service/sagemaker/api_op_DeleteUserProfile.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteWorkforce.go b/service/sagemaker/api_op_DeleteWorkforce.go index e6fa8f75d7c..8acb03f3e6b 100644 --- a/service/sagemaker/api_op_DeleteWorkforce.go +++ b/service/sagemaker/api_op_DeleteWorkforce.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteWorkforceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkforceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeleteWorkteam.go b/service/sagemaker/api_op_DeleteWorkteam.go index 5ed3f063fe5..0f8909526bf 100644 --- a/service/sagemaker/api_op_DeleteWorkteam.go +++ b/service/sagemaker/api_op_DeleteWorkteam.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteWorkteamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkteamValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DeregisterDevices.go b/service/sagemaker/api_op_DeregisterDevices.go index 943e36c6706..702f6d8ad4f 100644 --- a/service/sagemaker/api_op_DeregisterDevices.go +++ b/service/sagemaker/api_op_DeregisterDevices.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeregisterDevicesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterDevicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeAction.go b/service/sagemaker/api_op_DescribeAction.go index 25d3e455d21..f8d7113d643 100644 --- a/service/sagemaker/api_op_DescribeAction.go +++ b/service/sagemaker/api_op_DescribeAction.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeActionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeAlgorithm.go b/service/sagemaker/api_op_DescribeAlgorithm.go index ceb612a176b..b3bab91b185 100644 --- a/service/sagemaker/api_op_DescribeAlgorithm.go +++ b/service/sagemaker/api_op_DescribeAlgorithm.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeAlgorithmMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAlgorithmValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeApp.go b/service/sagemaker/api_op_DescribeApp.go index 16704a2a6d8..a5399d4de4f 100644 --- a/service/sagemaker/api_op_DescribeApp.go +++ b/service/sagemaker/api_op_DescribeApp.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDescribeAppMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeAppImageConfig.go b/service/sagemaker/api_op_DescribeAppImageConfig.go index bfe294ffdce..a86d9e9e916 100644 --- a/service/sagemaker/api_op_DescribeAppImageConfig.go +++ b/service/sagemaker/api_op_DescribeAppImageConfig.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeAppImageConfigMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppImageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeArtifact.go b/service/sagemaker/api_op_DescribeArtifact.go index 6c72e8cc0e3..aacbcdd3aed 100644 --- a/service/sagemaker/api_op_DescribeArtifact.go +++ b/service/sagemaker/api_op_DescribeArtifact.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeArtifactMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeAutoMLJob.go b/service/sagemaker/api_op_DescribeAutoMLJob.go index 6c4e46e9fd0..a8d5aabb064 100644 --- a/service/sagemaker/api_op_DescribeAutoMLJob.go +++ b/service/sagemaker/api_op_DescribeAutoMLJob.go @@ -197,6 +197,9 @@ func (c *Client) addOperationDescribeAutoMLJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAutoMLJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeAutoMLJobV2.go b/service/sagemaker/api_op_DescribeAutoMLJobV2.go index b1e855e38f5..096ce4dad36 100644 --- a/service/sagemaker/api_op_DescribeAutoMLJobV2.go +++ b/service/sagemaker/api_op_DescribeAutoMLJobV2.go @@ -198,6 +198,9 @@ func (c *Client) addOperationDescribeAutoMLJobV2Middlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAutoMLJobV2ValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeCluster.go b/service/sagemaker/api_op_DescribeCluster.go index 07aa9e42173..544be8a1451 100644 --- a/service/sagemaker/api_op_DescribeCluster.go +++ b/service/sagemaker/api_op_DescribeCluster.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeClusterNode.go b/service/sagemaker/api_op_DescribeClusterNode.go index 24cd869797f..80f0f8a7029 100644 --- a/service/sagemaker/api_op_DescribeClusterNode.go +++ b/service/sagemaker/api_op_DescribeClusterNode.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeClusterNodeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterNodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeCodeRepository.go b/service/sagemaker/api_op_DescribeCodeRepository.go index 25dabbf836d..b3ad7091641 100644 --- a/service/sagemaker/api_op_DescribeCodeRepository.go +++ b/service/sagemaker/api_op_DescribeCodeRepository.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeCodeRepositoryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCodeRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeCompilationJob.go b/service/sagemaker/api_op_DescribeCompilationJob.go index fa5689c9dd9..b216cf3256e 100644 --- a/service/sagemaker/api_op_DescribeCompilationJob.go +++ b/service/sagemaker/api_op_DescribeCompilationJob.go @@ -209,6 +209,9 @@ func (c *Client) addOperationDescribeCompilationJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCompilationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeContext.go b/service/sagemaker/api_op_DescribeContext.go index 3305e81d22c..1aa1ca09d8e 100644 --- a/service/sagemaker/api_op_DescribeContext.go +++ b/service/sagemaker/api_op_DescribeContext.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeContextMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeContextValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeDataQualityJobDefinition.go b/service/sagemaker/api_op_DescribeDataQualityJobDefinition.go index 1e9293c5cd2..84893284953 100644 --- a/service/sagemaker/api_op_DescribeDataQualityJobDefinition.go +++ b/service/sagemaker/api_op_DescribeDataQualityJobDefinition.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribeDataQualityJobDefinitionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDataQualityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeDevice.go b/service/sagemaker/api_op_DescribeDevice.go index bcf9db82336..32c36ccf23b 100644 --- a/service/sagemaker/api_op_DescribeDevice.go +++ b/service/sagemaker/api_op_DescribeDevice.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeDeviceFleet.go b/service/sagemaker/api_op_DescribeDeviceFleet.go index fc700b009e5..3e8dbb55049 100644 --- a/service/sagemaker/api_op_DescribeDeviceFleet.go +++ b/service/sagemaker/api_op_DescribeDeviceFleet.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeDeviceFleetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeDomain.go b/service/sagemaker/api_op_DescribeDomain.go index 21fed7dc5ab..b1c6f8074ac 100644 --- a/service/sagemaker/api_op_DescribeDomain.go +++ b/service/sagemaker/api_op_DescribeDomain.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeEdgeDeploymentPlan.go b/service/sagemaker/api_op_DescribeEdgeDeploymentPlan.go index 73402d6ae9d..f04e7a4a0de 100644 --- a/service/sagemaker/api_op_DescribeEdgeDeploymentPlan.go +++ b/service/sagemaker/api_op_DescribeEdgeDeploymentPlan.go @@ -154,6 +154,9 @@ func (c *Client) addOperationDescribeEdgeDeploymentPlanMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEdgeDeploymentPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeEdgePackagingJob.go b/service/sagemaker/api_op_DescribeEdgePackagingJob.go index 8da5324d2c9..a28361a31aa 100644 --- a/service/sagemaker/api_op_DescribeEdgePackagingJob.go +++ b/service/sagemaker/api_op_DescribeEdgePackagingJob.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeEdgePackagingJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEdgePackagingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeEndpoint.go b/service/sagemaker/api_op_DescribeEndpoint.go index ae48e824685..7b81e11c258 100644 --- a/service/sagemaker/api_op_DescribeEndpoint.go +++ b/service/sagemaker/api_op_DescribeEndpoint.go @@ -209,6 +209,9 @@ func (c *Client) addOperationDescribeEndpointMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointValidationMiddleware(stack); err != nil { return err } @@ -233,14 +236,6 @@ func (c *Client) addOperationDescribeEndpointMiddlewares(stack *middleware.Stack return nil } -// DescribeEndpointAPIClient is a client that implements the DescribeEndpoint -// operation. -type DescribeEndpointAPIClient interface { - DescribeEndpoint(context.Context, *DescribeEndpointInput, ...func(*Options)) (*DescribeEndpointOutput, error) -} - -var _ DescribeEndpointAPIClient = (*Client)(nil) - // EndpointDeletedWaiterOptions are waiter options for EndpointDeletedWaiter type EndpointDeletedWaiterOptions struct { @@ -356,7 +351,13 @@ func (w *EndpointDeletedWaiter) WaitForOutput(ctx context.Context, params *Descr } out, err := w.client.DescribeEndpoint(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -541,7 +542,13 @@ func (w *EndpointInServiceWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeEndpoint(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -628,6 +635,14 @@ func endpointInServiceStateRetryable(ctx context.Context, input *DescribeEndpoin return true, nil } +// DescribeEndpointAPIClient is a client that implements the DescribeEndpoint +// operation. +type DescribeEndpointAPIClient interface { + DescribeEndpoint(context.Context, *DescribeEndpointInput, ...func(*Options)) (*DescribeEndpointOutput, error) +} + +var _ DescribeEndpointAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeEndpointConfig.go b/service/sagemaker/api_op_DescribeEndpointConfig.go index 3b2e2a617d7..af1412fbe0e 100644 --- a/service/sagemaker/api_op_DescribeEndpointConfig.go +++ b/service/sagemaker/api_op_DescribeEndpointConfig.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeEndpointConfigMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEndpointConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeExperiment.go b/service/sagemaker/api_op_DescribeExperiment.go index 160b4576d4a..d392cbbb05a 100644 --- a/service/sagemaker/api_op_DescribeExperiment.go +++ b/service/sagemaker/api_op_DescribeExperiment.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeExperimentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeFeatureGroup.go b/service/sagemaker/api_op_DescribeFeatureGroup.go index 2e30fdee95f..dd1df49d251 100644 --- a/service/sagemaker/api_op_DescribeFeatureGroup.go +++ b/service/sagemaker/api_op_DescribeFeatureGroup.go @@ -216,6 +216,9 @@ func (c *Client) addOperationDescribeFeatureGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFeatureGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeFeatureMetadata.go b/service/sagemaker/api_op_DescribeFeatureMetadata.go index 3a53dc0b1ec..aef35e14ce0 100644 --- a/service/sagemaker/api_op_DescribeFeatureMetadata.go +++ b/service/sagemaker/api_op_DescribeFeatureMetadata.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDescribeFeatureMetadataMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFeatureMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeFlowDefinition.go b/service/sagemaker/api_op_DescribeFlowDefinition.go index 0f067d9fbd1..eb4a386ec16 100644 --- a/service/sagemaker/api_op_DescribeFlowDefinition.go +++ b/service/sagemaker/api_op_DescribeFlowDefinition.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeFlowDefinitionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFlowDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeHub.go b/service/sagemaker/api_op_DescribeHub.go index f05f750d16d..cb792cb27ad 100644 --- a/service/sagemaker/api_op_DescribeHub.go +++ b/service/sagemaker/api_op_DescribeHub.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeHubMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHubValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeHubContent.go b/service/sagemaker/api_op_DescribeHubContent.go index d6823bffe4e..68b5976e1e6 100644 --- a/service/sagemaker/api_op_DescribeHubContent.go +++ b/service/sagemaker/api_op_DescribeHubContent.go @@ -190,6 +190,9 @@ func (c *Client) addOperationDescribeHubContentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHubContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeHumanTaskUi.go b/service/sagemaker/api_op_DescribeHumanTaskUi.go index 5a09eb6387e..611f3b8b4aa 100644 --- a/service/sagemaker/api_op_DescribeHumanTaskUi.go +++ b/service/sagemaker/api_op_DescribeHumanTaskUi.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeHumanTaskUiMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHumanTaskUiValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeHyperParameterTuningJob.go b/service/sagemaker/api_op_DescribeHyperParameterTuningJob.go index dfe5415360b..22392f89f98 100644 --- a/service/sagemaker/api_op_DescribeHyperParameterTuningJob.go +++ b/service/sagemaker/api_op_DescribeHyperParameterTuningJob.go @@ -201,6 +201,9 @@ func (c *Client) addOperationDescribeHyperParameterTuningJobMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHyperParameterTuningJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeImage.go b/service/sagemaker/api_op_DescribeImage.go index 08c3305d6e4..e25f73bfc6f 100644 --- a/service/sagemaker/api_op_DescribeImage.go +++ b/service/sagemaker/api_op_DescribeImage.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeImageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageValidationMiddleware(stack); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationDescribeImageMiddlewares(stack *middleware.Stack, o return nil } -// DescribeImageAPIClient is a client that implements the DescribeImage operation. -type DescribeImageAPIClient interface { - DescribeImage(context.Context, *DescribeImageInput, ...func(*Options)) (*DescribeImageOutput, error) -} - -var _ DescribeImageAPIClient = (*Client)(nil) - // ImageCreatedWaiterOptions are waiter options for ImageCreatedWaiter type ImageCreatedWaiterOptions struct { @@ -282,7 +278,13 @@ func (w *ImageCreatedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeImage(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -483,7 +485,13 @@ func (w *ImageDeletedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeImage(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -679,7 +687,13 @@ func (w *ImageUpdatedWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeImage(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -766,6 +780,13 @@ func imageUpdatedStateRetryable(ctx context.Context, input *DescribeImageInput, return true, nil } +// DescribeImageAPIClient is a client that implements the DescribeImage operation. +type DescribeImageAPIClient interface { + DescribeImage(context.Context, *DescribeImageInput, ...func(*Options)) (*DescribeImageOutput, error) +} + +var _ DescribeImageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeImageVersion.go b/service/sagemaker/api_op_DescribeImageVersion.go index 4945a3ade54..fa3f6350bee 100644 --- a/service/sagemaker/api_op_DescribeImageVersion.go +++ b/service/sagemaker/api_op_DescribeImageVersion.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeImageVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageVersionValidationMiddleware(stack); err != nil { return err } @@ -210,14 +213,6 @@ func (c *Client) addOperationDescribeImageVersionMiddlewares(stack *middleware.S return nil } -// DescribeImageVersionAPIClient is a client that implements the -// DescribeImageVersion operation. -type DescribeImageVersionAPIClient interface { - DescribeImageVersion(context.Context, *DescribeImageVersionInput, ...func(*Options)) (*DescribeImageVersionOutput, error) -} - -var _ DescribeImageVersionAPIClient = (*Client)(nil) - // ImageVersionCreatedWaiterOptions are waiter options for // ImageVersionCreatedWaiter type ImageVersionCreatedWaiterOptions struct { @@ -335,7 +330,13 @@ func (w *ImageVersionCreatedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeImageVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -539,7 +540,13 @@ func (w *ImageVersionDeletedWaiter) WaitForOutput(ctx context.Context, params *D } out, err := w.client.DescribeImageVersion(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -621,6 +628,14 @@ func imageVersionDeletedStateRetryable(ctx context.Context, input *DescribeImage return true, nil } +// DescribeImageVersionAPIClient is a client that implements the +// DescribeImageVersion operation. +type DescribeImageVersionAPIClient interface { + DescribeImageVersion(context.Context, *DescribeImageVersionInput, ...func(*Options)) (*DescribeImageVersionOutput, error) +} + +var _ DescribeImageVersionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeImageVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeInferenceComponent.go b/service/sagemaker/api_op_DescribeInferenceComponent.go index c5035162db9..1b1c09ac937 100644 --- a/service/sagemaker/api_op_DescribeInferenceComponent.go +++ b/service/sagemaker/api_op_DescribeInferenceComponent.go @@ -151,6 +151,9 @@ func (c *Client) addOperationDescribeInferenceComponentMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInferenceComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeInferenceExperiment.go b/service/sagemaker/api_op_DescribeInferenceExperiment.go index 9787e201c77..fa49da824ce 100644 --- a/service/sagemaker/api_op_DescribeInferenceExperiment.go +++ b/service/sagemaker/api_op_DescribeInferenceExperiment.go @@ -203,6 +203,9 @@ func (c *Client) addOperationDescribeInferenceExperimentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInferenceExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeInferenceRecommendationsJob.go b/service/sagemaker/api_op_DescribeInferenceRecommendationsJob.go index 2494150e615..8ad723831bc 100644 --- a/service/sagemaker/api_op_DescribeInferenceRecommendationsJob.go +++ b/service/sagemaker/api_op_DescribeInferenceRecommendationsJob.go @@ -169,6 +169,9 @@ func (c *Client) addOperationDescribeInferenceRecommendationsJobMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInferenceRecommendationsJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeLabelingJob.go b/service/sagemaker/api_op_DescribeLabelingJob.go index e21ada06394..34a2c623f0b 100644 --- a/service/sagemaker/api_op_DescribeLabelingJob.go +++ b/service/sagemaker/api_op_DescribeLabelingJob.go @@ -229,6 +229,9 @@ func (c *Client) addOperationDescribeLabelingJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLabelingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeLineageGroup.go b/service/sagemaker/api_op_DescribeLineageGroup.go index 7f40a81745e..c437a0b9aa4 100644 --- a/service/sagemaker/api_op_DescribeLineageGroup.go +++ b/service/sagemaker/api_op_DescribeLineageGroup.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeLineageGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLineageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModel.go b/service/sagemaker/api_op_DescribeModel.go index abcd85e45cf..5779df33924 100644 --- a/service/sagemaker/api_op_DescribeModel.go +++ b/service/sagemaker/api_op_DescribeModel.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeModelMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelBiasJobDefinition.go b/service/sagemaker/api_op_DescribeModelBiasJobDefinition.go index 4064eeb4371..21ebf03f778 100644 --- a/service/sagemaker/api_op_DescribeModelBiasJobDefinition.go +++ b/service/sagemaker/api_op_DescribeModelBiasJobDefinition.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeModelBiasJobDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelBiasJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelCard.go b/service/sagemaker/api_op_DescribeModelCard.go index 83f1d97d0ef..3e823993671 100644 --- a/service/sagemaker/api_op_DescribeModelCard.go +++ b/service/sagemaker/api_op_DescribeModelCard.go @@ -181,6 +181,9 @@ func (c *Client) addOperationDescribeModelCardMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelCardValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelCardExportJob.go b/service/sagemaker/api_op_DescribeModelCardExportJob.go index da26ddfeb57..572aa626869 100644 --- a/service/sagemaker/api_op_DescribeModelCardExportJob.go +++ b/service/sagemaker/api_op_DescribeModelCardExportJob.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDescribeModelCardExportJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelCardExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelExplainabilityJobDefinition.go b/service/sagemaker/api_op_DescribeModelExplainabilityJobDefinition.go index 7b4bbee3e9e..fbfe5a08069 100644 --- a/service/sagemaker/api_op_DescribeModelExplainabilityJobDefinition.go +++ b/service/sagemaker/api_op_DescribeModelExplainabilityJobDefinition.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeModelExplainabilityJobDefinitionMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelExplainabilityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelPackage.go b/service/sagemaker/api_op_DescribeModelPackage.go index 19848e52ca6..fd6a51e546a 100644 --- a/service/sagemaker/api_op_DescribeModelPackage.go +++ b/service/sagemaker/api_op_DescribeModelPackage.go @@ -239,6 +239,9 @@ func (c *Client) addOperationDescribeModelPackageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelPackageGroup.go b/service/sagemaker/api_op_DescribeModelPackageGroup.go index 0c6633b65c8..5c960f83d6b 100644 --- a/service/sagemaker/api_op_DescribeModelPackageGroup.go +++ b/service/sagemaker/api_op_DescribeModelPackageGroup.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeModelPackageGroupMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelPackageGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeModelQualityJobDefinition.go b/service/sagemaker/api_op_DescribeModelQualityJobDefinition.go index 11d645e7c31..2e9cfc18f73 100644 --- a/service/sagemaker/api_op_DescribeModelQualityJobDefinition.go +++ b/service/sagemaker/api_op_DescribeModelQualityJobDefinition.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeModelQualityJobDefinitionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeModelQualityJobDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeMonitoringSchedule.go b/service/sagemaker/api_op_DescribeMonitoringSchedule.go index 204443b8800..a6f80c7375a 100644 --- a/service/sagemaker/api_op_DescribeMonitoringSchedule.go +++ b/service/sagemaker/api_op_DescribeMonitoringSchedule.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeMonitoringScheduleMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMonitoringScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeNotebookInstance.go b/service/sagemaker/api_op_DescribeNotebookInstance.go index 510b20d415a..3daa5fe613b 100644 --- a/service/sagemaker/api_op_DescribeNotebookInstance.go +++ b/service/sagemaker/api_op_DescribeNotebookInstance.go @@ -212,6 +212,9 @@ func (c *Client) addOperationDescribeNotebookInstanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNotebookInstanceValidationMiddleware(stack); err != nil { return err } @@ -236,14 +239,6 @@ func (c *Client) addOperationDescribeNotebookInstanceMiddlewares(stack *middlewa return nil } -// DescribeNotebookInstanceAPIClient is a client that implements the -// DescribeNotebookInstance operation. -type DescribeNotebookInstanceAPIClient interface { - DescribeNotebookInstance(context.Context, *DescribeNotebookInstanceInput, ...func(*Options)) (*DescribeNotebookInstanceOutput, error) -} - -var _ DescribeNotebookInstanceAPIClient = (*Client)(nil) - // NotebookInstanceDeletedWaiterOptions are waiter options for // NotebookInstanceDeletedWaiter type NotebookInstanceDeletedWaiterOptions struct { @@ -361,7 +356,13 @@ func (w *NotebookInstanceDeletedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeNotebookInstance(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -549,7 +550,13 @@ func (w *NotebookInstanceInServiceWaiter) WaitForOutput(ctx context.Context, par } out, err := w.client.DescribeNotebookInstance(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -741,7 +748,13 @@ func (w *NotebookInstanceStoppedWaiter) WaitForOutput(ctx context.Context, param } out, err := w.client.DescribeNotebookInstance(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -816,6 +829,14 @@ func notebookInstanceStoppedStateRetryable(ctx context.Context, input *DescribeN return true, nil } +// DescribeNotebookInstanceAPIClient is a client that implements the +// DescribeNotebookInstance operation. +type DescribeNotebookInstanceAPIClient interface { + DescribeNotebookInstance(context.Context, *DescribeNotebookInstanceInput, ...func(*Options)) (*DescribeNotebookInstanceOutput, error) +} + +var _ DescribeNotebookInstanceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNotebookInstance(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeNotebookInstanceLifecycleConfig.go b/service/sagemaker/api_op_DescribeNotebookInstanceLifecycleConfig.go index 74faf32bffd..bc02040888d 100644 --- a/service/sagemaker/api_op_DescribeNotebookInstanceLifecycleConfig.go +++ b/service/sagemaker/api_op_DescribeNotebookInstanceLifecycleConfig.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeNotebookInstanceLifecycleConfigMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNotebookInstanceLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribePipeline.go b/service/sagemaker/api_op_DescribePipeline.go index 83d3d909b25..ea2324aa9a2 100644 --- a/service/sagemaker/api_op_DescribePipeline.go +++ b/service/sagemaker/api_op_DescribePipeline.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribePipelineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribePipelineDefinitionForExecution.go b/service/sagemaker/api_op_DescribePipelineDefinitionForExecution.go index e2808b9df31..a4a005485fc 100644 --- a/service/sagemaker/api_op_DescribePipelineDefinitionForExecution.go +++ b/service/sagemaker/api_op_DescribePipelineDefinitionForExecution.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribePipelineDefinitionForExecutionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePipelineDefinitionForExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribePipelineExecution.go b/service/sagemaker/api_op_DescribePipelineExecution.go index ccdbe9ae9ae..53acc3a6801 100644 --- a/service/sagemaker/api_op_DescribePipelineExecution.go +++ b/service/sagemaker/api_op_DescribePipelineExecution.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribePipelineExecutionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePipelineExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeProcessingJob.go b/service/sagemaker/api_op_DescribeProcessingJob.go index c6c63f030f2..2703dca50d7 100644 --- a/service/sagemaker/api_op_DescribeProcessingJob.go +++ b/service/sagemaker/api_op_DescribeProcessingJob.go @@ -192,6 +192,9 @@ func (c *Client) addOperationDescribeProcessingJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProcessingJobValidationMiddleware(stack); err != nil { return err } @@ -216,14 +219,6 @@ func (c *Client) addOperationDescribeProcessingJobMiddlewares(stack *middleware. return nil } -// DescribeProcessingJobAPIClient is a client that implements the -// DescribeProcessingJob operation. -type DescribeProcessingJobAPIClient interface { - DescribeProcessingJob(context.Context, *DescribeProcessingJobInput, ...func(*Options)) (*DescribeProcessingJobOutput, error) -} - -var _ DescribeProcessingJobAPIClient = (*Client)(nil) - // ProcessingJobCompletedOrStoppedWaiterOptions are waiter options for // ProcessingJobCompletedOrStoppedWaiter type ProcessingJobCompletedOrStoppedWaiterOptions struct { @@ -344,7 +339,13 @@ func (w *ProcessingJobCompletedOrStoppedWaiter) WaitForOutput(ctx context.Contex } out, err := w.client.DescribeProcessingJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -448,6 +449,14 @@ func processingJobCompletedOrStoppedStateRetryable(ctx context.Context, input *D return true, nil } +// DescribeProcessingJobAPIClient is a client that implements the +// DescribeProcessingJob operation. +type DescribeProcessingJobAPIClient interface { + DescribeProcessingJob(context.Context, *DescribeProcessingJobInput, ...func(*Options)) (*DescribeProcessingJobOutput, error) +} + +var _ DescribeProcessingJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeProcessingJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeProject.go b/service/sagemaker/api_op_DescribeProject.go index f24654b4d5a..e7d43f553cf 100644 --- a/service/sagemaker/api_op_DescribeProject.go +++ b/service/sagemaker/api_op_DescribeProject.go @@ -153,6 +153,9 @@ func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeSpace.go b/service/sagemaker/api_op_DescribeSpace.go index f094f88076d..50bac94e95c 100644 --- a/service/sagemaker/api_op_DescribeSpace.go +++ b/service/sagemaker/api_op_DescribeSpace.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDescribeSpaceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeStudioLifecycleConfig.go b/service/sagemaker/api_op_DescribeStudioLifecycleConfig.go index 3affa2c5aba..655cb7c47ee 100644 --- a/service/sagemaker/api_op_DescribeStudioLifecycleConfig.go +++ b/service/sagemaker/api_op_DescribeStudioLifecycleConfig.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeStudioLifecycleConfigMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStudioLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeSubscribedWorkteam.go b/service/sagemaker/api_op_DescribeSubscribedWorkteam.go index a51247f994e..14c3b867bdb 100644 --- a/service/sagemaker/api_op_DescribeSubscribedWorkteam.go +++ b/service/sagemaker/api_op_DescribeSubscribedWorkteam.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeSubscribedWorkteamMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSubscribedWorkteamValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeTrainingJob.go b/service/sagemaker/api_op_DescribeTrainingJob.go index 7a32cc4a285..7d6c6204651 100644 --- a/service/sagemaker/api_op_DescribeTrainingJob.go +++ b/service/sagemaker/api_op_DescribeTrainingJob.go @@ -403,6 +403,9 @@ func (c *Client) addOperationDescribeTrainingJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrainingJobValidationMiddleware(stack); err != nil { return err } @@ -427,14 +430,6 @@ func (c *Client) addOperationDescribeTrainingJobMiddlewares(stack *middleware.St return nil } -// DescribeTrainingJobAPIClient is a client that implements the -// DescribeTrainingJob operation. -type DescribeTrainingJobAPIClient interface { - DescribeTrainingJob(context.Context, *DescribeTrainingJobInput, ...func(*Options)) (*DescribeTrainingJobOutput, error) -} - -var _ DescribeTrainingJobAPIClient = (*Client)(nil) - // TrainingJobCompletedOrStoppedWaiterOptions are waiter options for // TrainingJobCompletedOrStoppedWaiter type TrainingJobCompletedOrStoppedWaiterOptions struct { @@ -555,7 +550,13 @@ func (w *TrainingJobCompletedOrStoppedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.DescribeTrainingJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -659,6 +660,14 @@ func trainingJobCompletedOrStoppedStateRetryable(ctx context.Context, input *Des return true, nil } +// DescribeTrainingJobAPIClient is a client that implements the +// DescribeTrainingJob operation. +type DescribeTrainingJobAPIClient interface { + DescribeTrainingJob(context.Context, *DescribeTrainingJobInput, ...func(*Options)) (*DescribeTrainingJobOutput, error) +} + +var _ DescribeTrainingJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTrainingJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeTransformJob.go b/service/sagemaker/api_op_DescribeTransformJob.go index 09bf5631e74..7e537109e88 100644 --- a/service/sagemaker/api_op_DescribeTransformJob.go +++ b/service/sagemaker/api_op_DescribeTransformJob.go @@ -225,6 +225,9 @@ func (c *Client) addOperationDescribeTransformJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTransformJobValidationMiddleware(stack); err != nil { return err } @@ -249,14 +252,6 @@ func (c *Client) addOperationDescribeTransformJobMiddlewares(stack *middleware.S return nil } -// DescribeTransformJobAPIClient is a client that implements the -// DescribeTransformJob operation. -type DescribeTransformJobAPIClient interface { - DescribeTransformJob(context.Context, *DescribeTransformJobInput, ...func(*Options)) (*DescribeTransformJobOutput, error) -} - -var _ DescribeTransformJobAPIClient = (*Client)(nil) - // TransformJobCompletedOrStoppedWaiterOptions are waiter options for // TransformJobCompletedOrStoppedWaiter type TransformJobCompletedOrStoppedWaiterOptions struct { @@ -377,7 +372,13 @@ func (w *TransformJobCompletedOrStoppedWaiter) WaitForOutput(ctx context.Context } out, err := w.client.DescribeTransformJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -481,6 +482,14 @@ func transformJobCompletedOrStoppedStateRetryable(ctx context.Context, input *De return true, nil } +// DescribeTransformJobAPIClient is a client that implements the +// DescribeTransformJob operation. +type DescribeTransformJobAPIClient interface { + DescribeTransformJob(context.Context, *DescribeTransformJobInput, ...func(*Options)) (*DescribeTransformJobOutput, error) +} + +var _ DescribeTransformJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTransformJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_DescribeTrial.go b/service/sagemaker/api_op_DescribeTrial.go index e599afec89a..efcfe929204 100644 --- a/service/sagemaker/api_op_DescribeTrial.go +++ b/service/sagemaker/api_op_DescribeTrial.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeTrialMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrialValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeTrialComponent.go b/service/sagemaker/api_op_DescribeTrialComponent.go index a61f8d0e182..c1624078e1e 100644 --- a/service/sagemaker/api_op_DescribeTrialComponent.go +++ b/service/sagemaker/api_op_DescribeTrialComponent.go @@ -166,6 +166,9 @@ func (c *Client) addOperationDescribeTrialComponentMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrialComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeUserProfile.go b/service/sagemaker/api_op_DescribeUserProfile.go index fb37e818aa1..69a2ee54e8f 100644 --- a/service/sagemaker/api_op_DescribeUserProfile.go +++ b/service/sagemaker/api_op_DescribeUserProfile.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeUserProfileMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeWorkforce.go b/service/sagemaker/api_op_DescribeWorkforce.go index 0354c0f6d5f..f699bf6449e 100644 --- a/service/sagemaker/api_op_DescribeWorkforce.go +++ b/service/sagemaker/api_op_DescribeWorkforce.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeWorkforceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkforceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DescribeWorkteam.go b/service/sagemaker/api_op_DescribeWorkteam.go index 181682c93b5..4ee7b0cd67d 100644 --- a/service/sagemaker/api_op_DescribeWorkteam.go +++ b/service/sagemaker/api_op_DescribeWorkteam.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeWorkteamMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkteamValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_DisableSagemakerServicecatalogPortfolio.go b/service/sagemaker/api_op_DisableSagemakerServicecatalogPortfolio.go index 46ada4a26d1..55cfbb348d2 100644 --- a/service/sagemaker/api_op_DisableSagemakerServicecatalogPortfolio.go +++ b/service/sagemaker/api_op_DisableSagemakerServicecatalogPortfolio.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDisableSagemakerServicecatalogPortfolioMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSagemakerServicecatalogPortfolio(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sagemaker/api_op_DisassociateTrialComponent.go b/service/sagemaker/api_op_DisassociateTrialComponent.go index a07f79541b3..4cb4bf39757 100644 --- a/service/sagemaker/api_op_DisassociateTrialComponent.go +++ b/service/sagemaker/api_op_DisassociateTrialComponent.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDisassociateTrialComponentMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTrialComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_EnableSagemakerServicecatalogPortfolio.go b/service/sagemaker/api_op_EnableSagemakerServicecatalogPortfolio.go index bb63727f191..9eefbb7f3fc 100644 --- a/service/sagemaker/api_op_EnableSagemakerServicecatalogPortfolio.go +++ b/service/sagemaker/api_op_EnableSagemakerServicecatalogPortfolio.go @@ -96,6 +96,9 @@ func (c *Client) addOperationEnableSagemakerServicecatalogPortfolioMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSagemakerServicecatalogPortfolio(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sagemaker/api_op_GetDeviceFleetReport.go b/service/sagemaker/api_op_GetDeviceFleetReport.go index dbbbea5ec81..810f58329d0 100644 --- a/service/sagemaker/api_op_GetDeviceFleetReport.go +++ b/service/sagemaker/api_op_GetDeviceFleetReport.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetDeviceFleetReportMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceFleetReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_GetLineageGroupPolicy.go b/service/sagemaker/api_op_GetLineageGroupPolicy.go index 5ebc23cb90f..e34f63689b9 100644 --- a/service/sagemaker/api_op_GetLineageGroupPolicy.go +++ b/service/sagemaker/api_op_GetLineageGroupPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetLineageGroupPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLineageGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_GetModelPackageGroupPolicy.go b/service/sagemaker/api_op_GetModelPackageGroupPolicy.go index 26fde9f586c..5df494ab050 100644 --- a/service/sagemaker/api_op_GetModelPackageGroupPolicy.go +++ b/service/sagemaker/api_op_GetModelPackageGroupPolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetModelPackageGroupPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetModelPackageGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_GetSagemakerServicecatalogPortfolioStatus.go b/service/sagemaker/api_op_GetSagemakerServicecatalogPortfolioStatus.go index 112c32263b2..bad6b8ac4f5 100644 --- a/service/sagemaker/api_op_GetSagemakerServicecatalogPortfolioStatus.go +++ b/service/sagemaker/api_op_GetSagemakerServicecatalogPortfolioStatus.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetSagemakerServicecatalogPortfolioStatusMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSagemakerServicecatalogPortfolioStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sagemaker/api_op_GetScalingConfigurationRecommendation.go b/service/sagemaker/api_op_GetScalingConfigurationRecommendation.go index 4ee7e4e0688..53829c7f1f2 100644 --- a/service/sagemaker/api_op_GetScalingConfigurationRecommendation.go +++ b/service/sagemaker/api_op_GetScalingConfigurationRecommendation.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetScalingConfigurationRecommendationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetScalingConfigurationRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_GetSearchSuggestions.go b/service/sagemaker/api_op_GetSearchSuggestions.go index c79cb190308..64b0c67bba0 100644 --- a/service/sagemaker/api_op_GetSearchSuggestions.go +++ b/service/sagemaker/api_op_GetSearchSuggestions.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetSearchSuggestionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSearchSuggestionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_ImportHubContent.go b/service/sagemaker/api_op_ImportHubContent.go index 3212c4a2b3b..253e8e69b1e 100644 --- a/service/sagemaker/api_op_ImportHubContent.go +++ b/service/sagemaker/api_op_ImportHubContent.go @@ -155,6 +155,9 @@ func (c *Client) addOperationImportHubContentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportHubContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_ListActions.go b/service/sagemaker/api_op_ListActions.go index a8c02327fe6..a96d150fa45 100644 --- a/service/sagemaker/api_op_ListActions.go +++ b/service/sagemaker/api_op_ListActions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListActionsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActions(options.Region), middleware.Before); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListActionsMiddlewares(stack *middleware.Stack, opt return nil } -// ListActionsAPIClient is a client that implements the ListActions operation. -type ListActionsAPIClient interface { - ListActions(context.Context, *ListActionsInput, ...func(*Options)) (*ListActionsOutput, error) -} - -var _ ListActionsAPIClient = (*Client)(nil) - // ListActionsPaginatorOptions is the paginator options for ListActions type ListActionsPaginatorOptions struct { // The maximum number of actions to return in the response. The default value is @@ -223,6 +219,9 @@ func (p *ListActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListActionsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListActionsAPIClient is a client that implements the ListActions operation. +type ListActionsAPIClient interface { + ListActions(context.Context, *ListActionsInput, ...func(*Options)) (*ListActionsOutput, error) +} + +var _ ListActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListAlgorithms.go b/service/sagemaker/api_op_ListAlgorithms.go index 80f35df2de1..1f9d82b3a6d 100644 --- a/service/sagemaker/api_op_ListAlgorithms.go +++ b/service/sagemaker/api_op_ListAlgorithms.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListAlgorithmsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAlgorithms(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListAlgorithmsMiddlewares(stack *middleware.Stack, return nil } -// ListAlgorithmsAPIClient is a client that implements the ListAlgorithms -// operation. -type ListAlgorithmsAPIClient interface { - ListAlgorithms(context.Context, *ListAlgorithmsInput, ...func(*Options)) (*ListAlgorithmsOutput, error) -} - -var _ ListAlgorithmsAPIClient = (*Client)(nil) - // ListAlgorithmsPaginatorOptions is the paginator options for ListAlgorithms type ListAlgorithmsPaginatorOptions struct { // The maximum number of algorithms to return in the response. @@ -226,6 +221,9 @@ func (p *ListAlgorithmsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAlgorithms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListAlgorithmsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAlgorithmsAPIClient is a client that implements the ListAlgorithms +// operation. +type ListAlgorithmsAPIClient interface { + ListAlgorithms(context.Context, *ListAlgorithmsInput, ...func(*Options)) (*ListAlgorithmsOutput, error) +} + +var _ ListAlgorithmsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAlgorithms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListAliases.go b/service/sagemaker/api_op_ListAliases.go index 5558488da06..b1963634f53 100644 --- a/service/sagemaker/api_op_ListAliases.go +++ b/service/sagemaker/api_op_ListAliases.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAliasesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt return nil } -// ListAliasesAPIClient is a client that implements the ListAliases operation. -type ListAliasesAPIClient interface { - ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) -} - -var _ ListAliasesAPIClient = (*Client)(nil) - // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // The maximum number of aliases to return. @@ -216,6 +212,9 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListAppImageConfigs.go b/service/sagemaker/api_op_ListAppImageConfigs.go index ef991716302..d846dcfcab9 100644 --- a/service/sagemaker/api_op_ListAppImageConfigs.go +++ b/service/sagemaker/api_op_ListAppImageConfigs.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListAppImageConfigsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppImageConfigs(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListAppImageConfigsMiddlewares(stack *middleware.St return nil } -// ListAppImageConfigsAPIClient is a client that implements the -// ListAppImageConfigs operation. -type ListAppImageConfigsAPIClient interface { - ListAppImageConfigs(context.Context, *ListAppImageConfigsInput, ...func(*Options)) (*ListAppImageConfigsOutput, error) -} - -var _ ListAppImageConfigsAPIClient = (*Client)(nil) - // ListAppImageConfigsPaginatorOptions is the paginator options for // ListAppImageConfigs type ListAppImageConfigsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListAppImageConfigsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAppImageConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListAppImageConfigsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAppImageConfigsAPIClient is a client that implements the +// ListAppImageConfigs operation. +type ListAppImageConfigsAPIClient interface { + ListAppImageConfigs(context.Context, *ListAppImageConfigsInput, ...func(*Options)) (*ListAppImageConfigsOutput, error) +} + +var _ ListAppImageConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAppImageConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListApps.go b/service/sagemaker/api_op_ListApps.go index a7e1ffa9c3d..933f5d0f708 100644 --- a/service/sagemaker/api_op_ListApps.go +++ b/service/sagemaker/api_op_ListApps.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApps(options.Region), middleware.Before); err != nil { return err } @@ -155,13 +158,6 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option return nil } -// ListAppsAPIClient is a client that implements the ListApps operation. -type ListAppsAPIClient interface { - ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) -} - -var _ ListAppsAPIClient = (*Client)(nil) - // ListAppsPaginatorOptions is the paginator options for ListApps type ListAppsPaginatorOptions struct { // This parameter defines the maximum number of results that can be return in a @@ -230,6 +226,9 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListAppsAPIClient is a client that implements the ListApps operation. +type ListAppsAPIClient interface { + ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) +} + +var _ ListAppsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListArtifacts.go b/service/sagemaker/api_op_ListArtifacts.go index 20596c9f6ae..5d87d034617 100644 --- a/service/sagemaker/api_op_ListArtifacts.go +++ b/service/sagemaker/api_op_ListArtifacts.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListArtifactsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListArtifacts(options.Region), middleware.Before); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListArtifactsMiddlewares(stack *middleware.Stack, o return nil } -// ListArtifactsAPIClient is a client that implements the ListArtifacts operation. -type ListArtifactsAPIClient interface { - ListArtifacts(context.Context, *ListArtifactsInput, ...func(*Options)) (*ListArtifactsOutput, error) -} - -var _ ListArtifactsAPIClient = (*Client)(nil) - // ListArtifactsPaginatorOptions is the paginator options for ListArtifacts type ListArtifactsPaginatorOptions struct { // The maximum number of artifacts to return in the response. The default value is @@ -223,6 +219,9 @@ func (p *ListArtifactsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListArtifacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListArtifactsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListArtifactsAPIClient is a client that implements the ListArtifacts operation. +type ListArtifactsAPIClient interface { + ListArtifacts(context.Context, *ListArtifactsInput, ...func(*Options)) (*ListArtifactsOutput, error) +} + +var _ ListArtifactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListArtifacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListAssociations.go b/service/sagemaker/api_op_ListAssociations.go index d0518c2a0a9..6b65362c036 100644 --- a/service/sagemaker/api_op_ListAssociations.go +++ b/service/sagemaker/api_op_ListAssociations.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssociations(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack return nil } -// ListAssociationsAPIClient is a client that implements the ListAssociations -// operation. -type ListAssociationsAPIClient interface { - ListAssociations(context.Context, *ListAssociationsInput, ...func(*Options)) (*ListAssociationsOutput, error) -} - -var _ ListAssociationsAPIClient = (*Client)(nil) - // ListAssociationsPaginatorOptions is the paginator options for ListAssociations type ListAssociationsPaginatorOptions struct { // The maximum number of associations to return in the response. The default value @@ -234,6 +229,9 @@ func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAssociationsAPIClient is a client that implements the ListAssociations +// operation. +type ListAssociationsAPIClient interface { + ListAssociations(context.Context, *ListAssociationsInput, ...func(*Options)) (*ListAssociationsOutput, error) +} + +var _ ListAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListAutoMLJobs.go b/service/sagemaker/api_op_ListAutoMLJobs.go index f9405079c11..62241b8a531 100644 --- a/service/sagemaker/api_op_ListAutoMLJobs.go +++ b/service/sagemaker/api_op_ListAutoMLJobs.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListAutoMLJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutoMLJobs(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListAutoMLJobsMiddlewares(stack *middleware.Stack, return nil } -// ListAutoMLJobsAPIClient is a client that implements the ListAutoMLJobs -// operation. -type ListAutoMLJobsAPIClient interface { - ListAutoMLJobs(context.Context, *ListAutoMLJobsInput, ...func(*Options)) (*ListAutoMLJobsOutput, error) -} - -var _ ListAutoMLJobsAPIClient = (*Client)(nil) - // ListAutoMLJobsPaginatorOptions is the paginator options for ListAutoMLJobs type ListAutoMLJobsPaginatorOptions struct { // Request a list of jobs up to a specified limit. @@ -231,6 +226,9 @@ func (p *ListAutoMLJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAutoMLJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListAutoMLJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAutoMLJobsAPIClient is a client that implements the ListAutoMLJobs +// operation. +type ListAutoMLJobsAPIClient interface { + ListAutoMLJobs(context.Context, *ListAutoMLJobsInput, ...func(*Options)) (*ListAutoMLJobsOutput, error) +} + +var _ ListAutoMLJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAutoMLJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go b/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go index 56005ab13c6..feeaf4cc8aa 100644 --- a/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go +++ b/service/sagemaker/api_op_ListCandidatesForAutoMLJob.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListCandidatesForAutoMLJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCandidatesForAutoMLJobValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListCandidatesForAutoMLJobMiddlewares(stack *middle return nil } -// ListCandidatesForAutoMLJobAPIClient is a client that implements the -// ListCandidatesForAutoMLJob operation. -type ListCandidatesForAutoMLJobAPIClient interface { - ListCandidatesForAutoMLJob(context.Context, *ListCandidatesForAutoMLJobInput, ...func(*Options)) (*ListCandidatesForAutoMLJobOutput, error) -} - -var _ ListCandidatesForAutoMLJobAPIClient = (*Client)(nil) - // ListCandidatesForAutoMLJobPaginatorOptions is the paginator options for // ListCandidatesForAutoMLJob type ListCandidatesForAutoMLJobPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListCandidatesForAutoMLJobPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCandidatesForAutoMLJob(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListCandidatesForAutoMLJobPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListCandidatesForAutoMLJobAPIClient is a client that implements the +// ListCandidatesForAutoMLJob operation. +type ListCandidatesForAutoMLJobAPIClient interface { + ListCandidatesForAutoMLJob(context.Context, *ListCandidatesForAutoMLJobInput, ...func(*Options)) (*ListCandidatesForAutoMLJobOutput, error) +} + +var _ ListCandidatesForAutoMLJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCandidatesForAutoMLJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListClusterNodes.go b/service/sagemaker/api_op_ListClusterNodes.go index 9f38957cbc0..bcb084fbff0 100644 --- a/service/sagemaker/api_op_ListClusterNodes.go +++ b/service/sagemaker/api_op_ListClusterNodes.go @@ -163,6 +163,9 @@ func (c *Client) addOperationListClusterNodesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClusterNodesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_ListClusters.go b/service/sagemaker/api_op_ListClusters.go index 16af4cab633..7fe63d8f579 100644 --- a/service/sagemaker/api_op_ListClusters.go +++ b/service/sagemaker/api_op_ListClusters.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sagemaker/api_op_ListCodeRepositories.go b/service/sagemaker/api_op_ListCodeRepositories.go index 2882cca9584..9011534d24b 100644 --- a/service/sagemaker/api_op_ListCodeRepositories.go +++ b/service/sagemaker/api_op_ListCodeRepositories.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListCodeRepositoriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCodeRepositories(options.Region), middleware.Before); err != nil { return err } @@ -177,14 +180,6 @@ func (c *Client) addOperationListCodeRepositoriesMiddlewares(stack *middleware.S return nil } -// ListCodeRepositoriesAPIClient is a client that implements the -// ListCodeRepositories operation. -type ListCodeRepositoriesAPIClient interface { - ListCodeRepositories(context.Context, *ListCodeRepositoriesInput, ...func(*Options)) (*ListCodeRepositoriesOutput, error) -} - -var _ ListCodeRepositoriesAPIClient = (*Client)(nil) - // ListCodeRepositoriesPaginatorOptions is the paginator options for // ListCodeRepositories type ListCodeRepositoriesPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListCodeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCodeRepositories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListCodeRepositoriesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListCodeRepositoriesAPIClient is a client that implements the +// ListCodeRepositories operation. +type ListCodeRepositoriesAPIClient interface { + ListCodeRepositories(context.Context, *ListCodeRepositoriesInput, ...func(*Options)) (*ListCodeRepositoriesOutput, error) +} + +var _ ListCodeRepositoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCodeRepositories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListCompilationJobs.go b/service/sagemaker/api_op_ListCompilationJobs.go index 1d349bb9640..695673ec825 100644 --- a/service/sagemaker/api_op_ListCompilationJobs.go +++ b/service/sagemaker/api_op_ListCompilationJobs.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListCompilationJobsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCompilationJobs(options.Region), middleware.Before); err != nil { return err } @@ -176,14 +179,6 @@ func (c *Client) addOperationListCompilationJobsMiddlewares(stack *middleware.St return nil } -// ListCompilationJobsAPIClient is a client that implements the -// ListCompilationJobs operation. -type ListCompilationJobsAPIClient interface { - ListCompilationJobs(context.Context, *ListCompilationJobsInput, ...func(*Options)) (*ListCompilationJobsOutput, error) -} - -var _ ListCompilationJobsAPIClient = (*Client)(nil) - // ListCompilationJobsPaginatorOptions is the paginator options for // ListCompilationJobs type ListCompilationJobsPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *ListCompilationJobsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCompilationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *ListCompilationJobsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListCompilationJobsAPIClient is a client that implements the +// ListCompilationJobs operation. +type ListCompilationJobsAPIClient interface { + ListCompilationJobs(context.Context, *ListCompilationJobsInput, ...func(*Options)) (*ListCompilationJobsOutput, error) +} + +var _ ListCompilationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCompilationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListContexts.go b/service/sagemaker/api_op_ListContexts.go index 950b6cfff23..35a84ab0622 100644 --- a/service/sagemaker/api_op_ListContexts.go +++ b/service/sagemaker/api_op_ListContexts.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListContextsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContexts(options.Region), middleware.Before); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListContextsMiddlewares(stack *middleware.Stack, op return nil } -// ListContextsAPIClient is a client that implements the ListContexts operation. -type ListContextsAPIClient interface { - ListContexts(context.Context, *ListContextsInput, ...func(*Options)) (*ListContextsOutput, error) -} - -var _ ListContextsAPIClient = (*Client)(nil) - // ListContextsPaginatorOptions is the paginator options for ListContexts type ListContextsPaginatorOptions struct { // The maximum number of contexts to return in the response. The default value is @@ -223,6 +219,9 @@ func (p *ListContextsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContexts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListContextsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListContextsAPIClient is a client that implements the ListContexts operation. +type ListContextsAPIClient interface { + ListContexts(context.Context, *ListContextsInput, ...func(*Options)) (*ListContextsOutput, error) +} + +var _ ListContextsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContexts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListDataQualityJobDefinitions.go b/service/sagemaker/api_op_ListDataQualityJobDefinitions.go index 8adc68011a8..f583821b962 100644 --- a/service/sagemaker/api_op_ListDataQualityJobDefinitions.go +++ b/service/sagemaker/api_op_ListDataQualityJobDefinitions.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListDataQualityJobDefinitionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataQualityJobDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListDataQualityJobDefinitionsMiddlewares(stack *mid return nil } -// ListDataQualityJobDefinitionsAPIClient is a client that implements the -// ListDataQualityJobDefinitions operation. -type ListDataQualityJobDefinitionsAPIClient interface { - ListDataQualityJobDefinitions(context.Context, *ListDataQualityJobDefinitionsInput, ...func(*Options)) (*ListDataQualityJobDefinitionsOutput, error) -} - -var _ ListDataQualityJobDefinitionsAPIClient = (*Client)(nil) - // ListDataQualityJobDefinitionsPaginatorOptions is the paginator options for // ListDataQualityJobDefinitions type ListDataQualityJobDefinitionsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListDataQualityJobDefinitionsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataQualityJobDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListDataQualityJobDefinitionsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListDataQualityJobDefinitionsAPIClient is a client that implements the +// ListDataQualityJobDefinitions operation. +type ListDataQualityJobDefinitionsAPIClient interface { + ListDataQualityJobDefinitions(context.Context, *ListDataQualityJobDefinitionsInput, ...func(*Options)) (*ListDataQualityJobDefinitionsOutput, error) +} + +var _ ListDataQualityJobDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataQualityJobDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListDeviceFleets.go b/service/sagemaker/api_op_ListDeviceFleets.go index 8114a8177fa..6193921b49c 100644 --- a/service/sagemaker/api_op_ListDeviceFleets.go +++ b/service/sagemaker/api_op_ListDeviceFleets.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListDeviceFleetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceFleets(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListDeviceFleetsMiddlewares(stack *middleware.Stack return nil } -// ListDeviceFleetsAPIClient is a client that implements the ListDeviceFleets -// operation. -type ListDeviceFleetsAPIClient interface { - ListDeviceFleets(context.Context, *ListDeviceFleetsInput, ...func(*Options)) (*ListDeviceFleetsOutput, error) -} - -var _ ListDeviceFleetsAPIClient = (*Client)(nil) - // ListDeviceFleetsPaginatorOptions is the paginator options for ListDeviceFleets type ListDeviceFleetsPaginatorOptions struct { // The maximum number of results to select. @@ -228,6 +223,9 @@ func (p *ListDeviceFleetsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeviceFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListDeviceFleetsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListDeviceFleetsAPIClient is a client that implements the ListDeviceFleets +// operation. +type ListDeviceFleetsAPIClient interface { + ListDeviceFleets(context.Context, *ListDeviceFleetsInput, ...func(*Options)) (*ListDeviceFleetsOutput, error) +} + +var _ ListDeviceFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeviceFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListDevices.go b/service/sagemaker/api_op_ListDevices.go index 2c4c159c504..99f62ad56fa 100644 --- a/service/sagemaker/api_op_ListDevices.go +++ b/service/sagemaker/api_op_ListDevices.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevices(options.Region), middleware.Before); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListDevicesAPIClient is a client that implements the ListDevices operation. -type ListDevicesAPIClient interface { - ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) -} - -var _ ListDevicesAPIClient = (*Client)(nil) - // ListDevicesPaginatorOptions is the paginator options for ListDevices type ListDevicesPaginatorOptions struct { // Maximum number of results to select. @@ -215,6 +211,9 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListDomains.go b/service/sagemaker/api_op_ListDomains.go index 3c572e5afe4..2a9e6085bf4 100644 --- a/service/sagemaker/api_op_ListDomains.go +++ b/service/sagemaker/api_op_ListDomains.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // This parameter defines the maximum number of results that can be return in a @@ -213,6 +209,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +231,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListEdgeDeploymentPlans.go b/service/sagemaker/api_op_ListEdgeDeploymentPlans.go index 2e44f7a9642..d7623005db6 100644 --- a/service/sagemaker/api_op_ListEdgeDeploymentPlans.go +++ b/service/sagemaker/api_op_ListEdgeDeploymentPlans.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListEdgeDeploymentPlansMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEdgeDeploymentPlans(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListEdgeDeploymentPlansMiddlewares(stack *middlewar return nil } -// ListEdgeDeploymentPlansAPIClient is a client that implements the -// ListEdgeDeploymentPlans operation. -type ListEdgeDeploymentPlansAPIClient interface { - ListEdgeDeploymentPlans(context.Context, *ListEdgeDeploymentPlansInput, ...func(*Options)) (*ListEdgeDeploymentPlansOutput, error) -} - -var _ ListEdgeDeploymentPlansAPIClient = (*Client)(nil) - // ListEdgeDeploymentPlansPaginatorOptions is the paginator options for // ListEdgeDeploymentPlans type ListEdgeDeploymentPlansPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListEdgeDeploymentPlansPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEdgeDeploymentPlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListEdgeDeploymentPlansPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEdgeDeploymentPlansAPIClient is a client that implements the +// ListEdgeDeploymentPlans operation. +type ListEdgeDeploymentPlansAPIClient interface { + ListEdgeDeploymentPlans(context.Context, *ListEdgeDeploymentPlansInput, ...func(*Options)) (*ListEdgeDeploymentPlansOutput, error) +} + +var _ ListEdgeDeploymentPlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEdgeDeploymentPlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListEdgePackagingJobs.go b/service/sagemaker/api_op_ListEdgePackagingJobs.go index 5e0af853e14..ace8b2aaae7 100644 --- a/service/sagemaker/api_op_ListEdgePackagingJobs.go +++ b/service/sagemaker/api_op_ListEdgePackagingJobs.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListEdgePackagingJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEdgePackagingJobs(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListEdgePackagingJobsMiddlewares(stack *middleware. return nil } -// ListEdgePackagingJobsAPIClient is a client that implements the -// ListEdgePackagingJobs operation. -type ListEdgePackagingJobsAPIClient interface { - ListEdgePackagingJobs(context.Context, *ListEdgePackagingJobsInput, ...func(*Options)) (*ListEdgePackagingJobsOutput, error) -} - -var _ ListEdgePackagingJobsAPIClient = (*Client)(nil) - // ListEdgePackagingJobsPaginatorOptions is the paginator options for // ListEdgePackagingJobs type ListEdgePackagingJobsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListEdgePackagingJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEdgePackagingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListEdgePackagingJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListEdgePackagingJobsAPIClient is a client that implements the +// ListEdgePackagingJobs operation. +type ListEdgePackagingJobsAPIClient interface { + ListEdgePackagingJobs(context.Context, *ListEdgePackagingJobsInput, ...func(*Options)) (*ListEdgePackagingJobsOutput, error) +} + +var _ ListEdgePackagingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEdgePackagingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListEndpointConfigs.go b/service/sagemaker/api_op_ListEndpointConfigs.go index a63b0471b5a..d05df32104d 100644 --- a/service/sagemaker/api_op_ListEndpointConfigs.go +++ b/service/sagemaker/api_op_ListEndpointConfigs.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListEndpointConfigsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpointConfigs(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListEndpointConfigsMiddlewares(stack *middleware.St return nil } -// ListEndpointConfigsAPIClient is a client that implements the -// ListEndpointConfigs operation. -type ListEndpointConfigsAPIClient interface { - ListEndpointConfigs(context.Context, *ListEndpointConfigsInput, ...func(*Options)) (*ListEndpointConfigsOutput, error) -} - -var _ ListEndpointConfigsAPIClient = (*Client)(nil) - // ListEndpointConfigsPaginatorOptions is the paginator options for // ListEndpointConfigs type ListEndpointConfigsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListEndpointConfigsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpointConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListEndpointConfigsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEndpointConfigsAPIClient is a client that implements the +// ListEndpointConfigs operation. +type ListEndpointConfigsAPIClient interface { + ListEndpointConfigs(context.Context, *ListEndpointConfigsInput, ...func(*Options)) (*ListEndpointConfigsOutput, error) +} + +var _ ListEndpointConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpointConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListEndpoints.go b/service/sagemaker/api_op_ListEndpoints.go index f0838b72743..ac50b4fd3c3 100644 --- a/service/sagemaker/api_op_ListEndpoints.go +++ b/service/sagemaker/api_op_ListEndpoints.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEndpoints(options.Region), middleware.Before); err != nil { return err } @@ -167,13 +170,6 @@ func (c *Client) addOperationListEndpointsMiddlewares(stack *middleware.Stack, o return nil } -// ListEndpointsAPIClient is a client that implements the ListEndpoints operation. -type ListEndpointsAPIClient interface { - ListEndpoints(context.Context, *ListEndpointsInput, ...func(*Options)) (*ListEndpointsOutput, error) -} - -var _ ListEndpointsAPIClient = (*Client)(nil) - // ListEndpointsPaginatorOptions is the paginator options for ListEndpoints type ListEndpointsPaginatorOptions struct { // The maximum number of endpoints to return in the response. This value defaults @@ -238,6 +234,9 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +256,13 @@ func (p *ListEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListEndpointsAPIClient is a client that implements the ListEndpoints operation. +type ListEndpointsAPIClient interface { + ListEndpoints(context.Context, *ListEndpointsInput, ...func(*Options)) (*ListEndpointsOutput, error) +} + +var _ ListEndpointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListExperiments.go b/service/sagemaker/api_op_ListExperiments.go index 4cd220ff259..c7283d1a94a 100644 --- a/service/sagemaker/api_op_ListExperiments.go +++ b/service/sagemaker/api_op_ListExperiments.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExperiments(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListExperimentsMiddlewares(stack *middleware.Stack, return nil } -// ListExperimentsAPIClient is a client that implements the ListExperiments -// operation. -type ListExperimentsAPIClient interface { - ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) -} - -var _ ListExperimentsAPIClient = (*Client)(nil) - // ListExperimentsPaginatorOptions is the paginator options for ListExperiments type ListExperimentsPaginatorOptions struct { // The maximum number of experiments to return in the response. The default value @@ -220,6 +215,9 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExperiments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListExperimentsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListExperimentsAPIClient is a client that implements the ListExperiments +// operation. +type ListExperimentsAPIClient interface { + ListExperiments(context.Context, *ListExperimentsInput, ...func(*Options)) (*ListExperimentsOutput, error) +} + +var _ ListExperimentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExperiments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListFeatureGroups.go b/service/sagemaker/api_op_ListFeatureGroups.go index 24e4a0f9bc7..d640c25578c 100644 --- a/service/sagemaker/api_op_ListFeatureGroups.go +++ b/service/sagemaker/api_op_ListFeatureGroups.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListFeatureGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFeatureGroups(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListFeatureGroupsMiddlewares(stack *middleware.Stac return nil } -// ListFeatureGroupsAPIClient is a client that implements the ListFeatureGroups -// operation. -type ListFeatureGroupsAPIClient interface { - ListFeatureGroups(context.Context, *ListFeatureGroupsInput, ...func(*Options)) (*ListFeatureGroupsOutput, error) -} - -var _ ListFeatureGroupsAPIClient = (*Client)(nil) - // ListFeatureGroupsPaginatorOptions is the paginator options for ListFeatureGroups type ListFeatureGroupsPaginatorOptions struct { // The maximum number of results returned by ListFeatureGroups . @@ -229,6 +224,9 @@ func (p *ListFeatureGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFeatureGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListFeatureGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListFeatureGroupsAPIClient is a client that implements the ListFeatureGroups +// operation. +type ListFeatureGroupsAPIClient interface { + ListFeatureGroups(context.Context, *ListFeatureGroupsInput, ...func(*Options)) (*ListFeatureGroupsOutput, error) +} + +var _ ListFeatureGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFeatureGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListFlowDefinitions.go b/service/sagemaker/api_op_ListFlowDefinitions.go index dc9def86594..027a41460ea 100644 --- a/service/sagemaker/api_op_ListFlowDefinitions.go +++ b/service/sagemaker/api_op_ListFlowDefinitions.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListFlowDefinitionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFlowDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListFlowDefinitionsMiddlewares(stack *middleware.St return nil } -// ListFlowDefinitionsAPIClient is a client that implements the -// ListFlowDefinitions operation. -type ListFlowDefinitionsAPIClient interface { - ListFlowDefinitions(context.Context, *ListFlowDefinitionsInput, ...func(*Options)) (*ListFlowDefinitionsOutput, error) -} - -var _ ListFlowDefinitionsAPIClient = (*Client)(nil) - // ListFlowDefinitionsPaginatorOptions is the paginator options for // ListFlowDefinitions type ListFlowDefinitionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListFlowDefinitionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFlowDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListFlowDefinitionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListFlowDefinitionsAPIClient is a client that implements the +// ListFlowDefinitions operation. +type ListFlowDefinitionsAPIClient interface { + ListFlowDefinitions(context.Context, *ListFlowDefinitionsInput, ...func(*Options)) (*ListFlowDefinitionsOutput, error) +} + +var _ ListFlowDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFlowDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListHubContentVersions.go b/service/sagemaker/api_op_ListHubContentVersions.go index a555d53920b..61653a0228c 100644 --- a/service/sagemaker/api_op_ListHubContentVersions.go +++ b/service/sagemaker/api_op_ListHubContentVersions.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListHubContentVersionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHubContentVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_ListHubContents.go b/service/sagemaker/api_op_ListHubContents.go index b39f8da9161..8978fcbd8cc 100644 --- a/service/sagemaker/api_op_ListHubContents.go +++ b/service/sagemaker/api_op_ListHubContents.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListHubContentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHubContentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_ListHubs.go b/service/sagemaker/api_op_ListHubs.go index dbe7b3470e5..7e23c259bd4 100644 --- a/service/sagemaker/api_op_ListHubs.go +++ b/service/sagemaker/api_op_ListHubs.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListHubsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHubs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sagemaker/api_op_ListHumanTaskUis.go b/service/sagemaker/api_op_ListHumanTaskUis.go index 48346ca79d2..50cd6f13c1d 100644 --- a/service/sagemaker/api_op_ListHumanTaskUis.go +++ b/service/sagemaker/api_op_ListHumanTaskUis.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListHumanTaskUisMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHumanTaskUis(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListHumanTaskUisMiddlewares(stack *middleware.Stack return nil } -// ListHumanTaskUisAPIClient is a client that implements the ListHumanTaskUis -// operation. -type ListHumanTaskUisAPIClient interface { - ListHumanTaskUis(context.Context, *ListHumanTaskUisInput, ...func(*Options)) (*ListHumanTaskUisOutput, error) -} - -var _ ListHumanTaskUisAPIClient = (*Client)(nil) - // ListHumanTaskUisPaginatorOptions is the paginator options for ListHumanTaskUis type ListHumanTaskUisPaginatorOptions struct { // The total number of items to return. If the total number of available items is @@ -221,6 +216,9 @@ func (p *ListHumanTaskUisPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHumanTaskUis(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListHumanTaskUisPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListHumanTaskUisAPIClient is a client that implements the ListHumanTaskUis +// operation. +type ListHumanTaskUisAPIClient interface { + ListHumanTaskUis(context.Context, *ListHumanTaskUisInput, ...func(*Options)) (*ListHumanTaskUisOutput, error) +} + +var _ ListHumanTaskUisAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHumanTaskUis(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListHyperParameterTuningJobs.go b/service/sagemaker/api_op_ListHyperParameterTuningJobs.go index acf1292c6cf..c7391adabf8 100644 --- a/service/sagemaker/api_op_ListHyperParameterTuningJobs.go +++ b/service/sagemaker/api_op_ListHyperParameterTuningJobs.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListHyperParameterTuningJobsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHyperParameterTuningJobs(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListHyperParameterTuningJobsMiddlewares(stack *midd return nil } -// ListHyperParameterTuningJobsAPIClient is a client that implements the -// ListHyperParameterTuningJobs operation. -type ListHyperParameterTuningJobsAPIClient interface { - ListHyperParameterTuningJobs(context.Context, *ListHyperParameterTuningJobsInput, ...func(*Options)) (*ListHyperParameterTuningJobsOutput, error) -} - -var _ ListHyperParameterTuningJobsAPIClient = (*Client)(nil) - // ListHyperParameterTuningJobsPaginatorOptions is the paginator options for // ListHyperParameterTuningJobs type ListHyperParameterTuningJobsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListHyperParameterTuningJobsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHyperParameterTuningJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListHyperParameterTuningJobsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListHyperParameterTuningJobsAPIClient is a client that implements the +// ListHyperParameterTuningJobs operation. +type ListHyperParameterTuningJobsAPIClient interface { + ListHyperParameterTuningJobs(context.Context, *ListHyperParameterTuningJobsInput, ...func(*Options)) (*ListHyperParameterTuningJobsOutput, error) +} + +var _ ListHyperParameterTuningJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHyperParameterTuningJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListImageVersions.go b/service/sagemaker/api_op_ListImageVersions.go index d9c020d6c59..d2dae105830 100644 --- a/service/sagemaker/api_op_ListImageVersions.go +++ b/service/sagemaker/api_op_ListImageVersions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListImageVersionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImageVersionsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListImageVersionsMiddlewares(stack *middleware.Stac return nil } -// ListImageVersionsAPIClient is a client that implements the ListImageVersions -// operation. -type ListImageVersionsAPIClient interface { - ListImageVersions(context.Context, *ListImageVersionsInput, ...func(*Options)) (*ListImageVersionsOutput, error) -} - -var _ ListImageVersionsAPIClient = (*Client)(nil) - // ListImageVersionsPaginatorOptions is the paginator options for ListImageVersions type ListImageVersionsPaginatorOptions struct { // The maximum number of versions to return in the response. The default value is @@ -233,6 +228,9 @@ func (p *ListImageVersionsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImageVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListImageVersionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListImageVersionsAPIClient is a client that implements the ListImageVersions +// operation. +type ListImageVersionsAPIClient interface { + ListImageVersions(context.Context, *ListImageVersionsInput, ...func(*Options)) (*ListImageVersionsOutput, error) +} + +var _ ListImageVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImageVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListImages.go b/service/sagemaker/api_op_ListImages.go index a92800dfa74..12c4209021c 100644 --- a/service/sagemaker/api_op_ListImages.go +++ b/service/sagemaker/api_op_ListImages.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListImagesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImages(options.Region), middleware.Before); err != nil { return err } @@ -157,13 +160,6 @@ func (c *Client) addOperationListImagesMiddlewares(stack *middleware.Stack, opti return nil } -// ListImagesAPIClient is a client that implements the ListImages operation. -type ListImagesAPIClient interface { - ListImages(context.Context, *ListImagesInput, ...func(*Options)) (*ListImagesOutput, error) -} - -var _ ListImagesAPIClient = (*Client)(nil) - // ListImagesPaginatorOptions is the paginator options for ListImages type ListImagesPaginatorOptions struct { // The maximum number of images to return in the response. The default value is @@ -228,6 +224,9 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +246,13 @@ func (p *ListImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListImagesAPIClient is a client that implements the ListImages operation. +type ListImagesAPIClient interface { + ListImages(context.Context, *ListImagesInput, ...func(*Options)) (*ListImagesOutput, error) +} + +var _ ListImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListInferenceComponents.go b/service/sagemaker/api_op_ListInferenceComponents.go index 05205029bc7..ae788f51cd4 100644 --- a/service/sagemaker/api_op_ListInferenceComponents.go +++ b/service/sagemaker/api_op_ListInferenceComponents.go @@ -159,6 +159,9 @@ func (c *Client) addOperationListInferenceComponentsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInferenceComponents(options.Region), middleware.Before); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationListInferenceComponentsMiddlewares(stack *middlewar return nil } -// ListInferenceComponentsAPIClient is a client that implements the -// ListInferenceComponents operation. -type ListInferenceComponentsAPIClient interface { - ListInferenceComponents(context.Context, *ListInferenceComponentsInput, ...func(*Options)) (*ListInferenceComponentsOutput, error) -} - -var _ ListInferenceComponentsAPIClient = (*Client)(nil) - // ListInferenceComponentsPaginatorOptions is the paginator options for // ListInferenceComponents type ListInferenceComponentsPaginatorOptions struct { @@ -254,6 +249,9 @@ func (p *ListInferenceComponentsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -273,6 +271,14 @@ func (p *ListInferenceComponentsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInferenceComponentsAPIClient is a client that implements the +// ListInferenceComponents operation. +type ListInferenceComponentsAPIClient interface { + ListInferenceComponents(context.Context, *ListInferenceComponentsInput, ...func(*Options)) (*ListInferenceComponentsOutput, error) +} + +var _ ListInferenceComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListInferenceExperiments.go b/service/sagemaker/api_op_ListInferenceExperiments.go index 8d99f1a75e9..52e418f3911 100644 --- a/service/sagemaker/api_op_ListInferenceExperiments.go +++ b/service/sagemaker/api_op_ListInferenceExperiments.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListInferenceExperimentsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInferenceExperiments(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationListInferenceExperimentsMiddlewares(stack *middlewa return nil } -// ListInferenceExperimentsAPIClient is a client that implements the -// ListInferenceExperiments operation. -type ListInferenceExperimentsAPIClient interface { - ListInferenceExperiments(context.Context, *ListInferenceExperimentsInput, ...func(*Options)) (*ListInferenceExperimentsOutput, error) -} - -var _ ListInferenceExperimentsAPIClient = (*Client)(nil) - // ListInferenceExperimentsPaginatorOptions is the paginator options for // ListInferenceExperiments type ListInferenceExperimentsPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListInferenceExperimentsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceExperiments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListInferenceExperimentsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListInferenceExperimentsAPIClient is a client that implements the +// ListInferenceExperiments operation. +type ListInferenceExperimentsAPIClient interface { + ListInferenceExperiments(context.Context, *ListInferenceExperimentsInput, ...func(*Options)) (*ListInferenceExperimentsOutput, error) +} + +var _ ListInferenceExperimentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceExperiments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListInferenceRecommendationsJobSteps.go b/service/sagemaker/api_op_ListInferenceRecommendationsJobSteps.go index 229a9a24e70..43f808da0ed 100644 --- a/service/sagemaker/api_op_ListInferenceRecommendationsJobSteps.go +++ b/service/sagemaker/api_op_ListInferenceRecommendationsJobSteps.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListInferenceRecommendationsJobStepsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInferenceRecommendationsJobStepsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListInferenceRecommendationsJobStepsMiddlewares(sta return nil } -// ListInferenceRecommendationsJobStepsAPIClient is a client that implements the -// ListInferenceRecommendationsJobSteps operation. -type ListInferenceRecommendationsJobStepsAPIClient interface { - ListInferenceRecommendationsJobSteps(context.Context, *ListInferenceRecommendationsJobStepsInput, ...func(*Options)) (*ListInferenceRecommendationsJobStepsOutput, error) -} - -var _ ListInferenceRecommendationsJobStepsAPIClient = (*Client)(nil) - // ListInferenceRecommendationsJobStepsPaginatorOptions is the paginator options // for ListInferenceRecommendationsJobSteps type ListInferenceRecommendationsJobStepsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListInferenceRecommendationsJobStepsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceRecommendationsJobSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListInferenceRecommendationsJobStepsPaginator) NextPage(ctx context.Con return result, nil } +// ListInferenceRecommendationsJobStepsAPIClient is a client that implements the +// ListInferenceRecommendationsJobSteps operation. +type ListInferenceRecommendationsJobStepsAPIClient interface { + ListInferenceRecommendationsJobSteps(context.Context, *ListInferenceRecommendationsJobStepsInput, ...func(*Options)) (*ListInferenceRecommendationsJobStepsOutput, error) +} + +var _ ListInferenceRecommendationsJobStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceRecommendationsJobSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go b/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go index 313411a35f4..67897232b8d 100644 --- a/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go +++ b/service/sagemaker/api_op_ListInferenceRecommendationsJobs.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListInferenceRecommendationsJobsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInferenceRecommendationsJobs(options.Region), middleware.Before); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationListInferenceRecommendationsJobsMiddlewares(stack * return nil } -// ListInferenceRecommendationsJobsAPIClient is a client that implements the -// ListInferenceRecommendationsJobs operation. -type ListInferenceRecommendationsJobsAPIClient interface { - ListInferenceRecommendationsJobs(context.Context, *ListInferenceRecommendationsJobsInput, ...func(*Options)) (*ListInferenceRecommendationsJobsOutput, error) -} - -var _ ListInferenceRecommendationsJobsAPIClient = (*Client)(nil) - // ListInferenceRecommendationsJobsPaginatorOptions is the paginator options for // ListInferenceRecommendationsJobs type ListInferenceRecommendationsJobsPaginatorOptions struct { @@ -245,6 +240,9 @@ func (p *ListInferenceRecommendationsJobsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInferenceRecommendationsJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListInferenceRecommendationsJobsPaginator) NextPage(ctx context.Context return result, nil } +// ListInferenceRecommendationsJobsAPIClient is a client that implements the +// ListInferenceRecommendationsJobs operation. +type ListInferenceRecommendationsJobsAPIClient interface { + ListInferenceRecommendationsJobs(context.Context, *ListInferenceRecommendationsJobsInput, ...func(*Options)) (*ListInferenceRecommendationsJobsOutput, error) +} + +var _ ListInferenceRecommendationsJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInferenceRecommendationsJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListLabelingJobs.go b/service/sagemaker/api_op_ListLabelingJobs.go index 71d3e62713d..52436bd28e9 100644 --- a/service/sagemaker/api_op_ListLabelingJobs.go +++ b/service/sagemaker/api_op_ListLabelingJobs.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListLabelingJobsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLabelingJobs(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListLabelingJobsMiddlewares(stack *middleware.Stack return nil } -// ListLabelingJobsAPIClient is a client that implements the ListLabelingJobs -// operation. -type ListLabelingJobsAPIClient interface { - ListLabelingJobs(context.Context, *ListLabelingJobsInput, ...func(*Options)) (*ListLabelingJobsOutput, error) -} - -var _ ListLabelingJobsAPIClient = (*Client)(nil) - // ListLabelingJobsPaginatorOptions is the paginator options for ListLabelingJobs type ListLabelingJobsPaginatorOptions struct { // The maximum number of labeling jobs to return in each page of the response. @@ -235,6 +230,9 @@ func (p *ListLabelingJobsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLabelingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListLabelingJobsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListLabelingJobsAPIClient is a client that implements the ListLabelingJobs +// operation. +type ListLabelingJobsAPIClient interface { + ListLabelingJobs(context.Context, *ListLabelingJobsInput, ...func(*Options)) (*ListLabelingJobsOutput, error) +} + +var _ ListLabelingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLabelingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go b/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go index 154940c03a9..e63ae46f257 100644 --- a/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go +++ b/service/sagemaker/api_op_ListLabelingJobsForWorkteam.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListLabelingJobsForWorkteamMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLabelingJobsForWorkteamValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListLabelingJobsForWorkteamMiddlewares(stack *middl return nil } -// ListLabelingJobsForWorkteamAPIClient is a client that implements the -// ListLabelingJobsForWorkteam operation. -type ListLabelingJobsForWorkteamAPIClient interface { - ListLabelingJobsForWorkteam(context.Context, *ListLabelingJobsForWorkteamInput, ...func(*Options)) (*ListLabelingJobsForWorkteamOutput, error) -} - -var _ ListLabelingJobsForWorkteamAPIClient = (*Client)(nil) - // ListLabelingJobsForWorkteamPaginatorOptions is the paginator options for // ListLabelingJobsForWorkteam type ListLabelingJobsForWorkteamPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListLabelingJobsForWorkteamPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLabelingJobsForWorkteam(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListLabelingJobsForWorkteamPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListLabelingJobsForWorkteamAPIClient is a client that implements the +// ListLabelingJobsForWorkteam operation. +type ListLabelingJobsForWorkteamAPIClient interface { + ListLabelingJobsForWorkteam(context.Context, *ListLabelingJobsForWorkteamInput, ...func(*Options)) (*ListLabelingJobsForWorkteamOutput, error) +} + +var _ ListLabelingJobsForWorkteamAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLabelingJobsForWorkteam(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListLineageGroups.go b/service/sagemaker/api_op_ListLineageGroups.go index cb34c14364c..8f0203a3af6 100644 --- a/service/sagemaker/api_op_ListLineageGroups.go +++ b/service/sagemaker/api_op_ListLineageGroups.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListLineageGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLineageGroups(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListLineageGroupsMiddlewares(stack *middleware.Stac return nil } -// ListLineageGroupsAPIClient is a client that implements the ListLineageGroups -// operation. -type ListLineageGroupsAPIClient interface { - ListLineageGroups(context.Context, *ListLineageGroupsInput, ...func(*Options)) (*ListLineageGroupsOutput, error) -} - -var _ ListLineageGroupsAPIClient = (*Client)(nil) - // ListLineageGroupsPaginatorOptions is the paginator options for ListLineageGroups type ListLineageGroupsPaginatorOptions struct { // The maximum number of endpoints to return in the response. This value defaults @@ -224,6 +219,9 @@ func (p *ListLineageGroupsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLineageGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListLineageGroupsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListLineageGroupsAPIClient is a client that implements the ListLineageGroups +// operation. +type ListLineageGroupsAPIClient interface { + ListLineageGroups(context.Context, *ListLineageGroupsInput, ...func(*Options)) (*ListLineageGroupsOutput, error) +} + +var _ ListLineageGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLineageGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelBiasJobDefinitions.go b/service/sagemaker/api_op_ListModelBiasJobDefinitions.go index 1efc16b448e..4cbbf4908a6 100644 --- a/service/sagemaker/api_op_ListModelBiasJobDefinitions.go +++ b/service/sagemaker/api_op_ListModelBiasJobDefinitions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListModelBiasJobDefinitionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelBiasJobDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListModelBiasJobDefinitionsMiddlewares(stack *middl return nil } -// ListModelBiasJobDefinitionsAPIClient is a client that implements the -// ListModelBiasJobDefinitions operation. -type ListModelBiasJobDefinitionsAPIClient interface { - ListModelBiasJobDefinitions(context.Context, *ListModelBiasJobDefinitionsInput, ...func(*Options)) (*ListModelBiasJobDefinitionsOutput, error) -} - -var _ ListModelBiasJobDefinitionsAPIClient = (*Client)(nil) - // ListModelBiasJobDefinitionsPaginatorOptions is the paginator options for // ListModelBiasJobDefinitions type ListModelBiasJobDefinitionsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListModelBiasJobDefinitionsPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelBiasJobDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListModelBiasJobDefinitionsPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListModelBiasJobDefinitionsAPIClient is a client that implements the +// ListModelBiasJobDefinitions operation. +type ListModelBiasJobDefinitionsAPIClient interface { + ListModelBiasJobDefinitions(context.Context, *ListModelBiasJobDefinitionsInput, ...func(*Options)) (*ListModelBiasJobDefinitionsOutput, error) +} + +var _ ListModelBiasJobDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelBiasJobDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelCardExportJobs.go b/service/sagemaker/api_op_ListModelCardExportJobs.go index b860ad04c54..3b64236fd4d 100644 --- a/service/sagemaker/api_op_ListModelCardExportJobs.go +++ b/service/sagemaker/api_op_ListModelCardExportJobs.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListModelCardExportJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelCardExportJobsValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationListModelCardExportJobsMiddlewares(stack *middlewar return nil } -// ListModelCardExportJobsAPIClient is a client that implements the -// ListModelCardExportJobs operation. -type ListModelCardExportJobsAPIClient interface { - ListModelCardExportJobs(context.Context, *ListModelCardExportJobsInput, ...func(*Options)) (*ListModelCardExportJobsOutput, error) -} - -var _ ListModelCardExportJobsAPIClient = (*Client)(nil) - // ListModelCardExportJobsPaginatorOptions is the paginator options for // ListModelCardExportJobs type ListModelCardExportJobsPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *ListModelCardExportJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelCardExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *ListModelCardExportJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListModelCardExportJobsAPIClient is a client that implements the +// ListModelCardExportJobs operation. +type ListModelCardExportJobsAPIClient interface { + ListModelCardExportJobs(context.Context, *ListModelCardExportJobsInput, ...func(*Options)) (*ListModelCardExportJobsOutput, error) +} + +var _ ListModelCardExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelCardExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelCardVersions.go b/service/sagemaker/api_op_ListModelCardVersions.go index a510203f6ec..7cf41085314 100644 --- a/service/sagemaker/api_op_ListModelCardVersions.go +++ b/service/sagemaker/api_op_ListModelCardVersions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListModelCardVersionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelCardVersionsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListModelCardVersionsMiddlewares(stack *middleware. return nil } -// ListModelCardVersionsAPIClient is a client that implements the -// ListModelCardVersions operation. -type ListModelCardVersionsAPIClient interface { - ListModelCardVersions(context.Context, *ListModelCardVersionsInput, ...func(*Options)) (*ListModelCardVersionsOutput, error) -} - -var _ ListModelCardVersionsAPIClient = (*Client)(nil) - // ListModelCardVersionsPaginatorOptions is the paginator options for // ListModelCardVersions type ListModelCardVersionsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListModelCardVersionsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelCardVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListModelCardVersionsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListModelCardVersionsAPIClient is a client that implements the +// ListModelCardVersions operation. +type ListModelCardVersionsAPIClient interface { + ListModelCardVersions(context.Context, *ListModelCardVersionsInput, ...func(*Options)) (*ListModelCardVersionsOutput, error) +} + +var _ ListModelCardVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelCardVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelCards.go b/service/sagemaker/api_op_ListModelCards.go index 0493ef2a11c..b8939e1f73a 100644 --- a/service/sagemaker/api_op_ListModelCards.go +++ b/service/sagemaker/api_op_ListModelCards.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListModelCardsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelCards(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListModelCardsMiddlewares(stack *middleware.Stack, return nil } -// ListModelCardsAPIClient is a client that implements the ListModelCards -// operation. -type ListModelCardsAPIClient interface { - ListModelCards(context.Context, *ListModelCardsInput, ...func(*Options)) (*ListModelCardsOutput, error) -} - -var _ ListModelCardsAPIClient = (*Client)(nil) - // ListModelCardsPaginatorOptions is the paginator options for ListModelCards type ListModelCardsPaginatorOptions struct { // The maximum number of model cards to list. @@ -227,6 +222,9 @@ func (p *ListModelCardsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelCards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListModelCardsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListModelCardsAPIClient is a client that implements the ListModelCards +// operation. +type ListModelCardsAPIClient interface { + ListModelCards(context.Context, *ListModelCardsInput, ...func(*Options)) (*ListModelCardsOutput, error) +} + +var _ ListModelCardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelCards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go b/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go index 6ad78e487e3..2b8e1926b93 100644 --- a/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go +++ b/service/sagemaker/api_op_ListModelExplainabilityJobDefinitions.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListModelExplainabilityJobDefinitionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelExplainabilityJobDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListModelExplainabilityJobDefinitionsMiddlewares(st return nil } -// ListModelExplainabilityJobDefinitionsAPIClient is a client that implements the -// ListModelExplainabilityJobDefinitions operation. -type ListModelExplainabilityJobDefinitionsAPIClient interface { - ListModelExplainabilityJobDefinitions(context.Context, *ListModelExplainabilityJobDefinitionsInput, ...func(*Options)) (*ListModelExplainabilityJobDefinitionsOutput, error) -} - -var _ ListModelExplainabilityJobDefinitionsAPIClient = (*Client)(nil) - // ListModelExplainabilityJobDefinitionsPaginatorOptions is the paginator options // for ListModelExplainabilityJobDefinitions type ListModelExplainabilityJobDefinitionsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListModelExplainabilityJobDefinitionsPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelExplainabilityJobDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListModelExplainabilityJobDefinitionsPaginator) NextPage(ctx context.Co return result, nil } +// ListModelExplainabilityJobDefinitionsAPIClient is a client that implements the +// ListModelExplainabilityJobDefinitions operation. +type ListModelExplainabilityJobDefinitionsAPIClient interface { + ListModelExplainabilityJobDefinitions(context.Context, *ListModelExplainabilityJobDefinitionsInput, ...func(*Options)) (*ListModelExplainabilityJobDefinitionsOutput, error) +} + +var _ ListModelExplainabilityJobDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelExplainabilityJobDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelMetadata.go b/service/sagemaker/api_op_ListModelMetadata.go index ee6b68cb10b..c3baba6f12f 100644 --- a/service/sagemaker/api_op_ListModelMetadata.go +++ b/service/sagemaker/api_op_ListModelMetadata.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListModelMetadataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListModelMetadataValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListModelMetadataMiddlewares(stack *middleware.Stac return nil } -// ListModelMetadataAPIClient is a client that implements the ListModelMetadata -// operation. -type ListModelMetadataAPIClient interface { - ListModelMetadata(context.Context, *ListModelMetadataInput, ...func(*Options)) (*ListModelMetadataOutput, error) -} - -var _ ListModelMetadataAPIClient = (*Client)(nil) - // ListModelMetadataPaginatorOptions is the paginator options for ListModelMetadata type ListModelMetadataPaginatorOptions struct { // The maximum number of models to return in the response. @@ -216,6 +211,9 @@ func (p *ListModelMetadataPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelMetadata(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListModelMetadataPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListModelMetadataAPIClient is a client that implements the ListModelMetadata +// operation. +type ListModelMetadataAPIClient interface { + ListModelMetadata(context.Context, *ListModelMetadataInput, ...func(*Options)) (*ListModelMetadataOutput, error) +} + +var _ ListModelMetadataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelPackageGroups.go b/service/sagemaker/api_op_ListModelPackageGroups.go index b9106ec01b6..b5ceafb25c1 100644 --- a/service/sagemaker/api_op_ListModelPackageGroups.go +++ b/service/sagemaker/api_op_ListModelPackageGroups.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListModelPackageGroupsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelPackageGroups(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListModelPackageGroupsMiddlewares(stack *middleware return nil } -// ListModelPackageGroupsAPIClient is a client that implements the -// ListModelPackageGroups operation. -type ListModelPackageGroupsAPIClient interface { - ListModelPackageGroups(context.Context, *ListModelPackageGroupsInput, ...func(*Options)) (*ListModelPackageGroupsOutput, error) -} - -var _ ListModelPackageGroupsAPIClient = (*Client)(nil) - // ListModelPackageGroupsPaginatorOptions is the paginator options for // ListModelPackageGroups type ListModelPackageGroupsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListModelPackageGroupsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelPackageGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListModelPackageGroupsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListModelPackageGroupsAPIClient is a client that implements the +// ListModelPackageGroups operation. +type ListModelPackageGroupsAPIClient interface { + ListModelPackageGroups(context.Context, *ListModelPackageGroupsInput, ...func(*Options)) (*ListModelPackageGroupsOutput, error) +} + +var _ ListModelPackageGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelPackageGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelPackages.go b/service/sagemaker/api_op_ListModelPackages.go index 43d97906cf5..9197e02e9a6 100644 --- a/service/sagemaker/api_op_ListModelPackages.go +++ b/service/sagemaker/api_op_ListModelPackages.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListModelPackagesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelPackages(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListModelPackagesMiddlewares(stack *middleware.Stac return nil } -// ListModelPackagesAPIClient is a client that implements the ListModelPackages -// operation. -type ListModelPackagesAPIClient interface { - ListModelPackages(context.Context, *ListModelPackagesInput, ...func(*Options)) (*ListModelPackagesOutput, error) -} - -var _ ListModelPackagesAPIClient = (*Client)(nil) - // ListModelPackagesPaginatorOptions is the paginator options for ListModelPackages type ListModelPackagesPaginatorOptions struct { // The maximum number of model packages to return in the response. @@ -245,6 +240,9 @@ func (p *ListModelPackagesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListModelPackagesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListModelPackagesAPIClient is a client that implements the ListModelPackages +// operation. +type ListModelPackagesAPIClient interface { + ListModelPackages(context.Context, *ListModelPackagesInput, ...func(*Options)) (*ListModelPackagesOutput, error) +} + +var _ ListModelPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModelQualityJobDefinitions.go b/service/sagemaker/api_op_ListModelQualityJobDefinitions.go index 698a17d42ba..d485c590466 100644 --- a/service/sagemaker/api_op_ListModelQualityJobDefinitions.go +++ b/service/sagemaker/api_op_ListModelQualityJobDefinitions.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListModelQualityJobDefinitionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModelQualityJobDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListModelQualityJobDefinitionsMiddlewares(stack *mi return nil } -// ListModelQualityJobDefinitionsAPIClient is a client that implements the -// ListModelQualityJobDefinitions operation. -type ListModelQualityJobDefinitionsAPIClient interface { - ListModelQualityJobDefinitions(context.Context, *ListModelQualityJobDefinitionsInput, ...func(*Options)) (*ListModelQualityJobDefinitionsOutput, error) -} - -var _ ListModelQualityJobDefinitionsAPIClient = (*Client)(nil) - // ListModelQualityJobDefinitionsPaginatorOptions is the paginator options for // ListModelQualityJobDefinitions type ListModelQualityJobDefinitionsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListModelQualityJobDefinitionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModelQualityJobDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListModelQualityJobDefinitionsPaginator) NextPage(ctx context.Context, return result, nil } +// ListModelQualityJobDefinitionsAPIClient is a client that implements the +// ListModelQualityJobDefinitions operation. +type ListModelQualityJobDefinitionsAPIClient interface { + ListModelQualityJobDefinitions(context.Context, *ListModelQualityJobDefinitionsInput, ...func(*Options)) (*ListModelQualityJobDefinitionsOutput, error) +} + +var _ ListModelQualityJobDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModelQualityJobDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListModels.go b/service/sagemaker/api_op_ListModels.go index e5c0510a58d..4012b71e689 100644 --- a/service/sagemaker/api_op_ListModels.go +++ b/service/sagemaker/api_op_ListModels.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListModelsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListModels(options.Region), middleware.Before); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListModelsMiddlewares(stack *middleware.Stack, opti return nil } -// ListModelsAPIClient is a client that implements the ListModels operation. -type ListModelsAPIClient interface { - ListModels(context.Context, *ListModelsInput, ...func(*Options)) (*ListModelsOutput, error) -} - -var _ ListModelsAPIClient = (*Client)(nil) - // ListModelsPaginatorOptions is the paginator options for ListModels type ListModelsPaginatorOptions struct { // The maximum number of models to return in the response. @@ -224,6 +220,9 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListModelsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListModelsAPIClient is a client that implements the ListModels operation. +type ListModelsAPIClient interface { + ListModels(context.Context, *ListModelsInput, ...func(*Options)) (*ListModelsOutput, error) +} + +var _ ListModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListMonitoringAlertHistory.go b/service/sagemaker/api_op_ListMonitoringAlertHistory.go index 41b8b5a7955..c773d7a3b93 100644 --- a/service/sagemaker/api_op_ListMonitoringAlertHistory.go +++ b/service/sagemaker/api_op_ListMonitoringAlertHistory.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListMonitoringAlertHistoryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMonitoringAlertHistory(options.Region), middleware.Before); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListMonitoringAlertHistoryMiddlewares(stack *middle return nil } -// ListMonitoringAlertHistoryAPIClient is a client that implements the -// ListMonitoringAlertHistory operation. -type ListMonitoringAlertHistoryAPIClient interface { - ListMonitoringAlertHistory(context.Context, *ListMonitoringAlertHistoryInput, ...func(*Options)) (*ListMonitoringAlertHistoryOutput, error) -} - -var _ ListMonitoringAlertHistoryAPIClient = (*Client)(nil) - // ListMonitoringAlertHistoryPaginatorOptions is the paginator options for // ListMonitoringAlertHistory type ListMonitoringAlertHistoryPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListMonitoringAlertHistoryPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitoringAlertHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListMonitoringAlertHistoryPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListMonitoringAlertHistoryAPIClient is a client that implements the +// ListMonitoringAlertHistory operation. +type ListMonitoringAlertHistoryAPIClient interface { + ListMonitoringAlertHistory(context.Context, *ListMonitoringAlertHistoryInput, ...func(*Options)) (*ListMonitoringAlertHistoryOutput, error) +} + +var _ ListMonitoringAlertHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitoringAlertHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListMonitoringAlerts.go b/service/sagemaker/api_op_ListMonitoringAlerts.go index b5a5849a3a0..0957d0b8aca 100644 --- a/service/sagemaker/api_op_ListMonitoringAlerts.go +++ b/service/sagemaker/api_op_ListMonitoringAlerts.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListMonitoringAlertsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMonitoringAlertsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListMonitoringAlertsMiddlewares(stack *middleware.S return nil } -// ListMonitoringAlertsAPIClient is a client that implements the -// ListMonitoringAlerts operation. -type ListMonitoringAlertsAPIClient interface { - ListMonitoringAlerts(context.Context, *ListMonitoringAlertsInput, ...func(*Options)) (*ListMonitoringAlertsOutput, error) -} - -var _ ListMonitoringAlertsAPIClient = (*Client)(nil) - // ListMonitoringAlertsPaginatorOptions is the paginator options for // ListMonitoringAlerts type ListMonitoringAlertsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListMonitoringAlertsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitoringAlerts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListMonitoringAlertsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListMonitoringAlertsAPIClient is a client that implements the +// ListMonitoringAlerts operation. +type ListMonitoringAlertsAPIClient interface { + ListMonitoringAlerts(context.Context, *ListMonitoringAlertsInput, ...func(*Options)) (*ListMonitoringAlertsOutput, error) +} + +var _ ListMonitoringAlertsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitoringAlerts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListMonitoringExecutions.go b/service/sagemaker/api_op_ListMonitoringExecutions.go index 1fddd0a62f3..70c91fd2e81 100644 --- a/service/sagemaker/api_op_ListMonitoringExecutions.go +++ b/service/sagemaker/api_op_ListMonitoringExecutions.go @@ -158,6 +158,9 @@ func (c *Client) addOperationListMonitoringExecutionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMonitoringExecutions(options.Region), middleware.Before); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListMonitoringExecutionsMiddlewares(stack *middlewa return nil } -// ListMonitoringExecutionsAPIClient is a client that implements the -// ListMonitoringExecutions operation. -type ListMonitoringExecutionsAPIClient interface { - ListMonitoringExecutions(context.Context, *ListMonitoringExecutionsInput, ...func(*Options)) (*ListMonitoringExecutionsOutput, error) -} - -var _ ListMonitoringExecutionsAPIClient = (*Client)(nil) - // ListMonitoringExecutionsPaginatorOptions is the paginator options for // ListMonitoringExecutions type ListMonitoringExecutionsPaginatorOptions struct { @@ -252,6 +247,9 @@ func (p *ListMonitoringExecutionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitoringExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *ListMonitoringExecutionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListMonitoringExecutionsAPIClient is a client that implements the +// ListMonitoringExecutions operation. +type ListMonitoringExecutionsAPIClient interface { + ListMonitoringExecutions(context.Context, *ListMonitoringExecutionsInput, ...func(*Options)) (*ListMonitoringExecutionsOutput, error) +} + +var _ ListMonitoringExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitoringExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListMonitoringSchedules.go b/service/sagemaker/api_op_ListMonitoringSchedules.go index b9d09f27e6e..dd490bdb2ff 100644 --- a/service/sagemaker/api_op_ListMonitoringSchedules.go +++ b/service/sagemaker/api_op_ListMonitoringSchedules.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListMonitoringSchedulesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMonitoringSchedules(options.Region), middleware.Before); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationListMonitoringSchedulesMiddlewares(stack *middlewar return nil } -// ListMonitoringSchedulesAPIClient is a client that implements the -// ListMonitoringSchedules operation. -type ListMonitoringSchedulesAPIClient interface { - ListMonitoringSchedules(context.Context, *ListMonitoringSchedulesInput, ...func(*Options)) (*ListMonitoringSchedulesOutput, error) -} - -var _ ListMonitoringSchedulesAPIClient = (*Client)(nil) - // ListMonitoringSchedulesPaginatorOptions is the paginator options for // ListMonitoringSchedules type ListMonitoringSchedulesPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *ListMonitoringSchedulesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMonitoringSchedules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *ListMonitoringSchedulesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListMonitoringSchedulesAPIClient is a client that implements the +// ListMonitoringSchedules operation. +type ListMonitoringSchedulesAPIClient interface { + ListMonitoringSchedules(context.Context, *ListMonitoringSchedulesInput, ...func(*Options)) (*ListMonitoringSchedulesOutput, error) +} + +var _ ListMonitoringSchedulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMonitoringSchedules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go b/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go index 34b9e5c7ec3..09860d78ad3 100644 --- a/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go +++ b/service/sagemaker/api_op_ListNotebookInstanceLifecycleConfigs.go @@ -143,6 +143,9 @@ func (c *Client) addOperationListNotebookInstanceLifecycleConfigsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNotebookInstanceLifecycleConfigs(options.Region), middleware.Before); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListNotebookInstanceLifecycleConfigsMiddlewares(sta return nil } -// ListNotebookInstanceLifecycleConfigsAPIClient is a client that implements the -// ListNotebookInstanceLifecycleConfigs operation. -type ListNotebookInstanceLifecycleConfigsAPIClient interface { - ListNotebookInstanceLifecycleConfigs(context.Context, *ListNotebookInstanceLifecycleConfigsInput, ...func(*Options)) (*ListNotebookInstanceLifecycleConfigsOutput, error) -} - -var _ ListNotebookInstanceLifecycleConfigsAPIClient = (*Client)(nil) - // ListNotebookInstanceLifecycleConfigsPaginatorOptions is the paginator options // for ListNotebookInstanceLifecycleConfigs type ListNotebookInstanceLifecycleConfigsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListNotebookInstanceLifecycleConfigsPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotebookInstanceLifecycleConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListNotebookInstanceLifecycleConfigsPaginator) NextPage(ctx context.Con return result, nil } +// ListNotebookInstanceLifecycleConfigsAPIClient is a client that implements the +// ListNotebookInstanceLifecycleConfigs operation. +type ListNotebookInstanceLifecycleConfigsAPIClient interface { + ListNotebookInstanceLifecycleConfigs(context.Context, *ListNotebookInstanceLifecycleConfigsInput, ...func(*Options)) (*ListNotebookInstanceLifecycleConfigsOutput, error) +} + +var _ ListNotebookInstanceLifecycleConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotebookInstanceLifecycleConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListNotebookInstances.go b/service/sagemaker/api_op_ListNotebookInstances.go index 64f4c476fd3..4e7befdee56 100644 --- a/service/sagemaker/api_op_ListNotebookInstances.go +++ b/service/sagemaker/api_op_ListNotebookInstances.go @@ -164,6 +164,9 @@ func (c *Client) addOperationListNotebookInstancesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNotebookInstances(options.Region), middleware.Before); err != nil { return err } @@ -185,14 +188,6 @@ func (c *Client) addOperationListNotebookInstancesMiddlewares(stack *middleware. return nil } -// ListNotebookInstancesAPIClient is a client that implements the -// ListNotebookInstances operation. -type ListNotebookInstancesAPIClient interface { - ListNotebookInstances(context.Context, *ListNotebookInstancesInput, ...func(*Options)) (*ListNotebookInstancesOutput, error) -} - -var _ ListNotebookInstancesAPIClient = (*Client)(nil) - // ListNotebookInstancesPaginatorOptions is the paginator options for // ListNotebookInstances type ListNotebookInstancesPaginatorOptions struct { @@ -257,6 +252,9 @@ func (p *ListNotebookInstancesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotebookInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *ListNotebookInstancesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListNotebookInstancesAPIClient is a client that implements the +// ListNotebookInstances operation. +type ListNotebookInstancesAPIClient interface { + ListNotebookInstances(context.Context, *ListNotebookInstancesInput, ...func(*Options)) (*ListNotebookInstancesOutput, error) +} + +var _ ListNotebookInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotebookInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListPipelineExecutionSteps.go b/service/sagemaker/api_op_ListPipelineExecutionSteps.go index a722c5813b6..221cc00bcec 100644 --- a/service/sagemaker/api_op_ListPipelineExecutionSteps.go +++ b/service/sagemaker/api_op_ListPipelineExecutionSteps.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListPipelineExecutionStepsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelineExecutionSteps(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListPipelineExecutionStepsMiddlewares(stack *middle return nil } -// ListPipelineExecutionStepsAPIClient is a client that implements the -// ListPipelineExecutionSteps operation. -type ListPipelineExecutionStepsAPIClient interface { - ListPipelineExecutionSteps(context.Context, *ListPipelineExecutionStepsInput, ...func(*Options)) (*ListPipelineExecutionStepsOutput, error) -} - -var _ ListPipelineExecutionStepsAPIClient = (*Client)(nil) - // ListPipelineExecutionStepsPaginatorOptions is the paginator options for // ListPipelineExecutionSteps type ListPipelineExecutionStepsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListPipelineExecutionStepsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelineExecutionSteps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListPipelineExecutionStepsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPipelineExecutionStepsAPIClient is a client that implements the +// ListPipelineExecutionSteps operation. +type ListPipelineExecutionStepsAPIClient interface { + ListPipelineExecutionSteps(context.Context, *ListPipelineExecutionStepsInput, ...func(*Options)) (*ListPipelineExecutionStepsOutput, error) +} + +var _ ListPipelineExecutionStepsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelineExecutionSteps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListPipelineExecutions.go b/service/sagemaker/api_op_ListPipelineExecutions.go index 772ce397d1a..cf2744729ce 100644 --- a/service/sagemaker/api_op_ListPipelineExecutions.go +++ b/service/sagemaker/api_op_ListPipelineExecutions.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListPipelineExecutionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPipelineExecutionsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListPipelineExecutionsMiddlewares(stack *middleware return nil } -// ListPipelineExecutionsAPIClient is a client that implements the -// ListPipelineExecutions operation. -type ListPipelineExecutionsAPIClient interface { - ListPipelineExecutions(context.Context, *ListPipelineExecutionsInput, ...func(*Options)) (*ListPipelineExecutionsOutput, error) -} - -var _ ListPipelineExecutionsAPIClient = (*Client)(nil) - // ListPipelineExecutionsPaginatorOptions is the paginator options for // ListPipelineExecutions type ListPipelineExecutionsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListPipelineExecutionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelineExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListPipelineExecutionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListPipelineExecutionsAPIClient is a client that implements the +// ListPipelineExecutions operation. +type ListPipelineExecutionsAPIClient interface { + ListPipelineExecutions(context.Context, *ListPipelineExecutionsInput, ...func(*Options)) (*ListPipelineExecutionsOutput, error) +} + +var _ ListPipelineExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelineExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListPipelineParametersForExecution.go b/service/sagemaker/api_op_ListPipelineParametersForExecution.go index 29769ae59e6..aa78da6346b 100644 --- a/service/sagemaker/api_op_ListPipelineParametersForExecution.go +++ b/service/sagemaker/api_op_ListPipelineParametersForExecution.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPipelineParametersForExecutionMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPipelineParametersForExecutionValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPipelineParametersForExecutionMiddlewares(stack return nil } -// ListPipelineParametersForExecutionAPIClient is a client that implements the -// ListPipelineParametersForExecution operation. -type ListPipelineParametersForExecutionAPIClient interface { - ListPipelineParametersForExecution(context.Context, *ListPipelineParametersForExecutionInput, ...func(*Options)) (*ListPipelineParametersForExecutionOutput, error) -} - -var _ ListPipelineParametersForExecutionAPIClient = (*Client)(nil) - // ListPipelineParametersForExecutionPaginatorOptions is the paginator options for // ListPipelineParametersForExecution type ListPipelineParametersForExecutionPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListPipelineParametersForExecutionPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelineParametersForExecution(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListPipelineParametersForExecutionPaginator) NextPage(ctx context.Conte return result, nil } +// ListPipelineParametersForExecutionAPIClient is a client that implements the +// ListPipelineParametersForExecution operation. +type ListPipelineParametersForExecutionAPIClient interface { + ListPipelineParametersForExecution(context.Context, *ListPipelineParametersForExecutionInput, ...func(*Options)) (*ListPipelineParametersForExecutionOutput, error) +} + +var _ ListPipelineParametersForExecutionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelineParametersForExecution(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListPipelines.go b/service/sagemaker/api_op_ListPipelines.go index f46c32c4614..6896f5d8c1e 100644 --- a/service/sagemaker/api_op_ListPipelines.go +++ b/service/sagemaker/api_op_ListPipelines.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPipelines(options.Region), middleware.Before); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListPipelinesMiddlewares(stack *middleware.Stack, o return nil } -// ListPipelinesAPIClient is a client that implements the ListPipelines operation. -type ListPipelinesAPIClient interface { - ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) -} - -var _ ListPipelinesAPIClient = (*Client)(nil) - // ListPipelinesPaginatorOptions is the paginator options for ListPipelines type ListPipelinesPaginatorOptions struct { // The maximum number of pipelines to return in the response. @@ -224,6 +220,9 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPipelines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListPipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListPipelinesAPIClient is a client that implements the ListPipelines operation. +type ListPipelinesAPIClient interface { + ListPipelines(context.Context, *ListPipelinesInput, ...func(*Options)) (*ListPipelinesOutput, error) +} + +var _ ListPipelinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPipelines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListProcessingJobs.go b/service/sagemaker/api_op_ListProcessingJobs.go index 7476a3d071c..6914c5988bc 100644 --- a/service/sagemaker/api_op_ListProcessingJobs.go +++ b/service/sagemaker/api_op_ListProcessingJobs.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListProcessingJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProcessingJobs(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListProcessingJobsMiddlewares(stack *middleware.Sta return nil } -// ListProcessingJobsAPIClient is a client that implements the ListProcessingJobs -// operation. -type ListProcessingJobsAPIClient interface { - ListProcessingJobs(context.Context, *ListProcessingJobsInput, ...func(*Options)) (*ListProcessingJobsOutput, error) -} - -var _ ListProcessingJobsAPIClient = (*Client)(nil) - // ListProcessingJobsPaginatorOptions is the paginator options for // ListProcessingJobs type ListProcessingJobsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *ListProcessingJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProcessingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListProcessingJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListProcessingJobsAPIClient is a client that implements the ListProcessingJobs +// operation. +type ListProcessingJobsAPIClient interface { + ListProcessingJobs(context.Context, *ListProcessingJobsInput, ...func(*Options)) (*ListProcessingJobsOutput, error) +} + +var _ ListProcessingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProcessingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListProjects.go b/service/sagemaker/api_op_ListProjects.go index 5ea2a6c5238..b04a42677d8 100644 --- a/service/sagemaker/api_op_ListProjects.go +++ b/service/sagemaker/api_op_ListProjects.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, op return nil } -// ListProjectsAPIClient is a client that implements the ListProjects operation. -type ListProjectsAPIClient interface { - ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) -} - -var _ ListProjectsAPIClient = (*Client)(nil) - // ListProjectsPaginatorOptions is the paginator options for ListProjects type ListProjectsPaginatorOptions struct { // The maximum number of projects to return in the response. @@ -223,6 +219,9 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProjects(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListProjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProjectsAPIClient is a client that implements the ListProjects operation. +type ListProjectsAPIClient interface { + ListProjects(context.Context, *ListProjectsInput, ...func(*Options)) (*ListProjectsOutput, error) +} + +var _ ListProjectsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListResourceCatalogs.go b/service/sagemaker/api_op_ListResourceCatalogs.go index 8daab47bd33..bc1eaf2c2ae 100644 --- a/service/sagemaker/api_op_ListResourceCatalogs.go +++ b/service/sagemaker/api_op_ListResourceCatalogs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListResourceCatalogsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceCatalogs(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListResourceCatalogsMiddlewares(stack *middleware.S return nil } -// ListResourceCatalogsAPIClient is a client that implements the -// ListResourceCatalogs operation. -type ListResourceCatalogsAPIClient interface { - ListResourceCatalogs(context.Context, *ListResourceCatalogsInput, ...func(*Options)) (*ListResourceCatalogsOutput, error) -} - -var _ ListResourceCatalogsAPIClient = (*Client)(nil) - // ListResourceCatalogsPaginatorOptions is the paginator options for // ListResourceCatalogs type ListResourceCatalogsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListResourceCatalogsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceCatalogs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListResourceCatalogsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListResourceCatalogsAPIClient is a client that implements the +// ListResourceCatalogs operation. +type ListResourceCatalogsAPIClient interface { + ListResourceCatalogs(context.Context, *ListResourceCatalogsInput, ...func(*Options)) (*ListResourceCatalogsOutput, error) +} + +var _ ListResourceCatalogsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceCatalogs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListSpaces.go b/service/sagemaker/api_op_ListSpaces.go index 806123db9f0..74702466b95 100644 --- a/service/sagemaker/api_op_ListSpaces.go +++ b/service/sagemaker/api_op_ListSpaces.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListSpacesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSpaces(options.Region), middleware.Before); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListSpacesMiddlewares(stack *middleware.Stack, opti return nil } -// ListSpacesAPIClient is a client that implements the ListSpaces operation. -type ListSpacesAPIClient interface { - ListSpaces(context.Context, *ListSpacesInput, ...func(*Options)) (*ListSpacesOutput, error) -} - -var _ ListSpacesAPIClient = (*Client)(nil) - // ListSpacesPaginatorOptions is the paginator options for ListSpaces type ListSpacesPaginatorOptions struct { // This parameter defines the maximum number of results that can be return in a @@ -225,6 +221,9 @@ func (p *ListSpacesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSpaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListSpacesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListSpacesAPIClient is a client that implements the ListSpaces operation. +type ListSpacesAPIClient interface { + ListSpaces(context.Context, *ListSpacesInput, ...func(*Options)) (*ListSpacesOutput, error) +} + +var _ ListSpacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSpaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListStageDevices.go b/service/sagemaker/api_op_ListStageDevices.go index cac00ae8302..f3acf166aaf 100644 --- a/service/sagemaker/api_op_ListStageDevices.go +++ b/service/sagemaker/api_op_ListStageDevices.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListStageDevicesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStageDevicesValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListStageDevicesMiddlewares(stack *middleware.Stack return nil } -// ListStageDevicesAPIClient is a client that implements the ListStageDevices -// operation. -type ListStageDevicesAPIClient interface { - ListStageDevices(context.Context, *ListStageDevicesInput, ...func(*Options)) (*ListStageDevicesOutput, error) -} - -var _ ListStageDevicesAPIClient = (*Client)(nil) - // ListStageDevicesPaginatorOptions is the paginator options for ListStageDevices type ListStageDevicesPaginatorOptions struct { // The maximum number of requests to select. @@ -222,6 +217,9 @@ func (p *ListStageDevicesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStageDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListStageDevicesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListStageDevicesAPIClient is a client that implements the ListStageDevices +// operation. +type ListStageDevicesAPIClient interface { + ListStageDevices(context.Context, *ListStageDevicesInput, ...func(*Options)) (*ListStageDevicesOutput, error) +} + +var _ ListStageDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStageDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListStudioLifecycleConfigs.go b/service/sagemaker/api_op_ListStudioLifecycleConfigs.go index 0a46094903d..3aba7bdcbc3 100644 --- a/service/sagemaker/api_op_ListStudioLifecycleConfigs.go +++ b/service/sagemaker/api_op_ListStudioLifecycleConfigs.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListStudioLifecycleConfigsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStudioLifecycleConfigs(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListStudioLifecycleConfigsMiddlewares(stack *middle return nil } -// ListStudioLifecycleConfigsAPIClient is a client that implements the -// ListStudioLifecycleConfigs operation. -type ListStudioLifecycleConfigsAPIClient interface { - ListStudioLifecycleConfigs(context.Context, *ListStudioLifecycleConfigsInput, ...func(*Options)) (*ListStudioLifecycleConfigsOutput, error) -} - -var _ ListStudioLifecycleConfigsAPIClient = (*Client)(nil) - // ListStudioLifecycleConfigsPaginatorOptions is the paginator options for // ListStudioLifecycleConfigs type ListStudioLifecycleConfigsPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *ListStudioLifecycleConfigsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStudioLifecycleConfigs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListStudioLifecycleConfigsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListStudioLifecycleConfigsAPIClient is a client that implements the +// ListStudioLifecycleConfigs operation. +type ListStudioLifecycleConfigsAPIClient interface { + ListStudioLifecycleConfigs(context.Context, *ListStudioLifecycleConfigsInput, ...func(*Options)) (*ListStudioLifecycleConfigsOutput, error) +} + +var _ ListStudioLifecycleConfigsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStudioLifecycleConfigs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListSubscribedWorkteams.go b/service/sagemaker/api_op_ListSubscribedWorkteams.go index 5c727b8b6bb..be0498f646a 100644 --- a/service/sagemaker/api_op_ListSubscribedWorkteams.go +++ b/service/sagemaker/api_op_ListSubscribedWorkteams.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSubscribedWorkteamsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscribedWorkteams(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListSubscribedWorkteamsMiddlewares(stack *middlewar return nil } -// ListSubscribedWorkteamsAPIClient is a client that implements the -// ListSubscribedWorkteams operation. -type ListSubscribedWorkteamsAPIClient interface { - ListSubscribedWorkteams(context.Context, *ListSubscribedWorkteamsInput, ...func(*Options)) (*ListSubscribedWorkteamsOutput, error) -} - -var _ ListSubscribedWorkteamsAPIClient = (*Client)(nil) - // ListSubscribedWorkteamsPaginatorOptions is the paginator options for // ListSubscribedWorkteams type ListSubscribedWorkteamsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListSubscribedWorkteamsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscribedWorkteams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListSubscribedWorkteamsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSubscribedWorkteamsAPIClient is a client that implements the +// ListSubscribedWorkteams operation. +type ListSubscribedWorkteamsAPIClient interface { + ListSubscribedWorkteams(context.Context, *ListSubscribedWorkteamsInput, ...func(*Options)) (*ListSubscribedWorkteamsOutput, error) +} + +var _ ListSubscribedWorkteamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscribedWorkteams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListTags.go b/service/sagemaker/api_op_ListTags.go index 4e8148366db..67b63b21328 100644 --- a/service/sagemaker/api_op_ListTags.go +++ b/service/sagemaker/api_op_ListTags.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListTagsMiddlewares(stack *middleware.Stack, option return nil } -// ListTagsAPIClient is a client that implements the ListTags operation. -type ListTagsAPIClient interface { - ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) -} - -var _ ListTagsAPIClient = (*Client)(nil) - // ListTagsPaginatorOptions is the paginator options for ListTags type ListTagsPaginatorOptions struct { // Maximum number of tags to return. @@ -212,6 +208,9 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTags(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListTagsAPIClient is a client that implements the ListTags operation. +type ListTagsAPIClient interface { + ListTags(context.Context, *ListTagsInput, ...func(*Options)) (*ListTagsOutput, error) +} + +var _ ListTagsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTags(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListTrainingJobs.go b/service/sagemaker/api_op_ListTrainingJobs.go index 44745b2efaf..55bfd1c21f9 100644 --- a/service/sagemaker/api_op_ListTrainingJobs.go +++ b/service/sagemaker/api_op_ListTrainingJobs.go @@ -165,6 +165,9 @@ func (c *Client) addOperationListTrainingJobsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrainingJobs(options.Region), middleware.Before); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationListTrainingJobsMiddlewares(stack *middleware.Stack return nil } -// ListTrainingJobsAPIClient is a client that implements the ListTrainingJobs -// operation. -type ListTrainingJobsAPIClient interface { - ListTrainingJobs(context.Context, *ListTrainingJobsInput, ...func(*Options)) (*ListTrainingJobsOutput, error) -} - -var _ ListTrainingJobsAPIClient = (*Client)(nil) - // ListTrainingJobsPaginatorOptions is the paginator options for ListTrainingJobs type ListTrainingJobsPaginatorOptions struct { // The maximum number of training jobs to return in the response. @@ -257,6 +252,9 @@ func (p *ListTrainingJobsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrainingJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *ListTrainingJobsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTrainingJobsAPIClient is a client that implements the ListTrainingJobs +// operation. +type ListTrainingJobsAPIClient interface { + ListTrainingJobs(context.Context, *ListTrainingJobsInput, ...func(*Options)) (*ListTrainingJobsOutput, error) +} + +var _ ListTrainingJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrainingJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go b/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go index 2a07aebf344..d1ca80d636e 100644 --- a/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go +++ b/service/sagemaker/api_op_ListTrainingJobsForHyperParameterTuningJob.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListTrainingJobsForHyperParameterTuningJobMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrainingJobsForHyperParameterTuningJobValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListTrainingJobsForHyperParameterTuningJobMiddlewar return nil } -// ListTrainingJobsForHyperParameterTuningJobAPIClient is a client that implements -// the ListTrainingJobsForHyperParameterTuningJob operation. -type ListTrainingJobsForHyperParameterTuningJobAPIClient interface { - ListTrainingJobsForHyperParameterTuningJob(context.Context, *ListTrainingJobsForHyperParameterTuningJobInput, ...func(*Options)) (*ListTrainingJobsForHyperParameterTuningJobOutput, error) -} - -var _ ListTrainingJobsForHyperParameterTuningJobAPIClient = (*Client)(nil) - // ListTrainingJobsForHyperParameterTuningJobPaginatorOptions is the paginator // options for ListTrainingJobsForHyperParameterTuningJob type ListTrainingJobsForHyperParameterTuningJobPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListTrainingJobsForHyperParameterTuningJobPaginator) NextPage(ctx conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrainingJobsForHyperParameterTuningJob(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListTrainingJobsForHyperParameterTuningJobPaginator) NextPage(ctx conte return result, nil } +// ListTrainingJobsForHyperParameterTuningJobAPIClient is a client that implements +// the ListTrainingJobsForHyperParameterTuningJob operation. +type ListTrainingJobsForHyperParameterTuningJobAPIClient interface { + ListTrainingJobsForHyperParameterTuningJob(context.Context, *ListTrainingJobsForHyperParameterTuningJobInput, ...func(*Options)) (*ListTrainingJobsForHyperParameterTuningJobOutput, error) +} + +var _ ListTrainingJobsForHyperParameterTuningJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrainingJobsForHyperParameterTuningJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListTransformJobs.go b/service/sagemaker/api_op_ListTransformJobs.go index c8dd04d1645..40aa91ea974 100644 --- a/service/sagemaker/api_op_ListTransformJobs.go +++ b/service/sagemaker/api_op_ListTransformJobs.go @@ -142,6 +142,9 @@ func (c *Client) addOperationListTransformJobsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTransformJobs(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListTransformJobsMiddlewares(stack *middleware.Stac return nil } -// ListTransformJobsAPIClient is a client that implements the ListTransformJobs -// operation. -type ListTransformJobsAPIClient interface { - ListTransformJobs(context.Context, *ListTransformJobsInput, ...func(*Options)) (*ListTransformJobsOutput, error) -} - -var _ ListTransformJobsAPIClient = (*Client)(nil) - // ListTransformJobsPaginatorOptions is the paginator options for ListTransformJobs type ListTransformJobsPaginatorOptions struct { // The maximum number of transform jobs to return in the response. The default @@ -235,6 +230,9 @@ func (p *ListTransformJobsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTransformJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListTransformJobsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListTransformJobsAPIClient is a client that implements the ListTransformJobs +// operation. +type ListTransformJobsAPIClient interface { + ListTransformJobs(context.Context, *ListTransformJobsInput, ...func(*Options)) (*ListTransformJobsOutput, error) +} + +var _ ListTransformJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTransformJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListTrialComponents.go b/service/sagemaker/api_op_ListTrialComponents.go index 9b02ddb3243..a0b9210fdde 100644 --- a/service/sagemaker/api_op_ListTrialComponents.go +++ b/service/sagemaker/api_op_ListTrialComponents.go @@ -148,6 +148,9 @@ func (c *Client) addOperationListTrialComponentsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrialComponents(options.Region), middleware.Before); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListTrialComponentsMiddlewares(stack *middleware.St return nil } -// ListTrialComponentsAPIClient is a client that implements the -// ListTrialComponents operation. -type ListTrialComponentsAPIClient interface { - ListTrialComponents(context.Context, *ListTrialComponentsInput, ...func(*Options)) (*ListTrialComponentsOutput, error) -} - -var _ ListTrialComponentsAPIClient = (*Client)(nil) - // ListTrialComponentsPaginatorOptions is the paginator options for // ListTrialComponents type ListTrialComponentsPaginatorOptions struct { @@ -242,6 +237,9 @@ func (p *ListTrialComponentsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrialComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListTrialComponentsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTrialComponentsAPIClient is a client that implements the +// ListTrialComponents operation. +type ListTrialComponentsAPIClient interface { + ListTrialComponents(context.Context, *ListTrialComponentsInput, ...func(*Options)) (*ListTrialComponentsOutput, error) +} + +var _ ListTrialComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrialComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListTrials.go b/service/sagemaker/api_op_ListTrials.go index 250a43b5828..cd3f18dbe81 100644 --- a/service/sagemaker/api_op_ListTrials.go +++ b/service/sagemaker/api_op_ListTrials.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListTrialsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrials(options.Region), middleware.Before); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListTrialsMiddlewares(stack *middleware.Stack, opti return nil } -// ListTrialsAPIClient is a client that implements the ListTrials operation. -type ListTrialsAPIClient interface { - ListTrials(context.Context, *ListTrialsInput, ...func(*Options)) (*ListTrialsOutput, error) -} - -var _ ListTrialsAPIClient = (*Client)(nil) - // ListTrialsPaginatorOptions is the paginator options for ListTrials type ListTrialsPaginatorOptions struct { // The maximum number of trials to return in the response. The default value is 10. @@ -226,6 +222,9 @@ func (p *ListTrialsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrials(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListTrialsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTrialsAPIClient is a client that implements the ListTrials operation. +type ListTrialsAPIClient interface { + ListTrials(context.Context, *ListTrialsInput, ...func(*Options)) (*ListTrialsOutput, error) +} + +var _ ListTrialsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrials(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListUserProfiles.go b/service/sagemaker/api_op_ListUserProfiles.go index 66b7526e9f5..5d34e323a41 100644 --- a/service/sagemaker/api_op_ListUserProfiles.go +++ b/service/sagemaker/api_op_ListUserProfiles.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListUserProfilesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserProfiles(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListUserProfilesMiddlewares(stack *middleware.Stack return nil } -// ListUserProfilesAPIClient is a client that implements the ListUserProfiles -// operation. -type ListUserProfilesAPIClient interface { - ListUserProfiles(context.Context, *ListUserProfilesInput, ...func(*Options)) (*ListUserProfilesOutput, error) -} - -var _ ListUserProfilesAPIClient = (*Client)(nil) - // ListUserProfilesPaginatorOptions is the paginator options for ListUserProfiles type ListUserProfilesPaginatorOptions struct { // This parameter defines the maximum number of results that can be return in a @@ -226,6 +221,9 @@ func (p *ListUserProfilesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListUserProfilesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListUserProfilesAPIClient is a client that implements the ListUserProfiles +// operation. +type ListUserProfilesAPIClient interface { + ListUserProfiles(context.Context, *ListUserProfilesInput, ...func(*Options)) (*ListUserProfilesOutput, error) +} + +var _ ListUserProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListWorkforces.go b/service/sagemaker/api_op_ListWorkforces.go index 63d9038c52f..ca2d0e0ec27 100644 --- a/service/sagemaker/api_op_ListWorkforces.go +++ b/service/sagemaker/api_op_ListWorkforces.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListWorkforcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkforces(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListWorkforcesMiddlewares(stack *middleware.Stack, return nil } -// ListWorkforcesAPIClient is a client that implements the ListWorkforces -// operation. -type ListWorkforcesAPIClient interface { - ListWorkforces(context.Context, *ListWorkforcesInput, ...func(*Options)) (*ListWorkforcesOutput, error) -} - -var _ ListWorkforcesAPIClient = (*Client)(nil) - // ListWorkforcesPaginatorOptions is the paginator options for ListWorkforces type ListWorkforcesPaginatorOptions struct { // The maximum number of workforces returned in the response. @@ -215,6 +210,9 @@ func (p *ListWorkforcesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkforces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListWorkforcesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListWorkforcesAPIClient is a client that implements the ListWorkforces +// operation. +type ListWorkforcesAPIClient interface { + ListWorkforces(context.Context, *ListWorkforcesInput, ...func(*Options)) (*ListWorkforcesOutput, error) +} + +var _ ListWorkforcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkforces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_ListWorkteams.go b/service/sagemaker/api_op_ListWorkteams.go index 8007827231e..63d2e5d8516 100644 --- a/service/sagemaker/api_op_ListWorkteams.go +++ b/service/sagemaker/api_op_ListWorkteams.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListWorkteamsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkteams(options.Region), middleware.Before); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListWorkteamsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkteamsAPIClient is a client that implements the ListWorkteams operation. -type ListWorkteamsAPIClient interface { - ListWorkteams(context.Context, *ListWorkteamsInput, ...func(*Options)) (*ListWorkteamsOutput, error) -} - -var _ ListWorkteamsAPIClient = (*Client)(nil) - // ListWorkteamsPaginatorOptions is the paginator options for ListWorkteams type ListWorkteamsPaginatorOptions struct { // The maximum number of work teams to return in each page of the response. @@ -218,6 +214,9 @@ func (p *ListWorkteamsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkteams(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *ListWorkteamsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkteamsAPIClient is a client that implements the ListWorkteams operation. +type ListWorkteamsAPIClient interface { + ListWorkteams(context.Context, *ListWorkteamsInput, ...func(*Options)) (*ListWorkteamsOutput, error) +} + +var _ ListWorkteamsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkteams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_PutModelPackageGroupPolicy.go b/service/sagemaker/api_op_PutModelPackageGroupPolicy.go index 8d5715a5a16..7cb0390c28c 100644 --- a/service/sagemaker/api_op_PutModelPackageGroupPolicy.go +++ b/service/sagemaker/api_op_PutModelPackageGroupPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutModelPackageGroupPolicyMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutModelPackageGroupPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_QueryLineage.go b/service/sagemaker/api_op_QueryLineage.go index a89bb9065aa..025e554e2da 100644 --- a/service/sagemaker/api_op_QueryLineage.go +++ b/service/sagemaker/api_op_QueryLineage.go @@ -154,6 +154,9 @@ func (c *Client) addOperationQueryLineageMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opQueryLineage(options.Region), middleware.Before); err != nil { return err } @@ -175,13 +178,6 @@ func (c *Client) addOperationQueryLineageMiddlewares(stack *middleware.Stack, op return nil } -// QueryLineageAPIClient is a client that implements the QueryLineage operation. -type QueryLineageAPIClient interface { - QueryLineage(context.Context, *QueryLineageInput, ...func(*Options)) (*QueryLineageOutput, error) -} - -var _ QueryLineageAPIClient = (*Client)(nil) - // QueryLineagePaginatorOptions is the paginator options for QueryLineage type QueryLineagePaginatorOptions struct { // Limits the number of vertices in the results. Use the NextToken in a response @@ -246,6 +242,9 @@ func (p *QueryLineagePaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.QueryLineage(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +264,13 @@ func (p *QueryLineagePaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// QueryLineageAPIClient is a client that implements the QueryLineage operation. +type QueryLineageAPIClient interface { + QueryLineage(context.Context, *QueryLineageInput, ...func(*Options)) (*QueryLineageOutput, error) +} + +var _ QueryLineageAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opQueryLineage(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_RegisterDevices.go b/service/sagemaker/api_op_RegisterDevices.go index d111fa892b0..74a39114567 100644 --- a/service/sagemaker/api_op_RegisterDevices.go +++ b/service/sagemaker/api_op_RegisterDevices.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRegisterDevicesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDevicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_RenderUiTemplate.go b/service/sagemaker/api_op_RenderUiTemplate.go index acbcd885efa..0209f707c59 100644 --- a/service/sagemaker/api_op_RenderUiTemplate.go +++ b/service/sagemaker/api_op_RenderUiTemplate.go @@ -131,6 +131,9 @@ func (c *Client) addOperationRenderUiTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRenderUiTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_RetryPipelineExecution.go b/service/sagemaker/api_op_RetryPipelineExecution.go index 6af3524f615..40705db6bb2 100644 --- a/service/sagemaker/api_op_RetryPipelineExecution.go +++ b/service/sagemaker/api_op_RetryPipelineExecution.go @@ -116,6 +116,9 @@ func (c *Client) addOperationRetryPipelineExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRetryPipelineExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_Search.go b/service/sagemaker/api_op_Search.go index cfe83c1294c..43cc89e77e8 100644 --- a/service/sagemaker/api_op_Search.go +++ b/service/sagemaker/api_op_Search.go @@ -157,6 +157,9 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchValidationMiddleware(stack); err != nil { return err } @@ -181,13 +184,6 @@ func (c *Client) addOperationSearchMiddlewares(stack *middleware.Stack, options return nil } -// SearchAPIClient is a client that implements the Search operation. -type SearchAPIClient interface { - Search(context.Context, *SearchInput, ...func(*Options)) (*SearchOutput, error) -} - -var _ SearchAPIClient = (*Client)(nil) - // SearchPaginatorOptions is the paginator options for Search type SearchPaginatorOptions struct { // The maximum number of results to return. @@ -251,6 +247,9 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Search(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +269,13 @@ func (p *SearchPaginator) NextPage(ctx context.Context, optFns ...func(*Options) return result, nil } +// SearchAPIClient is a client that implements the Search operation. +type SearchAPIClient interface { + Search(context.Context, *SearchInput, ...func(*Options)) (*SearchOutput, error) +} + +var _ SearchAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearch(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemaker/api_op_SendPipelineExecutionStepFailure.go b/service/sagemaker/api_op_SendPipelineExecutionStepFailure.go index 4bbf95d079a..a22c1b4c021 100644 --- a/service/sagemaker/api_op_SendPipelineExecutionStepFailure.go +++ b/service/sagemaker/api_op_SendPipelineExecutionStepFailure.go @@ -115,6 +115,9 @@ func (c *Client) addOperationSendPipelineExecutionStepFailureMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendPipelineExecutionStepFailureMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_SendPipelineExecutionStepSuccess.go b/service/sagemaker/api_op_SendPipelineExecutionStepSuccess.go index c2639f5a20b..23ebb7bf426 100644 --- a/service/sagemaker/api_op_SendPipelineExecutionStepSuccess.go +++ b/service/sagemaker/api_op_SendPipelineExecutionStepSuccess.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSendPipelineExecutionStepSuccessMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendPipelineExecutionStepSuccessMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_StartEdgeDeploymentStage.go b/service/sagemaker/api_op_StartEdgeDeploymentStage.go index a59fbe026fb..d091270d16e 100644 --- a/service/sagemaker/api_op_StartEdgeDeploymentStage.go +++ b/service/sagemaker/api_op_StartEdgeDeploymentStage.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStartEdgeDeploymentStageMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartEdgeDeploymentStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StartInferenceExperiment.go b/service/sagemaker/api_op_StartInferenceExperiment.go index af11f7b272c..e72aa04db17 100644 --- a/service/sagemaker/api_op_StartInferenceExperiment.go +++ b/service/sagemaker/api_op_StartInferenceExperiment.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartInferenceExperimentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartInferenceExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StartMonitoringSchedule.go b/service/sagemaker/api_op_StartMonitoringSchedule.go index 67b8b2543cf..30709d6dca4 100644 --- a/service/sagemaker/api_op_StartMonitoringSchedule.go +++ b/service/sagemaker/api_op_StartMonitoringSchedule.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStartMonitoringScheduleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMonitoringScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StartNotebookInstance.go b/service/sagemaker/api_op_StartNotebookInstance.go index 9bc378b44d4..e9c293650c2 100644 --- a/service/sagemaker/api_op_StartNotebookInstance.go +++ b/service/sagemaker/api_op_StartNotebookInstance.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStartNotebookInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartNotebookInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StartPipelineExecution.go b/service/sagemaker/api_op_StartPipelineExecution.go index 9f6c516b7b7..0681c4b32c4 100644 --- a/service/sagemaker/api_op_StartPipelineExecution.go +++ b/service/sagemaker/api_op_StartPipelineExecution.go @@ -128,6 +128,9 @@ func (c *Client) addOperationStartPipelineExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartPipelineExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_StopAutoMLJob.go b/service/sagemaker/api_op_StopAutoMLJob.go index 7889fd65536..87d875fe493 100644 --- a/service/sagemaker/api_op_StopAutoMLJob.go +++ b/service/sagemaker/api_op_StopAutoMLJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopAutoMLJobMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAutoMLJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopCompilationJob.go b/service/sagemaker/api_op_StopCompilationJob.go index 7df1d01861a..af66546a2ea 100644 --- a/service/sagemaker/api_op_StopCompilationJob.go +++ b/service/sagemaker/api_op_StopCompilationJob.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopCompilationJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCompilationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopEdgeDeploymentStage.go b/service/sagemaker/api_op_StopEdgeDeploymentStage.go index d2b80237a26..5068dff0cb3 100644 --- a/service/sagemaker/api_op_StopEdgeDeploymentStage.go +++ b/service/sagemaker/api_op_StopEdgeDeploymentStage.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopEdgeDeploymentStageMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEdgeDeploymentStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopEdgePackagingJob.go b/service/sagemaker/api_op_StopEdgePackagingJob.go index d7bd632ec8f..08621d41145 100644 --- a/service/sagemaker/api_op_StopEdgePackagingJob.go +++ b/service/sagemaker/api_op_StopEdgePackagingJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopEdgePackagingJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEdgePackagingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopHyperParameterTuningJob.go b/service/sagemaker/api_op_StopHyperParameterTuningJob.go index 377a2ac510d..3fec5c151c1 100644 --- a/service/sagemaker/api_op_StopHyperParameterTuningJob.go +++ b/service/sagemaker/api_op_StopHyperParameterTuningJob.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopHyperParameterTuningJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopHyperParameterTuningJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopInferenceExperiment.go b/service/sagemaker/api_op_StopInferenceExperiment.go index 7d078023d70..6cb46a1ab92 100644 --- a/service/sagemaker/api_op_StopInferenceExperiment.go +++ b/service/sagemaker/api_op_StopInferenceExperiment.go @@ -137,6 +137,9 @@ func (c *Client) addOperationStopInferenceExperimentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInferenceExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopInferenceRecommendationsJob.go b/service/sagemaker/api_op_StopInferenceRecommendationsJob.go index 5f687014000..dd6c0929c33 100644 --- a/service/sagemaker/api_op_StopInferenceRecommendationsJob.go +++ b/service/sagemaker/api_op_StopInferenceRecommendationsJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopInferenceRecommendationsJobMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopInferenceRecommendationsJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopLabelingJob.go b/service/sagemaker/api_op_StopLabelingJob.go index 5871f997f55..e35fdf9b561 100644 --- a/service/sagemaker/api_op_StopLabelingJob.go +++ b/service/sagemaker/api_op_StopLabelingJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationStopLabelingJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopLabelingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopMonitoringSchedule.go b/service/sagemaker/api_op_StopMonitoringSchedule.go index 823d52ad07f..9843133eeea 100644 --- a/service/sagemaker/api_op_StopMonitoringSchedule.go +++ b/service/sagemaker/api_op_StopMonitoringSchedule.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopMonitoringScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopMonitoringScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopNotebookInstance.go b/service/sagemaker/api_op_StopNotebookInstance.go index f39c71f72ad..19810479762 100644 --- a/service/sagemaker/api_op_StopNotebookInstance.go +++ b/service/sagemaker/api_op_StopNotebookInstance.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopNotebookInstanceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopNotebookInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopPipelineExecution.go b/service/sagemaker/api_op_StopPipelineExecution.go index f9cfd2d400a..4b7ac809725 100644 --- a/service/sagemaker/api_op_StopPipelineExecution.go +++ b/service/sagemaker/api_op_StopPipelineExecution.go @@ -136,6 +136,9 @@ func (c *Client) addOperationStopPipelineExecutionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStopPipelineExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemaker/api_op_StopProcessingJob.go b/service/sagemaker/api_op_StopProcessingJob.go index 4b26184ba82..a9dc0400cec 100644 --- a/service/sagemaker/api_op_StopProcessingJob.go +++ b/service/sagemaker/api_op_StopProcessingJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopProcessingJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopProcessingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopTrainingJob.go b/service/sagemaker/api_op_StopTrainingJob.go index 129c44b1ac5..6b785691a01 100644 --- a/service/sagemaker/api_op_StopTrainingJob.go +++ b/service/sagemaker/api_op_StopTrainingJob.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStopTrainingJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTrainingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_StopTransformJob.go b/service/sagemaker/api_op_StopTransformJob.go index 09d96327273..a4019b63cf8 100644 --- a/service/sagemaker/api_op_StopTransformJob.go +++ b/service/sagemaker/api_op_StopTransformJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopTransformJobMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTransformJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateAction.go b/service/sagemaker/api_op_UpdateAction.go index ba32b657ec8..3c8bd70c1d9 100644 --- a/service/sagemaker/api_op_UpdateAction.go +++ b/service/sagemaker/api_op_UpdateAction.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateActionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateAppImageConfig.go b/service/sagemaker/api_op_UpdateAppImageConfig.go index a56f3fe3d6b..f9111b9e7eb 100644 --- a/service/sagemaker/api_op_UpdateAppImageConfig.go +++ b/service/sagemaker/api_op_UpdateAppImageConfig.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateAppImageConfigMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAppImageConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateArtifact.go b/service/sagemaker/api_op_UpdateArtifact.go index 520c8574cc9..82bc46f4ff1 100644 --- a/service/sagemaker/api_op_UpdateArtifact.go +++ b/service/sagemaker/api_op_UpdateArtifact.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateArtifactMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateCluster.go b/service/sagemaker/api_op_UpdateCluster.go index 7d5b594a393..2db4939464b 100644 --- a/service/sagemaker/api_op_UpdateCluster.go +++ b/service/sagemaker/api_op_UpdateCluster.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateClusterSoftware.go b/service/sagemaker/api_op_UpdateClusterSoftware.go index 52c4a0cbdfe..7f932e717fa 100644 --- a/service/sagemaker/api_op_UpdateClusterSoftware.go +++ b/service/sagemaker/api_op_UpdateClusterSoftware.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateClusterSoftwareMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterSoftwareValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateCodeRepository.go b/service/sagemaker/api_op_UpdateCodeRepository.go index e9c34012109..1c72cf03942 100644 --- a/service/sagemaker/api_op_UpdateCodeRepository.go +++ b/service/sagemaker/api_op_UpdateCodeRepository.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateCodeRepositoryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCodeRepositoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateContext.go b/service/sagemaker/api_op_UpdateContext.go index 6da90b5390a..39aa59b2ccd 100644 --- a/service/sagemaker/api_op_UpdateContext.go +++ b/service/sagemaker/api_op_UpdateContext.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateContextMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContextValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateDeviceFleet.go b/service/sagemaker/api_op_UpdateDeviceFleet.go index ff5d70d2b65..a1e0b282339 100644 --- a/service/sagemaker/api_op_UpdateDeviceFleet.go +++ b/service/sagemaker/api_op_UpdateDeviceFleet.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateDeviceFleetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDeviceFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateDevices.go b/service/sagemaker/api_op_UpdateDevices.go index 2530e9ac07a..6e0b83a9593 100644 --- a/service/sagemaker/api_op_UpdateDevices.go +++ b/service/sagemaker/api_op_UpdateDevices.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateDevicesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDevicesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateDomain.go b/service/sagemaker/api_op_UpdateDomain.go index b6cb078fa93..1b561795f7c 100644 --- a/service/sagemaker/api_op_UpdateDomain.go +++ b/service/sagemaker/api_op_UpdateDomain.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateEndpoint.go b/service/sagemaker/api_op_UpdateEndpoint.go index e4581a0096c..d6a80904a5d 100644 --- a/service/sagemaker/api_op_UpdateEndpoint.go +++ b/service/sagemaker/api_op_UpdateEndpoint.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateEndpointWeightsAndCapacities.go b/service/sagemaker/api_op_UpdateEndpointWeightsAndCapacities.go index 816022bd9eb..77385764691 100644 --- a/service/sagemaker/api_op_UpdateEndpointWeightsAndCapacities.go +++ b/service/sagemaker/api_op_UpdateEndpointWeightsAndCapacities.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateEndpointWeightsAndCapacitiesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEndpointWeightsAndCapacitiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateExperiment.go b/service/sagemaker/api_op_UpdateExperiment.go index ea2df04a8c5..6a052582e41 100644 --- a/service/sagemaker/api_op_UpdateExperiment.go +++ b/service/sagemaker/api_op_UpdateExperiment.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateExperimentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateFeatureGroup.go b/service/sagemaker/api_op_UpdateFeatureGroup.go index ec2daf47a1a..1304dc64876 100644 --- a/service/sagemaker/api_op_UpdateFeatureGroup.go +++ b/service/sagemaker/api_op_UpdateFeatureGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateFeatureGroupMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFeatureGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateFeatureMetadata.go b/service/sagemaker/api_op_UpdateFeatureMetadata.go index e7a91420cbb..a5e2aafaba1 100644 --- a/service/sagemaker/api_op_UpdateFeatureMetadata.go +++ b/service/sagemaker/api_op_UpdateFeatureMetadata.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateFeatureMetadataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFeatureMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateHub.go b/service/sagemaker/api_op_UpdateHub.go index 37ada27d87d..04ba071be4b 100644 --- a/service/sagemaker/api_op_UpdateHub.go +++ b/service/sagemaker/api_op_UpdateHub.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateHubMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHubValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateImage.go b/service/sagemaker/api_op_UpdateImage.go index 9b2ff98a813..887d60f92da 100644 --- a/service/sagemaker/api_op_UpdateImage.go +++ b/service/sagemaker/api_op_UpdateImage.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateImageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateImageVersion.go b/service/sagemaker/api_op_UpdateImageVersion.go index 044f3014526..cd309921c2b 100644 --- a/service/sagemaker/api_op_UpdateImageVersion.go +++ b/service/sagemaker/api_op_UpdateImageVersion.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdateImageVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateImageVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateInferenceComponent.go b/service/sagemaker/api_op_UpdateInferenceComponent.go index 7317f9921c6..e76de001f09 100644 --- a/service/sagemaker/api_op_UpdateInferenceComponent.go +++ b/service/sagemaker/api_op_UpdateInferenceComponent.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateInferenceComponentMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInferenceComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateInferenceComponentRuntimeConfig.go b/service/sagemaker/api_op_UpdateInferenceComponentRuntimeConfig.go index 3a59faecc49..5e4868df283 100644 --- a/service/sagemaker/api_op_UpdateInferenceComponentRuntimeConfig.go +++ b/service/sagemaker/api_op_UpdateInferenceComponentRuntimeConfig.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateInferenceComponentRuntimeConfigMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInferenceComponentRuntimeConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateInferenceExperiment.go b/service/sagemaker/api_op_UpdateInferenceExperiment.go index f43c9316a31..b92485832ab 100644 --- a/service/sagemaker/api_op_UpdateInferenceExperiment.go +++ b/service/sagemaker/api_op_UpdateInferenceExperiment.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateInferenceExperimentMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInferenceExperimentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateModelCard.go b/service/sagemaker/api_op_UpdateModelCard.go index 587e173c20a..bd258063aee 100644 --- a/service/sagemaker/api_op_UpdateModelCard.go +++ b/service/sagemaker/api_op_UpdateModelCard.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateModelCardMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelCardValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateModelPackage.go b/service/sagemaker/api_op_UpdateModelPackage.go index 1c91e7fb702..91cb8aac280 100644 --- a/service/sagemaker/api_op_UpdateModelPackage.go +++ b/service/sagemaker/api_op_UpdateModelPackage.go @@ -156,6 +156,9 @@ func (c *Client) addOperationUpdateModelPackageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateModelPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateMonitoringAlert.go b/service/sagemaker/api_op_UpdateMonitoringAlert.go index 7129adb7ed9..f9546b07e9c 100644 --- a/service/sagemaker/api_op_UpdateMonitoringAlert.go +++ b/service/sagemaker/api_op_UpdateMonitoringAlert.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateMonitoringAlertMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMonitoringAlertValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateMonitoringSchedule.go b/service/sagemaker/api_op_UpdateMonitoringSchedule.go index 09ac9a91a3a..dc670aabc49 100644 --- a/service/sagemaker/api_op_UpdateMonitoringSchedule.go +++ b/service/sagemaker/api_op_UpdateMonitoringSchedule.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateMonitoringScheduleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMonitoringScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateNotebookInstance.go b/service/sagemaker/api_op_UpdateNotebookInstance.go index 84ee171d3b2..23eebf73cae 100644 --- a/service/sagemaker/api_op_UpdateNotebookInstance.go +++ b/service/sagemaker/api_op_UpdateNotebookInstance.go @@ -191,6 +191,9 @@ func (c *Client) addOperationUpdateNotebookInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotebookInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateNotebookInstanceLifecycleConfig.go b/service/sagemaker/api_op_UpdateNotebookInstanceLifecycleConfig.go index 758d2ba0a94..8a5acfd06ab 100644 --- a/service/sagemaker/api_op_UpdateNotebookInstanceLifecycleConfig.go +++ b/service/sagemaker/api_op_UpdateNotebookInstanceLifecycleConfig.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateNotebookInstanceLifecycleConfigMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNotebookInstanceLifecycleConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdatePipeline.go b/service/sagemaker/api_op_UpdatePipeline.go index f9ed88354d2..a13e323e0e7 100644 --- a/service/sagemaker/api_op_UpdatePipeline.go +++ b/service/sagemaker/api_op_UpdatePipeline.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdatePipelineMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdatePipelineExecution.go b/service/sagemaker/api_op_UpdatePipelineExecution.go index 5efee92b272..6f739c219ae 100644 --- a/service/sagemaker/api_op_UpdatePipelineExecution.go +++ b/service/sagemaker/api_op_UpdatePipelineExecution.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdatePipelineExecutionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePipelineExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateProject.go b/service/sagemaker/api_op_UpdateProject.go index 1ae1075de3f..9001ccd5fee 100644 --- a/service/sagemaker/api_op_UpdateProject.go +++ b/service/sagemaker/api_op_UpdateProject.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateSpace.go b/service/sagemaker/api_op_UpdateSpace.go index 70d2e6e4d74..d2ca2f22e66 100644 --- a/service/sagemaker/api_op_UpdateSpace.go +++ b/service/sagemaker/api_op_UpdateSpace.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateSpaceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSpaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateTrainingJob.go b/service/sagemaker/api_op_UpdateTrainingJob.go index 4ae93bc855d..f5f317e19cb 100644 --- a/service/sagemaker/api_op_UpdateTrainingJob.go +++ b/service/sagemaker/api_op_UpdateTrainingJob.go @@ -128,6 +128,9 @@ func (c *Client) addOperationUpdateTrainingJobMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrainingJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateTrial.go b/service/sagemaker/api_op_UpdateTrial.go index f43c70fe656..a41b87c917a 100644 --- a/service/sagemaker/api_op_UpdateTrial.go +++ b/service/sagemaker/api_op_UpdateTrial.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateTrialMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrialValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateTrialComponent.go b/service/sagemaker/api_op_UpdateTrialComponent.go index 809e87a52c6..f1fc8d2beb2 100644 --- a/service/sagemaker/api_op_UpdateTrialComponent.go +++ b/service/sagemaker/api_op_UpdateTrialComponent.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateTrialComponentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrialComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateUserProfile.go b/service/sagemaker/api_op_UpdateUserProfile.go index 5a8d3bff7f5..141e0cc8af3 100644 --- a/service/sagemaker/api_op_UpdateUserProfile.go +++ b/service/sagemaker/api_op_UpdateUserProfile.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateUserProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateWorkforce.go b/service/sagemaker/api_op_UpdateWorkforce.go index ede195bec57..b3f5c203c41 100644 --- a/service/sagemaker/api_op_UpdateWorkforce.go +++ b/service/sagemaker/api_op_UpdateWorkforce.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdateWorkforceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkforceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemaker/api_op_UpdateWorkteam.go b/service/sagemaker/api_op_UpdateWorkteam.go index abab614b095..31d2caf18a5 100644 --- a/service/sagemaker/api_op_UpdateWorkteam.go +++ b/service/sagemaker/api_op_UpdateWorkteam.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateWorkteamMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkteamValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakera2iruntime/api_client.go b/service/sagemakera2iruntime/api_client.go index 7ebaeb52653..8749e8ab4e6 100644 --- a/service/sagemakera2iruntime/api_client.go +++ b/service/sagemakera2iruntime/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sagemakera2iruntime/api_op_DeleteHumanLoop.go b/service/sagemakera2iruntime/api_op_DeleteHumanLoop.go index 8bf29768b1a..b8e29f1ecdc 100644 --- a/service/sagemakera2iruntime/api_op_DeleteHumanLoop.go +++ b/service/sagemakera2iruntime/api_op_DeleteHumanLoop.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteHumanLoopMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHumanLoopValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakera2iruntime/api_op_DescribeHumanLoop.go b/service/sagemakera2iruntime/api_op_DescribeHumanLoop.go index 42daa15bd0f..ead57a32403 100644 --- a/service/sagemakera2iruntime/api_op_DescribeHumanLoop.go +++ b/service/sagemakera2iruntime/api_op_DescribeHumanLoop.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeHumanLoopMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHumanLoopValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakera2iruntime/api_op_ListHumanLoops.go b/service/sagemakera2iruntime/api_op_ListHumanLoops.go index c27c667ae20..d950c94a5fa 100644 --- a/service/sagemakera2iruntime/api_op_ListHumanLoops.go +++ b/service/sagemakera2iruntime/api_op_ListHumanLoops.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListHumanLoopsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHumanLoopsValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListHumanLoopsMiddlewares(stack *middleware.Stack, return nil } -// ListHumanLoopsAPIClient is a client that implements the ListHumanLoops -// operation. -type ListHumanLoopsAPIClient interface { - ListHumanLoops(context.Context, *ListHumanLoopsInput, ...func(*Options)) (*ListHumanLoopsOutput, error) -} - -var _ ListHumanLoopsAPIClient = (*Client)(nil) - // ListHumanLoopsPaginatorOptions is the paginator options for ListHumanLoops type ListHumanLoopsPaginatorOptions struct { // The total number of items to return. If the total number of available items is @@ -230,6 +225,9 @@ func (p *ListHumanLoopsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListHumanLoops(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListHumanLoopsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListHumanLoopsAPIClient is a client that implements the ListHumanLoops +// operation. +type ListHumanLoopsAPIClient interface { + ListHumanLoops(context.Context, *ListHumanLoopsInput, ...func(*Options)) (*ListHumanLoopsOutput, error) +} + +var _ ListHumanLoopsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListHumanLoops(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemakera2iruntime/api_op_StartHumanLoop.go b/service/sagemakera2iruntime/api_op_StartHumanLoop.go index 1e7148554ce..e2c430f6878 100644 --- a/service/sagemakera2iruntime/api_op_StartHumanLoop.go +++ b/service/sagemakera2iruntime/api_op_StartHumanLoop.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStartHumanLoopMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartHumanLoopValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakera2iruntime/api_op_StopHumanLoop.go b/service/sagemakera2iruntime/api_op_StopHumanLoop.go index 9c880655318..2484ad1ac35 100644 --- a/service/sagemakera2iruntime/api_op_StopHumanLoop.go +++ b/service/sagemakera2iruntime/api_op_StopHumanLoop.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopHumanLoopMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopHumanLoopValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakeredge/api_client.go b/service/sagemakeredge/api_client.go index 7bf4f760da6..a9635b91ae5 100644 --- a/service/sagemakeredge/api_client.go +++ b/service/sagemakeredge/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sagemakeredge/api_op_GetDeployments.go b/service/sagemakeredge/api_op_GetDeployments.go index bcb28304a00..44fa157935b 100644 --- a/service/sagemakeredge/api_op_GetDeployments.go +++ b/service/sagemakeredge/api_op_GetDeployments.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDeploymentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeploymentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakeredge/api_op_GetDeviceRegistration.go b/service/sagemakeredge/api_op_GetDeviceRegistration.go index a295c845bc3..349dc7e66c6 100644 --- a/service/sagemakeredge/api_op_GetDeviceRegistration.go +++ b/service/sagemakeredge/api_op_GetDeviceRegistration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetDeviceRegistrationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeviceRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakeredge/api_op_SendHeartbeat.go b/service/sagemakeredge/api_op_SendHeartbeat.go index b3fdbfe5039..f2e33bf370a 100644 --- a/service/sagemakeredge/api_op_SendHeartbeat.go +++ b/service/sagemakeredge/api_op_SendHeartbeat.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSendHeartbeatMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendHeartbeatValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerfeaturestoreruntime/api_client.go b/service/sagemakerfeaturestoreruntime/api_client.go index 4ef3c491452..e8eacf44cf0 100644 --- a/service/sagemakerfeaturestoreruntime/api_client.go +++ b/service/sagemakerfeaturestoreruntime/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go b/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go index 519e8b38501..5d7fd346a57 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go @@ -126,6 +126,9 @@ func (c *Client) addOperationBatchGetRecordMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go b/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go index f7827e3d5eb..06ee74bcab2 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDeleteRecordMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go b/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go index f7ee519cfd5..46e22b0b223 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetRecordMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go b/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go index 124216e4d4d..eeaf27c8fc7 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutRecordMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_client.go b/service/sagemakergeospatial/api_client.go index 4098f623213..773fc3b9596 100644 --- a/service/sagemakergeospatial/api_client.go +++ b/service/sagemakergeospatial/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/sagemakergeospatial/api_op_DeleteEarthObservationJob.go b/service/sagemakergeospatial/api_op_DeleteEarthObservationJob.go index f61070cc2bc..7d08eef6d0f 100644 --- a/service/sagemakergeospatial/api_op_DeleteEarthObservationJob.go +++ b/service/sagemakergeospatial/api_op_DeleteEarthObservationJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteEarthObservationJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEarthObservationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_DeleteVectorEnrichmentJob.go b/service/sagemakergeospatial/api_op_DeleteVectorEnrichmentJob.go index 61f56bda4ee..9f4a1ef7fca 100644 --- a/service/sagemakergeospatial/api_op_DeleteVectorEnrichmentJob.go +++ b/service/sagemakergeospatial/api_op_DeleteVectorEnrichmentJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteVectorEnrichmentJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVectorEnrichmentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_ExportEarthObservationJob.go b/service/sagemakergeospatial/api_op_ExportEarthObservationJob.go index 11571fa94e2..257988dbc85 100644 --- a/service/sagemakergeospatial/api_op_ExportEarthObservationJob.go +++ b/service/sagemakergeospatial/api_op_ExportEarthObservationJob.go @@ -151,6 +151,9 @@ func (c *Client) addOperationExportEarthObservationJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExportEarthObservationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_ExportVectorEnrichmentJob.go b/service/sagemakergeospatial/api_op_ExportVectorEnrichmentJob.go index b3be9902084..e4e9680ce41 100644 --- a/service/sagemakergeospatial/api_op_ExportVectorEnrichmentJob.go +++ b/service/sagemakergeospatial/api_op_ExportVectorEnrichmentJob.go @@ -145,6 +145,9 @@ func (c *Client) addOperationExportVectorEnrichmentJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExportVectorEnrichmentJobMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_GetEarthObservationJob.go b/service/sagemakergeospatial/api_op_GetEarthObservationJob.go index 9fe33d17acd..3ce67d3b48d 100644 --- a/service/sagemakergeospatial/api_op_GetEarthObservationJob.go +++ b/service/sagemakergeospatial/api_op_GetEarthObservationJob.go @@ -160,6 +160,9 @@ func (c *Client) addOperationGetEarthObservationJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEarthObservationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_GetRasterDataCollection.go b/service/sagemakergeospatial/api_op_GetRasterDataCollection.go index a2f74bef697..53a1832ae8c 100644 --- a/service/sagemakergeospatial/api_op_GetRasterDataCollection.go +++ b/service/sagemakergeospatial/api_op_GetRasterDataCollection.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetRasterDataCollectionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRasterDataCollectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_GetTile.go b/service/sagemakergeospatial/api_op_GetTile.go index a385f1ef2ac..65fbe0fc217 100644 --- a/service/sagemakergeospatial/api_op_GetTile.go +++ b/service/sagemakergeospatial/api_op_GetTile.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetTileMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTileValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_GetVectorEnrichmentJob.go b/service/sagemakergeospatial/api_op_GetVectorEnrichmentJob.go index 50480369ab5..a303cf344c8 100644 --- a/service/sagemakergeospatial/api_op_GetVectorEnrichmentJob.go +++ b/service/sagemakergeospatial/api_op_GetVectorEnrichmentJob.go @@ -165,6 +165,9 @@ func (c *Client) addOperationGetVectorEnrichmentJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVectorEnrichmentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_ListEarthObservationJobs.go b/service/sagemakergeospatial/api_op_ListEarthObservationJobs.go index 53d4957029f..663b1c6c661 100644 --- a/service/sagemakergeospatial/api_op_ListEarthObservationJobs.go +++ b/service/sagemakergeospatial/api_op_ListEarthObservationJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListEarthObservationJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEarthObservationJobs(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListEarthObservationJobsMiddlewares(stack *middlewa return nil } -// ListEarthObservationJobsAPIClient is a client that implements the -// ListEarthObservationJobs operation. -type ListEarthObservationJobsAPIClient interface { - ListEarthObservationJobs(context.Context, *ListEarthObservationJobsInput, ...func(*Options)) (*ListEarthObservationJobsOutput, error) -} - -var _ ListEarthObservationJobsAPIClient = (*Client)(nil) - // ListEarthObservationJobsPaginatorOptions is the paginator options for // ListEarthObservationJobs type ListEarthObservationJobsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListEarthObservationJobsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEarthObservationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListEarthObservationJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListEarthObservationJobsAPIClient is a client that implements the +// ListEarthObservationJobs operation. +type ListEarthObservationJobsAPIClient interface { + ListEarthObservationJobs(context.Context, *ListEarthObservationJobsInput, ...func(*Options)) (*ListEarthObservationJobsOutput, error) +} + +var _ ListEarthObservationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEarthObservationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemakergeospatial/api_op_ListRasterDataCollections.go b/service/sagemakergeospatial/api_op_ListRasterDataCollections.go index 18298b06c1f..7f4c388a0bf 100644 --- a/service/sagemakergeospatial/api_op_ListRasterDataCollections.go +++ b/service/sagemakergeospatial/api_op_ListRasterDataCollections.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListRasterDataCollectionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRasterDataCollections(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListRasterDataCollectionsMiddlewares(stack *middlew return nil } -// ListRasterDataCollectionsAPIClient is a client that implements the -// ListRasterDataCollections operation. -type ListRasterDataCollectionsAPIClient interface { - ListRasterDataCollections(context.Context, *ListRasterDataCollectionsInput, ...func(*Options)) (*ListRasterDataCollectionsOutput, error) -} - -var _ ListRasterDataCollectionsAPIClient = (*Client)(nil) - // ListRasterDataCollectionsPaginatorOptions is the paginator options for // ListRasterDataCollections type ListRasterDataCollectionsPaginatorOptions struct { @@ -196,6 +191,9 @@ func (p *ListRasterDataCollectionsPaginator) NextPage(ctx context.Context, optFn params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRasterDataCollections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -215,6 +213,14 @@ func (p *ListRasterDataCollectionsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListRasterDataCollectionsAPIClient is a client that implements the +// ListRasterDataCollections operation. +type ListRasterDataCollectionsAPIClient interface { + ListRasterDataCollections(context.Context, *ListRasterDataCollectionsInput, ...func(*Options)) (*ListRasterDataCollectionsOutput, error) +} + +var _ ListRasterDataCollectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRasterDataCollections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemakergeospatial/api_op_ListTagsForResource.go b/service/sagemakergeospatial/api_op_ListTagsForResource.go index 9d310b455cf..57621c9c851 100644 --- a/service/sagemakergeospatial/api_op_ListTagsForResource.go +++ b/service/sagemakergeospatial/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_ListVectorEnrichmentJobs.go b/service/sagemakergeospatial/api_op_ListVectorEnrichmentJobs.go index c62dd9859a4..4098761090b 100644 --- a/service/sagemakergeospatial/api_op_ListVectorEnrichmentJobs.go +++ b/service/sagemakergeospatial/api_op_ListVectorEnrichmentJobs.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListVectorEnrichmentJobsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVectorEnrichmentJobs(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListVectorEnrichmentJobsMiddlewares(stack *middlewa return nil } -// ListVectorEnrichmentJobsAPIClient is a client that implements the -// ListVectorEnrichmentJobs operation. -type ListVectorEnrichmentJobsAPIClient interface { - ListVectorEnrichmentJobs(context.Context, *ListVectorEnrichmentJobsInput, ...func(*Options)) (*ListVectorEnrichmentJobsOutput, error) -} - -var _ ListVectorEnrichmentJobsAPIClient = (*Client)(nil) - // ListVectorEnrichmentJobsPaginatorOptions is the paginator options for // ListVectorEnrichmentJobs type ListVectorEnrichmentJobsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListVectorEnrichmentJobsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVectorEnrichmentJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListVectorEnrichmentJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListVectorEnrichmentJobsAPIClient is a client that implements the +// ListVectorEnrichmentJobs operation. +type ListVectorEnrichmentJobsAPIClient interface { + ListVectorEnrichmentJobs(context.Context, *ListVectorEnrichmentJobsInput, ...func(*Options)) (*ListVectorEnrichmentJobsOutput, error) +} + +var _ ListVectorEnrichmentJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVectorEnrichmentJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemakergeospatial/api_op_SearchRasterDataCollection.go b/service/sagemakergeospatial/api_op_SearchRasterDataCollection.go index 5f2da681d27..f96b5b44cc0 100644 --- a/service/sagemakergeospatial/api_op_SearchRasterDataCollection.go +++ b/service/sagemakergeospatial/api_op_SearchRasterDataCollection.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSearchRasterDataCollectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchRasterDataCollectionValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationSearchRasterDataCollectionMiddlewares(stack *middle return nil } -// SearchRasterDataCollectionAPIClient is a client that implements the -// SearchRasterDataCollection operation. -type SearchRasterDataCollectionAPIClient interface { - SearchRasterDataCollection(context.Context, *SearchRasterDataCollectionInput, ...func(*Options)) (*SearchRasterDataCollectionOutput, error) -} - -var _ SearchRasterDataCollectionAPIClient = (*Client)(nil) - // SearchRasterDataCollectionPaginatorOptions is the paginator options for // SearchRasterDataCollection type SearchRasterDataCollectionPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *SearchRasterDataCollectionPaginator) NextPage(ctx context.Context, optF params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchRasterDataCollection(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *SearchRasterDataCollectionPaginator) NextPage(ctx context.Context, optF return result, nil } +// SearchRasterDataCollectionAPIClient is a client that implements the +// SearchRasterDataCollection operation. +type SearchRasterDataCollectionAPIClient interface { + SearchRasterDataCollection(context.Context, *SearchRasterDataCollectionInput, ...func(*Options)) (*SearchRasterDataCollectionOutput, error) +} + +var _ SearchRasterDataCollectionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchRasterDataCollection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sagemakergeospatial/api_op_StartEarthObservationJob.go b/service/sagemakergeospatial/api_op_StartEarthObservationJob.go index 60efa52f382..e7589acf7d0 100644 --- a/service/sagemakergeospatial/api_op_StartEarthObservationJob.go +++ b/service/sagemakergeospatial/api_op_StartEarthObservationJob.go @@ -172,6 +172,9 @@ func (c *Client) addOperationStartEarthObservationJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartEarthObservationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_StartVectorEnrichmentJob.go b/service/sagemakergeospatial/api_op_StartVectorEnrichmentJob.go index 23cc98230c4..752a41d5180 100644 --- a/service/sagemakergeospatial/api_op_StartVectorEnrichmentJob.go +++ b/service/sagemakergeospatial/api_op_StartVectorEnrichmentJob.go @@ -180,6 +180,9 @@ func (c *Client) addOperationStartVectorEnrichmentJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartVectorEnrichmentJobMiddleware(stack, options); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_StopEarthObservationJob.go b/service/sagemakergeospatial/api_op_StopEarthObservationJob.go index 7ab951fd59f..7e1d3892bd7 100644 --- a/service/sagemakergeospatial/api_op_StopEarthObservationJob.go +++ b/service/sagemakergeospatial/api_op_StopEarthObservationJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopEarthObservationJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEarthObservationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_StopVectorEnrichmentJob.go b/service/sagemakergeospatial/api_op_StopVectorEnrichmentJob.go index c529622a8ba..d902209f9b4 100644 --- a/service/sagemakergeospatial/api_op_StopVectorEnrichmentJob.go +++ b/service/sagemakergeospatial/api_op_StopVectorEnrichmentJob.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopVectorEnrichmentJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopVectorEnrichmentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_TagResource.go b/service/sagemakergeospatial/api_op_TagResource.go index d6fc96eeccf..ff491679054 100644 --- a/service/sagemakergeospatial/api_op_TagResource.go +++ b/service/sagemakergeospatial/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakergeospatial/api_op_UntagResource.go b/service/sagemakergeospatial/api_op_UntagResource.go index 7bca1ee7e45..42e967d563c 100644 --- a/service/sagemakergeospatial/api_op_UntagResource.go +++ b/service/sagemakergeospatial/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakermetrics/api_client.go b/service/sagemakermetrics/api_client.go index 22a4800cda3..7db5143d89a 100644 --- a/service/sagemakermetrics/api_client.go +++ b/service/sagemakermetrics/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sagemakermetrics/api_op_BatchPutMetrics.go b/service/sagemakermetrics/api_op_BatchPutMetrics.go index e3e9076156d..af2de8c817a 100644 --- a/service/sagemakermetrics/api_op_BatchPutMetrics.go +++ b/service/sagemakermetrics/api_op_BatchPutMetrics.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchPutMetricsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutMetricsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerruntime/api_client.go b/service/sagemakerruntime/api_client.go index 0e88b392390..fe2781cc932 100644 --- a/service/sagemakerruntime/api_client.go +++ b/service/sagemakerruntime/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sagemakerruntime/api_op_InvokeEndpoint.go b/service/sagemakerruntime/api_op_InvokeEndpoint.go index 39b9de910e1..556873958b7 100644 --- a/service/sagemakerruntime/api_op_InvokeEndpoint.go +++ b/service/sagemakerruntime/api_op_InvokeEndpoint.go @@ -240,6 +240,9 @@ func (c *Client) addOperationInvokeEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerruntime/api_op_InvokeEndpointAsync.go b/service/sagemakerruntime/api_op_InvokeEndpointAsync.go index f94230d61b7..d68acafbc62 100644 --- a/service/sagemakerruntime/api_op_InvokeEndpointAsync.go +++ b/service/sagemakerruntime/api_op_InvokeEndpointAsync.go @@ -176,6 +176,9 @@ func (c *Client) addOperationInvokeEndpointAsyncMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeEndpointAsyncValidationMiddleware(stack); err != nil { return err } diff --git a/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go b/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go index a5b58663447..3fe5f69f145 100644 --- a/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go +++ b/service/sagemakerruntime/api_op_InvokeEndpointWithResponseStream.go @@ -224,6 +224,9 @@ func (c *Client) addOperationInvokeEndpointWithResponseStreamMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInvokeEndpointWithResponseStreamValidationMiddleware(stack); err != nil { return err } diff --git a/service/savingsplans/api_client.go b/service/savingsplans/api_client.go index 564cd69f420..5cd540d3ad4 100644 --- a/service/savingsplans/api_client.go +++ b/service/savingsplans/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/savingsplans/api_op_CreateSavingsPlan.go b/service/savingsplans/api_op_CreateSavingsPlan.go index cf7a2366c17..1d3447084e7 100644 --- a/service/savingsplans/api_op_CreateSavingsPlan.go +++ b/service/savingsplans/api_op_CreateSavingsPlan.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateSavingsPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSavingsPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/savingsplans/api_op_DeleteQueuedSavingsPlan.go b/service/savingsplans/api_op_DeleteQueuedSavingsPlan.go index b4cd08a1101..625bf2bb824 100644 --- a/service/savingsplans/api_op_DeleteQueuedSavingsPlan.go +++ b/service/savingsplans/api_op_DeleteQueuedSavingsPlan.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteQueuedSavingsPlanMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueuedSavingsPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/savingsplans/api_op_DescribeSavingsPlanRates.go b/service/savingsplans/api_op_DescribeSavingsPlanRates.go index 5d5bd163d05..bdf343779c0 100644 --- a/service/savingsplans/api_op_DescribeSavingsPlanRates.go +++ b/service/savingsplans/api_op_DescribeSavingsPlanRates.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeSavingsPlanRatesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSavingsPlanRatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/savingsplans/api_op_DescribeSavingsPlans.go b/service/savingsplans/api_op_DescribeSavingsPlans.go index e1ad49cbce6..ea6f9164266 100644 --- a/service/savingsplans/api_op_DescribeSavingsPlans.go +++ b/service/savingsplans/api_op_DescribeSavingsPlans.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeSavingsPlansMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSavingsPlans(options.Region), middleware.Before); err != nil { return err } diff --git a/service/savingsplans/api_op_DescribeSavingsPlansOfferingRates.go b/service/savingsplans/api_op_DescribeSavingsPlansOfferingRates.go index 80d15b9b90a..dc27ce6bad1 100644 --- a/service/savingsplans/api_op_DescribeSavingsPlansOfferingRates.go +++ b/service/savingsplans/api_op_DescribeSavingsPlansOfferingRates.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeSavingsPlansOfferingRatesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSavingsPlansOfferingRates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/savingsplans/api_op_DescribeSavingsPlansOfferings.go b/service/savingsplans/api_op_DescribeSavingsPlansOfferings.go index 33f9150b66e..3f5b4315e3d 100644 --- a/service/savingsplans/api_op_DescribeSavingsPlansOfferings.go +++ b/service/savingsplans/api_op_DescribeSavingsPlansOfferings.go @@ -146,6 +146,9 @@ func (c *Client) addOperationDescribeSavingsPlansOfferingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSavingsPlansOfferings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/savingsplans/api_op_ListTagsForResource.go b/service/savingsplans/api_op_ListTagsForResource.go index 3acdb263ec5..fe3e8df10ed 100644 --- a/service/savingsplans/api_op_ListTagsForResource.go +++ b/service/savingsplans/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/savingsplans/api_op_ReturnSavingsPlan.go b/service/savingsplans/api_op_ReturnSavingsPlan.go index 83d071ca391..445a8ce44ef 100644 --- a/service/savingsplans/api_op_ReturnSavingsPlan.go +++ b/service/savingsplans/api_op_ReturnSavingsPlan.go @@ -109,6 +109,9 @@ func (c *Client) addOperationReturnSavingsPlanMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opReturnSavingsPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/savingsplans/api_op_TagResource.go b/service/savingsplans/api_op_TagResource.go index d6824c5ca05..3bc4faa8245 100644 --- a/service/savingsplans/api_op_TagResource.go +++ b/service/savingsplans/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/savingsplans/api_op_UntagResource.go b/service/savingsplans/api_op_UntagResource.go index 330b217e118..e60c267902e 100644 --- a/service/savingsplans/api_op_UntagResource.go +++ b/service/savingsplans/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/scheduler/api_client.go b/service/scheduler/api_client.go index 79edc96a4a6..e33d3ae5e5a 100644 --- a/service/scheduler/api_client.go +++ b/service/scheduler/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/scheduler/api_op_CreateSchedule.go b/service/scheduler/api_op_CreateSchedule.go index 4fa3bb00196..b696f55120d 100644 --- a/service/scheduler/api_op_CreateSchedule.go +++ b/service/scheduler/api_op_CreateSchedule.go @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateScheduleMiddleware(stack, options); err != nil { return err } diff --git a/service/scheduler/api_op_CreateScheduleGroup.go b/service/scheduler/api_op_CreateScheduleGroup.go index 3fcbe9f7602..0dd9460ad42 100644 --- a/service/scheduler/api_op_CreateScheduleGroup.go +++ b/service/scheduler/api_op_CreateScheduleGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateScheduleGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateScheduleGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/scheduler/api_op_DeleteSchedule.go b/service/scheduler/api_op_DeleteSchedule.go index 33a0cf61a12..88eb61e0318 100644 --- a/service/scheduler/api_op_DeleteSchedule.go +++ b/service/scheduler/api_op_DeleteSchedule.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteScheduleMiddleware(stack, options); err != nil { return err } diff --git a/service/scheduler/api_op_DeleteScheduleGroup.go b/service/scheduler/api_op_DeleteScheduleGroup.go index d3b6b9e339a..b34846dcf92 100644 --- a/service/scheduler/api_op_DeleteScheduleGroup.go +++ b/service/scheduler/api_op_DeleteScheduleGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteScheduleGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteScheduleGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/scheduler/api_op_GetSchedule.go b/service/scheduler/api_op_GetSchedule.go index b1bfddfa1d8..c74a3e1e9ab 100644 --- a/service/scheduler/api_op_GetSchedule.go +++ b/service/scheduler/api_op_GetSchedule.go @@ -189,6 +189,9 @@ func (c *Client) addOperationGetScheduleMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/scheduler/api_op_GetScheduleGroup.go b/service/scheduler/api_op_GetScheduleGroup.go index d94e26fe258..c9cd4ef0b03 100644 --- a/service/scheduler/api_op_GetScheduleGroup.go +++ b/service/scheduler/api_op_GetScheduleGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetScheduleGroupMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetScheduleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/scheduler/api_op_ListScheduleGroups.go b/service/scheduler/api_op_ListScheduleGroups.go index eaa99b79a42..d6497b94724 100644 --- a/service/scheduler/api_op_ListScheduleGroups.go +++ b/service/scheduler/api_op_ListScheduleGroups.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListScheduleGroupsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduleGroups(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListScheduleGroupsMiddlewares(stack *middleware.Sta return nil } -// ListScheduleGroupsAPIClient is a client that implements the ListScheduleGroups -// operation. -type ListScheduleGroupsAPIClient interface { - ListScheduleGroups(context.Context, *ListScheduleGroupsInput, ...func(*Options)) (*ListScheduleGroupsOutput, error) -} - -var _ ListScheduleGroupsAPIClient = (*Client)(nil) - // ListScheduleGroupsPaginatorOptions is the paginator options for // ListScheduleGroups type ListScheduleGroupsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListScheduleGroupsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScheduleGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListScheduleGroupsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListScheduleGroupsAPIClient is a client that implements the ListScheduleGroups +// operation. +type ListScheduleGroupsAPIClient interface { + ListScheduleGroups(context.Context, *ListScheduleGroupsInput, ...func(*Options)) (*ListScheduleGroupsOutput, error) +} + +var _ ListScheduleGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScheduleGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/scheduler/api_op_ListSchedules.go b/service/scheduler/api_op_ListSchedules.go index bc2bdb07af2..a30c610207e 100644 --- a/service/scheduler/api_op_ListSchedules.go +++ b/service/scheduler/api_op_ListSchedules.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListSchedulesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSchedules(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListSchedulesMiddlewares(stack *middleware.Stack, o return nil } -// ListSchedulesAPIClient is a client that implements the ListSchedules operation. -type ListSchedulesAPIClient interface { - ListSchedules(context.Context, *ListSchedulesInput, ...func(*Options)) (*ListSchedulesOutput, error) -} - -var _ ListSchedulesAPIClient = (*Client)(nil) - // ListSchedulesPaginatorOptions is the paginator options for ListSchedules type ListSchedulesPaginatorOptions struct { // If specified, limits the number of results returned by this operation. The @@ -219,6 +215,9 @@ func (p *ListSchedulesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchedules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListSchedulesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListSchedulesAPIClient is a client that implements the ListSchedules operation. +type ListSchedulesAPIClient interface { + ListSchedules(context.Context, *ListSchedulesInput, ...func(*Options)) (*ListSchedulesOutput, error) +} + +var _ ListSchedulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchedules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/scheduler/api_op_ListTagsForResource.go b/service/scheduler/api_op_ListTagsForResource.go index 0d5fc146e6a..e8217a4be75 100644 --- a/service/scheduler/api_op_ListTagsForResource.go +++ b/service/scheduler/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/scheduler/api_op_TagResource.go b/service/scheduler/api_op_TagResource.go index 55fd1088426..71bb6996c84 100644 --- a/service/scheduler/api_op_TagResource.go +++ b/service/scheduler/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/scheduler/api_op_UntagResource.go b/service/scheduler/api_op_UntagResource.go index cf78309f241..5d46cc46903 100644 --- a/service/scheduler/api_op_UntagResource.go +++ b/service/scheduler/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/scheduler/api_op_UpdateSchedule.go b/service/scheduler/api_op_UpdateSchedule.go index 79ac603d316..76140bb9825 100644 --- a/service/scheduler/api_op_UpdateSchedule.go +++ b/service/scheduler/api_op_UpdateSchedule.go @@ -201,6 +201,9 @@ func (c *Client) addOperationUpdateScheduleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateScheduleMiddleware(stack, options); err != nil { return err } diff --git a/service/schemas/api_client.go b/service/schemas/api_client.go index 0cc8aaa3d0f..86b8c290e42 100644 --- a/service/schemas/api_client.go +++ b/service/schemas/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/schemas/api_op_CreateDiscoverer.go b/service/schemas/api_op_CreateDiscoverer.go index 7e65d1af61c..ac9b0aeec15 100644 --- a/service/schemas/api_op_CreateDiscoverer.go +++ b/service/schemas/api_op_CreateDiscoverer.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateDiscovererMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDiscovererValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_CreateRegistry.go b/service/schemas/api_op_CreateRegistry.go index b30ea2798fa..8b49b7f0d93 100644 --- a/service/schemas/api_op_CreateRegistry.go +++ b/service/schemas/api_op_CreateRegistry.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateRegistryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_CreateSchema.go b/service/schemas/api_op_CreateSchema.go index 9da92a9cf60..8e9e7cbf42e 100644 --- a/service/schemas/api_op_CreateSchema.go +++ b/service/schemas/api_op_CreateSchema.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DeleteDiscoverer.go b/service/schemas/api_op_DeleteDiscoverer.go index 009c2e864ef..8370a8a1d7e 100644 --- a/service/schemas/api_op_DeleteDiscoverer.go +++ b/service/schemas/api_op_DeleteDiscoverer.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDiscovererMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDiscovererValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DeleteRegistry.go b/service/schemas/api_op_DeleteRegistry.go index 4c764a91962..314d4f4f9f2 100644 --- a/service/schemas/api_op_DeleteRegistry.go +++ b/service/schemas/api_op_DeleteRegistry.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteRegistryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DeleteResourcePolicy.go b/service/schemas/api_op_DeleteResourcePolicy.go index ba82891b2ef..93f3be1e89b 100644 --- a/service/schemas/api_op_DeleteResourcePolicy.go +++ b/service/schemas/api_op_DeleteResourcePolicy.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/schemas/api_op_DeleteSchema.go b/service/schemas/api_op_DeleteSchema.go index a4f1d6a394f..32c7dd0ce5d 100644 --- a/service/schemas/api_op_DeleteSchema.go +++ b/service/schemas/api_op_DeleteSchema.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DeleteSchemaVersion.go b/service/schemas/api_op_DeleteSchemaVersion.go index cf72ef7b79c..f80f3409e9a 100644 --- a/service/schemas/api_op_DeleteSchemaVersion.go +++ b/service/schemas/api_op_DeleteSchemaVersion.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteSchemaVersionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSchemaVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DescribeCodeBinding.go b/service/schemas/api_op_DescribeCodeBinding.go index d40affb2dd6..a65c1126805 100644 --- a/service/schemas/api_op_DescribeCodeBinding.go +++ b/service/schemas/api_op_DescribeCodeBinding.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeCodeBindingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCodeBindingValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationDescribeCodeBindingMiddlewares(stack *middleware.St return nil } -// DescribeCodeBindingAPIClient is a client that implements the -// DescribeCodeBinding operation. -type DescribeCodeBindingAPIClient interface { - DescribeCodeBinding(context.Context, *DescribeCodeBindingInput, ...func(*Options)) (*DescribeCodeBindingOutput, error) -} - -var _ DescribeCodeBindingAPIClient = (*Client)(nil) - // CodeBindingExistsWaiterOptions are waiter options for CodeBindingExistsWaiter type CodeBindingExistsWaiterOptions struct { @@ -280,7 +275,13 @@ func (w *CodeBindingExistsWaiter) WaitForOutput(ctx context.Context, params *Des } out, err := w.client.DescribeCodeBinding(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -379,6 +380,14 @@ func codeBindingExistsStateRetryable(ctx context.Context, input *DescribeCodeBin return true, nil } +// DescribeCodeBindingAPIClient is a client that implements the +// DescribeCodeBinding operation. +type DescribeCodeBindingAPIClient interface { + DescribeCodeBinding(context.Context, *DescribeCodeBindingInput, ...func(*Options)) (*DescribeCodeBindingOutput, error) +} + +var _ DescribeCodeBindingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCodeBinding(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/schemas/api_op_DescribeDiscoverer.go b/service/schemas/api_op_DescribeDiscoverer.go index 669352d7845..e2019607fd9 100644 --- a/service/schemas/api_op_DescribeDiscoverer.go +++ b/service/schemas/api_op_DescribeDiscoverer.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeDiscovererMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDiscovererValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DescribeRegistry.go b/service/schemas/api_op_DescribeRegistry.go index 41974c97b9a..c5289afe9c1 100644 --- a/service/schemas/api_op_DescribeRegistry.go +++ b/service/schemas/api_op_DescribeRegistry.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeRegistryMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_DescribeSchema.go b/service/schemas/api_op_DescribeSchema.go index 9d557982ae9..776611db467 100644 --- a/service/schemas/api_op_DescribeSchema.go +++ b/service/schemas/api_op_DescribeSchema.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeSchemaMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_ExportSchema.go b/service/schemas/api_op_ExportSchema.go index 577e1a2b537..79ee22bd4e5 100644 --- a/service/schemas/api_op_ExportSchema.go +++ b/service/schemas/api_op_ExportSchema.go @@ -121,6 +121,9 @@ func (c *Client) addOperationExportSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_GetCodeBindingSource.go b/service/schemas/api_op_GetCodeBindingSource.go index 1ab22fd1e6b..64a38d8567c 100644 --- a/service/schemas/api_op_GetCodeBindingSource.go +++ b/service/schemas/api_op_GetCodeBindingSource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetCodeBindingSourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCodeBindingSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_GetDiscoveredSchema.go b/service/schemas/api_op_GetDiscoveredSchema.go index 07870152da2..c499021449a 100644 --- a/service/schemas/api_op_GetDiscoveredSchema.go +++ b/service/schemas/api_op_GetDiscoveredSchema.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetDiscoveredSchemaMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDiscoveredSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_GetResourcePolicy.go b/service/schemas/api_op_GetResourcePolicy.go index 6036d6d415b..8b2615c9cab 100644 --- a/service/schemas/api_op_GetResourcePolicy.go +++ b/service/schemas/api_op_GetResourcePolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { return err } diff --git a/service/schemas/api_op_ListDiscoverers.go b/service/schemas/api_op_ListDiscoverers.go index 31f7679888a..8ced8078b6f 100644 --- a/service/schemas/api_op_ListDiscoverers.go +++ b/service/schemas/api_op_ListDiscoverers.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDiscoverersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDiscoverers(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListDiscoverersMiddlewares(stack *middleware.Stack, return nil } -// ListDiscoverersAPIClient is a client that implements the ListDiscoverers -// operation. -type ListDiscoverersAPIClient interface { - ListDiscoverers(context.Context, *ListDiscoverersInput, ...func(*Options)) (*ListDiscoverersOutput, error) -} - -var _ ListDiscoverersAPIClient = (*Client)(nil) - // ListDiscoverersPaginatorOptions is the paginator options for ListDiscoverers type ListDiscoverersPaginatorOptions struct { Limit int32 @@ -212,6 +207,9 @@ func (p *ListDiscoverersPaginator) NextPage(ctx context.Context, optFns ...func( } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDiscoverers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListDiscoverersPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDiscoverersAPIClient is a client that implements the ListDiscoverers +// operation. +type ListDiscoverersAPIClient interface { + ListDiscoverers(context.Context, *ListDiscoverersInput, ...func(*Options)) (*ListDiscoverersOutput, error) +} + +var _ ListDiscoverersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDiscoverers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/schemas/api_op_ListRegistries.go b/service/schemas/api_op_ListRegistries.go index 5ea8ec94ad0..1447a96fac9 100644 --- a/service/schemas/api_op_ListRegistries.go +++ b/service/schemas/api_op_ListRegistries.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRegistriesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegistries(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListRegistriesMiddlewares(stack *middleware.Stack, return nil } -// ListRegistriesAPIClient is a client that implements the ListRegistries -// operation. -type ListRegistriesAPIClient interface { - ListRegistries(context.Context, *ListRegistriesInput, ...func(*Options)) (*ListRegistriesOutput, error) -} - -var _ ListRegistriesAPIClient = (*Client)(nil) - // ListRegistriesPaginatorOptions is the paginator options for ListRegistries type ListRegistriesPaginatorOptions struct { Limit int32 @@ -211,6 +206,9 @@ func (p *ListRegistriesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRegistries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListRegistriesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListRegistriesAPIClient is a client that implements the ListRegistries +// operation. +type ListRegistriesAPIClient interface { + ListRegistries(context.Context, *ListRegistriesInput, ...func(*Options)) (*ListRegistriesOutput, error) +} + +var _ ListRegistriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRegistries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/schemas/api_op_ListSchemaVersions.go b/service/schemas/api_op_ListSchemaVersions.go index 7818e7c2b2c..2f9ef3dfdec 100644 --- a/service/schemas/api_op_ListSchemaVersions.go +++ b/service/schemas/api_op_ListSchemaVersions.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListSchemaVersionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSchemaVersionsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListSchemaVersionsMiddlewares(stack *middleware.Sta return nil } -// ListSchemaVersionsAPIClient is a client that implements the ListSchemaVersions -// operation. -type ListSchemaVersionsAPIClient interface { - ListSchemaVersions(context.Context, *ListSchemaVersionsInput, ...func(*Options)) (*ListSchemaVersionsOutput, error) -} - -var _ ListSchemaVersionsAPIClient = (*Client)(nil) - // ListSchemaVersionsPaginatorOptions is the paginator options for // ListSchemaVersions type ListSchemaVersionsPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListSchemaVersionsPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemaVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListSchemaVersionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListSchemaVersionsAPIClient is a client that implements the ListSchemaVersions +// operation. +type ListSchemaVersionsAPIClient interface { + ListSchemaVersions(context.Context, *ListSchemaVersionsInput, ...func(*Options)) (*ListSchemaVersionsOutput, error) +} + +var _ ListSchemaVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemaVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/schemas/api_op_ListSchemas.go b/service/schemas/api_op_ListSchemas.go index 4eb2feeebcd..8ecfd55eb35 100644 --- a/service/schemas/api_op_ListSchemas.go +++ b/service/schemas/api_op_ListSchemas.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSchemasValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListSchemasMiddlewares(stack *middleware.Stack, opt return nil } -// ListSchemasAPIClient is a client that implements the ListSchemas operation. -type ListSchemasAPIClient interface { - ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) -} - -var _ ListSchemasAPIClient = (*Client)(nil) - // ListSchemasPaginatorOptions is the paginator options for ListSchemas type ListSchemasPaginatorOptions struct { Limit int32 @@ -215,6 +211,9 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSchemasAPIClient is a client that implements the ListSchemas operation. +type ListSchemasAPIClient interface { + ListSchemas(context.Context, *ListSchemasInput, ...func(*Options)) (*ListSchemasOutput, error) +} + +var _ ListSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/schemas/api_op_ListTagsForResource.go b/service/schemas/api_op_ListTagsForResource.go index 44e1b71ec0f..07ec25a3855 100644 --- a/service/schemas/api_op_ListTagsForResource.go +++ b/service/schemas/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_PutCodeBinding.go b/service/schemas/api_op_PutCodeBinding.go index 443be24a6e6..434a290ae9c 100644 --- a/service/schemas/api_op_PutCodeBinding.go +++ b/service/schemas/api_op_PutCodeBinding.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutCodeBindingMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutCodeBindingValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_PutResourcePolicy.go b/service/schemas/api_op_PutResourcePolicy.go index f60fc60d6ab..a6b60685f1a 100644 --- a/service/schemas/api_op_PutResourcePolicy.go +++ b/service/schemas/api_op_PutResourcePolicy.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_SearchSchemas.go b/service/schemas/api_op_SearchSchemas.go index 22c9e6a3402..7f1ab60b9e7 100644 --- a/service/schemas/api_op_SearchSchemas.go +++ b/service/schemas/api_op_SearchSchemas.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSearchSchemasMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchSchemasValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationSearchSchemasMiddlewares(stack *middleware.Stack, o return nil } -// SearchSchemasAPIClient is a client that implements the SearchSchemas operation. -type SearchSchemasAPIClient interface { - SearchSchemas(context.Context, *SearchSchemasInput, ...func(*Options)) (*SearchSchemasOutput, error) -} - -var _ SearchSchemasAPIClient = (*Client)(nil) - // SearchSchemasPaginatorOptions is the paginator options for SearchSchemas type SearchSchemasPaginatorOptions struct { Limit int32 @@ -217,6 +213,9 @@ func (p *SearchSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchSchemas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *SearchSchemasPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// SearchSchemasAPIClient is a client that implements the SearchSchemas operation. +type SearchSchemasAPIClient interface { + SearchSchemas(context.Context, *SearchSchemasInput, ...func(*Options)) (*SearchSchemasOutput, error) +} + +var _ SearchSchemasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchSchemas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/schemas/api_op_StartDiscoverer.go b/service/schemas/api_op_StartDiscoverer.go index 6649835a41f..7da8ad934dd 100644 --- a/service/schemas/api_op_StartDiscoverer.go +++ b/service/schemas/api_op_StartDiscoverer.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStartDiscovererMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDiscovererValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_StopDiscoverer.go b/service/schemas/api_op_StopDiscoverer.go index b819c56ef7d..99673c8de53 100644 --- a/service/schemas/api_op_StopDiscoverer.go +++ b/service/schemas/api_op_StopDiscoverer.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopDiscovererMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopDiscovererValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_TagResource.go b/service/schemas/api_op_TagResource.go index 4e618cfa944..43f01324e91 100644 --- a/service/schemas/api_op_TagResource.go +++ b/service/schemas/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_UntagResource.go b/service/schemas/api_op_UntagResource.go index bb2297ca4bb..dced603b081 100644 --- a/service/schemas/api_op_UntagResource.go +++ b/service/schemas/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_UpdateDiscoverer.go b/service/schemas/api_op_UpdateDiscoverer.go index a733f652592..98ebce35fef 100644 --- a/service/schemas/api_op_UpdateDiscoverer.go +++ b/service/schemas/api_op_UpdateDiscoverer.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateDiscovererMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDiscovererValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_UpdateRegistry.go b/service/schemas/api_op_UpdateRegistry.go index 1b7d6ad55f7..526eb2acfcb 100644 --- a/service/schemas/api_op_UpdateRegistry.go +++ b/service/schemas/api_op_UpdateRegistry.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateRegistryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegistryValidationMiddleware(stack); err != nil { return err } diff --git a/service/schemas/api_op_UpdateSchema.go b/service/schemas/api_op_UpdateSchema.go index aacc98bd65d..61015dd8ba5 100644 --- a/service/schemas/api_op_UpdateSchema.go +++ b/service/schemas/api_op_UpdateSchema.go @@ -147,6 +147,9 @@ func (c *Client) addOperationUpdateSchemaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateSchemaMiddleware(stack, options); err != nil { return err } diff --git a/service/secretsmanager/api_client.go b/service/secretsmanager/api_client.go index 15aa164d307..e56f08b9fa4 100644 --- a/service/secretsmanager/api_client.go +++ b/service/secretsmanager/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/secretsmanager/api_op_BatchGetSecretValue.go b/service/secretsmanager/api_op_BatchGetSecretValue.go index ed955f55ac0..9fe8033e647 100644 --- a/service/secretsmanager/api_op_BatchGetSecretValue.go +++ b/service/secretsmanager/api_op_BatchGetSecretValue.go @@ -153,6 +153,9 @@ func (c *Client) addOperationBatchGetSecretValueMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetSecretValue(options.Region), middleware.Before); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationBatchGetSecretValueMiddlewares(stack *middleware.St return nil } -// BatchGetSecretValueAPIClient is a client that implements the -// BatchGetSecretValue operation. -type BatchGetSecretValueAPIClient interface { - BatchGetSecretValue(context.Context, *BatchGetSecretValueInput, ...func(*Options)) (*BatchGetSecretValueOutput, error) -} - -var _ BatchGetSecretValueAPIClient = (*Client)(nil) - // BatchGetSecretValuePaginatorOptions is the paginator options for // BatchGetSecretValue type BatchGetSecretValuePaginatorOptions struct { @@ -251,6 +246,9 @@ func (p *BatchGetSecretValuePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.BatchGetSecretValue(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -270,6 +268,14 @@ func (p *BatchGetSecretValuePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// BatchGetSecretValueAPIClient is a client that implements the +// BatchGetSecretValue operation. +type BatchGetSecretValueAPIClient interface { + BatchGetSecretValue(context.Context, *BatchGetSecretValueInput, ...func(*Options)) (*BatchGetSecretValueOutput, error) +} + +var _ BatchGetSecretValueAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opBatchGetSecretValue(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/secretsmanager/api_op_CancelRotateSecret.go b/service/secretsmanager/api_op_CancelRotateSecret.go index 1431c295560..1b0031cc5f9 100644 --- a/service/secretsmanager/api_op_CancelRotateSecret.go +++ b/service/secretsmanager/api_op_CancelRotateSecret.go @@ -143,6 +143,9 @@ func (c *Client) addOperationCancelRotateSecretMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelRotateSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_CreateSecret.go b/service/secretsmanager/api_op_CreateSecret.go index 72e588431ba..92046999329 100644 --- a/service/secretsmanager/api_op_CreateSecret.go +++ b/service/secretsmanager/api_op_CreateSecret.go @@ -299,6 +299,9 @@ func (c *Client) addOperationCreateSecretMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSecretMiddleware(stack, options); err != nil { return err } diff --git a/service/secretsmanager/api_op_DeleteResourcePolicy.go b/service/secretsmanager/api_op_DeleteResourcePolicy.go index da684c71488..dbe41c93db6 100644 --- a/service/secretsmanager/api_op_DeleteResourcePolicy.go +++ b/service/secretsmanager/api_op_DeleteResourcePolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_DeleteSecret.go b/service/secretsmanager/api_op_DeleteSecret.go index b2d6436b709..f7c84bf8c55 100644 --- a/service/secretsmanager/api_op_DeleteSecret.go +++ b/service/secretsmanager/api_op_DeleteSecret.go @@ -182,6 +182,9 @@ func (c *Client) addOperationDeleteSecretMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_DescribeSecret.go b/service/secretsmanager/api_op_DescribeSecret.go index e746ba0003a..913b7fee27b 100644 --- a/service/secretsmanager/api_op_DescribeSecret.go +++ b/service/secretsmanager/api_op_DescribeSecret.go @@ -237,6 +237,9 @@ func (c *Client) addOperationDescribeSecretMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_GetRandomPassword.go b/service/secretsmanager/api_op_GetRandomPassword.go index 9fb92810e39..50a1610e167 100644 --- a/service/secretsmanager/api_op_GetRandomPassword.go +++ b/service/secretsmanager/api_op_GetRandomPassword.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetRandomPasswordMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRandomPassword(options.Region), middleware.Before); err != nil { return err } diff --git a/service/secretsmanager/api_op_GetResourcePolicy.go b/service/secretsmanager/api_op_GetResourcePolicy.go index f0698d11219..1dd0379d110 100644 --- a/service/secretsmanager/api_op_GetResourcePolicy.go +++ b/service/secretsmanager/api_op_GetResourcePolicy.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_GetSecretValue.go b/service/secretsmanager/api_op_GetSecretValue.go index ccf048e6053..16b70454ace 100644 --- a/service/secretsmanager/api_op_GetSecretValue.go +++ b/service/secretsmanager/api_op_GetSecretValue.go @@ -195,6 +195,9 @@ func (c *Client) addOperationGetSecretValueMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSecretValueValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_ListSecretVersionIds.go b/service/secretsmanager/api_op_ListSecretVersionIds.go index 5d871c98242..2a2ed721095 100644 --- a/service/secretsmanager/api_op_ListSecretVersionIds.go +++ b/service/secretsmanager/api_op_ListSecretVersionIds.go @@ -156,6 +156,9 @@ func (c *Client) addOperationListSecretVersionIdsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSecretVersionIdsValidationMiddleware(stack); err != nil { return err } @@ -180,14 +183,6 @@ func (c *Client) addOperationListSecretVersionIdsMiddlewares(stack *middleware.S return nil } -// ListSecretVersionIdsAPIClient is a client that implements the -// ListSecretVersionIds operation. -type ListSecretVersionIdsAPIClient interface { - ListSecretVersionIds(context.Context, *ListSecretVersionIdsInput, ...func(*Options)) (*ListSecretVersionIdsOutput, error) -} - -var _ ListSecretVersionIdsAPIClient = (*Client)(nil) - // ListSecretVersionIdsPaginatorOptions is the paginator options for // ListSecretVersionIds type ListSecretVersionIdsPaginatorOptions struct { @@ -256,6 +251,9 @@ func (p *ListSecretVersionIdsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecretVersionIds(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +273,14 @@ func (p *ListSecretVersionIdsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSecretVersionIdsAPIClient is a client that implements the +// ListSecretVersionIds operation. +type ListSecretVersionIdsAPIClient interface { + ListSecretVersionIds(context.Context, *ListSecretVersionIdsInput, ...func(*Options)) (*ListSecretVersionIdsOutput, error) +} + +var _ ListSecretVersionIdsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecretVersionIds(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/secretsmanager/api_op_ListSecrets.go b/service/secretsmanager/api_op_ListSecrets.go index f2bbecc5818..e1fdc7c0025 100644 --- a/service/secretsmanager/api_op_ListSecrets.go +++ b/service/secretsmanager/api_op_ListSecrets.go @@ -153,6 +153,9 @@ func (c *Client) addOperationListSecretsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecrets(options.Region), middleware.Before); err != nil { return err } @@ -174,13 +177,6 @@ func (c *Client) addOperationListSecretsMiddlewares(stack *middleware.Stack, opt return nil } -// ListSecretsAPIClient is a client that implements the ListSecrets operation. -type ListSecretsAPIClient interface { - ListSecrets(context.Context, *ListSecretsInput, ...func(*Options)) (*ListSecretsOutput, error) -} - -var _ ListSecretsAPIClient = (*Client)(nil) - // ListSecretsPaginatorOptions is the paginator options for ListSecrets type ListSecretsPaginatorOptions struct { // The number of results to include in the response. @@ -248,6 +244,9 @@ func (p *ListSecretsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecrets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +266,13 @@ func (p *ListSecretsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListSecretsAPIClient is a client that implements the ListSecrets operation. +type ListSecretsAPIClient interface { + ListSecrets(context.Context, *ListSecretsInput, ...func(*Options)) (*ListSecretsOutput, error) +} + +var _ ListSecretsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecrets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/secretsmanager/api_op_PutResourcePolicy.go b/service/secretsmanager/api_op_PutResourcePolicy.go index 45132eac51c..f778ffb6230 100644 --- a/service/secretsmanager/api_op_PutResourcePolicy.go +++ b/service/secretsmanager/api_op_PutResourcePolicy.go @@ -158,6 +158,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_PutSecretValue.go b/service/secretsmanager/api_op_PutSecretValue.go index d4974d700f2..91634a947d5 100644 --- a/service/secretsmanager/api_op_PutSecretValue.go +++ b/service/secretsmanager/api_op_PutSecretValue.go @@ -244,6 +244,9 @@ func (c *Client) addOperationPutSecretValueMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opPutSecretValueMiddleware(stack, options); err != nil { return err } diff --git a/service/secretsmanager/api_op_RemoveRegionsFromReplication.go b/service/secretsmanager/api_op_RemoveRegionsFromReplication.go index e4f44446e48..53784bd3278 100644 --- a/service/secretsmanager/api_op_RemoveRegionsFromReplication.go +++ b/service/secretsmanager/api_op_RemoveRegionsFromReplication.go @@ -126,6 +126,9 @@ func (c *Client) addOperationRemoveRegionsFromReplicationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveRegionsFromReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_ReplicateSecretToRegions.go b/service/secretsmanager/api_op_ReplicateSecretToRegions.go index ec719d1fac7..25ea4da585f 100644 --- a/service/secretsmanager/api_op_ReplicateSecretToRegions.go +++ b/service/secretsmanager/api_op_ReplicateSecretToRegions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationReplicateSecretToRegionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReplicateSecretToRegionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_RestoreSecret.go b/service/secretsmanager/api_op_RestoreSecret.go index b716476f658..f89d8dab3ca 100644 --- a/service/secretsmanager/api_op_RestoreSecret.go +++ b/service/secretsmanager/api_op_RestoreSecret.go @@ -125,6 +125,9 @@ func (c *Client) addOperationRestoreSecretMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreSecretValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_RotateSecret.go b/service/secretsmanager/api_op_RotateSecret.go index eb684f0e35f..c92a727e5ed 100644 --- a/service/secretsmanager/api_op_RotateSecret.go +++ b/service/secretsmanager/api_op_RotateSecret.go @@ -191,6 +191,9 @@ func (c *Client) addOperationRotateSecretMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRotateSecretMiddleware(stack, options); err != nil { return err } diff --git a/service/secretsmanager/api_op_StopReplicationToReplica.go b/service/secretsmanager/api_op_StopReplicationToReplica.go index 8df58166749..c9d2a45519e 100644 --- a/service/secretsmanager/api_op_StopReplicationToReplica.go +++ b/service/secretsmanager/api_op_StopReplicationToReplica.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStopReplicationToReplicaMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopReplicationToReplicaValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_TagResource.go b/service/secretsmanager/api_op_TagResource.go index d3fe51e4ed8..16a9cbceeb7 100644 --- a/service/secretsmanager/api_op_TagResource.go +++ b/service/secretsmanager/api_op_TagResource.go @@ -142,6 +142,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_UntagResource.go b/service/secretsmanager/api_op_UntagResource.go index ce8342c500a..904a18dd2b5 100644 --- a/service/secretsmanager/api_op_UntagResource.go +++ b/service/secretsmanager/api_op_UntagResource.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_UpdateSecret.go b/service/secretsmanager/api_op_UpdateSecret.go index 0b86e7226cc..f8304c61183 100644 --- a/service/secretsmanager/api_op_UpdateSecret.go +++ b/service/secretsmanager/api_op_UpdateSecret.go @@ -232,6 +232,9 @@ func (c *Client) addOperationUpdateSecretMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateSecretMiddleware(stack, options); err != nil { return err } diff --git a/service/secretsmanager/api_op_UpdateSecretVersionStage.go b/service/secretsmanager/api_op_UpdateSecretVersionStage.go index 2db907c2054..b80350eb478 100644 --- a/service/secretsmanager/api_op_UpdateSecretVersionStage.go +++ b/service/secretsmanager/api_op_UpdateSecretVersionStage.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateSecretVersionStageMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSecretVersionStageValidationMiddleware(stack); err != nil { return err } diff --git a/service/secretsmanager/api_op_ValidateResourcePolicy.go b/service/secretsmanager/api_op_ValidateResourcePolicy.go index 11a3dfacfc8..fb1d6c66657 100644 --- a/service/secretsmanager/api_op_ValidateResourcePolicy.go +++ b/service/secretsmanager/api_op_ValidateResourcePolicy.go @@ -140,6 +140,9 @@ func (c *Client) addOperationValidateResourcePolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_client.go b/service/securityhub/api_client.go index 9335b48861e..9a64e743fb0 100644 --- a/service/securityhub/api_client.go +++ b/service/securityhub/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/securityhub/api_op_AcceptAdministratorInvitation.go b/service/securityhub/api_op_AcceptAdministratorInvitation.go index 3086cc84883..d9c0c566ea7 100644 --- a/service/securityhub/api_op_AcceptAdministratorInvitation.go +++ b/service/securityhub/api_op_AcceptAdministratorInvitation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAcceptAdministratorInvitationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptAdministratorInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_AcceptInvitation.go b/service/securityhub/api_op_AcceptInvitation.go index dae005cfe0a..78334b4b8af 100644 --- a/service/securityhub/api_op_AcceptInvitation.go +++ b/service/securityhub/api_op_AcceptInvitation.go @@ -127,6 +127,9 @@ func (c *Client) addOperationAcceptInvitationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchDeleteAutomationRules.go b/service/securityhub/api_op_BatchDeleteAutomationRules.go index 31f2e29f53b..19c9ab49231 100644 --- a/service/securityhub/api_op_BatchDeleteAutomationRules.go +++ b/service/securityhub/api_op_BatchDeleteAutomationRules.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchDeleteAutomationRulesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteAutomationRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchDisableStandards.go b/service/securityhub/api_op_BatchDisableStandards.go index d3aefbbeb2f..7ebf122acc5 100644 --- a/service/securityhub/api_op_BatchDisableStandards.go +++ b/service/securityhub/api_op_BatchDisableStandards.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchDisableStandardsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisableStandardsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchEnableStandards.go b/service/securityhub/api_op_BatchEnableStandards.go index 70ecc270554..65eec5c463d 100644 --- a/service/securityhub/api_op_BatchEnableStandards.go +++ b/service/securityhub/api_op_BatchEnableStandards.go @@ -111,6 +111,9 @@ func (c *Client) addOperationBatchEnableStandardsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchEnableStandardsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchGetAutomationRules.go b/service/securityhub/api_op_BatchGetAutomationRules.go index f792367913b..0f19a5fcfd4 100644 --- a/service/securityhub/api_op_BatchGetAutomationRules.go +++ b/service/securityhub/api_op_BatchGetAutomationRules.go @@ -112,6 +112,9 @@ func (c *Client) addOperationBatchGetAutomationRulesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetAutomationRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchGetConfigurationPolicyAssociations.go b/service/securityhub/api_op_BatchGetConfigurationPolicyAssociations.go index 5169f191107..23d24a59c4d 100644 --- a/service/securityhub/api_op_BatchGetConfigurationPolicyAssociations.go +++ b/service/securityhub/api_op_BatchGetConfigurationPolicyAssociations.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchGetConfigurationPolicyAssociationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetConfigurationPolicyAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchGetSecurityControls.go b/service/securityhub/api_op_BatchGetSecurityControls.go index 4fbc7456d4f..7b22d324a89 100644 --- a/service/securityhub/api_op_BatchGetSecurityControls.go +++ b/service/securityhub/api_op_BatchGetSecurityControls.go @@ -118,6 +118,9 @@ func (c *Client) addOperationBatchGetSecurityControlsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetSecurityControlsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchGetStandardsControlAssociations.go b/service/securityhub/api_op_BatchGetStandardsControlAssociations.go index 9c97c289038..b6c831330b8 100644 --- a/service/securityhub/api_op_BatchGetStandardsControlAssociations.go +++ b/service/securityhub/api_op_BatchGetStandardsControlAssociations.go @@ -120,6 +120,9 @@ func (c *Client) addOperationBatchGetStandardsControlAssociationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetStandardsControlAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchImportFindings.go b/service/securityhub/api_op_BatchImportFindings.go index 6ad888f0e8e..d88cacf3cfe 100644 --- a/service/securityhub/api_op_BatchImportFindings.go +++ b/service/securityhub/api_op_BatchImportFindings.go @@ -167,6 +167,9 @@ func (c *Client) addOperationBatchImportFindingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchImportFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchUpdateAutomationRules.go b/service/securityhub/api_op_BatchUpdateAutomationRules.go index 7c9876afc7a..d53903d4e1e 100644 --- a/service/securityhub/api_op_BatchUpdateAutomationRules.go +++ b/service/securityhub/api_op_BatchUpdateAutomationRules.go @@ -113,6 +113,9 @@ func (c *Client) addOperationBatchUpdateAutomationRulesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateAutomationRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchUpdateFindings.go b/service/securityhub/api_op_BatchUpdateFindings.go index c6dd7878166..b8e9bca2370 100644 --- a/service/securityhub/api_op_BatchUpdateFindings.go +++ b/service/securityhub/api_op_BatchUpdateFindings.go @@ -214,6 +214,9 @@ func (c *Client) addOperationBatchUpdateFindingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_BatchUpdateStandardsControlAssociations.go b/service/securityhub/api_op_BatchUpdateStandardsControlAssociations.go index f810fc368c3..3e361be26d5 100644 --- a/service/securityhub/api_op_BatchUpdateStandardsControlAssociations.go +++ b/service/securityhub/api_op_BatchUpdateStandardsControlAssociations.go @@ -110,6 +110,9 @@ func (c *Client) addOperationBatchUpdateStandardsControlAssociationsMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateStandardsControlAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_CreateActionTarget.go b/service/securityhub/api_op_CreateActionTarget.go index 8c89364b645..cb9fea8925d 100644 --- a/service/securityhub/api_op_CreateActionTarget.go +++ b/service/securityhub/api_op_CreateActionTarget.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateActionTargetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateActionTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_CreateAutomationRule.go b/service/securityhub/api_op_CreateAutomationRule.go index 12b2a2fd877..1b55bd1c8c8 100644 --- a/service/securityhub/api_op_CreateAutomationRule.go +++ b/service/securityhub/api_op_CreateAutomationRule.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateAutomationRuleMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAutomationRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_CreateConfigurationPolicy.go b/service/securityhub/api_op_CreateConfigurationPolicy.go index 1a4bd906daf..5f7b9703e6b 100644 --- a/service/securityhub/api_op_CreateConfigurationPolicy.go +++ b/service/securityhub/api_op_CreateConfigurationPolicy.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateConfigurationPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_CreateFindingAggregator.go b/service/securityhub/api_op_CreateFindingAggregator.go index 751d1fa5f16..98d08cda852 100644 --- a/service/securityhub/api_op_CreateFindingAggregator.go +++ b/service/securityhub/api_op_CreateFindingAggregator.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateFindingAggregatorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFindingAggregatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_CreateInsight.go b/service/securityhub/api_op_CreateInsight.go index 7c4bf62c831..13916890a5a 100644 --- a/service/securityhub/api_op_CreateInsight.go +++ b/service/securityhub/api_op_CreateInsight.go @@ -125,6 +125,9 @@ func (c *Client) addOperationCreateInsightMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_CreateMembers.go b/service/securityhub/api_op_CreateMembers.go index 44806a086c5..1e8f9f19e71 100644 --- a/service/securityhub/api_op_CreateMembers.go +++ b/service/securityhub/api_op_CreateMembers.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeclineInvitations.go b/service/securityhub/api_op_DeclineInvitations.go index 4852b552105..030df609f8a 100644 --- a/service/securityhub/api_op_DeclineInvitations.go +++ b/service/securityhub/api_op_DeclineInvitations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeclineInvitationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeclineInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeleteActionTarget.go b/service/securityhub/api_op_DeleteActionTarget.go index 0a3f93346bb..b95a87a2def 100644 --- a/service/securityhub/api_op_DeleteActionTarget.go +++ b/service/securityhub/api_op_DeleteActionTarget.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteActionTargetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteActionTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeleteConfigurationPolicy.go b/service/securityhub/api_op_DeleteConfigurationPolicy.go index f08f6ed7d9f..0bc4dbfd622 100644 --- a/service/securityhub/api_op_DeleteConfigurationPolicy.go +++ b/service/securityhub/api_op_DeleteConfigurationPolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteConfigurationPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeleteFindingAggregator.go b/service/securityhub/api_op_DeleteFindingAggregator.go index 367ad4b53a3..9e9f6f2f3b4 100644 --- a/service/securityhub/api_op_DeleteFindingAggregator.go +++ b/service/securityhub/api_op_DeleteFindingAggregator.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteFindingAggregatorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFindingAggregatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeleteInsight.go b/service/securityhub/api_op_DeleteInsight.go index 636f6e1d8c1..4241137c8cb 100644 --- a/service/securityhub/api_op_DeleteInsight.go +++ b/service/securityhub/api_op_DeleteInsight.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteInsightMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeleteInvitations.go b/service/securityhub/api_op_DeleteInvitations.go index 8b69273645e..e43180c77ee 100644 --- a/service/securityhub/api_op_DeleteInvitations.go +++ b/service/securityhub/api_op_DeleteInvitations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteInvitationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInvitationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DeleteMembers.go b/service/securityhub/api_op_DeleteMembers.go index 689b2994ef2..32d1639f716 100644 --- a/service/securityhub/api_op_DeleteMembers.go +++ b/service/securityhub/api_op_DeleteMembers.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DescribeActionTargets.go b/service/securityhub/api_op_DescribeActionTargets.go index 41206c39fe5..104e5c84b5d 100644 --- a/service/securityhub/api_op_DescribeActionTargets.go +++ b/service/securityhub/api_op_DescribeActionTargets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeActionTargetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActionTargets(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeActionTargetsMiddlewares(stack *middleware. return nil } -// DescribeActionTargetsAPIClient is a client that implements the -// DescribeActionTargets operation. -type DescribeActionTargetsAPIClient interface { - DescribeActionTargets(context.Context, *DescribeActionTargetsInput, ...func(*Options)) (*DescribeActionTargetsOutput, error) -} - -var _ DescribeActionTargetsAPIClient = (*Client)(nil) - // DescribeActionTargetsPaginatorOptions is the paginator options for // DescribeActionTargets type DescribeActionTargetsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *DescribeActionTargetsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeActionTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *DescribeActionTargetsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// DescribeActionTargetsAPIClient is a client that implements the +// DescribeActionTargets operation. +type DescribeActionTargetsAPIClient interface { + DescribeActionTargets(context.Context, *DescribeActionTargetsInput, ...func(*Options)) (*DescribeActionTargetsOutput, error) +} + +var _ DescribeActionTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeActionTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_DescribeHub.go b/service/securityhub/api_op_DescribeHub.go index c42b2af46d5..2780e88ed6a 100644 --- a/service/securityhub/api_op_DescribeHub.go +++ b/service/securityhub/api_op_DescribeHub.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeHubMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHub(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_DescribeOrganizationConfiguration.go b/service/securityhub/api_op_DescribeOrganizationConfiguration.go index cf2c69229b6..1569e299b18 100644 --- a/service/securityhub/api_op_DescribeOrganizationConfiguration.go +++ b/service/securityhub/api_op_DescribeOrganizationConfiguration.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeOrganizationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_DescribeProducts.go b/service/securityhub/api_op_DescribeProducts.go index 86801ac3615..5331b00ef17 100644 --- a/service/securityhub/api_op_DescribeProducts.go +++ b/service/securityhub/api_op_DescribeProducts.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeProductsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProducts(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeProductsMiddlewares(stack *middleware.Stack return nil } -// DescribeProductsAPIClient is a client that implements the DescribeProducts -// operation. -type DescribeProductsAPIClient interface { - DescribeProducts(context.Context, *DescribeProductsInput, ...func(*Options)) (*DescribeProductsOutput, error) -} - -var _ DescribeProductsAPIClient = (*Client)(nil) - // DescribeProductsPaginatorOptions is the paginator options for DescribeProducts type DescribeProductsPaginatorOptions struct { // The maximum number of results to return. @@ -217,6 +212,9 @@ func (p *DescribeProductsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeProducts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeProductsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeProductsAPIClient is a client that implements the DescribeProducts +// operation. +type DescribeProductsAPIClient interface { + DescribeProducts(context.Context, *DescribeProductsInput, ...func(*Options)) (*DescribeProductsOutput, error) +} + +var _ DescribeProductsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeProducts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_DescribeStandards.go b/service/securityhub/api_op_DescribeStandards.go index 6ac768b889a..167426ae91b 100644 --- a/service/securityhub/api_op_DescribeStandards.go +++ b/service/securityhub/api_op_DescribeStandards.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeStandardsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStandards(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationDescribeStandardsMiddlewares(stack *middleware.Stac return nil } -// DescribeStandardsAPIClient is a client that implements the DescribeStandards -// operation. -type DescribeStandardsAPIClient interface { - DescribeStandards(context.Context, *DescribeStandardsInput, ...func(*Options)) (*DescribeStandardsOutput, error) -} - -var _ DescribeStandardsAPIClient = (*Client)(nil) - // DescribeStandardsPaginatorOptions is the paginator options for DescribeStandards type DescribeStandardsPaginatorOptions struct { // The maximum number of standards to return. @@ -209,6 +204,9 @@ func (p *DescribeStandardsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStandards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *DescribeStandardsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeStandardsAPIClient is a client that implements the DescribeStandards +// operation. +type DescribeStandardsAPIClient interface { + DescribeStandards(context.Context, *DescribeStandardsInput, ...func(*Options)) (*DescribeStandardsOutput, error) +} + +var _ DescribeStandardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStandards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_DescribeStandardsControls.go b/service/securityhub/api_op_DescribeStandardsControls.go index 986eee95a92..81e5b2cce86 100644 --- a/service/securityhub/api_op_DescribeStandardsControls.go +++ b/service/securityhub/api_op_DescribeStandardsControls.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeStandardsControlsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStandardsControlsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeStandardsControlsMiddlewares(stack *middlew return nil } -// DescribeStandardsControlsAPIClient is a client that implements the -// DescribeStandardsControls operation. -type DescribeStandardsControlsAPIClient interface { - DescribeStandardsControls(context.Context, *DescribeStandardsControlsInput, ...func(*Options)) (*DescribeStandardsControlsOutput, error) -} - -var _ DescribeStandardsControlsAPIClient = (*Client)(nil) - // DescribeStandardsControlsPaginatorOptions is the paginator options for // DescribeStandardsControls type DescribeStandardsControlsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeStandardsControlsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeStandardsControls(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeStandardsControlsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// DescribeStandardsControlsAPIClient is a client that implements the +// DescribeStandardsControls operation. +type DescribeStandardsControlsAPIClient interface { + DescribeStandardsControls(context.Context, *DescribeStandardsControlsInput, ...func(*Options)) (*DescribeStandardsControlsOutput, error) +} + +var _ DescribeStandardsControlsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeStandardsControls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_DisableImportFindingsForProduct.go b/service/securityhub/api_op_DisableImportFindingsForProduct.go index af36456dbc3..72426d58396 100644 --- a/service/securityhub/api_op_DisableImportFindingsForProduct.go +++ b/service/securityhub/api_op_DisableImportFindingsForProduct.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDisableImportFindingsForProductMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableImportFindingsForProductValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DisableOrganizationAdminAccount.go b/service/securityhub/api_op_DisableOrganizationAdminAccount.go index 359636fe6d8..b63a99bb9f5 100644 --- a/service/securityhub/api_op_DisableOrganizationAdminAccount.go +++ b/service/securityhub/api_op_DisableOrganizationAdminAccount.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDisableOrganizationAdminAccountMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_DisableSecurityHub.go b/service/securityhub/api_op_DisableSecurityHub.go index 65e6d185f25..289245e0d4e 100644 --- a/service/securityhub/api_op_DisableSecurityHub.go +++ b/service/securityhub/api_op_DisableSecurityHub.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisableSecurityHubMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSecurityHub(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_DisassociateFromAdministratorAccount.go b/service/securityhub/api_op_DisassociateFromAdministratorAccount.go index 6b11822e70b..bf02416e94f 100644 --- a/service/securityhub/api_op_DisassociateFromAdministratorAccount.go +++ b/service/securityhub/api_op_DisassociateFromAdministratorAccount.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDisassociateFromAdministratorAccountMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateFromAdministratorAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_DisassociateFromMasterAccount.go b/service/securityhub/api_op_DisassociateFromMasterAccount.go index 739eae3c008..2e57dcdebbf 100644 --- a/service/securityhub/api_op_DisassociateFromMasterAccount.go +++ b/service/securityhub/api_op_DisassociateFromMasterAccount.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDisassociateFromMasterAccountMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateFromMasterAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_DisassociateMembers.go b/service/securityhub/api_op_DisassociateMembers.go index e310ffe902f..4674924f1d4 100644 --- a/service/securityhub/api_op_DisassociateMembers.go +++ b/service/securityhub/api_op_DisassociateMembers.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateMembersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_EnableImportFindingsForProduct.go b/service/securityhub/api_op_EnableImportFindingsForProduct.go index 3ae299c9793..7aa99a1ba0f 100644 --- a/service/securityhub/api_op_EnableImportFindingsForProduct.go +++ b/service/securityhub/api_op_EnableImportFindingsForProduct.go @@ -109,6 +109,9 @@ func (c *Client) addOperationEnableImportFindingsForProductMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableImportFindingsForProductValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_EnableOrganizationAdminAccount.go b/service/securityhub/api_op_EnableOrganizationAdminAccount.go index b3677ce9862..73457570ec3 100644 --- a/service/securityhub/api_op_EnableOrganizationAdminAccount.go +++ b/service/securityhub/api_op_EnableOrganizationAdminAccount.go @@ -103,6 +103,9 @@ func (c *Client) addOperationEnableOrganizationAdminAccountMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableOrganizationAdminAccountValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_EnableSecurityHub.go b/service/securityhub/api_op_EnableSecurityHub.go index 8d63cc06981..5a7cd0c81fc 100644 --- a/service/securityhub/api_op_EnableSecurityHub.go +++ b/service/securityhub/api_op_EnableSecurityHub.go @@ -147,6 +147,9 @@ func (c *Client) addOperationEnableSecurityHubMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSecurityHub(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_GetAdministratorAccount.go b/service/securityhub/api_op_GetAdministratorAccount.go index 85e0f3bead3..e8d4eec299d 100644 --- a/service/securityhub/api_op_GetAdministratorAccount.go +++ b/service/securityhub/api_op_GetAdministratorAccount.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetAdministratorAccountMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAdministratorAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_GetConfigurationPolicy.go b/service/securityhub/api_op_GetConfigurationPolicy.go index da080a54251..3e44cff0ae4 100644 --- a/service/securityhub/api_op_GetConfigurationPolicy.go +++ b/service/securityhub/api_op_GetConfigurationPolicy.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetConfigurationPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_GetConfigurationPolicyAssociation.go b/service/securityhub/api_op_GetConfigurationPolicyAssociation.go index d03df6cc94f..f537591abd5 100644 --- a/service/securityhub/api_op_GetConfigurationPolicyAssociation.go +++ b/service/securityhub/api_op_GetConfigurationPolicyAssociation.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetConfigurationPolicyAssociationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationPolicyAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_GetEnabledStandards.go b/service/securityhub/api_op_GetEnabledStandards.go index f65dd9c17ee..51ac9163246 100644 --- a/service/securityhub/api_op_GetEnabledStandards.go +++ b/service/securityhub/api_op_GetEnabledStandards.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetEnabledStandardsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEnabledStandards(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationGetEnabledStandardsMiddlewares(stack *middleware.St return nil } -// GetEnabledStandardsAPIClient is a client that implements the -// GetEnabledStandards operation. -type GetEnabledStandardsAPIClient interface { - GetEnabledStandards(context.Context, *GetEnabledStandardsInput, ...func(*Options)) (*GetEnabledStandardsOutput, error) -} - -var _ GetEnabledStandardsAPIClient = (*Client)(nil) - // GetEnabledStandardsPaginatorOptions is the paginator options for // GetEnabledStandards type GetEnabledStandardsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *GetEnabledStandardsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetEnabledStandards(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *GetEnabledStandardsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetEnabledStandardsAPIClient is a client that implements the +// GetEnabledStandards operation. +type GetEnabledStandardsAPIClient interface { + GetEnabledStandards(context.Context, *GetEnabledStandardsInput, ...func(*Options)) (*GetEnabledStandardsOutput, error) +} + +var _ GetEnabledStandardsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetEnabledStandards(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_GetFindingAggregator.go b/service/securityhub/api_op_GetFindingAggregator.go index 7cf9ce118ee..43b3e36989f 100644 --- a/service/securityhub/api_op_GetFindingAggregator.go +++ b/service/securityhub/api_op_GetFindingAggregator.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetFindingAggregatorMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingAggregatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_GetFindingHistory.go b/service/securityhub/api_op_GetFindingHistory.go index aee6fd781ef..19cc64ab593 100644 --- a/service/securityhub/api_op_GetFindingHistory.go +++ b/service/securityhub/api_op_GetFindingHistory.go @@ -191,6 +191,9 @@ func (c *Client) addOperationGetFindingHistoryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFindingHistoryValidationMiddleware(stack); err != nil { return err } @@ -215,14 +218,6 @@ func (c *Client) addOperationGetFindingHistoryMiddlewares(stack *middleware.Stac return nil } -// GetFindingHistoryAPIClient is a client that implements the GetFindingHistory -// operation. -type GetFindingHistoryAPIClient interface { - GetFindingHistory(context.Context, *GetFindingHistoryInput, ...func(*Options)) (*GetFindingHistoryOutput, error) -} - -var _ GetFindingHistoryAPIClient = (*Client)(nil) - // GetFindingHistoryPaginatorOptions is the paginator options for GetFindingHistory type GetFindingHistoryPaginatorOptions struct { // The maximum number of results to be returned. If you don’t provide it, @@ -287,6 +282,9 @@ func (p *GetFindingHistoryPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFindingHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -306,6 +304,14 @@ func (p *GetFindingHistoryPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetFindingHistoryAPIClient is a client that implements the GetFindingHistory +// operation. +type GetFindingHistoryAPIClient interface { + GetFindingHistory(context.Context, *GetFindingHistoryInput, ...func(*Options)) (*GetFindingHistoryOutput, error) +} + +var _ GetFindingHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFindingHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_GetFindings.go b/service/securityhub/api_op_GetFindings.go index fff8212ab39..c57b7e73bbb 100644 --- a/service/securityhub/api_op_GetFindings.go +++ b/service/securityhub/api_op_GetFindings.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetFindingsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFindings(options.Region), middleware.Before); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationGetFindingsMiddlewares(stack *middleware.Stack, opt return nil } -// GetFindingsAPIClient is a client that implements the GetFindings operation. -type GetFindingsAPIClient interface { - GetFindings(context.Context, *GetFindingsInput, ...func(*Options)) (*GetFindingsOutput, error) -} - -var _ GetFindingsAPIClient = (*Client)(nil) - // GetFindingsPaginatorOptions is the paginator options for GetFindings type GetFindingsPaginatorOptions struct { // The maximum number of findings to return. @@ -224,6 +220,9 @@ func (p *GetFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *GetFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetFindingsAPIClient is a client that implements the GetFindings operation. +type GetFindingsAPIClient interface { + GetFindings(context.Context, *GetFindingsInput, ...func(*Options)) (*GetFindingsOutput, error) +} + +var _ GetFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_GetInsightResults.go b/service/securityhub/api_op_GetInsightResults.go index 0ff83a54dd7..61222525da0 100644 --- a/service/securityhub/api_op_GetInsightResults.go +++ b/service/securityhub/api_op_GetInsightResults.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetInsightResultsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightResultsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_GetInsights.go b/service/securityhub/api_op_GetInsights.go index 162932c8804..c6d38c8494e 100644 --- a/service/securityhub/api_op_GetInsights.go +++ b/service/securityhub/api_op_GetInsights.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetInsightsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInsights(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationGetInsightsMiddlewares(stack *middleware.Stack, opt return nil } -// GetInsightsAPIClient is a client that implements the GetInsights operation. -type GetInsightsAPIClient interface { - GetInsights(context.Context, *GetInsightsInput, ...func(*Options)) (*GetInsightsOutput, error) -} - -var _ GetInsightsAPIClient = (*Client)(nil) - // GetInsightsPaginatorOptions is the paginator options for GetInsights type GetInsightsPaginatorOptions struct { // The maximum number of items to return in the response. @@ -212,6 +208,9 @@ func (p *GetInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInsights(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *GetInsightsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// GetInsightsAPIClient is a client that implements the GetInsights operation. +type GetInsightsAPIClient interface { + GetInsights(context.Context, *GetInsightsInput, ...func(*Options)) (*GetInsightsOutput, error) +} + +var _ GetInsightsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInsights(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_GetInvitationsCount.go b/service/securityhub/api_op_GetInvitationsCount.go index 4db6a62ed69..0cd627ccb76 100644 --- a/service/securityhub/api_op_GetInvitationsCount.go +++ b/service/securityhub/api_op_GetInvitationsCount.go @@ -101,6 +101,9 @@ func (c *Client) addOperationGetInvitationsCountMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInvitationsCount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_GetMasterAccount.go b/service/securityhub/api_op_GetMasterAccount.go index c1ed45405ae..170565db5ab 100644 --- a/service/securityhub/api_op_GetMasterAccount.go +++ b/service/securityhub/api_op_GetMasterAccount.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetMasterAccountMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMasterAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_GetMembers.go b/service/securityhub/api_op_GetMembers.go index 30a4ee7ba31..83383a9dc92 100644 --- a/service/securityhub/api_op_GetMembers.go +++ b/service/securityhub/api_op_GetMembers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetMembersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_GetSecurityControlDefinition.go b/service/securityhub/api_op_GetSecurityControlDefinition.go index 9ec66c31b75..e3ec37b83d9 100644 --- a/service/securityhub/api_op_GetSecurityControlDefinition.go +++ b/service/securityhub/api_op_GetSecurityControlDefinition.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetSecurityControlDefinitionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSecurityControlDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_InviteMembers.go b/service/securityhub/api_op_InviteMembers.go index 4a636d9a466..ceb28f21cb6 100644 --- a/service/securityhub/api_op_InviteMembers.go +++ b/service/securityhub/api_op_InviteMembers.go @@ -119,6 +119,9 @@ func (c *Client) addOperationInviteMembersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInviteMembersValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_ListAutomationRules.go b/service/securityhub/api_op_ListAutomationRules.go index ef4c30979a9..514c2bcc61c 100644 --- a/service/securityhub/api_op_ListAutomationRules.go +++ b/service/securityhub/api_op_ListAutomationRules.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListAutomationRulesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutomationRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_ListConfigurationPolicies.go b/service/securityhub/api_op_ListConfigurationPolicies.go index 1676848a597..da571aac3a7 100644 --- a/service/securityhub/api_op_ListConfigurationPolicies.go +++ b/service/securityhub/api_op_ListConfigurationPolicies.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListConfigurationPoliciesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationPolicies(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListConfigurationPoliciesMiddlewares(stack *middlew return nil } -// ListConfigurationPoliciesAPIClient is a client that implements the -// ListConfigurationPolicies operation. -type ListConfigurationPoliciesAPIClient interface { - ListConfigurationPolicies(context.Context, *ListConfigurationPoliciesInput, ...func(*Options)) (*ListConfigurationPoliciesOutput, error) -} - -var _ ListConfigurationPoliciesAPIClient = (*Client)(nil) - // ListConfigurationPoliciesPaginatorOptions is the paginator options for // ListConfigurationPolicies type ListConfigurationPoliciesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListConfigurationPoliciesPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListConfigurationPoliciesPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListConfigurationPoliciesAPIClient is a client that implements the +// ListConfigurationPolicies operation. +type ListConfigurationPoliciesAPIClient interface { + ListConfigurationPolicies(context.Context, *ListConfigurationPoliciesInput, ...func(*Options)) (*ListConfigurationPoliciesOutput, error) +} + +var _ ListConfigurationPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListConfigurationPolicyAssociations.go b/service/securityhub/api_op_ListConfigurationPolicyAssociations.go index 15f3f75bf27..f33458b521f 100644 --- a/service/securityhub/api_op_ListConfigurationPolicyAssociations.go +++ b/service/securityhub/api_op_ListConfigurationPolicyAssociations.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListConfigurationPolicyAssociationsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationPolicyAssociations(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListConfigurationPolicyAssociationsMiddlewares(stac return nil } -// ListConfigurationPolicyAssociationsAPIClient is a client that implements the -// ListConfigurationPolicyAssociations operation. -type ListConfigurationPolicyAssociationsAPIClient interface { - ListConfigurationPolicyAssociations(context.Context, *ListConfigurationPolicyAssociationsInput, ...func(*Options)) (*ListConfigurationPolicyAssociationsOutput, error) -} - -var _ ListConfigurationPolicyAssociationsAPIClient = (*Client)(nil) - // ListConfigurationPolicyAssociationsPaginatorOptions is the paginator options // for ListConfigurationPolicyAssociations type ListConfigurationPolicyAssociationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListConfigurationPolicyAssociationsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationPolicyAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListConfigurationPolicyAssociationsPaginator) NextPage(ctx context.Cont return result, nil } +// ListConfigurationPolicyAssociationsAPIClient is a client that implements the +// ListConfigurationPolicyAssociations operation. +type ListConfigurationPolicyAssociationsAPIClient interface { + ListConfigurationPolicyAssociations(context.Context, *ListConfigurationPolicyAssociationsInput, ...func(*Options)) (*ListConfigurationPolicyAssociationsOutput, error) +} + +var _ ListConfigurationPolicyAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationPolicyAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListEnabledProductsForImport.go b/service/securityhub/api_op_ListEnabledProductsForImport.go index b3b4d5e9510..f9cd853b73a 100644 --- a/service/securityhub/api_op_ListEnabledProductsForImport.go +++ b/service/securityhub/api_op_ListEnabledProductsForImport.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListEnabledProductsForImportMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEnabledProductsForImport(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListEnabledProductsForImportMiddlewares(stack *midd return nil } -// ListEnabledProductsForImportAPIClient is a client that implements the -// ListEnabledProductsForImport operation. -type ListEnabledProductsForImportAPIClient interface { - ListEnabledProductsForImport(context.Context, *ListEnabledProductsForImportInput, ...func(*Options)) (*ListEnabledProductsForImportOutput, error) -} - -var _ ListEnabledProductsForImportAPIClient = (*Client)(nil) - // ListEnabledProductsForImportPaginatorOptions is the paginator options for // ListEnabledProductsForImport type ListEnabledProductsForImportPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListEnabledProductsForImportPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnabledProductsForImport(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListEnabledProductsForImportPaginator) NextPage(ctx context.Context, op return result, nil } +// ListEnabledProductsForImportAPIClient is a client that implements the +// ListEnabledProductsForImport operation. +type ListEnabledProductsForImportAPIClient interface { + ListEnabledProductsForImport(context.Context, *ListEnabledProductsForImportInput, ...func(*Options)) (*ListEnabledProductsForImportOutput, error) +} + +var _ ListEnabledProductsForImportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnabledProductsForImport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListFindingAggregators.go b/service/securityhub/api_op_ListFindingAggregators.go index ce484633024..94694b4cfb2 100644 --- a/service/securityhub/api_op_ListFindingAggregators.go +++ b/service/securityhub/api_op_ListFindingAggregators.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListFindingAggregatorsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFindingAggregators(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListFindingAggregatorsMiddlewares(stack *middleware return nil } -// ListFindingAggregatorsAPIClient is a client that implements the -// ListFindingAggregators operation. -type ListFindingAggregatorsAPIClient interface { - ListFindingAggregators(context.Context, *ListFindingAggregatorsInput, ...func(*Options)) (*ListFindingAggregatorsOutput, error) -} - -var _ ListFindingAggregatorsAPIClient = (*Client)(nil) - // ListFindingAggregatorsPaginatorOptions is the paginator options for // ListFindingAggregators type ListFindingAggregatorsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *ListFindingAggregatorsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFindingAggregators(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListFindingAggregatorsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListFindingAggregatorsAPIClient is a client that implements the +// ListFindingAggregators operation. +type ListFindingAggregatorsAPIClient interface { + ListFindingAggregators(context.Context, *ListFindingAggregatorsInput, ...func(*Options)) (*ListFindingAggregatorsOutput, error) +} + +var _ ListFindingAggregatorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFindingAggregators(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListInvitations.go b/service/securityhub/api_op_ListInvitations.go index b488aedb5f5..cdef8c2879c 100644 --- a/service/securityhub/api_op_ListInvitations.go +++ b/service/securityhub/api_op_ListInvitations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInvitations(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListInvitationsMiddlewares(stack *middleware.Stack, return nil } -// ListInvitationsAPIClient is a client that implements the ListInvitations -// operation. -type ListInvitationsAPIClient interface { - ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) -} - -var _ ListInvitationsAPIClient = (*Client)(nil) - // ListInvitationsPaginatorOptions is the paginator options for ListInvitations type ListInvitationsPaginatorOptions struct { // The maximum number of items to return in the response. @@ -211,6 +206,9 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListInvitationsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListInvitationsAPIClient is a client that implements the ListInvitations +// operation. +type ListInvitationsAPIClient interface { + ListInvitations(context.Context, *ListInvitationsInput, ...func(*Options)) (*ListInvitationsOutput, error) +} + +var _ ListInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListMembers.go b/service/securityhub/api_op_ListMembers.go index a66bc0a51de..cbf7ed0a2d2 100644 --- a/service/securityhub/api_op_ListMembers.go +++ b/service/securityhub/api_op_ListMembers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMembers(options.Region), middleware.Before); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListMembersMiddlewares(stack *middleware.Stack, opt return nil } -// ListMembersAPIClient is a client that implements the ListMembers operation. -type ListMembersAPIClient interface { - ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) -} - -var _ ListMembersAPIClient = (*Client)(nil) - // ListMembersPaginatorOptions is the paginator options for ListMembers type ListMembersPaginatorOptions struct { // The maximum number of items to return in the response. @@ -219,6 +215,9 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListMembersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMembersAPIClient is a client that implements the ListMembers operation. +type ListMembersAPIClient interface { + ListMembers(context.Context, *ListMembersInput, ...func(*Options)) (*ListMembersOutput, error) +} + +var _ ListMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListOrganizationAdminAccounts.go b/service/securityhub/api_op_ListOrganizationAdminAccounts.go index eab742061fd..f896bc0ea89 100644 --- a/service/securityhub/api_op_ListOrganizationAdminAccounts.go +++ b/service/securityhub/api_op_ListOrganizationAdminAccounts.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationAdminAccounts(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListOrganizationAdminAccountsMiddlewares(stack *mid return nil } -// ListOrganizationAdminAccountsAPIClient is a client that implements the -// ListOrganizationAdminAccounts operation. -type ListOrganizationAdminAccountsAPIClient interface { - ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) -} - -var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) - // ListOrganizationAdminAccountsPaginatorOptions is the paginator options for // ListOrganizationAdminAccounts type ListOrganizationAdminAccountsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationAdminAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListOrganizationAdminAccountsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListOrganizationAdminAccountsAPIClient is a client that implements the +// ListOrganizationAdminAccounts operation. +type ListOrganizationAdminAccountsAPIClient interface { + ListOrganizationAdminAccounts(context.Context, *ListOrganizationAdminAccountsInput, ...func(*Options)) (*ListOrganizationAdminAccountsOutput, error) +} + +var _ ListOrganizationAdminAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationAdminAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListSecurityControlDefinitions.go b/service/securityhub/api_op_ListSecurityControlDefinitions.go index 17bf15e03aa..1c97548f14b 100644 --- a/service/securityhub/api_op_ListSecurityControlDefinitions.go +++ b/service/securityhub/api_op_ListSecurityControlDefinitions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListSecurityControlDefinitionsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityControlDefinitions(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListSecurityControlDefinitionsMiddlewares(stack *mi return nil } -// ListSecurityControlDefinitionsAPIClient is a client that implements the -// ListSecurityControlDefinitions operation. -type ListSecurityControlDefinitionsAPIClient interface { - ListSecurityControlDefinitions(context.Context, *ListSecurityControlDefinitionsInput, ...func(*Options)) (*ListSecurityControlDefinitionsOutput, error) -} - -var _ ListSecurityControlDefinitionsAPIClient = (*Client)(nil) - // ListSecurityControlDefinitionsPaginatorOptions is the paginator options for // ListSecurityControlDefinitions type ListSecurityControlDefinitionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListSecurityControlDefinitionsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityControlDefinitions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListSecurityControlDefinitionsPaginator) NextPage(ctx context.Context, return result, nil } +// ListSecurityControlDefinitionsAPIClient is a client that implements the +// ListSecurityControlDefinitions operation. +type ListSecurityControlDefinitionsAPIClient interface { + ListSecurityControlDefinitions(context.Context, *ListSecurityControlDefinitionsInput, ...func(*Options)) (*ListSecurityControlDefinitionsOutput, error) +} + +var _ ListSecurityControlDefinitionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityControlDefinitions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListStandardsControlAssociations.go b/service/securityhub/api_op_ListStandardsControlAssociations.go index 9483f2f972d..c3386faf007 100644 --- a/service/securityhub/api_op_ListStandardsControlAssociations.go +++ b/service/securityhub/api_op_ListStandardsControlAssociations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListStandardsControlAssociationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStandardsControlAssociationsValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListStandardsControlAssociationsMiddlewares(stack * return nil } -// ListStandardsControlAssociationsAPIClient is a client that implements the -// ListStandardsControlAssociations operation. -type ListStandardsControlAssociationsAPIClient interface { - ListStandardsControlAssociations(context.Context, *ListStandardsControlAssociationsInput, ...func(*Options)) (*ListStandardsControlAssociationsOutput, error) -} - -var _ ListStandardsControlAssociationsAPIClient = (*Client)(nil) - // ListStandardsControlAssociationsPaginatorOptions is the paginator options for // ListStandardsControlAssociations type ListStandardsControlAssociationsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListStandardsControlAssociationsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStandardsControlAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListStandardsControlAssociationsPaginator) NextPage(ctx context.Context return result, nil } +// ListStandardsControlAssociationsAPIClient is a client that implements the +// ListStandardsControlAssociations operation. +type ListStandardsControlAssociationsAPIClient interface { + ListStandardsControlAssociations(context.Context, *ListStandardsControlAssociationsInput, ...func(*Options)) (*ListStandardsControlAssociationsOutput, error) +} + +var _ ListStandardsControlAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStandardsControlAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securityhub/api_op_ListTagsForResource.go b/service/securityhub/api_op_ListTagsForResource.go index ba0b9d7a748..07b65fa0cc2 100644 --- a/service/securityhub/api_op_ListTagsForResource.go +++ b/service/securityhub/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_StartConfigurationPolicyAssociation.go b/service/securityhub/api_op_StartConfigurationPolicyAssociation.go index 526a48b704c..82b3ec8b484 100644 --- a/service/securityhub/api_op_StartConfigurationPolicyAssociation.go +++ b/service/securityhub/api_op_StartConfigurationPolicyAssociation.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartConfigurationPolicyAssociationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartConfigurationPolicyAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_StartConfigurationPolicyDisassociation.go b/service/securityhub/api_op_StartConfigurationPolicyDisassociation.go index cd9ffdfcc12..468c5dffee5 100644 --- a/service/securityhub/api_op_StartConfigurationPolicyDisassociation.go +++ b/service/securityhub/api_op_StartConfigurationPolicyDisassociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationStartConfigurationPolicyDisassociationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartConfigurationPolicyDisassociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_TagResource.go b/service/securityhub/api_op_TagResource.go index 6af10d3268a..5c6019c114a 100644 --- a/service/securityhub/api_op_TagResource.go +++ b/service/securityhub/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UntagResource.go b/service/securityhub/api_op_UntagResource.go index d6117097792..6da99874f99 100644 --- a/service/securityhub/api_op_UntagResource.go +++ b/service/securityhub/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateActionTarget.go b/service/securityhub/api_op_UpdateActionTarget.go index 4814cf9d752..a33b43ec0f0 100644 --- a/service/securityhub/api_op_UpdateActionTarget.go +++ b/service/securityhub/api_op_UpdateActionTarget.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateActionTargetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateActionTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateConfigurationPolicy.go b/service/securityhub/api_op_UpdateConfigurationPolicy.go index d8f18d32f9a..d46ee1650c6 100644 --- a/service/securityhub/api_op_UpdateConfigurationPolicy.go +++ b/service/securityhub/api_op_UpdateConfigurationPolicy.go @@ -161,6 +161,9 @@ func (c *Client) addOperationUpdateConfigurationPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateFindingAggregator.go b/service/securityhub/api_op_UpdateFindingAggregator.go index aa96f9aebfb..c6e2af00306 100644 --- a/service/securityhub/api_op_UpdateFindingAggregator.go +++ b/service/securityhub/api_op_UpdateFindingAggregator.go @@ -155,6 +155,9 @@ func (c *Client) addOperationUpdateFindingAggregatorMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFindingAggregatorValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateFindings.go b/service/securityhub/api_op_UpdateFindings.go index 1fe5ff971c4..34bd3dbacaa 100644 --- a/service/securityhub/api_op_UpdateFindings.go +++ b/service/securityhub/api_op_UpdateFindings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateFindingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateInsight.go b/service/securityhub/api_op_UpdateInsight.go index 9c525d69ed8..2a08b20558f 100644 --- a/service/securityhub/api_op_UpdateInsight.go +++ b/service/securityhub/api_op_UpdateInsight.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateInsightMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateOrganizationConfiguration.go b/service/securityhub/api_op_UpdateOrganizationConfiguration.go index edfb669de37..b066054ac47 100644 --- a/service/securityhub/api_op_UpdateOrganizationConfiguration.go +++ b/service/securityhub/api_op_UpdateOrganizationConfiguration.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUpdateOrganizationConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateSecurityControl.go b/service/securityhub/api_op_UpdateSecurityControl.go index a181416bd71..8ea4055cf7a 100644 --- a/service/securityhub/api_op_UpdateSecurityControl.go +++ b/service/securityhub/api_op_UpdateSecurityControl.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateSecurityControlMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSecurityControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateSecurityHubConfiguration.go b/service/securityhub/api_op_UpdateSecurityHubConfiguration.go index d218caa9f26..2fe7475239b 100644 --- a/service/securityhub/api_op_UpdateSecurityHubConfiguration.go +++ b/service/securityhub/api_op_UpdateSecurityHubConfiguration.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateSecurityHubConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityHubConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securityhub/api_op_UpdateStandardsControl.go b/service/securityhub/api_op_UpdateStandardsControl.go index 0341ee729e3..8d980e812bf 100644 --- a/service/securityhub/api_op_UpdateStandardsControl.go +++ b/service/securityhub/api_op_UpdateStandardsControl.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateStandardsControlMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStandardsControlValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_client.go b/service/securitylake/api_client.go index 2930deadfbe..9f8d6705ec8 100644 --- a/service/securitylake/api_client.go +++ b/service/securitylake/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/securitylake/api_op_CreateAwsLogSource.go b/service/securitylake/api_op_CreateAwsLogSource.go index 2b034a2e2d7..33c704e7747 100644 --- a/service/securitylake/api_op_CreateAwsLogSource.go +++ b/service/securitylake/api_op_CreateAwsLogSource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateAwsLogSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAwsLogSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_CreateCustomLogSource.go b/service/securitylake/api_op_CreateCustomLogSource.go index 4b398df6d2e..5640b481d61 100644 --- a/service/securitylake/api_op_CreateCustomLogSource.go +++ b/service/securitylake/api_op_CreateCustomLogSource.go @@ -186,6 +186,9 @@ func (c *Client) addOperationCreateCustomLogSourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomLogSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_CreateDataLake.go b/service/securitylake/api_op_CreateDataLake.go index 2cd6b0755a4..dce8121f104 100644 --- a/service/securitylake/api_op_CreateDataLake.go +++ b/service/securitylake/api_op_CreateDataLake.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateDataLakeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataLakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_CreateDataLakeExceptionSubscription.go b/service/securitylake/api_op_CreateDataLakeExceptionSubscription.go index c52f4080296..cf30b769fa9 100644 --- a/service/securitylake/api_op_CreateDataLakeExceptionSubscription.go +++ b/service/securitylake/api_op_CreateDataLakeExceptionSubscription.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateDataLakeExceptionSubscriptionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataLakeExceptionSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_CreateDataLakeOrganizationConfiguration.go b/service/securitylake/api_op_CreateDataLakeOrganizationConfiguration.go index 1d7cd04b31f..51c1bead073 100644 --- a/service/securitylake/api_op_CreateDataLakeOrganizationConfiguration.go +++ b/service/securitylake/api_op_CreateDataLakeOrganizationConfiguration.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCreateDataLakeOrganizationConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDataLakeOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_CreateSubscriber.go b/service/securitylake/api_op_CreateSubscriber.go index 43a05d0d8a9..82927959bca 100644 --- a/service/securitylake/api_op_CreateSubscriber.go +++ b/service/securitylake/api_op_CreateSubscriber.go @@ -132,6 +132,9 @@ func (c *Client) addOperationCreateSubscriberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_CreateSubscriberNotification.go b/service/securitylake/api_op_CreateSubscriberNotification.go index 84b15579cbd..4f096c8f918 100644 --- a/service/securitylake/api_op_CreateSubscriberNotification.go +++ b/service/securitylake/api_op_CreateSubscriberNotification.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateSubscriberNotificationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSubscriberNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteAwsLogSource.go b/service/securitylake/api_op_DeleteAwsLogSource.go index fbe19ced374..612c3fde390 100644 --- a/service/securitylake/api_op_DeleteAwsLogSource.go +++ b/service/securitylake/api_op_DeleteAwsLogSource.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteAwsLogSourceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAwsLogSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteCustomLogSource.go b/service/securitylake/api_op_DeleteCustomLogSource.go index c1d9df59b90..cd30de3657f 100644 --- a/service/securitylake/api_op_DeleteCustomLogSource.go +++ b/service/securitylake/api_op_DeleteCustomLogSource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteCustomLogSourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomLogSourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteDataLake.go b/service/securitylake/api_op_DeleteDataLake.go index ef27cc4ea6f..de4f76e6569 100644 --- a/service/securitylake/api_op_DeleteDataLake.go +++ b/service/securitylake/api_op_DeleteDataLake.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteDataLakeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataLakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteDataLakeExceptionSubscription.go b/service/securitylake/api_op_DeleteDataLakeExceptionSubscription.go index 1fe05934aca..b68cccbf977 100644 --- a/service/securitylake/api_op_DeleteDataLakeExceptionSubscription.go +++ b/service/securitylake/api_op_DeleteDataLakeExceptionSubscription.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDeleteDataLakeExceptionSubscriptionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDataLakeExceptionSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go b/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go index ccf27d012a1..f0107722d9d 100644 --- a/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go +++ b/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDataLakeOrganizationConfigurationMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDataLakeOrganizationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteSubscriber.go b/service/securitylake/api_op_DeleteSubscriber.go index 00676cb6513..96c4c10931f 100644 --- a/service/securitylake/api_op_DeleteSubscriber.go +++ b/service/securitylake/api_op_DeleteSubscriber.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSubscriberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeleteSubscriberNotification.go b/service/securitylake/api_op_DeleteSubscriberNotification.go index 9664b4ba23c..e7e4d34e014 100644 --- a/service/securitylake/api_op_DeleteSubscriberNotification.go +++ b/service/securitylake/api_op_DeleteSubscriberNotification.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteSubscriberNotificationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSubscriberNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_DeregisterDataLakeDelegatedAdministrator.go b/service/securitylake/api_op_DeregisterDataLakeDelegatedAdministrator.go index 7af3aa226ad..47e48c19c36 100644 --- a/service/securitylake/api_op_DeregisterDataLakeDelegatedAdministrator.go +++ b/service/securitylake/api_op_DeregisterDataLakeDelegatedAdministrator.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDeregisterDataLakeDelegatedAdministratorMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterDataLakeDelegatedAdministrator(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securitylake/api_op_GetDataLakeExceptionSubscription.go b/service/securitylake/api_op_GetDataLakeExceptionSubscription.go index d025f93e4c4..bbf1490ddcb 100644 --- a/service/securitylake/api_op_GetDataLakeExceptionSubscription.go +++ b/service/securitylake/api_op_GetDataLakeExceptionSubscription.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDataLakeExceptionSubscriptionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataLakeExceptionSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securitylake/api_op_GetDataLakeOrganizationConfiguration.go b/service/securitylake/api_op_GetDataLakeOrganizationConfiguration.go index d599091fca9..f1515813014 100644 --- a/service/securitylake/api_op_GetDataLakeOrganizationConfiguration.go +++ b/service/securitylake/api_op_GetDataLakeOrganizationConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetDataLakeOrganizationConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataLakeOrganizationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securitylake/api_op_GetDataLakeSources.go b/service/securitylake/api_op_GetDataLakeSources.go index 2ebaa5be20f..0cbcde60ace 100644 --- a/service/securitylake/api_op_GetDataLakeSources.go +++ b/service/securitylake/api_op_GetDataLakeSources.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetDataLakeSourcesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataLakeSources(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationGetDataLakeSourcesMiddlewares(stack *middleware.Sta return nil } -// GetDataLakeSourcesAPIClient is a client that implements the GetDataLakeSources -// operation. -type GetDataLakeSourcesAPIClient interface { - GetDataLakeSources(context.Context, *GetDataLakeSourcesInput, ...func(*Options)) (*GetDataLakeSourcesOutput, error) -} - -var _ GetDataLakeSourcesAPIClient = (*Client)(nil) - // GetDataLakeSourcesPaginatorOptions is the paginator options for // GetDataLakeSources type GetDataLakeSourcesPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *GetDataLakeSourcesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDataLakeSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *GetDataLakeSourcesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetDataLakeSourcesAPIClient is a client that implements the GetDataLakeSources +// operation. +type GetDataLakeSourcesAPIClient interface { + GetDataLakeSources(context.Context, *GetDataLakeSourcesInput, ...func(*Options)) (*GetDataLakeSourcesOutput, error) +} + +var _ GetDataLakeSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDataLakeSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securitylake/api_op_GetSubscriber.go b/service/securitylake/api_op_GetSubscriber.go index a63fccf3bbf..f68ee824362 100644 --- a/service/securitylake/api_op_GetSubscriber.go +++ b/service/securitylake/api_op_GetSubscriber.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetSubscriberMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_ListDataLakeExceptions.go b/service/securitylake/api_op_ListDataLakeExceptions.go index e5113d38ad8..87a82df6259 100644 --- a/service/securitylake/api_op_ListDataLakeExceptions.go +++ b/service/securitylake/api_op_ListDataLakeExceptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListDataLakeExceptionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataLakeExceptions(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListDataLakeExceptionsMiddlewares(stack *middleware return nil } -// ListDataLakeExceptionsAPIClient is a client that implements the -// ListDataLakeExceptions operation. -type ListDataLakeExceptionsAPIClient interface { - ListDataLakeExceptions(context.Context, *ListDataLakeExceptionsInput, ...func(*Options)) (*ListDataLakeExceptionsOutput, error) -} - -var _ ListDataLakeExceptionsAPIClient = (*Client)(nil) - // ListDataLakeExceptionsPaginatorOptions is the paginator options for // ListDataLakeExceptions type ListDataLakeExceptionsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListDataLakeExceptionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDataLakeExceptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListDataLakeExceptionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListDataLakeExceptionsAPIClient is a client that implements the +// ListDataLakeExceptions operation. +type ListDataLakeExceptionsAPIClient interface { + ListDataLakeExceptions(context.Context, *ListDataLakeExceptionsInput, ...func(*Options)) (*ListDataLakeExceptionsOutput, error) +} + +var _ ListDataLakeExceptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDataLakeExceptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securitylake/api_op_ListDataLakes.go b/service/securitylake/api_op_ListDataLakes.go index b296644b0fe..d7c03f673e7 100644 --- a/service/securitylake/api_op_ListDataLakes.go +++ b/service/securitylake/api_op_ListDataLakes.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListDataLakesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDataLakes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/securitylake/api_op_ListLogSources.go b/service/securitylake/api_op_ListLogSources.go index 843ddd7d9bb..d69620e0a3d 100644 --- a/service/securitylake/api_op_ListLogSources.go +++ b/service/securitylake/api_op_ListLogSources.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListLogSourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLogSources(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListLogSourcesMiddlewares(stack *middleware.Stack, return nil } -// ListLogSourcesAPIClient is a client that implements the ListLogSources -// operation. -type ListLogSourcesAPIClient interface { - ListLogSources(context.Context, *ListLogSourcesInput, ...func(*Options)) (*ListLogSourcesOutput, error) -} - -var _ ListLogSourcesAPIClient = (*Client)(nil) - // ListLogSourcesPaginatorOptions is the paginator options for ListLogSources type ListLogSourcesPaginatorOptions struct { // The maximum number of accounts for which the log sources are displayed. @@ -213,6 +208,9 @@ func (p *ListLogSourcesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLogSources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListLogSourcesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListLogSourcesAPIClient is a client that implements the ListLogSources +// operation. +type ListLogSourcesAPIClient interface { + ListLogSources(context.Context, *ListLogSourcesInput, ...func(*Options)) (*ListLogSourcesOutput, error) +} + +var _ ListLogSourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLogSources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securitylake/api_op_ListSubscribers.go b/service/securitylake/api_op_ListSubscribers.go index 551766ffa08..45541d1f81f 100644 --- a/service/securitylake/api_op_ListSubscribers.go +++ b/service/securitylake/api_op_ListSubscribers.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListSubscribersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscribers(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListSubscribersMiddlewares(stack *middleware.Stack, return nil } -// ListSubscribersAPIClient is a client that implements the ListSubscribers -// operation. -type ListSubscribersAPIClient interface { - ListSubscribers(context.Context, *ListSubscribersInput, ...func(*Options)) (*ListSubscribersOutput, error) -} - -var _ ListSubscribersAPIClient = (*Client)(nil) - // ListSubscribersPaginatorOptions is the paginator options for ListSubscribers type ListSubscribersPaginatorOptions struct { // The maximum number of accounts for which the configuration is displayed. @@ -206,6 +201,9 @@ func (p *ListSubscribersPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscribers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListSubscribersPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListSubscribersAPIClient is a client that implements the ListSubscribers +// operation. +type ListSubscribersAPIClient interface { + ListSubscribers(context.Context, *ListSubscribersInput, ...func(*Options)) (*ListSubscribersOutput, error) +} + +var _ ListSubscribersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscribers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/securitylake/api_op_ListTagsForResource.go b/service/securitylake/api_op_ListTagsForResource.go index b0b6405ecd3..1f5b4a1b8b0 100644 --- a/service/securitylake/api_op_ListTagsForResource.go +++ b/service/securitylake/api_op_ListTagsForResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_RegisterDataLakeDelegatedAdministrator.go b/service/securitylake/api_op_RegisterDataLakeDelegatedAdministrator.go index 3704629764b..b8837d7870e 100644 --- a/service/securitylake/api_op_RegisterDataLakeDelegatedAdministrator.go +++ b/service/securitylake/api_op_RegisterDataLakeDelegatedAdministrator.go @@ -104,6 +104,9 @@ func (c *Client) addOperationRegisterDataLakeDelegatedAdministratorMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDataLakeDelegatedAdministratorValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_TagResource.go b/service/securitylake/api_op_TagResource.go index 49be09bd496..288e6d4c7f9 100644 --- a/service/securitylake/api_op_TagResource.go +++ b/service/securitylake/api_op_TagResource.go @@ -120,6 +120,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_UntagResource.go b/service/securitylake/api_op_UntagResource.go index 7eef2d09861..b078a539747 100644 --- a/service/securitylake/api_op_UntagResource.go +++ b/service/securitylake/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_UpdateDataLake.go b/service/securitylake/api_op_UpdateDataLake.go index 814a563c2ce..8bd8714df76 100644 --- a/service/securitylake/api_op_UpdateDataLake.go +++ b/service/securitylake/api_op_UpdateDataLake.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDataLakeMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataLakeValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_UpdateDataLakeExceptionSubscription.go b/service/securitylake/api_op_UpdateDataLakeExceptionSubscription.go index c3fcbf51b04..93becba8cfb 100644 --- a/service/securitylake/api_op_UpdateDataLakeExceptionSubscription.go +++ b/service/securitylake/api_op_UpdateDataLakeExceptionSubscription.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateDataLakeExceptionSubscriptionMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDataLakeExceptionSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_UpdateSubscriber.go b/service/securitylake/api_op_UpdateSubscriber.go index 255c30cd4a7..8c2e1b2dfd3 100644 --- a/service/securitylake/api_op_UpdateSubscriber.go +++ b/service/securitylake/api_op_UpdateSubscriber.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateSubscriberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriberValidationMiddleware(stack); err != nil { return err } diff --git a/service/securitylake/api_op_UpdateSubscriberNotification.go b/service/securitylake/api_op_UpdateSubscriberNotification.go index d4fb0a6e0c6..d968df4a0a2 100644 --- a/service/securitylake/api_op_UpdateSubscriberNotification.go +++ b/service/securitylake/api_op_UpdateSubscriberNotification.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateSubscriberNotificationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSubscriberNotificationValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_client.go b/service/serverlessapplicationrepository/api_client.go index a3365fb69f0..33cc33b567c 100644 --- a/service/serverlessapplicationrepository/api_client.go +++ b/service/serverlessapplicationrepository/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/serverlessapplicationrepository/api_op_CreateApplication.go b/service/serverlessapplicationrepository/api_op_CreateApplication.go index 87f9b3a0e64..9337dad2771 100644 --- a/service/serverlessapplicationrepository/api_op_CreateApplication.go +++ b/service/serverlessapplicationrepository/api_op_CreateApplication.go @@ -273,6 +273,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_CreateApplicationVersion.go b/service/serverlessapplicationrepository/api_op_CreateApplicationVersion.go index aa28c1a9409..08bb5b48356 100644 --- a/service/serverlessapplicationrepository/api_op_CreateApplicationVersion.go +++ b/service/serverlessapplicationrepository/api_op_CreateApplicationVersion.go @@ -195,6 +195,9 @@ func (c *Client) addOperationCreateApplicationVersionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_CreateCloudFormationChangeSet.go b/service/serverlessapplicationrepository/api_op_CreateCloudFormationChangeSet.go index e41cc8f8b44..8ce4e4e1fbc 100644 --- a/service/serverlessapplicationrepository/api_op_CreateCloudFormationChangeSet.go +++ b/service/serverlessapplicationrepository/api_op_CreateCloudFormationChangeSet.go @@ -227,6 +227,9 @@ func (c *Client) addOperationCreateCloudFormationChangeSetMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCloudFormationChangeSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_CreateCloudFormationTemplate.go b/service/serverlessapplicationrepository/api_op_CreateCloudFormationTemplate.go index 49ac0b99632..e16eb0dfc23 100644 --- a/service/serverlessapplicationrepository/api_op_CreateCloudFormationTemplate.go +++ b/service/serverlessapplicationrepository/api_op_CreateCloudFormationTemplate.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreateCloudFormationTemplateMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCloudFormationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_DeleteApplication.go b/service/serverlessapplicationrepository/api_op_DeleteApplication.go index 488c7c635a9..d07c051d493 100644 --- a/service/serverlessapplicationrepository/api_op_DeleteApplication.go +++ b/service/serverlessapplicationrepository/api_op_DeleteApplication.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_GetApplication.go b/service/serverlessapplicationrepository/api_op_GetApplication.go index 5187d07d016..bcbbf9046ba 100644 --- a/service/serverlessapplicationrepository/api_op_GetApplication.go +++ b/service/serverlessapplicationrepository/api_op_GetApplication.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_GetApplicationPolicy.go b/service/serverlessapplicationrepository/api_op_GetApplicationPolicy.go index 8ed4cb6d593..8977d98705a 100644 --- a/service/serverlessapplicationrepository/api_op_GetApplicationPolicy.go +++ b/service/serverlessapplicationrepository/api_op_GetApplicationPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetApplicationPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_GetCloudFormationTemplate.go b/service/serverlessapplicationrepository/api_op_GetCloudFormationTemplate.go index 37a33db23c5..08dd9464f84 100644 --- a/service/serverlessapplicationrepository/api_op_GetCloudFormationTemplate.go +++ b/service/serverlessapplicationrepository/api_op_GetCloudFormationTemplate.go @@ -142,6 +142,9 @@ func (c *Client) addOperationGetCloudFormationTemplateMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCloudFormationTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go b/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go index 8060bdc6d19..7ed996774db 100644 --- a/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go +++ b/service/serverlessapplicationrepository/api_op_ListApplicationDependencies.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListApplicationDependenciesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationDependenciesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListApplicationDependenciesMiddlewares(stack *middl return nil } -// ListApplicationDependenciesAPIClient is a client that implements the -// ListApplicationDependencies operation. -type ListApplicationDependenciesAPIClient interface { - ListApplicationDependencies(context.Context, *ListApplicationDependenciesInput, ...func(*Options)) (*ListApplicationDependenciesOutput, error) -} - -var _ ListApplicationDependenciesAPIClient = (*Client)(nil) - // ListApplicationDependenciesPaginatorOptions is the paginator options for // ListApplicationDependencies type ListApplicationDependenciesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListApplicationDependenciesPaginator) NextPage(ctx context.Context, opt } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationDependencies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListApplicationDependenciesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListApplicationDependenciesAPIClient is a client that implements the +// ListApplicationDependencies operation. +type ListApplicationDependenciesAPIClient interface { + ListApplicationDependencies(context.Context, *ListApplicationDependenciesInput, ...func(*Options)) (*ListApplicationDependenciesOutput, error) +} + +var _ ListApplicationDependenciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationDependencies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go b/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go index 2a6d892b44b..6093167a875 100644 --- a/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go +++ b/service/serverlessapplicationrepository/api_op_ListApplicationVersions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationVersionsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middlewar return nil } -// ListApplicationVersionsAPIClient is a client that implements the -// ListApplicationVersions operation. -type ListApplicationVersionsAPIClient interface { - ListApplicationVersions(context.Context, *ListApplicationVersionsInput, ...func(*Options)) (*ListApplicationVersionsOutput, error) -} - -var _ ListApplicationVersionsAPIClient = (*Client)(nil) - // ListApplicationVersionsPaginatorOptions is the paginator options for // ListApplicationVersions type ListApplicationVersionsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListApplicationVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListApplicationVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationVersionsAPIClient is a client that implements the +// ListApplicationVersions operation. +type ListApplicationVersionsAPIClient interface { + ListApplicationVersions(context.Context, *ListApplicationVersionsInput, ...func(*Options)) (*ListApplicationVersionsOutput, error) +} + +var _ ListApplicationVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/serverlessapplicationrepository/api_op_ListApplications.go b/service/serverlessapplicationrepository/api_op_ListApplications.go index 35c192eaaf6..f118c5c72d0 100644 --- a/service/serverlessapplicationrepository/api_op_ListApplications.go +++ b/service/serverlessapplicationrepository/api_op_ListApplications.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The total number of items to return. @@ -202,6 +197,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -221,6 +219,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/serverlessapplicationrepository/api_op_PutApplicationPolicy.go b/service/serverlessapplicationrepository/api_op_PutApplicationPolicy.go index 998c31229c0..38b13938582 100644 --- a/service/serverlessapplicationrepository/api_op_PutApplicationPolicy.go +++ b/service/serverlessapplicationrepository/api_op_PutApplicationPolicy.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutApplicationPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_UnshareApplication.go b/service/serverlessapplicationrepository/api_op_UnshareApplication.go index e8ff6661757..2f018d57279 100644 --- a/service/serverlessapplicationrepository/api_op_UnshareApplication.go +++ b/service/serverlessapplicationrepository/api_op_UnshareApplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUnshareApplicationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnshareApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/serverlessapplicationrepository/api_op_UpdateApplication.go b/service/serverlessapplicationrepository/api_op_UpdateApplication.go index 7b03695871c..b44e8e798aa 100644 --- a/service/serverlessapplicationrepository/api_op_UpdateApplication.go +++ b/service/serverlessapplicationrepository/api_op_UpdateApplication.go @@ -202,6 +202,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_client.go b/service/servicecatalog/api_client.go index c3d2f0ba6ab..3dff033a49b 100644 --- a/service/servicecatalog/api_client.go +++ b/service/servicecatalog/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/servicecatalog/api_op_AcceptPortfolioShare.go b/service/servicecatalog/api_op_AcceptPortfolioShare.go index febdc9b7c73..a683b20a988 100644 --- a/service/servicecatalog/api_op_AcceptPortfolioShare.go +++ b/service/servicecatalog/api_op_AcceptPortfolioShare.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAcceptPortfolioShareMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptPortfolioShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_AssociateBudgetWithResource.go b/service/servicecatalog/api_op_AssociateBudgetWithResource.go index 4bc5064f7f2..ad6cc091fa9 100644 --- a/service/servicecatalog/api_op_AssociateBudgetWithResource.go +++ b/service/servicecatalog/api_op_AssociateBudgetWithResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateBudgetWithResourceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateBudgetWithResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_AssociatePrincipalWithPortfolio.go b/service/servicecatalog/api_op_AssociatePrincipalWithPortfolio.go index fb02449529b..6b463b9b1e3 100644 --- a/service/servicecatalog/api_op_AssociatePrincipalWithPortfolio.go +++ b/service/servicecatalog/api_op_AssociatePrincipalWithPortfolio.go @@ -187,6 +187,9 @@ func (c *Client) addOperationAssociatePrincipalWithPortfolioMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociatePrincipalWithPortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_AssociateProductWithPortfolio.go b/service/servicecatalog/api_op_AssociateProductWithPortfolio.go index fd987223fc3..2ed087da4c3 100644 --- a/service/servicecatalog/api_op_AssociateProductWithPortfolio.go +++ b/service/servicecatalog/api_op_AssociateProductWithPortfolio.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssociateProductWithPortfolioMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateProductWithPortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go b/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go index 29b6623a73d..57c9e6b1c15 100644 --- a/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go +++ b/service/servicecatalog/api_op_AssociateServiceActionWithProvisioningArtifact.go @@ -123,6 +123,9 @@ func (c *Client) addOperationAssociateServiceActionWithProvisioningArtifactMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opAssociateServiceActionWithProvisioningArtifactMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_AssociateTagOptionWithResource.go b/service/servicecatalog/api_op_AssociateTagOptionWithResource.go index 664684d78f1..99371df5078 100644 --- a/service/servicecatalog/api_op_AssociateTagOptionWithResource.go +++ b/service/servicecatalog/api_op_AssociateTagOptionWithResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateTagOptionWithResourceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTagOptionWithResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_BatchAssociateServiceActionWithProvisioningArtifact.go b/service/servicecatalog/api_op_BatchAssociateServiceActionWithProvisioningArtifact.go index 252390cd29f..ebaca8159c3 100644 --- a/service/servicecatalog/api_op_BatchAssociateServiceActionWithProvisioningArtifact.go +++ b/service/servicecatalog/api_op_BatchAssociateServiceActionWithProvisioningArtifact.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchAssociateServiceActionWithProvisioningArtifact if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchAssociateServiceActionWithProvisioningArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_BatchDisassociateServiceActionFromProvisioningArtifact.go b/service/servicecatalog/api_op_BatchDisassociateServiceActionFromProvisioningArtifact.go index 362b7367749..412f4e2f2d6 100644 --- a/service/servicecatalog/api_op_BatchDisassociateServiceActionFromProvisioningArtifact.go +++ b/service/servicecatalog/api_op_BatchDisassociateServiceActionFromProvisioningArtifact.go @@ -116,6 +116,9 @@ func (c *Client) addOperationBatchDisassociateServiceActionFromProvisioningArtif if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDisassociateServiceActionFromProvisioningArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_CopyProduct.go b/service/servicecatalog/api_op_CopyProduct.go index becb5765cc7..1cec38a84a8 100644 --- a/service/servicecatalog/api_op_CopyProduct.go +++ b/service/servicecatalog/api_op_CopyProduct.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCopyProductMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCopyProductMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreateConstraint.go b/service/servicecatalog/api_op_CreateConstraint.go index bc2bbabc501..c7a2aa0e4e5 100644 --- a/service/servicecatalog/api_op_CreateConstraint.go +++ b/service/servicecatalog/api_op_CreateConstraint.go @@ -208,6 +208,9 @@ func (c *Client) addOperationCreateConstraintMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateConstraintMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreatePortfolio.go b/service/servicecatalog/api_op_CreatePortfolio.go index 8d0f5bb619c..517ee604048 100644 --- a/service/servicecatalog/api_op_CreatePortfolio.go +++ b/service/servicecatalog/api_op_CreatePortfolio.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreatePortfolioMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePortfolioMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreatePortfolioShare.go b/service/servicecatalog/api_op_CreatePortfolioShare.go index a0755ab8c11..1745ac8e4ac 100644 --- a/service/servicecatalog/api_op_CreatePortfolioShare.go +++ b/service/servicecatalog/api_op_CreatePortfolioShare.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreatePortfolioShareMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePortfolioShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreateProduct.go b/service/servicecatalog/api_op_CreateProduct.go index 3e54025c238..3f7ca48bf7d 100644 --- a/service/servicecatalog/api_op_CreateProduct.go +++ b/service/servicecatalog/api_op_CreateProduct.go @@ -176,6 +176,9 @@ func (c *Client) addOperationCreateProductMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProductMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreateProvisionedProductPlan.go b/service/servicecatalog/api_op_CreateProvisionedProductPlan.go index 78ae0962951..e5aa0577127 100644 --- a/service/servicecatalog/api_op_CreateProvisionedProductPlan.go +++ b/service/servicecatalog/api_op_CreateProvisionedProductPlan.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateProvisionedProductPlanMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProvisionedProductPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreateProvisioningArtifact.go b/service/servicecatalog/api_op_CreateProvisioningArtifact.go index b9d5bc60426..1a2d686159e 100644 --- a/service/servicecatalog/api_op_CreateProvisioningArtifact.go +++ b/service/servicecatalog/api_op_CreateProvisioningArtifact.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateProvisioningArtifactMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProvisioningArtifactMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreateServiceAction.go b/service/servicecatalog/api_op_CreateServiceAction.go index 60d95bd86e8..d7474abe651 100644 --- a/service/servicecatalog/api_op_CreateServiceAction.go +++ b/service/servicecatalog/api_op_CreateServiceAction.go @@ -154,6 +154,9 @@ func (c *Client) addOperationCreateServiceActionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceActionMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_CreateTagOption.go b/service/servicecatalog/api_op_CreateTagOption.go index 74db4f88d1b..395ed77c93d 100644 --- a/service/servicecatalog/api_op_CreateTagOption.go +++ b/service/servicecatalog/api_op_CreateTagOption.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateTagOptionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeleteConstraint.go b/service/servicecatalog/api_op_DeleteConstraint.go index fd1deabc94c..b781c9487fe 100644 --- a/service/servicecatalog/api_op_DeleteConstraint.go +++ b/service/servicecatalog/api_op_DeleteConstraint.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConstraintMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConstraintValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeletePortfolio.go b/service/servicecatalog/api_op_DeletePortfolio.go index b1897623fff..023ff46c175 100644 --- a/service/servicecatalog/api_op_DeletePortfolio.go +++ b/service/servicecatalog/api_op_DeletePortfolio.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeletePortfolioMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeletePortfolioShare.go b/service/servicecatalog/api_op_DeletePortfolioShare.go index fa3bf31171e..a2705cf4a04 100644 --- a/service/servicecatalog/api_op_DeletePortfolioShare.go +++ b/service/servicecatalog/api_op_DeletePortfolioShare.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeletePortfolioShareMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePortfolioShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeleteProduct.go b/service/servicecatalog/api_op_DeleteProduct.go index d2df6e2bf51..64e3b6dcb7c 100644 --- a/service/servicecatalog/api_op_DeleteProduct.go +++ b/service/servicecatalog/api_op_DeleteProduct.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteProductMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProductValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeleteProvisionedProductPlan.go b/service/servicecatalog/api_op_DeleteProvisionedProductPlan.go index 06314c8a3c4..52e1d17d47f 100644 --- a/service/servicecatalog/api_op_DeleteProvisionedProductPlan.go +++ b/service/servicecatalog/api_op_DeleteProvisionedProductPlan.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteProvisionedProductPlanMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProvisionedProductPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeleteProvisioningArtifact.go b/service/servicecatalog/api_op_DeleteProvisioningArtifact.go index 3e29851d568..4873796f5f5 100644 --- a/service/servicecatalog/api_op_DeleteProvisioningArtifact.go +++ b/service/servicecatalog/api_op_DeleteProvisioningArtifact.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteProvisioningArtifactMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProvisioningArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeleteServiceAction.go b/service/servicecatalog/api_op_DeleteServiceAction.go index e5ba23ca016..56918b575d6 100644 --- a/service/servicecatalog/api_op_DeleteServiceAction.go +++ b/service/servicecatalog/api_op_DeleteServiceAction.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteServiceActionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteServiceActionMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_DeleteTagOption.go b/service/servicecatalog/api_op_DeleteTagOption.go index 58af59e8462..0512501c453 100644 --- a/service/servicecatalog/api_op_DeleteTagOption.go +++ b/service/servicecatalog/api_op_DeleteTagOption.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteTagOptionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeConstraint.go b/service/servicecatalog/api_op_DescribeConstraint.go index 661c70f0411..2a65f0c738a 100644 --- a/service/servicecatalog/api_op_DescribeConstraint.go +++ b/service/servicecatalog/api_op_DescribeConstraint.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeConstraintMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConstraintValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeCopyProductStatus.go b/service/servicecatalog/api_op_DescribeCopyProductStatus.go index 7fa7d74814f..5eeb1b4963f 100644 --- a/service/servicecatalog/api_op_DescribeCopyProductStatus.go +++ b/service/servicecatalog/api_op_DescribeCopyProductStatus.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeCopyProductStatusMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCopyProductStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribePortfolio.go b/service/servicecatalog/api_op_DescribePortfolio.go index 5c41560ac5c..a7026a63d3d 100644 --- a/service/servicecatalog/api_op_DescribePortfolio.go +++ b/service/servicecatalog/api_op_DescribePortfolio.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribePortfolioMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribePortfolioShareStatus.go b/service/servicecatalog/api_op_DescribePortfolioShareStatus.go index ee1dbe2817e..2c49eff13b8 100644 --- a/service/servicecatalog/api_op_DescribePortfolioShareStatus.go +++ b/service/servicecatalog/api_op_DescribePortfolioShareStatus.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribePortfolioShareStatusMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePortfolioShareStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribePortfolioShares.go b/service/servicecatalog/api_op_DescribePortfolioShares.go index cc9bc505c85..eee525fbc18 100644 --- a/service/servicecatalog/api_op_DescribePortfolioShares.go +++ b/service/servicecatalog/api_op_DescribePortfolioShares.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribePortfolioSharesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePortfolioSharesValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribePortfolioSharesMiddlewares(stack *middlewar return nil } -// DescribePortfolioSharesAPIClient is a client that implements the -// DescribePortfolioShares operation. -type DescribePortfolioSharesAPIClient interface { - DescribePortfolioShares(context.Context, *DescribePortfolioSharesInput, ...func(*Options)) (*DescribePortfolioSharesOutput, error) -} - -var _ DescribePortfolioSharesAPIClient = (*Client)(nil) - // DescribePortfolioSharesPaginatorOptions is the paginator options for // DescribePortfolioShares type DescribePortfolioSharesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *DescribePortfolioSharesPaginator) NextPage(ctx context.Context, optFns params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePortfolioShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *DescribePortfolioSharesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribePortfolioSharesAPIClient is a client that implements the +// DescribePortfolioShares operation. +type DescribePortfolioSharesAPIClient interface { + DescribePortfolioShares(context.Context, *DescribePortfolioSharesInput, ...func(*Options)) (*DescribePortfolioSharesOutput, error) +} + +var _ DescribePortfolioSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePortfolioShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_DescribeProduct.go b/service/servicecatalog/api_op_DescribeProduct.go index 5a56706bfef..110e2a501ce 100644 --- a/service/servicecatalog/api_op_DescribeProduct.go +++ b/service/servicecatalog/api_op_DescribeProduct.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeProductMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProduct(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeProductAsAdmin.go b/service/servicecatalog/api_op_DescribeProductAsAdmin.go index c86cc5d94dd..f91f48345f0 100644 --- a/service/servicecatalog/api_op_DescribeProductAsAdmin.go +++ b/service/servicecatalog/api_op_DescribeProductAsAdmin.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeProductAsAdminMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProductAsAdmin(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeProductView.go b/service/servicecatalog/api_op_DescribeProductView.go index f54c79e58ea..b4909c262bf 100644 --- a/service/servicecatalog/api_op_DescribeProductView.go +++ b/service/servicecatalog/api_op_DescribeProductView.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeProductViewMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProductViewValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeProvisionedProduct.go b/service/servicecatalog/api_op_DescribeProvisionedProduct.go index c2fe603e01f..34129fdca68 100644 --- a/service/servicecatalog/api_op_DescribeProvisionedProduct.go +++ b/service/servicecatalog/api_op_DescribeProvisionedProduct.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeProvisionedProductMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProvisionedProduct(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeProvisionedProductPlan.go b/service/servicecatalog/api_op_DescribeProvisionedProductPlan.go index 986ad2a609b..2cca3440bdb 100644 --- a/service/servicecatalog/api_op_DescribeProvisionedProductPlan.go +++ b/service/servicecatalog/api_op_DescribeProvisionedProductPlan.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeProvisionedProductPlanMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProvisionedProductPlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeProvisioningArtifact.go b/service/servicecatalog/api_op_DescribeProvisioningArtifact.go index a851dd659d4..275e832b0d7 100644 --- a/service/servicecatalog/api_op_DescribeProvisioningArtifact.go +++ b/service/servicecatalog/api_op_DescribeProvisioningArtifact.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeProvisioningArtifactMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProvisioningArtifact(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeProvisioningParameters.go b/service/servicecatalog/api_op_DescribeProvisioningParameters.go index 5e104af880a..06846945559 100644 --- a/service/servicecatalog/api_op_DescribeProvisioningParameters.go +++ b/service/servicecatalog/api_op_DescribeProvisioningParameters.go @@ -163,6 +163,9 @@ func (c *Client) addOperationDescribeProvisioningParametersMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProvisioningParameters(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeRecord.go b/service/servicecatalog/api_op_DescribeRecord.go index c68d2a8973d..024cd1f4113 100644 --- a/service/servicecatalog/api_op_DescribeRecord.go +++ b/service/servicecatalog/api_op_DescribeRecord.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeRecordMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeServiceAction.go b/service/servicecatalog/api_op_DescribeServiceAction.go index f7714ba2264..2d00c8d0fe2 100644 --- a/service/servicecatalog/api_op_DescribeServiceAction.go +++ b/service/servicecatalog/api_op_DescribeServiceAction.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeServiceActionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeServiceActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeServiceActionExecutionParameters.go b/service/servicecatalog/api_op_DescribeServiceActionExecutionParameters.go index 99a511d2bc1..a666e5d3777 100644 --- a/service/servicecatalog/api_op_DescribeServiceActionExecutionParameters.go +++ b/service/servicecatalog/api_op_DescribeServiceActionExecutionParameters.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeServiceActionExecutionParametersMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeServiceActionExecutionParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DescribeTagOption.go b/service/servicecatalog/api_op_DescribeTagOption.go index 5a963fa8dc1..9c62a822d88 100644 --- a/service/servicecatalog/api_op_DescribeTagOption.go +++ b/service/servicecatalog/api_op_DescribeTagOption.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeTagOptionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DisableAWSOrganizationsAccess.go b/service/servicecatalog/api_op_DisableAWSOrganizationsAccess.go index 9456db7b373..6a114a41918 100644 --- a/service/servicecatalog/api_op_DisableAWSOrganizationsAccess.go +++ b/service/servicecatalog/api_op_DisableAWSOrganizationsAccess.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDisableAWSOrganizationsAccessMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableAWSOrganizationsAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_DisassociateBudgetFromResource.go b/service/servicecatalog/api_op_DisassociateBudgetFromResource.go index 7b0c369937b..eaa7739daf7 100644 --- a/service/servicecatalog/api_op_DisassociateBudgetFromResource.go +++ b/service/servicecatalog/api_op_DisassociateBudgetFromResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateBudgetFromResourceMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateBudgetFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DisassociatePrincipalFromPortfolio.go b/service/servicecatalog/api_op_DisassociatePrincipalFromPortfolio.go index 3970217cf41..4b7c41c87d8 100644 --- a/service/servicecatalog/api_op_DisassociatePrincipalFromPortfolio.go +++ b/service/servicecatalog/api_op_DisassociatePrincipalFromPortfolio.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDisassociatePrincipalFromPortfolioMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociatePrincipalFromPortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DisassociateProductFromPortfolio.go b/service/servicecatalog/api_op_DisassociateProductFromPortfolio.go index a856b3751e3..4796be96866 100644 --- a/service/servicecatalog/api_op_DisassociateProductFromPortfolio.go +++ b/service/servicecatalog/api_op_DisassociateProductFromPortfolio.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisassociateProductFromPortfolioMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateProductFromPortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go b/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go index c1c12bd6afa..205523ff8df 100644 --- a/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go +++ b/service/servicecatalog/api_op_DisassociateServiceActionFromProvisioningArtifact.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDisassociateServiceActionFromProvisioningArtifactMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDisassociateServiceActionFromProvisioningArtifactMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_DisassociateTagOptionFromResource.go b/service/servicecatalog/api_op_DisassociateTagOptionFromResource.go index e48d9f565e7..f1408927942 100644 --- a/service/servicecatalog/api_op_DisassociateTagOptionFromResource.go +++ b/service/servicecatalog/api_op_DisassociateTagOptionFromResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDisassociateTagOptionFromResourceMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTagOptionFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_EnableAWSOrganizationsAccess.go b/service/servicecatalog/api_op_EnableAWSOrganizationsAccess.go index 09c80743988..aa8e5ea203d 100644 --- a/service/servicecatalog/api_op_EnableAWSOrganizationsAccess.go +++ b/service/servicecatalog/api_op_EnableAWSOrganizationsAccess.go @@ -115,6 +115,9 @@ func (c *Client) addOperationEnableAWSOrganizationsAccessMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAWSOrganizationsAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_ExecuteProvisionedProductPlan.go b/service/servicecatalog/api_op_ExecuteProvisionedProductPlan.go index 6331c6d8d2b..536561fcaba 100644 --- a/service/servicecatalog/api_op_ExecuteProvisionedProductPlan.go +++ b/service/servicecatalog/api_op_ExecuteProvisionedProductPlan.go @@ -121,6 +121,9 @@ func (c *Client) addOperationExecuteProvisionedProductPlanMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExecuteProvisionedProductPlanMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_ExecuteProvisionedProductServiceAction.go b/service/servicecatalog/api_op_ExecuteProvisionedProductServiceAction.go index f02615e9c36..257386b2cfe 100644 --- a/service/servicecatalog/api_op_ExecuteProvisionedProductServiceAction.go +++ b/service/servicecatalog/api_op_ExecuteProvisionedProductServiceAction.go @@ -131,6 +131,9 @@ func (c *Client) addOperationExecuteProvisionedProductServiceActionMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExecuteProvisionedProductServiceActionMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_GetAWSOrganizationsAccessStatus.go b/service/servicecatalog/api_op_GetAWSOrganizationsAccessStatus.go index a5d9cac25e5..02a29168051 100644 --- a/service/servicecatalog/api_op_GetAWSOrganizationsAccessStatus.go +++ b/service/servicecatalog/api_op_GetAWSOrganizationsAccessStatus.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetAWSOrganizationsAccessStatusMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAWSOrganizationsAccessStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_GetProvisionedProductOutputs.go b/service/servicecatalog/api_op_GetProvisionedProductOutputs.go index f2036ae7054..82a04817d6b 100644 --- a/service/servicecatalog/api_op_GetProvisionedProductOutputs.go +++ b/service/servicecatalog/api_op_GetProvisionedProductOutputs.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetProvisionedProductOutputsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProvisionedProductOutputs(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationGetProvisionedProductOutputsMiddlewares(stack *midd return nil } -// GetProvisionedProductOutputsAPIClient is a client that implements the -// GetProvisionedProductOutputs operation. -type GetProvisionedProductOutputsAPIClient interface { - GetProvisionedProductOutputs(context.Context, *GetProvisionedProductOutputsInput, ...func(*Options)) (*GetProvisionedProductOutputsOutput, error) -} - -var _ GetProvisionedProductOutputsAPIClient = (*Client)(nil) - // GetProvisionedProductOutputsPaginatorOptions is the paginator options for // GetProvisionedProductOutputs type GetProvisionedProductOutputsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *GetProvisionedProductOutputsPaginator) NextPage(ctx context.Context, op params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetProvisionedProductOutputs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *GetProvisionedProductOutputsPaginator) NextPage(ctx context.Context, op return result, nil } +// GetProvisionedProductOutputsAPIClient is a client that implements the +// GetProvisionedProductOutputs operation. +type GetProvisionedProductOutputsAPIClient interface { + GetProvisionedProductOutputs(context.Context, *GetProvisionedProductOutputsInput, ...func(*Options)) (*GetProvisionedProductOutputsOutput, error) +} + +var _ GetProvisionedProductOutputsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetProvisionedProductOutputs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ImportAsProvisionedProduct.go b/service/servicecatalog/api_op_ImportAsProvisionedProduct.go index 4adee707b79..301410a703d 100644 --- a/service/servicecatalog/api_op_ImportAsProvisionedProduct.go +++ b/service/servicecatalog/api_op_ImportAsProvisionedProduct.go @@ -165,6 +165,9 @@ func (c *Client) addOperationImportAsProvisionedProductMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportAsProvisionedProductMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go b/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go index 5c789e76d1b..17e22d2ea86 100644 --- a/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go +++ b/service/servicecatalog/api_op_ListAcceptedPortfolioShares.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListAcceptedPortfolioSharesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAcceptedPortfolioShares(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListAcceptedPortfolioSharesMiddlewares(stack *middl return nil } -// ListAcceptedPortfolioSharesAPIClient is a client that implements the -// ListAcceptedPortfolioShares operation. -type ListAcceptedPortfolioSharesAPIClient interface { - ListAcceptedPortfolioShares(context.Context, *ListAcceptedPortfolioSharesInput, ...func(*Options)) (*ListAcceptedPortfolioSharesOutput, error) -} - -var _ ListAcceptedPortfolioSharesAPIClient = (*Client)(nil) - // ListAcceptedPortfolioSharesPaginatorOptions is the paginator options for // ListAcceptedPortfolioShares type ListAcceptedPortfolioSharesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListAcceptedPortfolioSharesPaginator) NextPage(ctx context.Context, opt params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAcceptedPortfolioShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListAcceptedPortfolioSharesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListAcceptedPortfolioSharesAPIClient is a client that implements the +// ListAcceptedPortfolioShares operation. +type ListAcceptedPortfolioSharesAPIClient interface { + ListAcceptedPortfolioShares(context.Context, *ListAcceptedPortfolioSharesInput, ...func(*Options)) (*ListAcceptedPortfolioSharesOutput, error) +} + +var _ ListAcceptedPortfolioSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAcceptedPortfolioShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListBudgetsForResource.go b/service/servicecatalog/api_op_ListBudgetsForResource.go index af90aaa09ba..035430ccea7 100644 --- a/service/servicecatalog/api_op_ListBudgetsForResource.go +++ b/service/servicecatalog/api_op_ListBudgetsForResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListBudgetsForResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListBudgetsForResourceValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListBudgetsForResourceMiddlewares(stack *middleware return nil } -// ListBudgetsForResourceAPIClient is a client that implements the -// ListBudgetsForResource operation. -type ListBudgetsForResourceAPIClient interface { - ListBudgetsForResource(context.Context, *ListBudgetsForResourceInput, ...func(*Options)) (*ListBudgetsForResourceOutput, error) -} - -var _ ListBudgetsForResourceAPIClient = (*Client)(nil) - // ListBudgetsForResourcePaginatorOptions is the paginator options for // ListBudgetsForResource type ListBudgetsForResourcePaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListBudgetsForResourcePaginator) NextPage(ctx context.Context, optFns . params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBudgetsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListBudgetsForResourcePaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListBudgetsForResourceAPIClient is a client that implements the +// ListBudgetsForResource operation. +type ListBudgetsForResourceAPIClient interface { + ListBudgetsForResource(context.Context, *ListBudgetsForResourceInput, ...func(*Options)) (*ListBudgetsForResourceOutput, error) +} + +var _ ListBudgetsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBudgetsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListConstraintsForPortfolio.go b/service/servicecatalog/api_op_ListConstraintsForPortfolio.go index 5c6e100613c..e772af44fa1 100644 --- a/service/servicecatalog/api_op_ListConstraintsForPortfolio.go +++ b/service/servicecatalog/api_op_ListConstraintsForPortfolio.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListConstraintsForPortfolioMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListConstraintsForPortfolioValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListConstraintsForPortfolioMiddlewares(stack *middl return nil } -// ListConstraintsForPortfolioAPIClient is a client that implements the -// ListConstraintsForPortfolio operation. -type ListConstraintsForPortfolioAPIClient interface { - ListConstraintsForPortfolio(context.Context, *ListConstraintsForPortfolioInput, ...func(*Options)) (*ListConstraintsForPortfolioOutput, error) -} - -var _ ListConstraintsForPortfolioAPIClient = (*Client)(nil) - // ListConstraintsForPortfolioPaginatorOptions is the paginator options for // ListConstraintsForPortfolio type ListConstraintsForPortfolioPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListConstraintsForPortfolioPaginator) NextPage(ctx context.Context, opt params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConstraintsForPortfolio(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListConstraintsForPortfolioPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListConstraintsForPortfolioAPIClient is a client that implements the +// ListConstraintsForPortfolio operation. +type ListConstraintsForPortfolioAPIClient interface { + ListConstraintsForPortfolio(context.Context, *ListConstraintsForPortfolioInput, ...func(*Options)) (*ListConstraintsForPortfolioOutput, error) +} + +var _ ListConstraintsForPortfolioAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConstraintsForPortfolio(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListLaunchPaths.go b/service/servicecatalog/api_op_ListLaunchPaths.go index 312ea2dc087..451b7bb79f7 100644 --- a/service/servicecatalog/api_op_ListLaunchPaths.go +++ b/service/servicecatalog/api_op_ListLaunchPaths.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListLaunchPathsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLaunchPathsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListLaunchPathsMiddlewares(stack *middleware.Stack, return nil } -// ListLaunchPathsAPIClient is a client that implements the ListLaunchPaths -// operation. -type ListLaunchPathsAPIClient interface { - ListLaunchPaths(context.Context, *ListLaunchPathsInput, ...func(*Options)) (*ListLaunchPathsOutput, error) -} - -var _ ListLaunchPathsAPIClient = (*Client)(nil) - // ListLaunchPathsPaginatorOptions is the paginator options for ListLaunchPaths type ListLaunchPathsPaginatorOptions struct { // The maximum number of items to return with this call. @@ -225,6 +220,9 @@ func (p *ListLaunchPathsPaginator) NextPage(ctx context.Context, optFns ...func( params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLaunchPaths(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListLaunchPathsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListLaunchPathsAPIClient is a client that implements the ListLaunchPaths +// operation. +type ListLaunchPathsAPIClient interface { + ListLaunchPaths(context.Context, *ListLaunchPathsInput, ...func(*Options)) (*ListLaunchPathsOutput, error) +} + +var _ ListLaunchPathsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLaunchPaths(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go b/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go index 84d9a469a28..766f7aa7ef6 100644 --- a/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go +++ b/service/servicecatalog/api_op_ListOrganizationPortfolioAccess.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListOrganizationPortfolioAccessMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrganizationPortfolioAccessValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListOrganizationPortfolioAccessMiddlewares(stack *m return nil } -// ListOrganizationPortfolioAccessAPIClient is a client that implements the -// ListOrganizationPortfolioAccess operation. -type ListOrganizationPortfolioAccessAPIClient interface { - ListOrganizationPortfolioAccess(context.Context, *ListOrganizationPortfolioAccessInput, ...func(*Options)) (*ListOrganizationPortfolioAccessOutput, error) -} - -var _ ListOrganizationPortfolioAccessAPIClient = (*Client)(nil) - // ListOrganizationPortfolioAccessPaginatorOptions is the paginator options for // ListOrganizationPortfolioAccess type ListOrganizationPortfolioAccessPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListOrganizationPortfolioAccessPaginator) NextPage(ctx context.Context, params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationPortfolioAccess(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListOrganizationPortfolioAccessPaginator) NextPage(ctx context.Context, return result, nil } +// ListOrganizationPortfolioAccessAPIClient is a client that implements the +// ListOrganizationPortfolioAccess operation. +type ListOrganizationPortfolioAccessAPIClient interface { + ListOrganizationPortfolioAccess(context.Context, *ListOrganizationPortfolioAccessInput, ...func(*Options)) (*ListOrganizationPortfolioAccessOutput, error) +} + +var _ ListOrganizationPortfolioAccessAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationPortfolioAccess(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListPortfolioAccess.go b/service/servicecatalog/api_op_ListPortfolioAccess.go index 44f69f8a56a..98b4994a26b 100644 --- a/service/servicecatalog/api_op_ListPortfolioAccess.go +++ b/service/servicecatalog/api_op_ListPortfolioAccess.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListPortfolioAccessMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPortfolioAccessValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListPortfolioAccessMiddlewares(stack *middleware.St return nil } -// ListPortfolioAccessAPIClient is a client that implements the -// ListPortfolioAccess operation. -type ListPortfolioAccessAPIClient interface { - ListPortfolioAccess(context.Context, *ListPortfolioAccessInput, ...func(*Options)) (*ListPortfolioAccessOutput, error) -} - -var _ ListPortfolioAccessAPIClient = (*Client)(nil) - // ListPortfolioAccessPaginatorOptions is the paginator options for // ListPortfolioAccess type ListPortfolioAccessPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListPortfolioAccessPaginator) NextPage(ctx context.Context, optFns ...f params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPortfolioAccess(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListPortfolioAccessPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPortfolioAccessAPIClient is a client that implements the +// ListPortfolioAccess operation. +type ListPortfolioAccessAPIClient interface { + ListPortfolioAccess(context.Context, *ListPortfolioAccessInput, ...func(*Options)) (*ListPortfolioAccessOutput, error) +} + +var _ ListPortfolioAccessAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPortfolioAccess(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListPortfolios.go b/service/servicecatalog/api_op_ListPortfolios.go index 9c1c6a6e475..ec0a6d357ae 100644 --- a/service/servicecatalog/api_op_ListPortfolios.go +++ b/service/servicecatalog/api_op_ListPortfolios.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPortfoliosMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPortfolios(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListPortfoliosMiddlewares(stack *middleware.Stack, return nil } -// ListPortfoliosAPIClient is a client that implements the ListPortfolios -// operation. -type ListPortfoliosAPIClient interface { - ListPortfolios(context.Context, *ListPortfoliosInput, ...func(*Options)) (*ListPortfoliosOutput, error) -} - -var _ ListPortfoliosAPIClient = (*Client)(nil) - // ListPortfoliosPaginatorOptions is the paginator options for ListPortfolios type ListPortfoliosPaginatorOptions struct { // The maximum number of items to return with this call. @@ -207,6 +202,9 @@ func (p *ListPortfoliosPaginator) NextPage(ctx context.Context, optFns ...func(* params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPortfolios(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListPortfoliosPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListPortfoliosAPIClient is a client that implements the ListPortfolios +// operation. +type ListPortfoliosAPIClient interface { + ListPortfolios(context.Context, *ListPortfoliosInput, ...func(*Options)) (*ListPortfoliosOutput, error) +} + +var _ ListPortfoliosAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPortfolios(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListPortfoliosForProduct.go b/service/servicecatalog/api_op_ListPortfoliosForProduct.go index b93d9f89b17..f3ac73387c4 100644 --- a/service/servicecatalog/api_op_ListPortfoliosForProduct.go +++ b/service/servicecatalog/api_op_ListPortfoliosForProduct.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListPortfoliosForProductMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPortfoliosForProductValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListPortfoliosForProductMiddlewares(stack *middlewa return nil } -// ListPortfoliosForProductAPIClient is a client that implements the -// ListPortfoliosForProduct operation. -type ListPortfoliosForProductAPIClient interface { - ListPortfoliosForProduct(context.Context, *ListPortfoliosForProductInput, ...func(*Options)) (*ListPortfoliosForProductOutput, error) -} - -var _ ListPortfoliosForProductAPIClient = (*Client)(nil) - // ListPortfoliosForProductPaginatorOptions is the paginator options for // ListPortfoliosForProduct type ListPortfoliosForProductPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListPortfoliosForProductPaginator) NextPage(ctx context.Context, optFns params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPortfoliosForProduct(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListPortfoliosForProductPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListPortfoliosForProductAPIClient is a client that implements the +// ListPortfoliosForProduct operation. +type ListPortfoliosForProductAPIClient interface { + ListPortfoliosForProduct(context.Context, *ListPortfoliosForProductInput, ...func(*Options)) (*ListPortfoliosForProductOutput, error) +} + +var _ ListPortfoliosForProductAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPortfoliosForProduct(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go b/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go index d7ca9c28223..1efa76204e8 100644 --- a/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go +++ b/service/servicecatalog/api_op_ListPrincipalsForPortfolio.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListPrincipalsForPortfolioMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPrincipalsForPortfolioValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListPrincipalsForPortfolioMiddlewares(stack *middle return nil } -// ListPrincipalsForPortfolioAPIClient is a client that implements the -// ListPrincipalsForPortfolio operation. -type ListPrincipalsForPortfolioAPIClient interface { - ListPrincipalsForPortfolio(context.Context, *ListPrincipalsForPortfolioInput, ...func(*Options)) (*ListPrincipalsForPortfolioOutput, error) -} - -var _ ListPrincipalsForPortfolioAPIClient = (*Client)(nil) - // ListPrincipalsForPortfolioPaginatorOptions is the paginator options for // ListPrincipalsForPortfolio type ListPrincipalsForPortfolioPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListPrincipalsForPortfolioPaginator) NextPage(ctx context.Context, optF params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPrincipalsForPortfolio(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListPrincipalsForPortfolioPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListPrincipalsForPortfolioAPIClient is a client that implements the +// ListPrincipalsForPortfolio operation. +type ListPrincipalsForPortfolioAPIClient interface { + ListPrincipalsForPortfolio(context.Context, *ListPrincipalsForPortfolioInput, ...func(*Options)) (*ListPrincipalsForPortfolioOutput, error) +} + +var _ ListPrincipalsForPortfolioAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPrincipalsForPortfolio(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListProvisionedProductPlans.go b/service/servicecatalog/api_op_ListProvisionedProductPlans.go index bec0c5e08fc..d77cb868c55 100644 --- a/service/servicecatalog/api_op_ListProvisionedProductPlans.go +++ b/service/servicecatalog/api_op_ListProvisionedProductPlans.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListProvisionedProductPlansMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProvisionedProductPlans(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_ListProvisioningArtifacts.go b/service/servicecatalog/api_op_ListProvisioningArtifacts.go index ad112ce6793..f01c275a9eb 100644 --- a/service/servicecatalog/api_op_ListProvisioningArtifacts.go +++ b/service/servicecatalog/api_op_ListProvisioningArtifacts.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListProvisioningArtifactsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProvisioningArtifactsValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go b/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go index 80d52eea74f..b9c74c5d31d 100644 --- a/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go +++ b/service/servicecatalog/api_op_ListProvisioningArtifactsForServiceAction.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListProvisioningArtifactsForServiceActionMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProvisioningArtifactsForServiceActionValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListProvisioningArtifactsForServiceActionMiddleware return nil } -// ListProvisioningArtifactsForServiceActionAPIClient is a client that implements -// the ListProvisioningArtifactsForServiceAction operation. -type ListProvisioningArtifactsForServiceActionAPIClient interface { - ListProvisioningArtifactsForServiceAction(context.Context, *ListProvisioningArtifactsForServiceActionInput, ...func(*Options)) (*ListProvisioningArtifactsForServiceActionOutput, error) -} - -var _ ListProvisioningArtifactsForServiceActionAPIClient = (*Client)(nil) - // ListProvisioningArtifactsForServiceActionPaginatorOptions is the paginator // options for ListProvisioningArtifactsForServiceAction type ListProvisioningArtifactsForServiceActionPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListProvisioningArtifactsForServiceActionPaginator) NextPage(ctx contex params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProvisioningArtifactsForServiceAction(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListProvisioningArtifactsForServiceActionPaginator) NextPage(ctx contex return result, nil } +// ListProvisioningArtifactsForServiceActionAPIClient is a client that implements +// the ListProvisioningArtifactsForServiceAction operation. +type ListProvisioningArtifactsForServiceActionAPIClient interface { + ListProvisioningArtifactsForServiceAction(context.Context, *ListProvisioningArtifactsForServiceActionInput, ...func(*Options)) (*ListProvisioningArtifactsForServiceActionOutput, error) +} + +var _ ListProvisioningArtifactsForServiceActionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProvisioningArtifactsForServiceAction(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListRecordHistory.go b/service/servicecatalog/api_op_ListRecordHistory.go index 64df6856924..f58e1fe1008 100644 --- a/service/servicecatalog/api_op_ListRecordHistory.go +++ b/service/servicecatalog/api_op_ListRecordHistory.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListRecordHistoryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecordHistory(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_ListResourcesForTagOption.go b/service/servicecatalog/api_op_ListResourcesForTagOption.go index 30b0bb5d904..7969d88b64a 100644 --- a/service/servicecatalog/api_op_ListResourcesForTagOption.go +++ b/service/servicecatalog/api_op_ListResourcesForTagOption.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListResourcesForTagOptionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesForTagOptionValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListResourcesForTagOptionMiddlewares(stack *middlew return nil } -// ListResourcesForTagOptionAPIClient is a client that implements the -// ListResourcesForTagOption operation. -type ListResourcesForTagOptionAPIClient interface { - ListResourcesForTagOption(context.Context, *ListResourcesForTagOptionInput, ...func(*Options)) (*ListResourcesForTagOptionOutput, error) -} - -var _ ListResourcesForTagOptionAPIClient = (*Client)(nil) - // ListResourcesForTagOptionPaginatorOptions is the paginator options for // ListResourcesForTagOption type ListResourcesForTagOptionPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListResourcesForTagOptionPaginator) NextPage(ctx context.Context, optFn params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourcesForTagOption(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListResourcesForTagOptionPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListResourcesForTagOptionAPIClient is a client that implements the +// ListResourcesForTagOption operation. +type ListResourcesForTagOptionAPIClient interface { + ListResourcesForTagOption(context.Context, *ListResourcesForTagOptionInput, ...func(*Options)) (*ListResourcesForTagOptionOutput, error) +} + +var _ ListResourcesForTagOptionAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourcesForTagOption(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListServiceActions.go b/service/servicecatalog/api_op_ListServiceActions.go index 8474d1a86b7..456fe655f4d 100644 --- a/service/servicecatalog/api_op_ListServiceActions.go +++ b/service/servicecatalog/api_op_ListServiceActions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListServiceActionsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceActions(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListServiceActionsMiddlewares(stack *middleware.Sta return nil } -// ListServiceActionsAPIClient is a client that implements the ListServiceActions -// operation. -type ListServiceActionsAPIClient interface { - ListServiceActions(context.Context, *ListServiceActionsInput, ...func(*Options)) (*ListServiceActionsOutput, error) -} - -var _ ListServiceActionsAPIClient = (*Client)(nil) - // ListServiceActionsPaginatorOptions is the paginator options for // ListServiceActions type ListServiceActionsPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListServiceActionsPaginator) NextPage(ctx context.Context, optFns ...fu params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceActions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListServiceActionsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListServiceActionsAPIClient is a client that implements the ListServiceActions +// operation. +type ListServiceActionsAPIClient interface { + ListServiceActions(context.Context, *ListServiceActionsInput, ...func(*Options)) (*ListServiceActionsOutput, error) +} + +var _ ListServiceActionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceActions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go b/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go index c3ca1435f2f..5fa077aa8d8 100644 --- a/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go +++ b/service/servicecatalog/api_op_ListServiceActionsForProvisioningArtifact.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListServiceActionsForProvisioningArtifactMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceActionsForProvisioningArtifactValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListServiceActionsForProvisioningArtifactMiddleware return nil } -// ListServiceActionsForProvisioningArtifactAPIClient is a client that implements -// the ListServiceActionsForProvisioningArtifact operation. -type ListServiceActionsForProvisioningArtifactAPIClient interface { - ListServiceActionsForProvisioningArtifact(context.Context, *ListServiceActionsForProvisioningArtifactInput, ...func(*Options)) (*ListServiceActionsForProvisioningArtifactOutput, error) -} - -var _ ListServiceActionsForProvisioningArtifactAPIClient = (*Client)(nil) - // ListServiceActionsForProvisioningArtifactPaginatorOptions is the paginator // options for ListServiceActionsForProvisioningArtifact type ListServiceActionsForProvisioningArtifactPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListServiceActionsForProvisioningArtifactPaginator) NextPage(ctx contex params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceActionsForProvisioningArtifact(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListServiceActionsForProvisioningArtifactPaginator) NextPage(ctx contex return result, nil } +// ListServiceActionsForProvisioningArtifactAPIClient is a client that implements +// the ListServiceActionsForProvisioningArtifact operation. +type ListServiceActionsForProvisioningArtifactAPIClient interface { + ListServiceActionsForProvisioningArtifact(context.Context, *ListServiceActionsForProvisioningArtifactInput, ...func(*Options)) (*ListServiceActionsForProvisioningArtifactOutput, error) +} + +var _ ListServiceActionsForProvisioningArtifactAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceActionsForProvisioningArtifact(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_ListStackInstancesForProvisionedProduct.go b/service/servicecatalog/api_op_ListStackInstancesForProvisionedProduct.go index 0078f874d25..4201caa0a00 100644 --- a/service/servicecatalog/api_op_ListStackInstancesForProvisionedProduct.go +++ b/service/servicecatalog/api_op_ListStackInstancesForProvisionedProduct.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListStackInstancesForProvisionedProductMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStackInstancesForProvisionedProductValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_ListTagOptions.go b/service/servicecatalog/api_op_ListTagOptions.go index 474153e3d91..5d88f8fb45b 100644 --- a/service/servicecatalog/api_op_ListTagOptions.go +++ b/service/servicecatalog/api_op_ListTagOptions.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTagOptionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagOptions(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListTagOptionsMiddlewares(stack *middleware.Stack, return nil } -// ListTagOptionsAPIClient is a client that implements the ListTagOptions -// operation. -type ListTagOptionsAPIClient interface { - ListTagOptions(context.Context, *ListTagOptionsInput, ...func(*Options)) (*ListTagOptionsOutput, error) -} - -var _ ListTagOptionsAPIClient = (*Client)(nil) - // ListTagOptionsPaginatorOptions is the paginator options for ListTagOptions type ListTagOptionsPaginatorOptions struct { // The maximum number of items to return with this call. @@ -204,6 +199,9 @@ func (p *ListTagOptionsPaginator) NextPage(ctx context.Context, optFns ...func(* params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagOptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListTagOptionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListTagOptionsAPIClient is a client that implements the ListTagOptions +// operation. +type ListTagOptionsAPIClient interface { + ListTagOptions(context.Context, *ListTagOptionsInput, ...func(*Options)) (*ListTagOptionsOutput, error) +} + +var _ ListTagOptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagOptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_NotifyProvisionProductEngineWorkflowResult.go b/service/servicecatalog/api_op_NotifyProvisionProductEngineWorkflowResult.go index 0e86a942ee3..f4ab50343a5 100644 --- a/service/servicecatalog/api_op_NotifyProvisionProductEngineWorkflowResult.go +++ b/service/servicecatalog/api_op_NotifyProvisionProductEngineWorkflowResult.go @@ -128,6 +128,9 @@ func (c *Client) addOperationNotifyProvisionProductEngineWorkflowResultMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opNotifyProvisionProductEngineWorkflowResultMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_NotifyTerminateProvisionedProductEngineWorkflowResult.go b/service/servicecatalog/api_op_NotifyTerminateProvisionedProductEngineWorkflowResult.go index 60fe58123c9..f9e2b02615a 100644 --- a/service/servicecatalog/api_op_NotifyTerminateProvisionedProductEngineWorkflowResult.go +++ b/service/servicecatalog/api_op_NotifyTerminateProvisionedProductEngineWorkflowResult.go @@ -121,6 +121,9 @@ func (c *Client) addOperationNotifyTerminateProvisionedProductEngineWorkflowResu if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opNotifyTerminateProvisionedProductEngineWorkflowResultMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_NotifyUpdateProvisionedProductEngineWorkflowResult.go b/service/servicecatalog/api_op_NotifyUpdateProvisionedProductEngineWorkflowResult.go index e43cf519176..fcba2014b8d 100644 --- a/service/servicecatalog/api_op_NotifyUpdateProvisionedProductEngineWorkflowResult.go +++ b/service/servicecatalog/api_op_NotifyUpdateProvisionedProductEngineWorkflowResult.go @@ -124,6 +124,9 @@ func (c *Client) addOperationNotifyUpdateProvisionedProductEngineWorkflowResultM if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opNotifyUpdateProvisionedProductEngineWorkflowResultMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_ProvisionProduct.go b/service/servicecatalog/api_op_ProvisionProduct.go index 706181da507..14a66d50852 100644 --- a/service/servicecatalog/api_op_ProvisionProduct.go +++ b/service/servicecatalog/api_op_ProvisionProduct.go @@ -173,6 +173,9 @@ func (c *Client) addOperationProvisionProductMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opProvisionProductMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_RejectPortfolioShare.go b/service/servicecatalog/api_op_RejectPortfolioShare.go index 4c4176aae5e..86feabbb647 100644 --- a/service/servicecatalog/api_op_RejectPortfolioShare.go +++ b/service/servicecatalog/api_op_RejectPortfolioShare.go @@ -123,6 +123,9 @@ func (c *Client) addOperationRejectPortfolioShareMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectPortfolioShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_ScanProvisionedProducts.go b/service/servicecatalog/api_op_ScanProvisionedProducts.go index 7a9058bcd28..c50a2e070e6 100644 --- a/service/servicecatalog/api_op_ScanProvisionedProducts.go +++ b/service/servicecatalog/api_op_ScanProvisionedProducts.go @@ -124,6 +124,9 @@ func (c *Client) addOperationScanProvisionedProductsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opScanProvisionedProducts(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalog/api_op_SearchProducts.go b/service/servicecatalog/api_op_SearchProducts.go index 81f2976b487..d3a26fd7d67 100644 --- a/service/servicecatalog/api_op_SearchProducts.go +++ b/service/servicecatalog/api_op_SearchProducts.go @@ -132,6 +132,9 @@ func (c *Client) addOperationSearchProductsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchProducts(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationSearchProductsMiddlewares(stack *middleware.Stack, return nil } -// SearchProductsAPIClient is a client that implements the SearchProducts -// operation. -type SearchProductsAPIClient interface { - SearchProducts(context.Context, *SearchProductsInput, ...func(*Options)) (*SearchProductsOutput, error) -} - -var _ SearchProductsAPIClient = (*Client)(nil) - // SearchProductsPaginatorOptions is the paginator options for SearchProducts type SearchProductsPaginatorOptions struct { // The maximum number of items to return with this call. @@ -220,6 +215,9 @@ func (p *SearchProductsPaginator) NextPage(ctx context.Context, optFns ...func(* params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchProducts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *SearchProductsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchProductsAPIClient is a client that implements the SearchProducts +// operation. +type SearchProductsAPIClient interface { + SearchProducts(context.Context, *SearchProductsInput, ...func(*Options)) (*SearchProductsOutput, error) +} + +var _ SearchProductsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchProducts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_SearchProductsAsAdmin.go b/service/servicecatalog/api_op_SearchProductsAsAdmin.go index 8d16c84011a..8abb08a37cf 100644 --- a/service/servicecatalog/api_op_SearchProductsAsAdmin.go +++ b/service/servicecatalog/api_op_SearchProductsAsAdmin.go @@ -135,6 +135,9 @@ func (c *Client) addOperationSearchProductsAsAdminMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchProductsAsAdmin(options.Region), middleware.Before); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationSearchProductsAsAdminMiddlewares(stack *middleware. return nil } -// SearchProductsAsAdminAPIClient is a client that implements the -// SearchProductsAsAdmin operation. -type SearchProductsAsAdminAPIClient interface { - SearchProductsAsAdmin(context.Context, *SearchProductsAsAdminInput, ...func(*Options)) (*SearchProductsAsAdminOutput, error) -} - -var _ SearchProductsAsAdminAPIClient = (*Client)(nil) - // SearchProductsAsAdminPaginatorOptions is the paginator options for // SearchProductsAsAdmin type SearchProductsAsAdminPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *SearchProductsAsAdminPaginator) NextPage(ctx context.Context, optFns .. params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchProductsAsAdmin(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *SearchProductsAsAdminPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// SearchProductsAsAdminAPIClient is a client that implements the +// SearchProductsAsAdmin operation. +type SearchProductsAsAdminAPIClient interface { + SearchProductsAsAdmin(context.Context, *SearchProductsAsAdminInput, ...func(*Options)) (*SearchProductsAsAdminOutput, error) +} + +var _ SearchProductsAsAdminAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchProductsAsAdmin(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_SearchProvisionedProducts.go b/service/servicecatalog/api_op_SearchProvisionedProducts.go index 64857cb372a..8f82f1527d4 100644 --- a/service/servicecatalog/api_op_SearchProvisionedProducts.go +++ b/service/servicecatalog/api_op_SearchProvisionedProducts.go @@ -144,6 +144,9 @@ func (c *Client) addOperationSearchProvisionedProductsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchProvisionedProducts(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationSearchProvisionedProductsMiddlewares(stack *middlew return nil } -// SearchProvisionedProductsAPIClient is a client that implements the -// SearchProvisionedProducts operation. -type SearchProvisionedProductsAPIClient interface { - SearchProvisionedProducts(context.Context, *SearchProvisionedProductsInput, ...func(*Options)) (*SearchProvisionedProductsOutput, error) -} - -var _ SearchProvisionedProductsAPIClient = (*Client)(nil) - // SearchProvisionedProductsPaginatorOptions is the paginator options for // SearchProvisionedProducts type SearchProvisionedProductsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *SearchProvisionedProductsPaginator) NextPage(ctx context.Context, optFn params.PageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchProvisionedProducts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *SearchProvisionedProductsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// SearchProvisionedProductsAPIClient is a client that implements the +// SearchProvisionedProducts operation. +type SearchProvisionedProductsAPIClient interface { + SearchProvisionedProducts(context.Context, *SearchProvisionedProductsInput, ...func(*Options)) (*SearchProvisionedProductsOutput, error) +} + +var _ SearchProvisionedProductsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchProvisionedProducts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalog/api_op_TerminateProvisionedProduct.go b/service/servicecatalog/api_op_TerminateProvisionedProduct.go index 479ed0ad215..7e0e0b176b5 100644 --- a/service/servicecatalog/api_op_TerminateProvisionedProduct.go +++ b/service/servicecatalog/api_op_TerminateProvisionedProduct.go @@ -139,6 +139,9 @@ func (c *Client) addOperationTerminateProvisionedProductMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opTerminateProvisionedProductMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateConstraint.go b/service/servicecatalog/api_op_UpdateConstraint.go index 3359f6b0fdf..bb25f2e534b 100644 --- a/service/servicecatalog/api_op_UpdateConstraint.go +++ b/service/servicecatalog/api_op_UpdateConstraint.go @@ -177,6 +177,9 @@ func (c *Client) addOperationUpdateConstraintMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConstraintValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdatePortfolio.go b/service/servicecatalog/api_op_UpdatePortfolio.go index 8d52bcb5151..d37c555ad02 100644 --- a/service/servicecatalog/api_op_UpdatePortfolio.go +++ b/service/servicecatalog/api_op_UpdatePortfolio.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdatePortfolioMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePortfolioValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdatePortfolioShare.go b/service/servicecatalog/api_op_UpdatePortfolioShare.go index a9972cbe8a3..9bf7b38ce89 100644 --- a/service/servicecatalog/api_op_UpdatePortfolioShare.go +++ b/service/servicecatalog/api_op_UpdatePortfolioShare.go @@ -161,6 +161,9 @@ func (c *Client) addOperationUpdatePortfolioShareMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePortfolioShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateProduct.go b/service/servicecatalog/api_op_UpdateProduct.go index cfef5f5a538..f56656abb37 100644 --- a/service/servicecatalog/api_op_UpdateProduct.go +++ b/service/servicecatalog/api_op_UpdateProduct.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateProductMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProductValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateProvisionedProduct.go b/service/servicecatalog/api_op_UpdateProvisionedProduct.go index ac0830b45d2..b57517df7d0 100644 --- a/service/servicecatalog/api_op_UpdateProvisionedProduct.go +++ b/service/servicecatalog/api_op_UpdateProvisionedProduct.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateProvisionedProductMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateProvisionedProductMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateProvisionedProductProperties.go b/service/servicecatalog/api_op_UpdateProvisionedProductProperties.go index dd5ccd11e03..c15d6f53a86 100644 --- a/service/servicecatalog/api_op_UpdateProvisionedProductProperties.go +++ b/service/servicecatalog/api_op_UpdateProvisionedProductProperties.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateProvisionedProductPropertiesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateProvisionedProductPropertiesMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateProvisioningArtifact.go b/service/servicecatalog/api_op_UpdateProvisioningArtifact.go index 79b5f0c45e1..bc52f30ff96 100644 --- a/service/servicecatalog/api_op_UpdateProvisioningArtifact.go +++ b/service/servicecatalog/api_op_UpdateProvisioningArtifact.go @@ -151,6 +151,9 @@ func (c *Client) addOperationUpdateProvisioningArtifactMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProvisioningArtifactValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateServiceAction.go b/service/servicecatalog/api_op_UpdateServiceAction.go index 62094d21770..f20c424b514 100644 --- a/service/servicecatalog/api_op_UpdateServiceAction.go +++ b/service/servicecatalog/api_op_UpdateServiceAction.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateServiceActionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceActionValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalog/api_op_UpdateTagOption.go b/service/servicecatalog/api_op_UpdateTagOption.go index cb12bd5395b..df8f9a1be4a 100644 --- a/service/servicecatalog/api_op_UpdateTagOption.go +++ b/service/servicecatalog/api_op_UpdateTagOption.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateTagOptionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTagOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_client.go b/service/servicecatalogappregistry/api_client.go index 94fd4e62b54..8ab185291fa 100644 --- a/service/servicecatalogappregistry/api_client.go +++ b/service/servicecatalogappregistry/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/servicecatalogappregistry/api_op_AssociateAttributeGroup.go b/service/servicecatalogappregistry/api_op_AssociateAttributeGroup.go index 79aef3798fd..0be2b874b3b 100644 --- a/service/servicecatalogappregistry/api_op_AssociateAttributeGroup.go +++ b/service/servicecatalogappregistry/api_op_AssociateAttributeGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateAttributeGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateAttributeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_AssociateResource.go b/service/servicecatalogappregistry/api_op_AssociateResource.go index 9b5ee1aee20..78c6b71f938 100644 --- a/service/servicecatalogappregistry/api_op_AssociateResource.go +++ b/service/servicecatalogappregistry/api_op_AssociateResource.go @@ -154,6 +154,9 @@ func (c *Client) addOperationAssociateResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_CreateApplication.go b/service/servicecatalogappregistry/api_op_CreateApplication.go index dfedade59d1..ad781b4c9b8 100644 --- a/service/servicecatalogappregistry/api_op_CreateApplication.go +++ b/service/servicecatalogappregistry/api_op_CreateApplication.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_CreateAttributeGroup.go b/service/servicecatalogappregistry/api_op_CreateAttributeGroup.go index c7a56cbddf1..417e0f44aa5 100644 --- a/service/servicecatalogappregistry/api_op_CreateAttributeGroup.go +++ b/service/servicecatalogappregistry/api_op_CreateAttributeGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateAttributeGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAttributeGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_DeleteApplication.go b/service/servicecatalogappregistry/api_op_DeleteApplication.go index e9d9f3a4c8f..ab6be7f1db8 100644 --- a/service/servicecatalogappregistry/api_op_DeleteApplication.go +++ b/service/servicecatalogappregistry/api_op_DeleteApplication.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_DeleteAttributeGroup.go b/service/servicecatalogappregistry/api_op_DeleteAttributeGroup.go index e30320d5f76..2feb9b6d7fd 100644 --- a/service/servicecatalogappregistry/api_op_DeleteAttributeGroup.go +++ b/service/servicecatalogappregistry/api_op_DeleteAttributeGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAttributeGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAttributeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_DisassociateAttributeGroup.go b/service/servicecatalogappregistry/api_op_DisassociateAttributeGroup.go index d60d3026ed5..11b57e3aa73 100644 --- a/service/servicecatalogappregistry/api_op_DisassociateAttributeGroup.go +++ b/service/servicecatalogappregistry/api_op_DisassociateAttributeGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateAttributeGroupMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateAttributeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_DisassociateResource.go b/service/servicecatalogappregistry/api_op_DisassociateResource.go index 5b2a4e8a5d5..d002028f584 100644 --- a/service/servicecatalogappregistry/api_op_DisassociateResource.go +++ b/service/servicecatalogappregistry/api_op_DisassociateResource.go @@ -148,6 +148,9 @@ func (c *Client) addOperationDisassociateResourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_GetApplication.go b/service/servicecatalogappregistry/api_op_GetApplication.go index c2bdfdbe6e6..84f708de49b 100644 --- a/service/servicecatalogappregistry/api_op_GetApplication.go +++ b/service/servicecatalogappregistry/api_op_GetApplication.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_GetAssociatedResource.go b/service/servicecatalogappregistry/api_op_GetAssociatedResource.go index ba44cbbcf17..dd46fadfec1 100644 --- a/service/servicecatalogappregistry/api_op_GetAssociatedResource.go +++ b/service/servicecatalogappregistry/api_op_GetAssociatedResource.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetAssociatedResourceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssociatedResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_GetAttributeGroup.go b/service/servicecatalogappregistry/api_op_GetAttributeGroup.go index cebc6405b32..89b12ebdb83 100644 --- a/service/servicecatalogappregistry/api_op_GetAttributeGroup.go +++ b/service/servicecatalogappregistry/api_op_GetAttributeGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetAttributeGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAttributeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_GetConfiguration.go b/service/servicecatalogappregistry/api_op_GetConfiguration.go index 387f2a5c758..511af9ca717 100644 --- a/service/servicecatalogappregistry/api_op_GetConfiguration.go +++ b/service/servicecatalogappregistry/api_op_GetConfiguration.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetConfigurationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_ListApplications.go b/service/servicecatalogappregistry/api_op_ListApplications.go index 98528617208..d347d609a3b 100644 --- a/service/servicecatalogappregistry/api_op_ListApplications.go +++ b/service/servicecatalogappregistry/api_op_ListApplications.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } @@ -132,14 +135,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The upper bound of the number of results to return (cannot exceed 25). If this @@ -204,6 +199,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go b/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go index 820b835e377..1630523f72e 100644 --- a/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go +++ b/service/servicecatalogappregistry/api_op_ListAssociatedAttributeGroups.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListAssociatedAttributeGroupsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedAttributeGroupsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListAssociatedAttributeGroupsMiddlewares(stack *mid return nil } -// ListAssociatedAttributeGroupsAPIClient is a client that implements the -// ListAssociatedAttributeGroups operation. -type ListAssociatedAttributeGroupsAPIClient interface { - ListAssociatedAttributeGroups(context.Context, *ListAssociatedAttributeGroupsInput, ...func(*Options)) (*ListAssociatedAttributeGroupsOutput, error) -} - -var _ ListAssociatedAttributeGroupsAPIClient = (*Client)(nil) - // ListAssociatedAttributeGroupsPaginatorOptions is the paginator options for // ListAssociatedAttributeGroups type ListAssociatedAttributeGroupsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAssociatedAttributeGroupsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedAttributeGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAssociatedAttributeGroupsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListAssociatedAttributeGroupsAPIClient is a client that implements the +// ListAssociatedAttributeGroups operation. +type ListAssociatedAttributeGroupsAPIClient interface { + ListAssociatedAttributeGroups(context.Context, *ListAssociatedAttributeGroupsInput, ...func(*Options)) (*ListAssociatedAttributeGroupsOutput, error) +} + +var _ ListAssociatedAttributeGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedAttributeGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalogappregistry/api_op_ListAssociatedResources.go b/service/servicecatalogappregistry/api_op_ListAssociatedResources.go index 36ddcef93b2..284960f0818 100644 --- a/service/servicecatalogappregistry/api_op_ListAssociatedResources.go +++ b/service/servicecatalogappregistry/api_op_ListAssociatedResources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAssociatedResourcesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedResourcesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListAssociatedResourcesMiddlewares(stack *middlewar return nil } -// ListAssociatedResourcesAPIClient is a client that implements the -// ListAssociatedResources operation. -type ListAssociatedResourcesAPIClient interface { - ListAssociatedResources(context.Context, *ListAssociatedResourcesInput, ...func(*Options)) (*ListAssociatedResourcesOutput, error) -} - -var _ ListAssociatedResourcesAPIClient = (*Client)(nil) - // ListAssociatedResourcesPaginatorOptions is the paginator options for // ListAssociatedResources type ListAssociatedResourcesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListAssociatedResourcesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListAssociatedResourcesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAssociatedResourcesAPIClient is a client that implements the +// ListAssociatedResources operation. +type ListAssociatedResourcesAPIClient interface { + ListAssociatedResources(context.Context, *ListAssociatedResourcesInput, ...func(*Options)) (*ListAssociatedResourcesOutput, error) +} + +var _ ListAssociatedResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalogappregistry/api_op_ListAttributeGroups.go b/service/servicecatalogappregistry/api_op_ListAttributeGroups.go index 524eeab1d5a..397ab77bf5c 100644 --- a/service/servicecatalogappregistry/api_op_ListAttributeGroups.go +++ b/service/servicecatalogappregistry/api_op_ListAttributeGroups.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListAttributeGroupsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttributeGroups(options.Region), middleware.Before); err != nil { return err } @@ -132,14 +135,6 @@ func (c *Client) addOperationListAttributeGroupsMiddlewares(stack *middleware.St return nil } -// ListAttributeGroupsAPIClient is a client that implements the -// ListAttributeGroups operation. -type ListAttributeGroupsAPIClient interface { - ListAttributeGroups(context.Context, *ListAttributeGroupsInput, ...func(*Options)) (*ListAttributeGroupsOutput, error) -} - -var _ ListAttributeGroupsAPIClient = (*Client)(nil) - // ListAttributeGroupsPaginatorOptions is the paginator options for // ListAttributeGroups type ListAttributeGroupsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListAttributeGroupsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttributeGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListAttributeGroupsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAttributeGroupsAPIClient is a client that implements the +// ListAttributeGroups operation. +type ListAttributeGroupsAPIClient interface { + ListAttributeGroups(context.Context, *ListAttributeGroupsInput, ...func(*Options)) (*ListAttributeGroupsOutput, error) +} + +var _ ListAttributeGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttributeGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go b/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go index 84a36371a1c..627386cb325 100644 --- a/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go +++ b/service/servicecatalogappregistry/api_op_ListAttributeGroupsForApplication.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAttributeGroupsForApplicationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAttributeGroupsForApplicationValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListAttributeGroupsForApplicationMiddlewares(stack return nil } -// ListAttributeGroupsForApplicationAPIClient is a client that implements the -// ListAttributeGroupsForApplication operation. -type ListAttributeGroupsForApplicationAPIClient interface { - ListAttributeGroupsForApplication(context.Context, *ListAttributeGroupsForApplicationInput, ...func(*Options)) (*ListAttributeGroupsForApplicationOutput, error) -} - -var _ ListAttributeGroupsForApplicationAPIClient = (*Client)(nil) - // ListAttributeGroupsForApplicationPaginatorOptions is the paginator options for // ListAttributeGroupsForApplication type ListAttributeGroupsForApplicationPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListAttributeGroupsForApplicationPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttributeGroupsForApplication(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListAttributeGroupsForApplicationPaginator) NextPage(ctx context.Contex return result, nil } +// ListAttributeGroupsForApplicationAPIClient is a client that implements the +// ListAttributeGroupsForApplication operation. +type ListAttributeGroupsForApplicationAPIClient interface { + ListAttributeGroupsForApplication(context.Context, *ListAttributeGroupsForApplicationInput, ...func(*Options)) (*ListAttributeGroupsForApplicationOutput, error) +} + +var _ ListAttributeGroupsForApplicationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttributeGroupsForApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicecatalogappregistry/api_op_ListTagsForResource.go b/service/servicecatalogappregistry/api_op_ListTagsForResource.go index 347dc698d55..e1a3558516c 100644 --- a/service/servicecatalogappregistry/api_op_ListTagsForResource.go +++ b/service/servicecatalogappregistry/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_PutConfiguration.go b/service/servicecatalogappregistry/api_op_PutConfiguration.go index 6bab5530b33..69b5e421d47 100644 --- a/service/servicecatalogappregistry/api_op_PutConfiguration.go +++ b/service/servicecatalogappregistry/api_op_PutConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationPutConfigurationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_SyncResource.go b/service/servicecatalogappregistry/api_op_SyncResource.go index 4d9476ceab1..638006db6a0 100644 --- a/service/servicecatalogappregistry/api_op_SyncResource.go +++ b/service/servicecatalogappregistry/api_op_SyncResource.go @@ -125,6 +125,9 @@ func (c *Client) addOperationSyncResourceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSyncResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_TagResource.go b/service/servicecatalogappregistry/api_op_TagResource.go index f4258ffc697..c45ea484b67 100644 --- a/service/servicecatalogappregistry/api_op_TagResource.go +++ b/service/servicecatalogappregistry/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_UntagResource.go b/service/servicecatalogappregistry/api_op_UntagResource.go index 97f730bc953..3870aded87f 100644 --- a/service/servicecatalogappregistry/api_op_UntagResource.go +++ b/service/servicecatalogappregistry/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_UpdateApplication.go b/service/servicecatalogappregistry/api_op_UpdateApplication.go index 91a0c1c745b..e865e912efb 100644 --- a/service/servicecatalogappregistry/api_op_UpdateApplication.go +++ b/service/servicecatalogappregistry/api_op_UpdateApplication.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicecatalogappregistry/api_op_UpdateAttributeGroup.go b/service/servicecatalogappregistry/api_op_UpdateAttributeGroup.go index b92cf829449..6440b3d2cf8 100644 --- a/service/servicecatalogappregistry/api_op_UpdateAttributeGroup.go +++ b/service/servicecatalogappregistry/api_op_UpdateAttributeGroup.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateAttributeGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAttributeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_client.go b/service/servicediscovery/api_client.go index 098f510a9d5..bb4287f3261 100644 --- a/service/servicediscovery/api_client.go +++ b/service/servicediscovery/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/servicediscovery/api_op_CreateHttpNamespace.go b/service/servicediscovery/api_op_CreateHttpNamespace.go index f2432844233..9428eb06696 100644 --- a/service/servicediscovery/api_op_CreateHttpNamespace.go +++ b/service/servicediscovery/api_op_CreateHttpNamespace.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateHttpNamespaceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateHttpNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go b/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go index e1a74ab5d28..af81ee0a955 100644 --- a/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go +++ b/service/servicediscovery/api_op_CreatePrivateDnsNamespace.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreatePrivateDnsNamespaceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePrivateDnsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_CreatePublicDnsNamespace.go b/service/servicediscovery/api_op_CreatePublicDnsNamespace.go index 7f1fcf956d8..25e6619cf9d 100644 --- a/service/servicediscovery/api_op_CreatePublicDnsNamespace.go +++ b/service/servicediscovery/api_op_CreatePublicDnsNamespace.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCreatePublicDnsNamespaceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePublicDnsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_CreateService.go b/service/servicediscovery/api_op_CreateService.go index a0229cbb12d..25c6e59cc2b 100644 --- a/service/servicediscovery/api_op_CreateService.go +++ b/service/servicediscovery/api_op_CreateService.go @@ -206,6 +206,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_DeleteNamespace.go b/service/servicediscovery/api_op_DeleteNamespace.go index 0536f49b72a..de05613cf3d 100644 --- a/service/servicediscovery/api_op_DeleteNamespace.go +++ b/service/servicediscovery/api_op_DeleteNamespace.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteNamespaceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_DeleteService.go b/service/servicediscovery/api_op_DeleteService.go index dd3f32daf6e..1c48c687b5f 100644 --- a/service/servicediscovery/api_op_DeleteService.go +++ b/service/servicediscovery/api_op_DeleteService.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_DeregisterInstance.go b/service/servicediscovery/api_op_DeregisterInstance.go index 8af584d9581..fc7e8180efa 100644 --- a/service/servicediscovery/api_op_DeregisterInstance.go +++ b/service/servicediscovery/api_op_DeregisterInstance.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeregisterInstanceMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_DiscoverInstances.go b/service/servicediscovery/api_op_DiscoverInstances.go index 0507555a52d..d1731d48985 100644 --- a/service/servicediscovery/api_op_DiscoverInstances.go +++ b/service/servicediscovery/api_op_DiscoverInstances.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDiscoverInstancesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDiscoverInstancesMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_DiscoverInstancesRevision.go b/service/servicediscovery/api_op_DiscoverInstancesRevision.go index 355dfc9147d..d552e6edaa3 100644 --- a/service/servicediscovery/api_op_DiscoverInstancesRevision.go +++ b/service/servicediscovery/api_op_DiscoverInstancesRevision.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDiscoverInstancesRevisionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDiscoverInstancesRevisionMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_GetInstance.go b/service/servicediscovery/api_op_GetInstance.go index a0887563105..937a066dd24 100644 --- a/service/servicediscovery/api_op_GetInstance.go +++ b/service/servicediscovery/api_op_GetInstance.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetInstanceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_GetInstancesHealthStatus.go b/service/servicediscovery/api_op_GetInstancesHealthStatus.go index 73f9754ee73..a596d2621d1 100644 --- a/service/servicediscovery/api_op_GetInstancesHealthStatus.go +++ b/service/servicediscovery/api_op_GetInstancesHealthStatus.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetInstancesHealthStatusMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInstancesHealthStatusValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationGetInstancesHealthStatusMiddlewares(stack *middlewa return nil } -// GetInstancesHealthStatusAPIClient is a client that implements the -// GetInstancesHealthStatus operation. -type GetInstancesHealthStatusAPIClient interface { - GetInstancesHealthStatus(context.Context, *GetInstancesHealthStatusInput, ...func(*Options)) (*GetInstancesHealthStatusOutput, error) -} - -var _ GetInstancesHealthStatusAPIClient = (*Client)(nil) - // GetInstancesHealthStatusPaginatorOptions is the paginator options for // GetInstancesHealthStatus type GetInstancesHealthStatusPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *GetInstancesHealthStatusPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInstancesHealthStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *GetInstancesHealthStatusPaginator) NextPage(ctx context.Context, optFns return result, nil } +// GetInstancesHealthStatusAPIClient is a client that implements the +// GetInstancesHealthStatus operation. +type GetInstancesHealthStatusAPIClient interface { + GetInstancesHealthStatus(context.Context, *GetInstancesHealthStatusInput, ...func(*Options)) (*GetInstancesHealthStatusOutput, error) +} + +var _ GetInstancesHealthStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInstancesHealthStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicediscovery/api_op_GetNamespace.go b/service/servicediscovery/api_op_GetNamespace.go index 59aa86c10c6..4955b05bdaf 100644 --- a/service/servicediscovery/api_op_GetNamespace.go +++ b/service/servicediscovery/api_op_GetNamespace.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetNamespaceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNamespaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_GetOperation.go b/service/servicediscovery/api_op_GetOperation.go index eb81b0cb05e..2509f23c090 100644 --- a/service/servicediscovery/api_op_GetOperation.go +++ b/service/servicediscovery/api_op_GetOperation.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetOperationMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_GetService.go b/service/servicediscovery/api_op_GetService.go index c16187fedf3..9acf2ce5597 100644 --- a/service/servicediscovery/api_op_GetService.go +++ b/service/servicediscovery/api_op_GetService.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_ListInstances.go b/service/servicediscovery/api_op_ListInstances.go index e4ac8053176..19688e7d265 100644 --- a/service/servicediscovery/api_op_ListInstances.go +++ b/service/servicediscovery/api_op_ListInstances.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInstancesValidationMiddleware(stack); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o return nil } -// ListInstancesAPIClient is a client that implements the ListInstances operation. -type ListInstancesAPIClient interface { - ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) -} - -var _ ListInstancesAPIClient = (*Client)(nil) - // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { // The maximum number of instances that you want Cloud Map to return in the @@ -221,6 +217,9 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListInstancesAPIClient is a client that implements the ListInstances operation. +type ListInstancesAPIClient interface { + ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) +} + +var _ ListInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicediscovery/api_op_ListNamespaces.go b/service/servicediscovery/api_op_ListNamespaces.go index d6af9e28628..52a97f00f68 100644 --- a/service/servicediscovery/api_op_ListNamespaces.go +++ b/service/servicediscovery/api_op_ListNamespaces.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListNamespacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListNamespacesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListNamespacesMiddlewares(stack *middleware.Stack, return nil } -// ListNamespacesAPIClient is a client that implements the ListNamespaces -// operation. -type ListNamespacesAPIClient interface { - ListNamespaces(context.Context, *ListNamespacesInput, ...func(*Options)) (*ListNamespacesOutput, error) -} - -var _ ListNamespacesAPIClient = (*Client)(nil) - // ListNamespacesPaginatorOptions is the paginator options for ListNamespaces type ListNamespacesPaginatorOptions struct { // The maximum number of namespaces that you want Cloud Map to return in the @@ -234,6 +229,9 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNamespaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListNamespacesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListNamespacesAPIClient is a client that implements the ListNamespaces +// operation. +type ListNamespacesAPIClient interface { + ListNamespaces(context.Context, *ListNamespacesInput, ...func(*Options)) (*ListNamespacesOutput, error) +} + +var _ ListNamespacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNamespaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicediscovery/api_op_ListOperations.go b/service/servicediscovery/api_op_ListOperations.go index cd860fd4282..c1e7e91b5e0 100644 --- a/service/servicediscovery/api_op_ListOperations.go +++ b/service/servicediscovery/api_op_ListOperations.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOperationsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, return nil } -// ListOperationsAPIClient is a client that implements the ListOperations -// operation. -type ListOperationsAPIClient interface { - ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) -} - -var _ ListOperationsAPIClient = (*Client)(nil) - // ListOperationsPaginatorOptions is the paginator options for ListOperations type ListOperationsPaginatorOptions struct { // The maximum number of items that you want Cloud Map to return in the response @@ -233,6 +228,9 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListOperationsAPIClient is a client that implements the ListOperations +// operation. +type ListOperationsAPIClient interface { + ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) +} + +var _ ListOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicediscovery/api_op_ListServices.go b/service/servicediscovery/api_op_ListServices.go index 330d7de1487..779f3a5583e 100644 --- a/service/servicediscovery/api_op_ListServices.go +++ b/service/servicediscovery/api_op_ListServices.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServicesValidationMiddleware(stack); err != nil { return err } @@ -161,13 +164,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of services that you want Cloud Map to return in the @@ -233,6 +229,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +251,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicediscovery/api_op_ListTagsForResource.go b/service/servicediscovery/api_op_ListTagsForResource.go index 92ddfafb75f..6f67b3f2c92 100644 --- a/service/servicediscovery/api_op_ListTagsForResource.go +++ b/service/servicediscovery/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_RegisterInstance.go b/service/servicediscovery/api_op_RegisterInstance.go index 993ff04ec11..2161ec274f1 100644 --- a/service/servicediscovery/api_op_RegisterInstance.go +++ b/service/servicediscovery/api_op_RegisterInstance.go @@ -271,6 +271,9 @@ func (c *Client) addOperationRegisterInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_TagResource.go b/service/servicediscovery/api_op_TagResource.go index c9222cbc59a..9f7c022fb27 100644 --- a/service/servicediscovery/api_op_TagResource.go +++ b/service/servicediscovery/api_op_TagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_UntagResource.go b/service/servicediscovery/api_op_UntagResource.go index 5364e059945..6b2346da468 100644 --- a/service/servicediscovery/api_op_UntagResource.go +++ b/service/servicediscovery/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_UpdateHttpNamespace.go b/service/servicediscovery/api_op_UpdateHttpNamespace.go index 28c539085fb..e3c73dd50f4 100644 --- a/service/servicediscovery/api_op_UpdateHttpNamespace.go +++ b/service/servicediscovery/api_op_UpdateHttpNamespace.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateHttpNamespaceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateHttpNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go b/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go index 13d0495f9fd..dede6b96448 100644 --- a/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go +++ b/service/servicediscovery/api_op_UpdateInstanceCustomHealthStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateInstanceCustomHealthStatusMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceCustomHealthStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go b/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go index 986f50f5534..8cc925a0a05 100644 --- a/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go +++ b/service/servicediscovery/api_op_UpdatePrivateDnsNamespace.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdatePrivateDnsNamespaceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePrivateDnsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go b/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go index 69f48658b10..48a05812543 100644 --- a/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go +++ b/service/servicediscovery/api_op_UpdatePublicDnsNamespace.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdatePublicDnsNamespaceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdatePublicDnsNamespaceMiddleware(stack, options); err != nil { return err } diff --git a/service/servicediscovery/api_op_UpdateService.go b/service/servicediscovery/api_op_UpdateService.go index 8d170e5c942..d735b79081e 100644 --- a/service/servicediscovery/api_op_UpdateService.go +++ b/service/servicediscovery/api_op_UpdateService.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_client.go b/service/servicequotas/api_client.go index 557ad6c1210..c335b342b1f 100644 --- a/service/servicequotas/api_client.go +++ b/service/servicequotas/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/servicequotas/api_op_AssociateServiceQuotaTemplate.go b/service/servicequotas/api_op_AssociateServiceQuotaTemplate.go index d072f1ebba4..b461d97e998 100644 --- a/service/servicequotas/api_op_AssociateServiceQuotaTemplate.go +++ b/service/servicequotas/api_op_AssociateServiceQuotaTemplate.go @@ -98,6 +98,9 @@ func (c *Client) addOperationAssociateServiceQuotaTemplateMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateServiceQuotaTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicequotas/api_op_DeleteServiceQuotaIncreaseRequestFromTemplate.go b/service/servicequotas/api_op_DeleteServiceQuotaIncreaseRequestFromTemplate.go index 10a0eff860d..45358457604 100644 --- a/service/servicequotas/api_op_DeleteServiceQuotaIncreaseRequestFromTemplate.go +++ b/service/servicequotas/api_op_DeleteServiceQuotaIncreaseRequestFromTemplate.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteServiceQuotaIncreaseRequestFromTemplateMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceQuotaIncreaseRequestFromTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_DisassociateServiceQuotaTemplate.go b/service/servicequotas/api_op_DisassociateServiceQuotaTemplate.go index 1db19fd9c59..a499c126040 100644 --- a/service/servicequotas/api_op_DisassociateServiceQuotaTemplate.go +++ b/service/servicequotas/api_op_DisassociateServiceQuotaTemplate.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDisassociateServiceQuotaTemplateMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateServiceQuotaTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicequotas/api_op_GetAWSDefaultServiceQuota.go b/service/servicequotas/api_op_GetAWSDefaultServiceQuota.go index 632b03d185d..8700e80a299 100644 --- a/service/servicequotas/api_op_GetAWSDefaultServiceQuota.go +++ b/service/servicequotas/api_op_GetAWSDefaultServiceQuota.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetAWSDefaultServiceQuotaMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAWSDefaultServiceQuotaValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_GetAssociationForServiceQuotaTemplate.go b/service/servicequotas/api_op_GetAssociationForServiceQuotaTemplate.go index 35be209bf6f..2534c751396 100644 --- a/service/servicequotas/api_op_GetAssociationForServiceQuotaTemplate.go +++ b/service/servicequotas/api_op_GetAssociationForServiceQuotaTemplate.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetAssociationForServiceQuotaTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAssociationForServiceQuotaTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/servicequotas/api_op_GetRequestedServiceQuotaChange.go b/service/servicequotas/api_op_GetRequestedServiceQuotaChange.go index 81b49286b15..0645c396c61 100644 --- a/service/servicequotas/api_op_GetRequestedServiceQuotaChange.go +++ b/service/servicequotas/api_op_GetRequestedServiceQuotaChange.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetRequestedServiceQuotaChangeMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRequestedServiceQuotaChangeValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_GetServiceQuota.go b/service/servicequotas/api_op_GetServiceQuota.go index f19e3090cbf..5869a5216a8 100644 --- a/service/servicequotas/api_op_GetServiceQuota.go +++ b/service/servicequotas/api_op_GetServiceQuota.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetServiceQuotaMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceQuotaValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_GetServiceQuotaIncreaseRequestFromTemplate.go b/service/servicequotas/api_op_GetServiceQuotaIncreaseRequestFromTemplate.go index 7d14bd6b5d1..8399d7e2506 100644 --- a/service/servicequotas/api_op_GetServiceQuotaIncreaseRequestFromTemplate.go +++ b/service/servicequotas/api_op_GetServiceQuotaIncreaseRequestFromTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetServiceQuotaIncreaseRequestFromTemplateMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceQuotaIncreaseRequestFromTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go b/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go index efc1da11dea..0c7b634f211 100644 --- a/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go +++ b/service/servicequotas/api_op_ListAWSDefaultServiceQuotas.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListAWSDefaultServiceQuotasMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAWSDefaultServiceQuotasValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListAWSDefaultServiceQuotasMiddlewares(stack *middl return nil } -// ListAWSDefaultServiceQuotasAPIClient is a client that implements the -// ListAWSDefaultServiceQuotas operation. -type ListAWSDefaultServiceQuotasAPIClient interface { - ListAWSDefaultServiceQuotas(context.Context, *ListAWSDefaultServiceQuotasInput, ...func(*Options)) (*ListAWSDefaultServiceQuotasOutput, error) -} - -var _ ListAWSDefaultServiceQuotasAPIClient = (*Client)(nil) - // ListAWSDefaultServiceQuotasPaginatorOptions is the paginator options for // ListAWSDefaultServiceQuotas type ListAWSDefaultServiceQuotasPaginatorOptions struct { @@ -239,6 +234,9 @@ func (p *ListAWSDefaultServiceQuotasPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAWSDefaultServiceQuotas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -258,6 +256,14 @@ func (p *ListAWSDefaultServiceQuotasPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListAWSDefaultServiceQuotasAPIClient is a client that implements the +// ListAWSDefaultServiceQuotas operation. +type ListAWSDefaultServiceQuotasAPIClient interface { + ListAWSDefaultServiceQuotas(context.Context, *ListAWSDefaultServiceQuotasInput, ...func(*Options)) (*ListAWSDefaultServiceQuotasOutput, error) +} + +var _ ListAWSDefaultServiceQuotasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAWSDefaultServiceQuotas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go index 138dcea359f..fc350e54099 100644 --- a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go +++ b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistory.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListRequestedServiceQuotaChangeHistoryMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRequestedServiceQuotaChangeHistory(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListRequestedServiceQuotaChangeHistoryMiddlewares(s return nil } -// ListRequestedServiceQuotaChangeHistoryAPIClient is a client that implements the -// ListRequestedServiceQuotaChangeHistory operation. -type ListRequestedServiceQuotaChangeHistoryAPIClient interface { - ListRequestedServiceQuotaChangeHistory(context.Context, *ListRequestedServiceQuotaChangeHistoryInput, ...func(*Options)) (*ListRequestedServiceQuotaChangeHistoryOutput, error) -} - -var _ ListRequestedServiceQuotaChangeHistoryAPIClient = (*Client)(nil) - // ListRequestedServiceQuotaChangeHistoryPaginatorOptions is the paginator options // for ListRequestedServiceQuotaChangeHistory type ListRequestedServiceQuotaChangeHistoryPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListRequestedServiceQuotaChangeHistoryPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRequestedServiceQuotaChangeHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListRequestedServiceQuotaChangeHistoryPaginator) NextPage(ctx context.C return result, nil } +// ListRequestedServiceQuotaChangeHistoryAPIClient is a client that implements the +// ListRequestedServiceQuotaChangeHistory operation. +type ListRequestedServiceQuotaChangeHistoryAPIClient interface { + ListRequestedServiceQuotaChangeHistory(context.Context, *ListRequestedServiceQuotaChangeHistoryInput, ...func(*Options)) (*ListRequestedServiceQuotaChangeHistoryOutput, error) +} + +var _ ListRequestedServiceQuotaChangeHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRequestedServiceQuotaChangeHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go index 6a56dd660c2..255e831c8fc 100644 --- a/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go +++ b/service/servicequotas/api_op_ListRequestedServiceQuotaChangeHistoryByQuota.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListRequestedServiceQuotaChangeHistoryByQuotaMiddle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRequestedServiceQuotaChangeHistoryByQuotaValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListRequestedServiceQuotaChangeHistoryByQuotaMiddle return nil } -// ListRequestedServiceQuotaChangeHistoryByQuotaAPIClient is a client that -// implements the ListRequestedServiceQuotaChangeHistoryByQuota operation. -type ListRequestedServiceQuotaChangeHistoryByQuotaAPIClient interface { - ListRequestedServiceQuotaChangeHistoryByQuota(context.Context, *ListRequestedServiceQuotaChangeHistoryByQuotaInput, ...func(*Options)) (*ListRequestedServiceQuotaChangeHistoryByQuotaOutput, error) -} - -var _ ListRequestedServiceQuotaChangeHistoryByQuotaAPIClient = (*Client)(nil) - // ListRequestedServiceQuotaChangeHistoryByQuotaPaginatorOptions is the paginator // options for ListRequestedServiceQuotaChangeHistoryByQuota type ListRequestedServiceQuotaChangeHistoryByQuotaPaginatorOptions struct { @@ -253,6 +248,9 @@ func (p *ListRequestedServiceQuotaChangeHistoryByQuotaPaginator) NextPage(ctx co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRequestedServiceQuotaChangeHistoryByQuota(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +270,14 @@ func (p *ListRequestedServiceQuotaChangeHistoryByQuotaPaginator) NextPage(ctx co return result, nil } +// ListRequestedServiceQuotaChangeHistoryByQuotaAPIClient is a client that +// implements the ListRequestedServiceQuotaChangeHistoryByQuota operation. +type ListRequestedServiceQuotaChangeHistoryByQuotaAPIClient interface { + ListRequestedServiceQuotaChangeHistoryByQuota(context.Context, *ListRequestedServiceQuotaChangeHistoryByQuotaInput, ...func(*Options)) (*ListRequestedServiceQuotaChangeHistoryByQuotaOutput, error) +} + +var _ ListRequestedServiceQuotaChangeHistoryByQuotaAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRequestedServiceQuotaChangeHistoryByQuota(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go b/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go index 10307a42e9f..e3c17980707 100644 --- a/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go +++ b/service/servicequotas/api_op_ListServiceQuotaIncreaseRequestsInTemplate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListServiceQuotaIncreaseRequestsInTemplateMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceQuotaIncreaseRequestsInTemplate(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListServiceQuotaIncreaseRequestsInTemplateMiddlewar return nil } -// ListServiceQuotaIncreaseRequestsInTemplateAPIClient is a client that implements -// the ListServiceQuotaIncreaseRequestsInTemplate operation. -type ListServiceQuotaIncreaseRequestsInTemplateAPIClient interface { - ListServiceQuotaIncreaseRequestsInTemplate(context.Context, *ListServiceQuotaIncreaseRequestsInTemplateInput, ...func(*Options)) (*ListServiceQuotaIncreaseRequestsInTemplateOutput, error) -} - -var _ ListServiceQuotaIncreaseRequestsInTemplateAPIClient = (*Client)(nil) - // ListServiceQuotaIncreaseRequestsInTemplatePaginatorOptions is the paginator // options for ListServiceQuotaIncreaseRequestsInTemplate type ListServiceQuotaIncreaseRequestsInTemplatePaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListServiceQuotaIncreaseRequestsInTemplatePaginator) NextPage(ctx conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceQuotaIncreaseRequestsInTemplate(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListServiceQuotaIncreaseRequestsInTemplatePaginator) NextPage(ctx conte return result, nil } +// ListServiceQuotaIncreaseRequestsInTemplateAPIClient is a client that implements +// the ListServiceQuotaIncreaseRequestsInTemplate operation. +type ListServiceQuotaIncreaseRequestsInTemplateAPIClient interface { + ListServiceQuotaIncreaseRequestsInTemplate(context.Context, *ListServiceQuotaIncreaseRequestsInTemplateInput, ...func(*Options)) (*ListServiceQuotaIncreaseRequestsInTemplateOutput, error) +} + +var _ ListServiceQuotaIncreaseRequestsInTemplateAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceQuotaIncreaseRequestsInTemplate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicequotas/api_op_ListServiceQuotas.go b/service/servicequotas/api_op_ListServiceQuotas.go index f65437cb63a..ccca69ef982 100644 --- a/service/servicequotas/api_op_ListServiceQuotas.go +++ b/service/servicequotas/api_op_ListServiceQuotas.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListServiceQuotasMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceQuotasValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationListServiceQuotasMiddlewares(stack *middleware.Stac return nil } -// ListServiceQuotasAPIClient is a client that implements the ListServiceQuotas -// operation. -type ListServiceQuotasAPIClient interface { - ListServiceQuotas(context.Context, *ListServiceQuotasInput, ...func(*Options)) (*ListServiceQuotasOutput, error) -} - -var _ ListServiceQuotasAPIClient = (*Client)(nil) - // ListServiceQuotasPaginatorOptions is the paginator options for ListServiceQuotas type ListServiceQuotasPaginatorOptions struct { // Specifies the maximum number of results that you want included on each page of @@ -245,6 +240,9 @@ func (p *ListServiceQuotasPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceQuotas(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *ListServiceQuotasPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListServiceQuotasAPIClient is a client that implements the ListServiceQuotas +// operation. +type ListServiceQuotasAPIClient interface { + ListServiceQuotas(context.Context, *ListServiceQuotasInput, ...func(*Options)) (*ListServiceQuotasOutput, error) +} + +var _ ListServiceQuotasAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceQuotas(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicequotas/api_op_ListServices.go b/service/servicequotas/api_op_ListServices.go index b1145217b9c..1285c16b61d 100644 --- a/service/servicequotas/api_op_ListServices.go +++ b/service/servicequotas/api_op_ListServices.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServices(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // Specifies the maximum number of results that you want included on each page of @@ -226,6 +222,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +244,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/servicequotas/api_op_ListTagsForResource.go b/service/servicequotas/api_op_ListTagsForResource.go index ad9cee81dbb..413a3aa9ea2 100644 --- a/service/servicequotas/api_op_ListTagsForResource.go +++ b/service/servicequotas/api_op_ListTagsForResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_PutServiceQuotaIncreaseRequestIntoTemplate.go b/service/servicequotas/api_op_PutServiceQuotaIncreaseRequestIntoTemplate.go index bec85d65bdc..0b3ff98479e 100644 --- a/service/servicequotas/api_op_PutServiceQuotaIncreaseRequestIntoTemplate.go +++ b/service/servicequotas/api_op_PutServiceQuotaIncreaseRequestIntoTemplate.go @@ -124,6 +124,9 @@ func (c *Client) addOperationPutServiceQuotaIncreaseRequestIntoTemplateMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutServiceQuotaIncreaseRequestIntoTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_RequestServiceQuotaIncrease.go b/service/servicequotas/api_op_RequestServiceQuotaIncrease.go index a63d80f738b..3615e842854 100644 --- a/service/servicequotas/api_op_RequestServiceQuotaIncrease.go +++ b/service/servicequotas/api_op_RequestServiceQuotaIncrease.go @@ -124,6 +124,9 @@ func (c *Client) addOperationRequestServiceQuotaIncreaseMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestServiceQuotaIncreaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_TagResource.go b/service/servicequotas/api_op_TagResource.go index c06c5468007..73474c2eba0 100644 --- a/service/servicequotas/api_op_TagResource.go +++ b/service/servicequotas/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/servicequotas/api_op_UntagResource.go b/service/servicequotas/api_op_UntagResource.go index fc311e1cdb4..a8da9f3b274 100644 --- a/service/servicequotas/api_op_UntagResource.go +++ b/service/servicequotas/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_client.go b/service/ses/api_client.go index afdbd47b57d..a96a5e0d63d 100644 --- a/service/ses/api_client.go +++ b/service/ses/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ses/api_op_CloneReceiptRuleSet.go b/service/ses/api_op_CloneReceiptRuleSet.go index ef0ae21b14c..e790c6ca263 100644 --- a/service/ses/api_op_CloneReceiptRuleSet.go +++ b/service/ses/api_op_CloneReceiptRuleSet.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCloneReceiptRuleSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCloneReceiptRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateConfigurationSet.go b/service/ses/api_op_CreateConfigurationSet.go index 0ffe352a9f0..83d1338a5bd 100644 --- a/service/ses/api_op_CreateConfigurationSet.go +++ b/service/ses/api_op_CreateConfigurationSet.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateConfigurationSetEventDestination.go b/service/ses/api_op_CreateConfigurationSetEventDestination.go index ba1f6ad9ad0..25dacc8e28b 100644 --- a/service/ses/api_op_CreateConfigurationSetEventDestination.go +++ b/service/ses/api_op_CreateConfigurationSetEventDestination.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateConfigurationSetTrackingOptions.go b/service/ses/api_op_CreateConfigurationSetTrackingOptions.go index da5136e5fb9..9169502a33d 100644 --- a/service/ses/api_op_CreateConfigurationSetTrackingOptions.go +++ b/service/ses/api_op_CreateConfigurationSetTrackingOptions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateConfigurationSetTrackingOptionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateCustomVerificationEmailTemplate.go b/service/ses/api_op_CreateCustomVerificationEmailTemplate.go index f8e3cf5ad27..4cc6d58bc91 100644 --- a/service/ses/api_op_CreateCustomVerificationEmailTemplate.go +++ b/service/ses/api_op_CreateCustomVerificationEmailTemplate.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateCustomVerificationEmailTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateReceiptFilter.go b/service/ses/api_op_CreateReceiptFilter.go index 97474bb4484..b68772e5df5 100644 --- a/service/ses/api_op_CreateReceiptFilter.go +++ b/service/ses/api_op_CreateReceiptFilter.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateReceiptFilterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReceiptFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateReceiptRule.go b/service/ses/api_op_CreateReceiptRule.go index b28594ea666..075324d3675 100644 --- a/service/ses/api_op_CreateReceiptRule.go +++ b/service/ses/api_op_CreateReceiptRule.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateReceiptRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReceiptRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateReceiptRuleSet.go b/service/ses/api_op_CreateReceiptRuleSet.go index cfdc40b5880..d884019dc8a 100644 --- a/service/ses/api_op_CreateReceiptRuleSet.go +++ b/service/ses/api_op_CreateReceiptRuleSet.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateReceiptRuleSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReceiptRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_CreateTemplate.go b/service/ses/api_op_CreateTemplate.go index 6b717651e05..bd7ba0865d2 100644 --- a/service/ses/api_op_CreateTemplate.go +++ b/service/ses/api_op_CreateTemplate.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteConfigurationSet.go b/service/ses/api_op_DeleteConfigurationSet.go index 64ad61f86d5..f38bd99d7cb 100644 --- a/service/ses/api_op_DeleteConfigurationSet.go +++ b/service/ses/api_op_DeleteConfigurationSet.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteConfigurationSetEventDestination.go b/service/ses/api_op_DeleteConfigurationSetEventDestination.go index 89e4319da82..6106554d6a8 100644 --- a/service/ses/api_op_DeleteConfigurationSetEventDestination.go +++ b/service/ses/api_op_DeleteConfigurationSetEventDestination.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteConfigurationSetTrackingOptions.go b/service/ses/api_op_DeleteConfigurationSetTrackingOptions.go index c33477503c1..99167b9f81d 100644 --- a/service/ses/api_op_DeleteConfigurationSetTrackingOptions.go +++ b/service/ses/api_op_DeleteConfigurationSetTrackingOptions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteConfigurationSetTrackingOptionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteCustomVerificationEmailTemplate.go b/service/ses/api_op_DeleteCustomVerificationEmailTemplate.go index 8a53d0d9d47..e63f17f7e53 100644 --- a/service/ses/api_op_DeleteCustomVerificationEmailTemplate.go +++ b/service/ses/api_op_DeleteCustomVerificationEmailTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteCustomVerificationEmailTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteIdentity.go b/service/ses/api_op_DeleteIdentity.go index 9218ac16c0a..5bd2ea54bfc 100644 --- a/service/ses/api_op_DeleteIdentity.go +++ b/service/ses/api_op_DeleteIdentity.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteIdentityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteIdentityPolicy.go b/service/ses/api_op_DeleteIdentityPolicy.go index 6841947f385..b064b6779f1 100644 --- a/service/ses/api_op_DeleteIdentityPolicy.go +++ b/service/ses/api_op_DeleteIdentityPolicy.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDeleteIdentityPolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteReceiptFilter.go b/service/ses/api_op_DeleteReceiptFilter.go index 982b7b0ca08..3d5cbbf10df 100644 --- a/service/ses/api_op_DeleteReceiptFilter.go +++ b/service/ses/api_op_DeleteReceiptFilter.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteReceiptFilterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReceiptFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteReceiptRule.go b/service/ses/api_op_DeleteReceiptRule.go index 4cebdfc5ff9..672345bde3d 100644 --- a/service/ses/api_op_DeleteReceiptRule.go +++ b/service/ses/api_op_DeleteReceiptRule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteReceiptRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReceiptRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteReceiptRuleSet.go b/service/ses/api_op_DeleteReceiptRuleSet.go index 08bde6b2712..c48d93a2d82 100644 --- a/service/ses/api_op_DeleteReceiptRuleSet.go +++ b/service/ses/api_op_DeleteReceiptRuleSet.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteReceiptRuleSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReceiptRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteTemplate.go b/service/ses/api_op_DeleteTemplate.go index b37c7e664df..898d12c9f3a 100644 --- a/service/ses/api_op_DeleteTemplate.go +++ b/service/ses/api_op_DeleteTemplate.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DeleteVerifiedEmailAddress.go b/service/ses/api_op_DeleteVerifiedEmailAddress.go index eb5be21c35e..a8f69ae36dd 100644 --- a/service/ses/api_op_DeleteVerifiedEmailAddress.go +++ b/service/ses/api_op_DeleteVerifiedEmailAddress.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteVerifiedEmailAddressMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVerifiedEmailAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DescribeActiveReceiptRuleSet.go b/service/ses/api_op_DescribeActiveReceiptRuleSet.go index 7ed4f22b271..c576b42469d 100644 --- a/service/ses/api_op_DescribeActiveReceiptRuleSet.go +++ b/service/ses/api_op_DescribeActiveReceiptRuleSet.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeActiveReceiptRuleSetMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActiveReceiptRuleSet(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_DescribeConfigurationSet.go b/service/ses/api_op_DescribeConfigurationSet.go index d223d07a183..347fbc607d7 100644 --- a/service/ses/api_op_DescribeConfigurationSet.go +++ b/service/ses/api_op_DescribeConfigurationSet.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeConfigurationSetMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DescribeReceiptRule.go b/service/ses/api_op_DescribeReceiptRule.go index 224b5c08c5c..18beca35e08 100644 --- a/service/ses/api_op_DescribeReceiptRule.go +++ b/service/ses/api_op_DescribeReceiptRule.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeReceiptRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReceiptRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_DescribeReceiptRuleSet.go b/service/ses/api_op_DescribeReceiptRuleSet.go index f80fcbbf4a3..6682acbf7fc 100644 --- a/service/ses/api_op_DescribeReceiptRuleSet.go +++ b/service/ses/api_op_DescribeReceiptRuleSet.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeReceiptRuleSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReceiptRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_GetAccountSendingEnabled.go b/service/ses/api_op_GetAccountSendingEnabled.go index 51f8525a90c..5c38569e665 100644 --- a/service/ses/api_op_GetAccountSendingEnabled.go +++ b/service/ses/api_op_GetAccountSendingEnabled.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetAccountSendingEnabledMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountSendingEnabled(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_GetCustomVerificationEmailTemplate.go b/service/ses/api_op_GetCustomVerificationEmailTemplate.go index 01a0c2b939b..6278a390507 100644 --- a/service/ses/api_op_GetCustomVerificationEmailTemplate.go +++ b/service/ses/api_op_GetCustomVerificationEmailTemplate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetCustomVerificationEmailTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_GetIdentityDkimAttributes.go b/service/ses/api_op_GetIdentityDkimAttributes.go index 2b941da62ed..20cbe7afbe2 100644 --- a/service/ses/api_op_GetIdentityDkimAttributes.go +++ b/service/ses/api_op_GetIdentityDkimAttributes.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetIdentityDkimAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityDkimAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_GetIdentityMailFromDomainAttributes.go b/service/ses/api_op_GetIdentityMailFromDomainAttributes.go index 399052fcde4..19e15427b6f 100644 --- a/service/ses/api_op_GetIdentityMailFromDomainAttributes.go +++ b/service/ses/api_op_GetIdentityMailFromDomainAttributes.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetIdentityMailFromDomainAttributesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityMailFromDomainAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_GetIdentityNotificationAttributes.go b/service/ses/api_op_GetIdentityNotificationAttributes.go index 6319de7df7c..947ed7d653b 100644 --- a/service/ses/api_op_GetIdentityNotificationAttributes.go +++ b/service/ses/api_op_GetIdentityNotificationAttributes.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetIdentityNotificationAttributesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityNotificationAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_GetIdentityPolicies.go b/service/ses/api_op_GetIdentityPolicies.go index 41f1ee1f59b..9076bbff9bf 100644 --- a/service/ses/api_op_GetIdentityPolicies.go +++ b/service/ses/api_op_GetIdentityPolicies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetIdentityPoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_GetIdentityVerificationAttributes.go b/service/ses/api_op_GetIdentityVerificationAttributes.go index 71096732f60..e29fce0bb15 100644 --- a/service/ses/api_op_GetIdentityVerificationAttributes.go +++ b/service/ses/api_op_GetIdentityVerificationAttributes.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetIdentityVerificationAttributesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityVerificationAttributesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationGetIdentityVerificationAttributesMiddlewares(stack return nil } -// GetIdentityVerificationAttributesAPIClient is a client that implements the -// GetIdentityVerificationAttributes operation. -type GetIdentityVerificationAttributesAPIClient interface { - GetIdentityVerificationAttributes(context.Context, *GetIdentityVerificationAttributesInput, ...func(*Options)) (*GetIdentityVerificationAttributesOutput, error) -} - -var _ GetIdentityVerificationAttributesAPIClient = (*Client)(nil) - // IdentityExistsWaiterOptions are waiter options for IdentityExistsWaiter type IdentityExistsWaiterOptions struct { @@ -286,7 +281,13 @@ func (w *IdentityExistsWaiter) WaitForOutput(ctx context.Context, params *GetIde } out, err := w.client.GetIdentityVerificationAttributes(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -359,6 +360,14 @@ func identityExistsStateRetryable(ctx context.Context, input *GetIdentityVerific return true, nil } +// GetIdentityVerificationAttributesAPIClient is a client that implements the +// GetIdentityVerificationAttributes operation. +type GetIdentityVerificationAttributesAPIClient interface { + GetIdentityVerificationAttributes(context.Context, *GetIdentityVerificationAttributesInput, ...func(*Options)) (*GetIdentityVerificationAttributesOutput, error) +} + +var _ GetIdentityVerificationAttributesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetIdentityVerificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ses/api_op_GetSendQuota.go b/service/ses/api_op_GetSendQuota.go index 8f6e9f803af..4576f93155a 100644 --- a/service/ses/api_op_GetSendQuota.go +++ b/service/ses/api_op_GetSendQuota.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetSendQuotaMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSendQuota(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_GetSendStatistics.go b/service/ses/api_op_GetSendStatistics.go index 65c73815932..bbaa6435a9f 100644 --- a/service/ses/api_op_GetSendStatistics.go +++ b/service/ses/api_op_GetSendStatistics.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetSendStatisticsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSendStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_GetTemplate.go b/service/ses/api_op_GetTemplate.go index c64d7d5519f..53c226f8dd6 100644 --- a/service/ses/api_op_GetTemplate.go +++ b/service/ses/api_op_GetTemplate.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetTemplateMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_ListConfigurationSets.go b/service/ses/api_op_ListConfigurationSets.go index 3fd9dba00a2..7550102702f 100644 --- a/service/ses/api_op_ListConfigurationSets.go +++ b/service/ses/api_op_ListConfigurationSets.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_ListCustomVerificationEmailTemplates.go b/service/ses/api_op_ListCustomVerificationEmailTemplates.go index fdcd5b603ec..33923e8749e 100644 --- a/service/ses/api_op_ListCustomVerificationEmailTemplates.go +++ b/service/ses/api_op_ListCustomVerificationEmailTemplates.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListCustomVerificationEmailTemplatesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomVerificationEmailTemplates(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListCustomVerificationEmailTemplatesMiddlewares(sta return nil } -// ListCustomVerificationEmailTemplatesAPIClient is a client that implements the -// ListCustomVerificationEmailTemplates operation. -type ListCustomVerificationEmailTemplatesAPIClient interface { - ListCustomVerificationEmailTemplates(context.Context, *ListCustomVerificationEmailTemplatesInput, ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, error) -} - -var _ ListCustomVerificationEmailTemplatesAPIClient = (*Client)(nil) - // ListCustomVerificationEmailTemplatesPaginatorOptions is the paginator options // for ListCustomVerificationEmailTemplates type ListCustomVerificationEmailTemplatesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Con } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomVerificationEmailTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Con return result, nil } +// ListCustomVerificationEmailTemplatesAPIClient is a client that implements the +// ListCustomVerificationEmailTemplates operation. +type ListCustomVerificationEmailTemplatesAPIClient interface { + ListCustomVerificationEmailTemplates(context.Context, *ListCustomVerificationEmailTemplatesInput, ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, error) +} + +var _ ListCustomVerificationEmailTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomVerificationEmailTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ses/api_op_ListIdentities.go b/service/ses/api_op_ListIdentities.go index fb3654abd1f..ffe776de4fb 100644 --- a/service/ses/api_op_ListIdentities.go +++ b/service/ses/api_op_ListIdentities.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIdentities(options.Region), middleware.Before); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListIdentitiesMiddlewares(stack *middleware.Stack, return nil } -// ListIdentitiesAPIClient is a client that implements the ListIdentities -// operation. -type ListIdentitiesAPIClient interface { - ListIdentities(context.Context, *ListIdentitiesInput, ...func(*Options)) (*ListIdentitiesOutput, error) -} - -var _ ListIdentitiesAPIClient = (*Client)(nil) - // ListIdentitiesPaginatorOptions is the paginator options for ListIdentities type ListIdentitiesPaginatorOptions struct { // The maximum number of identities per page. Possible values are 1-1000 inclusive. @@ -225,6 +220,9 @@ func (p *ListIdentitiesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxItems = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListIdentitiesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListIdentitiesAPIClient is a client that implements the ListIdentities +// operation. +type ListIdentitiesAPIClient interface { + ListIdentities(context.Context, *ListIdentitiesInput, ...func(*Options)) (*ListIdentitiesOutput, error) +} + +var _ ListIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ses/api_op_ListIdentityPolicies.go b/service/ses/api_op_ListIdentityPolicies.go index a7bb5e8164f..01e2d64bcdc 100644 --- a/service/ses/api_op_ListIdentityPolicies.go +++ b/service/ses/api_op_ListIdentityPolicies.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListIdentityPoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_ListReceiptFilters.go b/service/ses/api_op_ListReceiptFilters.go index 0440df96ba3..d3f95ce6bbf 100644 --- a/service/ses/api_op_ListReceiptFilters.go +++ b/service/ses/api_op_ListReceiptFilters.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListReceiptFiltersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceiptFilters(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_ListReceiptRuleSets.go b/service/ses/api_op_ListReceiptRuleSets.go index 6b20ce8862c..c101ee0d9b1 100644 --- a/service/ses/api_op_ListReceiptRuleSets.go +++ b/service/ses/api_op_ListReceiptRuleSets.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListReceiptRuleSetsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReceiptRuleSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_ListTemplates.go b/service/ses/api_op_ListTemplates.go index 6c214009106..29d7d8ef41f 100644 --- a/service/ses/api_op_ListTemplates.go +++ b/service/ses/api_op_ListTemplates.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListTemplatesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTemplates(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_ListVerifiedEmailAddresses.go b/service/ses/api_op_ListVerifiedEmailAddresses.go index ab9330062ee..8f81ed02645 100644 --- a/service/ses/api_op_ListVerifiedEmailAddresses.go +++ b/service/ses/api_op_ListVerifiedEmailAddresses.go @@ -102,6 +102,9 @@ func (c *Client) addOperationListVerifiedEmailAddressesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVerifiedEmailAddresses(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_PutConfigurationSetDeliveryOptions.go b/service/ses/api_op_PutConfigurationSetDeliveryOptions.go index 611c19293c5..f12da6b6a5b 100644 --- a/service/ses/api_op_PutConfigurationSetDeliveryOptions.go +++ b/service/ses/api_op_PutConfigurationSetDeliveryOptions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutConfigurationSetDeliveryOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetDeliveryOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_PutIdentityPolicy.go b/service/ses/api_op_PutIdentityPolicy.go index 5669d48f840..22a6c52a42b 100644 --- a/service/ses/api_op_PutIdentityPolicy.go +++ b/service/ses/api_op_PutIdentityPolicy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutIdentityPolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutIdentityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_ReorderReceiptRuleSet.go b/service/ses/api_op_ReorderReceiptRuleSet.go index 2081cf7a631..3e1312458a5 100644 --- a/service/ses/api_op_ReorderReceiptRuleSet.go +++ b/service/ses/api_op_ReorderReceiptRuleSet.go @@ -121,6 +121,9 @@ func (c *Client) addOperationReorderReceiptRuleSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReorderReceiptRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SendBounce.go b/service/ses/api_op_SendBounce.go index 5cda28839b3..3500a69638a 100644 --- a/service/ses/api_op_SendBounce.go +++ b/service/ses/api_op_SendBounce.go @@ -149,6 +149,9 @@ func (c *Client) addOperationSendBounceMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendBounceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SendBulkTemplatedEmail.go b/service/ses/api_op_SendBulkTemplatedEmail.go index 210f30e3563..0af260cfb79 100644 --- a/service/ses/api_op_SendBulkTemplatedEmail.go +++ b/service/ses/api_op_SendBulkTemplatedEmail.go @@ -242,6 +242,9 @@ func (c *Client) addOperationSendBulkTemplatedEmailMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendBulkTemplatedEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SendCustomVerificationEmail.go b/service/ses/api_op_SendCustomVerificationEmail.go index e1f8251303d..ab52b6ac280 100644 --- a/service/ses/api_op_SendCustomVerificationEmail.go +++ b/service/ses/api_op_SendCustomVerificationEmail.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSendCustomVerificationEmailMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendCustomVerificationEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SendEmail.go b/service/ses/api_op_SendEmail.go index 308bf02686b..bd9b7b2542c 100644 --- a/service/ses/api_op_SendEmail.go +++ b/service/ses/api_op_SendEmail.go @@ -226,6 +226,9 @@ func (c *Client) addOperationSendEmailMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SendRawEmail.go b/service/ses/api_op_SendRawEmail.go index 395d80d4df6..e3746980bd1 100644 --- a/service/ses/api_op_SendRawEmail.go +++ b/service/ses/api_op_SendRawEmail.go @@ -310,6 +310,9 @@ func (c *Client) addOperationSendRawEmailMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendRawEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SendTemplatedEmail.go b/service/ses/api_op_SendTemplatedEmail.go index 53207146360..e59c2a1e656 100644 --- a/service/ses/api_op_SendTemplatedEmail.go +++ b/service/ses/api_op_SendTemplatedEmail.go @@ -245,6 +245,9 @@ func (c *Client) addOperationSendTemplatedEmailMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendTemplatedEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SetActiveReceiptRuleSet.go b/service/ses/api_op_SetActiveReceiptRuleSet.go index 6c2cdbe90b7..4da8692fb01 100644 --- a/service/ses/api_op_SetActiveReceiptRuleSet.go +++ b/service/ses/api_op_SetActiveReceiptRuleSet.go @@ -115,6 +115,9 @@ func (c *Client) addOperationSetActiveReceiptRuleSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetActiveReceiptRuleSet(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_SetIdentityDkimEnabled.go b/service/ses/api_op_SetIdentityDkimEnabled.go index d0d589aad97..11058127c39 100644 --- a/service/ses/api_op_SetIdentityDkimEnabled.go +++ b/service/ses/api_op_SetIdentityDkimEnabled.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSetIdentityDkimEnabledMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityDkimEnabledValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SetIdentityFeedbackForwardingEnabled.go b/service/ses/api_op_SetIdentityFeedbackForwardingEnabled.go index 27d13d4dece..e201a4bb28e 100644 --- a/service/ses/api_op_SetIdentityFeedbackForwardingEnabled.go +++ b/service/ses/api_op_SetIdentityFeedbackForwardingEnabled.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSetIdentityFeedbackForwardingEnabledMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityFeedbackForwardingEnabledValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SetIdentityHeadersInNotificationsEnabled.go b/service/ses/api_op_SetIdentityHeadersInNotificationsEnabled.go index d52022ef9ff..dbebf18a39b 100644 --- a/service/ses/api_op_SetIdentityHeadersInNotificationsEnabled.go +++ b/service/ses/api_op_SetIdentityHeadersInNotificationsEnabled.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSetIdentityHeadersInNotificationsEnabledMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityHeadersInNotificationsEnabledValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SetIdentityMailFromDomain.go b/service/ses/api_op_SetIdentityMailFromDomain.go index 6be6cd32a5c..f6194f99165 100644 --- a/service/ses/api_op_SetIdentityMailFromDomain.go +++ b/service/ses/api_op_SetIdentityMailFromDomain.go @@ -137,6 +137,9 @@ func (c *Client) addOperationSetIdentityMailFromDomainMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityMailFromDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SetIdentityNotificationTopic.go b/service/ses/api_op_SetIdentityNotificationTopic.go index 058ff385f18..b53d599a88b 100644 --- a/service/ses/api_op_SetIdentityNotificationTopic.go +++ b/service/ses/api_op_SetIdentityNotificationTopic.go @@ -136,6 +136,9 @@ func (c *Client) addOperationSetIdentityNotificationTopicMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetIdentityNotificationTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_SetReceiptRulePosition.go b/service/ses/api_op_SetReceiptRulePosition.go index 843e1b79a1a..a49cbcf6c03 100644 --- a/service/ses/api_op_SetReceiptRulePosition.go +++ b/service/ses/api_op_SetReceiptRulePosition.go @@ -121,6 +121,9 @@ func (c *Client) addOperationSetReceiptRulePositionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetReceiptRulePositionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_TestRenderTemplate.go b/service/ses/api_op_TestRenderTemplate.go index 7542141eb75..fc5c4034c95 100644 --- a/service/ses/api_op_TestRenderTemplate.go +++ b/service/ses/api_op_TestRenderTemplate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationTestRenderTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestRenderTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateAccountSendingEnabled.go b/service/ses/api_op_UpdateAccountSendingEnabled.go index 986c64d8348..9e768251fb9 100644 --- a/service/ses/api_op_UpdateAccountSendingEnabled.go +++ b/service/ses/api_op_UpdateAccountSendingEnabled.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateAccountSendingEnabledMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSendingEnabled(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ses/api_op_UpdateConfigurationSetEventDestination.go b/service/ses/api_op_UpdateConfigurationSetEventDestination.go index a68aed529e4..5caa5ef804c 100644 --- a/service/ses/api_op_UpdateConfigurationSetEventDestination.go +++ b/service/ses/api_op_UpdateConfigurationSetEventDestination.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateConfigurationSetReputationMetricsEnabled.go b/service/ses/api_op_UpdateConfigurationSetReputationMetricsEnabled.go index 3823b5cb5a6..ca4c63c5136 100644 --- a/service/ses/api_op_UpdateConfigurationSetReputationMetricsEnabled.go +++ b/service/ses/api_op_UpdateConfigurationSetReputationMetricsEnabled.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateConfigurationSetReputationMetricsEnabledMiddl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetReputationMetricsEnabledValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateConfigurationSetSendingEnabled.go b/service/ses/api_op_UpdateConfigurationSetSendingEnabled.go index 8cd5d09cc83..84216f7d1dd 100644 --- a/service/ses/api_op_UpdateConfigurationSetSendingEnabled.go +++ b/service/ses/api_op_UpdateConfigurationSetSendingEnabled.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateConfigurationSetSendingEnabledMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetSendingEnabledValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateConfigurationSetTrackingOptions.go b/service/ses/api_op_UpdateConfigurationSetTrackingOptions.go index e5ce611fd87..82a02a47d09 100644 --- a/service/ses/api_op_UpdateConfigurationSetTrackingOptions.go +++ b/service/ses/api_op_UpdateConfigurationSetTrackingOptions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateConfigurationSetTrackingOptionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateCustomVerificationEmailTemplate.go b/service/ses/api_op_UpdateCustomVerificationEmailTemplate.go index a00d470632c..00186137f6f 100644 --- a/service/ses/api_op_UpdateCustomVerificationEmailTemplate.go +++ b/service/ses/api_op_UpdateCustomVerificationEmailTemplate.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateCustomVerificationEmailTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateReceiptRule.go b/service/ses/api_op_UpdateReceiptRule.go index a5250e0f2c1..1af81a8ff83 100644 --- a/service/ses/api_op_UpdateReceiptRule.go +++ b/service/ses/api_op_UpdateReceiptRule.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateReceiptRuleMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReceiptRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_UpdateTemplate.go b/service/ses/api_op_UpdateTemplate.go index b35709bbd9d..090ab82f62f 100644 --- a/service/ses/api_op_UpdateTemplate.go +++ b/service/ses/api_op_UpdateTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateTemplateMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_VerifyDomainDkim.go b/service/ses/api_op_VerifyDomainDkim.go index 63ba329fe34..c9d5d3b065f 100644 --- a/service/ses/api_op_VerifyDomainDkim.go +++ b/service/ses/api_op_VerifyDomainDkim.go @@ -155,6 +155,9 @@ func (c *Client) addOperationVerifyDomainDkimMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyDomainDkimValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_VerifyDomainIdentity.go b/service/ses/api_op_VerifyDomainIdentity.go index 5cb80e1d0b3..12a52f3ce66 100644 --- a/service/ses/api_op_VerifyDomainIdentity.go +++ b/service/ses/api_op_VerifyDomainIdentity.go @@ -129,6 +129,9 @@ func (c *Client) addOperationVerifyDomainIdentityMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyDomainIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_VerifyEmailAddress.go b/service/ses/api_op_VerifyEmailAddress.go index 6b399ad013c..f9b124e8193 100644 --- a/service/ses/api_op_VerifyEmailAddress.go +++ b/service/ses/api_op_VerifyEmailAddress.go @@ -105,6 +105,9 @@ func (c *Client) addOperationVerifyEmailAddressMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyEmailAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/ses/api_op_VerifyEmailIdentity.go b/service/ses/api_op_VerifyEmailIdentity.go index 57dce544f2a..cc1496490d5 100644 --- a/service/ses/api_op_VerifyEmailIdentity.go +++ b/service/ses/api_op_VerifyEmailIdentity.go @@ -110,6 +110,9 @@ func (c *Client) addOperationVerifyEmailIdentityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifyEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_client.go b/service/sesv2/api_client.go index 5b3f9f1d56b..8fcc1daaabd 100644 --- a/service/sesv2/api_client.go +++ b/service/sesv2/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sesv2/api_op_BatchGetMetricData.go b/service/sesv2/api_op_BatchGetMetricData.go index 61b0d55cd28..cff897ab525 100644 --- a/service/sesv2/api_op_BatchGetMetricData.go +++ b/service/sesv2/api_op_BatchGetMetricData.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchGetMetricDataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetMetricDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CancelExportJob.go b/service/sesv2/api_op_CancelExportJob.go index 0f8b09720d5..23f7c7edf49 100644 --- a/service/sesv2/api_op_CancelExportJob.go +++ b/service/sesv2/api_op_CancelExportJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCancelExportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateConfigurationSet.go b/service/sesv2/api_op_CreateConfigurationSet.go index 3948f4c03f7..64810fecb2a 100644 --- a/service/sesv2/api_op_CreateConfigurationSet.go +++ b/service/sesv2/api_op_CreateConfigurationSet.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateConfigurationSetEventDestination.go b/service/sesv2/api_op_CreateConfigurationSetEventDestination.go index baf4bb98fb5..0867b686065 100644 --- a/service/sesv2/api_op_CreateConfigurationSetEventDestination.go +++ b/service/sesv2/api_op_CreateConfigurationSetEventDestination.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateContact.go b/service/sesv2/api_op_CreateContact.go index 1c0e83a41e6..f15faa677ca 100644 --- a/service/sesv2/api_op_CreateContact.go +++ b/service/sesv2/api_op_CreateContact.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateContactList.go b/service/sesv2/api_op_CreateContactList.go index 348298d42b2..3148b5af1a8 100644 --- a/service/sesv2/api_op_CreateContactList.go +++ b/service/sesv2/api_op_CreateContactList.go @@ -112,6 +112,9 @@ func (c *Client) addOperationCreateContactListMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateContactListValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateCustomVerificationEmailTemplate.go b/service/sesv2/api_op_CreateCustomVerificationEmailTemplate.go index a6fa741cbfb..f1fa9d5af09 100644 --- a/service/sesv2/api_op_CreateCustomVerificationEmailTemplate.go +++ b/service/sesv2/api_op_CreateCustomVerificationEmailTemplate.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateCustomVerificationEmailTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateDedicatedIpPool.go b/service/sesv2/api_op_CreateDedicatedIpPool.go index 01e25c0ed06..b9cbf182901 100644 --- a/service/sesv2/api_op_CreateDedicatedIpPool.go +++ b/service/sesv2/api_op_CreateDedicatedIpPool.go @@ -116,6 +116,9 @@ func (c *Client) addOperationCreateDedicatedIpPoolMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDedicatedIpPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateDeliverabilityTestReport.go b/service/sesv2/api_op_CreateDeliverabilityTestReport.go index b745c990fbe..7c89ccf266a 100644 --- a/service/sesv2/api_op_CreateDeliverabilityTestReport.go +++ b/service/sesv2/api_op_CreateDeliverabilityTestReport.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateDeliverabilityTestReportMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDeliverabilityTestReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateEmailIdentity.go b/service/sesv2/api_op_CreateEmailIdentity.go index 5443f3c75f3..52e24f5d501 100644 --- a/service/sesv2/api_op_CreateEmailIdentity.go +++ b/service/sesv2/api_op_CreateEmailIdentity.go @@ -174,6 +174,9 @@ func (c *Client) addOperationCreateEmailIdentityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateEmailIdentityPolicy.go b/service/sesv2/api_op_CreateEmailIdentityPolicy.go index 46765308cf5..c01f4af5cc2 100644 --- a/service/sesv2/api_op_CreateEmailIdentityPolicy.go +++ b/service/sesv2/api_op_CreateEmailIdentityPolicy.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateEmailIdentityPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEmailIdentityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateEmailTemplate.go b/service/sesv2/api_op_CreateEmailTemplate.go index 1e7fc205f56..4aefdb38df1 100644 --- a/service/sesv2/api_op_CreateEmailTemplate.go +++ b/service/sesv2/api_op_CreateEmailTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateEmailTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateExportJob.go b/service/sesv2/api_op_CreateExportJob.go index cc2c41b7a18..7695cfbf2a4 100644 --- a/service/sesv2/api_op_CreateExportJob.go +++ b/service/sesv2/api_op_CreateExportJob.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateExportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_CreateImportJob.go b/service/sesv2/api_op_CreateImportJob.go index d270a09bfcd..42fc9754b4f 100644 --- a/service/sesv2/api_op_CreateImportJob.go +++ b/service/sesv2/api_op_CreateImportJob.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateImportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteConfigurationSet.go b/service/sesv2/api_op_DeleteConfigurationSet.go index 71063766a99..6cd4d981b8f 100644 --- a/service/sesv2/api_op_DeleteConfigurationSet.go +++ b/service/sesv2/api_op_DeleteConfigurationSet.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteConfigurationSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteConfigurationSetEventDestination.go b/service/sesv2/api_op_DeleteConfigurationSetEventDestination.go index d8f06438e4a..3dd3147453a 100644 --- a/service/sesv2/api_op_DeleteConfigurationSetEventDestination.go +++ b/service/sesv2/api_op_DeleteConfigurationSetEventDestination.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteContact.go b/service/sesv2/api_op_DeleteContact.go index 3eacb008cc4..7f3253fb91d 100644 --- a/service/sesv2/api_op_DeleteContact.go +++ b/service/sesv2/api_op_DeleteContact.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteContactList.go b/service/sesv2/api_op_DeleteContactList.go index 315aee07624..9240e06ccea 100644 --- a/service/sesv2/api_op_DeleteContactList.go +++ b/service/sesv2/api_op_DeleteContactList.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteContactListMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactListValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteCustomVerificationEmailTemplate.go b/service/sesv2/api_op_DeleteCustomVerificationEmailTemplate.go index 249bdc3cc88..3ee02dc47b0 100644 --- a/service/sesv2/api_op_DeleteCustomVerificationEmailTemplate.go +++ b/service/sesv2/api_op_DeleteCustomVerificationEmailTemplate.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteCustomVerificationEmailTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteDedicatedIpPool.go b/service/sesv2/api_op_DeleteDedicatedIpPool.go index 9d7bad15e37..1c3291f43d6 100644 --- a/service/sesv2/api_op_DeleteDedicatedIpPool.go +++ b/service/sesv2/api_op_DeleteDedicatedIpPool.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteDedicatedIpPoolMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDedicatedIpPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteEmailIdentity.go b/service/sesv2/api_op_DeleteEmailIdentity.go index 78c178e28df..47f830206e4 100644 --- a/service/sesv2/api_op_DeleteEmailIdentity.go +++ b/service/sesv2/api_op_DeleteEmailIdentity.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteEmailIdentityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteEmailIdentityPolicy.go b/service/sesv2/api_op_DeleteEmailIdentityPolicy.go index 359aff47f17..dbf2ff0fc9d 100644 --- a/service/sesv2/api_op_DeleteEmailIdentityPolicy.go +++ b/service/sesv2/api_op_DeleteEmailIdentityPolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDeleteEmailIdentityPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailIdentityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteEmailTemplate.go b/service/sesv2/api_op_DeleteEmailTemplate.go index f109dc238d2..027aa12508f 100644 --- a/service/sesv2/api_op_DeleteEmailTemplate.go +++ b/service/sesv2/api_op_DeleteEmailTemplate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteEmailTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_DeleteSuppressedDestination.go b/service/sesv2/api_op_DeleteSuppressedDestination.go index 89cc58f458e..d944f1b07bd 100644 --- a/service/sesv2/api_op_DeleteSuppressedDestination.go +++ b/service/sesv2/api_op_DeleteSuppressedDestination.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSuppressedDestinationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSuppressedDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetAccount.go b/service/sesv2/api_op_GetAccount.go index ec62d0163f8..bfe18b6c012 100644 --- a/service/sesv2/api_op_GetAccount.go +++ b/service/sesv2/api_op_GetAccount.go @@ -152,6 +152,9 @@ func (c *Client) addOperationGetAccountMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sesv2/api_op_GetBlacklistReports.go b/service/sesv2/api_op_GetBlacklistReports.go index a5b2758cc80..7c19a4ddb45 100644 --- a/service/sesv2/api_op_GetBlacklistReports.go +++ b/service/sesv2/api_op_GetBlacklistReports.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetBlacklistReportsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBlacklistReportsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetConfigurationSet.go b/service/sesv2/api_op_GetConfigurationSet.go index 8650662bf5a..914516ee1bb 100644 --- a/service/sesv2/api_op_GetConfigurationSet.go +++ b/service/sesv2/api_op_GetConfigurationSet.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetConfigurationSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetConfigurationSetEventDestinations.go b/service/sesv2/api_op_GetConfigurationSetEventDestinations.go index 4f57560d160..f17824c7db2 100644 --- a/service/sesv2/api_op_GetConfigurationSetEventDestinations.go +++ b/service/sesv2/api_op_GetConfigurationSetEventDestinations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetConfigurationSetEventDestinationsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConfigurationSetEventDestinationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetContact.go b/service/sesv2/api_op_GetContact.go index 4219729b174..fe79d27ca49 100644 --- a/service/sesv2/api_op_GetContact.go +++ b/service/sesv2/api_op_GetContact.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetContactMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetContactList.go b/service/sesv2/api_op_GetContactList.go index 71940992b34..c5f7642314e 100644 --- a/service/sesv2/api_op_GetContactList.go +++ b/service/sesv2/api_op_GetContactList.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetContactListMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContactListValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetCustomVerificationEmailTemplate.go b/service/sesv2/api_op_GetCustomVerificationEmailTemplate.go index d263bab1f42..a2fdd07d85c 100644 --- a/service/sesv2/api_op_GetCustomVerificationEmailTemplate.go +++ b/service/sesv2/api_op_GetCustomVerificationEmailTemplate.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetCustomVerificationEmailTemplateMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetDedicatedIp.go b/service/sesv2/api_op_GetDedicatedIp.go index beab6ae4377..a6a9bb3f4a0 100644 --- a/service/sesv2/api_op_GetDedicatedIp.go +++ b/service/sesv2/api_op_GetDedicatedIp.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDedicatedIpMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDedicatedIpValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetDedicatedIpPool.go b/service/sesv2/api_op_GetDedicatedIpPool.go index abe6a08dbb0..1366d161c58 100644 --- a/service/sesv2/api_op_GetDedicatedIpPool.go +++ b/service/sesv2/api_op_GetDedicatedIpPool.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetDedicatedIpPoolMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDedicatedIpPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetDedicatedIps.go b/service/sesv2/api_op_GetDedicatedIps.go index 75505380ef2..f8842320c5a 100644 --- a/service/sesv2/api_op_GetDedicatedIps.go +++ b/service/sesv2/api_op_GetDedicatedIps.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetDedicatedIpsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDedicatedIps(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetDedicatedIpsMiddlewares(stack *middleware.Stack, return nil } -// GetDedicatedIpsAPIClient is a client that implements the GetDedicatedIps -// operation. -type GetDedicatedIpsAPIClient interface { - GetDedicatedIps(context.Context, *GetDedicatedIpsInput, ...func(*Options)) (*GetDedicatedIpsOutput, error) -} - -var _ GetDedicatedIpsAPIClient = (*Client)(nil) - // GetDedicatedIpsPaginatorOptions is the paginator options for GetDedicatedIps type GetDedicatedIpsPaginatorOptions struct { // The number of results to show in a single call to GetDedicatedIpsRequest . If @@ -219,6 +214,9 @@ func (p *GetDedicatedIpsPaginator) NextPage(ctx context.Context, optFns ...func( } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetDedicatedIps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *GetDedicatedIpsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetDedicatedIpsAPIClient is a client that implements the GetDedicatedIps +// operation. +type GetDedicatedIpsAPIClient interface { + GetDedicatedIps(context.Context, *GetDedicatedIpsInput, ...func(*Options)) (*GetDedicatedIpsOutput, error) +} + +var _ GetDedicatedIpsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetDedicatedIps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_GetDeliverabilityDashboardOptions.go b/service/sesv2/api_op_GetDeliverabilityDashboardOptions.go index 426156d1f0e..e00d9336959 100644 --- a/service/sesv2/api_op_GetDeliverabilityDashboardOptions.go +++ b/service/sesv2/api_op_GetDeliverabilityDashboardOptions.go @@ -148,6 +148,9 @@ func (c *Client) addOperationGetDeliverabilityDashboardOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeliverabilityDashboardOptions(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sesv2/api_op_GetDeliverabilityTestReport.go b/service/sesv2/api_op_GetDeliverabilityTestReport.go index 8258248ee79..6273c94cebc 100644 --- a/service/sesv2/api_op_GetDeliverabilityTestReport.go +++ b/service/sesv2/api_op_GetDeliverabilityTestReport.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetDeliverabilityTestReportMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeliverabilityTestReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetDomainDeliverabilityCampaign.go b/service/sesv2/api_op_GetDomainDeliverabilityCampaign.go index 003b3e915c5..c7b0a74fa48 100644 --- a/service/sesv2/api_op_GetDomainDeliverabilityCampaign.go +++ b/service/sesv2/api_op_GetDomainDeliverabilityCampaign.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDomainDeliverabilityCampaignMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainDeliverabilityCampaignValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetDomainStatisticsReport.go b/service/sesv2/api_op_GetDomainStatisticsReport.go index 31e828180ed..487cc03318c 100644 --- a/service/sesv2/api_op_GetDomainStatisticsReport.go +++ b/service/sesv2/api_op_GetDomainStatisticsReport.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetDomainStatisticsReportMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDomainStatisticsReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetEmailIdentity.go b/service/sesv2/api_op_GetEmailIdentity.go index aa522503b5e..471e7e48ca8 100644 --- a/service/sesv2/api_op_GetEmailIdentity.go +++ b/service/sesv2/api_op_GetEmailIdentity.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetEmailIdentityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEmailIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetEmailIdentityPolicies.go b/service/sesv2/api_op_GetEmailIdentityPolicies.go index 306201fc05c..058bbd7ca30 100644 --- a/service/sesv2/api_op_GetEmailIdentityPolicies.go +++ b/service/sesv2/api_op_GetEmailIdentityPolicies.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetEmailIdentityPoliciesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEmailIdentityPoliciesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetEmailTemplate.go b/service/sesv2/api_op_GetEmailTemplate.go index e2cb0cfc33c..6c48e433d55 100644 --- a/service/sesv2/api_op_GetEmailTemplate.go +++ b/service/sesv2/api_op_GetEmailTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetEmailTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetExportJob.go b/service/sesv2/api_op_GetExportJob.go index f532fcca03a..2b0208ff803 100644 --- a/service/sesv2/api_op_GetExportJob.go +++ b/service/sesv2/api_op_GetExportJob.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetExportJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetImportJob.go b/service/sesv2/api_op_GetImportJob.go index 1aac8295d58..41bddfd5ae8 100644 --- a/service/sesv2/api_op_GetImportJob.go +++ b/service/sesv2/api_op_GetImportJob.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetImportJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetMessageInsights.go b/service/sesv2/api_op_GetMessageInsights.go index ae42f61cbab..1f8003e36b0 100644 --- a/service/sesv2/api_op_GetMessageInsights.go +++ b/service/sesv2/api_op_GetMessageInsights.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetMessageInsightsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMessageInsightsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_GetSuppressedDestination.go b/service/sesv2/api_op_GetSuppressedDestination.go index a3894091ecd..20a4e04b53c 100644 --- a/service/sesv2/api_op_GetSuppressedDestination.go +++ b/service/sesv2/api_op_GetSuppressedDestination.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetSuppressedDestinationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSuppressedDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_ListConfigurationSets.go b/service/sesv2/api_op_ListConfigurationSets.go index 730ef47c14a..7d44d6c0561 100644 --- a/service/sesv2/api_op_ListConfigurationSets.go +++ b/service/sesv2/api_op_ListConfigurationSets.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConfigurationSets(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListConfigurationSetsMiddlewares(stack *middleware. return nil } -// ListConfigurationSetsAPIClient is a client that implements the -// ListConfigurationSets operation. -type ListConfigurationSetsAPIClient interface { - ListConfigurationSets(context.Context, *ListConfigurationSetsInput, ...func(*Options)) (*ListConfigurationSetsOutput, error) -} - -var _ ListConfigurationSetsAPIClient = (*Client)(nil) - // ListConfigurationSetsPaginatorOptions is the paginator options for // ListConfigurationSets type ListConfigurationSetsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListConfigurationSetsPaginator) NextPage(ctx context.Context, optFns .. } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConfigurationSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListConfigurationSetsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListConfigurationSetsAPIClient is a client that implements the +// ListConfigurationSets operation. +type ListConfigurationSetsAPIClient interface { + ListConfigurationSets(context.Context, *ListConfigurationSetsInput, ...func(*Options)) (*ListConfigurationSetsOutput, error) +} + +var _ ListConfigurationSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConfigurationSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListContactLists.go b/service/sesv2/api_op_ListContactLists.go index bc522f5a95b..9abfa588e15 100644 --- a/service/sesv2/api_op_ListContactLists.go +++ b/service/sesv2/api_op_ListContactLists.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListContactListsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContactLists(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListContactListsMiddlewares(stack *middleware.Stack return nil } -// ListContactListsAPIClient is a client that implements the ListContactLists -// operation. -type ListContactListsAPIClient interface { - ListContactLists(context.Context, *ListContactListsInput, ...func(*Options)) (*ListContactListsOutput, error) -} - -var _ ListContactListsAPIClient = (*Client)(nil) - // ListContactListsPaginatorOptions is the paginator options for ListContactLists type ListContactListsPaginatorOptions struct { // Maximum number of contact lists to return at once. Use this parameter to @@ -213,6 +208,9 @@ func (p *ListContactListsPaginator) NextPage(ctx context.Context, optFns ...func } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContactLists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListContactListsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListContactListsAPIClient is a client that implements the ListContactLists +// operation. +type ListContactListsAPIClient interface { + ListContactLists(context.Context, *ListContactListsInput, ...func(*Options)) (*ListContactListsOutput, error) +} + +var _ ListContactListsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContactLists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListContacts.go b/service/sesv2/api_op_ListContacts.go index 617b3d5401c..c26dcd57ac7 100644 --- a/service/sesv2/api_op_ListContacts.go +++ b/service/sesv2/api_op_ListContacts.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListContactsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactsValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationListContactsMiddlewares(stack *middleware.Stack, op return nil } -// ListContactsAPIClient is a client that implements the ListContacts operation. -type ListContactsAPIClient interface { - ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) -} - -var _ ListContactsAPIClient = (*Client)(nil) - // ListContactsPaginatorOptions is the paginator options for ListContacts type ListContactsPaginatorOptions struct { // The number of contacts that may be returned at once, which is dependent on if @@ -224,6 +220,9 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListContactsAPIClient is a client that implements the ListContacts operation. +type ListContactsAPIClient interface { + ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) +} + +var _ ListContactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go b/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go index f1222f099d2..d9acf04a464 100644 --- a/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go +++ b/service/sesv2/api_op_ListCustomVerificationEmailTemplates.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListCustomVerificationEmailTemplatesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCustomVerificationEmailTemplates(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListCustomVerificationEmailTemplatesMiddlewares(sta return nil } -// ListCustomVerificationEmailTemplatesAPIClient is a client that implements the -// ListCustomVerificationEmailTemplates operation. -type ListCustomVerificationEmailTemplatesAPIClient interface { - ListCustomVerificationEmailTemplates(context.Context, *ListCustomVerificationEmailTemplatesInput, ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, error) -} - -var _ ListCustomVerificationEmailTemplatesAPIClient = (*Client)(nil) - // ListCustomVerificationEmailTemplatesPaginatorOptions is the paginator options // for ListCustomVerificationEmailTemplates type ListCustomVerificationEmailTemplatesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Con } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomVerificationEmailTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListCustomVerificationEmailTemplatesPaginator) NextPage(ctx context.Con return result, nil } +// ListCustomVerificationEmailTemplatesAPIClient is a client that implements the +// ListCustomVerificationEmailTemplates operation. +type ListCustomVerificationEmailTemplatesAPIClient interface { + ListCustomVerificationEmailTemplates(context.Context, *ListCustomVerificationEmailTemplatesInput, ...func(*Options)) (*ListCustomVerificationEmailTemplatesOutput, error) +} + +var _ ListCustomVerificationEmailTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomVerificationEmailTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListDedicatedIpPools.go b/service/sesv2/api_op_ListDedicatedIpPools.go index 0b86079d306..280736f3aa0 100644 --- a/service/sesv2/api_op_ListDedicatedIpPools.go +++ b/service/sesv2/api_op_ListDedicatedIpPools.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDedicatedIpPoolsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDedicatedIpPools(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListDedicatedIpPoolsMiddlewares(stack *middleware.S return nil } -// ListDedicatedIpPoolsAPIClient is a client that implements the -// ListDedicatedIpPools operation. -type ListDedicatedIpPoolsAPIClient interface { - ListDedicatedIpPools(context.Context, *ListDedicatedIpPoolsInput, ...func(*Options)) (*ListDedicatedIpPoolsOutput, error) -} - -var _ ListDedicatedIpPoolsAPIClient = (*Client)(nil) - // ListDedicatedIpPoolsPaginatorOptions is the paginator options for // ListDedicatedIpPools type ListDedicatedIpPoolsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDedicatedIpPoolsPaginator) NextPage(ctx context.Context, optFns ... } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDedicatedIpPools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDedicatedIpPoolsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDedicatedIpPoolsAPIClient is a client that implements the +// ListDedicatedIpPools operation. +type ListDedicatedIpPoolsAPIClient interface { + ListDedicatedIpPools(context.Context, *ListDedicatedIpPoolsInput, ...func(*Options)) (*ListDedicatedIpPoolsOutput, error) +} + +var _ ListDedicatedIpPoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDedicatedIpPools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListDeliverabilityTestReports.go b/service/sesv2/api_op_ListDeliverabilityTestReports.go index d4993189c21..003d0f3cd05 100644 --- a/service/sesv2/api_op_ListDeliverabilityTestReports.go +++ b/service/sesv2/api_op_ListDeliverabilityTestReports.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListDeliverabilityTestReportsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeliverabilityTestReports(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListDeliverabilityTestReportsMiddlewares(stack *mid return nil } -// ListDeliverabilityTestReportsAPIClient is a client that implements the -// ListDeliverabilityTestReports operation. -type ListDeliverabilityTestReportsAPIClient interface { - ListDeliverabilityTestReports(context.Context, *ListDeliverabilityTestReportsInput, ...func(*Options)) (*ListDeliverabilityTestReportsOutput, error) -} - -var _ ListDeliverabilityTestReportsAPIClient = (*Client)(nil) - // ListDeliverabilityTestReportsPaginatorOptions is the paginator options for // ListDeliverabilityTestReports type ListDeliverabilityTestReportsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListDeliverabilityTestReportsPaginator) NextPage(ctx context.Context, o } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeliverabilityTestReports(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListDeliverabilityTestReportsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListDeliverabilityTestReportsAPIClient is a client that implements the +// ListDeliverabilityTestReports operation. +type ListDeliverabilityTestReportsAPIClient interface { + ListDeliverabilityTestReports(context.Context, *ListDeliverabilityTestReportsInput, ...func(*Options)) (*ListDeliverabilityTestReportsOutput, error) +} + +var _ ListDeliverabilityTestReportsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeliverabilityTestReports(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go b/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go index 6bf41ec4478..96cda494d3e 100644 --- a/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go +++ b/service/sesv2/api_op_ListDomainDeliverabilityCampaigns.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListDomainDeliverabilityCampaignsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainDeliverabilityCampaignsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListDomainDeliverabilityCampaignsMiddlewares(stack return nil } -// ListDomainDeliverabilityCampaignsAPIClient is a client that implements the -// ListDomainDeliverabilityCampaigns operation. -type ListDomainDeliverabilityCampaignsAPIClient interface { - ListDomainDeliverabilityCampaigns(context.Context, *ListDomainDeliverabilityCampaignsInput, ...func(*Options)) (*ListDomainDeliverabilityCampaignsOutput, error) -} - -var _ ListDomainDeliverabilityCampaignsAPIClient = (*Client)(nil) - // ListDomainDeliverabilityCampaignsPaginatorOptions is the paginator options for // ListDomainDeliverabilityCampaigns type ListDomainDeliverabilityCampaignsPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *ListDomainDeliverabilityCampaignsPaginator) NextPage(ctx context.Contex } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomainDeliverabilityCampaigns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *ListDomainDeliverabilityCampaignsPaginator) NextPage(ctx context.Contex return result, nil } +// ListDomainDeliverabilityCampaignsAPIClient is a client that implements the +// ListDomainDeliverabilityCampaigns operation. +type ListDomainDeliverabilityCampaignsAPIClient interface { + ListDomainDeliverabilityCampaigns(context.Context, *ListDomainDeliverabilityCampaignsInput, ...func(*Options)) (*ListDomainDeliverabilityCampaignsOutput, error) +} + +var _ ListDomainDeliverabilityCampaignsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomainDeliverabilityCampaigns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListEmailIdentities.go b/service/sesv2/api_op_ListEmailIdentities.go index e43a41877ff..93e748be649 100644 --- a/service/sesv2/api_op_ListEmailIdentities.go +++ b/service/sesv2/api_op_ListEmailIdentities.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListEmailIdentitiesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEmailIdentities(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListEmailIdentitiesMiddlewares(stack *middleware.St return nil } -// ListEmailIdentitiesAPIClient is a client that implements the -// ListEmailIdentities operation. -type ListEmailIdentitiesAPIClient interface { - ListEmailIdentities(context.Context, *ListEmailIdentitiesInput, ...func(*Options)) (*ListEmailIdentitiesOutput, error) -} - -var _ ListEmailIdentitiesAPIClient = (*Client)(nil) - // ListEmailIdentitiesPaginatorOptions is the paginator options for // ListEmailIdentities type ListEmailIdentitiesPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListEmailIdentitiesPaginator) NextPage(ctx context.Context, optFns ...f } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEmailIdentities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListEmailIdentitiesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListEmailIdentitiesAPIClient is a client that implements the +// ListEmailIdentities operation. +type ListEmailIdentitiesAPIClient interface { + ListEmailIdentities(context.Context, *ListEmailIdentitiesInput, ...func(*Options)) (*ListEmailIdentitiesOutput, error) +} + +var _ ListEmailIdentitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEmailIdentities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListEmailTemplates.go b/service/sesv2/api_op_ListEmailTemplates.go index 241e4572bd3..ce64980ca45 100644 --- a/service/sesv2/api_op_ListEmailTemplates.go +++ b/service/sesv2/api_op_ListEmailTemplates.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListEmailTemplatesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEmailTemplates(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListEmailTemplatesMiddlewares(stack *middleware.Sta return nil } -// ListEmailTemplatesAPIClient is a client that implements the ListEmailTemplates -// operation. -type ListEmailTemplatesAPIClient interface { - ListEmailTemplates(context.Context, *ListEmailTemplatesInput, ...func(*Options)) (*ListEmailTemplatesOutput, error) -} - -var _ ListEmailTemplatesAPIClient = (*Client)(nil) - // ListEmailTemplatesPaginatorOptions is the paginator options for // ListEmailTemplates type ListEmailTemplatesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListEmailTemplatesPaginator) NextPage(ctx context.Context, optFns ...fu } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEmailTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListEmailTemplatesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListEmailTemplatesAPIClient is a client that implements the ListEmailTemplates +// operation. +type ListEmailTemplatesAPIClient interface { + ListEmailTemplates(context.Context, *ListEmailTemplatesInput, ...func(*Options)) (*ListEmailTemplatesOutput, error) +} + +var _ ListEmailTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEmailTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListExportJobs.go b/service/sesv2/api_op_ListExportJobs.go index 922ad60ca72..c1dbef37440 100644 --- a/service/sesv2/api_op_ListExportJobs.go +++ b/service/sesv2/api_op_ListExportJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListExportJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExportJobs(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListExportJobsMiddlewares(stack *middleware.Stack, return nil } -// ListExportJobsAPIClient is a client that implements the ListExportJobs -// operation. -type ListExportJobsAPIClient interface { - ListExportJobs(context.Context, *ListExportJobsInput, ...func(*Options)) (*ListExportJobsOutput, error) -} - -var _ ListExportJobsAPIClient = (*Client)(nil) - // ListExportJobsPaginatorOptions is the paginator options for ListExportJobs type ListExportJobsPaginatorOptions struct { // Maximum number of export jobs to return at once. Use this parameter to paginate @@ -220,6 +215,9 @@ func (p *ListExportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListExportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExportJobsAPIClient is a client that implements the ListExportJobs +// operation. +type ListExportJobsAPIClient interface { + ListExportJobs(context.Context, *ListExportJobsInput, ...func(*Options)) (*ListExportJobsOutput, error) +} + +var _ ListExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListImportJobs.go b/service/sesv2/api_op_ListImportJobs.go index ea9a6d7b73a..44a8cf8440e 100644 --- a/service/sesv2/api_op_ListImportJobs.go +++ b/service/sesv2/api_op_ListImportJobs.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListImportJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImportJobs(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListImportJobsMiddlewares(stack *middleware.Stack, return nil } -// ListImportJobsAPIClient is a client that implements the ListImportJobs -// operation. -type ListImportJobsAPIClient interface { - ListImportJobs(context.Context, *ListImportJobsInput, ...func(*Options)) (*ListImportJobsOutput, error) -} - -var _ ListImportJobsAPIClient = (*Client)(nil) - // ListImportJobsPaginatorOptions is the paginator options for ListImportJobs type ListImportJobsPaginatorOptions struct { // Maximum number of import jobs to return at once. Use this parameter to paginate @@ -220,6 +215,9 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListImportJobsAPIClient is a client that implements the ListImportJobs +// operation. +type ListImportJobsAPIClient interface { + ListImportJobs(context.Context, *ListImportJobsInput, ...func(*Options)) (*ListImportJobsOutput, error) +} + +var _ ListImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListRecommendations.go b/service/sesv2/api_op_ListRecommendations.go index b178f6d33be..f0e36e934dd 100644 --- a/service/sesv2/api_op_ListRecommendations.go +++ b/service/sesv2/api_op_ListRecommendations.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommendations(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St return nil } -// ListRecommendationsAPIClient is a client that implements the -// ListRecommendations operation. -type ListRecommendationsAPIClient interface { - ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) -} - -var _ ListRecommendationsAPIClient = (*Client)(nil) - // ListRecommendationsPaginatorOptions is the paginator options for // ListRecommendations type ListRecommendationsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRecommendationsAPIClient is a client that implements the +// ListRecommendations operation. +type ListRecommendationsAPIClient interface { + ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) +} + +var _ ListRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListSuppressedDestinations.go b/service/sesv2/api_op_ListSuppressedDestinations.go index e529f4cf53c..f4ee75ec147 100644 --- a/service/sesv2/api_op_ListSuppressedDestinations.go +++ b/service/sesv2/api_op_ListSuppressedDestinations.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListSuppressedDestinationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSuppressedDestinations(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListSuppressedDestinationsMiddlewares(stack *middle return nil } -// ListSuppressedDestinationsAPIClient is a client that implements the -// ListSuppressedDestinations operation. -type ListSuppressedDestinationsAPIClient interface { - ListSuppressedDestinations(context.Context, *ListSuppressedDestinationsInput, ...func(*Options)) (*ListSuppressedDestinationsOutput, error) -} - -var _ ListSuppressedDestinationsAPIClient = (*Client)(nil) - // ListSuppressedDestinationsPaginatorOptions is the paginator options for // ListSuppressedDestinations type ListSuppressedDestinationsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListSuppressedDestinationsPaginator) NextPage(ctx context.Context, optF } params.PageSize = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSuppressedDestinations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListSuppressedDestinationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSuppressedDestinationsAPIClient is a client that implements the +// ListSuppressedDestinations operation. +type ListSuppressedDestinationsAPIClient interface { + ListSuppressedDestinations(context.Context, *ListSuppressedDestinationsInput, ...func(*Options)) (*ListSuppressedDestinationsOutput, error) +} + +var _ ListSuppressedDestinationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSuppressedDestinations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sesv2/api_op_ListTagsForResource.go b/service/sesv2/api_op_ListTagsForResource.go index 6b1e011d335..5b8b3372a85 100644 --- a/service/sesv2/api_op_ListTagsForResource.go +++ b/service/sesv2/api_op_ListTagsForResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutAccountDedicatedIpWarmupAttributes.go b/service/sesv2/api_op_PutAccountDedicatedIpWarmupAttributes.go index dac30c0522e..21255123962 100644 --- a/service/sesv2/api_op_PutAccountDedicatedIpWarmupAttributes.go +++ b/service/sesv2/api_op_PutAccountDedicatedIpWarmupAttributes.go @@ -105,6 +105,9 @@ func (c *Client) addOperationPutAccountDedicatedIpWarmupAttributesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountDedicatedIpWarmupAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sesv2/api_op_PutAccountDetails.go b/service/sesv2/api_op_PutAccountDetails.go index dc76422dec7..04a5de013ef 100644 --- a/service/sesv2/api_op_PutAccountDetails.go +++ b/service/sesv2/api_op_PutAccountDetails.go @@ -135,6 +135,9 @@ func (c *Client) addOperationPutAccountDetailsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutAccountSendingAttributes.go b/service/sesv2/api_op_PutAccountSendingAttributes.go index bbcc2665b93..afbb3050382 100644 --- a/service/sesv2/api_op_PutAccountSendingAttributes.go +++ b/service/sesv2/api_op_PutAccountSendingAttributes.go @@ -106,6 +106,9 @@ func (c *Client) addOperationPutAccountSendingAttributesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountSendingAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sesv2/api_op_PutAccountSuppressionAttributes.go b/service/sesv2/api_op_PutAccountSuppressionAttributes.go index ff99f949dde..209247b07b9 100644 --- a/service/sesv2/api_op_PutAccountSuppressionAttributes.go +++ b/service/sesv2/api_op_PutAccountSuppressionAttributes.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutAccountSuppressionAttributesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountSuppressionAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sesv2/api_op_PutAccountVdmAttributes.go b/service/sesv2/api_op_PutAccountVdmAttributes.go index ecf0e1c96e9..44a6bd7423a 100644 --- a/service/sesv2/api_op_PutAccountVdmAttributes.go +++ b/service/sesv2/api_op_PutAccountVdmAttributes.go @@ -105,6 +105,9 @@ func (c *Client) addOperationPutAccountVdmAttributesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountVdmAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutConfigurationSetDeliveryOptions.go b/service/sesv2/api_op_PutConfigurationSetDeliveryOptions.go index acccec7b55d..196b0fd927c 100644 --- a/service/sesv2/api_op_PutConfigurationSetDeliveryOptions.go +++ b/service/sesv2/api_op_PutConfigurationSetDeliveryOptions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutConfigurationSetDeliveryOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetDeliveryOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutConfigurationSetReputationOptions.go b/service/sesv2/api_op_PutConfigurationSetReputationOptions.go index 5b9d1970aa1..4cf85da9f21 100644 --- a/service/sesv2/api_op_PutConfigurationSetReputationOptions.go +++ b/service/sesv2/api_op_PutConfigurationSetReputationOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutConfigurationSetReputationOptionsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetReputationOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutConfigurationSetSendingOptions.go b/service/sesv2/api_op_PutConfigurationSetSendingOptions.go index c12b10b286d..25260673b64 100644 --- a/service/sesv2/api_op_PutConfigurationSetSendingOptions.go +++ b/service/sesv2/api_op_PutConfigurationSetSendingOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutConfigurationSetSendingOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetSendingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutConfigurationSetSuppressionOptions.go b/service/sesv2/api_op_PutConfigurationSetSuppressionOptions.go index 1ac656b133f..4ac30e252ba 100644 --- a/service/sesv2/api_op_PutConfigurationSetSuppressionOptions.go +++ b/service/sesv2/api_op_PutConfigurationSetSuppressionOptions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutConfigurationSetSuppressionOptionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetSuppressionOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutConfigurationSetTrackingOptions.go b/service/sesv2/api_op_PutConfigurationSetTrackingOptions.go index 224f5c99ad9..d7bdbc74653 100644 --- a/service/sesv2/api_op_PutConfigurationSetTrackingOptions.go +++ b/service/sesv2/api_op_PutConfigurationSetTrackingOptions.go @@ -109,6 +109,9 @@ func (c *Client) addOperationPutConfigurationSetTrackingOptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetTrackingOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutConfigurationSetVdmOptions.go b/service/sesv2/api_op_PutConfigurationSetVdmOptions.go index ce27b5466e7..fac879963db 100644 --- a/service/sesv2/api_op_PutConfigurationSetVdmOptions.go +++ b/service/sesv2/api_op_PutConfigurationSetVdmOptions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutConfigurationSetVdmOptionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutConfigurationSetVdmOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutDedicatedIpInPool.go b/service/sesv2/api_op_PutDedicatedIpInPool.go index 28be588be20..057ebb01093 100644 --- a/service/sesv2/api_op_PutDedicatedIpInPool.go +++ b/service/sesv2/api_op_PutDedicatedIpInPool.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutDedicatedIpInPoolMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDedicatedIpInPoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutDedicatedIpPoolScalingAttributes.go b/service/sesv2/api_op_PutDedicatedIpPoolScalingAttributes.go index 8cc7805212a..be7b99c4b47 100644 --- a/service/sesv2/api_op_PutDedicatedIpPoolScalingAttributes.go +++ b/service/sesv2/api_op_PutDedicatedIpPoolScalingAttributes.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutDedicatedIpPoolScalingAttributesMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDedicatedIpPoolScalingAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go b/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go index 67fd641af3f..549022b1804 100644 --- a/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go +++ b/service/sesv2/api_op_PutDedicatedIpWarmupAttributes.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutDedicatedIpWarmupAttributesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDedicatedIpWarmupAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutDeliverabilityDashboardOption.go b/service/sesv2/api_op_PutDeliverabilityDashboardOption.go index 933c1fbf645..e4dc97aea6e 100644 --- a/service/sesv2/api_op_PutDeliverabilityDashboardOption.go +++ b/service/sesv2/api_op_PutDeliverabilityDashboardOption.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutDeliverabilityDashboardOptionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDeliverabilityDashboardOptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutEmailIdentityConfigurationSetAttributes.go b/service/sesv2/api_op_PutEmailIdentityConfigurationSetAttributes.go index 05f4f797035..f8f69058060 100644 --- a/service/sesv2/api_op_PutEmailIdentityConfigurationSetAttributes.go +++ b/service/sesv2/api_op_PutEmailIdentityConfigurationSetAttributes.go @@ -107,6 +107,9 @@ func (c *Client) addOperationPutEmailIdentityConfigurationSetAttributesMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityConfigurationSetAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutEmailIdentityDkimAttributes.go b/service/sesv2/api_op_PutEmailIdentityDkimAttributes.go index 2e90c774356..2c1ec562f79 100644 --- a/service/sesv2/api_op_PutEmailIdentityDkimAttributes.go +++ b/service/sesv2/api_op_PutEmailIdentityDkimAttributes.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutEmailIdentityDkimAttributesMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityDkimAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutEmailIdentityDkimSigningAttributes.go b/service/sesv2/api_op_PutEmailIdentityDkimSigningAttributes.go index 23b9e706577..546565548d6 100644 --- a/service/sesv2/api_op_PutEmailIdentityDkimSigningAttributes.go +++ b/service/sesv2/api_op_PutEmailIdentityDkimSigningAttributes.go @@ -187,6 +187,9 @@ func (c *Client) addOperationPutEmailIdentityDkimSigningAttributesMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityDkimSigningAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutEmailIdentityFeedbackAttributes.go b/service/sesv2/api_op_PutEmailIdentityFeedbackAttributes.go index a9b19002148..696b33d8455 100644 --- a/service/sesv2/api_op_PutEmailIdentityFeedbackAttributes.go +++ b/service/sesv2/api_op_PutEmailIdentityFeedbackAttributes.go @@ -128,6 +128,9 @@ func (c *Client) addOperationPutEmailIdentityFeedbackAttributesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityFeedbackAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutEmailIdentityMailFromAttributes.go b/service/sesv2/api_op_PutEmailIdentityMailFromAttributes.go index 02f07c013e2..a78f8029108 100644 --- a/service/sesv2/api_op_PutEmailIdentityMailFromAttributes.go +++ b/service/sesv2/api_op_PutEmailIdentityMailFromAttributes.go @@ -127,6 +127,9 @@ func (c *Client) addOperationPutEmailIdentityMailFromAttributesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailIdentityMailFromAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_PutSuppressedDestination.go b/service/sesv2/api_op_PutSuppressedDestination.go index 316cfb748f5..f8ed95edbcd 100644 --- a/service/sesv2/api_op_PutSuppressedDestination.go +++ b/service/sesv2/api_op_PutSuppressedDestination.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutSuppressedDestinationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSuppressedDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_SendBulkEmail.go b/service/sesv2/api_op_SendBulkEmail.go index 5e76dbe9935..b188203c42c 100644 --- a/service/sesv2/api_op_SendBulkEmail.go +++ b/service/sesv2/api_op_SendBulkEmail.go @@ -172,6 +172,9 @@ func (c *Client) addOperationSendBulkEmailMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendBulkEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_SendCustomVerificationEmail.go b/service/sesv2/api_op_SendCustomVerificationEmail.go index 06e30c54cab..9969957345c 100644 --- a/service/sesv2/api_op_SendCustomVerificationEmail.go +++ b/service/sesv2/api_op_SendCustomVerificationEmail.go @@ -129,6 +129,9 @@ func (c *Client) addOperationSendCustomVerificationEmailMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendCustomVerificationEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_SendEmail.go b/service/sesv2/api_op_SendEmail.go index 26ede9a5e05..5bfe21d9f1a 100644 --- a/service/sesv2/api_op_SendEmail.go +++ b/service/sesv2/api_op_SendEmail.go @@ -195,6 +195,9 @@ func (c *Client) addOperationSendEmailMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendEmailValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_TagResource.go b/service/sesv2/api_op_TagResource.go index 3ab77915932..92d02d64e4e 100644 --- a/service/sesv2/api_op_TagResource.go +++ b/service/sesv2/api_op_TagResource.go @@ -118,6 +118,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_TestRenderEmailTemplate.go b/service/sesv2/api_op_TestRenderEmailTemplate.go index ebe18698760..dc3060607dd 100644 --- a/service/sesv2/api_op_TestRenderEmailTemplate.go +++ b/service/sesv2/api_op_TestRenderEmailTemplate.go @@ -121,6 +121,9 @@ func (c *Client) addOperationTestRenderEmailTemplateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestRenderEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UntagResource.go b/service/sesv2/api_op_UntagResource.go index 3f18cdf63e3..ebb03e4eb85 100644 --- a/service/sesv2/api_op_UntagResource.go +++ b/service/sesv2/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UpdateConfigurationSetEventDestination.go b/service/sesv2/api_op_UpdateConfigurationSetEventDestination.go index 081301d7319..86fc5430d51 100644 --- a/service/sesv2/api_op_UpdateConfigurationSetEventDestination.go +++ b/service/sesv2/api_op_UpdateConfigurationSetEventDestination.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateConfigurationSetEventDestinationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConfigurationSetEventDestinationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UpdateContact.go b/service/sesv2/api_op_UpdateContact.go index bab202d7dc8..47b93fcab60 100644 --- a/service/sesv2/api_op_UpdateContact.go +++ b/service/sesv2/api_op_UpdateContact.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UpdateContactList.go b/service/sesv2/api_op_UpdateContactList.go index 4d689e5a688..53dd50bedca 100644 --- a/service/sesv2/api_op_UpdateContactList.go +++ b/service/sesv2/api_op_UpdateContactList.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateContactListMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactListValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UpdateCustomVerificationEmailTemplate.go b/service/sesv2/api_op_UpdateCustomVerificationEmailTemplate.go index 814435a6ec6..2052c4dfb42 100644 --- a/service/sesv2/api_op_UpdateCustomVerificationEmailTemplate.go +++ b/service/sesv2/api_op_UpdateCustomVerificationEmailTemplate.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdateCustomVerificationEmailTemplateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCustomVerificationEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UpdateEmailIdentityPolicy.go b/service/sesv2/api_op_UpdateEmailIdentityPolicy.go index 1353711d9a9..c12d0f706d4 100644 --- a/service/sesv2/api_op_UpdateEmailIdentityPolicy.go +++ b/service/sesv2/api_op_UpdateEmailIdentityPolicy.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateEmailIdentityPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEmailIdentityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sesv2/api_op_UpdateEmailTemplate.go b/service/sesv2/api_op_UpdateEmailTemplate.go index 7f680cffd10..dd23b528d95 100644 --- a/service/sesv2/api_op_UpdateEmailTemplate.go +++ b/service/sesv2/api_op_UpdateEmailTemplate.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateEmailTemplateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEmailTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_client.go b/service/sfn/api_client.go index 937c9b2dc4d..a9262f70be9 100644 --- a/service/sfn/api_client.go +++ b/service/sfn/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/sfn/api_op_CreateActivity.go b/service/sfn/api_op_CreateActivity.go index 0cb25118d5a..a0a15561b13 100644 --- a/service/sfn/api_op_CreateActivity.go +++ b/service/sfn/api_op_CreateActivity.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateActivityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateActivityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_CreateStateMachine.go b/service/sfn/api_op_CreateStateMachine.go index 970059d5d19..fbb30064508 100644 --- a/service/sfn/api_op_CreateStateMachine.go +++ b/service/sfn/api_op_CreateStateMachine.go @@ -205,6 +205,9 @@ func (c *Client) addOperationCreateStateMachineMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStateMachineValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_CreateStateMachineAlias.go b/service/sfn/api_op_CreateStateMachineAlias.go index 2f3537aa0c2..cb1b7fa1ec9 100644 --- a/service/sfn/api_op_CreateStateMachineAlias.go +++ b/service/sfn/api_op_CreateStateMachineAlias.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateStateMachineAliasMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStateMachineAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DeleteActivity.go b/service/sfn/api_op_DeleteActivity.go index 46553ab8c2e..c592828d102 100644 --- a/service/sfn/api_op_DeleteActivity.go +++ b/service/sfn/api_op_DeleteActivity.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteActivityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteActivityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DeleteStateMachine.go b/service/sfn/api_op_DeleteStateMachine.go index 07d8f7cd7f0..3af23bf2a01 100644 --- a/service/sfn/api_op_DeleteStateMachine.go +++ b/service/sfn/api_op_DeleteStateMachine.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDeleteStateMachineMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStateMachineValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DeleteStateMachineAlias.go b/service/sfn/api_op_DeleteStateMachineAlias.go index 16fe0982949..7e250fdabec 100644 --- a/service/sfn/api_op_DeleteStateMachineAlias.go +++ b/service/sfn/api_op_DeleteStateMachineAlias.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteStateMachineAliasMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStateMachineAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DeleteStateMachineVersion.go b/service/sfn/api_op_DeleteStateMachineVersion.go index eb5284c6648..1108bedeeac 100644 --- a/service/sfn/api_op_DeleteStateMachineVersion.go +++ b/service/sfn/api_op_DeleteStateMachineVersion.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteStateMachineVersionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteStateMachineVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DescribeActivity.go b/service/sfn/api_op_DescribeActivity.go index 121ac679a99..2cd2bed0ef8 100644 --- a/service/sfn/api_op_DescribeActivity.go +++ b/service/sfn/api_op_DescribeActivity.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeActivityMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeActivityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DescribeExecution.go b/service/sfn/api_op_DescribeExecution.go index 151f72eafd3..d150f4c2fba 100644 --- a/service/sfn/api_op_DescribeExecution.go +++ b/service/sfn/api_op_DescribeExecution.go @@ -267,6 +267,9 @@ func (c *Client) addOperationDescribeExecutionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DescribeMapRun.go b/service/sfn/api_op_DescribeMapRun.go index c6f5c5051ab..d3fb2315721 100644 --- a/service/sfn/api_op_DescribeMapRun.go +++ b/service/sfn/api_op_DescribeMapRun.go @@ -173,6 +173,9 @@ func (c *Client) addOperationDescribeMapRunMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMapRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DescribeStateMachine.go b/service/sfn/api_op_DescribeStateMachine.go index 19fd196e4c2..73000160f43 100644 --- a/service/sfn/api_op_DescribeStateMachine.go +++ b/service/sfn/api_op_DescribeStateMachine.go @@ -222,6 +222,9 @@ func (c *Client) addOperationDescribeStateMachineMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStateMachineValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DescribeStateMachineAlias.go b/service/sfn/api_op_DescribeStateMachineAlias.go index 3f3c98bd43e..b1649776416 100644 --- a/service/sfn/api_op_DescribeStateMachineAlias.go +++ b/service/sfn/api_op_DescribeStateMachineAlias.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeStateMachineAliasMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStateMachineAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_DescribeStateMachineForExecution.go b/service/sfn/api_op_DescribeStateMachineForExecution.go index 036bbdaffe1..005dd1f201c 100644 --- a/service/sfn/api_op_DescribeStateMachineForExecution.go +++ b/service/sfn/api_op_DescribeStateMachineForExecution.go @@ -167,6 +167,9 @@ func (c *Client) addOperationDescribeStateMachineForExecutionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStateMachineForExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_GetActivityTask.go b/service/sfn/api_op_GetActivityTask.go index 3b7af1126c7..3e9ac1862dd 100644 --- a/service/sfn/api_op_GetActivityTask.go +++ b/service/sfn/api_op_GetActivityTask.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetActivityTaskMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetActivityTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_GetExecutionHistory.go b/service/sfn/api_op_GetExecutionHistory.go index 2d742fef667..db970eba4be 100644 --- a/service/sfn/api_op_GetExecutionHistory.go +++ b/service/sfn/api_op_GetExecutionHistory.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetExecutionHistoryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExecutionHistoryValidationMiddleware(stack); err != nil { return err } @@ -171,14 +174,6 @@ func (c *Client) addOperationGetExecutionHistoryMiddlewares(stack *middleware.St return nil } -// GetExecutionHistoryAPIClient is a client that implements the -// GetExecutionHistory operation. -type GetExecutionHistoryAPIClient interface { - GetExecutionHistory(context.Context, *GetExecutionHistoryInput, ...func(*Options)) (*GetExecutionHistoryOutput, error) -} - -var _ GetExecutionHistoryAPIClient = (*Client)(nil) - // GetExecutionHistoryPaginatorOptions is the paginator options for // GetExecutionHistory type GetExecutionHistoryPaginatorOptions struct { @@ -244,6 +239,9 @@ func (p *GetExecutionHistoryPaginator) NextPage(ctx context.Context, optFns ...f params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetExecutionHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -263,6 +261,14 @@ func (p *GetExecutionHistoryPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetExecutionHistoryAPIClient is a client that implements the +// GetExecutionHistory operation. +type GetExecutionHistoryAPIClient interface { + GetExecutionHistory(context.Context, *GetExecutionHistoryInput, ...func(*Options)) (*GetExecutionHistoryOutput, error) +} + +var _ GetExecutionHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetExecutionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sfn/api_op_ListActivities.go b/service/sfn/api_op_ListActivities.go index 0e87da7ddb0..6b6237827cd 100644 --- a/service/sfn/api_op_ListActivities.go +++ b/service/sfn/api_op_ListActivities.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListActivitiesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActivities(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListActivitiesMiddlewares(stack *middleware.Stack, return nil } -// ListActivitiesAPIClient is a client that implements the ListActivities -// operation. -type ListActivitiesAPIClient interface { - ListActivities(context.Context, *ListActivitiesInput, ...func(*Options)) (*ListActivitiesOutput, error) -} - -var _ ListActivitiesAPIClient = (*Client)(nil) - // ListActivitiesPaginatorOptions is the paginator options for ListActivities type ListActivitiesPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -227,6 +222,9 @@ func (p *ListActivitiesPaginator) NextPage(ctx context.Context, optFns ...func(* params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActivities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListActivitiesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListActivitiesAPIClient is a client that implements the ListActivities +// operation. +type ListActivitiesAPIClient interface { + ListActivities(context.Context, *ListActivitiesInput, ...func(*Options)) (*ListActivitiesOutput, error) +} + +var _ ListActivitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActivities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sfn/api_op_ListExecutions.go b/service/sfn/api_op_ListExecutions.go index 69c13c97f13..54f1c17d2aa 100644 --- a/service/sfn/api_op_ListExecutions.go +++ b/service/sfn/api_op_ListExecutions.go @@ -186,6 +186,9 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExecutions(options.Region), middleware.Before); err != nil { return err } @@ -207,14 +210,6 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, return nil } -// ListExecutionsAPIClient is a client that implements the ListExecutions -// operation. -type ListExecutionsAPIClient interface { - ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) -} - -var _ ListExecutionsAPIClient = (*Client)(nil) - // ListExecutionsPaginatorOptions is the paginator options for ListExecutions type ListExecutionsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -279,6 +274,9 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -298,6 +296,14 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExecutionsAPIClient is a client that implements the ListExecutions +// operation. +type ListExecutionsAPIClient interface { + ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) +} + +var _ ListExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sfn/api_op_ListMapRuns.go b/service/sfn/api_op_ListMapRuns.go index 638a8ea7277..a69c51c8a8b 100644 --- a/service/sfn/api_op_ListMapRuns.go +++ b/service/sfn/api_op_ListMapRuns.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListMapRunsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMapRunsValidationMiddleware(stack); err != nil { return err } @@ -159,13 +162,6 @@ func (c *Client) addOperationListMapRunsMiddlewares(stack *middleware.Stack, opt return nil } -// ListMapRunsAPIClient is a client that implements the ListMapRuns operation. -type ListMapRunsAPIClient interface { - ListMapRuns(context.Context, *ListMapRunsInput, ...func(*Options)) (*ListMapRunsOutput, error) -} - -var _ ListMapRunsAPIClient = (*Client)(nil) - // ListMapRunsPaginatorOptions is the paginator options for ListMapRuns type ListMapRunsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -230,6 +226,9 @@ func (p *ListMapRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMapRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +248,13 @@ func (p *ListMapRunsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListMapRunsAPIClient is a client that implements the ListMapRuns operation. +type ListMapRunsAPIClient interface { + ListMapRuns(context.Context, *ListMapRunsInput, ...func(*Options)) (*ListMapRunsOutput, error) +} + +var _ ListMapRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMapRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sfn/api_op_ListStateMachineAliases.go b/service/sfn/api_op_ListStateMachineAliases.go index e2a5ab89733..08f2f849ca3 100644 --- a/service/sfn/api_op_ListStateMachineAliases.go +++ b/service/sfn/api_op_ListStateMachineAliases.go @@ -157,6 +157,9 @@ func (c *Client) addOperationListStateMachineAliasesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStateMachineAliasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_ListStateMachineVersions.go b/service/sfn/api_op_ListStateMachineVersions.go index 1265da564f5..b705dfa6030 100644 --- a/service/sfn/api_op_ListStateMachineVersions.go +++ b/service/sfn/api_op_ListStateMachineVersions.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListStateMachineVersionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListStateMachineVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_ListStateMachines.go b/service/sfn/api_op_ListStateMachines.go index aef3dc3f291..17a1acadad3 100644 --- a/service/sfn/api_op_ListStateMachines.go +++ b/service/sfn/api_op_ListStateMachines.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListStateMachinesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStateMachines(options.Region), middleware.Before); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListStateMachinesMiddlewares(stack *middleware.Stac return nil } -// ListStateMachinesAPIClient is a client that implements the ListStateMachines -// operation. -type ListStateMachinesAPIClient interface { - ListStateMachines(context.Context, *ListStateMachinesInput, ...func(*Options)) (*ListStateMachinesOutput, error) -} - -var _ ListStateMachinesAPIClient = (*Client)(nil) - // ListStateMachinesPaginatorOptions is the paginator options for ListStateMachines type ListStateMachinesPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -225,6 +220,9 @@ func (p *ListStateMachinesPaginator) NextPage(ctx context.Context, optFns ...fun params.MaxResults = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListStateMachines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListStateMachinesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListStateMachinesAPIClient is a client that implements the ListStateMachines +// operation. +type ListStateMachinesAPIClient interface { + ListStateMachines(context.Context, *ListStateMachinesInput, ...func(*Options)) (*ListStateMachinesOutput, error) +} + +var _ ListStateMachinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListStateMachines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sfn/api_op_ListTagsForResource.go b/service/sfn/api_op_ListTagsForResource.go index 999377a0815..baad801db29 100644 --- a/service/sfn/api_op_ListTagsForResource.go +++ b/service/sfn/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_PublishStateMachineVersion.go b/service/sfn/api_op_PublishStateMachineVersion.go index ad99540d38e..e7169cd0de5 100644 --- a/service/sfn/api_op_PublishStateMachineVersion.go +++ b/service/sfn/api_op_PublishStateMachineVersion.go @@ -150,6 +150,9 @@ func (c *Client) addOperationPublishStateMachineVersionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishStateMachineVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_RedriveExecution.go b/service/sfn/api_op_RedriveExecution.go index bd2e0cade84..d0ecfa8eb4d 100644 --- a/service/sfn/api_op_RedriveExecution.go +++ b/service/sfn/api_op_RedriveExecution.go @@ -163,6 +163,9 @@ func (c *Client) addOperationRedriveExecutionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRedriveExecutionMiddleware(stack, options); err != nil { return err } diff --git a/service/sfn/api_op_SendTaskFailure.go b/service/sfn/api_op_SendTaskFailure.go index 092077508e4..34b21184f76 100644 --- a/service/sfn/api_op_SendTaskFailure.go +++ b/service/sfn/api_op_SendTaskFailure.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSendTaskFailureMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendTaskFailureValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_SendTaskHeartbeat.go b/service/sfn/api_op_SendTaskHeartbeat.go index 9b1396fe604..61eaaa6e3f6 100644 --- a/service/sfn/api_op_SendTaskHeartbeat.go +++ b/service/sfn/api_op_SendTaskHeartbeat.go @@ -120,6 +120,9 @@ func (c *Client) addOperationSendTaskHeartbeatMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendTaskHeartbeatValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_SendTaskSuccess.go b/service/sfn/api_op_SendTaskSuccess.go index 7f6492c985e..a07d6a38e6e 100644 --- a/service/sfn/api_op_SendTaskSuccess.go +++ b/service/sfn/api_op_SendTaskSuccess.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSendTaskSuccessMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendTaskSuccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_StartExecution.go b/service/sfn/api_op_StartExecution.go index 8d67e87e90b..d80975a2e6e 100644 --- a/service/sfn/api_op_StartExecution.go +++ b/service/sfn/api_op_StartExecution.go @@ -227,6 +227,9 @@ func (c *Client) addOperationStartExecutionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_StartSyncExecution.go b/service/sfn/api_op_StartSyncExecution.go index 4b24bd7bb61..e659fe69dfb 100644 --- a/service/sfn/api_op_StartSyncExecution.go +++ b/service/sfn/api_op_StartSyncExecution.go @@ -188,6 +188,9 @@ func (c *Client) addOperationStartSyncExecutionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opStartSyncExecutionMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_StopExecution.go b/service/sfn/api_op_StopExecution.go index c3d6e2c1832..61ccda25b85 100644 --- a/service/sfn/api_op_StopExecution.go +++ b/service/sfn/api_op_StopExecution.go @@ -116,6 +116,9 @@ func (c *Client) addOperationStopExecutionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_TagResource.go b/service/sfn/api_op_TagResource.go index accf92dda87..2e5e67fa519 100644 --- a/service/sfn/api_op_TagResource.go +++ b/service/sfn/api_op_TagResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_TestState.go b/service/sfn/api_op_TestState.go index 02f7adae993..1be03176c28 100644 --- a/service/sfn/api_op_TestState.go +++ b/service/sfn/api_op_TestState.go @@ -220,6 +220,9 @@ func (c *Client) addOperationTestStateMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTestStateMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_UntagResource.go b/service/sfn/api_op_UntagResource.go index 112243388c1..9316d23f154 100644 --- a/service/sfn/api_op_UntagResource.go +++ b/service/sfn/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_UpdateMapRun.go b/service/sfn/api_op_UpdateMapRun.go index deeeb0d9370..66fe2a0debc 100644 --- a/service/sfn/api_op_UpdateMapRun.go +++ b/service/sfn/api_op_UpdateMapRun.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateMapRunMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMapRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_UpdateStateMachine.go b/service/sfn/api_op_UpdateStateMachine.go index 31a7f785eeb..6d5f57cf382 100644 --- a/service/sfn/api_op_UpdateStateMachine.go +++ b/service/sfn/api_op_UpdateStateMachine.go @@ -190,6 +190,9 @@ func (c *Client) addOperationUpdateStateMachineMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStateMachineValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_UpdateStateMachineAlias.go b/service/sfn/api_op_UpdateStateMachineAlias.go index 2e70ed22bcf..a23d55c8501 100644 --- a/service/sfn/api_op_UpdateStateMachineAlias.go +++ b/service/sfn/api_op_UpdateStateMachineAlias.go @@ -143,6 +143,9 @@ func (c *Client) addOperationUpdateStateMachineAliasMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateStateMachineAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/sfn/api_op_ValidateStateMachineDefinition.go b/service/sfn/api_op_ValidateStateMachineDefinition.go index 50dda6d93ed..1c258fe5506 100644 --- a/service/sfn/api_op_ValidateStateMachineDefinition.go +++ b/service/sfn/api_op_ValidateStateMachineDefinition.go @@ -140,6 +140,9 @@ func (c *Client) addOperationValidateStateMachineDefinitionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateStateMachineDefinitionValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_client.go b/service/shield/api_client.go index a868be812b1..b918a34c562 100644 --- a/service/shield/api_client.go +++ b/service/shield/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/shield/api_op_AssociateDRTLogBucket.go b/service/shield/api_op_AssociateDRTLogBucket.go index 6261bb86c07..1db91aacd93 100644 --- a/service/shield/api_op_AssociateDRTLogBucket.go +++ b/service/shield/api_op_AssociateDRTLogBucket.go @@ -110,6 +110,9 @@ func (c *Client) addOperationAssociateDRTLogBucketMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDRTLogBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_AssociateDRTRole.go b/service/shield/api_op_AssociateDRTRole.go index a70292f4384..00a1baff196 100644 --- a/service/shield/api_op_AssociateDRTRole.go +++ b/service/shield/api_op_AssociateDRTRole.go @@ -139,6 +139,9 @@ func (c *Client) addOperationAssociateDRTRoleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDRTRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_AssociateHealthCheck.go b/service/shield/api_op_AssociateHealthCheck.go index 5a22cd00eea..9ee2fdd0453 100644 --- a/service/shield/api_op_AssociateHealthCheck.go +++ b/service/shield/api_op_AssociateHealthCheck.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateHealthCheckMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_AssociateProactiveEngagementDetails.go b/service/shield/api_op_AssociateProactiveEngagementDetails.go index 577c44f72b2..21dad9b11ec 100644 --- a/service/shield/api_op_AssociateProactiveEngagementDetails.go +++ b/service/shield/api_op_AssociateProactiveEngagementDetails.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateProactiveEngagementDetailsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateProactiveEngagementDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_CreateProtection.go b/service/shield/api_op_CreateProtection.go index bb6a80ae711..6ed16565ad7 100644 --- a/service/shield/api_op_CreateProtection.go +++ b/service/shield/api_op_CreateProtection.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateProtectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_CreateProtectionGroup.go b/service/shield/api_op_CreateProtectionGroup.go index 5b38497240e..159f13ca87a 100644 --- a/service/shield/api_op_CreateProtectionGroup.go +++ b/service/shield/api_op_CreateProtectionGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateProtectionGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProtectionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_CreateSubscription.go b/service/shield/api_op_CreateSubscription.go index 1892533bcd7..bc6b123ae2c 100644 --- a/service/shield/api_op_CreateSubscription.go +++ b/service/shield/api_op_CreateSubscription.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCreateSubscriptionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DeleteProtection.go b/service/shield/api_op_DeleteProtection.go index a241261a195..8bd43d0f74a 100644 --- a/service/shield/api_op_DeleteProtection.go +++ b/service/shield/api_op_DeleteProtection.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteProtectionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProtectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_DeleteProtectionGroup.go b/service/shield/api_op_DeleteProtectionGroup.go index e318f1f1bbc..6a9c7807066 100644 --- a/service/shield/api_op_DeleteProtectionGroup.go +++ b/service/shield/api_op_DeleteProtectionGroup.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteProtectionGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProtectionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_DeleteSubscription.go b/service/shield/api_op_DeleteSubscription.go index 73ec4e60ef1..5fd38e2b2a4 100644 --- a/service/shield/api_op_DeleteSubscription.go +++ b/service/shield/api_op_DeleteSubscription.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteSubscriptionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DescribeAttack.go b/service/shield/api_op_DescribeAttack.go index bfe02df4626..0cf1f418e75 100644 --- a/service/shield/api_op_DescribeAttack.go +++ b/service/shield/api_op_DescribeAttack.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeAttackMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAttackValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_DescribeAttackStatistics.go b/service/shield/api_op_DescribeAttackStatistics.go index 199c9c02c91..96fa5a55a05 100644 --- a/service/shield/api_op_DescribeAttackStatistics.go +++ b/service/shield/api_op_DescribeAttackStatistics.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAttackStatisticsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAttackStatistics(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DescribeDRTAccess.go b/service/shield/api_op_DescribeDRTAccess.go index 9fdd587de5d..b145101a757 100644 --- a/service/shield/api_op_DescribeDRTAccess.go +++ b/service/shield/api_op_DescribeDRTAccess.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeDRTAccessMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDRTAccess(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DescribeEmergencyContactSettings.go b/service/shield/api_op_DescribeEmergencyContactSettings.go index 88c14aea001..f0a88e6433a 100644 --- a/service/shield/api_op_DescribeEmergencyContactSettings.go +++ b/service/shield/api_op_DescribeEmergencyContactSettings.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDescribeEmergencyContactSettingsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEmergencyContactSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DescribeProtection.go b/service/shield/api_op_DescribeProtection.go index 7dd1bdb9224..ff5c6629f2f 100644 --- a/service/shield/api_op_DescribeProtection.go +++ b/service/shield/api_op_DescribeProtection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeProtectionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProtection(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DescribeProtectionGroup.go b/service/shield/api_op_DescribeProtectionGroup.go index 665d606b086..f771b0b57f1 100644 --- a/service/shield/api_op_DescribeProtectionGroup.go +++ b/service/shield/api_op_DescribeProtectionGroup.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeProtectionGroupMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProtectionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_DescribeSubscription.go b/service/shield/api_op_DescribeSubscription.go index bda02bb9257..5cb7f3c2e82 100644 --- a/service/shield/api_op_DescribeSubscription.go +++ b/service/shield/api_op_DescribeSubscription.go @@ -100,6 +100,9 @@ func (c *Client) addOperationDescribeSubscriptionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DisableApplicationLayerAutomaticResponse.go b/service/shield/api_op_DisableApplicationLayerAutomaticResponse.go index 54bd1a1b35b..e56499f2069 100644 --- a/service/shield/api_op_DisableApplicationLayerAutomaticResponse.go +++ b/service/shield/api_op_DisableApplicationLayerAutomaticResponse.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDisableApplicationLayerAutomaticResponseMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableApplicationLayerAutomaticResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_DisableProactiveEngagement.go b/service/shield/api_op_DisableProactiveEngagement.go index 17ec8ff8dc9..b789cc44cae 100644 --- a/service/shield/api_op_DisableProactiveEngagement.go +++ b/service/shield/api_op_DisableProactiveEngagement.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDisableProactiveEngagementMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableProactiveEngagement(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DisassociateDRTLogBucket.go b/service/shield/api_op_DisassociateDRTLogBucket.go index 5eb77955ff6..a4c42d1ddac 100644 --- a/service/shield/api_op_DisassociateDRTLogBucket.go +++ b/service/shield/api_op_DisassociateDRTLogBucket.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDisassociateDRTLogBucketMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDRTLogBucketValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_DisassociateDRTRole.go b/service/shield/api_op_DisassociateDRTRole.go index 95f2d7ae4df..aaece96f6ef 100644 --- a/service/shield/api_op_DisassociateDRTRole.go +++ b/service/shield/api_op_DisassociateDRTRole.go @@ -96,6 +96,9 @@ func (c *Client) addOperationDisassociateDRTRoleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateDRTRole(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_DisassociateHealthCheck.go b/service/shield/api_op_DisassociateHealthCheck.go index b51bfbeb655..a60227228fa 100644 --- a/service/shield/api_op_DisassociateHealthCheck.go +++ b/service/shield/api_op_DisassociateHealthCheck.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDisassociateHealthCheckMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateHealthCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_EnableApplicationLayerAutomaticResponse.go b/service/shield/api_op_EnableApplicationLayerAutomaticResponse.go index 0177a36311e..07977836a0a 100644 --- a/service/shield/api_op_EnableApplicationLayerAutomaticResponse.go +++ b/service/shield/api_op_EnableApplicationLayerAutomaticResponse.go @@ -137,6 +137,9 @@ func (c *Client) addOperationEnableApplicationLayerAutomaticResponseMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEnableApplicationLayerAutomaticResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_EnableProactiveEngagement.go b/service/shield/api_op_EnableProactiveEngagement.go index a8d4baea986..ccf62136120 100644 --- a/service/shield/api_op_EnableProactiveEngagement.go +++ b/service/shield/api_op_EnableProactiveEngagement.go @@ -97,6 +97,9 @@ func (c *Client) addOperationEnableProactiveEngagementMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableProactiveEngagement(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_GetSubscriptionState.go b/service/shield/api_op_GetSubscriptionState.go index 65015462d92..97cf070989f 100644 --- a/service/shield/api_op_GetSubscriptionState.go +++ b/service/shield/api_op_GetSubscriptionState.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetSubscriptionStateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSubscriptionState(options.Region), middleware.Before); err != nil { return err } diff --git a/service/shield/api_op_ListAttacks.go b/service/shield/api_op_ListAttacks.go index aa7e210e136..5e8c9a7acc9 100644 --- a/service/shield/api_op_ListAttacks.go +++ b/service/shield/api_op_ListAttacks.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListAttacksMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttacks(options.Region), middleware.Before); err != nil { return err } @@ -182,13 +185,6 @@ func (c *Client) addOperationListAttacksMiddlewares(stack *middleware.Stack, opt return nil } -// ListAttacksAPIClient is a client that implements the ListAttacks operation. -type ListAttacksAPIClient interface { - ListAttacks(context.Context, *ListAttacksInput, ...func(*Options)) (*ListAttacksOutput, error) -} - -var _ ListAttacksAPIClient = (*Client)(nil) - // ListAttacksPaginatorOptions is the paginator options for ListAttacks type ListAttacksPaginatorOptions struct { // The greatest number of objects that you want Shield Advanced to return to the @@ -258,6 +254,9 @@ func (p *ListAttacksPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAttacks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -277,6 +276,13 @@ func (p *ListAttacksPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAttacksAPIClient is a client that implements the ListAttacks operation. +type ListAttacksAPIClient interface { + ListAttacks(context.Context, *ListAttacksInput, ...func(*Options)) (*ListAttacksOutput, error) +} + +var _ ListAttacksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAttacks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/shield/api_op_ListProtectionGroups.go b/service/shield/api_op_ListProtectionGroups.go index 77c5c1e5ccd..ca7f5a4921c 100644 --- a/service/shield/api_op_ListProtectionGroups.go +++ b/service/shield/api_op_ListProtectionGroups.go @@ -154,6 +154,9 @@ func (c *Client) addOperationListProtectionGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProtectionGroups(options.Region), middleware.Before); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationListProtectionGroupsMiddlewares(stack *middleware.S return nil } -// ListProtectionGroupsAPIClient is a client that implements the -// ListProtectionGroups operation. -type ListProtectionGroupsAPIClient interface { - ListProtectionGroups(context.Context, *ListProtectionGroupsInput, ...func(*Options)) (*ListProtectionGroupsOutput, error) -} - -var _ ListProtectionGroupsAPIClient = (*Client)(nil) - // ListProtectionGroupsPaginatorOptions is the paginator options for // ListProtectionGroups type ListProtectionGroupsPaginatorOptions struct { @@ -253,6 +248,9 @@ func (p *ListProtectionGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProtectionGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +270,14 @@ func (p *ListProtectionGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListProtectionGroupsAPIClient is a client that implements the +// ListProtectionGroups operation. +type ListProtectionGroupsAPIClient interface { + ListProtectionGroups(context.Context, *ListProtectionGroupsInput, ...func(*Options)) (*ListProtectionGroupsOutput, error) +} + +var _ ListProtectionGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProtectionGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/shield/api_op_ListProtections.go b/service/shield/api_op_ListProtections.go index 06e946e5a1a..feac1acc8ed 100644 --- a/service/shield/api_op_ListProtections.go +++ b/service/shield/api_op_ListProtections.go @@ -152,6 +152,9 @@ func (c *Client) addOperationListProtectionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProtections(options.Region), middleware.Before); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationListProtectionsMiddlewares(stack *middleware.Stack, return nil } -// ListProtectionsAPIClient is a client that implements the ListProtections -// operation. -type ListProtectionsAPIClient interface { - ListProtections(context.Context, *ListProtectionsInput, ...func(*Options)) (*ListProtectionsOutput, error) -} - -var _ ListProtectionsAPIClient = (*Client)(nil) - // ListProtectionsPaginatorOptions is the paginator options for ListProtections type ListProtectionsPaginatorOptions struct { // The greatest number of objects that you want Shield Advanced to return to the @@ -250,6 +245,9 @@ func (p *ListProtectionsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProtections(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -269,6 +267,14 @@ func (p *ListProtectionsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListProtectionsAPIClient is a client that implements the ListProtections +// operation. +type ListProtectionsAPIClient interface { + ListProtections(context.Context, *ListProtectionsInput, ...func(*Options)) (*ListProtectionsOutput, error) +} + +var _ ListProtectionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProtections(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/shield/api_op_ListResourcesInProtectionGroup.go b/service/shield/api_op_ListResourcesInProtectionGroup.go index dfaf350461b..750ce7682f3 100644 --- a/service/shield/api_op_ListResourcesInProtectionGroup.go +++ b/service/shield/api_op_ListResourcesInProtectionGroup.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListResourcesInProtectionGroupMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesInProtectionGroupValidationMiddleware(stack); err != nil { return err } @@ -175,14 +178,6 @@ func (c *Client) addOperationListResourcesInProtectionGroupMiddlewares(stack *mi return nil } -// ListResourcesInProtectionGroupAPIClient is a client that implements the -// ListResourcesInProtectionGroup operation. -type ListResourcesInProtectionGroupAPIClient interface { - ListResourcesInProtectionGroup(context.Context, *ListResourcesInProtectionGroupInput, ...func(*Options)) (*ListResourcesInProtectionGroupOutput, error) -} - -var _ ListResourcesInProtectionGroupAPIClient = (*Client)(nil) - // ListResourcesInProtectionGroupPaginatorOptions is the paginator options for // ListResourcesInProtectionGroup type ListResourcesInProtectionGroupPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *ListResourcesInProtectionGroupPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourcesInProtectionGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *ListResourcesInProtectionGroupPaginator) NextPage(ctx context.Context, return result, nil } +// ListResourcesInProtectionGroupAPIClient is a client that implements the +// ListResourcesInProtectionGroup operation. +type ListResourcesInProtectionGroupAPIClient interface { + ListResourcesInProtectionGroup(context.Context, *ListResourcesInProtectionGroupInput, ...func(*Options)) (*ListResourcesInProtectionGroupOutput, error) +} + +var _ ListResourcesInProtectionGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourcesInProtectionGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/shield/api_op_ListTagsForResource.go b/service/shield/api_op_ListTagsForResource.go index cfce73f90bb..69f4f969d95 100644 --- a/service/shield/api_op_ListTagsForResource.go +++ b/service/shield/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_TagResource.go b/service/shield/api_op_TagResource.go index 724fdbef574..9ecc987d406 100644 --- a/service/shield/api_op_TagResource.go +++ b/service/shield/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_UntagResource.go b/service/shield/api_op_UntagResource.go index c38668c86fe..deb574efb2b 100644 --- a/service/shield/api_op_UntagResource.go +++ b/service/shield/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_UpdateApplicationLayerAutomaticResponse.go b/service/shield/api_op_UpdateApplicationLayerAutomaticResponse.go index 28b4f94ca54..9b42b6a878d 100644 --- a/service/shield/api_op_UpdateApplicationLayerAutomaticResponse.go +++ b/service/shield/api_op_UpdateApplicationLayerAutomaticResponse.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateApplicationLayerAutomaticResponseMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationLayerAutomaticResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_UpdateEmergencyContactSettings.go b/service/shield/api_op_UpdateEmergencyContactSettings.go index 916a5e0bdc6..1c4367326cd 100644 --- a/service/shield/api_op_UpdateEmergencyContactSettings.go +++ b/service/shield/api_op_UpdateEmergencyContactSettings.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateEmergencyContactSettingsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateEmergencyContactSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_UpdateProtectionGroup.go b/service/shield/api_op_UpdateProtectionGroup.go index 7efe37738ba..beb6cf127a3 100644 --- a/service/shield/api_op_UpdateProtectionGroup.go +++ b/service/shield/api_op_UpdateProtectionGroup.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateProtectionGroupMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProtectionGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/shield/api_op_UpdateSubscription.go b/service/shield/api_op_UpdateSubscription.go index 82137005f42..502aff19c11 100644 --- a/service/shield/api_op_UpdateSubscription.go +++ b/service/shield/api_op_UpdateSubscription.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateSubscriptionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSubscription(options.Region), middleware.Before); err != nil { return err } diff --git a/service/signer/api_client.go b/service/signer/api_client.go index d7c11b1aaa7..8bbc34d755c 100644 --- a/service/signer/api_client.go +++ b/service/signer/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/signer/api_op_AddProfilePermission.go b/service/signer/api_op_AddProfilePermission.go index 25575714d2a..03fd2272e7d 100644 --- a/service/signer/api_op_AddProfilePermission.go +++ b/service/signer/api_op_AddProfilePermission.go @@ -144,6 +144,9 @@ func (c *Client) addOperationAddProfilePermissionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddProfilePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_CancelSigningProfile.go b/service/signer/api_op_CancelSigningProfile.go index f0fb1a1cc82..d541f30a989 100644 --- a/service/signer/api_op_CancelSigningProfile.go +++ b/service/signer/api_op_CancelSigningProfile.go @@ -103,6 +103,9 @@ func (c *Client) addOperationCancelSigningProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSigningProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_DescribeSigningJob.go b/service/signer/api_op_DescribeSigningJob.go index 4f504c6289c..4e6c3c2ed90 100644 --- a/service/signer/api_op_DescribeSigningJob.go +++ b/service/signer/api_op_DescribeSigningJob.go @@ -170,6 +170,9 @@ func (c *Client) addOperationDescribeSigningJobMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSigningJobValidationMiddleware(stack); err != nil { return err } @@ -194,14 +197,6 @@ func (c *Client) addOperationDescribeSigningJobMiddlewares(stack *middleware.Sta return nil } -// DescribeSigningJobAPIClient is a client that implements the DescribeSigningJob -// operation. -type DescribeSigningJobAPIClient interface { - DescribeSigningJob(context.Context, *DescribeSigningJobInput, ...func(*Options)) (*DescribeSigningJobOutput, error) -} - -var _ DescribeSigningJobAPIClient = (*Client)(nil) - // SuccessfulSigningJobWaiterOptions are waiter options for // SuccessfulSigningJobWaiter type SuccessfulSigningJobWaiterOptions struct { @@ -319,7 +314,13 @@ func (w *SuccessfulSigningJobWaiter) WaitForOutput(ctx context.Context, params * } out, err := w.client.DescribeSigningJob(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -401,6 +402,14 @@ func successfulSigningJobStateRetryable(ctx context.Context, input *DescribeSign return true, nil } +// DescribeSigningJobAPIClient is a client that implements the DescribeSigningJob +// operation. +type DescribeSigningJobAPIClient interface { + DescribeSigningJob(context.Context, *DescribeSigningJobInput, ...func(*Options)) (*DescribeSigningJobOutput, error) +} + +var _ DescribeSigningJobAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSigningJob(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/signer/api_op_GetRevocationStatus.go b/service/signer/api_op_GetRevocationStatus.go index 5482e6a4f29..e44b38a25e3 100644 --- a/service/signer/api_op_GetRevocationStatus.go +++ b/service/signer/api_op_GetRevocationStatus.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetRevocationStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetRevocationStatusMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_GetSigningPlatform.go b/service/signer/api_op_GetSigningPlatform.go index bfe43e936b1..818b96e1b06 100644 --- a/service/signer/api_op_GetSigningPlatform.go +++ b/service/signer/api_op_GetSigningPlatform.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetSigningPlatformMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSigningPlatformValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_GetSigningProfile.go b/service/signer/api_op_GetSigningProfile.go index c23be4e8208..315181b8ac7 100644 --- a/service/signer/api_op_GetSigningProfile.go +++ b/service/signer/api_op_GetSigningProfile.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetSigningProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSigningProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_ListProfilePermissions.go b/service/signer/api_op_ListProfilePermissions.go index 4f3ba96f4f7..98d2b108da4 100644 --- a/service/signer/api_op_ListProfilePermissions.go +++ b/service/signer/api_op_ListProfilePermissions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListProfilePermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProfilePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_ListSigningJobs.go b/service/signer/api_op_ListSigningJobs.go index b8776868767..1b7908dead0 100644 --- a/service/signer/api_op_ListSigningJobs.go +++ b/service/signer/api_op_ListSigningJobs.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListSigningJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningJobs(options.Region), middleware.Before); err != nil { return err } @@ -168,14 +171,6 @@ func (c *Client) addOperationListSigningJobsMiddlewares(stack *middleware.Stack, return nil } -// ListSigningJobsAPIClient is a client that implements the ListSigningJobs -// operation. -type ListSigningJobsAPIClient interface { - ListSigningJobs(context.Context, *ListSigningJobsInput, ...func(*Options)) (*ListSigningJobsOutput, error) -} - -var _ ListSigningJobsAPIClient = (*Client)(nil) - // ListSigningJobsPaginatorOptions is the paginator options for ListSigningJobs type ListSigningJobsPaginatorOptions struct { // Specifies the maximum number of items to return in the response. Use this @@ -242,6 +237,9 @@ func (p *ListSigningJobsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSigningJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -261,6 +259,14 @@ func (p *ListSigningJobsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListSigningJobsAPIClient is a client that implements the ListSigningJobs +// operation. +type ListSigningJobsAPIClient interface { + ListSigningJobs(context.Context, *ListSigningJobsInput, ...func(*Options)) (*ListSigningJobsOutput, error) +} + +var _ ListSigningJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSigningJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/signer/api_op_ListSigningPlatforms.go b/service/signer/api_op_ListSigningPlatforms.go index 96b98550508..d89baaba39a 100644 --- a/service/signer/api_op_ListSigningPlatforms.go +++ b/service/signer/api_op_ListSigningPlatforms.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListSigningPlatformsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningPlatforms(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListSigningPlatformsMiddlewares(stack *middleware.S return nil } -// ListSigningPlatformsAPIClient is a client that implements the -// ListSigningPlatforms operation. -type ListSigningPlatformsAPIClient interface { - ListSigningPlatforms(context.Context, *ListSigningPlatformsInput, ...func(*Options)) (*ListSigningPlatformsOutput, error) -} - -var _ ListSigningPlatformsAPIClient = (*Client)(nil) - // ListSigningPlatformsPaginatorOptions is the paginator options for // ListSigningPlatforms type ListSigningPlatformsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListSigningPlatformsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSigningPlatforms(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListSigningPlatformsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSigningPlatformsAPIClient is a client that implements the +// ListSigningPlatforms operation. +type ListSigningPlatformsAPIClient interface { + ListSigningPlatforms(context.Context, *ListSigningPlatformsInput, ...func(*Options)) (*ListSigningPlatformsOutput, error) +} + +var _ ListSigningPlatformsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSigningPlatforms(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/signer/api_op_ListSigningProfiles.go b/service/signer/api_op_ListSigningProfiles.go index af0abbb8a8d..c580b47d17d 100644 --- a/service/signer/api_op_ListSigningProfiles.go +++ b/service/signer/api_op_ListSigningProfiles.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSigningProfilesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSigningProfiles(options.Region), middleware.Before); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListSigningProfilesMiddlewares(stack *middleware.St return nil } -// ListSigningProfilesAPIClient is a client that implements the -// ListSigningProfiles operation. -type ListSigningProfilesAPIClient interface { - ListSigningProfiles(context.Context, *ListSigningProfilesInput, ...func(*Options)) (*ListSigningProfilesOutput, error) -} - -var _ ListSigningProfilesAPIClient = (*Client)(nil) - // ListSigningProfilesPaginatorOptions is the paginator options for // ListSigningProfiles type ListSigningProfilesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListSigningProfilesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSigningProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListSigningProfilesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListSigningProfilesAPIClient is a client that implements the +// ListSigningProfiles operation. +type ListSigningProfilesAPIClient interface { + ListSigningProfiles(context.Context, *ListSigningProfilesInput, ...func(*Options)) (*ListSigningProfilesOutput, error) +} + +var _ ListSigningProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSigningProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/signer/api_op_ListTagsForResource.go b/service/signer/api_op_ListTagsForResource.go index 04f8ff832d5..ec7071d074c 100644 --- a/service/signer/api_op_ListTagsForResource.go +++ b/service/signer/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_PutSigningProfile.go b/service/signer/api_op_PutSigningProfile.go index 179485ebc43..89006cce3df 100644 --- a/service/signer/api_op_PutSigningProfile.go +++ b/service/signer/api_op_PutSigningProfile.go @@ -138,6 +138,9 @@ func (c *Client) addOperationPutSigningProfileMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSigningProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_RemoveProfilePermission.go b/service/signer/api_op_RemoveProfilePermission.go index b331b4197e8..a0362681662 100644 --- a/service/signer/api_op_RemoveProfilePermission.go +++ b/service/signer/api_op_RemoveProfilePermission.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRemoveProfilePermissionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveProfilePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_RevokeSignature.go b/service/signer/api_op_RevokeSignature.go index 0ed27a270dd..8a53bf417bb 100644 --- a/service/signer/api_op_RevokeSignature.go +++ b/service/signer/api_op_RevokeSignature.go @@ -110,6 +110,9 @@ func (c *Client) addOperationRevokeSignatureMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeSignatureValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_RevokeSigningProfile.go b/service/signer/api_op_RevokeSigningProfile.go index f9eae2c4883..913c8055aec 100644 --- a/service/signer/api_op_RevokeSigningProfile.go +++ b/service/signer/api_op_RevokeSigningProfile.go @@ -121,6 +121,9 @@ func (c *Client) addOperationRevokeSigningProfileMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeSigningProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_SignPayload.go b/service/signer/api_op_SignPayload.go index 495ae83e583..535eb0217e1 100644 --- a/service/signer/api_op_SignPayload.go +++ b/service/signer/api_op_SignPayload.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSignPayloadMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignPayloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_StartSigningJob.go b/service/signer/api_op_StartSigningJob.go index d7896799088..c1571835901 100644 --- a/service/signer/api_op_StartSigningJob.go +++ b/service/signer/api_op_StartSigningJob.go @@ -156,6 +156,9 @@ func (c *Client) addOperationStartSigningJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSigningJobMiddleware(stack, options); err != nil { return err } diff --git a/service/signer/api_op_TagResource.go b/service/signer/api_op_TagResource.go index 9af34083605..b7842398945 100644 --- a/service/signer/api_op_TagResource.go +++ b/service/signer/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/signer/api_op_UntagResource.go b/service/signer/api_op_UntagResource.go index f4f9b6cd764..5a899db01cc 100644 --- a/service/signer/api_op_UntagResource.go +++ b/service/signer/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_client.go b/service/simspaceweaver/api_client.go index a6e8af19997..4b9be1f15d2 100644 --- a/service/simspaceweaver/api_client.go +++ b/service/simspaceweaver/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/simspaceweaver/api_op_CreateSnapshot.go b/service/simspaceweaver/api_op_CreateSnapshot.go index 270bd8b039d..f53222a5328 100644 --- a/service/simspaceweaver/api_op_CreateSnapshot.go +++ b/service/simspaceweaver/api_op_CreateSnapshot.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_DeleteApp.go b/service/simspaceweaver/api_op_DeleteApp.go index ad975c8c799..4a729d6a4c1 100644 --- a/service/simspaceweaver/api_op_DeleteApp.go +++ b/service/simspaceweaver/api_op_DeleteApp.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_DeleteSimulation.go b/service/simspaceweaver/api_op_DeleteSimulation.go index 58e1c0551bd..3a45fd2f2ea 100644 --- a/service/simspaceweaver/api_op_DeleteSimulation.go +++ b/service/simspaceweaver/api_op_DeleteSimulation.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteSimulationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSimulationValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_DescribeApp.go b/service/simspaceweaver/api_op_DescribeApp.go index 658bd84fae1..d0447724a4c 100644 --- a/service/simspaceweaver/api_op_DescribeApp.go +++ b/service/simspaceweaver/api_op_DescribeApp.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeAppMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_DescribeSimulation.go b/service/simspaceweaver/api_op_DescribeSimulation.go index f200c945467..1984d5dcffe 100644 --- a/service/simspaceweaver/api_op_DescribeSimulation.go +++ b/service/simspaceweaver/api_op_DescribeSimulation.go @@ -175,6 +175,9 @@ func (c *Client) addOperationDescribeSimulationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSimulationValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_ListApps.go b/service/simspaceweaver/api_op_ListApps.go index eeb757a1cee..8f852cbf155 100644 --- a/service/simspaceweaver/api_op_ListApps.go +++ b/service/simspaceweaver/api_op_ListApps.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAppsValidationMiddleware(stack); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option return nil } -// ListAppsAPIClient is a client that implements the ListApps operation. -type ListAppsAPIClient interface { - ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) -} - -var _ ListAppsAPIClient = (*Client)(nil) - // ListAppsPaginatorOptions is the paginator options for ListApps type ListAppsPaginatorOptions struct { // The maximum number of apps to list. @@ -222,6 +218,9 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApps(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListAppsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListAppsAPIClient is a client that implements the ListApps operation. +type ListAppsAPIClient interface { + ListApps(context.Context, *ListAppsInput, ...func(*Options)) (*ListAppsOutput, error) +} + +var _ ListAppsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApps(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/simspaceweaver/api_op_ListSimulations.go b/service/simspaceweaver/api_op_ListSimulations.go index 5e326e22c50..72d10ff6343 100644 --- a/service/simspaceweaver/api_op_ListSimulations.go +++ b/service/simspaceweaver/api_op_ListSimulations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSimulationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSimulations(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListSimulationsMiddlewares(stack *middleware.Stack, return nil } -// ListSimulationsAPIClient is a client that implements the ListSimulations -// operation. -type ListSimulationsAPIClient interface { - ListSimulations(context.Context, *ListSimulationsInput, ...func(*Options)) (*ListSimulationsOutput, error) -} - -var _ ListSimulationsAPIClient = (*Client)(nil) - // ListSimulationsPaginatorOptions is the paginator options for ListSimulations type ListSimulationsPaginatorOptions struct { // The maximum number of simulations to list. @@ -213,6 +208,9 @@ func (p *ListSimulationsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSimulations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListSimulationsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListSimulationsAPIClient is a client that implements the ListSimulations +// operation. +type ListSimulationsAPIClient interface { + ListSimulations(context.Context, *ListSimulationsInput, ...func(*Options)) (*ListSimulationsOutput, error) +} + +var _ ListSimulationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSimulations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/simspaceweaver/api_op_ListTagsForResource.go b/service/simspaceweaver/api_op_ListTagsForResource.go index 2718ce7ddc5..c32e79fd7b5 100644 --- a/service/simspaceweaver/api_op_ListTagsForResource.go +++ b/service/simspaceweaver/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_StartApp.go b/service/simspaceweaver/api_op_StartApp.go index c25102d13ff..8431eaef2f4 100644 --- a/service/simspaceweaver/api_op_StartApp.go +++ b/service/simspaceweaver/api_op_StartApp.go @@ -133,6 +133,9 @@ func (c *Client) addOperationStartAppMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartAppMiddleware(stack, options); err != nil { return err } diff --git a/service/simspaceweaver/api_op_StartClock.go b/service/simspaceweaver/api_op_StartClock.go index 838afdd5098..48dba0352ba 100644 --- a/service/simspaceweaver/api_op_StartClock.go +++ b/service/simspaceweaver/api_op_StartClock.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStartClockMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartClockValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_StartSimulation.go b/service/simspaceweaver/api_op_StartSimulation.go index 30c064ef782..6308f573ee5 100644 --- a/service/simspaceweaver/api_op_StartSimulation.go +++ b/service/simspaceweaver/api_op_StartSimulation.go @@ -178,6 +178,9 @@ func (c *Client) addOperationStartSimulationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSimulationMiddleware(stack, options); err != nil { return err } diff --git a/service/simspaceweaver/api_op_StopApp.go b/service/simspaceweaver/api_op_StopApp.go index fbf85963986..6c30b2c2df5 100644 --- a/service/simspaceweaver/api_op_StopApp.go +++ b/service/simspaceweaver/api_op_StopApp.go @@ -112,6 +112,9 @@ func (c *Client) addOperationStopAppMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAppValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_StopClock.go b/service/simspaceweaver/api_op_StopClock.go index cfdfb769ab8..6d8bdff3a40 100644 --- a/service/simspaceweaver/api_op_StopClock.go +++ b/service/simspaceweaver/api_op_StopClock.go @@ -101,6 +101,9 @@ func (c *Client) addOperationStopClockMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopClockValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_StopSimulation.go b/service/simspaceweaver/api_op_StopSimulation.go index 9c55cb74ebb..625c5d4c9e1 100644 --- a/service/simspaceweaver/api_op_StopSimulation.go +++ b/service/simspaceweaver/api_op_StopSimulation.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStopSimulationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopSimulationValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_TagResource.go b/service/simspaceweaver/api_op_TagResource.go index 34d4ea48c6e..4db67c4eabc 100644 --- a/service/simspaceweaver/api_op_TagResource.go +++ b/service/simspaceweaver/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/simspaceweaver/api_op_UntagResource.go b/service/simspaceweaver/api_op_UntagResource.go index 6d1fde2a48b..48428f0fbd4 100644 --- a/service/simspaceweaver/api_op_UntagResource.go +++ b/service/simspaceweaver/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_client.go b/service/sms/api_client.go index 7f02d4e74c0..0655424e4d1 100644 --- a/service/sms/api_client.go +++ b/service/sms/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sms/api_op_CreateApp.go b/service/sms/api_op_CreateApp.go index 6d047c61e29..1b6cdfa1c77 100644 --- a/service/sms/api_op_CreateApp.go +++ b/service/sms/api_op_CreateApp.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateApp(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_CreateReplicationJob.go b/service/sms/api_op_CreateReplicationJob.go index 853c857a3b9..924f70a3e90 100644 --- a/service/sms/api_op_CreateReplicationJob.go +++ b/service/sms/api_op_CreateReplicationJob.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateReplicationJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReplicationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_DeleteApp.go b/service/sms/api_op_DeleteApp.go index db8f4e6fa16..86bddf7705b 100644 --- a/service/sms/api_op_DeleteApp.go +++ b/service/sms/api_op_DeleteApp.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteApp(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_DeleteAppLaunchConfiguration.go b/service/sms/api_op_DeleteAppLaunchConfiguration.go index 4e7aa228d6e..62846165da0 100644 --- a/service/sms/api_op_DeleteAppLaunchConfiguration.go +++ b/service/sms/api_op_DeleteAppLaunchConfiguration.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteAppLaunchConfigurationMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppLaunchConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_DeleteAppReplicationConfiguration.go b/service/sms/api_op_DeleteAppReplicationConfiguration.go index 5822ad5a2e7..83f0d4a48f8 100644 --- a/service/sms/api_op_DeleteAppReplicationConfiguration.go +++ b/service/sms/api_op_DeleteAppReplicationConfiguration.go @@ -99,6 +99,9 @@ func (c *Client) addOperationDeleteAppReplicationConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppReplicationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_DeleteAppValidationConfiguration.go b/service/sms/api_op_DeleteAppValidationConfiguration.go index a4268007415..795349ecc3b 100644 --- a/service/sms/api_op_DeleteAppValidationConfiguration.go +++ b/service/sms/api_op_DeleteAppValidationConfiguration.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAppValidationConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAppValidationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_DeleteReplicationJob.go b/service/sms/api_op_DeleteReplicationJob.go index 0224bd4e123..66c23283732 100644 --- a/service/sms/api_op_DeleteReplicationJob.go +++ b/service/sms/api_op_DeleteReplicationJob.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteReplicationJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_DeleteServerCatalog.go b/service/sms/api_op_DeleteServerCatalog.go index 547926fcc92..2c0ebf7222d 100644 --- a/service/sms/api_op_DeleteServerCatalog.go +++ b/service/sms/api_op_DeleteServerCatalog.go @@ -95,6 +95,9 @@ func (c *Client) addOperationDeleteServerCatalogMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteServerCatalog(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_DisassociateConnector.go b/service/sms/api_op_DisassociateConnector.go index 72bb367a542..bd5cc31d406 100644 --- a/service/sms/api_op_DisassociateConnector.go +++ b/service/sms/api_op_DisassociateConnector.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDisassociateConnectorMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_GenerateChangeSet.go b/service/sms/api_op_GenerateChangeSet.go index 940e43f63ca..a8c3a6009db 100644 --- a/service/sms/api_op_GenerateChangeSet.go +++ b/service/sms/api_op_GenerateChangeSet.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGenerateChangeSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateChangeSet(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_GenerateTemplate.go b/service/sms/api_op_GenerateTemplate.go index 56dcf4debe5..053d9528e68 100644 --- a/service/sms/api_op_GenerateTemplate.go +++ b/service/sms/api_op_GenerateTemplate.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGenerateTemplateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_GetApp.go b/service/sms/api_op_GetApp.go index 57b31d7aa15..748e2f92cee 100644 --- a/service/sms/api_op_GetApp.go +++ b/service/sms/api_op_GetApp.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetAppMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApp(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_GetAppLaunchConfiguration.go b/service/sms/api_op_GetAppLaunchConfiguration.go index 8dc6de6e831..eda3fa5e9e4 100644 --- a/service/sms/api_op_GetAppLaunchConfiguration.go +++ b/service/sms/api_op_GetAppLaunchConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetAppLaunchConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppLaunchConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_GetAppReplicationConfiguration.go b/service/sms/api_op_GetAppReplicationConfiguration.go index a3decf08593..e4ab3bcc59a 100644 --- a/service/sms/api_op_GetAppReplicationConfiguration.go +++ b/service/sms/api_op_GetAppReplicationConfiguration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAppReplicationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppReplicationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_GetAppValidationConfiguration.go b/service/sms/api_op_GetAppValidationConfiguration.go index 8e942555751..6b627fa5c5b 100644 --- a/service/sms/api_op_GetAppValidationConfiguration.go +++ b/service/sms/api_op_GetAppValidationConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetAppValidationConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppValidationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_GetAppValidationOutput.go b/service/sms/api_op_GetAppValidationOutput.go index 962e31f553e..649d3a2bc9d 100644 --- a/service/sms/api_op_GetAppValidationOutput.go +++ b/service/sms/api_op_GetAppValidationOutput.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetAppValidationOutputMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAppValidationOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_GetConnectors.go b/service/sms/api_op_GetConnectors.go index 9c0fb0f83fa..7b30d2c41f3 100644 --- a/service/sms/api_op_GetConnectors.go +++ b/service/sms/api_op_GetConnectors.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetConnectorsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConnectors(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationGetConnectorsMiddlewares(stack *middleware.Stack, o return nil } -// GetConnectorsAPIClient is a client that implements the GetConnectors operation. -type GetConnectorsAPIClient interface { - GetConnectors(context.Context, *GetConnectorsInput, ...func(*Options)) (*GetConnectorsOutput, error) -} - -var _ GetConnectorsAPIClient = (*Client)(nil) - // GetConnectorsPaginatorOptions is the paginator options for GetConnectors type GetConnectorsPaginatorOptions struct { // The maximum number of results to return in a single call. The default value is @@ -206,6 +202,9 @@ func (p *GetConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *GetConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetConnectorsAPIClient is a client that implements the GetConnectors operation. +type GetConnectorsAPIClient interface { + GetConnectors(context.Context, *GetConnectorsInput, ...func(*Options)) (*GetConnectorsOutput, error) +} + +var _ GetConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sms/api_op_GetReplicationJobs.go b/service/sms/api_op_GetReplicationJobs.go index 699e5406c6f..5d1735b0066 100644 --- a/service/sms/api_op_GetReplicationJobs.go +++ b/service/sms/api_op_GetReplicationJobs.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetReplicationJobsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReplicationJobs(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationGetReplicationJobsMiddlewares(stack *middleware.Sta return nil } -// GetReplicationJobsAPIClient is a client that implements the GetReplicationJobs -// operation. -type GetReplicationJobsAPIClient interface { - GetReplicationJobs(context.Context, *GetReplicationJobsInput, ...func(*Options)) (*GetReplicationJobsOutput, error) -} - -var _ GetReplicationJobsAPIClient = (*Client)(nil) - // GetReplicationJobsPaginatorOptions is the paginator options for // GetReplicationJobs type GetReplicationJobsPaginatorOptions struct { @@ -211,6 +206,9 @@ func (p *GetReplicationJobsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetReplicationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *GetReplicationJobsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetReplicationJobsAPIClient is a client that implements the GetReplicationJobs +// operation. +type GetReplicationJobsAPIClient interface { + GetReplicationJobs(context.Context, *GetReplicationJobsInput, ...func(*Options)) (*GetReplicationJobsOutput, error) +} + +var _ GetReplicationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReplicationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sms/api_op_GetReplicationRuns.go b/service/sms/api_op_GetReplicationRuns.go index 0ff5c7f2ee8..0de83a30499 100644 --- a/service/sms/api_op_GetReplicationRuns.go +++ b/service/sms/api_op_GetReplicationRuns.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetReplicationRunsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReplicationRunsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetReplicationRunsMiddlewares(stack *middleware.Sta return nil } -// GetReplicationRunsAPIClient is a client that implements the GetReplicationRuns -// operation. -type GetReplicationRunsAPIClient interface { - GetReplicationRuns(context.Context, *GetReplicationRunsInput, ...func(*Options)) (*GetReplicationRunsOutput, error) -} - -var _ GetReplicationRunsAPIClient = (*Client)(nil) - // GetReplicationRunsPaginatorOptions is the paginator options for // GetReplicationRuns type GetReplicationRunsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *GetReplicationRunsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetReplicationRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *GetReplicationRunsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetReplicationRunsAPIClient is a client that implements the GetReplicationRuns +// operation. +type GetReplicationRunsAPIClient interface { + GetReplicationRuns(context.Context, *GetReplicationRunsInput, ...func(*Options)) (*GetReplicationRunsOutput, error) +} + +var _ GetReplicationRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReplicationRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sms/api_op_GetServers.go b/service/sms/api_op_GetServers.go index 6e115b63057..8631681237f 100644 --- a/service/sms/api_op_GetServers.go +++ b/service/sms/api_op_GetServers.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetServersMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetServers(options.Region), middleware.Before); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationGetServersMiddlewares(stack *middleware.Stack, opti return nil } -// GetServersAPIClient is a client that implements the GetServers operation. -type GetServersAPIClient interface { - GetServers(context.Context, *GetServersInput, ...func(*Options)) (*GetServersOutput, error) -} - -var _ GetServersAPIClient = (*Client)(nil) - // GetServersPaginatorOptions is the paginator options for GetServers type GetServersPaginatorOptions struct { // The maximum number of results to return in a single call. The default value is @@ -218,6 +214,9 @@ func (p *GetServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *GetServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// GetServersAPIClient is a client that implements the GetServers operation. +type GetServersAPIClient interface { + GetServers(context.Context, *GetServersInput, ...func(*Options)) (*GetServersOutput, error) +} + +var _ GetServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sms/api_op_ImportAppCatalog.go b/service/sms/api_op_ImportAppCatalog.go index 55e2ab05fd3..85022db8736 100644 --- a/service/sms/api_op_ImportAppCatalog.go +++ b/service/sms/api_op_ImportAppCatalog.go @@ -103,6 +103,9 @@ func (c *Client) addOperationImportAppCatalogMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportAppCatalog(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_ImportServerCatalog.go b/service/sms/api_op_ImportServerCatalog.go index ae43ee2e0ed..eca32033e77 100644 --- a/service/sms/api_op_ImportServerCatalog.go +++ b/service/sms/api_op_ImportServerCatalog.go @@ -99,6 +99,9 @@ func (c *Client) addOperationImportServerCatalogMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportServerCatalog(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_LaunchApp.go b/service/sms/api_op_LaunchApp.go index 0d6ab37b231..6cfc7fc3960 100644 --- a/service/sms/api_op_LaunchApp.go +++ b/service/sms/api_op_LaunchApp.go @@ -99,6 +99,9 @@ func (c *Client) addOperationLaunchAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLaunchApp(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_ListApps.go b/service/sms/api_op_ListApps.go index c9ae4db67f2..d096b4f25cc 100644 --- a/service/sms/api_op_ListApps.go +++ b/service/sms/api_op_ListApps.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListAppsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApps(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_NotifyAppValidationOutput.go b/service/sms/api_op_NotifyAppValidationOutput.go index 294c0c1d0c7..6abf6e49e39 100644 --- a/service/sms/api_op_NotifyAppValidationOutput.go +++ b/service/sms/api_op_NotifyAppValidationOutput.go @@ -106,6 +106,9 @@ func (c *Client) addOperationNotifyAppValidationOutputMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyAppValidationOutputValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_PutAppLaunchConfiguration.go b/service/sms/api_op_PutAppLaunchConfiguration.go index dcd02f98c62..7d20cd0d576 100644 --- a/service/sms/api_op_PutAppLaunchConfiguration.go +++ b/service/sms/api_op_PutAppLaunchConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutAppLaunchConfigurationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAppLaunchConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_PutAppReplicationConfiguration.go b/service/sms/api_op_PutAppReplicationConfiguration.go index 78c763cab46..ebc2e036601 100644 --- a/service/sms/api_op_PutAppReplicationConfiguration.go +++ b/service/sms/api_op_PutAppReplicationConfiguration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationPutAppReplicationConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAppReplicationConfiguration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_PutAppValidationConfiguration.go b/service/sms/api_op_PutAppValidationConfiguration.go index f37c2413d97..5138f1f010e 100644 --- a/service/sms/api_op_PutAppValidationConfiguration.go +++ b/service/sms/api_op_PutAppValidationConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationPutAppValidationConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAppValidationConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_StartAppReplication.go b/service/sms/api_op_StartAppReplication.go index 38c4e872513..e6bd7fc21b4 100644 --- a/service/sms/api_op_StartAppReplication.go +++ b/service/sms/api_op_StartAppReplication.go @@ -100,6 +100,9 @@ func (c *Client) addOperationStartAppReplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartAppReplication(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_StartOnDemandAppReplication.go b/service/sms/api_op_StartOnDemandAppReplication.go index f81eec799cc..71d17c44ee5 100644 --- a/service/sms/api_op_StartOnDemandAppReplication.go +++ b/service/sms/api_op_StartOnDemandAppReplication.go @@ -104,6 +104,9 @@ func (c *Client) addOperationStartOnDemandAppReplicationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartOnDemandAppReplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_StartOnDemandReplicationRun.go b/service/sms/api_op_StartOnDemandReplicationRun.go index 3273475c1b1..cf2a120740c 100644 --- a/service/sms/api_op_StartOnDemandReplicationRun.go +++ b/service/sms/api_op_StartOnDemandReplicationRun.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartOnDemandReplicationRunMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartOnDemandReplicationRunValidationMiddleware(stack); err != nil { return err } diff --git a/service/sms/api_op_StopAppReplication.go b/service/sms/api_op_StopAppReplication.go index 840f7cea52e..c9152b79982 100644 --- a/service/sms/api_op_StopAppReplication.go +++ b/service/sms/api_op_StopAppReplication.go @@ -100,6 +100,9 @@ func (c *Client) addOperationStopAppReplicationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopAppReplication(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_TerminateApp.go b/service/sms/api_op_TerminateApp.go index d8e35ae74bd..8d6965619b4 100644 --- a/service/sms/api_op_TerminateApp.go +++ b/service/sms/api_op_TerminateApp.go @@ -99,6 +99,9 @@ func (c *Client) addOperationTerminateAppMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateApp(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_UpdateApp.go b/service/sms/api_op_UpdateApp.go index 43d658ec393..f74d3de47a6 100644 --- a/service/sms/api_op_UpdateApp.go +++ b/service/sms/api_op_UpdateApp.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateAppMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApp(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sms/api_op_UpdateReplicationJob.go b/service/sms/api_op_UpdateReplicationJob.go index 08b0bf85fe1..96eecbc5795 100644 --- a/service/sms/api_op_UpdateReplicationJob.go +++ b/service/sms/api_op_UpdateReplicationJob.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateReplicationJobMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReplicationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_client.go b/service/snowball/api_client.go index fb640279552..5c19c6d2109 100644 --- a/service/snowball/api_client.go +++ b/service/snowball/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/snowball/api_op_CancelCluster.go b/service/snowball/api_op_CancelCluster.go index 43f4b5052b9..48ce6ce1618 100644 --- a/service/snowball/api_op_CancelCluster.go +++ b/service/snowball/api_op_CancelCluster.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCancelClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_CancelJob.go b/service/snowball/api_op_CancelJob.go index e20e0584a73..4cb2924c040 100644 --- a/service/snowball/api_op_CancelJob.go +++ b/service/snowball/api_op_CancelJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCancelJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_CreateAddress.go b/service/snowball/api_op_CreateAddress.go index 17946c970ab..2ee6415cbd6 100644 --- a/service/snowball/api_op_CreateAddress.go +++ b/service/snowball/api_op_CreateAddress.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateAddressMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_CreateCluster.go b/service/snowball/api_op_CreateCluster.go index 981ca0d4981..037d3e28ccf 100644 --- a/service/snowball/api_op_CreateCluster.go +++ b/service/snowball/api_op_CreateCluster.go @@ -239,6 +239,9 @@ func (c *Client) addOperationCreateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_CreateJob.go b/service/snowball/api_op_CreateJob.go index 19999fe72ea..f6369daade7 100644 --- a/service/snowball/api_op_CreateJob.go +++ b/service/snowball/api_op_CreateJob.go @@ -317,6 +317,9 @@ func (c *Client) addOperationCreateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_CreateLongTermPricing.go b/service/snowball/api_op_CreateLongTermPricing.go index 8ba002891f9..e3201407091 100644 --- a/service/snowball/api_op_CreateLongTermPricing.go +++ b/service/snowball/api_op_CreateLongTermPricing.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateLongTermPricingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLongTermPricingValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_CreateReturnShippingLabel.go b/service/snowball/api_op_CreateReturnShippingLabel.go index 93e552f968e..814c8efa048 100644 --- a/service/snowball/api_op_CreateReturnShippingLabel.go +++ b/service/snowball/api_op_CreateReturnShippingLabel.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateReturnShippingLabelMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateReturnShippingLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_DescribeAddress.go b/service/snowball/api_op_DescribeAddress.go index ad1a1131f7a..8875ab31222 100644 --- a/service/snowball/api_op_DescribeAddress.go +++ b/service/snowball/api_op_DescribeAddress.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeAddressMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_DescribeAddresses.go b/service/snowball/api_op_DescribeAddresses.go index 4de422c4896..e0b98d8f34b 100644 --- a/service/snowball/api_op_DescribeAddresses.go +++ b/service/snowball/api_op_DescribeAddresses.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeAddressesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddresses(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeAddressesMiddlewares(stack *middleware.Stac return nil } -// DescribeAddressesAPIClient is a client that implements the DescribeAddresses -// operation. -type DescribeAddressesAPIClient interface { - DescribeAddresses(context.Context, *DescribeAddressesInput, ...func(*Options)) (*DescribeAddressesOutput, error) -} - -var _ DescribeAddressesAPIClient = (*Client)(nil) - // DescribeAddressesPaginatorOptions is the paginator options for DescribeAddresses type DescribeAddressesPaginatorOptions struct { // The number of ADDRESS objects to return. @@ -208,6 +203,9 @@ func (p *DescribeAddressesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAddresses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *DescribeAddressesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// DescribeAddressesAPIClient is a client that implements the DescribeAddresses +// operation. +type DescribeAddressesAPIClient interface { + DescribeAddresses(context.Context, *DescribeAddressesInput, ...func(*Options)) (*DescribeAddressesOutput, error) +} + +var _ DescribeAddressesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAddresses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_DescribeCluster.go b/service/snowball/api_op_DescribeCluster.go index 5ae038b94a3..a93d9215c05 100644 --- a/service/snowball/api_op_DescribeCluster.go +++ b/service/snowball/api_op_DescribeCluster.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeClusterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_DescribeJob.go b/service/snowball/api_op_DescribeJob.go index f2ec5d3f43b..6196eb254f3 100644 --- a/service/snowball/api_op_DescribeJob.go +++ b/service/snowball/api_op_DescribeJob.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeJobMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_DescribeReturnShippingLabel.go b/service/snowball/api_op_DescribeReturnShippingLabel.go index 9dc56cb04fa..f50894787c2 100644 --- a/service/snowball/api_op_DescribeReturnShippingLabel.go +++ b/service/snowball/api_op_DescribeReturnShippingLabel.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeReturnShippingLabelMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeReturnShippingLabelValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_GetJobManifest.go b/service/snowball/api_op_GetJobManifest.go index 0d63c4e1413..05f04245f96 100644 --- a/service/snowball/api_op_GetJobManifest.go +++ b/service/snowball/api_op_GetJobManifest.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetJobManifestMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobManifestValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_GetJobUnlockCode.go b/service/snowball/api_op_GetJobUnlockCode.go index f80fb9a41ae..6f9edf5cdd4 100644 --- a/service/snowball/api_op_GetJobUnlockCode.go +++ b/service/snowball/api_op_GetJobUnlockCode.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetJobUnlockCodeMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetJobUnlockCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_GetSnowballUsage.go b/service/snowball/api_op_GetSnowballUsage.go index b7770417e9f..393d3d54ad5 100644 --- a/service/snowball/api_op_GetSnowballUsage.go +++ b/service/snowball/api_op_GetSnowballUsage.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetSnowballUsageMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSnowballUsage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/snowball/api_op_GetSoftwareUpdates.go b/service/snowball/api_op_GetSoftwareUpdates.go index bc3a1863663..f47e51582b0 100644 --- a/service/snowball/api_op_GetSoftwareUpdates.go +++ b/service/snowball/api_op_GetSoftwareUpdates.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetSoftwareUpdatesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSoftwareUpdatesValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_ListClusterJobs.go b/service/snowball/api_op_ListClusterJobs.go index 1393fa49656..d9e1f3179ea 100644 --- a/service/snowball/api_op_ListClusterJobs.go +++ b/service/snowball/api_op_ListClusterJobs.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListClusterJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClusterJobsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListClusterJobsMiddlewares(stack *middleware.Stack, return nil } -// ListClusterJobsAPIClient is a client that implements the ListClusterJobs -// operation. -type ListClusterJobsAPIClient interface { - ListClusterJobs(context.Context, *ListClusterJobsInput, ...func(*Options)) (*ListClusterJobsOutput, error) -} - -var _ ListClusterJobsAPIClient = (*Client)(nil) - // ListClusterJobsPaginatorOptions is the paginator options for ListClusterJobs type ListClusterJobsPaginatorOptions struct { // The number of JobListEntry objects to return. @@ -218,6 +213,9 @@ func (p *ListClusterJobsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusterJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListClusterJobsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListClusterJobsAPIClient is a client that implements the ListClusterJobs +// operation. +type ListClusterJobsAPIClient interface { + ListClusterJobs(context.Context, *ListClusterJobsInput, ...func(*Options)) (*ListClusterJobsOutput, error) +} + +var _ ListClusterJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusterJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_ListClusters.go b/service/snowball/api_op_ListClusters.go index 1ab1bb6c83d..002655a848f 100644 --- a/service/snowball/api_op_ListClusters.go +++ b/service/snowball/api_op_ListClusters.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListClusters(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListClustersMiddlewares(stack *middleware.Stack, op return nil } -// ListClustersAPIClient is a client that implements the ListClusters operation. -type ListClustersAPIClient interface { - ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) -} - -var _ ListClustersAPIClient = (*Client)(nil) - // ListClustersPaginatorOptions is the paginator options for ListClusters type ListClustersPaginatorOptions struct { // The number of ClusterListEntry objects to return. @@ -208,6 +204,9 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClusters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListClustersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListClustersAPIClient is a client that implements the ListClusters operation. +type ListClustersAPIClient interface { + ListClusters(context.Context, *ListClustersInput, ...func(*Options)) (*ListClustersOutput, error) +} + +var _ ListClustersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClusters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_ListCompatibleImages.go b/service/snowball/api_op_ListCompatibleImages.go index da834fed490..054a9ef06cb 100644 --- a/service/snowball/api_op_ListCompatibleImages.go +++ b/service/snowball/api_op_ListCompatibleImages.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListCompatibleImagesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCompatibleImages(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListCompatibleImagesMiddlewares(stack *middleware.S return nil } -// ListCompatibleImagesAPIClient is a client that implements the -// ListCompatibleImages operation. -type ListCompatibleImagesAPIClient interface { - ListCompatibleImages(context.Context, *ListCompatibleImagesInput, ...func(*Options)) (*ListCompatibleImagesOutput, error) -} - -var _ ListCompatibleImagesAPIClient = (*Client)(nil) - // ListCompatibleImagesPaginatorOptions is the paginator options for // ListCompatibleImages type ListCompatibleImagesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListCompatibleImagesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCompatibleImages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListCompatibleImagesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListCompatibleImagesAPIClient is a client that implements the +// ListCompatibleImages operation. +type ListCompatibleImagesAPIClient interface { + ListCompatibleImages(context.Context, *ListCompatibleImagesInput, ...func(*Options)) (*ListCompatibleImagesOutput, error) +} + +var _ ListCompatibleImagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCompatibleImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_ListJobs.go b/service/snowball/api_op_ListJobs.go index d7e17ddf529..c0a7f939cea 100644 --- a/service/snowball/api_op_ListJobs.go +++ b/service/snowball/api_op_ListJobs.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobs(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListJobsMiddlewares(stack *middleware.Stack, option return nil } -// ListJobsAPIClient is a client that implements the ListJobs operation. -type ListJobsAPIClient interface { - ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) -} - -var _ ListJobsAPIClient = (*Client)(nil) - // ListJobsPaginatorOptions is the paginator options for ListJobs type ListJobsPaginatorOptions struct { // The number of JobListEntry objects to return. @@ -210,6 +206,9 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListJobsPaginator) NextPage(ctx context.Context, optFns ...func(*Option return result, nil } +// ListJobsAPIClient is a client that implements the ListJobs operation. +type ListJobsAPIClient interface { + ListJobs(context.Context, *ListJobsInput, ...func(*Options)) (*ListJobsOutput, error) +} + +var _ ListJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_ListLongTermPricing.go b/service/snowball/api_op_ListLongTermPricing.go index a28ad70f963..db2f94aa7ec 100644 --- a/service/snowball/api_op_ListLongTermPricing.go +++ b/service/snowball/api_op_ListLongTermPricing.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListLongTermPricingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLongTermPricing(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListLongTermPricingMiddlewares(stack *middleware.St return nil } -// ListLongTermPricingAPIClient is a client that implements the -// ListLongTermPricing operation. -type ListLongTermPricingAPIClient interface { - ListLongTermPricing(context.Context, *ListLongTermPricingInput, ...func(*Options)) (*ListLongTermPricingOutput, error) -} - -var _ ListLongTermPricingAPIClient = (*Client)(nil) - // ListLongTermPricingPaginatorOptions is the paginator options for // ListLongTermPricing type ListLongTermPricingPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListLongTermPricingPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLongTermPricing(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListLongTermPricingPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListLongTermPricingAPIClient is a client that implements the +// ListLongTermPricing operation. +type ListLongTermPricingAPIClient interface { + ListLongTermPricing(context.Context, *ListLongTermPricingInput, ...func(*Options)) (*ListLongTermPricingOutput, error) +} + +var _ ListLongTermPricingAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLongTermPricing(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_ListPickupLocations.go b/service/snowball/api_op_ListPickupLocations.go index 47e2a34beff..5fc4665a0e3 100644 --- a/service/snowball/api_op_ListPickupLocations.go +++ b/service/snowball/api_op_ListPickupLocations.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListPickupLocationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPickupLocations(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListPickupLocationsMiddlewares(stack *middleware.St return nil } -// ListPickupLocationsAPIClient is a client that implements the -// ListPickupLocations operation. -type ListPickupLocationsAPIClient interface { - ListPickupLocations(context.Context, *ListPickupLocationsInput, ...func(*Options)) (*ListPickupLocationsOutput, error) -} - -var _ ListPickupLocationsAPIClient = (*Client)(nil) - // ListPickupLocationsPaginatorOptions is the paginator options for // ListPickupLocations type ListPickupLocationsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListPickupLocationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPickupLocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListPickupLocationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPickupLocationsAPIClient is a client that implements the +// ListPickupLocations operation. +type ListPickupLocationsAPIClient interface { + ListPickupLocations(context.Context, *ListPickupLocationsInput, ...func(*Options)) (*ListPickupLocationsOutput, error) +} + +var _ ListPickupLocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPickupLocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowball/api_op_ListServiceVersions.go b/service/snowball/api_op_ListServiceVersions.go index 7efc3bda565..03623f68648 100644 --- a/service/snowball/api_op_ListServiceVersions.go +++ b/service/snowball/api_op_ListServiceVersions.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListServiceVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListServiceVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_UpdateCluster.go b/service/snowball/api_op_UpdateCluster.go index aaf969fa64c..f4de1108d33 100644 --- a/service/snowball/api_op_UpdateCluster.go +++ b/service/snowball/api_op_UpdateCluster.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateClusterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateClusterValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_UpdateJob.go b/service/snowball/api_op_UpdateJob.go index 1c1a940fc6e..9c2de979b5a 100644 --- a/service/snowball/api_op_UpdateJob.go +++ b/service/snowball/api_op_UpdateJob.go @@ -150,6 +150,9 @@ func (c *Client) addOperationUpdateJobMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_UpdateJobShipmentState.go b/service/snowball/api_op_UpdateJobShipmentState.go index 2b601c27f36..8e42d497313 100644 --- a/service/snowball/api_op_UpdateJobShipmentState.go +++ b/service/snowball/api_op_UpdateJobShipmentState.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateJobShipmentStateMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateJobShipmentStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowball/api_op_UpdateLongTermPricing.go b/service/snowball/api_op_UpdateLongTermPricing.go index 45ba0b54fe1..0eb8f6a9878 100644 --- a/service/snowball/api_op_UpdateLongTermPricing.go +++ b/service/snowball/api_op_UpdateLongTermPricing.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateLongTermPricingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLongTermPricingValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_client.go b/service/snowdevicemanagement/api_client.go index cf68888c6d6..b0493ff6edd 100644 --- a/service/snowdevicemanagement/api_client.go +++ b/service/snowdevicemanagement/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/snowdevicemanagement/api_op_CancelTask.go b/service/snowdevicemanagement/api_op_CancelTask.go index c90badf060d..bd7e4b74983 100644 --- a/service/snowdevicemanagement/api_op_CancelTask.go +++ b/service/snowdevicemanagement/api_op_CancelTask.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCancelTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_CreateTask.go b/service/snowdevicemanagement/api_op_CreateTask.go index aef9c191c25..9d2dc463210 100644 --- a/service/snowdevicemanagement/api_op_CreateTask.go +++ b/service/snowdevicemanagement/api_op_CreateTask.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateTaskMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_DescribeDevice.go b/service/snowdevicemanagement/api_op_DescribeDevice.go index 00da3b0368e..c992843a892 100644 --- a/service/snowdevicemanagement/api_op_DescribeDevice.go +++ b/service/snowdevicemanagement/api_op_DescribeDevice.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go b/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go index 1e7c5590b4c..f3e3a3ea481 100644 --- a/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go +++ b/service/snowdevicemanagement/api_op_DescribeDeviceEc2Instances.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeDeviceEc2InstancesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceEc2InstancesValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_DescribeExecution.go b/service/snowdevicemanagement/api_op_DescribeExecution.go index 5c41b9c6ad5..72f426a7464 100644 --- a/service/snowdevicemanagement/api_op_DescribeExecution.go +++ b/service/snowdevicemanagement/api_op_DescribeExecution.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeExecutionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_DescribeTask.go b/service/snowdevicemanagement/api_op_DescribeTask.go index 9a179aed108..2977360a62b 100644 --- a/service/snowdevicemanagement/api_op_DescribeTask.go +++ b/service/snowdevicemanagement/api_op_DescribeTask.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeTaskMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_ListDeviceResources.go b/service/snowdevicemanagement/api_op_ListDeviceResources.go index e64f313a1f6..df9ebd2d950 100644 --- a/service/snowdevicemanagement/api_op_ListDeviceResources.go +++ b/service/snowdevicemanagement/api_op_ListDeviceResources.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListDeviceResourcesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeviceResourcesValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListDeviceResourcesMiddlewares(stack *middleware.St return nil } -// ListDeviceResourcesAPIClient is a client that implements the -// ListDeviceResources operation. -type ListDeviceResourcesAPIClient interface { - ListDeviceResources(context.Context, *ListDeviceResourcesInput, ...func(*Options)) (*ListDeviceResourcesOutput, error) -} - -var _ ListDeviceResourcesAPIClient = (*Client)(nil) - // ListDeviceResourcesPaginatorOptions is the paginator options for // ListDeviceResources type ListDeviceResourcesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDeviceResourcesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeviceResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDeviceResourcesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListDeviceResourcesAPIClient is a client that implements the +// ListDeviceResources operation. +type ListDeviceResourcesAPIClient interface { + ListDeviceResources(context.Context, *ListDeviceResourcesInput, ...func(*Options)) (*ListDeviceResourcesOutput, error) +} + +var _ ListDeviceResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeviceResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowdevicemanagement/api_op_ListDevices.go b/service/snowdevicemanagement/api_op_ListDevices.go index f1566b13d91..b5348226c76 100644 --- a/service/snowdevicemanagement/api_op_ListDevices.go +++ b/service/snowdevicemanagement/api_op_ListDevices.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevices(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListDevicesAPIClient is a client that implements the ListDevices operation. -type ListDevicesAPIClient interface { - ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) -} - -var _ ListDevicesAPIClient = (*Client)(nil) - // ListDevicesPaginatorOptions is the paginator options for ListDevices type ListDevicesPaginatorOptions struct { // The maximum number of devices to list per page. @@ -206,6 +202,9 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowdevicemanagement/api_op_ListExecutions.go b/service/snowdevicemanagement/api_op_ListExecutions.go index 87822e8dcd5..3cf94aef9dd 100644 --- a/service/snowdevicemanagement/api_op_ListExecutions.go +++ b/service/snowdevicemanagement/api_op_ListExecutions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExecutionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, return nil } -// ListExecutionsAPIClient is a client that implements the ListExecutions -// operation. -type ListExecutionsAPIClient interface { - ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) -} - -var _ ListExecutionsAPIClient = (*Client)(nil) - // ListExecutionsPaginatorOptions is the paginator options for ListExecutions type ListExecutionsPaginatorOptions struct { // The maximum number of tasks to list per page. @@ -214,6 +209,9 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExecutionsAPIClient is a client that implements the ListExecutions +// operation. +type ListExecutionsAPIClient interface { + ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) +} + +var _ ListExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowdevicemanagement/api_op_ListTagsForResource.go b/service/snowdevicemanagement/api_op_ListTagsForResource.go index 9ac3431d997..be40432d68d 100644 --- a/service/snowdevicemanagement/api_op_ListTagsForResource.go +++ b/service/snowdevicemanagement/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_ListTasks.go b/service/snowdevicemanagement/api_op_ListTasks.go index 73ff15e10cc..30ba1747565 100644 --- a/service/snowdevicemanagement/api_op_ListTasks.go +++ b/service/snowdevicemanagement/api_op_ListTasks.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTasks(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListTasksMiddlewares(stack *middleware.Stack, optio return nil } -// ListTasksAPIClient is a client that implements the ListTasks operation. -type ListTasksAPIClient interface { - ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) -} - -var _ ListTasksAPIClient = (*Client)(nil) - // ListTasksPaginatorOptions is the paginator options for ListTasks type ListTasksPaginatorOptions struct { // The maximum number of tasks per page. @@ -204,6 +200,9 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListTasksAPIClient is a client that implements the ListTasks operation. +type ListTasksAPIClient interface { + ListTasks(context.Context, *ListTasksInput, ...func(*Options)) (*ListTasksOutput, error) +} + +var _ ListTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/snowdevicemanagement/api_op_TagResource.go b/service/snowdevicemanagement/api_op_TagResource.go index 756de426c90..dd409702bb8 100644 --- a/service/snowdevicemanagement/api_op_TagResource.go +++ b/service/snowdevicemanagement/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/snowdevicemanagement/api_op_UntagResource.go b/service/snowdevicemanagement/api_op_UntagResource.go index b1e530e316f..69e19b3a27a 100644 --- a/service/snowdevicemanagement/api_op_UntagResource.go +++ b/service/snowdevicemanagement/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_client.go b/service/sns/api_client.go index 2c485d6de6e..62837a3a7aa 100644 --- a/service/sns/api_client.go +++ b/service/sns/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sns/api_op_AddPermission.go b/service/sns/api_op_AddPermission.go index 1663b4f175f..c4cdd09b58d 100644 --- a/service/sns/api_op_AddPermission.go +++ b/service/sns/api_op_AddPermission.go @@ -125,6 +125,9 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go b/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go index a21d91fb32a..9856414d046 100644 --- a/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go +++ b/service/sns/api_op_CheckIfPhoneNumberIsOptedOut.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCheckIfPhoneNumberIsOptedOutMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckIfPhoneNumberIsOptedOutValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_ConfirmSubscription.go b/service/sns/api_op_ConfirmSubscription.go index 69f5a2a92eb..6ed34be1b10 100644 --- a/service/sns/api_op_ConfirmSubscription.go +++ b/service/sns/api_op_ConfirmSubscription.go @@ -122,6 +122,9 @@ func (c *Client) addOperationConfirmSubscriptionMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpConfirmSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_CreatePlatformApplication.go b/service/sns/api_op_CreatePlatformApplication.go index c1af848756b..e0d4ee42392 100644 --- a/service/sns/api_op_CreatePlatformApplication.go +++ b/service/sns/api_op_CreatePlatformApplication.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreatePlatformApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePlatformApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_CreatePlatformEndpoint.go b/service/sns/api_op_CreatePlatformEndpoint.go index 0d834a02d12..ddf6abd00f7 100644 --- a/service/sns/api_op_CreatePlatformEndpoint.go +++ b/service/sns/api_op_CreatePlatformEndpoint.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreatePlatformEndpointMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePlatformEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_CreateSMSSandboxPhoneNumber.go b/service/sns/api_op_CreateSMSSandboxPhoneNumber.go index 956d661885a..22757df5a81 100644 --- a/service/sns/api_op_CreateSMSSandboxPhoneNumber.go +++ b/service/sns/api_op_CreateSMSSandboxPhoneNumber.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateSMSSandboxPhoneNumberMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSMSSandboxPhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_CreateTopic.go b/service/sns/api_op_CreateTopic.go index a6c6bf7db4d..9627c67944d 100644 --- a/service/sns/api_op_CreateTopic.go +++ b/service/sns/api_op_CreateTopic.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateTopicMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_DeleteEndpoint.go b/service/sns/api_op_DeleteEndpoint.go index 65308a9a85e..3054bf037fe 100644 --- a/service/sns/api_op_DeleteEndpoint.go +++ b/service/sns/api_op_DeleteEndpoint.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteEndpointMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEndpointValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_DeletePlatformApplication.go b/service/sns/api_op_DeletePlatformApplication.go index f6466e94e93..339e43eb972 100644 --- a/service/sns/api_op_DeletePlatformApplication.go +++ b/service/sns/api_op_DeletePlatformApplication.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePlatformApplicationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePlatformApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go b/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go index e9245de6228..4fa9ca1567d 100644 --- a/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go +++ b/service/sns/api_op_DeleteSMSSandboxPhoneNumber.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteSMSSandboxPhoneNumberMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSMSSandboxPhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_DeleteTopic.go b/service/sns/api_op_DeleteTopic.go index 808859d4d9a..f94f7f20951 100644 --- a/service/sns/api_op_DeleteTopic.go +++ b/service/sns/api_op_DeleteTopic.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteTopicMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTopicValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_GetDataProtectionPolicy.go b/service/sns/api_op_GetDataProtectionPolicy.go index 40387d4318d..6d2f7da20f6 100644 --- a/service/sns/api_op_GetDataProtectionPolicy.go +++ b/service/sns/api_op_GetDataProtectionPolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetDataProtectionPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDataProtectionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_GetEndpointAttributes.go b/service/sns/api_op_GetEndpointAttributes.go index 38e80fbdd16..c7a40924a9a 100644 --- a/service/sns/api_op_GetEndpointAttributes.go +++ b/service/sns/api_op_GetEndpointAttributes.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetEndpointAttributesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetEndpointAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_GetPlatformApplicationAttributes.go b/service/sns/api_op_GetPlatformApplicationAttributes.go index 448632ce652..98caabf0642 100644 --- a/service/sns/api_op_GetPlatformApplicationAttributes.go +++ b/service/sns/api_op_GetPlatformApplicationAttributes.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetPlatformApplicationAttributesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPlatformApplicationAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_GetSMSAttributes.go b/service/sns/api_op_GetSMSAttributes.go index 7a65f198d44..946e4c59045 100644 --- a/service/sns/api_op_GetSMSAttributes.go +++ b/service/sns/api_op_GetSMSAttributes.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetSMSAttributesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSMSAttributes(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sns/api_op_GetSMSSandboxAccountStatus.go b/service/sns/api_op_GetSMSSandboxAccountStatus.go index f36c45ba505..9b1602abd92 100644 --- a/service/sns/api_op_GetSMSSandboxAccountStatus.go +++ b/service/sns/api_op_GetSMSSandboxAccountStatus.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetSMSSandboxAccountStatusMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSMSSandboxAccountStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sns/api_op_GetSubscriptionAttributes.go b/service/sns/api_op_GetSubscriptionAttributes.go index 5d01c4874ff..410b020961c 100644 --- a/service/sns/api_op_GetSubscriptionAttributes.go +++ b/service/sns/api_op_GetSubscriptionAttributes.go @@ -166,6 +166,9 @@ func (c *Client) addOperationGetSubscriptionAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSubscriptionAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_GetTopicAttributes.go b/service/sns/api_op_GetTopicAttributes.go index b509dcf984f..f862f72c808 100644 --- a/service/sns/api_op_GetTopicAttributes.go +++ b/service/sns/api_op_GetTopicAttributes.go @@ -179,6 +179,9 @@ func (c *Client) addOperationGetTopicAttributesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTopicAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_ListEndpointsByPlatformApplication.go b/service/sns/api_op_ListEndpointsByPlatformApplication.go index 56e8ee122ff..47fff77a692 100644 --- a/service/sns/api_op_ListEndpointsByPlatformApplication.go +++ b/service/sns/api_op_ListEndpointsByPlatformApplication.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListEndpointsByPlatformApplicationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListEndpointsByPlatformApplicationValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListEndpointsByPlatformApplicationMiddlewares(stack return nil } -// ListEndpointsByPlatformApplicationAPIClient is a client that implements the -// ListEndpointsByPlatformApplication operation. -type ListEndpointsByPlatformApplicationAPIClient interface { - ListEndpointsByPlatformApplication(context.Context, *ListEndpointsByPlatformApplicationInput, ...func(*Options)) (*ListEndpointsByPlatformApplicationOutput, error) -} - -var _ ListEndpointsByPlatformApplicationAPIClient = (*Client)(nil) - // ListEndpointsByPlatformApplicationPaginatorOptions is the paginator options for // ListEndpointsByPlatformApplication type ListEndpointsByPlatformApplicationPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListEndpointsByPlatformApplicationPaginator) NextPage(ctx context.Conte params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEndpointsByPlatformApplication(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListEndpointsByPlatformApplicationPaginator) NextPage(ctx context.Conte return result, nil } +// ListEndpointsByPlatformApplicationAPIClient is a client that implements the +// ListEndpointsByPlatformApplication operation. +type ListEndpointsByPlatformApplicationAPIClient interface { + ListEndpointsByPlatformApplication(context.Context, *ListEndpointsByPlatformApplicationInput, ...func(*Options)) (*ListEndpointsByPlatformApplicationOutput, error) +} + +var _ ListEndpointsByPlatformApplicationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEndpointsByPlatformApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListOriginationNumbers.go b/service/sns/api_op_ListOriginationNumbers.go index 808496c3fdb..a628e7810e1 100644 --- a/service/sns/api_op_ListOriginationNumbers.go +++ b/service/sns/api_op_ListOriginationNumbers.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListOriginationNumbersMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOriginationNumbers(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListOriginationNumbersMiddlewares(stack *middleware return nil } -// ListOriginationNumbersAPIClient is a client that implements the -// ListOriginationNumbers operation. -type ListOriginationNumbersAPIClient interface { - ListOriginationNumbers(context.Context, *ListOriginationNumbersInput, ...func(*Options)) (*ListOriginationNumbersOutput, error) -} - -var _ ListOriginationNumbersAPIClient = (*Client)(nil) - // ListOriginationNumbersPaginatorOptions is the paginator options for // ListOriginationNumbers type ListOriginationNumbersPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListOriginationNumbersPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOriginationNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListOriginationNumbersPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListOriginationNumbersAPIClient is a client that implements the +// ListOriginationNumbers operation. +type ListOriginationNumbersAPIClient interface { + ListOriginationNumbers(context.Context, *ListOriginationNumbersInput, ...func(*Options)) (*ListOriginationNumbersOutput, error) +} + +var _ ListOriginationNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOriginationNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListPhoneNumbersOptedOut.go b/service/sns/api_op_ListPhoneNumbersOptedOut.go index 3e23c56e904..01e8e2e91c0 100644 --- a/service/sns/api_op_ListPhoneNumbersOptedOut.go +++ b/service/sns/api_op_ListPhoneNumbersOptedOut.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPhoneNumbersOptedOutMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPhoneNumbersOptedOut(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListPhoneNumbersOptedOutMiddlewares(stack *middlewa return nil } -// ListPhoneNumbersOptedOutAPIClient is a client that implements the -// ListPhoneNumbersOptedOut operation. -type ListPhoneNumbersOptedOutAPIClient interface { - ListPhoneNumbersOptedOut(context.Context, *ListPhoneNumbersOptedOutInput, ...func(*Options)) (*ListPhoneNumbersOptedOutOutput, error) -} - -var _ ListPhoneNumbersOptedOutAPIClient = (*Client)(nil) - // ListPhoneNumbersOptedOutPaginatorOptions is the paginator options for // ListPhoneNumbersOptedOut type ListPhoneNumbersOptedOutPaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *ListPhoneNumbersOptedOutPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPhoneNumbersOptedOut(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *ListPhoneNumbersOptedOutPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListPhoneNumbersOptedOutAPIClient is a client that implements the +// ListPhoneNumbersOptedOut operation. +type ListPhoneNumbersOptedOutAPIClient interface { + ListPhoneNumbersOptedOut(context.Context, *ListPhoneNumbersOptedOutInput, ...func(*Options)) (*ListPhoneNumbersOptedOutOutput, error) +} + +var _ ListPhoneNumbersOptedOutAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPhoneNumbersOptedOut(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListPlatformApplications.go b/service/sns/api_op_ListPlatformApplications.go index 0e287bb55f2..cf3c23e2ac5 100644 --- a/service/sns/api_op_ListPlatformApplications.go +++ b/service/sns/api_op_ListPlatformApplications.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListPlatformApplicationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPlatformApplications(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPlatformApplicationsMiddlewares(stack *middlewa return nil } -// ListPlatformApplicationsAPIClient is a client that implements the -// ListPlatformApplications operation. -type ListPlatformApplicationsAPIClient interface { - ListPlatformApplications(context.Context, *ListPlatformApplicationsInput, ...func(*Options)) (*ListPlatformApplicationsOutput, error) -} - -var _ ListPlatformApplicationsAPIClient = (*Client)(nil) - // ListPlatformApplicationsPaginatorOptions is the paginator options for // ListPlatformApplications type ListPlatformApplicationsPaginatorOptions struct { @@ -204,6 +199,9 @@ func (p *ListPlatformApplicationsPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPlatformApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListPlatformApplicationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListPlatformApplicationsAPIClient is a client that implements the +// ListPlatformApplications operation. +type ListPlatformApplicationsAPIClient interface { + ListPlatformApplications(context.Context, *ListPlatformApplicationsInput, ...func(*Options)) (*ListPlatformApplicationsOutput, error) +} + +var _ ListPlatformApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPlatformApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListSMSSandboxPhoneNumbers.go b/service/sns/api_op_ListSMSSandboxPhoneNumbers.go index 067547f9be0..5c4819c5cfa 100644 --- a/service/sns/api_op_ListSMSSandboxPhoneNumbers.go +++ b/service/sns/api_op_ListSMSSandboxPhoneNumbers.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListSMSSandboxPhoneNumbersMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSMSSandboxPhoneNumbers(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListSMSSandboxPhoneNumbersMiddlewares(stack *middle return nil } -// ListSMSSandboxPhoneNumbersAPIClient is a client that implements the -// ListSMSSandboxPhoneNumbers operation. -type ListSMSSandboxPhoneNumbersAPIClient interface { - ListSMSSandboxPhoneNumbers(context.Context, *ListSMSSandboxPhoneNumbersInput, ...func(*Options)) (*ListSMSSandboxPhoneNumbersOutput, error) -} - -var _ ListSMSSandboxPhoneNumbersAPIClient = (*Client)(nil) - // ListSMSSandboxPhoneNumbersPaginatorOptions is the paginator options for // ListSMSSandboxPhoneNumbers type ListSMSSandboxPhoneNumbersPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListSMSSandboxPhoneNumbersPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSMSSandboxPhoneNumbers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListSMSSandboxPhoneNumbersPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListSMSSandboxPhoneNumbersAPIClient is a client that implements the +// ListSMSSandboxPhoneNumbers operation. +type ListSMSSandboxPhoneNumbersAPIClient interface { + ListSMSSandboxPhoneNumbers(context.Context, *ListSMSSandboxPhoneNumbersInput, ...func(*Options)) (*ListSMSSandboxPhoneNumbersOutput, error) +} + +var _ ListSMSSandboxPhoneNumbersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSMSSandboxPhoneNumbers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListSubscriptions.go b/service/sns/api_op_ListSubscriptions.go index 78948f8e787..9d574439e1c 100644 --- a/service/sns/api_op_ListSubscriptions.go +++ b/service/sns/api_op_ListSubscriptions.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSubscriptionsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscriptions(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListSubscriptionsMiddlewares(stack *middleware.Stac return nil } -// ListSubscriptionsAPIClient is a client that implements the ListSubscriptions -// operation. -type ListSubscriptionsAPIClient interface { - ListSubscriptions(context.Context, *ListSubscriptionsInput, ...func(*Options)) (*ListSubscriptionsOutput, error) -} - -var _ ListSubscriptionsAPIClient = (*Client)(nil) - // ListSubscriptionsPaginatorOptions is the paginator options for ListSubscriptions type ListSubscriptionsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -195,6 +190,9 @@ func (p *ListSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...fun params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +212,14 @@ func (p *ListSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListSubscriptionsAPIClient is a client that implements the ListSubscriptions +// operation. +type ListSubscriptionsAPIClient interface { + ListSubscriptions(context.Context, *ListSubscriptionsInput, ...func(*Options)) (*ListSubscriptionsOutput, error) +} + +var _ ListSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListSubscriptionsByTopic.go b/service/sns/api_op_ListSubscriptionsByTopic.go index 1a8054fccc2..e846d58a818 100644 --- a/service/sns/api_op_ListSubscriptionsByTopic.go +++ b/service/sns/api_op_ListSubscriptionsByTopic.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListSubscriptionsByTopicMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSubscriptionsByTopicValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListSubscriptionsByTopicMiddlewares(stack *middlewa return nil } -// ListSubscriptionsByTopicAPIClient is a client that implements the -// ListSubscriptionsByTopic operation. -type ListSubscriptionsByTopicAPIClient interface { - ListSubscriptionsByTopic(context.Context, *ListSubscriptionsByTopicInput, ...func(*Options)) (*ListSubscriptionsByTopicOutput, error) -} - -var _ ListSubscriptionsByTopicAPIClient = (*Client)(nil) - // ListSubscriptionsByTopicPaginatorOptions is the paginator options for // ListSubscriptionsByTopic type ListSubscriptionsByTopicPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListSubscriptionsByTopicPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSubscriptionsByTopic(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListSubscriptionsByTopicPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSubscriptionsByTopicAPIClient is a client that implements the +// ListSubscriptionsByTopic operation. +type ListSubscriptionsByTopicAPIClient interface { + ListSubscriptionsByTopic(context.Context, *ListSubscriptionsByTopicInput, ...func(*Options)) (*ListSubscriptionsByTopicOutput, error) +} + +var _ ListSubscriptionsByTopicAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSubscriptionsByTopic(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_ListTagsForResource.go b/service/sns/api_op_ListTagsForResource.go index 4013f528302..4d4e368675c 100644 --- a/service/sns/api_op_ListTagsForResource.go +++ b/service/sns/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_ListTopics.go b/service/sns/api_op_ListTopics.go index 4e8486c46bf..7cb37ce018f 100644 --- a/service/sns/api_op_ListTopics.go +++ b/service/sns/api_op_ListTopics.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTopicsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTopics(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListTopicsMiddlewares(stack *middleware.Stack, opti return nil } -// ListTopicsAPIClient is a client that implements the ListTopics operation. -type ListTopicsAPIClient interface { - ListTopics(context.Context, *ListTopicsInput, ...func(*Options)) (*ListTopicsOutput, error) -} - -var _ ListTopicsAPIClient = (*Client)(nil) - // ListTopicsPaginatorOptions is the paginator options for ListTopics type ListTopicsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -192,6 +188,9 @@ func (p *ListTopicsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTopics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -211,6 +210,13 @@ func (p *ListTopicsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListTopicsAPIClient is a client that implements the ListTopics operation. +type ListTopicsAPIClient interface { + ListTopics(context.Context, *ListTopicsInput, ...func(*Options)) (*ListTopicsOutput, error) +} + +var _ ListTopicsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTopics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sns/api_op_OptInPhoneNumber.go b/service/sns/api_op_OptInPhoneNumber.go index 9bdd497ae94..6cd4c5bc0da 100644 --- a/service/sns/api_op_OptInPhoneNumber.go +++ b/service/sns/api_op_OptInPhoneNumber.go @@ -106,6 +106,9 @@ func (c *Client) addOperationOptInPhoneNumberMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpOptInPhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_Publish.go b/service/sns/api_op_Publish.go index 9b0f1668fcf..a7944b496bc 100644 --- a/service/sns/api_op_Publish.go +++ b/service/sns/api_op_Publish.go @@ -252,6 +252,9 @@ func (c *Client) addOperationPublishMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_PublishBatch.go b/service/sns/api_op_PublishBatch.go index 468b58bb41f..a145d53d2cb 100644 --- a/service/sns/api_op_PublishBatch.go +++ b/service/sns/api_op_PublishBatch.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPublishBatchMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPublishBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_PutDataProtectionPolicy.go b/service/sns/api_op_PutDataProtectionPolicy.go index 30dc3f48931..cdae0122b6a 100644 --- a/service/sns/api_op_PutDataProtectionPolicy.go +++ b/service/sns/api_op_PutDataProtectionPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutDataProtectionPolicyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutDataProtectionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_RemovePermission.go b/service/sns/api_op_RemovePermission.go index 13526095747..44386b026a1 100644 --- a/service/sns/api_op_RemovePermission.go +++ b/service/sns/api_op_RemovePermission.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemovePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_SetEndpointAttributes.go b/service/sns/api_op_SetEndpointAttributes.go index c7f5eab9fa2..3868273922b 100644 --- a/service/sns/api_op_SetEndpointAttributes.go +++ b/service/sns/api_op_SetEndpointAttributes.go @@ -123,6 +123,9 @@ func (c *Client) addOperationSetEndpointAttributesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetEndpointAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_SetPlatformApplicationAttributes.go b/service/sns/api_op_SetPlatformApplicationAttributes.go index dcc376b5b48..12e6aa3483b 100644 --- a/service/sns/api_op_SetPlatformApplicationAttributes.go +++ b/service/sns/api_op_SetPlatformApplicationAttributes.go @@ -176,6 +176,9 @@ func (c *Client) addOperationSetPlatformApplicationAttributesMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetPlatformApplicationAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_SetSMSAttributes.go b/service/sns/api_op_SetSMSAttributes.go index 9522c5f29f9..041bea7b7df 100644 --- a/service/sns/api_op_SetSMSAttributes.go +++ b/service/sns/api_op_SetSMSAttributes.go @@ -187,6 +187,9 @@ func (c *Client) addOperationSetSMSAttributesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSMSAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_SetSubscriptionAttributes.go b/service/sns/api_op_SetSubscriptionAttributes.go index 2fbe0436f98..d8d0584b90c 100644 --- a/service/sns/api_op_SetSubscriptionAttributes.go +++ b/service/sns/api_op_SetSubscriptionAttributes.go @@ -155,6 +155,9 @@ func (c *Client) addOperationSetSubscriptionAttributesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSubscriptionAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_SetTopicAttributes.go b/service/sns/api_op_SetTopicAttributes.go index 66cffeea0ab..3a60228e588 100644 --- a/service/sns/api_op_SetTopicAttributes.go +++ b/service/sns/api_op_SetTopicAttributes.go @@ -245,6 +245,9 @@ func (c *Client) addOperationSetTopicAttributesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetTopicAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_Subscribe.go b/service/sns/api_op_Subscribe.go index bf14515eef0..f07bcf27e29 100644 --- a/service/sns/api_op_Subscribe.go +++ b/service/sns/api_op_Subscribe.go @@ -249,6 +249,9 @@ func (c *Client) addOperationSubscribeMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSubscribeValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_TagResource.go b/service/sns/api_op_TagResource.go index 2f214305fd4..abd34118a76 100644 --- a/service/sns/api_op_TagResource.go +++ b/service/sns/api_op_TagResource.go @@ -128,6 +128,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_Unsubscribe.go b/service/sns/api_op_Unsubscribe.go index 81f75c9e635..ff33b0db43b 100644 --- a/service/sns/api_op_Unsubscribe.go +++ b/service/sns/api_op_Unsubscribe.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUnsubscribeMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnsubscribeValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_UntagResource.go b/service/sns/api_op_UntagResource.go index 94f36485851..fbd15193cfc 100644 --- a/service/sns/api_op_UntagResource.go +++ b/service/sns/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/sns/api_op_VerifySMSSandboxPhoneNumber.go b/service/sns/api_op_VerifySMSSandboxPhoneNumber.go index 9e2337fed9d..7a5846066d8 100644 --- a/service/sns/api_op_VerifySMSSandboxPhoneNumber.go +++ b/service/sns/api_op_VerifySMSSandboxPhoneNumber.go @@ -120,6 +120,9 @@ func (c *Client) addOperationVerifySMSSandboxPhoneNumberMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpVerifySMSSandboxPhoneNumberValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_client.go b/service/sqs/api_client.go index e84506af9aa..e6bf506c17b 100644 --- a/service/sqs/api_client.go +++ b/service/sqs/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sqs/api_op_AddPermission.go b/service/sqs/api_op_AddPermission.go index ef4e1633253..0577750aa0f 100644 --- a/service/sqs/api_op_AddPermission.go +++ b/service/sqs/api_op_AddPermission.go @@ -161,6 +161,9 @@ func (c *Client) addOperationAddPermissionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_CancelMessageMoveTask.go b/service/sqs/api_op_CancelMessageMoveTask.go index 42915e6da25..c88b798a5c2 100644 --- a/service/sqs/api_op_CancelMessageMoveTask.go +++ b/service/sqs/api_op_CancelMessageMoveTask.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelMessageMoveTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMessageMoveTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_ChangeMessageVisibility.go b/service/sqs/api_op_ChangeMessageVisibility.go index 86766c39005..163f0807622 100644 --- a/service/sqs/api_op_ChangeMessageVisibility.go +++ b/service/sqs/api_op_ChangeMessageVisibility.go @@ -170,6 +170,9 @@ func (c *Client) addOperationChangeMessageVisibilityMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangeMessageVisibilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_ChangeMessageVisibilityBatch.go b/service/sqs/api_op_ChangeMessageVisibilityBatch.go index f0c7921435f..2b031c90585 100644 --- a/service/sqs/api_op_ChangeMessageVisibilityBatch.go +++ b/service/sqs/api_op_ChangeMessageVisibilityBatch.go @@ -130,6 +130,9 @@ func (c *Client) addOperationChangeMessageVisibilityBatchMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpChangeMessageVisibilityBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_CreateQueue.go b/service/sqs/api_op_CreateQueue.go index 3a7acb22baf..4d8d1c75af6 100644 --- a/service/sqs/api_op_CreateQueue.go +++ b/service/sqs/api_op_CreateQueue.go @@ -354,6 +354,9 @@ func (c *Client) addOperationCreateQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_DeleteMessage.go b/service/sqs/api_op_DeleteMessage.go index a01492273e0..c365e5a30f2 100644 --- a/service/sqs/api_op_DeleteMessage.go +++ b/service/sqs/api_op_DeleteMessage.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteMessageMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_DeleteMessageBatch.go b/service/sqs/api_op_DeleteMessageBatch.go index 92c28d22c3d..8b35d180b34 100644 --- a/service/sqs/api_op_DeleteMessageBatch.go +++ b/service/sqs/api_op_DeleteMessageBatch.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDeleteMessageBatchMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMessageBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_DeleteQueue.go b/service/sqs/api_op_DeleteQueue.go index 21352928c29..c25d7664d30 100644 --- a/service/sqs/api_op_DeleteQueue.go +++ b/service/sqs/api_op_DeleteQueue.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteQueueMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_GetQueueAttributes.go b/service/sqs/api_op_GetQueueAttributes.go index 9468951e011..5b64a2bd1b8 100644 --- a/service/sqs/api_op_GetQueueAttributes.go +++ b/service/sqs/api_op_GetQueueAttributes.go @@ -278,6 +278,9 @@ func (c *Client) addOperationGetQueueAttributesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueueAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_GetQueueUrl.go b/service/sqs/api_op_GetQueueUrl.go index b19ee8c290c..44641059cc8 100644 --- a/service/sqs/api_op_GetQueueUrl.go +++ b/service/sqs/api_op_GetQueueUrl.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetQueueUrlMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQueueUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_ListDeadLetterSourceQueues.go b/service/sqs/api_op_ListDeadLetterSourceQueues.go index 759b7ef43f3..e6ad7457085 100644 --- a/service/sqs/api_op_ListDeadLetterSourceQueues.go +++ b/service/sqs/api_op_ListDeadLetterSourceQueues.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDeadLetterSourceQueuesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListDeadLetterSourceQueuesMiddlewares(stack *middle return nil } -// ListDeadLetterSourceQueuesAPIClient is a client that implements the -// ListDeadLetterSourceQueues operation. -type ListDeadLetterSourceQueuesAPIClient interface { - ListDeadLetterSourceQueues(context.Context, *ListDeadLetterSourceQueuesInput, ...func(*Options)) (*ListDeadLetterSourceQueuesOutput, error) -} - -var _ ListDeadLetterSourceQueuesAPIClient = (*Client)(nil) - // ListDeadLetterSourceQueuesPaginatorOptions is the paginator options for // ListDeadLetterSourceQueues type ListDeadLetterSourceQueuesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *ListDeadLetterSourceQueuesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDeadLetterSourceQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *ListDeadLetterSourceQueuesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListDeadLetterSourceQueuesAPIClient is a client that implements the +// ListDeadLetterSourceQueues operation. +type ListDeadLetterSourceQueuesAPIClient interface { + ListDeadLetterSourceQueues(context.Context, *ListDeadLetterSourceQueuesInput, ...func(*Options)) (*ListDeadLetterSourceQueuesOutput, error) +} + +var _ ListDeadLetterSourceQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDeadLetterSourceQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sqs/api_op_ListMessageMoveTasks.go b/service/sqs/api_op_ListMessageMoveTasks.go index bd6eef8e8b2..c315f91004b 100644 --- a/service/sqs/api_op_ListMessageMoveTasks.go +++ b/service/sqs/api_op_ListMessageMoveTasks.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListMessageMoveTasksMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMessageMoveTasksValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_ListQueueTags.go b/service/sqs/api_op_ListQueueTags.go index 83b4c9e049f..a84da75947b 100644 --- a/service/sqs/api_op_ListQueueTags.go +++ b/service/sqs/api_op_ListQueueTags.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListQueueTagsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQueueTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_ListQueues.go b/service/sqs/api_op_ListQueues.go index 43df9d852ca..5ebf5648f50 100644 --- a/service/sqs/api_op_ListQueues.go +++ b/service/sqs/api_op_ListQueues.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueues(options.Region), middleware.Before); err != nil { return err } @@ -156,13 +159,6 @@ func (c *Client) addOperationListQueuesMiddlewares(stack *middleware.Stack, opti return nil } -// ListQueuesAPIClient is a client that implements the ListQueues operation. -type ListQueuesAPIClient interface { - ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) -} - -var _ ListQueuesAPIClient = (*Client)(nil) - // ListQueuesPaginatorOptions is the paginator options for ListQueues type ListQueuesPaginatorOptions struct { // Maximum number of results to include in the response. Value range is 1 to 1000. @@ -227,6 +223,9 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQueues(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +245,13 @@ func (p *ListQueuesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListQueuesAPIClient is a client that implements the ListQueues operation. +type ListQueuesAPIClient interface { + ListQueues(context.Context, *ListQueuesInput, ...func(*Options)) (*ListQueuesOutput, error) +} + +var _ ListQueuesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQueues(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sqs/api_op_PurgeQueue.go b/service/sqs/api_op_PurgeQueue.go index b92ccfe2a08..4781c017a07 100644 --- a/service/sqs/api_op_PurgeQueue.go +++ b/service/sqs/api_op_PurgeQueue.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPurgeQueueMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPurgeQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_ReceiveMessage.go b/service/sqs/api_op_ReceiveMessage.go index d295246cfb1..3245a405a1a 100644 --- a/service/sqs/api_op_ReceiveMessage.go +++ b/service/sqs/api_op_ReceiveMessage.go @@ -344,6 +344,9 @@ func (c *Client) addOperationReceiveMessageMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpReceiveMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_RemovePermission.go b/service/sqs/api_op_RemovePermission.go index a3e8112add2..a83f4d95b4d 100644 --- a/service/sqs/api_op_RemovePermission.go +++ b/service/sqs/api_op_RemovePermission.go @@ -121,6 +121,9 @@ func (c *Client) addOperationRemovePermissionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemovePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_SendMessage.go b/service/sqs/api_op_SendMessage.go index 43a988203c6..739dcdbc3db 100644 --- a/service/sqs/api_op_SendMessage.go +++ b/service/sqs/api_op_SendMessage.go @@ -282,6 +282,9 @@ func (c *Client) addOperationSendMessageMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_SendMessageBatch.go b/service/sqs/api_op_SendMessageBatch.go index 489e17cd991..cd32a3145dc 100644 --- a/service/sqs/api_op_SendMessageBatch.go +++ b/service/sqs/api_op_SendMessageBatch.go @@ -152,6 +152,9 @@ func (c *Client) addOperationSendMessageBatchMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendMessageBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_SetQueueAttributes.go b/service/sqs/api_op_SetQueueAttributes.go index f57c54cf022..0a20b061b28 100644 --- a/service/sqs/api_op_SetQueueAttributes.go +++ b/service/sqs/api_op_SetQueueAttributes.go @@ -286,6 +286,9 @@ func (c *Client) addOperationSetQueueAttributesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetQueueAttributesValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_StartMessageMoveTask.go b/service/sqs/api_op_StartMessageMoveTask.go index 1550be0630d..378e78cb8a5 100644 --- a/service/sqs/api_op_StartMessageMoveTask.go +++ b/service/sqs/api_op_StartMessageMoveTask.go @@ -139,6 +139,9 @@ func (c *Client) addOperationStartMessageMoveTaskMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMessageMoveTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_TagQueue.go b/service/sqs/api_op_TagQueue.go index 7327523b66a..8a062de5cf0 100644 --- a/service/sqs/api_op_TagQueue.go +++ b/service/sqs/api_op_TagQueue.go @@ -128,6 +128,9 @@ func (c *Client) addOperationTagQueueMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/sqs/api_op_UntagQueue.go b/service/sqs/api_op_UntagQueue.go index e8faae1991a..3129e81616e 100644 --- a/service/sqs/api_op_UntagQueue.go +++ b/service/sqs/api_op_UntagQueue.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagQueueMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagQueueValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_client.go b/service/ssm/api_client.go index d3920b34194..353d5b07037 100644 --- a/service/ssm/api_client.go +++ b/service/ssm/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ssm/api_op_AddTagsToResource.go b/service/ssm/api_op_AddTagsToResource.go index 67413b4b5d3..0754fc27112 100644 --- a/service/ssm/api_op_AddTagsToResource.go +++ b/service/ssm/api_op_AddTagsToResource.go @@ -175,6 +175,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_AssociateOpsItemRelatedItem.go b/service/ssm/api_op_AssociateOpsItemRelatedItem.go index 3d58b354a89..65a471be4e6 100644 --- a/service/ssm/api_op_AssociateOpsItemRelatedItem.go +++ b/service/ssm/api_op_AssociateOpsItemRelatedItem.go @@ -131,6 +131,9 @@ func (c *Client) addOperationAssociateOpsItemRelatedItemMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateOpsItemRelatedItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CancelCommand.go b/service/ssm/api_op_CancelCommand.go index 50c80ccc892..007417b6a6a 100644 --- a/service/ssm/api_op_CancelCommand.go +++ b/service/ssm/api_op_CancelCommand.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCancelCommandMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelCommandValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CancelMaintenanceWindowExecution.go b/service/ssm/api_op_CancelMaintenanceWindowExecution.go index 35dc818ddd1..08c93497f80 100644 --- a/service/ssm/api_op_CancelMaintenanceWindowExecution.go +++ b/service/ssm/api_op_CancelMaintenanceWindowExecution.go @@ -107,6 +107,9 @@ func (c *Client) addOperationCancelMaintenanceWindowExecutionMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelMaintenanceWindowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreateActivation.go b/service/ssm/api_op_CreateActivation.go index d9797c6f038..8df00eb1d1b 100644 --- a/service/ssm/api_op_CreateActivation.go +++ b/service/ssm/api_op_CreateActivation.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreateActivationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateActivationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreateAssociation.go b/service/ssm/api_op_CreateAssociation.go index 2f1a0b1166d..7ceb3a536ba 100644 --- a/service/ssm/api_op_CreateAssociation.go +++ b/service/ssm/api_op_CreateAssociation.go @@ -293,6 +293,9 @@ func (c *Client) addOperationCreateAssociationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreateAssociationBatch.go b/service/ssm/api_op_CreateAssociationBatch.go index 5659b6e5ef6..d2732024247 100644 --- a/service/ssm/api_op_CreateAssociationBatch.go +++ b/service/ssm/api_op_CreateAssociationBatch.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateAssociationBatchMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAssociationBatchValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreateDocument.go b/service/ssm/api_op_CreateDocument.go index 9504b8a4a36..3278ea09550 100644 --- a/service/ssm/api_op_CreateDocument.go +++ b/service/ssm/api_op_CreateDocument.go @@ -204,6 +204,9 @@ func (c *Client) addOperationCreateDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreateMaintenanceWindow.go b/service/ssm/api_op_CreateMaintenanceWindow.go index ff65f53dd11..fc560cb78ae 100644 --- a/service/ssm/api_op_CreateMaintenanceWindow.go +++ b/service/ssm/api_op_CreateMaintenanceWindow.go @@ -195,6 +195,9 @@ func (c *Client) addOperationCreateMaintenanceWindowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMaintenanceWindowMiddleware(stack, options); err != nil { return err } diff --git a/service/ssm/api_op_CreateOpsItem.go b/service/ssm/api_op_CreateOpsItem.go index 7f92815f67d..9232382c084 100644 --- a/service/ssm/api_op_CreateOpsItem.go +++ b/service/ssm/api_op_CreateOpsItem.go @@ -233,6 +233,9 @@ func (c *Client) addOperationCreateOpsItemMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOpsItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreateOpsMetadata.go b/service/ssm/api_op_CreateOpsMetadata.go index 1faf4180d9d..60eebb0fd71 100644 --- a/service/ssm/api_op_CreateOpsMetadata.go +++ b/service/ssm/api_op_CreateOpsMetadata.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateOpsMetadataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateOpsMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_CreatePatchBaseline.go b/service/ssm/api_op_CreatePatchBaseline.go index 0587f78db64..c9bfea3a321 100644 --- a/service/ssm/api_op_CreatePatchBaseline.go +++ b/service/ssm/api_op_CreatePatchBaseline.go @@ -184,6 +184,9 @@ func (c *Client) addOperationCreatePatchBaselineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePatchBaselineMiddleware(stack, options); err != nil { return err } diff --git a/service/ssm/api_op_CreateResourceDataSync.go b/service/ssm/api_op_CreateResourceDataSync.go index ed2c31a5ab2..020757414f7 100644 --- a/service/ssm/api_op_CreateResourceDataSync.go +++ b/service/ssm/api_op_CreateResourceDataSync.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateResourceDataSyncMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceDataSyncValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteActivation.go b/service/ssm/api_op_DeleteActivation.go index 0fbaefab1e3..9f5bc17ecc1 100644 --- a/service/ssm/api_op_DeleteActivation.go +++ b/service/ssm/api_op_DeleteActivation.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteActivationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteActivationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteAssociation.go b/service/ssm/api_op_DeleteAssociation.go index e672480e6e2..ce9dcb77396 100644 --- a/service/ssm/api_op_DeleteAssociation.go +++ b/service/ssm/api_op_DeleteAssociation.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteAssociationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAssociation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ssm/api_op_DeleteDocument.go b/service/ssm/api_op_DeleteDocument.go index b3215b8be9b..abf07ac0705 100644 --- a/service/ssm/api_op_DeleteDocument.go +++ b/service/ssm/api_op_DeleteDocument.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteInventory.go b/service/ssm/api_op_DeleteInventory.go index 29f016fed1d..0545461d443 100644 --- a/service/ssm/api_op_DeleteInventory.go +++ b/service/ssm/api_op_DeleteInventory.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDeleteInventoryMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteInventoryMiddleware(stack, options); err != nil { return err } diff --git a/service/ssm/api_op_DeleteMaintenanceWindow.go b/service/ssm/api_op_DeleteMaintenanceWindow.go index be4a1081293..c1bbb360697 100644 --- a/service/ssm/api_op_DeleteMaintenanceWindow.go +++ b/service/ssm/api_op_DeleteMaintenanceWindow.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteMaintenanceWindowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMaintenanceWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteOpsItem.go b/service/ssm/api_op_DeleteOpsItem.go index d46df5ffadd..c3dd4e48250 100644 --- a/service/ssm/api_op_DeleteOpsItem.go +++ b/service/ssm/api_op_DeleteOpsItem.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteOpsItemMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOpsItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteOpsMetadata.go b/service/ssm/api_op_DeleteOpsMetadata.go index 71170e6363d..a5e6ddb6e7a 100644 --- a/service/ssm/api_op_DeleteOpsMetadata.go +++ b/service/ssm/api_op_DeleteOpsMetadata.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteOpsMetadataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteOpsMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteParameter.go b/service/ssm/api_op_DeleteParameter.go index e65dc1feb27..fe44e608f6a 100644 --- a/service/ssm/api_op_DeleteParameter.go +++ b/service/ssm/api_op_DeleteParameter.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteParameterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteParameterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteParameters.go b/service/ssm/api_op_DeleteParameters.go index 14dbfb69551..a974699eb8f 100644 --- a/service/ssm/api_op_DeleteParameters.go +++ b/service/ssm/api_op_DeleteParameters.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteParametersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeletePatchBaseline.go b/service/ssm/api_op_DeletePatchBaseline.go index 731e676578e..6c90be6a929 100644 --- a/service/ssm/api_op_DeletePatchBaseline.go +++ b/service/ssm/api_op_DeletePatchBaseline.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeletePatchBaselineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePatchBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteResourceDataSync.go b/service/ssm/api_op_DeleteResourceDataSync.go index 40c026ba233..0dae2049871 100644 --- a/service/ssm/api_op_DeleteResourceDataSync.go +++ b/service/ssm/api_op_DeleteResourceDataSync.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteResourceDataSyncMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceDataSyncValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeleteResourcePolicy.go b/service/ssm/api_op_DeleteResourcePolicy.go index 2c5792ce327..d3b64d13db0 100644 --- a/service/ssm/api_op_DeleteResourcePolicy.go +++ b/service/ssm/api_op_DeleteResourcePolicy.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeregisterManagedInstance.go b/service/ssm/api_op_DeregisterManagedInstance.go index 651223fa888..c48e2d597f6 100644 --- a/service/ssm/api_op_DeregisterManagedInstance.go +++ b/service/ssm/api_op_DeregisterManagedInstance.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeregisterManagedInstanceMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterManagedInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go b/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go index a9129f20cd0..fee065bcf8c 100644 --- a/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go +++ b/service/ssm/api_op_DeregisterPatchBaselineForPatchGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeregisterPatchBaselineForPatchGroupMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go b/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go index b54cfe5132e..aba811b3063 100644 --- a/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go +++ b/service/ssm/api_op_DeregisterTargetFromMaintenanceWindow.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeregisterTargetFromMaintenanceWindowMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterTargetFromMaintenanceWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go b/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go index 222f9edbd49..ea0491df983 100644 --- a/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go +++ b/service/ssm/api_op_DeregisterTaskFromMaintenanceWindow.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeregisterTaskFromMaintenanceWindowMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterTaskFromMaintenanceWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DescribeActivations.go b/service/ssm/api_op_DescribeActivations.go index 9e8d41897c0..68aa66f9e54 100644 --- a/service/ssm/api_op_DescribeActivations.go +++ b/service/ssm/api_op_DescribeActivations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActivations(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeActivationsMiddlewares(stack *middleware.St return nil } -// DescribeActivationsAPIClient is a client that implements the -// DescribeActivations operation. -type DescribeActivationsAPIClient interface { - DescribeActivations(context.Context, *DescribeActivationsInput, ...func(*Options)) (*DescribeActivationsOutput, error) -} - -var _ DescribeActivationsAPIClient = (*Client)(nil) - // DescribeActivationsPaginatorOptions is the paginator options for // DescribeActivations type DescribeActivationsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *DescribeActivationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeActivations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribeActivationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeActivationsAPIClient is a client that implements the +// DescribeActivations operation. +type DescribeActivationsAPIClient interface { + DescribeActivations(context.Context, *DescribeActivationsInput, ...func(*Options)) (*DescribeActivationsOutput, error) +} + +var _ DescribeActivationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeActivations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeAssociation.go b/service/ssm/api_op_DescribeAssociation.go index 8ebc19e1881..a0437f5de34 100644 --- a/service/ssm/api_op_DescribeAssociation.go +++ b/service/ssm/api_op_DescribeAssociation.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeAssociationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAssociation(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ssm/api_op_DescribeAssociationExecutionTargets.go b/service/ssm/api_op_DescribeAssociationExecutionTargets.go index 58c1eeb0722..57cce65faa3 100644 --- a/service/ssm/api_op_DescribeAssociationExecutionTargets.go +++ b/service/ssm/api_op_DescribeAssociationExecutionTargets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssociationExecutionTargetsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationDescribeAssociationExecutionTargetsMiddlewares(stac return nil } -// DescribeAssociationExecutionTargetsAPIClient is a client that implements the -// DescribeAssociationExecutionTargets operation. -type DescribeAssociationExecutionTargetsAPIClient interface { - DescribeAssociationExecutionTargets(context.Context, *DescribeAssociationExecutionTargetsInput, ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) -} - -var _ DescribeAssociationExecutionTargetsAPIClient = (*Client)(nil) - // DescribeAssociationExecutionTargetsPaginatorOptions is the paginator options // for DescribeAssociationExecutionTargets type DescribeAssociationExecutionTargetsPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *DescribeAssociationExecutionTargetsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAssociationExecutionTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *DescribeAssociationExecutionTargetsPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeAssociationExecutionTargetsAPIClient is a client that implements the +// DescribeAssociationExecutionTargets operation. +type DescribeAssociationExecutionTargetsAPIClient interface { + DescribeAssociationExecutionTargets(context.Context, *DescribeAssociationExecutionTargetsInput, ...func(*Options)) (*DescribeAssociationExecutionTargetsOutput, error) +} + +var _ DescribeAssociationExecutionTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAssociationExecutionTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeAssociationExecutions.go b/service/ssm/api_op_DescribeAssociationExecutions.go index 3b560ee133b..fa90d072033 100644 --- a/service/ssm/api_op_DescribeAssociationExecutions.go +++ b/service/ssm/api_op_DescribeAssociationExecutions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAssociationExecutionsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeAssociationExecutionsMiddlewares(stack *mid return nil } -// DescribeAssociationExecutionsAPIClient is a client that implements the -// DescribeAssociationExecutions operation. -type DescribeAssociationExecutionsAPIClient interface { - DescribeAssociationExecutions(context.Context, *DescribeAssociationExecutionsInput, ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) -} - -var _ DescribeAssociationExecutionsAPIClient = (*Client)(nil) - // DescribeAssociationExecutionsPaginatorOptions is the paginator options for // DescribeAssociationExecutions type DescribeAssociationExecutionsPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeAssociationExecutionsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAssociationExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeAssociationExecutionsPaginator) NextPage(ctx context.Context, o return result, nil } +// DescribeAssociationExecutionsAPIClient is a client that implements the +// DescribeAssociationExecutions operation. +type DescribeAssociationExecutionsAPIClient interface { + DescribeAssociationExecutions(context.Context, *DescribeAssociationExecutionsInput, ...func(*Options)) (*DescribeAssociationExecutionsOutput, error) +} + +var _ DescribeAssociationExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAssociationExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeAutomationExecutions.go b/service/ssm/api_op_DescribeAutomationExecutions.go index e95dc2da6d7..4a868c84091 100644 --- a/service/ssm/api_op_DescribeAutomationExecutions.go +++ b/service/ssm/api_op_DescribeAutomationExecutions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAutomationExecutionsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeAutomationExecutionsMiddlewares(stack *midd return nil } -// DescribeAutomationExecutionsAPIClient is a client that implements the -// DescribeAutomationExecutions operation. -type DescribeAutomationExecutionsAPIClient interface { - DescribeAutomationExecutions(context.Context, *DescribeAutomationExecutionsInput, ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) -} - -var _ DescribeAutomationExecutionsAPIClient = (*Client)(nil) - // DescribeAutomationExecutionsPaginatorOptions is the paginator options for // DescribeAutomationExecutions type DescribeAutomationExecutionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeAutomationExecutionsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAutomationExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeAutomationExecutionsPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeAutomationExecutionsAPIClient is a client that implements the +// DescribeAutomationExecutions operation. +type DescribeAutomationExecutionsAPIClient interface { + DescribeAutomationExecutions(context.Context, *DescribeAutomationExecutionsInput, ...func(*Options)) (*DescribeAutomationExecutionsOutput, error) +} + +var _ DescribeAutomationExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAutomationExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeAutomationStepExecutions.go b/service/ssm/api_op_DescribeAutomationStepExecutions.go index 6f95e346ed1..758e0687b90 100644 --- a/service/ssm/api_op_DescribeAutomationStepExecutions.go +++ b/service/ssm/api_op_DescribeAutomationStepExecutions.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAutomationStepExecutionsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeAutomationStepExecutionsMiddlewares(stack * return nil } -// DescribeAutomationStepExecutionsAPIClient is a client that implements the -// DescribeAutomationStepExecutions operation. -type DescribeAutomationStepExecutionsAPIClient interface { - DescribeAutomationStepExecutions(context.Context, *DescribeAutomationStepExecutionsInput, ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) -} - -var _ DescribeAutomationStepExecutionsAPIClient = (*Client)(nil) - // DescribeAutomationStepExecutionsPaginatorOptions is the paginator options for // DescribeAutomationStepExecutions type DescribeAutomationStepExecutionsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *DescribeAutomationStepExecutionsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAutomationStepExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *DescribeAutomationStepExecutionsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeAutomationStepExecutionsAPIClient is a client that implements the +// DescribeAutomationStepExecutions operation. +type DescribeAutomationStepExecutionsAPIClient interface { + DescribeAutomationStepExecutions(context.Context, *DescribeAutomationStepExecutionsInput, ...func(*Options)) (*DescribeAutomationStepExecutionsOutput, error) +} + +var _ DescribeAutomationStepExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAutomationStepExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeAvailablePatches.go b/service/ssm/api_op_DescribeAvailablePatches.go index 6fff267588d..f376e8f7bc3 100644 --- a/service/ssm/api_op_DescribeAvailablePatches.go +++ b/service/ssm/api_op_DescribeAvailablePatches.go @@ -205,6 +205,9 @@ func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAvailablePatches(options.Region), middleware.Before); err != nil { return err } @@ -226,14 +229,6 @@ func (c *Client) addOperationDescribeAvailablePatchesMiddlewares(stack *middlewa return nil } -// DescribeAvailablePatchesAPIClient is a client that implements the -// DescribeAvailablePatches operation. -type DescribeAvailablePatchesAPIClient interface { - DescribeAvailablePatches(context.Context, *DescribeAvailablePatchesInput, ...func(*Options)) (*DescribeAvailablePatchesOutput, error) -} - -var _ DescribeAvailablePatchesAPIClient = (*Client)(nil) - // DescribeAvailablePatchesPaginatorOptions is the paginator options for // DescribeAvailablePatches type DescribeAvailablePatchesPaginatorOptions struct { @@ -299,6 +294,9 @@ func (p *DescribeAvailablePatchesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeAvailablePatches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -318,6 +316,14 @@ func (p *DescribeAvailablePatchesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeAvailablePatchesAPIClient is a client that implements the +// DescribeAvailablePatches operation. +type DescribeAvailablePatchesAPIClient interface { + DescribeAvailablePatches(context.Context, *DescribeAvailablePatchesInput, ...func(*Options)) (*DescribeAvailablePatchesOutput, error) +} + +var _ DescribeAvailablePatchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeAvailablePatches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeDocument.go b/service/ssm/api_op_DescribeDocument.go index 5b1d9666a04..0ab1102aae1 100644 --- a/service/ssm/api_op_DescribeDocument.go +++ b/service/ssm/api_op_DescribeDocument.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeDocumentMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DescribeDocumentPermission.go b/service/ssm/api_op_DescribeDocumentPermission.go index 393ad79c92e..310ee7969ef 100644 --- a/service/ssm/api_op_DescribeDocumentPermission.go +++ b/service/ssm/api_op_DescribeDocumentPermission.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeDocumentPermissionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDocumentPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go b/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go index 1ab2c10dd54..2a6a6209cc6 100644 --- a/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go +++ b/service/ssm/api_op_DescribeEffectiveInstanceAssociations.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEffectiveInstanceAssociationsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeEffectiveInstanceAssociationsMiddlewares(st return nil } -// DescribeEffectiveInstanceAssociationsAPIClient is a client that implements the -// DescribeEffectiveInstanceAssociations operation. -type DescribeEffectiveInstanceAssociationsAPIClient interface { - DescribeEffectiveInstanceAssociations(context.Context, *DescribeEffectiveInstanceAssociationsInput, ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) -} - -var _ DescribeEffectiveInstanceAssociationsAPIClient = (*Client)(nil) - // DescribeEffectiveInstanceAssociationsPaginatorOptions is the paginator options // for DescribeEffectiveInstanceAssociations type DescribeEffectiveInstanceAssociationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeEffectiveInstanceAssociationsPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEffectiveInstanceAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeEffectiveInstanceAssociationsPaginator) NextPage(ctx context.Co return result, nil } +// DescribeEffectiveInstanceAssociationsAPIClient is a client that implements the +// DescribeEffectiveInstanceAssociations operation. +type DescribeEffectiveInstanceAssociationsAPIClient interface { + DescribeEffectiveInstanceAssociations(context.Context, *DescribeEffectiveInstanceAssociationsInput, ...func(*Options)) (*DescribeEffectiveInstanceAssociationsOutput, error) +} + +var _ DescribeEffectiveInstanceAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEffectiveInstanceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go b/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go index cfcaa28a887..ed7d8e8cfd8 100644 --- a/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go +++ b/service/ssm/api_op_DescribeEffectivePatchesForPatchBaseline.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEffectivePatchesForPatchBaselineValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeEffectivePatchesForPatchBaselineMiddlewares return nil } -// DescribeEffectivePatchesForPatchBaselineAPIClient is a client that implements -// the DescribeEffectivePatchesForPatchBaseline operation. -type DescribeEffectivePatchesForPatchBaselineAPIClient interface { - DescribeEffectivePatchesForPatchBaseline(context.Context, *DescribeEffectivePatchesForPatchBaselineInput, ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) -} - -var _ DescribeEffectivePatchesForPatchBaselineAPIClient = (*Client)(nil) - // DescribeEffectivePatchesForPatchBaselinePaginatorOptions is the paginator // options for DescribeEffectivePatchesForPatchBaseline type DescribeEffectivePatchesForPatchBaselinePaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeEffectivePatchesForPatchBaselinePaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeEffectivePatchesForPatchBaseline(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeEffectivePatchesForPatchBaselinePaginator) NextPage(ctx context return result, nil } +// DescribeEffectivePatchesForPatchBaselineAPIClient is a client that implements +// the DescribeEffectivePatchesForPatchBaseline operation. +type DescribeEffectivePatchesForPatchBaselineAPIClient interface { + DescribeEffectivePatchesForPatchBaseline(context.Context, *DescribeEffectivePatchesForPatchBaselineInput, ...func(*Options)) (*DescribeEffectivePatchesForPatchBaselineOutput, error) +} + +var _ DescribeEffectivePatchesForPatchBaselineAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeEffectivePatchesForPatchBaseline(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInstanceAssociationsStatus.go b/service/ssm/api_op_DescribeInstanceAssociationsStatus.go index 51ad6394c36..64bc7d41d13 100644 --- a/service/ssm/api_op_DescribeInstanceAssociationsStatus.go +++ b/service/ssm/api_op_DescribeInstanceAssociationsStatus.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceAssociationsStatusValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeInstanceAssociationsStatusMiddlewares(stack return nil } -// DescribeInstanceAssociationsStatusAPIClient is a client that implements the -// DescribeInstanceAssociationsStatus operation. -type DescribeInstanceAssociationsStatusAPIClient interface { - DescribeInstanceAssociationsStatus(context.Context, *DescribeInstanceAssociationsStatusInput, ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) -} - -var _ DescribeInstanceAssociationsStatusAPIClient = (*Client)(nil) - // DescribeInstanceAssociationsStatusPaginatorOptions is the paginator options for // DescribeInstanceAssociationsStatus type DescribeInstanceAssociationsStatusPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *DescribeInstanceAssociationsStatusPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceAssociationsStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *DescribeInstanceAssociationsStatusPaginator) NextPage(ctx context.Conte return result, nil } +// DescribeInstanceAssociationsStatusAPIClient is a client that implements the +// DescribeInstanceAssociationsStatus operation. +type DescribeInstanceAssociationsStatusAPIClient interface { + DescribeInstanceAssociationsStatus(context.Context, *DescribeInstanceAssociationsStatusInput, ...func(*Options)) (*DescribeInstanceAssociationsStatusOutput, error) +} + +var _ DescribeInstanceAssociationsStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceAssociationsStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInstanceInformation.go b/service/ssm/api_op_DescribeInstanceInformation.go index e0e14ab07d7..abaa087d5a4 100644 --- a/service/ssm/api_op_DescribeInstanceInformation.go +++ b/service/ssm/api_op_DescribeInstanceInformation.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceInformationValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationDescribeInstanceInformationMiddlewares(stack *middl return nil } -// DescribeInstanceInformationAPIClient is a client that implements the -// DescribeInstanceInformation operation. -type DescribeInstanceInformationAPIClient interface { - DescribeInstanceInformation(context.Context, *DescribeInstanceInformationInput, ...func(*Options)) (*DescribeInstanceInformationOutput, error) -} - -var _ DescribeInstanceInformationAPIClient = (*Client)(nil) - // DescribeInstanceInformationPaginatorOptions is the paginator options for // DescribeInstanceInformation type DescribeInstanceInformationPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeInstanceInformationPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceInformation(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeInstanceInformationPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeInstanceInformationAPIClient is a client that implements the +// DescribeInstanceInformation operation. +type DescribeInstanceInformationAPIClient interface { + DescribeInstanceInformation(context.Context, *DescribeInstanceInformationInput, ...func(*Options)) (*DescribeInstanceInformationOutput, error) +} + +var _ DescribeInstanceInformationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceInformation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInstancePatchStates.go b/service/ssm/api_op_DescribeInstancePatchStates.go index 96287784a2f..7ef0527547f 100644 --- a/service/ssm/api_op_DescribeInstancePatchStates.go +++ b/service/ssm/api_op_DescribeInstancePatchStates.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstancePatchStatesValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationDescribeInstancePatchStatesMiddlewares(stack *middl return nil } -// DescribeInstancePatchStatesAPIClient is a client that implements the -// DescribeInstancePatchStates operation. -type DescribeInstancePatchStatesAPIClient interface { - DescribeInstancePatchStates(context.Context, *DescribeInstancePatchStatesInput, ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) -} - -var _ DescribeInstancePatchStatesAPIClient = (*Client)(nil) - // DescribeInstancePatchStatesPaginatorOptions is the paginator options for // DescribeInstancePatchStates type DescribeInstancePatchStatesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeInstancePatchStatesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstancePatchStates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeInstancePatchStatesPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeInstancePatchStatesAPIClient is a client that implements the +// DescribeInstancePatchStates operation. +type DescribeInstancePatchStatesAPIClient interface { + DescribeInstancePatchStates(context.Context, *DescribeInstancePatchStatesInput, ...func(*Options)) (*DescribeInstancePatchStatesOutput, error) +} + +var _ DescribeInstancePatchStatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstancePatchStates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go b/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go index 7bd9a877082..9a56eff0c6c 100644 --- a/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go +++ b/service/ssm/api_op_DescribeInstancePatchStatesForPatchGroup.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstancePatchStatesForPatchGroupValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationDescribeInstancePatchStatesForPatchGroupMiddlewares return nil } -// DescribeInstancePatchStatesForPatchGroupAPIClient is a client that implements -// the DescribeInstancePatchStatesForPatchGroup operation. -type DescribeInstancePatchStatesForPatchGroupAPIClient interface { - DescribeInstancePatchStatesForPatchGroup(context.Context, *DescribeInstancePatchStatesForPatchGroupInput, ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) -} - -var _ DescribeInstancePatchStatesForPatchGroupAPIClient = (*Client)(nil) - // DescribeInstancePatchStatesForPatchGroupPaginatorOptions is the paginator // options for DescribeInstancePatchStatesForPatchGroup type DescribeInstancePatchStatesForPatchGroupPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeInstancePatchStatesForPatchGroupPaginator) NextPage(ctx context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstancePatchStatesForPatchGroup(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeInstancePatchStatesForPatchGroupPaginator) NextPage(ctx context return result, nil } +// DescribeInstancePatchStatesForPatchGroupAPIClient is a client that implements +// the DescribeInstancePatchStatesForPatchGroup operation. +type DescribeInstancePatchStatesForPatchGroupAPIClient interface { + DescribeInstancePatchStatesForPatchGroup(context.Context, *DescribeInstancePatchStatesForPatchGroupInput, ...func(*Options)) (*DescribeInstancePatchStatesForPatchGroupOutput, error) +} + +var _ DescribeInstancePatchStatesForPatchGroupAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstancePatchStatesForPatchGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInstancePatches.go b/service/ssm/api_op_DescribeInstancePatches.go index 00c11469534..d78eed397c1 100644 --- a/service/ssm/api_op_DescribeInstancePatches.go +++ b/service/ssm/api_op_DescribeInstancePatches.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstancePatchesValidationMiddleware(stack); err != nil { return err } @@ -182,14 +185,6 @@ func (c *Client) addOperationDescribeInstancePatchesMiddlewares(stack *middlewar return nil } -// DescribeInstancePatchesAPIClient is a client that implements the -// DescribeInstancePatches operation. -type DescribeInstancePatchesAPIClient interface { - DescribeInstancePatches(context.Context, *DescribeInstancePatchesInput, ...func(*Options)) (*DescribeInstancePatchesOutput, error) -} - -var _ DescribeInstancePatchesAPIClient = (*Client)(nil) - // DescribeInstancePatchesPaginatorOptions is the paginator options for // DescribeInstancePatches type DescribeInstancePatchesPaginatorOptions struct { @@ -255,6 +250,9 @@ func (p *DescribeInstancePatchesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstancePatches(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -274,6 +272,14 @@ func (p *DescribeInstancePatchesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeInstancePatchesAPIClient is a client that implements the +// DescribeInstancePatches operation. +type DescribeInstancePatchesAPIClient interface { + DescribeInstancePatches(context.Context, *DescribeInstancePatchesInput, ...func(*Options)) (*DescribeInstancePatchesOutput, error) +} + +var _ DescribeInstancePatchesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstancePatches(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInstanceProperties.go b/service/ssm/api_op_DescribeInstanceProperties.go index 6f3df0a5c5b..e80e3ad4f74 100644 --- a/service/ssm/api_op_DescribeInstanceProperties.go +++ b/service/ssm/api_op_DescribeInstanceProperties.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstancePropertiesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeInstancePropertiesMiddlewares(stack *middle return nil } -// DescribeInstancePropertiesAPIClient is a client that implements the -// DescribeInstanceProperties operation. -type DescribeInstancePropertiesAPIClient interface { - DescribeInstanceProperties(context.Context, *DescribeInstancePropertiesInput, ...func(*Options)) (*DescribeInstancePropertiesOutput, error) -} - -var _ DescribeInstancePropertiesAPIClient = (*Client)(nil) - // DescribeInstancePropertiesPaginatorOptions is the paginator options for // DescribeInstanceProperties type DescribeInstancePropertiesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *DescribeInstancePropertiesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInstanceProperties(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *DescribeInstancePropertiesPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeInstancePropertiesAPIClient is a client that implements the +// DescribeInstanceProperties operation. +type DescribeInstancePropertiesAPIClient interface { + DescribeInstanceProperties(context.Context, *DescribeInstancePropertiesInput, ...func(*Options)) (*DescribeInstancePropertiesOutput, error) +} + +var _ DescribeInstancePropertiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInstanceProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeInventoryDeletions.go b/service/ssm/api_op_DescribeInventoryDeletions.go index 22b50221f50..4cb60741dbf 100644 --- a/service/ssm/api_op_DescribeInventoryDeletions.go +++ b/service/ssm/api_op_DescribeInventoryDeletions.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInventoryDeletions(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeInventoryDeletionsMiddlewares(stack *middle return nil } -// DescribeInventoryDeletionsAPIClient is a client that implements the -// DescribeInventoryDeletions operation. -type DescribeInventoryDeletionsAPIClient interface { - DescribeInventoryDeletions(context.Context, *DescribeInventoryDeletionsInput, ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) -} - -var _ DescribeInventoryDeletionsAPIClient = (*Client)(nil) - // DescribeInventoryDeletionsPaginatorOptions is the paginator options for // DescribeInventoryDeletions type DescribeInventoryDeletionsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *DescribeInventoryDeletionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeInventoryDeletions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *DescribeInventoryDeletionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeInventoryDeletionsAPIClient is a client that implements the +// DescribeInventoryDeletions operation. +type DescribeInventoryDeletionsAPIClient interface { + DescribeInventoryDeletions(context.Context, *DescribeInventoryDeletionsInput, ...func(*Options)) (*DescribeInventoryDeletionsOutput, error) +} + +var _ DescribeInventoryDeletionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeInventoryDeletions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go index 04c780b65b7..23bb89a1980 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTaskInvocations.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceWindowExecutionTaskInvocationsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTaskInvocationsMi return nil } -// DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient is a client that -// implements the DescribeMaintenanceWindowExecutionTaskInvocations operation. -type DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient interface { - DescribeMaintenanceWindowExecutionTaskInvocations(context.Context, *DescribeMaintenanceWindowExecutionTaskInvocationsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) -} - -var _ DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions is the // paginator options for DescribeMaintenanceWindowExecutionTaskInvocations type DescribeMaintenanceWindowExecutionTaskInvocationsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) NextPage(ct } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowExecutionTaskInvocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *DescribeMaintenanceWindowExecutionTaskInvocationsPaginator) NextPage(ct return result, nil } +// DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient is a client that +// implements the DescribeMaintenanceWindowExecutionTaskInvocations operation. +type DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient interface { + DescribeMaintenanceWindowExecutionTaskInvocations(context.Context, *DescribeMaintenanceWindowExecutionTaskInvocationsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTaskInvocationsOutput, error) +} + +var _ DescribeMaintenanceWindowExecutionTaskInvocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTaskInvocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go index 3c9c50680f3..444b7cfd786 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutionTasks.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceWindowExecutionTasksValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionTasksMiddlewares( return nil } -// DescribeMaintenanceWindowExecutionTasksAPIClient is a client that implements -// the DescribeMaintenanceWindowExecutionTasks operation. -type DescribeMaintenanceWindowExecutionTasksAPIClient interface { - DescribeMaintenanceWindowExecutionTasks(context.Context, *DescribeMaintenanceWindowExecutionTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) -} - -var _ DescribeMaintenanceWindowExecutionTasksAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowExecutionTasksPaginatorOptions is the paginator // options for DescribeMaintenanceWindowExecutionTasks type DescribeMaintenanceWindowExecutionTasksPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribeMaintenanceWindowExecutionTasksPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowExecutionTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribeMaintenanceWindowExecutionTasksPaginator) NextPage(ctx context. return result, nil } +// DescribeMaintenanceWindowExecutionTasksAPIClient is a client that implements +// the DescribeMaintenanceWindowExecutionTasks operation. +type DescribeMaintenanceWindowExecutionTasksAPIClient interface { + DescribeMaintenanceWindowExecutionTasks(context.Context, *DescribeMaintenanceWindowExecutionTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionTasksOutput, error) +} + +var _ DescribeMaintenanceWindowExecutionTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutionTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go b/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go index 8578491c7ef..98026b19f14 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowExecutions.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceWindowExecutionsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowExecutionsMiddlewares(stac return nil } -// DescribeMaintenanceWindowExecutionsAPIClient is a client that implements the -// DescribeMaintenanceWindowExecutions operation. -type DescribeMaintenanceWindowExecutionsAPIClient interface { - DescribeMaintenanceWindowExecutions(context.Context, *DescribeMaintenanceWindowExecutionsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) -} - -var _ DescribeMaintenanceWindowExecutionsAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowExecutionsPaginatorOptions is the paginator options // for DescribeMaintenanceWindowExecutions type DescribeMaintenanceWindowExecutionsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *DescribeMaintenanceWindowExecutionsPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *DescribeMaintenanceWindowExecutionsPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeMaintenanceWindowExecutionsAPIClient is a client that implements the +// DescribeMaintenanceWindowExecutions operation. +type DescribeMaintenanceWindowExecutionsAPIClient interface { + DescribeMaintenanceWindowExecutions(context.Context, *DescribeMaintenanceWindowExecutionsInput, ...func(*Options)) (*DescribeMaintenanceWindowExecutionsOutput, error) +} + +var _ DescribeMaintenanceWindowExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go b/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go index 0a863499a88..c67391b82bb 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowSchedule.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindowSchedule(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowScheduleMiddlewares(stack return nil } -// DescribeMaintenanceWindowScheduleAPIClient is a client that implements the -// DescribeMaintenanceWindowSchedule operation. -type DescribeMaintenanceWindowScheduleAPIClient interface { - DescribeMaintenanceWindowSchedule(context.Context, *DescribeMaintenanceWindowScheduleInput, ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) -} - -var _ DescribeMaintenanceWindowScheduleAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowSchedulePaginatorOptions is the paginator options for // DescribeMaintenanceWindowSchedule type DescribeMaintenanceWindowSchedulePaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeMaintenanceWindowSchedulePaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowSchedule(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeMaintenanceWindowSchedulePaginator) NextPage(ctx context.Contex return result, nil } +// DescribeMaintenanceWindowScheduleAPIClient is a client that implements the +// DescribeMaintenanceWindowSchedule operation. +type DescribeMaintenanceWindowScheduleAPIClient interface { + DescribeMaintenanceWindowSchedule(context.Context, *DescribeMaintenanceWindowScheduleInput, ...func(*Options)) (*DescribeMaintenanceWindowScheduleOutput, error) +} + +var _ DescribeMaintenanceWindowScheduleAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowSchedule(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowTargets.go b/service/ssm/api_op_DescribeMaintenanceWindowTargets.go index b492b8d9252..1aaadaff431 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowTargets.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowTargets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceWindowTargetsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowTargetsMiddlewares(stack * return nil } -// DescribeMaintenanceWindowTargetsAPIClient is a client that implements the -// DescribeMaintenanceWindowTargets operation. -type DescribeMaintenanceWindowTargetsAPIClient interface { - DescribeMaintenanceWindowTargets(context.Context, *DescribeMaintenanceWindowTargetsInput, ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) -} - -var _ DescribeMaintenanceWindowTargetsAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowTargetsPaginatorOptions is the paginator options for // DescribeMaintenanceWindowTargets type DescribeMaintenanceWindowTargetsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeMaintenanceWindowTargetsPaginator) NextPage(ctx context.Context } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeMaintenanceWindowTargetsPaginator) NextPage(ctx context.Context return result, nil } +// DescribeMaintenanceWindowTargetsAPIClient is a client that implements the +// DescribeMaintenanceWindowTargets operation. +type DescribeMaintenanceWindowTargetsAPIClient interface { + DescribeMaintenanceWindowTargets(context.Context, *DescribeMaintenanceWindowTargetsInput, ...func(*Options)) (*DescribeMaintenanceWindowTargetsOutput, error) +} + +var _ DescribeMaintenanceWindowTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowTasks.go b/service/ssm/api_op_DescribeMaintenanceWindowTasks.go index 7b0e0fc1657..86d67a6ce88 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowTasks.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowTasks.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceWindowTasksValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowTasksMiddlewares(stack *mi return nil } -// DescribeMaintenanceWindowTasksAPIClient is a client that implements the -// DescribeMaintenanceWindowTasks operation. -type DescribeMaintenanceWindowTasksAPIClient interface { - DescribeMaintenanceWindowTasks(context.Context, *DescribeMaintenanceWindowTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) -} - -var _ DescribeMaintenanceWindowTasksAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowTasksPaginatorOptions is the paginator options for // DescribeMaintenanceWindowTasks type DescribeMaintenanceWindowTasksPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *DescribeMaintenanceWindowTasksPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *DescribeMaintenanceWindowTasksPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeMaintenanceWindowTasksAPIClient is a client that implements the +// DescribeMaintenanceWindowTasks operation. +type DescribeMaintenanceWindowTasksAPIClient interface { + DescribeMaintenanceWindowTasks(context.Context, *DescribeMaintenanceWindowTasksInput, ...func(*Options)) (*DescribeMaintenanceWindowTasksOutput, error) +} + +var _ DescribeMaintenanceWindowTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindows.go b/service/ssm/api_op_DescribeMaintenanceWindows.go index e9f075a46c1..260dee643a1 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindows.go +++ b/service/ssm/api_op_DescribeMaintenanceWindows.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMaintenanceWindows(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowsMiddlewares(stack *middle return nil } -// DescribeMaintenanceWindowsAPIClient is a client that implements the -// DescribeMaintenanceWindows operation. -type DescribeMaintenanceWindowsAPIClient interface { - DescribeMaintenanceWindows(context.Context, *DescribeMaintenanceWindowsInput, ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) -} - -var _ DescribeMaintenanceWindowsAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowsPaginatorOptions is the paginator options for // DescribeMaintenanceWindows type DescribeMaintenanceWindowsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *DescribeMaintenanceWindowsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *DescribeMaintenanceWindowsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeMaintenanceWindowsAPIClient is a client that implements the +// DescribeMaintenanceWindows operation. +type DescribeMaintenanceWindowsAPIClient interface { + DescribeMaintenanceWindows(context.Context, *DescribeMaintenanceWindowsInput, ...func(*Options)) (*DescribeMaintenanceWindowsOutput, error) +} + +var _ DescribeMaintenanceWindowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go b/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go index 821c32e09d2..f4a15215bfb 100644 --- a/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go +++ b/service/ssm/api_op_DescribeMaintenanceWindowsForTarget.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceWindowsForTargetValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeMaintenanceWindowsForTargetMiddlewares(stac return nil } -// DescribeMaintenanceWindowsForTargetAPIClient is a client that implements the -// DescribeMaintenanceWindowsForTarget operation. -type DescribeMaintenanceWindowsForTargetAPIClient interface { - DescribeMaintenanceWindowsForTarget(context.Context, *DescribeMaintenanceWindowsForTargetInput, ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) -} - -var _ DescribeMaintenanceWindowsForTargetAPIClient = (*Client)(nil) - // DescribeMaintenanceWindowsForTargetPaginatorOptions is the paginator options // for DescribeMaintenanceWindowsForTarget type DescribeMaintenanceWindowsForTargetPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *DescribeMaintenanceWindowsForTargetPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeMaintenanceWindowsForTarget(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *DescribeMaintenanceWindowsForTargetPaginator) NextPage(ctx context.Cont return result, nil } +// DescribeMaintenanceWindowsForTargetAPIClient is a client that implements the +// DescribeMaintenanceWindowsForTarget operation. +type DescribeMaintenanceWindowsForTargetAPIClient interface { + DescribeMaintenanceWindowsForTarget(context.Context, *DescribeMaintenanceWindowsForTargetInput, ...func(*Options)) (*DescribeMaintenanceWindowsForTargetOutput, error) +} + +var _ DescribeMaintenanceWindowsForTargetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeMaintenanceWindowsForTarget(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeOpsItems.go b/service/ssm/api_op_DescribeOpsItems.go index 55ca21f5f95..c92a985eb1e 100644 --- a/service/ssm/api_op_DescribeOpsItems.go +++ b/service/ssm/api_op_DescribeOpsItems.go @@ -189,6 +189,9 @@ func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOpsItemsValidationMiddleware(stack); err != nil { return err } @@ -213,14 +216,6 @@ func (c *Client) addOperationDescribeOpsItemsMiddlewares(stack *middleware.Stack return nil } -// DescribeOpsItemsAPIClient is a client that implements the DescribeOpsItems -// operation. -type DescribeOpsItemsAPIClient interface { - DescribeOpsItems(context.Context, *DescribeOpsItemsInput, ...func(*Options)) (*DescribeOpsItemsOutput, error) -} - -var _ DescribeOpsItemsAPIClient = (*Client)(nil) - // DescribeOpsItemsPaginatorOptions is the paginator options for DescribeOpsItems type DescribeOpsItemsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -285,6 +280,9 @@ func (p *DescribeOpsItemsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeOpsItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -304,6 +302,14 @@ func (p *DescribeOpsItemsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeOpsItemsAPIClient is a client that implements the DescribeOpsItems +// operation. +type DescribeOpsItemsAPIClient interface { + DescribeOpsItems(context.Context, *DescribeOpsItemsInput, ...func(*Options)) (*DescribeOpsItemsOutput, error) +} + +var _ DescribeOpsItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeOpsItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeParameters.go b/service/ssm/api_op_DescribeParameters.go index f368e2dfdfa..748e58cdbd5 100644 --- a/service/ssm/api_op_DescribeParameters.go +++ b/service/ssm/api_op_DescribeParameters.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeParametersValidationMiddleware(stack); err != nil { return err } @@ -173,14 +176,6 @@ func (c *Client) addOperationDescribeParametersMiddlewares(stack *middleware.Sta return nil } -// DescribeParametersAPIClient is a client that implements the DescribeParameters -// operation. -type DescribeParametersAPIClient interface { - DescribeParameters(context.Context, *DescribeParametersInput, ...func(*Options)) (*DescribeParametersOutput, error) -} - -var _ DescribeParametersAPIClient = (*Client)(nil) - // DescribeParametersPaginatorOptions is the paginator options for // DescribeParameters type DescribeParametersPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeParameters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *DescribeParametersPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeParametersAPIClient is a client that implements the DescribeParameters +// operation. +type DescribeParametersAPIClient interface { + DescribeParameters(context.Context, *DescribeParametersInput, ...func(*Options)) (*DescribeParametersOutput, error) +} + +var _ DescribeParametersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeParameters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribePatchBaselines.go b/service/ssm/api_op_DescribePatchBaselines.go index 4d594ad5716..ad769deaae4 100644 --- a/service/ssm/api_op_DescribePatchBaselines.go +++ b/service/ssm/api_op_DescribePatchBaselines.go @@ -129,6 +129,9 @@ func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchBaselines(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribePatchBaselinesMiddlewares(stack *middleware return nil } -// DescribePatchBaselinesAPIClient is a client that implements the -// DescribePatchBaselines operation. -type DescribePatchBaselinesAPIClient interface { - DescribePatchBaselines(context.Context, *DescribePatchBaselinesInput, ...func(*Options)) (*DescribePatchBaselinesOutput, error) -} - -var _ DescribePatchBaselinesAPIClient = (*Client)(nil) - // DescribePatchBaselinesPaginatorOptions is the paginator options for // DescribePatchBaselines type DescribePatchBaselinesPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribePatchBaselinesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePatchBaselines(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribePatchBaselinesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribePatchBaselinesAPIClient is a client that implements the +// DescribePatchBaselines operation. +type DescribePatchBaselinesAPIClient interface { + DescribePatchBaselines(context.Context, *DescribePatchBaselinesInput, ...func(*Options)) (*DescribePatchBaselinesOutput, error) +} + +var _ DescribePatchBaselinesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePatchBaselines(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribePatchGroupState.go b/service/ssm/api_op_DescribePatchGroupState.go index d2dd1b3e622..abd4706b418 100644 --- a/service/ssm/api_op_DescribePatchGroupState.go +++ b/service/ssm/api_op_DescribePatchGroupState.go @@ -159,6 +159,9 @@ func (c *Client) addOperationDescribePatchGroupStateMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePatchGroupStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_DescribePatchGroups.go b/service/ssm/api_op_DescribePatchGroups.go index 6bd05de9f8b..d126259a9c0 100644 --- a/service/ssm/api_op_DescribePatchGroups.go +++ b/service/ssm/api_op_DescribePatchGroups.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePatchGroups(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribePatchGroupsMiddlewares(stack *middleware.St return nil } -// DescribePatchGroupsAPIClient is a client that implements the -// DescribePatchGroups operation. -type DescribePatchGroupsAPIClient interface { - DescribePatchGroups(context.Context, *DescribePatchGroupsInput, ...func(*Options)) (*DescribePatchGroupsOutput, error) -} - -var _ DescribePatchGroupsAPIClient = (*Client)(nil) - // DescribePatchGroupsPaginatorOptions is the paginator options for // DescribePatchGroups type DescribePatchGroupsPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *DescribePatchGroupsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePatchGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *DescribePatchGroupsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribePatchGroupsAPIClient is a client that implements the +// DescribePatchGroups operation. +type DescribePatchGroupsAPIClient interface { + DescribePatchGroups(context.Context, *DescribePatchGroupsInput, ...func(*Options)) (*DescribePatchGroupsOutput, error) +} + +var _ DescribePatchGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePatchGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribePatchProperties.go b/service/ssm/api_op_DescribePatchProperties.go index d9a5a422889..ee437784a14 100644 --- a/service/ssm/api_op_DescribePatchProperties.go +++ b/service/ssm/api_op_DescribePatchProperties.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePatchPropertiesValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationDescribePatchPropertiesMiddlewares(stack *middlewar return nil } -// DescribePatchPropertiesAPIClient is a client that implements the -// DescribePatchProperties operation. -type DescribePatchPropertiesAPIClient interface { - DescribePatchProperties(context.Context, *DescribePatchPropertiesInput, ...func(*Options)) (*DescribePatchPropertiesOutput, error) -} - -var _ DescribePatchPropertiesAPIClient = (*Client)(nil) - // DescribePatchPropertiesPaginatorOptions is the paginator options for // DescribePatchProperties type DescribePatchPropertiesPaginatorOptions struct { @@ -253,6 +248,9 @@ func (p *DescribePatchPropertiesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribePatchProperties(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -272,6 +270,14 @@ func (p *DescribePatchPropertiesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribePatchPropertiesAPIClient is a client that implements the +// DescribePatchProperties operation. +type DescribePatchPropertiesAPIClient interface { + DescribePatchProperties(context.Context, *DescribePatchPropertiesInput, ...func(*Options)) (*DescribePatchPropertiesOutput, error) +} + +var _ DescribePatchPropertiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribePatchProperties(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DescribeSessions.go b/service/ssm/api_op_DescribeSessions.go index fc883c4e2f2..e5aaea27263 100644 --- a/service/ssm/api_op_DescribeSessions.go +++ b/service/ssm/api_op_DescribeSessions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSessionsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationDescribeSessionsMiddlewares(stack *middleware.Stack return nil } -// DescribeSessionsAPIClient is a client that implements the DescribeSessions -// operation. -type DescribeSessionsAPIClient interface { - DescribeSessions(context.Context, *DescribeSessionsInput, ...func(*Options)) (*DescribeSessionsOutput, error) -} - -var _ DescribeSessionsAPIClient = (*Client)(nil) - // DescribeSessionsPaginatorOptions is the paginator options for DescribeSessions type DescribeSessionsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -218,6 +213,9 @@ func (p *DescribeSessionsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *DescribeSessionsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeSessionsAPIClient is a client that implements the DescribeSessions +// operation. +type DescribeSessionsAPIClient interface { + DescribeSessions(context.Context, *DescribeSessionsInput, ...func(*Options)) (*DescribeSessionsOutput, error) +} + +var _ DescribeSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_DisassociateOpsItemRelatedItem.go b/service/ssm/api_op_DisassociateOpsItemRelatedItem.go index 4125eae858a..67f2fc91353 100644 --- a/service/ssm/api_op_DisassociateOpsItemRelatedItem.go +++ b/service/ssm/api_op_DisassociateOpsItemRelatedItem.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisassociateOpsItemRelatedItemMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateOpsItemRelatedItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetAutomationExecution.go b/service/ssm/api_op_GetAutomationExecution.go index 623a4c36773..f8d6ece6ee4 100644 --- a/service/ssm/api_op_GetAutomationExecution.go +++ b/service/ssm/api_op_GetAutomationExecution.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetAutomationExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAutomationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetCalendarState.go b/service/ssm/api_op_GetCalendarState.go index 806c626b762..34a448ac03c 100644 --- a/service/ssm/api_op_GetCalendarState.go +++ b/service/ssm/api_op_GetCalendarState.go @@ -144,6 +144,9 @@ func (c *Client) addOperationGetCalendarStateMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCalendarStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetCommandInvocation.go b/service/ssm/api_op_GetCommandInvocation.go index 942d1c3e22d..185186e7d40 100644 --- a/service/ssm/api_op_GetCommandInvocation.go +++ b/service/ssm/api_op_GetCommandInvocation.go @@ -257,6 +257,9 @@ func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCommandInvocationValidationMiddleware(stack); err != nil { return err } @@ -281,14 +284,6 @@ func (c *Client) addOperationGetCommandInvocationMiddlewares(stack *middleware.S return nil } -// GetCommandInvocationAPIClient is a client that implements the -// GetCommandInvocation operation. -type GetCommandInvocationAPIClient interface { - GetCommandInvocation(context.Context, *GetCommandInvocationInput, ...func(*Options)) (*GetCommandInvocationOutput, error) -} - -var _ GetCommandInvocationAPIClient = (*Client)(nil) - // CommandExecutedWaiterOptions are waiter options for CommandExecutedWaiter type CommandExecutedWaiterOptions struct { @@ -404,7 +399,13 @@ func (w *CommandExecutedWaiter) WaitForOutput(ctx context.Context, params *GetCo } out, err := w.client.GetCommandInvocation(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -588,6 +589,14 @@ func commandExecutedStateRetryable(ctx context.Context, input *GetCommandInvocat return true, nil } +// GetCommandInvocationAPIClient is a client that implements the +// GetCommandInvocation operation. +type GetCommandInvocationAPIClient interface { + GetCommandInvocation(context.Context, *GetCommandInvocationInput, ...func(*Options)) (*GetCommandInvocationOutput, error) +} + +var _ GetCommandInvocationAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCommandInvocation(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetConnectionStatus.go b/service/ssm/api_op_GetConnectionStatus.go index 639f17ca235..2b49373b31e 100644 --- a/service/ssm/api_op_GetConnectionStatus.go +++ b/service/ssm/api_op_GetConnectionStatus.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetConnectionStatusMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConnectionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetDefaultPatchBaseline.go b/service/ssm/api_op_GetDefaultPatchBaseline.go index 83adc45c4c9..f5bec97162d 100644 --- a/service/ssm/api_op_GetDefaultPatchBaseline.go +++ b/service/ssm/api_op_GetDefaultPatchBaseline.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetDefaultPatchBaselineMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultPatchBaseline(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go b/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go index 7aed5ca1617..f8be18636a3 100644 --- a/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go +++ b/service/ssm/api_op_GetDeployablePatchSnapshotForInstance.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetDeployablePatchSnapshotForInstanceMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDeployablePatchSnapshotForInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetDocument.go b/service/ssm/api_op_GetDocument.go index 404a6731267..5aaccce32ff 100644 --- a/service/ssm/api_op_GetDocument.go +++ b/service/ssm/api_op_GetDocument.go @@ -173,6 +173,9 @@ func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetInventory.go b/service/ssm/api_op_GetInventory.go index a4a1dda91d1..dd6384854f1 100644 --- a/service/ssm/api_op_GetInventory.go +++ b/service/ssm/api_op_GetInventory.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInventoryValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationGetInventoryMiddlewares(stack *middleware.Stack, op return nil } -// GetInventoryAPIClient is a client that implements the GetInventory operation. -type GetInventoryAPIClient interface { - GetInventory(context.Context, *GetInventoryInput, ...func(*Options)) (*GetInventoryOutput, error) -} - -var _ GetInventoryAPIClient = (*Client)(nil) - // GetInventoryPaginatorOptions is the paginator options for GetInventory type GetInventoryPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -222,6 +218,9 @@ func (p *GetInventoryPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInventory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *GetInventoryPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// GetInventoryAPIClient is a client that implements the GetInventory operation. +type GetInventoryAPIClient interface { + GetInventory(context.Context, *GetInventoryInput, ...func(*Options)) (*GetInventoryOutput, error) +} + +var _ GetInventoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInventory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetInventorySchema.go b/service/ssm/api_op_GetInventorySchema.go index a928ffefa27..decc8d8215f 100644 --- a/service/ssm/api_op_GetInventorySchema.go +++ b/service/ssm/api_op_GetInventorySchema.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInventorySchema(options.Region), middleware.Before); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationGetInventorySchemaMiddlewares(stack *middleware.Sta return nil } -// GetInventorySchemaAPIClient is a client that implements the GetInventorySchema -// operation. -type GetInventorySchemaAPIClient interface { - GetInventorySchema(context.Context, *GetInventorySchemaInput, ...func(*Options)) (*GetInventorySchemaOutput, error) -} - -var _ GetInventorySchemaAPIClient = (*Client)(nil) - // GetInventorySchemaPaginatorOptions is the paginator options for // GetInventorySchema type GetInventorySchemaPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *GetInventorySchemaPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInventorySchema(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *GetInventorySchemaPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// GetInventorySchemaAPIClient is a client that implements the GetInventorySchema +// operation. +type GetInventorySchemaAPIClient interface { + GetInventorySchema(context.Context, *GetInventorySchemaInput, ...func(*Options)) (*GetInventorySchemaOutput, error) +} + +var _ GetInventorySchemaAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInventorySchema(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetMaintenanceWindow.go b/service/ssm/api_op_GetMaintenanceWindow.go index 1748b328990..40b95da39af 100644 --- a/service/ssm/api_op_GetMaintenanceWindow.go +++ b/service/ssm/api_op_GetMaintenanceWindow.go @@ -161,6 +161,9 @@ func (c *Client) addOperationGetMaintenanceWindowMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMaintenanceWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetMaintenanceWindowExecution.go b/service/ssm/api_op_GetMaintenanceWindowExecution.go index ca84cc9e696..6ccd9d49067 100644 --- a/service/ssm/api_op_GetMaintenanceWindowExecution.go +++ b/service/ssm/api_op_GetMaintenanceWindowExecution.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMaintenanceWindowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go b/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go index 2524277e787..22251704141 100644 --- a/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go +++ b/service/ssm/api_op_GetMaintenanceWindowExecutionTask.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMaintenanceWindowExecutionTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go b/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go index f52e516383b..0c34b8df53a 100644 --- a/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go +++ b/service/ssm/api_op_GetMaintenanceWindowExecutionTaskInvocation.go @@ -154,6 +154,9 @@ func (c *Client) addOperationGetMaintenanceWindowExecutionTaskInvocationMiddlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMaintenanceWindowExecutionTaskInvocationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetMaintenanceWindowTask.go b/service/ssm/api_op_GetMaintenanceWindowTask.go index b7cff9f5937..f4393e17e1a 100644 --- a/service/ssm/api_op_GetMaintenanceWindowTask.go +++ b/service/ssm/api_op_GetMaintenanceWindowTask.go @@ -197,6 +197,9 @@ func (c *Client) addOperationGetMaintenanceWindowTaskMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMaintenanceWindowTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetOpsItem.go b/service/ssm/api_op_GetOpsItem.go index 055a1ab9f65..9346575de46 100644 --- a/service/ssm/api_op_GetOpsItem.go +++ b/service/ssm/api_op_GetOpsItem.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetOpsItemMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpsItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetOpsMetadata.go b/service/ssm/api_op_GetOpsMetadata.go index 41002b51607..fc8b40e2357 100644 --- a/service/ssm/api_op_GetOpsMetadata.go +++ b/service/ssm/api_op_GetOpsMetadata.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetOpsMetadataMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpsMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetOpsSummary.go b/service/ssm/api_op_GetOpsSummary.go index 7dff09df701..f56cf1edc79 100644 --- a/service/ssm/api_op_GetOpsSummary.go +++ b/service/ssm/api_op_GetOpsSummary.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOpsSummaryValidationMiddleware(stack); err != nil { return err } @@ -153,13 +156,6 @@ func (c *Client) addOperationGetOpsSummaryMiddlewares(stack *middleware.Stack, o return nil } -// GetOpsSummaryAPIClient is a client that implements the GetOpsSummary operation. -type GetOpsSummaryAPIClient interface { - GetOpsSummary(context.Context, *GetOpsSummaryInput, ...func(*Options)) (*GetOpsSummaryOutput, error) -} - -var _ GetOpsSummaryAPIClient = (*Client)(nil) - // GetOpsSummaryPaginatorOptions is the paginator options for GetOpsSummary type GetOpsSummaryPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -224,6 +220,9 @@ func (p *GetOpsSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetOpsSummary(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +242,13 @@ func (p *GetOpsSummaryPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetOpsSummaryAPIClient is a client that implements the GetOpsSummary operation. +type GetOpsSummaryAPIClient interface { + GetOpsSummary(context.Context, *GetOpsSummaryInput, ...func(*Options)) (*GetOpsSummaryOutput, error) +} + +var _ GetOpsSummaryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetOpsSummary(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetParameter.go b/service/ssm/api_op_GetParameter.go index d94b5c25077..a804b8c490f 100644 --- a/service/ssm/api_op_GetParameter.go +++ b/service/ssm/api_op_GetParameter.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetParameterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParameterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetParameterHistory.go b/service/ssm/api_op_GetParameterHistory.go index 33f00ab1f54..2b5d21ac1cf 100644 --- a/service/ssm/api_op_GetParameterHistory.go +++ b/service/ssm/api_op_GetParameterHistory.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParameterHistoryValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationGetParameterHistoryMiddlewares(stack *middleware.St return nil } -// GetParameterHistoryAPIClient is a client that implements the -// GetParameterHistory operation. -type GetParameterHistoryAPIClient interface { - GetParameterHistory(context.Context, *GetParameterHistoryInput, ...func(*Options)) (*GetParameterHistoryOutput, error) -} - -var _ GetParameterHistoryAPIClient = (*Client)(nil) - // GetParameterHistoryPaginatorOptions is the paginator options for // GetParameterHistory type GetParameterHistoryPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *GetParameterHistoryPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetParameterHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetParameterHistoryPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetParameterHistoryAPIClient is a client that implements the +// GetParameterHistory operation. +type GetParameterHistoryAPIClient interface { + GetParameterHistory(context.Context, *GetParameterHistoryInput, ...func(*Options)) (*GetParameterHistoryOutput, error) +} + +var _ GetParameterHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetParameterHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetParameters.go b/service/ssm/api_op_GetParameters.go index c548a475617..7e80d39532e 100644 --- a/service/ssm/api_op_GetParameters.go +++ b/service/ssm/api_op_GetParameters.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetParametersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParametersValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetParametersByPath.go b/service/ssm/api_op_GetParametersByPath.go index 94fa2a6ef05..41a696ea458 100644 --- a/service/ssm/api_op_GetParametersByPath.go +++ b/service/ssm/api_op_GetParametersByPath.go @@ -150,6 +150,9 @@ func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParametersByPathValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationGetParametersByPathMiddlewares(stack *middleware.St return nil } -// GetParametersByPathAPIClient is a client that implements the -// GetParametersByPath operation. -type GetParametersByPathAPIClient interface { - GetParametersByPath(context.Context, *GetParametersByPathInput, ...func(*Options)) (*GetParametersByPathOutput, error) -} - -var _ GetParametersByPathAPIClient = (*Client)(nil) - // GetParametersByPathPaginatorOptions is the paginator options for // GetParametersByPath type GetParametersByPathPaginatorOptions struct { @@ -247,6 +242,9 @@ func (p *GetParametersByPathPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetParametersByPath(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +264,14 @@ func (p *GetParametersByPathPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetParametersByPathAPIClient is a client that implements the +// GetParametersByPath operation. +type GetParametersByPathAPIClient interface { + GetParametersByPath(context.Context, *GetParametersByPathInput, ...func(*Options)) (*GetParametersByPathOutput, error) +} + +var _ GetParametersByPathAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetParametersByPath(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetPatchBaseline.go b/service/ssm/api_op_GetPatchBaseline.go index 349e1cf0431..db9aa89164a 100644 --- a/service/ssm/api_op_GetPatchBaseline.go +++ b/service/ssm/api_op_GetPatchBaseline.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetPatchBaselineMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPatchBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetPatchBaselineForPatchGroup.go b/service/ssm/api_op_GetPatchBaselineForPatchGroup.go index a95f0499f36..714558fed80 100644 --- a/service/ssm/api_op_GetPatchBaselineForPatchGroup.go +++ b/service/ssm/api_op_GetPatchBaselineForPatchGroup.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPatchBaselineForPatchGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_GetResourcePolicies.go b/service/ssm/api_op_GetResourcePolicies.go index f58b7004799..fbc6b9baac6 100644 --- a/service/ssm/api_op_GetResourcePolicies.go +++ b/service/ssm/api_op_GetResourcePolicies.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St return nil } -// GetResourcePoliciesAPIClient is a client that implements the -// GetResourcePolicies operation. -type GetResourcePoliciesAPIClient interface { - GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) -} - -var _ GetResourcePoliciesAPIClient = (*Client)(nil) - // GetResourcePoliciesPaginatorOptions is the paginator options for // GetResourcePolicies type GetResourcePoliciesPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetResourcePoliciesAPIClient is a client that implements the +// GetResourcePolicies operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_GetServiceSetting.go b/service/ssm/api_op_GetServiceSetting.go index 02d27bf640c..8c3c089da8f 100644 --- a/service/ssm/api_op_GetServiceSetting.go +++ b/service/ssm/api_op_GetServiceSetting.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetServiceSettingMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceSettingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_LabelParameterVersion.go b/service/ssm/api_op_LabelParameterVersion.go index 7dd157a0278..9d607263d82 100644 --- a/service/ssm/api_op_LabelParameterVersion.go +++ b/service/ssm/api_op_LabelParameterVersion.go @@ -153,6 +153,9 @@ func (c *Client) addOperationLabelParameterVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLabelParameterVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_ListAssociationVersions.go b/service/ssm/api_op_ListAssociationVersions.go index 60c7e3fae14..7bf48c76b1f 100644 --- a/service/ssm/api_op_ListAssociationVersions.go +++ b/service/ssm/api_op_ListAssociationVersions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociationVersionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListAssociationVersionsMiddlewares(stack *middlewar return nil } -// ListAssociationVersionsAPIClient is a client that implements the -// ListAssociationVersions operation. -type ListAssociationVersionsAPIClient interface { - ListAssociationVersions(context.Context, *ListAssociationVersionsInput, ...func(*Options)) (*ListAssociationVersionsOutput, error) -} - -var _ ListAssociationVersionsAPIClient = (*Client)(nil) - // ListAssociationVersionsPaginatorOptions is the paginator options for // ListAssociationVersions type ListAssociationVersionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListAssociationVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociationVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListAssociationVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListAssociationVersionsAPIClient is a client that implements the +// ListAssociationVersions operation. +type ListAssociationVersionsAPIClient interface { + ListAssociationVersions(context.Context, *ListAssociationVersionsInput, ...func(*Options)) (*ListAssociationVersionsOutput, error) +} + +var _ ListAssociationVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListAssociations.go b/service/ssm/api_op_ListAssociations.go index 4f703ce9e0d..3559fd62c53 100644 --- a/service/ssm/api_op_ListAssociations.go +++ b/service/ssm/api_op_ListAssociations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociationsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAssociationsMiddlewares(stack *middleware.Stack return nil } -// ListAssociationsAPIClient is a client that implements the ListAssociations -// operation. -type ListAssociationsAPIClient interface { - ListAssociations(context.Context, *ListAssociationsInput, ...func(*Options)) (*ListAssociationsOutput, error) -} - -var _ ListAssociationsAPIClient = (*Client)(nil) - // ListAssociationsPaginatorOptions is the paginator options for ListAssociations type ListAssociationsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -220,6 +215,9 @@ func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAssociationsAPIClient is a client that implements the ListAssociations +// operation. +type ListAssociationsAPIClient interface { + ListAssociations(context.Context, *ListAssociationsInput, ...func(*Options)) (*ListAssociationsOutput, error) +} + +var _ ListAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListCommandInvocations.go b/service/ssm/api_op_ListCommandInvocations.go index 7bed9650858..d9bf154d2b3 100644 --- a/service/ssm/api_op_ListCommandInvocations.go +++ b/service/ssm/api_op_ListCommandInvocations.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCommandInvocationsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListCommandInvocationsMiddlewares(stack *middleware return nil } -// ListCommandInvocationsAPIClient is a client that implements the -// ListCommandInvocations operation. -type ListCommandInvocationsAPIClient interface { - ListCommandInvocations(context.Context, *ListCommandInvocationsInput, ...func(*Options)) (*ListCommandInvocationsOutput, error) -} - -var _ ListCommandInvocationsAPIClient = (*Client)(nil) - // ListCommandInvocationsPaginatorOptions is the paginator options for // ListCommandInvocations type ListCommandInvocationsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListCommandInvocationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCommandInvocations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListCommandInvocationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListCommandInvocationsAPIClient is a client that implements the +// ListCommandInvocations operation. +type ListCommandInvocationsAPIClient interface { + ListCommandInvocations(context.Context, *ListCommandInvocationsInput, ...func(*Options)) (*ListCommandInvocationsOutput, error) +} + +var _ ListCommandInvocationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCommandInvocations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListCommands.go b/service/ssm/api_op_ListCommands.go index 37f841c4e48..ea706cdf825 100644 --- a/service/ssm/api_op_ListCommands.go +++ b/service/ssm/api_op_ListCommands.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCommandsValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListCommandsMiddlewares(stack *middleware.Stack, op return nil } -// ListCommandsAPIClient is a client that implements the ListCommands operation. -type ListCommandsAPIClient interface { - ListCommands(context.Context, *ListCommandsInput, ...func(*Options)) (*ListCommandsOutput, error) -} - -var _ ListCommandsAPIClient = (*Client)(nil) - // ListCommandsPaginatorOptions is the paginator options for ListCommands type ListCommandsPaginatorOptions struct { // (Optional) The maximum number of items to return for this call. The call also @@ -223,6 +219,9 @@ func (p *ListCommandsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCommands(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +241,13 @@ func (p *ListCommandsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListCommandsAPIClient is a client that implements the ListCommands operation. +type ListCommandsAPIClient interface { + ListCommands(context.Context, *ListCommandsInput, ...func(*Options)) (*ListCommandsOutput, error) +} + +var _ ListCommandsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCommands(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListComplianceItems.go b/service/ssm/api_op_ListComplianceItems.go index 019eb715ee5..022faa0fd30 100644 --- a/service/ssm/api_op_ListComplianceItems.go +++ b/service/ssm/api_op_ListComplianceItems.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComplianceItems(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListComplianceItemsMiddlewares(stack *middleware.St return nil } -// ListComplianceItemsAPIClient is a client that implements the -// ListComplianceItems operation. -type ListComplianceItemsAPIClient interface { - ListComplianceItems(context.Context, *ListComplianceItemsInput, ...func(*Options)) (*ListComplianceItemsOutput, error) -} - -var _ ListComplianceItemsAPIClient = (*Client)(nil) - // ListComplianceItemsPaginatorOptions is the paginator options for // ListComplianceItems type ListComplianceItemsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListComplianceItemsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComplianceItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListComplianceItemsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListComplianceItemsAPIClient is a client that implements the +// ListComplianceItems operation. +type ListComplianceItemsAPIClient interface { + ListComplianceItems(context.Context, *ListComplianceItemsInput, ...func(*Options)) (*ListComplianceItemsOutput, error) +} + +var _ ListComplianceItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComplianceItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListComplianceSummaries.go b/service/ssm/api_op_ListComplianceSummaries.go index d83b578a69f..53461251dee 100644 --- a/service/ssm/api_op_ListComplianceSummaries.go +++ b/service/ssm/api_op_ListComplianceSummaries.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComplianceSummaries(options.Region), middleware.Before); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListComplianceSummariesMiddlewares(stack *middlewar return nil } -// ListComplianceSummariesAPIClient is a client that implements the -// ListComplianceSummaries operation. -type ListComplianceSummariesAPIClient interface { - ListComplianceSummaries(context.Context, *ListComplianceSummariesInput, ...func(*Options)) (*ListComplianceSummariesOutput, error) -} - -var _ ListComplianceSummariesAPIClient = (*Client)(nil) - // ListComplianceSummariesPaginatorOptions is the paginator options for // ListComplianceSummaries type ListComplianceSummariesPaginatorOptions struct { @@ -218,6 +213,9 @@ func (p *ListComplianceSummariesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComplianceSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +235,14 @@ func (p *ListComplianceSummariesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListComplianceSummariesAPIClient is a client that implements the +// ListComplianceSummaries operation. +type ListComplianceSummariesAPIClient interface { + ListComplianceSummaries(context.Context, *ListComplianceSummariesInput, ...func(*Options)) (*ListComplianceSummariesOutput, error) +} + +var _ ListComplianceSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComplianceSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListDocumentMetadataHistory.go b/service/ssm/api_op_ListDocumentMetadataHistory.go index 400fdb3d2d5..8e39e176cd5 100644 --- a/service/ssm/api_op_ListDocumentMetadataHistory.go +++ b/service/ssm/api_op_ListDocumentMetadataHistory.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListDocumentMetadataHistoryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDocumentMetadataHistoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_ListDocumentVersions.go b/service/ssm/api_op_ListDocumentVersions.go index dc422d8c9e0..3695f896601 100644 --- a/service/ssm/api_op_ListDocumentVersions.go +++ b/service/ssm/api_op_ListDocumentVersions.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDocumentVersionsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListDocumentVersionsMiddlewares(stack *middleware.S return nil } -// ListDocumentVersionsAPIClient is a client that implements the -// ListDocumentVersions operation. -type ListDocumentVersionsAPIClient interface { - ListDocumentVersions(context.Context, *ListDocumentVersionsInput, ...func(*Options)) (*ListDocumentVersionsOutput, error) -} - -var _ ListDocumentVersionsAPIClient = (*Client)(nil) - // ListDocumentVersionsPaginatorOptions is the paginator options for // ListDocumentVersions type ListDocumentVersionsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListDocumentVersionsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDocumentVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListDocumentVersionsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListDocumentVersionsAPIClient is a client that implements the +// ListDocumentVersions operation. +type ListDocumentVersionsAPIClient interface { + ListDocumentVersions(context.Context, *ListDocumentVersionsInput, ...func(*Options)) (*ListDocumentVersionsOutput, error) +} + +var _ ListDocumentVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDocumentVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListDocuments.go b/service/ssm/api_op_ListDocuments.go index 139dc7ca2af..7403a56b031 100644 --- a/service/ssm/api_op_ListDocuments.go +++ b/service/ssm/api_op_ListDocuments.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDocumentsValidationMiddleware(stack); err != nil { return err } @@ -154,13 +157,6 @@ func (c *Client) addOperationListDocumentsMiddlewares(stack *middleware.Stack, o return nil } -// ListDocumentsAPIClient is a client that implements the ListDocuments operation. -type ListDocumentsAPIClient interface { - ListDocuments(context.Context, *ListDocumentsInput, ...func(*Options)) (*ListDocumentsOutput, error) -} - -var _ ListDocumentsAPIClient = (*Client)(nil) - // ListDocumentsPaginatorOptions is the paginator options for ListDocuments type ListDocumentsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -225,6 +221,9 @@ func (p *ListDocumentsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDocuments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +243,13 @@ func (p *ListDocumentsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDocumentsAPIClient is a client that implements the ListDocuments operation. +type ListDocumentsAPIClient interface { + ListDocuments(context.Context, *ListDocumentsInput, ...func(*Options)) (*ListDocumentsOutput, error) +} + +var _ ListDocumentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDocuments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListInventoryEntries.go b/service/ssm/api_op_ListInventoryEntries.go index 2deb27c206c..179fa0e3b72 100644 --- a/service/ssm/api_op_ListInventoryEntries.go +++ b/service/ssm/api_op_ListInventoryEntries.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListInventoryEntriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListInventoryEntriesValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_ListOpsItemEvents.go b/service/ssm/api_op_ListOpsItemEvents.go index df88a31751b..4f1f5f4c6b8 100644 --- a/service/ssm/api_op_ListOpsItemEvents.go +++ b/service/ssm/api_op_ListOpsItemEvents.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOpsItemEventsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListOpsItemEventsMiddlewares(stack *middleware.Stac return nil } -// ListOpsItemEventsAPIClient is a client that implements the ListOpsItemEvents -// operation. -type ListOpsItemEventsAPIClient interface { - ListOpsItemEvents(context.Context, *ListOpsItemEventsInput, ...func(*Options)) (*ListOpsItemEventsOutput, error) -} - -var _ ListOpsItemEventsAPIClient = (*Client)(nil) - // ListOpsItemEventsPaginatorOptions is the paginator options for ListOpsItemEvents type ListOpsItemEventsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -214,6 +209,9 @@ func (p *ListOpsItemEventsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpsItemEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListOpsItemEventsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListOpsItemEventsAPIClient is a client that implements the ListOpsItemEvents +// operation. +type ListOpsItemEventsAPIClient interface { + ListOpsItemEvents(context.Context, *ListOpsItemEventsInput, ...func(*Options)) (*ListOpsItemEventsOutput, error) +} + +var _ ListOpsItemEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOpsItemEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListOpsItemRelatedItems.go b/service/ssm/api_op_ListOpsItemRelatedItems.go index 587e6f29ab7..f8b18250cd5 100644 --- a/service/ssm/api_op_ListOpsItemRelatedItems.go +++ b/service/ssm/api_op_ListOpsItemRelatedItems.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOpsItemRelatedItemsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListOpsItemRelatedItemsMiddlewares(stack *middlewar return nil } -// ListOpsItemRelatedItemsAPIClient is a client that implements the -// ListOpsItemRelatedItems operation. -type ListOpsItemRelatedItemsAPIClient interface { - ListOpsItemRelatedItems(context.Context, *ListOpsItemRelatedItemsInput, ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) -} - -var _ ListOpsItemRelatedItemsAPIClient = (*Client)(nil) - // ListOpsItemRelatedItemsPaginatorOptions is the paginator options for // ListOpsItemRelatedItems type ListOpsItemRelatedItemsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListOpsItemRelatedItemsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpsItemRelatedItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListOpsItemRelatedItemsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListOpsItemRelatedItemsAPIClient is a client that implements the +// ListOpsItemRelatedItems operation. +type ListOpsItemRelatedItemsAPIClient interface { + ListOpsItemRelatedItems(context.Context, *ListOpsItemRelatedItemsInput, ...func(*Options)) (*ListOpsItemRelatedItemsOutput, error) +} + +var _ ListOpsItemRelatedItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOpsItemRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListOpsMetadata.go b/service/ssm/api_op_ListOpsMetadata.go index 1706e9bb693..ef37d10fca2 100644 --- a/service/ssm/api_op_ListOpsMetadata.go +++ b/service/ssm/api_op_ListOpsMetadata.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOpsMetadataValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListOpsMetadataMiddlewares(stack *middleware.Stack, return nil } -// ListOpsMetadataAPIClient is a client that implements the ListOpsMetadata -// operation. -type ListOpsMetadataAPIClient interface { - ListOpsMetadata(context.Context, *ListOpsMetadataInput, ...func(*Options)) (*ListOpsMetadataOutput, error) -} - -var _ ListOpsMetadataAPIClient = (*Client)(nil) - // ListOpsMetadataPaginatorOptions is the paginator options for ListOpsMetadata type ListOpsMetadataPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -213,6 +208,9 @@ func (p *ListOpsMetadataPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpsMetadata(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListOpsMetadataPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListOpsMetadataAPIClient is a client that implements the ListOpsMetadata +// operation. +type ListOpsMetadataAPIClient interface { + ListOpsMetadata(context.Context, *ListOpsMetadataInput, ...func(*Options)) (*ListOpsMetadataOutput, error) +} + +var _ ListOpsMetadataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOpsMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListResourceComplianceSummaries.go b/service/ssm/api_op_ListResourceComplianceSummaries.go index 5add9e71ce9..e64abd808e8 100644 --- a/service/ssm/api_op_ListResourceComplianceSummaries.go +++ b/service/ssm/api_op_ListResourceComplianceSummaries.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceComplianceSummaries(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListResourceComplianceSummariesMiddlewares(stack *m return nil } -// ListResourceComplianceSummariesAPIClient is a client that implements the -// ListResourceComplianceSummaries operation. -type ListResourceComplianceSummariesAPIClient interface { - ListResourceComplianceSummaries(context.Context, *ListResourceComplianceSummariesInput, ...func(*Options)) (*ListResourceComplianceSummariesOutput, error) -} - -var _ ListResourceComplianceSummariesAPIClient = (*Client)(nil) - // ListResourceComplianceSummariesPaginatorOptions is the paginator options for // ListResourceComplianceSummaries type ListResourceComplianceSummariesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListResourceComplianceSummariesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceComplianceSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListResourceComplianceSummariesPaginator) NextPage(ctx context.Context, return result, nil } +// ListResourceComplianceSummariesAPIClient is a client that implements the +// ListResourceComplianceSummaries operation. +type ListResourceComplianceSummariesAPIClient interface { + ListResourceComplianceSummaries(context.Context, *ListResourceComplianceSummariesInput, ...func(*Options)) (*ListResourceComplianceSummariesOutput, error) +} + +var _ ListResourceComplianceSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceComplianceSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListResourceDataSync.go b/service/ssm/api_op_ListResourceDataSync.go index cc9e0129bf6..e8d39c7f39c 100644 --- a/service/ssm/api_op_ListResourceDataSync.go +++ b/service/ssm/api_op_ListResourceDataSync.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceDataSync(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListResourceDataSyncMiddlewares(stack *middleware.S return nil } -// ListResourceDataSyncAPIClient is a client that implements the -// ListResourceDataSync operation. -type ListResourceDataSyncAPIClient interface { - ListResourceDataSync(context.Context, *ListResourceDataSyncInput, ...func(*Options)) (*ListResourceDataSyncOutput, error) -} - -var _ ListResourceDataSyncAPIClient = (*Client)(nil) - // ListResourceDataSyncPaginatorOptions is the paginator options for // ListResourceDataSync type ListResourceDataSyncPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListResourceDataSyncPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceDataSync(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListResourceDataSyncPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListResourceDataSyncAPIClient is a client that implements the +// ListResourceDataSync operation. +type ListResourceDataSyncAPIClient interface { + ListResourceDataSync(context.Context, *ListResourceDataSyncInput, ...func(*Options)) (*ListResourceDataSyncOutput, error) +} + +var _ ListResourceDataSyncAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceDataSync(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssm/api_op_ListTagsForResource.go b/service/ssm/api_op_ListTagsForResource.go index 188673eca49..64219d3ff35 100644 --- a/service/ssm/api_op_ListTagsForResource.go +++ b/service/ssm/api_op_ListTagsForResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_ModifyDocumentPermission.go b/service/ssm/api_op_ModifyDocumentPermission.go index be45aad78f5..97875a83c1f 100644 --- a/service/ssm/api_op_ModifyDocumentPermission.go +++ b/service/ssm/api_op_ModifyDocumentPermission.go @@ -124,6 +124,9 @@ func (c *Client) addOperationModifyDocumentPermissionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyDocumentPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_PutComplianceItems.go b/service/ssm/api_op_PutComplianceItems.go index 4d0fcae0a02..93af0ff8857 100644 --- a/service/ssm/api_op_PutComplianceItems.go +++ b/service/ssm/api_op_PutComplianceItems.go @@ -186,6 +186,9 @@ func (c *Client) addOperationPutComplianceItemsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutComplianceItemsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_PutInventory.go b/service/ssm/api_op_PutInventory.go index 1bcce7737a9..27de145800f 100644 --- a/service/ssm/api_op_PutInventory.go +++ b/service/ssm/api_op_PutInventory.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutInventoryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInventoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_PutParameter.go b/service/ssm/api_op_PutParameter.go index 302fa185477..f177ccdaed0 100644 --- a/service/ssm/api_op_PutParameter.go +++ b/service/ssm/api_op_PutParameter.go @@ -339,6 +339,9 @@ func (c *Client) addOperationPutParameterMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutParameterValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_PutResourcePolicy.go b/service/ssm/api_op_PutResourcePolicy.go index b9c09ed6294..c17418d7ae4 100644 --- a/service/ssm/api_op_PutResourcePolicy.go +++ b/service/ssm/api_op_PutResourcePolicy.go @@ -162,6 +162,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_RegisterDefaultPatchBaseline.go b/service/ssm/api_op_RegisterDefaultPatchBaseline.go index 8a21385884c..26a525403c4 100644 --- a/service/ssm/api_op_RegisterDefaultPatchBaseline.go +++ b/service/ssm/api_op_RegisterDefaultPatchBaseline.go @@ -111,6 +111,9 @@ func (c *Client) addOperationRegisterDefaultPatchBaselineMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDefaultPatchBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go b/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go index 9c24fff20d7..8a05d1ddf3f 100644 --- a/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go +++ b/service/ssm/api_op_RegisterPatchBaselineForPatchGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationRegisterPatchBaselineForPatchGroupMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterPatchBaselineForPatchGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go b/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go index 2343e049e12..a8da8273ad7 100644 --- a/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go +++ b/service/ssm/api_op_RegisterTargetWithMaintenanceWindow.go @@ -168,6 +168,9 @@ func (c *Client) addOperationRegisterTargetWithMaintenanceWindowMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterTargetWithMaintenanceWindowMiddleware(stack, options); err != nil { return err } diff --git a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go index 864530936d4..26646224aa6 100644 --- a/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go +++ b/service/ssm/api_op_RegisterTaskWithMaintenanceWindow.go @@ -235,6 +235,9 @@ func (c *Client) addOperationRegisterTaskWithMaintenanceWindowMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterTaskWithMaintenanceWindowMiddleware(stack, options); err != nil { return err } diff --git a/service/ssm/api_op_RemoveTagsFromResource.go b/service/ssm/api_op_RemoveTagsFromResource.go index c6d487bc015..a8b9b6363f6 100644 --- a/service/ssm/api_op_RemoveTagsFromResource.go +++ b/service/ssm/api_op_RemoveTagsFromResource.go @@ -137,6 +137,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_ResetServiceSetting.go b/service/ssm/api_op_ResetServiceSetting.go index 32535df13b1..a9cb0abc9f2 100644 --- a/service/ssm/api_op_ResetServiceSetting.go +++ b/service/ssm/api_op_ResetServiceSetting.go @@ -141,6 +141,9 @@ func (c *Client) addOperationResetServiceSettingMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetServiceSettingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_ResumeSession.go b/service/ssm/api_op_ResumeSession.go index 3cfc8ecf3ec..63e15da0957 100644 --- a/service/ssm/api_op_ResumeSession.go +++ b/service/ssm/api_op_ResumeSession.go @@ -130,6 +130,9 @@ func (c *Client) addOperationResumeSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_SendAutomationSignal.go b/service/ssm/api_op_SendAutomationSignal.go index 0a2ef294049..91fb9eb57e9 100644 --- a/service/ssm/api_op_SendAutomationSignal.go +++ b/service/ssm/api_op_SendAutomationSignal.go @@ -128,6 +128,9 @@ func (c *Client) addOperationSendAutomationSignalMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendAutomationSignalValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_SendCommand.go b/service/ssm/api_op_SendCommand.go index aa6591ea71e..34e55b35d23 100644 --- a/service/ssm/api_op_SendCommand.go +++ b/service/ssm/api_op_SendCommand.go @@ -232,6 +232,9 @@ func (c *Client) addOperationSendCommandMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendCommandValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_StartAssociationsOnce.go b/service/ssm/api_op_StartAssociationsOnce.go index 4e1a257ba43..e9ff2fe42f2 100644 --- a/service/ssm/api_op_StartAssociationsOnce.go +++ b/service/ssm/api_op_StartAssociationsOnce.go @@ -102,6 +102,9 @@ func (c *Client) addOperationStartAssociationsOnceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAssociationsOnceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_StartAutomationExecution.go b/service/ssm/api_op_StartAutomationExecution.go index 42067a66a8f..a52c348ff03 100644 --- a/service/ssm/api_op_StartAutomationExecution.go +++ b/service/ssm/api_op_StartAutomationExecution.go @@ -184,6 +184,9 @@ func (c *Client) addOperationStartAutomationExecutionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAutomationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_StartChangeRequestExecution.go b/service/ssm/api_op_StartChangeRequestExecution.go index 7c402925eaf..1d265a3f457 100644 --- a/service/ssm/api_op_StartChangeRequestExecution.go +++ b/service/ssm/api_op_StartChangeRequestExecution.go @@ -175,6 +175,9 @@ func (c *Client) addOperationStartChangeRequestExecutionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartChangeRequestExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_StartSession.go b/service/ssm/api_op_StartSession.go index afa5cb8c8fa..9a1bb57540d 100644 --- a/service/ssm/api_op_StartSession.go +++ b/service/ssm/api_op_StartSession.go @@ -158,6 +158,9 @@ func (c *Client) addOperationStartSessionMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_StopAutomationExecution.go b/service/ssm/api_op_StopAutomationExecution.go index 1b7f9b5b83a..b0118079ce0 100644 --- a/service/ssm/api_op_StopAutomationExecution.go +++ b/service/ssm/api_op_StopAutomationExecution.go @@ -106,6 +106,9 @@ func (c *Client) addOperationStopAutomationExecutionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopAutomationExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_TerminateSession.go b/service/ssm/api_op_TerminateSession.go index 6b1f227857e..d2ed650e86c 100644 --- a/service/ssm/api_op_TerminateSession.go +++ b/service/ssm/api_op_TerminateSession.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTerminateSessionMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UnlabelParameterVersion.go b/service/ssm/api_op_UnlabelParameterVersion.go index 769ce2e89b5..405a1f724e8 100644 --- a/service/ssm/api_op_UnlabelParameterVersion.go +++ b/service/ssm/api_op_UnlabelParameterVersion.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUnlabelParameterVersionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUnlabelParameterVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateAssociation.go b/service/ssm/api_op_UpdateAssociation.go index 7efe5a35866..a4fbdc139f5 100644 --- a/service/ssm/api_op_UpdateAssociation.go +++ b/service/ssm/api_op_UpdateAssociation.go @@ -298,6 +298,9 @@ func (c *Client) addOperationUpdateAssociationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateAssociationStatus.go b/service/ssm/api_op_UpdateAssociationStatus.go index 9c46b2460c9..569a5a10259 100644 --- a/service/ssm/api_op_UpdateAssociationStatus.go +++ b/service/ssm/api_op_UpdateAssociationStatus.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateAssociationStatusMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAssociationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateDocument.go b/service/ssm/api_op_UpdateDocument.go index f455f06f937..321462cb002 100644 --- a/service/ssm/api_op_UpdateDocument.go +++ b/service/ssm/api_op_UpdateDocument.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateDocumentDefaultVersion.go b/service/ssm/api_op_UpdateDocumentDefaultVersion.go index fbf38424d8a..6a5ecad60b3 100644 --- a/service/ssm/api_op_UpdateDocumentDefaultVersion.go +++ b/service/ssm/api_op_UpdateDocumentDefaultVersion.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateDocumentDefaultVersionMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentDefaultVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateDocumentMetadata.go b/service/ssm/api_op_UpdateDocumentMetadata.go index 4ce8489f86c..cfc70f1fb3f 100644 --- a/service/ssm/api_op_UpdateDocumentMetadata.go +++ b/service/ssm/api_op_UpdateDocumentMetadata.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateDocumentMetadataMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateMaintenanceWindow.go b/service/ssm/api_op_UpdateMaintenanceWindow.go index e891267977c..102e5b88d10 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindow.go +++ b/service/ssm/api_op_UpdateMaintenanceWindow.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMaintenanceWindowValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateMaintenanceWindowTarget.go b/service/ssm/api_op_UpdateMaintenanceWindowTarget.go index 5409b6815a6..d83324b98b6 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindowTarget.go +++ b/service/ssm/api_op_UpdateMaintenanceWindowTarget.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowTargetMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMaintenanceWindowTargetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateMaintenanceWindowTask.go b/service/ssm/api_op_UpdateMaintenanceWindowTask.go index ce4f4871c31..cc4bf467ef6 100644 --- a/service/ssm/api_op_UpdateMaintenanceWindowTask.go +++ b/service/ssm/api_op_UpdateMaintenanceWindowTask.go @@ -336,6 +336,9 @@ func (c *Client) addOperationUpdateMaintenanceWindowTaskMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMaintenanceWindowTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateManagedInstanceRole.go b/service/ssm/api_op_UpdateManagedInstanceRole.go index 5ecf158a968..ce31afddedb 100644 --- a/service/ssm/api_op_UpdateManagedInstanceRole.go +++ b/service/ssm/api_op_UpdateManagedInstanceRole.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateManagedInstanceRoleMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateManagedInstanceRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateOpsItem.go b/service/ssm/api_op_UpdateOpsItem.go index 527e1008aa9..ace113bb2b2 100644 --- a/service/ssm/api_op_UpdateOpsItem.go +++ b/service/ssm/api_op_UpdateOpsItem.go @@ -195,6 +195,9 @@ func (c *Client) addOperationUpdateOpsItemMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOpsItemValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateOpsMetadata.go b/service/ssm/api_op_UpdateOpsMetadata.go index 9b19180cf4f..d95de8b6b2d 100644 --- a/service/ssm/api_op_UpdateOpsMetadata.go +++ b/service/ssm/api_op_UpdateOpsMetadata.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateOpsMetadataMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOpsMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdatePatchBaseline.go b/service/ssm/api_op_UpdatePatchBaseline.go index 100a2f81a1f..c20af0d7254 100644 --- a/service/ssm/api_op_UpdatePatchBaseline.go +++ b/service/ssm/api_op_UpdatePatchBaseline.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdatePatchBaselineMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePatchBaselineValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateResourceDataSync.go b/service/ssm/api_op_UpdateResourceDataSync.go index afdb872b8c7..5a6d08a6316 100644 --- a/service/ssm/api_op_UpdateResourceDataSync.go +++ b/service/ssm/api_op_UpdateResourceDataSync.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateResourceDataSyncMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceDataSyncValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssm/api_op_UpdateServiceSetting.go b/service/ssm/api_op_UpdateServiceSetting.go index cef28ce5216..fd860e7a133 100644 --- a/service/ssm/api_op_UpdateServiceSetting.go +++ b/service/ssm/api_op_UpdateServiceSetting.go @@ -167,6 +167,9 @@ func (c *Client) addOperationUpdateServiceSettingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceSettingValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_client.go b/service/ssmcontacts/api_client.go index 9f978decd25..58b37f696de 100644 --- a/service/ssmcontacts/api_client.go +++ b/service/ssmcontacts/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ssmcontacts/api_op_AcceptPage.go b/service/ssmcontacts/api_op_AcceptPage.go index c216401082b..85a7a35a5a8 100644 --- a/service/ssmcontacts/api_op_AcceptPage.go +++ b/service/ssmcontacts/api_op_AcceptPage.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAcceptPageMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptPageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_ActivateContactChannel.go b/service/ssmcontacts/api_op_ActivateContactChannel.go index 8dcff13f097..9bb162a4f28 100644 --- a/service/ssmcontacts/api_op_ActivateContactChannel.go +++ b/service/ssmcontacts/api_op_ActivateContactChannel.go @@ -107,6 +107,9 @@ func (c *Client) addOperationActivateContactChannelMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateContactChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_CreateContact.go b/service/ssmcontacts/api_op_CreateContact.go index 6e85613e48b..529b7d7ea44 100644 --- a/service/ssmcontacts/api_op_CreateContact.go +++ b/service/ssmcontacts/api_op_CreateContact.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateContactMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmcontacts/api_op_CreateContactChannel.go b/service/ssmcontacts/api_op_CreateContactChannel.go index cd97a4bcaef..327761b0fb4 100644 --- a/service/ssmcontacts/api_op_CreateContactChannel.go +++ b/service/ssmcontacts/api_op_CreateContactChannel.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateContactChannelMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateContactChannelMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmcontacts/api_op_CreateRotation.go b/service/ssmcontacts/api_op_CreateRotation.go index a2e655ea1d9..b0575480386 100644 --- a/service/ssmcontacts/api_op_CreateRotation.go +++ b/service/ssmcontacts/api_op_CreateRotation.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateRotationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRotationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_CreateRotationOverride.go b/service/ssmcontacts/api_op_CreateRotationOverride.go index 4db9b324cde..09436727f44 100644 --- a/service/ssmcontacts/api_op_CreateRotationOverride.go +++ b/service/ssmcontacts/api_op_CreateRotationOverride.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateRotationOverrideMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRotationOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DeactivateContactChannel.go b/service/ssmcontacts/api_op_DeactivateContactChannel.go index b1f8e1568ca..e916169d355 100644 --- a/service/ssmcontacts/api_op_DeactivateContactChannel.go +++ b/service/ssmcontacts/api_op_DeactivateContactChannel.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeactivateContactChannelMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateContactChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DeleteContact.go b/service/ssmcontacts/api_op_DeleteContact.go index be4be34b92d..53213089ffa 100644 --- a/service/ssmcontacts/api_op_DeleteContact.go +++ b/service/ssmcontacts/api_op_DeleteContact.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DeleteContactChannel.go b/service/ssmcontacts/api_op_DeleteContactChannel.go index 7acb159126e..972d8a09863 100644 --- a/service/ssmcontacts/api_op_DeleteContactChannel.go +++ b/service/ssmcontacts/api_op_DeleteContactChannel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteContactChannelMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContactChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DeleteRotation.go b/service/ssmcontacts/api_op_DeleteRotation.go index 227ad7075c8..47407ef6ac5 100644 --- a/service/ssmcontacts/api_op_DeleteRotation.go +++ b/service/ssmcontacts/api_op_DeleteRotation.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteRotationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRotationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DeleteRotationOverride.go b/service/ssmcontacts/api_op_DeleteRotationOverride.go index 35e5b29a861..a5b5336b41a 100644 --- a/service/ssmcontacts/api_op_DeleteRotationOverride.go +++ b/service/ssmcontacts/api_op_DeleteRotationOverride.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRotationOverrideMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRotationOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DescribeEngagement.go b/service/ssmcontacts/api_op_DescribeEngagement.go index 7872014098a..585fc263d60 100644 --- a/service/ssmcontacts/api_op_DescribeEngagement.go +++ b/service/ssmcontacts/api_op_DescribeEngagement.go @@ -149,6 +149,9 @@ func (c *Client) addOperationDescribeEngagementMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEngagementValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_DescribePage.go b/service/ssmcontacts/api_op_DescribePage.go index 15850981537..fa1f18c220b 100644 --- a/service/ssmcontacts/api_op_DescribePage.go +++ b/service/ssmcontacts/api_op_DescribePage.go @@ -155,6 +155,9 @@ func (c *Client) addOperationDescribePageMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePageValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_GetContact.go b/service/ssmcontacts/api_op_GetContact.go index 3af24b1b691..3877d599a0e 100644 --- a/service/ssmcontacts/api_op_GetContact.go +++ b/service/ssmcontacts/api_op_GetContact.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetContactMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_GetContactChannel.go b/service/ssmcontacts/api_op_GetContactChannel.go index b52ab3167bb..9a1b6d88240 100644 --- a/service/ssmcontacts/api_op_GetContactChannel.go +++ b/service/ssmcontacts/api_op_GetContactChannel.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetContactChannelMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContactChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_GetContactPolicy.go b/service/ssmcontacts/api_op_GetContactPolicy.go index d37c35f727b..3dacee7df4c 100644 --- a/service/ssmcontacts/api_op_GetContactPolicy.go +++ b/service/ssmcontacts/api_op_GetContactPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetContactPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContactPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_GetRotation.go b/service/ssmcontacts/api_op_GetRotation.go index 96c1c7a18f2..ae05184a53d 100644 --- a/service/ssmcontacts/api_op_GetRotation.go +++ b/service/ssmcontacts/api_op_GetRotation.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetRotationMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRotationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_GetRotationOverride.go b/service/ssmcontacts/api_op_GetRotationOverride.go index 7b1fd0cdae7..99e9f86c5de 100644 --- a/service/ssmcontacts/api_op_GetRotationOverride.go +++ b/service/ssmcontacts/api_op_GetRotationOverride.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetRotationOverrideMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRotationOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_ListContactChannels.go b/service/ssmcontacts/api_op_ListContactChannels.go index 81a19de5811..a00111a0cd8 100644 --- a/service/ssmcontacts/api_op_ListContactChannels.go +++ b/service/ssmcontacts/api_op_ListContactChannels.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListContactChannelsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContactChannelsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListContactChannelsMiddlewares(stack *middleware.St return nil } -// ListContactChannelsAPIClient is a client that implements the -// ListContactChannels operation. -type ListContactChannelsAPIClient interface { - ListContactChannels(context.Context, *ListContactChannelsInput, ...func(*Options)) (*ListContactChannelsOutput, error) -} - -var _ ListContactChannelsAPIClient = (*Client)(nil) - // ListContactChannelsPaginatorOptions is the paginator options for // ListContactChannels type ListContactChannelsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListContactChannelsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContactChannels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListContactChannelsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListContactChannelsAPIClient is a client that implements the +// ListContactChannels operation. +type ListContactChannelsAPIClient interface { + ListContactChannels(context.Context, *ListContactChannelsInput, ...func(*Options)) (*ListContactChannelsOutput, error) +} + +var _ ListContactChannelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContactChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListContacts.go b/service/ssmcontacts/api_op_ListContacts.go index 7d3d45a0690..662b5474b44 100644 --- a/service/ssmcontacts/api_op_ListContacts.go +++ b/service/ssmcontacts/api_op_ListContacts.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListContactsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListContacts(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListContactsMiddlewares(stack *middleware.Stack, op return nil } -// ListContactsAPIClient is a client that implements the ListContacts operation. -type ListContactsAPIClient interface { - ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) -} - -var _ ListContactsAPIClient = (*Client)(nil) - // ListContactsPaginatorOptions is the paginator options for ListContacts type ListContactsPaginatorOptions struct { // The maximum number of contacts and escalation plans per page of results. @@ -208,6 +204,9 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContacts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListContactsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListContactsAPIClient is a client that implements the ListContacts operation. +type ListContactsAPIClient interface { + ListContacts(context.Context, *ListContactsInput, ...func(*Options)) (*ListContactsOutput, error) +} + +var _ ListContactsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContacts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListEngagements.go b/service/ssmcontacts/api_op_ListEngagements.go index 54abe83ff13..b9b48f48154 100644 --- a/service/ssmcontacts/api_op_ListEngagements.go +++ b/service/ssmcontacts/api_op_ListEngagements.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListEngagementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEngagements(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListEngagementsMiddlewares(stack *middleware.Stack, return nil } -// ListEngagementsAPIClient is a client that implements the ListEngagements -// operation. -type ListEngagementsAPIClient interface { - ListEngagements(context.Context, *ListEngagementsInput, ...func(*Options)) (*ListEngagementsOutput, error) -} - -var _ ListEngagementsAPIClient = (*Client)(nil) - // ListEngagementsPaginatorOptions is the paginator options for ListEngagements type ListEngagementsPaginatorOptions struct { // The maximum number of engagements per page of results. @@ -211,6 +206,9 @@ func (p *ListEngagementsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEngagements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListEngagementsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListEngagementsAPIClient is a client that implements the ListEngagements +// operation. +type ListEngagementsAPIClient interface { + ListEngagements(context.Context, *ListEngagementsInput, ...func(*Options)) (*ListEngagementsOutput, error) +} + +var _ ListEngagementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEngagements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListPageReceipts.go b/service/ssmcontacts/api_op_ListPageReceipts.go index 96078c06336..ccd170909c4 100644 --- a/service/ssmcontacts/api_op_ListPageReceipts.go +++ b/service/ssmcontacts/api_op_ListPageReceipts.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListPageReceiptsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPageReceiptsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListPageReceiptsMiddlewares(stack *middleware.Stack return nil } -// ListPageReceiptsAPIClient is a client that implements the ListPageReceipts -// operation. -type ListPageReceiptsAPIClient interface { - ListPageReceipts(context.Context, *ListPageReceiptsInput, ...func(*Options)) (*ListPageReceiptsOutput, error) -} - -var _ ListPageReceiptsAPIClient = (*Client)(nil) - // ListPageReceiptsPaginatorOptions is the paginator options for ListPageReceipts type ListPageReceiptsPaginatorOptions struct { // The maximum number of acknowledgements per page of results. @@ -210,6 +205,9 @@ func (p *ListPageReceiptsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPageReceipts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListPageReceiptsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPageReceiptsAPIClient is a client that implements the ListPageReceipts +// operation. +type ListPageReceiptsAPIClient interface { + ListPageReceipts(context.Context, *ListPageReceiptsInput, ...func(*Options)) (*ListPageReceiptsOutput, error) +} + +var _ ListPageReceiptsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPageReceipts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListPageResolutions.go b/service/ssmcontacts/api_op_ListPageResolutions.go index e888973a50e..d31e2d405e9 100644 --- a/service/ssmcontacts/api_op_ListPageResolutions.go +++ b/service/ssmcontacts/api_op_ListPageResolutions.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPageResolutionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPageResolutionsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPageResolutionsMiddlewares(stack *middleware.St return nil } -// ListPageResolutionsAPIClient is a client that implements the -// ListPageResolutions operation. -type ListPageResolutionsAPIClient interface { - ListPageResolutions(context.Context, *ListPageResolutionsInput, ...func(*Options)) (*ListPageResolutionsOutput, error) -} - -var _ ListPageResolutionsAPIClient = (*Client)(nil) - // ListPageResolutionsPaginatorOptions is the paginator options for // ListPageResolutions type ListPageResolutionsPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListPageResolutionsPaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPageResolutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListPageResolutionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPageResolutionsAPIClient is a client that implements the +// ListPageResolutions operation. +type ListPageResolutionsAPIClient interface { + ListPageResolutions(context.Context, *ListPageResolutionsInput, ...func(*Options)) (*ListPageResolutionsOutput, error) +} + +var _ ListPageResolutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPageResolutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListPagesByContact.go b/service/ssmcontacts/api_op_ListPagesByContact.go index 52bfd139898..860a682331c 100644 --- a/service/ssmcontacts/api_op_ListPagesByContact.go +++ b/service/ssmcontacts/api_op_ListPagesByContact.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListPagesByContactMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPagesByContactValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListPagesByContactMiddlewares(stack *middleware.Sta return nil } -// ListPagesByContactAPIClient is a client that implements the ListPagesByContact -// operation. -type ListPagesByContactAPIClient interface { - ListPagesByContact(context.Context, *ListPagesByContactInput, ...func(*Options)) (*ListPagesByContactOutput, error) -} - -var _ ListPagesByContactAPIClient = (*Client)(nil) - // ListPagesByContactPaginatorOptions is the paginator options for // ListPagesByContact type ListPagesByContactPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListPagesByContactPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPagesByContact(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListPagesByContactPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPagesByContactAPIClient is a client that implements the ListPagesByContact +// operation. +type ListPagesByContactAPIClient interface { + ListPagesByContact(context.Context, *ListPagesByContactInput, ...func(*Options)) (*ListPagesByContactOutput, error) +} + +var _ ListPagesByContactAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPagesByContact(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListPagesByEngagement.go b/service/ssmcontacts/api_op_ListPagesByEngagement.go index 083d03a1558..5c32ba71646 100644 --- a/service/ssmcontacts/api_op_ListPagesByEngagement.go +++ b/service/ssmcontacts/api_op_ListPagesByEngagement.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPagesByEngagementMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPagesByEngagementValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListPagesByEngagementMiddlewares(stack *middleware. return nil } -// ListPagesByEngagementAPIClient is a client that implements the -// ListPagesByEngagement operation. -type ListPagesByEngagementAPIClient interface { - ListPagesByEngagement(context.Context, *ListPagesByEngagementInput, ...func(*Options)) (*ListPagesByEngagementOutput, error) -} - -var _ ListPagesByEngagementAPIClient = (*Client)(nil) - // ListPagesByEngagementPaginatorOptions is the paginator options for // ListPagesByEngagement type ListPagesByEngagementPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListPagesByEngagementPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPagesByEngagement(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListPagesByEngagementPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListPagesByEngagementAPIClient is a client that implements the +// ListPagesByEngagement operation. +type ListPagesByEngagementAPIClient interface { + ListPagesByEngagement(context.Context, *ListPagesByEngagementInput, ...func(*Options)) (*ListPagesByEngagementOutput, error) +} + +var _ ListPagesByEngagementAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPagesByEngagement(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListPreviewRotationShifts.go b/service/ssmcontacts/api_op_ListPreviewRotationShifts.go index 4c4f4dd0ff1..325a541f329 100644 --- a/service/ssmcontacts/api_op_ListPreviewRotationShifts.go +++ b/service/ssmcontacts/api_op_ListPreviewRotationShifts.go @@ -150,6 +150,9 @@ func (c *Client) addOperationListPreviewRotationShiftsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPreviewRotationShiftsValidationMiddleware(stack); err != nil { return err } @@ -174,14 +177,6 @@ func (c *Client) addOperationListPreviewRotationShiftsMiddlewares(stack *middlew return nil } -// ListPreviewRotationShiftsAPIClient is a client that implements the -// ListPreviewRotationShifts operation. -type ListPreviewRotationShiftsAPIClient interface { - ListPreviewRotationShifts(context.Context, *ListPreviewRotationShiftsInput, ...func(*Options)) (*ListPreviewRotationShiftsOutput, error) -} - -var _ ListPreviewRotationShiftsAPIClient = (*Client)(nil) - // ListPreviewRotationShiftsPaginatorOptions is the paginator options for // ListPreviewRotationShifts type ListPreviewRotationShiftsPaginatorOptions struct { @@ -248,6 +243,9 @@ func (p *ListPreviewRotationShiftsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPreviewRotationShifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +265,14 @@ func (p *ListPreviewRotationShiftsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListPreviewRotationShiftsAPIClient is a client that implements the +// ListPreviewRotationShifts operation. +type ListPreviewRotationShiftsAPIClient interface { + ListPreviewRotationShifts(context.Context, *ListPreviewRotationShiftsInput, ...func(*Options)) (*ListPreviewRotationShiftsOutput, error) +} + +var _ ListPreviewRotationShiftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPreviewRotationShifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListRotationOverrides.go b/service/ssmcontacts/api_op_ListRotationOverrides.go index b569ac32332..ad83216673f 100644 --- a/service/ssmcontacts/api_op_ListRotationOverrides.go +++ b/service/ssmcontacts/api_op_ListRotationOverrides.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListRotationOverridesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRotationOverridesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListRotationOverridesMiddlewares(stack *middleware. return nil } -// ListRotationOverridesAPIClient is a client that implements the -// ListRotationOverrides operation. -type ListRotationOverridesAPIClient interface { - ListRotationOverrides(context.Context, *ListRotationOverridesInput, ...func(*Options)) (*ListRotationOverridesOutput, error) -} - -var _ ListRotationOverridesAPIClient = (*Client)(nil) - // ListRotationOverridesPaginatorOptions is the paginator options for // ListRotationOverrides type ListRotationOverridesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListRotationOverridesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRotationOverrides(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListRotationOverridesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListRotationOverridesAPIClient is a client that implements the +// ListRotationOverrides operation. +type ListRotationOverridesAPIClient interface { + ListRotationOverrides(context.Context, *ListRotationOverridesInput, ...func(*Options)) (*ListRotationOverridesOutput, error) +} + +var _ ListRotationOverridesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRotationOverrides(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListRotationShifts.go b/service/ssmcontacts/api_op_ListRotationShifts.go index 19f75725121..85af7edeff4 100644 --- a/service/ssmcontacts/api_op_ListRotationShifts.go +++ b/service/ssmcontacts/api_op_ListRotationShifts.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListRotationShiftsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRotationShiftsValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListRotationShiftsMiddlewares(stack *middleware.Sta return nil } -// ListRotationShiftsAPIClient is a client that implements the ListRotationShifts -// operation. -type ListRotationShiftsAPIClient interface { - ListRotationShifts(context.Context, *ListRotationShiftsInput, ...func(*Options)) (*ListRotationShiftsOutput, error) -} - -var _ ListRotationShiftsAPIClient = (*Client)(nil) - // ListRotationShiftsPaginatorOptions is the paginator options for // ListRotationShifts type ListRotationShiftsPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListRotationShiftsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRotationShifts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListRotationShiftsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListRotationShiftsAPIClient is a client that implements the ListRotationShifts +// operation. +type ListRotationShiftsAPIClient interface { + ListRotationShifts(context.Context, *ListRotationShiftsInput, ...func(*Options)) (*ListRotationShiftsOutput, error) +} + +var _ ListRotationShiftsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRotationShifts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListRotations.go b/service/ssmcontacts/api_op_ListRotations.go index 22c69e25a67..b9fd59a455d 100644 --- a/service/ssmcontacts/api_op_ListRotations.go +++ b/service/ssmcontacts/api_op_ListRotations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListRotationsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRotations(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListRotationsMiddlewares(stack *middleware.Stack, o return nil } -// ListRotationsAPIClient is a client that implements the ListRotations operation. -type ListRotationsAPIClient interface { - ListRotations(context.Context, *ListRotationsInput, ...func(*Options)) (*ListRotationsOutput, error) -} - -var _ ListRotationsAPIClient = (*Client)(nil) - // ListRotationsPaginatorOptions is the paginator options for ListRotations type ListRotationsPaginatorOptions struct { // The maximum number of items to return for this call. The call also returns a @@ -211,6 +207,9 @@ func (p *ListRotationsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRotations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListRotationsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListRotationsAPIClient is a client that implements the ListRotations operation. +type ListRotationsAPIClient interface { + ListRotations(context.Context, *ListRotationsInput, ...func(*Options)) (*ListRotationsOutput, error) +} + +var _ ListRotationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRotations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmcontacts/api_op_ListTagsForResource.go b/service/ssmcontacts/api_op_ListTagsForResource.go index 585eaa6901e..ee7c4dfa16b 100644 --- a/service/ssmcontacts/api_op_ListTagsForResource.go +++ b/service/ssmcontacts/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_PutContactPolicy.go b/service/ssmcontacts/api_op_PutContactPolicy.go index e2145901335..cd953ca0d3d 100644 --- a/service/ssmcontacts/api_op_PutContactPolicy.go +++ b/service/ssmcontacts/api_op_PutContactPolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationPutContactPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutContactPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_SendActivationCode.go b/service/ssmcontacts/api_op_SendActivationCode.go index c0608b6af8b..ffb4c6246fa 100644 --- a/service/ssmcontacts/api_op_SendActivationCode.go +++ b/service/ssmcontacts/api_op_SendActivationCode.go @@ -104,6 +104,9 @@ func (c *Client) addOperationSendActivationCodeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendActivationCodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_StartEngagement.go b/service/ssmcontacts/api_op_StartEngagement.go index 9a9341dfb9d..d8fa19d7933 100644 --- a/service/ssmcontacts/api_op_StartEngagement.go +++ b/service/ssmcontacts/api_op_StartEngagement.go @@ -140,6 +140,9 @@ func (c *Client) addOperationStartEngagementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartEngagementMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmcontacts/api_op_StopEngagement.go b/service/ssmcontacts/api_op_StopEngagement.go index ad017f8bff0..602bf72e91a 100644 --- a/service/ssmcontacts/api_op_StopEngagement.go +++ b/service/ssmcontacts/api_op_StopEngagement.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStopEngagementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopEngagementValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_TagResource.go b/service/ssmcontacts/api_op_TagResource.go index 81f8d99e336..3ab45bad761 100644 --- a/service/ssmcontacts/api_op_TagResource.go +++ b/service/ssmcontacts/api_op_TagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_UntagResource.go b/service/ssmcontacts/api_op_UntagResource.go index a244f9d3c1b..d9a417b63c6 100644 --- a/service/ssmcontacts/api_op_UntagResource.go +++ b/service/ssmcontacts/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_UpdateContact.go b/service/ssmcontacts/api_op_UpdateContact.go index a5ab513d2c9..56464f547a2 100644 --- a/service/ssmcontacts/api_op_UpdateContact.go +++ b/service/ssmcontacts/api_op_UpdateContact.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateContactMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_UpdateContactChannel.go b/service/ssmcontacts/api_op_UpdateContactChannel.go index f65567ec64d..9264d0ea20b 100644 --- a/service/ssmcontacts/api_op_UpdateContactChannel.go +++ b/service/ssmcontacts/api_op_UpdateContactChannel.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateContactChannelMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContactChannelValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmcontacts/api_op_UpdateRotation.go b/service/ssmcontacts/api_op_UpdateRotation.go index cf1366a1988..c3e550ecd0f 100644 --- a/service/ssmcontacts/api_op_UpdateRotation.go +++ b/service/ssmcontacts/api_op_UpdateRotation.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateRotationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRotationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_client.go b/service/ssmincidents/api_client.go index 6a71ac418ee..2714f4f36f7 100644 --- a/service/ssmincidents/api_client.go +++ b/service/ssmincidents/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ssmincidents/api_op_BatchGetIncidentFindings.go b/service/ssmincidents/api_op_BatchGetIncidentFindings.go index 82312577617..4b716f3efe3 100644 --- a/service/ssmincidents/api_op_BatchGetIncidentFindings.go +++ b/service/ssmincidents/api_op_BatchGetIncidentFindings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationBatchGetIncidentFindingsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetIncidentFindingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_CreateReplicationSet.go b/service/ssmincidents/api_op_CreateReplicationSet.go index 11d2fc2243f..7f71b049c64 100644 --- a/service/ssmincidents/api_op_CreateReplicationSet.go +++ b/service/ssmincidents/api_op_CreateReplicationSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCreateReplicationSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateReplicationSetMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_CreateResponsePlan.go b/service/ssmincidents/api_op_CreateResponsePlan.go index 1ddbc4deedc..825856ef9c8 100644 --- a/service/ssmincidents/api_op_CreateResponsePlan.go +++ b/service/ssmincidents/api_op_CreateResponsePlan.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateResponsePlanMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateResponsePlanMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_CreateTimelineEvent.go b/service/ssmincidents/api_op_CreateTimelineEvent.go index 92a4476ce65..f2c7001db07 100644 --- a/service/ssmincidents/api_op_CreateTimelineEvent.go +++ b/service/ssmincidents/api_op_CreateTimelineEvent.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateTimelineEventMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTimelineEventMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_DeleteIncidentRecord.go b/service/ssmincidents/api_op_DeleteIncidentRecord.go index 85e735bd254..763dee665d7 100644 --- a/service/ssmincidents/api_op_DeleteIncidentRecord.go +++ b/service/ssmincidents/api_op_DeleteIncidentRecord.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteIncidentRecordMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIncidentRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_DeleteReplicationSet.go b/service/ssmincidents/api_op_DeleteReplicationSet.go index 6882ad7a95f..1a3728138b1 100644 --- a/service/ssmincidents/api_op_DeleteReplicationSet.go +++ b/service/ssmincidents/api_op_DeleteReplicationSet.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteReplicationSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteReplicationSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_DeleteResourcePolicy.go b/service/ssmincidents/api_op_DeleteResourcePolicy.go index afe3928789a..fdce5e0f134 100644 --- a/service/ssmincidents/api_op_DeleteResourcePolicy.go +++ b/service/ssmincidents/api_op_DeleteResourcePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_DeleteResponsePlan.go b/service/ssmincidents/api_op_DeleteResponsePlan.go index 16e30de02d1..e83336b6322 100644 --- a/service/ssmincidents/api_op_DeleteResponsePlan.go +++ b/service/ssmincidents/api_op_DeleteResponsePlan.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteResponsePlanMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResponsePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_DeleteTimelineEvent.go b/service/ssmincidents/api_op_DeleteTimelineEvent.go index 065f874688b..3e82d73fb59 100644 --- a/service/ssmincidents/api_op_DeleteTimelineEvent.go +++ b/service/ssmincidents/api_op_DeleteTimelineEvent.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteTimelineEventMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTimelineEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_GetIncidentRecord.go b/service/ssmincidents/api_op_GetIncidentRecord.go index 03058354832..bd530da4cc1 100644 --- a/service/ssmincidents/api_op_GetIncidentRecord.go +++ b/service/ssmincidents/api_op_GetIncidentRecord.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetIncidentRecordMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIncidentRecordValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_GetReplicationSet.go b/service/ssmincidents/api_op_GetReplicationSet.go index 500cf8c6da8..329f18d65e6 100644 --- a/service/ssmincidents/api_op_GetReplicationSet.go +++ b/service/ssmincidents/api_op_GetReplicationSet.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetReplicationSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReplicationSetValidationMiddleware(stack); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationGetReplicationSetMiddlewares(stack *middleware.Stac return nil } -// GetReplicationSetAPIClient is a client that implements the GetReplicationSet -// operation. -type GetReplicationSetAPIClient interface { - GetReplicationSet(context.Context, *GetReplicationSetInput, ...func(*Options)) (*GetReplicationSetOutput, error) -} - -var _ GetReplicationSetAPIClient = (*Client)(nil) - // WaitForReplicationSetActiveWaiterOptions are waiter options for // WaitForReplicationSetActiveWaiter type WaitForReplicationSetActiveWaiterOptions struct { @@ -264,7 +259,13 @@ func (w *WaitForReplicationSetActiveWaiter) WaitForOutput(ctx context.Context, p } out, err := w.client.GetReplicationSet(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -492,7 +493,13 @@ func (w *WaitForReplicationSetDeletedWaiter) WaitForOutput(ctx context.Context, } out, err := w.client.GetReplicationSet(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -574,6 +581,14 @@ func waitForReplicationSetDeletedStateRetryable(ctx context.Context, input *GetR return true, nil } +// GetReplicationSetAPIClient is a client that implements the GetReplicationSet +// operation. +type GetReplicationSetAPIClient interface { + GetReplicationSet(context.Context, *GetReplicationSetInput, ...func(*Options)) (*GetReplicationSetOutput, error) +} + +var _ GetReplicationSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetReplicationSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_GetResourcePolicies.go b/service/ssmincidents/api_op_GetResourcePolicies.go index 71587eb940c..87b2819e33f 100644 --- a/service/ssmincidents/api_op_GetResourcePolicies.go +++ b/service/ssmincidents/api_op_GetResourcePolicies.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePoliciesValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationGetResourcePoliciesMiddlewares(stack *middleware.St return nil } -// GetResourcePoliciesAPIClient is a client that implements the -// GetResourcePolicies operation. -type GetResourcePoliciesAPIClient interface { - GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) -} - -var _ GetResourcePoliciesAPIClient = (*Client)(nil) - // GetResourcePoliciesPaginatorOptions is the paginator options for // GetResourcePolicies type GetResourcePoliciesPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetResourcePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetResourcePoliciesAPIClient is a client that implements the +// GetResourcePolicies operation. +type GetResourcePoliciesAPIClient interface { + GetResourcePolicies(context.Context, *GetResourcePoliciesInput, ...func(*Options)) (*GetResourcePoliciesOutput, error) +} + +var _ GetResourcePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_GetResponsePlan.go b/service/ssmincidents/api_op_GetResponsePlan.go index 33bde9848d5..f9c0c1ccc75 100644 --- a/service/ssmincidents/api_op_GetResponsePlan.go +++ b/service/ssmincidents/api_op_GetResponsePlan.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetResponsePlanMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResponsePlanValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_GetTimelineEvent.go b/service/ssmincidents/api_op_GetTimelineEvent.go index 315f95436c5..e0e71a5bf30 100644 --- a/service/ssmincidents/api_op_GetTimelineEvent.go +++ b/service/ssmincidents/api_op_GetTimelineEvent.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetTimelineEventMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTimelineEventValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_ListIncidentFindings.go b/service/ssmincidents/api_op_ListIncidentFindings.go index bf3ebadd61d..89e10028c96 100644 --- a/service/ssmincidents/api_op_ListIncidentFindings.go +++ b/service/ssmincidents/api_op_ListIncidentFindings.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListIncidentFindingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIncidentFindingsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListIncidentFindingsMiddlewares(stack *middleware.S return nil } -// ListIncidentFindingsAPIClient is a client that implements the -// ListIncidentFindings operation. -type ListIncidentFindingsAPIClient interface { - ListIncidentFindings(context.Context, *ListIncidentFindingsInput, ...func(*Options)) (*ListIncidentFindingsOutput, error) -} - -var _ ListIncidentFindingsAPIClient = (*Client)(nil) - // ListIncidentFindingsPaginatorOptions is the paginator options for // ListIncidentFindings type ListIncidentFindingsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListIncidentFindingsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIncidentFindings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListIncidentFindingsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListIncidentFindingsAPIClient is a client that implements the +// ListIncidentFindings operation. +type ListIncidentFindingsAPIClient interface { + ListIncidentFindings(context.Context, *ListIncidentFindingsInput, ...func(*Options)) (*ListIncidentFindingsOutput, error) +} + +var _ ListIncidentFindingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIncidentFindings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_ListIncidentRecords.go b/service/ssmincidents/api_op_ListIncidentRecords.go index c39faff327b..6960da31959 100644 --- a/service/ssmincidents/api_op_ListIncidentRecords.go +++ b/service/ssmincidents/api_op_ListIncidentRecords.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListIncidentRecordsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIncidentRecordsValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListIncidentRecordsMiddlewares(stack *middleware.St return nil } -// ListIncidentRecordsAPIClient is a client that implements the -// ListIncidentRecords operation. -type ListIncidentRecordsAPIClient interface { - ListIncidentRecords(context.Context, *ListIncidentRecordsInput, ...func(*Options)) (*ListIncidentRecordsOutput, error) -} - -var _ ListIncidentRecordsAPIClient = (*Client)(nil) - // ListIncidentRecordsPaginatorOptions is the paginator options for // ListIncidentRecords type ListIncidentRecordsPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListIncidentRecordsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIncidentRecords(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListIncidentRecordsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListIncidentRecordsAPIClient is a client that implements the +// ListIncidentRecords operation. +type ListIncidentRecordsAPIClient interface { + ListIncidentRecords(context.Context, *ListIncidentRecordsInput, ...func(*Options)) (*ListIncidentRecordsOutput, error) +} + +var _ ListIncidentRecordsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIncidentRecords(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_ListRelatedItems.go b/service/ssmincidents/api_op_ListRelatedItems.go index fa033231608..037162478be 100644 --- a/service/ssmincidents/api_op_ListRelatedItems.go +++ b/service/ssmincidents/api_op_ListRelatedItems.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListRelatedItemsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRelatedItemsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListRelatedItemsMiddlewares(stack *middleware.Stack return nil } -// ListRelatedItemsAPIClient is a client that implements the ListRelatedItems -// operation. -type ListRelatedItemsAPIClient interface { - ListRelatedItems(context.Context, *ListRelatedItemsInput, ...func(*Options)) (*ListRelatedItemsOutput, error) -} - -var _ ListRelatedItemsAPIClient = (*Client)(nil) - // ListRelatedItemsPaginatorOptions is the paginator options for ListRelatedItems type ListRelatedItemsPaginatorOptions struct { // The maximum number of related items per page. @@ -215,6 +210,9 @@ func (p *ListRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRelatedItems(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListRelatedItemsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListRelatedItemsAPIClient is a client that implements the ListRelatedItems +// operation. +type ListRelatedItemsAPIClient interface { + ListRelatedItems(context.Context, *ListRelatedItemsInput, ...func(*Options)) (*ListRelatedItemsOutput, error) +} + +var _ ListRelatedItemsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRelatedItems(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_ListReplicationSets.go b/service/ssmincidents/api_op_ListReplicationSets.go index fe6b8824001..c5619bfc4a2 100644 --- a/service/ssmincidents/api_op_ListReplicationSets.go +++ b/service/ssmincidents/api_op_ListReplicationSets.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListReplicationSetsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReplicationSets(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListReplicationSetsMiddlewares(stack *middleware.St return nil } -// ListReplicationSetsAPIClient is a client that implements the -// ListReplicationSets operation. -type ListReplicationSetsAPIClient interface { - ListReplicationSets(context.Context, *ListReplicationSetsInput, ...func(*Options)) (*ListReplicationSetsOutput, error) -} - -var _ ListReplicationSetsAPIClient = (*Client)(nil) - // ListReplicationSetsPaginatorOptions is the paginator options for // ListReplicationSets type ListReplicationSetsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListReplicationSetsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReplicationSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListReplicationSetsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListReplicationSetsAPIClient is a client that implements the +// ListReplicationSets operation. +type ListReplicationSetsAPIClient interface { + ListReplicationSets(context.Context, *ListReplicationSetsInput, ...func(*Options)) (*ListReplicationSetsOutput, error) +} + +var _ ListReplicationSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReplicationSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_ListResponsePlans.go b/service/ssmincidents/api_op_ListResponsePlans.go index 469b2f7e00b..68fec4a29c4 100644 --- a/service/ssmincidents/api_op_ListResponsePlans.go +++ b/service/ssmincidents/api_op_ListResponsePlans.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListResponsePlansMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResponsePlans(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListResponsePlansMiddlewares(stack *middleware.Stac return nil } -// ListResponsePlansAPIClient is a client that implements the ListResponsePlans -// operation. -type ListResponsePlansAPIClient interface { - ListResponsePlans(context.Context, *ListResponsePlansInput, ...func(*Options)) (*ListResponsePlansOutput, error) -} - -var _ ListResponsePlansAPIClient = (*Client)(nil) - // ListResponsePlansPaginatorOptions is the paginator options for ListResponsePlans type ListResponsePlansPaginatorOptions struct { // The maximum number of response plans per page. @@ -206,6 +201,9 @@ func (p *ListResponsePlansPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResponsePlans(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListResponsePlansPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListResponsePlansAPIClient is a client that implements the ListResponsePlans +// operation. +type ListResponsePlansAPIClient interface { + ListResponsePlans(context.Context, *ListResponsePlansInput, ...func(*Options)) (*ListResponsePlansOutput, error) +} + +var _ ListResponsePlansAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResponsePlans(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_ListTagsForResource.go b/service/ssmincidents/api_op_ListTagsForResource.go index 958426e4b62..10731aa7e0e 100644 --- a/service/ssmincidents/api_op_ListTagsForResource.go +++ b/service/ssmincidents/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_ListTimelineEvents.go b/service/ssmincidents/api_op_ListTimelineEvents.go index 6a91758e9fc..3b78fdfe0e9 100644 --- a/service/ssmincidents/api_op_ListTimelineEvents.go +++ b/service/ssmincidents/api_op_ListTimelineEvents.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListTimelineEventsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTimelineEventsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListTimelineEventsMiddlewares(stack *middleware.Sta return nil } -// ListTimelineEventsAPIClient is a client that implements the ListTimelineEvents -// operation. -type ListTimelineEventsAPIClient interface { - ListTimelineEvents(context.Context, *ListTimelineEventsInput, ...func(*Options)) (*ListTimelineEventsOutput, error) -} - -var _ ListTimelineEventsAPIClient = (*Client)(nil) - // ListTimelineEventsPaginatorOptions is the paginator options for // ListTimelineEvents type ListTimelineEventsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListTimelineEventsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTimelineEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListTimelineEventsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListTimelineEventsAPIClient is a client that implements the ListTimelineEvents +// operation. +type ListTimelineEventsAPIClient interface { + ListTimelineEvents(context.Context, *ListTimelineEventsInput, ...func(*Options)) (*ListTimelineEventsOutput, error) +} + +var _ ListTimelineEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTimelineEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmincidents/api_op_PutResourcePolicy.go b/service/ssmincidents/api_op_PutResourcePolicy.go index 9cd3df606a7..dda82bf5511 100644 --- a/service/ssmincidents/api_op_PutResourcePolicy.go +++ b/service/ssmincidents/api_op_PutResourcePolicy.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_StartIncident.go b/service/ssmincidents/api_op_StartIncident.go index 5fc93ca8530..d868441112f 100644 --- a/service/ssmincidents/api_op_StartIncident.go +++ b/service/ssmincidents/api_op_StartIncident.go @@ -142,6 +142,9 @@ func (c *Client) addOperationStartIncidentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartIncidentMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_TagResource.go b/service/ssmincidents/api_op_TagResource.go index 813056ca487..a8386fdc256 100644 --- a/service/ssmincidents/api_op_TagResource.go +++ b/service/ssmincidents/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_UntagResource.go b/service/ssmincidents/api_op_UntagResource.go index 08232f351a1..d53938af4eb 100644 --- a/service/ssmincidents/api_op_UntagResource.go +++ b/service/ssmincidents/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmincidents/api_op_UpdateDeletionProtection.go b/service/ssmincidents/api_op_UpdateDeletionProtection.go index e7a0da7c4de..bc351a40c51 100644 --- a/service/ssmincidents/api_op_UpdateDeletionProtection.go +++ b/service/ssmincidents/api_op_UpdateDeletionProtection.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateDeletionProtectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateDeletionProtectionMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_UpdateIncidentRecord.go b/service/ssmincidents/api_op_UpdateIncidentRecord.go index 59e5b6be38a..cf11b211af5 100644 --- a/service/ssmincidents/api_op_UpdateIncidentRecord.go +++ b/service/ssmincidents/api_op_UpdateIncidentRecord.go @@ -146,6 +146,9 @@ func (c *Client) addOperationUpdateIncidentRecordMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateIncidentRecordMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_UpdateRelatedItems.go b/service/ssmincidents/api_op_UpdateRelatedItems.go index e1fabdc20b3..fe2eca8edb5 100644 --- a/service/ssmincidents/api_op_UpdateRelatedItems.go +++ b/service/ssmincidents/api_op_UpdateRelatedItems.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateRelatedItemsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateRelatedItemsMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_UpdateReplicationSet.go b/service/ssmincidents/api_op_UpdateReplicationSet.go index eefbf013fc9..23b86031307 100644 --- a/service/ssmincidents/api_op_UpdateReplicationSet.go +++ b/service/ssmincidents/api_op_UpdateReplicationSet.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateReplicationSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateReplicationSetMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_UpdateResponsePlan.go b/service/ssmincidents/api_op_UpdateResponsePlan.go index c90a216c9a8..9824fe8c86b 100644 --- a/service/ssmincidents/api_op_UpdateResponsePlan.go +++ b/service/ssmincidents/api_op_UpdateResponsePlan.go @@ -161,6 +161,9 @@ func (c *Client) addOperationUpdateResponsePlanMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateResponsePlanMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmincidents/api_op_UpdateTimelineEvent.go b/service/ssmincidents/api_op_UpdateTimelineEvent.go index 170b4b59dff..5e50d370317 100644 --- a/service/ssmincidents/api_op_UpdateTimelineEvent.go +++ b/service/ssmincidents/api_op_UpdateTimelineEvent.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateTimelineEventMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateTimelineEventMiddleware(stack, options); err != nil { return err } diff --git a/service/ssmsap/api_client.go b/service/ssmsap/api_client.go index 567b0fe7b6e..c19b05c0ec5 100644 --- a/service/ssmsap/api_client.go +++ b/service/ssmsap/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ssmsap/api_op_DeleteResourcePermission.go b/service/ssmsap/api_op_DeleteResourcePermission.go index 8e4556a1346..4e74fc582de 100644 --- a/service/ssmsap/api_op_DeleteResourcePermission.go +++ b/service/ssmsap/api_op_DeleteResourcePermission.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteResourcePermissionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_DeregisterApplication.go b/service/ssmsap/api_op_DeregisterApplication.go index 47b3692aef9..21328e39a81 100644 --- a/service/ssmsap/api_op_DeregisterApplication.go +++ b/service/ssmsap/api_op_DeregisterApplication.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeregisterApplicationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_GetApplication.go b/service/ssmsap/api_op_GetApplication.go index dbf54fb6a70..a1b09787892 100644 --- a/service/ssmsap/api_op_GetApplication.go +++ b/service/ssmsap/api_op_GetApplication.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetApplication(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ssmsap/api_op_GetComponent.go b/service/ssmsap/api_op_GetComponent.go index 6c04bae07e0..b24daa90476 100644 --- a/service/ssmsap/api_op_GetComponent.go +++ b/service/ssmsap/api_op_GetComponent.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetComponentMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetComponentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_GetDatabase.go b/service/ssmsap/api_op_GetDatabase.go index 597f4a28be9..aa4a574d4a6 100644 --- a/service/ssmsap/api_op_GetDatabase.go +++ b/service/ssmsap/api_op_GetDatabase.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetDatabaseMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDatabase(options.Region), middleware.Before); err != nil { return err } diff --git a/service/ssmsap/api_op_GetOperation.go b/service/ssmsap/api_op_GetOperation.go index ad0d40322d3..f05f5af137f 100644 --- a/service/ssmsap/api_op_GetOperation.go +++ b/service/ssmsap/api_op_GetOperation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetOperationMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_GetResourcePermission.go b/service/ssmsap/api_op_GetResourcePermission.go index 942422a48f0..23451e88350 100644 --- a/service/ssmsap/api_op_GetResourcePermission.go +++ b/service/ssmsap/api_op_GetResourcePermission.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetResourcePermissionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_ListApplications.go b/service/ssmsap/api_op_ListApplications.go index 11befca5599..0533d8eddc7 100644 --- a/service/ssmsap/api_op_ListApplications.go +++ b/service/ssmsap/api_op_ListApplications.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationsValidationMiddleware(stack); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -211,6 +206,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmsap/api_op_ListComponents.go b/service/ssmsap/api_op_ListComponents.go index 189ea22c1be..53c6343e3f4 100644 --- a/service/ssmsap/api_op_ListComponents.go +++ b/service/ssmsap/api_op_ListComponents.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListComponents(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListComponentsMiddlewares(stack *middleware.Stack, return nil } -// ListComponentsAPIClient is a client that implements the ListComponents -// operation. -type ListComponentsAPIClient interface { - ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) -} - -var _ ListComponentsAPIClient = (*Client)(nil) - // ListComponentsPaginatorOptions is the paginator options for ListComponents type ListComponentsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -214,6 +209,9 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListComponents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListComponentsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListComponentsAPIClient is a client that implements the ListComponents +// operation. +type ListComponentsAPIClient interface { + ListComponents(context.Context, *ListComponentsInput, ...func(*Options)) (*ListComponentsOutput, error) +} + +var _ ListComponentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListComponents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmsap/api_op_ListDatabases.go b/service/ssmsap/api_op_ListDatabases.go index 1eadea87856..324f18e476a 100644 --- a/service/ssmsap/api_op_ListDatabases.go +++ b/service/ssmsap/api_op_ListDatabases.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatabases(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o return nil } -// ListDatabasesAPIClient is a client that implements the ListDatabases operation. -type ListDatabasesAPIClient interface { - ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) -} - -var _ ListDatabasesAPIClient = (*Client)(nil) - // ListDatabasesPaginatorOptions is the paginator options for ListDatabases type ListDatabasesPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -215,6 +211,9 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListDatabasesAPIClient is a client that implements the ListDatabases operation. +type ListDatabasesAPIClient interface { + ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) +} + +var _ ListDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmsap/api_op_ListOperationEvents.go b/service/ssmsap/api_op_ListOperationEvents.go index a035c763174..9197d9e0cd3 100644 --- a/service/ssmsap/api_op_ListOperationEvents.go +++ b/service/ssmsap/api_op_ListOperationEvents.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListOperationEventsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOperationEventsValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListOperationEventsMiddlewares(stack *middleware.St return nil } -// ListOperationEventsAPIClient is a client that implements the -// ListOperationEvents operation. -type ListOperationEventsAPIClient interface { - ListOperationEvents(context.Context, *ListOperationEventsInput, ...func(*Options)) (*ListOperationEventsOutput, error) -} - -var _ ListOperationEventsAPIClient = (*Client)(nil) - // ListOperationEventsPaginatorOptions is the paginator options for // ListOperationEvents type ListOperationEventsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListOperationEventsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOperationEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListOperationEventsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListOperationEventsAPIClient is a client that implements the +// ListOperationEvents operation. +type ListOperationEventsAPIClient interface { + ListOperationEvents(context.Context, *ListOperationEventsInput, ...func(*Options)) (*ListOperationEventsOutput, error) +} + +var _ ListOperationEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOperationEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmsap/api_op_ListOperations.go b/service/ssmsap/api_op_ListOperations.go index f810f50584c..0335172808a 100644 --- a/service/ssmsap/api_op_ListOperations.go +++ b/service/ssmsap/api_op_ListOperations.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOperationsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListOperationsMiddlewares(stack *middleware.Stack, return nil } -// ListOperationsAPIClient is a client that implements the ListOperations -// operation. -type ListOperationsAPIClient interface { - ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) -} - -var _ ListOperationsAPIClient = (*Client)(nil) - // ListOperationsPaginatorOptions is the paginator options for ListOperations type ListOperationsPaginatorOptions struct { // The maximum number of results to return with a single call. To retrieve the @@ -220,6 +215,9 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListOperationsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListOperationsAPIClient is a client that implements the ListOperations +// operation. +type ListOperationsAPIClient interface { + ListOperations(context.Context, *ListOperationsInput, ...func(*Options)) (*ListOperationsOutput, error) +} + +var _ ListOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssmsap/api_op_ListTagsForResource.go b/service/ssmsap/api_op_ListTagsForResource.go index 6062e5bf686..72a384313bd 100644 --- a/service/ssmsap/api_op_ListTagsForResource.go +++ b/service/ssmsap/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_PutResourcePermission.go b/service/ssmsap/api_op_PutResourcePermission.go index 936fc262ec7..39850bcf300 100644 --- a/service/ssmsap/api_op_PutResourcePermission.go +++ b/service/ssmsap/api_op_PutResourcePermission.go @@ -116,6 +116,9 @@ func (c *Client) addOperationPutResourcePermissionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_RegisterApplication.go b/service/ssmsap/api_op_RegisterApplication.go index 59bd3d369e1..b24612170a6 100644 --- a/service/ssmsap/api_op_RegisterApplication.go +++ b/service/ssmsap/api_op_RegisterApplication.go @@ -144,6 +144,9 @@ func (c *Client) addOperationRegisterApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_StartApplication.go b/service/ssmsap/api_op_StartApplication.go index 4a48709c28b..e8938f673c7 100644 --- a/service/ssmsap/api_op_StartApplication.go +++ b/service/ssmsap/api_op_StartApplication.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartApplicationMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_StartApplicationRefresh.go b/service/ssmsap/api_op_StartApplicationRefresh.go index f4056b8db25..195fe0cb601 100644 --- a/service/ssmsap/api_op_StartApplicationRefresh.go +++ b/service/ssmsap/api_op_StartApplicationRefresh.go @@ -105,6 +105,9 @@ func (c *Client) addOperationStartApplicationRefreshMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartApplicationRefreshValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_StopApplication.go b/service/ssmsap/api_op_StopApplication.go index d64d3dbdb15..1669bdf28ef 100644 --- a/service/ssmsap/api_op_StopApplication.go +++ b/service/ssmsap/api_op_StopApplication.go @@ -119,6 +119,9 @@ func (c *Client) addOperationStopApplicationMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_TagResource.go b/service/ssmsap/api_op_TagResource.go index d95b0d01fe6..acb70cf03ca 100644 --- a/service/ssmsap/api_op_TagResource.go +++ b/service/ssmsap/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_UntagResource.go b/service/ssmsap/api_op_UntagResource.go index 0c9b2a07d84..d2e5d30deba 100644 --- a/service/ssmsap/api_op_UntagResource.go +++ b/service/ssmsap/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssmsap/api_op_UpdateApplicationSettings.go b/service/ssmsap/api_op_UpdateApplicationSettings.go index aa81c3a35ce..4082a9779ab 100644 --- a/service/ssmsap/api_op_UpdateApplicationSettings.go +++ b/service/ssmsap/api_op_UpdateApplicationSettings.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateApplicationSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sso/api_client.go b/service/sso/api_client.go index b4c27a3a21d..a06c6e738fc 100644 --- a/service/sso/api_client.go +++ b/service/sso/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sso/api_op_GetRoleCredentials.go b/service/sso/api_op_GetRoleCredentials.go index 77d54b9f15b..5ce00b4961b 100644 --- a/service/sso/api_op_GetRoleCredentials.go +++ b/service/sso/api_op_GetRoleCredentials.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/sso/api_op_ListAccountRoles.go b/service/sso/api_op_ListAccountRoles.go index 77374f48f3d..f20e3acbfc9 100644 --- a/service/sso/api_op_ListAccountRoles.go +++ b/service/sso/api_op_ListAccountRoles.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountRolesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack return nil } -// ListAccountRolesAPIClient is a client that implements the ListAccountRoles -// operation. -type ListAccountRolesAPIClient interface { - ListAccountRoles(context.Context, *ListAccountRolesInput, ...func(*Options)) (*ListAccountRolesOutput, error) -} - -var _ ListAccountRolesAPIClient = (*Client)(nil) - // ListAccountRolesPaginatorOptions is the paginator options for ListAccountRoles type ListAccountRolesPaginatorOptions struct { // The number of items that clients can request per page. @@ -217,6 +212,9 @@ func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountRoles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAccountRolesAPIClient is a client that implements the ListAccountRoles +// operation. +type ListAccountRolesAPIClient interface { + ListAccountRoles(context.Context, *ListAccountRolesInput, ...func(*Options)) (*ListAccountRolesOutput, error) +} + +var _ ListAccountRolesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sso/api_op_ListAccounts.go b/service/sso/api_op_ListAccounts.go index ac15831f91b..391b567db95 100644 --- a/service/sso/api_op_ListAccounts.go +++ b/service/sso/api_op_ListAccounts.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, op return nil } -// ListAccountsAPIClient is a client that implements the ListAccounts operation. -type ListAccountsAPIClient interface { - ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) -} - -var _ ListAccountsAPIClient = (*Client)(nil) - // ListAccountsPaginatorOptions is the paginator options for ListAccounts type ListAccountsPaginatorOptions struct { // This is the number of items clients can request per page. @@ -215,6 +211,9 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAccountsAPIClient is a client that implements the ListAccounts operation. +type ListAccountsAPIClient interface { + ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) +} + +var _ ListAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/sso/api_op_Logout.go b/service/sso/api_op_Logout.go index a9e349c5db8..456e4a37170 100644 --- a/service/sso/api_op_Logout.go +++ b/service/sso/api_op_Logout.go @@ -116,6 +116,9 @@ func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpLogoutValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_client.go b/service/ssoadmin/api_client.go index 4a8b3788ea6..5ef0a62bcf4 100644 --- a/service/ssoadmin/api_client.go +++ b/service/ssoadmin/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go b/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go index 9f266ee52c4..55f6b2ef137 100644 --- a/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go +++ b/service/ssoadmin/api_op_AttachCustomerManagedPolicyReferenceToPermissionSet.go @@ -115,6 +115,9 @@ func (c *Client) addOperationAttachCustomerManagedPolicyReferenceToPermissionSet if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachCustomerManagedPolicyReferenceToPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go b/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go index 9bb0efc7d13..f2c6485743f 100644 --- a/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go +++ b/service/ssoadmin/api_op_AttachManagedPolicyToPermissionSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAttachManagedPolicyToPermissionSetMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachManagedPolicyToPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreateAccountAssignment.go b/service/ssoadmin/api_op_CreateAccountAssignment.go index 4363eaf7262..c4e2e04dae6 100644 --- a/service/ssoadmin/api_op_CreateAccountAssignment.go +++ b/service/ssoadmin/api_op_CreateAccountAssignment.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateAccountAssignmentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreateApplication.go b/service/ssoadmin/api_op_CreateApplication.go index 098e22e1552..7aa98c9a690 100644 --- a/service/ssoadmin/api_op_CreateApplication.go +++ b/service/ssoadmin/api_op_CreateApplication.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateApplicationMiddleware(stack, options); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreateApplicationAssignment.go b/service/ssoadmin/api_op_CreateApplicationAssignment.go index 9a1a6176da4..387c03fff58 100644 --- a/service/ssoadmin/api_op_CreateApplicationAssignment.go +++ b/service/ssoadmin/api_op_CreateApplicationAssignment.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateApplicationAssignmentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateApplicationAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreateInstance.go b/service/ssoadmin/api_op_CreateInstance.go index 4d616e7c9da..662b826e321 100644 --- a/service/ssoadmin/api_op_CreateInstance.go +++ b/service/ssoadmin/api_op_CreateInstance.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateInstanceMiddleware(stack, options); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go b/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go index c7356cdb434..d41dccfaba4 100644 --- a/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go +++ b/service/ssoadmin/api_op_CreateInstanceAccessControlAttributeConfiguration.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateInstanceAccessControlAttributeConfigurationMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreatePermissionSet.go b/service/ssoadmin/api_op_CreatePermissionSet.go index 4241201bc5f..c0e18330425 100644 --- a/service/ssoadmin/api_op_CreatePermissionSet.go +++ b/service/ssoadmin/api_op_CreatePermissionSet.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreatePermissionSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreatePermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go b/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go index 99e5b4036fb..97760fef1c6 100644 --- a/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go +++ b/service/ssoadmin/api_op_CreateTrustedTokenIssuer.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateTrustedTokenIssuerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrustedTokenIssuerMiddleware(stack, options); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteAccountAssignment.go b/service/ssoadmin/api_op_DeleteAccountAssignment.go index 9b5b75e3b5c..36d9d664e92 100644 --- a/service/ssoadmin/api_op_DeleteAccountAssignment.go +++ b/service/ssoadmin/api_op_DeleteAccountAssignment.go @@ -140,6 +140,9 @@ func (c *Client) addOperationDeleteAccountAssignmentMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteApplication.go b/service/ssoadmin/api_op_DeleteApplication.go index 9a9fcc0bdeb..32dfa27d61e 100644 --- a/service/ssoadmin/api_op_DeleteApplication.go +++ b/service/ssoadmin/api_op_DeleteApplication.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteApplicationAccessScope.go b/service/ssoadmin/api_op_DeleteApplicationAccessScope.go index 83385cb29d2..101dc6d5008 100644 --- a/service/ssoadmin/api_op_DeleteApplicationAccessScope.go +++ b/service/ssoadmin/api_op_DeleteApplicationAccessScope.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteApplicationAccessScopeMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationAccessScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteApplicationAssignment.go b/service/ssoadmin/api_op_DeleteApplicationAssignment.go index a956fb00f6d..54eee4e3f8a 100644 --- a/service/ssoadmin/api_op_DeleteApplicationAssignment.go +++ b/service/ssoadmin/api_op_DeleteApplicationAssignment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteApplicationAssignmentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go b/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go index b0edda404a3..81c19959cf8 100644 --- a/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go +++ b/service/ssoadmin/api_op_DeleteApplicationAuthenticationMethod.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteApplicationAuthenticationMethodMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationAuthenticationMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteApplicationGrant.go b/service/ssoadmin/api_op_DeleteApplicationGrant.go index b0dc1eadc31..c355e953850 100644 --- a/service/ssoadmin/api_op_DeleteApplicationGrant.go +++ b/service/ssoadmin/api_op_DeleteApplicationGrant.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteApplicationGrantMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteApplicationGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go b/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go index 5261e517e18..6e2d1c61985 100644 --- a/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go +++ b/service/ssoadmin/api_op_DeleteInlinePolicyFromPermissionSet.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteInlinePolicyFromPermissionSetMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInlinePolicyFromPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteInstance.go b/service/ssoadmin/api_op_DeleteInstance.go index 726d7193a03..f109a2d0b1d 100644 --- a/service/ssoadmin/api_op_DeleteInstance.go +++ b/service/ssoadmin/api_op_DeleteInstance.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go b/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go index af117d1d7ba..768a77a7dec 100644 --- a/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go +++ b/service/ssoadmin/api_op_DeleteInstanceAccessControlAttributeConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteInstanceAccessControlAttributeConfigurationMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeletePermissionSet.go b/service/ssoadmin/api_op_DeletePermissionSet.go index 7c54ee00a30..31580fe3f14 100644 --- a/service/ssoadmin/api_op_DeletePermissionSet.go +++ b/service/ssoadmin/api_op_DeletePermissionSet.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeletePermissionSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go b/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go index f5c93f24331..ca862a92465 100644 --- a/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go +++ b/service/ssoadmin/api_op_DeletePermissionsBoundaryFromPermissionSet.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeletePermissionsBoundaryFromPermissionSetMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionsBoundaryFromPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go b/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go index 2aa18c2560f..30208513bd6 100644 --- a/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go +++ b/service/ssoadmin/api_op_DeleteTrustedTokenIssuer.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteTrustedTokenIssuerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrustedTokenIssuerValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go b/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go index 215138daa6c..f31e948baec 100644 --- a/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go +++ b/service/ssoadmin/api_op_DescribeAccountAssignmentCreationStatus.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAccountAssignmentCreationStatusMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountAssignmentCreationStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go b/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go index fcb2fcf790d..268be3d51e1 100644 --- a/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go +++ b/service/ssoadmin/api_op_DescribeAccountAssignmentDeletionStatus.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAccountAssignmentDeletionStatusMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccountAssignmentDeletionStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeApplication.go b/service/ssoadmin/api_op_DescribeApplication.go index 680d30c68ee..e6654acf0f6 100644 --- a/service/ssoadmin/api_op_DescribeApplication.go +++ b/service/ssoadmin/api_op_DescribeApplication.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeApplicationAssignment.go b/service/ssoadmin/api_op_DescribeApplicationAssignment.go index 3da2ac8575c..0094aa96a0a 100644 --- a/service/ssoadmin/api_op_DescribeApplicationAssignment.go +++ b/service/ssoadmin/api_op_DescribeApplicationAssignment.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeApplicationAssignmentMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationAssignmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeApplicationProvider.go b/service/ssoadmin/api_op_DescribeApplicationProvider.go index b3c84440fcc..2f17b594826 100644 --- a/service/ssoadmin/api_op_DescribeApplicationProvider.go +++ b/service/ssoadmin/api_op_DescribeApplicationProvider.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeApplicationProviderMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeInstance.go b/service/ssoadmin/api_op_DescribeInstance.go index fe282e93826..5cbf2f575bf 100644 --- a/service/ssoadmin/api_op_DescribeInstance.go +++ b/service/ssoadmin/api_op_DescribeInstance.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go b/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go index 7737df40bdd..35957e40b44 100644 --- a/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go +++ b/service/ssoadmin/api_op_DescribeInstanceAccessControlAttributeConfiguration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDescribeInstanceAccessControlAttributeConfiguration if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribePermissionSet.go b/service/ssoadmin/api_op_DescribePermissionSet.go index 7523489a2c2..795fa44ae77 100644 --- a/service/ssoadmin/api_op_DescribePermissionSet.go +++ b/service/ssoadmin/api_op_DescribePermissionSet.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribePermissionSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go b/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go index 51b01b405ec..3b3dfabaeae 100644 --- a/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go +++ b/service/ssoadmin/api_op_DescribePermissionSetProvisioningStatus.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribePermissionSetProvisioningStatusMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribePermissionSetProvisioningStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go b/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go index eb2c5a9eb71..6386c891412 100644 --- a/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go +++ b/service/ssoadmin/api_op_DescribeTrustedTokenIssuer.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeTrustedTokenIssuerMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustedTokenIssuerValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go b/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go index d8e6f864fba..93a01646848 100644 --- a/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go +++ b/service/ssoadmin/api_op_DetachCustomerManagedPolicyReferenceFromPermissionSet.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDetachCustomerManagedPolicyReferenceFromPermissionS if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachCustomerManagedPolicyReferenceFromPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go b/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go index 2aaa35b96b4..bf0ebceff0d 100644 --- a/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go +++ b/service/ssoadmin/api_op_DetachManagedPolicyFromPermissionSet.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDetachManagedPolicyFromPermissionSetMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachManagedPolicyFromPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_GetApplicationAccessScope.go b/service/ssoadmin/api_op_GetApplicationAccessScope.go index 653d5a269c8..90d357d4afe 100644 --- a/service/ssoadmin/api_op_GetApplicationAccessScope.go +++ b/service/ssoadmin/api_op_GetApplicationAccessScope.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetApplicationAccessScopeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationAccessScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go b/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go index 63b20f1d085..d8d99d1c9bc 100644 --- a/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go +++ b/service/ssoadmin/api_op_GetApplicationAssignmentConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetApplicationAssignmentConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationAssignmentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go b/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go index bc952d1dea5..fa4049e67ef 100644 --- a/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go +++ b/service/ssoadmin/api_op_GetApplicationAuthenticationMethod.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetApplicationAuthenticationMethodMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationAuthenticationMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_GetApplicationGrant.go b/service/ssoadmin/api_op_GetApplicationGrant.go index 56fcabe58ee..3e157c14f89 100644 --- a/service/ssoadmin/api_op_GetApplicationGrant.go +++ b/service/ssoadmin/api_op_GetApplicationGrant.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetApplicationGrantMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetApplicationGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go b/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go index 35a2bbccb34..c360eaa17eb 100644 --- a/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go +++ b/service/ssoadmin/api_op_GetInlinePolicyForPermissionSet.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetInlinePolicyForPermissionSetMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInlinePolicyForPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go b/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go index 8c24a2b09e6..8edda53b55b 100644 --- a/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go +++ b/service/ssoadmin/api_op_GetPermissionsBoundaryForPermissionSet.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetPermissionsBoundaryForPermissionSetMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionsBoundaryForPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go b/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go index 27e784d6549..c42651a98bd 100644 --- a/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go +++ b/service/ssoadmin/api_op_ListAccountAssignmentCreationStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListAccountAssignmentCreationStatusMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentCreationStatusValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListAccountAssignmentCreationStatusMiddlewares(stac return nil } -// ListAccountAssignmentCreationStatusAPIClient is a client that implements the -// ListAccountAssignmentCreationStatus operation. -type ListAccountAssignmentCreationStatusAPIClient interface { - ListAccountAssignmentCreationStatus(context.Context, *ListAccountAssignmentCreationStatusInput, ...func(*Options)) (*ListAccountAssignmentCreationStatusOutput, error) -} - -var _ ListAccountAssignmentCreationStatusAPIClient = (*Client)(nil) - // ListAccountAssignmentCreationStatusPaginatorOptions is the paginator options // for ListAccountAssignmentCreationStatus type ListAccountAssignmentCreationStatusPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListAccountAssignmentCreationStatusPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignmentCreationStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListAccountAssignmentCreationStatusPaginator) NextPage(ctx context.Cont return result, nil } +// ListAccountAssignmentCreationStatusAPIClient is a client that implements the +// ListAccountAssignmentCreationStatus operation. +type ListAccountAssignmentCreationStatusAPIClient interface { + ListAccountAssignmentCreationStatus(context.Context, *ListAccountAssignmentCreationStatusInput, ...func(*Options)) (*ListAccountAssignmentCreationStatusOutput, error) +} + +var _ ListAccountAssignmentCreationStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignmentCreationStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go b/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go index dbfeeae1452..1486a750150 100644 --- a/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go +++ b/service/ssoadmin/api_op_ListAccountAssignmentDeletionStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListAccountAssignmentDeletionStatusMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentDeletionStatusValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListAccountAssignmentDeletionStatusMiddlewares(stac return nil } -// ListAccountAssignmentDeletionStatusAPIClient is a client that implements the -// ListAccountAssignmentDeletionStatus operation. -type ListAccountAssignmentDeletionStatusAPIClient interface { - ListAccountAssignmentDeletionStatus(context.Context, *ListAccountAssignmentDeletionStatusInput, ...func(*Options)) (*ListAccountAssignmentDeletionStatusOutput, error) -} - -var _ ListAccountAssignmentDeletionStatusAPIClient = (*Client)(nil) - // ListAccountAssignmentDeletionStatusPaginatorOptions is the paginator options // for ListAccountAssignmentDeletionStatus type ListAccountAssignmentDeletionStatusPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListAccountAssignmentDeletionStatusPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignmentDeletionStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListAccountAssignmentDeletionStatusPaginator) NextPage(ctx context.Cont return result, nil } +// ListAccountAssignmentDeletionStatusAPIClient is a client that implements the +// ListAccountAssignmentDeletionStatus operation. +type ListAccountAssignmentDeletionStatusAPIClient interface { + ListAccountAssignmentDeletionStatus(context.Context, *ListAccountAssignmentDeletionStatusInput, ...func(*Options)) (*ListAccountAssignmentDeletionStatusOutput, error) +} + +var _ ListAccountAssignmentDeletionStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignmentDeletionStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListAccountAssignments.go b/service/ssoadmin/api_op_ListAccountAssignments.go index f8a075789f6..2fae295c864 100644 --- a/service/ssoadmin/api_op_ListAccountAssignments.go +++ b/service/ssoadmin/api_op_ListAccountAssignments.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListAccountAssignmentsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListAccountAssignmentsMiddlewares(stack *middleware return nil } -// ListAccountAssignmentsAPIClient is a client that implements the -// ListAccountAssignments operation. -type ListAccountAssignmentsAPIClient interface { - ListAccountAssignments(context.Context, *ListAccountAssignmentsInput, ...func(*Options)) (*ListAccountAssignmentsOutput, error) -} - -var _ ListAccountAssignmentsAPIClient = (*Client)(nil) - // ListAccountAssignmentsPaginatorOptions is the paginator options for // ListAccountAssignments type ListAccountAssignmentsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListAccountAssignmentsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListAccountAssignmentsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListAccountAssignmentsAPIClient is a client that implements the +// ListAccountAssignments operation. +type ListAccountAssignmentsAPIClient interface { + ListAccountAssignments(context.Context, *ListAccountAssignmentsInput, ...func(*Options)) (*ListAccountAssignmentsOutput, error) +} + +var _ ListAccountAssignmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go b/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go index c9a4a89dd70..e33528f2d7a 100644 --- a/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go +++ b/service/ssoadmin/api_op_ListAccountAssignmentsForPrincipal.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListAccountAssignmentsForPrincipalMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountAssignmentsForPrincipalValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListAccountAssignmentsForPrincipalMiddlewares(stack return nil } -// ListAccountAssignmentsForPrincipalAPIClient is a client that implements the -// ListAccountAssignmentsForPrincipal operation. -type ListAccountAssignmentsForPrincipalAPIClient interface { - ListAccountAssignmentsForPrincipal(context.Context, *ListAccountAssignmentsForPrincipalInput, ...func(*Options)) (*ListAccountAssignmentsForPrincipalOutput, error) -} - -var _ ListAccountAssignmentsForPrincipalAPIClient = (*Client)(nil) - // ListAccountAssignmentsForPrincipalPaginatorOptions is the paginator options for // ListAccountAssignmentsForPrincipal type ListAccountAssignmentsForPrincipalPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListAccountAssignmentsForPrincipalPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountAssignmentsForPrincipal(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListAccountAssignmentsForPrincipalPaginator) NextPage(ctx context.Conte return result, nil } +// ListAccountAssignmentsForPrincipalAPIClient is a client that implements the +// ListAccountAssignmentsForPrincipal operation. +type ListAccountAssignmentsForPrincipalAPIClient interface { + ListAccountAssignmentsForPrincipal(context.Context, *ListAccountAssignmentsForPrincipalInput, ...func(*Options)) (*ListAccountAssignmentsForPrincipalOutput, error) +} + +var _ ListAccountAssignmentsForPrincipalAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountAssignmentsForPrincipal(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go b/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go index 0bbbb07951d..ed388133a67 100644 --- a/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go +++ b/service/ssoadmin/api_op_ListAccountsForProvisionedPermissionSet.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListAccountsForProvisionedPermissionSetMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccountsForProvisionedPermissionSetValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListAccountsForProvisionedPermissionSetMiddlewares( return nil } -// ListAccountsForProvisionedPermissionSetAPIClient is a client that implements -// the ListAccountsForProvisionedPermissionSet operation. -type ListAccountsForProvisionedPermissionSetAPIClient interface { - ListAccountsForProvisionedPermissionSet(context.Context, *ListAccountsForProvisionedPermissionSetInput, ...func(*Options)) (*ListAccountsForProvisionedPermissionSetOutput, error) -} - -var _ ListAccountsForProvisionedPermissionSetAPIClient = (*Client)(nil) - // ListAccountsForProvisionedPermissionSetPaginatorOptions is the paginator // options for ListAccountsForProvisionedPermissionSet type ListAccountsForProvisionedPermissionSetPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListAccountsForProvisionedPermissionSetPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountsForProvisionedPermissionSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListAccountsForProvisionedPermissionSetPaginator) NextPage(ctx context. return result, nil } +// ListAccountsForProvisionedPermissionSetAPIClient is a client that implements +// the ListAccountsForProvisionedPermissionSet operation. +type ListAccountsForProvisionedPermissionSetAPIClient interface { + ListAccountsForProvisionedPermissionSet(context.Context, *ListAccountsForProvisionedPermissionSetInput, ...func(*Options)) (*ListAccountsForProvisionedPermissionSetOutput, error) +} + +var _ ListAccountsForProvisionedPermissionSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountsForProvisionedPermissionSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplicationAccessScopes.go b/service/ssoadmin/api_op_ListApplicationAccessScopes.go index ac9fba3e5d2..feda9ee1f70 100644 --- a/service/ssoadmin/api_op_ListApplicationAccessScopes.go +++ b/service/ssoadmin/api_op_ListApplicationAccessScopes.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListApplicationAccessScopesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAccessScopesValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListApplicationAccessScopesMiddlewares(stack *middl return nil } -// ListApplicationAccessScopesAPIClient is a client that implements the -// ListApplicationAccessScopes operation. -type ListApplicationAccessScopesAPIClient interface { - ListApplicationAccessScopes(context.Context, *ListApplicationAccessScopesInput, ...func(*Options)) (*ListApplicationAccessScopesOutput, error) -} - -var _ ListApplicationAccessScopesAPIClient = (*Client)(nil) - // ListApplicationAccessScopesPaginatorOptions is the paginator options for // ListApplicationAccessScopes type ListApplicationAccessScopesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListApplicationAccessScopesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAccessScopes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListApplicationAccessScopesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListApplicationAccessScopesAPIClient is a client that implements the +// ListApplicationAccessScopes operation. +type ListApplicationAccessScopesAPIClient interface { + ListApplicationAccessScopes(context.Context, *ListApplicationAccessScopesInput, ...func(*Options)) (*ListApplicationAccessScopesOutput, error) +} + +var _ ListApplicationAccessScopesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAccessScopes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplicationAssignments.go b/service/ssoadmin/api_op_ListApplicationAssignments.go index 1eaca32f9a2..66a04bb83d5 100644 --- a/service/ssoadmin/api_op_ListApplicationAssignments.go +++ b/service/ssoadmin/api_op_ListApplicationAssignments.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListApplicationAssignmentsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAssignmentsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListApplicationAssignmentsMiddlewares(stack *middle return nil } -// ListApplicationAssignmentsAPIClient is a client that implements the -// ListApplicationAssignments operation. -type ListApplicationAssignmentsAPIClient interface { - ListApplicationAssignments(context.Context, *ListApplicationAssignmentsInput, ...func(*Options)) (*ListApplicationAssignmentsOutput, error) -} - -var _ ListApplicationAssignmentsAPIClient = (*Client)(nil) - // ListApplicationAssignmentsPaginatorOptions is the paginator options for // ListApplicationAssignments type ListApplicationAssignmentsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListApplicationAssignmentsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAssignments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListApplicationAssignmentsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListApplicationAssignmentsAPIClient is a client that implements the +// ListApplicationAssignments operation. +type ListApplicationAssignmentsAPIClient interface { + ListApplicationAssignments(context.Context, *ListApplicationAssignmentsInput, ...func(*Options)) (*ListApplicationAssignmentsOutput, error) +} + +var _ ListApplicationAssignmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAssignments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go b/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go index 2dfd61dd663..40b6a309351 100644 --- a/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go +++ b/service/ssoadmin/api_op_ListApplicationAssignmentsForPrincipal.go @@ -145,6 +145,9 @@ func (c *Client) addOperationListApplicationAssignmentsForPrincipalMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAssignmentsForPrincipalValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationListApplicationAssignmentsForPrincipalMiddlewares(s return nil } -// ListApplicationAssignmentsForPrincipalAPIClient is a client that implements the -// ListApplicationAssignmentsForPrincipal operation. -type ListApplicationAssignmentsForPrincipalAPIClient interface { - ListApplicationAssignmentsForPrincipal(context.Context, *ListApplicationAssignmentsForPrincipalInput, ...func(*Options)) (*ListApplicationAssignmentsForPrincipalOutput, error) -} - -var _ ListApplicationAssignmentsForPrincipalAPIClient = (*Client)(nil) - // ListApplicationAssignmentsForPrincipalPaginatorOptions is the paginator options // for ListApplicationAssignmentsForPrincipal type ListApplicationAssignmentsForPrincipalPaginatorOptions struct { @@ -249,6 +244,9 @@ func (p *ListApplicationAssignmentsForPrincipalPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAssignmentsForPrincipal(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -268,6 +266,14 @@ func (p *ListApplicationAssignmentsForPrincipalPaginator) NextPage(ctx context.C return result, nil } +// ListApplicationAssignmentsForPrincipalAPIClient is a client that implements the +// ListApplicationAssignmentsForPrincipal operation. +type ListApplicationAssignmentsForPrincipalAPIClient interface { + ListApplicationAssignmentsForPrincipal(context.Context, *ListApplicationAssignmentsForPrincipalInput, ...func(*Options)) (*ListApplicationAssignmentsForPrincipalOutput, error) +} + +var _ ListApplicationAssignmentsForPrincipalAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAssignmentsForPrincipal(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go b/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go index f7862c1a601..75d6631a166 100644 --- a/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go +++ b/service/ssoadmin/api_op_ListApplicationAuthenticationMethods.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListApplicationAuthenticationMethodsMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationAuthenticationMethodsValidationMiddleware(stack); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationListApplicationAuthenticationMethodsMiddlewares(sta return nil } -// ListApplicationAuthenticationMethodsAPIClient is a client that implements the -// ListApplicationAuthenticationMethods operation. -type ListApplicationAuthenticationMethodsAPIClient interface { - ListApplicationAuthenticationMethods(context.Context, *ListApplicationAuthenticationMethodsInput, ...func(*Options)) (*ListApplicationAuthenticationMethodsOutput, error) -} - -var _ ListApplicationAuthenticationMethodsAPIClient = (*Client)(nil) - // ListApplicationAuthenticationMethodsPaginatorOptions is the paginator options // for ListApplicationAuthenticationMethods type ListApplicationAuthenticationMethodsPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListApplicationAuthenticationMethodsPaginator) NextPage(ctx context.Con params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationAuthenticationMethods(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListApplicationAuthenticationMethodsPaginator) NextPage(ctx context.Con return result, nil } +// ListApplicationAuthenticationMethodsAPIClient is a client that implements the +// ListApplicationAuthenticationMethods operation. +type ListApplicationAuthenticationMethodsAPIClient interface { + ListApplicationAuthenticationMethods(context.Context, *ListApplicationAuthenticationMethodsInput, ...func(*Options)) (*ListApplicationAuthenticationMethodsOutput, error) +} + +var _ ListApplicationAuthenticationMethodsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationAuthenticationMethods(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplicationGrants.go b/service/ssoadmin/api_op_ListApplicationGrants.go index 3f95b45ec75..067e319fae6 100644 --- a/service/ssoadmin/api_op_ListApplicationGrants.go +++ b/service/ssoadmin/api_op_ListApplicationGrants.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListApplicationGrantsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationGrantsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListApplicationGrantsMiddlewares(stack *middleware. return nil } -// ListApplicationGrantsAPIClient is a client that implements the -// ListApplicationGrants operation. -type ListApplicationGrantsAPIClient interface { - ListApplicationGrants(context.Context, *ListApplicationGrantsInput, ...func(*Options)) (*ListApplicationGrantsOutput, error) -} - -var _ ListApplicationGrantsAPIClient = (*Client)(nil) - // ListApplicationGrantsPaginatorOptions is the paginator options for // ListApplicationGrants type ListApplicationGrantsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListApplicationGrantsPaginator) NextPage(ctx context.Context, optFns .. params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationGrants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListApplicationGrantsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListApplicationGrantsAPIClient is a client that implements the +// ListApplicationGrants operation. +type ListApplicationGrantsAPIClient interface { + ListApplicationGrants(context.Context, *ListApplicationGrantsInput, ...func(*Options)) (*ListApplicationGrantsOutput, error) +} + +var _ ListApplicationGrantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationGrants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplicationProviders.go b/service/ssoadmin/api_op_ListApplicationProviders.go index 6833126ecee..c75cb902495 100644 --- a/service/ssoadmin/api_op_ListApplicationProviders.go +++ b/service/ssoadmin/api_op_ListApplicationProviders.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListApplicationProvidersMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationProviders(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListApplicationProvidersMiddlewares(stack *middlewa return nil } -// ListApplicationProvidersAPIClient is a client that implements the -// ListApplicationProviders operation. -type ListApplicationProvidersAPIClient interface { - ListApplicationProviders(context.Context, *ListApplicationProvidersInput, ...func(*Options)) (*ListApplicationProvidersOutput, error) -} - -var _ ListApplicationProvidersAPIClient = (*Client)(nil) - // ListApplicationProvidersPaginatorOptions is the paginator options for // ListApplicationProviders type ListApplicationProvidersPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListApplicationProvidersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplicationProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListApplicationProvidersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListApplicationProvidersAPIClient is a client that implements the +// ListApplicationProviders operation. +type ListApplicationProvidersAPIClient interface { + ListApplicationProviders(context.Context, *ListApplicationProvidersInput, ...func(*Options)) (*ListApplicationProvidersOutput, error) +} + +var _ ListApplicationProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplicationProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListApplications.go b/service/ssoadmin/api_op_ListApplications.go index 81141abb185..5449aff0e28 100644 --- a/service/ssoadmin/api_op_ListApplications.go +++ b/service/ssoadmin/api_op_ListApplications.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListApplicationsValidationMiddleware(stack); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack return nil } -// ListApplicationsAPIClient is a client that implements the ListApplications -// operation. -type ListApplicationsAPIClient interface { - ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) -} - -var _ ListApplicationsAPIClient = (*Client)(nil) - // ListApplicationsPaginatorOptions is the paginator options for ListApplications type ListApplicationsPaginatorOptions struct { // Specifies the total number of results that you want included in each response. @@ -237,6 +232,9 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListApplicationsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListApplicationsAPIClient is a client that implements the ListApplications +// operation. +type ListApplicationsAPIClient interface { + ListApplications(context.Context, *ListApplicationsInput, ...func(*Options)) (*ListApplicationsOutput, error) +} + +var _ ListApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go b/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go index f95c46d7abd..f2412de1c34 100644 --- a/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go +++ b/service/ssoadmin/api_op_ListCustomerManagedPolicyReferencesInPermissionSet.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListCustomerManagedPolicyReferencesInPermissionSetM if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCustomerManagedPolicyReferencesInPermissionSetValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListCustomerManagedPolicyReferencesInPermissionSetM return nil } -// ListCustomerManagedPolicyReferencesInPermissionSetAPIClient is a client that -// implements the ListCustomerManagedPolicyReferencesInPermissionSet operation. -type ListCustomerManagedPolicyReferencesInPermissionSetAPIClient interface { - ListCustomerManagedPolicyReferencesInPermissionSet(context.Context, *ListCustomerManagedPolicyReferencesInPermissionSetInput, ...func(*Options)) (*ListCustomerManagedPolicyReferencesInPermissionSetOutput, error) -} - -var _ ListCustomerManagedPolicyReferencesInPermissionSetAPIClient = (*Client)(nil) - // ListCustomerManagedPolicyReferencesInPermissionSetPaginatorOptions is the // paginator options for ListCustomerManagedPolicyReferencesInPermissionSet type ListCustomerManagedPolicyReferencesInPermissionSetPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListCustomerManagedPolicyReferencesInPermissionSetPaginator) NextPage(c } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCustomerManagedPolicyReferencesInPermissionSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListCustomerManagedPolicyReferencesInPermissionSetPaginator) NextPage(c return result, nil } +// ListCustomerManagedPolicyReferencesInPermissionSetAPIClient is a client that +// implements the ListCustomerManagedPolicyReferencesInPermissionSet operation. +type ListCustomerManagedPolicyReferencesInPermissionSetAPIClient interface { + ListCustomerManagedPolicyReferencesInPermissionSet(context.Context, *ListCustomerManagedPolicyReferencesInPermissionSetInput, ...func(*Options)) (*ListCustomerManagedPolicyReferencesInPermissionSetOutput, error) +} + +var _ ListCustomerManagedPolicyReferencesInPermissionSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCustomerManagedPolicyReferencesInPermissionSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListInstances.go b/service/ssoadmin/api_op_ListInstances.go index 56c8473e1ca..534e392bce8 100644 --- a/service/ssoadmin/api_op_ListInstances.go +++ b/service/ssoadmin/api_op_ListInstances.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInstances(options.Region), middleware.Before); err != nil { return err } @@ -134,13 +137,6 @@ func (c *Client) addOperationListInstancesMiddlewares(stack *middleware.Stack, o return nil } -// ListInstancesAPIClient is a client that implements the ListInstances operation. -type ListInstancesAPIClient interface { - ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) -} - -var _ ListInstancesAPIClient = (*Client)(nil) - // ListInstancesPaginatorOptions is the paginator options for ListInstances type ListInstancesPaginatorOptions struct { // The maximum number of results to display for the instance. @@ -204,6 +200,9 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +222,13 @@ func (p *ListInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListInstancesAPIClient is a client that implements the ListInstances operation. +type ListInstancesAPIClient interface { + ListInstances(context.Context, *ListInstancesInput, ...func(*Options)) (*ListInstancesOutput, error) +} + +var _ ListInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go b/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go index 40602054950..da2d98f0bc1 100644 --- a/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go +++ b/service/ssoadmin/api_op_ListManagedPoliciesInPermissionSet.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListManagedPoliciesInPermissionSetMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListManagedPoliciesInPermissionSetValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListManagedPoliciesInPermissionSetMiddlewares(stack return nil } -// ListManagedPoliciesInPermissionSetAPIClient is a client that implements the -// ListManagedPoliciesInPermissionSet operation. -type ListManagedPoliciesInPermissionSetAPIClient interface { - ListManagedPoliciesInPermissionSet(context.Context, *ListManagedPoliciesInPermissionSetInput, ...func(*Options)) (*ListManagedPoliciesInPermissionSetOutput, error) -} - -var _ ListManagedPoliciesInPermissionSetAPIClient = (*Client)(nil) - // ListManagedPoliciesInPermissionSetPaginatorOptions is the paginator options for // ListManagedPoliciesInPermissionSet type ListManagedPoliciesInPermissionSetPaginatorOptions struct { @@ -223,6 +218,9 @@ func (p *ListManagedPoliciesInPermissionSetPaginator) NextPage(ctx context.Conte } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListManagedPoliciesInPermissionSet(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -242,6 +240,14 @@ func (p *ListManagedPoliciesInPermissionSetPaginator) NextPage(ctx context.Conte return result, nil } +// ListManagedPoliciesInPermissionSetAPIClient is a client that implements the +// ListManagedPoliciesInPermissionSet operation. +type ListManagedPoliciesInPermissionSetAPIClient interface { + ListManagedPoliciesInPermissionSet(context.Context, *ListManagedPoliciesInPermissionSetInput, ...func(*Options)) (*ListManagedPoliciesInPermissionSetOutput, error) +} + +var _ ListManagedPoliciesInPermissionSetAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListManagedPoliciesInPermissionSet(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go b/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go index 7767be64c5f..828125df2c7 100644 --- a/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go +++ b/service/ssoadmin/api_op_ListPermissionSetProvisioningStatus.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListPermissionSetProvisioningStatusMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionSetProvisioningStatusValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListPermissionSetProvisioningStatusMiddlewares(stac return nil } -// ListPermissionSetProvisioningStatusAPIClient is a client that implements the -// ListPermissionSetProvisioningStatus operation. -type ListPermissionSetProvisioningStatusAPIClient interface { - ListPermissionSetProvisioningStatus(context.Context, *ListPermissionSetProvisioningStatusInput, ...func(*Options)) (*ListPermissionSetProvisioningStatusOutput, error) -} - -var _ ListPermissionSetProvisioningStatusAPIClient = (*Client)(nil) - // ListPermissionSetProvisioningStatusPaginatorOptions is the paginator options // for ListPermissionSetProvisioningStatus type ListPermissionSetProvisioningStatusPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListPermissionSetProvisioningStatusPaginator) NextPage(ctx context.Cont } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionSetProvisioningStatus(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListPermissionSetProvisioningStatusPaginator) NextPage(ctx context.Cont return result, nil } +// ListPermissionSetProvisioningStatusAPIClient is a client that implements the +// ListPermissionSetProvisioningStatus operation. +type ListPermissionSetProvisioningStatusAPIClient interface { + ListPermissionSetProvisioningStatus(context.Context, *ListPermissionSetProvisioningStatusInput, ...func(*Options)) (*ListPermissionSetProvisioningStatusOutput, error) +} + +var _ ListPermissionSetProvisioningStatusAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionSetProvisioningStatus(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListPermissionSets.go b/service/ssoadmin/api_op_ListPermissionSets.go index 80877036157..64bcdb73654 100644 --- a/service/ssoadmin/api_op_ListPermissionSets.go +++ b/service/ssoadmin/api_op_ListPermissionSets.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListPermissionSetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionSetsValidationMiddleware(stack); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListPermissionSetsMiddlewares(stack *middleware.Sta return nil } -// ListPermissionSetsAPIClient is a client that implements the ListPermissionSets -// operation. -type ListPermissionSetsAPIClient interface { - ListPermissionSets(context.Context, *ListPermissionSetsInput, ...func(*Options)) (*ListPermissionSetsOutput, error) -} - -var _ ListPermissionSetsAPIClient = (*Client)(nil) - // ListPermissionSetsPaginatorOptions is the paginator options for // ListPermissionSets type ListPermissionSetsPaginatorOptions struct { @@ -214,6 +209,9 @@ func (p *ListPermissionSetsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListPermissionSetsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListPermissionSetsAPIClient is a client that implements the ListPermissionSets +// operation. +type ListPermissionSetsAPIClient interface { + ListPermissionSets(context.Context, *ListPermissionSetsInput, ...func(*Options)) (*ListPermissionSetsOutput, error) +} + +var _ ListPermissionSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go b/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go index 0ebb21e315b..ba0843301e8 100644 --- a/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go +++ b/service/ssoadmin/api_op_ListPermissionSetsProvisionedToAccount.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListPermissionSetsProvisionedToAccountMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPermissionSetsProvisionedToAccountValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListPermissionSetsProvisionedToAccountMiddlewares(s return nil } -// ListPermissionSetsProvisionedToAccountAPIClient is a client that implements the -// ListPermissionSetsProvisionedToAccount operation. -type ListPermissionSetsProvisionedToAccountAPIClient interface { - ListPermissionSetsProvisionedToAccount(context.Context, *ListPermissionSetsProvisionedToAccountInput, ...func(*Options)) (*ListPermissionSetsProvisionedToAccountOutput, error) -} - -var _ ListPermissionSetsProvisionedToAccountAPIClient = (*Client)(nil) - // ListPermissionSetsProvisionedToAccountPaginatorOptions is the paginator options // for ListPermissionSetsProvisionedToAccount type ListPermissionSetsProvisionedToAccountPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListPermissionSetsProvisionedToAccountPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPermissionSetsProvisionedToAccount(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListPermissionSetsProvisionedToAccountPaginator) NextPage(ctx context.C return result, nil } +// ListPermissionSetsProvisionedToAccountAPIClient is a client that implements the +// ListPermissionSetsProvisionedToAccount operation. +type ListPermissionSetsProvisionedToAccountAPIClient interface { + ListPermissionSetsProvisionedToAccount(context.Context, *ListPermissionSetsProvisionedToAccountInput, ...func(*Options)) (*ListPermissionSetsProvisionedToAccountOutput, error) +} + +var _ ListPermissionSetsProvisionedToAccountAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPermissionSetsProvisionedToAccount(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListTagsForResource.go b/service/ssoadmin/api_op_ListTagsForResource.go index ac863af1322..ea8ec7d7170 100644 --- a/service/ssoadmin/api_op_ListTagsForResource.go +++ b/service/ssoadmin/api_op_ListTagsForResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ListTrustedTokenIssuers.go b/service/ssoadmin/api_op_ListTrustedTokenIssuers.go index 13e1a6cacee..3b8ec425e40 100644 --- a/service/ssoadmin/api_op_ListTrustedTokenIssuers.go +++ b/service/ssoadmin/api_op_ListTrustedTokenIssuers.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListTrustedTokenIssuersMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrustedTokenIssuersValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationListTrustedTokenIssuersMiddlewares(stack *middlewar return nil } -// ListTrustedTokenIssuersAPIClient is a client that implements the -// ListTrustedTokenIssuers operation. -type ListTrustedTokenIssuersAPIClient interface { - ListTrustedTokenIssuers(context.Context, *ListTrustedTokenIssuersInput, ...func(*Options)) (*ListTrustedTokenIssuersOutput, error) -} - -var _ ListTrustedTokenIssuersAPIClient = (*Client)(nil) - // ListTrustedTokenIssuersPaginatorOptions is the paginator options for // ListTrustedTokenIssuers type ListTrustedTokenIssuersPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *ListTrustedTokenIssuersPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrustedTokenIssuers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *ListTrustedTokenIssuersPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTrustedTokenIssuersAPIClient is a client that implements the +// ListTrustedTokenIssuers operation. +type ListTrustedTokenIssuersAPIClient interface { + ListTrustedTokenIssuers(context.Context, *ListTrustedTokenIssuersInput, ...func(*Options)) (*ListTrustedTokenIssuersOutput, error) +} + +var _ ListTrustedTokenIssuersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrustedTokenIssuers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/ssoadmin/api_op_ProvisionPermissionSet.go b/service/ssoadmin/api_op_ProvisionPermissionSet.go index 6d85cb665fc..3a189f73c0d 100644 --- a/service/ssoadmin/api_op_ProvisionPermissionSet.go +++ b/service/ssoadmin/api_op_ProvisionPermissionSet.go @@ -123,6 +123,9 @@ func (c *Client) addOperationProvisionPermissionSetMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpProvisionPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_PutApplicationAccessScope.go b/service/ssoadmin/api_op_PutApplicationAccessScope.go index f059fe9159d..166b01b53b6 100644 --- a/service/ssoadmin/api_op_PutApplicationAccessScope.go +++ b/service/ssoadmin/api_op_PutApplicationAccessScope.go @@ -113,6 +113,9 @@ func (c *Client) addOperationPutApplicationAccessScopeMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationAccessScopeValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go b/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go index b6dbac40739..a5422b6a719 100644 --- a/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go +++ b/service/ssoadmin/api_op_PutApplicationAssignmentConfiguration.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutApplicationAssignmentConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationAssignmentConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go b/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go index 436b0b72fbb..ef8986168b6 100644 --- a/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go +++ b/service/ssoadmin/api_op_PutApplicationAuthenticationMethod.go @@ -115,6 +115,9 @@ func (c *Client) addOperationPutApplicationAuthenticationMethodMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationAuthenticationMethodValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_PutApplicationGrant.go b/service/ssoadmin/api_op_PutApplicationGrant.go index c127dbb1c54..b10531069f0 100644 --- a/service/ssoadmin/api_op_PutApplicationGrant.go +++ b/service/ssoadmin/api_op_PutApplicationGrant.go @@ -112,6 +112,9 @@ func (c *Client) addOperationPutApplicationGrantMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutApplicationGrantValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go b/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go index 45c8a8342be..025c66dad96 100644 --- a/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go +++ b/service/ssoadmin/api_op_PutInlinePolicyToPermissionSet.go @@ -117,6 +117,9 @@ func (c *Client) addOperationPutInlinePolicyToPermissionSetMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInlinePolicyToPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go b/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go index dc4e8513def..b4ca0732a36 100644 --- a/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go +++ b/service/ssoadmin/api_op_PutPermissionsBoundaryToPermissionSet.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutPermissionsBoundaryToPermissionSetMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionsBoundaryToPermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_TagResource.go b/service/ssoadmin/api_op_TagResource.go index 474af133a7d..42c337ed413 100644 --- a/service/ssoadmin/api_op_TagResource.go +++ b/service/ssoadmin/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_UntagResource.go b/service/ssoadmin/api_op_UntagResource.go index f9c7f45066c..19ff59f19cc 100644 --- a/service/ssoadmin/api_op_UntagResource.go +++ b/service/ssoadmin/api_op_UntagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_UpdateApplication.go b/service/ssoadmin/api_op_UpdateApplication.go index 6b28be7607e..02b3316c446 100644 --- a/service/ssoadmin/api_op_UpdateApplication.go +++ b/service/ssoadmin/api_op_UpdateApplication.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_UpdateInstance.go b/service/ssoadmin/api_op_UpdateInstance.go index a159c84eb09..8b6520b541d 100644 --- a/service/ssoadmin/api_op_UpdateInstance.go +++ b/service/ssoadmin/api_op_UpdateInstance.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUpdateInstanceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go b/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go index c92ff3fc96f..51635111cc8 100644 --- a/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go +++ b/service/ssoadmin/api_op_UpdateInstanceAccessControlAttributeConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateInstanceAccessControlAttributeConfigurationMi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateInstanceAccessControlAttributeConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_UpdatePermissionSet.go b/service/ssoadmin/api_op_UpdatePermissionSet.go index 8a057608744..b80c3a25053 100644 --- a/service/ssoadmin/api_op_UpdatePermissionSet.go +++ b/service/ssoadmin/api_op_UpdatePermissionSet.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdatePermissionSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePermissionSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go b/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go index 72353404210..dcd3a3ff339 100644 --- a/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go +++ b/service/ssoadmin/api_op_UpdateTrustedTokenIssuer.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateTrustedTokenIssuerMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTrustedTokenIssuerValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssooidc/api_client.go b/service/ssooidc/api_client.go index ed357ecdd96..25cd1c04882 100644 --- a/service/ssooidc/api_client.go +++ b/service/ssooidc/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/ssooidc/api_op_CreateToken.go b/service/ssooidc/api_op_CreateToken.go index e33f3f0599f..8b829188eb2 100644 --- a/service/ssooidc/api_op_CreateToken.go +++ b/service/ssooidc/api_op_CreateToken.go @@ -189,6 +189,9 @@ func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssooidc/api_op_CreateTokenWithIAM.go b/service/ssooidc/api_op_CreateTokenWithIAM.go index 9159db93b6d..af04c251a2a 100644 --- a/service/ssooidc/api_op_CreateTokenWithIAM.go +++ b/service/ssooidc/api_op_CreateTokenWithIAM.go @@ -220,6 +220,9 @@ func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssooidc/api_op_RegisterClient.go b/service/ssooidc/api_op_RegisterClient.go index 9820fae48ca..d8c766c989e 100644 --- a/service/ssooidc/api_op_RegisterClient.go +++ b/service/ssooidc/api_op_RegisterClient.go @@ -150,6 +150,9 @@ func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterClientValidationMiddleware(stack); err != nil { return err } diff --git a/service/ssooidc/api_op_StartDeviceAuthorization.go b/service/ssooidc/api_op_StartDeviceAuthorization.go index a3bae9912d8..7c2b38ba902 100644 --- a/service/ssooidc/api_op_StartDeviceAuthorization.go +++ b/service/ssooidc/api_op_StartDeviceAuthorization.go @@ -140,6 +140,9 @@ func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_client.go b/service/storagegateway/api_client.go index 340b9b3a32e..dc75666f506 100644 --- a/service/storagegateway/api_client.go +++ b/service/storagegateway/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/storagegateway/api_op_ActivateGateway.go b/service/storagegateway/api_op_ActivateGateway.go index ba446af6478..2d8a0ba8713 100644 --- a/service/storagegateway/api_op_ActivateGateway.go +++ b/service/storagegateway/api_op_ActivateGateway.go @@ -204,6 +204,9 @@ func (c *Client) addOperationActivateGatewayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AddCache.go b/service/storagegateway/api_op_AddCache.go index 6343054cc8f..cfc2723dd9c 100644 --- a/service/storagegateway/api_op_AddCache.go +++ b/service/storagegateway/api_op_AddCache.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAddCacheMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AddTagsToResource.go b/service/storagegateway/api_op_AddTagsToResource.go index d7f3d047c26..d471e18ca45 100644 --- a/service/storagegateway/api_op_AddTagsToResource.go +++ b/service/storagegateway/api_op_AddTagsToResource.go @@ -136,6 +136,9 @@ func (c *Client) addOperationAddTagsToResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddTagsToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AddUploadBuffer.go b/service/storagegateway/api_op_AddUploadBuffer.go index a4af9cb9fa7..ade8ce21e60 100644 --- a/service/storagegateway/api_op_AddUploadBuffer.go +++ b/service/storagegateway/api_op_AddUploadBuffer.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAddUploadBufferMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddUploadBufferValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AddWorkingStorage.go b/service/storagegateway/api_op_AddWorkingStorage.go index 1a72387a06f..644328cebd7 100644 --- a/service/storagegateway/api_op_AddWorkingStorage.go +++ b/service/storagegateway/api_op_AddWorkingStorage.go @@ -128,6 +128,9 @@ func (c *Client) addOperationAddWorkingStorageMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddWorkingStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AssignTapePool.go b/service/storagegateway/api_op_AssignTapePool.go index 2d8df0571e2..7355615f36e 100644 --- a/service/storagegateway/api_op_AssignTapePool.go +++ b/service/storagegateway/api_op_AssignTapePool.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAssignTapePoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssignTapePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AssociateFileSystem.go b/service/storagegateway/api_op_AssociateFileSystem.go index d9c047232da..d400d55b3d9 100644 --- a/service/storagegateway/api_op_AssociateFileSystem.go +++ b/service/storagegateway/api_op_AssociateFileSystem.go @@ -151,6 +151,9 @@ func (c *Client) addOperationAssociateFileSystemMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateFileSystemValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_AttachVolume.go b/service/storagegateway/api_op_AttachVolume.go index 63cdbeedde4..17571cd2c2b 100644 --- a/service/storagegateway/api_op_AttachVolume.go +++ b/service/storagegateway/api_op_AttachVolume.go @@ -145,6 +145,9 @@ func (c *Client) addOperationAttachVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAttachVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CancelArchival.go b/service/storagegateway/api_op_CancelArchival.go index 0232f1ed99c..291fbbc8b30 100644 --- a/service/storagegateway/api_op_CancelArchival.go +++ b/service/storagegateway/api_op_CancelArchival.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCancelArchivalMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelArchivalValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CancelRetrieval.go b/service/storagegateway/api_op_CancelRetrieval.go index ac3107c0044..0facf1846fb 100644 --- a/service/storagegateway/api_op_CancelRetrieval.go +++ b/service/storagegateway/api_op_CancelRetrieval.go @@ -117,6 +117,9 @@ func (c *Client) addOperationCancelRetrievalMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelRetrievalValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateCachediSCSIVolume.go b/service/storagegateway/api_op_CreateCachediSCSIVolume.go index 638441bfef2..9a3e9b544bb 100644 --- a/service/storagegateway/api_op_CreateCachediSCSIVolume.go +++ b/service/storagegateway/api_op_CreateCachediSCSIVolume.go @@ -193,6 +193,9 @@ func (c *Client) addOperationCreateCachediSCSIVolumeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCachediSCSIVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateNFSFileShare.go b/service/storagegateway/api_op_CreateNFSFileShare.go index 1d832cf508b..d0609972401 100644 --- a/service/storagegateway/api_op_CreateNFSFileShare.go +++ b/service/storagegateway/api_op_CreateNFSFileShare.go @@ -285,6 +285,9 @@ func (c *Client) addOperationCreateNFSFileShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNFSFileShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateSMBFileShare.go b/service/storagegateway/api_op_CreateSMBFileShare.go index 43eb0817eca..d47a19ca92b 100644 --- a/service/storagegateway/api_op_CreateSMBFileShare.go +++ b/service/storagegateway/api_op_CreateSMBFileShare.go @@ -321,6 +321,9 @@ func (c *Client) addOperationCreateSMBFileShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSMBFileShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateSnapshot.go b/service/storagegateway/api_op_CreateSnapshot.go index 2604cd8048f..416d8377145 100644 --- a/service/storagegateway/api_op_CreateSnapshot.go +++ b/service/storagegateway/api_op_CreateSnapshot.go @@ -160,6 +160,9 @@ func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateSnapshotFromVolumeRecoveryPoint.go b/service/storagegateway/api_op_CreateSnapshotFromVolumeRecoveryPoint.go index ead622461ac..0f4e8bf04c8 100644 --- a/service/storagegateway/api_op_CreateSnapshotFromVolumeRecoveryPoint.go +++ b/service/storagegateway/api_op_CreateSnapshotFromVolumeRecoveryPoint.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateSnapshotFromVolumeRecoveryPointMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSnapshotFromVolumeRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateStorediSCSIVolume.go b/service/storagegateway/api_op_CreateStorediSCSIVolume.go index 60fca83f84d..e319570d020 100644 --- a/service/storagegateway/api_op_CreateStorediSCSIVolume.go +++ b/service/storagegateway/api_op_CreateStorediSCSIVolume.go @@ -203,6 +203,9 @@ func (c *Client) addOperationCreateStorediSCSIVolumeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStorediSCSIVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateTapePool.go b/service/storagegateway/api_op_CreateTapePool.go index a886f684524..506f0ab872d 100644 --- a/service/storagegateway/api_op_CreateTapePool.go +++ b/service/storagegateway/api_op_CreateTapePool.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateTapePoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTapePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateTapeWithBarcode.go b/service/storagegateway/api_op_CreateTapeWithBarcode.go index a78bdc7430b..69eb19dd98d 100644 --- a/service/storagegateway/api_op_CreateTapeWithBarcode.go +++ b/service/storagegateway/api_op_CreateTapeWithBarcode.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateTapeWithBarcodeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTapeWithBarcodeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_CreateTapes.go b/service/storagegateway/api_op_CreateTapes.go index 6e84100c8a0..6434c1e87b4 100644 --- a/service/storagegateway/api_op_CreateTapes.go +++ b/service/storagegateway/api_op_CreateTapes.go @@ -175,6 +175,9 @@ func (c *Client) addOperationCreateTapesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTapesValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteAutomaticTapeCreationPolicy.go b/service/storagegateway/api_op_DeleteAutomaticTapeCreationPolicy.go index 6c223988c2e..66ba342b736 100644 --- a/service/storagegateway/api_op_DeleteAutomaticTapeCreationPolicy.go +++ b/service/storagegateway/api_op_DeleteAutomaticTapeCreationPolicy.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteAutomaticTapeCreationPolicyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAutomaticTapeCreationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteBandwidthRateLimit.go b/service/storagegateway/api_op_DeleteBandwidthRateLimit.go index 030e2846e3b..2ca9cb6987e 100644 --- a/service/storagegateway/api_op_DeleteBandwidthRateLimit.go +++ b/service/storagegateway/api_op_DeleteBandwidthRateLimit.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteBandwidthRateLimitMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBandwidthRateLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteChapCredentials.go b/service/storagegateway/api_op_DeleteChapCredentials.go index 9920eba38bc..2280808bf11 100644 --- a/service/storagegateway/api_op_DeleteChapCredentials.go +++ b/service/storagegateway/api_op_DeleteChapCredentials.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteChapCredentialsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteChapCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteFileShare.go b/service/storagegateway/api_op_DeleteFileShare.go index ecdd8714bcc..ff691b33344 100644 --- a/service/storagegateway/api_op_DeleteFileShare.go +++ b/service/storagegateway/api_op_DeleteFileShare.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteFileShareMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFileShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteGateway.go b/service/storagegateway/api_op_DeleteGateway.go index 20218b3d8ca..027d85b83f7 100644 --- a/service/storagegateway/api_op_DeleteGateway.go +++ b/service/storagegateway/api_op_DeleteGateway.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteGatewayMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteSnapshotSchedule.go b/service/storagegateway/api_op_DeleteSnapshotSchedule.go index b3f35c0f8ae..80f331b9410 100644 --- a/service/storagegateway/api_op_DeleteSnapshotSchedule.go +++ b/service/storagegateway/api_op_DeleteSnapshotSchedule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDeleteSnapshotScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSnapshotScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteTape.go b/service/storagegateway/api_op_DeleteTape.go index 68085078c12..38fb482c3b3 100644 --- a/service/storagegateway/api_op_DeleteTape.go +++ b/service/storagegateway/api_op_DeleteTape.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDeleteTapeMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTapeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteTapeArchive.go b/service/storagegateway/api_op_DeleteTapeArchive.go index e2bdd7da510..39438c1594f 100644 --- a/service/storagegateway/api_op_DeleteTapeArchive.go +++ b/service/storagegateway/api_op_DeleteTapeArchive.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteTapeArchiveMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTapeArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteTapePool.go b/service/storagegateway/api_op_DeleteTapePool.go index ff691b3f9df..f35eefb0b3a 100644 --- a/service/storagegateway/api_op_DeleteTapePool.go +++ b/service/storagegateway/api_op_DeleteTapePool.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteTapePoolMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTapePoolValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DeleteVolume.go b/service/storagegateway/api_op_DeleteVolume.go index d3ae550be6d..599f6965f7e 100644 --- a/service/storagegateway/api_op_DeleteVolume.go +++ b/service/storagegateway/api_op_DeleteVolume.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeAvailabilityMonitorTest.go b/service/storagegateway/api_op_DescribeAvailabilityMonitorTest.go index 4dbbf2710d6..1d4d7dc57cf 100644 --- a/service/storagegateway/api_op_DescribeAvailabilityMonitorTest.go +++ b/service/storagegateway/api_op_DescribeAvailabilityMonitorTest.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeAvailabilityMonitorTestMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAvailabilityMonitorTestValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeBandwidthRateLimit.go b/service/storagegateway/api_op_DescribeBandwidthRateLimit.go index 5477d11aba2..7e0584245a4 100644 --- a/service/storagegateway/api_op_DescribeBandwidthRateLimit.go +++ b/service/storagegateway/api_op_DescribeBandwidthRateLimit.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeBandwidthRateLimitMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBandwidthRateLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeBandwidthRateLimitSchedule.go b/service/storagegateway/api_op_DescribeBandwidthRateLimitSchedule.go index 39721601bbc..f95f7881acc 100644 --- a/service/storagegateway/api_op_DescribeBandwidthRateLimitSchedule.go +++ b/service/storagegateway/api_op_DescribeBandwidthRateLimitSchedule.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeBandwidthRateLimitScheduleMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBandwidthRateLimitScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeCache.go b/service/storagegateway/api_op_DescribeCache.go index fb20ba9e427..b4589257349 100644 --- a/service/storagegateway/api_op_DescribeCache.go +++ b/service/storagegateway/api_op_DescribeCache.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDescribeCacheMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeCachediSCSIVolumes.go b/service/storagegateway/api_op_DescribeCachediSCSIVolumes.go index f215838f957..c408a967d5b 100644 --- a/service/storagegateway/api_op_DescribeCachediSCSIVolumes.go +++ b/service/storagegateway/api_op_DescribeCachediSCSIVolumes.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeCachediSCSIVolumesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCachediSCSIVolumesValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeChapCredentials.go b/service/storagegateway/api_op_DescribeChapCredentials.go index cbb2300023e..24941880d09 100644 --- a/service/storagegateway/api_op_DescribeChapCredentials.go +++ b/service/storagegateway/api_op_DescribeChapCredentials.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDescribeChapCredentialsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeChapCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeFileSystemAssociations.go b/service/storagegateway/api_op_DescribeFileSystemAssociations.go index 50117898007..86864af4c43 100644 --- a/service/storagegateway/api_op_DescribeFileSystemAssociations.go +++ b/service/storagegateway/api_op_DescribeFileSystemAssociations.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeFileSystemAssociationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFileSystemAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeGatewayInformation.go b/service/storagegateway/api_op_DescribeGatewayInformation.go index a8b6b8020a3..5f41a2919e4 100644 --- a/service/storagegateway/api_op_DescribeGatewayInformation.go +++ b/service/storagegateway/api_op_DescribeGatewayInformation.go @@ -197,6 +197,9 @@ func (c *Client) addOperationDescribeGatewayInformationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGatewayInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeMaintenanceStartTime.go b/service/storagegateway/api_op_DescribeMaintenanceStartTime.go index 37b2d8bb0b8..fdb88c1cec7 100644 --- a/service/storagegateway/api_op_DescribeMaintenanceStartTime.go +++ b/service/storagegateway/api_op_DescribeMaintenanceStartTime.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeMaintenanceStartTimeMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMaintenanceStartTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeNFSFileShares.go b/service/storagegateway/api_op_DescribeNFSFileShares.go index ffa82ea0d00..71f7479cd25 100644 --- a/service/storagegateway/api_op_DescribeNFSFileShares.go +++ b/service/storagegateway/api_op_DescribeNFSFileShares.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeNFSFileSharesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNFSFileSharesValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeSMBFileShares.go b/service/storagegateway/api_op_DescribeSMBFileShares.go index c912b5f63c8..c244b588b21 100644 --- a/service/storagegateway/api_op_DescribeSMBFileShares.go +++ b/service/storagegateway/api_op_DescribeSMBFileShares.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeSMBFileSharesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSMBFileSharesValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeSMBSettings.go b/service/storagegateway/api_op_DescribeSMBSettings.go index f5b6756e5c9..3bbebda6b16 100644 --- a/service/storagegateway/api_op_DescribeSMBSettings.go +++ b/service/storagegateway/api_op_DescribeSMBSettings.go @@ -173,6 +173,9 @@ func (c *Client) addOperationDescribeSMBSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSMBSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeSnapshotSchedule.go b/service/storagegateway/api_op_DescribeSnapshotSchedule.go index 4d1cd5de185..4dab9063d55 100644 --- a/service/storagegateway/api_op_DescribeSnapshotSchedule.go +++ b/service/storagegateway/api_op_DescribeSnapshotSchedule.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeSnapshotScheduleMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSnapshotScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeStorediSCSIVolumes.go b/service/storagegateway/api_op_DescribeStorediSCSIVolumes.go index 2a7a8a5388f..37580dc2fb5 100644 --- a/service/storagegateway/api_op_DescribeStorediSCSIVolumes.go +++ b/service/storagegateway/api_op_DescribeStorediSCSIVolumes.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeStorediSCSIVolumesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeStorediSCSIVolumesValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeTapeArchives.go b/service/storagegateway/api_op_DescribeTapeArchives.go index 2780b534246..3f26acac5ff 100644 --- a/service/storagegateway/api_op_DescribeTapeArchives.go +++ b/service/storagegateway/api_op_DescribeTapeArchives.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDescribeTapeArchivesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTapeArchives(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationDescribeTapeArchivesMiddlewares(stack *middleware.S return nil } -// DescribeTapeArchivesAPIClient is a client that implements the -// DescribeTapeArchives operation. -type DescribeTapeArchivesAPIClient interface { - DescribeTapeArchives(context.Context, *DescribeTapeArchivesInput, ...func(*Options)) (*DescribeTapeArchivesOutput, error) -} - -var _ DescribeTapeArchivesAPIClient = (*Client)(nil) - // DescribeTapeArchivesPaginatorOptions is the paginator options for // DescribeTapeArchives type DescribeTapeArchivesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *DescribeTapeArchivesPaginator) NextPage(ctx context.Context, optFns ... } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTapeArchives(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *DescribeTapeArchivesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeTapeArchivesAPIClient is a client that implements the +// DescribeTapeArchives operation. +type DescribeTapeArchivesAPIClient interface { + DescribeTapeArchives(context.Context, *DescribeTapeArchivesInput, ...func(*Options)) (*DescribeTapeArchivesOutput, error) +} + +var _ DescribeTapeArchivesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTapeArchives(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go b/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go index 5ad8da5029c..5d6b1ca53d5 100644 --- a/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go +++ b/service/storagegateway/api_op_DescribeTapeRecoveryPoints.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeTapeRecoveryPointsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTapeRecoveryPointsValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationDescribeTapeRecoveryPointsMiddlewares(stack *middle return nil } -// DescribeTapeRecoveryPointsAPIClient is a client that implements the -// DescribeTapeRecoveryPoints operation. -type DescribeTapeRecoveryPointsAPIClient interface { - DescribeTapeRecoveryPoints(context.Context, *DescribeTapeRecoveryPointsInput, ...func(*Options)) (*DescribeTapeRecoveryPointsOutput, error) -} - -var _ DescribeTapeRecoveryPointsAPIClient = (*Client)(nil) - // DescribeTapeRecoveryPointsPaginatorOptions is the paginator options for // DescribeTapeRecoveryPoints type DescribeTapeRecoveryPointsPaginatorOptions struct { @@ -234,6 +229,9 @@ func (p *DescribeTapeRecoveryPointsPaginator) NextPage(ctx context.Context, optF } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTapeRecoveryPoints(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *DescribeTapeRecoveryPointsPaginator) NextPage(ctx context.Context, optF return result, nil } +// DescribeTapeRecoveryPointsAPIClient is a client that implements the +// DescribeTapeRecoveryPoints operation. +type DescribeTapeRecoveryPointsAPIClient interface { + DescribeTapeRecoveryPoints(context.Context, *DescribeTapeRecoveryPointsInput, ...func(*Options)) (*DescribeTapeRecoveryPointsOutput, error) +} + +var _ DescribeTapeRecoveryPointsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTapeRecoveryPoints(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_DescribeTapes.go b/service/storagegateway/api_op_DescribeTapes.go index df8788edd61..cef85006b74 100644 --- a/service/storagegateway/api_op_DescribeTapes.go +++ b/service/storagegateway/api_op_DescribeTapes.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeTapesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTapesValidationMiddleware(stack); err != nil { return err } @@ -167,13 +170,6 @@ func (c *Client) addOperationDescribeTapesMiddlewares(stack *middleware.Stack, o return nil } -// DescribeTapesAPIClient is a client that implements the DescribeTapes operation. -type DescribeTapesAPIClient interface { - DescribeTapes(context.Context, *DescribeTapesInput, ...func(*Options)) (*DescribeTapesOutput, error) -} - -var _ DescribeTapesAPIClient = (*Client)(nil) - // DescribeTapesPaginatorOptions is the paginator options for DescribeTapes type DescribeTapesPaginatorOptions struct { // Specifies that the number of virtual tapes described be limited to the @@ -240,6 +236,9 @@ func (p *DescribeTapesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeTapes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +258,13 @@ func (p *DescribeTapesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeTapesAPIClient is a client that implements the DescribeTapes operation. +type DescribeTapesAPIClient interface { + DescribeTapes(context.Context, *DescribeTapesInput, ...func(*Options)) (*DescribeTapesOutput, error) +} + +var _ DescribeTapesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeTapes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_DescribeUploadBuffer.go b/service/storagegateway/api_op_DescribeUploadBuffer.go index c382b8bcaed..8957d462d75 100644 --- a/service/storagegateway/api_op_DescribeUploadBuffer.go +++ b/service/storagegateway/api_op_DescribeUploadBuffer.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeUploadBufferMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUploadBufferValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DescribeVTLDevices.go b/service/storagegateway/api_op_DescribeVTLDevices.go index 057de846cd3..58862a5f60f 100644 --- a/service/storagegateway/api_op_DescribeVTLDevices.go +++ b/service/storagegateway/api_op_DescribeVTLDevices.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeVTLDevicesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeVTLDevicesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeVTLDevicesMiddlewares(stack *middleware.Sta return nil } -// DescribeVTLDevicesAPIClient is a client that implements the DescribeVTLDevices -// operation. -type DescribeVTLDevicesAPIClient interface { - DescribeVTLDevices(context.Context, *DescribeVTLDevicesInput, ...func(*Options)) (*DescribeVTLDevicesOutput, error) -} - -var _ DescribeVTLDevicesAPIClient = (*Client)(nil) - // DescribeVTLDevicesPaginatorOptions is the paginator options for // DescribeVTLDevices type DescribeVTLDevicesPaginatorOptions struct { @@ -236,6 +231,9 @@ func (p *DescribeVTLDevicesPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeVTLDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +253,14 @@ func (p *DescribeVTLDevicesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeVTLDevicesAPIClient is a client that implements the DescribeVTLDevices +// operation. +type DescribeVTLDevicesAPIClient interface { + DescribeVTLDevices(context.Context, *DescribeVTLDevicesInput, ...func(*Options)) (*DescribeVTLDevicesOutput, error) +} + +var _ DescribeVTLDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeVTLDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_DescribeWorkingStorage.go b/service/storagegateway/api_op_DescribeWorkingStorage.go index 46395711a05..e9f92602d12 100644 --- a/service/storagegateway/api_op_DescribeWorkingStorage.go +++ b/service/storagegateway/api_op_DescribeWorkingStorage.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeWorkingStorageMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkingStorageValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DetachVolume.go b/service/storagegateway/api_op_DetachVolume.go index 895fddc0581..8ba57a62481 100644 --- a/service/storagegateway/api_op_DetachVolume.go +++ b/service/storagegateway/api_op_DetachVolume.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDetachVolumeMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetachVolumeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DisableGateway.go b/service/storagegateway/api_op_DisableGateway.go index 5e9a2bf382a..9e026ca871d 100644 --- a/service/storagegateway/api_op_DisableGateway.go +++ b/service/storagegateway/api_op_DisableGateway.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDisableGatewayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisableGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_DisassociateFileSystem.go b/service/storagegateway/api_op_DisassociateFileSystem.go index 8a91406433d..226844a7d04 100644 --- a/service/storagegateway/api_op_DisassociateFileSystem.go +++ b/service/storagegateway/api_op_DisassociateFileSystem.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDisassociateFileSystemMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFileSystemValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_JoinDomain.go b/service/storagegateway/api_op_JoinDomain.go index 964bc6b787f..18ecdace5b6 100644 --- a/service/storagegateway/api_op_JoinDomain.go +++ b/service/storagegateway/api_op_JoinDomain.go @@ -173,6 +173,9 @@ func (c *Client) addOperationJoinDomainMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpJoinDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_ListAutomaticTapeCreationPolicies.go b/service/storagegateway/api_op_ListAutomaticTapeCreationPolicies.go index f7083e05750..26db8c68df0 100644 --- a/service/storagegateway/api_op_ListAutomaticTapeCreationPolicies.go +++ b/service/storagegateway/api_op_ListAutomaticTapeCreationPolicies.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListAutomaticTapeCreationPoliciesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAutomaticTapeCreationPolicies(options.Region), middleware.Before); err != nil { return err } diff --git a/service/storagegateway/api_op_ListFileShares.go b/service/storagegateway/api_op_ListFileShares.go index ea7bea6b128..549ebd40e99 100644 --- a/service/storagegateway/api_op_ListFileShares.go +++ b/service/storagegateway/api_op_ListFileShares.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListFileSharesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFileShares(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListFileSharesMiddlewares(stack *middleware.Stack, return nil } -// ListFileSharesAPIClient is a client that implements the ListFileShares -// operation. -type ListFileSharesAPIClient interface { - ListFileShares(context.Context, *ListFileSharesInput, ...func(*Options)) (*ListFileSharesOutput, error) -} - -var _ ListFileSharesAPIClient = (*Client)(nil) - // ListFileSharesPaginatorOptions is the paginator options for ListFileShares type ListFileSharesPaginatorOptions struct { // The maximum number of file shares to return in the response. The value must be @@ -220,6 +215,9 @@ func (p *ListFileSharesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFileShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListFileSharesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListFileSharesAPIClient is a client that implements the ListFileShares +// operation. +type ListFileSharesAPIClient interface { + ListFileShares(context.Context, *ListFileSharesInput, ...func(*Options)) (*ListFileSharesOutput, error) +} + +var _ ListFileSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFileShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_ListFileSystemAssociations.go b/service/storagegateway/api_op_ListFileSystemAssociations.go index 29a454e68f4..710d52f8e71 100644 --- a/service/storagegateway/api_op_ListFileSystemAssociations.go +++ b/service/storagegateway/api_op_ListFileSystemAssociations.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListFileSystemAssociationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFileSystemAssociations(options.Region), middleware.Before); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListFileSystemAssociationsMiddlewares(stack *middle return nil } -// ListFileSystemAssociationsAPIClient is a client that implements the -// ListFileSystemAssociations operation. -type ListFileSystemAssociationsAPIClient interface { - ListFileSystemAssociations(context.Context, *ListFileSystemAssociationsInput, ...func(*Options)) (*ListFileSystemAssociationsOutput, error) -} - -var _ ListFileSystemAssociationsAPIClient = (*Client)(nil) - // ListFileSystemAssociationsPaginatorOptions is the paginator options for // ListFileSystemAssociations type ListFileSystemAssociationsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListFileSystemAssociationsPaginator) NextPage(ctx context.Context, optF } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFileSystemAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListFileSystemAssociationsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListFileSystemAssociationsAPIClient is a client that implements the +// ListFileSystemAssociations operation. +type ListFileSystemAssociationsAPIClient interface { + ListFileSystemAssociations(context.Context, *ListFileSystemAssociationsInput, ...func(*Options)) (*ListFileSystemAssociationsOutput, error) +} + +var _ ListFileSystemAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFileSystemAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_ListGateways.go b/service/storagegateway/api_op_ListGateways.go index 84266ac5d3d..48d9e1657b8 100644 --- a/service/storagegateway/api_op_ListGateways.go +++ b/service/storagegateway/api_op_ListGateways.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGateways(options.Region), middleware.Before); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, op return nil } -// ListGatewaysAPIClient is a client that implements the ListGateways operation. -type ListGatewaysAPIClient interface { - ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) -} - -var _ ListGatewaysAPIClient = (*Client)(nil) - // ListGatewaysPaginatorOptions is the paginator options for ListGateways type ListGatewaysPaginatorOptions struct { // Specifies that the list of gateways returned be limited to the specified number @@ -222,6 +218,9 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGateways(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListGatewaysAPIClient is a client that implements the ListGateways operation. +type ListGatewaysAPIClient interface { + ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) +} + +var _ ListGatewaysAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGateways(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_ListLocalDisks.go b/service/storagegateway/api_op_ListLocalDisks.go index aa973cb3fe7..22f88b52b77 100644 --- a/service/storagegateway/api_op_ListLocalDisks.go +++ b/service/storagegateway/api_op_ListLocalDisks.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListLocalDisksMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLocalDisksValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_ListTagsForResource.go b/service/storagegateway/api_op_ListTagsForResource.go index d63baef5605..78b4adf4b2a 100644 --- a/service/storagegateway/api_op_ListTagsForResource.go +++ b/service/storagegateway/api_op_ListTagsForResource.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_ListTapePools.go b/service/storagegateway/api_op_ListTapePools.go index 8e8089ec002..92ae045627f 100644 --- a/service/storagegateway/api_op_ListTapePools.go +++ b/service/storagegateway/api_op_ListTapePools.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListTapePoolsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTapePools(options.Region), middleware.Before); err != nil { return err } @@ -149,13 +152,6 @@ func (c *Client) addOperationListTapePoolsMiddlewares(stack *middleware.Stack, o return nil } -// ListTapePoolsAPIClient is a client that implements the ListTapePools operation. -type ListTapePoolsAPIClient interface { - ListTapePools(context.Context, *ListTapePoolsInput, ...func(*Options)) (*ListTapePoolsOutput, error) -} - -var _ ListTapePoolsAPIClient = (*Client)(nil) - // ListTapePoolsPaginatorOptions is the paginator options for ListTapePools type ListTapePoolsPaginatorOptions struct { // An optional number limit for the tape pools in the list returned by this call. @@ -219,6 +215,9 @@ func (p *ListTapePoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTapePools(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +237,13 @@ func (p *ListTapePoolsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListTapePoolsAPIClient is a client that implements the ListTapePools operation. +type ListTapePoolsAPIClient interface { + ListTapePools(context.Context, *ListTapePoolsInput, ...func(*Options)) (*ListTapePoolsOutput, error) +} + +var _ ListTapePoolsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTapePools(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_ListTapes.go b/service/storagegateway/api_op_ListTapes.go index 4e2ed8d66a7..f5c2dcd221b 100644 --- a/service/storagegateway/api_op_ListTapes.go +++ b/service/storagegateway/api_op_ListTapes.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListTapesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTapes(options.Region), middleware.Before); err != nil { return err } @@ -162,13 +165,6 @@ func (c *Client) addOperationListTapesMiddlewares(stack *middleware.Stack, optio return nil } -// ListTapesAPIClient is a client that implements the ListTapes operation. -type ListTapesAPIClient interface { - ListTapes(context.Context, *ListTapesInput, ...func(*Options)) (*ListTapesOutput, error) -} - -var _ ListTapesAPIClient = (*Client)(nil) - // ListTapesPaginatorOptions is the paginator options for ListTapes type ListTapesPaginatorOptions struct { // An optional number limit for the tapes in the list returned by this call. @@ -232,6 +228,9 @@ func (p *ListTapesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTapes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +250,13 @@ func (p *ListTapesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListTapesAPIClient is a client that implements the ListTapes operation. +type ListTapesAPIClient interface { + ListTapes(context.Context, *ListTapesInput, ...func(*Options)) (*ListTapesOutput, error) +} + +var _ ListTapesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTapes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_ListVolumeInitiators.go b/service/storagegateway/api_op_ListVolumeInitiators.go index c5157c3c9b2..75454e6bda3 100644 --- a/service/storagegateway/api_op_ListVolumeInitiators.go +++ b/service/storagegateway/api_op_ListVolumeInitiators.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListVolumeInitiatorsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVolumeInitiatorsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_ListVolumeRecoveryPoints.go b/service/storagegateway/api_op_ListVolumeRecoveryPoints.go index cdba0d5e7af..f186a99918c 100644 --- a/service/storagegateway/api_op_ListVolumeRecoveryPoints.go +++ b/service/storagegateway/api_op_ListVolumeRecoveryPoints.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListVolumeRecoveryPointsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListVolumeRecoveryPointsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_ListVolumes.go b/service/storagegateway/api_op_ListVolumes.go index 48e5f390c94..6c4b5896c64 100644 --- a/service/storagegateway/api_op_ListVolumes.go +++ b/service/storagegateway/api_op_ListVolumes.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListVolumesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVolumes(options.Region), middleware.Before); err != nil { return err } @@ -165,13 +168,6 @@ func (c *Client) addOperationListVolumesMiddlewares(stack *middleware.Stack, opt return nil } -// ListVolumesAPIClient is a client that implements the ListVolumes operation. -type ListVolumesAPIClient interface { - ListVolumes(context.Context, *ListVolumesInput, ...func(*Options)) (*ListVolumesOutput, error) -} - -var _ ListVolumesAPIClient = (*Client)(nil) - // ListVolumesPaginatorOptions is the paginator options for ListVolumes type ListVolumesPaginatorOptions struct { // Specifies that the list of volumes returned be limited to the specified number @@ -236,6 +232,9 @@ func (p *ListVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVolumes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -255,6 +254,13 @@ func (p *ListVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListVolumesAPIClient is a client that implements the ListVolumes operation. +type ListVolumesAPIClient interface { + ListVolumes(context.Context, *ListVolumesInput, ...func(*Options)) (*ListVolumesOutput, error) +} + +var _ ListVolumesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVolumes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/storagegateway/api_op_NotifyWhenUploaded.go b/service/storagegateway/api_op_NotifyWhenUploaded.go index 4a0bfa3bd5e..5c2dfc3358e 100644 --- a/service/storagegateway/api_op_NotifyWhenUploaded.go +++ b/service/storagegateway/api_op_NotifyWhenUploaded.go @@ -123,6 +123,9 @@ func (c *Client) addOperationNotifyWhenUploadedMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyWhenUploadedValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_RefreshCache.go b/service/storagegateway/api_op_RefreshCache.go index 023b33014dc..6969d65841b 100644 --- a/service/storagegateway/api_op_RefreshCache.go +++ b/service/storagegateway/api_op_RefreshCache.go @@ -165,6 +165,9 @@ func (c *Client) addOperationRefreshCacheMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRefreshCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_RemoveTagsFromResource.go b/service/storagegateway/api_op_RemoveTagsFromResource.go index c1e13ae86c8..de25ab7a6af 100644 --- a/service/storagegateway/api_op_RemoveTagsFromResource.go +++ b/service/storagegateway/api_op_RemoveTagsFromResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_ResetCache.go b/service/storagegateway/api_op_ResetCache.go index ca936236933..44b6d285e9f 100644 --- a/service/storagegateway/api_op_ResetCache.go +++ b/service/storagegateway/api_op_ResetCache.go @@ -118,6 +118,9 @@ func (c *Client) addOperationResetCacheMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetCacheValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_RetrieveTapeArchive.go b/service/storagegateway/api_op_RetrieveTapeArchive.go index c670180b9b2..bd0342b7972 100644 --- a/service/storagegateway/api_op_RetrieveTapeArchive.go +++ b/service/storagegateway/api_op_RetrieveTapeArchive.go @@ -127,6 +127,9 @@ func (c *Client) addOperationRetrieveTapeArchiveMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveTapeArchiveValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_RetrieveTapeRecoveryPoint.go b/service/storagegateway/api_op_RetrieveTapeRecoveryPoint.go index 9927cf0618a..c23c29ad6c5 100644 --- a/service/storagegateway/api_op_RetrieveTapeRecoveryPoint.go +++ b/service/storagegateway/api_op_RetrieveTapeRecoveryPoint.go @@ -124,6 +124,9 @@ func (c *Client) addOperationRetrieveTapeRecoveryPointMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRetrieveTapeRecoveryPointValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_SetLocalConsolePassword.go b/service/storagegateway/api_op_SetLocalConsolePassword.go index 452a7c7b60c..4241479ac6a 100644 --- a/service/storagegateway/api_op_SetLocalConsolePassword.go +++ b/service/storagegateway/api_op_SetLocalConsolePassword.go @@ -116,6 +116,9 @@ func (c *Client) addOperationSetLocalConsolePasswordMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetLocalConsolePasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_SetSMBGuestPassword.go b/service/storagegateway/api_op_SetSMBGuestPassword.go index 98d791b134b..87bf95e45eb 100644 --- a/service/storagegateway/api_op_SetSMBGuestPassword.go +++ b/service/storagegateway/api_op_SetSMBGuestPassword.go @@ -115,6 +115,9 @@ func (c *Client) addOperationSetSMBGuestPasswordMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSetSMBGuestPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_ShutdownGateway.go b/service/storagegateway/api_op_ShutdownGateway.go index e9ff175010b..1f05c4bc772 100644 --- a/service/storagegateway/api_op_ShutdownGateway.go +++ b/service/storagegateway/api_op_ShutdownGateway.go @@ -132,6 +132,9 @@ func (c *Client) addOperationShutdownGatewayMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpShutdownGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_StartAvailabilityMonitorTest.go b/service/storagegateway/api_op_StartAvailabilityMonitorTest.go index b48400387fd..d647b140153 100644 --- a/service/storagegateway/api_op_StartAvailabilityMonitorTest.go +++ b/service/storagegateway/api_op_StartAvailabilityMonitorTest.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStartAvailabilityMonitorTestMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartAvailabilityMonitorTestValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_StartGateway.go b/service/storagegateway/api_op_StartGateway.go index aeea44d3183..4eff56585ef 100644 --- a/service/storagegateway/api_op_StartGateway.go +++ b/service/storagegateway/api_op_StartGateway.go @@ -121,6 +121,9 @@ func (c *Client) addOperationStartGatewayMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartGatewayValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateAutomaticTapeCreationPolicy.go b/service/storagegateway/api_op_UpdateAutomaticTapeCreationPolicy.go index 34f8fe78cae..396876ea835 100644 --- a/service/storagegateway/api_op_UpdateAutomaticTapeCreationPolicy.go +++ b/service/storagegateway/api_op_UpdateAutomaticTapeCreationPolicy.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateAutomaticTapeCreationPolicyMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAutomaticTapeCreationPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateBandwidthRateLimit.go b/service/storagegateway/api_op_UpdateBandwidthRateLimit.go index f78fbc96c27..2f4c8b29aa4 100644 --- a/service/storagegateway/api_op_UpdateBandwidthRateLimit.go +++ b/service/storagegateway/api_op_UpdateBandwidthRateLimit.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateBandwidthRateLimitMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBandwidthRateLimitValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateBandwidthRateLimitSchedule.go b/service/storagegateway/api_op_UpdateBandwidthRateLimitSchedule.go index 33ae0170ae9..80b6b95334d 100644 --- a/service/storagegateway/api_op_UpdateBandwidthRateLimitSchedule.go +++ b/service/storagegateway/api_op_UpdateBandwidthRateLimitSchedule.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateBandwidthRateLimitScheduleMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateBandwidthRateLimitScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateChapCredentials.go b/service/storagegateway/api_op_UpdateChapCredentials.go index 0179eb29899..b55ebef5b6c 100644 --- a/service/storagegateway/api_op_UpdateChapCredentials.go +++ b/service/storagegateway/api_op_UpdateChapCredentials.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateChapCredentialsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateChapCredentialsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateFileSystemAssociation.go b/service/storagegateway/api_op_UpdateFileSystemAssociation.go index fe281cc0009..1cdd5e7f98d 100644 --- a/service/storagegateway/api_op_UpdateFileSystemAssociation.go +++ b/service/storagegateway/api_op_UpdateFileSystemAssociation.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateFileSystemAssociationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFileSystemAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateGatewayInformation.go b/service/storagegateway/api_op_UpdateGatewayInformation.go index cbb74ecb6bd..a99f364bc9c 100644 --- a/service/storagegateway/api_op_UpdateGatewayInformation.go +++ b/service/storagegateway/api_op_UpdateGatewayInformation.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateGatewayInformationMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGatewayInformationValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateGatewaySoftwareNow.go b/service/storagegateway/api_op_UpdateGatewaySoftwareNow.go index 77ca1513df2..17e11c4efa9 100644 --- a/service/storagegateway/api_op_UpdateGatewaySoftwareNow.go +++ b/service/storagegateway/api_op_UpdateGatewaySoftwareNow.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateGatewaySoftwareNowMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGatewaySoftwareNowValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateMaintenanceStartTime.go b/service/storagegateway/api_op_UpdateMaintenanceStartTime.go index 0d536fe5c1a..a1c58f91123 100644 --- a/service/storagegateway/api_op_UpdateMaintenanceStartTime.go +++ b/service/storagegateway/api_op_UpdateMaintenanceStartTime.go @@ -162,6 +162,9 @@ func (c *Client) addOperationUpdateMaintenanceStartTimeMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMaintenanceStartTimeValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateNFSFileShare.go b/service/storagegateway/api_op_UpdateNFSFileShare.go index b3c94779a51..bc7fadf50a5 100644 --- a/service/storagegateway/api_op_UpdateNFSFileShare.go +++ b/service/storagegateway/api_op_UpdateNFSFileShare.go @@ -222,6 +222,9 @@ func (c *Client) addOperationUpdateNFSFileShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateNFSFileShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateSMBFileShare.go b/service/storagegateway/api_op_UpdateSMBFileShare.go index a2afb420cd0..e3ff7963d22 100644 --- a/service/storagegateway/api_op_UpdateSMBFileShare.go +++ b/service/storagegateway/api_op_UpdateSMBFileShare.go @@ -249,6 +249,9 @@ func (c *Client) addOperationUpdateSMBFileShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSMBFileShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateSMBFileShareVisibility.go b/service/storagegateway/api_op_UpdateSMBFileShareVisibility.go index fdb678ec476..b6a569d12fb 100644 --- a/service/storagegateway/api_op_UpdateSMBFileShareVisibility.go +++ b/service/storagegateway/api_op_UpdateSMBFileShareVisibility.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateSMBFileShareVisibilityMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSMBFileShareVisibilityValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateSMBLocalGroups.go b/service/storagegateway/api_op_UpdateSMBLocalGroups.go index 1f510802d8e..d4022f41323 100644 --- a/service/storagegateway/api_op_UpdateSMBLocalGroups.go +++ b/service/storagegateway/api_op_UpdateSMBLocalGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateSMBLocalGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSMBLocalGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go b/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go index 161e60b379f..3bebe32ce3c 100644 --- a/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go +++ b/service/storagegateway/api_op_UpdateSMBSecurityStrategy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationUpdateSMBSecurityStrategyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSMBSecurityStrategyValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateSnapshotSchedule.go b/service/storagegateway/api_op_UpdateSnapshotSchedule.go index 7767cb699f4..f74b1eeaa3b 100644 --- a/service/storagegateway/api_op_UpdateSnapshotSchedule.go +++ b/service/storagegateway/api_op_UpdateSnapshotSchedule.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateSnapshotScheduleMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSnapshotScheduleValidationMiddleware(stack); err != nil { return err } diff --git a/service/storagegateway/api_op_UpdateVTLDeviceType.go b/service/storagegateway/api_op_UpdateVTLDeviceType.go index 2596a983353..0ce5638e2e0 100644 --- a/service/storagegateway/api_op_UpdateVTLDeviceType.go +++ b/service/storagegateway/api_op_UpdateVTLDeviceType.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateVTLDeviceTypeMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVTLDeviceTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_client.go b/service/sts/api_client.go index 25e652330ef..acd2b8e7a13 100644 --- a/service/sts/api_client.go +++ b/service/sts/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -539,6 +563,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/sts/api_op_AssumeRole.go b/service/sts/api_op_AssumeRole.go index ddad1cdfc23..e74fc8ba9f7 100644 --- a/service/sts/api_op_AssumeRole.go +++ b/service/sts/api_op_AssumeRole.go @@ -460,6 +460,9 @@ func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_op_AssumeRoleWithSAML.go b/service/sts/api_op_AssumeRoleWithSAML.go index 31b7ba5c4ac..4c685abd5f7 100644 --- a/service/sts/api_op_AssumeRoleWithSAML.go +++ b/service/sts/api_op_AssumeRoleWithSAML.go @@ -400,6 +400,9 @@ func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_op_AssumeRoleWithWebIdentity.go b/service/sts/api_op_AssumeRoleWithWebIdentity.go index 30dac8c6ff7..0b5e5a377c2 100644 --- a/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ b/service/sts/api_op_AssumeRoleWithWebIdentity.go @@ -411,6 +411,9 @@ func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_op_DecodeAuthorizationMessage.go b/service/sts/api_op_DecodeAuthorizationMessage.go index 925ee2eeb1d..b1f14d28ce2 100644 --- a/service/sts/api_op_DecodeAuthorizationMessage.go +++ b/service/sts/api_op_DecodeAuthorizationMessage.go @@ -141,6 +141,9 @@ func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_op_GetAccessKeyInfo.go b/service/sts/api_op_GetAccessKeyInfo.go index 75da475979e..3ba00873db9 100644 --- a/service/sts/api_op_GetAccessKeyInfo.go +++ b/service/sts/api_op_GetAccessKeyInfo.go @@ -132,6 +132,9 @@ func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_op_GetCallerIdentity.go b/service/sts/api_op_GetCallerIdentity.go index ea90ff7d41f..abac49ad2f8 100644 --- a/service/sts/api_op_GetCallerIdentity.go +++ b/service/sts/api_op_GetCallerIdentity.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil { return err } diff --git a/service/sts/api_op_GetFederationToken.go b/service/sts/api_op_GetFederationToken.go index a0b5ebdbab2..2bae67429f2 100644 --- a/service/sts/api_op_GetFederationToken.go +++ b/service/sts/api_op_GetFederationToken.go @@ -345,6 +345,9 @@ func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/sts/api_op_GetSessionToken.go b/service/sts/api_op_GetSessionToken.go index 645ccaeb2ea..c73316a3c04 100644 --- a/service/sts/api_op_GetSessionToken.go +++ b/service/sts/api_op_GetSessionToken.go @@ -194,6 +194,9 @@ func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/supplychain/api_client.go b/service/supplychain/api_client.go index 4f81bd2016b..3c774489cec 100644 --- a/service/supplychain/api_client.go +++ b/service/supplychain/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/supplychain/api_op_CreateBillOfMaterialsImportJob.go b/service/supplychain/api_op_CreateBillOfMaterialsImportJob.go index a3b87e10f82..732104d3fa9 100644 --- a/service/supplychain/api_op_CreateBillOfMaterialsImportJob.go +++ b/service/supplychain/api_op_CreateBillOfMaterialsImportJob.go @@ -124,6 +124,9 @@ func (c *Client) addOperationCreateBillOfMaterialsImportJobMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateBillOfMaterialsImportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/supplychain/api_op_GetBillOfMaterialsImportJob.go b/service/supplychain/api_op_GetBillOfMaterialsImportJob.go index e3a30df5f99..813048add35 100644 --- a/service/supplychain/api_op_GetBillOfMaterialsImportJob.go +++ b/service/supplychain/api_op_GetBillOfMaterialsImportJob.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetBillOfMaterialsImportJobMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBillOfMaterialsImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/supplychain/api_op_SendDataIntegrationEvent.go b/service/supplychain/api_op_SendDataIntegrationEvent.go index b1cbf29df77..46e6a34cd43 100644 --- a/service/supplychain/api_op_SendDataIntegrationEvent.go +++ b/service/supplychain/api_op_SendDataIntegrationEvent.go @@ -133,6 +133,9 @@ func (c *Client) addOperationSendDataIntegrationEventMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opSendDataIntegrationEventMiddleware(stack, options); err != nil { return err } diff --git a/service/support/api_client.go b/service/support/api_client.go index 2bd1e05ee13..fa39bbccca3 100644 --- a/service/support/api_client.go +++ b/service/support/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/support/api_op_AddAttachmentsToSet.go b/service/support/api_op_AddAttachmentsToSet.go index 3acf2d8a281..a89eb9ea667 100644 --- a/service/support/api_op_AddAttachmentsToSet.go +++ b/service/support/api_op_AddAttachmentsToSet.go @@ -139,6 +139,9 @@ func (c *Client) addOperationAddAttachmentsToSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddAttachmentsToSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_AddCommunicationToCase.go b/service/support/api_op_AddCommunicationToCase.go index adab9114430..0a35ef87652 100644 --- a/service/support/api_op_AddCommunicationToCase.go +++ b/service/support/api_op_AddCommunicationToCase.go @@ -132,6 +132,9 @@ func (c *Client) addOperationAddCommunicationToCaseMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddCommunicationToCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_CreateCase.go b/service/support/api_op_CreateCase.go index 76dd76b727b..7aac4b8bce4 100644 --- a/service/support/api_op_CreateCase.go +++ b/service/support/api_op_CreateCase.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreateCaseMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeAttachment.go b/service/support/api_op_DescribeAttachment.go index 936f469ce52..76a1da3a5d8 100644 --- a/service/support/api_op_DescribeAttachment.go +++ b/service/support/api_op_DescribeAttachment.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeAttachmentMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAttachmentValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeCases.go b/service/support/api_op_DescribeCases.go index da88052abea..df809328fe6 100644 --- a/service/support/api_op_DescribeCases.go +++ b/service/support/api_op_DescribeCases.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDescribeCasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCases(options.Region), middleware.Before); err != nil { return err } @@ -189,13 +192,6 @@ func (c *Client) addOperationDescribeCasesMiddlewares(stack *middleware.Stack, o return nil } -// DescribeCasesAPIClient is a client that implements the DescribeCases operation. -type DescribeCasesAPIClient interface { - DescribeCases(context.Context, *DescribeCasesInput, ...func(*Options)) (*DescribeCasesOutput, error) -} - -var _ DescribeCasesAPIClient = (*Client)(nil) - // DescribeCasesPaginatorOptions is the paginator options for DescribeCases type DescribeCasesPaginatorOptions struct { // The maximum number of results to return before paginating. @@ -259,6 +255,9 @@ func (p *DescribeCasesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +277,13 @@ func (p *DescribeCasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeCasesAPIClient is a client that implements the DescribeCases operation. +type DescribeCasesAPIClient interface { + DescribeCases(context.Context, *DescribeCasesInput, ...func(*Options)) (*DescribeCasesOutput, error) +} + +var _ DescribeCasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/support/api_op_DescribeCommunications.go b/service/support/api_op_DescribeCommunications.go index d0312c98097..0c8af8293f0 100644 --- a/service/support/api_op_DescribeCommunications.go +++ b/service/support/api_op_DescribeCommunications.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeCommunicationsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCommunicationsValidationMiddleware(stack); err != nil { return err } @@ -169,14 +172,6 @@ func (c *Client) addOperationDescribeCommunicationsMiddlewares(stack *middleware return nil } -// DescribeCommunicationsAPIClient is a client that implements the -// DescribeCommunications operation. -type DescribeCommunicationsAPIClient interface { - DescribeCommunications(context.Context, *DescribeCommunicationsInput, ...func(*Options)) (*DescribeCommunicationsOutput, error) -} - -var _ DescribeCommunicationsAPIClient = (*Client)(nil) - // DescribeCommunicationsPaginatorOptions is the paginator options for // DescribeCommunications type DescribeCommunicationsPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *DescribeCommunicationsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCommunications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *DescribeCommunicationsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeCommunicationsAPIClient is a client that implements the +// DescribeCommunications operation. +type DescribeCommunicationsAPIClient interface { + DescribeCommunications(context.Context, *DescribeCommunicationsInput, ...func(*Options)) (*DescribeCommunicationsOutput, error) +} + +var _ DescribeCommunicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCommunications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/support/api_op_DescribeCreateCaseOptions.go b/service/support/api_op_DescribeCreateCaseOptions.go index c13c567015c..78756e8a94f 100644 --- a/service/support/api_op_DescribeCreateCaseOptions.go +++ b/service/support/api_op_DescribeCreateCaseOptions.go @@ -150,6 +150,9 @@ func (c *Client) addOperationDescribeCreateCaseOptionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCreateCaseOptionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeServices.go b/service/support/api_op_DescribeServices.go index e5ccfd41225..97142920587 100644 --- a/service/support/api_op_DescribeServices.go +++ b/service/support/api_op_DescribeServices.go @@ -132,6 +132,9 @@ func (c *Client) addOperationDescribeServicesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeServices(options.Region), middleware.Before); err != nil { return err } diff --git a/service/support/api_op_DescribeSeverityLevels.go b/service/support/api_op_DescribeSeverityLevels.go index 4786ded109c..cf96ed06247 100644 --- a/service/support/api_op_DescribeSeverityLevels.go +++ b/service/support/api_op_DescribeSeverityLevels.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeSeverityLevelsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSeverityLevels(options.Region), middleware.Before); err != nil { return err } diff --git a/service/support/api_op_DescribeSupportedLanguages.go b/service/support/api_op_DescribeSupportedLanguages.go index e545d061734..c4bfd9fec79 100644 --- a/service/support/api_op_DescribeSupportedLanguages.go +++ b/service/support/api_op_DescribeSupportedLanguages.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeSupportedLanguagesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSupportedLanguagesValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeTrustedAdvisorCheckRefreshStatuses.go b/service/support/api_op_DescribeTrustedAdvisorCheckRefreshStatuses.go index ac4543c61aa..1e04b166df7 100644 --- a/service/support/api_op_DescribeTrustedAdvisorCheckRefreshStatuses.go +++ b/service/support/api_op_DescribeTrustedAdvisorCheckRefreshStatuses.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDescribeTrustedAdvisorCheckRefreshStatusesMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustedAdvisorCheckRefreshStatusesValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeTrustedAdvisorCheckResult.go b/service/support/api_op_DescribeTrustedAdvisorCheckResult.go index a64b62acfc1..a6a97d47691 100644 --- a/service/support/api_op_DescribeTrustedAdvisorCheckResult.go +++ b/service/support/api_op_DescribeTrustedAdvisorCheckResult.go @@ -170,6 +170,9 @@ func (c *Client) addOperationDescribeTrustedAdvisorCheckResultMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustedAdvisorCheckResultValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeTrustedAdvisorCheckSummaries.go b/service/support/api_op_DescribeTrustedAdvisorCheckSummaries.go index 4a3eabe247f..f46efadbab1 100644 --- a/service/support/api_op_DescribeTrustedAdvisorCheckSummaries.go +++ b/service/support/api_op_DescribeTrustedAdvisorCheckSummaries.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeTrustedAdvisorCheckSummariesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustedAdvisorCheckSummariesValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_DescribeTrustedAdvisorChecks.go b/service/support/api_op_DescribeTrustedAdvisorChecks.go index 1a52bebb84c..f1a180cd8dd 100644 --- a/service/support/api_op_DescribeTrustedAdvisorChecks.go +++ b/service/support/api_op_DescribeTrustedAdvisorChecks.go @@ -158,6 +158,9 @@ func (c *Client) addOperationDescribeTrustedAdvisorChecksMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTrustedAdvisorChecksValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_RefreshTrustedAdvisorCheck.go b/service/support/api_op_RefreshTrustedAdvisorCheck.go index 890bad1d330..08af16e369d 100644 --- a/service/support/api_op_RefreshTrustedAdvisorCheck.go +++ b/service/support/api_op_RefreshTrustedAdvisorCheck.go @@ -136,6 +136,9 @@ func (c *Client) addOperationRefreshTrustedAdvisorCheckMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRefreshTrustedAdvisorCheckValidationMiddleware(stack); err != nil { return err } diff --git a/service/support/api_op_ResolveCase.go b/service/support/api_op_ResolveCase.go index 6282b35444e..32d24a08a55 100644 --- a/service/support/api_op_ResolveCase.go +++ b/service/support/api_op_ResolveCase.go @@ -120,6 +120,9 @@ func (c *Client) addOperationResolveCaseMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResolveCase(options.Region), middleware.Before); err != nil { return err } diff --git a/service/supportapp/api_client.go b/service/supportapp/api_client.go index b9b422bd5a7..af8afea9135 100644 --- a/service/supportapp/api_client.go +++ b/service/supportapp/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/supportapp/api_op_CreateSlackChannelConfiguration.go b/service/supportapp/api_op_CreateSlackChannelConfiguration.go index 378522e1dd9..c63dc58675d 100644 --- a/service/supportapp/api_op_CreateSlackChannelConfiguration.go +++ b/service/supportapp/api_op_CreateSlackChannelConfiguration.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateSlackChannelConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSlackChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/supportapp/api_op_DeleteAccountAlias.go b/service/supportapp/api_op_DeleteAccountAlias.go index 37671e8f998..43ab2bac845 100644 --- a/service/supportapp/api_op_DeleteAccountAlias.go +++ b/service/supportapp/api_op_DeleteAccountAlias.go @@ -98,6 +98,9 @@ func (c *Client) addOperationDeleteAccountAliasMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccountAlias(options.Region), middleware.Before); err != nil { return err } diff --git a/service/supportapp/api_op_DeleteSlackChannelConfiguration.go b/service/supportapp/api_op_DeleteSlackChannelConfiguration.go index 6b2ee21d311..6547f640ed4 100644 --- a/service/supportapp/api_op_DeleteSlackChannelConfiguration.go +++ b/service/supportapp/api_op_DeleteSlackChannelConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteSlackChannelConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlackChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/supportapp/api_op_DeleteSlackWorkspaceConfiguration.go b/service/supportapp/api_op_DeleteSlackWorkspaceConfiguration.go index 6c6d17f5f79..3e62e84ac9b 100644 --- a/service/supportapp/api_op_DeleteSlackWorkspaceConfiguration.go +++ b/service/supportapp/api_op_DeleteSlackWorkspaceConfiguration.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteSlackWorkspaceConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSlackWorkspaceConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/supportapp/api_op_GetAccountAlias.go b/service/supportapp/api_op_GetAccountAlias.go index 2e3e0525403..859c24af776 100644 --- a/service/supportapp/api_op_GetAccountAlias.go +++ b/service/supportapp/api_op_GetAccountAlias.go @@ -102,6 +102,9 @@ func (c *Client) addOperationGetAccountAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountAlias(options.Region), middleware.Before); err != nil { return err } diff --git a/service/supportapp/api_op_ListSlackChannelConfigurations.go b/service/supportapp/api_op_ListSlackChannelConfigurations.go index 50ff36467a9..bb3f071a78d 100644 --- a/service/supportapp/api_op_ListSlackChannelConfigurations.go +++ b/service/supportapp/api_op_ListSlackChannelConfigurations.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListSlackChannelConfigurationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSlackChannelConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListSlackChannelConfigurationsMiddlewares(stack *mi return nil } -// ListSlackChannelConfigurationsAPIClient is a client that implements the -// ListSlackChannelConfigurations operation. -type ListSlackChannelConfigurationsAPIClient interface { - ListSlackChannelConfigurations(context.Context, *ListSlackChannelConfigurationsInput, ...func(*Options)) (*ListSlackChannelConfigurationsOutput, error) -} - -var _ ListSlackChannelConfigurationsAPIClient = (*Client)(nil) - // ListSlackChannelConfigurationsPaginatorOptions is the paginator options for // ListSlackChannelConfigurations type ListSlackChannelConfigurationsPaginatorOptions struct { @@ -197,6 +192,9 @@ func (p *ListSlackChannelConfigurationsPaginator) NextPage(ctx context.Context, params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSlackChannelConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -216,6 +214,14 @@ func (p *ListSlackChannelConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListSlackChannelConfigurationsAPIClient is a client that implements the +// ListSlackChannelConfigurations operation. +type ListSlackChannelConfigurationsAPIClient interface { + ListSlackChannelConfigurations(context.Context, *ListSlackChannelConfigurationsInput, ...func(*Options)) (*ListSlackChannelConfigurationsOutput, error) +} + +var _ ListSlackChannelConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSlackChannelConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/supportapp/api_op_ListSlackWorkspaceConfigurations.go b/service/supportapp/api_op_ListSlackWorkspaceConfigurations.go index 05fc2035355..42f5d2674bc 100644 --- a/service/supportapp/api_op_ListSlackWorkspaceConfigurations.go +++ b/service/supportapp/api_op_ListSlackWorkspaceConfigurations.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListSlackWorkspaceConfigurationsMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSlackWorkspaceConfigurations(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListSlackWorkspaceConfigurationsMiddlewares(stack * return nil } -// ListSlackWorkspaceConfigurationsAPIClient is a client that implements the -// ListSlackWorkspaceConfigurations operation. -type ListSlackWorkspaceConfigurationsAPIClient interface { - ListSlackWorkspaceConfigurations(context.Context, *ListSlackWorkspaceConfigurationsInput, ...func(*Options)) (*ListSlackWorkspaceConfigurationsOutput, error) -} - -var _ ListSlackWorkspaceConfigurationsAPIClient = (*Client)(nil) - // ListSlackWorkspaceConfigurationsPaginatorOptions is the paginator options for // ListSlackWorkspaceConfigurations type ListSlackWorkspaceConfigurationsPaginatorOptions struct { @@ -195,6 +190,9 @@ func (p *ListSlackWorkspaceConfigurationsPaginator) NextPage(ctx context.Context params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSlackWorkspaceConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -214,6 +212,14 @@ func (p *ListSlackWorkspaceConfigurationsPaginator) NextPage(ctx context.Context return result, nil } +// ListSlackWorkspaceConfigurationsAPIClient is a client that implements the +// ListSlackWorkspaceConfigurations operation. +type ListSlackWorkspaceConfigurationsAPIClient interface { + ListSlackWorkspaceConfigurations(context.Context, *ListSlackWorkspaceConfigurationsInput, ...func(*Options)) (*ListSlackWorkspaceConfigurationsOutput, error) +} + +var _ ListSlackWorkspaceConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSlackWorkspaceConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/supportapp/api_op_PutAccountAlias.go b/service/supportapp/api_op_PutAccountAlias.go index fe2b194bd89..9b0b02cafa8 100644 --- a/service/supportapp/api_op_PutAccountAlias.go +++ b/service/supportapp/api_op_PutAccountAlias.go @@ -104,6 +104,9 @@ func (c *Client) addOperationPutAccountAliasMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccountAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/supportapp/api_op_RegisterSlackWorkspaceForOrganization.go b/service/supportapp/api_op_RegisterSlackWorkspaceForOrganization.go index 610a3afeaab..bb5a3371f18 100644 --- a/service/supportapp/api_op_RegisterSlackWorkspaceForOrganization.go +++ b/service/supportapp/api_op_RegisterSlackWorkspaceForOrganization.go @@ -146,6 +146,9 @@ func (c *Client) addOperationRegisterSlackWorkspaceForOrganizationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterSlackWorkspaceForOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/supportapp/api_op_UpdateSlackChannelConfiguration.go b/service/supportapp/api_op_UpdateSlackChannelConfiguration.go index 4d04fffee99..9c502ce94e6 100644 --- a/service/supportapp/api_op_UpdateSlackChannelConfiguration.go +++ b/service/supportapp/api_op_UpdateSlackChannelConfiguration.go @@ -183,6 +183,9 @@ func (c *Client) addOperationUpdateSlackChannelConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSlackChannelConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_client.go b/service/swf/api_client.go index d5b2159cf6e..9df4d4e5019 100644 --- a/service/swf/api_client.go +++ b/service/swf/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/swf/api_op_CountClosedWorkflowExecutions.go b/service/swf/api_op_CountClosedWorkflowExecutions.go index 18f460d95e5..473616d5461 100644 --- a/service/swf/api_op_CountClosedWorkflowExecutions.go +++ b/service/swf/api_op_CountClosedWorkflowExecutions.go @@ -185,6 +185,9 @@ func (c *Client) addOperationCountClosedWorkflowExecutionsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCountClosedWorkflowExecutionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_CountOpenWorkflowExecutions.go b/service/swf/api_op_CountOpenWorkflowExecutions.go index 41b96a095ed..50d6f33453e 100644 --- a/service/swf/api_op_CountOpenWorkflowExecutions.go +++ b/service/swf/api_op_CountOpenWorkflowExecutions.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCountOpenWorkflowExecutionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCountOpenWorkflowExecutionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_CountPendingActivityTasks.go b/service/swf/api_op_CountPendingActivityTasks.go index d03c886ec29..954a27835c5 100644 --- a/service/swf/api_op_CountPendingActivityTasks.go +++ b/service/swf/api_op_CountPendingActivityTasks.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCountPendingActivityTasksMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCountPendingActivityTasksValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_CountPendingDecisionTasks.go b/service/swf/api_op_CountPendingDecisionTasks.go index 13343644bd4..183e7cecbef 100644 --- a/service/swf/api_op_CountPendingDecisionTasks.go +++ b/service/swf/api_op_CountPendingDecisionTasks.go @@ -141,6 +141,9 @@ func (c *Client) addOperationCountPendingDecisionTasksMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCountPendingDecisionTasksValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DeleteActivityType.go b/service/swf/api_op_DeleteActivityType.go index 6ddf910351e..0d227665d13 100644 --- a/service/swf/api_op_DeleteActivityType.go +++ b/service/swf/api_op_DeleteActivityType.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteActivityTypeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteActivityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DeleteWorkflowType.go b/service/swf/api_op_DeleteWorkflowType.go index 1a7c950a517..d192b86fe65 100644 --- a/service/swf/api_op_DeleteWorkflowType.go +++ b/service/swf/api_op_DeleteWorkflowType.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteWorkflowTypeMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DeprecateActivityType.go b/service/swf/api_op_DeprecateActivityType.go index e20a8ff3284..e6c45d2ed46 100644 --- a/service/swf/api_op_DeprecateActivityType.go +++ b/service/swf/api_op_DeprecateActivityType.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeprecateActivityTypeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprecateActivityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DeprecateDomain.go b/service/swf/api_op_DeprecateDomain.go index ecafceb1970..cd1b6730eea 100644 --- a/service/swf/api_op_DeprecateDomain.go +++ b/service/swf/api_op_DeprecateDomain.go @@ -127,6 +127,9 @@ func (c *Client) addOperationDeprecateDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprecateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DeprecateWorkflowType.go b/service/swf/api_op_DeprecateWorkflowType.go index ddba7213065..08ba7007166 100644 --- a/service/swf/api_op_DeprecateWorkflowType.go +++ b/service/swf/api_op_DeprecateWorkflowType.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeprecateWorkflowTypeMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeprecateWorkflowTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DescribeActivityType.go b/service/swf/api_op_DescribeActivityType.go index 670c33f7d4c..d40aef47805 100644 --- a/service/swf/api_op_DescribeActivityType.go +++ b/service/swf/api_op_DescribeActivityType.go @@ -157,6 +157,9 @@ func (c *Client) addOperationDescribeActivityTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeActivityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DescribeDomain.go b/service/swf/api_op_DescribeDomain.go index ee64a9fc636..0243144ddd2 100644 --- a/service/swf/api_op_DescribeDomain.go +++ b/service/swf/api_op_DescribeDomain.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DescribeWorkflowExecution.go b/service/swf/api_op_DescribeWorkflowExecution.go index 70d47020d35..c135ef90f7d 100644 --- a/service/swf/api_op_DescribeWorkflowExecution.go +++ b/service/swf/api_op_DescribeWorkflowExecution.go @@ -160,6 +160,9 @@ func (c *Client) addOperationDescribeWorkflowExecutionMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkflowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_DescribeWorkflowType.go b/service/swf/api_op_DescribeWorkflowType.go index 498f74393d9..7ac3f68646b 100644 --- a/service/swf/api_op_DescribeWorkflowType.go +++ b/service/swf/api_op_DescribeWorkflowType.go @@ -156,6 +156,9 @@ func (c *Client) addOperationDescribeWorkflowTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkflowTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_GetWorkflowExecutionHistory.go b/service/swf/api_op_GetWorkflowExecutionHistory.go index 98d9d90f7e8..1e33e059203 100644 --- a/service/swf/api_op_GetWorkflowExecutionHistory.go +++ b/service/swf/api_op_GetWorkflowExecutionHistory.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetWorkflowExecutionHistoryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkflowExecutionHistoryValidationMiddleware(stack); err != nil { return err } @@ -191,14 +194,6 @@ func (c *Client) addOperationGetWorkflowExecutionHistoryMiddlewares(stack *middl return nil } -// GetWorkflowExecutionHistoryAPIClient is a client that implements the -// GetWorkflowExecutionHistory operation. -type GetWorkflowExecutionHistoryAPIClient interface { - GetWorkflowExecutionHistory(context.Context, *GetWorkflowExecutionHistoryInput, ...func(*Options)) (*GetWorkflowExecutionHistoryOutput, error) -} - -var _ GetWorkflowExecutionHistoryAPIClient = (*Client)(nil) - // GetWorkflowExecutionHistoryPaginatorOptions is the paginator options for // GetWorkflowExecutionHistory type GetWorkflowExecutionHistoryPaginatorOptions struct { @@ -262,6 +257,9 @@ func (p *GetWorkflowExecutionHistoryPaginator) NextPage(ctx context.Context, opt params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetWorkflowExecutionHistory(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -281,6 +279,14 @@ func (p *GetWorkflowExecutionHistoryPaginator) NextPage(ctx context.Context, opt return result, nil } +// GetWorkflowExecutionHistoryAPIClient is a client that implements the +// GetWorkflowExecutionHistory operation. +type GetWorkflowExecutionHistoryAPIClient interface { + GetWorkflowExecutionHistory(context.Context, *GetWorkflowExecutionHistoryInput, ...func(*Options)) (*GetWorkflowExecutionHistoryOutput, error) +} + +var _ GetWorkflowExecutionHistoryAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetWorkflowExecutionHistory(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_ListActivityTypes.go b/service/swf/api_op_ListActivityTypes.go index 04fa82395ae..71afc7e9edd 100644 --- a/service/swf/api_op_ListActivityTypes.go +++ b/service/swf/api_op_ListActivityTypes.go @@ -167,6 +167,9 @@ func (c *Client) addOperationListActivityTypesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListActivityTypesValidationMiddleware(stack); err != nil { return err } @@ -191,14 +194,6 @@ func (c *Client) addOperationListActivityTypesMiddlewares(stack *middleware.Stac return nil } -// ListActivityTypesAPIClient is a client that implements the ListActivityTypes -// operation. -type ListActivityTypesAPIClient interface { - ListActivityTypes(context.Context, *ListActivityTypesInput, ...func(*Options)) (*ListActivityTypesOutput, error) -} - -var _ ListActivityTypesAPIClient = (*Client)(nil) - // ListActivityTypesPaginatorOptions is the paginator options for ListActivityTypes type ListActivityTypesPaginatorOptions struct { // The maximum number of results that are returned per call. Use nextPageToken to @@ -259,6 +254,9 @@ func (p *ListActivityTypesPaginator) NextPage(ctx context.Context, optFns ...fun params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListActivityTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -278,6 +276,14 @@ func (p *ListActivityTypesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListActivityTypesAPIClient is a client that implements the ListActivityTypes +// operation. +type ListActivityTypesAPIClient interface { + ListActivityTypes(context.Context, *ListActivityTypesInput, ...func(*Options)) (*ListActivityTypesOutput, error) +} + +var _ ListActivityTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListActivityTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_ListClosedWorkflowExecutions.go b/service/swf/api_op_ListClosedWorkflowExecutions.go index 23067f77f9d..6a29c18f945 100644 --- a/service/swf/api_op_ListClosedWorkflowExecutions.go +++ b/service/swf/api_op_ListClosedWorkflowExecutions.go @@ -214,6 +214,9 @@ func (c *Client) addOperationListClosedWorkflowExecutionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListClosedWorkflowExecutionsValidationMiddleware(stack); err != nil { return err } @@ -238,14 +241,6 @@ func (c *Client) addOperationListClosedWorkflowExecutionsMiddlewares(stack *midd return nil } -// ListClosedWorkflowExecutionsAPIClient is a client that implements the -// ListClosedWorkflowExecutions operation. -type ListClosedWorkflowExecutionsAPIClient interface { - ListClosedWorkflowExecutions(context.Context, *ListClosedWorkflowExecutionsInput, ...func(*Options)) (*ListClosedWorkflowExecutionsOutput, error) -} - -var _ ListClosedWorkflowExecutionsAPIClient = (*Client)(nil) - // ListClosedWorkflowExecutionsPaginatorOptions is the paginator options for // ListClosedWorkflowExecutions type ListClosedWorkflowExecutionsPaginatorOptions struct { @@ -309,6 +304,9 @@ func (p *ListClosedWorkflowExecutionsPaginator) NextPage(ctx context.Context, op params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListClosedWorkflowExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -328,6 +326,14 @@ func (p *ListClosedWorkflowExecutionsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListClosedWorkflowExecutionsAPIClient is a client that implements the +// ListClosedWorkflowExecutions operation. +type ListClosedWorkflowExecutionsAPIClient interface { + ListClosedWorkflowExecutions(context.Context, *ListClosedWorkflowExecutionsInput, ...func(*Options)) (*ListClosedWorkflowExecutionsOutput, error) +} + +var _ ListClosedWorkflowExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListClosedWorkflowExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_ListDomains.go b/service/swf/api_op_ListDomains.go index 554eea58767..8d1f4b67b31 100644 --- a/service/swf/api_op_ListDomains.go +++ b/service/swf/api_op_ListDomains.go @@ -161,6 +161,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainsValidationMiddleware(stack); err != nil { return err } @@ -185,13 +188,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of results that are returned per call. Use nextPageToken to @@ -252,6 +248,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +270,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_ListOpenWorkflowExecutions.go b/service/swf/api_op_ListOpenWorkflowExecutions.go index 166d86183ab..74627ce61ee 100644 --- a/service/swf/api_op_ListOpenWorkflowExecutions.go +++ b/service/swf/api_op_ListOpenWorkflowExecutions.go @@ -193,6 +193,9 @@ func (c *Client) addOperationListOpenWorkflowExecutionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOpenWorkflowExecutionsValidationMiddleware(stack); err != nil { return err } @@ -217,14 +220,6 @@ func (c *Client) addOperationListOpenWorkflowExecutionsMiddlewares(stack *middle return nil } -// ListOpenWorkflowExecutionsAPIClient is a client that implements the -// ListOpenWorkflowExecutions operation. -type ListOpenWorkflowExecutionsAPIClient interface { - ListOpenWorkflowExecutions(context.Context, *ListOpenWorkflowExecutionsInput, ...func(*Options)) (*ListOpenWorkflowExecutionsOutput, error) -} - -var _ ListOpenWorkflowExecutionsAPIClient = (*Client)(nil) - // ListOpenWorkflowExecutionsPaginatorOptions is the paginator options for // ListOpenWorkflowExecutions type ListOpenWorkflowExecutionsPaginatorOptions struct { @@ -288,6 +283,9 @@ func (p *ListOpenWorkflowExecutionsPaginator) NextPage(ctx context.Context, optF params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOpenWorkflowExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -307,6 +305,14 @@ func (p *ListOpenWorkflowExecutionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListOpenWorkflowExecutionsAPIClient is a client that implements the +// ListOpenWorkflowExecutions operation. +type ListOpenWorkflowExecutionsAPIClient interface { + ListOpenWorkflowExecutions(context.Context, *ListOpenWorkflowExecutionsInput, ...func(*Options)) (*ListOpenWorkflowExecutionsOutput, error) +} + +var _ ListOpenWorkflowExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOpenWorkflowExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_ListTagsForResource.go b/service/swf/api_op_ListTagsForResource.go index 4d470b2dca0..ad9d2efd84d 100644 --- a/service/swf/api_op_ListTagsForResource.go +++ b/service/swf/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_ListWorkflowTypes.go b/service/swf/api_op_ListWorkflowTypes.go index b50c5d3e0a7..35ca7b8187d 100644 --- a/service/swf/api_op_ListWorkflowTypes.go +++ b/service/swf/api_op_ListWorkflowTypes.go @@ -165,6 +165,9 @@ func (c *Client) addOperationListWorkflowTypesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkflowTypesValidationMiddleware(stack); err != nil { return err } @@ -189,14 +192,6 @@ func (c *Client) addOperationListWorkflowTypesMiddlewares(stack *middleware.Stac return nil } -// ListWorkflowTypesAPIClient is a client that implements the ListWorkflowTypes -// operation. -type ListWorkflowTypesAPIClient interface { - ListWorkflowTypes(context.Context, *ListWorkflowTypesInput, ...func(*Options)) (*ListWorkflowTypesOutput, error) -} - -var _ ListWorkflowTypesAPIClient = (*Client)(nil) - // ListWorkflowTypesPaginatorOptions is the paginator options for ListWorkflowTypes type ListWorkflowTypesPaginatorOptions struct { // The maximum number of results that are returned per call. Use nextPageToken to @@ -257,6 +252,9 @@ func (p *ListWorkflowTypesPaginator) NextPage(ctx context.Context, optFns ...fun params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflowTypes(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -276,6 +274,14 @@ func (p *ListWorkflowTypesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListWorkflowTypesAPIClient is a client that implements the ListWorkflowTypes +// operation. +type ListWorkflowTypesAPIClient interface { + ListWorkflowTypes(context.Context, *ListWorkflowTypesInput, ...func(*Options)) (*ListWorkflowTypesOutput, error) +} + +var _ ListWorkflowTypesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflowTypes(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_PollForActivityTask.go b/service/swf/api_op_PollForActivityTask.go index cc79ea3f76f..af0c5ebd1f1 100644 --- a/service/swf/api_op_PollForActivityTask.go +++ b/service/swf/api_op_PollForActivityTask.go @@ -179,6 +179,9 @@ func (c *Client) addOperationPollForActivityTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPollForActivityTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_PollForDecisionTask.go b/service/swf/api_op_PollForDecisionTask.go index 13acca91718..f9482182fac 100644 --- a/service/swf/api_op_PollForDecisionTask.go +++ b/service/swf/api_op_PollForDecisionTask.go @@ -233,6 +233,9 @@ func (c *Client) addOperationPollForDecisionTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPollForDecisionTaskValidationMiddleware(stack); err != nil { return err } @@ -257,14 +260,6 @@ func (c *Client) addOperationPollForDecisionTaskMiddlewares(stack *middleware.St return nil } -// PollForDecisionTaskAPIClient is a client that implements the -// PollForDecisionTask operation. -type PollForDecisionTaskAPIClient interface { - PollForDecisionTask(context.Context, *PollForDecisionTaskInput, ...func(*Options)) (*PollForDecisionTaskOutput, error) -} - -var _ PollForDecisionTaskAPIClient = (*Client)(nil) - // PollForDecisionTaskPaginatorOptions is the paginator options for // PollForDecisionTask type PollForDecisionTaskPaginatorOptions struct { @@ -329,6 +324,9 @@ func (p *PollForDecisionTaskPaginator) NextPage(ctx context.Context, optFns ...f params.MaximumPageSize = p.options.Limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.PollForDecisionTask(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -348,6 +346,14 @@ func (p *PollForDecisionTaskPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// PollForDecisionTaskAPIClient is a client that implements the +// PollForDecisionTask operation. +type PollForDecisionTaskAPIClient interface { + PollForDecisionTask(context.Context, *PollForDecisionTaskInput, ...func(*Options)) (*PollForDecisionTaskOutput, error) +} + +var _ PollForDecisionTaskAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opPollForDecisionTask(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/swf/api_op_RecordActivityTaskHeartbeat.go b/service/swf/api_op_RecordActivityTaskHeartbeat.go index 875c5aa82bb..f4a2f4c9f37 100644 --- a/service/swf/api_op_RecordActivityTaskHeartbeat.go +++ b/service/swf/api_op_RecordActivityTaskHeartbeat.go @@ -159,6 +159,9 @@ func (c *Client) addOperationRecordActivityTaskHeartbeatMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRecordActivityTaskHeartbeatValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RegisterActivityType.go b/service/swf/api_op_RegisterActivityType.go index ab2f54fde99..3e21e82d1d6 100644 --- a/service/swf/api_op_RegisterActivityType.go +++ b/service/swf/api_op_RegisterActivityType.go @@ -211,6 +211,9 @@ func (c *Client) addOperationRegisterActivityTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterActivityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RegisterDomain.go b/service/swf/api_op_RegisterDomain.go index 15c860c59f6..811a953fe91 100644 --- a/service/swf/api_op_RegisterDomain.go +++ b/service/swf/api_op_RegisterDomain.go @@ -152,6 +152,9 @@ func (c *Client) addOperationRegisterDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RegisterWorkflowType.go b/service/swf/api_op_RegisterWorkflowType.go index 96168274e3f..6dfd8afcfcc 100644 --- a/service/swf/api_op_RegisterWorkflowType.go +++ b/service/swf/api_op_RegisterWorkflowType.go @@ -225,6 +225,9 @@ func (c *Client) addOperationRegisterWorkflowTypeMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterWorkflowTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RequestCancelWorkflowExecution.go b/service/swf/api_op_RequestCancelWorkflowExecution.go index 1636259b34d..a73b38ba388 100644 --- a/service/swf/api_op_RequestCancelWorkflowExecution.go +++ b/service/swf/api_op_RequestCancelWorkflowExecution.go @@ -139,6 +139,9 @@ func (c *Client) addOperationRequestCancelWorkflowExecutionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRequestCancelWorkflowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RespondActivityTaskCanceled.go b/service/swf/api_op_RespondActivityTaskCanceled.go index 315a98c0937..59620050757 100644 --- a/service/swf/api_op_RespondActivityTaskCanceled.go +++ b/service/swf/api_op_RespondActivityTaskCanceled.go @@ -141,6 +141,9 @@ func (c *Client) addOperationRespondActivityTaskCanceledMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRespondActivityTaskCanceledValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RespondActivityTaskCompleted.go b/service/swf/api_op_RespondActivityTaskCompleted.go index f48cb4128d7..e28ff10c0cd 100644 --- a/service/swf/api_op_RespondActivityTaskCompleted.go +++ b/service/swf/api_op_RespondActivityTaskCompleted.go @@ -140,6 +140,9 @@ func (c *Client) addOperationRespondActivityTaskCompletedMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRespondActivityTaskCompletedValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RespondActivityTaskFailed.go b/service/swf/api_op_RespondActivityTaskFailed.go index b4388d37cf6..ca88c22fed2 100644 --- a/service/swf/api_op_RespondActivityTaskFailed.go +++ b/service/swf/api_op_RespondActivityTaskFailed.go @@ -138,6 +138,9 @@ func (c *Client) addOperationRespondActivityTaskFailedMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRespondActivityTaskFailedValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_RespondDecisionTaskCompleted.go b/service/swf/api_op_RespondDecisionTaskCompleted.go index 666084b1e2b..4d68006a9ed 100644 --- a/service/swf/api_op_RespondDecisionTaskCompleted.go +++ b/service/swf/api_op_RespondDecisionTaskCompleted.go @@ -149,6 +149,9 @@ func (c *Client) addOperationRespondDecisionTaskCompletedMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRespondDecisionTaskCompletedValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_SignalWorkflowExecution.go b/service/swf/api_op_SignalWorkflowExecution.go index 9f0bfdbeb65..3a81e8df8c2 100644 --- a/service/swf/api_op_SignalWorkflowExecution.go +++ b/service/swf/api_op_SignalWorkflowExecution.go @@ -147,6 +147,9 @@ func (c *Client) addOperationSignalWorkflowExecutionMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignalWorkflowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_StartWorkflowExecution.go b/service/swf/api_op_StartWorkflowExecution.go index 58e898f727b..3f6bffadcbb 100644 --- a/service/swf/api_op_StartWorkflowExecution.go +++ b/service/swf/api_op_StartWorkflowExecution.go @@ -267,6 +267,9 @@ func (c *Client) addOperationStartWorkflowExecutionMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartWorkflowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_TagResource.go b/service/swf/api_op_TagResource.go index 43ba3459c5d..60a45bde0af 100644 --- a/service/swf/api_op_TagResource.go +++ b/service/swf/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_TerminateWorkflowExecution.go b/service/swf/api_op_TerminateWorkflowExecution.go index 8dd08d82caf..faef9de69a5 100644 --- a/service/swf/api_op_TerminateWorkflowExecution.go +++ b/service/swf/api_op_TerminateWorkflowExecution.go @@ -171,6 +171,9 @@ func (c *Client) addOperationTerminateWorkflowExecutionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateWorkflowExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_UndeprecateActivityType.go b/service/swf/api_op_UndeprecateActivityType.go index f8d72309bb7..42c4353ac34 100644 --- a/service/swf/api_op_UndeprecateActivityType.go +++ b/service/swf/api_op_UndeprecateActivityType.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUndeprecateActivityTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUndeprecateActivityTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_UndeprecateDomain.go b/service/swf/api_op_UndeprecateDomain.go index a6c07e12ce3..ba76eaa625d 100644 --- a/service/swf/api_op_UndeprecateDomain.go +++ b/service/swf/api_op_UndeprecateDomain.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUndeprecateDomainMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUndeprecateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_UndeprecateWorkflowType.go b/service/swf/api_op_UndeprecateWorkflowType.go index 20b75540464..19a8d5a4684 100644 --- a/service/swf/api_op_UndeprecateWorkflowType.go +++ b/service/swf/api_op_UndeprecateWorkflowType.go @@ -136,6 +136,9 @@ func (c *Client) addOperationUndeprecateWorkflowTypeMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUndeprecateWorkflowTypeValidationMiddleware(stack); err != nil { return err } diff --git a/service/swf/api_op_UntagResource.go b/service/swf/api_op_UntagResource.go index 7adba744f82..596075f9b51 100644 --- a/service/swf/api_op_UntagResource.go +++ b/service/swf/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_client.go b/service/synthetics/api_client.go index 483b4073032..36e7e790e8c 100644 --- a/service/synthetics/api_client.go +++ b/service/synthetics/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/synthetics/api_op_AssociateResource.go b/service/synthetics/api_op_AssociateResource.go index 24c733b2ae2..4a4f2f1000b 100644 --- a/service/synthetics/api_op_AssociateResource.go +++ b/service/synthetics/api_op_AssociateResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationAssociateResourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_CreateCanary.go b/service/synthetics/api_op_CreateCanary.go index 422e7a2f2b7..6f66083a2f4 100644 --- a/service/synthetics/api_op_CreateCanary.go +++ b/service/synthetics/api_op_CreateCanary.go @@ -217,6 +217,9 @@ func (c *Client) addOperationCreateCanaryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCanaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_CreateGroup.go b/service/synthetics/api_op_CreateGroup.go index 2d018f3c2a8..adde1556924 100644 --- a/service/synthetics/api_op_CreateGroup.go +++ b/service/synthetics/api_op_CreateGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_DeleteCanary.go b/service/synthetics/api_op_DeleteCanary.go index 5291864ed47..812493619e4 100644 --- a/service/synthetics/api_op_DeleteCanary.go +++ b/service/synthetics/api_op_DeleteCanary.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteCanaryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCanaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_DeleteGroup.go b/service/synthetics/api_op_DeleteGroup.go index f319cdd09a7..d330fce6a3c 100644 --- a/service/synthetics/api_op_DeleteGroup.go +++ b/service/synthetics/api_op_DeleteGroup.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_DescribeCanaries.go b/service/synthetics/api_op_DescribeCanaries.go index 2db231fcab6..2e4dbad0978 100644 --- a/service/synthetics/api_op_DescribeCanaries.go +++ b/service/synthetics/api_op_DescribeCanaries.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeCanariesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCanaries(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeCanariesMiddlewares(stack *middleware.Stack return nil } -// DescribeCanariesAPIClient is a client that implements the DescribeCanaries -// operation. -type DescribeCanariesAPIClient interface { - DescribeCanaries(context.Context, *DescribeCanariesInput, ...func(*Options)) (*DescribeCanariesOutput, error) -} - -var _ DescribeCanariesAPIClient = (*Client)(nil) - // DescribeCanariesPaginatorOptions is the paginator options for DescribeCanaries type DescribeCanariesPaginatorOptions struct { // Specify this parameter to limit how many canaries are returned each time you @@ -238,6 +233,9 @@ func (p *DescribeCanariesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCanaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeCanariesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeCanariesAPIClient is a client that implements the DescribeCanaries +// operation. +type DescribeCanariesAPIClient interface { + DescribeCanaries(context.Context, *DescribeCanariesInput, ...func(*Options)) (*DescribeCanariesOutput, error) +} + +var _ DescribeCanariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCanaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_DescribeCanariesLastRun.go b/service/synthetics/api_op_DescribeCanariesLastRun.go index ce00b483602..dcfd5dd8534 100644 --- a/service/synthetics/api_op_DescribeCanariesLastRun.go +++ b/service/synthetics/api_op_DescribeCanariesLastRun.go @@ -144,6 +144,9 @@ func (c *Client) addOperationDescribeCanariesLastRunMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCanariesLastRun(options.Region), middleware.Before); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationDescribeCanariesLastRunMiddlewares(stack *middlewar return nil } -// DescribeCanariesLastRunAPIClient is a client that implements the -// DescribeCanariesLastRun operation. -type DescribeCanariesLastRunAPIClient interface { - DescribeCanariesLastRun(context.Context, *DescribeCanariesLastRunInput, ...func(*Options)) (*DescribeCanariesLastRunOutput, error) -} - -var _ DescribeCanariesLastRunAPIClient = (*Client)(nil) - // DescribeCanariesLastRunPaginatorOptions is the paginator options for // DescribeCanariesLastRun type DescribeCanariesLastRunPaginatorOptions struct { @@ -240,6 +235,9 @@ func (p *DescribeCanariesLastRunPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeCanariesLastRun(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -259,6 +257,14 @@ func (p *DescribeCanariesLastRunPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeCanariesLastRunAPIClient is a client that implements the +// DescribeCanariesLastRun operation. +type DescribeCanariesLastRunAPIClient interface { + DescribeCanariesLastRun(context.Context, *DescribeCanariesLastRunInput, ...func(*Options)) (*DescribeCanariesLastRunOutput, error) +} + +var _ DescribeCanariesLastRunAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeCanariesLastRun(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_DescribeRuntimeVersions.go b/service/synthetics/api_op_DescribeRuntimeVersions.go index 153e6889b14..a43acfd567d 100644 --- a/service/synthetics/api_op_DescribeRuntimeVersions.go +++ b/service/synthetics/api_op_DescribeRuntimeVersions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeRuntimeVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRuntimeVersions(options.Region), middleware.Before); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeRuntimeVersionsMiddlewares(stack *middlewar return nil } -// DescribeRuntimeVersionsAPIClient is a client that implements the -// DescribeRuntimeVersions operation. -type DescribeRuntimeVersionsAPIClient interface { - DescribeRuntimeVersions(context.Context, *DescribeRuntimeVersionsInput, ...func(*Options)) (*DescribeRuntimeVersionsOutput, error) -} - -var _ DescribeRuntimeVersionsAPIClient = (*Client)(nil) - // DescribeRuntimeVersionsPaginatorOptions is the paginator options for // DescribeRuntimeVersions type DescribeRuntimeVersionsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *DescribeRuntimeVersionsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRuntimeVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *DescribeRuntimeVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeRuntimeVersionsAPIClient is a client that implements the +// DescribeRuntimeVersions operation. +type DescribeRuntimeVersionsAPIClient interface { + DescribeRuntimeVersions(context.Context, *DescribeRuntimeVersionsInput, ...func(*Options)) (*DescribeRuntimeVersionsOutput, error) +} + +var _ DescribeRuntimeVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRuntimeVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_DisassociateResource.go b/service/synthetics/api_op_DisassociateResource.go index 9c1a350abac..16c989dd2e4 100644 --- a/service/synthetics/api_op_DisassociateResource.go +++ b/service/synthetics/api_op_DisassociateResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDisassociateResourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_GetCanary.go b/service/synthetics/api_op_GetCanary.go index c4c9235f196..eef16e0eb6b 100644 --- a/service/synthetics/api_op_GetCanary.go +++ b/service/synthetics/api_op_GetCanary.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetCanaryMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCanaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_GetCanaryRuns.go b/service/synthetics/api_op_GetCanaryRuns.go index c12b48e92a0..08750f76145 100644 --- a/service/synthetics/api_op_GetCanaryRuns.go +++ b/service/synthetics/api_op_GetCanaryRuns.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetCanaryRunsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCanaryRunsValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationGetCanaryRunsMiddlewares(stack *middleware.Stack, o return nil } -// GetCanaryRunsAPIClient is a client that implements the GetCanaryRuns operation. -type GetCanaryRunsAPIClient interface { - GetCanaryRuns(context.Context, *GetCanaryRunsInput, ...func(*Options)) (*GetCanaryRunsOutput, error) -} - -var _ GetCanaryRunsAPIClient = (*Client)(nil) - // GetCanaryRunsPaginatorOptions is the paginator options for GetCanaryRuns type GetCanaryRunsPaginatorOptions struct { // Specify this parameter to limit how many runs are returned each time you use @@ -218,6 +214,9 @@ func (p *GetCanaryRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetCanaryRuns(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -237,6 +236,13 @@ func (p *GetCanaryRunsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetCanaryRunsAPIClient is a client that implements the GetCanaryRuns operation. +type GetCanaryRunsAPIClient interface { + GetCanaryRuns(context.Context, *GetCanaryRunsInput, ...func(*Options)) (*GetCanaryRunsOutput, error) +} + +var _ GetCanaryRunsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetCanaryRuns(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_GetGroup.go b/service/synthetics/api_op_GetGroup.go index 25ce3dd7dd8..93192dd2074 100644 --- a/service/synthetics/api_op_GetGroup.go +++ b/service/synthetics/api_op_GetGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_ListAssociatedGroups.go b/service/synthetics/api_op_ListAssociatedGroups.go index f55fe74391f..0efb8d240b5 100644 --- a/service/synthetics/api_op_ListAssociatedGroups.go +++ b/service/synthetics/api_op_ListAssociatedGroups.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListAssociatedGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssociatedGroupsValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListAssociatedGroupsMiddlewares(stack *middleware.S return nil } -// ListAssociatedGroupsAPIClient is a client that implements the -// ListAssociatedGroups operation. -type ListAssociatedGroupsAPIClient interface { - ListAssociatedGroups(context.Context, *ListAssociatedGroupsInput, ...func(*Options)) (*ListAssociatedGroupsOutput, error) -} - -var _ ListAssociatedGroupsAPIClient = (*Client)(nil) - // ListAssociatedGroupsPaginatorOptions is the paginator options for // ListAssociatedGroups type ListAssociatedGroupsPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListAssociatedGroupsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssociatedGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListAssociatedGroupsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListAssociatedGroupsAPIClient is a client that implements the +// ListAssociatedGroups operation. +type ListAssociatedGroupsAPIClient interface { + ListAssociatedGroups(context.Context, *ListAssociatedGroupsInput, ...func(*Options)) (*ListAssociatedGroupsOutput, error) +} + +var _ ListAssociatedGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssociatedGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_ListGroupResources.go b/service/synthetics/api_op_ListGroupResources.go index a147c0678e2..5d45a5d8dd7 100644 --- a/service/synthetics/api_op_ListGroupResources.go +++ b/service/synthetics/api_op_ListGroupResources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListGroupResourcesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupResourcesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListGroupResourcesMiddlewares(stack *middleware.Sta return nil } -// ListGroupResourcesAPIClient is a client that implements the ListGroupResources -// operation. -type ListGroupResourcesAPIClient interface { - ListGroupResources(context.Context, *ListGroupResourcesInput, ...func(*Options)) (*ListGroupResourcesOutput, error) -} - -var _ ListGroupResourcesAPIClient = (*Client)(nil) - // ListGroupResourcesPaginatorOptions is the paginator options for // ListGroupResources type ListGroupResourcesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListGroupResourcesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListGroupResourcesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListGroupResourcesAPIClient is a client that implements the ListGroupResources +// operation. +type ListGroupResourcesAPIClient interface { + ListGroupResources(context.Context, *ListGroupResourcesInput, ...func(*Options)) (*ListGroupResourcesOutput, error) +} + +var _ ListGroupResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_ListGroups.go b/service/synthetics/api_op_ListGroups.go index 3496b902db1..e6560b1c54e 100644 --- a/service/synthetics/api_op_ListGroups.go +++ b/service/synthetics/api_op_ListGroups.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGroups(options.Region), middleware.Before); err != nil { return err } @@ -135,13 +138,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // Specify this parameter to limit how many groups are returned each time you use @@ -206,6 +202,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/synthetics/api_op_ListTagsForResource.go b/service/synthetics/api_op_ListTagsForResource.go index 2ae4b0dae45..d179589a524 100644 --- a/service/synthetics/api_op_ListTagsForResource.go +++ b/service/synthetics/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_StartCanary.go b/service/synthetics/api_op_StartCanary.go index 1212ab7e320..7638154fd4b 100644 --- a/service/synthetics/api_op_StartCanary.go +++ b/service/synthetics/api_op_StartCanary.go @@ -107,6 +107,9 @@ func (c *Client) addOperationStartCanaryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCanaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_StopCanary.go b/service/synthetics/api_op_StopCanary.go index c5363d4a4ba..04b4bce45a9 100644 --- a/service/synthetics/api_op_StopCanary.go +++ b/service/synthetics/api_op_StopCanary.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopCanaryMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopCanaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_TagResource.go b/service/synthetics/api_op_TagResource.go index d360d22d43b..738fceea54b 100644 --- a/service/synthetics/api_op_TagResource.go +++ b/service/synthetics/api_op_TagResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_UntagResource.go b/service/synthetics/api_op_UntagResource.go index 10a89e9f1a7..563a1e10ca9 100644 --- a/service/synthetics/api_op_UntagResource.go +++ b/service/synthetics/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/synthetics/api_op_UpdateCanary.go b/service/synthetics/api_op_UpdateCanary.go index f79f5a1026a..9c621ac2277 100644 --- a/service/synthetics/api_op_UpdateCanary.go +++ b/service/synthetics/api_op_UpdateCanary.go @@ -187,6 +187,9 @@ func (c *Client) addOperationUpdateCanaryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCanaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/taxsettings/api_client.go b/service/taxsettings/api_client.go index 26d6b056406..d1c2c34287c 100644 --- a/service/taxsettings/api_client.go +++ b/service/taxsettings/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/taxsettings/api_op_BatchDeleteTaxRegistration.go b/service/taxsettings/api_op_BatchDeleteTaxRegistration.go index 5d55ede6f67..839f1a8c9a8 100644 --- a/service/taxsettings/api_op_BatchDeleteTaxRegistration.go +++ b/service/taxsettings/api_op_BatchDeleteTaxRegistration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationBatchDeleteTaxRegistrationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchDeleteTaxRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/taxsettings/api_op_BatchPutTaxRegistration.go b/service/taxsettings/api_op_BatchPutTaxRegistration.go index 74c26e65fbb..7674f0ba4dc 100644 --- a/service/taxsettings/api_op_BatchPutTaxRegistration.go +++ b/service/taxsettings/api_op_BatchPutTaxRegistration.go @@ -245,6 +245,9 @@ func (c *Client) addOperationBatchPutTaxRegistrationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchPutTaxRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/taxsettings/api_op_DeleteTaxRegistration.go b/service/taxsettings/api_op_DeleteTaxRegistration.go index 183d405f952..8a20160eaba 100644 --- a/service/taxsettings/api_op_DeleteTaxRegistration.go +++ b/service/taxsettings/api_op_DeleteTaxRegistration.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteTaxRegistrationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTaxRegistration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/taxsettings/api_op_GetTaxRegistration.go b/service/taxsettings/api_op_GetTaxRegistration.go index 2ae3664dc5b..34cffc8b7f1 100644 --- a/service/taxsettings/api_op_GetTaxRegistration.go +++ b/service/taxsettings/api_op_GetTaxRegistration.go @@ -104,6 +104,9 @@ func (c *Client) addOperationGetTaxRegistrationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTaxRegistration(options.Region), middleware.Before); err != nil { return err } diff --git a/service/taxsettings/api_op_GetTaxRegistrationDocument.go b/service/taxsettings/api_op_GetTaxRegistrationDocument.go index d84922f58f9..ffd5eb88cba 100644 --- a/service/taxsettings/api_op_GetTaxRegistrationDocument.go +++ b/service/taxsettings/api_op_GetTaxRegistrationDocument.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetTaxRegistrationDocumentMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTaxRegistrationDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/taxsettings/api_op_ListTaxRegistrations.go b/service/taxsettings/api_op_ListTaxRegistrations.go index e140bd01a7a..a4a9ffb1061 100644 --- a/service/taxsettings/api_op_ListTaxRegistrations.go +++ b/service/taxsettings/api_op_ListTaxRegistrations.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListTaxRegistrationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTaxRegistrations(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListTaxRegistrationsMiddlewares(stack *middleware.S return nil } -// ListTaxRegistrationsAPIClient is a client that implements the -// ListTaxRegistrations operation. -type ListTaxRegistrationsAPIClient interface { - ListTaxRegistrations(context.Context, *ListTaxRegistrationsInput, ...func(*Options)) (*ListTaxRegistrationsOutput, error) -} - -var _ ListTaxRegistrationsAPIClient = (*Client)(nil) - // ListTaxRegistrationsPaginatorOptions is the paginator options for // ListTaxRegistrations type ListTaxRegistrationsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListTaxRegistrationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTaxRegistrations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListTaxRegistrationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListTaxRegistrationsAPIClient is a client that implements the +// ListTaxRegistrations operation. +type ListTaxRegistrationsAPIClient interface { + ListTaxRegistrations(context.Context, *ListTaxRegistrationsInput, ...func(*Options)) (*ListTaxRegistrationsOutput, error) +} + +var _ ListTaxRegistrationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTaxRegistrations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/taxsettings/api_op_PutTaxRegistration.go b/service/taxsettings/api_op_PutTaxRegistration.go index 706e88c1eaf..41522aef9fd 100644 --- a/service/taxsettings/api_op_PutTaxRegistration.go +++ b/service/taxsettings/api_op_PutTaxRegistration.go @@ -235,6 +235,9 @@ func (c *Client) addOperationPutTaxRegistrationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutTaxRegistrationValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_client.go b/service/textract/api_client.go index cc064d26120..0c31d1b8545 100644 --- a/service/textract/api_client.go +++ b/service/textract/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/textract/api_op_AnalyzeDocument.go b/service/textract/api_op_AnalyzeDocument.go index cdff51e0c67..65ef4684f73 100644 --- a/service/textract/api_op_AnalyzeDocument.go +++ b/service/textract/api_op_AnalyzeDocument.go @@ -183,6 +183,9 @@ func (c *Client) addOperationAnalyzeDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAnalyzeDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_AnalyzeExpense.go b/service/textract/api_op_AnalyzeExpense.go index 7696ab1ed75..b5884eb54b3 100644 --- a/service/textract/api_op_AnalyzeExpense.go +++ b/service/textract/api_op_AnalyzeExpense.go @@ -138,6 +138,9 @@ func (c *Client) addOperationAnalyzeExpenseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAnalyzeExpenseValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_AnalyzeID.go b/service/textract/api_op_AnalyzeID.go index 3b25e38f62d..5855a8e55d5 100644 --- a/service/textract/api_op_AnalyzeID.go +++ b/service/textract/api_op_AnalyzeID.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAnalyzeIDMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAnalyzeIDValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_CreateAdapter.go b/service/textract/api_op_CreateAdapter.go index 52f9fe3df1f..9f092b89178 100644 --- a/service/textract/api_op_CreateAdapter.go +++ b/service/textract/api_op_CreateAdapter.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateAdapterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAdapterMiddleware(stack, options); err != nil { return err } diff --git a/service/textract/api_op_CreateAdapterVersion.go b/service/textract/api_op_CreateAdapterVersion.go index 8356374e7b9..a387b37172d 100644 --- a/service/textract/api_op_CreateAdapterVersion.go +++ b/service/textract/api_op_CreateAdapterVersion.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateAdapterVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAdapterVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/textract/api_op_DeleteAdapter.go b/service/textract/api_op_DeleteAdapter.go index 20922422319..f4042f05ef7 100644 --- a/service/textract/api_op_DeleteAdapter.go +++ b/service/textract/api_op_DeleteAdapter.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAdapterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAdapterValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_DeleteAdapterVersion.go b/service/textract/api_op_DeleteAdapterVersion.go index 384e2585887..f67e75bb36f 100644 --- a/service/textract/api_op_DeleteAdapterVersion.go +++ b/service/textract/api_op_DeleteAdapterVersion.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAdapterVersionMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAdapterVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_DetectDocumentText.go b/service/textract/api_op_DetectDocumentText.go index 2b8a8be1290..79d00bc8895 100644 --- a/service/textract/api_op_DetectDocumentText.go +++ b/service/textract/api_op_DetectDocumentText.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDetectDocumentTextMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDetectDocumentTextValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetAdapter.go b/service/textract/api_op_GetAdapter.go index 086226c35fe..8ab765ed74d 100644 --- a/service/textract/api_op_GetAdapter.go +++ b/service/textract/api_op_GetAdapter.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetAdapterMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAdapterValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetAdapterVersion.go b/service/textract/api_op_GetAdapterVersion.go index cabb5295ee6..90b03d207f5 100644 --- a/service/textract/api_op_GetAdapterVersion.go +++ b/service/textract/api_op_GetAdapterVersion.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetAdapterVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAdapterVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetDocumentAnalysis.go b/service/textract/api_op_GetDocumentAnalysis.go index 67a6211394d..a2ea9a26839 100644 --- a/service/textract/api_op_GetDocumentAnalysis.go +++ b/service/textract/api_op_GetDocumentAnalysis.go @@ -193,6 +193,9 @@ func (c *Client) addOperationGetDocumentAnalysisMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetDocumentTextDetection.go b/service/textract/api_op_GetDocumentTextDetection.go index 86d73daf658..47a1a448ca1 100644 --- a/service/textract/api_op_GetDocumentTextDetection.go +++ b/service/textract/api_op_GetDocumentTextDetection.go @@ -170,6 +170,9 @@ func (c *Client) addOperationGetDocumentTextDetectionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentTextDetectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetExpenseAnalysis.go b/service/textract/api_op_GetExpenseAnalysis.go index 79bcd60b237..ee074570ab7 100644 --- a/service/textract/api_op_GetExpenseAnalysis.go +++ b/service/textract/api_op_GetExpenseAnalysis.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetExpenseAnalysisMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetExpenseAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetLendingAnalysis.go b/service/textract/api_op_GetLendingAnalysis.go index b7f555d03b2..4aa2d1c6dcd 100644 --- a/service/textract/api_op_GetLendingAnalysis.go +++ b/service/textract/api_op_GetLendingAnalysis.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetLendingAnalysisMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLendingAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_GetLendingAnalysisSummary.go b/service/textract/api_op_GetLendingAnalysisSummary.go index cc07f4d49e3..01e34e9d849 100644 --- a/service/textract/api_op_GetLendingAnalysisSummary.go +++ b/service/textract/api_op_GetLendingAnalysisSummary.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetLendingAnalysisSummaryMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLendingAnalysisSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_ListAdapterVersions.go b/service/textract/api_op_ListAdapterVersions.go index ae95a6bd74f..ebd986a05a7 100644 --- a/service/textract/api_op_ListAdapterVersions.go +++ b/service/textract/api_op_ListAdapterVersions.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListAdapterVersionsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAdapterVersions(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListAdapterVersionsMiddlewares(stack *middleware.St return nil } -// ListAdapterVersionsAPIClient is a client that implements the -// ListAdapterVersions operation. -type ListAdapterVersionsAPIClient interface { - ListAdapterVersions(context.Context, *ListAdapterVersionsInput, ...func(*Options)) (*ListAdapterVersionsOutput, error) -} - -var _ ListAdapterVersionsAPIClient = (*Client)(nil) - // ListAdapterVersionsPaginatorOptions is the paginator options for // ListAdapterVersions type ListAdapterVersionsPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListAdapterVersionsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAdapterVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListAdapterVersionsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListAdapterVersionsAPIClient is a client that implements the +// ListAdapterVersions operation. +type ListAdapterVersionsAPIClient interface { + ListAdapterVersions(context.Context, *ListAdapterVersionsInput, ...func(*Options)) (*ListAdapterVersionsOutput, error) +} + +var _ ListAdapterVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAdapterVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/textract/api_op_ListAdapters.go b/service/textract/api_op_ListAdapters.go index 22cf02b9194..57ee5f015a4 100644 --- a/service/textract/api_op_ListAdapters.go +++ b/service/textract/api_op_ListAdapters.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListAdaptersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAdapters(options.Region), middleware.Before); err != nil { return err } @@ -141,13 +144,6 @@ func (c *Client) addOperationListAdaptersMiddlewares(stack *middleware.Stack, op return nil } -// ListAdaptersAPIClient is a client that implements the ListAdapters operation. -type ListAdaptersAPIClient interface { - ListAdapters(context.Context, *ListAdaptersInput, ...func(*Options)) (*ListAdaptersOutput, error) -} - -var _ ListAdaptersAPIClient = (*Client)(nil) - // ListAdaptersPaginatorOptions is the paginator options for ListAdapters type ListAdaptersPaginatorOptions struct { // The maximum number of results to return when listing adapters. @@ -211,6 +207,9 @@ func (p *ListAdaptersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAdapters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListAdaptersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAdaptersAPIClient is a client that implements the ListAdapters operation. +type ListAdaptersAPIClient interface { + ListAdapters(context.Context, *ListAdaptersInput, ...func(*Options)) (*ListAdaptersOutput, error) +} + +var _ ListAdaptersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAdapters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/textract/api_op_ListTagsForResource.go b/service/textract/api_op_ListTagsForResource.go index f7cd974182c..185905eb6b2 100644 --- a/service/textract/api_op_ListTagsForResource.go +++ b/service/textract/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_StartDocumentAnalysis.go b/service/textract/api_op_StartDocumentAnalysis.go index 3fb23ac9387..154f936b168 100644 --- a/service/textract/api_op_StartDocumentAnalysis.go +++ b/service/textract/api_op_StartDocumentAnalysis.go @@ -170,6 +170,9 @@ func (c *Client) addOperationStartDocumentAnalysisMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDocumentAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_StartDocumentTextDetection.go b/service/textract/api_op_StartDocumentTextDetection.go index 59ffc4dce92..edc64720817 100644 --- a/service/textract/api_op_StartDocumentTextDetection.go +++ b/service/textract/api_op_StartDocumentTextDetection.go @@ -154,6 +154,9 @@ func (c *Client) addOperationStartDocumentTextDetectionMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDocumentTextDetectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_StartExpenseAnalysis.go b/service/textract/api_op_StartExpenseAnalysis.go index 073fc7a543b..60a4b4314f9 100644 --- a/service/textract/api_op_StartExpenseAnalysis.go +++ b/service/textract/api_op_StartExpenseAnalysis.go @@ -155,6 +155,9 @@ func (c *Client) addOperationStartExpenseAnalysisMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartExpenseAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_StartLendingAnalysis.go b/service/textract/api_op_StartLendingAnalysis.go index c3120cf1c75..e6c7330d9d0 100644 --- a/service/textract/api_op_StartLendingAnalysis.go +++ b/service/textract/api_op_StartLendingAnalysis.go @@ -187,6 +187,9 @@ func (c *Client) addOperationStartLendingAnalysisMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartLendingAnalysisValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_TagResource.go b/service/textract/api_op_TagResource.go index f32642aaf95..5898f562ae7 100644 --- a/service/textract/api_op_TagResource.go +++ b/service/textract/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_UntagResource.go b/service/textract/api_op_UntagResource.go index ee3a90abca7..1143926deae 100644 --- a/service/textract/api_op_UntagResource.go +++ b/service/textract/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/textract/api_op_UpdateAdapter.go b/service/textract/api_op_UpdateAdapter.go index 6644d55c642..a793479e299 100644 --- a/service/textract/api_op_UpdateAdapter.go +++ b/service/textract/api_op_UpdateAdapter.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateAdapterMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAdapterValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_client.go b/service/timestreaminfluxdb/api_client.go index 98168149159..b5013fcab2a 100644 --- a/service/timestreaminfluxdb/api_client.go +++ b/service/timestreaminfluxdb/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/timestreaminfluxdb/api_op_CreateDbInstance.go b/service/timestreaminfluxdb/api_op_CreateDbInstance.go index d3a01d70fc3..e4ab25498b6 100644 --- a/service/timestreaminfluxdb/api_op_CreateDbInstance.go +++ b/service/timestreaminfluxdb/api_op_CreateDbInstance.go @@ -249,6 +249,9 @@ func (c *Client) addOperationCreateDbInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_CreateDbParameterGroup.go b/service/timestreaminfluxdb/api_op_CreateDbParameterGroup.go index d43928bda78..c9f882419e4 100644 --- a/service/timestreaminfluxdb/api_op_CreateDbParameterGroup.go +++ b/service/timestreaminfluxdb/api_op_CreateDbParameterGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateDbParameterGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDbParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_DeleteDbInstance.go b/service/timestreaminfluxdb/api_op_DeleteDbInstance.go index c639d75317e..70174a6d04e 100644 --- a/service/timestreaminfluxdb/api_op_DeleteDbInstance.go +++ b/service/timestreaminfluxdb/api_op_DeleteDbInstance.go @@ -168,6 +168,9 @@ func (c *Client) addOperationDeleteDbInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_GetDbInstance.go b/service/timestreaminfluxdb/api_op_GetDbInstance.go index 6ccdd213321..61abcbf5ecd 100644 --- a/service/timestreaminfluxdb/api_op_GetDbInstance.go +++ b/service/timestreaminfluxdb/api_op_GetDbInstance.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetDbInstanceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_GetDbParameterGroup.go b/service/timestreaminfluxdb/api_op_GetDbParameterGroup.go index a902b8c7df3..efb65f707bd 100644 --- a/service/timestreaminfluxdb/api_op_GetDbParameterGroup.go +++ b/service/timestreaminfluxdb/api_op_GetDbParameterGroup.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetDbParameterGroupMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDbParameterGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_ListDbInstances.go b/service/timestreaminfluxdb/api_op_ListDbInstances.go index 836b1b50c5c..f4cafaa7c55 100644 --- a/service/timestreaminfluxdb/api_op_ListDbInstances.go +++ b/service/timestreaminfluxdb/api_op_ListDbInstances.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDbInstancesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDbInstances(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListDbInstancesMiddlewares(stack *middleware.Stack, return nil } -// ListDbInstancesAPIClient is a client that implements the ListDbInstances -// operation. -type ListDbInstancesAPIClient interface { - ListDbInstances(context.Context, *ListDbInstancesInput, ...func(*Options)) (*ListDbInstancesOutput, error) -} - -var _ ListDbInstancesAPIClient = (*Client)(nil) - // ListDbInstancesPaginatorOptions is the paginator options for ListDbInstances type ListDbInstancesPaginatorOptions struct { // The maximum number of items to return in the output. If the total number of @@ -212,6 +207,9 @@ func (p *ListDbInstancesPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDbInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListDbInstancesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListDbInstancesAPIClient is a client that implements the ListDbInstances +// operation. +type ListDbInstancesAPIClient interface { + ListDbInstances(context.Context, *ListDbInstancesInput, ...func(*Options)) (*ListDbInstancesOutput, error) +} + +var _ ListDbInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDbInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreaminfluxdb/api_op_ListDbParameterGroups.go b/service/timestreaminfluxdb/api_op_ListDbParameterGroups.go index a28bf43b947..9eaef3c9a30 100644 --- a/service/timestreaminfluxdb/api_op_ListDbParameterGroups.go +++ b/service/timestreaminfluxdb/api_op_ListDbParameterGroups.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListDbParameterGroupsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDbParameterGroups(options.Region), middleware.Before); err != nil { return err } @@ -138,14 +141,6 @@ func (c *Client) addOperationListDbParameterGroupsMiddlewares(stack *middleware. return nil } -// ListDbParameterGroupsAPIClient is a client that implements the -// ListDbParameterGroups operation. -type ListDbParameterGroupsAPIClient interface { - ListDbParameterGroups(context.Context, *ListDbParameterGroupsInput, ...func(*Options)) (*ListDbParameterGroupsOutput, error) -} - -var _ ListDbParameterGroupsAPIClient = (*Client)(nil) - // ListDbParameterGroupsPaginatorOptions is the paginator options for // ListDbParameterGroups type ListDbParameterGroupsPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListDbParameterGroupsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDbParameterGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListDbParameterGroupsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListDbParameterGroupsAPIClient is a client that implements the +// ListDbParameterGroups operation. +type ListDbParameterGroupsAPIClient interface { + ListDbParameterGroups(context.Context, *ListDbParameterGroupsInput, ...func(*Options)) (*ListDbParameterGroupsOutput, error) +} + +var _ ListDbParameterGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDbParameterGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreaminfluxdb/api_op_ListTagsForResource.go b/service/timestreaminfluxdb/api_op_ListTagsForResource.go index da7738f9faf..0697a4e30a8 100644 --- a/service/timestreaminfluxdb/api_op_ListTagsForResource.go +++ b/service/timestreaminfluxdb/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_TagResource.go b/service/timestreaminfluxdb/api_op_TagResource.go index c5938d44c64..9df46f7ef9a 100644 --- a/service/timestreaminfluxdb/api_op_TagResource.go +++ b/service/timestreaminfluxdb/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_UntagResource.go b/service/timestreaminfluxdb/api_op_UntagResource.go index 2d0bd8d03b6..234a21e0223 100644 --- a/service/timestreaminfluxdb/api_op_UntagResource.go +++ b/service/timestreaminfluxdb/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreaminfluxdb/api_op_UpdateDbInstance.go b/service/timestreaminfluxdb/api_op_UpdateDbInstance.go index 9f5ae9c043c..b922f9ef39c 100644 --- a/service/timestreaminfluxdb/api_op_UpdateDbInstance.go +++ b/service/timestreaminfluxdb/api_op_UpdateDbInstance.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateDbInstanceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDbInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_client.go b/service/timestreamquery/api_client.go index 165ea87ccc3..bdc4c62fb99 100644 --- a/service/timestreamquery/api_client.go +++ b/service/timestreamquery/api_client.go @@ -466,6 +466,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -654,6 +678,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/timestreamquery/api_op_CancelQuery.go b/service/timestreamquery/api_op_CancelQuery.go index 1ebce9626fc..c5b3768c8c8 100644 --- a/service/timestreamquery/api_op_CancelQuery.go +++ b/service/timestreamquery/api_op_CancelQuery.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCancelQueryMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_op_CreateScheduledQuery.go b/service/timestreamquery/api_op_CreateScheduledQuery.go index 562484efb0e..ba1bea4d63e 100644 --- a/service/timestreamquery/api_op_CreateScheduledQuery.go +++ b/service/timestreamquery/api_op_CreateScheduledQuery.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateScheduledQueryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateScheduledQueryMiddleware(stack, options); err != nil { return err } diff --git a/service/timestreamquery/api_op_DeleteScheduledQuery.go b/service/timestreamquery/api_op_DeleteScheduledQuery.go index 354b77a31f2..f4e476f3f8d 100644 --- a/service/timestreamquery/api_op_DeleteScheduledQuery.go +++ b/service/timestreamquery/api_op_DeleteScheduledQuery.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteScheduledQueryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteScheduledQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_op_DescribeAccountSettings.go b/service/timestreamquery/api_op_DescribeAccountSettings.go index 51905def3cb..4e9e3c3be83 100644 --- a/service/timestreamquery/api_op_DescribeAccountSettings.go +++ b/service/timestreamquery/api_op_DescribeAccountSettings.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAccountSettingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/timestreamquery/api_op_DescribeEndpoints.go b/service/timestreamquery/api_op_DescribeEndpoints.go index c47248d9cf9..d6e56bff496 100644 --- a/service/timestreamquery/api_op_DescribeEndpoints.go +++ b/service/timestreamquery/api_op_DescribeEndpoints.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/timestreamquery/api_op_DescribeScheduledQuery.go b/service/timestreamquery/api_op_DescribeScheduledQuery.go index 42fddcb1977..a63bbdf9b7f 100644 --- a/service/timestreamquery/api_op_DescribeScheduledQuery.go +++ b/service/timestreamquery/api_op_DescribeScheduledQuery.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeScheduledQueryMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeScheduledQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_op_ExecuteScheduledQuery.go b/service/timestreamquery/api_op_ExecuteScheduledQuery.go index 79d73ebfb0e..81f1b00cec0 100644 --- a/service/timestreamquery/api_op_ExecuteScheduledQuery.go +++ b/service/timestreamquery/api_op_ExecuteScheduledQuery.go @@ -114,6 +114,9 @@ func (c *Client) addOperationExecuteScheduledQueryMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opExecuteScheduledQueryMiddleware(stack, options); err != nil { return err } diff --git a/service/timestreamquery/api_op_ListScheduledQueries.go b/service/timestreamquery/api_op_ListScheduledQueries.go index b5c6c265411..51ba63d02f8 100644 --- a/service/timestreamquery/api_op_ListScheduledQueries.go +++ b/service/timestreamquery/api_op_ListScheduledQueries.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListScheduledQueriesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledQueries(options.Region), middleware.Before); err != nil { return err } @@ -142,66 +145,6 @@ func (c *Client) addOperationListScheduledQueriesMiddlewares(stack *middleware.S return nil } -func addOpListScheduledQueriesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery - }, - }, - DiscoverOperation: c.fetchOpListScheduledQueriesDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: true, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ListScheduledQueriesInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("Timestream Query.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - if err != nil { - return internalEndpointDiscovery.WeightedAddress{}, err - } - - weighted, ok := endpoint.GetValidAddress() - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") - } - return weighted, nil -} - -// ListScheduledQueriesAPIClient is a client that implements the -// ListScheduledQueries operation. -type ListScheduledQueriesAPIClient interface { - ListScheduledQueries(context.Context, *ListScheduledQueriesInput, ...func(*Options)) (*ListScheduledQueriesOutput, error) -} - -var _ ListScheduledQueriesAPIClient = (*Client)(nil) - // ListScheduledQueriesPaginatorOptions is the paginator options for // ListScheduledQueries type ListScheduledQueriesPaginatorOptions struct { @@ -269,6 +212,9 @@ func (p *ListScheduledQueriesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListScheduledQueries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +234,66 @@ func (p *ListScheduledQueriesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +func addOpListScheduledQueriesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListScheduledQueriesDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpListScheduledQueriesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ListScheduledQueriesInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListScheduledQueriesAPIClient is a client that implements the +// ListScheduledQueries operation. +type ListScheduledQueriesAPIClient interface { + ListScheduledQueries(context.Context, *ListScheduledQueriesInput, ...func(*Options)) (*ListScheduledQueriesOutput, error) +} + +var _ ListScheduledQueriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListScheduledQueries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreamquery/api_op_ListTagsForResource.go b/service/timestreamquery/api_op_ListTagsForResource.go index d08ddd26070..df8d2f1aaaf 100644 --- a/service/timestreamquery/api_op_ListTagsForResource.go +++ b/service/timestreamquery/api_op_ListTagsForResource.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -147,66 +150,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -func addOpListTagsForResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery - }, - }, - DiscoverOperation: c.fetchOpListTagsForResourceDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: true, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ListTagsForResourceInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("Timestream Query.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - if err != nil { - return internalEndpointDiscovery.WeightedAddress{}, err - } - - weighted, ok := endpoint.GetValidAddress() - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") - } - return weighted, nil -} - -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -271,6 +214,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +236,66 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +func addOpListTagsForResourceDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListTagsForResourceDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpListTagsForResourceDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ListTagsForResourceInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreamquery/api_op_PrepareQuery.go b/service/timestreamquery/api_op_PrepareQuery.go index e0261b46808..c2ae2c1136c 100644 --- a/service/timestreamquery/api_op_PrepareQuery.go +++ b/service/timestreamquery/api_op_PrepareQuery.go @@ -131,6 +131,9 @@ func (c *Client) addOperationPrepareQueryMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPrepareQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_op_Query.go b/service/timestreamquery/api_op_Query.go index 70ec6567f0d..5fae2f309df 100644 --- a/service/timestreamquery/api_op_Query.go +++ b/service/timestreamquery/api_op_Query.go @@ -223,6 +223,9 @@ func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options O if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opQueryMiddleware(stack, options); err != nil { return err } @@ -250,65 +253,6 @@ func (c *Client) addOperationQueryMiddlewares(stack *middleware.Stack, options O return nil } -func addOpQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery - }, - }, - DiscoverOperation: c.fetchOpQueryDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: true, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*QueryInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("Timestream Query.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - if err != nil { - return internalEndpointDiscovery.WeightedAddress{}, err - } - - weighted, ok := endpoint.GetValidAddress() - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") - } - return weighted, nil -} - -// QueryAPIClient is a client that implements the Query operation. -type QueryAPIClient interface { - Query(context.Context, *QueryInput, ...func(*Options)) (*QueryOutput, error) -} - -var _ QueryAPIClient = (*Client)(nil) - // QueryPaginatorOptions is the paginator options for Query type QueryPaginatorOptions struct { // The total number of rows to be returned in the Query output. The initial run @@ -387,6 +331,9 @@ func (p *QueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) } params.MaxRows = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.Query(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -406,6 +353,65 @@ func (p *QueryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) return result, nil } +func addOpQueryDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpQueryDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpQueryDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*QueryInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("Timestream Query.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// QueryAPIClient is a client that implements the Query operation. +type QueryAPIClient interface { + Query(context.Context, *QueryInput, ...func(*Options)) (*QueryOutput, error) +} + +var _ QueryAPIClient = (*Client)(nil) + type idempotencyToken_initializeOpQuery struct { tokenProvider IdempotencyTokenProvider } diff --git a/service/timestreamquery/api_op_TagResource.go b/service/timestreamquery/api_op_TagResource.go index b1b29bd7956..2dec15c6c7b 100644 --- a/service/timestreamquery/api_op_TagResource.go +++ b/service/timestreamquery/api_op_TagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_op_UntagResource.go b/service/timestreamquery/api_op_UntagResource.go index e06047edbdf..dcc7df40193 100644 --- a/service/timestreamquery/api_op_UntagResource.go +++ b/service/timestreamquery/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamquery/api_op_UpdateAccountSettings.go b/service/timestreamquery/api_op_UpdateAccountSettings.go index aa8dd044bc4..79b90ab45e1 100644 --- a/service/timestreamquery/api_op_UpdateAccountSettings.go +++ b/service/timestreamquery/api_op_UpdateAccountSettings.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateAccountSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/timestreamquery/api_op_UpdateScheduledQuery.go b/service/timestreamquery/api_op_UpdateScheduledQuery.go index cff2138581e..52c7ba462ef 100644 --- a/service/timestreamquery/api_op_UpdateScheduledQuery.go +++ b/service/timestreamquery/api_op_UpdateScheduledQuery.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateScheduledQueryMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateScheduledQueryValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_client.go b/service/timestreamwrite/api_client.go index c5603471ed8..c7cde484f16 100644 --- a/service/timestreamwrite/api_client.go +++ b/service/timestreamwrite/api_client.go @@ -466,6 +466,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -654,6 +678,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/timestreamwrite/api_op_CreateBatchLoadTask.go b/service/timestreamwrite/api_op_CreateBatchLoadTask.go index 8443d025e75..3fa6b3ca7ef 100644 --- a/service/timestreamwrite/api_op_CreateBatchLoadTask.go +++ b/service/timestreamwrite/api_op_CreateBatchLoadTask.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateBatchLoadTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateBatchLoadTaskMiddleware(stack, options); err != nil { return err } diff --git a/service/timestreamwrite/api_op_CreateDatabase.go b/service/timestreamwrite/api_op_CreateDatabase.go index 1ed408e51dc..dbd0acd4283 100644 --- a/service/timestreamwrite/api_op_CreateDatabase.go +++ b/service/timestreamwrite/api_op_CreateDatabase.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateDatabaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_CreateTable.go b/service/timestreamwrite/api_op_CreateTable.go index 89f95fb86a0..2d8849797ae 100644 --- a/service/timestreamwrite/api_op_CreateTable.go +++ b/service/timestreamwrite/api_op_CreateTable.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_DeleteDatabase.go b/service/timestreamwrite/api_op_DeleteDatabase.go index 1b2e8060693..36cbd357246 100644 --- a/service/timestreamwrite/api_op_DeleteDatabase.go +++ b/service/timestreamwrite/api_op_DeleteDatabase.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteDatabaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_DeleteTable.go b/service/timestreamwrite/api_op_DeleteTable.go index 9b0182d7ce0..48f1be65eb4 100644 --- a/service/timestreamwrite/api_op_DeleteTable.go +++ b/service/timestreamwrite/api_op_DeleteTable.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_DescribeBatchLoadTask.go b/service/timestreamwrite/api_op_DescribeBatchLoadTask.go index d837272353e..bf3217573c7 100644 --- a/service/timestreamwrite/api_op_DescribeBatchLoadTask.go +++ b/service/timestreamwrite/api_op_DescribeBatchLoadTask.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeBatchLoadTaskMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBatchLoadTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_DescribeDatabase.go b/service/timestreamwrite/api_op_DescribeDatabase.go index 994aaa0f01f..14874b4cd66 100644 --- a/service/timestreamwrite/api_op_DescribeDatabase.go +++ b/service/timestreamwrite/api_op_DescribeDatabase.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeDatabaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_DescribeEndpoints.go b/service/timestreamwrite/api_op_DescribeEndpoints.go index a55e6dd0d30..320cbd0429d 100644 --- a/service/timestreamwrite/api_op_DescribeEndpoints.go +++ b/service/timestreamwrite/api_op_DescribeEndpoints.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeEndpointsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEndpoints(options.Region), middleware.Before); err != nil { return err } diff --git a/service/timestreamwrite/api_op_DescribeTable.go b/service/timestreamwrite/api_op_DescribeTable.go index 1d0b3404e08..60e7b1bc559 100644 --- a/service/timestreamwrite/api_op_DescribeTable.go +++ b/service/timestreamwrite/api_op_DescribeTable.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeTableMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_ListBatchLoadTasks.go b/service/timestreamwrite/api_op_ListBatchLoadTasks.go index 289cf9d1e21..03bb7099a7f 100644 --- a/service/timestreamwrite/api_op_ListBatchLoadTasks.go +++ b/service/timestreamwrite/api_op_ListBatchLoadTasks.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListBatchLoadTasksMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBatchLoadTasks(options.Region), middleware.Before); err != nil { return err } @@ -146,66 +149,6 @@ func (c *Client) addOperationListBatchLoadTasksMiddlewares(stack *middleware.Sta return nil } -func addOpListBatchLoadTasksDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery - }, - }, - DiscoverOperation: c.fetchOpListBatchLoadTasksDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: true, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpListBatchLoadTasksDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ListBatchLoadTasksInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("Timestream Write.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - if err != nil { - return internalEndpointDiscovery.WeightedAddress{}, err - } - - weighted, ok := endpoint.GetValidAddress() - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") - } - return weighted, nil -} - -// ListBatchLoadTasksAPIClient is a client that implements the ListBatchLoadTasks -// operation. -type ListBatchLoadTasksAPIClient interface { - ListBatchLoadTasks(context.Context, *ListBatchLoadTasksInput, ...func(*Options)) (*ListBatchLoadTasksOutput, error) -} - -var _ ListBatchLoadTasksAPIClient = (*Client)(nil) - // ListBatchLoadTasksPaginatorOptions is the paginator options for // ListBatchLoadTasks type ListBatchLoadTasksPaginatorOptions struct { @@ -273,6 +216,9 @@ func (p *ListBatchLoadTasksPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBatchLoadTasks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -292,6 +238,66 @@ func (p *ListBatchLoadTasksPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +func addOpListBatchLoadTasksDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListBatchLoadTasksDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpListBatchLoadTasksDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ListBatchLoadTasksInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("Timestream Write.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListBatchLoadTasksAPIClient is a client that implements the ListBatchLoadTasks +// operation. +type ListBatchLoadTasksAPIClient interface { + ListBatchLoadTasks(context.Context, *ListBatchLoadTasksInput, ...func(*Options)) (*ListBatchLoadTasksOutput, error) +} + +var _ ListBatchLoadTasksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBatchLoadTasks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreamwrite/api_op_ListDatabases.go b/service/timestreamwrite/api_op_ListDatabases.go index 008f7b107f7..a1c939cafe3 100644 --- a/service/timestreamwrite/api_op_ListDatabases.go +++ b/service/timestreamwrite/api_op_ListDatabases.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDatabases(options.Region), middleware.Before); err != nil { return err } @@ -142,65 +145,6 @@ func (c *Client) addOperationListDatabasesMiddlewares(stack *middleware.Stack, o return nil } -func addOpListDatabasesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery - }, - }, - DiscoverOperation: c.fetchOpListDatabasesDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: true, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpListDatabasesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ListDatabasesInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("Timestream Write.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - if err != nil { - return internalEndpointDiscovery.WeightedAddress{}, err - } - - weighted, ok := endpoint.GetValidAddress() - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") - } - return weighted, nil -} - -// ListDatabasesAPIClient is a client that implements the ListDatabases operation. -type ListDatabasesAPIClient interface { - ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) -} - -var _ ListDatabasesAPIClient = (*Client)(nil) - // ListDatabasesPaginatorOptions is the paginator options for ListDatabases type ListDatabasesPaginatorOptions struct { // The total number of items to return in the output. If the total number of items @@ -267,6 +211,9 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDatabases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -286,6 +233,65 @@ func (p *ListDatabasesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +func addOpListDatabasesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListDatabasesDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpListDatabasesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ListDatabasesInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("Timestream Write.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListDatabasesAPIClient is a client that implements the ListDatabases operation. +type ListDatabasesAPIClient interface { + ListDatabases(context.Context, *ListDatabasesInput, ...func(*Options)) (*ListDatabasesOutput, error) +} + +var _ ListDatabasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDatabases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreamwrite/api_op_ListTables.go b/service/timestreamwrite/api_op_ListTables.go index 56c6be01044..397ca724438 100644 --- a/service/timestreamwrite/api_op_ListTables.go +++ b/service/timestreamwrite/api_op_ListTables.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTables(options.Region), middleware.Before); err != nil { return err } @@ -146,65 +149,6 @@ func (c *Client) addOperationListTablesMiddlewares(stack *middleware.Stack, opti return nil } -func addOpListTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { - return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ - Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ - func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { - opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS - opt.Logger = o.Logger - opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery - }, - }, - DiscoverOperation: c.fetchOpListTablesDiscoverEndpoint, - EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, - EndpointDiscoveryRequired: true, - Region: o.Region, - }, "ResolveEndpointV2", middleware.After) -} - -func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { - input := getOperationInput(ctx) - in, ok := input.(*ListTablesInput) - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) - } - _ = in - - identifierMap := make(map[string]string, 0) - identifierMap["sdk#Region"] = region - - key := fmt.Sprintf("Timestream Write.%v", identifierMap) - - if v, ok := c.endpointCache.Get(key); ok { - return v, nil - } - - discoveryOperationInput := &DescribeEndpointsInput{} - - opt := internalEndpointDiscovery.DiscoverEndpointOptions{} - for _, fn := range optFns { - fn(&opt) - } - - endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) - if err != nil { - return internalEndpointDiscovery.WeightedAddress{}, err - } - - weighted, ok := endpoint.GetValidAddress() - if !ok { - return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") - } - return weighted, nil -} - -// ListTablesAPIClient is a client that implements the ListTables operation. -type ListTablesAPIClient interface { - ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) -} - -var _ ListTablesAPIClient = (*Client)(nil) - // ListTablesPaginatorOptions is the paginator options for ListTables type ListTablesPaginatorOptions struct { // The total number of items to return in the output. If the total number of items @@ -271,6 +215,9 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTables(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -290,6 +237,65 @@ func (p *ListTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +func addOpListTablesDiscoverEndpointMiddleware(stack *middleware.Stack, o Options, c *Client) error { + return stack.Finalize.Insert(&internalEndpointDiscovery.DiscoverEndpoint{ + Options: []func(*internalEndpointDiscovery.DiscoverEndpointOptions){ + func(opt *internalEndpointDiscovery.DiscoverEndpointOptions) { + opt.DisableHTTPS = o.EndpointOptions.DisableHTTPS + opt.Logger = o.Logger + opt.EndpointResolverUsedForDiscovery = o.EndpointDiscovery.EndpointResolverUsedForDiscovery + }, + }, + DiscoverOperation: c.fetchOpListTablesDiscoverEndpoint, + EndpointDiscoveryEnableState: o.EndpointDiscovery.EnableEndpointDiscovery, + EndpointDiscoveryRequired: true, + Region: o.Region, + }, "ResolveEndpointV2", middleware.After) +} + +func (c *Client) fetchOpListTablesDiscoverEndpoint(ctx context.Context, region string, optFns ...func(*internalEndpointDiscovery.DiscoverEndpointOptions)) (internalEndpointDiscovery.WeightedAddress, error) { + input := getOperationInput(ctx) + in, ok := input.(*ListTablesInput) + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("unknown input type %T", input) + } + _ = in + + identifierMap := make(map[string]string, 0) + identifierMap["sdk#Region"] = region + + key := fmt.Sprintf("Timestream Write.%v", identifierMap) + + if v, ok := c.endpointCache.Get(key); ok { + return v, nil + } + + discoveryOperationInput := &DescribeEndpointsInput{} + + opt := internalEndpointDiscovery.DiscoverEndpointOptions{} + for _, fn := range optFns { + fn(&opt) + } + + endpoint, err := c.handleEndpointDiscoveryFromService(ctx, discoveryOperationInput, region, key, opt) + if err != nil { + return internalEndpointDiscovery.WeightedAddress{}, err + } + + weighted, ok := endpoint.GetValidAddress() + if !ok { + return internalEndpointDiscovery.WeightedAddress{}, fmt.Errorf("no valid endpoint address returned by the endpoint discovery api") + } + return weighted, nil +} + +// ListTablesAPIClient is a client that implements the ListTables operation. +type ListTablesAPIClient interface { + ListTables(context.Context, *ListTablesInput, ...func(*Options)) (*ListTablesOutput, error) +} + +var _ ListTablesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTables(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/timestreamwrite/api_op_ListTagsForResource.go b/service/timestreamwrite/api_op_ListTagsForResource.go index df94ac18e57..f47ec2e0c86 100644 --- a/service/timestreamwrite/api_op_ListTagsForResource.go +++ b/service/timestreamwrite/api_op_ListTagsForResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_ResumeBatchLoadTask.go b/service/timestreamwrite/api_op_ResumeBatchLoadTask.go index dc4eb634931..aba2dd25ca6 100644 --- a/service/timestreamwrite/api_op_ResumeBatchLoadTask.go +++ b/service/timestreamwrite/api_op_ResumeBatchLoadTask.go @@ -104,6 +104,9 @@ func (c *Client) addOperationResumeBatchLoadTaskMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResumeBatchLoadTaskValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_TagResource.go b/service/timestreamwrite/api_op_TagResource.go index 8932f391bf7..37d6769289a 100644 --- a/service/timestreamwrite/api_op_TagResource.go +++ b/service/timestreamwrite/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_UntagResource.go b/service/timestreamwrite/api_op_UntagResource.go index 1dd4c2542c2..89d02c30887 100644 --- a/service/timestreamwrite/api_op_UntagResource.go +++ b/service/timestreamwrite/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_UpdateDatabase.go b/service/timestreamwrite/api_op_UpdateDatabase.go index 0c3c790d294..a7402af34ff 100644 --- a/service/timestreamwrite/api_op_UpdateDatabase.go +++ b/service/timestreamwrite/api_op_UpdateDatabase.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateDatabaseMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDatabaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_UpdateTable.go b/service/timestreamwrite/api_op_UpdateTable.go index a4028f2fc6b..e22db33e6fd 100644 --- a/service/timestreamwrite/api_op_UpdateTable.go +++ b/service/timestreamwrite/api_op_UpdateTable.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateTableMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTableValidationMiddleware(stack); err != nil { return err } diff --git a/service/timestreamwrite/api_op_WriteRecords.go b/service/timestreamwrite/api_op_WriteRecords.go index f603588326d..7f7f04a409f 100644 --- a/service/timestreamwrite/api_op_WriteRecords.go +++ b/service/timestreamwrite/api_op_WriteRecords.go @@ -171,6 +171,9 @@ func (c *Client) addOperationWriteRecordsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpWriteRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_client.go b/service/tnb/api_client.go index 81cc2ab7f24..7f2774e2d26 100644 --- a/service/tnb/api_client.go +++ b/service/tnb/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/tnb/api_op_CancelSolNetworkOperation.go b/service/tnb/api_op_CancelSolNetworkOperation.go index 1bae73322ad..5a36bdb7b4e 100644 --- a/service/tnb/api_op_CancelSolNetworkOperation.go +++ b/service/tnb/api_op_CancelSolNetworkOperation.go @@ -104,6 +104,9 @@ func (c *Client) addOperationCancelSolNetworkOperationMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCancelSolNetworkOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_CreateSolFunctionPackage.go b/service/tnb/api_op_CreateSolFunctionPackage.go index 1b8aae6d6ae..c48ba2f35e3 100644 --- a/service/tnb/api_op_CreateSolFunctionPackage.go +++ b/service/tnb/api_op_CreateSolFunctionPackage.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateSolFunctionPackageMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSolFunctionPackage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/tnb/api_op_CreateSolNetworkInstance.go b/service/tnb/api_op_CreateSolNetworkInstance.go index d21505d9ecc..1753cd9b7cd 100644 --- a/service/tnb/api_op_CreateSolNetworkInstance.go +++ b/service/tnb/api_op_CreateSolNetworkInstance.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateSolNetworkInstanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSolNetworkInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_CreateSolNetworkPackage.go b/service/tnb/api_op_CreateSolNetworkPackage.go index 536f116ceeb..488852ba057 100644 --- a/service/tnb/api_op_CreateSolNetworkPackage.go +++ b/service/tnb/api_op_CreateSolNetworkPackage.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateSolNetworkPackageMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSolNetworkPackage(options.Region), middleware.Before); err != nil { return err } diff --git a/service/tnb/api_op_DeleteSolFunctionPackage.go b/service/tnb/api_op_DeleteSolFunctionPackage.go index 6c671904279..bcb5d0fef60 100644 --- a/service/tnb/api_op_DeleteSolFunctionPackage.go +++ b/service/tnb/api_op_DeleteSolFunctionPackage.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteSolFunctionPackageMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSolFunctionPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_DeleteSolNetworkInstance.go b/service/tnb/api_op_DeleteSolNetworkInstance.go index 6282c5397d5..9fd154c80cd 100644 --- a/service/tnb/api_op_DeleteSolNetworkInstance.go +++ b/service/tnb/api_op_DeleteSolNetworkInstance.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSolNetworkInstanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSolNetworkInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_DeleteSolNetworkPackage.go b/service/tnb/api_op_DeleteSolNetworkPackage.go index da477042e54..a64ad58a303 100644 --- a/service/tnb/api_op_DeleteSolNetworkPackage.go +++ b/service/tnb/api_op_DeleteSolNetworkPackage.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteSolNetworkPackageMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSolNetworkPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolFunctionInstance.go b/service/tnb/api_op_GetSolFunctionInstance.go index 632422de20e..8a579049e12 100644 --- a/service/tnb/api_op_GetSolFunctionInstance.go +++ b/service/tnb/api_op_GetSolFunctionInstance.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetSolFunctionInstanceMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolFunctionInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolFunctionPackage.go b/service/tnb/api_op_GetSolFunctionPackage.go index ab44503b884..6b629c2e16a 100644 --- a/service/tnb/api_op_GetSolFunctionPackage.go +++ b/service/tnb/api_op_GetSolFunctionPackage.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetSolFunctionPackageMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolFunctionPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolFunctionPackageContent.go b/service/tnb/api_op_GetSolFunctionPackageContent.go index 836f028aacd..d8282cc1032 100644 --- a/service/tnb/api_op_GetSolFunctionPackageContent.go +++ b/service/tnb/api_op_GetSolFunctionPackageContent.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetSolFunctionPackageContentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolFunctionPackageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolFunctionPackageDescriptor.go b/service/tnb/api_op_GetSolFunctionPackageDescriptor.go index 434e680ee58..b8061b1137b 100644 --- a/service/tnb/api_op_GetSolFunctionPackageDescriptor.go +++ b/service/tnb/api_op_GetSolFunctionPackageDescriptor.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetSolFunctionPackageDescriptorMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolFunctionPackageDescriptorValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolNetworkInstance.go b/service/tnb/api_op_GetSolNetworkInstance.go index 04fd9fe24ae..1b0a1d45d70 100644 --- a/service/tnb/api_op_GetSolNetworkInstance.go +++ b/service/tnb/api_op_GetSolNetworkInstance.go @@ -159,6 +159,9 @@ func (c *Client) addOperationGetSolNetworkInstanceMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolNetworkInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolNetworkOperation.go b/service/tnb/api_op_GetSolNetworkOperation.go index 5eee076863f..42ebb217086 100644 --- a/service/tnb/api_op_GetSolNetworkOperation.go +++ b/service/tnb/api_op_GetSolNetworkOperation.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetSolNetworkOperationMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolNetworkOperationValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolNetworkPackage.go b/service/tnb/api_op_GetSolNetworkPackage.go index 586f0acbb2b..b842832db8f 100644 --- a/service/tnb/api_op_GetSolNetworkPackage.go +++ b/service/tnb/api_op_GetSolNetworkPackage.go @@ -167,6 +167,9 @@ func (c *Client) addOperationGetSolNetworkPackageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolNetworkPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolNetworkPackageContent.go b/service/tnb/api_op_GetSolNetworkPackageContent.go index c1cd6b1f717..c7bc6f64a86 100644 --- a/service/tnb/api_op_GetSolNetworkPackageContent.go +++ b/service/tnb/api_op_GetSolNetworkPackageContent.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetSolNetworkPackageContentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolNetworkPackageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_GetSolNetworkPackageDescriptor.go b/service/tnb/api_op_GetSolNetworkPackageDescriptor.go index 4e0e33fca7c..e2f54766c8c 100644 --- a/service/tnb/api_op_GetSolNetworkPackageDescriptor.go +++ b/service/tnb/api_op_GetSolNetworkPackageDescriptor.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetSolNetworkPackageDescriptorMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSolNetworkPackageDescriptorValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_InstantiateSolNetworkInstance.go b/service/tnb/api_op_InstantiateSolNetworkInstance.go index 7196543adc3..7e11392ef59 100644 --- a/service/tnb/api_op_InstantiateSolNetworkInstance.go +++ b/service/tnb/api_op_InstantiateSolNetworkInstance.go @@ -138,6 +138,9 @@ func (c *Client) addOperationInstantiateSolNetworkInstanceMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpInstantiateSolNetworkInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_ListSolFunctionInstances.go b/service/tnb/api_op_ListSolFunctionInstances.go index d7992fff007..a16936208ad 100644 --- a/service/tnb/api_op_ListSolFunctionInstances.go +++ b/service/tnb/api_op_ListSolFunctionInstances.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListSolFunctionInstancesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolFunctionInstances(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListSolFunctionInstancesMiddlewares(stack *middlewa return nil } -// ListSolFunctionInstancesAPIClient is a client that implements the -// ListSolFunctionInstances operation. -type ListSolFunctionInstancesAPIClient interface { - ListSolFunctionInstances(context.Context, *ListSolFunctionInstancesInput, ...func(*Options)) (*ListSolFunctionInstancesOutput, error) -} - -var _ ListSolFunctionInstancesAPIClient = (*Client)(nil) - // ListSolFunctionInstancesPaginatorOptions is the paginator options for // ListSolFunctionInstances type ListSolFunctionInstancesPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListSolFunctionInstancesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolFunctionInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListSolFunctionInstancesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSolFunctionInstancesAPIClient is a client that implements the +// ListSolFunctionInstances operation. +type ListSolFunctionInstancesAPIClient interface { + ListSolFunctionInstances(context.Context, *ListSolFunctionInstancesInput, ...func(*Options)) (*ListSolFunctionInstancesOutput, error) +} + +var _ ListSolFunctionInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolFunctionInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/tnb/api_op_ListSolFunctionPackages.go b/service/tnb/api_op_ListSolFunctionPackages.go index 89c1f6aa303..abf0f1a9cad 100644 --- a/service/tnb/api_op_ListSolFunctionPackages.go +++ b/service/tnb/api_op_ListSolFunctionPackages.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSolFunctionPackagesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolFunctionPackages(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListSolFunctionPackagesMiddlewares(stack *middlewar return nil } -// ListSolFunctionPackagesAPIClient is a client that implements the -// ListSolFunctionPackages operation. -type ListSolFunctionPackagesAPIClient interface { - ListSolFunctionPackages(context.Context, *ListSolFunctionPackagesInput, ...func(*Options)) (*ListSolFunctionPackagesOutput, error) -} - -var _ ListSolFunctionPackagesAPIClient = (*Client)(nil) - // ListSolFunctionPackagesPaginatorOptions is the paginator options for // ListSolFunctionPackages type ListSolFunctionPackagesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListSolFunctionPackagesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolFunctionPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListSolFunctionPackagesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSolFunctionPackagesAPIClient is a client that implements the +// ListSolFunctionPackages operation. +type ListSolFunctionPackagesAPIClient interface { + ListSolFunctionPackages(context.Context, *ListSolFunctionPackagesInput, ...func(*Options)) (*ListSolFunctionPackagesOutput, error) +} + +var _ ListSolFunctionPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolFunctionPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/tnb/api_op_ListSolNetworkInstances.go b/service/tnb/api_op_ListSolNetworkInstances.go index 017e4bb472d..50b984691f6 100644 --- a/service/tnb/api_op_ListSolNetworkInstances.go +++ b/service/tnb/api_op_ListSolNetworkInstances.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListSolNetworkInstancesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolNetworkInstances(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListSolNetworkInstancesMiddlewares(stack *middlewar return nil } -// ListSolNetworkInstancesAPIClient is a client that implements the -// ListSolNetworkInstances operation. -type ListSolNetworkInstancesAPIClient interface { - ListSolNetworkInstances(context.Context, *ListSolNetworkInstancesInput, ...func(*Options)) (*ListSolNetworkInstancesOutput, error) -} - -var _ ListSolNetworkInstancesAPIClient = (*Client)(nil) - // ListSolNetworkInstancesPaginatorOptions is the paginator options for // ListSolNetworkInstances type ListSolNetworkInstancesPaginatorOptions struct { @@ -209,6 +204,9 @@ func (p *ListSolNetworkInstancesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolNetworkInstances(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -228,6 +226,14 @@ func (p *ListSolNetworkInstancesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSolNetworkInstancesAPIClient is a client that implements the +// ListSolNetworkInstances operation. +type ListSolNetworkInstancesAPIClient interface { + ListSolNetworkInstances(context.Context, *ListSolNetworkInstancesInput, ...func(*Options)) (*ListSolNetworkInstancesOutput, error) +} + +var _ ListSolNetworkInstancesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolNetworkInstances(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/tnb/api_op_ListSolNetworkOperations.go b/service/tnb/api_op_ListSolNetworkOperations.go index 5bae2bc22df..c9605e4c228 100644 --- a/service/tnb/api_op_ListSolNetworkOperations.go +++ b/service/tnb/api_op_ListSolNetworkOperations.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListSolNetworkOperationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolNetworkOperations(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListSolNetworkOperationsMiddlewares(stack *middlewa return nil } -// ListSolNetworkOperationsAPIClient is a client that implements the -// ListSolNetworkOperations operation. -type ListSolNetworkOperationsAPIClient interface { - ListSolNetworkOperations(context.Context, *ListSolNetworkOperationsInput, ...func(*Options)) (*ListSolNetworkOperationsOutput, error) -} - -var _ ListSolNetworkOperationsAPIClient = (*Client)(nil) - // ListSolNetworkOperationsPaginatorOptions is the paginator options for // ListSolNetworkOperations type ListSolNetworkOperationsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListSolNetworkOperationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolNetworkOperations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListSolNetworkOperationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListSolNetworkOperationsAPIClient is a client that implements the +// ListSolNetworkOperations operation. +type ListSolNetworkOperationsAPIClient interface { + ListSolNetworkOperations(context.Context, *ListSolNetworkOperationsInput, ...func(*Options)) (*ListSolNetworkOperationsOutput, error) +} + +var _ ListSolNetworkOperationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolNetworkOperations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/tnb/api_op_ListSolNetworkPackages.go b/service/tnb/api_op_ListSolNetworkPackages.go index c805869e590..c455e137ce4 100644 --- a/service/tnb/api_op_ListSolNetworkPackages.go +++ b/service/tnb/api_op_ListSolNetworkPackages.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListSolNetworkPackagesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSolNetworkPackages(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListSolNetworkPackagesMiddlewares(stack *middleware return nil } -// ListSolNetworkPackagesAPIClient is a client that implements the -// ListSolNetworkPackages operation. -type ListSolNetworkPackagesAPIClient interface { - ListSolNetworkPackages(context.Context, *ListSolNetworkPackagesInput, ...func(*Options)) (*ListSolNetworkPackagesOutput, error) -} - -var _ ListSolNetworkPackagesAPIClient = (*Client)(nil) - // ListSolNetworkPackagesPaginatorOptions is the paginator options for // ListSolNetworkPackages type ListSolNetworkPackagesPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListSolNetworkPackagesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSolNetworkPackages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListSolNetworkPackagesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListSolNetworkPackagesAPIClient is a client that implements the +// ListSolNetworkPackages operation. +type ListSolNetworkPackagesAPIClient interface { + ListSolNetworkPackages(context.Context, *ListSolNetworkPackagesInput, ...func(*Options)) (*ListSolNetworkPackagesOutput, error) +} + +var _ ListSolNetworkPackagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSolNetworkPackages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/tnb/api_op_ListTagsForResource.go b/service/tnb/api_op_ListTagsForResource.go index 38e8bc65eb2..19b8d7f439b 100644 --- a/service/tnb/api_op_ListTagsForResource.go +++ b/service/tnb/api_op_ListTagsForResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_PutSolFunctionPackageContent.go b/service/tnb/api_op_PutSolFunctionPackageContent.go index 8045c391bd0..24a7e75854a 100644 --- a/service/tnb/api_op_PutSolFunctionPackageContent.go +++ b/service/tnb/api_op_PutSolFunctionPackageContent.go @@ -146,6 +146,9 @@ func (c *Client) addOperationPutSolFunctionPackageContentMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSolFunctionPackageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_PutSolNetworkPackageContent.go b/service/tnb/api_op_PutSolNetworkPackageContent.go index a410aa16fe9..f0716225b25 100644 --- a/service/tnb/api_op_PutSolNetworkPackageContent.go +++ b/service/tnb/api_op_PutSolNetworkPackageContent.go @@ -150,6 +150,9 @@ func (c *Client) addOperationPutSolNetworkPackageContentMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSolNetworkPackageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_TagResource.go b/service/tnb/api_op_TagResource.go index aa41fa80719..96365300488 100644 --- a/service/tnb/api_op_TagResource.go +++ b/service/tnb/api_op_TagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_TerminateSolNetworkInstance.go b/service/tnb/api_op_TerminateSolNetworkInstance.go index 00bf7768ec1..a388750f094 100644 --- a/service/tnb/api_op_TerminateSolNetworkInstance.go +++ b/service/tnb/api_op_TerminateSolNetworkInstance.go @@ -123,6 +123,9 @@ func (c *Client) addOperationTerminateSolNetworkInstanceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateSolNetworkInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_UntagResource.go b/service/tnb/api_op_UntagResource.go index ff7520853ef..3c548786b27 100644 --- a/service/tnb/api_op_UntagResource.go +++ b/service/tnb/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_UpdateSolFunctionPackage.go b/service/tnb/api_op_UpdateSolFunctionPackage.go index 79a23ea62f1..6a081da8dca 100644 --- a/service/tnb/api_op_UpdateSolFunctionPackage.go +++ b/service/tnb/api_op_UpdateSolFunctionPackage.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateSolFunctionPackageMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSolFunctionPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_UpdateSolNetworkInstance.go b/service/tnb/api_op_UpdateSolNetworkInstance.go index 554a46a2bc5..4f2d3b14743 100644 --- a/service/tnb/api_op_UpdateSolNetworkInstance.go +++ b/service/tnb/api_op_UpdateSolNetworkInstance.go @@ -131,6 +131,9 @@ func (c *Client) addOperationUpdateSolNetworkInstanceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSolNetworkInstanceValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_UpdateSolNetworkPackage.go b/service/tnb/api_op_UpdateSolNetworkPackage.go index d057524510d..8a0baa87903 100644 --- a/service/tnb/api_op_UpdateSolNetworkPackage.go +++ b/service/tnb/api_op_UpdateSolNetworkPackage.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateSolNetworkPackageMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSolNetworkPackageValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_ValidateSolFunctionPackageContent.go b/service/tnb/api_op_ValidateSolFunctionPackageContent.go index ac709c07f50..62dccb18f29 100644 --- a/service/tnb/api_op_ValidateSolFunctionPackageContent.go +++ b/service/tnb/api_op_ValidateSolFunctionPackageContent.go @@ -149,6 +149,9 @@ func (c *Client) addOperationValidateSolFunctionPackageContentMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateSolFunctionPackageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/tnb/api_op_ValidateSolNetworkPackageContent.go b/service/tnb/api_op_ValidateSolNetworkPackageContent.go index ca14f89c926..9ded162cbe9 100644 --- a/service/tnb/api_op_ValidateSolNetworkPackageContent.go +++ b/service/tnb/api_op_ValidateSolNetworkPackageContent.go @@ -153,6 +153,9 @@ func (c *Client) addOperationValidateSolNetworkPackageContentMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpValidateSolNetworkPackageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_client.go b/service/transcribe/api_client.go index 5c38864932e..0f1aefd79d9 100644 --- a/service/transcribe/api_client.go +++ b/service/transcribe/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/transcribe/api_op_CreateCallAnalyticsCategory.go b/service/transcribe/api_op_CreateCallAnalyticsCategory.go index 3430aa4aa5c..c13edf623a1 100644 --- a/service/transcribe/api_op_CreateCallAnalyticsCategory.go +++ b/service/transcribe/api_op_CreateCallAnalyticsCategory.go @@ -156,6 +156,9 @@ func (c *Client) addOperationCreateCallAnalyticsCategoryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCallAnalyticsCategoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_CreateLanguageModel.go b/service/transcribe/api_op_CreateLanguageModel.go index bd97c159ac7..4a8c2fa28bb 100644 --- a/service/transcribe/api_op_CreateLanguageModel.go +++ b/service/transcribe/api_op_CreateLanguageModel.go @@ -191,6 +191,9 @@ func (c *Client) addOperationCreateLanguageModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLanguageModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_CreateMedicalVocabulary.go b/service/transcribe/api_op_CreateMedicalVocabulary.go index 1eb22d295fa..e65d8ebf33e 100644 --- a/service/transcribe/api_op_CreateMedicalVocabulary.go +++ b/service/transcribe/api_op_CreateMedicalVocabulary.go @@ -171,6 +171,9 @@ func (c *Client) addOperationCreateMedicalVocabularyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateMedicalVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_CreateVocabulary.go b/service/transcribe/api_op_CreateVocabulary.go index 5be903b7906..02a1669015d 100644 --- a/service/transcribe/api_op_CreateVocabulary.go +++ b/service/transcribe/api_op_CreateVocabulary.go @@ -209,6 +209,9 @@ func (c *Client) addOperationCreateVocabularyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_CreateVocabularyFilter.go b/service/transcribe/api_op_CreateVocabularyFilter.go index 549a746057a..e7f88a01d24 100644 --- a/service/transcribe/api_op_CreateVocabularyFilter.go +++ b/service/transcribe/api_op_CreateVocabularyFilter.go @@ -199,6 +199,9 @@ func (c *Client) addOperationCreateVocabularyFilterMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateVocabularyFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteCallAnalyticsCategory.go b/service/transcribe/api_op_DeleteCallAnalyticsCategory.go index 190e97c37f3..4337d32adc7 100644 --- a/service/transcribe/api_op_DeleteCallAnalyticsCategory.go +++ b/service/transcribe/api_op_DeleteCallAnalyticsCategory.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteCallAnalyticsCategoryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCallAnalyticsCategoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteCallAnalyticsJob.go b/service/transcribe/api_op_DeleteCallAnalyticsJob.go index 697884b50ac..1cecb46346c 100644 --- a/service/transcribe/api_op_DeleteCallAnalyticsJob.go +++ b/service/transcribe/api_op_DeleteCallAnalyticsJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteCallAnalyticsJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCallAnalyticsJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteLanguageModel.go b/service/transcribe/api_op_DeleteLanguageModel.go index 7181c7d10af..dac30271df7 100644 --- a/service/transcribe/api_op_DeleteLanguageModel.go +++ b/service/transcribe/api_op_DeleteLanguageModel.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteLanguageModelMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLanguageModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteMedicalScribeJob.go b/service/transcribe/api_op_DeleteMedicalScribeJob.go index a4b34eeb0eb..f38ea6888aa 100644 --- a/service/transcribe/api_op_DeleteMedicalScribeJob.go +++ b/service/transcribe/api_op_DeleteMedicalScribeJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteMedicalScribeJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMedicalScribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteMedicalTranscriptionJob.go b/service/transcribe/api_op_DeleteMedicalTranscriptionJob.go index 0fa13976e1c..b2f0bbb28b7 100644 --- a/service/transcribe/api_op_DeleteMedicalTranscriptionJob.go +++ b/service/transcribe/api_op_DeleteMedicalTranscriptionJob.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMedicalTranscriptionJobMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMedicalTranscriptionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteMedicalVocabulary.go b/service/transcribe/api_op_DeleteMedicalVocabulary.go index b184752463f..16709de7e03 100644 --- a/service/transcribe/api_op_DeleteMedicalVocabulary.go +++ b/service/transcribe/api_op_DeleteMedicalVocabulary.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteMedicalVocabularyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMedicalVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteTranscriptionJob.go b/service/transcribe/api_op_DeleteTranscriptionJob.go index b04b393cb71..29977d80c68 100644 --- a/service/transcribe/api_op_DeleteTranscriptionJob.go +++ b/service/transcribe/api_op_DeleteTranscriptionJob.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteTranscriptionJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTranscriptionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteVocabulary.go b/service/transcribe/api_op_DeleteVocabulary.go index 18abcd92d40..ee459806f5f 100644 --- a/service/transcribe/api_op_DeleteVocabulary.go +++ b/service/transcribe/api_op_DeleteVocabulary.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteVocabularyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DeleteVocabularyFilter.go b/service/transcribe/api_op_DeleteVocabularyFilter.go index 40ff619b92f..17298e458fc 100644 --- a/service/transcribe/api_op_DeleteVocabularyFilter.go +++ b/service/transcribe/api_op_DeleteVocabularyFilter.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteVocabularyFilterMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteVocabularyFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_DescribeLanguageModel.go b/service/transcribe/api_op_DescribeLanguageModel.go index eac8130c35f..cb098848257 100644 --- a/service/transcribe/api_op_DescribeLanguageModel.go +++ b/service/transcribe/api_op_DescribeLanguageModel.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeLanguageModelMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeLanguageModelValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetCallAnalyticsCategory.go b/service/transcribe/api_op_GetCallAnalyticsCategory.go index 4cca6784c3a..a0198ae3798 100644 --- a/service/transcribe/api_op_GetCallAnalyticsCategory.go +++ b/service/transcribe/api_op_GetCallAnalyticsCategory.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetCallAnalyticsCategoryMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCallAnalyticsCategoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetCallAnalyticsJob.go b/service/transcribe/api_op_GetCallAnalyticsJob.go index b88d8d8a2b8..cb7f23a851b 100644 --- a/service/transcribe/api_op_GetCallAnalyticsJob.go +++ b/service/transcribe/api_op_GetCallAnalyticsJob.go @@ -122,6 +122,9 @@ func (c *Client) addOperationGetCallAnalyticsJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCallAnalyticsJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetMedicalScribeJob.go b/service/transcribe/api_op_GetMedicalScribeJob.go index 9d76cb005a4..eb2a5e003d2 100644 --- a/service/transcribe/api_op_GetMedicalScribeJob.go +++ b/service/transcribe/api_op_GetMedicalScribeJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetMedicalScribeJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMedicalScribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetMedicalTranscriptionJob.go b/service/transcribe/api_op_GetMedicalTranscriptionJob.go index 141de0723d5..473131d7636 100644 --- a/service/transcribe/api_op_GetMedicalTranscriptionJob.go +++ b/service/transcribe/api_op_GetMedicalTranscriptionJob.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetMedicalTranscriptionJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMedicalTranscriptionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetMedicalVocabulary.go b/service/transcribe/api_op_GetMedicalVocabulary.go index c321e74ded3..2d7510d73f2 100644 --- a/service/transcribe/api_op_GetMedicalVocabulary.go +++ b/service/transcribe/api_op_GetMedicalVocabulary.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetMedicalVocabularyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMedicalVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetTranscriptionJob.go b/service/transcribe/api_op_GetTranscriptionJob.go index fa86d07dcdb..9200d061867 100644 --- a/service/transcribe/api_op_GetTranscriptionJob.go +++ b/service/transcribe/api_op_GetTranscriptionJob.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetTranscriptionJobMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTranscriptionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetVocabulary.go b/service/transcribe/api_op_GetVocabulary.go index be44758112c..5415cf3d667 100644 --- a/service/transcribe/api_op_GetVocabulary.go +++ b/service/transcribe/api_op_GetVocabulary.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetVocabularyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_GetVocabularyFilter.go b/service/transcribe/api_op_GetVocabularyFilter.go index 3e03e188635..978b8eaeb22 100644 --- a/service/transcribe/api_op_GetVocabularyFilter.go +++ b/service/transcribe/api_op_GetVocabularyFilter.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetVocabularyFilterMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetVocabularyFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_ListCallAnalyticsCategories.go b/service/transcribe/api_op_ListCallAnalyticsCategories.go index 77aafd49cfb..5a73c4ec413 100644 --- a/service/transcribe/api_op_ListCallAnalyticsCategories.go +++ b/service/transcribe/api_op_ListCallAnalyticsCategories.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListCallAnalyticsCategoriesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCallAnalyticsCategories(options.Region), middleware.Before); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListCallAnalyticsCategoriesMiddlewares(stack *middl return nil } -// ListCallAnalyticsCategoriesAPIClient is a client that implements the -// ListCallAnalyticsCategories operation. -type ListCallAnalyticsCategoriesAPIClient interface { - ListCallAnalyticsCategories(context.Context, *ListCallAnalyticsCategoriesInput, ...func(*Options)) (*ListCallAnalyticsCategoriesOutput, error) -} - -var _ ListCallAnalyticsCategoriesAPIClient = (*Client)(nil) - // ListCallAnalyticsCategoriesPaginatorOptions is the paginator options for // ListCallAnalyticsCategories type ListCallAnalyticsCategoriesPaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListCallAnalyticsCategoriesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCallAnalyticsCategories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListCallAnalyticsCategoriesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListCallAnalyticsCategoriesAPIClient is a client that implements the +// ListCallAnalyticsCategories operation. +type ListCallAnalyticsCategoriesAPIClient interface { + ListCallAnalyticsCategories(context.Context, *ListCallAnalyticsCategoriesInput, ...func(*Options)) (*ListCallAnalyticsCategoriesOutput, error) +} + +var _ ListCallAnalyticsCategoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCallAnalyticsCategories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListCallAnalyticsJobs.go b/service/transcribe/api_op_ListCallAnalyticsJobs.go index 136e44ede82..0c0c68ce843 100644 --- a/service/transcribe/api_op_ListCallAnalyticsJobs.go +++ b/service/transcribe/api_op_ListCallAnalyticsJobs.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListCallAnalyticsJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCallAnalyticsJobs(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListCallAnalyticsJobsMiddlewares(stack *middleware. return nil } -// ListCallAnalyticsJobsAPIClient is a client that implements the -// ListCallAnalyticsJobs operation. -type ListCallAnalyticsJobsAPIClient interface { - ListCallAnalyticsJobs(context.Context, *ListCallAnalyticsJobsInput, ...func(*Options)) (*ListCallAnalyticsJobsOutput, error) -} - -var _ ListCallAnalyticsJobsAPIClient = (*Client)(nil) - // ListCallAnalyticsJobsPaginatorOptions is the paginator options for // ListCallAnalyticsJobs type ListCallAnalyticsJobsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListCallAnalyticsJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCallAnalyticsJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListCallAnalyticsJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListCallAnalyticsJobsAPIClient is a client that implements the +// ListCallAnalyticsJobs operation. +type ListCallAnalyticsJobsAPIClient interface { + ListCallAnalyticsJobs(context.Context, *ListCallAnalyticsJobsInput, ...func(*Options)) (*ListCallAnalyticsJobsOutput, error) +} + +var _ ListCallAnalyticsJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCallAnalyticsJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListLanguageModels.go b/service/transcribe/api_op_ListLanguageModels.go index ef2ed36ec54..2ac5bde4b32 100644 --- a/service/transcribe/api_op_ListLanguageModels.go +++ b/service/transcribe/api_op_ListLanguageModels.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListLanguageModelsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLanguageModels(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListLanguageModelsMiddlewares(stack *middleware.Sta return nil } -// ListLanguageModelsAPIClient is a client that implements the ListLanguageModels -// operation. -type ListLanguageModelsAPIClient interface { - ListLanguageModels(context.Context, *ListLanguageModelsInput, ...func(*Options)) (*ListLanguageModelsOutput, error) -} - -var _ ListLanguageModelsAPIClient = (*Client)(nil) - // ListLanguageModelsPaginatorOptions is the paginator options for // ListLanguageModels type ListLanguageModelsPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListLanguageModelsPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLanguageModels(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListLanguageModelsPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListLanguageModelsAPIClient is a client that implements the ListLanguageModels +// operation. +type ListLanguageModelsAPIClient interface { + ListLanguageModels(context.Context, *ListLanguageModelsInput, ...func(*Options)) (*ListLanguageModelsOutput, error) +} + +var _ ListLanguageModelsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLanguageModels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListMedicalScribeJobs.go b/service/transcribe/api_op_ListMedicalScribeJobs.go index f7ae8fc3e6a..447f38e2b0e 100644 --- a/service/transcribe/api_op_ListMedicalScribeJobs.go +++ b/service/transcribe/api_op_ListMedicalScribeJobs.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListMedicalScribeJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMedicalScribeJobs(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListMedicalScribeJobsMiddlewares(stack *middleware. return nil } -// ListMedicalScribeJobsAPIClient is a client that implements the -// ListMedicalScribeJobs operation. -type ListMedicalScribeJobsAPIClient interface { - ListMedicalScribeJobs(context.Context, *ListMedicalScribeJobsInput, ...func(*Options)) (*ListMedicalScribeJobsOutput, error) -} - -var _ ListMedicalScribeJobsAPIClient = (*Client)(nil) - // ListMedicalScribeJobsPaginatorOptions is the paginator options for // ListMedicalScribeJobs type ListMedicalScribeJobsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListMedicalScribeJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMedicalScribeJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListMedicalScribeJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListMedicalScribeJobsAPIClient is a client that implements the +// ListMedicalScribeJobs operation. +type ListMedicalScribeJobsAPIClient interface { + ListMedicalScribeJobs(context.Context, *ListMedicalScribeJobsInput, ...func(*Options)) (*ListMedicalScribeJobsOutput, error) +} + +var _ ListMedicalScribeJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMedicalScribeJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListMedicalTranscriptionJobs.go b/service/transcribe/api_op_ListMedicalTranscriptionJobs.go index 76cc917fc0d..9aefca2cea6 100644 --- a/service/transcribe/api_op_ListMedicalTranscriptionJobs.go +++ b/service/transcribe/api_op_ListMedicalTranscriptionJobs.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListMedicalTranscriptionJobsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMedicalTranscriptionJobs(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListMedicalTranscriptionJobsMiddlewares(stack *midd return nil } -// ListMedicalTranscriptionJobsAPIClient is a client that implements the -// ListMedicalTranscriptionJobs operation. -type ListMedicalTranscriptionJobsAPIClient interface { - ListMedicalTranscriptionJobs(context.Context, *ListMedicalTranscriptionJobsInput, ...func(*Options)) (*ListMedicalTranscriptionJobsOutput, error) -} - -var _ ListMedicalTranscriptionJobsAPIClient = (*Client)(nil) - // ListMedicalTranscriptionJobsPaginatorOptions is the paginator options for // ListMedicalTranscriptionJobs type ListMedicalTranscriptionJobsPaginatorOptions struct { @@ -237,6 +232,9 @@ func (p *ListMedicalTranscriptionJobsPaginator) NextPage(ctx context.Context, op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMedicalTranscriptionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -256,6 +254,14 @@ func (p *ListMedicalTranscriptionJobsPaginator) NextPage(ctx context.Context, op return result, nil } +// ListMedicalTranscriptionJobsAPIClient is a client that implements the +// ListMedicalTranscriptionJobs operation. +type ListMedicalTranscriptionJobsAPIClient interface { + ListMedicalTranscriptionJobs(context.Context, *ListMedicalTranscriptionJobsInput, ...func(*Options)) (*ListMedicalTranscriptionJobsOutput, error) +} + +var _ ListMedicalTranscriptionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMedicalTranscriptionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListMedicalVocabularies.go b/service/transcribe/api_op_ListMedicalVocabularies.go index ddddac280c2..281985de16a 100644 --- a/service/transcribe/api_op_ListMedicalVocabularies.go +++ b/service/transcribe/api_op_ListMedicalVocabularies.go @@ -141,6 +141,9 @@ func (c *Client) addOperationListMedicalVocabulariesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMedicalVocabularies(options.Region), middleware.Before); err != nil { return err } @@ -162,14 +165,6 @@ func (c *Client) addOperationListMedicalVocabulariesMiddlewares(stack *middlewar return nil } -// ListMedicalVocabulariesAPIClient is a client that implements the -// ListMedicalVocabularies operation. -type ListMedicalVocabulariesAPIClient interface { - ListMedicalVocabularies(context.Context, *ListMedicalVocabulariesInput, ...func(*Options)) (*ListMedicalVocabulariesOutput, error) -} - -var _ ListMedicalVocabulariesAPIClient = (*Client)(nil) - // ListMedicalVocabulariesPaginatorOptions is the paginator options for // ListMedicalVocabularies type ListMedicalVocabulariesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *ListMedicalVocabulariesPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMedicalVocabularies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *ListMedicalVocabulariesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListMedicalVocabulariesAPIClient is a client that implements the +// ListMedicalVocabularies operation. +type ListMedicalVocabulariesAPIClient interface { + ListMedicalVocabularies(context.Context, *ListMedicalVocabulariesInput, ...func(*Options)) (*ListMedicalVocabulariesOutput, error) +} + +var _ ListMedicalVocabulariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMedicalVocabularies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListTagsForResource.go b/service/transcribe/api_op_ListTagsForResource.go index 71412b46ae1..cbb19c85d0b 100644 --- a/service/transcribe/api_op_ListTagsForResource.go +++ b/service/transcribe/api_op_ListTagsForResource.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_ListTranscriptionJobs.go b/service/transcribe/api_op_ListTranscriptionJobs.go index ac161e75992..8b3bf2364ad 100644 --- a/service/transcribe/api_op_ListTranscriptionJobs.go +++ b/service/transcribe/api_op_ListTranscriptionJobs.go @@ -137,6 +137,9 @@ func (c *Client) addOperationListTranscriptionJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTranscriptionJobs(options.Region), middleware.Before); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListTranscriptionJobsMiddlewares(stack *middleware. return nil } -// ListTranscriptionJobsAPIClient is a client that implements the -// ListTranscriptionJobs operation. -type ListTranscriptionJobsAPIClient interface { - ListTranscriptionJobs(context.Context, *ListTranscriptionJobsInput, ...func(*Options)) (*ListTranscriptionJobsOutput, error) -} - -var _ ListTranscriptionJobsAPIClient = (*Client)(nil) - // ListTranscriptionJobsPaginatorOptions is the paginator options for // ListTranscriptionJobs type ListTranscriptionJobsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListTranscriptionJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTranscriptionJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListTranscriptionJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListTranscriptionJobsAPIClient is a client that implements the +// ListTranscriptionJobs operation. +type ListTranscriptionJobsAPIClient interface { + ListTranscriptionJobs(context.Context, *ListTranscriptionJobsInput, ...func(*Options)) (*ListTranscriptionJobsOutput, error) +} + +var _ ListTranscriptionJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTranscriptionJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListVocabularies.go b/service/transcribe/api_op_ListVocabularies.go index 19edb76fa86..7c6e4ac02df 100644 --- a/service/transcribe/api_op_ListVocabularies.go +++ b/service/transcribe/api_op_ListVocabularies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListVocabulariesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVocabularies(options.Region), middleware.Before); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListVocabulariesMiddlewares(stack *middleware.Stack return nil } -// ListVocabulariesAPIClient is a client that implements the ListVocabularies -// operation. -type ListVocabulariesAPIClient interface { - ListVocabularies(context.Context, *ListVocabulariesInput, ...func(*Options)) (*ListVocabulariesOutput, error) -} - -var _ ListVocabulariesAPIClient = (*Client)(nil) - // ListVocabulariesPaginatorOptions is the paginator options for ListVocabularies type ListVocabulariesPaginatorOptions struct { // The maximum number of custom vocabularies to return in each page of results. If @@ -232,6 +227,9 @@ func (p *ListVocabulariesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVocabularies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListVocabulariesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListVocabulariesAPIClient is a client that implements the ListVocabularies +// operation. +type ListVocabulariesAPIClient interface { + ListVocabularies(context.Context, *ListVocabulariesInput, ...func(*Options)) (*ListVocabulariesOutput, error) +} + +var _ ListVocabulariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVocabularies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_ListVocabularyFilters.go b/service/transcribe/api_op_ListVocabularyFilters.go index 502ac635b68..2676b3e8d20 100644 --- a/service/transcribe/api_op_ListVocabularyFilters.go +++ b/service/transcribe/api_op_ListVocabularyFilters.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListVocabularyFiltersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVocabularyFilters(options.Region), middleware.Before); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListVocabularyFiltersMiddlewares(stack *middleware. return nil } -// ListVocabularyFiltersAPIClient is a client that implements the -// ListVocabularyFilters operation. -type ListVocabularyFiltersAPIClient interface { - ListVocabularyFilters(context.Context, *ListVocabularyFiltersInput, ...func(*Options)) (*ListVocabularyFiltersOutput, error) -} - -var _ ListVocabularyFiltersAPIClient = (*Client)(nil) - // ListVocabularyFiltersPaginatorOptions is the paginator options for // ListVocabularyFilters type ListVocabularyFiltersPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListVocabularyFiltersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListVocabularyFilters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListVocabularyFiltersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListVocabularyFiltersAPIClient is a client that implements the +// ListVocabularyFilters operation. +type ListVocabularyFiltersAPIClient interface { + ListVocabularyFilters(context.Context, *ListVocabularyFiltersInput, ...func(*Options)) (*ListVocabularyFiltersOutput, error) +} + +var _ ListVocabularyFiltersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListVocabularyFilters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transcribe/api_op_StartCallAnalyticsJob.go b/service/transcribe/api_op_StartCallAnalyticsJob.go index 587f8df8835..bafae1f5283 100644 --- a/service/transcribe/api_op_StartCallAnalyticsJob.go +++ b/service/transcribe/api_op_StartCallAnalyticsJob.go @@ -244,6 +244,9 @@ func (c *Client) addOperationStartCallAnalyticsJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCallAnalyticsJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_StartMedicalScribeJob.go b/service/transcribe/api_op_StartMedicalScribeJob.go index d8e8980ab0a..025330d07ca 100644 --- a/service/transcribe/api_op_StartMedicalScribeJob.go +++ b/service/transcribe/api_op_StartMedicalScribeJob.go @@ -256,6 +256,9 @@ func (c *Client) addOperationStartMedicalScribeJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMedicalScribeJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_StartMedicalTranscriptionJob.go b/service/transcribe/api_op_StartMedicalTranscriptionJob.go index 49dc4bb4120..2bd3c26e8db 100644 --- a/service/transcribe/api_op_StartMedicalTranscriptionJob.go +++ b/service/transcribe/api_op_StartMedicalTranscriptionJob.go @@ -309,6 +309,9 @@ func (c *Client) addOperationStartMedicalTranscriptionJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMedicalTranscriptionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_StartTranscriptionJob.go b/service/transcribe/api_op_StartTranscriptionJob.go index 5443dd22d73..f6ba16a0b08 100644 --- a/service/transcribe/api_op_StartTranscriptionJob.go +++ b/service/transcribe/api_op_StartTranscriptionJob.go @@ -415,6 +415,9 @@ func (c *Client) addOperationStartTranscriptionJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartTranscriptionJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_TagResource.go b/service/transcribe/api_op_TagResource.go index d8793a377ce..ec7ed86247b 100644 --- a/service/transcribe/api_op_TagResource.go +++ b/service/transcribe/api_op_TagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_UntagResource.go b/service/transcribe/api_op_UntagResource.go index 2f21cd12b20..a38a5b17bcf 100644 --- a/service/transcribe/api_op_UntagResource.go +++ b/service/transcribe/api_op_UntagResource.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_UpdateCallAnalyticsCategory.go b/service/transcribe/api_op_UpdateCallAnalyticsCategory.go index c76a547d1d5..543e04cefac 100644 --- a/service/transcribe/api_op_UpdateCallAnalyticsCategory.go +++ b/service/transcribe/api_op_UpdateCallAnalyticsCategory.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateCallAnalyticsCategoryMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCallAnalyticsCategoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_UpdateMedicalVocabulary.go b/service/transcribe/api_op_UpdateMedicalVocabulary.go index aa990b0d89d..c64b126506e 100644 --- a/service/transcribe/api_op_UpdateMedicalVocabulary.go +++ b/service/transcribe/api_op_UpdateMedicalVocabulary.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpdateMedicalVocabularyMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMedicalVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_UpdateVocabulary.go b/service/transcribe/api_op_UpdateVocabulary.go index 5b90f0b6683..a65ab5321af 100644 --- a/service/transcribe/api_op_UpdateVocabulary.go +++ b/service/transcribe/api_op_UpdateVocabulary.go @@ -180,6 +180,9 @@ func (c *Client) addOperationUpdateVocabularyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVocabularyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribe/api_op_UpdateVocabularyFilter.go b/service/transcribe/api_op_UpdateVocabularyFilter.go index 1fb003d3934..885379e19e0 100644 --- a/service/transcribe/api_op_UpdateVocabularyFilter.go +++ b/service/transcribe/api_op_UpdateVocabularyFilter.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateVocabularyFilterMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateVocabularyFilterValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribestreaming/api_client.go b/service/transcribestreaming/api_client.go index 1c57ac2f334..9590fdbee49 100644 --- a/service/transcribestreaming/api_client.go +++ b/service/transcribestreaming/api_client.go @@ -453,6 +453,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -538,6 +562,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/transcribestreaming/api_op_StartCallAnalyticsStreamTranscription.go b/service/transcribestreaming/api_op_StartCallAnalyticsStreamTranscription.go index 89b8df8e08f..480f32f8ef0 100644 --- a/service/transcribestreaming/api_op_StartCallAnalyticsStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartCallAnalyticsStreamTranscription.go @@ -326,6 +326,9 @@ func (c *Client) addOperationStartCallAnalyticsStreamTranscriptionMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartCallAnalyticsStreamTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go b/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go index 334ee98f54d..f80eaac53e7 100644 --- a/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartMedicalStreamTranscription.go @@ -253,6 +253,9 @@ func (c *Client) addOperationStartMedicalStreamTranscriptionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartMedicalStreamTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/transcribestreaming/api_op_StartStreamTranscription.go b/service/transcribestreaming/api_op_StartStreamTranscription.go index 9cb3a81a55d..4cd4e7b5394 100644 --- a/service/transcribestreaming/api_op_StartStreamTranscription.go +++ b/service/transcribestreaming/api_op_StartStreamTranscription.go @@ -483,6 +483,9 @@ func (c *Client) addOperationStartStreamTranscriptionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartStreamTranscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_client.go b/service/transfer/api_client.go index 2a475802e74..7c04c2bccd8 100644 --- a/service/transfer/api_client.go +++ b/service/transfer/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/transfer/api_op_CreateAccess.go b/service/transfer/api_op_CreateAccess.go index 36542debfc8..f16f4b51aa4 100644 --- a/service/transfer/api_op_CreateAccess.go +++ b/service/transfer/api_op_CreateAccess.go @@ -221,6 +221,9 @@ func (c *Client) addOperationCreateAccessMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_CreateAgreement.go b/service/transfer/api_op_CreateAgreement.go index f4e9a8014e3..1a7802e105d 100644 --- a/service/transfer/api_op_CreateAgreement.go +++ b/service/transfer/api_op_CreateAgreement.go @@ -177,6 +177,9 @@ func (c *Client) addOperationCreateAgreementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAgreementValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_CreateConnector.go b/service/transfer/api_op_CreateConnector.go index 80aadd59a93..400543609dd 100644 --- a/service/transfer/api_op_CreateConnector.go +++ b/service/transfer/api_op_CreateConnector.go @@ -169,6 +169,9 @@ func (c *Client) addOperationCreateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_CreateProfile.go b/service/transfer/api_op_CreateProfile.go index a95e83a84c3..d2c3099fa66 100644 --- a/service/transfer/api_op_CreateProfile.go +++ b/service/transfer/api_op_CreateProfile.go @@ -131,6 +131,9 @@ func (c *Client) addOperationCreateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_CreateServer.go b/service/transfer/api_op_CreateServer.go index fbb8f17875f..b5e830e1bac 100644 --- a/service/transfer/api_op_CreateServer.go +++ b/service/transfer/api_op_CreateServer.go @@ -348,6 +348,9 @@ func (c *Client) addOperationCreateServerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_CreateUser.go b/service/transfer/api_op_CreateUser.go index 32b635e876d..511d6af1d72 100644 --- a/service/transfer/api_op_CreateUser.go +++ b/service/transfer/api_op_CreateUser.go @@ -233,6 +233,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_CreateWorkflow.go b/service/transfer/api_op_CreateWorkflow.go index 9aede304052..024b8a929a8 100644 --- a/service/transfer/api_op_CreateWorkflow.go +++ b/service/transfer/api_op_CreateWorkflow.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteAccess.go b/service/transfer/api_op_DeleteAccess.go index 7f9c4a93c16..decb6448f61 100644 --- a/service/transfer/api_op_DeleteAccess.go +++ b/service/transfer/api_op_DeleteAccess.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteAccessMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteAgreement.go b/service/transfer/api_op_DeleteAgreement.go index b13ccbd34f6..53f8f4ae166 100644 --- a/service/transfer/api_op_DeleteAgreement.go +++ b/service/transfer/api_op_DeleteAgreement.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteAgreementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAgreementValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteCertificate.go b/service/transfer/api_op_DeleteCertificate.go index b4b8467254b..3380f90b9d0 100644 --- a/service/transfer/api_op_DeleteCertificate.go +++ b/service/transfer/api_op_DeleteCertificate.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteConnector.go b/service/transfer/api_op_DeleteConnector.go index 9d0cde45da4..a652cec3c94 100644 --- a/service/transfer/api_op_DeleteConnector.go +++ b/service/transfer/api_op_DeleteConnector.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteHostKey.go b/service/transfer/api_op_DeleteHostKey.go index 8960eb4b1ed..de30d024688 100644 --- a/service/transfer/api_op_DeleteHostKey.go +++ b/service/transfer/api_op_DeleteHostKey.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteHostKeyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteHostKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteProfile.go b/service/transfer/api_op_DeleteProfile.go index 7313b5d4a86..55e34291df4 100644 --- a/service/transfer/api_op_DeleteProfile.go +++ b/service/transfer/api_op_DeleteProfile.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteServer.go b/service/transfer/api_op_DeleteServer.go index 76425824846..d8571b9101d 100644 --- a/service/transfer/api_op_DeleteServer.go +++ b/service/transfer/api_op_DeleteServer.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteServerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteSshPublicKey.go b/service/transfer/api_op_DeleteSshPublicKey.go index 8bc02419bff..8aed282fbc2 100644 --- a/service/transfer/api_op_DeleteSshPublicKey.go +++ b/service/transfer/api_op_DeleteSshPublicKey.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteSshPublicKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSshPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteUser.go b/service/transfer/api_op_DeleteUser.go index 541639a674b..98a1bed139a 100644 --- a/service/transfer/api_op_DeleteUser.go +++ b/service/transfer/api_op_DeleteUser.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DeleteWorkflow.go b/service/transfer/api_op_DeleteWorkflow.go index c4b08962e11..60bc3908163 100644 --- a/service/transfer/api_op_DeleteWorkflow.go +++ b/service/transfer/api_op_DeleteWorkflow.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteWorkflowMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeAccess.go b/service/transfer/api_op_DescribeAccess.go index a572de471eb..5e69411cfee 100644 --- a/service/transfer/api_op_DescribeAccess.go +++ b/service/transfer/api_op_DescribeAccess.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDescribeAccessMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeAgreement.go b/service/transfer/api_op_DescribeAgreement.go index 48ef1be4ba6..c68cbec0f7c 100644 --- a/service/transfer/api_op_DescribeAgreement.go +++ b/service/transfer/api_op_DescribeAgreement.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeAgreementMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAgreementValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeCertificate.go b/service/transfer/api_op_DescribeCertificate.go index f0474f75fb2..321373c93cd 100644 --- a/service/transfer/api_op_DescribeCertificate.go +++ b/service/transfer/api_op_DescribeCertificate.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeCertificateMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeConnector.go b/service/transfer/api_op_DescribeConnector.go index 0ec1c227423..6e5ee2205a8 100644 --- a/service/transfer/api_op_DescribeConnector.go +++ b/service/transfer/api_op_DescribeConnector.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeConnectorMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeExecution.go b/service/transfer/api_op_DescribeExecution.go index 141f0bb4898..d53bd8d04d0 100644 --- a/service/transfer/api_op_DescribeExecution.go +++ b/service/transfer/api_op_DescribeExecution.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeExecutionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeExecutionValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeHostKey.go b/service/transfer/api_op_DescribeHostKey.go index f4707887849..2fdddc72c65 100644 --- a/service/transfer/api_op_DescribeHostKey.go +++ b/service/transfer/api_op_DescribeHostKey.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDescribeHostKeyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeHostKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeProfile.go b/service/transfer/api_op_DescribeProfile.go index c29c1a31faf..7d170fd2d84 100644 --- a/service/transfer/api_op_DescribeProfile.go +++ b/service/transfer/api_op_DescribeProfile.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeProfileMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeSecurityPolicy.go b/service/transfer/api_op_DescribeSecurityPolicy.go index 9936bbd145e..10bfd417168 100644 --- a/service/transfer/api_op_DescribeSecurityPolicy.go +++ b/service/transfer/api_op_DescribeSecurityPolicy.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeSecurityPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSecurityPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeServer.go b/service/transfer/api_op_DescribeServer.go index 00b8cd47ccb..2e5c66b6163 100644 --- a/service/transfer/api_op_DescribeServer.go +++ b/service/transfer/api_op_DescribeServer.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeServerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeServerValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationDescribeServerMiddlewares(stack *middleware.Stack, return nil } -// DescribeServerAPIClient is a client that implements the DescribeServer -// operation. -type DescribeServerAPIClient interface { - DescribeServer(context.Context, *DescribeServerInput, ...func(*Options)) (*DescribeServerOutput, error) -} - -var _ DescribeServerAPIClient = (*Client)(nil) - // ServerOfflineWaiterOptions are waiter options for ServerOfflineWaiter type ServerOfflineWaiterOptions struct { @@ -263,7 +258,13 @@ func (w *ServerOfflineWaiter) WaitForOutput(ctx context.Context, params *Describ } out, err := w.client.DescribeServer(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -452,7 +453,13 @@ func (w *ServerOnlineWaiter) WaitForOutput(ctx context.Context, params *Describe } out, err := w.client.DescribeServer(ctx, params, func(o *Options) { + baseOpts := []func(*Options){ + addIsWaiterUserAgent, + } o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range baseOpts { + opt(o) + } for _, opt := range options.ClientOptions { opt(o) } @@ -527,6 +534,14 @@ func serverOnlineStateRetryable(ctx context.Context, input *DescribeServerInput, return true, nil } +// DescribeServerAPIClient is a client that implements the DescribeServer +// operation. +type DescribeServerAPIClient interface { + DescribeServer(context.Context, *DescribeServerInput, ...func(*Options)) (*DescribeServerOutput, error) +} + +var _ DescribeServerAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeServer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_DescribeUser.go b/service/transfer/api_op_DescribeUser.go index f493eecf1c4..46818cb4e96 100644 --- a/service/transfer/api_op_DescribeUser.go +++ b/service/transfer/api_op_DescribeUser.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_DescribeWorkflow.go b/service/transfer/api_op_DescribeWorkflow.go index 291b241a892..d8403ac39cf 100644 --- a/service/transfer/api_op_DescribeWorkflow.go +++ b/service/transfer/api_op_DescribeWorkflow.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeWorkflowMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkflowValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_ImportCertificate.go b/service/transfer/api_op_ImportCertificate.go index 38a7953158e..802a09ea990 100644 --- a/service/transfer/api_op_ImportCertificate.go +++ b/service/transfer/api_op_ImportCertificate.go @@ -151,6 +151,9 @@ func (c *Client) addOperationImportCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_ImportHostKey.go b/service/transfer/api_op_ImportHostKey.go index 2f15a606e66..533fa39c855 100644 --- a/service/transfer/api_op_ImportHostKey.go +++ b/service/transfer/api_op_ImportHostKey.go @@ -126,6 +126,9 @@ func (c *Client) addOperationImportHostKeyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportHostKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_ImportSshPublicKey.go b/service/transfer/api_op_ImportSshPublicKey.go index af594e47f39..429ea03fffe 100644 --- a/service/transfer/api_op_ImportSshPublicKey.go +++ b/service/transfer/api_op_ImportSshPublicKey.go @@ -137,6 +137,9 @@ func (c *Client) addOperationImportSshPublicKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportSshPublicKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_ListAccesses.go b/service/transfer/api_op_ListAccesses.go index 767e066b80e..e657dcc4cd6 100644 --- a/service/transfer/api_op_ListAccesses.go +++ b/service/transfer/api_op_ListAccesses.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListAccessesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessesValidationMiddleware(stack); err != nil { return err } @@ -151,13 +154,6 @@ func (c *Client) addOperationListAccessesMiddlewares(stack *middleware.Stack, op return nil } -// ListAccessesAPIClient is a client that implements the ListAccesses operation. -type ListAccessesAPIClient interface { - ListAccesses(context.Context, *ListAccessesInput, ...func(*Options)) (*ListAccessesOutput, error) -} - -var _ ListAccessesAPIClient = (*Client)(nil) - // ListAccessesPaginatorOptions is the paginator options for ListAccesses type ListAccessesPaginatorOptions struct { // Specifies the maximum number of access SIDs to return. @@ -221,6 +217,9 @@ func (p *ListAccessesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccesses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +239,13 @@ func (p *ListAccessesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListAccessesAPIClient is a client that implements the ListAccesses operation. +type ListAccessesAPIClient interface { + ListAccesses(context.Context, *ListAccessesInput, ...func(*Options)) (*ListAccessesOutput, error) +} + +var _ ListAccessesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccesses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListAgreements.go b/service/transfer/api_op_ListAgreements.go index 1496371fdfc..c455ed0cc02 100644 --- a/service/transfer/api_op_ListAgreements.go +++ b/service/transfer/api_op_ListAgreements.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListAgreementsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAgreementsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListAgreementsMiddlewares(stack *middleware.Stack, return nil } -// ListAgreementsAPIClient is a client that implements the ListAgreements -// operation. -type ListAgreementsAPIClient interface { - ListAgreements(context.Context, *ListAgreementsInput, ...func(*Options)) (*ListAgreementsOutput, error) -} - -var _ ListAgreementsAPIClient = (*Client)(nil) - // ListAgreementsPaginatorOptions is the paginator options for ListAgreements type ListAgreementsPaginatorOptions struct { // The maximum number of agreements to return. @@ -219,6 +214,9 @@ func (p *ListAgreementsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAgreements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListAgreementsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAgreementsAPIClient is a client that implements the ListAgreements +// operation. +type ListAgreementsAPIClient interface { + ListAgreements(context.Context, *ListAgreementsInput, ...func(*Options)) (*ListAgreementsOutput, error) +} + +var _ ListAgreementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAgreements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListCertificates.go b/service/transfer/api_op_ListCertificates.go index 48c786124f9..82495e06672 100644 --- a/service/transfer/api_op_ListCertificates.go +++ b/service/transfer/api_op_ListCertificates.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCertificates(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListCertificatesMiddlewares(stack *middleware.Stack return nil } -// ListCertificatesAPIClient is a client that implements the ListCertificates -// operation. -type ListCertificatesAPIClient interface { - ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) -} - -var _ ListCertificatesAPIClient = (*Client)(nil) - // ListCertificatesPaginatorOptions is the paginator options for ListCertificates type ListCertificatesPaginatorOptions struct { // The maximum number of certificates to return. @@ -211,6 +206,9 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListCertificatesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCertificatesAPIClient is a client that implements the ListCertificates +// operation. +type ListCertificatesAPIClient interface { + ListCertificates(context.Context, *ListCertificatesInput, ...func(*Options)) (*ListCertificatesOutput, error) +} + +var _ ListCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListConnectors.go b/service/transfer/api_op_ListConnectors.go index 28e67a9a2ca..ceec0ced029 100644 --- a/service/transfer/api_op_ListConnectors.go +++ b/service/transfer/api_op_ListConnectors.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConnectors(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListConnectorsMiddlewares(stack *middleware.Stack, return nil } -// ListConnectorsAPIClient is a client that implements the ListConnectors -// operation. -type ListConnectorsAPIClient interface { - ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) -} - -var _ ListConnectorsAPIClient = (*Client)(nil) - // ListConnectorsPaginatorOptions is the paginator options for ListConnectors type ListConnectorsPaginatorOptions struct { // The maximum number of connectors to return. @@ -207,6 +202,9 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListConnectors(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListConnectorsAPIClient is a client that implements the ListConnectors +// operation. +type ListConnectorsAPIClient interface { + ListConnectors(context.Context, *ListConnectorsInput, ...func(*Options)) (*ListConnectorsOutput, error) +} + +var _ ListConnectorsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListConnectors(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListExecutions.go b/service/transfer/api_op_ListExecutions.go index 2452b598858..646b24e1a92 100644 --- a/service/transfer/api_op_ListExecutions.go +++ b/service/transfer/api_op_ListExecutions.go @@ -146,6 +146,9 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListExecutionsValidationMiddleware(stack); err != nil { return err } @@ -170,14 +173,6 @@ func (c *Client) addOperationListExecutionsMiddlewares(stack *middleware.Stack, return nil } -// ListExecutionsAPIClient is a client that implements the ListExecutions -// operation. -type ListExecutionsAPIClient interface { - ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) -} - -var _ ListExecutionsAPIClient = (*Client)(nil) - // ListExecutionsPaginatorOptions is the paginator options for ListExecutions type ListExecutionsPaginatorOptions struct { // Specifies the maximum number of executions to return. @@ -241,6 +236,9 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListExecutions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListExecutionsAPIClient is a client that implements the ListExecutions +// operation. +type ListExecutionsAPIClient interface { + ListExecutions(context.Context, *ListExecutionsInput, ...func(*Options)) (*ListExecutionsOutput, error) +} + +var _ ListExecutionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListExecutions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListHostKeys.go b/service/transfer/api_op_ListHostKeys.go index 057b0e98993..d8cca247102 100644 --- a/service/transfer/api_op_ListHostKeys.go +++ b/service/transfer/api_op_ListHostKeys.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListHostKeysMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListHostKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_ListProfiles.go b/service/transfer/api_op_ListProfiles.go index 45a80b23c37..82c98b2b3cd 100644 --- a/service/transfer/api_op_ListProfiles.go +++ b/service/transfer/api_op_ListProfiles.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfiles(options.Region), middleware.Before); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op return nil } -// ListProfilesAPIClient is a client that implements the ListProfiles operation. -type ListProfilesAPIClient interface { - ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) -} - -var _ ListProfilesAPIClient = (*Client)(nil) - // ListProfilesPaginatorOptions is the paginator options for ListProfiles type ListProfilesPaginatorOptions struct { // The maximum number of profiles to return. @@ -214,6 +210,9 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProfilesAPIClient is a client that implements the ListProfiles operation. +type ListProfilesAPIClient interface { + ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) +} + +var _ ListProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListSecurityPolicies.go b/service/transfer/api_op_ListSecurityPolicies.go index da6908cf6e7..59f3f66232f 100644 --- a/service/transfer/api_op_ListSecurityPolicies.go +++ b/service/transfer/api_op_ListSecurityPolicies.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListSecurityPoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityPolicies(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListSecurityPoliciesMiddlewares(stack *middleware.S return nil } -// ListSecurityPoliciesAPIClient is a client that implements the -// ListSecurityPolicies operation. -type ListSecurityPoliciesAPIClient interface { - ListSecurityPolicies(context.Context, *ListSecurityPoliciesInput, ...func(*Options)) (*ListSecurityPoliciesOutput, error) -} - -var _ ListSecurityPoliciesAPIClient = (*Client)(nil) - // ListSecurityPoliciesPaginatorOptions is the paginator options for // ListSecurityPolicies type ListSecurityPoliciesPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListSecurityPoliciesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSecurityPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListSecurityPoliciesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListSecurityPoliciesAPIClient is a client that implements the +// ListSecurityPolicies operation. +type ListSecurityPoliciesAPIClient interface { + ListSecurityPolicies(context.Context, *ListSecurityPoliciesInput, ...func(*Options)) (*ListSecurityPoliciesOutput, error) +} + +var _ ListSecurityPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSecurityPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListServers.go b/service/transfer/api_op_ListServers.go index 510c5d1e9e1..1601897badf 100644 --- a/service/transfer/api_op_ListServers.go +++ b/service/transfer/api_op_ListServers.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListServersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServers(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListServersMiddlewares(stack *middleware.Stack, opt return nil } -// ListServersAPIClient is a client that implements the ListServers operation. -type ListServersAPIClient interface { - ListServers(context.Context, *ListServersInput, ...func(*Options)) (*ListServersOutput, error) -} - -var _ ListServersAPIClient = (*Client)(nil) - // ListServersPaginatorOptions is the paginator options for ListServers type ListServersPaginatorOptions struct { // Specifies the number of servers to return as a response to the ListServers @@ -210,6 +206,9 @@ func (p *ListServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListServersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListServersAPIClient is a client that implements the ListServers operation. +type ListServersAPIClient interface { + ListServers(context.Context, *ListServersInput, ...func(*Options)) (*ListServersOutput, error) +} + +var _ ListServersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListTagsForResource.go b/service/transfer/api_op_ListTagsForResource.go index b9b2329ca21..e0166359566 100644 --- a/service/transfer/api_op_ListTagsForResource.go +++ b/service/transfer/api_op_ListTagsForResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -151,14 +154,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -224,6 +219,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -243,6 +241,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListUsers.go b/service/transfer/api_op_ListUsers.go index fe3f977b400..f7308e18a25 100644 --- a/service/transfer/api_op_ListUsers.go +++ b/service/transfer/api_op_ListUsers.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -152,13 +155,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // Specifies the number of users to return as a response to the ListUsers request. @@ -222,6 +218,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +240,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_ListWorkflows.go b/service/transfer/api_op_ListWorkflows.go index a3b3c0f7129..555ed56e9df 100644 --- a/service/transfer/api_op_ListWorkflows.go +++ b/service/transfer/api_op_ListWorkflows.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkflows(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListWorkflowsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. -type ListWorkflowsAPIClient interface { - ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) -} - -var _ ListWorkflowsAPIClient = (*Client)(nil) - // ListWorkflowsPaginatorOptions is the paginator options for ListWorkflows type ListWorkflowsPaginatorOptions struct { // Specifies the maximum number of workflows to return. @@ -208,6 +204,9 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkflows(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListWorkflowsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkflowsAPIClient is a client that implements the ListWorkflows operation. +type ListWorkflowsAPIClient interface { + ListWorkflows(context.Context, *ListWorkflowsInput, ...func(*Options)) (*ListWorkflowsOutput, error) +} + +var _ ListWorkflowsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkflows(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/transfer/api_op_SendWorkflowStepState.go b/service/transfer/api_op_SendWorkflowStepState.go index 55a259a2e7f..2a8fc543764 100644 --- a/service/transfer/api_op_SendWorkflowStepState.go +++ b/service/transfer/api_op_SendWorkflowStepState.go @@ -122,6 +122,9 @@ func (c *Client) addOperationSendWorkflowStepStateMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSendWorkflowStepStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_StartDirectoryListing.go b/service/transfer/api_op_StartDirectoryListing.go index b0b9209dc09..ad93b4ce0c8 100644 --- a/service/transfer/api_op_StartDirectoryListing.go +++ b/service/transfer/api_op_StartDirectoryListing.go @@ -160,6 +160,9 @@ func (c *Client) addOperationStartDirectoryListingMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartDirectoryListingValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_StartFileTransfer.go b/service/transfer/api_op_StartFileTransfer.go index 154e19e4c3d..8f55046f9d7 100644 --- a/service/transfer/api_op_StartFileTransfer.go +++ b/service/transfer/api_op_StartFileTransfer.go @@ -146,6 +146,9 @@ func (c *Client) addOperationStartFileTransferMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartFileTransferValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_StartServer.go b/service/transfer/api_op_StartServer.go index c1ee0b223ef..f8fc3f5267f 100644 --- a/service/transfer/api_op_StartServer.go +++ b/service/transfer/api_op_StartServer.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStartServerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_StopServer.go b/service/transfer/api_op_StopServer.go index fe0659b7849..332ca05240e 100644 --- a/service/transfer/api_op_StopServer.go +++ b/service/transfer/api_op_StopServer.go @@ -113,6 +113,9 @@ func (c *Client) addOperationStopServerMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_TagResource.go b/service/transfer/api_op_TagResource.go index 048ec9f3144..000e63b0ff9 100644 --- a/service/transfer/api_op_TagResource.go +++ b/service/transfer/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_TestConnection.go b/service/transfer/api_op_TestConnection.go index 97c0e16c027..597486ff579 100644 --- a/service/transfer/api_op_TestConnection.go +++ b/service/transfer/api_op_TestConnection.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTestConnectionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestConnectionValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_TestIdentityProvider.go b/service/transfer/api_op_TestIdentityProvider.go index ef3f0fd1800..dd085dd8d96 100644 --- a/service/transfer/api_op_TestIdentityProvider.go +++ b/service/transfer/api_op_TestIdentityProvider.go @@ -188,6 +188,9 @@ func (c *Client) addOperationTestIdentityProviderMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UntagResource.go b/service/transfer/api_op_UntagResource.go index 929528d2223..4431e9e5b2c 100644 --- a/service/transfer/api_op_UntagResource.go +++ b/service/transfer/api_op_UntagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateAccess.go b/service/transfer/api_op_UpdateAccess.go index 91ab7ec16b8..93176443c9d 100644 --- a/service/transfer/api_op_UpdateAccess.go +++ b/service/transfer/api_op_UpdateAccess.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdateAccessMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateAgreement.go b/service/transfer/api_op_UpdateAgreement.go index 2dd1d0f5d63..06787288877 100644 --- a/service/transfer/api_op_UpdateAgreement.go +++ b/service/transfer/api_op_UpdateAgreement.go @@ -171,6 +171,9 @@ func (c *Client) addOperationUpdateAgreementMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAgreementValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateCertificate.go b/service/transfer/api_op_UpdateCertificate.go index 63e8a14d9cb..32d1fa59832 100644 --- a/service/transfer/api_op_UpdateCertificate.go +++ b/service/transfer/api_op_UpdateCertificate.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateCertificateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateConnector.go b/service/transfer/api_op_UpdateConnector.go index bd853146d95..e5483b68652 100644 --- a/service/transfer/api_op_UpdateConnector.go +++ b/service/transfer/api_op_UpdateConnector.go @@ -158,6 +158,9 @@ func (c *Client) addOperationUpdateConnectorMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectorValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateHostKey.go b/service/transfer/api_op_UpdateHostKey.go index b175dc0accd..eb2461b4370 100644 --- a/service/transfer/api_op_UpdateHostKey.go +++ b/service/transfer/api_op_UpdateHostKey.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateHostKeyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateHostKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateProfile.go b/service/transfer/api_op_UpdateProfile.go index a268fb73a57..07b17f5e351 100644 --- a/service/transfer/api_op_UpdateProfile.go +++ b/service/transfer/api_op_UpdateProfile.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateServer.go b/service/transfer/api_op_UpdateServer.go index 7f4b626259a..29b52709754 100644 --- a/service/transfer/api_op_UpdateServer.go +++ b/service/transfer/api_op_UpdateServer.go @@ -329,6 +329,9 @@ func (c *Client) addOperationUpdateServerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServerValidationMiddleware(stack); err != nil { return err } diff --git a/service/transfer/api_op_UpdateUser.go b/service/transfer/api_op_UpdateUser.go index 4b88ff5771d..4ba7565692c 100644 --- a/service/transfer/api_op_UpdateUser.go +++ b/service/transfer/api_op_UpdateUser.go @@ -226,6 +226,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_client.go b/service/translate/api_client.go index be249b118e1..33f08d37b80 100644 --- a/service/translate/api_client.go +++ b/service/translate/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/translate/api_op_CreateParallelData.go b/service/translate/api_op_CreateParallelData.go index 92cdda23adc..7eced7cb2b6 100644 --- a/service/translate/api_op_CreateParallelData.go +++ b/service/translate/api_op_CreateParallelData.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateParallelDataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateParallelDataMiddleware(stack, options); err != nil { return err } diff --git a/service/translate/api_op_DeleteParallelData.go b/service/translate/api_op_DeleteParallelData.go index 4f0c2bd554b..4caa0b0ae9c 100644 --- a/service/translate/api_op_DeleteParallelData.go +++ b/service/translate/api_op_DeleteParallelData.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteParallelDataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteParallelDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_DeleteTerminology.go b/service/translate/api_op_DeleteTerminology.go index 72886073148..64ed406d9c3 100644 --- a/service/translate/api_op_DeleteTerminology.go +++ b/service/translate/api_op_DeleteTerminology.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTerminologyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTerminologyValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_DescribeTextTranslationJob.go b/service/translate/api_op_DescribeTextTranslationJob.go index d05eb430950..9f2d8d16994 100644 --- a/service/translate/api_op_DescribeTextTranslationJob.go +++ b/service/translate/api_op_DescribeTextTranslationJob.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeTextTranslationJobMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTextTranslationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_GetParallelData.go b/service/translate/api_op_GetParallelData.go index 3728767f0a5..8583d1a7909 100644 --- a/service/translate/api_op_GetParallelData.go +++ b/service/translate/api_op_GetParallelData.go @@ -134,6 +134,9 @@ func (c *Client) addOperationGetParallelDataMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetParallelDataValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_GetTerminology.go b/service/translate/api_op_GetTerminology.go index 04bd6000cad..99ac407500a 100644 --- a/service/translate/api_op_GetTerminology.go +++ b/service/translate/api_op_GetTerminology.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetTerminologyMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTerminologyValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_ImportTerminology.go b/service/translate/api_op_ImportTerminology.go index 592ba61df20..3e61bb78b5a 100644 --- a/service/translate/api_op_ImportTerminology.go +++ b/service/translate/api_op_ImportTerminology.go @@ -145,6 +145,9 @@ func (c *Client) addOperationImportTerminologyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportTerminologyValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_ListLanguages.go b/service/translate/api_op_ListLanguages.go index 29c814bf343..e2a33706816 100644 --- a/service/translate/api_op_ListLanguages.go +++ b/service/translate/api_op_ListLanguages.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListLanguagesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLanguages(options.Region), middleware.Before); err != nil { return err } @@ -140,13 +143,6 @@ func (c *Client) addOperationListLanguagesMiddlewares(stack *middleware.Stack, o return nil } -// ListLanguagesAPIClient is a client that implements the ListLanguages operation. -type ListLanguagesAPIClient interface { - ListLanguages(context.Context, *ListLanguagesInput, ...func(*Options)) (*ListLanguagesOutput, error) -} - -var _ ListLanguagesAPIClient = (*Client)(nil) - // ListLanguagesPaginatorOptions is the paginator options for ListLanguages type ListLanguagesPaginatorOptions struct { // The maximum number of results to return in each response. @@ -210,6 +206,9 @@ func (p *ListLanguagesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLanguages(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +228,13 @@ func (p *ListLanguagesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListLanguagesAPIClient is a client that implements the ListLanguages operation. +type ListLanguagesAPIClient interface { + ListLanguages(context.Context, *ListLanguagesInput, ...func(*Options)) (*ListLanguagesOutput, error) +} + +var _ ListLanguagesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLanguages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/translate/api_op_ListParallelData.go b/service/translate/api_op_ListParallelData.go index eacb701a1ce..1cb287f13c4 100644 --- a/service/translate/api_op_ListParallelData.go +++ b/service/translate/api_op_ListParallelData.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListParallelDataMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListParallelData(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListParallelDataMiddlewares(stack *middleware.Stack return nil } -// ListParallelDataAPIClient is a client that implements the ListParallelData -// operation. -type ListParallelDataAPIClient interface { - ListParallelData(context.Context, *ListParallelDataInput, ...func(*Options)) (*ListParallelDataOutput, error) -} - -var _ ListParallelDataAPIClient = (*Client)(nil) - // ListParallelDataPaginatorOptions is the paginator options for ListParallelData type ListParallelDataPaginatorOptions struct { // The maximum number of parallel data resources returned for each request. @@ -204,6 +199,9 @@ func (p *ListParallelDataPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListParallelData(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListParallelDataPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListParallelDataAPIClient is a client that implements the ListParallelData +// operation. +type ListParallelDataAPIClient interface { + ListParallelData(context.Context, *ListParallelDataInput, ...func(*Options)) (*ListParallelDataOutput, error) +} + +var _ ListParallelDataAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListParallelData(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/translate/api_op_ListTagsForResource.go b/service/translate/api_op_ListTagsForResource.go index 3caf816b8c1..ffbbcd745a7 100644 --- a/service/translate/api_op_ListTagsForResource.go +++ b/service/translate/api_op_ListTagsForResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_ListTerminologies.go b/service/translate/api_op_ListTerminologies.go index 828e5917873..01bb96cff47 100644 --- a/service/translate/api_op_ListTerminologies.go +++ b/service/translate/api_op_ListTerminologies.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTerminologiesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTerminologies(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListTerminologiesMiddlewares(stack *middleware.Stac return nil } -// ListTerminologiesAPIClient is a client that implements the ListTerminologies -// operation. -type ListTerminologiesAPIClient interface { - ListTerminologies(context.Context, *ListTerminologiesInput, ...func(*Options)) (*ListTerminologiesOutput, error) -} - -var _ ListTerminologiesAPIClient = (*Client)(nil) - // ListTerminologiesPaginatorOptions is the paginator options for ListTerminologies type ListTerminologiesPaginatorOptions struct { // The maximum number of custom terminologies returned per list request. @@ -204,6 +199,9 @@ func (p *ListTerminologiesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTerminologies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListTerminologiesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListTerminologiesAPIClient is a client that implements the ListTerminologies +// operation. +type ListTerminologiesAPIClient interface { + ListTerminologies(context.Context, *ListTerminologiesInput, ...func(*Options)) (*ListTerminologiesOutput, error) +} + +var _ ListTerminologiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTerminologies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/translate/api_op_ListTextTranslationJobs.go b/service/translate/api_op_ListTextTranslationJobs.go index 56704c8bb46..ab702e5c4ab 100644 --- a/service/translate/api_op_ListTextTranslationJobs.go +++ b/service/translate/api_op_ListTextTranslationJobs.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListTextTranslationJobsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTextTranslationJobs(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationListTextTranslationJobsMiddlewares(stack *middlewar return nil } -// ListTextTranslationJobsAPIClient is a client that implements the -// ListTextTranslationJobs operation. -type ListTextTranslationJobsAPIClient interface { - ListTextTranslationJobs(context.Context, *ListTextTranslationJobsInput, ...func(*Options)) (*ListTextTranslationJobsOutput, error) -} - -var _ ListTextTranslationJobsAPIClient = (*Client)(nil) - // ListTextTranslationJobsPaginatorOptions is the paginator options for // ListTextTranslationJobs type ListTextTranslationJobsPaginatorOptions struct { @@ -210,6 +205,9 @@ func (p *ListTextTranslationJobsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTextTranslationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListTextTranslationJobsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListTextTranslationJobsAPIClient is a client that implements the +// ListTextTranslationJobs operation. +type ListTextTranslationJobsAPIClient interface { + ListTextTranslationJobs(context.Context, *ListTextTranslationJobsInput, ...func(*Options)) (*ListTextTranslationJobsOutput, error) +} + +var _ ListTextTranslationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTextTranslationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/translate/api_op_StartTextTranslationJob.go b/service/translate/api_op_StartTextTranslationJob.go index b3573db7c2d..65c44ba8095 100644 --- a/service/translate/api_op_StartTextTranslationJob.go +++ b/service/translate/api_op_StartTextTranslationJob.go @@ -229,6 +229,9 @@ func (c *Client) addOperationStartTextTranslationJobMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartTextTranslationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/translate/api_op_StopTextTranslationJob.go b/service/translate/api_op_StopTextTranslationJob.go index 3abe4912c25..bf72ffb417f 100644 --- a/service/translate/api_op_StopTextTranslationJob.go +++ b/service/translate/api_op_StopTextTranslationJob.go @@ -118,6 +118,9 @@ func (c *Client) addOperationStopTextTranslationJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopTextTranslationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_TagResource.go b/service/translate/api_op_TagResource.go index 27952085764..aca6dbdb10b 100644 --- a/service/translate/api_op_TagResource.go +++ b/service/translate/api_op_TagResource.go @@ -113,6 +113,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_TranslateDocument.go b/service/translate/api_op_TranslateDocument.go index d662f1e7eb3..b1162523a2f 100644 --- a/service/translate/api_op_TranslateDocument.go +++ b/service/translate/api_op_TranslateDocument.go @@ -194,6 +194,9 @@ func (c *Client) addOperationTranslateDocumentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTranslateDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_TranslateText.go b/service/translate/api_op_TranslateText.go index e490648050b..7047ec794c1 100644 --- a/service/translate/api_op_TranslateText.go +++ b/service/translate/api_op_TranslateText.go @@ -176,6 +176,9 @@ func (c *Client) addOperationTranslateTextMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTranslateTextValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_UntagResource.go b/service/translate/api_op_UntagResource.go index 8725d85663a..62cda96bb96 100644 --- a/service/translate/api_op_UntagResource.go +++ b/service/translate/api_op_UntagResource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/translate/api_op_UpdateParallelData.go b/service/translate/api_op_UpdateParallelData.go index d73e5cf97cd..24e5cc0b303 100644 --- a/service/translate/api_op_UpdateParallelData.go +++ b/service/translate/api_op_UpdateParallelData.go @@ -133,6 +133,9 @@ func (c *Client) addOperationUpdateParallelDataMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateParallelDataMiddleware(stack, options); err != nil { return err } diff --git a/service/trustedadvisor/api_client.go b/service/trustedadvisor/api_client.go index e4d45313017..9e1458301af 100644 --- a/service/trustedadvisor/api_client.go +++ b/service/trustedadvisor/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/trustedadvisor/api_op_BatchUpdateRecommendationResourceExclusion.go b/service/trustedadvisor/api_op_BatchUpdateRecommendationResourceExclusion.go index 0f1e45b17f0..9eb0f17d2c1 100644 --- a/service/trustedadvisor/api_op_BatchUpdateRecommendationResourceExclusion.go +++ b/service/trustedadvisor/api_op_BatchUpdateRecommendationResourceExclusion.go @@ -109,6 +109,9 @@ func (c *Client) addOperationBatchUpdateRecommendationResourceExclusionMiddlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateRecommendationResourceExclusionValidationMiddleware(stack); err != nil { return err } diff --git a/service/trustedadvisor/api_op_GetOrganizationRecommendation.go b/service/trustedadvisor/api_op_GetOrganizationRecommendation.go index 989572c6de1..b3cb1092436 100644 --- a/service/trustedadvisor/api_op_GetOrganizationRecommendation.go +++ b/service/trustedadvisor/api_op_GetOrganizationRecommendation.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetOrganizationRecommendationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetOrganizationRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/trustedadvisor/api_op_GetRecommendation.go b/service/trustedadvisor/api_op_GetRecommendation.go index a39d58891e8..967f76d85ea 100644 --- a/service/trustedadvisor/api_op_GetRecommendation.go +++ b/service/trustedadvisor/api_op_GetRecommendation.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetRecommendationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationValidationMiddleware(stack); err != nil { return err } diff --git a/service/trustedadvisor/api_op_ListChecks.go b/service/trustedadvisor/api_op_ListChecks.go index 5bab0676d7f..b503bb17df8 100644 --- a/service/trustedadvisor/api_op_ListChecks.go +++ b/service/trustedadvisor/api_op_ListChecks.go @@ -126,6 +126,9 @@ func (c *Client) addOperationListChecksMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChecks(options.Region), middleware.Before); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListChecksMiddlewares(stack *middleware.Stack, opti return nil } -// ListChecksAPIClient is a client that implements the ListChecks operation. -type ListChecksAPIClient interface { - ListChecks(context.Context, *ListChecksInput, ...func(*Options)) (*ListChecksOutput, error) -} - -var _ ListChecksAPIClient = (*Client)(nil) - // ListChecksPaginatorOptions is the paginator options for ListChecks type ListChecksPaginatorOptions struct { // The maximum number of results to return per page. @@ -217,6 +213,9 @@ func (p *ListChecksPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListChecks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListChecksPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListChecksAPIClient is a client that implements the ListChecks operation. +type ListChecksAPIClient interface { + ListChecks(context.Context, *ListChecksInput, ...func(*Options)) (*ListChecksOutput, error) +} + +var _ ListChecksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListChecks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/trustedadvisor/api_op_ListOrganizationRecommendationAccounts.go b/service/trustedadvisor/api_op_ListOrganizationRecommendationAccounts.go index 0b745b05043..cf66f29ebb2 100644 --- a/service/trustedadvisor/api_op_ListOrganizationRecommendationAccounts.go +++ b/service/trustedadvisor/api_op_ListOrganizationRecommendationAccounts.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListOrganizationRecommendationAccountsMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrganizationRecommendationAccountsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationListOrganizationRecommendationAccountsMiddlewares(s return nil } -// ListOrganizationRecommendationAccountsAPIClient is a client that implements the -// ListOrganizationRecommendationAccounts operation. -type ListOrganizationRecommendationAccountsAPIClient interface { - ListOrganizationRecommendationAccounts(context.Context, *ListOrganizationRecommendationAccountsInput, ...func(*Options)) (*ListOrganizationRecommendationAccountsOutput, error) -} - -var _ ListOrganizationRecommendationAccountsAPIClient = (*Client)(nil) - // ListOrganizationRecommendationAccountsPaginatorOptions is the paginator options // for ListOrganizationRecommendationAccounts type ListOrganizationRecommendationAccountsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListOrganizationRecommendationAccountsPaginator) NextPage(ctx context.C } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationRecommendationAccounts(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListOrganizationRecommendationAccountsPaginator) NextPage(ctx context.C return result, nil } +// ListOrganizationRecommendationAccountsAPIClient is a client that implements the +// ListOrganizationRecommendationAccounts operation. +type ListOrganizationRecommendationAccountsAPIClient interface { + ListOrganizationRecommendationAccounts(context.Context, *ListOrganizationRecommendationAccountsInput, ...func(*Options)) (*ListOrganizationRecommendationAccountsOutput, error) +} + +var _ ListOrganizationRecommendationAccountsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationRecommendationAccounts(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/trustedadvisor/api_op_ListOrganizationRecommendationResources.go b/service/trustedadvisor/api_op_ListOrganizationRecommendationResources.go index 8a146638ef5..47aa02b727e 100644 --- a/service/trustedadvisor/api_op_ListOrganizationRecommendationResources.go +++ b/service/trustedadvisor/api_op_ListOrganizationRecommendationResources.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListOrganizationRecommendationResourcesMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListOrganizationRecommendationResourcesValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListOrganizationRecommendationResourcesMiddlewares( return nil } -// ListOrganizationRecommendationResourcesAPIClient is a client that implements -// the ListOrganizationRecommendationResources operation. -type ListOrganizationRecommendationResourcesAPIClient interface { - ListOrganizationRecommendationResources(context.Context, *ListOrganizationRecommendationResourcesInput, ...func(*Options)) (*ListOrganizationRecommendationResourcesOutput, error) -} - -var _ ListOrganizationRecommendationResourcesAPIClient = (*Client)(nil) - // ListOrganizationRecommendationResourcesPaginatorOptions is the paginator // options for ListOrganizationRecommendationResources type ListOrganizationRecommendationResourcesPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListOrganizationRecommendationResourcesPaginator) NextPage(ctx context. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationRecommendationResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListOrganizationRecommendationResourcesPaginator) NextPage(ctx context. return result, nil } +// ListOrganizationRecommendationResourcesAPIClient is a client that implements +// the ListOrganizationRecommendationResources operation. +type ListOrganizationRecommendationResourcesAPIClient interface { + ListOrganizationRecommendationResources(context.Context, *ListOrganizationRecommendationResourcesInput, ...func(*Options)) (*ListOrganizationRecommendationResourcesOutput, error) +} + +var _ ListOrganizationRecommendationResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationRecommendationResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/trustedadvisor/api_op_ListOrganizationRecommendations.go b/service/trustedadvisor/api_op_ListOrganizationRecommendations.go index afba26bc509..2418b51cc9a 100644 --- a/service/trustedadvisor/api_op_ListOrganizationRecommendations.go +++ b/service/trustedadvisor/api_op_ListOrganizationRecommendations.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListOrganizationRecommendationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationRecommendations(options.Region), middleware.Before); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationListOrganizationRecommendationsMiddlewares(stack *m return nil } -// ListOrganizationRecommendationsAPIClient is a client that implements the -// ListOrganizationRecommendations operation. -type ListOrganizationRecommendationsAPIClient interface { - ListOrganizationRecommendations(context.Context, *ListOrganizationRecommendationsInput, ...func(*Options)) (*ListOrganizationRecommendationsOutput, error) -} - -var _ ListOrganizationRecommendationsAPIClient = (*Client)(nil) - // ListOrganizationRecommendationsPaginatorOptions is the paginator options for // ListOrganizationRecommendations type ListOrganizationRecommendationsPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListOrganizationRecommendationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizationRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListOrganizationRecommendationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListOrganizationRecommendationsAPIClient is a client that implements the +// ListOrganizationRecommendations operation. +type ListOrganizationRecommendationsAPIClient interface { + ListOrganizationRecommendations(context.Context, *ListOrganizationRecommendationsInput, ...func(*Options)) (*ListOrganizationRecommendationsOutput, error) +} + +var _ ListOrganizationRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizationRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/trustedadvisor/api_op_ListRecommendationResources.go b/service/trustedadvisor/api_op_ListRecommendationResources.go index d0ec99a7003..d42b345d987 100644 --- a/service/trustedadvisor/api_op_ListRecommendationResources.go +++ b/service/trustedadvisor/api_op_ListRecommendationResources.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListRecommendationResourcesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRecommendationResourcesValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListRecommendationResourcesMiddlewares(stack *middl return nil } -// ListRecommendationResourcesAPIClient is a client that implements the -// ListRecommendationResources operation. -type ListRecommendationResourcesAPIClient interface { - ListRecommendationResources(context.Context, *ListRecommendationResourcesInput, ...func(*Options)) (*ListRecommendationResourcesOutput, error) -} - -var _ ListRecommendationResourcesAPIClient = (*Client)(nil) - // ListRecommendationResourcesPaginatorOptions is the paginator options for // ListRecommendationResources type ListRecommendationResourcesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *ListRecommendationResourcesPaginator) NextPage(ctx context.Context, opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendationResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *ListRecommendationResourcesPaginator) NextPage(ctx context.Context, opt return result, nil } +// ListRecommendationResourcesAPIClient is a client that implements the +// ListRecommendationResources operation. +type ListRecommendationResourcesAPIClient interface { + ListRecommendationResources(context.Context, *ListRecommendationResourcesInput, ...func(*Options)) (*ListRecommendationResourcesOutput, error) +} + +var _ ListRecommendationResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendationResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/trustedadvisor/api_op_ListRecommendations.go b/service/trustedadvisor/api_op_ListRecommendations.go index 610110ca29a..01b304230b7 100644 --- a/service/trustedadvisor/api_op_ListRecommendations.go +++ b/service/trustedadvisor/api_op_ListRecommendations.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRecommendations(options.Region), middleware.Before); err != nil { return err } @@ -160,14 +163,6 @@ func (c *Client) addOperationListRecommendationsMiddlewares(stack *middleware.St return nil } -// ListRecommendationsAPIClient is a client that implements the -// ListRecommendations operation. -type ListRecommendationsAPIClient interface { - ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) -} - -var _ ListRecommendationsAPIClient = (*Client)(nil) - // ListRecommendationsPaginatorOptions is the paginator options for // ListRecommendations type ListRecommendationsPaginatorOptions struct { @@ -232,6 +227,9 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRecommendations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -251,6 +249,14 @@ func (p *ListRecommendationsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListRecommendationsAPIClient is a client that implements the +// ListRecommendations operation. +type ListRecommendationsAPIClient interface { + ListRecommendations(context.Context, *ListRecommendationsInput, ...func(*Options)) (*ListRecommendationsOutput, error) +} + +var _ ListRecommendationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/trustedadvisor/api_op_UpdateOrganizationRecommendationLifecycle.go b/service/trustedadvisor/api_op_UpdateOrganizationRecommendationLifecycle.go index 862fa1bb4af..990931299f1 100644 --- a/service/trustedadvisor/api_op_UpdateOrganizationRecommendationLifecycle.go +++ b/service/trustedadvisor/api_op_UpdateOrganizationRecommendationLifecycle.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateOrganizationRecommendationLifecycleMiddleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateOrganizationRecommendationLifecycleValidationMiddleware(stack); err != nil { return err } diff --git a/service/trustedadvisor/api_op_UpdateRecommendationLifecycle.go b/service/trustedadvisor/api_op_UpdateRecommendationLifecycle.go index 5f7ceb29c90..30f3a1acef3 100644 --- a/service/trustedadvisor/api_op_UpdateRecommendationLifecycle.go +++ b/service/trustedadvisor/api_op_UpdateRecommendationLifecycle.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateRecommendationLifecycleMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRecommendationLifecycleValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_client.go b/service/verifiedpermissions/api_client.go index 72aed84e552..21af89f78ba 100644 --- a/service/verifiedpermissions/api_client.go +++ b/service/verifiedpermissions/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/verifiedpermissions/api_op_BatchIsAuthorized.go b/service/verifiedpermissions/api_op_BatchIsAuthorized.go index edd1ce07195..20015f11f45 100644 --- a/service/verifiedpermissions/api_op_BatchIsAuthorized.go +++ b/service/verifiedpermissions/api_op_BatchIsAuthorized.go @@ -141,6 +141,9 @@ func (c *Client) addOperationBatchIsAuthorizedMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchIsAuthorizedValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_BatchIsAuthorizedWithToken.go b/service/verifiedpermissions/api_op_BatchIsAuthorizedWithToken.go index 5ea95b3f494..fa89c9ec29b 100644 --- a/service/verifiedpermissions/api_op_BatchIsAuthorizedWithToken.go +++ b/service/verifiedpermissions/api_op_BatchIsAuthorizedWithToken.go @@ -168,6 +168,9 @@ func (c *Client) addOperationBatchIsAuthorizedWithTokenMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchIsAuthorizedWithTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_CreateIdentitySource.go b/service/verifiedpermissions/api_op_CreateIdentitySource.go index fbafb063559..bde1c04acae 100644 --- a/service/verifiedpermissions/api_op_CreateIdentitySource.go +++ b/service/verifiedpermissions/api_op_CreateIdentitySource.go @@ -187,6 +187,9 @@ func (c *Client) addOperationCreateIdentitySourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIdentitySourceMiddleware(stack, options); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_CreatePolicy.go b/service/verifiedpermissions/api_op_CreatePolicy.go index 98668510e76..a96bb7209a3 100644 --- a/service/verifiedpermissions/api_op_CreatePolicy.go +++ b/service/verifiedpermissions/api_op_CreatePolicy.go @@ -192,6 +192,9 @@ func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePolicyMiddleware(stack, options); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_CreatePolicyStore.go b/service/verifiedpermissions/api_op_CreatePolicyStore.go index d663534735c..ceb7457309a 100644 --- a/service/verifiedpermissions/api_op_CreatePolicyStore.go +++ b/service/verifiedpermissions/api_op_CreatePolicyStore.go @@ -167,6 +167,9 @@ func (c *Client) addOperationCreatePolicyStoreMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePolicyStoreMiddleware(stack, options); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_CreatePolicyTemplate.go b/service/verifiedpermissions/api_op_CreatePolicyTemplate.go index 46c9b7d90a3..ca3c8544c8a 100644 --- a/service/verifiedpermissions/api_op_CreatePolicyTemplate.go +++ b/service/verifiedpermissions/api_op_CreatePolicyTemplate.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreatePolicyTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePolicyTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_DeleteIdentitySource.go b/service/verifiedpermissions/api_op_DeleteIdentitySource.go index f5014a84cd0..b36967db923 100644 --- a/service/verifiedpermissions/api_op_DeleteIdentitySource.go +++ b/service/verifiedpermissions/api_op_DeleteIdentitySource.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteIdentitySourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentitySourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_DeletePolicy.go b/service/verifiedpermissions/api_op_DeletePolicy.go index 790963e5f74..0db65b328ca 100644 --- a/service/verifiedpermissions/api_op_DeletePolicy.go +++ b/service/verifiedpermissions/api_op_DeletePolicy.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_DeletePolicyStore.go b/service/verifiedpermissions/api_op_DeletePolicyStore.go index 85b6a50f378..f55b9c27749 100644 --- a/service/verifiedpermissions/api_op_DeletePolicyStore.go +++ b/service/verifiedpermissions/api_op_DeletePolicyStore.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeletePolicyStoreMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_DeletePolicyTemplate.go b/service/verifiedpermissions/api_op_DeletePolicyTemplate.go index 55328983ce4..903376ff6dd 100644 --- a/service/verifiedpermissions/api_op_DeletePolicyTemplate.go +++ b/service/verifiedpermissions/api_op_DeletePolicyTemplate.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeletePolicyTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePolicyTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_GetIdentitySource.go b/service/verifiedpermissions/api_op_GetIdentitySource.go index 78849e6267e..01d9c52601f 100644 --- a/service/verifiedpermissions/api_op_GetIdentitySource.go +++ b/service/verifiedpermissions/api_op_GetIdentitySource.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetIdentitySourceMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentitySourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_GetPolicy.go b/service/verifiedpermissions/api_op_GetPolicy.go index f52446979f7..47fa61fa998 100644 --- a/service/verifiedpermissions/api_op_GetPolicy.go +++ b/service/verifiedpermissions/api_op_GetPolicy.go @@ -158,6 +158,9 @@ func (c *Client) addOperationGetPolicyMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_GetPolicyStore.go b/service/verifiedpermissions/api_op_GetPolicyStore.go index 8c5363637b9..dd04ab29717 100644 --- a/service/verifiedpermissions/api_op_GetPolicyStore.go +++ b/service/verifiedpermissions/api_op_GetPolicyStore.go @@ -133,6 +133,9 @@ func (c *Client) addOperationGetPolicyStoreMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_GetPolicyTemplate.go b/service/verifiedpermissions/api_op_GetPolicyTemplate.go index d61cc82dd6d..859e6cf77af 100644 --- a/service/verifiedpermissions/api_op_GetPolicyTemplate.go +++ b/service/verifiedpermissions/api_op_GetPolicyTemplate.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetPolicyTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPolicyTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_GetSchema.go b/service/verifiedpermissions/api_op_GetSchema.go index ca8f5c90cd1..188ec1c34f2 100644 --- a/service/verifiedpermissions/api_op_GetSchema.go +++ b/service/verifiedpermissions/api_op_GetSchema.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetSchemaMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_IsAuthorized.go b/service/verifiedpermissions/api_op_IsAuthorized.go index c167c02f8a9..27f72ed638d 100644 --- a/service/verifiedpermissions/api_op_IsAuthorized.go +++ b/service/verifiedpermissions/api_op_IsAuthorized.go @@ -153,6 +153,9 @@ func (c *Client) addOperationIsAuthorizedMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIsAuthorizedValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_IsAuthorizedWithToken.go b/service/verifiedpermissions/api_op_IsAuthorizedWithToken.go index 4ce4867eaa5..e98e08c300a 100644 --- a/service/verifiedpermissions/api_op_IsAuthorizedWithToken.go +++ b/service/verifiedpermissions/api_op_IsAuthorizedWithToken.go @@ -190,6 +190,9 @@ func (c *Client) addOperationIsAuthorizedWithTokenMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpIsAuthorizedWithTokenValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_ListIdentitySources.go b/service/verifiedpermissions/api_op_ListIdentitySources.go index 8b721f79503..6fc6f7e103f 100644 --- a/service/verifiedpermissions/api_op_ListIdentitySources.go +++ b/service/verifiedpermissions/api_op_ListIdentitySources.go @@ -140,6 +140,9 @@ func (c *Client) addOperationListIdentitySourcesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentitySourcesValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationListIdentitySourcesMiddlewares(stack *middleware.St return nil } -// ListIdentitySourcesAPIClient is a client that implements the -// ListIdentitySources operation. -type ListIdentitySourcesAPIClient interface { - ListIdentitySources(context.Context, *ListIdentitySourcesInput, ...func(*Options)) (*ListIdentitySourcesOutput, error) -} - -var _ ListIdentitySourcesAPIClient = (*Client)(nil) - // ListIdentitySourcesPaginatorOptions is the paginator options for // ListIdentitySources type ListIdentitySourcesPaginatorOptions struct { @@ -246,6 +241,9 @@ func (p *ListIdentitySourcesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentitySources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -265,6 +263,14 @@ func (p *ListIdentitySourcesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListIdentitySourcesAPIClient is a client that implements the +// ListIdentitySources operation. +type ListIdentitySourcesAPIClient interface { + ListIdentitySources(context.Context, *ListIdentitySourcesInput, ...func(*Options)) (*ListIdentitySourcesOutput, error) +} + +var _ ListIdentitySourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentitySources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/verifiedpermissions/api_op_ListPolicies.go b/service/verifiedpermissions/api_op_ListPolicies.go index 4258ea597a5..cd57ee5cf82 100644 --- a/service/verifiedpermissions/api_op_ListPolicies.go +++ b/service/verifiedpermissions/api_op_ListPolicies.go @@ -138,6 +138,9 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPoliciesValidationMiddleware(stack); err != nil { return err } @@ -162,13 +165,6 @@ func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, op return nil } -// ListPoliciesAPIClient is a client that implements the ListPolicies operation. -type ListPoliciesAPIClient interface { - ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) -} - -var _ ListPoliciesAPIClient = (*Client)(nil) - // ListPoliciesPaginatorOptions is the paginator options for ListPolicies type ListPoliciesPaginatorOptions struct { // Specifies the total number of results that you want included in each response. @@ -241,6 +237,9 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +259,13 @@ func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListPoliciesAPIClient is a client that implements the ListPolicies operation. +type ListPoliciesAPIClient interface { + ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error) +} + +var _ ListPoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/verifiedpermissions/api_op_ListPolicyStores.go b/service/verifiedpermissions/api_op_ListPolicyStores.go index 261dd9d01e7..57b7ebe9b4a 100644 --- a/service/verifiedpermissions/api_op_ListPolicyStores.go +++ b/service/verifiedpermissions/api_op_ListPolicyStores.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListPolicyStoresMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicyStores(options.Region), middleware.Before); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationListPolicyStoresMiddlewares(stack *middleware.Stack return nil } -// ListPolicyStoresAPIClient is a client that implements the ListPolicyStores -// operation. -type ListPolicyStoresAPIClient interface { - ListPolicyStores(context.Context, *ListPolicyStoresInput, ...func(*Options)) (*ListPolicyStoresOutput, error) -} - -var _ ListPolicyStoresAPIClient = (*Client)(nil) - // ListPolicyStoresPaginatorOptions is the paginator options for ListPolicyStores type ListPolicyStoresPaginatorOptions struct { // Specifies the total number of results that you want included in each response. @@ -230,6 +225,9 @@ func (p *ListPolicyStoresPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListPolicyStoresPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListPolicyStoresAPIClient is a client that implements the ListPolicyStores +// operation. +type ListPolicyStoresAPIClient interface { + ListPolicyStores(context.Context, *ListPolicyStoresInput, ...func(*Options)) (*ListPolicyStoresOutput, error) +} + +var _ ListPolicyStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/verifiedpermissions/api_op_ListPolicyTemplates.go b/service/verifiedpermissions/api_op_ListPolicyTemplates.go index 856436f488e..f420a80082b 100644 --- a/service/verifiedpermissions/api_op_ListPolicyTemplates.go +++ b/service/verifiedpermissions/api_op_ListPolicyTemplates.go @@ -135,6 +135,9 @@ func (c *Client) addOperationListPolicyTemplatesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListPolicyTemplatesValidationMiddleware(stack); err != nil { return err } @@ -159,14 +162,6 @@ func (c *Client) addOperationListPolicyTemplatesMiddlewares(stack *middleware.St return nil } -// ListPolicyTemplatesAPIClient is a client that implements the -// ListPolicyTemplates operation. -type ListPolicyTemplatesAPIClient interface { - ListPolicyTemplates(context.Context, *ListPolicyTemplatesInput, ...func(*Options)) (*ListPolicyTemplatesOutput, error) -} - -var _ ListPolicyTemplatesAPIClient = (*Client)(nil) - // ListPolicyTemplatesPaginatorOptions is the paginator options for // ListPolicyTemplates type ListPolicyTemplatesPaginatorOptions struct { @@ -241,6 +236,9 @@ func (p *ListPolicyTemplatesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPolicyTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -260,6 +258,14 @@ func (p *ListPolicyTemplatesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListPolicyTemplatesAPIClient is a client that implements the +// ListPolicyTemplates operation. +type ListPolicyTemplatesAPIClient interface { + ListPolicyTemplates(context.Context, *ListPolicyTemplatesInput, ...func(*Options)) (*ListPolicyTemplatesOutput, error) +} + +var _ ListPolicyTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPolicyTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/verifiedpermissions/api_op_PutSchema.go b/service/verifiedpermissions/api_op_PutSchema.go index 2ee8ba79ab6..3ce80824ceb 100644 --- a/service/verifiedpermissions/api_op_PutSchema.go +++ b/service/verifiedpermissions/api_op_PutSchema.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutSchemaMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutSchemaValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_UpdateIdentitySource.go b/service/verifiedpermissions/api_op_UpdateIdentitySource.go index 8f9074735ca..158910a953d 100644 --- a/service/verifiedpermissions/api_op_UpdateIdentitySource.go +++ b/service/verifiedpermissions/api_op_UpdateIdentitySource.go @@ -153,6 +153,9 @@ func (c *Client) addOperationUpdateIdentitySourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdentitySourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_UpdatePolicy.go b/service/verifiedpermissions/api_op_UpdatePolicy.go index 5b1f9e40223..70e941578b6 100644 --- a/service/verifiedpermissions/api_op_UpdatePolicy.go +++ b/service/verifiedpermissions/api_op_UpdatePolicy.go @@ -212,6 +212,9 @@ func (c *Client) addOperationUpdatePolicyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_UpdatePolicyStore.go b/service/verifiedpermissions/api_op_UpdatePolicyStore.go index 9e1342be57f..96adda96ba2 100644 --- a/service/verifiedpermissions/api_op_UpdatePolicyStore.go +++ b/service/verifiedpermissions/api_op_UpdatePolicyStore.go @@ -142,6 +142,9 @@ func (c *Client) addOperationUpdatePolicyStoreMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePolicyStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/verifiedpermissions/api_op_UpdatePolicyTemplate.go b/service/verifiedpermissions/api_op_UpdatePolicyTemplate.go index c0017feee19..da108869952 100644 --- a/service/verifiedpermissions/api_op_UpdatePolicyTemplate.go +++ b/service/verifiedpermissions/api_op_UpdatePolicyTemplate.go @@ -164,6 +164,9 @@ func (c *Client) addOperationUpdatePolicyTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePolicyTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_client.go b/service/voiceid/api_client.go index 84d283cbdc2..64eb4c1c86d 100644 --- a/service/voiceid/api_client.go +++ b/service/voiceid/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/voiceid/api_op_AssociateFraudster.go b/service/voiceid/api_op_AssociateFraudster.go index 1e14829d1c0..47b1ff2b7ff 100644 --- a/service/voiceid/api_op_AssociateFraudster.go +++ b/service/voiceid/api_op_AssociateFraudster.go @@ -116,6 +116,9 @@ func (c *Client) addOperationAssociateFraudsterMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateFraudsterValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_CreateDomain.go b/service/voiceid/api_op_CreateDomain.go index 36030ec0407..d2cb4237abf 100644 --- a/service/voiceid/api_op_CreateDomain.go +++ b/service/voiceid/api_op_CreateDomain.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateDomainMiddleware(stack, options); err != nil { return err } diff --git a/service/voiceid/api_op_CreateWatchlist.go b/service/voiceid/api_op_CreateWatchlist.go index 9ffbab28fac..358bc123ca4 100644 --- a/service/voiceid/api_op_CreateWatchlist.go +++ b/service/voiceid/api_op_CreateWatchlist.go @@ -121,6 +121,9 @@ func (c *Client) addOperationCreateWatchlistMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWatchlistMiddleware(stack, options); err != nil { return err } diff --git a/service/voiceid/api_op_DeleteDomain.go b/service/voiceid/api_op_DeleteDomain.go index 5ced25b6dab..e582f7e2d22 100644 --- a/service/voiceid/api_op_DeleteDomain.go +++ b/service/voiceid/api_op_DeleteDomain.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DeleteFraudster.go b/service/voiceid/api_op_DeleteFraudster.go index 0fd9f4dd55f..0963881f372 100644 --- a/service/voiceid/api_op_DeleteFraudster.go +++ b/service/voiceid/api_op_DeleteFraudster.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteFraudsterMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFraudsterValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DeleteSpeaker.go b/service/voiceid/api_op_DeleteSpeaker.go index b536cbbdfd1..4541d077556 100644 --- a/service/voiceid/api_op_DeleteSpeaker.go +++ b/service/voiceid/api_op_DeleteSpeaker.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteSpeakerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSpeakerValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DeleteWatchlist.go b/service/voiceid/api_op_DeleteWatchlist.go index 0e3efadb44e..e1985745066 100644 --- a/service/voiceid/api_op_DeleteWatchlist.go +++ b/service/voiceid/api_op_DeleteWatchlist.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteWatchlistMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWatchlistValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DescribeDomain.go b/service/voiceid/api_op_DescribeDomain.go index f80542bb3cf..e8a6937c947 100644 --- a/service/voiceid/api_op_DescribeDomain.go +++ b/service/voiceid/api_op_DescribeDomain.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DescribeFraudster.go b/service/voiceid/api_op_DescribeFraudster.go index 20e1b9eb27e..87708590eee 100644 --- a/service/voiceid/api_op_DescribeFraudster.go +++ b/service/voiceid/api_op_DescribeFraudster.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeFraudsterMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFraudsterValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DescribeFraudsterRegistrationJob.go b/service/voiceid/api_op_DescribeFraudsterRegistrationJob.go index a7ac5a0bf90..f07557f6ef1 100644 --- a/service/voiceid/api_op_DescribeFraudsterRegistrationJob.go +++ b/service/voiceid/api_op_DescribeFraudsterRegistrationJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeFraudsterRegistrationJobMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFraudsterRegistrationJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DescribeSpeaker.go b/service/voiceid/api_op_DescribeSpeaker.go index 3fe82617c9f..db036e0b21c 100644 --- a/service/voiceid/api_op_DescribeSpeaker.go +++ b/service/voiceid/api_op_DescribeSpeaker.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeSpeakerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSpeakerValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DescribeSpeakerEnrollmentJob.go b/service/voiceid/api_op_DescribeSpeakerEnrollmentJob.go index b1810f471c9..c8ef37c8d2f 100644 --- a/service/voiceid/api_op_DescribeSpeakerEnrollmentJob.go +++ b/service/voiceid/api_op_DescribeSpeakerEnrollmentJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeSpeakerEnrollmentJobMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeSpeakerEnrollmentJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DescribeWatchlist.go b/service/voiceid/api_op_DescribeWatchlist.go index 7401e5dc8b2..4d44be2ecc8 100644 --- a/service/voiceid/api_op_DescribeWatchlist.go +++ b/service/voiceid/api_op_DescribeWatchlist.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeWatchlistMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWatchlistValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_DisassociateFraudster.go b/service/voiceid/api_op_DisassociateFraudster.go index 0f5288bceec..840aabb9adc 100644 --- a/service/voiceid/api_op_DisassociateFraudster.go +++ b/service/voiceid/api_op_DisassociateFraudster.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDisassociateFraudsterMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateFraudsterValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_EvaluateSession.go b/service/voiceid/api_op_EvaluateSession.go index 14e8127c866..d845df2f86d 100644 --- a/service/voiceid/api_op_EvaluateSession.go +++ b/service/voiceid/api_op_EvaluateSession.go @@ -137,6 +137,9 @@ func (c *Client) addOperationEvaluateSessionMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpEvaluateSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_ListDomains.go b/service/voiceid/api_op_ListDomains.go index 4835df77184..9a9a5566c9a 100644 --- a/service/voiceid/api_op_ListDomains.go +++ b/service/voiceid/api_op_ListDomains.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDomains(options.Region), middleware.Before); err != nil { return err } @@ -139,13 +142,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use NextToken @@ -211,6 +207,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +229,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/voiceid/api_op_ListFraudsterRegistrationJobs.go b/service/voiceid/api_op_ListFraudsterRegistrationJobs.go index 3c0ce7cf6f2..8c097db7711 100644 --- a/service/voiceid/api_op_ListFraudsterRegistrationJobs.go +++ b/service/voiceid/api_op_ListFraudsterRegistrationJobs.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListFraudsterRegistrationJobsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFraudsterRegistrationJobsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListFraudsterRegistrationJobsMiddlewares(stack *mid return nil } -// ListFraudsterRegistrationJobsAPIClient is a client that implements the -// ListFraudsterRegistrationJobs operation. -type ListFraudsterRegistrationJobsAPIClient interface { - ListFraudsterRegistrationJobs(context.Context, *ListFraudsterRegistrationJobsInput, ...func(*Options)) (*ListFraudsterRegistrationJobsOutput, error) -} - -var _ ListFraudsterRegistrationJobsAPIClient = (*Client)(nil) - // ListFraudsterRegistrationJobsPaginatorOptions is the paginator options for // ListFraudsterRegistrationJobs type ListFraudsterRegistrationJobsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *ListFraudsterRegistrationJobsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFraudsterRegistrationJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *ListFraudsterRegistrationJobsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListFraudsterRegistrationJobsAPIClient is a client that implements the +// ListFraudsterRegistrationJobs operation. +type ListFraudsterRegistrationJobsAPIClient interface { + ListFraudsterRegistrationJobs(context.Context, *ListFraudsterRegistrationJobsInput, ...func(*Options)) (*ListFraudsterRegistrationJobsOutput, error) +} + +var _ ListFraudsterRegistrationJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFraudsterRegistrationJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/voiceid/api_op_ListFraudsters.go b/service/voiceid/api_op_ListFraudsters.go index 42c42ba1574..4ea70c52a33 100644 --- a/service/voiceid/api_op_ListFraudsters.go +++ b/service/voiceid/api_op_ListFraudsters.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListFraudstersMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListFraudstersValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListFraudstersMiddlewares(stack *middleware.Stack, return nil } -// ListFraudstersAPIClient is a client that implements the ListFraudsters -// operation. -type ListFraudstersAPIClient interface { - ListFraudsters(context.Context, *ListFraudstersInput, ...func(*Options)) (*ListFraudstersOutput, error) -} - -var _ ListFraudstersAPIClient = (*Client)(nil) - // ListFraudstersPaginatorOptions is the paginator options for ListFraudsters type ListFraudstersPaginatorOptions struct { // The maximum number of results that are returned per call. You can use NextToken @@ -225,6 +220,9 @@ func (p *ListFraudstersPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFraudsters(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListFraudstersPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListFraudstersAPIClient is a client that implements the ListFraudsters +// operation. +type ListFraudstersAPIClient interface { + ListFraudsters(context.Context, *ListFraudstersInput, ...func(*Options)) (*ListFraudstersOutput, error) +} + +var _ ListFraudstersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFraudsters(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go b/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go index d57885cc4ce..6b6ff8ad307 100644 --- a/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go +++ b/service/voiceid/api_op_ListSpeakerEnrollmentJobs.go @@ -128,6 +128,9 @@ func (c *Client) addOperationListSpeakerEnrollmentJobsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSpeakerEnrollmentJobsValidationMiddleware(stack); err != nil { return err } @@ -152,14 +155,6 @@ func (c *Client) addOperationListSpeakerEnrollmentJobsMiddlewares(stack *middlew return nil } -// ListSpeakerEnrollmentJobsAPIClient is a client that implements the -// ListSpeakerEnrollmentJobs operation. -type ListSpeakerEnrollmentJobsAPIClient interface { - ListSpeakerEnrollmentJobs(context.Context, *ListSpeakerEnrollmentJobsInput, ...func(*Options)) (*ListSpeakerEnrollmentJobsOutput, error) -} - -var _ ListSpeakerEnrollmentJobsAPIClient = (*Client)(nil) - // ListSpeakerEnrollmentJobsPaginatorOptions is the paginator options for // ListSpeakerEnrollmentJobs type ListSpeakerEnrollmentJobsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListSpeakerEnrollmentJobsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSpeakerEnrollmentJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListSpeakerEnrollmentJobsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListSpeakerEnrollmentJobsAPIClient is a client that implements the +// ListSpeakerEnrollmentJobs operation. +type ListSpeakerEnrollmentJobsAPIClient interface { + ListSpeakerEnrollmentJobs(context.Context, *ListSpeakerEnrollmentJobsInput, ...func(*Options)) (*ListSpeakerEnrollmentJobsOutput, error) +} + +var _ ListSpeakerEnrollmentJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSpeakerEnrollmentJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/voiceid/api_op_ListSpeakers.go b/service/voiceid/api_op_ListSpeakers.go index 987e3c03082..9afa3a60bba 100644 --- a/service/voiceid/api_op_ListSpeakers.go +++ b/service/voiceid/api_op_ListSpeakers.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListSpeakersMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListSpeakersValidationMiddleware(stack); err != nil { return err } @@ -148,13 +151,6 @@ func (c *Client) addOperationListSpeakersMiddlewares(stack *middleware.Stack, op return nil } -// ListSpeakersAPIClient is a client that implements the ListSpeakers operation. -type ListSpeakersAPIClient interface { - ListSpeakers(context.Context, *ListSpeakersInput, ...func(*Options)) (*ListSpeakersOutput, error) -} - -var _ ListSpeakersAPIClient = (*Client)(nil) - // ListSpeakersPaginatorOptions is the paginator options for ListSpeakers type ListSpeakersPaginatorOptions struct { // The maximum number of results that are returned per call. You can use NextToken @@ -220,6 +216,9 @@ func (p *ListSpeakersPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSpeakers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *ListSpeakersPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListSpeakersAPIClient is a client that implements the ListSpeakers operation. +type ListSpeakersAPIClient interface { + ListSpeakers(context.Context, *ListSpeakersInput, ...func(*Options)) (*ListSpeakersOutput, error) +} + +var _ ListSpeakersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSpeakers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/voiceid/api_op_ListTagsForResource.go b/service/voiceid/api_op_ListTagsForResource.go index 3dda6121ad9..58a607e9ac8 100644 --- a/service/voiceid/api_op_ListTagsForResource.go +++ b/service/voiceid/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_ListWatchlists.go b/service/voiceid/api_op_ListWatchlists.go index 46a35388849..b0da9ef0751 100644 --- a/service/voiceid/api_op_ListWatchlists.go +++ b/service/voiceid/api_op_ListWatchlists.go @@ -124,6 +124,9 @@ func (c *Client) addOperationListWatchlistsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWatchlistsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListWatchlistsMiddlewares(stack *middleware.Stack, return nil } -// ListWatchlistsAPIClient is a client that implements the ListWatchlists -// operation. -type ListWatchlistsAPIClient interface { - ListWatchlists(context.Context, *ListWatchlistsInput, ...func(*Options)) (*ListWatchlistsOutput, error) -} - -var _ ListWatchlistsAPIClient = (*Client)(nil) - // ListWatchlistsPaginatorOptions is the paginator options for ListWatchlists type ListWatchlistsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use NextToken @@ -221,6 +216,9 @@ func (p *ListWatchlistsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWatchlists(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListWatchlistsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListWatchlistsAPIClient is a client that implements the ListWatchlists +// operation. +type ListWatchlistsAPIClient interface { + ListWatchlists(context.Context, *ListWatchlistsInput, ...func(*Options)) (*ListWatchlistsOutput, error) +} + +var _ ListWatchlistsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWatchlists(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/voiceid/api_op_OptOutSpeaker.go b/service/voiceid/api_op_OptOutSpeaker.go index a37e9773370..51c76dd51cd 100644 --- a/service/voiceid/api_op_OptOutSpeaker.go +++ b/service/voiceid/api_op_OptOutSpeaker.go @@ -116,6 +116,9 @@ func (c *Client) addOperationOptOutSpeakerMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpOptOutSpeakerValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_StartFraudsterRegistrationJob.go b/service/voiceid/api_op_StartFraudsterRegistrationJob.go index 7e2013dbeb0..44f2155fc09 100644 --- a/service/voiceid/api_op_StartFraudsterRegistrationJob.go +++ b/service/voiceid/api_op_StartFraudsterRegistrationJob.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartFraudsterRegistrationJobMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartFraudsterRegistrationJobMiddleware(stack, options); err != nil { return err } diff --git a/service/voiceid/api_op_StartSpeakerEnrollmentJob.go b/service/voiceid/api_op_StartSpeakerEnrollmentJob.go index c20bf8d52a1..6a8d25370ab 100644 --- a/service/voiceid/api_op_StartSpeakerEnrollmentJob.go +++ b/service/voiceid/api_op_StartSpeakerEnrollmentJob.go @@ -143,6 +143,9 @@ func (c *Client) addOperationStartSpeakerEnrollmentJobMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartSpeakerEnrollmentJobMiddleware(stack, options); err != nil { return err } diff --git a/service/voiceid/api_op_TagResource.go b/service/voiceid/api_op_TagResource.go index f62e17add84..49002e78376 100644 --- a/service/voiceid/api_op_TagResource.go +++ b/service/voiceid/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_UntagResource.go b/service/voiceid/api_op_UntagResource.go index 4cb4c4170e5..6d3d9c8c8c6 100644 --- a/service/voiceid/api_op_UntagResource.go +++ b/service/voiceid/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_UpdateDomain.go b/service/voiceid/api_op_UpdateDomain.go index a4561e15f0e..6580249f076 100644 --- a/service/voiceid/api_op_UpdateDomain.go +++ b/service/voiceid/api_op_UpdateDomain.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateDomainMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/voiceid/api_op_UpdateWatchlist.go b/service/voiceid/api_op_UpdateWatchlist.go index 391d60407fa..127bbba43bc 100644 --- a/service/voiceid/api_op_UpdateWatchlist.go +++ b/service/voiceid/api_op_UpdateWatchlist.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateWatchlistMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWatchlistValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_client.go b/service/vpclattice/api_client.go index aee9fbdb11e..80f1f7de8ce 100644 --- a/service/vpclattice/api_client.go +++ b/service/vpclattice/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/vpclattice/api_op_BatchUpdateRule.go b/service/vpclattice/api_op_BatchUpdateRule.go index e86689e2765..ae0a6a3de6c 100644 --- a/service/vpclattice/api_op_BatchUpdateRule.go +++ b/service/vpclattice/api_op_BatchUpdateRule.go @@ -127,6 +127,9 @@ func (c *Client) addOperationBatchUpdateRuleMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchUpdateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateAccessLogSubscription.go b/service/vpclattice/api_op_CreateAccessLogSubscription.go index 5a55e31615e..e009ccc5c3e 100644 --- a/service/vpclattice/api_op_CreateAccessLogSubscription.go +++ b/service/vpclattice/api_op_CreateAccessLogSubscription.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateAccessLogSubscriptionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAccessLogSubscriptionMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateListener.go b/service/vpclattice/api_op_CreateListener.go index fa31bff2b8b..04b5979cb8b 100644 --- a/service/vpclattice/api_op_CreateListener.go +++ b/service/vpclattice/api_op_CreateListener.go @@ -163,6 +163,9 @@ func (c *Client) addOperationCreateListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateListenerMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateRule.go b/service/vpclattice/api_op_CreateRule.go index 6b89e00325e..d10ad72559d 100644 --- a/service/vpclattice/api_op_CreateRule.go +++ b/service/vpclattice/api_op_CreateRule.go @@ -166,6 +166,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateService.go b/service/vpclattice/api_op_CreateService.go index 4784d37f183..3b70c5648d3 100644 --- a/service/vpclattice/api_op_CreateService.go +++ b/service/vpclattice/api_op_CreateService.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateServiceNetwork.go b/service/vpclattice/api_op_CreateServiceNetwork.go index 8cf7bda7286..350078d4bde 100644 --- a/service/vpclattice/api_op_CreateServiceNetwork.go +++ b/service/vpclattice/api_op_CreateServiceNetwork.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateServiceNetworkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceNetworkMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateServiceNetworkServiceAssociation.go b/service/vpclattice/api_op_CreateServiceNetworkServiceAssociation.go index 3b30b9b0509..95ccc8fbfdc 100644 --- a/service/vpclattice/api_op_CreateServiceNetworkServiceAssociation.go +++ b/service/vpclattice/api_op_CreateServiceNetworkServiceAssociation.go @@ -150,6 +150,9 @@ func (c *Client) addOperationCreateServiceNetworkServiceAssociationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceNetworkServiceAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go b/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go index 48ae8ab63fb..8943ce1946e 100644 --- a/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go +++ b/service/vpclattice/api_op_CreateServiceNetworkVpcAssociation.go @@ -157,6 +157,9 @@ func (c *Client) addOperationCreateServiceNetworkVpcAssociationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateServiceNetworkVpcAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_CreateTargetGroup.go b/service/vpclattice/api_op_CreateTargetGroup.go index 284036dcdb2..8cebc42d679 100644 --- a/service/vpclattice/api_op_CreateTargetGroup.go +++ b/service/vpclattice/api_op_CreateTargetGroup.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateTargetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTargetGroupMiddleware(stack, options); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteAccessLogSubscription.go b/service/vpclattice/api_op_DeleteAccessLogSubscription.go index 3bde008f300..a50fbcb0a4e 100644 --- a/service/vpclattice/api_op_DeleteAccessLogSubscription.go +++ b/service/vpclattice/api_op_DeleteAccessLogSubscription.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteAccessLogSubscriptionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessLogSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteAuthPolicy.go b/service/vpclattice/api_op_DeleteAuthPolicy.go index fb116d27eb8..002eb1cf723 100644 --- a/service/vpclattice/api_op_DeleteAuthPolicy.go +++ b/service/vpclattice/api_op_DeleteAuthPolicy.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteAuthPolicyMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAuthPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteListener.go b/service/vpclattice/api_op_DeleteListener.go index 0a62bc92434..252f55b2540 100644 --- a/service/vpclattice/api_op_DeleteListener.go +++ b/service/vpclattice/api_op_DeleteListener.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteResourcePolicy.go b/service/vpclattice/api_op_DeleteResourcePolicy.go index 5402dea636f..2ccd366b76c 100644 --- a/service/vpclattice/api_op_DeleteResourcePolicy.go +++ b/service/vpclattice/api_op_DeleteResourcePolicy.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteRule.go b/service/vpclattice/api_op_DeleteRule.go index 53079868936..07da752408b 100644 --- a/service/vpclattice/api_op_DeleteRule.go +++ b/service/vpclattice/api_op_DeleteRule.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteService.go b/service/vpclattice/api_op_DeleteService.go index d372e2b6d00..f6054ccd09b 100644 --- a/service/vpclattice/api_op_DeleteService.go +++ b/service/vpclattice/api_op_DeleteService.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteServiceNetwork.go b/service/vpclattice/api_op_DeleteServiceNetwork.go index 5b5a0e5fd78..db28fdd7b07 100644 --- a/service/vpclattice/api_op_DeleteServiceNetwork.go +++ b/service/vpclattice/api_op_DeleteServiceNetwork.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteServiceNetworkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteServiceNetworkServiceAssociation.go b/service/vpclattice/api_op_DeleteServiceNetworkServiceAssociation.go index 80de23f5b61..6c7d19ae720 100644 --- a/service/vpclattice/api_op_DeleteServiceNetworkServiceAssociation.go +++ b/service/vpclattice/api_op_DeleteServiceNetworkServiceAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteServiceNetworkServiceAssociationMiddlewares(s if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceNetworkServiceAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteServiceNetworkVpcAssociation.go b/service/vpclattice/api_op_DeleteServiceNetworkVpcAssociation.go index 5064bc08a20..49e952949fd 100644 --- a/service/vpclattice/api_op_DeleteServiceNetworkVpcAssociation.go +++ b/service/vpclattice/api_op_DeleteServiceNetworkVpcAssociation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteServiceNetworkVpcAssociationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteServiceNetworkVpcAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeleteTargetGroup.go b/service/vpclattice/api_op_DeleteTargetGroup.go index 8aab4ff8bdd..c0f18fac633 100644 --- a/service/vpclattice/api_op_DeleteTargetGroup.go +++ b/service/vpclattice/api_op_DeleteTargetGroup.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteTargetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_DeregisterTargets.go b/service/vpclattice/api_op_DeregisterTargets.go index 6ea9a413453..fda406ac340 100644 --- a/service/vpclattice/api_op_DeregisterTargets.go +++ b/service/vpclattice/api_op_DeregisterTargets.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeregisterTargetsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetAccessLogSubscription.go b/service/vpclattice/api_op_GetAccessLogSubscription.go index a9d8cf0f2e4..959939a879f 100644 --- a/service/vpclattice/api_op_GetAccessLogSubscription.go +++ b/service/vpclattice/api_op_GetAccessLogSubscription.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetAccessLogSubscriptionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessLogSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetAuthPolicy.go b/service/vpclattice/api_op_GetAuthPolicy.go index a53a02efc15..82190b04943 100644 --- a/service/vpclattice/api_op_GetAuthPolicy.go +++ b/service/vpclattice/api_op_GetAuthPolicy.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetAuthPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAuthPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetListener.go b/service/vpclattice/api_op_GetListener.go index ab0ecb8f329..bcc65eac845 100644 --- a/service/vpclattice/api_op_GetListener.go +++ b/service/vpclattice/api_op_GetListener.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetListenerMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetResourcePolicy.go b/service/vpclattice/api_op_GetResourcePolicy.go index eba3f351985..6e4545acac8 100644 --- a/service/vpclattice/api_op_GetResourcePolicy.go +++ b/service/vpclattice/api_op_GetResourcePolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetRule.go b/service/vpclattice/api_op_GetRule.go index 2eaa5ddd883..f1f56d1bf03 100644 --- a/service/vpclattice/api_op_GetRule.go +++ b/service/vpclattice/api_op_GetRule.go @@ -147,6 +147,9 @@ func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetService.go b/service/vpclattice/api_op_GetService.go index bbec04bcee5..a645690ddfb 100644 --- a/service/vpclattice/api_op_GetService.go +++ b/service/vpclattice/api_op_GetService.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetServiceMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetServiceNetwork.go b/service/vpclattice/api_op_GetServiceNetwork.go index 335cbe42276..18f054482d3 100644 --- a/service/vpclattice/api_op_GetServiceNetwork.go +++ b/service/vpclattice/api_op_GetServiceNetwork.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetServiceNetworkMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetServiceNetworkServiceAssociation.go b/service/vpclattice/api_op_GetServiceNetworkServiceAssociation.go index 6ec46266eb6..b7be9e068d3 100644 --- a/service/vpclattice/api_op_GetServiceNetworkServiceAssociation.go +++ b/service/vpclattice/api_op_GetServiceNetworkServiceAssociation.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetServiceNetworkServiceAssociationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceNetworkServiceAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetServiceNetworkVpcAssociation.go b/service/vpclattice/api_op_GetServiceNetworkVpcAssociation.go index 4b5d1682511..f7d0a730dac 100644 --- a/service/vpclattice/api_op_GetServiceNetworkVpcAssociation.go +++ b/service/vpclattice/api_op_GetServiceNetworkVpcAssociation.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetServiceNetworkVpcAssociationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceNetworkVpcAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_GetTargetGroup.go b/service/vpclattice/api_op_GetTargetGroup.go index 95213d84a89..0f2a6284144 100644 --- a/service/vpclattice/api_op_GetTargetGroup.go +++ b/service/vpclattice/api_op_GetTargetGroup.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetTargetGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_ListAccessLogSubscriptions.go b/service/vpclattice/api_op_ListAccessLogSubscriptions.go index 0641c95a1e9..1e95acb7225 100644 --- a/service/vpclattice/api_op_ListAccessLogSubscriptions.go +++ b/service/vpclattice/api_op_ListAccessLogSubscriptions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListAccessLogSubscriptionsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessLogSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListAccessLogSubscriptionsMiddlewares(stack *middle return nil } -// ListAccessLogSubscriptionsAPIClient is a client that implements the -// ListAccessLogSubscriptions operation. -type ListAccessLogSubscriptionsAPIClient interface { - ListAccessLogSubscriptions(context.Context, *ListAccessLogSubscriptionsInput, ...func(*Options)) (*ListAccessLogSubscriptionsOutput, error) -} - -var _ ListAccessLogSubscriptionsAPIClient = (*Client)(nil) - // ListAccessLogSubscriptionsPaginatorOptions is the paginator options for // ListAccessLogSubscriptions type ListAccessLogSubscriptionsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *ListAccessLogSubscriptionsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccessLogSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *ListAccessLogSubscriptionsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListAccessLogSubscriptionsAPIClient is a client that implements the +// ListAccessLogSubscriptions operation. +type ListAccessLogSubscriptionsAPIClient interface { + ListAccessLogSubscriptions(context.Context, *ListAccessLogSubscriptionsInput, ...func(*Options)) (*ListAccessLogSubscriptionsOutput, error) +} + +var _ ListAccessLogSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccessLogSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListListeners.go b/service/vpclattice/api_op_ListListeners.go index cedaa76ba3f..7f0d70cfef8 100644 --- a/service/vpclattice/api_op_ListListeners.go +++ b/service/vpclattice/api_op_ListListeners.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListListenersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListListenersValidationMiddleware(stack); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListListenersMiddlewares(stack *middleware.Stack, o return nil } -// ListListenersAPIClient is a client that implements the ListListeners operation. -type ListListenersAPIClient interface { - ListListeners(context.Context, *ListListenersInput, ...func(*Options)) (*ListListenersOutput, error) -} - -var _ ListListenersAPIClient = (*Client)(nil) - // ListListenersPaginatorOptions is the paginator options for ListListeners type ListListenersPaginatorOptions struct { // The maximum number of results to return. @@ -212,6 +208,9 @@ func (p *ListListenersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListListeners(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListListenersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListListenersAPIClient is a client that implements the ListListeners operation. +type ListListenersAPIClient interface { + ListListeners(context.Context, *ListListenersInput, ...func(*Options)) (*ListListenersOutput, error) +} + +var _ ListListenersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListListeners(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListRules.go b/service/vpclattice/api_op_ListRules.go index d481c56a2e9..5cd3b6e22c7 100644 --- a/service/vpclattice/api_op_ListRules.go +++ b/service/vpclattice/api_op_ListRules.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRulesValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio return nil } -// ListRulesAPIClient is a client that implements the ListRules operation. -type ListRulesAPIClient interface { - ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) -} - -var _ ListRulesAPIClient = (*Client)(nil) - // ListRulesPaginatorOptions is the paginator options for ListRules type ListRulesPaginatorOptions struct { // The maximum number of results to return. @@ -217,6 +213,9 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListRulesAPIClient is a client that implements the ListRules operation. +type ListRulesAPIClient interface { + ListRules(context.Context, *ListRulesInput, ...func(*Options)) (*ListRulesOutput, error) +} + +var _ ListRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListServiceNetworkServiceAssociations.go b/service/vpclattice/api_op_ListServiceNetworkServiceAssociations.go index a58f9d65c4a..f5bc03c7038 100644 --- a/service/vpclattice/api_op_ListServiceNetworkServiceAssociations.go +++ b/service/vpclattice/api_op_ListServiceNetworkServiceAssociations.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListServiceNetworkServiceAssociationsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceNetworkServiceAssociations(options.Region), middleware.Before); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationListServiceNetworkServiceAssociationsMiddlewares(st return nil } -// ListServiceNetworkServiceAssociationsAPIClient is a client that implements the -// ListServiceNetworkServiceAssociations operation. -type ListServiceNetworkServiceAssociationsAPIClient interface { - ListServiceNetworkServiceAssociations(context.Context, *ListServiceNetworkServiceAssociationsInput, ...func(*Options)) (*ListServiceNetworkServiceAssociationsOutput, error) -} - -var _ ListServiceNetworkServiceAssociationsAPIClient = (*Client)(nil) - // ListServiceNetworkServiceAssociationsPaginatorOptions is the paginator options // for ListServiceNetworkServiceAssociations type ListServiceNetworkServiceAssociationsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *ListServiceNetworkServiceAssociationsPaginator) NextPage(ctx context.Co } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceNetworkServiceAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *ListServiceNetworkServiceAssociationsPaginator) NextPage(ctx context.Co return result, nil } +// ListServiceNetworkServiceAssociationsAPIClient is a client that implements the +// ListServiceNetworkServiceAssociations operation. +type ListServiceNetworkServiceAssociationsAPIClient interface { + ListServiceNetworkServiceAssociations(context.Context, *ListServiceNetworkServiceAssociationsInput, ...func(*Options)) (*ListServiceNetworkServiceAssociationsOutput, error) +} + +var _ ListServiceNetworkServiceAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceNetworkServiceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListServiceNetworkVpcAssociations.go b/service/vpclattice/api_op_ListServiceNetworkVpcAssociations.go index bd90a4c8967..a2edcff3b08 100644 --- a/service/vpclattice/api_op_ListServiceNetworkVpcAssociations.go +++ b/service/vpclattice/api_op_ListServiceNetworkVpcAssociations.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListServiceNetworkVpcAssociationsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceNetworkVpcAssociations(options.Region), middleware.Before); err != nil { return err } @@ -142,14 +145,6 @@ func (c *Client) addOperationListServiceNetworkVpcAssociationsMiddlewares(stack return nil } -// ListServiceNetworkVpcAssociationsAPIClient is a client that implements the -// ListServiceNetworkVpcAssociations operation. -type ListServiceNetworkVpcAssociationsAPIClient interface { - ListServiceNetworkVpcAssociations(context.Context, *ListServiceNetworkVpcAssociationsInput, ...func(*Options)) (*ListServiceNetworkVpcAssociationsOutput, error) -} - -var _ ListServiceNetworkVpcAssociationsAPIClient = (*Client)(nil) - // ListServiceNetworkVpcAssociationsPaginatorOptions is the paginator options for // ListServiceNetworkVpcAssociations type ListServiceNetworkVpcAssociationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListServiceNetworkVpcAssociationsPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceNetworkVpcAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListServiceNetworkVpcAssociationsPaginator) NextPage(ctx context.Contex return result, nil } +// ListServiceNetworkVpcAssociationsAPIClient is a client that implements the +// ListServiceNetworkVpcAssociations operation. +type ListServiceNetworkVpcAssociationsAPIClient interface { + ListServiceNetworkVpcAssociations(context.Context, *ListServiceNetworkVpcAssociationsInput, ...func(*Options)) (*ListServiceNetworkVpcAssociationsOutput, error) +} + +var _ ListServiceNetworkVpcAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceNetworkVpcAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListServiceNetworks.go b/service/vpclattice/api_op_ListServiceNetworks.go index 6f65a57fee0..e21e1462e27 100644 --- a/service/vpclattice/api_op_ListServiceNetworks.go +++ b/service/vpclattice/api_op_ListServiceNetworks.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListServiceNetworksMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServiceNetworks(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListServiceNetworksMiddlewares(stack *middleware.St return nil } -// ListServiceNetworksAPIClient is a client that implements the -// ListServiceNetworks operation. -type ListServiceNetworksAPIClient interface { - ListServiceNetworks(context.Context, *ListServiceNetworksInput, ...func(*Options)) (*ListServiceNetworksOutput, error) -} - -var _ ListServiceNetworksAPIClient = (*Client)(nil) - // ListServiceNetworksPaginatorOptions is the paginator options for // ListServiceNetworks type ListServiceNetworksPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListServiceNetworksPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServiceNetworks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListServiceNetworksPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListServiceNetworksAPIClient is a client that implements the +// ListServiceNetworks operation. +type ListServiceNetworksAPIClient interface { + ListServiceNetworks(context.Context, *ListServiceNetworksInput, ...func(*Options)) (*ListServiceNetworksOutput, error) +} + +var _ ListServiceNetworksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServiceNetworks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListServices.go b/service/vpclattice/api_op_ListServices.go index 55cff736e07..01b4831220c 100644 --- a/service/vpclattice/api_op_ListServices.go +++ b/service/vpclattice/api_op_ListServices.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListServices(options.Region), middleware.Before); err != nil { return err } @@ -133,13 +136,6 @@ func (c *Client) addOperationListServicesMiddlewares(stack *middleware.Stack, op return nil } -// ListServicesAPIClient is a client that implements the ListServices operation. -type ListServicesAPIClient interface { - ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) -} - -var _ ListServicesAPIClient = (*Client)(nil) - // ListServicesPaginatorOptions is the paginator options for ListServices type ListServicesPaginatorOptions struct { // The maximum number of results to return. @@ -203,6 +199,9 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListServices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListServicesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListServicesAPIClient is a client that implements the ListServices operation. +type ListServicesAPIClient interface { + ListServices(context.Context, *ListServicesInput, ...func(*Options)) (*ListServicesOutput, error) +} + +var _ ListServicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListServices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListTagsForResource.go b/service/vpclattice/api_op_ListTagsForResource.go index 1a3ff328fc3..0f5efecb13f 100644 --- a/service/vpclattice/api_op_ListTagsForResource.go +++ b/service/vpclattice/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_ListTargetGroups.go b/service/vpclattice/api_op_ListTargetGroups.go index f97913f4fef..10e3461048e 100644 --- a/service/vpclattice/api_op_ListTargetGroups.go +++ b/service/vpclattice/api_op_ListTargetGroups.go @@ -118,6 +118,9 @@ func (c *Client) addOperationListTargetGroupsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTargetGroups(options.Region), middleware.Before); err != nil { return err } @@ -139,14 +142,6 @@ func (c *Client) addOperationListTargetGroupsMiddlewares(stack *middleware.Stack return nil } -// ListTargetGroupsAPIClient is a client that implements the ListTargetGroups -// operation. -type ListTargetGroupsAPIClient interface { - ListTargetGroups(context.Context, *ListTargetGroupsInput, ...func(*Options)) (*ListTargetGroupsOutput, error) -} - -var _ ListTargetGroupsAPIClient = (*Client)(nil) - // ListTargetGroupsPaginatorOptions is the paginator options for ListTargetGroups type ListTargetGroupsPaginatorOptions struct { // The maximum number of results to return. @@ -210,6 +205,9 @@ func (p *ListTargetGroupsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -229,6 +227,14 @@ func (p *ListTargetGroupsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListTargetGroupsAPIClient is a client that implements the ListTargetGroups +// operation. +type ListTargetGroupsAPIClient interface { + ListTargetGroups(context.Context, *ListTargetGroupsInput, ...func(*Options)) (*ListTargetGroupsOutput, error) +} + +var _ ListTargetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_ListTargets.go b/service/vpclattice/api_op_ListTargets.go index a9dffb71699..adae025ecec 100644 --- a/service/vpclattice/api_op_ListTargets.go +++ b/service/vpclattice/api_op_ListTargets.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListTargetsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTargetsValidationMiddleware(stack); err != nil { return err } @@ -147,13 +150,6 @@ func (c *Client) addOperationListTargetsMiddlewares(stack *middleware.Stack, opt return nil } -// ListTargetsAPIClient is a client that implements the ListTargets operation. -type ListTargetsAPIClient interface { - ListTargets(context.Context, *ListTargetsInput, ...func(*Options)) (*ListTargetsOutput, error) -} - -var _ ListTargetsAPIClient = (*Client)(nil) - // ListTargetsPaginatorOptions is the paginator options for ListTargets type ListTargetsPaginatorOptions struct { // The maximum number of results to return. @@ -217,6 +213,9 @@ func (p *ListTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTargets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +235,13 @@ func (p *ListTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListTargetsAPIClient is a client that implements the ListTargets operation. +type ListTargetsAPIClient interface { + ListTargets(context.Context, *ListTargetsInput, ...func(*Options)) (*ListTargetsOutput, error) +} + +var _ ListTargetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTargets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/vpclattice/api_op_PutAuthPolicy.go b/service/vpclattice/api_op_PutAuthPolicy.go index a8ac9a57acf..d75d1458793 100644 --- a/service/vpclattice/api_op_PutAuthPolicy.go +++ b/service/vpclattice/api_op_PutAuthPolicy.go @@ -129,6 +129,9 @@ func (c *Client) addOperationPutAuthPolicyMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAuthPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_PutResourcePolicy.go b/service/vpclattice/api_op_PutResourcePolicy.go index 784fe27164a..578ce3de519 100644 --- a/service/vpclattice/api_op_PutResourcePolicy.go +++ b/service/vpclattice/api_op_PutResourcePolicy.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_RegisterTargets.go b/service/vpclattice/api_op_RegisterTargets.go index 53d41f88a72..259a72c2fb2 100644 --- a/service/vpclattice/api_op_RegisterTargets.go +++ b/service/vpclattice/api_op_RegisterTargets.go @@ -115,6 +115,9 @@ func (c *Client) addOperationRegisterTargetsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_TagResource.go b/service/vpclattice/api_op_TagResource.go index aa4b9ced001..71f3b8a93ec 100644 --- a/service/vpclattice/api_op_TagResource.go +++ b/service/vpclattice/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UntagResource.go b/service/vpclattice/api_op_UntagResource.go index 0416332fc55..1411810ec5c 100644 --- a/service/vpclattice/api_op_UntagResource.go +++ b/service/vpclattice/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateAccessLogSubscription.go b/service/vpclattice/api_op_UpdateAccessLogSubscription.go index 7c06f1e5edd..014eccd7ab9 100644 --- a/service/vpclattice/api_op_UpdateAccessLogSubscription.go +++ b/service/vpclattice/api_op_UpdateAccessLogSubscription.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateAccessLogSubscriptionMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAccessLogSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateListener.go b/service/vpclattice/api_op_UpdateListener.go index 2537a5ce66e..13ee8a32cfa 100644 --- a/service/vpclattice/api_op_UpdateListener.go +++ b/service/vpclattice/api_op_UpdateListener.go @@ -137,6 +137,9 @@ func (c *Client) addOperationUpdateListenerMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateListenerValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateRule.go b/service/vpclattice/api_op_UpdateRule.go index 1bfd4135a57..ee32d1e51fa 100644 --- a/service/vpclattice/api_op_UpdateRule.go +++ b/service/vpclattice/api_op_UpdateRule.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateService.go b/service/vpclattice/api_op_UpdateService.go index 9d01f675293..b6d9f6bff07 100644 --- a/service/vpclattice/api_op_UpdateService.go +++ b/service/vpclattice/api_op_UpdateService.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateServiceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateServiceNetwork.go b/service/vpclattice/api_op_UpdateServiceNetwork.go index 04eb97c6782..e9e6b3fa366 100644 --- a/service/vpclattice/api_op_UpdateServiceNetwork.go +++ b/service/vpclattice/api_op_UpdateServiceNetwork.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateServiceNetworkMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceNetworkValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go b/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go index d75d570d3bc..8f6f1bee0df 100644 --- a/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go +++ b/service/vpclattice/api_op_UpdateServiceNetworkVpcAssociation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationUpdateServiceNetworkVpcAssociationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateServiceNetworkVpcAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/vpclattice/api_op_UpdateTargetGroup.go b/service/vpclattice/api_op_UpdateTargetGroup.go index 6922fc35330..603658a247d 100644 --- a/service/vpclattice/api_op_UpdateTargetGroup.go +++ b/service/vpclattice/api_op_UpdateTargetGroup.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdateTargetGroupMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateTargetGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_client.go b/service/waf/api_client.go index fcec9faf571..473a1557fc0 100644 --- a/service/waf/api_client.go +++ b/service/waf/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/waf/api_op_CreateByteMatchSet.go b/service/waf/api_op_CreateByteMatchSet.go index abcf08f0c1e..42bf5e6d8d9 100644 --- a/service/waf/api_op_CreateByteMatchSet.go +++ b/service/waf/api_op_CreateByteMatchSet.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateByteMatchSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateGeoMatchSet.go b/service/waf/api_op_CreateGeoMatchSet.go index 3f1028cf07e..b4d263df654 100644 --- a/service/waf/api_op_CreateGeoMatchSet.go +++ b/service/waf/api_op_CreateGeoMatchSet.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateGeoMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateIPSet.go b/service/waf/api_op_CreateIPSet.go index 357c8c541a4..714777d537d 100644 --- a/service/waf/api_op_CreateIPSet.go +++ b/service/waf/api_op_CreateIPSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateRateBasedRule.go b/service/waf/api_op_CreateRateBasedRule.go index 47764a5c33a..35966790056 100644 --- a/service/waf/api_op_CreateRateBasedRule.go +++ b/service/waf/api_op_CreateRateBasedRule.go @@ -216,6 +216,9 @@ func (c *Client) addOperationCreateRateBasedRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateRegexMatchSet.go b/service/waf/api_op_CreateRegexMatchSet.go index 6e766e30e8b..135c2cc0436 100644 --- a/service/waf/api_op_CreateRegexMatchSet.go +++ b/service/waf/api_op_CreateRegexMatchSet.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateRegexMatchSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateRegexPatternSet.go b/service/waf/api_op_CreateRegexPatternSet.go index 032cca457eb..d7aab93c336 100644 --- a/service/waf/api_op_CreateRegexPatternSet.go +++ b/service/waf/api_op_CreateRegexPatternSet.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateRule.go b/service/waf/api_op_CreateRule.go index a70e8ff65ee..799c72192c4 100644 --- a/service/waf/api_op_CreateRule.go +++ b/service/waf/api_op_CreateRule.go @@ -173,6 +173,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateRuleGroup.go b/service/waf/api_op_CreateRuleGroup.go index 505685043b8..665605f02bb 100644 --- a/service/waf/api_op_CreateRuleGroup.go +++ b/service/waf/api_op_CreateRuleGroup.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateSizeConstraintSet.go b/service/waf/api_op_CreateSizeConstraintSet.go index 2f810d14ab0..cdbbec26834 100644 --- a/service/waf/api_op_CreateSizeConstraintSet.go +++ b/service/waf/api_op_CreateSizeConstraintSet.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateSizeConstraintSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateSqlInjectionMatchSet.go b/service/waf/api_op_CreateSqlInjectionMatchSet.go index 3ef29391d7c..f04e9e6b6c8 100644 --- a/service/waf/api_op_CreateSqlInjectionMatchSet.go +++ b/service/waf/api_op_CreateSqlInjectionMatchSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateSqlInjectionMatchSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateWebACL.go b/service/waf/api_op_CreateWebACL.go index be3e0fcba88..d596e20fb4d 100644 --- a/service/waf/api_op_CreateWebACL.go +++ b/service/waf/api_op_CreateWebACL.go @@ -173,6 +173,9 @@ func (c *Client) addOperationCreateWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateWebACLMigrationStack.go b/service/waf/api_op_CreateWebACLMigrationStack.go index e9deadc6e3e..cc5ff52e412 100644 --- a/service/waf/api_op_CreateWebACLMigrationStack.go +++ b/service/waf/api_op_CreateWebACLMigrationStack.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateWebACLMigrationStackMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebACLMigrationStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_CreateXssMatchSet.go b/service/waf/api_op_CreateXssMatchSet.go index 95bcf8e4959..31aad4697b1 100644 --- a/service/waf/api_op_CreateXssMatchSet.go +++ b/service/waf/api_op_CreateXssMatchSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateXssMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteByteMatchSet.go b/service/waf/api_op_DeleteByteMatchSet.go index d283c671a7f..fd8b7208bf6 100644 --- a/service/waf/api_op_DeleteByteMatchSet.go +++ b/service/waf/api_op_DeleteByteMatchSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteByteMatchSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteGeoMatchSet.go b/service/waf/api_op_DeleteGeoMatchSet.go index 9b64514a275..97ad95788c1 100644 --- a/service/waf/api_op_DeleteGeoMatchSet.go +++ b/service/waf/api_op_DeleteGeoMatchSet.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteGeoMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteIPSet.go b/service/waf/api_op_DeleteIPSet.go index 4599604062f..c6f690bec6a 100644 --- a/service/waf/api_op_DeleteIPSet.go +++ b/service/waf/api_op_DeleteIPSet.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteLoggingConfiguration.go b/service/waf/api_op_DeleteLoggingConfiguration.go index 1dc3f8628ac..42f3e8c7eb4 100644 --- a/service/waf/api_op_DeleteLoggingConfiguration.go +++ b/service/waf/api_op_DeleteLoggingConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeletePermissionPolicy.go b/service/waf/api_op_DeletePermissionPolicy.go index a5705f3187e..4795613e0b9 100644 --- a/service/waf/api_op_DeletePermissionPolicy.go +++ b/service/waf/api_op_DeletePermissionPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeletePermissionPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteRateBasedRule.go b/service/waf/api_op_DeleteRateBasedRule.go index 7bf0cb547dc..aa709cd83c2 100644 --- a/service/waf/api_op_DeleteRateBasedRule.go +++ b/service/waf/api_op_DeleteRateBasedRule.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteRateBasedRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteRegexMatchSet.go b/service/waf/api_op_DeleteRegexMatchSet.go index bd55d479867..983b2e91f7d 100644 --- a/service/waf/api_op_DeleteRegexMatchSet.go +++ b/service/waf/api_op_DeleteRegexMatchSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteRegexMatchSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteRegexPatternSet.go b/service/waf/api_op_DeleteRegexPatternSet.go index 0f21be8116b..5e2ce63cfae 100644 --- a/service/waf/api_op_DeleteRegexPatternSet.go +++ b/service/waf/api_op_DeleteRegexPatternSet.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteRule.go b/service/waf/api_op_DeleteRule.go index 37e826014bf..5bae7c13a09 100644 --- a/service/waf/api_op_DeleteRule.go +++ b/service/waf/api_op_DeleteRule.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteRuleGroup.go b/service/waf/api_op_DeleteRuleGroup.go index 9651aa54e22..3cde165c409 100644 --- a/service/waf/api_op_DeleteRuleGroup.go +++ b/service/waf/api_op_DeleteRuleGroup.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteSizeConstraintSet.go b/service/waf/api_op_DeleteSizeConstraintSet.go index 87a47333a5d..5feed518aa0 100644 --- a/service/waf/api_op_DeleteSizeConstraintSet.go +++ b/service/waf/api_op_DeleteSizeConstraintSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteSizeConstraintSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteSqlInjectionMatchSet.go b/service/waf/api_op_DeleteSqlInjectionMatchSet.go index a89d32f80fa..0f8cfc6b1ca 100644 --- a/service/waf/api_op_DeleteSqlInjectionMatchSet.go +++ b/service/waf/api_op_DeleteSqlInjectionMatchSet.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDeleteSqlInjectionMatchSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteWebACL.go b/service/waf/api_op_DeleteWebACL.go index 2886d332fed..8820c3b67c9 100644 --- a/service/waf/api_op_DeleteWebACL.go +++ b/service/waf/api_op_DeleteWebACL.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_DeleteXssMatchSet.go b/service/waf/api_op_DeleteXssMatchSet.go index 08f373a82d5..c4027a49741 100644 --- a/service/waf/api_op_DeleteXssMatchSet.go +++ b/service/waf/api_op_DeleteXssMatchSet.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteXssMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetByteMatchSet.go b/service/waf/api_op_GetByteMatchSet.go index c989ea6425d..b346389995e 100644 --- a/service/waf/api_op_GetByteMatchSet.go +++ b/service/waf/api_op_GetByteMatchSet.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetByteMatchSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetChangeToken.go b/service/waf/api_op_GetChangeToken.go index af9a350b22b..a543b3935a2 100644 --- a/service/waf/api_op_GetChangeToken.go +++ b/service/waf/api_op_GetChangeToken.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetChangeTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChangeToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_GetChangeTokenStatus.go b/service/waf/api_op_GetChangeTokenStatus.go index c456db27f64..d4c8c56c8c2 100644 --- a/service/waf/api_op_GetChangeTokenStatus.go +++ b/service/waf/api_op_GetChangeTokenStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetChangeTokenStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChangeTokenStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetGeoMatchSet.go b/service/waf/api_op_GetGeoMatchSet.go index 7f2b9ee3854..151ec9a22db 100644 --- a/service/waf/api_op_GetGeoMatchSet.go +++ b/service/waf/api_op_GetGeoMatchSet.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetGeoMatchSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetIPSet.go b/service/waf/api_op_GetIPSet.go index 7c952edff83..5cf9325fc47 100644 --- a/service/waf/api_op_GetIPSet.go +++ b/service/waf/api_op_GetIPSet.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetIPSetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetLoggingConfiguration.go b/service/waf/api_op_GetLoggingConfiguration.go index 3042fd0a569..ace313ffbf2 100644 --- a/service/waf/api_op_GetLoggingConfiguration.go +++ b/service/waf/api_op_GetLoggingConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetPermissionPolicy.go b/service/waf/api_op_GetPermissionPolicy.go index 20c1ee803f8..7fdb7a11c5c 100644 --- a/service/waf/api_op_GetPermissionPolicy.go +++ b/service/waf/api_op_GetPermissionPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPermissionPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetRateBasedRule.go b/service/waf/api_op_GetRateBasedRule.go index 1f2bdb66c78..17dc0c8847d 100644 --- a/service/waf/api_op_GetRateBasedRule.go +++ b/service/waf/api_op_GetRateBasedRule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRateBasedRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetRateBasedRuleManagedKeys.go b/service/waf/api_op_GetRateBasedRuleManagedKeys.go index 24264ab753c..492f56d1514 100644 --- a/service/waf/api_op_GetRateBasedRuleManagedKeys.go +++ b/service/waf/api_op_GetRateBasedRuleManagedKeys.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetRateBasedRuleManagedKeysMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRateBasedRuleManagedKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetRegexMatchSet.go b/service/waf/api_op_GetRegexMatchSet.go index 3704d08451e..eb63c680177 100644 --- a/service/waf/api_op_GetRegexMatchSet.go +++ b/service/waf/api_op_GetRegexMatchSet.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetRegexMatchSetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetRegexPatternSet.go b/service/waf/api_op_GetRegexPatternSet.go index 9f2e2db067f..d61c4aeb66b 100644 --- a/service/waf/api_op_GetRegexPatternSet.go +++ b/service/waf/api_op_GetRegexPatternSet.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetRegexPatternSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetRule.go b/service/waf/api_op_GetRule.go index 7429725a6fb..a0d3bcc1bfb 100644 --- a/service/waf/api_op_GetRule.go +++ b/service/waf/api_op_GetRule.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetRuleGroup.go b/service/waf/api_op_GetRuleGroup.go index 123c50b21b9..53024b48305 100644 --- a/service/waf/api_op_GetRuleGroup.go +++ b/service/waf/api_op_GetRuleGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetRuleGroupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetSampledRequests.go b/service/waf/api_op_GetSampledRequests.go index a5c7ad84911..7358e972a44 100644 --- a/service/waf/api_op_GetSampledRequests.go +++ b/service/waf/api_op_GetSampledRequests.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetSampledRequestsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSampledRequestsValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetSizeConstraintSet.go b/service/waf/api_op_GetSizeConstraintSet.go index d0b58f22f25..f8a2318523a 100644 --- a/service/waf/api_op_GetSizeConstraintSet.go +++ b/service/waf/api_op_GetSizeConstraintSet.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetSizeConstraintSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetSqlInjectionMatchSet.go b/service/waf/api_op_GetSqlInjectionMatchSet.go index 9f1f65e47e2..e5e77493b1b 100644 --- a/service/waf/api_op_GetSqlInjectionMatchSet.go +++ b/service/waf/api_op_GetSqlInjectionMatchSet.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetSqlInjectionMatchSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetWebACL.go b/service/waf/api_op_GetWebACL.go index 48f51c8706b..a578d438e25 100644 --- a/service/waf/api_op_GetWebACL.go +++ b/service/waf/api_op_GetWebACL.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetWebACLMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_GetXssMatchSet.go b/service/waf/api_op_GetXssMatchSet.go index a5151763538..1ea4cf1982d 100644 --- a/service/waf/api_op_GetXssMatchSet.go +++ b/service/waf/api_op_GetXssMatchSet.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetXssMatchSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_ListActivatedRulesInRuleGroup.go b/service/waf/api_op_ListActivatedRulesInRuleGroup.go index 842bb44031c..991e392345e 100644 --- a/service/waf/api_op_ListActivatedRulesInRuleGroup.go +++ b/service/waf/api_op_ListActivatedRulesInRuleGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListActivatedRulesInRuleGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActivatedRulesInRuleGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListByteMatchSets.go b/service/waf/api_op_ListByteMatchSets.go index e03447183f0..3c633e7157a 100644 --- a/service/waf/api_op_ListByteMatchSets.go +++ b/service/waf/api_op_ListByteMatchSets.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListByteMatchSetsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListByteMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListGeoMatchSets.go b/service/waf/api_op_ListGeoMatchSets.go index f873baa4c9f..a16706e9200 100644 --- a/service/waf/api_op_ListGeoMatchSets.go +++ b/service/waf/api_op_ListGeoMatchSets.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListGeoMatchSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListIPSets.go b/service/waf/api_op_ListIPSets.go index 588ef8d7a9e..9597cc83369 100644 --- a/service/waf/api_op_ListIPSets.go +++ b/service/waf/api_op_ListIPSets.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListIPSetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIPSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListLoggingConfigurations.go b/service/waf/api_op_ListLoggingConfigurations.go index 33fc865a3f8..07012c96973 100644 --- a/service/waf/api_op_ListLoggingConfigurations.go +++ b/service/waf/api_op_ListLoggingConfigurations.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggingConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListRateBasedRules.go b/service/waf/api_op_ListRateBasedRules.go index f7717c34ca1..252d50acddd 100644 --- a/service/waf/api_op_ListRateBasedRules.go +++ b/service/waf/api_op_ListRateBasedRules.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRateBasedRulesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRateBasedRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListRegexMatchSets.go b/service/waf/api_op_ListRegexMatchSets.go index b3ed58b8c62..c322515c001 100644 --- a/service/waf/api_op_ListRegexMatchSets.go +++ b/service/waf/api_op_ListRegexMatchSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRegexMatchSetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegexMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListRegexPatternSets.go b/service/waf/api_op_ListRegexPatternSets.go index 3381c81e11e..4cde11c0276 100644 --- a/service/waf/api_op_ListRegexPatternSets.go +++ b/service/waf/api_op_ListRegexPatternSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRegexPatternSetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegexPatternSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListRuleGroups.go b/service/waf/api_op_ListRuleGroups.go index 6e6f3cfd3d8..8d1794772aa 100644 --- a/service/waf/api_op_ListRuleGroups.go +++ b/service/waf/api_op_ListRuleGroups.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRuleGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListRules.go b/service/waf/api_op_ListRules.go index 793d9381a21..9606bf9f2a3 100644 --- a/service/waf/api_op_ListRules.go +++ b/service/waf/api_op_ListRules.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListSizeConstraintSets.go b/service/waf/api_op_ListSizeConstraintSets.go index fa61b638fb6..af515af1fd6 100644 --- a/service/waf/api_op_ListSizeConstraintSets.go +++ b/service/waf/api_op_ListSizeConstraintSets.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSizeConstraintSetsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSizeConstraintSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListSqlInjectionMatchSets.go b/service/waf/api_op_ListSqlInjectionMatchSets.go index 738309ff2b6..2b0ae14b654 100644 --- a/service/waf/api_op_ListSqlInjectionMatchSets.go +++ b/service/waf/api_op_ListSqlInjectionMatchSets.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListSqlInjectionMatchSetsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSqlInjectionMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListSubscribedRuleGroups.go b/service/waf/api_op_ListSubscribedRuleGroups.go index da9fa4bcae9..e2e6d4da23b 100644 --- a/service/waf/api_op_ListSubscribedRuleGroups.go +++ b/service/waf/api_op_ListSubscribedRuleGroups.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSubscribedRuleGroupsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscribedRuleGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListTagsForResource.go b/service/waf/api_op_ListTagsForResource.go index c2341af00c5..25acfca9e67 100644 --- a/service/waf/api_op_ListTagsForResource.go +++ b/service/waf/api_op_ListTagsForResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_ListWebACLs.go b/service/waf/api_op_ListWebACLs.go index 4e9171d3b6f..810ec48ccdd 100644 --- a/service/waf/api_op_ListWebACLs.go +++ b/service/waf/api_op_ListWebACLs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListWebACLsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWebACLs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_ListXssMatchSets.go b/service/waf/api_op_ListXssMatchSets.go index 0f759f39fbb..0eb40bc5841 100644 --- a/service/waf/api_op_ListXssMatchSets.go +++ b/service/waf/api_op_ListXssMatchSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListXssMatchSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListXssMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/waf/api_op_PutLoggingConfiguration.go b/service/waf/api_op_PutLoggingConfiguration.go index f64adf2acfe..7846b6cb77b 100644 --- a/service/waf/api_op_PutLoggingConfiguration.go +++ b/service/waf/api_op_PutLoggingConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationPutLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_PutPermissionPolicy.go b/service/waf/api_op_PutPermissionPolicy.go index b60d5bb108f..4ae5b2487be 100644 --- a/service/waf/api_op_PutPermissionPolicy.go +++ b/service/waf/api_op_PutPermissionPolicy.go @@ -144,6 +144,9 @@ func (c *Client) addOperationPutPermissionPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_TagResource.go b/service/waf/api_op_TagResource.go index f9f3fd225cf..4e750750980 100644 --- a/service/waf/api_op_TagResource.go +++ b/service/waf/api_op_TagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UntagResource.go b/service/waf/api_op_UntagResource.go index d0bfd4efcaf..2f2db7e28a1 100644 --- a/service/waf/api_op_UntagResource.go +++ b/service/waf/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateByteMatchSet.go b/service/waf/api_op_UpdateByteMatchSet.go index c797392f6e4..1858cd9ab09 100644 --- a/service/waf/api_op_UpdateByteMatchSet.go +++ b/service/waf/api_op_UpdateByteMatchSet.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateByteMatchSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateGeoMatchSet.go b/service/waf/api_op_UpdateGeoMatchSet.go index e28f0cc5438..b34860c8c8c 100644 --- a/service/waf/api_op_UpdateGeoMatchSet.go +++ b/service/waf/api_op_UpdateGeoMatchSet.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateGeoMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateIPSet.go b/service/waf/api_op_UpdateIPSet.go index 13c18f0fa3b..0e7dedb366a 100644 --- a/service/waf/api_op_UpdateIPSet.go +++ b/service/waf/api_op_UpdateIPSet.go @@ -187,6 +187,9 @@ func (c *Client) addOperationUpdateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateRateBasedRule.go b/service/waf/api_op_UpdateRateBasedRule.go index 2237b044066..77a32cefda1 100644 --- a/service/waf/api_op_UpdateRateBasedRule.go +++ b/service/waf/api_op_UpdateRateBasedRule.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdateRateBasedRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateRegexMatchSet.go b/service/waf/api_op_UpdateRegexMatchSet.go index 547062e694f..6aaa9d3c412 100644 --- a/service/waf/api_op_UpdateRegexMatchSet.go +++ b/service/waf/api_op_UpdateRegexMatchSet.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateRegexMatchSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateRegexPatternSet.go b/service/waf/api_op_UpdateRegexPatternSet.go index 11bf9475fc1..c84473e60c9 100644 --- a/service/waf/api_op_UpdateRegexPatternSet.go +++ b/service/waf/api_op_UpdateRegexPatternSet.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateRule.go b/service/waf/api_op_UpdateRule.go index 1316296e052..4b18c6746a7 100644 --- a/service/waf/api_op_UpdateRule.go +++ b/service/waf/api_op_UpdateRule.go @@ -170,6 +170,9 @@ func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateRuleGroup.go b/service/waf/api_op_UpdateRuleGroup.go index 0a28eec5488..2695c3c5c08 100644 --- a/service/waf/api_op_UpdateRuleGroup.go +++ b/service/waf/api_op_UpdateRuleGroup.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateSizeConstraintSet.go b/service/waf/api_op_UpdateSizeConstraintSet.go index 3f8a21d8a70..34ef1cca98b 100644 --- a/service/waf/api_op_UpdateSizeConstraintSet.go +++ b/service/waf/api_op_UpdateSizeConstraintSet.go @@ -179,6 +179,9 @@ func (c *Client) addOperationUpdateSizeConstraintSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateSqlInjectionMatchSet.go b/service/waf/api_op_UpdateSqlInjectionMatchSet.go index a9dcb429e56..4edb770ec10 100644 --- a/service/waf/api_op_UpdateSqlInjectionMatchSet.go +++ b/service/waf/api_op_UpdateSqlInjectionMatchSet.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateSqlInjectionMatchSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateWebACL.go b/service/waf/api_op_UpdateWebACL.go index a1a5a4183b1..12ba4251105 100644 --- a/service/waf/api_op_UpdateWebACL.go +++ b/service/waf/api_op_UpdateWebACL.go @@ -201,6 +201,9 @@ func (c *Client) addOperationUpdateWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/waf/api_op_UpdateXssMatchSet.go b/service/waf/api_op_UpdateXssMatchSet.go index 6a556eb7839..c2209a46466 100644 --- a/service/waf/api_op_UpdateXssMatchSet.go +++ b/service/waf/api_op_UpdateXssMatchSet.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateXssMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_client.go b/service/wafregional/api_client.go index 552db37e935..f86a44ab9bb 100644 --- a/service/wafregional/api_client.go +++ b/service/wafregional/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/wafregional/api_op_AssociateWebACL.go b/service/wafregional/api_op_AssociateWebACL.go index 85298b6f15a..a885dd37bef 100644 --- a/service/wafregional/api_op_AssociateWebACL.go +++ b/service/wafregional/api_op_AssociateWebACL.go @@ -126,6 +126,9 @@ func (c *Client) addOperationAssociateWebACLMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateByteMatchSet.go b/service/wafregional/api_op_CreateByteMatchSet.go index b4ad50d98a5..6bdd58fdab6 100644 --- a/service/wafregional/api_op_CreateByteMatchSet.go +++ b/service/wafregional/api_op_CreateByteMatchSet.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateByteMatchSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateGeoMatchSet.go b/service/wafregional/api_op_CreateGeoMatchSet.go index 9b117897273..d7fc43c613c 100644 --- a/service/wafregional/api_op_CreateGeoMatchSet.go +++ b/service/wafregional/api_op_CreateGeoMatchSet.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateGeoMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateIPSet.go b/service/wafregional/api_op_CreateIPSet.go index d544db6fc5d..72a4b371199 100644 --- a/service/wafregional/api_op_CreateIPSet.go +++ b/service/wafregional/api_op_CreateIPSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateRateBasedRule.go b/service/wafregional/api_op_CreateRateBasedRule.go index ac967b9b0ef..bd97a47e31d 100644 --- a/service/wafregional/api_op_CreateRateBasedRule.go +++ b/service/wafregional/api_op_CreateRateBasedRule.go @@ -216,6 +216,9 @@ func (c *Client) addOperationCreateRateBasedRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateRegexMatchSet.go b/service/wafregional/api_op_CreateRegexMatchSet.go index fc483339d53..8ae3ee7a64b 100644 --- a/service/wafregional/api_op_CreateRegexMatchSet.go +++ b/service/wafregional/api_op_CreateRegexMatchSet.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateRegexMatchSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateRegexPatternSet.go b/service/wafregional/api_op_CreateRegexPatternSet.go index d3ceb4f5d1d..8c0c8deaafd 100644 --- a/service/wafregional/api_op_CreateRegexPatternSet.go +++ b/service/wafregional/api_op_CreateRegexPatternSet.go @@ -144,6 +144,9 @@ func (c *Client) addOperationCreateRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateRule.go b/service/wafregional/api_op_CreateRule.go index 20755e2232b..9e3bd37f424 100644 --- a/service/wafregional/api_op_CreateRule.go +++ b/service/wafregional/api_op_CreateRule.go @@ -173,6 +173,9 @@ func (c *Client) addOperationCreateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateRuleGroup.go b/service/wafregional/api_op_CreateRuleGroup.go index 9454d810c5e..27bb23d674d 100644 --- a/service/wafregional/api_op_CreateRuleGroup.go +++ b/service/wafregional/api_op_CreateRuleGroup.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateSizeConstraintSet.go b/service/wafregional/api_op_CreateSizeConstraintSet.go index cc74bea53a4..c8883e7c99a 100644 --- a/service/wafregional/api_op_CreateSizeConstraintSet.go +++ b/service/wafregional/api_op_CreateSizeConstraintSet.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateSizeConstraintSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateSqlInjectionMatchSet.go b/service/wafregional/api_op_CreateSqlInjectionMatchSet.go index d22db507374..9f6cd33a0ff 100644 --- a/service/wafregional/api_op_CreateSqlInjectionMatchSet.go +++ b/service/wafregional/api_op_CreateSqlInjectionMatchSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateSqlInjectionMatchSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateWebACL.go b/service/wafregional/api_op_CreateWebACL.go index 0795a870500..91be2d4cab8 100644 --- a/service/wafregional/api_op_CreateWebACL.go +++ b/service/wafregional/api_op_CreateWebACL.go @@ -173,6 +173,9 @@ func (c *Client) addOperationCreateWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateWebACLMigrationStack.go b/service/wafregional/api_op_CreateWebACLMigrationStack.go index 5412a8eb605..7c79a20cdfe 100644 --- a/service/wafregional/api_op_CreateWebACLMigrationStack.go +++ b/service/wafregional/api_op_CreateWebACLMigrationStack.go @@ -142,6 +142,9 @@ func (c *Client) addOperationCreateWebACLMigrationStackMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebACLMigrationStackValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_CreateXssMatchSet.go b/service/wafregional/api_op_CreateXssMatchSet.go index c35c187225b..afb01dc1792 100644 --- a/service/wafregional/api_op_CreateXssMatchSet.go +++ b/service/wafregional/api_op_CreateXssMatchSet.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateXssMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteByteMatchSet.go b/service/wafregional/api_op_DeleteByteMatchSet.go index 13d41a4a647..e0f432b724c 100644 --- a/service/wafregional/api_op_DeleteByteMatchSet.go +++ b/service/wafregional/api_op_DeleteByteMatchSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteByteMatchSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteGeoMatchSet.go b/service/wafregional/api_op_DeleteGeoMatchSet.go index 6b60267a8d1..24c29d0e883 100644 --- a/service/wafregional/api_op_DeleteGeoMatchSet.go +++ b/service/wafregional/api_op_DeleteGeoMatchSet.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteGeoMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteIPSet.go b/service/wafregional/api_op_DeleteIPSet.go index 6c92b7b8748..f8f1f091d48 100644 --- a/service/wafregional/api_op_DeleteIPSet.go +++ b/service/wafregional/api_op_DeleteIPSet.go @@ -134,6 +134,9 @@ func (c *Client) addOperationDeleteIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteLoggingConfiguration.go b/service/wafregional/api_op_DeleteLoggingConfiguration.go index 31b2c93e26a..063de61d57d 100644 --- a/service/wafregional/api_op_DeleteLoggingConfiguration.go +++ b/service/wafregional/api_op_DeleteLoggingConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeletePermissionPolicy.go b/service/wafregional/api_op_DeletePermissionPolicy.go index a22f912347e..75e65ac4edf 100644 --- a/service/wafregional/api_op_DeletePermissionPolicy.go +++ b/service/wafregional/api_op_DeletePermissionPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeletePermissionPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteRateBasedRule.go b/service/wafregional/api_op_DeleteRateBasedRule.go index d3c861a5c5a..48444160b58 100644 --- a/service/wafregional/api_op_DeleteRateBasedRule.go +++ b/service/wafregional/api_op_DeleteRateBasedRule.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteRateBasedRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteRegexMatchSet.go b/service/wafregional/api_op_DeleteRegexMatchSet.go index f89bfc3563b..6054d68afc8 100644 --- a/service/wafregional/api_op_DeleteRegexMatchSet.go +++ b/service/wafregional/api_op_DeleteRegexMatchSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteRegexMatchSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteRegexPatternSet.go b/service/wafregional/api_op_DeleteRegexPatternSet.go index b1ecbe305a1..7db672eabde 100644 --- a/service/wafregional/api_op_DeleteRegexPatternSet.go +++ b/service/wafregional/api_op_DeleteRegexPatternSet.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteRule.go b/service/wafregional/api_op_DeleteRule.go index 63410caf4d4..ae603ee4adc 100644 --- a/service/wafregional/api_op_DeleteRule.go +++ b/service/wafregional/api_op_DeleteRule.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteRuleGroup.go b/service/wafregional/api_op_DeleteRuleGroup.go index b6817cb4825..7bc1e5b6e27 100644 --- a/service/wafregional/api_op_DeleteRuleGroup.go +++ b/service/wafregional/api_op_DeleteRuleGroup.go @@ -135,6 +135,9 @@ func (c *Client) addOperationDeleteRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteSizeConstraintSet.go b/service/wafregional/api_op_DeleteSizeConstraintSet.go index 8f2a666339e..c3bdef6b0cc 100644 --- a/service/wafregional/api_op_DeleteSizeConstraintSet.go +++ b/service/wafregional/api_op_DeleteSizeConstraintSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteSizeConstraintSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteSqlInjectionMatchSet.go b/service/wafregional/api_op_DeleteSqlInjectionMatchSet.go index 0351d23bccc..61630672f9c 100644 --- a/service/wafregional/api_op_DeleteSqlInjectionMatchSet.go +++ b/service/wafregional/api_op_DeleteSqlInjectionMatchSet.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDeleteSqlInjectionMatchSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteWebACL.go b/service/wafregional/api_op_DeleteWebACL.go index 09e2d36f63a..b9d608a977a 100644 --- a/service/wafregional/api_op_DeleteWebACL.go +++ b/service/wafregional/api_op_DeleteWebACL.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDeleteWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DeleteXssMatchSet.go b/service/wafregional/api_op_DeleteXssMatchSet.go index 9cfcbbcca1b..82b390f5cab 100644 --- a/service/wafregional/api_op_DeleteXssMatchSet.go +++ b/service/wafregional/api_op_DeleteXssMatchSet.go @@ -138,6 +138,9 @@ func (c *Client) addOperationDeleteXssMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_DisassociateWebACL.go b/service/wafregional/api_op_DisassociateWebACL.go index 25c33025c14..b216db60175 100644 --- a/service/wafregional/api_op_DisassociateWebACL.go +++ b/service/wafregional/api_op_DisassociateWebACL.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDisassociateWebACLMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetByteMatchSet.go b/service/wafregional/api_op_GetByteMatchSet.go index c96ca1c1794..696de0ec4f2 100644 --- a/service/wafregional/api_op_GetByteMatchSet.go +++ b/service/wafregional/api_op_GetByteMatchSet.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetByteMatchSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetChangeToken.go b/service/wafregional/api_op_GetChangeToken.go index 7fc7c8bec1d..d7b260c3e7c 100644 --- a/service/wafregional/api_op_GetChangeToken.go +++ b/service/wafregional/api_op_GetChangeToken.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetChangeTokenMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChangeToken(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_GetChangeTokenStatus.go b/service/wafregional/api_op_GetChangeTokenStatus.go index cbf97b3abac..e5f52836acf 100644 --- a/service/wafregional/api_op_GetChangeTokenStatus.go +++ b/service/wafregional/api_op_GetChangeTokenStatus.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetChangeTokenStatusMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetChangeTokenStatusValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetGeoMatchSet.go b/service/wafregional/api_op_GetGeoMatchSet.go index 78df3b839e2..73deaf2880a 100644 --- a/service/wafregional/api_op_GetGeoMatchSet.go +++ b/service/wafregional/api_op_GetGeoMatchSet.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetGeoMatchSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetIPSet.go b/service/wafregional/api_op_GetIPSet.go index 5bf72e0717d..85a11f46c0b 100644 --- a/service/wafregional/api_op_GetIPSet.go +++ b/service/wafregional/api_op_GetIPSet.go @@ -123,6 +123,9 @@ func (c *Client) addOperationGetIPSetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetLoggingConfiguration.go b/service/wafregional/api_op_GetLoggingConfiguration.go index c6893308d84..c230fc6f30c 100644 --- a/service/wafregional/api_op_GetLoggingConfiguration.go +++ b/service/wafregional/api_op_GetLoggingConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetPermissionPolicy.go b/service/wafregional/api_op_GetPermissionPolicy.go index 7ae504ba825..543578d78ed 100644 --- a/service/wafregional/api_op_GetPermissionPolicy.go +++ b/service/wafregional/api_op_GetPermissionPolicy.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetPermissionPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetRateBasedRule.go b/service/wafregional/api_op_GetRateBasedRule.go index 3600f232777..88706babacd 100644 --- a/service/wafregional/api_op_GetRateBasedRule.go +++ b/service/wafregional/api_op_GetRateBasedRule.go @@ -117,6 +117,9 @@ func (c *Client) addOperationGetRateBasedRuleMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetRateBasedRuleManagedKeys.go b/service/wafregional/api_op_GetRateBasedRuleManagedKeys.go index 577596359cd..e5c88a4e507 100644 --- a/service/wafregional/api_op_GetRateBasedRuleManagedKeys.go +++ b/service/wafregional/api_op_GetRateBasedRuleManagedKeys.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetRateBasedRuleManagedKeysMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRateBasedRuleManagedKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetRegexMatchSet.go b/service/wafregional/api_op_GetRegexMatchSet.go index 8d3c0d7ad69..b57eb04e8e7 100644 --- a/service/wafregional/api_op_GetRegexMatchSet.go +++ b/service/wafregional/api_op_GetRegexMatchSet.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGetRegexMatchSetMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetRegexPatternSet.go b/service/wafregional/api_op_GetRegexPatternSet.go index 743e4d409a5..f49b836f068 100644 --- a/service/wafregional/api_op_GetRegexPatternSet.go +++ b/service/wafregional/api_op_GetRegexPatternSet.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetRegexPatternSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetRule.go b/service/wafregional/api_op_GetRule.go index 3258ac9c3f0..5ef150ce022 100644 --- a/service/wafregional/api_op_GetRule.go +++ b/service/wafregional/api_op_GetRule.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetRuleMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetRuleGroup.go b/service/wafregional/api_op_GetRuleGroup.go index e1d6ac48f78..517320a6c71 100644 --- a/service/wafregional/api_op_GetRuleGroup.go +++ b/service/wafregional/api_op_GetRuleGroup.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetRuleGroupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetSampledRequests.go b/service/wafregional/api_op_GetSampledRequests.go index cd72e5c4d12..4a7ddd7506d 100644 --- a/service/wafregional/api_op_GetSampledRequests.go +++ b/service/wafregional/api_op_GetSampledRequests.go @@ -168,6 +168,9 @@ func (c *Client) addOperationGetSampledRequestsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSampledRequestsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetSizeConstraintSet.go b/service/wafregional/api_op_GetSizeConstraintSet.go index 1fbb8c692a9..8c15cc755cc 100644 --- a/service/wafregional/api_op_GetSizeConstraintSet.go +++ b/service/wafregional/api_op_GetSizeConstraintSet.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetSizeConstraintSetMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetSqlInjectionMatchSet.go b/service/wafregional/api_op_GetSqlInjectionMatchSet.go index 6b32afa233a..1a58906edfb 100644 --- a/service/wafregional/api_op_GetSqlInjectionMatchSet.go +++ b/service/wafregional/api_op_GetSqlInjectionMatchSet.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetSqlInjectionMatchSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetWebACL.go b/service/wafregional/api_op_GetWebACL.go index 209ba3e6130..cd80ede05be 100644 --- a/service/wafregional/api_op_GetWebACL.go +++ b/service/wafregional/api_op_GetWebACL.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetWebACLMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetWebACLForResource.go b/service/wafregional/api_op_GetWebACLForResource.go index 2792c974481..259560751c4 100644 --- a/service/wafregional/api_op_GetWebACLForResource.go +++ b/service/wafregional/api_op_GetWebACLForResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetWebACLForResourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebACLForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_GetXssMatchSet.go b/service/wafregional/api_op_GetXssMatchSet.go index 90e61532285..fd75f977955 100644 --- a/service/wafregional/api_op_GetXssMatchSet.go +++ b/service/wafregional/api_op_GetXssMatchSet.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetXssMatchSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_ListActivatedRulesInRuleGroup.go b/service/wafregional/api_op_ListActivatedRulesInRuleGroup.go index 5180873a904..d8418f31625 100644 --- a/service/wafregional/api_op_ListActivatedRulesInRuleGroup.go +++ b/service/wafregional/api_op_ListActivatedRulesInRuleGroup.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListActivatedRulesInRuleGroupMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListActivatedRulesInRuleGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListByteMatchSets.go b/service/wafregional/api_op_ListByteMatchSets.go index cbcfa07ca0d..1d38d2bb94e 100644 --- a/service/wafregional/api_op_ListByteMatchSets.go +++ b/service/wafregional/api_op_ListByteMatchSets.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListByteMatchSetsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListByteMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListGeoMatchSets.go b/service/wafregional/api_op_ListGeoMatchSets.go index 8d3bcbd3dbb..51d1104dc21 100644 --- a/service/wafregional/api_op_ListGeoMatchSets.go +++ b/service/wafregional/api_op_ListGeoMatchSets.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListGeoMatchSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListIPSets.go b/service/wafregional/api_op_ListIPSets.go index eb51c4e6aef..cdb44145246 100644 --- a/service/wafregional/api_op_ListIPSets.go +++ b/service/wafregional/api_op_ListIPSets.go @@ -127,6 +127,9 @@ func (c *Client) addOperationListIPSetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIPSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListLoggingConfigurations.go b/service/wafregional/api_op_ListLoggingConfigurations.go index 616c1947b18..93b1bb686f1 100644 --- a/service/wafregional/api_op_ListLoggingConfigurations.go +++ b/service/wafregional/api_op_ListLoggingConfigurations.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLoggingConfigurations(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListRateBasedRules.go b/service/wafregional/api_op_ListRateBasedRules.go index 11fca449d37..96e70f41b78 100644 --- a/service/wafregional/api_op_ListRateBasedRules.go +++ b/service/wafregional/api_op_ListRateBasedRules.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRateBasedRulesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRateBasedRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListRegexMatchSets.go b/service/wafregional/api_op_ListRegexMatchSets.go index 3f7cec335c9..853d0b45647 100644 --- a/service/wafregional/api_op_ListRegexMatchSets.go +++ b/service/wafregional/api_op_ListRegexMatchSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRegexMatchSetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegexMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListRegexPatternSets.go b/service/wafregional/api_op_ListRegexPatternSets.go index 6770f41d9a2..93f583d714a 100644 --- a/service/wafregional/api_op_ListRegexPatternSets.go +++ b/service/wafregional/api_op_ListRegexPatternSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListRegexPatternSetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRegexPatternSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListResourcesForWebACL.go b/service/wafregional/api_op_ListResourcesForWebACL.go index 73beea709c4..71a790be0ea 100644 --- a/service/wafregional/api_op_ListResourcesForWebACL.go +++ b/service/wafregional/api_op_ListResourcesForWebACL.go @@ -123,6 +123,9 @@ func (c *Client) addOperationListResourcesForWebACLMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesForWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_ListRuleGroups.go b/service/wafregional/api_op_ListRuleGroups.go index a64b50e1077..3439e4fc579 100644 --- a/service/wafregional/api_op_ListRuleGroups.go +++ b/service/wafregional/api_op_ListRuleGroups.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRuleGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListRules.go b/service/wafregional/api_op_ListRules.go index 89b0e034f34..e28baf802f9 100644 --- a/service/wafregional/api_op_ListRules.go +++ b/service/wafregional/api_op_ListRules.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListRulesMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRules(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListSizeConstraintSets.go b/service/wafregional/api_op_ListSizeConstraintSets.go index 48d1d5e89fe..a6d85f43d67 100644 --- a/service/wafregional/api_op_ListSizeConstraintSets.go +++ b/service/wafregional/api_op_ListSizeConstraintSets.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSizeConstraintSetsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSizeConstraintSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListSqlInjectionMatchSets.go b/service/wafregional/api_op_ListSqlInjectionMatchSets.go index 2d927e88542..a6d01dfdaac 100644 --- a/service/wafregional/api_op_ListSqlInjectionMatchSets.go +++ b/service/wafregional/api_op_ListSqlInjectionMatchSets.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListSqlInjectionMatchSetsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSqlInjectionMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListSubscribedRuleGroups.go b/service/wafregional/api_op_ListSubscribedRuleGroups.go index 7ebb88daf42..93875114af8 100644 --- a/service/wafregional/api_op_ListSubscribedRuleGroups.go +++ b/service/wafregional/api_op_ListSubscribedRuleGroups.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListSubscribedRuleGroupsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSubscribedRuleGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListTagsForResource.go b/service/wafregional/api_op_ListTagsForResource.go index 7d3fcc23ec7..f7ca8fde425 100644 --- a/service/wafregional/api_op_ListTagsForResource.go +++ b/service/wafregional/api_op_ListTagsForResource.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_ListWebACLs.go b/service/wafregional/api_op_ListWebACLs.go index 28bd70fc5fa..0f055f16055 100644 --- a/service/wafregional/api_op_ListWebACLs.go +++ b/service/wafregional/api_op_ListWebACLs.go @@ -131,6 +131,9 @@ func (c *Client) addOperationListWebACLsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWebACLs(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_ListXssMatchSets.go b/service/wafregional/api_op_ListXssMatchSets.go index 01a4f5a4228..14d113065d7 100644 --- a/service/wafregional/api_op_ListXssMatchSets.go +++ b/service/wafregional/api_op_ListXssMatchSets.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListXssMatchSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListXssMatchSets(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafregional/api_op_PutLoggingConfiguration.go b/service/wafregional/api_op_PutLoggingConfiguration.go index 1c10d46879e..6213ed684eb 100644 --- a/service/wafregional/api_op_PutLoggingConfiguration.go +++ b/service/wafregional/api_op_PutLoggingConfiguration.go @@ -142,6 +142,9 @@ func (c *Client) addOperationPutLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_PutPermissionPolicy.go b/service/wafregional/api_op_PutPermissionPolicy.go index fe49780b27d..7d8268654d1 100644 --- a/service/wafregional/api_op_PutPermissionPolicy.go +++ b/service/wafregional/api_op_PutPermissionPolicy.go @@ -144,6 +144,9 @@ func (c *Client) addOperationPutPermissionPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_TagResource.go b/service/wafregional/api_op_TagResource.go index 32de3383d6c..4db40e2f34d 100644 --- a/service/wafregional/api_op_TagResource.go +++ b/service/wafregional/api_op_TagResource.go @@ -126,6 +126,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UntagResource.go b/service/wafregional/api_op_UntagResource.go index 25d11c0aa42..f63ca72d533 100644 --- a/service/wafregional/api_op_UntagResource.go +++ b/service/wafregional/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateByteMatchSet.go b/service/wafregional/api_op_UpdateByteMatchSet.go index b2b1ffc4a7c..17062e4bcd0 100644 --- a/service/wafregional/api_op_UpdateByteMatchSet.go +++ b/service/wafregional/api_op_UpdateByteMatchSet.go @@ -176,6 +176,9 @@ func (c *Client) addOperationUpdateByteMatchSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateByteMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateGeoMatchSet.go b/service/wafregional/api_op_UpdateGeoMatchSet.go index 96e978bb78e..0c9e50fdafe 100644 --- a/service/wafregional/api_op_UpdateGeoMatchSet.go +++ b/service/wafregional/api_op_UpdateGeoMatchSet.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateGeoMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGeoMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateIPSet.go b/service/wafregional/api_op_UpdateIPSet.go index 975d7b8d3c0..e92e18f021f 100644 --- a/service/wafregional/api_op_UpdateIPSet.go +++ b/service/wafregional/api_op_UpdateIPSet.go @@ -187,6 +187,9 @@ func (c *Client) addOperationUpdateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateRateBasedRule.go b/service/wafregional/api_op_UpdateRateBasedRule.go index a60e09d5992..e5165f8cb6c 100644 --- a/service/wafregional/api_op_UpdateRateBasedRule.go +++ b/service/wafregional/api_op_UpdateRateBasedRule.go @@ -172,6 +172,9 @@ func (c *Client) addOperationUpdateRateBasedRuleMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRateBasedRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateRegexMatchSet.go b/service/wafregional/api_op_UpdateRegexMatchSet.go index 0eba146f134..35ecb394ef2 100644 --- a/service/wafregional/api_op_UpdateRegexMatchSet.go +++ b/service/wafregional/api_op_UpdateRegexMatchSet.go @@ -163,6 +163,9 @@ func (c *Client) addOperationUpdateRegexMatchSetMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegexMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateRegexPatternSet.go b/service/wafregional/api_op_UpdateRegexPatternSet.go index 28351107531..90d35e95925 100644 --- a/service/wafregional/api_op_UpdateRegexPatternSet.go +++ b/service/wafregional/api_op_UpdateRegexPatternSet.go @@ -160,6 +160,9 @@ func (c *Client) addOperationUpdateRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateRule.go b/service/wafregional/api_op_UpdateRule.go index 240c2bc5e42..3c6bcc91bcf 100644 --- a/service/wafregional/api_op_UpdateRule.go +++ b/service/wafregional/api_op_UpdateRule.go @@ -170,6 +170,9 @@ func (c *Client) addOperationUpdateRuleMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateRuleGroup.go b/service/wafregional/api_op_UpdateRuleGroup.go index fb491841ab3..ceb77db364d 100644 --- a/service/wafregional/api_op_UpdateRuleGroup.go +++ b/service/wafregional/api_op_UpdateRuleGroup.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateSizeConstraintSet.go b/service/wafregional/api_op_UpdateSizeConstraintSet.go index 97206c87007..324ac199583 100644 --- a/service/wafregional/api_op_UpdateSizeConstraintSet.go +++ b/service/wafregional/api_op_UpdateSizeConstraintSet.go @@ -179,6 +179,9 @@ func (c *Client) addOperationUpdateSizeConstraintSetMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSizeConstraintSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateSqlInjectionMatchSet.go b/service/wafregional/api_op_UpdateSqlInjectionMatchSet.go index 4f350163db4..1baef36c08b 100644 --- a/service/wafregional/api_op_UpdateSqlInjectionMatchSet.go +++ b/service/wafregional/api_op_UpdateSqlInjectionMatchSet.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateSqlInjectionMatchSetMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSqlInjectionMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateWebACL.go b/service/wafregional/api_op_UpdateWebACL.go index 56f10646f5a..c7d9b3d0560 100644 --- a/service/wafregional/api_op_UpdateWebACL.go +++ b/service/wafregional/api_op_UpdateWebACL.go @@ -201,6 +201,9 @@ func (c *Client) addOperationUpdateWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafregional/api_op_UpdateXssMatchSet.go b/service/wafregional/api_op_UpdateXssMatchSet.go index cd5638edaef..23f6aa779dc 100644 --- a/service/wafregional/api_op_UpdateXssMatchSet.go +++ b/service/wafregional/api_op_UpdateXssMatchSet.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateXssMatchSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateXssMatchSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_client.go b/service/wafv2/api_client.go index 5c6169cbfb6..6b3adca61a1 100644 --- a/service/wafv2/api_client.go +++ b/service/wafv2/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/wafv2/api_op_AssociateWebACL.go b/service/wafv2/api_op_AssociateWebACL.go index d6b9d5b7dc5..0abfa805356 100644 --- a/service/wafv2/api_op_AssociateWebACL.go +++ b/service/wafv2/api_op_AssociateWebACL.go @@ -164,6 +164,9 @@ func (c *Client) addOperationAssociateWebACLMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_CheckCapacity.go b/service/wafv2/api_op_CheckCapacity.go index c8450384f26..093d83e0e63 100644 --- a/service/wafv2/api_op_CheckCapacity.go +++ b/service/wafv2/api_op_CheckCapacity.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCheckCapacityMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCheckCapacityValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_CreateAPIKey.go b/service/wafv2/api_op_CreateAPIKey.go index 6b6dbcb0378..d3bf783be13 100644 --- a/service/wafv2/api_op_CreateAPIKey.go +++ b/service/wafv2/api_op_CreateAPIKey.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateAPIKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAPIKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_CreateIPSet.go b/service/wafv2/api_op_CreateIPSet.go index 24528f1eb1f..c27bc7584f3 100644 --- a/service/wafv2/api_op_CreateIPSet.go +++ b/service/wafv2/api_op_CreateIPSet.go @@ -180,6 +180,9 @@ func (c *Client) addOperationCreateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_CreateRegexPatternSet.go b/service/wafv2/api_op_CreateRegexPatternSet.go index 49a1b3fd29e..dd7504b82e8 100644 --- a/service/wafv2/api_op_CreateRegexPatternSet.go +++ b/service/wafv2/api_op_CreateRegexPatternSet.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_CreateRuleGroup.go b/service/wafv2/api_op_CreateRuleGroup.go index 3e2f2218f10..a1d2e2db336 100644 --- a/service/wafv2/api_op_CreateRuleGroup.go +++ b/service/wafv2/api_op_CreateRuleGroup.go @@ -183,6 +183,9 @@ func (c *Client) addOperationCreateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_CreateWebACL.go b/service/wafv2/api_op_CreateWebACL.go index a888242ab9f..e2c86c58331 100644 --- a/service/wafv2/api_op_CreateWebACL.go +++ b/service/wafv2/api_op_CreateWebACL.go @@ -215,6 +215,9 @@ func (c *Client) addOperationCreateWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteAPIKey.go b/service/wafv2/api_op_DeleteAPIKey.go index 86465a4bcd1..6c83b2c9377 100644 --- a/service/wafv2/api_op_DeleteAPIKey.go +++ b/service/wafv2/api_op_DeleteAPIKey.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteAPIKeyMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAPIKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteFirewallManagerRuleGroups.go b/service/wafv2/api_op_DeleteFirewallManagerRuleGroups.go index c8727c56afc..fabbcafd192 100644 --- a/service/wafv2/api_op_DeleteFirewallManagerRuleGroups.go +++ b/service/wafv2/api_op_DeleteFirewallManagerRuleGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteFirewallManagerRuleGroupsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFirewallManagerRuleGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteIPSet.go b/service/wafv2/api_op_DeleteIPSet.go index b2124b4098d..7c2c5104112 100644 --- a/service/wafv2/api_op_DeleteIPSet.go +++ b/service/wafv2/api_op_DeleteIPSet.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDeleteIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteLoggingConfiguration.go b/service/wafv2/api_op_DeleteLoggingConfiguration.go index db18f9045a3..d47c517f249 100644 --- a/service/wafv2/api_op_DeleteLoggingConfiguration.go +++ b/service/wafv2/api_op_DeleteLoggingConfiguration.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteLoggingConfigurationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeletePermissionPolicy.go b/service/wafv2/api_op_DeletePermissionPolicy.go index 817ea25241e..ae9635f1355 100644 --- a/service/wafv2/api_op_DeletePermissionPolicy.go +++ b/service/wafv2/api_op_DeletePermissionPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeletePermissionPolicyMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteRegexPatternSet.go b/service/wafv2/api_op_DeleteRegexPatternSet.go index b1adae5d39f..82ca08ceb70 100644 --- a/service/wafv2/api_op_DeleteRegexPatternSet.go +++ b/service/wafv2/api_op_DeleteRegexPatternSet.go @@ -136,6 +136,9 @@ func (c *Client) addOperationDeleteRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteRuleGroup.go b/service/wafv2/api_op_DeleteRuleGroup.go index 64d0ae9d7b1..96f6322d2ff 100644 --- a/service/wafv2/api_op_DeleteRuleGroup.go +++ b/service/wafv2/api_op_DeleteRuleGroup.go @@ -137,6 +137,9 @@ func (c *Client) addOperationDeleteRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DeleteWebACL.go b/service/wafv2/api_op_DeleteWebACL.go index e553eb1d756..56aaeaca71b 100644 --- a/service/wafv2/api_op_DeleteWebACL.go +++ b/service/wafv2/api_op_DeleteWebACL.go @@ -161,6 +161,9 @@ func (c *Client) addOperationDeleteWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DescribeAllManagedProducts.go b/service/wafv2/api_op_DescribeAllManagedProducts.go index c4643d9fc84..c32171ac302 100644 --- a/service/wafv2/api_op_DescribeAllManagedProducts.go +++ b/service/wafv2/api_op_DescribeAllManagedProducts.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeAllManagedProductsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAllManagedProductsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DescribeManagedProductsByVendor.go b/service/wafv2/api_op_DescribeManagedProductsByVendor.go index 0d9b5a25b3a..b69f878338b 100644 --- a/service/wafv2/api_op_DescribeManagedProductsByVendor.go +++ b/service/wafv2/api_op_DescribeManagedProductsByVendor.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeManagedProductsByVendorMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeManagedProductsByVendorValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DescribeManagedRuleGroup.go b/service/wafv2/api_op_DescribeManagedRuleGroup.go index 290b969269d..76e5997e83b 100644 --- a/service/wafv2/api_op_DescribeManagedRuleGroup.go +++ b/service/wafv2/api_op_DescribeManagedRuleGroup.go @@ -186,6 +186,9 @@ func (c *Client) addOperationDescribeManagedRuleGroupMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeManagedRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_DisassociateWebACL.go b/service/wafv2/api_op_DisassociateWebACL.go index 1581ae3383b..b6d21648e4f 100644 --- a/service/wafv2/api_op_DisassociateWebACL.go +++ b/service/wafv2/api_op_DisassociateWebACL.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDisassociateWebACLMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GenerateMobileSdkReleaseUrl.go b/service/wafv2/api_op_GenerateMobileSdkReleaseUrl.go index da4095cff4d..20f9f14740b 100644 --- a/service/wafv2/api_op_GenerateMobileSdkReleaseUrl.go +++ b/service/wafv2/api_op_GenerateMobileSdkReleaseUrl.go @@ -118,6 +118,9 @@ func (c *Client) addOperationGenerateMobileSdkReleaseUrlMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGenerateMobileSdkReleaseUrlValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetDecryptedAPIKey.go b/service/wafv2/api_op_GetDecryptedAPIKey.go index 81b3d235912..75cdaef60a3 100644 --- a/service/wafv2/api_op_GetDecryptedAPIKey.go +++ b/service/wafv2/api_op_GetDecryptedAPIKey.go @@ -135,6 +135,9 @@ func (c *Client) addOperationGetDecryptedAPIKeyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDecryptedAPIKeyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetIPSet.go b/service/wafv2/api_op_GetIPSet.go index 47f294502e7..cef90b9c3ef 100644 --- a/service/wafv2/api_op_GetIPSet.go +++ b/service/wafv2/api_op_GetIPSet.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetIPSetMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetLoggingConfiguration.go b/service/wafv2/api_op_GetLoggingConfiguration.go index d00b4b7d989..3afac0f4aaf 100644 --- a/service/wafv2/api_op_GetLoggingConfiguration.go +++ b/service/wafv2/api_op_GetLoggingConfiguration.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetManagedRuleSet.go b/service/wafv2/api_op_GetManagedRuleSet.go index 5a38d42fc53..85b754c9b16 100644 --- a/service/wafv2/api_op_GetManagedRuleSet.go +++ b/service/wafv2/api_op_GetManagedRuleSet.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetManagedRuleSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetManagedRuleSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetMobileSdkRelease.go b/service/wafv2/api_op_GetMobileSdkRelease.go index 53926da49a6..55cb2aebaae 100644 --- a/service/wafv2/api_op_GetMobileSdkRelease.go +++ b/service/wafv2/api_op_GetMobileSdkRelease.go @@ -119,6 +119,9 @@ func (c *Client) addOperationGetMobileSdkReleaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMobileSdkReleaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetPermissionPolicy.go b/service/wafv2/api_op_GetPermissionPolicy.go index c0e2a645b13..f1dc050ba49 100644 --- a/service/wafv2/api_op_GetPermissionPolicy.go +++ b/service/wafv2/api_op_GetPermissionPolicy.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetPermissionPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetRateBasedStatementManagedKeys.go b/service/wafv2/api_op_GetRateBasedStatementManagedKeys.go index 899746031c6..b18e5da288c 100644 --- a/service/wafv2/api_op_GetRateBasedStatementManagedKeys.go +++ b/service/wafv2/api_op_GetRateBasedStatementManagedKeys.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetRateBasedStatementManagedKeysMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRateBasedStatementManagedKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetRegexPatternSet.go b/service/wafv2/api_op_GetRegexPatternSet.go index 0625fa90aa5..6e61f4f25e2 100644 --- a/service/wafv2/api_op_GetRegexPatternSet.go +++ b/service/wafv2/api_op_GetRegexPatternSet.go @@ -138,6 +138,9 @@ func (c *Client) addOperationGetRegexPatternSetMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetRuleGroup.go b/service/wafv2/api_op_GetRuleGroup.go index f7b5a10907e..f92f2de2025 100644 --- a/service/wafv2/api_op_GetRuleGroup.go +++ b/service/wafv2/api_op_GetRuleGroup.go @@ -136,6 +136,9 @@ func (c *Client) addOperationGetRuleGroupMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRuleGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wafv2/api_op_GetSampledRequests.go b/service/wafv2/api_op_GetSampledRequests.go index 2653eb25444..b9ebf1022b0 100644 --- a/service/wafv2/api_op_GetSampledRequests.go +++ b/service/wafv2/api_op_GetSampledRequests.go @@ -172,6 +172,9 @@ func (c *Client) addOperationGetSampledRequestsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSampledRequestsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetWebACL.go b/service/wafv2/api_op_GetWebACL.go index 45c959423ba..a771cf383df 100644 --- a/service/wafv2/api_op_GetWebACL.go +++ b/service/wafv2/api_op_GetWebACL.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetWebACLMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_GetWebACLForResource.go b/service/wafv2/api_op_GetWebACLForResource.go index e5f655e8f4e..a73f6ffd36e 100644 --- a/service/wafv2/api_op_GetWebACLForResource.go +++ b/service/wafv2/api_op_GetWebACLForResource.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetWebACLForResourceMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWebACLForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListAPIKeys.go b/service/wafv2/api_op_ListAPIKeys.go index 2eebd5609ff..493a74c9786 100644 --- a/service/wafv2/api_op_ListAPIKeys.go +++ b/service/wafv2/api_op_ListAPIKeys.go @@ -147,6 +147,9 @@ func (c *Client) addOperationListAPIKeysMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAPIKeysValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go b/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go index b34baaf3753..cee7acdf660 100644 --- a/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go +++ b/service/wafv2/api_op_ListAvailableManagedRuleGroupVersions.go @@ -151,6 +151,9 @@ func (c *Client) addOperationListAvailableManagedRuleGroupVersionsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAvailableManagedRuleGroupVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListAvailableManagedRuleGroups.go b/service/wafv2/api_op_ListAvailableManagedRuleGroups.go index e389c069326..37d41099db1 100644 --- a/service/wafv2/api_op_ListAvailableManagedRuleGroups.go +++ b/service/wafv2/api_op_ListAvailableManagedRuleGroups.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListAvailableManagedRuleGroupsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAvailableManagedRuleGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListIPSets.go b/service/wafv2/api_op_ListIPSets.go index 2f23cf1a753..eb2bc098344 100644 --- a/service/wafv2/api_op_ListIPSets.go +++ b/service/wafv2/api_op_ListIPSets.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListIPSetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIPSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListLoggingConfigurations.go b/service/wafv2/api_op_ListLoggingConfigurations.go index e3f159b4bdb..bfaa50d5886 100644 --- a/service/wafv2/api_op_ListLoggingConfigurations.go +++ b/service/wafv2/api_op_ListLoggingConfigurations.go @@ -149,6 +149,9 @@ func (c *Client) addOperationListLoggingConfigurationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLoggingConfigurationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListManagedRuleSets.go b/service/wafv2/api_op_ListManagedRuleSets.go index b1d91645713..181da4e52c1 100644 --- a/service/wafv2/api_op_ListManagedRuleSets.go +++ b/service/wafv2/api_op_ListManagedRuleSets.go @@ -144,6 +144,9 @@ func (c *Client) addOperationListManagedRuleSetsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListManagedRuleSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListMobileSdkReleases.go b/service/wafv2/api_op_ListMobileSdkReleases.go index 9ce673303ff..9cf0c5e393d 100644 --- a/service/wafv2/api_op_ListMobileSdkReleases.go +++ b/service/wafv2/api_op_ListMobileSdkReleases.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListMobileSdkReleasesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMobileSdkReleasesValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListRegexPatternSets.go b/service/wafv2/api_op_ListRegexPatternSets.go index 57794cb4d5d..de66021e5bf 100644 --- a/service/wafv2/api_op_ListRegexPatternSets.go +++ b/service/wafv2/api_op_ListRegexPatternSets.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListRegexPatternSetsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRegexPatternSetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListResourcesForWebACL.go b/service/wafv2/api_op_ListResourcesForWebACL.go index 3137f9cf122..8240bee87b1 100644 --- a/service/wafv2/api_op_ListResourcesForWebACL.go +++ b/service/wafv2/api_op_ListResourcesForWebACL.go @@ -130,6 +130,9 @@ func (c *Client) addOperationListResourcesForWebACLMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesForWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListRuleGroups.go b/service/wafv2/api_op_ListRuleGroups.go index 7b192e7a645..74a4eeec7e1 100644 --- a/service/wafv2/api_op_ListRuleGroups.go +++ b/service/wafv2/api_op_ListRuleGroups.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListRuleGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListTagsForResource.go b/service/wafv2/api_op_ListTagsForResource.go index 4553a0f1bff..2f6b21fe831 100644 --- a/service/wafv2/api_op_ListTagsForResource.go +++ b/service/wafv2/api_op_ListTagsForResource.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_ListWebACLs.go b/service/wafv2/api_op_ListWebACLs.go index b98f84a93d5..9e1af0c40c3 100644 --- a/service/wafv2/api_op_ListWebACLs.go +++ b/service/wafv2/api_op_ListWebACLs.go @@ -136,6 +136,9 @@ func (c *Client) addOperationListWebACLsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWebACLsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_PutLoggingConfiguration.go b/service/wafv2/api_op_PutLoggingConfiguration.go index ab0b890e9f4..405235fe73f 100644 --- a/service/wafv2/api_op_PutLoggingConfiguration.go +++ b/service/wafv2/api_op_PutLoggingConfiguration.go @@ -152,6 +152,9 @@ func (c *Client) addOperationPutLoggingConfigurationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutLoggingConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_PutManagedRuleSetVersions.go b/service/wafv2/api_op_PutManagedRuleSetVersions.go index 612d11f2c88..96c5c4536a4 100644 --- a/service/wafv2/api_op_PutManagedRuleSetVersions.go +++ b/service/wafv2/api_op_PutManagedRuleSetVersions.go @@ -177,6 +177,9 @@ func (c *Client) addOperationPutManagedRuleSetVersionsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutManagedRuleSetVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_PutPermissionPolicy.go b/service/wafv2/api_op_PutPermissionPolicy.go index 14084286b93..c1f46541e05 100644 --- a/service/wafv2/api_op_PutPermissionPolicy.go +++ b/service/wafv2/api_op_PutPermissionPolicy.go @@ -137,6 +137,9 @@ func (c *Client) addOperationPutPermissionPolicyMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutPermissionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_TagResource.go b/service/wafv2/api_op_TagResource.go index e3d17348239..f66a3bf9cbd 100644 --- a/service/wafv2/api_op_TagResource.go +++ b/service/wafv2/api_op_TagResource.go @@ -115,6 +115,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_UntagResource.go b/service/wafv2/api_op_UntagResource.go index 8ad3163c32d..dbe29ee79f4 100644 --- a/service/wafv2/api_op_UntagResource.go +++ b/service/wafv2/api_op_UntagResource.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_UpdateIPSet.go b/service/wafv2/api_op_UpdateIPSet.go index da392de63a3..ec116840beb 100644 --- a/service/wafv2/api_op_UpdateIPSet.go +++ b/service/wafv2/api_op_UpdateIPSet.go @@ -217,6 +217,9 @@ func (c *Client) addOperationUpdateIPSetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIPSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go b/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go index 6f015672b51..924c74e964b 100644 --- a/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go +++ b/service/wafv2/api_op_UpdateManagedRuleSetVersionExpiryDate.go @@ -186,6 +186,9 @@ func (c *Client) addOperationUpdateManagedRuleSetVersionExpiryDateMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateManagedRuleSetVersionExpiryDateValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_UpdateRegexPatternSet.go b/service/wafv2/api_op_UpdateRegexPatternSet.go index 072f5a2672f..2c14ff1a010 100644 --- a/service/wafv2/api_op_UpdateRegexPatternSet.go +++ b/service/wafv2/api_op_UpdateRegexPatternSet.go @@ -181,6 +181,9 @@ func (c *Client) addOperationUpdateRegexPatternSetMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRegexPatternSetValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_UpdateRuleGroup.go b/service/wafv2/api_op_UpdateRuleGroup.go index 3f840f942d1..b7c893e2dde 100644 --- a/service/wafv2/api_op_UpdateRuleGroup.go +++ b/service/wafv2/api_op_UpdateRuleGroup.go @@ -209,6 +209,9 @@ func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/wafv2/api_op_UpdateWebACL.go b/service/wafv2/api_op_UpdateWebACL.go index f49850ab93c..25bff1681d0 100644 --- a/service/wafv2/api_op_UpdateWebACL.go +++ b/service/wafv2/api_op_UpdateWebACL.go @@ -261,6 +261,9 @@ func (c *Client) addOperationUpdateWebACLMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWebACLValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_client.go b/service/wellarchitected/api_client.go index 0490ee02659..4864dc0bbc6 100644 --- a/service/wellarchitected/api_client.go +++ b/service/wellarchitected/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/wellarchitected/api_op_AssociateLenses.go b/service/wellarchitected/api_op_AssociateLenses.go index fd17b4c309d..895b692b7b8 100644 --- a/service/wellarchitected/api_op_AssociateLenses.go +++ b/service/wellarchitected/api_op_AssociateLenses.go @@ -121,6 +121,9 @@ func (c *Client) addOperationAssociateLensesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateLensesValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_AssociateProfiles.go b/service/wellarchitected/api_op_AssociateProfiles.go index 1844f41ef9f..5928afd695c 100644 --- a/service/wellarchitected/api_op_AssociateProfiles.go +++ b/service/wellarchitected/api_op_AssociateProfiles.go @@ -107,6 +107,9 @@ func (c *Client) addOperationAssociateProfilesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateLensShare.go b/service/wellarchitected/api_op_CreateLensShare.go index 3d0b4ea3ef3..2c81cce1cc7 100644 --- a/service/wellarchitected/api_op_CreateLensShare.go +++ b/service/wellarchitected/api_op_CreateLensShare.go @@ -161,6 +161,9 @@ func (c *Client) addOperationCreateLensShareMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLensShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateLensVersion.go b/service/wellarchitected/api_op_CreateLensVersion.go index 50f83ef81c1..22d879ece8c 100644 --- a/service/wellarchitected/api_op_CreateLensVersion.go +++ b/service/wellarchitected/api_op_CreateLensVersion.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateLensVersionMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateLensVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateMilestone.go b/service/wellarchitected/api_op_CreateMilestone.go index 63f6b486d0b..e4c05a1caf8 100644 --- a/service/wellarchitected/api_op_CreateMilestone.go +++ b/service/wellarchitected/api_op_CreateMilestone.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateMilestoneMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMilestoneMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateProfile.go b/service/wellarchitected/api_op_CreateProfile.go index c547cd46d01..4347f9ba782 100644 --- a/service/wellarchitected/api_op_CreateProfile.go +++ b/service/wellarchitected/api_op_CreateProfile.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateProfileShare.go b/service/wellarchitected/api_op_CreateProfileShare.go index 7151074ee35..b596c4f5bfb 100644 --- a/service/wellarchitected/api_op_CreateProfileShare.go +++ b/service/wellarchitected/api_op_CreateProfileShare.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateProfileShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateProfileShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateReviewTemplate.go b/service/wellarchitected/api_op_CreateReviewTemplate.go index 0849f51dd02..64d23834ec8 100644 --- a/service/wellarchitected/api_op_CreateReviewTemplate.go +++ b/service/wellarchitected/api_op_CreateReviewTemplate.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateReviewTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateReviewTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateTemplateShare.go b/service/wellarchitected/api_op_CreateTemplateShare.go index 950b2b266d0..2c5ade7b753 100644 --- a/service/wellarchitected/api_op_CreateTemplateShare.go +++ b/service/wellarchitected/api_op_CreateTemplateShare.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateTemplateShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTemplateShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateWorkload.go b/service/wellarchitected/api_op_CreateWorkload.go index 3dc41663125..40b53535176 100644 --- a/service/wellarchitected/api_op_CreateWorkload.go +++ b/service/wellarchitected/api_op_CreateWorkload.go @@ -282,6 +282,9 @@ func (c *Client) addOperationCreateWorkloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorkloadMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_CreateWorkloadShare.go b/service/wellarchitected/api_op_CreateWorkloadShare.go index 8dc94b9d3e1..e7bfcd0d128 100644 --- a/service/wellarchitected/api_op_CreateWorkloadShare.go +++ b/service/wellarchitected/api_op_CreateWorkloadShare.go @@ -151,6 +151,9 @@ func (c *Client) addOperationCreateWorkloadShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateWorkloadShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteLens.go b/service/wellarchitected/api_op_DeleteLens.go index 2fba87b4fa7..44d93ce19b3 100644 --- a/service/wellarchitected/api_op_DeleteLens.go +++ b/service/wellarchitected/api_op_DeleteLens.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDeleteLensMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteLensMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteLensShare.go b/service/wellarchitected/api_op_DeleteLensShare.go index a63a6210a39..cf68d44ce96 100644 --- a/service/wellarchitected/api_op_DeleteLensShare.go +++ b/service/wellarchitected/api_op_DeleteLensShare.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDeleteLensShareMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteLensShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteProfile.go b/service/wellarchitected/api_op_DeleteProfile.go index 2959f71e035..5a74605fb62 100644 --- a/service/wellarchitected/api_op_DeleteProfile.go +++ b/service/wellarchitected/api_op_DeleteProfile.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteProfileMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteProfileShare.go b/service/wellarchitected/api_op_DeleteProfileShare.go index f7be5192c24..651500f5854 100644 --- a/service/wellarchitected/api_op_DeleteProfileShare.go +++ b/service/wellarchitected/api_op_DeleteProfileShare.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDeleteProfileShareMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteProfileShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteReviewTemplate.go b/service/wellarchitected/api_op_DeleteReviewTemplate.go index 86dc67fef56..8e6b9f358e3 100644 --- a/service/wellarchitected/api_op_DeleteReviewTemplate.go +++ b/service/wellarchitected/api_op_DeleteReviewTemplate.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDeleteReviewTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteReviewTemplateMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteTemplateShare.go b/service/wellarchitected/api_op_DeleteTemplateShare.go index 77237aa7033..5c5e4525d13 100644 --- a/service/wellarchitected/api_op_DeleteTemplateShare.go +++ b/service/wellarchitected/api_op_DeleteTemplateShare.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDeleteTemplateShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteTemplateShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteWorkload.go b/service/wellarchitected/api_op_DeleteWorkload.go index 6a4b22ba65d..6750e0c42ec 100644 --- a/service/wellarchitected/api_op_DeleteWorkload.go +++ b/service/wellarchitected/api_op_DeleteWorkload.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteWorkloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteWorkloadMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DeleteWorkloadShare.go b/service/wellarchitected/api_op_DeleteWorkloadShare.go index ee8d43a55df..3d540418777 100644 --- a/service/wellarchitected/api_op_DeleteWorkloadShare.go +++ b/service/wellarchitected/api_op_DeleteWorkloadShare.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDeleteWorkloadShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteWorkloadShareMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_DisassociateLenses.go b/service/wellarchitected/api_op_DisassociateLenses.go index 1036c3bce77..24c7456c99a 100644 --- a/service/wellarchitected/api_op_DisassociateLenses.go +++ b/service/wellarchitected/api_op_DisassociateLenses.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDisassociateLensesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateLensesValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_DisassociateProfiles.go b/service/wellarchitected/api_op_DisassociateProfiles.go index 8813efe9b34..c37711970c3 100644 --- a/service/wellarchitected/api_op_DisassociateProfiles.go +++ b/service/wellarchitected/api_op_DisassociateProfiles.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateProfilesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateProfilesValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_ExportLens.go b/service/wellarchitected/api_op_ExportLens.go index 604159dbf78..55162f6edb5 100644 --- a/service/wellarchitected/api_op_ExportLens.go +++ b/service/wellarchitected/api_op_ExportLens.go @@ -137,6 +137,9 @@ func (c *Client) addOperationExportLensMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpExportLensValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetAnswer.go b/service/wellarchitected/api_op_GetAnswer.go index b35e79c5405..ed1d44a647c 100644 --- a/service/wellarchitected/api_op_GetAnswer.go +++ b/service/wellarchitected/api_op_GetAnswer.go @@ -163,6 +163,9 @@ func (c *Client) addOperationGetAnswerMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAnswerValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetConsolidatedReport.go b/service/wellarchitected/api_op_GetConsolidatedReport.go index 78c00356ad7..c18dac46816 100644 --- a/service/wellarchitected/api_op_GetConsolidatedReport.go +++ b/service/wellarchitected/api_op_GetConsolidatedReport.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetConsolidatedReportMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetConsolidatedReportValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationGetConsolidatedReportMiddlewares(stack *middleware. return nil } -// GetConsolidatedReportAPIClient is a client that implements the -// GetConsolidatedReport operation. -type GetConsolidatedReportAPIClient interface { - GetConsolidatedReport(context.Context, *GetConsolidatedReportInput, ...func(*Options)) (*GetConsolidatedReportOutput, error) -} - -var _ GetConsolidatedReportAPIClient = (*Client)(nil) - // GetConsolidatedReportPaginatorOptions is the paginator options for // GetConsolidatedReport type GetConsolidatedReportPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *GetConsolidatedReportPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetConsolidatedReport(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *GetConsolidatedReportPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// GetConsolidatedReportAPIClient is a client that implements the +// GetConsolidatedReport operation. +type GetConsolidatedReportAPIClient interface { + GetConsolidatedReport(context.Context, *GetConsolidatedReportInput, ...func(*Options)) (*GetConsolidatedReportOutput, error) +} + +var _ GetConsolidatedReportAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetConsolidatedReport(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_GetGlobalSettings.go b/service/wellarchitected/api_op_GetGlobalSettings.go index 18c6db5ba20..38c34054754 100644 --- a/service/wellarchitected/api_op_GetGlobalSettings.go +++ b/service/wellarchitected/api_op_GetGlobalSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetGlobalSettingsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetLens.go b/service/wellarchitected/api_op_GetLens.go index 0561c497e9d..7a45bc1faa9 100644 --- a/service/wellarchitected/api_op_GetLens.go +++ b/service/wellarchitected/api_op_GetLens.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetLensMiddlewares(stack *middleware.Stack, options if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLensValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetLensReview.go b/service/wellarchitected/api_op_GetLensReview.go index e0d2cd93207..778fca66db9 100644 --- a/service/wellarchitected/api_op_GetLensReview.go +++ b/service/wellarchitected/api_op_GetLensReview.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetLensReviewMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLensReviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetLensReviewReport.go b/service/wellarchitected/api_op_GetLensReviewReport.go index 0b1f3cb0574..fd95e9d09b4 100644 --- a/service/wellarchitected/api_op_GetLensReviewReport.go +++ b/service/wellarchitected/api_op_GetLensReviewReport.go @@ -140,6 +140,9 @@ func (c *Client) addOperationGetLensReviewReportMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLensReviewReportValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetLensVersionDifference.go b/service/wellarchitected/api_op_GetLensVersionDifference.go index e104736495e..b162fd73679 100644 --- a/service/wellarchitected/api_op_GetLensVersionDifference.go +++ b/service/wellarchitected/api_op_GetLensVersionDifference.go @@ -151,6 +151,9 @@ func (c *Client) addOperationGetLensVersionDifferenceMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetLensVersionDifferenceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetMilestone.go b/service/wellarchitected/api_op_GetMilestone.go index 1735322f83a..d1d6b55d045 100644 --- a/service/wellarchitected/api_op_GetMilestone.go +++ b/service/wellarchitected/api_op_GetMilestone.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetMilestoneMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMilestoneValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetProfile.go b/service/wellarchitected/api_op_GetProfile.go index bf516e0b66a..5ed9b120a86 100644 --- a/service/wellarchitected/api_op_GetProfile.go +++ b/service/wellarchitected/api_op_GetProfile.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetProfileMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetProfileTemplate.go b/service/wellarchitected/api_op_GetProfileTemplate.go index 1f553262d8e..e0820d2984c 100644 --- a/service/wellarchitected/api_op_GetProfileTemplate.go +++ b/service/wellarchitected/api_op_GetProfileTemplate.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetProfileTemplateMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProfileTemplate(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetReviewTemplate.go b/service/wellarchitected/api_op_GetReviewTemplate.go index fe7e553e879..2da209b39f6 100644 --- a/service/wellarchitected/api_op_GetReviewTemplate.go +++ b/service/wellarchitected/api_op_GetReviewTemplate.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetReviewTemplateMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReviewTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetReviewTemplateAnswer.go b/service/wellarchitected/api_op_GetReviewTemplateAnswer.go index b50661cf3e0..00450aede41 100644 --- a/service/wellarchitected/api_op_GetReviewTemplateAnswer.go +++ b/service/wellarchitected/api_op_GetReviewTemplateAnswer.go @@ -146,6 +146,9 @@ func (c *Client) addOperationGetReviewTemplateAnswerMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReviewTemplateAnswerValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetReviewTemplateLensReview.go b/service/wellarchitected/api_op_GetReviewTemplateLensReview.go index 43427112e8d..00c1f972605 100644 --- a/service/wellarchitected/api_op_GetReviewTemplateLensReview.go +++ b/service/wellarchitected/api_op_GetReviewTemplateLensReview.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetReviewTemplateLensReviewMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetReviewTemplateLensReviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_GetWorkload.go b/service/wellarchitected/api_op_GetWorkload.go index aa91827bec9..e67c9238aba 100644 --- a/service/wellarchitected/api_op_GetWorkload.go +++ b/service/wellarchitected/api_op_GetWorkload.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetWorkloadMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_ImportLens.go b/service/wellarchitected/api_op_ImportLens.go index a349628dcab..58ed1130050 100644 --- a/service/wellarchitected/api_op_ImportLens.go +++ b/service/wellarchitected/api_op_ImportLens.go @@ -166,6 +166,9 @@ func (c *Client) addOperationImportLensMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opImportLensMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_ListAnswers.go b/service/wellarchitected/api_op_ListAnswers.go index 64a2bd6fc45..40b91596341 100644 --- a/service/wellarchitected/api_op_ListAnswers.go +++ b/service/wellarchitected/api_op_ListAnswers.go @@ -175,6 +175,9 @@ func (c *Client) addOperationListAnswersMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAnswersValidationMiddleware(stack); err != nil { return err } @@ -199,13 +202,6 @@ func (c *Client) addOperationListAnswersMiddlewares(stack *middleware.Stack, opt return nil } -// ListAnswersAPIClient is a client that implements the ListAnswers operation. -type ListAnswersAPIClient interface { - ListAnswers(context.Context, *ListAnswersInput, ...func(*Options)) (*ListAnswersOutput, error) -} - -var _ ListAnswersAPIClient = (*Client)(nil) - // ListAnswersPaginatorOptions is the paginator options for ListAnswers type ListAnswersPaginatorOptions struct { // The maximum number of results to return for this request. @@ -269,6 +265,9 @@ func (p *ListAnswersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAnswers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -288,6 +287,13 @@ func (p *ListAnswersPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAnswersAPIClient is a client that implements the ListAnswers operation. +type ListAnswersAPIClient interface { + ListAnswers(context.Context, *ListAnswersInput, ...func(*Options)) (*ListAnswersOutput, error) +} + +var _ ListAnswersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAnswers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListCheckDetails.go b/service/wellarchitected/api_op_ListCheckDetails.go index d52613ae9f5..29bb6b5be62 100644 --- a/service/wellarchitected/api_op_ListCheckDetails.go +++ b/service/wellarchitected/api_op_ListCheckDetails.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListCheckDetailsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCheckDetailsValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListCheckDetailsMiddlewares(stack *middleware.Stack return nil } -// ListCheckDetailsAPIClient is a client that implements the ListCheckDetails -// operation. -type ListCheckDetailsAPIClient interface { - ListCheckDetails(context.Context, *ListCheckDetailsInput, ...func(*Options)) (*ListCheckDetailsOutput, error) -} - -var _ ListCheckDetailsAPIClient = (*Client)(nil) - // ListCheckDetailsPaginatorOptions is the paginator options for ListCheckDetails type ListCheckDetailsPaginatorOptions struct { // The maximum number of results to return for this request. @@ -234,6 +229,9 @@ func (p *ListCheckDetailsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCheckDetails(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -253,6 +251,14 @@ func (p *ListCheckDetailsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListCheckDetailsAPIClient is a client that implements the ListCheckDetails +// operation. +type ListCheckDetailsAPIClient interface { + ListCheckDetails(context.Context, *ListCheckDetailsInput, ...func(*Options)) (*ListCheckDetailsOutput, error) +} + +var _ ListCheckDetailsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCheckDetails(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListCheckSummaries.go b/service/wellarchitected/api_op_ListCheckSummaries.go index 254f489c5ef..22ed7dfc6f7 100644 --- a/service/wellarchitected/api_op_ListCheckSummaries.go +++ b/service/wellarchitected/api_op_ListCheckSummaries.go @@ -139,6 +139,9 @@ func (c *Client) addOperationListCheckSummariesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListCheckSummariesValidationMiddleware(stack); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationListCheckSummariesMiddlewares(stack *middleware.Sta return nil } -// ListCheckSummariesAPIClient is a client that implements the ListCheckSummaries -// operation. -type ListCheckSummariesAPIClient interface { - ListCheckSummaries(context.Context, *ListCheckSummariesInput, ...func(*Options)) (*ListCheckSummariesOutput, error) -} - -var _ ListCheckSummariesAPIClient = (*Client)(nil) - // ListCheckSummariesPaginatorOptions is the paginator options for // ListCheckSummaries type ListCheckSummariesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *ListCheckSummariesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListCheckSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *ListCheckSummariesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListCheckSummariesAPIClient is a client that implements the ListCheckSummaries +// operation. +type ListCheckSummariesAPIClient interface { + ListCheckSummaries(context.Context, *ListCheckSummariesInput, ...func(*Options)) (*ListCheckSummariesOutput, error) +} + +var _ ListCheckSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListCheckSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListLensReviewImprovements.go b/service/wellarchitected/api_op_ListLensReviewImprovements.go index 5245649e80d..00add2b6757 100644 --- a/service/wellarchitected/api_op_ListLensReviewImprovements.go +++ b/service/wellarchitected/api_op_ListLensReviewImprovements.go @@ -175,6 +175,9 @@ func (c *Client) addOperationListLensReviewImprovementsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLensReviewImprovementsValidationMiddleware(stack); err != nil { return err } @@ -199,14 +202,6 @@ func (c *Client) addOperationListLensReviewImprovementsMiddlewares(stack *middle return nil } -// ListLensReviewImprovementsAPIClient is a client that implements the -// ListLensReviewImprovements operation. -type ListLensReviewImprovementsAPIClient interface { - ListLensReviewImprovements(context.Context, *ListLensReviewImprovementsInput, ...func(*Options)) (*ListLensReviewImprovementsOutput, error) -} - -var _ ListLensReviewImprovementsAPIClient = (*Client)(nil) - // ListLensReviewImprovementsPaginatorOptions is the paginator options for // ListLensReviewImprovements type ListLensReviewImprovementsPaginatorOptions struct { @@ -273,6 +268,9 @@ func (p *ListLensReviewImprovementsPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLensReviewImprovements(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -292,6 +290,14 @@ func (p *ListLensReviewImprovementsPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListLensReviewImprovementsAPIClient is a client that implements the +// ListLensReviewImprovements operation. +type ListLensReviewImprovementsAPIClient interface { + ListLensReviewImprovements(context.Context, *ListLensReviewImprovementsInput, ...func(*Options)) (*ListLensReviewImprovementsOutput, error) +} + +var _ ListLensReviewImprovementsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLensReviewImprovements(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListLensReviews.go b/service/wellarchitected/api_op_ListLensReviews.go index 2efc4cd7f2e..949fc41b6e9 100644 --- a/service/wellarchitected/api_op_ListLensReviews.go +++ b/service/wellarchitected/api_op_ListLensReviews.go @@ -132,6 +132,9 @@ func (c *Client) addOperationListLensReviewsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLensReviewsValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationListLensReviewsMiddlewares(stack *middleware.Stack, return nil } -// ListLensReviewsAPIClient is a client that implements the ListLensReviews -// operation. -type ListLensReviewsAPIClient interface { - ListLensReviews(context.Context, *ListLensReviewsInput, ...func(*Options)) (*ListLensReviewsOutput, error) -} - -var _ ListLensReviewsAPIClient = (*Client)(nil) - // ListLensReviewsPaginatorOptions is the paginator options for ListLensReviews type ListLensReviewsPaginatorOptions struct { // The maximum number of results to return for this request. @@ -227,6 +222,9 @@ func (p *ListLensReviewsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLensReviews(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListLensReviewsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListLensReviewsAPIClient is a client that implements the ListLensReviews +// operation. +type ListLensReviewsAPIClient interface { + ListLensReviews(context.Context, *ListLensReviewsInput, ...func(*Options)) (*ListLensReviewsOutput, error) +} + +var _ ListLensReviewsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLensReviews(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListLensShares.go b/service/wellarchitected/api_op_ListLensShares.go index ee65dd7a44b..c51570e9d23 100644 --- a/service/wellarchitected/api_op_ListLensShares.go +++ b/service/wellarchitected/api_op_ListLensShares.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListLensSharesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListLensSharesValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListLensSharesMiddlewares(stack *middleware.Stack, return nil } -// ListLensSharesAPIClient is a client that implements the ListLensShares -// operation. -type ListLensSharesAPIClient interface { - ListLensShares(context.Context, *ListLensSharesInput, ...func(*Options)) (*ListLensSharesOutput, error) -} - -var _ ListLensSharesAPIClient = (*Client)(nil) - // ListLensSharesPaginatorOptions is the paginator options for ListLensShares type ListLensSharesPaginatorOptions struct { // The maximum number of results to return for this request. @@ -229,6 +224,9 @@ func (p *ListLensSharesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLensShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListLensSharesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListLensSharesAPIClient is a client that implements the ListLensShares +// operation. +type ListLensSharesAPIClient interface { + ListLensShares(context.Context, *ListLensSharesInput, ...func(*Options)) (*ListLensSharesOutput, error) +} + +var _ ListLensSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLensShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListLenses.go b/service/wellarchitected/api_op_ListLenses.go index a8630065c11..be15387c8df 100644 --- a/service/wellarchitected/api_op_ListLenses.go +++ b/service/wellarchitected/api_op_ListLenses.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListLensesMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLenses(options.Region), middleware.Before); err != nil { return err } @@ -142,13 +145,6 @@ func (c *Client) addOperationListLensesMiddlewares(stack *middleware.Stack, opti return nil } -// ListLensesAPIClient is a client that implements the ListLenses operation. -type ListLensesAPIClient interface { - ListLenses(context.Context, *ListLensesInput, ...func(*Options)) (*ListLensesOutput, error) -} - -var _ ListLensesAPIClient = (*Client)(nil) - // ListLensesPaginatorOptions is the paginator options for ListLenses type ListLensesPaginatorOptions struct { // The maximum number of results to return for this request. @@ -212,6 +208,9 @@ func (p *ListLensesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListLenses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +230,13 @@ func (p *ListLensesPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListLensesAPIClient is a client that implements the ListLenses operation. +type ListLensesAPIClient interface { + ListLenses(context.Context, *ListLensesInput, ...func(*Options)) (*ListLensesOutput, error) +} + +var _ ListLensesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListLenses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListMilestones.go b/service/wellarchitected/api_op_ListMilestones.go index ca7822a4135..526319779b2 100644 --- a/service/wellarchitected/api_op_ListMilestones.go +++ b/service/wellarchitected/api_op_ListMilestones.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListMilestonesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMilestonesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListMilestonesMiddlewares(stack *middleware.Stack, return nil } -// ListMilestonesAPIClient is a client that implements the ListMilestones -// operation. -type ListMilestonesAPIClient interface { - ListMilestones(context.Context, *ListMilestonesInput, ...func(*Options)) (*ListMilestonesOutput, error) -} - -var _ ListMilestonesAPIClient = (*Client)(nil) - // ListMilestonesPaginatorOptions is the paginator options for ListMilestones type ListMilestonesPaginatorOptions struct { // The maximum number of results to return for this request. @@ -217,6 +212,9 @@ func (p *ListMilestonesPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMilestones(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListMilestonesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListMilestonesAPIClient is a client that implements the ListMilestones +// operation. +type ListMilestonesAPIClient interface { + ListMilestones(context.Context, *ListMilestonesInput, ...func(*Options)) (*ListMilestonesOutput, error) +} + +var _ ListMilestonesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMilestones(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListNotifications.go b/service/wellarchitected/api_op_ListNotifications.go index 7f58884bd81..52ac18c7e42 100644 --- a/service/wellarchitected/api_op_ListNotifications.go +++ b/service/wellarchitected/api_op_ListNotifications.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListNotificationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNotifications(options.Region), middleware.Before); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListNotificationsMiddlewares(stack *middleware.Stac return nil } -// ListNotificationsAPIClient is a client that implements the ListNotifications -// operation. -type ListNotificationsAPIClient interface { - ListNotifications(context.Context, *ListNotificationsInput, ...func(*Options)) (*ListNotificationsOutput, error) -} - -var _ ListNotificationsAPIClient = (*Client)(nil) - // ListNotificationsPaginatorOptions is the paginator options for ListNotifications type ListNotificationsPaginatorOptions struct { // The maximum number of results to return for this request. @@ -211,6 +206,9 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNotifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -230,6 +228,14 @@ func (p *ListNotificationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListNotificationsAPIClient is a client that implements the ListNotifications +// operation. +type ListNotificationsAPIClient interface { + ListNotifications(context.Context, *ListNotificationsInput, ...func(*Options)) (*ListNotificationsOutput, error) +} + +var _ ListNotificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNotifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListProfileNotifications.go b/service/wellarchitected/api_op_ListProfileNotifications.go index 057d87f274d..64db64f2d87 100644 --- a/service/wellarchitected/api_op_ListProfileNotifications.go +++ b/service/wellarchitected/api_op_ListProfileNotifications.go @@ -114,6 +114,9 @@ func (c *Client) addOperationListProfileNotificationsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfileNotifications(options.Region), middleware.Before); err != nil { return err } @@ -135,14 +138,6 @@ func (c *Client) addOperationListProfileNotificationsMiddlewares(stack *middlewa return nil } -// ListProfileNotificationsAPIClient is a client that implements the -// ListProfileNotifications operation. -type ListProfileNotificationsAPIClient interface { - ListProfileNotifications(context.Context, *ListProfileNotificationsInput, ...func(*Options)) (*ListProfileNotificationsOutput, error) -} - -var _ ListProfileNotificationsAPIClient = (*Client)(nil) - // ListProfileNotificationsPaginatorOptions is the paginator options for // ListProfileNotifications type ListProfileNotificationsPaginatorOptions struct { @@ -208,6 +203,9 @@ func (p *ListProfileNotificationsPaginator) NextPage(ctx context.Context, optFns } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfileNotifications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +225,14 @@ func (p *ListProfileNotificationsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// ListProfileNotificationsAPIClient is a client that implements the +// ListProfileNotifications operation. +type ListProfileNotificationsAPIClient interface { + ListProfileNotifications(context.Context, *ListProfileNotificationsInput, ...func(*Options)) (*ListProfileNotificationsOutput, error) +} + +var _ ListProfileNotificationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfileNotifications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListProfileShares.go b/service/wellarchitected/api_op_ListProfileShares.go index 449f5d8b802..698d0d43424 100644 --- a/service/wellarchitected/api_op_ListProfileShares.go +++ b/service/wellarchitected/api_op_ListProfileShares.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListProfileSharesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListProfileSharesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListProfileSharesMiddlewares(stack *middleware.Stac return nil } -// ListProfileSharesAPIClient is a client that implements the ListProfileShares -// operation. -type ListProfileSharesAPIClient interface { - ListProfileShares(context.Context, *ListProfileSharesInput, ...func(*Options)) (*ListProfileSharesOutput, error) -} - -var _ ListProfileSharesAPIClient = (*Client)(nil) - // ListProfileSharesPaginatorOptions is the paginator options for ListProfileShares type ListProfileSharesPaginatorOptions struct { // The maximum number of results to return for this request. @@ -217,6 +212,9 @@ func (p *ListProfileSharesPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfileShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListProfileSharesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListProfileSharesAPIClient is a client that implements the ListProfileShares +// operation. +type ListProfileSharesAPIClient interface { + ListProfileShares(context.Context, *ListProfileSharesInput, ...func(*Options)) (*ListProfileSharesOutput, error) +} + +var _ ListProfileSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfileShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListProfiles.go b/service/wellarchitected/api_op_ListProfiles.go index 10fe389304d..064f9039bae 100644 --- a/service/wellarchitected/api_op_ListProfiles.go +++ b/service/wellarchitected/api_op_ListProfiles.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProfiles(options.Region), middleware.Before); err != nil { return err } @@ -138,13 +141,6 @@ func (c *Client) addOperationListProfilesMiddlewares(stack *middleware.Stack, op return nil } -// ListProfilesAPIClient is a client that implements the ListProfiles operation. -type ListProfilesAPIClient interface { - ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) -} - -var _ ListProfilesAPIClient = (*Client)(nil) - // ListProfilesPaginatorOptions is the paginator options for ListProfiles type ListProfilesPaginatorOptions struct { // The maximum number of results to return for this request. @@ -208,6 +204,9 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListProfiles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -227,6 +226,13 @@ func (p *ListProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListProfilesAPIClient is a client that implements the ListProfiles operation. +type ListProfilesAPIClient interface { + ListProfiles(context.Context, *ListProfilesInput, ...func(*Options)) (*ListProfilesOutput, error) +} + +var _ ListProfilesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListProfiles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListReviewTemplateAnswers.go b/service/wellarchitected/api_op_ListReviewTemplateAnswers.go index d4e1dce6ce9..0fe003c303d 100644 --- a/service/wellarchitected/api_op_ListReviewTemplateAnswers.go +++ b/service/wellarchitected/api_op_ListReviewTemplateAnswers.go @@ -155,6 +155,9 @@ func (c *Client) addOperationListReviewTemplateAnswersMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListReviewTemplateAnswersValidationMiddleware(stack); err != nil { return err } @@ -179,14 +182,6 @@ func (c *Client) addOperationListReviewTemplateAnswersMiddlewares(stack *middlew return nil } -// ListReviewTemplateAnswersAPIClient is a client that implements the -// ListReviewTemplateAnswers operation. -type ListReviewTemplateAnswersAPIClient interface { - ListReviewTemplateAnswers(context.Context, *ListReviewTemplateAnswersInput, ...func(*Options)) (*ListReviewTemplateAnswersOutput, error) -} - -var _ ListReviewTemplateAnswersAPIClient = (*Client)(nil) - // ListReviewTemplateAnswersPaginatorOptions is the paginator options for // ListReviewTemplateAnswers type ListReviewTemplateAnswersPaginatorOptions struct { @@ -252,6 +247,9 @@ func (p *ListReviewTemplateAnswersPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReviewTemplateAnswers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -271,6 +269,14 @@ func (p *ListReviewTemplateAnswersPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListReviewTemplateAnswersAPIClient is a client that implements the +// ListReviewTemplateAnswers operation. +type ListReviewTemplateAnswersAPIClient interface { + ListReviewTemplateAnswers(context.Context, *ListReviewTemplateAnswersInput, ...func(*Options)) (*ListReviewTemplateAnswersOutput, error) +} + +var _ ListReviewTemplateAnswersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReviewTemplateAnswers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListReviewTemplates.go b/service/wellarchitected/api_op_ListReviewTemplates.go index b81e4ba80ad..cd849afd839 100644 --- a/service/wellarchitected/api_op_ListReviewTemplates.go +++ b/service/wellarchitected/api_op_ListReviewTemplates.go @@ -110,6 +110,9 @@ func (c *Client) addOperationListReviewTemplatesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReviewTemplates(options.Region), middleware.Before); err != nil { return err } @@ -131,14 +134,6 @@ func (c *Client) addOperationListReviewTemplatesMiddlewares(stack *middleware.St return nil } -// ListReviewTemplatesAPIClient is a client that implements the -// ListReviewTemplates operation. -type ListReviewTemplatesAPIClient interface { - ListReviewTemplates(context.Context, *ListReviewTemplatesInput, ...func(*Options)) (*ListReviewTemplatesOutput, error) -} - -var _ ListReviewTemplatesAPIClient = (*Client)(nil) - // ListReviewTemplatesPaginatorOptions is the paginator options for // ListReviewTemplates type ListReviewTemplatesPaginatorOptions struct { @@ -203,6 +198,9 @@ func (p *ListReviewTemplatesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListReviewTemplates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +220,14 @@ func (p *ListReviewTemplatesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListReviewTemplatesAPIClient is a client that implements the +// ListReviewTemplates operation. +type ListReviewTemplatesAPIClient interface { + ListReviewTemplates(context.Context, *ListReviewTemplatesInput, ...func(*Options)) (*ListReviewTemplatesOutput, error) +} + +var _ ListReviewTemplatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListReviewTemplates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListShareInvitations.go b/service/wellarchitected/api_op_ListShareInvitations.go index 3a7d028d1df..f36b4e5621b 100644 --- a/service/wellarchitected/api_op_ListShareInvitations.go +++ b/service/wellarchitected/api_op_ListShareInvitations.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListShareInvitationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListShareInvitations(options.Region), middleware.Before); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationListShareInvitationsMiddlewares(stack *middleware.S return nil } -// ListShareInvitationsAPIClient is a client that implements the -// ListShareInvitations operation. -type ListShareInvitationsAPIClient interface { - ListShareInvitations(context.Context, *ListShareInvitationsInput, ...func(*Options)) (*ListShareInvitationsOutput, error) -} - -var _ ListShareInvitationsAPIClient = (*Client)(nil) - // ListShareInvitationsPaginatorOptions is the paginator options for // ListShareInvitations type ListShareInvitationsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *ListShareInvitationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListShareInvitations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *ListShareInvitationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListShareInvitationsAPIClient is a client that implements the +// ListShareInvitations operation. +type ListShareInvitationsAPIClient interface { + ListShareInvitations(context.Context, *ListShareInvitationsInput, ...func(*Options)) (*ListShareInvitationsOutput, error) +} + +var _ ListShareInvitationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListShareInvitations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListTagsForResource.go b/service/wellarchitected/api_op_ListTagsForResource.go index 47bd21b69b7..a83141b986e 100644 --- a/service/wellarchitected/api_op_ListTagsForResource.go +++ b/service/wellarchitected/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_ListTemplateShares.go b/service/wellarchitected/api_op_ListTemplateShares.go index 78dcf32593e..3e2196f6414 100644 --- a/service/wellarchitected/api_op_ListTemplateShares.go +++ b/service/wellarchitected/api_op_ListTemplateShares.go @@ -125,6 +125,9 @@ func (c *Client) addOperationListTemplateSharesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTemplateSharesValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationListTemplateSharesMiddlewares(stack *middleware.Sta return nil } -// ListTemplateSharesAPIClient is a client that implements the ListTemplateShares -// operation. -type ListTemplateSharesAPIClient interface { - ListTemplateShares(context.Context, *ListTemplateSharesInput, ...func(*Options)) (*ListTemplateSharesOutput, error) -} - -var _ ListTemplateSharesAPIClient = (*Client)(nil) - // ListTemplateSharesPaginatorOptions is the paginator options for // ListTemplateShares type ListTemplateSharesPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *ListTemplateSharesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTemplateShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *ListTemplateSharesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListTemplateSharesAPIClient is a client that implements the ListTemplateShares +// operation. +type ListTemplateSharesAPIClient interface { + ListTemplateShares(context.Context, *ListTemplateSharesInput, ...func(*Options)) (*ListTemplateSharesOutput, error) +} + +var _ ListTemplateSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTemplateShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListWorkloadShares.go b/service/wellarchitected/api_op_ListWorkloadShares.go index 9b2443387bd..6ec0026e3a9 100644 --- a/service/wellarchitected/api_op_ListWorkloadShares.go +++ b/service/wellarchitected/api_op_ListWorkloadShares.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListWorkloadSharesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWorkloadSharesValidationMiddleware(stack); err != nil { return err } @@ -153,14 +156,6 @@ func (c *Client) addOperationListWorkloadSharesMiddlewares(stack *middleware.Sta return nil } -// ListWorkloadSharesAPIClient is a client that implements the ListWorkloadShares -// operation. -type ListWorkloadSharesAPIClient interface { - ListWorkloadShares(context.Context, *ListWorkloadSharesInput, ...func(*Options)) (*ListWorkloadSharesOutput, error) -} - -var _ ListWorkloadSharesAPIClient = (*Client)(nil) - // ListWorkloadSharesPaginatorOptions is the paginator options for // ListWorkloadShares type ListWorkloadSharesPaginatorOptions struct { @@ -225,6 +220,9 @@ func (p *ListWorkloadSharesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkloadShares(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -244,6 +242,14 @@ func (p *ListWorkloadSharesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListWorkloadSharesAPIClient is a client that implements the ListWorkloadShares +// operation. +type ListWorkloadSharesAPIClient interface { + ListWorkloadShares(context.Context, *ListWorkloadSharesInput, ...func(*Options)) (*ListWorkloadSharesOutput, error) +} + +var _ ListWorkloadSharesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkloadShares(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_ListWorkloads.go b/service/wellarchitected/api_op_ListWorkloads.go index 91d3c7b780a..5f488203cb2 100644 --- a/service/wellarchitected/api_op_ListWorkloads.go +++ b/service/wellarchitected/api_op_ListWorkloads.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListWorkloads(options.Region), middleware.Before); err != nil { return err } @@ -137,13 +140,6 @@ func (c *Client) addOperationListWorkloadsMiddlewares(stack *middleware.Stack, o return nil } -// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. -type ListWorkloadsAPIClient interface { - ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) -} - -var _ ListWorkloadsAPIClient = (*Client)(nil) - // ListWorkloadsPaginatorOptions is the paginator options for ListWorkloads type ListWorkloadsPaginatorOptions struct { // The maximum number of results to return for this request. @@ -207,6 +203,9 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWorkloads(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +225,13 @@ func (p *ListWorkloadsPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListWorkloadsAPIClient is a client that implements the ListWorkloads operation. +type ListWorkloadsAPIClient interface { + ListWorkloads(context.Context, *ListWorkloadsInput, ...func(*Options)) (*ListWorkloadsOutput, error) +} + +var _ ListWorkloadsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWorkloads(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wellarchitected/api_op_TagResource.go b/service/wellarchitected/api_op_TagResource.go index 8493532de0b..e4611ac3450 100644 --- a/service/wellarchitected/api_op_TagResource.go +++ b/service/wellarchitected/api_op_TagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UntagResource.go b/service/wellarchitected/api_op_UntagResource.go index 318abb6a110..98f8343cf8f 100644 --- a/service/wellarchitected/api_op_UntagResource.go +++ b/service/wellarchitected/api_op_UntagResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateAnswer.go b/service/wellarchitected/api_op_UpdateAnswer.go index 41c4f705f87..cf099592175 100644 --- a/service/wellarchitected/api_op_UpdateAnswer.go +++ b/service/wellarchitected/api_op_UpdateAnswer.go @@ -174,6 +174,9 @@ func (c *Client) addOperationUpdateAnswerMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAnswerValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateGlobalSettings.go b/service/wellarchitected/api_op_UpdateGlobalSettings.go index 3a46637807e..84e784db830 100644 --- a/service/wellarchitected/api_op_UpdateGlobalSettings.go +++ b/service/wellarchitected/api_op_UpdateGlobalSettings.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateGlobalSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGlobalSettings(options.Region), middleware.Before); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateIntegration.go b/service/wellarchitected/api_op_UpdateIntegration.go index 80831ddc946..d90733bcdfa 100644 --- a/service/wellarchitected/api_op_UpdateIntegration.go +++ b/service/wellarchitected/api_op_UpdateIntegration.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateIntegrationMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateIntegrationMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateLensReview.go b/service/wellarchitected/api_op_UpdateLensReview.go index 2ceecaab17f..dc72386070c 100644 --- a/service/wellarchitected/api_op_UpdateLensReview.go +++ b/service/wellarchitected/api_op_UpdateLensReview.go @@ -145,6 +145,9 @@ func (c *Client) addOperationUpdateLensReviewMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateLensReviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateProfile.go b/service/wellarchitected/api_op_UpdateProfile.go index 203f73fb6dd..d40b78296d9 100644 --- a/service/wellarchitected/api_op_UpdateProfile.go +++ b/service/wellarchitected/api_op_UpdateProfile.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateProfileMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateProfileValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateReviewTemplate.go b/service/wellarchitected/api_op_UpdateReviewTemplate.go index 9f05d0f58f7..9c655325fba 100644 --- a/service/wellarchitected/api_op_UpdateReviewTemplate.go +++ b/service/wellarchitected/api_op_UpdateReviewTemplate.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateReviewTemplateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReviewTemplateValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateReviewTemplateAnswer.go b/service/wellarchitected/api_op_UpdateReviewTemplateAnswer.go index d9e30f7fea8..9dfe5d44eb6 100644 --- a/service/wellarchitected/api_op_UpdateReviewTemplateAnswer.go +++ b/service/wellarchitected/api_op_UpdateReviewTemplateAnswer.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateReviewTemplateAnswerMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReviewTemplateAnswerValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateReviewTemplateLensReview.go b/service/wellarchitected/api_op_UpdateReviewTemplateLensReview.go index 7ad6fdbb714..6b6e809dcb9 100644 --- a/service/wellarchitected/api_op_UpdateReviewTemplateLensReview.go +++ b/service/wellarchitected/api_op_UpdateReviewTemplateLensReview.go @@ -138,6 +138,9 @@ func (c *Client) addOperationUpdateReviewTemplateLensReviewMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateReviewTemplateLensReviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateShareInvitation.go b/service/wellarchitected/api_op_UpdateShareInvitation.go index c4f6d096fdf..207148c17b0 100644 --- a/service/wellarchitected/api_op_UpdateShareInvitation.go +++ b/service/wellarchitected/api_op_UpdateShareInvitation.go @@ -115,6 +115,9 @@ func (c *Client) addOperationUpdateShareInvitationMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateShareInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateWorkload.go b/service/wellarchitected/api_op_UpdateWorkload.go index 7ed68171371..40da547fba0 100644 --- a/service/wellarchitected/api_op_UpdateWorkload.go +++ b/service/wellarchitected/api_op_UpdateWorkload.go @@ -229,6 +229,9 @@ func (c *Client) addOperationUpdateWorkloadMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkloadValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpdateWorkloadShare.go b/service/wellarchitected/api_op_UpdateWorkloadShare.go index f82c0270bf2..da7f7a1d969 100644 --- a/service/wellarchitected/api_op_UpdateWorkloadShare.go +++ b/service/wellarchitected/api_op_UpdateWorkloadShare.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateWorkloadShareMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkloadShareValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpgradeLensReview.go b/service/wellarchitected/api_op_UpgradeLensReview.go index 318bc488c9e..0309e8f9f55 100644 --- a/service/wellarchitected/api_op_UpgradeLensReview.go +++ b/service/wellarchitected/api_op_UpgradeLensReview.go @@ -140,6 +140,9 @@ func (c *Client) addOperationUpgradeLensReviewMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpgradeLensReviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpgradeProfileVersion.go b/service/wellarchitected/api_op_UpgradeProfileVersion.go index f154696138b..bee56d028d7 100644 --- a/service/wellarchitected/api_op_UpgradeProfileVersion.go +++ b/service/wellarchitected/api_op_UpgradeProfileVersion.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpgradeProfileVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpgradeProfileVersionMiddleware(stack, options); err != nil { return err } diff --git a/service/wellarchitected/api_op_UpgradeReviewTemplateLensReview.go b/service/wellarchitected/api_op_UpgradeReviewTemplateLensReview.go index 7d2cdcfc80f..cdbabb47478 100644 --- a/service/wellarchitected/api_op_UpgradeReviewTemplateLensReview.go +++ b/service/wellarchitected/api_op_UpgradeReviewTemplateLensReview.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpgradeReviewTemplateLensReviewMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpgradeReviewTemplateLensReviewValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_client.go b/service/wisdom/api_client.go index 60dac918f83..9478bae4471 100644 --- a/service/wisdom/api_client.go +++ b/service/wisdom/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/wisdom/api_op_CreateAssistant.go b/service/wisdom/api_op_CreateAssistant.go index d3738cf06e6..df9f277b941 100644 --- a/service/wisdom/api_op_CreateAssistant.go +++ b/service/wisdom/api_op_CreateAssistant.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCreateAssistantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAssistantMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_CreateAssistantAssociation.go b/service/wisdom/api_op_CreateAssistantAssociation.go index 229eb28ebc8..27342e241bf 100644 --- a/service/wisdom/api_op_CreateAssistantAssociation.go +++ b/service/wisdom/api_op_CreateAssistantAssociation.go @@ -129,6 +129,9 @@ func (c *Client) addOperationCreateAssistantAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAssistantAssociationMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_CreateContent.go b/service/wisdom/api_op_CreateContent.go index a5185e3d253..c3637dea8b2 100644 --- a/service/wisdom/api_op_CreateContent.go +++ b/service/wisdom/api_op_CreateContent.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateContentMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_CreateKnowledgeBase.go b/service/wisdom/api_op_CreateKnowledgeBase.go index 9be66d86d99..2acee5c22ea 100644 --- a/service/wisdom/api_op_CreateKnowledgeBase.go +++ b/service/wisdom/api_op_CreateKnowledgeBase.go @@ -165,6 +165,9 @@ func (c *Client) addOperationCreateKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateKnowledgeBaseMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_CreateQuickResponse.go b/service/wisdom/api_op_CreateQuickResponse.go index b7de4c28156..2159ffb5d61 100644 --- a/service/wisdom/api_op_CreateQuickResponse.go +++ b/service/wisdom/api_op_CreateQuickResponse.go @@ -159,6 +159,9 @@ func (c *Client) addOperationCreateQuickResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateQuickResponseMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_CreateSession.go b/service/wisdom/api_op_CreateSession.go index 81422d1d413..442dc023f7b 100644 --- a/service/wisdom/api_op_CreateSession.go +++ b/service/wisdom/api_op_CreateSession.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateSessionMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateSessionMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_DeleteAssistant.go b/service/wisdom/api_op_DeleteAssistant.go index 8f8694e0bf2..112ac77d6d8 100644 --- a/service/wisdom/api_op_DeleteAssistant.go +++ b/service/wisdom/api_op_DeleteAssistant.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteAssistantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssistantValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_DeleteAssistantAssociation.go b/service/wisdom/api_op_DeleteAssistantAssociation.go index 6d814ad236e..bc473e6d59f 100644 --- a/service/wisdom/api_op_DeleteAssistantAssociation.go +++ b/service/wisdom/api_op_DeleteAssistantAssociation.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAssistantAssociationMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAssistantAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_DeleteContent.go b/service/wisdom/api_op_DeleteContent.go index f071da5ee31..887c24fa94a 100644 --- a/service/wisdom/api_op_DeleteContent.go +++ b/service/wisdom/api_op_DeleteContent.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_DeleteImportJob.go b/service/wisdom/api_op_DeleteImportJob.go index 94fdc3fffb0..d3f350615b9 100644 --- a/service/wisdom/api_op_DeleteImportJob.go +++ b/service/wisdom/api_op_DeleteImportJob.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteImportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_DeleteKnowledgeBase.go b/service/wisdom/api_op_DeleteKnowledgeBase.go index 1c114522b7c..3a8cc2b5369 100644 --- a/service/wisdom/api_op_DeleteKnowledgeBase.go +++ b/service/wisdom/api_op_DeleteKnowledgeBase.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDeleteKnowledgeBaseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_DeleteQuickResponse.go b/service/wisdom/api_op_DeleteQuickResponse.go index f228c9a9398..71a5131027b 100644 --- a/service/wisdom/api_op_DeleteQuickResponse.go +++ b/service/wisdom/api_op_DeleteQuickResponse.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteQuickResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteQuickResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetAssistant.go b/service/wisdom/api_op_GetAssistant.go index b0f60f05ec2..9e4c2fad2e6 100644 --- a/service/wisdom/api_op_GetAssistant.go +++ b/service/wisdom/api_op_GetAssistant.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetAssistantMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssistantValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetAssistantAssociation.go b/service/wisdom/api_op_GetAssistantAssociation.go index a76b574bafe..bb017e33fb8 100644 --- a/service/wisdom/api_op_GetAssistantAssociation.go +++ b/service/wisdom/api_op_GetAssistantAssociation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetAssistantAssociationMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAssistantAssociationValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetContent.go b/service/wisdom/api_op_GetContent.go index e24ec211053..85d06980486 100644 --- a/service/wisdom/api_op_GetContent.go +++ b/service/wisdom/api_op_GetContent.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetContentMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetContentSummary.go b/service/wisdom/api_op_GetContentSummary.go index b8f887d8a6d..2658d1fbcc9 100644 --- a/service/wisdom/api_op_GetContentSummary.go +++ b/service/wisdom/api_op_GetContentSummary.go @@ -114,6 +114,9 @@ func (c *Client) addOperationGetContentSummaryMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetContentSummaryValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetImportJob.go b/service/wisdom/api_op_GetImportJob.go index 6f3a4271874..8837f80dd02 100644 --- a/service/wisdom/api_op_GetImportJob.go +++ b/service/wisdom/api_op_GetImportJob.go @@ -111,6 +111,9 @@ func (c *Client) addOperationGetImportJobMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetKnowledgeBase.go b/service/wisdom/api_op_GetKnowledgeBase.go index 2df4ddbbb02..b8708209c16 100644 --- a/service/wisdom/api_op_GetKnowledgeBase.go +++ b/service/wisdom/api_op_GetKnowledgeBase.go @@ -108,6 +108,9 @@ func (c *Client) addOperationGetKnowledgeBaseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetKnowledgeBaseValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetQuickResponse.go b/service/wisdom/api_op_GetQuickResponse.go index ddd5a8e7212..e4f48256371 100644 --- a/service/wisdom/api_op_GetQuickResponse.go +++ b/service/wisdom/api_op_GetQuickResponse.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetQuickResponseMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetQuickResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetRecommendations.go b/service/wisdom/api_op_GetRecommendations.go index 79973c19fe0..f029ff1e3b0 100644 --- a/service/wisdom/api_op_GetRecommendations.go +++ b/service/wisdom/api_op_GetRecommendations.go @@ -139,6 +139,9 @@ func (c *Client) addOperationGetRecommendationsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRecommendationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_GetSession.go b/service/wisdom/api_op_GetSession.go index 555f0e532a8..360592bb1d0 100644 --- a/service/wisdom/api_op_GetSession.go +++ b/service/wisdom/api_op_GetSession.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetSessionMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSessionValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_ListAssistantAssociations.go b/service/wisdom/api_op_ListAssistantAssociations.go index c354e0a2dbb..593b3c4e56f 100644 --- a/service/wisdom/api_op_ListAssistantAssociations.go +++ b/service/wisdom/api_op_ListAssistantAssociations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAssistantAssociationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAssistantAssociationsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAssistantAssociationsMiddlewares(stack *middlew return nil } -// ListAssistantAssociationsAPIClient is a client that implements the -// ListAssistantAssociations operation. -type ListAssistantAssociationsAPIClient interface { - ListAssistantAssociations(context.Context, *ListAssistantAssociationsInput, ...func(*Options)) (*ListAssistantAssociationsOutput, error) -} - -var _ ListAssistantAssociationsAPIClient = (*Client)(nil) - // ListAssistantAssociationsPaginatorOptions is the paginator options for // ListAssistantAssociations type ListAssistantAssociationsPaginatorOptions struct { @@ -216,6 +211,9 @@ func (p *ListAssistantAssociationsPaginator) NextPage(ctx context.Context, optFn } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssistantAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListAssistantAssociationsPaginator) NextPage(ctx context.Context, optFn return result, nil } +// ListAssistantAssociationsAPIClient is a client that implements the +// ListAssistantAssociations operation. +type ListAssistantAssociationsAPIClient interface { + ListAssistantAssociations(context.Context, *ListAssistantAssociationsInput, ...func(*Options)) (*ListAssistantAssociationsOutput, error) +} + +var _ ListAssistantAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssistantAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_ListAssistants.go b/service/wisdom/api_op_ListAssistants.go index 1d89437dcea..86137d3899d 100644 --- a/service/wisdom/api_op_ListAssistants.go +++ b/service/wisdom/api_op_ListAssistants.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListAssistantsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAssistants(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListAssistantsMiddlewares(stack *middleware.Stack, return nil } -// ListAssistantsAPIClient is a client that implements the ListAssistants -// operation. -type ListAssistantsAPIClient interface { - ListAssistants(context.Context, *ListAssistantsInput, ...func(*Options)) (*ListAssistantsOutput, error) -} - -var _ ListAssistantsAPIClient = (*Client)(nil) - // ListAssistantsPaginatorOptions is the paginator options for ListAssistants type ListAssistantsPaginatorOptions struct { // The maximum number of results to return per page. @@ -205,6 +200,9 @@ func (p *ListAssistantsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAssistants(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListAssistantsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListAssistantsAPIClient is a client that implements the ListAssistants +// operation. +type ListAssistantsAPIClient interface { + ListAssistants(context.Context, *ListAssistantsInput, ...func(*Options)) (*ListAssistantsOutput, error) +} + +var _ ListAssistantsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAssistants(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_ListContents.go b/service/wisdom/api_op_ListContents.go index 979cccff3ce..bf993f111d0 100644 --- a/service/wisdom/api_op_ListContents.go +++ b/service/wisdom/api_op_ListContents.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListContentsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListContentsValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListContentsMiddlewares(stack *middleware.Stack, op return nil } -// ListContentsAPIClient is a client that implements the ListContents operation. -type ListContentsAPIClient interface { - ListContents(context.Context, *ListContentsInput, ...func(*Options)) (*ListContentsOutput, error) -} - -var _ ListContentsAPIClient = (*Client)(nil) - // ListContentsPaginatorOptions is the paginator options for ListContents type ListContentsPaginatorOptions struct { // The maximum number of results to return per page. @@ -214,6 +210,9 @@ func (p *ListContentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListContents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListContentsPaginator) NextPage(ctx context.Context, optFns ...func(*Op return result, nil } +// ListContentsAPIClient is a client that implements the ListContents operation. +type ListContentsAPIClient interface { + ListContents(context.Context, *ListContentsInput, ...func(*Options)) (*ListContentsOutput, error) +} + +var _ ListContentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListContents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_ListImportJobs.go b/service/wisdom/api_op_ListImportJobs.go index cb7c8063efe..33907ed24f6 100644 --- a/service/wisdom/api_op_ListImportJobs.go +++ b/service/wisdom/api_op_ListImportJobs.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListImportJobsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImportJobsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListImportJobsMiddlewares(stack *middleware.Stack, return nil } -// ListImportJobsAPIClient is a client that implements the ListImportJobs -// operation. -type ListImportJobsAPIClient interface { - ListImportJobs(context.Context, *ListImportJobsInput, ...func(*Options)) (*ListImportJobsOutput, error) -} - -var _ ListImportJobsAPIClient = (*Client)(nil) - // ListImportJobsPaginatorOptions is the paginator options for ListImportJobs type ListImportJobsPaginatorOptions struct { // The maximum number of results to return per page. @@ -216,6 +211,9 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *ListImportJobsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// ListImportJobsAPIClient is a client that implements the ListImportJobs +// operation. +type ListImportJobsAPIClient interface { + ListImportJobs(context.Context, *ListImportJobsInput, ...func(*Options)) (*ListImportJobsOutput, error) +} + +var _ ListImportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_ListKnowledgeBases.go b/service/wisdom/api_op_ListKnowledgeBases.go index a27f5be22e1..846654bb9e8 100644 --- a/service/wisdom/api_op_ListKnowledgeBases.go +++ b/service/wisdom/api_op_ListKnowledgeBases.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListKnowledgeBasesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKnowledgeBases(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListKnowledgeBasesMiddlewares(stack *middleware.Sta return nil } -// ListKnowledgeBasesAPIClient is a client that implements the ListKnowledgeBases -// operation. -type ListKnowledgeBasesAPIClient interface { - ListKnowledgeBases(context.Context, *ListKnowledgeBasesInput, ...func(*Options)) (*ListKnowledgeBasesOutput, error) -} - -var _ ListKnowledgeBasesAPIClient = (*Client)(nil) - // ListKnowledgeBasesPaginatorOptions is the paginator options for // ListKnowledgeBases type ListKnowledgeBasesPaginatorOptions struct { @@ -206,6 +201,9 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListKnowledgeBases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +223,14 @@ func (p *ListKnowledgeBasesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListKnowledgeBasesAPIClient is a client that implements the ListKnowledgeBases +// operation. +type ListKnowledgeBasesAPIClient interface { + ListKnowledgeBases(context.Context, *ListKnowledgeBasesInput, ...func(*Options)) (*ListKnowledgeBasesOutput, error) +} + +var _ ListKnowledgeBasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListKnowledgeBases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_ListQuickResponses.go b/service/wisdom/api_op_ListQuickResponses.go index c31d4a17e12..65770ecb1de 100644 --- a/service/wisdom/api_op_ListQuickResponses.go +++ b/service/wisdom/api_op_ListQuickResponses.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListQuickResponsesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListQuickResponsesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListQuickResponsesMiddlewares(stack *middleware.Sta return nil } -// ListQuickResponsesAPIClient is a client that implements the ListQuickResponses -// operation. -type ListQuickResponsesAPIClient interface { - ListQuickResponses(context.Context, *ListQuickResponsesInput, ...func(*Options)) (*ListQuickResponsesOutput, error) -} - -var _ ListQuickResponsesAPIClient = (*Client)(nil) - // ListQuickResponsesPaginatorOptions is the paginator options for // ListQuickResponses type ListQuickResponsesPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListQuickResponsesPaginator) NextPage(ctx context.Context, optFns ...fu } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListQuickResponses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListQuickResponsesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// ListQuickResponsesAPIClient is a client that implements the ListQuickResponses +// operation. +type ListQuickResponsesAPIClient interface { + ListQuickResponses(context.Context, *ListQuickResponsesInput, ...func(*Options)) (*ListQuickResponsesOutput, error) +} + +var _ ListQuickResponsesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListQuickResponses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_ListTagsForResource.go b/service/wisdom/api_op_ListTagsForResource.go index 0643ee53942..260fac4eded 100644 --- a/service/wisdom/api_op_ListTagsForResource.go +++ b/service/wisdom/api_op_ListTagsForResource.go @@ -105,6 +105,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_NotifyRecommendationsReceived.go b/service/wisdom/api_op_NotifyRecommendationsReceived.go index 50e02033c69..743fac9727b 100644 --- a/service/wisdom/api_op_NotifyRecommendationsReceived.go +++ b/service/wisdom/api_op_NotifyRecommendationsReceived.go @@ -126,6 +126,9 @@ func (c *Client) addOperationNotifyRecommendationsReceivedMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpNotifyRecommendationsReceivedValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_QueryAssistant.go b/service/wisdom/api_op_QueryAssistant.go index 66b482f5105..271fccdf2fc 100644 --- a/service/wisdom/api_op_QueryAssistant.go +++ b/service/wisdom/api_op_QueryAssistant.go @@ -132,6 +132,9 @@ func (c *Client) addOperationQueryAssistantMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpQueryAssistantValidationMiddleware(stack); err != nil { return err } @@ -156,14 +159,6 @@ func (c *Client) addOperationQueryAssistantMiddlewares(stack *middleware.Stack, return nil } -// QueryAssistantAPIClient is a client that implements the QueryAssistant -// operation. -type QueryAssistantAPIClient interface { - QueryAssistant(context.Context, *QueryAssistantInput, ...func(*Options)) (*QueryAssistantOutput, error) -} - -var _ QueryAssistantAPIClient = (*Client)(nil) - // QueryAssistantPaginatorOptions is the paginator options for QueryAssistant type QueryAssistantPaginatorOptions struct { // The maximum number of results to return per page. @@ -227,6 +222,9 @@ func (p *QueryAssistantPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.QueryAssistant(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *QueryAssistantPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// QueryAssistantAPIClient is a client that implements the QueryAssistant +// operation. +type QueryAssistantAPIClient interface { + QueryAssistant(context.Context, *QueryAssistantInput, ...func(*Options)) (*QueryAssistantOutput, error) +} + +var _ QueryAssistantAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opQueryAssistant(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_RemoveKnowledgeBaseTemplateUri.go b/service/wisdom/api_op_RemoveKnowledgeBaseTemplateUri.go index b4e7b342380..e9733296d3d 100644 --- a/service/wisdom/api_op_RemoveKnowledgeBaseTemplateUri.go +++ b/service/wisdom/api_op_RemoveKnowledgeBaseTemplateUri.go @@ -103,6 +103,9 @@ func (c *Client) addOperationRemoveKnowledgeBaseTemplateUriMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveKnowledgeBaseTemplateUriValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_SearchContent.go b/service/wisdom/api_op_SearchContent.go index 20a76250efa..2f8aa7ce459 100644 --- a/service/wisdom/api_op_SearchContent.go +++ b/service/wisdom/api_op_SearchContent.go @@ -126,6 +126,9 @@ func (c *Client) addOperationSearchContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchContentValidationMiddleware(stack); err != nil { return err } @@ -150,13 +153,6 @@ func (c *Client) addOperationSearchContentMiddlewares(stack *middleware.Stack, o return nil } -// SearchContentAPIClient is a client that implements the SearchContent operation. -type SearchContentAPIClient interface { - SearchContent(context.Context, *SearchContentInput, ...func(*Options)) (*SearchContentOutput, error) -} - -var _ SearchContentAPIClient = (*Client)(nil) - // SearchContentPaginatorOptions is the paginator options for SearchContent type SearchContentPaginatorOptions struct { // The maximum number of results to return per page. @@ -220,6 +216,9 @@ func (p *SearchContentPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchContent(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +238,13 @@ func (p *SearchContentPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// SearchContentAPIClient is a client that implements the SearchContent operation. +type SearchContentAPIClient interface { + SearchContent(context.Context, *SearchContentInput, ...func(*Options)) (*SearchContentOutput, error) +} + +var _ SearchContentAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchContent(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_SearchQuickResponses.go b/service/wisdom/api_op_SearchQuickResponses.go index 0ae789c8da7..fdfbb7f799f 100644 --- a/service/wisdom/api_op_SearchQuickResponses.go +++ b/service/wisdom/api_op_SearchQuickResponses.go @@ -130,6 +130,9 @@ func (c *Client) addOperationSearchQuickResponsesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchQuickResponsesValidationMiddleware(stack); err != nil { return err } @@ -154,14 +157,6 @@ func (c *Client) addOperationSearchQuickResponsesMiddlewares(stack *middleware.S return nil } -// SearchQuickResponsesAPIClient is a client that implements the -// SearchQuickResponses operation. -type SearchQuickResponsesAPIClient interface { - SearchQuickResponses(context.Context, *SearchQuickResponsesInput, ...func(*Options)) (*SearchQuickResponsesOutput, error) -} - -var _ SearchQuickResponsesAPIClient = (*Client)(nil) - // SearchQuickResponsesPaginatorOptions is the paginator options for // SearchQuickResponses type SearchQuickResponsesPaginatorOptions struct { @@ -226,6 +221,9 @@ func (p *SearchQuickResponsesPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchQuickResponses(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *SearchQuickResponsesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// SearchQuickResponsesAPIClient is a client that implements the +// SearchQuickResponses operation. +type SearchQuickResponsesAPIClient interface { + SearchQuickResponses(context.Context, *SearchQuickResponsesInput, ...func(*Options)) (*SearchQuickResponsesOutput, error) +} + +var _ SearchQuickResponsesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchQuickResponses(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_SearchSessions.go b/service/wisdom/api_op_SearchSessions.go index 25d0fa7b4d4..60843b14c7c 100644 --- a/service/wisdom/api_op_SearchSessions.go +++ b/service/wisdom/api_op_SearchSessions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationSearchSessionsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchSessionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationSearchSessionsMiddlewares(stack *middleware.Stack, return nil } -// SearchSessionsAPIClient is a client that implements the SearchSessions -// operation. -type SearchSessionsAPIClient interface { - SearchSessions(context.Context, *SearchSessionsInput, ...func(*Options)) (*SearchSessionsOutput, error) -} - -var _ SearchSessionsAPIClient = (*Client)(nil) - // SearchSessionsPaginatorOptions is the paginator options for SearchSessions type SearchSessionsPaginatorOptions struct { // The maximum number of results to return per page. @@ -219,6 +214,9 @@ func (p *SearchSessionsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchSessions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *SearchSessionsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// SearchSessionsAPIClient is a client that implements the SearchSessions +// operation. +type SearchSessionsAPIClient interface { + SearchSessions(context.Context, *SearchSessionsInput, ...func(*Options)) (*SearchSessionsOutput, error) +} + +var _ SearchSessionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchSessions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/wisdom/api_op_StartContentUpload.go b/service/wisdom/api_op_StartContentUpload.go index 35f57185887..64912edd669 100644 --- a/service/wisdom/api_op_StartContentUpload.go +++ b/service/wisdom/api_op_StartContentUpload.go @@ -141,6 +141,9 @@ func (c *Client) addOperationStartContentUploadMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartContentUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_StartImportJob.go b/service/wisdom/api_op_StartImportJob.go index 1c8e88bc8a6..b44f615c825 100644 --- a/service/wisdom/api_op_StartImportJob.go +++ b/service/wisdom/api_op_StartImportJob.go @@ -144,6 +144,9 @@ func (c *Client) addOperationStartImportJobMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartImportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/wisdom/api_op_TagResource.go b/service/wisdom/api_op_TagResource.go index 4cf9142415b..2760c4381bf 100644 --- a/service/wisdom/api_op_TagResource.go +++ b/service/wisdom/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_UntagResource.go b/service/wisdom/api_op_UntagResource.go index f3b1af0ee4d..cb7ffc562e9 100644 --- a/service/wisdom/api_op_UntagResource.go +++ b/service/wisdom/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_UpdateContent.go b/service/wisdom/api_op_UpdateContent.go index b7a0c8dee86..9d116aa9de9 100644 --- a/service/wisdom/api_op_UpdateContent.go +++ b/service/wisdom/api_op_UpdateContent.go @@ -144,6 +144,9 @@ func (c *Client) addOperationUpdateContentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_UpdateKnowledgeBaseTemplateUri.go b/service/wisdom/api_op_UpdateKnowledgeBaseTemplateUri.go index 63e4676bbc1..3409f46b380 100644 --- a/service/wisdom/api_op_UpdateKnowledgeBaseTemplateUri.go +++ b/service/wisdom/api_op_UpdateKnowledgeBaseTemplateUri.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateKnowledgeBaseTemplateUriMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateKnowledgeBaseTemplateUriValidationMiddleware(stack); err != nil { return err } diff --git a/service/wisdom/api_op_UpdateQuickResponse.go b/service/wisdom/api_op_UpdateQuickResponse.go index f1fdb0ffbfa..a0e2097b7ca 100644 --- a/service/wisdom/api_op_UpdateQuickResponse.go +++ b/service/wisdom/api_op_UpdateQuickResponse.go @@ -159,6 +159,9 @@ func (c *Client) addOperationUpdateQuickResponseMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateQuickResponseValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_client.go b/service/workdocs/api_client.go index 438b562ee5c..42dbe154a31 100644 --- a/service/workdocs/api_client.go +++ b/service/workdocs/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/workdocs/api_op_AbortDocumentVersionUpload.go b/service/workdocs/api_op_AbortDocumentVersionUpload.go index 6f9c9345bef..9d3b372ee78 100644 --- a/service/workdocs/api_op_AbortDocumentVersionUpload.go +++ b/service/workdocs/api_op_AbortDocumentVersionUpload.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAbortDocumentVersionUploadMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAbortDocumentVersionUploadValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_ActivateUser.go b/service/workdocs/api_op_ActivateUser.go index 8cbff1c90db..e62d875bccd 100644 --- a/service/workdocs/api_op_ActivateUser.go +++ b/service/workdocs/api_op_ActivateUser.go @@ -110,6 +110,9 @@ func (c *Client) addOperationActivateUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpActivateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_AddResourcePermissions.go b/service/workdocs/api_op_AddResourcePermissions.go index 6422d6d27ba..4bdf55d1f37 100644 --- a/service/workdocs/api_op_AddResourcePermissions.go +++ b/service/workdocs/api_op_AddResourcePermissions.go @@ -120,6 +120,9 @@ func (c *Client) addOperationAddResourcePermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAddResourcePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_CreateComment.go b/service/workdocs/api_op_CreateComment.go index fcbfaf0706b..ff52c846076 100644 --- a/service/workdocs/api_op_CreateComment.go +++ b/service/workdocs/api_op_CreateComment.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateCommentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCommentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_CreateCustomMetadata.go b/service/workdocs/api_op_CreateCustomMetadata.go index d311ab30779..0a54b4f27d7 100644 --- a/service/workdocs/api_op_CreateCustomMetadata.go +++ b/service/workdocs/api_op_CreateCustomMetadata.go @@ -115,6 +115,9 @@ func (c *Client) addOperationCreateCustomMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateCustomMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_CreateFolder.go b/service/workdocs/api_op_CreateFolder.go index 0ab66b7cf41..6942b8e736d 100644 --- a/service/workdocs/api_op_CreateFolder.go +++ b/service/workdocs/api_op_CreateFolder.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateFolderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_CreateLabels.go b/service/workdocs/api_op_CreateLabels.go index f8f99f28ce5..e8d73db5bf5 100644 --- a/service/workdocs/api_op_CreateLabels.go +++ b/service/workdocs/api_op_CreateLabels.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateLabelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_CreateNotificationSubscription.go b/service/workdocs/api_op_CreateNotificationSubscription.go index 3db5a373cb7..a09f6f9087e 100644 --- a/service/workdocs/api_op_CreateNotificationSubscription.go +++ b/service/workdocs/api_op_CreateNotificationSubscription.go @@ -128,6 +128,9 @@ func (c *Client) addOperationCreateNotificationSubscriptionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateNotificationSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_CreateUser.go b/service/workdocs/api_op_CreateUser.go index ea4d769a90e..d9fe271e6ab 100644 --- a/service/workdocs/api_op_CreateUser.go +++ b/service/workdocs/api_op_CreateUser.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeactivateUser.go b/service/workdocs/api_op_DeactivateUser.go index 25464bd1c8a..69ade76e0c1 100644 --- a/service/workdocs/api_op_DeactivateUser.go +++ b/service/workdocs/api_op_DeactivateUser.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeactivateUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeactivateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteComment.go b/service/workdocs/api_op_DeleteComment.go index 028cc9f42fb..a7da5ba425c 100644 --- a/service/workdocs/api_op_DeleteComment.go +++ b/service/workdocs/api_op_DeleteComment.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteCommentMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCommentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteCustomMetadata.go b/service/workdocs/api_op_DeleteCustomMetadata.go index bab1ab77b65..9b2b538511d 100644 --- a/service/workdocs/api_op_DeleteCustomMetadata.go +++ b/service/workdocs/api_op_DeleteCustomMetadata.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteCustomMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteCustomMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteDocument.go b/service/workdocs/api_op_DeleteDocument.go index 4f5c5a79d4b..63afdaa56e6 100644 --- a/service/workdocs/api_op_DeleteDocument.go +++ b/service/workdocs/api_op_DeleteDocument.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteDocumentVersion.go b/service/workdocs/api_op_DeleteDocumentVersion.go index 54cad7760ad..d038eb81620 100644 --- a/service/workdocs/api_op_DeleteDocumentVersion.go +++ b/service/workdocs/api_op_DeleteDocumentVersion.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDeleteDocumentVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteDocumentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteFolder.go b/service/workdocs/api_op_DeleteFolder.go index 133656832ef..795b5a1807f 100644 --- a/service/workdocs/api_op_DeleteFolder.go +++ b/service/workdocs/api_op_DeleteFolder.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteFolderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteFolderContents.go b/service/workdocs/api_op_DeleteFolderContents.go index f9a76ae370b..4c94160d2cf 100644 --- a/service/workdocs/api_op_DeleteFolderContents.go +++ b/service/workdocs/api_op_DeleteFolderContents.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDeleteFolderContentsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFolderContentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteLabels.go b/service/workdocs/api_op_DeleteLabels.go index aab794c4dfd..a9cc390c32b 100644 --- a/service/workdocs/api_op_DeleteLabels.go +++ b/service/workdocs/api_op_DeleteLabels.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeleteLabelsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteLabelsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteNotificationSubscription.go b/service/workdocs/api_op_DeleteNotificationSubscription.go index 3c74104af6c..957184f4119 100644 --- a/service/workdocs/api_op_DeleteNotificationSubscription.go +++ b/service/workdocs/api_op_DeleteNotificationSubscription.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteNotificationSubscriptionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNotificationSubscriptionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DeleteUser.go b/service/workdocs/api_op_DeleteUser.go index cb8cddac85b..9a8e799b9dd 100644 --- a/service/workdocs/api_op_DeleteUser.go +++ b/service/workdocs/api_op_DeleteUser.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_DescribeActivities.go b/service/workdocs/api_op_DescribeActivities.go index fc3d568246f..1be17f3f6f5 100644 --- a/service/workdocs/api_op_DescribeActivities.go +++ b/service/workdocs/api_op_DescribeActivities.go @@ -145,6 +145,9 @@ func (c *Client) addOperationDescribeActivitiesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeActivities(options.Region), middleware.Before); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationDescribeActivitiesMiddlewares(stack *middleware.Sta return nil } -// DescribeActivitiesAPIClient is a client that implements the DescribeActivities -// operation. -type DescribeActivitiesAPIClient interface { - DescribeActivities(context.Context, *DescribeActivitiesInput, ...func(*Options)) (*DescribeActivitiesOutput, error) -} - -var _ DescribeActivitiesAPIClient = (*Client)(nil) - // DescribeActivitiesPaginatorOptions is the paginator options for // DescribeActivities type DescribeActivitiesPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeActivitiesPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeActivities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeActivitiesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeActivitiesAPIClient is a client that implements the DescribeActivities +// operation. +type DescribeActivitiesAPIClient interface { + DescribeActivities(context.Context, *DescribeActivitiesInput, ...func(*Options)) (*DescribeActivitiesOutput, error) +} + +var _ DescribeActivitiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeActivities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeComments.go b/service/workdocs/api_op_DescribeComments.go index c1e325b00bf..044329bb764 100644 --- a/service/workdocs/api_op_DescribeComments.go +++ b/service/workdocs/api_op_DescribeComments.go @@ -126,6 +126,9 @@ func (c *Client) addOperationDescribeCommentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCommentsValidationMiddleware(stack); err != nil { return err } @@ -150,14 +153,6 @@ func (c *Client) addOperationDescribeCommentsMiddlewares(stack *middleware.Stack return nil } -// DescribeCommentsAPIClient is a client that implements the DescribeComments -// operation. -type DescribeCommentsAPIClient interface { - DescribeComments(context.Context, *DescribeCommentsInput, ...func(*Options)) (*DescribeCommentsOutput, error) -} - -var _ DescribeCommentsAPIClient = (*Client)(nil) - // DescribeCommentsPaginatorOptions is the paginator options for DescribeComments type DescribeCommentsPaginatorOptions struct { // The maximum number of items to return. @@ -221,6 +216,9 @@ func (p *DescribeCommentsPaginator) NextPage(ctx context.Context, optFns ...func } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeComments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeCommentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// DescribeCommentsAPIClient is a client that implements the DescribeComments +// operation. +type DescribeCommentsAPIClient interface { + DescribeComments(context.Context, *DescribeCommentsInput, ...func(*Options)) (*DescribeCommentsOutput, error) +} + +var _ DescribeCommentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeComments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeDocumentVersions.go b/service/workdocs/api_op_DescribeDocumentVersions.go index d2d1d0dcd81..eb722a63380 100644 --- a/service/workdocs/api_op_DescribeDocumentVersions.go +++ b/service/workdocs/api_op_DescribeDocumentVersions.go @@ -131,6 +131,9 @@ func (c *Client) addOperationDescribeDocumentVersionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDocumentVersionsValidationMiddleware(stack); err != nil { return err } @@ -155,14 +158,6 @@ func (c *Client) addOperationDescribeDocumentVersionsMiddlewares(stack *middlewa return nil } -// DescribeDocumentVersionsAPIClient is a client that implements the -// DescribeDocumentVersions operation. -type DescribeDocumentVersionsAPIClient interface { - DescribeDocumentVersions(context.Context, *DescribeDocumentVersionsInput, ...func(*Options)) (*DescribeDocumentVersionsOutput, error) -} - -var _ DescribeDocumentVersionsAPIClient = (*Client)(nil) - // DescribeDocumentVersionsPaginatorOptions is the paginator options for // DescribeDocumentVersions type DescribeDocumentVersionsPaginatorOptions struct { @@ -228,6 +223,9 @@ func (p *DescribeDocumentVersionsPaginator) NextPage(ctx context.Context, optFns } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeDocumentVersions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -247,6 +245,14 @@ func (p *DescribeDocumentVersionsPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeDocumentVersionsAPIClient is a client that implements the +// DescribeDocumentVersions operation. +type DescribeDocumentVersionsAPIClient interface { + DescribeDocumentVersions(context.Context, *DescribeDocumentVersionsInput, ...func(*Options)) (*DescribeDocumentVersionsOutput, error) +} + +var _ DescribeDocumentVersionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeDocumentVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeFolderContents.go b/service/workdocs/api_op_DescribeFolderContents.go index 98994e0114c..e0f30ff2442 100644 --- a/service/workdocs/api_op_DescribeFolderContents.go +++ b/service/workdocs/api_op_DescribeFolderContents.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeFolderContentsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFolderContentsValidationMiddleware(stack); err != nil { return err } @@ -166,14 +169,6 @@ func (c *Client) addOperationDescribeFolderContentsMiddlewares(stack *middleware return nil } -// DescribeFolderContentsAPIClient is a client that implements the -// DescribeFolderContents operation. -type DescribeFolderContentsAPIClient interface { - DescribeFolderContents(context.Context, *DescribeFolderContentsInput, ...func(*Options)) (*DescribeFolderContentsOutput, error) -} - -var _ DescribeFolderContentsAPIClient = (*Client)(nil) - // DescribeFolderContentsPaginatorOptions is the paginator options for // DescribeFolderContents type DescribeFolderContentsPaginatorOptions struct { @@ -238,6 +233,9 @@ func (p *DescribeFolderContentsPaginator) NextPage(ctx context.Context, optFns . } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeFolderContents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -257,6 +255,14 @@ func (p *DescribeFolderContentsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// DescribeFolderContentsAPIClient is a client that implements the +// DescribeFolderContents operation. +type DescribeFolderContentsAPIClient interface { + DescribeFolderContents(context.Context, *DescribeFolderContentsInput, ...func(*Options)) (*DescribeFolderContentsOutput, error) +} + +var _ DescribeFolderContentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeFolderContents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeGroups.go b/service/workdocs/api_op_DescribeGroups.go index a97d679ad4c..6e75df6768d 100644 --- a/service/workdocs/api_op_DescribeGroups.go +++ b/service/workdocs/api_op_DescribeGroups.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeGroupsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupsValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeGroupsMiddlewares(stack *middleware.Stack, return nil } -// DescribeGroupsAPIClient is a client that implements the DescribeGroups -// operation. -type DescribeGroupsAPIClient interface { - DescribeGroups(context.Context, *DescribeGroupsInput, ...func(*Options)) (*DescribeGroupsOutput, error) -} - -var _ DescribeGroupsAPIClient = (*Client)(nil) - // DescribeGroupsPaginatorOptions is the paginator options for DescribeGroups type DescribeGroupsPaginatorOptions struct { // The maximum number of items to return with this call. @@ -220,6 +215,9 @@ func (p *DescribeGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *DescribeGroupsPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// DescribeGroupsAPIClient is a client that implements the DescribeGroups +// operation. +type DescribeGroupsAPIClient interface { + DescribeGroups(context.Context, *DescribeGroupsInput, ...func(*Options)) (*DescribeGroupsOutput, error) +} + +var _ DescribeGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeNotificationSubscriptions.go b/service/workdocs/api_op_DescribeNotificationSubscriptions.go index 2017b40238c..766c038f4db 100644 --- a/service/workdocs/api_op_DescribeNotificationSubscriptions.go +++ b/service/workdocs/api_op_DescribeNotificationSubscriptions.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeNotificationSubscriptionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeNotificationSubscriptionsValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationDescribeNotificationSubscriptionsMiddlewares(stack return nil } -// DescribeNotificationSubscriptionsAPIClient is a client that implements the -// DescribeNotificationSubscriptions operation. -type DescribeNotificationSubscriptionsAPIClient interface { - DescribeNotificationSubscriptions(context.Context, *DescribeNotificationSubscriptionsInput, ...func(*Options)) (*DescribeNotificationSubscriptionsOutput, error) -} - -var _ DescribeNotificationSubscriptionsAPIClient = (*Client)(nil) - // DescribeNotificationSubscriptionsPaginatorOptions is the paginator options for // DescribeNotificationSubscriptions type DescribeNotificationSubscriptionsPaginatorOptions struct { @@ -215,6 +210,9 @@ func (p *DescribeNotificationSubscriptionsPaginator) NextPage(ctx context.Contex } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeNotificationSubscriptions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +232,14 @@ func (p *DescribeNotificationSubscriptionsPaginator) NextPage(ctx context.Contex return result, nil } +// DescribeNotificationSubscriptionsAPIClient is a client that implements the +// DescribeNotificationSubscriptions operation. +type DescribeNotificationSubscriptionsAPIClient interface { + DescribeNotificationSubscriptions(context.Context, *DescribeNotificationSubscriptionsInput, ...func(*Options)) (*DescribeNotificationSubscriptionsOutput, error) +} + +var _ DescribeNotificationSubscriptionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeNotificationSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeResourcePermissions.go b/service/workdocs/api_op_DescribeResourcePermissions.go index 3ecaace6555..122d63c5412 100644 --- a/service/workdocs/api_op_DescribeResourcePermissions.go +++ b/service/workdocs/api_op_DescribeResourcePermissions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeResourcePermissionsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourcePermissionsValidationMiddleware(stack); err != nil { return err } @@ -148,14 +151,6 @@ func (c *Client) addOperationDescribeResourcePermissionsMiddlewares(stack *middl return nil } -// DescribeResourcePermissionsAPIClient is a client that implements the -// DescribeResourcePermissions operation. -type DescribeResourcePermissionsAPIClient interface { - DescribeResourcePermissions(context.Context, *DescribeResourcePermissionsInput, ...func(*Options)) (*DescribeResourcePermissionsOutput, error) -} - -var _ DescribeResourcePermissionsAPIClient = (*Client)(nil) - // DescribeResourcePermissionsPaginatorOptions is the paginator options for // DescribeResourcePermissions type DescribeResourcePermissionsPaginatorOptions struct { @@ -222,6 +217,9 @@ func (p *DescribeResourcePermissionsPaginator) NextPage(ctx context.Context, opt } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeResourcePermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -241,6 +239,14 @@ func (p *DescribeResourcePermissionsPaginator) NextPage(ctx context.Context, opt return result, nil } +// DescribeResourcePermissionsAPIClient is a client that implements the +// DescribeResourcePermissions operation. +type DescribeResourcePermissionsAPIClient interface { + DescribeResourcePermissions(context.Context, *DescribeResourcePermissionsInput, ...func(*Options)) (*DescribeResourcePermissionsOutput, error) +} + +var _ DescribeResourcePermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeResourcePermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeRootFolders.go b/service/workdocs/api_op_DescribeRootFolders.go index ee4de8ca84c..f84f8f88671 100644 --- a/service/workdocs/api_op_DescribeRootFolders.go +++ b/service/workdocs/api_op_DescribeRootFolders.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDescribeRootFoldersMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeRootFoldersValidationMiddleware(stack); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeRootFoldersMiddlewares(stack *middleware.St return nil } -// DescribeRootFoldersAPIClient is a client that implements the -// DescribeRootFolders operation. -type DescribeRootFoldersAPIClient interface { - DescribeRootFolders(context.Context, *DescribeRootFoldersInput, ...func(*Options)) (*DescribeRootFoldersOutput, error) -} - -var _ DescribeRootFoldersAPIClient = (*Client)(nil) - // DescribeRootFoldersPaginatorOptions is the paginator options for // DescribeRootFolders type DescribeRootFoldersPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeRootFoldersPaginator) NextPage(ctx context.Context, optFns ...f } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeRootFolders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeRootFoldersPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// DescribeRootFoldersAPIClient is a client that implements the +// DescribeRootFolders operation. +type DescribeRootFoldersAPIClient interface { + DescribeRootFolders(context.Context, *DescribeRootFoldersInput, ...func(*Options)) (*DescribeRootFoldersOutput, error) +} + +var _ DescribeRootFoldersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeRootFolders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_DescribeUsers.go b/service/workdocs/api_op_DescribeUsers.go index bc9e3266954..be56564ed10 100644 --- a/service/workdocs/api_op_DescribeUsers.go +++ b/service/workdocs/api_op_DescribeUsers.go @@ -165,6 +165,9 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUsers(options.Region), middleware.Before); err != nil { return err } @@ -186,13 +189,6 @@ func (c *Client) addOperationDescribeUsersMiddlewares(stack *middleware.Stack, o return nil } -// DescribeUsersAPIClient is a client that implements the DescribeUsers operation. -type DescribeUsersAPIClient interface { - DescribeUsers(context.Context, *DescribeUsersInput, ...func(*Options)) (*DescribeUsersOutput, error) -} - -var _ DescribeUsersAPIClient = (*Client)(nil) - // DescribeUsersPaginatorOptions is the paginator options for DescribeUsers type DescribeUsersPaginatorOptions struct { // The maximum number of items to return. @@ -256,6 +252,9 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -275,6 +274,13 @@ func (p *DescribeUsersPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// DescribeUsersAPIClient is a client that implements the DescribeUsers operation. +type DescribeUsersAPIClient interface { + DescribeUsers(context.Context, *DescribeUsersInput, ...func(*Options)) (*DescribeUsersOutput, error) +} + +var _ DescribeUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_GetCurrentUser.go b/service/workdocs/api_op_GetCurrentUser.go index bbb7792a0d2..ffc22ec2789 100644 --- a/service/workdocs/api_op_GetCurrentUser.go +++ b/service/workdocs/api_op_GetCurrentUser.go @@ -113,6 +113,9 @@ func (c *Client) addOperationGetCurrentUserMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetCurrentUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_GetDocument.go b/service/workdocs/api_op_GetDocument.go index 86d37dadffd..623faf682ab 100644 --- a/service/workdocs/api_op_GetDocument.go +++ b/service/workdocs/api_op_GetDocument.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetDocumentMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_GetDocumentPath.go b/service/workdocs/api_op_GetDocumentPath.go index b22e921bd24..174252f9f01 100644 --- a/service/workdocs/api_op_GetDocumentPath.go +++ b/service/workdocs/api_op_GetDocumentPath.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetDocumentPathMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentPathValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_GetDocumentVersion.go b/service/workdocs/api_op_GetDocumentVersion.go index 396ad7140d2..613d09a8303 100644 --- a/service/workdocs/api_op_GetDocumentVersion.go +++ b/service/workdocs/api_op_GetDocumentVersion.go @@ -125,6 +125,9 @@ func (c *Client) addOperationGetDocumentVersionMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDocumentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_GetFolder.go b/service/workdocs/api_op_GetFolder.go index ceacf66075c..b702ae32518 100644 --- a/service/workdocs/api_op_GetFolder.go +++ b/service/workdocs/api_op_GetFolder.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetFolderMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_GetFolderPath.go b/service/workdocs/api_op_GetFolderPath.go index ea5191aa290..ad439deb5db 100644 --- a/service/workdocs/api_op_GetFolderPath.go +++ b/service/workdocs/api_op_GetFolderPath.go @@ -126,6 +126,9 @@ func (c *Client) addOperationGetFolderPathMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetFolderPathValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_GetResources.go b/service/workdocs/api_op_GetResources.go index a51945e1179..c5d32803522 100644 --- a/service/workdocs/api_op_GetResources.go +++ b/service/workdocs/api_op_GetResources.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetResourcesMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResources(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workdocs/api_op_InitiateDocumentVersionUpload.go b/service/workdocs/api_op_InitiateDocumentVersionUpload.go index 98ba147245f..3822e55b7d1 100644 --- a/service/workdocs/api_op_InitiateDocumentVersionUpload.go +++ b/service/workdocs/api_op_InitiateDocumentVersionUpload.go @@ -137,6 +137,9 @@ func (c *Client) addOperationInitiateDocumentVersionUploadMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInitiateDocumentVersionUpload(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workdocs/api_op_RemoveAllResourcePermissions.go b/service/workdocs/api_op_RemoveAllResourcePermissions.go index 6de2f841c7b..4878246cdbf 100644 --- a/service/workdocs/api_op_RemoveAllResourcePermissions.go +++ b/service/workdocs/api_op_RemoveAllResourcePermissions.go @@ -105,6 +105,9 @@ func (c *Client) addOperationRemoveAllResourcePermissionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveAllResourcePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_RemoveResourcePermission.go b/service/workdocs/api_op_RemoveResourcePermission.go index 2658c932e48..4992d55b800 100644 --- a/service/workdocs/api_op_RemoveResourcePermission.go +++ b/service/workdocs/api_op_RemoveResourcePermission.go @@ -114,6 +114,9 @@ func (c *Client) addOperationRemoveResourcePermissionMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRemoveResourcePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_RestoreDocumentVersions.go b/service/workdocs/api_op_RestoreDocumentVersions.go index d5a4d056326..b7981fc7028 100644 --- a/service/workdocs/api_op_RestoreDocumentVersions.go +++ b/service/workdocs/api_op_RestoreDocumentVersions.go @@ -105,6 +105,9 @@ func (c *Client) addOperationRestoreDocumentVersionsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDocumentVersionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_SearchResources.go b/service/workdocs/api_op_SearchResources.go index 0d4dfa7c209..8c50ec6900e 100644 --- a/service/workdocs/api_op_SearchResources.go +++ b/service/workdocs/api_op_SearchResources.go @@ -140,6 +140,9 @@ func (c *Client) addOperationSearchResourcesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSearchResourcesValidationMiddleware(stack); err != nil { return err } @@ -164,14 +167,6 @@ func (c *Client) addOperationSearchResourcesMiddlewares(stack *middleware.Stack, return nil } -// SearchResourcesAPIClient is a client that implements the SearchResources -// operation. -type SearchResourcesAPIClient interface { - SearchResources(context.Context, *SearchResourcesInput, ...func(*Options)) (*SearchResourcesOutput, error) -} - -var _ SearchResourcesAPIClient = (*Client)(nil) - // SearchResourcesPaginatorOptions is the paginator options for SearchResources type SearchResourcesPaginatorOptions struct { // Max results count per page. @@ -235,6 +230,9 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.SearchResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *SearchResourcesPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// SearchResourcesAPIClient is a client that implements the SearchResources +// operation. +type SearchResourcesAPIClient interface { + SearchResources(context.Context, *SearchResourcesInput, ...func(*Options)) (*SearchResourcesOutput, error) +} + +var _ SearchResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opSearchResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workdocs/api_op_UpdateDocument.go b/service/workdocs/api_op_UpdateDocument.go index 6ad1821584a..1f513d7fb40 100644 --- a/service/workdocs/api_op_UpdateDocument.go +++ b/service/workdocs/api_op_UpdateDocument.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateDocumentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_UpdateDocumentVersion.go b/service/workdocs/api_op_UpdateDocumentVersion.go index 872f205b803..7f1e16d8762 100644 --- a/service/workdocs/api_op_UpdateDocumentVersion.go +++ b/service/workdocs/api_op_UpdateDocumentVersion.go @@ -118,6 +118,9 @@ func (c *Client) addOperationUpdateDocumentVersionMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDocumentVersionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_UpdateFolder.go b/service/workdocs/api_op_UpdateFolder.go index 22d1bedd1b6..983f335b28e 100644 --- a/service/workdocs/api_op_UpdateFolder.go +++ b/service/workdocs/api_op_UpdateFolder.go @@ -117,6 +117,9 @@ func (c *Client) addOperationUpdateFolderMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFolderValidationMiddleware(stack); err != nil { return err } diff --git a/service/workdocs/api_op_UpdateUser.go b/service/workdocs/api_op_UpdateUser.go index c484e831b28..f9812e84d35 100644 --- a/service/workdocs/api_op_UpdateUser.go +++ b/service/workdocs/api_op_UpdateUser.go @@ -132,6 +132,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_client.go b/service/worklink/api_client.go index 9415801ba69..0d8f3b5fb9b 100644 --- a/service/worklink/api_client.go +++ b/service/worklink/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/worklink/api_op_AssociateDomain.go b/service/worklink/api_op_AssociateDomain.go index cdc70a2c706..9cd66e64a89 100644 --- a/service/worklink/api_op_AssociateDomain.go +++ b/service/worklink/api_op_AssociateDomain.go @@ -118,6 +118,9 @@ func (c *Client) addOperationAssociateDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_AssociateWebsiteAuthorizationProvider.go b/service/worklink/api_op_AssociateWebsiteAuthorizationProvider.go index c6f9172bf9c..c0953742a4f 100644 --- a/service/worklink/api_op_AssociateWebsiteAuthorizationProvider.go +++ b/service/worklink/api_op_AssociateWebsiteAuthorizationProvider.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateWebsiteAuthorizationProviderMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWebsiteAuthorizationProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_AssociateWebsiteCertificateAuthority.go b/service/worklink/api_op_AssociateWebsiteCertificateAuthority.go index e7463ac7948..8fddf30a87d 100644 --- a/service/worklink/api_op_AssociateWebsiteCertificateAuthority.go +++ b/service/worklink/api_op_AssociateWebsiteCertificateAuthority.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateWebsiteCertificateAuthorityMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWebsiteCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_CreateFleet.go b/service/worklink/api_op_CreateFleet.go index 93fe38552c9..f1bc829cfc0 100644 --- a/service/worklink/api_op_CreateFleet.go +++ b/service/worklink/api_op_CreateFleet.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DeleteFleet.go b/service/worklink/api_op_DeleteFleet.go index 9e41c04dc40..36f61719ab7 100644 --- a/service/worklink/api_op_DeleteFleet.go +++ b/service/worklink/api_op_DeleteFleet.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteFleetMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteFleetValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeAuditStreamConfiguration.go b/service/worklink/api_op_DescribeAuditStreamConfiguration.go index 92f9624ff2b..eaf01f78940 100644 --- a/service/worklink/api_op_DescribeAuditStreamConfiguration.go +++ b/service/worklink/api_op_DescribeAuditStreamConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeAuditStreamConfigurationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeAuditStreamConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeCompanyNetworkConfiguration.go b/service/worklink/api_op_DescribeCompanyNetworkConfiguration.go index 4d5841732a6..b4cc97745da 100644 --- a/service/worklink/api_op_DescribeCompanyNetworkConfiguration.go +++ b/service/worklink/api_op_DescribeCompanyNetworkConfiguration.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeCompanyNetworkConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeCompanyNetworkConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeDevice.go b/service/worklink/api_op_DescribeDevice.go index 013a285fa45..767ef5db396 100644 --- a/service/worklink/api_op_DescribeDevice.go +++ b/service/worklink/api_op_DescribeDevice.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDeviceValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeDevicePolicyConfiguration.go b/service/worklink/api_op_DescribeDevicePolicyConfiguration.go index ab7e6110356..d4c8ab7f956 100644 --- a/service/worklink/api_op_DescribeDevicePolicyConfiguration.go +++ b/service/worklink/api_op_DescribeDevicePolicyConfiguration.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDescribeDevicePolicyConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDevicePolicyConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeDomain.go b/service/worklink/api_op_DescribeDomain.go index 11266d6e52d..f5e121b05f0 100644 --- a/service/worklink/api_op_DescribeDomain.go +++ b/service/worklink/api_op_DescribeDomain.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeDomainMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeFleetMetadata.go b/service/worklink/api_op_DescribeFleetMetadata.go index 54fafd7328f..43e928fe917 100644 --- a/service/worklink/api_op_DescribeFleetMetadata.go +++ b/service/worklink/api_op_DescribeFleetMetadata.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDescribeFleetMetadataMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeFleetMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeIdentityProviderConfiguration.go b/service/worklink/api_op_DescribeIdentityProviderConfiguration.go index 5a3885349c4..fcdf4679b12 100644 --- a/service/worklink/api_op_DescribeIdentityProviderConfiguration.go +++ b/service/worklink/api_op_DescribeIdentityProviderConfiguration.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeIdentityProviderConfigurationMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeIdentityProviderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DescribeWebsiteCertificateAuthority.go b/service/worklink/api_op_DescribeWebsiteCertificateAuthority.go index ce6d9f421b4..f29104d7ea0 100644 --- a/service/worklink/api_op_DescribeWebsiteCertificateAuthority.go +++ b/service/worklink/api_op_DescribeWebsiteCertificateAuthority.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDescribeWebsiteCertificateAuthorityMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWebsiteCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DisassociateDomain.go b/service/worklink/api_op_DisassociateDomain.go index a36d8a360fd..45390540deb 100644 --- a/service/worklink/api_op_DisassociateDomain.go +++ b/service/worklink/api_op_DisassociateDomain.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDisassociateDomainMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DisassociateWebsiteAuthorizationProvider.go b/service/worklink/api_op_DisassociateWebsiteAuthorizationProvider.go index 0f52f4acde6..cc9caeb6b72 100644 --- a/service/worklink/api_op_DisassociateWebsiteAuthorizationProvider.go +++ b/service/worklink/api_op_DisassociateWebsiteAuthorizationProvider.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateWebsiteAuthorizationProviderMiddlewares if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWebsiteAuthorizationProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_DisassociateWebsiteCertificateAuthority.go b/service/worklink/api_op_DisassociateWebsiteCertificateAuthority.go index 20202da5e4c..fdc7e7ef46a 100644 --- a/service/worklink/api_op_DisassociateWebsiteCertificateAuthority.go +++ b/service/worklink/api_op_DisassociateWebsiteCertificateAuthority.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisassociateWebsiteCertificateAuthorityMiddlewares( if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWebsiteCertificateAuthorityValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_ListDevices.go b/service/worklink/api_op_ListDevices.go index 433d516726b..bd673783f10 100644 --- a/service/worklink/api_op_ListDevices.go +++ b/service/worklink/api_op_ListDevices.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDevicesValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt return nil } -// ListDevicesAPIClient is a client that implements the ListDevices operation. -type ListDevicesAPIClient interface { - ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) -} - -var _ ListDevicesAPIClient = (*Client)(nil) - // ListDevicesPaginatorOptions is the paginator options for ListDevices type ListDevicesPaginatorOptions struct { // The maximum number of results to be included in the next page. @@ -214,6 +210,9 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/worklink/api_op_ListDomains.go b/service/worklink/api_op_ListDomains.go index 1f4f2a095ce..fd273ab881e 100644 --- a/service/worklink/api_op_ListDomains.go +++ b/service/worklink/api_op_ListDomains.go @@ -120,6 +120,9 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListDomainsValidationMiddleware(stack); err != nil { return err } @@ -144,13 +147,6 @@ func (c *Client) addOperationListDomainsMiddlewares(stack *middleware.Stack, opt return nil } -// ListDomainsAPIClient is a client that implements the ListDomains operation. -type ListDomainsAPIClient interface { - ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) -} - -var _ ListDomainsAPIClient = (*Client)(nil) - // ListDomainsPaginatorOptions is the paginator options for ListDomains type ListDomainsPaginatorOptions struct { // The maximum number of results to be included in the next page. @@ -214,6 +210,9 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +232,13 @@ func (p *ListDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListDomainsAPIClient is a client that implements the ListDomains operation. +type ListDomainsAPIClient interface { + ListDomains(context.Context, *ListDomainsInput, ...func(*Options)) (*ListDomainsOutput, error) +} + +var _ ListDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/worklink/api_op_ListFleets.go b/service/worklink/api_op_ListFleets.go index c227725e2fe..0c415188cf2 100644 --- a/service/worklink/api_op_ListFleets.go +++ b/service/worklink/api_op_ListFleets.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFleets(options.Region), middleware.Before); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationListFleetsMiddlewares(stack *middleware.Stack, opti return nil } -// ListFleetsAPIClient is a client that implements the ListFleets operation. -type ListFleetsAPIClient interface { - ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) -} - -var _ ListFleetsAPIClient = (*Client)(nil) - // ListFleetsPaginatorOptions is the paginator options for ListFleets type ListFleetsPaginatorOptions struct { // The maximum number of results to be included in the next page. @@ -206,6 +202,9 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListFleets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -225,6 +224,13 @@ func (p *ListFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListFleetsAPIClient is a client that implements the ListFleets operation. +type ListFleetsAPIClient interface { + ListFleets(context.Context, *ListFleetsInput, ...func(*Options)) (*ListFleetsOutput, error) +} + +var _ ListFleetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListFleets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/worklink/api_op_ListTagsForResource.go b/service/worklink/api_op_ListTagsForResource.go index 0fe12a7e820..d9ec118d29d 100644 --- a/service/worklink/api_op_ListTagsForResource.go +++ b/service/worklink/api_op_ListTagsForResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_ListWebsiteAuthorizationProviders.go b/service/worklink/api_op_ListWebsiteAuthorizationProviders.go index e37cd99d018..65f9bcd6a3f 100644 --- a/service/worklink/api_op_ListWebsiteAuthorizationProviders.go +++ b/service/worklink/api_op_ListWebsiteAuthorizationProviders.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListWebsiteAuthorizationProvidersMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWebsiteAuthorizationProvidersValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListWebsiteAuthorizationProvidersMiddlewares(stack return nil } -// ListWebsiteAuthorizationProvidersAPIClient is a client that implements the -// ListWebsiteAuthorizationProviders operation. -type ListWebsiteAuthorizationProvidersAPIClient interface { - ListWebsiteAuthorizationProviders(context.Context, *ListWebsiteAuthorizationProvidersInput, ...func(*Options)) (*ListWebsiteAuthorizationProvidersOutput, error) -} - -var _ ListWebsiteAuthorizationProvidersAPIClient = (*Client)(nil) - // ListWebsiteAuthorizationProvidersPaginatorOptions is the paginator options for // ListWebsiteAuthorizationProviders type ListWebsiteAuthorizationProvidersPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListWebsiteAuthorizationProvidersPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWebsiteAuthorizationProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListWebsiteAuthorizationProvidersPaginator) NextPage(ctx context.Contex return result, nil } +// ListWebsiteAuthorizationProvidersAPIClient is a client that implements the +// ListWebsiteAuthorizationProviders operation. +type ListWebsiteAuthorizationProvidersAPIClient interface { + ListWebsiteAuthorizationProviders(context.Context, *ListWebsiteAuthorizationProvidersInput, ...func(*Options)) (*ListWebsiteAuthorizationProvidersOutput, error) +} + +var _ ListWebsiteAuthorizationProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWebsiteAuthorizationProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/worklink/api_op_ListWebsiteCertificateAuthorities.go b/service/worklink/api_op_ListWebsiteCertificateAuthorities.go index c3417e1ea3a..3bb16c3f16a 100644 --- a/service/worklink/api_op_ListWebsiteCertificateAuthorities.go +++ b/service/worklink/api_op_ListWebsiteCertificateAuthorities.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListWebsiteCertificateAuthoritiesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListWebsiteCertificateAuthoritiesValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationListWebsiteCertificateAuthoritiesMiddlewares(stack return nil } -// ListWebsiteCertificateAuthoritiesAPIClient is a client that implements the -// ListWebsiteCertificateAuthorities operation. -type ListWebsiteCertificateAuthoritiesAPIClient interface { - ListWebsiteCertificateAuthorities(context.Context, *ListWebsiteCertificateAuthoritiesInput, ...func(*Options)) (*ListWebsiteCertificateAuthoritiesOutput, error) -} - -var _ ListWebsiteCertificateAuthoritiesAPIClient = (*Client)(nil) - // ListWebsiteCertificateAuthoritiesPaginatorOptions is the paginator options for // ListWebsiteCertificateAuthorities type ListWebsiteCertificateAuthoritiesPaginatorOptions struct { @@ -219,6 +214,9 @@ func (p *ListWebsiteCertificateAuthoritiesPaginator) NextPage(ctx context.Contex } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListWebsiteCertificateAuthorities(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -238,6 +236,14 @@ func (p *ListWebsiteCertificateAuthoritiesPaginator) NextPage(ctx context.Contex return result, nil } +// ListWebsiteCertificateAuthoritiesAPIClient is a client that implements the +// ListWebsiteCertificateAuthorities operation. +type ListWebsiteCertificateAuthoritiesAPIClient interface { + ListWebsiteCertificateAuthorities(context.Context, *ListWebsiteCertificateAuthoritiesInput, ...func(*Options)) (*ListWebsiteCertificateAuthoritiesOutput, error) +} + +var _ ListWebsiteCertificateAuthoritiesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListWebsiteCertificateAuthorities(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/worklink/api_op_RestoreDomainAccess.go b/service/worklink/api_op_RestoreDomainAccess.go index 5c19c88ab94..0ec3dad9d5b 100644 --- a/service/worklink/api_op_RestoreDomainAccess.go +++ b/service/worklink/api_op_RestoreDomainAccess.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRestoreDomainAccessMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreDomainAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_RevokeDomainAccess.go b/service/worklink/api_op_RevokeDomainAccess.go index 21fca5cff18..4f6982ab942 100644 --- a/service/worklink/api_op_RevokeDomainAccess.go +++ b/service/worklink/api_op_RevokeDomainAccess.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRevokeDomainAccessMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeDomainAccessValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_SignOutUser.go b/service/worklink/api_op_SignOutUser.go index 8eb950bbdaa..94bae3cb9c9 100644 --- a/service/worklink/api_op_SignOutUser.go +++ b/service/worklink/api_op_SignOutUser.go @@ -110,6 +110,9 @@ func (c *Client) addOperationSignOutUserMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpSignOutUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_TagResource.go b/service/worklink/api_op_TagResource.go index dfab3d5f4f3..f27989975d4 100644 --- a/service/worklink/api_op_TagResource.go +++ b/service/worklink/api_op_TagResource.go @@ -111,6 +111,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UntagResource.go b/service/worklink/api_op_UntagResource.go index 1c45c2ba39f..fe3052b419d 100644 --- a/service/worklink/api_op_UntagResource.go +++ b/service/worklink/api_op_UntagResource.go @@ -109,6 +109,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UpdateAuditStreamConfiguration.go b/service/worklink/api_op_UpdateAuditStreamConfiguration.go index abd7da1280f..d0965e4fb45 100644 --- a/service/worklink/api_op_UpdateAuditStreamConfiguration.go +++ b/service/worklink/api_op_UpdateAuditStreamConfiguration.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateAuditStreamConfigurationMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAuditStreamConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UpdateCompanyNetworkConfiguration.go b/service/worklink/api_op_UpdateCompanyNetworkConfiguration.go index 409a8eb8d24..a6f262f0ea4 100644 --- a/service/worklink/api_op_UpdateCompanyNetworkConfiguration.go +++ b/service/worklink/api_op_UpdateCompanyNetworkConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationUpdateCompanyNetworkConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateCompanyNetworkConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UpdateDevicePolicyConfiguration.go b/service/worklink/api_op_UpdateDevicePolicyConfiguration.go index b54772ee279..b0bf394702c 100644 --- a/service/worklink/api_op_UpdateDevicePolicyConfiguration.go +++ b/service/worklink/api_op_UpdateDevicePolicyConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateDevicePolicyConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDevicePolicyConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UpdateDomainMetadata.go b/service/worklink/api_op_UpdateDomainMetadata.go index f285f470e80..fd3a3e00404 100644 --- a/service/worklink/api_op_UpdateDomainMetadata.go +++ b/service/worklink/api_op_UpdateDomainMetadata.go @@ -112,6 +112,9 @@ func (c *Client) addOperationUpdateDomainMetadataMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDomainMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UpdateFleetMetadata.go b/service/worklink/api_op_UpdateFleetMetadata.go index b7d36632b59..8f8ca63e2e8 100644 --- a/service/worklink/api_op_UpdateFleetMetadata.go +++ b/service/worklink/api_op_UpdateFleetMetadata.go @@ -111,6 +111,9 @@ func (c *Client) addOperationUpdateFleetMetadataMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateFleetMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/worklink/api_op_UpdateIdentityProviderConfiguration.go b/service/worklink/api_op_UpdateIdentityProviderConfiguration.go index b19f74a76b8..1ff6cfe5865 100644 --- a/service/worklink/api_op_UpdateIdentityProviderConfiguration.go +++ b/service/worklink/api_op_UpdateIdentityProviderConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationUpdateIdentityProviderConfigurationMiddlewares(stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateIdentityProviderConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_client.go b/service/workmail/api_client.go index 0160c431b70..b5ed8c6f47c 100644 --- a/service/workmail/api_client.go +++ b/service/workmail/api_client.go @@ -454,6 +454,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -546,6 +570,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/workmail/api_op_AssociateDelegateToResource.go b/service/workmail/api_op_AssociateDelegateToResource.go index a147c66427e..1d0fd3f5104 100644 --- a/service/workmail/api_op_AssociateDelegateToResource.go +++ b/service/workmail/api_op_AssociateDelegateToResource.go @@ -129,6 +129,9 @@ func (c *Client) addOperationAssociateDelegateToResourceMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateDelegateToResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_AssociateMemberToGroup.go b/service/workmail/api_op_AssociateMemberToGroup.go index 628cb3f9df3..21c55b84ca6 100644 --- a/service/workmail/api_op_AssociateMemberToGroup.go +++ b/service/workmail/api_op_AssociateMemberToGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationAssociateMemberToGroupMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateMemberToGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_AssumeImpersonationRole.go b/service/workmail/api_op_AssumeImpersonationRole.go index eba4d59f054..df28e9ca668 100644 --- a/service/workmail/api_op_AssumeImpersonationRole.go +++ b/service/workmail/api_op_AssumeImpersonationRole.go @@ -114,6 +114,9 @@ func (c *Client) addOperationAssumeImpersonationRoleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssumeImpersonationRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_CancelMailboxExportJob.go b/service/workmail/api_op_CancelMailboxExportJob.go index f9b0a47f1a7..3053967247c 100644 --- a/service/workmail/api_op_CancelMailboxExportJob.go +++ b/service/workmail/api_op_CancelMailboxExportJob.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCancelMailboxExportJobMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCancelMailboxExportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_CreateAlias.go b/service/workmail/api_op_CreateAlias.go index 1e9c5ca0de3..fc05c66e35f 100644 --- a/service/workmail/api_op_CreateAlias.go +++ b/service/workmail/api_op_CreateAlias.go @@ -111,6 +111,9 @@ func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_CreateAvailabilityConfiguration.go b/service/workmail/api_op_CreateAvailabilityConfiguration.go index a3b81455d32..1ad582136cf 100644 --- a/service/workmail/api_op_CreateAvailabilityConfiguration.go +++ b/service/workmail/api_op_CreateAvailabilityConfiguration.go @@ -120,6 +120,9 @@ func (c *Client) addOperationCreateAvailabilityConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateAvailabilityConfigurationMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_CreateGroup.go b/service/workmail/api_op_CreateGroup.go index 40286e5db2e..60b3e42276f 100644 --- a/service/workmail/api_op_CreateGroup.go +++ b/service/workmail/api_op_CreateGroup.go @@ -113,6 +113,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_CreateImpersonationRole.go b/service/workmail/api_op_CreateImpersonationRole.go index 148964ec7e7..ce89fe3a113 100644 --- a/service/workmail/api_op_CreateImpersonationRole.go +++ b/service/workmail/api_op_CreateImpersonationRole.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateImpersonationRoleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateImpersonationRoleMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_CreateMobileDeviceAccessRule.go b/service/workmail/api_op_CreateMobileDeviceAccessRule.go index b08cc153600..3d564b7db64 100644 --- a/service/workmail/api_op_CreateMobileDeviceAccessRule.go +++ b/service/workmail/api_op_CreateMobileDeviceAccessRule.go @@ -148,6 +148,9 @@ func (c *Client) addOperationCreateMobileDeviceAccessRuleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateMobileDeviceAccessRuleMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_CreateOrganization.go b/service/workmail/api_op_CreateOrganization.go index 1a00478b23b..9c5ecf6e4b7 100644 --- a/service/workmail/api_op_CreateOrganization.go +++ b/service/workmail/api_op_CreateOrganization.go @@ -140,6 +140,9 @@ func (c *Client) addOperationCreateOrganizationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateOrganizationMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_CreateResource.go b/service/workmail/api_op_CreateResource.go index bac8d508e04..d1ab2fa70a7 100644 --- a/service/workmail/api_op_CreateResource.go +++ b/service/workmail/api_op_CreateResource.go @@ -123,6 +123,9 @@ func (c *Client) addOperationCreateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_CreateUser.go b/service/workmail/api_op_CreateUser.go index c799955c5d9..d0a42e10023 100644 --- a/service/workmail/api_op_CreateUser.go +++ b/service/workmail/api_op_CreateUser.go @@ -135,6 +135,9 @@ func (c *Client) addOperationCreateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteAccessControlRule.go b/service/workmail/api_op_DeleteAccessControlRule.go index a3d5a9d5a93..7c06817bd26 100644 --- a/service/workmail/api_op_DeleteAccessControlRule.go +++ b/service/workmail/api_op_DeleteAccessControlRule.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteAccessControlRuleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccessControlRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteAlias.go b/service/workmail/api_op_DeleteAlias.go index 822e859a261..c6cb1338653 100644 --- a/service/workmail/api_op_DeleteAlias.go +++ b/service/workmail/api_op_DeleteAlias.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteAvailabilityConfiguration.go b/service/workmail/api_op_DeleteAvailabilityConfiguration.go index 28403985dc6..c1efede65df 100644 --- a/service/workmail/api_op_DeleteAvailabilityConfiguration.go +++ b/service/workmail/api_op_DeleteAvailabilityConfiguration.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteAvailabilityConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteEmailMonitoringConfiguration.go b/service/workmail/api_op_DeleteEmailMonitoringConfiguration.go index 708f737ae5e..eb854de5a4b 100644 --- a/service/workmail/api_op_DeleteEmailMonitoringConfiguration.go +++ b/service/workmail/api_op_DeleteEmailMonitoringConfiguration.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteEmailMonitoringConfigurationMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteEmailMonitoringConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteGroup.go b/service/workmail/api_op_DeleteGroup.go index 285f59f8f44..a495a184f9e 100644 --- a/service/workmail/api_op_DeleteGroup.go +++ b/service/workmail/api_op_DeleteGroup.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteImpersonationRole.go b/service/workmail/api_op_DeleteImpersonationRole.go index 71ce297e19f..ab466659f92 100644 --- a/service/workmail/api_op_DeleteImpersonationRole.go +++ b/service/workmail/api_op_DeleteImpersonationRole.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteImpersonationRoleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteImpersonationRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteMailboxPermissions.go b/service/workmail/api_op_DeleteMailboxPermissions.go index 61b39df9988..e48d5b4d38a 100644 --- a/service/workmail/api_op_DeleteMailboxPermissions.go +++ b/service/workmail/api_op_DeleteMailboxPermissions.go @@ -133,6 +133,9 @@ func (c *Client) addOperationDeleteMailboxPermissionsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMailboxPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteMobileDeviceAccessOverride.go b/service/workmail/api_op_DeleteMobileDeviceAccessOverride.go index 53ec05755ee..c9081086f2f 100644 --- a/service/workmail/api_op_DeleteMobileDeviceAccessOverride.go +++ b/service/workmail/api_op_DeleteMobileDeviceAccessOverride.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteMobileDeviceAccessOverrideMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMobileDeviceAccessOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteMobileDeviceAccessRule.go b/service/workmail/api_op_DeleteMobileDeviceAccessRule.go index f98e6d7d538..1841c03bab6 100644 --- a/service/workmail/api_op_DeleteMobileDeviceAccessRule.go +++ b/service/workmail/api_op_DeleteMobileDeviceAccessRule.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteMobileDeviceAccessRuleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteMobileDeviceAccessRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteOrganization.go b/service/workmail/api_op_DeleteOrganization.go index a2ab733f955..cee87f4383f 100644 --- a/service/workmail/api_op_DeleteOrganization.go +++ b/service/workmail/api_op_DeleteOrganization.go @@ -125,6 +125,9 @@ func (c *Client) addOperationDeleteOrganizationMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opDeleteOrganizationMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_DeleteResource.go b/service/workmail/api_op_DeleteResource.go index 5f71db7d9ca..765473aafc2 100644 --- a/service/workmail/api_op_DeleteResource.go +++ b/service/workmail/api_op_DeleteResource.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteRetentionPolicy.go b/service/workmail/api_op_DeleteRetentionPolicy.go index 32441f7e6e2..7d7cac239cc 100644 --- a/service/workmail/api_op_DeleteRetentionPolicy.go +++ b/service/workmail/api_op_DeleteRetentionPolicy.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDeleteRetentionPolicyMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteRetentionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeleteUser.go b/service/workmail/api_op_DeleteUser.go index 68145ae64b2..313bde0f592 100644 --- a/service/workmail/api_op_DeleteUser.go +++ b/service/workmail/api_op_DeleteUser.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDeleteUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeregisterFromWorkMail.go b/service/workmail/api_op_DeregisterFromWorkMail.go index 56e9042817e..3577daf6942 100644 --- a/service/workmail/api_op_DeregisterFromWorkMail.go +++ b/service/workmail/api_op_DeregisterFromWorkMail.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeregisterFromWorkMailMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterFromWorkMailValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DeregisterMailDomain.go b/service/workmail/api_op_DeregisterMailDomain.go index 30f8d3b83f8..137cf02a63e 100644 --- a/service/workmail/api_op_DeregisterMailDomain.go +++ b/service/workmail/api_op_DeregisterMailDomain.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeregisterMailDomainMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterMailDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeEmailMonitoringConfiguration.go b/service/workmail/api_op_DescribeEmailMonitoringConfiguration.go index 31464378254..c28ca526355 100644 --- a/service/workmail/api_op_DescribeEmailMonitoringConfiguration.go +++ b/service/workmail/api_op_DescribeEmailMonitoringConfiguration.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeEmailMonitoringConfigurationMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEmailMonitoringConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeEntity.go b/service/workmail/api_op_DescribeEntity.go index 36361096d1c..748416d19fe 100644 --- a/service/workmail/api_op_DescribeEntity.go +++ b/service/workmail/api_op_DescribeEntity.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeEntityMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeEntityValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeGroup.go b/service/workmail/api_op_DescribeGroup.go index d03754ae63c..a5f621cf0ec 100644 --- a/service/workmail/api_op_DescribeGroup.go +++ b/service/workmail/api_op_DescribeGroup.go @@ -143,6 +143,9 @@ func (c *Client) addOperationDescribeGroupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeInboundDmarcSettings.go b/service/workmail/api_op_DescribeInboundDmarcSettings.go index d052f4673e4..a921ece1192 100644 --- a/service/workmail/api_op_DescribeInboundDmarcSettings.go +++ b/service/workmail/api_op_DescribeInboundDmarcSettings.go @@ -105,6 +105,9 @@ func (c *Client) addOperationDescribeInboundDmarcSettingsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeInboundDmarcSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeMailboxExportJob.go b/service/workmail/api_op_DescribeMailboxExportJob.go index 7d43bcde85d..28d01ccfa24 100644 --- a/service/workmail/api_op_DescribeMailboxExportJob.go +++ b/service/workmail/api_op_DescribeMailboxExportJob.go @@ -147,6 +147,9 @@ func (c *Client) addOperationDescribeMailboxExportJobMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeMailboxExportJobValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeOrganization.go b/service/workmail/api_op_DescribeOrganization.go index bd252858e05..7c9ec3b6b02 100644 --- a/service/workmail/api_op_DescribeOrganization.go +++ b/service/workmail/api_op_DescribeOrganization.go @@ -139,6 +139,9 @@ func (c *Client) addOperationDescribeOrganizationMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeOrganizationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeResource.go b/service/workmail/api_op_DescribeResource.go index 13c51dddd8c..c7ee950b5d3 100644 --- a/service/workmail/api_op_DescribeResource.go +++ b/service/workmail/api_op_DescribeResource.go @@ -152,6 +152,9 @@ func (c *Client) addOperationDescribeResourceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DescribeUser.go b/service/workmail/api_op_DescribeUser.go index 94503aa01e0..aeebae27bae 100644 --- a/service/workmail/api_op_DescribeUser.go +++ b/service/workmail/api_op_DescribeUser.go @@ -196,6 +196,9 @@ func (c *Client) addOperationDescribeUserMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DisassociateDelegateFromResource.go b/service/workmail/api_op_DisassociateDelegateFromResource.go index 0eadbe16806..6ce6eea3beb 100644 --- a/service/workmail/api_op_DisassociateDelegateFromResource.go +++ b/service/workmail/api_op_DisassociateDelegateFromResource.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDisassociateDelegateFromResourceMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateDelegateFromResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_DisassociateMemberFromGroup.go b/service/workmail/api_op_DisassociateMemberFromGroup.go index 17b021153a4..3b2055cd092 100644 --- a/service/workmail/api_op_DisassociateMemberFromGroup.go +++ b/service/workmail/api_op_DisassociateMemberFromGroup.go @@ -130,6 +130,9 @@ func (c *Client) addOperationDisassociateMemberFromGroupMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateMemberFromGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetAccessControlEffect.go b/service/workmail/api_op_GetAccessControlEffect.go index b662bd72be3..e3d532da514 100644 --- a/service/workmail/api_op_GetAccessControlEffect.go +++ b/service/workmail/api_op_GetAccessControlEffect.go @@ -129,6 +129,9 @@ func (c *Client) addOperationGetAccessControlEffectMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetAccessControlEffectValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetDefaultRetentionPolicy.go b/service/workmail/api_op_GetDefaultRetentionPolicy.go index f6d5cd145f8..1af4cb64732 100644 --- a/service/workmail/api_op_GetDefaultRetentionPolicy.go +++ b/service/workmail/api_op_GetDefaultRetentionPolicy.go @@ -115,6 +115,9 @@ func (c *Client) addOperationGetDefaultRetentionPolicyMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetDefaultRetentionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetImpersonationRole.go b/service/workmail/api_op_GetImpersonationRole.go index 2e36ab5c8ec..4648f201bcc 100644 --- a/service/workmail/api_op_GetImpersonationRole.go +++ b/service/workmail/api_op_GetImpersonationRole.go @@ -130,6 +130,9 @@ func (c *Client) addOperationGetImpersonationRoleMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImpersonationRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetImpersonationRoleEffect.go b/service/workmail/api_op_GetImpersonationRoleEffect.go index 401910a6450..c45f850e5bb 100644 --- a/service/workmail/api_op_GetImpersonationRoleEffect.go +++ b/service/workmail/api_op_GetImpersonationRoleEffect.go @@ -131,6 +131,9 @@ func (c *Client) addOperationGetImpersonationRoleEffectMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetImpersonationRoleEffectValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetMailDomain.go b/service/workmail/api_op_GetMailDomain.go index 626c2e56af6..9dd30fb4bb2 100644 --- a/service/workmail/api_op_GetMailDomain.go +++ b/service/workmail/api_op_GetMailDomain.go @@ -128,6 +128,9 @@ func (c *Client) addOperationGetMailDomainMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMailDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetMailboxDetails.go b/service/workmail/api_op_GetMailboxDetails.go index 0a3bb06457a..f03207034fa 100644 --- a/service/workmail/api_op_GetMailboxDetails.go +++ b/service/workmail/api_op_GetMailboxDetails.go @@ -124,6 +124,9 @@ func (c *Client) addOperationGetMailboxDetailsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMailboxDetailsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetMobileDeviceAccessEffect.go b/service/workmail/api_op_GetMobileDeviceAccessEffect.go index 912d4604f8e..e02f65c21fa 100644 --- a/service/workmail/api_op_GetMobileDeviceAccessEffect.go +++ b/service/workmail/api_op_GetMobileDeviceAccessEffect.go @@ -127,6 +127,9 @@ func (c *Client) addOperationGetMobileDeviceAccessEffectMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMobileDeviceAccessEffectValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_GetMobileDeviceAccessOverride.go b/service/workmail/api_op_GetMobileDeviceAccessOverride.go index 45331b217b7..c1b528b30c8 100644 --- a/service/workmail/api_op_GetMobileDeviceAccessOverride.go +++ b/service/workmail/api_op_GetMobileDeviceAccessOverride.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetMobileDeviceAccessOverrideMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetMobileDeviceAccessOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_ListAccessControlRules.go b/service/workmail/api_op_ListAccessControlRules.go index 30b7aa954cd..522394d8425 100644 --- a/service/workmail/api_op_ListAccessControlRules.go +++ b/service/workmail/api_op_ListAccessControlRules.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListAccessControlRulesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAccessControlRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_ListAliases.go b/service/workmail/api_op_ListAliases.go index 21755d6e277..87151df4700 100644 --- a/service/workmail/api_op_ListAliases.go +++ b/service/workmail/api_op_ListAliases.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAliasesValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, opt return nil } -// ListAliasesAPIClient is a client that implements the ListAliases operation. -type ListAliasesAPIClient interface { - ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) -} - -var _ ListAliasesAPIClient = (*Client)(nil) - // ListAliasesPaginatorOptions is the paginator options for ListAliases type ListAliasesPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -215,6 +211,9 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAliases(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListAliasesAPIClient is a client that implements the ListAliases operation. +type ListAliasesAPIClient interface { + ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error) +} + +var _ ListAliasesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListAvailabilityConfigurations.go b/service/workmail/api_op_ListAvailabilityConfigurations.go index ab3287acda9..9c2e02a3bf5 100644 --- a/service/workmail/api_op_ListAvailabilityConfigurations.go +++ b/service/workmail/api_op_ListAvailabilityConfigurations.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListAvailabilityConfigurationsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAvailabilityConfigurationsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListAvailabilityConfigurationsMiddlewares(stack *mi return nil } -// ListAvailabilityConfigurationsAPIClient is a client that implements the -// ListAvailabilityConfigurations operation. -type ListAvailabilityConfigurationsAPIClient interface { - ListAvailabilityConfigurations(context.Context, *ListAvailabilityConfigurationsInput, ...func(*Options)) (*ListAvailabilityConfigurationsOutput, error) -} - -var _ ListAvailabilityConfigurationsAPIClient = (*Client)(nil) - // ListAvailabilityConfigurationsPaginatorOptions is the paginator options for // ListAvailabilityConfigurations type ListAvailabilityConfigurationsPaginatorOptions struct { @@ -217,6 +212,9 @@ func (p *ListAvailabilityConfigurationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAvailabilityConfigurations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -236,6 +234,14 @@ func (p *ListAvailabilityConfigurationsPaginator) NextPage(ctx context.Context, return result, nil } +// ListAvailabilityConfigurationsAPIClient is a client that implements the +// ListAvailabilityConfigurations operation. +type ListAvailabilityConfigurationsAPIClient interface { + ListAvailabilityConfigurations(context.Context, *ListAvailabilityConfigurationsInput, ...func(*Options)) (*ListAvailabilityConfigurationsOutput, error) +} + +var _ ListAvailabilityConfigurationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAvailabilityConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListGroupMembers.go b/service/workmail/api_op_ListGroupMembers.go index 0fc77962204..9d09f100134 100644 --- a/service/workmail/api_op_ListGroupMembers.go +++ b/service/workmail/api_op_ListGroupMembers.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListGroupMembersMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupMembersValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListGroupMembersMiddlewares(stack *middleware.Stack return nil } -// ListGroupMembersAPIClient is a client that implements the ListGroupMembers -// operation. -type ListGroupMembersAPIClient interface { - ListGroupMembers(context.Context, *ListGroupMembersInput, ...func(*Options)) (*ListGroupMembersOutput, error) -} - -var _ ListGroupMembersAPIClient = (*Client)(nil) - // ListGroupMembersPaginatorOptions is the paginator options for ListGroupMembers type ListGroupMembersPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -229,6 +224,9 @@ func (p *ListGroupMembersPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupMembers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListGroupMembersPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListGroupMembersAPIClient is a client that implements the ListGroupMembers +// operation. +type ListGroupMembersAPIClient interface { + ListGroupMembers(context.Context, *ListGroupMembersInput, ...func(*Options)) (*ListGroupMembersOutput, error) +} + +var _ ListGroupMembersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupMembers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListGroups.go b/service/workmail/api_op_ListGroups.go index 702f75d90d2..f2cc8bbfd1e 100644 --- a/service/workmail/api_op_ListGroups.go +++ b/service/workmail/api_op_ListGroups.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } -// ListGroupsAPIClient is a client that implements the ListGroups operation. -type ListGroupsAPIClient interface { - ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) -} - -var _ ListGroupsAPIClient = (*Client)(nil) - // ListGroupsPaginatorOptions is the paginator options for ListGroups type ListGroupsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -215,6 +211,9 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Opti return result, nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListGroupsForEntity.go b/service/workmail/api_op_ListGroupsForEntity.go index d1a12f794ce..719d900af17 100644 --- a/service/workmail/api_op_ListGroupsForEntity.go +++ b/service/workmail/api_op_ListGroupsForEntity.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListGroupsForEntityMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListGroupsForEntityValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListGroupsForEntityMiddlewares(stack *middleware.St return nil } -// ListGroupsForEntityAPIClient is a client that implements the -// ListGroupsForEntity operation. -type ListGroupsForEntityAPIClient interface { - ListGroupsForEntity(context.Context, *ListGroupsForEntityInput, ...func(*Options)) (*ListGroupsForEntityOutput, error) -} - -var _ ListGroupsForEntityAPIClient = (*Client)(nil) - // ListGroupsForEntityPaginatorOptions is the paginator options for // ListGroupsForEntity type ListGroupsForEntityPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListGroupsForEntityPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListGroupsForEntity(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListGroupsForEntityPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListGroupsForEntityAPIClient is a client that implements the +// ListGroupsForEntity operation. +type ListGroupsForEntityAPIClient interface { + ListGroupsForEntity(context.Context, *ListGroupsForEntityInput, ...func(*Options)) (*ListGroupsForEntityOutput, error) +} + +var _ ListGroupsForEntityAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListGroupsForEntity(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListImpersonationRoles.go b/service/workmail/api_op_ListImpersonationRoles.go index 9ced3aeb4a6..f5e08df25bf 100644 --- a/service/workmail/api_op_ListImpersonationRoles.go +++ b/service/workmail/api_op_ListImpersonationRoles.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListImpersonationRolesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListImpersonationRolesValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListImpersonationRolesMiddlewares(stack *middleware return nil } -// ListImpersonationRolesAPIClient is a client that implements the -// ListImpersonationRoles operation. -type ListImpersonationRolesAPIClient interface { - ListImpersonationRoles(context.Context, *ListImpersonationRolesInput, ...func(*Options)) (*ListImpersonationRolesOutput, error) -} - -var _ ListImpersonationRolesAPIClient = (*Client)(nil) - // ListImpersonationRolesPaginatorOptions is the paginator options for // ListImpersonationRoles type ListImpersonationRolesPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListImpersonationRolesPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListImpersonationRoles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListImpersonationRolesPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListImpersonationRolesAPIClient is a client that implements the +// ListImpersonationRoles operation. +type ListImpersonationRolesAPIClient interface { + ListImpersonationRoles(context.Context, *ListImpersonationRolesInput, ...func(*Options)) (*ListImpersonationRolesOutput, error) +} + +var _ ListImpersonationRolesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListImpersonationRoles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListMailDomains.go b/service/workmail/api_op_ListMailDomains.go index 0a04c130a4e..e0a59b0b1af 100644 --- a/service/workmail/api_op_ListMailDomains.go +++ b/service/workmail/api_op_ListMailDomains.go @@ -119,6 +119,9 @@ func (c *Client) addOperationListMailDomainsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMailDomainsValidationMiddleware(stack); err != nil { return err } @@ -143,14 +146,6 @@ func (c *Client) addOperationListMailDomainsMiddlewares(stack *middleware.Stack, return nil } -// ListMailDomainsAPIClient is a client that implements the ListMailDomains -// operation. -type ListMailDomainsAPIClient interface { - ListMailDomains(context.Context, *ListMailDomainsInput, ...func(*Options)) (*ListMailDomainsOutput, error) -} - -var _ ListMailDomainsAPIClient = (*Client)(nil) - // ListMailDomainsPaginatorOptions is the paginator options for ListMailDomains type ListMailDomainsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -214,6 +209,9 @@ func (p *ListMailDomainsPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMailDomains(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -233,6 +231,14 @@ func (p *ListMailDomainsPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListMailDomainsAPIClient is a client that implements the ListMailDomains +// operation. +type ListMailDomainsAPIClient interface { + ListMailDomains(context.Context, *ListMailDomainsInput, ...func(*Options)) (*ListMailDomainsOutput, error) +} + +var _ ListMailDomainsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMailDomains(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListMailboxExportJobs.go b/service/workmail/api_op_ListMailboxExportJobs.go index 2ccba4c1b1c..296de4bab52 100644 --- a/service/workmail/api_op_ListMailboxExportJobs.go +++ b/service/workmail/api_op_ListMailboxExportJobs.go @@ -116,6 +116,9 @@ func (c *Client) addOperationListMailboxExportJobsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMailboxExportJobsValidationMiddleware(stack); err != nil { return err } @@ -140,14 +143,6 @@ func (c *Client) addOperationListMailboxExportJobsMiddlewares(stack *middleware. return nil } -// ListMailboxExportJobsAPIClient is a client that implements the -// ListMailboxExportJobs operation. -type ListMailboxExportJobsAPIClient interface { - ListMailboxExportJobs(context.Context, *ListMailboxExportJobsInput, ...func(*Options)) (*ListMailboxExportJobsOutput, error) -} - -var _ ListMailboxExportJobsAPIClient = (*Client)(nil) - // ListMailboxExportJobsPaginatorOptions is the paginator options for // ListMailboxExportJobs type ListMailboxExportJobsPaginatorOptions struct { @@ -212,6 +207,9 @@ func (p *ListMailboxExportJobsPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMailboxExportJobs(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -231,6 +229,14 @@ func (p *ListMailboxExportJobsPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListMailboxExportJobsAPIClient is a client that implements the +// ListMailboxExportJobs operation. +type ListMailboxExportJobsAPIClient interface { + ListMailboxExportJobs(context.Context, *ListMailboxExportJobsInput, ...func(*Options)) (*ListMailboxExportJobsOutput, error) +} + +var _ ListMailboxExportJobsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMailboxExportJobs(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListMailboxPermissions.go b/service/workmail/api_op_ListMailboxPermissions.go index 56035c928fc..bf28551b7df 100644 --- a/service/workmail/api_op_ListMailboxPermissions.go +++ b/service/workmail/api_op_ListMailboxPermissions.go @@ -134,6 +134,9 @@ func (c *Client) addOperationListMailboxPermissionsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMailboxPermissionsValidationMiddleware(stack); err != nil { return err } @@ -158,14 +161,6 @@ func (c *Client) addOperationListMailboxPermissionsMiddlewares(stack *middleware return nil } -// ListMailboxPermissionsAPIClient is a client that implements the -// ListMailboxPermissions operation. -type ListMailboxPermissionsAPIClient interface { - ListMailboxPermissions(context.Context, *ListMailboxPermissionsInput, ...func(*Options)) (*ListMailboxPermissionsOutput, error) -} - -var _ ListMailboxPermissionsAPIClient = (*Client)(nil) - // ListMailboxPermissionsPaginatorOptions is the paginator options for // ListMailboxPermissions type ListMailboxPermissionsPaginatorOptions struct { @@ -230,6 +225,9 @@ func (p *ListMailboxPermissionsPaginator) NextPage(ctx context.Context, optFns . } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMailboxPermissions(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -249,6 +247,14 @@ func (p *ListMailboxPermissionsPaginator) NextPage(ctx context.Context, optFns . return result, nil } +// ListMailboxPermissionsAPIClient is a client that implements the +// ListMailboxPermissions operation. +type ListMailboxPermissionsAPIClient interface { + ListMailboxPermissions(context.Context, *ListMailboxPermissionsInput, ...func(*Options)) (*ListMailboxPermissionsOutput, error) +} + +var _ ListMailboxPermissionsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMailboxPermissions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListMobileDeviceAccessOverrides.go b/service/workmail/api_op_ListMobileDeviceAccessOverrides.go index 2ceb120ac66..87ed739a569 100644 --- a/service/workmail/api_op_ListMobileDeviceAccessOverrides.go +++ b/service/workmail/api_op_ListMobileDeviceAccessOverrides.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListMobileDeviceAccessOverridesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMobileDeviceAccessOverridesValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListMobileDeviceAccessOverridesMiddlewares(stack *m return nil } -// ListMobileDeviceAccessOverridesAPIClient is a client that implements the -// ListMobileDeviceAccessOverrides operation. -type ListMobileDeviceAccessOverridesAPIClient interface { - ListMobileDeviceAccessOverrides(context.Context, *ListMobileDeviceAccessOverridesInput, ...func(*Options)) (*ListMobileDeviceAccessOverridesOutput, error) -} - -var _ ListMobileDeviceAccessOverridesAPIClient = (*Client)(nil) - // ListMobileDeviceAccessOverridesPaginatorOptions is the paginator options for // ListMobileDeviceAccessOverrides type ListMobileDeviceAccessOverridesPaginatorOptions struct { @@ -231,6 +226,9 @@ func (p *ListMobileDeviceAccessOverridesPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListMobileDeviceAccessOverrides(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -250,6 +248,14 @@ func (p *ListMobileDeviceAccessOverridesPaginator) NextPage(ctx context.Context, return result, nil } +// ListMobileDeviceAccessOverridesAPIClient is a client that implements the +// ListMobileDeviceAccessOverrides operation. +type ListMobileDeviceAccessOverridesAPIClient interface { + ListMobileDeviceAccessOverrides(context.Context, *ListMobileDeviceAccessOverridesInput, ...func(*Options)) (*ListMobileDeviceAccessOverridesOutput, error) +} + +var _ ListMobileDeviceAccessOverridesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListMobileDeviceAccessOverrides(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListMobileDeviceAccessRules.go b/service/workmail/api_op_ListMobileDeviceAccessRules.go index 8425b34fe43..12ebe329c53 100644 --- a/service/workmail/api_op_ListMobileDeviceAccessRules.go +++ b/service/workmail/api_op_ListMobileDeviceAccessRules.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListMobileDeviceAccessRulesMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListMobileDeviceAccessRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_ListOrganizations.go b/service/workmail/api_op_ListOrganizations.go index 19646dd17c9..cb4e7252d9b 100644 --- a/service/workmail/api_op_ListOrganizations.go +++ b/service/workmail/api_op_ListOrganizations.go @@ -113,6 +113,9 @@ func (c *Client) addOperationListOrganizationsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizations(options.Region), middleware.Before); err != nil { return err } @@ -134,14 +137,6 @@ func (c *Client) addOperationListOrganizationsMiddlewares(stack *middleware.Stac return nil } -// ListOrganizationsAPIClient is a client that implements the ListOrganizations -// operation. -type ListOrganizationsAPIClient interface { - ListOrganizations(context.Context, *ListOrganizationsInput, ...func(*Options)) (*ListOrganizationsOutput, error) -} - -var _ ListOrganizationsAPIClient = (*Client)(nil) - // ListOrganizationsPaginatorOptions is the paginator options for ListOrganizations type ListOrganizationsPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -205,6 +200,9 @@ func (p *ListOrganizationsPaginator) NextPage(ctx context.Context, optFns ...fun } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListOrganizations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListOrganizationsPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// ListOrganizationsAPIClient is a client that implements the ListOrganizations +// operation. +type ListOrganizationsAPIClient interface { + ListOrganizations(context.Context, *ListOrganizationsInput, ...func(*Options)) (*ListOrganizationsOutput, error) +} + +var _ ListOrganizationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListOrganizations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListResourceDelegates.go b/service/workmail/api_op_ListResourceDelegates.go index cd8dda80087..1ecad71cfcd 100644 --- a/service/workmail/api_op_ListResourceDelegates.go +++ b/service/workmail/api_op_ListResourceDelegates.go @@ -133,6 +133,9 @@ func (c *Client) addOperationListResourceDelegatesMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourceDelegatesValidationMiddleware(stack); err != nil { return err } @@ -157,14 +160,6 @@ func (c *Client) addOperationListResourceDelegatesMiddlewares(stack *middleware. return nil } -// ListResourceDelegatesAPIClient is a client that implements the -// ListResourceDelegates operation. -type ListResourceDelegatesAPIClient interface { - ListResourceDelegates(context.Context, *ListResourceDelegatesInput, ...func(*Options)) (*ListResourceDelegatesOutput, error) -} - -var _ ListResourceDelegatesAPIClient = (*Client)(nil) - // ListResourceDelegatesPaginatorOptions is the paginator options for // ListResourceDelegates type ListResourceDelegatesPaginatorOptions struct { @@ -229,6 +224,9 @@ func (p *ListResourceDelegatesPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourceDelegates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -248,6 +246,14 @@ func (p *ListResourceDelegatesPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListResourceDelegatesAPIClient is a client that implements the +// ListResourceDelegates operation. +type ListResourceDelegatesAPIClient interface { + ListResourceDelegates(context.Context, *ListResourceDelegatesInput, ...func(*Options)) (*ListResourceDelegatesOutput, error) +} + +var _ ListResourceDelegatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourceDelegates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListResources.go b/service/workmail/api_op_ListResources.go index d85b91437fb..9a576019ab7 100644 --- a/service/workmail/api_op_ListResources.go +++ b/service/workmail/api_op_ListResources.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListResourcesValidationMiddleware(stack); err != nil { return err } @@ -146,13 +149,6 @@ func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, o return nil } -// ListResourcesAPIClient is a client that implements the ListResources operation. -type ListResourcesAPIClient interface { - ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) -} - -var _ ListResourcesAPIClient = (*Client)(nil) - // ListResourcesPaginatorOptions is the paginator options for ListResources type ListResourcesPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -216,6 +212,9 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResources(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +234,13 @@ func (p *ListResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// ListResourcesAPIClient is a client that implements the ListResources operation. +type ListResourcesAPIClient interface { + ListResources(context.Context, *ListResourcesInput, ...func(*Options)) (*ListResourcesOutput, error) +} + +var _ ListResourcesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResources(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_ListTagsForResource.go b/service/workmail/api_op_ListTagsForResource.go index 87049e336a5..8eaf43984bb 100644 --- a/service/workmail/api_op_ListTagsForResource.go +++ b/service/workmail/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_ListUsers.go b/service/workmail/api_op_ListUsers.go index 27fe2fcef45..ffe5bb833c2 100644 --- a/service/workmail/api_op_ListUsers.go +++ b/service/workmail/api_op_ListUsers.go @@ -121,6 +121,9 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListUsersValidationMiddleware(stack); err != nil { return err } @@ -145,13 +148,6 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } -// ListUsersAPIClient is a client that implements the ListUsers operation. -type ListUsersAPIClient interface { - ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) -} - -var _ ListUsersAPIClient = (*Client)(nil) - // ListUsersPaginatorOptions is the paginator options for ListUsers type ListUsersPaginatorOptions struct { // The maximum number of results to return in a single call. @@ -215,6 +211,9 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUsers(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -234,6 +233,13 @@ func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workmail/api_op_PutAccessControlRule.go b/service/workmail/api_op_PutAccessControlRule.go index a17d5a3dfcd..b0904f52ab6 100644 --- a/service/workmail/api_op_PutAccessControlRule.go +++ b/service/workmail/api_op_PutAccessControlRule.go @@ -146,6 +146,9 @@ func (c *Client) addOperationPutAccessControlRuleMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutAccessControlRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_PutEmailMonitoringConfiguration.go b/service/workmail/api_op_PutEmailMonitoringConfiguration.go index a7ce7ea602e..942ce4a4a30 100644 --- a/service/workmail/api_op_PutEmailMonitoringConfiguration.go +++ b/service/workmail/api_op_PutEmailMonitoringConfiguration.go @@ -114,6 +114,9 @@ func (c *Client) addOperationPutEmailMonitoringConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEmailMonitoringConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_PutInboundDmarcSettings.go b/service/workmail/api_op_PutInboundDmarcSettings.go index 78cc24e77b9..13acfd8397f 100644 --- a/service/workmail/api_op_PutInboundDmarcSettings.go +++ b/service/workmail/api_op_PutInboundDmarcSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationPutInboundDmarcSettingsMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutInboundDmarcSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_PutMailboxPermissions.go b/service/workmail/api_op_PutMailboxPermissions.go index a78126e5d6c..f2d01f70d2c 100644 --- a/service/workmail/api_op_PutMailboxPermissions.go +++ b/service/workmail/api_op_PutMailboxPermissions.go @@ -147,6 +147,9 @@ func (c *Client) addOperationPutMailboxPermissionsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMailboxPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_PutMobileDeviceAccessOverride.go b/service/workmail/api_op_PutMobileDeviceAccessOverride.go index 44f95ca8fea..e40d05e7b4d 100644 --- a/service/workmail/api_op_PutMobileDeviceAccessOverride.go +++ b/service/workmail/api_op_PutMobileDeviceAccessOverride.go @@ -130,6 +130,9 @@ func (c *Client) addOperationPutMobileDeviceAccessOverrideMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutMobileDeviceAccessOverrideValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_PutRetentionPolicy.go b/service/workmail/api_op_PutRetentionPolicy.go index cebcde7e443..31c92ce643a 100644 --- a/service/workmail/api_op_PutRetentionPolicy.go +++ b/service/workmail/api_op_PutRetentionPolicy.go @@ -118,6 +118,9 @@ func (c *Client) addOperationPutRetentionPolicyMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRetentionPolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_RegisterMailDomain.go b/service/workmail/api_op_RegisterMailDomain.go index 3027e9f5c20..b39ab7a1d3f 100644 --- a/service/workmail/api_op_RegisterMailDomain.go +++ b/service/workmail/api_op_RegisterMailDomain.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRegisterMailDomainMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opRegisterMailDomainMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_RegisterToWorkMail.go b/service/workmail/api_op_RegisterToWorkMail.go index c72faed7d3d..95c96f2b0fd 100644 --- a/service/workmail/api_op_RegisterToWorkMail.go +++ b/service/workmail/api_op_RegisterToWorkMail.go @@ -131,6 +131,9 @@ func (c *Client) addOperationRegisterToWorkMailMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterToWorkMailValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_ResetPassword.go b/service/workmail/api_op_ResetPassword.go index 638a7c29c9b..29c9af345c8 100644 --- a/service/workmail/api_op_ResetPassword.go +++ b/service/workmail/api_op_ResetPassword.go @@ -112,6 +112,9 @@ func (c *Client) addOperationResetPasswordMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpResetPasswordValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_StartMailboxExportJob.go b/service/workmail/api_op_StartMailboxExportJob.go index 1074b92479f..d6fac6710f9 100644 --- a/service/workmail/api_op_StartMailboxExportJob.go +++ b/service/workmail/api_op_StartMailboxExportJob.go @@ -156,6 +156,9 @@ func (c *Client) addOperationStartMailboxExportJobMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opStartMailboxExportJobMiddleware(stack, options); err != nil { return err } diff --git a/service/workmail/api_op_TagResource.go b/service/workmail/api_op_TagResource.go index aeb22b905d8..7ce809a2817 100644 --- a/service/workmail/api_op_TagResource.go +++ b/service/workmail/api_op_TagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_TestAvailabilityConfiguration.go b/service/workmail/api_op_TestAvailabilityConfiguration.go index 889de45c2a9..ccad033e795 100644 --- a/service/workmail/api_op_TestAvailabilityConfiguration.go +++ b/service/workmail/api_op_TestAvailabilityConfiguration.go @@ -129,6 +129,9 @@ func (c *Client) addOperationTestAvailabilityConfigurationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTestAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UntagResource.go b/service/workmail/api_op_UntagResource.go index 50de6b57edf..c0353cdc6c7 100644 --- a/service/workmail/api_op_UntagResource.go +++ b/service/workmail/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateAvailabilityConfiguration.go b/service/workmail/api_op_UpdateAvailabilityConfiguration.go index e8e917b7cdf..abd7d50aa6f 100644 --- a/service/workmail/api_op_UpdateAvailabilityConfiguration.go +++ b/service/workmail/api_op_UpdateAvailabilityConfiguration.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateAvailabilityConfigurationMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateAvailabilityConfigurationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateDefaultMailDomain.go b/service/workmail/api_op_UpdateDefaultMailDomain.go index 2d875cc093a..a04bb21c329 100644 --- a/service/workmail/api_op_UpdateDefaultMailDomain.go +++ b/service/workmail/api_op_UpdateDefaultMailDomain.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateDefaultMailDomainMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateDefaultMailDomainValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateGroup.go b/service/workmail/api_op_UpdateGroup.go index 1dbffd3e61b..44142decc2f 100644 --- a/service/workmail/api_op_UpdateGroup.go +++ b/service/workmail/api_op_UpdateGroup.go @@ -119,6 +119,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateImpersonationRole.go b/service/workmail/api_op_UpdateImpersonationRole.go index d6f73eddceb..cb070d79998 100644 --- a/service/workmail/api_op_UpdateImpersonationRole.go +++ b/service/workmail/api_op_UpdateImpersonationRole.go @@ -125,6 +125,9 @@ func (c *Client) addOperationUpdateImpersonationRoleMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateImpersonationRoleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateMailboxQuota.go b/service/workmail/api_op_UpdateMailboxQuota.go index e9320b65277..dd7d3e53d6c 100644 --- a/service/workmail/api_op_UpdateMailboxQuota.go +++ b/service/workmail/api_op_UpdateMailboxQuota.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateMailboxQuotaMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMailboxQuotaValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateMobileDeviceAccessRule.go b/service/workmail/api_op_UpdateMobileDeviceAccessRule.go index f7b0746fde5..4f90933808d 100644 --- a/service/workmail/api_op_UpdateMobileDeviceAccessRule.go +++ b/service/workmail/api_op_UpdateMobileDeviceAccessRule.go @@ -148,6 +148,9 @@ func (c *Client) addOperationUpdateMobileDeviceAccessRuleMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateMobileDeviceAccessRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdatePrimaryEmailAddress.go b/service/workmail/api_op_UpdatePrimaryEmailAddress.go index 5ae0754d2d9..518a578c458 100644 --- a/service/workmail/api_op_UpdatePrimaryEmailAddress.go +++ b/service/workmail/api_op_UpdatePrimaryEmailAddress.go @@ -126,6 +126,9 @@ func (c *Client) addOperationUpdatePrimaryEmailAddressMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePrimaryEmailAddressValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateResource.go b/service/workmail/api_op_UpdateResource.go index 1ccb309f63f..de2cea0ea83 100644 --- a/service/workmail/api_op_UpdateResource.go +++ b/service/workmail/api_op_UpdateResource.go @@ -134,6 +134,9 @@ func (c *Client) addOperationUpdateResourceMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmail/api_op_UpdateUser.go b/service/workmail/api_op_UpdateUser.go index 75a53e7ed1c..23cd179eb1f 100644 --- a/service/workmail/api_op_UpdateUser.go +++ b/service/workmail/api_op_UpdateUser.go @@ -166,6 +166,9 @@ func (c *Client) addOperationUpdateUserMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateUserValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmailmessageflow/api_client.go b/service/workmailmessageflow/api_client.go index fa63e2db47a..975fef5523a 100644 --- a/service/workmailmessageflow/api_client.go +++ b/service/workmailmessageflow/api_client.go @@ -451,6 +451,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -536,6 +560,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/workmailmessageflow/api_op_GetRawMessageContent.go b/service/workmailmessageflow/api_op_GetRawMessageContent.go index a818977a292..89de02c0545 100644 --- a/service/workmailmessageflow/api_op_GetRawMessageContent.go +++ b/service/workmailmessageflow/api_op_GetRawMessageContent.go @@ -105,6 +105,9 @@ func (c *Client) addOperationGetRawMessageContentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetRawMessageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workmailmessageflow/api_op_PutRawMessageContent.go b/service/workmailmessageflow/api_op_PutRawMessageContent.go index 27937a7f2fc..d194e286188 100644 --- a/service/workmailmessageflow/api_op_PutRawMessageContent.go +++ b/service/workmailmessageflow/api_op_PutRawMessageContent.go @@ -119,6 +119,9 @@ func (c *Client) addOperationPutRawMessageContentMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutRawMessageContentValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_client.go b/service/workspaces/api_client.go index 726c9d5b7d3..cc80ef80500 100644 --- a/service/workspaces/api_client.go +++ b/service/workspaces/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/workspaces/api_op_AcceptAccountLinkInvitation.go b/service/workspaces/api_op_AcceptAccountLinkInvitation.go index a6bc459fb96..265c764bbd1 100644 --- a/service/workspaces/api_op_AcceptAccountLinkInvitation.go +++ b/service/workspaces/api_op_AcceptAccountLinkInvitation.go @@ -113,6 +113,9 @@ func (c *Client) addOperationAcceptAccountLinkInvitationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAcceptAccountLinkInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_AssociateConnectionAlias.go b/service/workspaces/api_op_AssociateConnectionAlias.go index 7c434aa7799..af3709b4ff5 100644 --- a/service/workspaces/api_op_AssociateConnectionAlias.go +++ b/service/workspaces/api_op_AssociateConnectionAlias.go @@ -119,6 +119,9 @@ func (c *Client) addOperationAssociateConnectionAliasMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateConnectionAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_AssociateIpGroups.go b/service/workspaces/api_op_AssociateIpGroups.go index bf3fca367c1..73d40ca9c78 100644 --- a/service/workspaces/api_op_AssociateIpGroups.go +++ b/service/workspaces/api_op_AssociateIpGroups.go @@ -106,6 +106,9 @@ func (c *Client) addOperationAssociateIpGroupsMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateIpGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_AssociateWorkspaceApplication.go b/service/workspaces/api_op_AssociateWorkspaceApplication.go index eac8387e826..88d97844579 100644 --- a/service/workspaces/api_op_AssociateWorkspaceApplication.go +++ b/service/workspaces/api_op_AssociateWorkspaceApplication.go @@ -112,6 +112,9 @@ func (c *Client) addOperationAssociateWorkspaceApplicationMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateWorkspaceApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_AuthorizeIpRules.go b/service/workspaces/api_op_AuthorizeIpRules.go index 8d83db8652d..c3ed9a101c4 100644 --- a/service/workspaces/api_op_AuthorizeIpRules.go +++ b/service/workspaces/api_op_AuthorizeIpRules.go @@ -110,6 +110,9 @@ func (c *Client) addOperationAuthorizeIpRulesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAuthorizeIpRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CopyWorkspaceImage.go b/service/workspaces/api_op_CopyWorkspaceImage.go index e194300a626..5e189695e9c 100644 --- a/service/workspaces/api_op_CopyWorkspaceImage.go +++ b/service/workspaces/api_op_CopyWorkspaceImage.go @@ -137,6 +137,9 @@ func (c *Client) addOperationCopyWorkspaceImageMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCopyWorkspaceImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateAccountLinkInvitation.go b/service/workspaces/api_op_CreateAccountLinkInvitation.go index 1c87d76f66d..0b1d06f893c 100644 --- a/service/workspaces/api_op_CreateAccountLinkInvitation.go +++ b/service/workspaces/api_op_CreateAccountLinkInvitation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationCreateAccountLinkInvitationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateAccountLinkInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateConnectClientAddIn.go b/service/workspaces/api_op_CreateConnectClientAddIn.go index 7bb47e69997..39ace294c70 100644 --- a/service/workspaces/api_op_CreateConnectClientAddIn.go +++ b/service/workspaces/api_op_CreateConnectClientAddIn.go @@ -119,6 +119,9 @@ func (c *Client) addOperationCreateConnectClientAddInMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectClientAddInValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateConnectionAlias.go b/service/workspaces/api_op_CreateConnectionAlias.go index 99bf9fe13bf..cf3aaa503f2 100644 --- a/service/workspaces/api_op_CreateConnectionAlias.go +++ b/service/workspaces/api_op_CreateConnectionAlias.go @@ -118,6 +118,9 @@ func (c *Client) addOperationCreateConnectionAliasMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateConnectionAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateIpGroup.go b/service/workspaces/api_op_CreateIpGroup.go index 00ed1d6935b..4f9d32c673c 100644 --- a/service/workspaces/api_op_CreateIpGroup.go +++ b/service/workspaces/api_op_CreateIpGroup.go @@ -127,6 +127,9 @@ func (c *Client) addOperationCreateIpGroupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateIpGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateStandbyWorkspaces.go b/service/workspaces/api_op_CreateStandbyWorkspaces.go index 115e020b11b..df9d15507f8 100644 --- a/service/workspaces/api_op_CreateStandbyWorkspaces.go +++ b/service/workspaces/api_op_CreateStandbyWorkspaces.go @@ -114,6 +114,9 @@ func (c *Client) addOperationCreateStandbyWorkspacesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateStandbyWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateTags.go b/service/workspaces/api_op_CreateTags.go index d4f4322fa61..7dfc47bc953 100644 --- a/service/workspaces/api_op_CreateTags.go +++ b/service/workspaces/api_op_CreateTags.go @@ -109,6 +109,9 @@ func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go b/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go index bcd987ce86a..1f44d0cd00b 100644 --- a/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go +++ b/service/workspaces/api_op_CreateUpdatedWorkspaceImage.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateUpdatedWorkspaceImageMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateUpdatedWorkspaceImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateWorkspaceBundle.go b/service/workspaces/api_op_CreateWorkspaceBundle.go index a3810174c71..1dc8aad419d 100644 --- a/service/workspaces/api_op_CreateWorkspaceBundle.go +++ b/service/workspaces/api_op_CreateWorkspaceBundle.go @@ -139,6 +139,9 @@ func (c *Client) addOperationCreateWorkspaceBundleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkspaceBundleValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateWorkspaceImage.go b/service/workspaces/api_op_CreateWorkspaceImage.go index 5c05a97fd1a..917125c971c 100644 --- a/service/workspaces/api_op_CreateWorkspaceImage.go +++ b/service/workspaces/api_op_CreateWorkspaceImage.go @@ -147,6 +147,9 @@ func (c *Client) addOperationCreateWorkspaceImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkspaceImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_CreateWorkspaces.go b/service/workspaces/api_op_CreateWorkspaces.go index 06a2c7c9483..e240deace56 100644 --- a/service/workspaces/api_op_CreateWorkspaces.go +++ b/service/workspaces/api_op_CreateWorkspaces.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateWorkspacesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteAccountLinkInvitation.go b/service/workspaces/api_op_DeleteAccountLinkInvitation.go index 8d428aa5339..07f4f2a6c48 100644 --- a/service/workspaces/api_op_DeleteAccountLinkInvitation.go +++ b/service/workspaces/api_op_DeleteAccountLinkInvitation.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDeleteAccountLinkInvitationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteAccountLinkInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteClientBranding.go b/service/workspaces/api_op_DeleteClientBranding.go index d4579e3e5a3..3358eeb4b4d 100644 --- a/service/workspaces/api_op_DeleteClientBranding.go +++ b/service/workspaces/api_op_DeleteClientBranding.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteClientBrandingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteClientBrandingValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteConnectClientAddIn.go b/service/workspaces/api_op_DeleteConnectClientAddIn.go index b928f72cfed..693212f2ae5 100644 --- a/service/workspaces/api_op_DeleteConnectClientAddIn.go +++ b/service/workspaces/api_op_DeleteConnectClientAddIn.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteConnectClientAddInMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectClientAddInValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteConnectionAlias.go b/service/workspaces/api_op_DeleteConnectionAlias.go index 6257cb46feb..4a62c429222 100644 --- a/service/workspaces/api_op_DeleteConnectionAlias.go +++ b/service/workspaces/api_op_DeleteConnectionAlias.go @@ -114,6 +114,9 @@ func (c *Client) addOperationDeleteConnectionAliasMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteConnectionAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteIpGroup.go b/service/workspaces/api_op_DeleteIpGroup.go index e40366409c6..0425ee66983 100644 --- a/service/workspaces/api_op_DeleteIpGroup.go +++ b/service/workspaces/api_op_DeleteIpGroup.go @@ -104,6 +104,9 @@ func (c *Client) addOperationDeleteIpGroupMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIpGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteTags.go b/service/workspaces/api_op_DeleteTags.go index 05c4df1956b..296bb0dbf15 100644 --- a/service/workspaces/api_op_DeleteTags.go +++ b/service/workspaces/api_op_DeleteTags.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteWorkspaceBundle.go b/service/workspaces/api_op_DeleteWorkspaceBundle.go index b5e514d60b0..de5c903f521 100644 --- a/service/workspaces/api_op_DeleteWorkspaceBundle.go +++ b/service/workspaces/api_op_DeleteWorkspaceBundle.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteWorkspaceBundleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteWorkspaceBundle(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DeleteWorkspaceImage.go b/service/workspaces/api_op_DeleteWorkspaceImage.go index 8249a038f2c..56a38ffadf3 100644 --- a/service/workspaces/api_op_DeleteWorkspaceImage.go +++ b/service/workspaces/api_op_DeleteWorkspaceImage.go @@ -103,6 +103,9 @@ func (c *Client) addOperationDeleteWorkspaceImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteWorkspaceImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeployWorkspaceApplications.go b/service/workspaces/api_op_DeployWorkspaceApplications.go index 739d8ab66e5..f0c0ec9e471 100644 --- a/service/workspaces/api_op_DeployWorkspaceApplications.go +++ b/service/workspaces/api_op_DeployWorkspaceApplications.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDeployWorkspaceApplicationsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeployWorkspaceApplicationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DeregisterWorkspaceDirectory.go b/service/workspaces/api_op_DeregisterWorkspaceDirectory.go index 7b88d9404b9..24c80fa50b3 100644 --- a/service/workspaces/api_op_DeregisterWorkspaceDirectory.go +++ b/service/workspaces/api_op_DeregisterWorkspaceDirectory.go @@ -118,6 +118,9 @@ func (c *Client) addOperationDeregisterWorkspaceDirectoryMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeregisterWorkspaceDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeAccount.go b/service/workspaces/api_op_DescribeAccount.go index 77f062ac2e3..a946293ed7e 100644 --- a/service/workspaces/api_op_DescribeAccount.go +++ b/service/workspaces/api_op_DescribeAccount.go @@ -113,6 +113,9 @@ func (c *Client) addOperationDescribeAccountMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeAccountModifications.go b/service/workspaces/api_op_DescribeAccountModifications.go index 3a1c61d4ab3..88cc7f4af4e 100644 --- a/service/workspaces/api_op_DescribeAccountModifications.go +++ b/service/workspaces/api_op_DescribeAccountModifications.go @@ -110,6 +110,9 @@ func (c *Client) addOperationDescribeAccountModificationsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountModifications(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeApplicationAssociations.go b/service/workspaces/api_op_DescribeApplicationAssociations.go index 7e80eb16101..7639799ac15 100644 --- a/service/workspaces/api_op_DescribeApplicationAssociations.go +++ b/service/workspaces/api_op_DescribeApplicationAssociations.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeApplicationAssociationsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeApplicationAssociationsValidationMiddleware(stack); err != nil { return err } @@ -147,14 +150,6 @@ func (c *Client) addOperationDescribeApplicationAssociationsMiddlewares(stack *m return nil } -// DescribeApplicationAssociationsAPIClient is a client that implements the -// DescribeApplicationAssociations operation. -type DescribeApplicationAssociationsAPIClient interface { - DescribeApplicationAssociations(context.Context, *DescribeApplicationAssociationsInput, ...func(*Options)) (*DescribeApplicationAssociationsOutput, error) -} - -var _ DescribeApplicationAssociationsAPIClient = (*Client)(nil) - // DescribeApplicationAssociationsPaginatorOptions is the paginator options for // DescribeApplicationAssociations type DescribeApplicationAssociationsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeApplicationAssociationsPaginator) NextPage(ctx context.Context, } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeApplicationAssociations(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeApplicationAssociationsPaginator) NextPage(ctx context.Context, return result, nil } +// DescribeApplicationAssociationsAPIClient is a client that implements the +// DescribeApplicationAssociations operation. +type DescribeApplicationAssociationsAPIClient interface { + DescribeApplicationAssociations(context.Context, *DescribeApplicationAssociationsInput, ...func(*Options)) (*DescribeApplicationAssociationsOutput, error) +} + +var _ DescribeApplicationAssociationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeApplicationAssociations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspaces/api_op_DescribeApplications.go b/service/workspaces/api_op_DescribeApplications.go index 63b9d0eaa23..b5a99528a0d 100644 --- a/service/workspaces/api_op_DescribeApplications.go +++ b/service/workspaces/api_op_DescribeApplications.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeApplicationsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplications(options.Region), middleware.Before); err != nil { return err } @@ -149,14 +152,6 @@ func (c *Client) addOperationDescribeApplicationsMiddlewares(stack *middleware.S return nil } -// DescribeApplicationsAPIClient is a client that implements the -// DescribeApplications operation. -type DescribeApplicationsAPIClient interface { - DescribeApplications(context.Context, *DescribeApplicationsInput, ...func(*Options)) (*DescribeApplicationsOutput, error) -} - -var _ DescribeApplicationsAPIClient = (*Client)(nil) - // DescribeApplicationsPaginatorOptions is the paginator options for // DescribeApplications type DescribeApplicationsPaginatorOptions struct { @@ -221,6 +216,9 @@ func (p *DescribeApplicationsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeApplications(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -240,6 +238,14 @@ func (p *DescribeApplicationsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// DescribeApplicationsAPIClient is a client that implements the +// DescribeApplications operation. +type DescribeApplicationsAPIClient interface { + DescribeApplications(context.Context, *DescribeApplicationsInput, ...func(*Options)) (*DescribeApplicationsOutput, error) +} + +var _ DescribeApplicationsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspaces/api_op_DescribeBundleAssociations.go b/service/workspaces/api_op_DescribeBundleAssociations.go index 1841b0db4b9..e0bab2baaea 100644 --- a/service/workspaces/api_op_DescribeBundleAssociations.go +++ b/service/workspaces/api_op_DescribeBundleAssociations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeBundleAssociationsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeBundleAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeClientBranding.go b/service/workspaces/api_op_DescribeClientBranding.go index d49580562c3..abc611fb68f 100644 --- a/service/workspaces/api_op_DescribeClientBranding.go +++ b/service/workspaces/api_op_DescribeClientBranding.go @@ -128,6 +128,9 @@ func (c *Client) addOperationDescribeClientBrandingMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientBrandingValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeClientProperties.go b/service/workspaces/api_op_DescribeClientProperties.go index 10cc298c14a..6818974d190 100644 --- a/service/workspaces/api_op_DescribeClientProperties.go +++ b/service/workspaces/api_op_DescribeClientProperties.go @@ -106,6 +106,9 @@ func (c *Client) addOperationDescribeClientPropertiesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeClientPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeConnectClientAddIns.go b/service/workspaces/api_op_DescribeConnectClientAddIns.go index b69b8dbddbe..427736ebe73 100644 --- a/service/workspaces/api_op_DescribeConnectClientAddIns.go +++ b/service/workspaces/api_op_DescribeConnectClientAddIns.go @@ -117,6 +117,9 @@ func (c *Client) addOperationDescribeConnectClientAddInsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectClientAddInsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeConnectionAliasPermissions.go b/service/workspaces/api_op_DescribeConnectionAliasPermissions.go index d1d7a5c3d74..f059c05bea3 100644 --- a/service/workspaces/api_op_DescribeConnectionAliasPermissions.go +++ b/service/workspaces/api_op_DescribeConnectionAliasPermissions.go @@ -124,6 +124,9 @@ func (c *Client) addOperationDescribeConnectionAliasPermissionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeConnectionAliasPermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeConnectionAliases.go b/service/workspaces/api_op_DescribeConnectionAliases.go index 0ee0bf068a1..a3c48dd90a9 100644 --- a/service/workspaces/api_op_DescribeConnectionAliases.go +++ b/service/workspaces/api_op_DescribeConnectionAliases.go @@ -121,6 +121,9 @@ func (c *Client) addOperationDescribeConnectionAliasesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConnectionAliases(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeImageAssociations.go b/service/workspaces/api_op_DescribeImageAssociations.go index 6393bdedd91..17d1bd7be6b 100644 --- a/service/workspaces/api_op_DescribeImageAssociations.go +++ b/service/workspaces/api_op_DescribeImageAssociations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeImageAssociationsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeImageAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeIpGroups.go b/service/workspaces/api_op_DescribeIpGroups.go index ee456c0ac8c..bcea1628654 100644 --- a/service/workspaces/api_op_DescribeIpGroups.go +++ b/service/workspaces/api_op_DescribeIpGroups.go @@ -115,6 +115,9 @@ func (c *Client) addOperationDescribeIpGroupsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpGroups(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeTags.go b/service/workspaces/api_op_DescribeTags.go index adcebb2daa5..f79dc20d9e4 100644 --- a/service/workspaces/api_op_DescribeTags.go +++ b/service/workspaces/api_op_DescribeTags.go @@ -108,6 +108,9 @@ func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeWorkspaceAssociations.go b/service/workspaces/api_op_DescribeWorkspaceAssociations.go index c4f2cc0da3d..5a920a25dc5 100644 --- a/service/workspaces/api_op_DescribeWorkspaceAssociations.go +++ b/service/workspaces/api_op_DescribeWorkspaceAssociations.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeWorkspaceAssociationsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceAssociationsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeWorkspaceBundles.go b/service/workspaces/api_op_DescribeWorkspaceBundles.go index 7689d3625c3..64829a980bc 100644 --- a/service/workspaces/api_op_DescribeWorkspaceBundles.go +++ b/service/workspaces/api_op_DescribeWorkspaceBundles.go @@ -123,6 +123,9 @@ func (c *Client) addOperationDescribeWorkspaceBundlesMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaceBundles(options.Region), middleware.Before); err != nil { return err } @@ -144,14 +147,6 @@ func (c *Client) addOperationDescribeWorkspaceBundlesMiddlewares(stack *middlewa return nil } -// DescribeWorkspaceBundlesAPIClient is a client that implements the -// DescribeWorkspaceBundles operation. -type DescribeWorkspaceBundlesAPIClient interface { - DescribeWorkspaceBundles(context.Context, *DescribeWorkspaceBundlesInput, ...func(*Options)) (*DescribeWorkspaceBundlesOutput, error) -} - -var _ DescribeWorkspaceBundlesAPIClient = (*Client)(nil) - // DescribeWorkspaceBundlesPaginatorOptions is the paginator options for // DescribeWorkspaceBundles type DescribeWorkspaceBundlesPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *DescribeWorkspaceBundlesPaginator) NextPage(ctx context.Context, optFns params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeWorkspaceBundles(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *DescribeWorkspaceBundlesPaginator) NextPage(ctx context.Context, optFns return result, nil } +// DescribeWorkspaceBundlesAPIClient is a client that implements the +// DescribeWorkspaceBundles operation. +type DescribeWorkspaceBundlesAPIClient interface { + DescribeWorkspaceBundles(context.Context, *DescribeWorkspaceBundlesInput, ...func(*Options)) (*DescribeWorkspaceBundlesOutput, error) +} + +var _ DescribeWorkspaceBundlesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeWorkspaceBundles(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspaces/api_op_DescribeWorkspaceDirectories.go b/service/workspaces/api_op_DescribeWorkspaceDirectories.go index 7e1668b68f5..886a092dfe2 100644 --- a/service/workspaces/api_op_DescribeWorkspaceDirectories.go +++ b/service/workspaces/api_op_DescribeWorkspaceDirectories.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDescribeWorkspaceDirectoriesMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaceDirectories(options.Region), middleware.Before); err != nil { return err } @@ -137,14 +140,6 @@ func (c *Client) addOperationDescribeWorkspaceDirectoriesMiddlewares(stack *midd return nil } -// DescribeWorkspaceDirectoriesAPIClient is a client that implements the -// DescribeWorkspaceDirectories operation. -type DescribeWorkspaceDirectoriesAPIClient interface { - DescribeWorkspaceDirectories(context.Context, *DescribeWorkspaceDirectoriesInput, ...func(*Options)) (*DescribeWorkspaceDirectoriesOutput, error) -} - -var _ DescribeWorkspaceDirectoriesAPIClient = (*Client)(nil) - // DescribeWorkspaceDirectoriesPaginatorOptions is the paginator options for // DescribeWorkspaceDirectories type DescribeWorkspaceDirectoriesPaginatorOptions struct { @@ -199,6 +194,9 @@ func (p *DescribeWorkspaceDirectoriesPaginator) NextPage(ctx context.Context, op params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeWorkspaceDirectories(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -218,6 +216,14 @@ func (p *DescribeWorkspaceDirectoriesPaginator) NextPage(ctx context.Context, op return result, nil } +// DescribeWorkspaceDirectoriesAPIClient is a client that implements the +// DescribeWorkspaceDirectories operation. +type DescribeWorkspaceDirectoriesAPIClient interface { + DescribeWorkspaceDirectories(context.Context, *DescribeWorkspaceDirectoriesInput, ...func(*Options)) (*DescribeWorkspaceDirectoriesOutput, error) +} + +var _ DescribeWorkspaceDirectoriesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeWorkspaceDirectories(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspaces/api_op_DescribeWorkspaceImagePermissions.go b/service/workspaces/api_op_DescribeWorkspaceImagePermissions.go index 2c01dc5e12e..1623a6c1ccf 100644 --- a/service/workspaces/api_op_DescribeWorkspaceImagePermissions.go +++ b/service/workspaces/api_op_DescribeWorkspaceImagePermissions.go @@ -122,6 +122,9 @@ func (c *Client) addOperationDescribeWorkspaceImagePermissionsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceImagePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeWorkspaceImages.go b/service/workspaces/api_op_DescribeWorkspaceImages.go index a9e26be9016..8f9ba812d6d 100644 --- a/service/workspaces/api_op_DescribeWorkspaceImages.go +++ b/service/workspaces/api_op_DescribeWorkspaceImages.go @@ -119,6 +119,9 @@ func (c *Client) addOperationDescribeWorkspaceImagesMiddlewares(stack *middlewar if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaceImages(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeWorkspaceSnapshots.go b/service/workspaces/api_op_DescribeWorkspaceSnapshots.go index b281bd18b94..d8be6156ef3 100644 --- a/service/workspaces/api_op_DescribeWorkspaceSnapshots.go +++ b/service/workspaces/api_op_DescribeWorkspaceSnapshots.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDescribeWorkspaceSnapshotsMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDescribeWorkspaceSnapshotsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DescribeWorkspaces.go b/service/workspaces/api_op_DescribeWorkspaces.go index 58b073a9b09..e0c85cb2942 100644 --- a/service/workspaces/api_op_DescribeWorkspaces.go +++ b/service/workspaces/api_op_DescribeWorkspaces.go @@ -142,6 +142,9 @@ func (c *Client) addOperationDescribeWorkspacesMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspaces(options.Region), middleware.Before); err != nil { return err } @@ -163,14 +166,6 @@ func (c *Client) addOperationDescribeWorkspacesMiddlewares(stack *middleware.Sta return nil } -// DescribeWorkspacesAPIClient is a client that implements the DescribeWorkspaces -// operation. -type DescribeWorkspacesAPIClient interface { - DescribeWorkspaces(context.Context, *DescribeWorkspacesInput, ...func(*Options)) (*DescribeWorkspacesOutput, error) -} - -var _ DescribeWorkspacesAPIClient = (*Client)(nil) - // DescribeWorkspacesPaginatorOptions is the paginator options for // DescribeWorkspaces type DescribeWorkspacesPaginatorOptions struct { @@ -235,6 +230,9 @@ func (p *DescribeWorkspacesPaginator) NextPage(ctx context.Context, optFns ...fu } params.Limit = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.DescribeWorkspaces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -254,6 +252,14 @@ func (p *DescribeWorkspacesPaginator) NextPage(ctx context.Context, optFns ...fu return result, nil } +// DescribeWorkspacesAPIClient is a client that implements the DescribeWorkspaces +// operation. +type DescribeWorkspacesAPIClient interface { + DescribeWorkspaces(context.Context, *DescribeWorkspacesInput, ...func(*Options)) (*DescribeWorkspacesOutput, error) +} + +var _ DescribeWorkspacesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opDescribeWorkspaces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspaces/api_op_DescribeWorkspacesConnectionStatus.go b/service/workspaces/api_op_DescribeWorkspacesConnectionStatus.go index 1f834f32e91..acf6284fc5f 100644 --- a/service/workspaces/api_op_DescribeWorkspacesConnectionStatus.go +++ b/service/workspaces/api_op_DescribeWorkspacesConnectionStatus.go @@ -112,6 +112,9 @@ func (c *Client) addOperationDescribeWorkspacesConnectionStatusMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeWorkspacesConnectionStatus(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_DisassociateConnectionAlias.go b/service/workspaces/api_op_DisassociateConnectionAlias.go index 6fe33b3a8a0..af38f185fc8 100644 --- a/service/workspaces/api_op_DisassociateConnectionAlias.go +++ b/service/workspaces/api_op_DisassociateConnectionAlias.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDisassociateConnectionAliasMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateConnectionAliasValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DisassociateIpGroups.go b/service/workspaces/api_op_DisassociateIpGroups.go index c1907ebd2a3..21f22a0b416 100644 --- a/service/workspaces/api_op_DisassociateIpGroups.go +++ b/service/workspaces/api_op_DisassociateIpGroups.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDisassociateIpGroupsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateIpGroupsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_DisassociateWorkspaceApplication.go b/service/workspaces/api_op_DisassociateWorkspaceApplication.go index 4ce21a522de..6afaf80aad9 100644 --- a/service/workspaces/api_op_DisassociateWorkspaceApplication.go +++ b/service/workspaces/api_op_DisassociateWorkspaceApplication.go @@ -111,6 +111,9 @@ func (c *Client) addOperationDisassociateWorkspaceApplicationMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateWorkspaceApplicationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_GetAccountLink.go b/service/workspaces/api_op_GetAccountLink.go index 456389e7bbe..676d5b06cd4 100644 --- a/service/workspaces/api_op_GetAccountLink.go +++ b/service/workspaces/api_op_GetAccountLink.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetAccountLinkMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountLink(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_ImportClientBranding.go b/service/workspaces/api_op_ImportClientBranding.go index 28bea410972..0d577a2ab1a 100644 --- a/service/workspaces/api_op_ImportClientBranding.go +++ b/service/workspaces/api_op_ImportClientBranding.go @@ -158,6 +158,9 @@ func (c *Client) addOperationImportClientBrandingMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportClientBrandingValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ImportWorkspaceImage.go b/service/workspaces/api_op_ImportWorkspaceImage.go index b4cb39966eb..47c5ab55479 100644 --- a/service/workspaces/api_op_ImportWorkspaceImage.go +++ b/service/workspaces/api_op_ImportWorkspaceImage.go @@ -154,6 +154,9 @@ func (c *Client) addOperationImportWorkspaceImageMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpImportWorkspaceImageValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ListAccountLinks.go b/service/workspaces/api_op_ListAccountLinks.go index d41aca7db39..e3a8716de8b 100644 --- a/service/workspaces/api_op_ListAccountLinks.go +++ b/service/workspaces/api_op_ListAccountLinks.go @@ -115,6 +115,9 @@ func (c *Client) addOperationListAccountLinksMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountLinks(options.Region), middleware.Before); err != nil { return err } @@ -136,14 +139,6 @@ func (c *Client) addOperationListAccountLinksMiddlewares(stack *middleware.Stack return nil } -// ListAccountLinksAPIClient is a client that implements the ListAccountLinks -// operation. -type ListAccountLinksAPIClient interface { - ListAccountLinks(context.Context, *ListAccountLinksInput, ...func(*Options)) (*ListAccountLinksOutput, error) -} - -var _ ListAccountLinksAPIClient = (*Client)(nil) - // ListAccountLinksPaginatorOptions is the paginator options for ListAccountLinks type ListAccountLinksPaginatorOptions struct { // The maximum number of accounts to return. @@ -207,6 +202,9 @@ func (p *ListAccountLinksPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListAccountLinks(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListAccountLinksPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListAccountLinksAPIClient is a client that implements the ListAccountLinks +// operation. +type ListAccountLinksAPIClient interface { + ListAccountLinks(context.Context, *ListAccountLinksInput, ...func(*Options)) (*ListAccountLinksOutput, error) +} + +var _ ListAccountLinksAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListAccountLinks(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspaces/api_op_ListAvailableManagementCidrRanges.go b/service/workspaces/api_op_ListAvailableManagementCidrRanges.go index 7a3d268e9a4..3c6176bffd5 100644 --- a/service/workspaces/api_op_ListAvailableManagementCidrRanges.go +++ b/service/workspaces/api_op_ListAvailableManagementCidrRanges.go @@ -129,6 +129,9 @@ func (c *Client) addOperationListAvailableManagementCidrRangesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListAvailableManagementCidrRangesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_MigrateWorkspace.go b/service/workspaces/api_op_MigrateWorkspace.go index 1915553082f..222ba2f6041 100644 --- a/service/workspaces/api_op_MigrateWorkspace.go +++ b/service/workspaces/api_op_MigrateWorkspace.go @@ -128,6 +128,9 @@ func (c *Client) addOperationMigrateWorkspaceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpMigrateWorkspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyAccount.go b/service/workspaces/api_op_ModifyAccount.go index c8941443568..c6d6494e47b 100644 --- a/service/workspaces/api_op_ModifyAccount.go +++ b/service/workspaces/api_op_ModifyAccount.go @@ -108,6 +108,9 @@ func (c *Client) addOperationModifyAccountMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAccount(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyCertificateBasedAuthProperties.go b/service/workspaces/api_op_ModifyCertificateBasedAuthProperties.go index fa0e1e52982..4457a43d4bb 100644 --- a/service/workspaces/api_op_ModifyCertificateBasedAuthProperties.go +++ b/service/workspaces/api_op_ModifyCertificateBasedAuthProperties.go @@ -109,6 +109,9 @@ func (c *Client) addOperationModifyCertificateBasedAuthPropertiesMiddlewares(sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyCertificateBasedAuthPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyClientProperties.go b/service/workspaces/api_op_ModifyClientProperties.go index d2b0b127dae..601848de4b2 100644 --- a/service/workspaces/api_op_ModifyClientProperties.go +++ b/service/workspaces/api_op_ModifyClientProperties.go @@ -107,6 +107,9 @@ func (c *Client) addOperationModifyClientPropertiesMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyClientPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifySamlProperties.go b/service/workspaces/api_op_ModifySamlProperties.go index d8632d74878..dd15e1d1cc9 100644 --- a/service/workspaces/api_op_ModifySamlProperties.go +++ b/service/workspaces/api_op_ModifySamlProperties.go @@ -117,6 +117,9 @@ func (c *Client) addOperationModifySamlPropertiesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySamlPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifySelfservicePermissions.go b/service/workspaces/api_op_ModifySelfservicePermissions.go index bf7feee5902..62a32712270 100644 --- a/service/workspaces/api_op_ModifySelfservicePermissions.go +++ b/service/workspaces/api_op_ModifySelfservicePermissions.go @@ -110,6 +110,9 @@ func (c *Client) addOperationModifySelfservicePermissionsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifySelfservicePermissionsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyWorkspaceAccessProperties.go b/service/workspaces/api_op_ModifyWorkspaceAccessProperties.go index cd301ac370c..0b59c838906 100644 --- a/service/workspaces/api_op_ModifyWorkspaceAccessProperties.go +++ b/service/workspaces/api_op_ModifyWorkspaceAccessProperties.go @@ -110,6 +110,9 @@ func (c *Client) addOperationModifyWorkspaceAccessPropertiesMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyWorkspaceAccessPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyWorkspaceCreationProperties.go b/service/workspaces/api_op_ModifyWorkspaceCreationProperties.go index 7a8692fd93e..c51f9c45b5f 100644 --- a/service/workspaces/api_op_ModifyWorkspaceCreationProperties.go +++ b/service/workspaces/api_op_ModifyWorkspaceCreationProperties.go @@ -107,6 +107,9 @@ func (c *Client) addOperationModifyWorkspaceCreationPropertiesMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyWorkspaceCreationPropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyWorkspaceProperties.go b/service/workspaces/api_op_ModifyWorkspaceProperties.go index de3b8b1c8fd..ae6e663c515 100644 --- a/service/workspaces/api_op_ModifyWorkspaceProperties.go +++ b/service/workspaces/api_op_ModifyWorkspaceProperties.go @@ -116,6 +116,9 @@ func (c *Client) addOperationModifyWorkspacePropertiesMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyWorkspacePropertiesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_ModifyWorkspaceState.go b/service/workspaces/api_op_ModifyWorkspaceState.go index d4796ffe45f..e816dc9b7d0 100644 --- a/service/workspaces/api_op_ModifyWorkspaceState.go +++ b/service/workspaces/api_op_ModifyWorkspaceState.go @@ -112,6 +112,9 @@ func (c *Client) addOperationModifyWorkspaceStateMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpModifyWorkspaceStateValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_RebootWorkspaces.go b/service/workspaces/api_op_RebootWorkspaces.go index eb19e237bf5..35246d9630a 100644 --- a/service/workspaces/api_op_RebootWorkspaces.go +++ b/service/workspaces/api_op_RebootWorkspaces.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRebootWorkspacesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebootWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_RebuildWorkspaces.go b/service/workspaces/api_op_RebuildWorkspaces.go index f8f97d490a1..dfe0b6a97ed 100644 --- a/service/workspaces/api_op_RebuildWorkspaces.go +++ b/service/workspaces/api_op_RebuildWorkspaces.go @@ -117,6 +117,9 @@ func (c *Client) addOperationRebuildWorkspacesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRebuildWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_RegisterWorkspaceDirectory.go b/service/workspaces/api_op_RegisterWorkspaceDirectory.go index 23ac25ec4a0..6d6c149c22c 100644 --- a/service/workspaces/api_op_RegisterWorkspaceDirectory.go +++ b/service/workspaces/api_op_RegisterWorkspaceDirectory.go @@ -141,6 +141,9 @@ func (c *Client) addOperationRegisterWorkspaceDirectoryMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRegisterWorkspaceDirectoryValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_RejectAccountLinkInvitation.go b/service/workspaces/api_op_RejectAccountLinkInvitation.go index d868adc1042..abd4ae93fb0 100644 --- a/service/workspaces/api_op_RejectAccountLinkInvitation.go +++ b/service/workspaces/api_op_RejectAccountLinkInvitation.go @@ -109,6 +109,9 @@ func (c *Client) addOperationRejectAccountLinkInvitationMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRejectAccountLinkInvitationValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_RestoreWorkspace.go b/service/workspaces/api_op_RestoreWorkspace.go index 2eaef34223c..120d2dfc5a8 100644 --- a/service/workspaces/api_op_RestoreWorkspace.go +++ b/service/workspaces/api_op_RestoreWorkspace.go @@ -112,6 +112,9 @@ func (c *Client) addOperationRestoreWorkspaceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRestoreWorkspaceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_RevokeIpRules.go b/service/workspaces/api_op_RevokeIpRules.go index a7eb50dc440..3bb915c0fba 100644 --- a/service/workspaces/api_op_RevokeIpRules.go +++ b/service/workspaces/api_op_RevokeIpRules.go @@ -106,6 +106,9 @@ func (c *Client) addOperationRevokeIpRulesMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpRevokeIpRulesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_StartWorkspaces.go b/service/workspaces/api_op_StartWorkspaces.go index a8f4fa942d9..9261eb4a03c 100644 --- a/service/workspaces/api_op_StartWorkspaces.go +++ b/service/workspaces/api_op_StartWorkspaces.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStartWorkspacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStartWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_StopWorkspaces.go b/service/workspaces/api_op_StopWorkspaces.go index 222ecf3613c..d600d0c4d20 100644 --- a/service/workspaces/api_op_StopWorkspaces.go +++ b/service/workspaces/api_op_StopWorkspaces.go @@ -109,6 +109,9 @@ func (c *Client) addOperationStopWorkspacesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpStopWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_TerminateWorkspaces.go b/service/workspaces/api_op_TerminateWorkspaces.go index 6021770a2b0..d109e43ab0b 100644 --- a/service/workspaces/api_op_TerminateWorkspaces.go +++ b/service/workspaces/api_op_TerminateWorkspaces.go @@ -133,6 +133,9 @@ func (c *Client) addOperationTerminateWorkspacesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTerminateWorkspacesValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_UpdateConnectClientAddIn.go b/service/workspaces/api_op_UpdateConnectClientAddIn.go index 8f225308809..3fc1f4ca030 100644 --- a/service/workspaces/api_op_UpdateConnectClientAddIn.go +++ b/service/workspaces/api_op_UpdateConnectClientAddIn.go @@ -113,6 +113,9 @@ func (c *Client) addOperationUpdateConnectClientAddInMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectClientAddInValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_UpdateConnectionAliasPermission.go b/service/workspaces/api_op_UpdateConnectionAliasPermission.go index 266ea1d85da..6b653201bcf 100644 --- a/service/workspaces/api_op_UpdateConnectionAliasPermission.go +++ b/service/workspaces/api_op_UpdateConnectionAliasPermission.go @@ -124,6 +124,9 @@ func (c *Client) addOperationUpdateConnectionAliasPermissionMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateConnectionAliasPermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_UpdateRulesOfIpGroup.go b/service/workspaces/api_op_UpdateRulesOfIpGroup.go index e92706c3ddc..513f191042e 100644 --- a/service/workspaces/api_op_UpdateRulesOfIpGroup.go +++ b/service/workspaces/api_op_UpdateRulesOfIpGroup.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUpdateRulesOfIpGroupMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateRulesOfIpGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspaces/api_op_UpdateWorkspaceBundle.go b/service/workspaces/api_op_UpdateWorkspaceBundle.go index a8c0cf02b7a..048f20e226d 100644 --- a/service/workspaces/api_op_UpdateWorkspaceBundle.go +++ b/service/workspaces/api_op_UpdateWorkspaceBundle.go @@ -110,6 +110,9 @@ func (c *Client) addOperationUpdateWorkspaceBundleMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateWorkspaceBundle(options.Region), middleware.Before); err != nil { return err } diff --git a/service/workspaces/api_op_UpdateWorkspaceImagePermission.go b/service/workspaces/api_op_UpdateWorkspaceImagePermission.go index e3cfb8f5859..1cae4331391 100644 --- a/service/workspaces/api_op_UpdateWorkspaceImagePermission.go +++ b/service/workspaces/api_op_UpdateWorkspaceImagePermission.go @@ -139,6 +139,9 @@ func (c *Client) addOperationUpdateWorkspaceImagePermissionMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateWorkspaceImagePermissionValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_client.go b/service/workspacesthinclient/api_client.go index bb506dd91be..b19bb2b6248 100644 --- a/service/workspacesthinclient/api_client.go +++ b/service/workspacesthinclient/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/workspacesthinclient/api_op_CreateEnvironment.go b/service/workspacesthinclient/api_op_CreateEnvironment.go index 0eac11cf912..8e072f7f8b5 100644 --- a/service/workspacesthinclient/api_op_CreateEnvironment.go +++ b/service/workspacesthinclient/api_op_CreateEnvironment.go @@ -149,6 +149,9 @@ func (c *Client) addOperationCreateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opCreateEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_DeleteDevice.go b/service/workspacesthinclient/api_op_DeleteDevice.go index 7cde89d977a..7e5cdfd5c48 100644 --- a/service/workspacesthinclient/api_op_DeleteDevice.go +++ b/service/workspacesthinclient/api_op_DeleteDevice.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteDeviceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_DeleteEnvironment.go b/service/workspacesthinclient/api_op_DeleteEnvironment.go index 044a83aec61..a1641adb76f 100644 --- a/service/workspacesthinclient/api_op_DeleteEnvironment.go +++ b/service/workspacesthinclient/api_op_DeleteEnvironment.go @@ -116,6 +116,9 @@ func (c *Client) addOperationDeleteEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeleteEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_DeregisterDevice.go b/service/workspacesthinclient/api_op_DeregisterDevice.go index 132135be47f..69173df5299 100644 --- a/service/workspacesthinclient/api_op_DeregisterDevice.go +++ b/service/workspacesthinclient/api_op_DeregisterDevice.go @@ -120,6 +120,9 @@ func (c *Client) addOperationDeregisterDeviceMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opDeregisterDeviceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_GetDevice.go b/service/workspacesthinclient/api_op_GetDevice.go index 45cc3a24cef..4408b848354 100644 --- a/service/workspacesthinclient/api_op_GetDevice.go +++ b/service/workspacesthinclient/api_op_GetDevice.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetDeviceMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetDeviceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_GetEnvironment.go b/service/workspacesthinclient/api_op_GetEnvironment.go index 0ce57f2b17f..56103b3e735 100644 --- a/service/workspacesthinclient/api_op_GetEnvironment.go +++ b/service/workspacesthinclient/api_op_GetEnvironment.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetEnvironmentMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_GetSoftwareSet.go b/service/workspacesthinclient/api_op_GetSoftwareSet.go index 357d6b85556..38b1c387e8b 100644 --- a/service/workspacesthinclient/api_op_GetSoftwareSet.go +++ b/service/workspacesthinclient/api_op_GetSoftwareSet.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetSoftwareSetMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opGetSoftwareSetMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_ListDevices.go b/service/workspacesthinclient/api_op_ListDevices.go index a59a608123c..268d8464ec1 100644 --- a/service/workspacesthinclient/api_op_ListDevices.go +++ b/service/workspacesthinclient/api_op_ListDevices.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListDevicesMiddleware(stack); err != nil { return err } @@ -146,40 +149,6 @@ func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, opt return nil } -type endpointPrefix_opListDevicesMiddleware struct { -} - -func (*endpointPrefix_opListDevicesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListDevicesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListDevicesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListDevicesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListDevicesAPIClient is a client that implements the ListDevices operation. -type ListDevicesAPIClient interface { - ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) -} - -var _ ListDevicesAPIClient = (*Client)(nil) - // ListDevicesPaginatorOptions is the paginator options for ListDevices type ListDevicesPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -247,6 +216,9 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListDevices(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -266,6 +238,40 @@ func (p *ListDevicesPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +type endpointPrefix_opListDevicesMiddleware struct { +} + +func (*endpointPrefix_opListDevicesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListDevicesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListDevicesMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListDevicesMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListDevicesAPIClient is a client that implements the ListDevices operation. +type ListDevicesAPIClient interface { + ListDevices(context.Context, *ListDevicesInput, ...func(*Options)) (*ListDevicesOutput, error) +} + +var _ ListDevicesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesthinclient/api_op_ListEnvironments.go b/service/workspacesthinclient/api_op_ListEnvironments.go index f662deb652a..ec4b2172d4b 100644 --- a/service/workspacesthinclient/api_op_ListEnvironments.go +++ b/service/workspacesthinclient/api_op_ListEnvironments.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListEnvironmentsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListEnvironmentsMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListEnvironmentsMiddleware struct { -} - -func (*endpointPrefix_opListEnvironmentsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListEnvironmentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListEnvironmentsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListEnvironmentsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListEnvironmentsAPIClient is a client that implements the ListEnvironments -// operation. -type ListEnvironmentsAPIClient interface { - ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) -} - -var _ ListEnvironmentsAPIClient = (*Client)(nil) - // ListEnvironmentsPaginatorOptions is the paginator options for ListEnvironments type ListEnvironmentsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -248,6 +216,9 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListEnvironments(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +238,41 @@ func (p *ListEnvironmentsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListEnvironmentsMiddleware struct { +} + +func (*endpointPrefix_opListEnvironmentsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListEnvironmentsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListEnvironmentsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListEnvironmentsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListEnvironmentsAPIClient is a client that implements the ListEnvironments +// operation. +type ListEnvironmentsAPIClient interface { + ListEnvironments(context.Context, *ListEnvironmentsInput, ...func(*Options)) (*ListEnvironmentsOutput, error) +} + +var _ ListEnvironmentsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListEnvironments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesthinclient/api_op_ListSoftwareSets.go b/service/workspacesthinclient/api_op_ListSoftwareSets.go index 5d9e9fba21a..50d79745b45 100644 --- a/service/workspacesthinclient/api_op_ListSoftwareSets.go +++ b/service/workspacesthinclient/api_op_ListSoftwareSets.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListSoftwareSetsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListSoftwareSetsMiddleware(stack); err != nil { return err } @@ -146,41 +149,6 @@ func (c *Client) addOperationListSoftwareSetsMiddlewares(stack *middleware.Stack return nil } -type endpointPrefix_opListSoftwareSetsMiddleware struct { -} - -func (*endpointPrefix_opListSoftwareSetsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListSoftwareSetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "api." + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListSoftwareSetsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListSoftwareSetsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListSoftwareSetsAPIClient is a client that implements the ListSoftwareSets -// operation. -type ListSoftwareSetsAPIClient interface { - ListSoftwareSets(context.Context, *ListSoftwareSetsInput, ...func(*Options)) (*ListSoftwareSetsOutput, error) -} - -var _ ListSoftwareSetsAPIClient = (*Client)(nil) - // ListSoftwareSetsPaginatorOptions is the paginator options for ListSoftwareSets type ListSoftwareSetsPaginatorOptions struct { // The maximum number of results that are returned per call. You can use nextToken @@ -248,6 +216,9 @@ func (p *ListSoftwareSetsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListSoftwareSets(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -267,6 +238,41 @@ func (p *ListSoftwareSetsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +type endpointPrefix_opListSoftwareSetsMiddleware struct { +} + +func (*endpointPrefix_opListSoftwareSetsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSoftwareSetsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "api." + req.URL.Host + + return next.HandleFinalize(ctx, in) +} +func addEndpointPrefix_opListSoftwareSetsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&endpointPrefix_opListSoftwareSetsMiddleware{}, "ResolveEndpointV2", middleware.After) +} + +// ListSoftwareSetsAPIClient is a client that implements the ListSoftwareSets +// operation. +type ListSoftwareSetsAPIClient interface { + ListSoftwareSets(context.Context, *ListSoftwareSetsInput, ...func(*Options)) (*ListSoftwareSetsOutput, error) +} + +var _ ListSoftwareSetsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListSoftwareSets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesthinclient/api_op_ListTagsForResource.go b/service/workspacesthinclient/api_op_ListTagsForResource.go index 653e8b4ec30..736c7962ada 100644 --- a/service/workspacesthinclient/api_op_ListTagsForResource.go +++ b/service/workspacesthinclient/api_op_ListTagsForResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opListTagsForResourceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_TagResource.go b/service/workspacesthinclient/api_op_TagResource.go index 5f55193ba74..debc33091b9 100644 --- a/service/workspacesthinclient/api_op_TagResource.go +++ b/service/workspacesthinclient/api_op_TagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opTagResourceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_UntagResource.go b/service/workspacesthinclient/api_op_UntagResource.go index 8c3bc42734f..60d7b5e7280 100644 --- a/service/workspacesthinclient/api_op_UntagResource.go +++ b/service/workspacesthinclient/api_op_UntagResource.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUntagResourceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_UpdateDevice.go b/service/workspacesthinclient/api_op_UpdateDevice.go index c2704974d75..34c9eb48608 100644 --- a/service/workspacesthinclient/api_op_UpdateDevice.go +++ b/service/workspacesthinclient/api_op_UpdateDevice.go @@ -116,6 +116,9 @@ func (c *Client) addOperationUpdateDeviceMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateDeviceMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_UpdateEnvironment.go b/service/workspacesthinclient/api_op_UpdateEnvironment.go index c398452e140..685ff737b17 100644 --- a/service/workspacesthinclient/api_op_UpdateEnvironment.go +++ b/service/workspacesthinclient/api_op_UpdateEnvironment.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateEnvironmentMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateEnvironmentMiddleware(stack); err != nil { return err } diff --git a/service/workspacesthinclient/api_op_UpdateSoftwareSet.go b/service/workspacesthinclient/api_op_UpdateSoftwareSet.go index b54c387aecb..d5178e52e87 100644 --- a/service/workspacesthinclient/api_op_UpdateSoftwareSet.go +++ b/service/workspacesthinclient/api_op_UpdateSoftwareSet.go @@ -107,6 +107,9 @@ func (c *Client) addOperationUpdateSoftwareSetMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addEndpointPrefix_opUpdateSoftwareSetMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_client.go b/service/workspacesweb/api_client.go index 3639e505931..eb7c479f582 100644 --- a/service/workspacesweb/api_client.go +++ b/service/workspacesweb/api_client.go @@ -455,6 +455,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return @@ -547,6 +571,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) diff --git a/service/workspacesweb/api_op_AssociateBrowserSettings.go b/service/workspacesweb/api_op_AssociateBrowserSettings.go index b7b24f51bfd..fe4922202c5 100644 --- a/service/workspacesweb/api_op_AssociateBrowserSettings.go +++ b/service/workspacesweb/api_op_AssociateBrowserSettings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateBrowserSettingsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateBrowserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_AssociateIpAccessSettings.go b/service/workspacesweb/api_op_AssociateIpAccessSettings.go index 0091f7f8c74..9d521d6cf87 100644 --- a/service/workspacesweb/api_op_AssociateIpAccessSettings.go +++ b/service/workspacesweb/api_op_AssociateIpAccessSettings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateIpAccessSettingsMiddlewares(stack *middlew if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateIpAccessSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_AssociateNetworkSettings.go b/service/workspacesweb/api_op_AssociateNetworkSettings.go index 916c7a6908f..b79947c3d50 100644 --- a/service/workspacesweb/api_op_AssociateNetworkSettings.go +++ b/service/workspacesweb/api_op_AssociateNetworkSettings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateNetworkSettingsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateNetworkSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_AssociateTrustStore.go b/service/workspacesweb/api_op_AssociateTrustStore.go index 7997622204e..c245224b457 100644 --- a/service/workspacesweb/api_op_AssociateTrustStore.go +++ b/service/workspacesweb/api_op_AssociateTrustStore.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateTrustStoreMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_AssociateUserAccessLoggingSettings.go b/service/workspacesweb/api_op_AssociateUserAccessLoggingSettings.go index b1e23324e90..254afc930e8 100644 --- a/service/workspacesweb/api_op_AssociateUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_AssociateUserAccessLoggingSettings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateUserAccessLoggingSettingsMiddlewares(stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateUserAccessLoggingSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_AssociateUserSettings.go b/service/workspacesweb/api_op_AssociateUserSettings.go index 236672e1e43..029ee46d73c 100644 --- a/service/workspacesweb/api_op_AssociateUserSettings.go +++ b/service/workspacesweb/api_op_AssociateUserSettings.go @@ -117,6 +117,9 @@ func (c *Client) addOperationAssociateUserSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpAssociateUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateBrowserSettings.go b/service/workspacesweb/api_op_CreateBrowserSettings.go index bc601051516..e74b2c16860 100644 --- a/service/workspacesweb/api_op_CreateBrowserSettings.go +++ b/service/workspacesweb/api_op_CreateBrowserSettings.go @@ -130,6 +130,9 @@ func (c *Client) addOperationCreateBrowserSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateBrowserSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateIdentityProvider.go b/service/workspacesweb/api_op_CreateIdentityProvider.go index 8d3164d82a6..96df48a9d90 100644 --- a/service/workspacesweb/api_op_CreateIdentityProvider.go +++ b/service/workspacesweb/api_op_CreateIdentityProvider.go @@ -198,6 +198,9 @@ func (c *Client) addOperationCreateIdentityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIdentityProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateIpAccessSettings.go b/service/workspacesweb/api_op_CreateIpAccessSettings.go index aa7ddf27542..626544568ee 100644 --- a/service/workspacesweb/api_op_CreateIpAccessSettings.go +++ b/service/workspacesweb/api_op_CreateIpAccessSettings.go @@ -133,6 +133,9 @@ func (c *Client) addOperationCreateIpAccessSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateIpAccessSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateNetworkSettings.go b/service/workspacesweb/api_op_CreateNetworkSettings.go index 23b30e7c29f..e6c6a99e00e 100644 --- a/service/workspacesweb/api_op_CreateNetworkSettings.go +++ b/service/workspacesweb/api_op_CreateNetworkSettings.go @@ -136,6 +136,9 @@ func (c *Client) addOperationCreateNetworkSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateNetworkSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreatePortal.go b/service/workspacesweb/api_op_CreatePortal.go index 03895153a95..66ae8bb7528 100644 --- a/service/workspacesweb/api_op_CreatePortal.go +++ b/service/workspacesweb/api_op_CreatePortal.go @@ -152,6 +152,9 @@ func (c *Client) addOperationCreatePortalMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreatePortalMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateTrustStore.go b/service/workspacesweb/api_op_CreateTrustStore.go index 9e415818953..941a6e35b5f 100644 --- a/service/workspacesweb/api_op_CreateTrustStore.go +++ b/service/workspacesweb/api_op_CreateTrustStore.go @@ -126,6 +126,9 @@ func (c *Client) addOperationCreateTrustStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateTrustStoreMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateUserAccessLoggingSettings.go b/service/workspacesweb/api_op_CreateUserAccessLoggingSettings.go index ae5006f564f..7cc6b4bb8be 100644 --- a/service/workspacesweb/api_op_CreateUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_CreateUserAccessLoggingSettings.go @@ -122,6 +122,9 @@ func (c *Client) addOperationCreateUserAccessLoggingSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateUserAccessLoggingSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_CreateUserSettings.go b/service/workspacesweb/api_op_CreateUserSettings.go index 5458108e16a..72759b2acc9 100644 --- a/service/workspacesweb/api_op_CreateUserSettings.go +++ b/service/workspacesweb/api_op_CreateUserSettings.go @@ -167,6 +167,9 @@ func (c *Client) addOperationCreateUserSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opCreateUserSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteBrowserSettings.go b/service/workspacesweb/api_op_DeleteBrowserSettings.go index 12e9727f46a..fd55bbfacb3 100644 --- a/service/workspacesweb/api_op_DeleteBrowserSettings.go +++ b/service/workspacesweb/api_op_DeleteBrowserSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteBrowserSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteBrowserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteIdentityProvider.go b/service/workspacesweb/api_op_DeleteIdentityProvider.go index f453ee852b9..f014bc129fb 100644 --- a/service/workspacesweb/api_op_DeleteIdentityProvider.go +++ b/service/workspacesweb/api_op_DeleteIdentityProvider.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteIdentityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteIpAccessSettings.go b/service/workspacesweb/api_op_DeleteIpAccessSettings.go index 9c7b3bb421d..684bd80bee0 100644 --- a/service/workspacesweb/api_op_DeleteIpAccessSettings.go +++ b/service/workspacesweb/api_op_DeleteIpAccessSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteIpAccessSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteIpAccessSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteNetworkSettings.go b/service/workspacesweb/api_op_DeleteNetworkSettings.go index 783e7b62a54..972ef70f74e 100644 --- a/service/workspacesweb/api_op_DeleteNetworkSettings.go +++ b/service/workspacesweb/api_op_DeleteNetworkSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteNetworkSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteNetworkSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeletePortal.go b/service/workspacesweb/api_op_DeletePortal.go index 99d4a05b7b2..eebb1ce671f 100644 --- a/service/workspacesweb/api_op_DeletePortal.go +++ b/service/workspacesweb/api_op_DeletePortal.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeletePortalMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeletePortalValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteTrustStore.go b/service/workspacesweb/api_op_DeleteTrustStore.go index f6f6be123ef..d15d49b8e09 100644 --- a/service/workspacesweb/api_op_DeleteTrustStore.go +++ b/service/workspacesweb/api_op_DeleteTrustStore.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteTrustStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteUserAccessLoggingSettings.go b/service/workspacesweb/api_op_DeleteUserAccessLoggingSettings.go index 5735bca05aa..12d4671452a 100644 --- a/service/workspacesweb/api_op_DeleteUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_DeleteUserAccessLoggingSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteUserAccessLoggingSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserAccessLoggingSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DeleteUserSettings.go b/service/workspacesweb/api_op_DeleteUserSettings.go index 6bdb622da53..8da5d30be6b 100644 --- a/service/workspacesweb/api_op_DeleteUserSettings.go +++ b/service/workspacesweb/api_op_DeleteUserSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDeleteUserSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DisassociateBrowserSettings.go b/service/workspacesweb/api_op_DisassociateBrowserSettings.go index 785da194f1b..78270ad796e 100644 --- a/service/workspacesweb/api_op_DisassociateBrowserSettings.go +++ b/service/workspacesweb/api_op_DisassociateBrowserSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateBrowserSettingsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateBrowserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DisassociateIpAccessSettings.go b/service/workspacesweb/api_op_DisassociateIpAccessSettings.go index ca96c98bcb7..83181e0a36a 100644 --- a/service/workspacesweb/api_op_DisassociateIpAccessSettings.go +++ b/service/workspacesweb/api_op_DisassociateIpAccessSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateIpAccessSettingsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateIpAccessSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DisassociateNetworkSettings.go b/service/workspacesweb/api_op_DisassociateNetworkSettings.go index 5280ceb11f5..3e11cd07a10 100644 --- a/service/workspacesweb/api_op_DisassociateNetworkSettings.go +++ b/service/workspacesweb/api_op_DisassociateNetworkSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateNetworkSettingsMiddlewares(stack *middl if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateNetworkSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DisassociateTrustStore.go b/service/workspacesweb/api_op_DisassociateTrustStore.go index 146de927d0b..ca412e151a5 100644 --- a/service/workspacesweb/api_op_DisassociateTrustStore.go +++ b/service/workspacesweb/api_op_DisassociateTrustStore.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateTrustStoreMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DisassociateUserAccessLoggingSettings.go b/service/workspacesweb/api_op_DisassociateUserAccessLoggingSettings.go index 3a57b54f0bf..710cdc14c24 100644 --- a/service/workspacesweb/api_op_DisassociateUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_DisassociateUserAccessLoggingSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateUserAccessLoggingSettingsMiddlewares(st if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateUserAccessLoggingSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_DisassociateUserSettings.go b/service/workspacesweb/api_op_DisassociateUserSettings.go index dbf7d019bc5..b0fcaba236e 100644 --- a/service/workspacesweb/api_op_DisassociateUserSettings.go +++ b/service/workspacesweb/api_op_DisassociateUserSettings.go @@ -101,6 +101,9 @@ func (c *Client) addOperationDisassociateUserSettingsMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDisassociateUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetBrowserSettings.go b/service/workspacesweb/api_op_GetBrowserSettings.go index d1a1c388023..aa2460b301e 100644 --- a/service/workspacesweb/api_op_GetBrowserSettings.go +++ b/service/workspacesweb/api_op_GetBrowserSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetBrowserSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetBrowserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetIdentityProvider.go b/service/workspacesweb/api_op_GetIdentityProvider.go index bfae2e455d2..e94d03f80bc 100644 --- a/service/workspacesweb/api_op_GetIdentityProvider.go +++ b/service/workspacesweb/api_op_GetIdentityProvider.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetIdentityProviderMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIdentityProviderValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetIpAccessSettings.go b/service/workspacesweb/api_op_GetIpAccessSettings.go index 655be4c79d3..076707e4713 100644 --- a/service/workspacesweb/api_op_GetIpAccessSettings.go +++ b/service/workspacesweb/api_op_GetIpAccessSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetIpAccessSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetIpAccessSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetNetworkSettings.go b/service/workspacesweb/api_op_GetNetworkSettings.go index 4b3ec58e163..72faed692c5 100644 --- a/service/workspacesweb/api_op_GetNetworkSettings.go +++ b/service/workspacesweb/api_op_GetNetworkSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetNetworkSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetNetworkSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetPortal.go b/service/workspacesweb/api_op_GetPortal.go index 65097d564e0..d0b6806e1f0 100644 --- a/service/workspacesweb/api_op_GetPortal.go +++ b/service/workspacesweb/api_op_GetPortal.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetPortalMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPortalValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetPortalServiceProviderMetadata.go b/service/workspacesweb/api_op_GetPortalServiceProviderMetadata.go index c4bf2cb10bd..74467f5bce9 100644 --- a/service/workspacesweb/api_op_GetPortalServiceProviderMetadata.go +++ b/service/workspacesweb/api_op_GetPortalServiceProviderMetadata.go @@ -110,6 +110,9 @@ func (c *Client) addOperationGetPortalServiceProviderMetadataMiddlewares(stack * if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetPortalServiceProviderMetadataValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetTrustStore.go b/service/workspacesweb/api_op_GetTrustStore.go index 393a6af9a20..448b7866e01 100644 --- a/service/workspacesweb/api_op_GetTrustStore.go +++ b/service/workspacesweb/api_op_GetTrustStore.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetTrustStoreMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrustStoreValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetTrustStoreCertificate.go b/service/workspacesweb/api_op_GetTrustStoreCertificate.go index 819ae345e8b..1e40e3c5d87 100644 --- a/service/workspacesweb/api_op_GetTrustStoreCertificate.go +++ b/service/workspacesweb/api_op_GetTrustStoreCertificate.go @@ -116,6 +116,9 @@ func (c *Client) addOperationGetTrustStoreCertificateMiddlewares(stack *middlewa if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTrustStoreCertificateValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetUserAccessLoggingSettings.go b/service/workspacesweb/api_op_GetUserAccessLoggingSettings.go index ea3d858f01f..ab912d267a8 100644 --- a/service/workspacesweb/api_op_GetUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_GetUserAccessLoggingSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetUserAccessLoggingSettingsMiddlewares(stack *midd if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserAccessLoggingSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_GetUserSettings.go b/service/workspacesweb/api_op_GetUserSettings.go index 111fd0c946c..077645c58f9 100644 --- a/service/workspacesweb/api_op_GetUserSettings.go +++ b/service/workspacesweb/api_op_GetUserSettings.go @@ -106,6 +106,9 @@ func (c *Client) addOperationGetUserSettingsMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetUserSettingsValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_ListBrowserSettings.go b/service/workspacesweb/api_op_ListBrowserSettings.go index e87062e74a4..5e96785f817 100644 --- a/service/workspacesweb/api_op_ListBrowserSettings.go +++ b/service/workspacesweb/api_op_ListBrowserSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListBrowserSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBrowserSettings(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListBrowserSettingsMiddlewares(stack *middleware.St return nil } -// ListBrowserSettingsAPIClient is a client that implements the -// ListBrowserSettings operation. -type ListBrowserSettingsAPIClient interface { - ListBrowserSettings(context.Context, *ListBrowserSettingsInput, ...func(*Options)) (*ListBrowserSettingsOutput, error) -} - -var _ ListBrowserSettingsAPIClient = (*Client)(nil) - // ListBrowserSettingsPaginatorOptions is the paginator options for // ListBrowserSettings type ListBrowserSettingsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListBrowserSettingsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListBrowserSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListBrowserSettingsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListBrowserSettingsAPIClient is a client that implements the +// ListBrowserSettings operation. +type ListBrowserSettingsAPIClient interface { + ListBrowserSettings(context.Context, *ListBrowserSettingsInput, ...func(*Options)) (*ListBrowserSettingsOutput, error) +} + +var _ ListBrowserSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListBrowserSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListIdentityProviders.go b/service/workspacesweb/api_op_ListIdentityProviders.go index a22731cd0be..af84c177cdd 100644 --- a/service/workspacesweb/api_op_ListIdentityProviders.go +++ b/service/workspacesweb/api_op_ListIdentityProviders.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListIdentityProvidersValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListIdentityProvidersMiddlewares(stack *middleware. return nil } -// ListIdentityProvidersAPIClient is a client that implements the -// ListIdentityProviders operation. -type ListIdentityProvidersAPIClient interface { - ListIdentityProviders(context.Context, *ListIdentityProvidersInput, ...func(*Options)) (*ListIdentityProvidersOutput, error) -} - -var _ ListIdentityProvidersAPIClient = (*Client)(nil) - // ListIdentityProvidersPaginatorOptions is the paginator options for // ListIdentityProviders type ListIdentityProvidersPaginatorOptions struct { @@ -213,6 +208,9 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIdentityProviders(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -232,6 +230,14 @@ func (p *ListIdentityProvidersPaginator) NextPage(ctx context.Context, optFns .. return result, nil } +// ListIdentityProvidersAPIClient is a client that implements the +// ListIdentityProviders operation. +type ListIdentityProvidersAPIClient interface { + ListIdentityProviders(context.Context, *ListIdentityProvidersInput, ...func(*Options)) (*ListIdentityProvidersOutput, error) +} + +var _ ListIdentityProvidersAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIdentityProviders(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListIpAccessSettings.go b/service/workspacesweb/api_op_ListIpAccessSettings.go index 7613c27640b..5aa6208b233 100644 --- a/service/workspacesweb/api_op_ListIpAccessSettings.go +++ b/service/workspacesweb/api_op_ListIpAccessSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListIpAccessSettingsMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListIpAccessSettings(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListIpAccessSettingsMiddlewares(stack *middleware.S return nil } -// ListIpAccessSettingsAPIClient is a client that implements the -// ListIpAccessSettings operation. -type ListIpAccessSettingsAPIClient interface { - ListIpAccessSettings(context.Context, *ListIpAccessSettingsInput, ...func(*Options)) (*ListIpAccessSettingsOutput, error) -} - -var _ ListIpAccessSettingsAPIClient = (*Client)(nil) - // ListIpAccessSettingsPaginatorOptions is the paginator options for // ListIpAccessSettings type ListIpAccessSettingsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListIpAccessSettingsPaginator) NextPage(ctx context.Context, optFns ... } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListIpAccessSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListIpAccessSettingsPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListIpAccessSettingsAPIClient is a client that implements the +// ListIpAccessSettings operation. +type ListIpAccessSettingsAPIClient interface { + ListIpAccessSettings(context.Context, *ListIpAccessSettingsInput, ...func(*Options)) (*ListIpAccessSettingsOutput, error) +} + +var _ ListIpAccessSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListIpAccessSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListNetworkSettings.go b/service/workspacesweb/api_op_ListNetworkSettings.go index 33766e1ccc6..a3231044070 100644 --- a/service/workspacesweb/api_op_ListNetworkSettings.go +++ b/service/workspacesweb/api_op_ListNetworkSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListNetworkSettingsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListNetworkSettings(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListNetworkSettingsMiddlewares(stack *middleware.St return nil } -// ListNetworkSettingsAPIClient is a client that implements the -// ListNetworkSettings operation. -type ListNetworkSettingsAPIClient interface { - ListNetworkSettings(context.Context, *ListNetworkSettingsInput, ...func(*Options)) (*ListNetworkSettingsOutput, error) -} - -var _ ListNetworkSettingsAPIClient = (*Client)(nil) - // ListNetworkSettingsPaginatorOptions is the paginator options for // ListNetworkSettings type ListNetworkSettingsPaginatorOptions struct { @@ -205,6 +200,9 @@ func (p *ListNetworkSettingsPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListNetworkSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -224,6 +222,14 @@ func (p *ListNetworkSettingsPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListNetworkSettingsAPIClient is a client that implements the +// ListNetworkSettings operation. +type ListNetworkSettingsAPIClient interface { + ListNetworkSettings(context.Context, *ListNetworkSettingsInput, ...func(*Options)) (*ListNetworkSettingsOutput, error) +} + +var _ ListNetworkSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListNetworkSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListPortals.go b/service/workspacesweb/api_op_ListPortals.go index 745ff6c6432..172d5c4e1b3 100644 --- a/service/workspacesweb/api_op_ListPortals.go +++ b/service/workspacesweb/api_op_ListPortals.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListPortalsMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPortals(options.Region), middleware.Before); err != nil { return err } @@ -133,13 +136,6 @@ func (c *Client) addOperationListPortalsMiddlewares(stack *middleware.Stack, opt return nil } -// ListPortalsAPIClient is a client that implements the ListPortals operation. -type ListPortalsAPIClient interface { - ListPortals(context.Context, *ListPortalsInput, ...func(*Options)) (*ListPortalsOutput, error) -} - -var _ ListPortalsAPIClient = (*Client)(nil) - // ListPortalsPaginatorOptions is the paginator options for ListPortals type ListPortalsPaginatorOptions struct { // The maximum number of results to be included in the next page. @@ -203,6 +199,9 @@ func (p *ListPortalsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListPortals(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -222,6 +221,13 @@ func (p *ListPortalsPaginator) NextPage(ctx context.Context, optFns ...func(*Opt return result, nil } +// ListPortalsAPIClient is a client that implements the ListPortals operation. +type ListPortalsAPIClient interface { + ListPortals(context.Context, *ListPortalsInput, ...func(*Options)) (*ListPortalsOutput, error) +} + +var _ ListPortalsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListPortals(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListTagsForResource.go b/service/workspacesweb/api_op_ListTagsForResource.go index 5f8739c3daf..ccc7ddcfc13 100644 --- a/service/workspacesweb/api_op_ListTagsForResource.go +++ b/service/workspacesweb/api_op_ListTagsForResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_ListTrustStoreCertificates.go b/service/workspacesweb/api_op_ListTrustStoreCertificates.go index ac5f366dd74..7c1e856091a 100644 --- a/service/workspacesweb/api_op_ListTrustStoreCertificates.go +++ b/service/workspacesweb/api_op_ListTrustStoreCertificates.go @@ -122,6 +122,9 @@ func (c *Client) addOperationListTrustStoreCertificatesMiddlewares(stack *middle if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTrustStoreCertificatesValidationMiddleware(stack); err != nil { return err } @@ -146,14 +149,6 @@ func (c *Client) addOperationListTrustStoreCertificatesMiddlewares(stack *middle return nil } -// ListTrustStoreCertificatesAPIClient is a client that implements the -// ListTrustStoreCertificates operation. -type ListTrustStoreCertificatesAPIClient interface { - ListTrustStoreCertificates(context.Context, *ListTrustStoreCertificatesInput, ...func(*Options)) (*ListTrustStoreCertificatesOutput, error) -} - -var _ ListTrustStoreCertificatesAPIClient = (*Client)(nil) - // ListTrustStoreCertificatesPaginatorOptions is the paginator options for // ListTrustStoreCertificates type ListTrustStoreCertificatesPaginatorOptions struct { @@ -220,6 +215,9 @@ func (p *ListTrustStoreCertificatesPaginator) NextPage(ctx context.Context, optF } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrustStoreCertificates(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -239,6 +237,14 @@ func (p *ListTrustStoreCertificatesPaginator) NextPage(ctx context.Context, optF return result, nil } +// ListTrustStoreCertificatesAPIClient is a client that implements the +// ListTrustStoreCertificates operation. +type ListTrustStoreCertificatesAPIClient interface { + ListTrustStoreCertificates(context.Context, *ListTrustStoreCertificatesInput, ...func(*Options)) (*ListTrustStoreCertificatesOutput, error) +} + +var _ ListTrustStoreCertificatesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrustStoreCertificates(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListTrustStores.go b/service/workspacesweb/api_op_ListTrustStores.go index 7d0f89b83ef..03e6e533d4f 100644 --- a/service/workspacesweb/api_op_ListTrustStores.go +++ b/service/workspacesweb/api_op_ListTrustStores.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListTrustStoresMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrustStores(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListTrustStoresMiddlewares(stack *middleware.Stack, return nil } -// ListTrustStoresAPIClient is a client that implements the ListTrustStores -// operation. -type ListTrustStoresAPIClient interface { - ListTrustStores(context.Context, *ListTrustStoresInput, ...func(*Options)) (*ListTrustStoresOutput, error) -} - -var _ ListTrustStoresAPIClient = (*Client)(nil) - // ListTrustStoresPaginatorOptions is the paginator options for ListTrustStores type ListTrustStoresPaginatorOptions struct { // The maximum number of results to be included in the next page. @@ -204,6 +199,9 @@ func (p *ListTrustStoresPaginator) NextPage(ctx context.Context, optFns ...func( } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTrustStores(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListTrustStoresPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// ListTrustStoresAPIClient is a client that implements the ListTrustStores +// operation. +type ListTrustStoresAPIClient interface { + ListTrustStores(context.Context, *ListTrustStoresInput, ...func(*Options)) (*ListTrustStoresOutput, error) +} + +var _ ListTrustStoresAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTrustStores(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListUserAccessLoggingSettings.go b/service/workspacesweb/api_op_ListUserAccessLoggingSettings.go index 39d7bccce99..7867498c5e2 100644 --- a/service/workspacesweb/api_op_ListUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_ListUserAccessLoggingSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListUserAccessLoggingSettingsMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserAccessLoggingSettings(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListUserAccessLoggingSettingsMiddlewares(stack *mid return nil } -// ListUserAccessLoggingSettingsAPIClient is a client that implements the -// ListUserAccessLoggingSettings operation. -type ListUserAccessLoggingSettingsAPIClient interface { - ListUserAccessLoggingSettings(context.Context, *ListUserAccessLoggingSettingsInput, ...func(*Options)) (*ListUserAccessLoggingSettingsOutput, error) -} - -var _ ListUserAccessLoggingSettingsAPIClient = (*Client)(nil) - // ListUserAccessLoggingSettingsPaginatorOptions is the paginator options for // ListUserAccessLoggingSettings type ListUserAccessLoggingSettingsPaginatorOptions struct { @@ -207,6 +202,9 @@ func (p *ListUserAccessLoggingSettingsPaginator) NextPage(ctx context.Context, o } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserAccessLoggingSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -226,6 +224,14 @@ func (p *ListUserAccessLoggingSettingsPaginator) NextPage(ctx context.Context, o return result, nil } +// ListUserAccessLoggingSettingsAPIClient is a client that implements the +// ListUserAccessLoggingSettings operation. +type ListUserAccessLoggingSettingsAPIClient interface { + ListUserAccessLoggingSettings(context.Context, *ListUserAccessLoggingSettingsInput, ...func(*Options)) (*ListUserAccessLoggingSettingsOutput, error) +} + +var _ ListUserAccessLoggingSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserAccessLoggingSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_ListUserSettings.go b/service/workspacesweb/api_op_ListUserSettings.go index 3f693efd55f..315301a6258 100644 --- a/service/workspacesweb/api_op_ListUserSettings.go +++ b/service/workspacesweb/api_op_ListUserSettings.go @@ -112,6 +112,9 @@ func (c *Client) addOperationListUserSettingsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserSettings(options.Region), middleware.Before); err != nil { return err } @@ -133,14 +136,6 @@ func (c *Client) addOperationListUserSettingsMiddlewares(stack *middleware.Stack return nil } -// ListUserSettingsAPIClient is a client that implements the ListUserSettings -// operation. -type ListUserSettingsAPIClient interface { - ListUserSettings(context.Context, *ListUserSettingsInput, ...func(*Options)) (*ListUserSettingsOutput, error) -} - -var _ ListUserSettingsAPIClient = (*Client)(nil) - // ListUserSettingsPaginatorOptions is the paginator options for ListUserSettings type ListUserSettingsPaginatorOptions struct { // The maximum number of results to be included in the next page. @@ -204,6 +199,9 @@ func (p *ListUserSettingsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListUserSettings(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -223,6 +221,14 @@ func (p *ListUserSettingsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// ListUserSettingsAPIClient is a client that implements the ListUserSettings +// operation. +type ListUserSettingsAPIClient interface { + ListUserSettings(context.Context, *ListUserSettingsInput, ...func(*Options)) (*ListUserSettingsOutput, error) +} + +var _ ListUserSettingsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListUserSettings(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/workspacesweb/api_op_TagResource.go b/service/workspacesweb/api_op_TagResource.go index 8f7847591f7..3c90256ee16 100644 --- a/service/workspacesweb/api_op_TagResource.go +++ b/service/workspacesweb/api_op_TagResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opTagResourceMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UntagResource.go b/service/workspacesweb/api_op_UntagResource.go index fdf169b2163..a7a95101308 100644 --- a/service/workspacesweb/api_op_UntagResource.go +++ b/service/workspacesweb/api_op_UntagResource.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateBrowserSettings.go b/service/workspacesweb/api_op_UpdateBrowserSettings.go index 9edb243d665..2e04a734137 100644 --- a/service/workspacesweb/api_op_UpdateBrowserSettings.go +++ b/service/workspacesweb/api_op_UpdateBrowserSettings.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateBrowserSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateBrowserSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateIdentityProvider.go b/service/workspacesweb/api_op_UpdateIdentityProvider.go index 3ecc1ddf998..6cf09ddc38e 100644 --- a/service/workspacesweb/api_op_UpdateIdentityProvider.go +++ b/service/workspacesweb/api_op_UpdateIdentityProvider.go @@ -192,6 +192,9 @@ func (c *Client) addOperationUpdateIdentityProviderMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateIdentityProviderMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateIpAccessSettings.go b/service/workspacesweb/api_op_UpdateIpAccessSettings.go index 4c2c3d75231..e3f85b81dd2 100644 --- a/service/workspacesweb/api_op_UpdateIpAccessSettings.go +++ b/service/workspacesweb/api_op_UpdateIpAccessSettings.go @@ -127,6 +127,9 @@ func (c *Client) addOperationUpdateIpAccessSettingsMiddlewares(stack *middleware if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateIpAccessSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateNetworkSettings.go b/service/workspacesweb/api_op_UpdateNetworkSettings.go index 344a1dd0497..efe1a04831a 100644 --- a/service/workspacesweb/api_op_UpdateNetworkSettings.go +++ b/service/workspacesweb/api_op_UpdateNetworkSettings.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdateNetworkSettingsMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateNetworkSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdatePortal.go b/service/workspacesweb/api_op_UpdatePortal.go index bef213ca024..186b622e3ac 100644 --- a/service/workspacesweb/api_op_UpdatePortal.go +++ b/service/workspacesweb/api_op_UpdatePortal.go @@ -130,6 +130,9 @@ func (c *Client) addOperationUpdatePortalMiddlewares(stack *middleware.Stack, op if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdatePortalValidationMiddleware(stack); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateTrustStore.go b/service/workspacesweb/api_op_UpdateTrustStore.go index 9da384864af..f59e85048bc 100644 --- a/service/workspacesweb/api_op_UpdateTrustStore.go +++ b/service/workspacesweb/api_op_UpdateTrustStore.go @@ -123,6 +123,9 @@ func (c *Client) addOperationUpdateTrustStoreMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateTrustStoreMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateUserAccessLoggingSettings.go b/service/workspacesweb/api_op_UpdateUserAccessLoggingSettings.go index cc7ed3bc430..5c4a3003de9 100644 --- a/service/workspacesweb/api_op_UpdateUserAccessLoggingSettings.go +++ b/service/workspacesweb/api_op_UpdateUserAccessLoggingSettings.go @@ -121,6 +121,9 @@ func (c *Client) addOperationUpdateUserAccessLoggingSettingsMiddlewares(stack *m if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateUserAccessLoggingSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/workspacesweb/api_op_UpdateUserSettings.go b/service/workspacesweb/api_op_UpdateUserSettings.go index e8baa5056f8..f45db704b09 100644 --- a/service/workspacesweb/api_op_UpdateUserSettings.go +++ b/service/workspacesweb/api_op_UpdateUserSettings.go @@ -152,6 +152,9 @@ func (c *Client) addOperationUpdateUserSettingsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addIdempotencyToken_opUpdateUserSettingsMiddleware(stack, options); err != nil { return err } diff --git a/service/xray/api_client.go b/service/xray/api_client.go index 1646d7d6c81..32223b5bd05 100644 --- a/service/xray/api_client.go +++ b/service/xray/api_client.go @@ -450,6 +450,30 @@ func addContentSHA256Header(stack *middleware.Stack) error { return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) } +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -535,6 +559,21 @@ func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode return nil } +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/xray/api_op_BatchGetTraces.go b/service/xray/api_op_BatchGetTraces.go index 1d68c5b6445..22cfcf7f022 100644 --- a/service/xray/api_op_BatchGetTraces.go +++ b/service/xray/api_op_BatchGetTraces.go @@ -117,6 +117,9 @@ func (c *Client) addOperationBatchGetTracesMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpBatchGetTracesValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationBatchGetTracesMiddlewares(stack *middleware.Stack, return nil } -// BatchGetTracesAPIClient is a client that implements the BatchGetTraces -// operation. -type BatchGetTracesAPIClient interface { - BatchGetTraces(context.Context, *BatchGetTracesInput, ...func(*Options)) (*BatchGetTracesOutput, error) -} - -var _ BatchGetTracesAPIClient = (*Client)(nil) - // BatchGetTracesPaginatorOptions is the paginator options for BatchGetTraces type BatchGetTracesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -200,6 +195,9 @@ func (p *BatchGetTracesPaginator) NextPage(ctx context.Context, optFns ...func(* params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.BatchGetTraces(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -219,6 +217,14 @@ func (p *BatchGetTracesPaginator) NextPage(ctx context.Context, optFns ...func(* return result, nil } +// BatchGetTracesAPIClient is a client that implements the BatchGetTraces +// operation. +type BatchGetTracesAPIClient interface { + BatchGetTraces(context.Context, *BatchGetTracesInput, ...func(*Options)) (*BatchGetTracesOutput, error) +} + +var _ BatchGetTracesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opBatchGetTraces(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_CreateGroup.go b/service/xray/api_op_CreateGroup.go index b93b8b18547..65373384e79 100644 --- a/service/xray/api_op_CreateGroup.go +++ b/service/xray/api_op_CreateGroup.go @@ -146,6 +146,9 @@ func (c *Client) addOperationCreateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateGroupValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_CreateSamplingRule.go b/service/xray/api_op_CreateSamplingRule.go index fe965dc77fc..6cf81a3c69e 100644 --- a/service/xray/api_op_CreateSamplingRule.go +++ b/service/xray/api_op_CreateSamplingRule.go @@ -138,6 +138,9 @@ func (c *Client) addOperationCreateSamplingRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpCreateSamplingRuleValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_DeleteGroup.go b/service/xray/api_op_DeleteGroup.go index 9bafecc539d..57ffeee614b 100644 --- a/service/xray/api_op_DeleteGroup.go +++ b/service/xray/api_op_DeleteGroup.go @@ -102,6 +102,9 @@ func (c *Client) addOperationDeleteGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/xray/api_op_DeleteResourcePolicy.go b/service/xray/api_op_DeleteResourcePolicy.go index 8ba8efd167b..4b3745f5521 100644 --- a/service/xray/api_op_DeleteResourcePolicy.go +++ b/service/xray/api_op_DeleteResourcePolicy.go @@ -107,6 +107,9 @@ func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_DeleteSamplingRule.go b/service/xray/api_op_DeleteSamplingRule.go index bbc6c832027..6e22f9b9eac 100644 --- a/service/xray/api_op_DeleteSamplingRule.go +++ b/service/xray/api_op_DeleteSamplingRule.go @@ -109,6 +109,9 @@ func (c *Client) addOperationDeleteSamplingRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSamplingRule(options.Region), middleware.Before); err != nil { return err } diff --git a/service/xray/api_op_GetEncryptionConfig.go b/service/xray/api_op_GetEncryptionConfig.go index adff41430bc..67265a82a92 100644 --- a/service/xray/api_op_GetEncryptionConfig.go +++ b/service/xray/api_op_GetEncryptionConfig.go @@ -100,6 +100,9 @@ func (c *Client) addOperationGetEncryptionConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEncryptionConfig(options.Region), middleware.Before); err != nil { return err } diff --git a/service/xray/api_op_GetGroup.go b/service/xray/api_op_GetGroup.go index 41d85e4c52c..41f1ab7a121 100644 --- a/service/xray/api_op_GetGroup.go +++ b/service/xray/api_op_GetGroup.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetGroupMiddlewares(stack *middleware.Stack, option if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/xray/api_op_GetGroups.go b/service/xray/api_op_GetGroups.go index 3c16f30bf5e..4bfbec0809a 100644 --- a/service/xray/api_op_GetGroups.go +++ b/service/xray/api_op_GetGroups.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetGroupsMiddlewares(stack *middleware.Stack, optio if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroups(options.Region), middleware.Before); err != nil { return err } @@ -128,13 +131,6 @@ func (c *Client) addOperationGetGroupsMiddlewares(stack *middleware.Stack, optio return nil } -// GetGroupsAPIClient is a client that implements the GetGroups operation. -type GetGroupsAPIClient interface { - GetGroups(context.Context, *GetGroupsInput, ...func(*Options)) (*GetGroupsOutput, error) -} - -var _ GetGroupsAPIClient = (*Client)(nil) - // GetGroupsPaginatorOptions is the paginator options for GetGroups type GetGroupsPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -186,6 +182,9 @@ func (p *GetGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetGroups(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -205,6 +204,13 @@ func (p *GetGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Optio return result, nil } +// GetGroupsAPIClient is a client that implements the GetGroups operation. +type GetGroupsAPIClient interface { + GetGroups(context.Context, *GetGroupsInput, ...func(*Options)) (*GetGroupsOutput, error) +} + +var _ GetGroupsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetInsight.go b/service/xray/api_op_GetInsight.go index 77a91817bba..fe343050b95 100644 --- a/service/xray/api_op_GetInsight.go +++ b/service/xray/api_op_GetInsight.go @@ -109,6 +109,9 @@ func (c *Client) addOperationGetInsightMiddlewares(stack *middleware.Stack, opti if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_GetInsightEvents.go b/service/xray/api_op_GetInsightEvents.go index 086820cd378..271e9f62022 100644 --- a/service/xray/api_op_GetInsightEvents.go +++ b/service/xray/api_op_GetInsightEvents.go @@ -121,6 +121,9 @@ func (c *Client) addOperationGetInsightEventsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightEventsValidationMiddleware(stack); err != nil { return err } @@ -145,14 +148,6 @@ func (c *Client) addOperationGetInsightEventsMiddlewares(stack *middleware.Stack return nil } -// GetInsightEventsAPIClient is a client that implements the GetInsightEvents -// operation. -type GetInsightEventsAPIClient interface { - GetInsightEvents(context.Context, *GetInsightEventsInput, ...func(*Options)) (*GetInsightEventsOutput, error) -} - -var _ GetInsightEventsAPIClient = (*Client)(nil) - // GetInsightEventsPaginatorOptions is the paginator options for GetInsightEvents type GetInsightEventsPaginatorOptions struct { // Used to retrieve at most the specified value of events. @@ -216,6 +211,9 @@ func (p *GetInsightEventsPaginator) NextPage(ctx context.Context, optFns ...func } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInsightEvents(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -235,6 +233,14 @@ func (p *GetInsightEventsPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetInsightEventsAPIClient is a client that implements the GetInsightEvents +// operation. +type GetInsightEventsAPIClient interface { + GetInsightEvents(context.Context, *GetInsightEventsInput, ...func(*Options)) (*GetInsightEventsOutput, error) +} + +var _ GetInsightEventsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInsightEvents(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetInsightImpactGraph.go b/service/xray/api_op_GetInsightImpactGraph.go index b5d2e09f11e..3aaa5ce293d 100644 --- a/service/xray/api_op_GetInsightImpactGraph.go +++ b/service/xray/api_op_GetInsightImpactGraph.go @@ -145,6 +145,9 @@ func (c *Client) addOperationGetInsightImpactGraphMiddlewares(stack *middleware. if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightImpactGraphValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_GetInsightSummaries.go b/service/xray/api_op_GetInsightSummaries.go index 7ffc54a298f..6bc82250983 100644 --- a/service/xray/api_op_GetInsightSummaries.go +++ b/service/xray/api_op_GetInsightSummaries.go @@ -137,6 +137,9 @@ func (c *Client) addOperationGetInsightSummariesMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetInsightSummariesValidationMiddleware(stack); err != nil { return err } @@ -161,14 +164,6 @@ func (c *Client) addOperationGetInsightSummariesMiddlewares(stack *middleware.St return nil } -// GetInsightSummariesAPIClient is a client that implements the -// GetInsightSummaries operation. -type GetInsightSummariesAPIClient interface { - GetInsightSummaries(context.Context, *GetInsightSummariesInput, ...func(*Options)) (*GetInsightSummariesOutput, error) -} - -var _ GetInsightSummariesAPIClient = (*Client)(nil) - // GetInsightSummariesPaginatorOptions is the paginator options for // GetInsightSummaries type GetInsightSummariesPaginatorOptions struct { @@ -233,6 +228,9 @@ func (p *GetInsightSummariesPaginator) NextPage(ctx context.Context, optFns ...f } params.MaxResults = limit + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetInsightSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -252,6 +250,14 @@ func (p *GetInsightSummariesPaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// GetInsightSummariesAPIClient is a client that implements the +// GetInsightSummaries operation. +type GetInsightSummariesAPIClient interface { + GetInsightSummaries(context.Context, *GetInsightSummariesInput, ...func(*Options)) (*GetInsightSummariesOutput, error) +} + +var _ GetInsightSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetInsightSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetSamplingRules.go b/service/xray/api_op_GetSamplingRules.go index 16d19fe8ba9..d7fd9a4ae02 100644 --- a/service/xray/api_op_GetSamplingRules.go +++ b/service/xray/api_op_GetSamplingRules.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetSamplingRulesMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSamplingRules(options.Region), middleware.Before); err != nil { return err } @@ -128,14 +131,6 @@ func (c *Client) addOperationGetSamplingRulesMiddlewares(stack *middleware.Stack return nil } -// GetSamplingRulesAPIClient is a client that implements the GetSamplingRules -// operation. -type GetSamplingRulesAPIClient interface { - GetSamplingRules(context.Context, *GetSamplingRulesInput, ...func(*Options)) (*GetSamplingRulesOutput, error) -} - -var _ GetSamplingRulesAPIClient = (*Client)(nil) - // GetSamplingRulesPaginatorOptions is the paginator options for GetSamplingRules type GetSamplingRulesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -187,6 +182,9 @@ func (p *GetSamplingRulesPaginator) NextPage(ctx context.Context, optFns ...func params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSamplingRules(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -206,6 +204,14 @@ func (p *GetSamplingRulesPaginator) NextPage(ctx context.Context, optFns ...func return result, nil } +// GetSamplingRulesAPIClient is a client that implements the GetSamplingRules +// operation. +type GetSamplingRulesAPIClient interface { + GetSamplingRules(context.Context, *GetSamplingRulesInput, ...func(*Options)) (*GetSamplingRulesOutput, error) +} + +var _ GetSamplingRulesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSamplingRules(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetSamplingStatisticSummaries.go b/service/xray/api_op_GetSamplingStatisticSummaries.go index daac75e3384..0a6759d2a41 100644 --- a/service/xray/api_op_GetSamplingStatisticSummaries.go +++ b/service/xray/api_op_GetSamplingStatisticSummaries.go @@ -107,6 +107,9 @@ func (c *Client) addOperationGetSamplingStatisticSummariesMiddlewares(stack *mid if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSamplingStatisticSummaries(options.Region), middleware.Before); err != nil { return err } @@ -128,14 +131,6 @@ func (c *Client) addOperationGetSamplingStatisticSummariesMiddlewares(stack *mid return nil } -// GetSamplingStatisticSummariesAPIClient is a client that implements the -// GetSamplingStatisticSummaries operation. -type GetSamplingStatisticSummariesAPIClient interface { - GetSamplingStatisticSummaries(context.Context, *GetSamplingStatisticSummariesInput, ...func(*Options)) (*GetSamplingStatisticSummariesOutput, error) -} - -var _ GetSamplingStatisticSummariesAPIClient = (*Client)(nil) - // GetSamplingStatisticSummariesPaginatorOptions is the paginator options for // GetSamplingStatisticSummaries type GetSamplingStatisticSummariesPaginatorOptions struct { @@ -190,6 +185,9 @@ func (p *GetSamplingStatisticSummariesPaginator) NextPage(ctx context.Context, o params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetSamplingStatisticSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -209,6 +207,14 @@ func (p *GetSamplingStatisticSummariesPaginator) NextPage(ctx context.Context, o return result, nil } +// GetSamplingStatisticSummariesAPIClient is a client that implements the +// GetSamplingStatisticSummaries operation. +type GetSamplingStatisticSummariesAPIClient interface { + GetSamplingStatisticSummaries(context.Context, *GetSamplingStatisticSummariesInput, ...func(*Options)) (*GetSamplingStatisticSummariesOutput, error) +} + +var _ GetSamplingStatisticSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetSamplingStatisticSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetSamplingTargets.go b/service/xray/api_op_GetSamplingTargets.go index 7a25949372c..1eb697fee41 100644 --- a/service/xray/api_op_GetSamplingTargets.go +++ b/service/xray/api_op_GetSamplingTargets.go @@ -120,6 +120,9 @@ func (c *Client) addOperationGetSamplingTargetsMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetSamplingTargetsValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_GetServiceGraph.go b/service/xray/api_op_GetServiceGraph.go index a399859bf75..5b44f0f9ad1 100644 --- a/service/xray/api_op_GetServiceGraph.go +++ b/service/xray/api_op_GetServiceGraph.go @@ -143,6 +143,9 @@ func (c *Client) addOperationGetServiceGraphMiddlewares(stack *middleware.Stack, if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetServiceGraphValidationMiddleware(stack); err != nil { return err } @@ -167,14 +170,6 @@ func (c *Client) addOperationGetServiceGraphMiddlewares(stack *middleware.Stack, return nil } -// GetServiceGraphAPIClient is a client that implements the GetServiceGraph -// operation. -type GetServiceGraphAPIClient interface { - GetServiceGraph(context.Context, *GetServiceGraphInput, ...func(*Options)) (*GetServiceGraphOutput, error) -} - -var _ GetServiceGraphAPIClient = (*Client)(nil) - // GetServiceGraphPaginatorOptions is the paginator options for GetServiceGraph type GetServiceGraphPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -226,6 +221,9 @@ func (p *GetServiceGraphPaginator) NextPage(ctx context.Context, optFns ...func( params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetServiceGraph(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -245,6 +243,14 @@ func (p *GetServiceGraphPaginator) NextPage(ctx context.Context, optFns ...func( return result, nil } +// GetServiceGraphAPIClient is a client that implements the GetServiceGraph +// operation. +type GetServiceGraphAPIClient interface { + GetServiceGraph(context.Context, *GetServiceGraphInput, ...func(*Options)) (*GetServiceGraphOutput, error) +} + +var _ GetServiceGraphAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetServiceGraph(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetTimeSeriesServiceStatistics.go b/service/xray/api_op_GetTimeSeriesServiceStatistics.go index 71f0e448763..71be03db852 100644 --- a/service/xray/api_op_GetTimeSeriesServiceStatistics.go +++ b/service/xray/api_op_GetTimeSeriesServiceStatistics.go @@ -141,6 +141,9 @@ func (c *Client) addOperationGetTimeSeriesServiceStatisticsMiddlewares(stack *mi if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTimeSeriesServiceStatisticsValidationMiddleware(stack); err != nil { return err } @@ -165,14 +168,6 @@ func (c *Client) addOperationGetTimeSeriesServiceStatisticsMiddlewares(stack *mi return nil } -// GetTimeSeriesServiceStatisticsAPIClient is a client that implements the -// GetTimeSeriesServiceStatistics operation. -type GetTimeSeriesServiceStatisticsAPIClient interface { - GetTimeSeriesServiceStatistics(context.Context, *GetTimeSeriesServiceStatisticsInput, ...func(*Options)) (*GetTimeSeriesServiceStatisticsOutput, error) -} - -var _ GetTimeSeriesServiceStatisticsAPIClient = (*Client)(nil) - // GetTimeSeriesServiceStatisticsPaginatorOptions is the paginator options for // GetTimeSeriesServiceStatistics type GetTimeSeriesServiceStatisticsPaginatorOptions struct { @@ -227,6 +222,9 @@ func (p *GetTimeSeriesServiceStatisticsPaginator) NextPage(ctx context.Context, params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTimeSeriesServiceStatistics(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -246,6 +244,14 @@ func (p *GetTimeSeriesServiceStatisticsPaginator) NextPage(ctx context.Context, return result, nil } +// GetTimeSeriesServiceStatisticsAPIClient is a client that implements the +// GetTimeSeriesServiceStatistics operation. +type GetTimeSeriesServiceStatisticsAPIClient interface { + GetTimeSeriesServiceStatistics(context.Context, *GetTimeSeriesServiceStatisticsInput, ...func(*Options)) (*GetTimeSeriesServiceStatisticsOutput, error) +} + +var _ GetTimeSeriesServiceStatisticsAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTimeSeriesServiceStatistics(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetTraceGraph.go b/service/xray/api_op_GetTraceGraph.go index abec36b19c7..59e0f2d47d9 100644 --- a/service/xray/api_op_GetTraceGraph.go +++ b/service/xray/api_op_GetTraceGraph.go @@ -112,6 +112,9 @@ func (c *Client) addOperationGetTraceGraphMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTraceGraphValidationMiddleware(stack); err != nil { return err } @@ -136,13 +139,6 @@ func (c *Client) addOperationGetTraceGraphMiddlewares(stack *middleware.Stack, o return nil } -// GetTraceGraphAPIClient is a client that implements the GetTraceGraph operation. -type GetTraceGraphAPIClient interface { - GetTraceGraph(context.Context, *GetTraceGraphInput, ...func(*Options)) (*GetTraceGraphOutput, error) -} - -var _ GetTraceGraphAPIClient = (*Client)(nil) - // GetTraceGraphPaginatorOptions is the paginator options for GetTraceGraph type GetTraceGraphPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -194,6 +190,9 @@ func (p *GetTraceGraphPaginator) NextPage(ctx context.Context, optFns ...func(*O params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTraceGraph(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -213,6 +212,13 @@ func (p *GetTraceGraphPaginator) NextPage(ctx context.Context, optFns ...func(*O return result, nil } +// GetTraceGraphAPIClient is a client that implements the GetTraceGraph operation. +type GetTraceGraphAPIClient interface { + GetTraceGraph(context.Context, *GetTraceGraphInput, ...func(*Options)) (*GetTraceGraphOutput, error) +} + +var _ GetTraceGraphAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTraceGraph(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_GetTraceSummaries.go b/service/xray/api_op_GetTraceSummaries.go index fff0e3192b6..c9529b8123e 100644 --- a/service/xray/api_op_GetTraceSummaries.go +++ b/service/xray/api_op_GetTraceSummaries.go @@ -162,6 +162,9 @@ func (c *Client) addOperationGetTraceSummariesMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpGetTraceSummariesValidationMiddleware(stack); err != nil { return err } @@ -186,14 +189,6 @@ func (c *Client) addOperationGetTraceSummariesMiddlewares(stack *middleware.Stac return nil } -// GetTraceSummariesAPIClient is a client that implements the GetTraceSummaries -// operation. -type GetTraceSummariesAPIClient interface { - GetTraceSummaries(context.Context, *GetTraceSummariesInput, ...func(*Options)) (*GetTraceSummariesOutput, error) -} - -var _ GetTraceSummariesAPIClient = (*Client)(nil) - // GetTraceSummariesPaginatorOptions is the paginator options for GetTraceSummaries type GetTraceSummariesPaginatorOptions struct { // Set to true if pagination should stop if the service returns a pagination token @@ -245,6 +240,9 @@ func (p *GetTraceSummariesPaginator) NextPage(ctx context.Context, optFns ...fun params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.GetTraceSummaries(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -264,6 +262,14 @@ func (p *GetTraceSummariesPaginator) NextPage(ctx context.Context, optFns ...fun return result, nil } +// GetTraceSummariesAPIClient is a client that implements the GetTraceSummaries +// operation. +type GetTraceSummariesAPIClient interface { + GetTraceSummaries(context.Context, *GetTraceSummariesInput, ...func(*Options)) (*GetTraceSummariesOutput, error) +} + +var _ GetTraceSummariesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opGetTraceSummaries(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_ListResourcePolicies.go b/service/xray/api_op_ListResourcePolicies.go index e25f742218c..3c672bbb7b1 100644 --- a/service/xray/api_op_ListResourcePolicies.go +++ b/service/xray/api_op_ListResourcePolicies.go @@ -107,6 +107,9 @@ func (c *Client) addOperationListResourcePoliciesMiddlewares(stack *middleware.S if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourcePolicies(options.Region), middleware.Before); err != nil { return err } @@ -128,14 +131,6 @@ func (c *Client) addOperationListResourcePoliciesMiddlewares(stack *middleware.S return nil } -// ListResourcePoliciesAPIClient is a client that implements the -// ListResourcePolicies operation. -type ListResourcePoliciesAPIClient interface { - ListResourcePolicies(context.Context, *ListResourcePoliciesInput, ...func(*Options)) (*ListResourcePoliciesOutput, error) -} - -var _ ListResourcePoliciesAPIClient = (*Client)(nil) - // ListResourcePoliciesPaginatorOptions is the paginator options for // ListResourcePolicies type ListResourcePoliciesPaginatorOptions struct { @@ -188,6 +183,9 @@ func (p *ListResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ... params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListResourcePolicies(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -207,6 +205,14 @@ func (p *ListResourcePoliciesPaginator) NextPage(ctx context.Context, optFns ... return result, nil } +// ListResourcePoliciesAPIClient is a client that implements the +// ListResourcePolicies operation. +type ListResourcePoliciesAPIClient interface { + ListResourcePolicies(context.Context, *ListResourcePoliciesInput, ...func(*Options)) (*ListResourcePoliciesOutput, error) +} + +var _ ListResourcePoliciesAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListResourcePolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_ListTagsForResource.go b/service/xray/api_op_ListTagsForResource.go index 65b478c405d..5d536e7f00d 100644 --- a/service/xray/api_op_ListTagsForResource.go +++ b/service/xray/api_op_ListTagsForResource.go @@ -117,6 +117,9 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } @@ -141,14 +144,6 @@ func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.St return nil } -// ListTagsForResourceAPIClient is a client that implements the -// ListTagsForResource operation. -type ListTagsForResourceAPIClient interface { - ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) -} - -var _ ListTagsForResourceAPIClient = (*Client)(nil) - // ListTagsForResourcePaginatorOptions is the paginator options for // ListTagsForResource type ListTagsForResourcePaginatorOptions struct { @@ -201,6 +196,9 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f params := *p.params params.NextToken = p.nextToken + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...) if err != nil { return nil, err @@ -220,6 +218,14 @@ func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...f return result, nil } +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/xray/api_op_PutEncryptionConfig.go b/service/xray/api_op_PutEncryptionConfig.go index 478f4565dba..5bdd50a9b4a 100644 --- a/service/xray/api_op_PutEncryptionConfig.go +++ b/service/xray/api_op_PutEncryptionConfig.go @@ -122,6 +122,9 @@ func (c *Client) addOperationPutEncryptionConfigMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutEncryptionConfigValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_PutResourcePolicy.go b/service/xray/api_op_PutResourcePolicy.go index a22efa69128..bcef51020fb 100644 --- a/service/xray/api_op_PutResourcePolicy.go +++ b/service/xray/api_op_PutResourcePolicy.go @@ -141,6 +141,9 @@ func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stac if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_PutTelemetryRecords.go b/service/xray/api_op_PutTelemetryRecords.go index ed9293e8374..bf7954fce69 100644 --- a/service/xray/api_op_PutTelemetryRecords.go +++ b/service/xray/api_op_PutTelemetryRecords.go @@ -111,6 +111,9 @@ func (c *Client) addOperationPutTelemetryRecordsMiddlewares(stack *middleware.St if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutTelemetryRecordsValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_PutTraceSegments.go b/service/xray/api_op_PutTraceSegments.go index 1bcc65cbc83..72d32719b02 100644 --- a/service/xray/api_op_PutTraceSegments.go +++ b/service/xray/api_op_PutTraceSegments.go @@ -154,6 +154,9 @@ func (c *Client) addOperationPutTraceSegmentsMiddlewares(stack *middleware.Stack if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpPutTraceSegmentsValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_TagResource.go b/service/xray/api_op_TagResource.go index e7eef4b82c1..6b2ed61484b 100644 --- a/service/xray/api_op_TagResource.go +++ b/service/xray/api_op_TagResource.go @@ -127,6 +127,9 @@ func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_UntagResource.go b/service/xray/api_op_UntagResource.go index 499f01d203e..460918d9d76 100644 --- a/service/xray/api_op_UntagResource.go +++ b/service/xray/api_op_UntagResource.go @@ -108,6 +108,9 @@ func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, o if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } diff --git a/service/xray/api_op_UpdateGroup.go b/service/xray/api_op_UpdateGroup.go index c352d5911a3..615a476b211 100644 --- a/service/xray/api_op_UpdateGroup.go +++ b/service/xray/api_op_UpdateGroup.go @@ -122,6 +122,9 @@ func (c *Client) addOperationUpdateGroupMiddlewares(stack *middleware.Stack, opt if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGroup(options.Region), middleware.Before); err != nil { return err } diff --git a/service/xray/api_op_UpdateSamplingRule.go b/service/xray/api_op_UpdateSamplingRule.go index 873707d2c9d..89adeb070a7 100644 --- a/service/xray/api_op_UpdateSamplingRule.go +++ b/service/xray/api_op_UpdateSamplingRule.go @@ -106,6 +106,9 @@ func (c *Client) addOperationUpdateSamplingRuleMiddlewares(stack *middleware.Sta if err = addTimeOffsetBuild(stack, c); err != nil { return err } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } if err = addOpUpdateSamplingRuleValidationMiddleware(stack); err != nil { return err }